From e0c9b181ac6b8c353092c80cab5090416489fd31 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 5 Nov 2024 09:17:46 +0000 Subject: [PATCH 1/3] chore: remove body selector from http rule PiperOrigin-RevId: 693215877 Source-Link: https://github.com/googleapis/googleapis/commit/bb6b53e326ce2db403d18be7158c265e07948920 Source-Link: https://github.com/googleapis/googleapis-gen/commit/db8b5a93484ad44055b2bacc4c7cf87e970fe0ed Copy-Tag: eyJwIjoiU3FsQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoiU3RvcmFnZUNvbnRyb2wvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoiU3RvcmFnZUluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiU3RvcmFnZVRyYW5zZmVyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiU3VwcG9ydC8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoiVGFsZW50Ly5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVGFza3MvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoiVGVsY29BdXRvbWF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVGV4dFRvU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVHB1Ly5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVHJhY2UvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoiVHJhbnNsYXRlLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVmlkZW9JbnRlbGxpZ2VuY2UvLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoiVmlkZW9MaXZlU3RyZWFtLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVmlkZW9TdGl0Y2hlci8uT3dsQm90LnlhbWwiLCJoIjoiZGI4YjVhOTM0ODRhZDQ0MDU1YjJiYWNjNGM3Y2Y4N2U5NzBmZTBlZCJ9 Copy-Tag: eyJwIjoiVmlkZW9UcmFuc2NvZGVyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVmlzaW9uLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVm1NaWdyYXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImRiOGI1YTkzNDg0YWQ0NDA1NWIyYmFjYzRjN2NmODdlOTcwZmUwZWQifQ== Copy-Tag: eyJwIjoiVm13YXJlRW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= Copy-Tag: eyJwIjoiVnBjQWNjZXNzLy5Pd2xCb3QueWFtbCIsImgiOiJkYjhiNWE5MzQ4NGFkNDQwNTViMmJhY2M0YzdjZjg3ZTk3MGZlMGVkIn0= --- .../V1/CloudSqlAvailableDatabaseVersions.php | 31 + .../Cloud/Sql/V1/CloudSqlBackupRuns.php | Bin 0 -> 3592 bytes .../Google/Cloud/Sql/V1/CloudSqlConnect.php | Bin 0 -> 2697 bytes .../Google/Cloud/Sql/V1/CloudSqlDatabases.php | 60 + .../Google/Cloud/Sql/V1/CloudSqlEvents.php | 31 + .../Google/Cloud/Sql/V1/CloudSqlFlags.php | Bin 0 -> 1992 bytes .../Cloud/Sql/V1/CloudSqlIamPolicies.php | 30 + .../Cloud/Sql/V1/CloudSqlInstanceNames.php | 31 + .../Google/Cloud/Sql/V1/CloudSqlInstances.php | Bin 0 -> 22664 bytes .../Cloud/Sql/V1/CloudSqlOperations.php | 52 + .../Google/Cloud/Sql/V1/CloudSqlRegions.php | 31 + .../Google/Cloud/Sql/V1/CloudSqlResources.php | Bin 0 -> 16028 bytes .../Google/Cloud/Sql/V1/CloudSqlSslCerts.php | 60 + .../Google/Cloud/Sql/V1/CloudSqlTiers.php | 43 + .../Google/Cloud/Sql/V1/CloudSqlUsers.php | Bin 0 -> 3866 bytes .../src/Google/Cloud/Sql/V1/AclEntry.php | 187 + .../Cloud/Sql/V1/AcquireSsrsLeaseContext.php | 217 + .../Cloud/Sql/V1/AdvancedMachineFeatures.php | 67 + .../src/Google/Cloud/Sql/V1/ApiWarning.php | 135 + .../Sql/V1/ApiWarning/SqlApiWarningCode.php | 80 + .../Cloud/Sql/V1/AvailableDatabaseVersion.php | 169 + .../Cloud/Sql/V1/BackupConfiguration.php | 598 ++ .../TransactionalLogStorageState.php | 85 + .../src/Google/Cloud/Sql/V1/BackupContext.php | 101 + .../Cloud/Sql/V1/BackupReencryptionConfig.php | 121 + .../BackupReencryptionConfig/BackupType.php | 64 + .../Cloud/Sql/V1/BackupRetentionSettings.php | 151 + .../BackupRetentionSettings/RetentionUnit.php | 57 + .../src/Google/Cloud/Sql/V1/BackupRun.php | 777 ++ .../Cloud/Sql/V1/BackupRunsListResponse.php | 139 + .../proto/src/Google/Cloud/Sql/V1/BakType.php | 66 + .../Google/Cloud/Sql/V1/BinLogCoordinates.php | 135 + .../src/Google/Cloud/Sql/V1/CloneContext.php | 383 + .../Google/Cloud/Sql/V1/ConnectSettings.php | 405 + .../Cloud/Sql/V1/ConnectSettings/CaMode.php | 65 + .../Google/Cloud/Sql/V1/DataCacheConfig.php | 67 + .../src/Google/Cloud/Sql/V1/Database.php | 354 + .../src/Google/Cloud/Sql/V1/DatabaseFlags.php | 125 + .../Google/Cloud/Sql/V1/DatabaseInstance.php | 2157 +++++ .../DatabaseInstance/SqlFailoverReplica.php | 159 + .../V1/DatabaseInstance/SqlInstanceState.php | 100 + .../SqlNetworkArchitecture.php | 62 + .../DatabaseInstance/SqlOutOfDiskReport.php | 160 + .../SqlOutOfDiskReport/SqlOutOfDiskState.php | 65 + .../SqlScheduledMaintenance.php | 190 + .../Cloud/Sql/V1/DatabasesListResponse.php | 101 + .../src/Google/Cloud/Sql/V1/DemoteContext.php | 106 + .../Sql/V1/DemoteMasterConfiguration.php | 132 + .../Cloud/Sql/V1/DemoteMasterContext.php | 294 + .../DemoteMasterMySqlReplicaConfiguration.php | 245 + .../Cloud/Sql/V1/DenyMaintenancePeriod.php | 164 + .../Sql/V1/DiskEncryptionConfiguration.php | 101 + .../Cloud/Sql/V1/DiskEncryptionStatus.php | 101 + .../src/Google/Cloud/Sql/V1/ExportContext.php | 436 + .../V1/ExportContext/SqlBakExportOptions.php | 380 + .../V1/ExportContext/SqlCsvExportOptions.php | 216 + .../Sql/V1/ExportContext/SqlExportOptions.php | 370 + .../SqlExportOptions/MysqlExportOptions.php | 137 + .../PostgresExportOptions.php | 196 + .../Sql/V1/ExternalSyncParallelLevel.php | 68 + .../Google/Cloud/Sql/V1/FailoverContext.php | 105 + .../v1/proto/src/Google/Cloud/Sql/V1/Flag.php | 579 ++ .../Google/Cloud/Sql/V1/FlagsListResponse.php | 101 + .../Cloud/Sql/V1/GeminiInstanceConfig.php | 297 + .../Sql/V1/GenerateEphemeralCertRequest.php | 261 + .../Sql/V1/GenerateEphemeralCertResponse.php | 77 + .../Sql/V1/GetConnectSettingsRequest.php | 149 + .../src/Google/Cloud/Sql/V1/ImportContext.php | 363 + .../V1/ImportContext/SqlBakImportOptions.php | 452 + .../SqlBakImportOptions/EncryptionOptions.php | 152 + .../V1/ImportContext/SqlCsvImportOptions.php | 254 + .../Sql/V1/ImportContext/SqlImportOptions.php | 220 + .../PostgresImportOptions.php | 188 + .../Google/Cloud/Sql/V1/InsightsConfig.php | 306 + .../Google/Cloud/Sql/V1/InstanceReference.php | 143 + .../V1/InstancesAcquireSsrsLeaseRequest.php | 77 + .../Cloud/Sql/V1/InstancesCloneRequest.php | 77 + .../Sql/V1/InstancesDemoteMasterRequest.php | 77 + .../Cloud/Sql/V1/InstancesDemoteRequest.php | 78 + .../Cloud/Sql/V1/InstancesExportRequest.php | 77 + .../Cloud/Sql/V1/InstancesFailoverRequest.php | 77 + .../Cloud/Sql/V1/InstancesImportRequest.php | 77 + .../Cloud/Sql/V1/InstancesListResponse.php | 173 + .../Sql/V1/InstancesListServerCasResponse.php | 128 + .../Sql/V1/InstancesReencryptRequest.php | 77 + .../Sql/V1/InstancesRestoreBackupRequest.php | 77 + .../Sql/V1/InstancesRotateServerCaRequest.php | 77 + .../Sql/V1/InstancesTruncateLogRequest.php | 77 + .../Google/Cloud/Sql/V1/IpConfiguration.php | 618 ++ .../Cloud/Sql/V1/IpConfiguration/CaMode.php | 65 + .../Cloud/Sql/V1/IpConfiguration/SslMode.php | 90 + .../src/Google/Cloud/Sql/V1/IpMapping.php | 169 + .../Cloud/Sql/V1/LocationPreference.php | 193 + .../Google/Cloud/Sql/V1/MaintenanceWindow.php | 264 + .../Sql/V1/MySqlReplicaConfiguration.php | 548 ++ .../Google/Cloud/Sql/V1/MySqlSyncConfig.php | 67 + .../Cloud/Sql/V1/OnPremisesConfiguration.php | 353 + .../src/Google/Cloud/Sql/V1/Operation.php | 814 ++ .../Sql/V1/Operation/SqlOperationStatus.php | 71 + .../Sql/V1/Operation/SqlOperationType.php | 379 + .../Google/Cloud/Sql/V1/OperationError.php | 135 + .../Google/Cloud/Sql/V1/OperationErrors.php | 101 + .../Cloud/Sql/V1/OperationsListResponse.php | 139 + .../Google/Cloud/Sql/V1/PasswordStatus.php | 111 + .../Cloud/Sql/V1/PasswordValidationPolicy.php | 484 + .../PasswordValidationPolicy/Complexity.php | 58 + .../Cloud/Sql/V1/PerformDiskShrinkContext.php | 67 + .../src/Google/Cloud/Sql/V1/PscConfig.php | 127 + .../Cloud/Sql/V1/ReplicaConfiguration.php | 309 + .../Cloud/Sql/V1/ReplicationCluster.php | 186 + .../Cloud/Sql/V1/RestoreBackupContext.php | 170 + .../Cloud/Sql/V1/RotateServerCaContext.php | 105 + .../src/Google/Cloud/Sql/V1/Settings.php | 1856 ++++ .../Sql/V1/Settings/ConnectorEnforcement.php | 66 + .../Google/Cloud/Sql/V1/Settings/Edition.php | 64 + .../Sql/V1/Settings/SqlActivationPolicy.php | 71 + .../Cloud/Sql/V1/SqlActiveDirectoryConfig.php | 101 + .../Cloud/Sql/V1/SqlAvailabilityType.php | 61 + .../Google/Cloud/Sql/V1/SqlBackendType.php | 66 + .../src/Google/Cloud/Sql/V1/SqlBackupKind.php | 61 + .../Cloud/Sql/V1/SqlBackupRunStatus.php | 113 + .../Google/Cloud/Sql/V1/SqlBackupRunType.php | 61 + .../Sql/V1/SqlBackupRunsDeleteRequest.php | 143 + .../Cloud/Sql/V1/SqlBackupRunsGetRequest.php | 135 + .../Sql/V1/SqlBackupRunsInsertRequest.php | 138 + .../Cloud/Sql/V1/SqlBackupRunsListRequest.php | 177 + .../Google/Cloud/Sql/V1/SqlDataDiskType.php | 69 + .../Cloud/Sql/V1/SqlDatabaseVersion.php | 348 + .../Sql/V1/SqlDatabasesDeleteRequest.php | 135 + .../Cloud/Sql/V1/SqlDatabasesGetRequest.php | 135 + .../Sql/V1/SqlDatabasesInsertRequest.php | 138 + .../Cloud/Sql/V1/SqlDatabasesListRequest.php | 101 + .../Sql/V1/SqlDatabasesUpdateRequest.php | 172 + .../Sql/V1/SqlExternalSyncSettingError.php | 139 + .../SqlExternalSyncSettingErrorType.php | 402 + .../src/Google/Cloud/Sql/V1/SqlFileType.php | 64 + .../src/Google/Cloud/Sql/V1/SqlFlagType.php | 95 + .../Cloud/Sql/V1/SqlFlagsListRequest.php | 71 + .../Google/Cloud/Sql/V1/SqlInstanceType.php | 68 + .../SqlInstancesAcquireSsrsLeaseRequest.php | 161 + .../SqlInstancesAcquireSsrsLeaseResponse.php | 67 + .../Sql/V1/SqlInstancesAddServerCaRequest.php | 101 + .../Cloud/Sql/V1/SqlInstancesCloneRequest.php | 142 + ...SqlInstancesCreateEphemeralCertRequest.php | 138 + .../Sql/V1/SqlInstancesDeleteRequest.php | 101 + .../V1/SqlInstancesDemoteMasterRequest.php | 138 + .../Sql/V1/SqlInstancesDemoteRequest.php | 145 + .../Sql/V1/SqlInstancesExportRequest.php | 138 + .../Sql/V1/SqlInstancesFailoverRequest.php | 138 + ...SqlInstancesGetDiskShrinkConfigRequest.php | 101 + ...qlInstancesGetDiskShrinkConfigResponse.php | 135 + ...lInstancesGetLatestRecoveryTimeRequest.php | 101 + ...InstancesGetLatestRecoveryTimeResponse.php | 111 + .../Cloud/Sql/V1/SqlInstancesGetRequest.php | 101 + .../Sql/V1/SqlInstancesImportRequest.php | 138 + .../Sql/V1/SqlInstancesInsertRequest.php | 108 + .../Cloud/Sql/V1/SqlInstancesListRequest.php | 213 + .../V1/SqlInstancesListServerCasRequest.php | 101 + .../Cloud/Sql/V1/SqlInstancesPatchRequest.php | 138 + .../SqlInstancesPerformDiskShrinkRequest.php | 145 + .../V1/SqlInstancesPromoteReplicaRequest.php | 159 + .../Sql/V1/SqlInstancesReencryptRequest.php | 145 + .../SqlInstancesReleaseSsrsLeaseRequest.php | 113 + .../SqlInstancesReleaseSsrsLeaseResponse.php | 67 + ...lInstancesRescheduleMaintenanceRequest.php | 138 + ...tancesRescheduleMaintenanceRequestBody.php | 77 + .../Reschedule.php | 124 + .../RescheduleType.php | 68 + .../SqlInstancesResetReplicaSizeRequest.php | 101 + .../V1/SqlInstancesResetSslConfigRequest.php | 101 + .../Sql/V1/SqlInstancesRestartRequest.php | 101 + .../V1/SqlInstancesRestoreBackupRequest.php | 138 + .../V1/SqlInstancesRotateServerCaRequest.php | 138 + .../SqlInstancesStartExternalSyncRequest.php | 291 + .../V1/SqlInstancesStartReplicaRequest.php | 101 + .../Sql/V1/SqlInstancesStopReplicaRequest.php | 101 + .../Sql/V1/SqlInstancesSwitchoverRequest.php | 153 + .../Sql/V1/SqlInstancesTruncateLogRequest.php | 138 + .../Sql/V1/SqlInstancesUpdateRequest.php | 138 + ...ancesVerifyExternalSyncSettingsRequest.php | 325 + .../ExternalSyncMode.php | 64 + .../MigrationType.php | 65 + ...ncesVerifyExternalSyncSettingsResponse.php | 135 + .../Google/Cloud/Sql/V1/SqlIpAddressType.php | 83 + .../Sql/V1/SqlOperationsCancelRequest.php | 101 + .../Cloud/Sql/V1/SqlOperationsGetRequest.php | 101 + .../Cloud/Sql/V1/SqlOperationsListRequest.php | 173 + .../Google/Cloud/Sql/V1/SqlPricingPlan.php | 61 + .../Cloud/Sql/V1/SqlReplicationType.php | 63 + .../Cloud/Sql/V1/SqlServerAuditConfig.php | 189 + .../Cloud/Sql/V1/SqlServerDatabaseDetails.php | 101 + .../Cloud/Sql/V1/SqlServerUserDetails.php | 101 + .../Cloud/Sql/V1/SqlSslCertsDeleteRequest.php | 133 + .../Cloud/Sql/V1/SqlSslCertsGetRequest.php | 133 + .../Cloud/Sql/V1/SqlSslCertsInsertRequest.php | 136 + .../Cloud/Sql/V1/SqlSslCertsListRequest.php | 99 + .../Cloud/Sql/V1/SqlSuspensionReason.php | 78 + .../Cloud/Sql/V1/SqlTiersListRequest.php | 67 + .../Google/Cloud/Sql/V1/SqlUpdateTrack.php | 74 + .../Cloud/Sql/V1/SqlUsersDeleteRequest.php | 167 + .../Cloud/Sql/V1/SqlUsersGetRequest.php | 169 + .../Cloud/Sql/V1/SqlUsersInsertRequest.php | 136 + .../Cloud/Sql/V1/SqlUsersListRequest.php | 99 + .../Cloud/Sql/V1/SqlUsersUpdateRequest.php | 204 + .../proto/src/Google/Cloud/Sql/V1/SslCert.php | 375 + .../src/Google/Cloud/Sql/V1/SslCertDetail.php | 115 + .../Sql/V1/SslCertsCreateEphemeralRequest.php | 101 + .../Cloud/Sql/V1/SslCertsInsertRequest.php | 71 + .../Cloud/Sql/V1/SslCertsInsertResponse.php | 207 + .../Cloud/Sql/V1/SslCertsListResponse.php | 101 + .../src/Google/Cloud/Sql/V1/SyncFlags.php | 106 + .../v1/proto/src/Google/Cloud/Sql/V1/Tier.php | 207 + .../Google/Cloud/Sql/V1/TiersListResponse.php | 101 + .../Cloud/Sql/V1/TruncateLogContext.php | 105 + .../v1/proto/src/Google/Cloud/Sql/V1/User.php | 474 + .../Cloud/Sql/V1/User/DualPasswordType.php | 71 + .../Google/Cloud/Sql/V1/User/SqlUserType.php | 85 + .../Sql/V1/UserPasswordValidationPolicy.php | 227 + .../Google/Cloud/Sql/V1/UsersListResponse.php | 140 + .../V1/SqlBackupRunsServiceClient/delete.php | 57 + .../V1/SqlBackupRunsServiceClient/get.php | 57 + .../V1/SqlBackupRunsServiceClient/insert.php | 57 + .../V1/SqlBackupRunsServiceClient/list.php | 59 + .../generate_ephemeral_cert.php | 60 + .../get_connect_settings.php | 57 + .../V1/SqlDatabasesServiceClient/delete.php | 57 + .../V1/SqlDatabasesServiceClient/get.php | 58 + .../V1/SqlDatabasesServiceClient/insert.php | 60 + .../V1/SqlDatabasesServiceClient/list.php | 57 + .../V1/SqlDatabasesServiceClient/patch.php | 58 + .../V1/SqlDatabasesServiceClient/update.php | 58 + .../samples/V1/SqlFlagsServiceClient/list.php | 57 + .../acquire_ssrs_lease.php | 80 + .../add_server_ca.php | 63 + .../V1/SqlInstancesServiceClient/clone.php | 58 + .../create_ephemeral.php | 60 + .../V1/SqlInstancesServiceClient/delete.php | 57 + .../V1/SqlInstancesServiceClient/demote.php | 87 + .../demote_master.php | 58 + .../V1/SqlInstancesServiceClient/export.php | 58 + .../V1/SqlInstancesServiceClient/failover.php | 64 + .../V1/SqlInstancesServiceClient/get.php | 57 + .../get_disk_shrink_config.php | 57 + .../get_latest_recovery_time.php | 57 + .../V1/SqlInstancesServiceClient/import.php | 58 + .../V1/SqlInstancesServiceClient/insert.php | 57 + .../V1/SqlInstancesServiceClient/list.php | 57 + .../list_server_cas.php | 61 + .../V1/SqlInstancesServiceClient/patch.php | 58 + .../perform_disk_shrink.php | 57 + .../promote_replica.php | 59 + .../SqlInstancesServiceClient/reencrypt.php | 57 + .../release_ssrs_lease.php | 76 + .../reschedule_maintenance.php | 57 + .../reset_replica_size.php | 57 + .../reset_ssl_config.php | 58 + .../V1/SqlInstancesServiceClient/restart.php | 57 + .../restore_backup.php | 58 + .../rotate_server_ca.php | 60 + .../start_external_sync.php | 57 + .../start_replica.php | 57 + .../stop_replica.php | 57 + .../SqlInstancesServiceClient/switchover.php | 58 + .../truncate_log.php | 58 + .../V1/SqlInstancesServiceClient/update.php | 58 + .../verify_external_sync_settings.php | 57 + .../V1/SqlOperationsServiceClient/cancel.php | 55 + .../V1/SqlOperationsServiceClient/get.php | 57 + .../V1/SqlOperationsServiceClient/list.php | 58 + .../V1/SqlSslCertsServiceClient/delete.php | 58 + .../V1/SqlSslCertsServiceClient/get.php | 59 + .../V1/SqlSslCertsServiceClient/insert.php | 59 + .../V1/SqlSslCertsServiceClient/list.php | 57 + .../samples/V1/SqlTiersServiceClient/list.php | 59 + .../V1/SqlUsersServiceClient/delete.php | 57 + .../samples/V1/SqlUsersServiceClient/get.php | 57 + .../V1/SqlUsersServiceClient/insert.php | 57 + .../samples/V1/SqlUsersServiceClient/list.php | 57 + .../V1/SqlUsersServiceClient/update.php | 57 + ...AvailableDatabaseVersionsServiceClient.php | 144 + .../V1/Client/SqlBackupRunsServiceClient.php | 278 + .../src/V1/Client/SqlConnectServiceClient.php | 223 + .../V1/Client/SqlDatabasesServiceClient.php | 337 + .../src/V1/Client/SqlEventsServiceClient.php | 144 + .../src/V1/Client/SqlFlagsServiceClient.php | 190 + .../V1/Client/SqlIamPoliciesServiceClient.php | 143 + .../Client/SqlInstanceNamesServiceClient.php | 143 + .../V1/Client/SqlInstancesServiceClient.php | 1165 +++ .../V1/Client/SqlOperationsServiceClient.php | 246 + .../src/V1/Client/SqlRegionsServiceClient.php | 144 + .../V1/Client/SqlSslCertsServiceClient.php | 282 + .../src/V1/Client/SqlTiersServiceClient.php | 192 + .../src/V1/Client/SqlUsersServiceClient.php | 304 + .../SqlAdmin/v1/src/V1/gapic_metadata.json | 425 + ...tabase_versions_service_client_config.json | 31 + ...ase_versions_service_descriptor_config.php | 27 + ...se_versions_service_rest_client_config.php | 26 + ...sql_backup_runs_service_client_config.json | 52 + ..._backup_runs_service_descriptor_config.php | 112 + ...backup_runs_service_rest_client_config.php | 104 + .../sql_connect_service_client_config.json | 32 + .../sql_connect_service_descriptor_config.php | 64 + ...sql_connect_service_rest_client_config.php | 62 + .../sql_databases_service_client_config.json | 62 + ...ql_databases_service_descriptor_config.php | 160 + ...l_databases_service_rest_client_config.php | 148 + .../sql_events_service_client_config.json | 31 + .../sql_events_service_descriptor_config.php | 27 + .../sql_events_service_rest_client_config.php | 26 + .../sql_flags_service_client_config.json | 37 + .../sql_flags_service_descriptor_config.php | 32 + .../sql_flags_service_rest_client_config.php | 33 + ...ql_iam_policies_service_client_config.json | 21 + ...iam_policies_service_descriptor_config.php | 27 + ...am_policies_service_rest_client_config.php | 26 + ..._instance_names_service_client_config.json | 21 + ...stance_names_service_descriptor_config.php | 27 + ...tance_names_service_rest_client_config.php | 26 + .../sql_instances_service_client_config.json | 202 + ...ql_instances_service_descriptor_config.php | 628 ++ ...l_instances_service_rest_client_config.php | 583 ++ .../sql_operations_service_client_config.json | 47 + ...l_operations_service_descriptor_config.php | 76 + ..._operations_service_rest_client_config.php | 72 + .../sql_regions_service_client_config.json | 21 + .../sql_regions_service_descriptor_config.php | 27 + ...sql_regions_service_rest_client_config.php | 26 + .../sql_ssl_certs_service_client_config.json | 52 + ...ql_ssl_certs_service_descriptor_config.php | 112 + ...l_ssl_certs_service_rest_client_config.php | 104 + .../sql_tiers_service_client_config.json | 37 + .../sql_tiers_service_descriptor_config.php | 40 + .../sql_tiers_service_rest_client_config.php | 40 + .../sql_users_service_client_config.json | 57 + .../sql_users_service_descriptor_config.php | 124 + .../sql_users_service_rest_client_config.php | 116 + ...lableDatabaseVersionsServiceClientTest.php | 56 + .../Client/SqlBackupRunsServiceClientTest.php | 367 + .../V1/Client/SqlConnectServiceClientTest.php | 202 + .../Client/SqlDatabasesServiceClientTest.php | 502 + .../V1/Client/SqlEventsServiceClientTest.php | 56 + .../V1/Client/SqlFlagsServiceClientTest.php | 142 + .../SqlIamPoliciesServiceClientTest.php | 56 + .../SqlInstanceNamesServiceClientTest.php | 56 + .../Client/SqlInstancesServiceClientTest.php | 2466 +++++ .../Client/SqlOperationsServiceClientTest.php | 266 + .../V1/Client/SqlRegionsServiceClientTest.php | 56 + .../Client/SqlSslCertsServiceClientTest.php | 352 + .../V1/Client/SqlTiersServiceClientTest.php | 142 + .../V1/Client/SqlUsersServiceClientTest.php | 434 + .../Storage/Control/V2/StorageControl.php | Bin 0 -> 7876 bytes .../V2/CommonLongRunningOperationMetadata.php | 273 + .../Control/V2/CreateFolderRequest.php | 280 + .../Control/V2/CreateManagedFolderRequest.php | 221 + .../Control/V2/DeleteFolderRequest.php | 221 + .../Control/V2/DeleteManagedFolderRequest.php | 271 + .../Cloud/Storage/Control/V2/Folder.php | 258 + .../Storage/Control/V2/GetFolderRequest.php | 221 + .../Control/V2/GetManagedFolderRequest.php | 225 + .../Control/V2/GetStorageLayoutRequest.php | 162 + .../Storage/Control/V2/ListFoldersRequest.php | 373 + .../Control/V2/ListFoldersResponse.php | 105 + .../Control/V2/ListManagedFoldersRequest.php | 233 + .../Control/V2/ListManagedFoldersResponse.php | 105 + .../Storage/Control/V2/ManagedFolder.php | 205 + .../Storage/Control/V2/PendingRenameInfo.php | 67 + .../Control/V2/RenameFolderMetadata.php | 146 + .../Control/V2/RenameFolderRequest.php | 261 + .../Storage/Control/V2/StorageLayout.php | 239 + .../StorageLayout/CustomPlacementConfig.php | 72 + .../StorageLayout/HierarchicalNamespace.php | 70 + .../V2/StorageControlClient/create_folder.php | 82 + .../create_managed_folder.php | 77 + .../V2/StorageControlClient/delete_folder.php | 71 + .../delete_managed_folder.php | 75 + .../V2/StorageControlClient/get_folder.php | 73 + .../get_managed_folder.php | 77 + .../get_storage_layout.php | 72 + .../V2/StorageControlClient/list_folders.php | 78 + .../list_managed_folders.php | 76 + .../V2/StorageControlClient/rename_folder.php | 90 + .../v2/src/V2/Client/StorageControlClient.php | 612 ++ .../v2/src/V2/gapic_metadata.json | 68 + .../storage_control_client_config.json | 98 + .../storage_control_descriptor_config.php | 222 + .../V2/Client/StorageControlClientTest.php | 872 ++ .../Storageinsights/V1/Storageinsights.php | Bin 0 -> 7019 bytes .../Cloud/StorageInsights/V1/CSVOptions.php | 135 + .../V1/CloudStorageDestinationOptions.php | 106 + .../V1/CloudStorageFilters.php | 68 + .../V1/CreateReportConfigRequest.php | 201 + .../V1/DeleteReportConfigRequest.php | 189 + .../StorageInsights/V1/FrequencyOptions.php | 164 + .../V1/FrequencyOptions/Frequency.php | 64 + .../V1/GetReportConfigRequest.php | 81 + .../V1/GetReportDetailRequest.php | 81 + .../V1/ListReportConfigsRequest.php | 221 + .../V1/ListReportConfigsResponse.php | 135 + .../V1/ListReportDetailsRequest.php | 221 + .../V1/ListReportDetailsResponse.php | 135 + .../V1/ObjectMetadataReportOptions.php | 152 + .../StorageInsights/V1/OperationMetadata.php | 307 + .../StorageInsights/V1/ParquetOptions.php | 33 + .../Cloud/StorageInsights/V1/ReportConfig.php | 397 + .../Cloud/StorageInsights/V1/ReportDetail.php | 383 + .../V1/ReportDetail/Metrics.php | 70 + .../V1/UpdateReportConfigRequest.php | 230 + .../create_report_config.php | 73 + .../delete_report_config.php | 73 + .../V1/StorageInsightsClient/get_location.php | 57 + .../get_report_config.php | 75 + .../get_report_detail.php | 76 + .../StorageInsightsClient/list_locations.php | 62 + .../list_report_configs.php | 76 + .../list_report_details.php | 80 + .../update_report_config.php | 62 + .../src/V1/Client/StorageInsightsClient.php | 504 + .../v1/src/V1/gapic_metadata.json | 63 + .../storage_insights_client_config.json | 89 + .../storage_insights_descriptor_config.php | 168 + .../storage_insights_rest_client_config.php | 183 + .../V1/Client/StorageInsightsClientTest.php | 719 ++ .../Google/Storagetransfer/V1/Transfer.php | 112 + .../Storagetransfer/V1/TransferTypes.php | Bin 0 -> 10789 bytes .../Cloud/StorageTransfer/V1/AgentPool.php | 187 + .../V1/AgentPool/BandwidthLimit.php | 74 + .../StorageTransfer/V1/AgentPool/State.php | 74 + .../Cloud/StorageTransfer/V1/AwsAccessKey.php | 109 + .../V1/AwsS3CompatibleData.php | 227 + .../Cloud/StorageTransfer/V1/AwsS3Data.php | 445 + .../V1/AzureBlobStorageData.php | 291 + .../StorageTransfer/V1/AzureCredentials.php | 85 + .../V1/CreateAgentPoolRequest.php | 215 + .../V1/CreateTransferJobRequest.php | 77 + .../V1/DeleteAgentPoolRequest.php | 80 + .../V1/DeleteTransferJobRequest.php | 105 + .../StorageTransfer/V1/ErrorLogEntry.php | 105 + .../Cloud/StorageTransfer/V1/ErrorSummary.php | 144 + .../Cloud/StorageTransfer/V1/EventStream.php | 188 + .../Cloud/StorageTransfer/V1/GcsData.php | 198 + .../V1/GetAgentPoolRequest.php | 80 + .../V1/GetGoogleServiceAccountRequest.php | 71 + .../V1/GetTransferJobRequest.php | 105 + .../V1/GoogleServiceAccount.php | 101 + .../Cloud/StorageTransfer/V1/HdfsData.php | 70 + .../Cloud/StorageTransfer/V1/HttpData.php | 103 + .../V1/ListAgentPoolsRequest.php | 202 + .../V1/ListAgentPoolsResponse.php | 101 + .../V1/ListTransferJobsRequest.php | 176 + .../V1/ListTransferJobsResponse.php | 101 + .../StorageTransfer/V1/LoggingConfig.php | 159 + .../V1/LoggingConfig/LoggableAction.php | 71 + .../V1/LoggingConfig/LoggableActionState.php | 66 + .../StorageTransfer/V1/MetadataOptions.php | 427 + .../V1/MetadataOptions/Acl.php | 68 + .../V1/MetadataOptions/GID.php | 64 + .../V1/MetadataOptions/KmsKey.php | 66 + .../V1/MetadataOptions/Mode.php | 64 + .../V1/MetadataOptions/StorageClass.php | 95 + .../V1/MetadataOptions/Symlink.php | 64 + .../V1/MetadataOptions/TemporaryHold.php | 64 + .../V1/MetadataOptions/TimeCreated.php | 68 + .../V1/MetadataOptions/UID.php | 64 + .../StorageTransfer/V1/NotificationConfig.php | 170 + .../V1/NotificationConfig/EventType.php | 78 + .../V1/NotificationConfig/PayloadFormat.php | 66 + .../StorageTransfer/V1/ObjectConditions.php | 560 ++ .../V1/PauseTransferOperationRequest.php | 67 + .../StorageTransfer/V1/PosixFilesystem.php | 67 + .../V1/ResumeTransferOperationRequest.php | 67 + .../V1/RunTransferJobRequest.php | 105 + .../V1/S3CompatibleMetadata.php | 194 + .../V1/S3CompatibleMetadata/AuthMethod.php | 64 + .../V1/S3CompatibleMetadata/ListApi.php | 64 + .../S3CompatibleMetadata/NetworkProtocol.php | 66 + .../V1/S3CompatibleMetadata/RequestModel.php | 66 + .../Cloud/StorageTransfer/V1/Schedule.php | 441 + .../StorageTransfer/V1/TransferCounters.php | 815 ++ .../Cloud/StorageTransfer/V1/TransferJob.php | 680 ++ .../StorageTransfer/V1/TransferJob/Status.php | 74 + .../StorageTransfer/V1/TransferManifest.php | 79 + .../StorageTransfer/V1/TransferOperation.php | 467 + .../V1/TransferOperation/Status.php | 99 + .../StorageTransfer/V1/TransferOptions.php | 261 + .../V1/TransferOptions/OverwriteWhen.php | 75 + .../Cloud/StorageTransfer/V1/TransferSpec.php | 642 ++ .../V1/UpdateAgentPoolRequest.php | 196 + .../V1/UpdateTransferJobRequest.php | 277 + .../create_agent_pool.php | 96 + .../create_transfer_job.php | 59 + .../delete_agent_pool.php | 68 + .../delete_transfer_job.php | 73 + .../get_agent_pool.php | 70 + .../get_google_service_account.php | 78 + .../get_transfer_job.php | 74 + .../list_agent_pools.php | 75 + .../list_transfer_jobs.php | 86 + .../pause_transfer_operation.php | 68 + .../resume_transfer_operation.php | 68 + .../run_transfer_job.php | 86 + .../update_agent_pool.php | 74 + .../update_transfer_job.php | 83 + .../Client/StorageTransferServiceClient.php | 684 ++ .../v1/src/V1/gapic_metadata.json | 88 + ...torage_transfer_service_client_config.json | 114 + ...age_transfer_service_descriptor_config.php | 207 + ...ge_transfer_service_rest_client_config.php | 225 + .../StorageTransferServiceClientTest.php | 1158 +++ .../Google/Cloud/Support/V2/Actor.php | 33 + .../Google/Cloud/Support/V2/Attachment.php | 41 + .../Cloud/Support/V2/AttachmentService.php | 43 + .../Google/Cloud/Support/V2/CaseService.php | 88 + .../Google/Cloud/Support/V2/Comment.php | 38 + .../Cloud/Support/V2/CommentService.php | 49 + .../Google/Cloud/Support/V2/Escalation.php | Bin 0 -> 1081 bytes .../Google/Cloud/Support/V2/PBCase.php | Bin 0 -> 2049 bytes .../src/Google/Cloud/Support/V2/Actor.php | 164 + .../Google/Cloud/Support/V2/Attachment.php | 261 + .../Cloud/Support/V2/CaseClassification.php | 109 + .../Cloud/Support/V2/CloseCaseRequest.php | 67 + .../src/Google/Cloud/Support/V2/Comment.php | 231 + .../Cloud/Support/V2/CreateCaseRequest.php | 132 + .../Cloud/Support/V2/CreateCommentRequest.php | 127 + .../Cloud/Support/V2/EscalateCaseRequest.php | 111 + .../Google/Cloud/Support/V2/Escalation.php | 105 + .../Cloud/Support/V2/Escalation/Reason.php | 72 + .../Cloud/Support/V2/GetCaseRequest.php | 81 + .../Support/V2/ListAttachmentsRequest.php | 166 + .../Support/V2/ListAttachmentsResponse.php | 109 + .../Cloud/Support/V2/ListCasesRequest.php | 235 + .../Cloud/Support/V2/ListCasesResponse.php | 113 + .../Cloud/Support/V2/ListCommentsRequest.php | 158 + .../Cloud/Support/V2/ListCommentsResponse.php | 109 + .../src/Google/Cloud/Support/V2/PBCase.php | 635 ++ .../Cloud/Support/V2/PBCase/Priority.php | 88 + .../Google/Cloud/Support/V2/PBCase/State.php | 89 + .../V2/SearchCaseClassificationsRequest.php | 147 + .../V2/SearchCaseClassificationsResponse.php | 109 + .../Cloud/Support/V2/SearchCasesRequest.php | 285 + .../Cloud/Support/V2/SearchCasesResponse.php | 113 + .../Cloud/Support/V2/UpdateCaseRequest.php | 172 + .../list_attachments.php | 77 + .../V2/CaseServiceClient/close_case.php | 71 + .../V2/CaseServiceClient/create_case.php | 76 + .../V2/CaseServiceClient/escalate_case.php | 77 + .../samples/V2/CaseServiceClient/get_case.php | 71 + .../V2/CaseServiceClient/list_cases.php | 81 + .../search_case_classifications.php | 65 + .../V2/CaseServiceClient/search_cases.php | 62 + .../V2/CaseServiceClient/update_case.php | 59 + .../CommentServiceClient/create_comment.php | 74 + .../V2/CommentServiceClient/list_comments.php | 77 + .../V2/Client/CaseAttachmentServiceClient.php | 274 + .../v2/src/V2/Client/CaseServiceClient.php | 519 + .../v2/src/V2/Client/CommentServiceClient.php | 363 + .../Support/v2/src/V2/gapic_metadata.json | 91 + ...case_attachment_service_client_config.json | 39 + ...e_attachment_service_descriptor_config.php | 53 + ..._attachment_service_rest_client_config.php | 46 + .../resources/case_service_client_config.json | 84 + .../case_service_descriptor_config.php | 148 + .../case_service_rest_client_config.php | 161 + .../comment_service_client_config.json | 54 + .../comment_service_descriptor_config.php | 68 + .../comment_service_rest_client_config.php | 65 + .../CaseAttachmentServiceClientTest.php | 172 + .../Unit/V2/Client/CaseServiceClientTest.php | 712 ++ .../V2/Client/CommentServiceClientTest.php | 247 + .../Google/Cloud/Talent/V4/Common.php | Bin 0 -> 6223 bytes .../Google/Cloud/Talent/V4/Company.php | 48 + .../Google/Cloud/Talent/V4/CompanyService.php | 66 + .../Cloud/Talent/V4/CompletionService.php | Bin 0 -> 2293 bytes .../Google/Cloud/Talent/V4/Event.php | Bin 0 -> 1539 bytes .../Google/Cloud/Talent/V4/EventService.php | 38 + .../Google/Cloud/Talent/V4/Filters.php | Bin 0 -> 3009 bytes .../Google/Cloud/Talent/V4/Histogram.php | 35 + .../Google/Cloud/Talent/V4/Job.php | 81 + .../Google/Cloud/Talent/V4/JobService.php | Bin 0 -> 7638 bytes .../Google/Cloud/Talent/V4/Tenant.php | 33 + .../Google/Cloud/Talent/V4/TenantService.php | 64 + .../Talent/V4/BatchCreateJobsRequest.php | 133 + .../Talent/V4/BatchCreateJobsResponse.php | 75 + .../Talent/V4/BatchDeleteJobsRequest.php | 151 + .../Talent/V4/BatchDeleteJobsResponse.php | 75 + .../Talent/V4/BatchOperationMetadata.php | 353 + .../V4/BatchOperationMetadata/State.php | 96 + .../Talent/V4/BatchUpdateJobsRequest.php | 225 + .../Talent/V4/BatchUpdateJobsResponse.php | 75 + .../Google/Cloud/Talent/V4/ClientEvent.php | 240 + .../Google/Cloud/Talent/V4/CommuteFilter.php | 294 + .../Talent/V4/CommuteFilter/RoadTraffic.php | 64 + .../Google/Cloud/Talent/V4/CommuteMethod.php | 85 + .../src/Google/Cloud/Talent/V4/Company.php | 616 ++ .../Cloud/Talent/V4/Company/DerivedInfo.php | 88 + .../Google/Cloud/Talent/V4/CompanySize.php | 96 + .../Cloud/Talent/V4/CompensationFilter.php | 187 + .../V4/CompensationFilter/FilterType.php | 101 + .../Cloud/Talent/V4/CompensationInfo.php | 223 + .../V4/CompensationInfo/CompensationEntry.php | 376 + .../V4/CompensationInfo/CompensationRange.php | 144 + .../V4/CompensationInfo/CompensationType.php | 132 + .../V4/CompensationInfo/CompensationUnit.php | 99 + .../Cloud/Talent/V4/CompleteQueryRequest.php | 323 + .../CompleteQueryRequest/CompletionScope.php | 69 + .../CompleteQueryRequest/CompletionType.php | 88 + .../Cloud/Talent/V4/CompleteQueryResponse.php | 115 + .../CompletionResult.php | 142 + .../Talent/V4/CreateClientEventRequest.php | 143 + .../Cloud/Talent/V4/CreateCompanyRequest.php | 138 + .../Cloud/Talent/V4/CreateJobRequest.php | 138 + .../Cloud/Talent/V4/CreateTenantRequest.php | 138 + .../Cloud/Talent/V4/CustomAttribute.php | 269 + .../src/Google/Cloud/Talent/V4/DegreeType.php | 128 + .../Cloud/Talent/V4/DeleteCompanyRequest.php | 97 + .../Cloud/Talent/V4/DeleteJobRequest.php | 97 + .../Cloud/Talent/V4/DeleteTenantRequest.php | 92 + .../src/Google/Cloud/Talent/V4/DeviceInfo.php | 107 + .../Cloud/Talent/V4/DeviceInfo/DeviceType.php | 95 + .../Google/Cloud/Talent/V4/EmploymentType.php | 131 + .../Cloud/Talent/V4/GetCompanyRequest.php | 97 + .../Google/Cloud/Talent/V4/GetJobRequest.php | 97 + .../Cloud/Talent/V4/GetTenantRequest.php | 92 + .../Google/Cloud/Talent/V4/HistogramQuery.php | 83 + .../Cloud/Talent/V4/HistogramQueryResult.php | 131 + .../Cloud/Talent/V4/HtmlSanitization.php | 64 + .../proto/src/Google/Cloud/Talent/V4/Job.php | 1765 ++++ .../Cloud/Talent/V4/Job/ApplicationInfo.php | 170 + .../Cloud/Talent/V4/Job/DerivedInfo.php | 124 + .../Cloud/Talent/V4/Job/ProcessingOptions.php | 144 + .../src/Google/Cloud/Talent/V4/JobBenefit.php | 130 + .../Google/Cloud/Talent/V4/JobCategory.php | 260 + .../src/Google/Cloud/Talent/V4/JobEvent.php | 142 + .../Cloud/Talent/V4/JobEvent/JobEventType.php | 203 + .../src/Google/Cloud/Talent/V4/JobLevel.php | 84 + .../src/Google/Cloud/Talent/V4/JobQuery.php | 907 ++ .../src/Google/Cloud/Talent/V4/JobResult.php | 145 + .../src/Google/Cloud/Talent/V4/JobView.php | 95 + .../Cloud/Talent/V4/ListCompaniesRequest.php | 214 + .../Cloud/Talent/V4/ListCompaniesResponse.php | 149 + .../Cloud/Talent/V4/ListJobsRequest.php | 348 + .../Cloud/Talent/V4/ListJobsResponse.php | 157 + .../Cloud/Talent/V4/ListTenantsRequest.php | 164 + .../Cloud/Talent/V4/ListTenantsResponse.php | 149 + .../src/Google/Cloud/Talent/V4/Location.php | 237 + .../Cloud/Talent/V4/Location/LocationType.php | 124 + .../Google/Cloud/Talent/V4/LocationFilter.php | 357 + .../LocationFilter/TelecommutePreference.php | 72 + .../Google/Cloud/Talent/V4/PostingRegion.php | 86 + .../Cloud/Talent/V4/RequestMetadata.php | 379 + .../Cloud/Talent/V4/ResponseMetadata.php | 71 + .../Cloud/Talent/V4/SearchJobsRequest.php | 1438 +++ .../SearchJobsRequest/CustomRankingInfo.php | 185 + .../CustomRankingInfo/ImportanceLevel.php | 105 + .../DiversificationLevel.php | 113 + .../V4/SearchJobsRequest/KeywordMatchMode.php | 96 + .../V4/SearchJobsRequest/SearchMode.php | 71 + .../Cloud/Talent/V4/SearchJobsResponse.php | 381 + .../V4/SearchJobsResponse/CommuteInfo.php | 136 + .../V4/SearchJobsResponse/MatchingJob.php | 267 + .../Cloud/Talent/V4/SpellingCorrection.php | 155 + .../src/Google/Cloud/Talent/V4/Tenant.php | 128 + .../Google/Cloud/Talent/V4/TimestampRange.php | 121 + .../Cloud/Talent/V4/UpdateCompanyRequest.php | 178 + .../Cloud/Talent/V4/UpdateJobRequest.php | 168 + .../Cloud/Talent/V4/UpdateTenantRequest.php | 173 + .../src/Google/Cloud/Talent/V4/Visibility.php | 72 + .../CompanyServiceClient/create_company.php | 88 + .../CompanyServiceClient/delete_company.php | 74 + .../V4/CompanyServiceClient/get_company.php | 75 + .../CompanyServiceClient/list_companies.php | 79 + .../CompanyServiceClient/update_company.php | 78 + .../V4/CompletionClient/complete_query.php | 85 + .../create_client_event.php | 88 + .../V4/JobServiceClient/batch_create_jobs.php | 138 + .../V4/JobServiceClient/batch_delete_jobs.php | 88 + .../V4/JobServiceClient/batch_update_jobs.php | 138 + .../V4/JobServiceClient/create_job.php | 127 + .../V4/JobServiceClient/delete_job.php | 76 + .../samples/V4/JobServiceClient/get_job.php | 76 + .../samples/V4/JobServiceClient/list_jobs.php | 104 + .../V4/JobServiceClient/search_jobs.php | 83 + .../search_jobs_for_alert.php | 88 + .../V4/JobServiceClient/update_job.php | 113 + .../V4/TenantServiceClient/create_tenant.php | 82 + .../V4/TenantServiceClient/delete_tenant.php | 72 + .../V4/TenantServiceClient/get_tenant.php | 74 + .../V4/TenantServiceClient/list_tenants.php | 79 + .../V4/TenantServiceClient/update_tenant.php | 75 + .../v4/src/V4/Client/CompanyServiceClient.php | 370 + .../v4/src/V4/Client/CompletionClient.php | 259 + .../v4/src/V4/Client/EventServiceClient.php | 244 + .../v4/src/V4/Client/JobServiceClient.php | 610 ++ .../v4/src/V4/Client/TenantServiceClient.php | 365 + .../Talent/v4/src/V4/gapic_metadata.json | 164 + .../company_service_client_config.json | 70 + .../company_service_descriptor_config.php | 101 + .../company_service_rest_client_config.php | 100 + .../resources/completion_client_config.json | 40 + .../completion_descriptor_config.php | 44 + .../completion_rest_client_config.php | 53 + .../event_service_client_config.json | 37 + .../event_service_descriptor_config.php | 43 + .../event_service_rest_client_config.php | 54 + .../resources/job_service_client_config.json | 95 + .../job_service_descriptor_config.php | 183 + .../job_service_rest_client_config.php | 163 + .../tenant_service_client_config.json | 70 + .../tenant_service_descriptor_config.php | 101 + .../tenant_service_rest_client_config.php | 100 + .../V4/Client/CompanyServiceClientTest.php | 524 + .../Unit/V4/Client/CompletionClientTest.php | 171 + .../Unit/V4/Client/EventServiceClientTest.php | 186 + .../Unit/V4/Client/JobServiceClientTest.php | 1107 +++ .../V4/Client/TenantServiceClientTest.php | 450 + .../Google/Cloud/Tasks/V2/Cloudtasks.php | 114 + .../Google/Cloud/Tasks/V2/Queue.php | Bin 0 -> 1983 bytes .../Google/Cloud/Tasks/V2/Target.php | Bin 0 -> 1761 bytes .../Google/Cloud/Tasks/V2/Task.php | Bin 0 -> 2022 bytes .../Cloud/Tasks/V2/AppEngineHttpRequest.php | 469 + .../Cloud/Tasks/V2/AppEngineRouting.php | 373 + .../src/Google/Cloud/Tasks/V2/Attempt.php | 229 + .../Cloud/Tasks/V2/CreateQueueRequest.php | 160 + .../Cloud/Tasks/V2/CreateTaskRequest.php | 349 + .../Cloud/Tasks/V2/DeleteQueueRequest.php | 87 + .../Cloud/Tasks/V2/DeleteTaskRequest.php | 87 + .../Google/Cloud/Tasks/V2/GetQueueRequest.php | 86 + .../Google/Cloud/Tasks/V2/GetTaskRequest.php | 157 + .../src/Google/Cloud/Tasks/V2/HttpMethod.php | 96 + .../src/Google/Cloud/Tasks/V2/HttpRequest.php | 421 + .../Cloud/Tasks/V2/ListQueuesRequest.php | 269 + .../Cloud/Tasks/V2/ListQueuesResponse.php | 122 + .../Cloud/Tasks/V2/ListTasksRequest.php | 269 + .../Cloud/Tasks/V2/ListTasksResponse.php | 118 + .../src/Google/Cloud/Tasks/V2/OAuthToken.php | 128 + .../src/Google/Cloud/Tasks/V2/OidcToken.php | 126 + .../Cloud/Tasks/V2/PauseQueueRequest.php | 87 + .../Cloud/Tasks/V2/PurgeQueueRequest.php | 87 + .../proto/src/Google/Cloud/Tasks/V2/Queue.php | 611 ++ .../src/Google/Cloud/Tasks/V2/Queue/State.php | 89 + .../src/Google/Cloud/Tasks/V2/RateLimits.php | 308 + .../Cloud/Tasks/V2/ResumeQueueRequest.php | 87 + .../src/Google/Cloud/Tasks/V2/RetryConfig.php | 490 + .../Google/Cloud/Tasks/V2/RunTaskRequest.php | 157 + .../Tasks/V2/StackdriverLoggingConfig.php | 80 + .../proto/src/Google/Cloud/Tasks/V2/Task.php | 684 ++ .../src/Google/Cloud/Tasks/V2/Task/View.php | 79 + .../Cloud/Tasks/V2/UpdateQueueRequest.php | 165 + .../V2/CloudTasksClient/create_queue.php | 89 + .../V2/CloudTasksClient/create_task.php | 80 + .../V2/CloudTasksClient/delete_queue.php | 82 + .../V2/CloudTasksClient/delete_task.php | 74 + .../V2/CloudTasksClient/get_iam_policy.php | 79 + .../V2/CloudTasksClient/get_location.php | 57 + .../samples/V2/CloudTasksClient/get_queue.php | 72 + .../samples/V2/CloudTasksClient/get_task.php | 72 + .../V2/CloudTasksClient/list_locations.php | 62 + .../V2/CloudTasksClient/list_queues.php | 79 + .../V2/CloudTasksClient/list_tasks.php | 85 + .../V2/CloudTasksClient/pause_queue.php | 79 + .../V2/CloudTasksClient/purge_queue.php | 77 + .../V2/CloudTasksClient/resume_queue.php | 85 + .../samples/V2/CloudTasksClient/run_task.php | 97 + .../V2/CloudTasksClient/set_iam_policy.php | 83 + .../CloudTasksClient/test_iam_permissions.php | 85 + .../V2/CloudTasksClient/update_queue.php | 73 + .../v2/src/V2/Client/CloudTasksClient.php | 887 ++ .../Tasks/v2/src/V2/CloudTasksClient.php | 34 + .../v2/src/V2/Gapic/CloudTasksGapicClient.php | 1466 +++ .../Tasks/v2/src/V2/gapic_metadata.json | 108 + .../resources/cloud_tasks_client_config.json | 135 + .../cloud_tasks_descriptor_config.php | 276 + .../cloud_tasks_rest_client_config.php | 240 + .../Unit/V2/Client/CloudTasksClientTest.php | 1316 +++ .../v2/tests/Unit/V2/CloudTasksClientTest.php | 1189 +++ .../Google/Cloud/Tasks/V2Beta2/Cloudtasks.php | Bin 0 -> 8540 bytes .../Google/Cloud/Tasks/V2Beta2/OldTarget.php | 27 + .../Google/Cloud/Tasks/V2Beta2/Queue.php | Bin 0 -> 2576 bytes .../Google/Cloud/Tasks/V2Beta2/Target.php | Bin 0 -> 3089 bytes .../Google/Cloud/Tasks/V2Beta2/Task.php | Bin 0 -> 2129 bytes .../Tasks/V2beta2/AcknowledgeTaskRequest.php | 132 + .../Tasks/V2beta2/AppEngineHttpRequest.php | 484 + .../Tasks/V2beta2/AppEngineHttpTarget.php | 114 + .../Cloud/Tasks/V2beta2/AppEngineRouting.php | 536 ++ .../Cloud/Tasks/V2beta2/AttemptStatus.php | 229 + .../Tasks/V2beta2/CancelLeaseRequest.php | 206 + .../Tasks/V2beta2/CreateQueueRequest.php | 136 + .../Cloud/Tasks/V2beta2/CreateTaskRequest.php | 302 + .../Tasks/V2beta2/DeleteQueueRequest.php | 72 + .../Cloud/Tasks/V2beta2/DeleteTaskRequest.php | 72 + .../Cloud/Tasks/V2beta2/GetQueueRequest.php | 128 + .../Cloud/Tasks/V2beta2/GetTaskRequest.php | 146 + .../Google/Cloud/Tasks/V2beta2/HttpMethod.php | 96 + .../Cloud/Tasks/V2beta2/HttpRequest.php | 416 + .../Google/Cloud/Tasks/V2beta2/HttpTarget.php | 375 + .../Cloud/Tasks/V2beta2/HttpTarget/Header.php | 104 + .../V2beta2/HttpTarget/HeaderOverride.php | 80 + .../Cloud/Tasks/V2beta2/LeaseTasksRequest.php | 442 + .../Tasks/V2beta2/LeaseTasksResponse.php | 68 + .../Cloud/Tasks/V2beta2/ListQueuesRequest.php | 310 + .../Tasks/V2beta2/ListQueuesResponse.php | 126 + .../Cloud/Tasks/V2beta2/ListTasksRequest.php | 258 + .../Cloud/Tasks/V2beta2/ListTasksResponse.php | 122 + .../Google/Cloud/Tasks/V2beta2/OAuthToken.php | 128 + .../Google/Cloud/Tasks/V2beta2/OidcToken.php | 126 + .../Cloud/Tasks/V2beta2/PathOverride.php | 68 + .../Cloud/Tasks/V2beta2/PauseQueueRequest.php | 72 + .../Cloud/Tasks/V2beta2/PullMessage.php | 165 + .../Google/Cloud/Tasks/V2beta2/PullTarget.php | 33 + .../Cloud/Tasks/V2beta2/PurgeQueueRequest.php | 72 + .../Cloud/Tasks/V2beta2/QueryOverride.php | 72 + .../src/Google/Cloud/Tasks/V2beta2/Queue.php | 771 ++ .../Cloud/Tasks/V2beta2/Queue/State.php | 93 + .../Google/Cloud/Tasks/V2beta2/QueueStats.php | 253 + .../Google/Cloud/Tasks/V2beta2/RateLimits.php | 349 + .../Cloud/Tasks/V2beta2/RenewLeaseRequest.php | 258 + .../Tasks/V2beta2/ResumeQueueRequest.php | 72 + .../Cloud/Tasks/V2beta2/RetryConfig.php | 548 ++ .../Cloud/Tasks/V2beta2/RunTaskRequest.php | 146 + .../src/Google/Cloud/Tasks/V2beta2/Task.php | 484 + .../Google/Cloud/Tasks/V2beta2/Task/View.php | 83 + .../Google/Cloud/Tasks/V2beta2/TaskStatus.php | 241 + .../Tasks/V2beta2/UpdateQueueRequest.php | 150 + .../Tasks/V2beta2/UploadQueueYamlRequest.php | 120 + .../Cloud/Tasks/V2beta2/UriOverride.php | 353 + .../Tasks/V2beta2/UriOverride/Scheme.php | 66 + .../UriOverride/UriOverrideEnforceMode.php | 67 + .../CloudTasksClient/acknowledge_task.php | 82 + .../V2beta2/CloudTasksClient/cancel_lease.php | 76 + .../V2beta2/CloudTasksClient/create_queue.php | 85 + .../V2beta2/CloudTasksClient/create_task.php | 80 + .../V2beta2/CloudTasksClient/delete_queue.php | 77 + .../V2beta2/CloudTasksClient/delete_task.php | 69 + .../CloudTasksClient/get_iam_policy.php | 74 + .../V2beta2/CloudTasksClient/get_location.php | 53 + .../V2beta2/CloudTasksClient/get_queue.php | 67 + .../V2beta2/CloudTasksClient/get_task.php | 67 + .../V2beta2/CloudTasksClient/lease_tasks.php | 93 + .../CloudTasksClient/list_locations.php | 58 + .../V2beta2/CloudTasksClient/list_queues.php | 74 + .../V2beta2/CloudTasksClient/list_tasks.php | 80 + .../V2beta2/CloudTasksClient/pause_queue.php | 74 + .../V2beta2/CloudTasksClient/purge_queue.php | 72 + .../V2beta2/CloudTasksClient/renew_lease.php | 78 + .../V2beta2/CloudTasksClient/resume_queue.php | 81 + .../V2beta2/CloudTasksClient/run_task.php | 96 + .../CloudTasksClient/set_iam_policy.php | 79 + .../CloudTasksClient/test_iam_permissions.php | 81 + .../V2beta2/CloudTasksClient/update_queue.php | 70 + .../CloudTasksClient/upload_queue_yaml.php | 69 + .../v2beta2/src/V2beta2/CloudTasksClient.php | 36 + .../V2beta2/Gapic/CloudTasksGapicClient.php | 1977 ++++ .../v2beta2/src/V2beta2/gapic_metadata.json | 133 + .../resources/cloud_tasks_client_config.json | 160 + .../cloud_tasks_descriptor_config.php | 62 + .../cloud_tasks_rest_client_config.php | 288 + .../Unit/V2beta2/CloudTasksClientTest.php | 1492 +++ .../Google/Cloud/Tasks/V2Beta3/Cloudtasks.php | 116 + .../Google/Cloud/Tasks/V2Beta3/Queue.php | Bin 0 -> 2709 bytes .../Google/Cloud/Tasks/V2Beta3/Target.php | Bin 0 -> 3007 bytes .../Google/Cloud/Tasks/V2Beta3/Task.php | Bin 0 -> 2155 bytes .../Tasks/V2beta3/AppEngineHttpQueue.php | 114 + .../Tasks/V2beta3/AppEngineHttpRequest.php | 478 + .../Cloud/Tasks/V2beta3/AppEngineRouting.php | 380 + .../Google/Cloud/Tasks/V2beta3/Attempt.php | 229 + .../Tasks/V2beta3/CreateQueueRequest.php | 136 + .../Cloud/Tasks/V2beta3/CreateTaskRequest.php | 302 + .../Tasks/V2beta3/DeleteQueueRequest.php | 72 + .../Cloud/Tasks/V2beta3/DeleteTaskRequest.php | 72 + .../Cloud/Tasks/V2beta3/GetQueueRequest.php | 128 + .../Cloud/Tasks/V2beta3/GetTaskRequest.php | 146 + .../Google/Cloud/Tasks/V2beta3/HttpMethod.php | 96 + .../Cloud/Tasks/V2beta3/HttpRequest.php | 433 + .../Google/Cloud/Tasks/V2beta3/HttpTarget.php | 367 + .../Cloud/Tasks/V2beta3/HttpTarget/Header.php | 104 + .../V2beta3/HttpTarget/HeaderOverride.php | 80 + .../Cloud/Tasks/V2beta3/ListQueuesRequest.php | 310 + .../Tasks/V2beta3/ListQueuesResponse.php | 126 + .../Cloud/Tasks/V2beta3/ListTasksRequest.php | 258 + .../Cloud/Tasks/V2beta3/ListTasksResponse.php | 122 + .../Google/Cloud/Tasks/V2beta3/OAuthToken.php | 128 + .../Google/Cloud/Tasks/V2beta3/OidcToken.php | 126 + .../Cloud/Tasks/V2beta3/PathOverride.php | 68 + .../Cloud/Tasks/V2beta3/PauseQueueRequest.php | 72 + .../Cloud/Tasks/V2beta3/PullMessage.php | 132 + .../Cloud/Tasks/V2beta3/PurgeQueueRequest.php | 72 + .../Cloud/Tasks/V2beta3/QueryOverride.php | 72 + .../src/Google/Cloud/Tasks/V2beta3/Queue.php | 883 ++ .../Cloud/Tasks/V2beta3/Queue/State.php | 89 + .../Google/Cloud/Tasks/V2beta3/Queue/Type.php | 64 + .../Google/Cloud/Tasks/V2beta3/QueueStats.php | 253 + .../Google/Cloud/Tasks/V2beta3/RateLimits.php | 317 + .../Tasks/V2beta3/ResumeQueueRequest.php | 72 + .../Cloud/Tasks/V2beta3/RetryConfig.php | 502 + .../Cloud/Tasks/V2beta3/RunTaskRequest.php | 146 + .../V2beta3/StackdriverLoggingConfig.php | 80 + .../src/Google/Cloud/Tasks/V2beta3/Task.php | 746 ++ .../Google/Cloud/Tasks/V2beta3/Task/View.php | 81 + .../Tasks/V2beta3/UpdateQueueRequest.php | 150 + .../Cloud/Tasks/V2beta3/UriOverride.php | 353 + .../Tasks/V2beta3/UriOverride/Scheme.php | 66 + .../UriOverride/UriOverrideEnforceMode.php | 67 + .../V2beta3/CloudTasksClient/create_queue.php | 85 + .../V2beta3/CloudTasksClient/create_task.php | 76 + .../V2beta3/CloudTasksClient/delete_queue.php | 77 + .../V2beta3/CloudTasksClient/delete_task.php | 69 + .../CloudTasksClient/get_iam_policy.php | 74 + .../V2beta3/CloudTasksClient/get_location.php | 53 + .../V2beta3/CloudTasksClient/get_queue.php | 67 + .../V2beta3/CloudTasksClient/get_task.php | 67 + .../CloudTasksClient/list_locations.php | 58 + .../V2beta3/CloudTasksClient/list_queues.php | 74 + .../V2beta3/CloudTasksClient/list_tasks.php | 80 + .../V2beta3/CloudTasksClient/pause_queue.php | 74 + .../V2beta3/CloudTasksClient/purge_queue.php | 72 + .../V2beta3/CloudTasksClient/resume_queue.php | 81 + .../V2beta3/CloudTasksClient/run_task.php | 93 + .../CloudTasksClient/set_iam_policy.php | 79 + .../CloudTasksClient/test_iam_permissions.php | 81 + .../V2beta3/CloudTasksClient/update_queue.php | 70 + .../v2beta3/src/V2beta3/CloudTasksClient.php | 36 + .../V2beta3/Gapic/CloudTasksGapicClient.php | 1542 +++ .../v2beta3/src/V2beta3/gapic_metadata.json | 108 + .../resources/cloud_tasks_client_config.json | 135 + .../cloud_tasks_descriptor_config.php | 62 + .../cloud_tasks_rest_client_config.php | 240 + .../Unit/V2beta3/CloudTasksClientTest.php | 1189 +++ .../Telcoautomation/V1/Telcoautomation.php | Bin 0 -> 24410 bytes .../V1/ApplyDeploymentRequest.php | 83 + .../V1/ApplyHydratedDeploymentRequest.php | 81 + .../V1/ApproveBlueprintRequest.php | 86 + .../Cloud/TelcoAutomation/V1/Blueprint.php | 586 ++ .../V1/Blueprint/ApprovalState.php | 78 + .../TelcoAutomation/V1/BlueprintView.php | 61 + .../V1/ComputeDeploymentStatusRequest.php | 81 + .../V1/ComputeDeploymentStatusResponse.php | 135 + .../V1/CreateBlueprintRequest.php | 173 + .../V1/CreateDeploymentRequest.php | 173 + .../V1/CreateEdgeSlmRequest.php | 247 + .../V1/CreateOrchestrationClusterRequest.php | 247 + .../V1/DeleteBlueprintRequest.php | 96 + .../V1/DeleteEdgeSlmRequest.php | 155 + .../V1/DeleteOrchestrationClusterRequest.php | 155 + .../Cloud/TelcoAutomation/V1/Deployment.php | 623 ++ .../TelcoAutomation/V1/Deployment/State.php | 80 + .../TelcoAutomation/V1/DeploymentLevel.php | 89 + .../TelcoAutomation/V1/DeploymentView.php | 61 + .../V1/DiscardBlueprintChangesRequest.php | 81 + .../V1/DiscardBlueprintChangesResponse.php | 33 + .../V1/DiscardDeploymentChangesRequest.php | 81 + .../V1/DiscardDeploymentChangesResponse.php | 33 + .../Cloud/TelcoAutomation/V1/EdgeSlm.php | 343 + .../TelcoAutomation/V1/EdgeSlm/State.php | 79 + .../V1/EdgeSlm/WorkloadClusterType.php | 65 + .../Google/Cloud/TelcoAutomation/V1/File.php | 177 + .../V1/FullManagementConfig.php | 383 + .../V1/GetBlueprintRequest.php | 139 + .../V1/GetDeploymentRequest.php | 144 + .../TelcoAutomation/V1/GetEdgeSlmRequest.php | 81 + .../V1/GetHydratedDeploymentRequest.php | 81 + .../V1/GetOrchestrationClusterRequest.php | 81 + .../V1/GetPublicBlueprintRequest.php | 81 + .../TelcoAutomation/V1/HydratedDeployment.php | 186 + .../V1/HydratedDeployment/State.php | 66 + .../TelcoAutomation/V1/HydrationStatus.php | 111 + .../V1/ListBlueprintRevisionsRequest.php | 153 + .../V1/ListBlueprintRevisionsResponse.php | 105 + .../V1/ListBlueprintsRequest.php | 205 + .../V1/ListBlueprintsResponse.php | 105 + .../V1/ListDeploymentRevisionsRequest.php | 153 + .../V1/ListDeploymentRevisionsResponse.php | 105 + .../V1/ListDeploymentsRequest.php | 205 + .../V1/ListDeploymentsResponse.php | 105 + .../V1/ListEdgeSlmsRequest.php | 221 + .../V1/ListEdgeSlmsResponse.php | 135 + .../V1/ListHydratedDeploymentsRequest.php | 165 + .../V1/ListHydratedDeploymentsResponse.php | 105 + .../V1/ListOrchestrationClustersRequest.php | 221 + .../V1/ListOrchestrationClustersResponse.php | 135 + .../V1/ListPublicBlueprintsRequest.php | 163 + .../V1/ListPublicBlueprintsResponse.php | 105 + .../TelcoAutomation/V1/ManagementConfig.php | 111 + .../V1/MasterAuthorizedNetworksConfig.php | 71 + .../CidrBlock.php | 120 + .../TelcoAutomation/V1/NFDeploySiteStatus.php | 189 + .../TelcoAutomation/V1/NFDeployStatus.php | 139 + .../TelcoAutomation/V1/OperationMetadata.php | 307 + .../V1/OrchestrationCluster.php | 306 + .../V1/OrchestrationCluster/State.php | 79 + .../V1/ProposeBlueprintRequest.php | 81 + .../TelcoAutomation/V1/PublicBlueprint.php | 250 + .../V1/RejectBlueprintRequest.php | 81 + .../V1/RemoveDeploymentRequest.php | 81 + .../TelcoAutomation/V1/ResourceStatus.php | 315 + .../Cloud/TelcoAutomation/V1/ResourceType.php | 61 + .../V1/RollbackDeploymentRequest.php | 117 + .../V1/SearchBlueprintRevisionsRequest.php | 233 + .../V1/SearchBlueprintRevisionsResponse.php | 105 + .../V1/SearchDeploymentRevisionsRequest.php | 238 + .../V1/SearchDeploymentRevisionsResponse.php | 105 + .../Cloud/TelcoAutomation/V1/SiteVersion.php | 135 + .../V1/StandardManagementConfig.php | 387 + .../Cloud/TelcoAutomation/V1/Status.php | 97 + .../V1/UpdateBlueprintRequest.php | 141 + .../V1/UpdateDeploymentRequest.php | 141 + .../V1/UpdateHydratedDeploymentRequest.php | 141 + .../TelcoAutomation/V1/WorkloadStatus.php | 111 + .../apply_deployment.php | 76 + .../apply_hydrated_deployment.php | 77 + .../approve_blueprint.php | 77 + .../compute_deployment_status.php | 76 + .../create_blueprint.php | 83 + .../create_deployment.php | 84 + .../TelcoAutomationClient/create_edge_slm.php | 90 + .../create_orchestration_cluster.php | 92 + .../delete_blueprint.php | 77 + .../TelcoAutomationClient/delete_edge_slm.php | 80 + .../delete_orchestration_cluster.php | 84 + .../discard_blueprint_changes.php | 78 + .../discard_deployment_changes.php | 78 + .../TelcoAutomationClient/get_blueprint.php | 80 + .../TelcoAutomationClient/get_deployment.php | 81 + .../V1/TelcoAutomationClient/get_edge_slm.php | 71 + .../get_hydrated_deployment.php | 77 + .../V1/TelcoAutomationClient/get_location.php | 57 + .../get_orchestration_cluster.php | 75 + .../get_public_blueprint.php | 75 + .../list_blueprint_revisions.php | 81 + .../TelcoAutomationClient/list_blueprints.php | 82 + .../list_deployment_revisions.php | 81 + .../list_deployments.php | 82 + .../TelcoAutomationClient/list_edge_slms.php | 76 + .../list_hydrated_deployments.php | 81 + .../TelcoAutomationClient/list_locations.php | 62 + .../list_orchestration_clusters.php | 76 + .../list_public_blueprints.php | 79 + .../propose_blueprint.php | 76 + .../reject_blueprint.php | 76 + .../remove_deployment.php | 75 + .../rollback_deployment.php | 80 + .../search_blueprint_revisions.php | 91 + .../search_deployment_revisions.php | 92 + .../update_blueprint.php | 76 + .../update_deployment.php | 75 + .../update_hydrated_deployment.php | 62 + .../src/V1/Client/TelcoAutomationClient.php | 1487 +++ .../v1/src/V1/gapic_metadata.json | 208 + .../telco_automation_client_config.json | 212 + .../telco_automation_descriptor_config.php | 614 ++ .../telco_automation_rest_client_config.php | 530 + .../V1/Client/TelcoAutomationClientTest.php | 3154 ++++++ .../Google/Cloud/Texttospeech/V1/CloudTts.php | Bin 0 -> 4912 bytes .../Cloud/Texttospeech/V1/CloudTtsLrs.php | 49 + .../TextToSpeech/V1/AdvancedVoiceOptions.php | 81 + .../Cloud/TextToSpeech/V1/AudioConfig.php | 329 + .../Cloud/TextToSpeech/V1/AudioEncoding.php | 90 + .../V1/CustomPronunciationParams.php | 177 + .../PhoneticEncoding.php | 66 + .../TextToSpeech/V1/CustomPronunciations.php | 67 + .../TextToSpeech/V1/CustomVoiceParams.php | 106 + .../V1/CustomVoiceParams/ReportedUsage.php | 68 + .../TextToSpeech/V1/ListVoicesRequest.php | 115 + .../TextToSpeech/V1/ListVoicesResponse.php | 67 + .../TextToSpeech/V1/MultiSpeakerMarkup.php | 67 + .../V1/MultiSpeakerMarkup/Turn.php | 108 + .../Cloud/TextToSpeech/V1/SsmlVoiceGender.php | 73 + .../V1/StreamingSynthesisInput.php | 84 + .../V1/StreamingSynthesizeConfig.php | 77 + .../V1/StreamingSynthesizeRequest.php | 118 + .../V1/StreamingSynthesizeResponse.php | 73 + .../Cloud/TextToSpeech/V1/SynthesisInput.php | 239 + .../V1/SynthesizeLongAudioMetadata.php | 162 + .../V1/SynthesizeLongAudioRequest.php | 246 + .../V1/SynthesizeLongAudioResponse.php | 33 + .../V1/SynthesizeSpeechRequest.php | 226 + .../V1/SynthesizeSpeechResponse.php | 83 + .../Google/Cloud/TextToSpeech/V1/Voice.php | 177 + .../TextToSpeech/V1/VoiceCloneParams.php | 67 + .../TextToSpeech/V1/VoiceSelectionParams.php | 303 + .../V1/TextToSpeechClient/list_voices.php | 57 + .../streaming_synthesize.php | 64 + .../TextToSpeechClient/synthesize_speech.php | 94 + .../synthesize_long_audio.php | 89 + .../v1/src/V1/Client/TextToSpeechClient.php | 292 + .../TextToSpeechLongAudioSynthesizeClient.php | 274 + .../src/V1/Gapic/TextToSpeechGapicClient.php | 412 + ...ToSpeechLongAudioSynthesizeGapicClient.php | 403 + .../v1/src/V1/TextToSpeechClient.php | 34 + .../TextToSpeechLongAudioSynthesizeClient.php | 34 + .../v1/src/V1/gapic_metadata.json | 47 + .../text_to_speech_client_config.json | 58 + .../text_to_speech_descriptor_config.php | 46 + ...h_long_audio_synthesize_client_config.json | 37 + ...ong_audio_synthesize_descriptor_config.php | 50 + ...ng_audio_synthesize_rest_client_config.php | 65 + .../text_to_speech_rest_client_config.php | 62 + .../Unit/V1/Client/TextToSpeechClientTest.php | 325 + ...tToSpeechLongAudioSynthesizeClientTest.php | 270 + .../tests/Unit/V1/TextToSpeechClientTest.php | 291 + ...tToSpeechLongAudioSynthesizeClientTest.php | 193 + .../Google/Cloud/Tpu/V1/CloudTpu.php | Bin 0 -> 6967 bytes .../Google/Cloud/Tpu/V1/AcceleratorType.php | 101 + .../Google/Cloud/Tpu/V1/CreateNodeRequest.php | 145 + .../Google/Cloud/Tpu/V1/DeleteNodeRequest.php | 67 + .../Tpu/V1/GetAcceleratorTypeRequest.php | 67 + .../Google/Cloud/Tpu/V1/GetNodeRequest.php | 67 + .../Tpu/V1/GetTensorFlowVersionRequest.php | 68 + .../Tpu/V1/ListAcceleratorTypesRequest.php | 204 + .../Tpu/V1/ListAcceleratorTypesResponse.php | 136 + .../Google/Cloud/Tpu/V1/ListNodesRequest.php | 135 + .../Google/Cloud/Tpu/V1/ListNodesResponse.php | 135 + .../Tpu/V1/ListTensorFlowVersionsRequest.php | 204 + .../Tpu/V1/ListTensorFlowVersionsResponse.php | 136 + .../Google/Cloud/Tpu/V1/NetworkEndpoint.php | 101 + .../v1/proto/src/Google/Cloud/Tpu/V1/Node.php | 797 ++ .../Google/Cloud/Tpu/V1/Node/ApiVersion.php | 71 + .../src/Google/Cloud/Tpu/V1/Node/Health.php | 87 + .../src/Google/Cloud/Tpu/V1/Node/State.php | 150 + .../Google/Cloud/Tpu/V1/OperationMetadata.php | 295 + .../Cloud/Tpu/V1/ReimageNodeRequest.php | 101 + .../Google/Cloud/Tpu/V1/SchedulingConfig.php | 101 + .../Google/Cloud/Tpu/V1/StartNodeRequest.php | 67 + .../Google/Cloud/Tpu/V1/StopNodeRequest.php | 67 + .../proto/src/Google/Cloud/Tpu/V1/Symptom.php | 179 + .../Cloud/Tpu/V1/Symptom/SymptomType.php | 94 + .../Google/Cloud/Tpu/V1/TensorFlowVersion.php | 101 + .../v1/samples/V1/TpuClient/create_node.php | 90 + .../v1/samples/V1/TpuClient/delete_node.php | 78 + .../V1/TpuClient/get_accelerator_type.php | 66 + .../v1/samples/V1/TpuClient/get_location.php | 53 + .../Tpu/v1/samples/V1/TpuClient/get_node.php | 66 + .../V1/TpuClient/get_tensor_flow_version.php | 70 + .../V1/TpuClient/list_accelerator_types.php | 71 + .../samples/V1/TpuClient/list_locations.php | 58 + .../v1/samples/V1/TpuClient/list_nodes.php | 71 + .../TpuClient/list_tensor_flow_versions.php | 75 + .../v1/samples/V1/TpuClient/reimage_node.php | 65 + .../v1/samples/V1/TpuClient/start_node.php | 65 + .../Tpu/v1/samples/V1/TpuClient/stop_node.php | 65 + .../Tpu/v1/src/V1/Gapic/TpuGapicClient.php | 1237 +++ owl-bot-staging/Tpu/v1/src/V1/TpuClient.php | 34 + .../Tpu/v1/src/V1/gapic_metadata.json | 83 + .../src/V1/resources/tpu_client_config.json | 97 + .../V1/resources/tpu_descriptor_config.php | 122 + .../V1/resources/tpu_rest_client_config.php | 224 + .../Tpu/v1/tests/Unit/V1/TpuClientTest.php | 1289 +++ .../Google/Cloud/Tpu/V2/CloudTpu.php | Bin 0 -> 9430 bytes .../Google/Cloud/Tpu/V2/AcceleratorConfig.php | 101 + .../Cloud/Tpu/V2/AcceleratorConfig/Type.php | 71 + .../Google/Cloud/Tpu/V2/AcceleratorType.php | 135 + .../src/Google/Cloud/Tpu/V2/AccessConfig.php | 67 + .../src/Google/Cloud/Tpu/V2/AttachedDisk.php | 114 + .../Cloud/Tpu/V2/AttachedDisk/DiskMode.php | 66 + .../Google/Cloud/Tpu/V2/CreateNodeRequest.php | 163 + .../Google/Cloud/Tpu/V2/DeleteNodeRequest.php | 81 + .../Tpu/V2/GenerateServiceIdentityRequest.php | 68 + .../V2/GenerateServiceIdentityResponse.php | 78 + .../Tpu/V2/GetAcceleratorTypeRequest.php | 81 + .../Tpu/V2/GetGuestAttributesRequest.php | 139 + .../Tpu/V2/GetGuestAttributesResponse.php | 68 + .../Google/Cloud/Tpu/V2/GetNodeRequest.php | 81 + .../Cloud/Tpu/V2/GetRuntimeVersionRequest.php | 81 + .../Google/Cloud/Tpu/V2/GuestAttributes.php | 119 + .../Cloud/Tpu/V2/GuestAttributesEntry.php | 135 + .../Cloud/Tpu/V2/GuestAttributesValue.php | 67 + .../Tpu/V2/ListAcceleratorTypesRequest.php | 218 + .../Tpu/V2/ListAcceleratorTypesResponse.php | 136 + .../Google/Cloud/Tpu/V2/ListNodesRequest.php | 149 + .../Google/Cloud/Tpu/V2/ListNodesResponse.php | 135 + .../Tpu/V2/ListRuntimeVersionsRequest.php | 218 + .../Tpu/V2/ListRuntimeVersionsResponse.php | 136 + .../src/Google/Cloud/Tpu/V2/NetworkConfig.php | 197 + .../Google/Cloud/Tpu/V2/NetworkEndpoint.php | 145 + .../v2/proto/src/Google/Cloud/Tpu/V2/Node.php | 965 ++ .../Google/Cloud/Tpu/V2/Node/ApiVersion.php | 78 + .../src/Google/Cloud/Tpu/V2/Node/Health.php | 80 + .../src/Google/Cloud/Tpu/V2/Node/State.php | 150 + .../Google/Cloud/Tpu/V2/OperationMetadata.php | 295 + .../Google/Cloud/Tpu/V2/RuntimeVersion.php | 101 + .../Google/Cloud/Tpu/V2/SchedulingConfig.php | 101 + .../Google/Cloud/Tpu/V2/ServiceAccount.php | 109 + .../Google/Cloud/Tpu/V2/ServiceIdentity.php | 67 + .../Cloud/Tpu/V2/ShieldedInstanceConfig.php | 67 + .../Google/Cloud/Tpu/V2/StartNodeRequest.php | 67 + .../Google/Cloud/Tpu/V2/StopNodeRequest.php | 67 + .../proto/src/Google/Cloud/Tpu/V2/Symptom.php | 179 + .../Cloud/Tpu/V2/Symptom/SymptomType.php | 94 + .../Google/Cloud/Tpu/V2/UpdateNodeRequest.php | 146 + .../v2/samples/V2/TpuClient/create_node.php | 88 + .../v2/samples/V2/TpuClient/delete_node.php | 80 + .../TpuClient/generate_service_identity.php | 71 + .../V2/TpuClient/get_accelerator_type.php | 71 + .../V2/TpuClient/get_guest_attributes.php | 71 + .../v2/samples/V2/TpuClient/get_location.php | 57 + .../Tpu/v2/samples/V2/TpuClient/get_node.php | 71 + .../V2/TpuClient/get_runtime_version.php | 71 + .../V2/TpuClient/list_accelerator_types.php | 76 + .../samples/V2/TpuClient/list_locations.php | 62 + .../v2/samples/V2/TpuClient/list_nodes.php | 76 + .../V2/TpuClient/list_runtime_versions.php | 76 + .../v2/samples/V2/TpuClient/start_node.php | 83 + .../Tpu/v2/samples/V2/TpuClient/stop_node.php | 83 + .../v2/samples/V2/TpuClient/update_node.php | 87 + .../Tpu/v2/src/V2/Client/TpuClient.php | 751 ++ .../Tpu/v2/src/V2/gapic_metadata.json | 93 + .../src/V2/resources/tpu_client_config.json | 107 + .../V2/resources/tpu_descriptor_config.php | 284 + .../V2/resources/tpu_rest_client_config.php | 252 + .../v2/tests/Unit/V2/Client/TpuClientTest.php | 1552 +++ .../Google/Devtools/Cloudtrace/V2/Trace.php | Bin 0 -> 4514 bytes .../Google/Devtools/Cloudtrace/V2/Tracing.php | 42 + .../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 | 132 + .../src/Google/Cloud/Trace/V2/Span/Link.php | 189 + .../Google/Cloud/Trace/V2/Span/Link/Type.php | 65 + .../src/Google/Cloud/Trace/V2/Span/Links.php | 109 + .../Google/Cloud/Trace/V2/Span/SpanKind.php | 95 + .../Google/Cloud/Trace/V2/Span/TimeEvent.php | 155 + .../Trace/V2/Span/TimeEvent/Annotation.php | 132 + .../Trace/V2/Span/TimeEvent/MessageEvent.php | 188 + .../V2/Span/TimeEvent/MessageEvent/Type.php | 64 + .../Google/Cloud/Trace/V2/Span/TimeEvents.php | 148 + .../src/Google/Cloud/Trace/V2/StackTrace.php | 135 + .../Cloud/Trace/V2/StackTrace/StackFrame.php | 348 + .../Cloud/Trace/V2/StackTrace/StackFrames.php | 112 + .../Cloud/Trace/V2/TruncatableString.php | 125 + .../TraceServiceClient/batch_write_spans.php | 103 + .../V2/TraceServiceClient/create_span.php | 91 + .../v2/src/V2/Client/TraceServiceClient.php | 288 + .../src/V2/Gapic/TraceServiceGapicClient.php | 477 + .../Trace/v2/src/V2/TraceServiceClient.php | 34 + .../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 + .../tests/Unit/V2/TraceServiceClientTest.php | 205 + .../Google/Cloud/Translate/V3/AdaptiveMt.php | Bin 0 -> 5617 bytes .../Cloud/Translate/V3/AutomlTranslation.php | Bin 0 -> 5823 bytes .../Google/Cloud/Translate/V3/Common.php | Bin 0 -> 2045 bytes .../Cloud/Translate/V3/TranslationService.php | Bin 0 -> 20946 bytes .../Cloud/Translate/V3/AdaptiveMtDataset.php | 303 + .../Cloud/Translate/V3/AdaptiveMtFile.php | 227 + .../Cloud/Translate/V3/AdaptiveMtSentence.php | 227 + .../V3/AdaptiveMtTranslateRequest.php | 257 + .../GlossaryConfig.php | 160 + .../ReferenceSentenceConfig.php | 150 + .../ReferenceSentencePair.php | 104 + .../ReferenceSentencePairList.php | 70 + .../V3/AdaptiveMtTranslateResponse.php | 139 + .../Translate/V3/AdaptiveMtTranslation.php | 67 + .../Translate/V3/BatchDocumentInputConfig.php | 123 + .../V3/BatchDocumentOutputConfig.php | 186 + .../V3/BatchTransferResourcesResponse.php | 67 + .../TransferResourceResponse.php | 152 + .../V3/BatchTranslateDocumentMetadata.php | 411 + .../BatchTranslateDocumentMetadata/State.php | 88 + .../V3/BatchTranslateDocumentRequest.php | 595 ++ .../V3/BatchTranslateDocumentResponse.php | 432 + .../Translate/V3/BatchTranslateMetadata.php | 225 + .../V3/BatchTranslateMetadata/State.php | 89 + .../Translate/V3/BatchTranslateResponse.php | 234 + .../V3/BatchTranslateTextRequest.php | 419 + .../V3/CreateAdaptiveMtDatasetRequest.php | 132 + .../Translate/V3/CreateDatasetMetadata.php | 199 + .../Translate/V3/CreateDatasetRequest.php | 127 + .../V3/CreateGlossaryEntryRequest.php | 127 + .../Translate/V3/CreateGlossaryMetadata.php | 147 + .../V3/CreateGlossaryMetadata/State.php | 86 + .../Translate/V3/CreateGlossaryRequest.php | 127 + .../Translate/V3/CreateModelMetadata.php | 199 + .../Cloud/Translate/V3/CreateModelRequest.php | 132 + .../src/Google/Cloud/Translate/V3/Dataset.php | 406 + .../Cloud/Translate/V3/DatasetInputConfig.php | 67 + .../V3/DatasetInputConfig/InputFile.php | 116 + .../Translate/V3/DatasetOutputConfig.php | 75 + .../V3/DeleteAdaptiveMtDatasetRequest.php | 86 + .../V3/DeleteAdaptiveMtFileRequest.php | 86 + .../Translate/V3/DeleteDatasetMetadata.php | 199 + .../Translate/V3/DeleteDatasetRequest.php | 81 + .../V3/DeleteGlossaryEntryRequest.php | 81 + .../Translate/V3/DeleteGlossaryMetadata.php | 147 + .../V3/DeleteGlossaryMetadata/State.php | 86 + .../Translate/V3/DeleteGlossaryRequest.php | 81 + .../Translate/V3/DeleteGlossaryResponse.php | 165 + .../Translate/V3/DeleteModelMetadata.php | 199 + .../Cloud/Translate/V3/DeleteModelRequest.php | 81 + .../Translate/V3/DetectLanguageRequest.php | 326 + .../Translate/V3/DetectLanguageResponse.php | 71 + .../Cloud/Translate/V3/DetectedLanguage.php | 105 + .../Translate/V3/DocumentInputConfig.php | 177 + .../Translate/V3/DocumentOutputConfig.php | 240 + .../Translate/V3/DocumentTranslation.php | 159 + .../src/Google/Cloud/Translate/V3/Example.php | 173 + .../Cloud/Translate/V3/ExportDataMetadata.php | 199 + .../Cloud/Translate/V3/ExportDataRequest.php | 131 + .../Cloud/Translate/V3/FileInputSource.php | 135 + .../Cloud/Translate/V3/GcsDestination.php | 83 + .../Cloud/Translate/V3/GcsInputSource.php | 67 + .../Translate/V3/GcsOutputDestination.php | 75 + .../Google/Cloud/Translate/V3/GcsSource.php | 67 + .../V3/GetAdaptiveMtDatasetRequest.php | 86 + .../Translate/V3/GetAdaptiveMtFileRequest.php | 86 + .../Cloud/Translate/V3/GetDatasetRequest.php | 81 + .../Translate/V3/GetGlossaryEntryRequest.php | 81 + .../Cloud/Translate/V3/GetGlossaryRequest.php | 81 + .../Cloud/Translate/V3/GetModelRequest.php | 81 + .../V3/GetSupportedLanguagesRequest.php | 247 + .../Google/Cloud/Translate/V3/Glossary.php | 350 + .../V3/Glossary/LanguageCodePair.php | 112 + .../V3/Glossary/LanguageCodesSet.php | 78 + .../Cloud/Translate/V3/GlossaryEntry.php | 184 + .../V3/GlossaryEntry/GlossaryTermsPair.php | 124 + .../V3/GlossaryEntry/GlossaryTermsSet.php | 76 + .../Translate/V3/GlossaryInputConfig.php | 120 + .../Cloud/Translate/V3/GlossaryTerm.php | 101 + .../V3/ImportAdaptiveMtFileRequest.php | 161 + .../V3/ImportAdaptiveMtFileResponse.php | 77 + .../Cloud/Translate/V3/ImportDataMetadata.php | 199 + .../Cloud/Translate/V3/ImportDataRequest.php | 131 + .../Google/Cloud/Translate/V3/InputConfig.php | 166 + .../V3/ListAdaptiveMtDatasetsRequest.php | 213 + .../V3/ListAdaptiveMtDatasetsResponse.php | 109 + .../V3/ListAdaptiveMtFilesRequest.php | 175 + .../V3/ListAdaptiveMtFilesResponse.php | 109 + .../V3/ListAdaptiveMtSentencesRequest.php | 178 + .../V3/ListAdaptiveMtSentencesResponse.php | 101 + .../Translate/V3/ListDatasetsRequest.php | 166 + .../Translate/V3/ListDatasetsResponse.php | 109 + .../Translate/V3/ListExamplesRequest.php | 208 + .../Translate/V3/ListExamplesResponse.php | 109 + .../Translate/V3/ListGlossariesRequest.php | 259 + .../Translate/V3/ListGlossariesResponse.php | 109 + .../V3/ListGlossaryEntriesRequest.php | 170 + .../V3/ListGlossaryEntriesResponse.php | 105 + .../Cloud/Translate/V3/ListModelsRequest.php | 208 + .../Cloud/Translate/V3/ListModelsResponse.php | 109 + .../src/Google/Cloud/Translate/V3/Model.php | 417 + .../Cloud/Translate/V3/OperationState.php | 83 + .../Cloud/Translate/V3/OutputConfig.php | 249 + .../Cloud/Translate/V3/Romanization.php | 121 + .../Translate/V3/RomanizeTextRequest.php | 190 + .../Translate/V3/RomanizeTextResponse.php | 75 + .../Cloud/Translate/V3/SupportedLanguage.php | 186 + .../Cloud/Translate/V3/SupportedLanguages.php | 71 + .../Translate/V3/TranslateDocumentRequest.php | 631 ++ .../V3/TranslateDocumentResponse.php | 231 + .../V3/TranslateTextGlossaryConfig.php | 156 + .../Translate/V3/TranslateTextRequest.php | 599 ++ .../Translate/V3/TranslateTextResponse.php | 123 + .../Google/Cloud/Translate/V3/Translation.php | 223 + .../Translate/V3/TransliterationConfig.php | 71 + .../V3/UpdateGlossaryEntryRequest.php | 90 + .../Translate/V3/UpdateGlossaryMetadata.php | 161 + .../V3/UpdateGlossaryMetadata/State.php | 86 + .../Translate/V3/UpdateGlossaryRequest.php | 141 + .../adaptive_mt_translate.php | 89 + .../batch_translate_document.php | 116 + .../batch_translate_text.php | 113 + .../create_adaptive_mt_dataset.php | 85 + .../create_dataset.php | 85 + .../create_glossary.php | 90 + .../create_glossary_entry.php | 73 + .../TranslationServiceClient/create_model.php | 86 + .../delete_adaptive_mt_dataset.php | 75 + .../delete_adaptive_mt_file.php | 75 + .../delete_dataset.php | 80 + .../delete_glossary.php | 85 + .../delete_glossary_entry.php | 74 + .../TranslationServiceClient/delete_model.php | 80 + .../detect_language.php | 81 + .../TranslationServiceClient/export_data.php | 83 + .../get_adaptive_mt_dataset.php | 76 + .../get_adaptive_mt_file.php | 77 + .../TranslationServiceClient/get_dataset.php | 71 + .../TranslationServiceClient/get_glossary.php | 72 + .../get_glossary_entry.php | 76 + .../V3/TranslationServiceClient/get_model.php | 71 + .../get_supported_languages.php | 83 + .../import_adaptive_mt_file.php | 77 + .../TranslationServiceClient/import_data.php | 83 + .../list_adaptive_mt_datasets.php | 77 + .../list_adaptive_mt_files.php | 82 + .../list_adaptive_mt_sentences.php | 85 + .../list_datasets.php | 77 + .../list_examples.php | 77 + .../list_glossaries.php | 77 + .../list_glossary_entries.php | 77 + .../TranslationServiceClient/list_models.php | 77 + .../romanize_text.php | 82 + .../translate_document.php | 88 + .../translate_text.php | 97 + .../update_glossary.php | 86 + .../update_glossary_entry.php | 59 + .../V3/Client/TranslationServiceClient.php | 1476 +++ .../Gapic/TranslationServiceGapicClient.php | 3147 ++++++ .../v3/src/V3/TranslationServiceClient.php | 34 + .../Translate/v3/src/V3/gapic_metadata.json | 208 + .../translation_service_client_config.json | 235 + .../translation_service_descriptor_config.php | 636 ++ ...translation_service_rest_client_config.php | 582 ++ .../Client/TranslationServiceClientTest.php | 3545 +++++++ .../Unit/V3/TranslationServiceClientTest.php | 3274 +++++++ .../V1/VideoIntelligence.php | 271 + .../V1/AnnotateVideoProgress.php | 69 + .../V1/AnnotateVideoRequest.php | 357 + .../V1/AnnotateVideoResponse.php | 69 + .../V1/DetectedAttribute.php | 143 + .../VideoIntelligence/V1/DetectedLandmark.php | 150 + .../Cloud/VideoIntelligence/V1/Entity.php | 143 + .../V1/ExplicitContentAnnotation.php | 103 + .../V1/ExplicitContentDetectionConfig.php | 75 + .../V1/ExplicitContentFrame.php | 115 + .../VideoIntelligence/V1/FaceAnnotation.php | 136 + .../V1/FaceDetectionAnnotation.php | 135 + .../V1/FaceDetectionConfig.php | 147 + .../Cloud/VideoIntelligence/V1/FaceFrame.php | 124 + .../VideoIntelligence/V1/FaceSegment.php | 77 + .../Cloud/VideoIntelligence/V1/Feature.php | 110 + .../VideoIntelligence/V1/LabelAnnotation.php | 225 + .../V1/LabelDetectionConfig.php | 267 + .../V1/LabelDetectionMode.php | 68 + .../Cloud/VideoIntelligence/V1/LabelFrame.php | 115 + .../VideoIntelligence/V1/LabelSegment.php | 111 + .../Cloud/VideoIntelligence/V1/Likelihood.php | 82 + .../V1/LogoRecognitionAnnotation.php | 157 + .../V1/NormalizedBoundingBox.php | 171 + .../V1/NormalizedBoundingPoly.php | 81 + .../VideoIntelligence/V1/NormalizedVertex.php | 103 + .../V1/ObjectTrackingAnnotation.php | 284 + .../V1/ObjectTrackingConfig.php | 75 + .../V1/ObjectTrackingFrame.php | 122 + .../V1/PersonDetectionAnnotation.php | 101 + .../V1/PersonDetectionConfig.php | 155 + .../V1/ShotChangeDetectionConfig.php | 75 + .../VideoIntelligence/V1/SpeechContext.php | 88 + .../V1/SpeechRecognitionAlternative.php | 163 + .../V1/SpeechTranscription.php | 121 + .../V1/SpeechTranscriptionConfig.php | 447 + .../VideoIntelligence/V1/TextAnnotation.php | 137 + .../V1/TextDetectionConfig.php | 121 + .../Cloud/VideoIntelligence/V1/TextFrame.php | 123 + .../VideoIntelligence/V1/TextSegment.php | 149 + .../V1/TimestampedObject.php | 195 + .../Cloud/VideoIntelligence/V1/Track.php | 179 + .../V1/VideoAnnotationProgress.php | 283 + .../V1/VideoAnnotationResults.php | 710 ++ .../VideoIntelligence/V1/VideoContext.php | 427 + .../VideoIntelligence/V1/VideoSegment.php | 129 + .../Cloud/VideoIntelligence/V1/WordInfo.php | 281 + .../annotate_video.php | 72 + .../Client/VideoIntelligenceServiceClient.php | 248 + .../v1/src/V1/gapic_metadata.json | 23 + ...eo_intelligence_service_client_config.json | 40 + ...intelligence_service_descriptor_config.php | 39 + ...ntelligence_service_rest_client_config.php | 100 + .../VideoIntelligenceServiceClientTest.php | 238 + .../Cloud/Video/Livestream/V1/Outputs.php | Bin 0 -> 3877 bytes .../Cloud/Video/Livestream/V1/Resources.php | Bin 0 -> 10327 bytes .../Cloud/Video/Livestream/V1/Service.php | 249 + .../Cloud/Video/LiveStream/V1/Asset.php | 424 + .../Video/LiveStream/V1/Asset/ImageAsset.php | 70 + .../Cloud/Video/LiveStream/V1/Asset/State.php | 78 + .../Video/LiveStream/V1/Asset/VideoAsset.php | 72 + .../Cloud/Video/LiveStream/V1/AudioFormat.php | 135 + .../Cloud/Video/LiveStream/V1/AudioStream.php | 327 + .../V1/AudioStream/AudioMapping.php | 246 + .../LiveStream/V1/AudioStreamProperty.php | 111 + .../Cloud/Video/LiveStream/V1/Channel.php | 827 ++ .../Video/LiveStream/V1/Channel/Output.php | 70 + .../LiveStream/V1/Channel/StreamingState.php | 104 + .../V1/ChannelOperationResponse.php | 33 + .../Google/Cloud/Video/LiveStream/V1/Clip.php | 471 + .../Video/LiveStream/V1/Clip/ClipManifest.php | 132 + .../Cloud/Video/LiveStream/V1/Clip/Slice.php | 78 + .../Cloud/Video/LiveStream/V1/Clip/State.php | 81 + .../Video/LiveStream/V1/Clip/TimeSlice.php | 125 + .../LiveStream/V1/CreateAssetRequest.php | 252 + .../LiveStream/V1/CreateChannelRequest.php | 252 + .../Video/LiveStream/V1/CreateClipRequest.php | 253 + .../LiveStream/V1/CreateEventRequest.php | 252 + .../LiveStream/V1/CreateInputRequest.php | 252 + .../LiveStream/V1/DeleteAssetRequest.php | 160 + .../LiveStream/V1/DeleteChannelRequest.php | 206 + .../Video/LiveStream/V1/DeleteClipRequest.php | 160 + .../LiveStream/V1/DeleteEventRequest.php | 160 + .../LiveStream/V1/DeleteInputRequest.php | 160 + .../Video/LiveStream/V1/ElementaryStream.php | 185 + .../Cloud/Video/LiveStream/V1/Encryption.php | 273 + .../V1/Encryption/Aes128Encryption.php | 36 + .../LiveStream/V1/Encryption/Clearkey.php | 36 + .../LiveStream/V1/Encryption/DrmSystems.php | 213 + .../LiveStream/V1/Encryption/Fairplay.php | 36 + .../V1/Encryption/MpegCommonEncryption.php | 78 + .../LiveStream/V1/Encryption/Playready.php | 36 + .../V1/Encryption/SampleAesEncryption.php | 36 + .../V1/Encryption/SecretManagerSource.php | 74 + .../LiveStream/V1/Encryption/Widevine.php | 36 + .../Cloud/Video/LiveStream/V1/Event.php | 601 ++ .../Video/LiveStream/V1/Event/AdBreakTask.php | 80 + .../LiveStream/V1/Event/InputSwitchTask.php | 78 + .../Video/LiveStream/V1/Event/MuteTask.php | 84 + .../V1/Event/ReturnToProgramTask.php | 37 + .../Video/LiveStream/V1/Event/SlateTask.php | 130 + .../Cloud/Video/LiveStream/V1/Event/State.php | 92 + .../Video/LiveStream/V1/Event/UnmuteTask.php | 36 + .../Video/LiveStream/V1/GetAssetRequest.php | 86 + .../Video/LiveStream/V1/GetChannelRequest.php | 86 + .../Video/LiveStream/V1/GetClipRequest.php | 86 + .../Video/LiveStream/V1/GetEventRequest.php | 86 + .../Video/LiveStream/V1/GetInputRequest.php | 86 + .../Video/LiveStream/V1/GetPoolRequest.php | 86 + .../Cloud/Video/LiveStream/V1/Input.php | 460 + .../LiveStream/V1/Input/SecurityRule.php | 80 + .../Cloud/Video/LiveStream/V1/Input/Tier.php | 71 + .../Cloud/Video/LiveStream/V1/Input/Type.php | 64 + .../Video/LiveStream/V1/InputAttachment.php | 157 + .../V1/InputAttachment/AutomaticFailover.php | 82 + .../Cloud/Video/LiveStream/V1/InputConfig.php | 67 + .../V1/InputConfig/InputSwitchMode.php | 72 + .../LiveStream/V1/InputStreamProperty.php | 149 + .../Video/LiveStream/V1/ListAssetsRequest.php | 226 + .../LiveStream/V1/ListAssetsResponse.php | 135 + .../LiveStream/V1/ListChannelsRequest.php | 242 + .../LiveStream/V1/ListChannelsResponse.php | 139 + .../Video/LiveStream/V1/ListClipsRequest.php | 221 + .../Video/LiveStream/V1/ListClipsResponse.php | 135 + .../Video/LiveStream/V1/ListEventsRequest.php | 242 + .../LiveStream/V1/ListEventsResponse.php | 139 + .../Video/LiveStream/V1/ListInputsRequest.php | 242 + .../LiveStream/V1/ListInputsResponse.php | 139 + .../Cloud/Video/LiveStream/V1/LogConfig.php | 70 + .../LiveStream/V1/LogConfig/LogSeverity.php | 92 + .../Cloud/Video/LiveStream/V1/Manifest.php | 381 + .../LiveStream/V1/Manifest/ManifestType.php | 64 + .../Cloud/Video/LiveStream/V1/MuxStream.php | 257 + .../LiveStream/V1/NormalizedCoordinate.php | 101 + .../LiveStream/V1/NormalizedResolution.php | 101 + .../Video/LiveStream/V1/OperationMetadata.php | 273 + .../Google/Cloud/Video/LiveStream/V1/Pool.php | 240 + .../LiveStream/V1/Pool/NetworkConfig.php | 94 + .../LiveStream/V1/PreprocessingConfig.php | 165 + .../V1/PreprocessingConfig/Audio.php | 106 + .../V1/PreprocessingConfig/Crop.php | 173 + .../LiveStream/V1/PreprocessingConfig/Pad.php | 173 + .../Video/LiveStream/V1/RetentionConfig.php | 129 + .../Video/LiveStream/V1/SegmentSettings.php | 105 + .../Cloud/Video/LiveStream/V1/SpriteSheet.php | 367 + .../LiveStream/V1/StartChannelRequest.php | 160 + .../Video/LiveStream/V1/StaticOverlay.php | 233 + .../LiveStream/V1/StopChannelRequest.php | 160 + .../Cloud/Video/LiveStream/V1/TextStream.php | 79 + .../Video/LiveStream/V1/TimecodeConfig.php | 150 + .../V1/TimecodeConfig/TimecodeSource.php | 64 + .../LiveStream/V1/UpdateChannelRequest.php | 293 + .../LiveStream/V1/UpdateInputRequest.php | 253 + .../Video/LiveStream/V1/UpdatePoolRequest.php | 232 + .../Cloud/Video/LiveStream/V1/VideoFormat.php | 169 + .../Cloud/Video/LiveStream/V1/VideoStream.php | 75 + .../V1/VideoStream/H264CodecSettings.php | 743 ++ .../LiveStream/V1/VideoStreamProperty.php | 111 + .../LivestreamServiceClient/create_asset.php | 92 + .../create_channel.php | 95 + .../LivestreamServiceClient/create_clip.php | 104 + .../LivestreamServiceClient/create_event.php | 79 + .../LivestreamServiceClient/create_input.php | 91 + .../LivestreamServiceClient/delete_asset.php | 81 + .../delete_channel.php | 81 + .../LivestreamServiceClient/delete_clip.php | 87 + .../LivestreamServiceClient/delete_event.php | 75 + .../LivestreamServiceClient/delete_input.php | 81 + .../V1/LivestreamServiceClient/get_asset.php | 72 + .../LivestreamServiceClient/get_channel.php | 72 + .../V1/LivestreamServiceClient/get_clip.php | 77 + .../V1/LivestreamServiceClient/get_event.php | 77 + .../V1/LivestreamServiceClient/get_input.php | 72 + .../LivestreamServiceClient/get_location.php | 57 + .../V1/LivestreamServiceClient/get_pool.php | 72 + .../LivestreamServiceClient/list_assets.php | 77 + .../LivestreamServiceClient/list_channels.php | 77 + .../V1/LivestreamServiceClient/list_clips.php | 76 + .../LivestreamServiceClient/list_events.php | 77 + .../LivestreamServiceClient/list_inputs.php | 77 + .../list_locations.php | 62 + .../LivestreamServiceClient/start_channel.php | 85 + .../LivestreamServiceClient/stop_channel.php | 85 + .../update_channel.php | 74 + .../LivestreamServiceClient/update_input.php | 71 + .../LivestreamServiceClient/update_pool.php | 71 + .../src/V1/Client/LivestreamServiceClient.php | 1223 +++ .../v1/src/V1/gapic_metadata.json | 158 + .../livestream_service_client_config.json | 184 + .../livestream_service_descriptor_config.php | 519 + .../livestream_service_rest_client_config.php | 414 + .../V1/Client/LivestreamServiceClientTest.php | 2860 ++++++ .../Cloud/Video/Stitcher/V1/AdTagDetails.php | 52 + .../Cloud/Video/Stitcher/V1/CdnKeys.php | Bin 0 -> 1567 bytes .../Cloud/Video/Stitcher/V1/Companions.php | Bin 0 -> 1738 bytes .../Google/Cloud/Video/Stitcher/V1/Events.php | Bin 0 -> 1464 bytes .../Cloud/Video/Stitcher/V1/FetchOptions.php | 32 + .../Cloud/Video/Stitcher/V1/LiveConfigs.php | Bin 0 -> 2272 bytes .../Cloud/Video/Stitcher/V1/Sessions.php | Bin 0 -> 3981 bytes .../Google/Cloud/Video/Stitcher/V1/Slates.php | 37 + .../Cloud/Video/Stitcher/V1/StitchDetails.php | 45 + .../Stitcher/V1/VideoStitcherService.php | 243 + .../Cloud/Video/Stitcher/V1/VodConfigs.php | Bin 0 -> 1571 bytes .../Cloud/Video/Stitcher/V1/AdRequest.php | 155 + .../Video/Stitcher/V1/AdStitchDetail.php | 213 + .../Cloud/Video/Stitcher/V1/AdTracking.php | 63 + .../Cloud/Video/Stitcher/V1/AkamaiCdnKey.php | 67 + .../Google/Cloud/Video/Stitcher/V1/CdnKey.php | 219 + .../Cloud/Video/Stitcher/V1/Companion.php | 455 + .../Cloud/Video/Stitcher/V1/CompanionAds.php | 101 + .../V1/CompanionAds/DisplayRequirement.php | 71 + .../Video/Stitcher/V1/CreateCdnKeyRequest.php | 189 + .../Stitcher/V1/CreateLiveConfigRequest.php | 242 + .../Stitcher/V1/CreateLiveSessionRequest.php | 132 + .../Video/Stitcher/V1/CreateSlateRequest.php | 257 + .../Stitcher/V1/CreateVodConfigRequest.php | 242 + .../Stitcher/V1/CreateVodSessionRequest.php | 132 + .../Video/Stitcher/V1/DeleteCdnKeyRequest.php | 86 + .../Stitcher/V1/DeleteLiveConfigRequest.php | 86 + .../Video/Stitcher/V1/DeleteSlateRequest.php | 86 + .../Stitcher/V1/DeleteVodConfigRequest.php | 86 + .../Google/Cloud/Video/Stitcher/V1/Event.php | 179 + .../Video/Stitcher/V1/Event/EventType.php | 218 + .../Cloud/Video/Stitcher/V1/FetchOptions.php | 79 + .../Cloud/Video/Stitcher/V1/GamLiveConfig.php | 135 + .../Cloud/Video/Stitcher/V1/GamVodConfig.php | 67 + .../Video/Stitcher/V1/GetCdnKeyRequest.php | 86 + .../Stitcher/V1/GetLiveAdTagDetailRequest.php | 86 + .../Stitcher/V1/GetLiveConfigRequest.php | 91 + .../Stitcher/V1/GetLiveSessionRequest.php | 86 + .../Video/Stitcher/V1/GetSlateRequest.php | 86 + .../Stitcher/V1/GetVodAdTagDetailRequest.php | 91 + .../Video/Stitcher/V1/GetVodConfigRequest.php | 86 + .../Stitcher/V1/GetVodSessionRequest.php | 86 + .../Stitcher/V1/GetVodStitchDetailRequest.php | 91 + .../Cloud/Video/Stitcher/V1/GoogleCdnKey.php | 101 + .../Video/Stitcher/V1/HtmlAdResource.php | 67 + .../Video/Stitcher/V1/IframeAdResource.php | 67 + .../Cloud/Video/Stitcher/V1/Interstitials.php | 111 + .../Video/Stitcher/V1/ListCdnKeysRequest.php | 226 + .../Video/Stitcher/V1/ListCdnKeysResponse.php | 135 + .../V1/ListLiveAdTagDetailsRequest.php | 154 + .../V1/ListLiveAdTagDetailsResponse.php | 101 + .../Stitcher/V1/ListLiveConfigsRequest.php | 234 + .../Stitcher/V1/ListLiveConfigsResponse.php | 135 + .../Video/Stitcher/V1/ListSlatesRequest.php | 226 + .../Video/Stitcher/V1/ListSlatesResponse.php | 135 + .../V1/ListVodAdTagDetailsRequest.php | 154 + .../V1/ListVodAdTagDetailsResponse.php | 101 + .../Stitcher/V1/ListVodConfigsRequest.php | 238 + .../Stitcher/V1/ListVodConfigsResponse.php | 135 + .../V1/ListVodStitchDetailsRequest.php | 154 + .../V1/ListVodStitchDetailsResponse.php | 101 + .../Video/Stitcher/V1/LiveAdTagDetail.php | 107 + .../Cloud/Video/Stitcher/V1/LiveConfig.php | 427 + .../Video/Stitcher/V1/LiveConfig/State.php | 71 + .../V1/LiveConfig/StitchingPolicy.php | 66 + .../Cloud/Video/Stitcher/V1/LiveSession.php | 340 + .../Stitcher/V1/LiveSession/GamSettings.php | 120 + .../Video/Stitcher/V1/ManifestOptions.php | 109 + .../V1/ManifestOptions/OrderPolicy.php | 64 + .../Cloud/Video/Stitcher/V1/MediaCdnKey.php | 149 + .../Stitcher/V1/MediaCdnKey/TokenConfig.php | 90 + .../Video/Stitcher/V1/OperationMetadata.php | 189 + .../Video/Stitcher/V1/PrefetchConfig.php | 131 + .../Cloud/Video/Stitcher/V1/ProgressEvent.php | 128 + .../Video/Stitcher/V1/RenditionFilter.php | 109 + .../Video/Stitcher/V1/RequestMetadata.php | 77 + .../Video/Stitcher/V1/ResponseMetadata.php | 257 + .../Google/Cloud/Video/Stitcher/V1/Slate.php | 153 + .../Video/Stitcher/V1/Slate/GamSlate.php | 105 + .../Video/Stitcher/V1/StaticAdResource.php | 101 + .../Video/Stitcher/V1/UpdateCdnKeyRequest.php | 146 + .../Stitcher/V1/UpdateLiveConfigRequest.php | 151 + .../Video/Stitcher/V1/UpdateSlateRequest.php | 136 + .../Stitcher/V1/UpdateVodConfigRequest.php | 151 + .../Video/Stitcher/V1/VodAdTagDetail.php | 107 + .../Cloud/Video/Stitcher/V1/VodConfig.php | 261 + .../Video/Stitcher/V1/VodConfig/State.php | 71 + .../Cloud/Video/Stitcher/V1/VodSession.php | 497 + .../Stitcher/V1/VodSession/GamSettings.php | 105 + .../Cloud/Video/Stitcher/V1/VodSessionAd.php | 171 + .../Video/Stitcher/V1/VodSessionAdBreak.php | 189 + .../Video/Stitcher/V1/VodSessionContent.php | 81 + .../Video/Stitcher/V1/VodStitchDetail.php | 107 + .../create_cdn_key.php | 94 + .../create_live_config.php | 106 + .../create_live_session.php | 85 + .../create_slate.php | 92 + .../create_vod_config.php | 100 + .../create_vod_session.php | 79 + .../delete_cdn_key.php | 81 + .../delete_live_config.php | 85 + .../delete_slate.php | 81 + .../delete_vod_config.php | 85 + .../get_cdn_key.php | 72 + .../get_live_ad_tag_detail.php | 77 + .../get_live_config.php | 78 + .../get_live_session.php | 76 + .../VideoStitcherServiceClient/get_slate.php | 72 + .../get_vod_ad_tag_detail.php | 78 + .../get_vod_config.php | 77 + .../get_vod_session.php | 77 + .../get_vod_stitch_detail.php | 78 + .../list_cdn_keys.php | 77 + .../list_live_ad_tag_details.php | 81 + .../list_live_configs.php | 78 + .../list_slates.php | 77 + .../list_vod_ad_tag_details.php | 81 + .../list_vod_configs.php | 78 + .../list_vod_stitch_details.php | 82 + .../update_cdn_key.php | 75 + .../update_live_config.php | 92 + .../update_slate.php | 74 + .../update_vod_config.php | 91 + .../V1/Client/VideoStitcherServiceClient.php | 1325 +++ .../v1/src/V1/gapic_metadata.json | 168 + .../video_stitcher_service_client_config.json | 194 + ...deo_stitcher_service_descriptor_config.php | 544 ++ ...eo_stitcher_service_rest_client_config.php | 444 + .../Client/VideoStitcherServiceClientTest.php | 3059 ++++++ .../Cloud/Video/Transcoder/V1/Resources.php | Bin 0 -> 11097 bytes .../Cloud/Video/Transcoder/V1/Services.php | 90 + .../Cloud/Video/Transcoder/V1/AdBreak.php | 81 + .../Cloud/Video/Transcoder/V1/AudioStream.php | 389 + .../V1/AudioStream/AudioMapping.php | 248 + .../Video/Transcoder/V1/CreateJobRequest.php | 132 + .../V1/CreateJobTemplateRequest.php | 184 + .../Video/Transcoder/V1/DeleteJobRequest.php | 124 + .../V1/DeleteJobTemplateRequest.php | 124 + .../Cloud/Video/Transcoder/V1/EditAtom.php | 209 + .../Video/Transcoder/V1/ElementaryStream.php | 177 + .../Cloud/Video/Transcoder/V1/Encryption.php | 265 + .../V1/Encryption/Aes128Encryption.php | 36 + .../Transcoder/V1/Encryption/Clearkey.php | 36 + .../Transcoder/V1/Encryption/DrmSystems.php | 212 + .../Transcoder/V1/Encryption/Fairplay.php | 36 + .../V1/Encryption/MpegCommonEncryption.php | 82 + .../Transcoder/V1/Encryption/Playready.php | 36 + .../V1/Encryption/SampleAesEncryption.php | 36 + .../V1/Encryption/SecretManagerSource.php | 86 + .../Transcoder/V1/Encryption/Widevine.php | 36 + .../Video/Transcoder/V1/GetJobRequest.php | 86 + .../Transcoder/V1/GetJobTemplateRequest.php | 91 + .../Cloud/Video/Transcoder/V1/Input.php | 165 + .../Google/Cloud/Video/Transcoder/V1/Job.php | 672 ++ .../V1/Job/OptimizationStrategy.php | 64 + .../Transcoder/V1/Job/ProcessingMode.php | 67 + .../Transcoder/V1/Job/ProcessingState.php | 79 + .../Cloud/Video/Transcoder/V1/JobConfig.php | 451 + .../Cloud/Video/Transcoder/V1/JobTemplate.php | 157 + .../Transcoder/V1/ListJobTemplatesRequest.php | 234 + .../V1/ListJobTemplatesResponse.php | 135 + .../Video/Transcoder/V1/ListJobsRequest.php | 230 + .../Video/Transcoder/V1/ListJobsResponse.php | 135 + .../Cloud/Video/Transcoder/V1/Manifest.php | 197 + .../Transcoder/V1/Manifest/DashConfig.php | 74 + .../DashConfig/SegmentReferenceScheme.php | 64 + .../Transcoder/V1/Manifest/ManifestType.php | 64 + .../Cloud/Video/Transcoder/V1/MuxStream.php | 299 + .../Cloud/Video/Transcoder/V1/Output.php | 79 + .../Cloud/Video/Transcoder/V1/Overlay.php | 115 + .../Video/Transcoder/V1/Overlay/Animation.php | 144 + .../Transcoder/V1/Overlay/AnimationEnd.php | 82 + .../Transcoder/V1/Overlay/AnimationFade.php | 222 + .../Transcoder/V1/Overlay/AnimationStatic.php | 140 + .../Video/Transcoder/V1/Overlay/FadeType.php | 64 + .../Video/Transcoder/V1/Overlay/Image.php | 168 + .../V1/Overlay/NormalizedCoordinate.php | 104 + .../Transcoder/V1/PreprocessingConfig.php | 341 + .../V1/PreprocessingConfig/Audio.php | 182 + .../V1/PreprocessingConfig/Color.php | 163 + .../V1/PreprocessingConfig/Crop.php | 173 + .../V1/PreprocessingConfig/Deblock.php | 113 + .../V1/PreprocessingConfig/Deinterlace.php | 111 + .../Deinterlace/BwdifConfig.php | 178 + .../Deinterlace/YadifConfig.php | 216 + .../V1/PreprocessingConfig/Denoise.php | 121 + .../Transcoder/V1/PreprocessingConfig/Pad.php | 173 + .../Video/Transcoder/V1/PubsubDestination.php | 71 + .../Video/Transcoder/V1/SegmentSettings.php | 123 + .../Cloud/Video/Transcoder/V1/SpriteSheet.php | 575 ++ .../Cloud/Video/Transcoder/V1/TextStream.php | 209 + .../Transcoder/V1/TextStream/TextMapping.php | 142 + .../Cloud/Video/Transcoder/V1/VideoStream.php | 141 + .../V1/VideoStream/H264CodecSettings.php | 994 ++ .../V1/VideoStream/H265CodecSettings.php | 1008 ++ .../V1/VideoStream/Vp9CodecSettings.php | 570 ++ .../V1/TranscoderServiceClient/create_job.php | 74 + .../create_job_template.php | 81 + .../V1/TranscoderServiceClient/delete_job.php | 70 + .../delete_job_template.php | 74 + .../V1/TranscoderServiceClient/get_job.php | 72 + .../get_job_template.php | 77 + .../list_job_templates.php | 77 + .../V1/TranscoderServiceClient/list_jobs.php | 76 + .../src/V1/Client/TranscoderServiceClient.php | 476 + .../v1/src/V1/gapic_metadata.json | 58 + .../transcoder_service_client_config.json | 84 + .../transcoder_service_descriptor_config.php | 145 + .../transcoder_service_rest_client_config.php | 122 + .../V1/Client/TranscoderServiceClientTest.php | 676 ++ .../Google/Cloud/Vision/V1/Geometry.php | 40 + .../Google/Cloud/Vision/V1/ImageAnnotator.php | Bin 0 -> 11700 bytes .../Google/Cloud/Vision/V1/ProductSearch.php | 55 + .../Cloud/Vision/V1/ProductSearchService.php | Bin 0 -> 9855 bytes .../Google/Cloud/Vision/V1/TextAnnotation.php | Bin 0 -> 2489 bytes .../Google/Cloud/Vision/V1/WebDetection.php | 51 + .../V1/AddProductToProductSetRequest.php | 140 + .../Cloud/Vision/V1/AnnotateFileRequest.php | 225 + .../Cloud/Vision/V1/AnnotateFileResponse.php | 198 + .../Cloud/Vision/V1/AnnotateImageRequest.php | 156 + .../Cloud/Vision/V1/AnnotateImageResponse.php | 617 ++ .../Vision/V1/AsyncAnnotateFileRequest.php | 199 + .../Vision/V1/AsyncAnnotateFileResponse.php | 77 + .../V1/AsyncBatchAnnotateFilesRequest.php | 193 + .../V1/AsyncBatchAnnotateFilesResponse.php | 71 + .../V1/AsyncBatchAnnotateImagesRequest.php | 238 + .../V1/AsyncBatchAnnotateImagesResponse.php | 77 + .../Vision/V1/BatchAnnotateFilesRequest.php | 197 + .../Vision/V1/BatchAnnotateFilesResponse.php | 71 + .../Vision/V1/BatchAnnotateImagesRequest.php | 192 + .../Vision/V1/BatchAnnotateImagesResponse.php | 67 + .../Vision/V1/BatchOperationMetadata.php | 165 + .../V1/BatchOperationMetadata/State.php | 81 + .../src/Google/Cloud/Vision/V1/Block.php | 279 + .../Cloud/Vision/V1/Block/BlockType.php | 85 + .../Google/Cloud/Vision/V1/BoundingPoly.php | 101 + .../src/Google/Cloud/Vision/V1/ColorInfo.php | 150 + .../Cloud/Vision/V1/CreateProductRequest.php | 189 + .../Vision/V1/CreateProductSetRequest.php | 184 + .../Vision/V1/CreateReferenceImageRequest.php | 199 + .../src/Google/Cloud/Vision/V1/CropHint.php | 153 + .../Cloud/Vision/V1/CropHintsAnnotation.php | 67 + .../Cloud/Vision/V1/CropHintsParams.php | 87 + .../Cloud/Vision/V1/DeleteProductRequest.php | 92 + .../Vision/V1/DeleteProductSetRequest.php | 92 + .../Vision/V1/DeleteReferenceImageRequest.php | 92 + .../Vision/V1/DominantColorsAnnotation.php | 67 + .../Cloud/Vision/V1/EntityAnnotation.php | 422 + .../Google/Cloud/Vision/V1/FaceAnnotation.php | 627 ++ .../Vision/V1/FaceAnnotation/Landmark.php | 114 + .../V1/FaceAnnotation/Landmark/Type.php | 305 + .../src/Google/Cloud/Vision/V1/Feature.php | 153 + .../Google/Cloud/Vision/V1/Feature/Type.php | 139 + .../Google/Cloud/Vision/V1/GcsDestination.php | 135 + .../src/Google/Cloud/Vision/V1/GcsSource.php | 71 + .../Cloud/Vision/V1/GetProductRequest.php | 92 + .../Cloud/Vision/V1/GetProductSetRequest.php | 92 + .../Vision/V1/GetReferenceImageRequest.php | 92 + .../src/Google/Cloud/Vision/V1/Image.php | 135 + .../Vision/V1/ImageAnnotationContext.php | 106 + .../Google/Cloud/Vision/V1/ImageContext.php | 315 + .../Cloud/Vision/V1/ImageProperties.php | 77 + .../Google/Cloud/Vision/V1/ImageSource.php | 169 + .../Vision/V1/ImportProductSetsGcsSource.php | 260 + .../V1/ImportProductSetsInputConfig.php | 78 + .../Vision/V1/ImportProductSetsRequest.php | 133 + .../Vision/V1/ImportProductSetsResponse.php | 122 + .../Google/Cloud/Vision/V1/InputConfig.php | 165 + .../Google/Cloud/Vision/V1/LatLongRect.php | 121 + .../src/Google/Cloud/Vision/V1/Likelihood.php | 83 + .../Vision/V1/ListProductSetsRequest.php | 155 + .../Vision/V1/ListProductSetsResponse.php | 105 + .../V1/ListProductsInProductSetRequest.php | 160 + .../V1/ListProductsInProductSetResponse.php | 105 + .../Cloud/Vision/V1/ListProductsRequest.php | 160 + .../Cloud/Vision/V1/ListProductsResponse.php | 105 + .../Vision/V1/ListReferenceImagesRequest.php | 168 + .../Vision/V1/ListReferenceImagesResponse.php | 135 + .../Vision/V1/LocalizedObjectAnnotation.php | 221 + .../Google/Cloud/Vision/V1/LocationInfo.php | 77 + .../Cloud/Vision/V1/NormalizedVertex.php | 103 + .../Cloud/Vision/V1/OperationMetadata.php | 155 + .../Vision/V1/OperationMetadata/State.php | 78 + .../Google/Cloud/Vision/V1/OutputConfig.php | 143 + .../proto/src/Google/Cloud/Vision/V1/Page.php | 221 + .../src/Google/Cloud/Vision/V1/Paragraph.php | 245 + .../src/Google/Cloud/Vision/V1/Position.php | 137 + .../src/Google/Cloud/Vision/V1/Product.php | 275 + .../Cloud/Vision/V1/Product/KeyValue.php | 112 + .../Cloud/Vision/V1/ProductSearchParams.php | 243 + .../Cloud/Vision/V1/ProductSearchResults.php | 165 + .../V1/ProductSearchResults/GroupedResult.php | 149 + .../ProductSearchResults/ObjectAnnotation.php | 180 + .../Vision/V1/ProductSearchResults/Result.php | 156 + .../src/Google/Cloud/Vision/V1/ProductSet.php | 231 + .../Cloud/Vision/V1/ProductSetPurgeConfig.php | 75 + .../src/Google/Cloud/Vision/V1/Property.php | 135 + .../Cloud/Vision/V1/PurgeProductsRequest.php | 203 + .../Google/Cloud/Vision/V1/ReferenceImage.php | 176 + .../V1/RemoveProductFromProductSetRequest.php | 145 + .../Cloud/Vision/V1/SafeSearchAnnotation.php | 241 + .../src/Google/Cloud/Vision/V1/Symbol.php | 245 + .../Google/Cloud/Vision/V1/TextAnnotation.php | 108 + .../V1/TextAnnotation/DetectedBreak.php | 104 + .../DetectedBreak/BreakType.php | 86 + .../V1/TextAnnotation/DetectedLanguage.php | 112 + .../Vision/V1/TextAnnotation/TextProperty.php | 114 + .../Cloud/Vision/V1/TextDetectionParams.php | 130 + .../Cloud/Vision/V1/UpdateProductRequest.php | 161 + .../Vision/V1/UpdateProductSetRequest.php | 151 + .../src/Google/Cloud/Vision/V1/Vertex.php | 102 + .../Google/Cloud/Vision/V1/WebDetection.php | 253 + .../Vision/V1/WebDetection/WebEntity.php | 142 + .../Cloud/Vision/V1/WebDetection/WebImage.php | 104 + .../Cloud/Vision/V1/WebDetection/WebLabel.php | 112 + .../Cloud/Vision/V1/WebDetection/WebPage.php | 222 + .../Cloud/Vision/V1/WebDetectionParams.php | 72 + .../proto/src/Google/Cloud/Vision/V1/Word.php | 249 + .../async_batch_annotate_files.php | 77 + .../async_batch_annotate_images.php | 83 + .../batch_annotate_files.php | 66 + .../batch_annotate_images.php | 60 + .../add_product_to_product_set.php | 86 + .../V1/ProductSearchClient/create_product.php | 83 + .../create_product_set.php | 80 + .../create_reference_image.php | 100 + .../V1/ProductSearchClient/delete_product.php | 76 + .../delete_product_set.php | 75 + .../delete_reference_image.php | 83 + .../V1/ProductSearchClient/get_product.php | 78 + .../ProductSearchClient/get_product_set.php | 78 + .../get_reference_image.php | 83 + .../import_product_sets.php | 98 + .../ProductSearchClient/list_product_sets.php | 83 + .../V1/ProductSearchClient/list_products.php | 83 + .../list_products_in_product_set.php | 85 + .../list_reference_images.php | 85 + .../V1/ProductSearchClient/purge_products.php | 105 + .../remove_product_from_product_set.php | 82 + .../V1/ProductSearchClient/update_product.php | 73 + .../update_product_set.php | 66 + .../V1/src/V1/Client/ImageAnnotatorClient.php | 387 + .../V1/src/V1/Client/ProductSearchClient.php | 988 ++ .../V1/Gapic/ImageAnnotatorGapicClient.php | 667 ++ .../src/V1/Gapic/ProductSearchGapicClient.php | 1603 ++++ .../Vision/V1/src/V1/ImageAnnotatorClient.php | 34 + .../Vision/V1/src/V1/ProductSearchClient.php | 34 + .../Vision/V1/src/V1/gapic_metadata.json | 142 + .../image_annotator_client_config.json | 55 + .../image_annotator_descriptor_config.php | 93 + .../image_annotator_rest_client_config.php | 152 + .../product_search_client_config.json | 140 + .../product_search_descriptor_config.php | 310 + .../product_search_rest_client_config.php | 276 + .../V1/Client/ImageAnnotatorClientTest.php | 509 + .../V1/Client/ProductSearchClientTest.php | 1540 +++ .../Unit/V1/ImageAnnotatorClientTest.php | 423 + .../tests/Unit/V1/ProductSearchClientTest.php | 1403 +++ .../Cloud/Vmmigration/V1/Vmmigration.php | Bin 0 -> 37746 bytes .../Cloud/VMMigration/V1/AdaptingOSStep.php | 33 + .../V1/AddGroupMigrationRequest.php | 115 + .../V1/AddGroupMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/ApplianceVersion.php | 169 + .../Cloud/VMMigration/V1/AppliedLicense.php | 101 + .../VMMigration/V1/AppliedLicense/Type.php | 71 + .../Cloud/VMMigration/V1/AvailableUpdates.php | 137 + .../Cloud/VMMigration/V1/AwsSecurityGroup.php | 101 + .../Cloud/VMMigration/V1/AwsSourceDetails.php | 348 + .../AwsSourceDetails/AccessKeyCredentials.php | 104 + .../VMMigration/V1/AwsSourceDetails/State.php | 74 + .../VMMigration/V1/AwsSourceDetails/Tag.php | 104 + .../VMMigration/V1/AwsSourceVmDetails.php | 101 + .../V1/AwsSourceVmDetails/Firmware.php | 64 + .../Cloud/VMMigration/V1/AwsVmDetails.php | 645 ++ .../V1/AwsVmDetails/BootOption.php | 64 + .../V1/AwsVmDetails/PowerState.php | 79 + .../V1/AwsVmDetails/VmArchitecture.php | 78 + .../V1/AwsVmDetails/VmVirtualizationType.php | 64 + .../Cloud/VMMigration/V1/AwsVmsDetails.php | 67 + .../VMMigration/V1/CancelCloneJobRequest.php | 81 + .../VMMigration/V1/CancelCloneJobResponse.php | 33 + .../V1/CancelCutoverJobRequest.php | 81 + .../V1/CancelCutoverJobResponse.php | 33 + .../Google/Cloud/VMMigration/V1/CloneJob.php | 370 + .../Cloud/VMMigration/V1/CloneJob/State.php | 100 + .../Google/Cloud/VMMigration/V1/CloneStep.php | 229 + .../V1/ComputeEngineBootOption.php | 61 + .../VMMigration/V1/ComputeEngineDiskType.php | 69 + .../V1/ComputeEngineLicenseType.php | 61 + .../V1/ComputeEngineTargetDefaults.php | 674 ++ .../V1/ComputeEngineTargetDetails.php | 670 ++ .../VMMigration/V1/ComputeScheduling.php | 206 + .../ComputeScheduling/OnHostMaintenance.php | 62 + .../V1/ComputeScheduling/RestartType.php | 67 + .../VMMigration/V1/CreateCloneJobRequest.php | 237 + .../V1/CreateCutoverJobRequest.php | 237 + .../V1/CreateDatacenterConnectorRequest.php | 252 + .../VMMigration/V1/CreateGroupRequest.php | 237 + .../V1/CreateMigratingVmRequest.php | 237 + .../VMMigration/V1/CreateSourceRequest.php | 237 + .../V1/CreateTargetProjectRequest.php | 237 + .../V1/CreateUtilizationReportRequest.php | 258 + .../Cloud/VMMigration/V1/CutoverJob.php | 435 + .../Cloud/VMMigration/V1/CutoverJob/State.php | 100 + .../Cloud/VMMigration/V1/CutoverStep.php | 295 + .../Google/Cloud/VMMigration/V1/CycleStep.php | 229 + .../VMMigration/V1/DatacenterConnector.php | 620 ++ .../V1/DatacenterConnector/State.php | 81 + .../V1/DeleteDatacenterConnectorRequest.php | 155 + .../VMMigration/V1/DeleteGroupRequest.php | 155 + .../V1/DeleteMigratingVmRequest.php | 81 + .../VMMigration/V1/DeleteSourceRequest.php | 155 + .../V1/DeleteTargetProjectRequest.php | 155 + .../V1/DeleteUtilizationReportRequest.php | 155 + .../VMMigration/V1/FetchInventoryRequest.php | 120 + .../VMMigration/V1/FetchInventoryResponse.php | 157 + .../V1/FinalizeMigrationRequest.php | 81 + .../V1/FinalizeMigrationResponse.php | 33 + .../VMMigration/V1/GetCloneJobRequest.php | 81 + .../VMMigration/V1/GetCutoverJobRequest.php | 81 + .../V1/GetDatacenterConnectorRequest.php | 81 + .../Cloud/VMMigration/V1/GetGroupRequest.php | 81 + .../VMMigration/V1/GetMigratingVmRequest.php | 115 + .../V1/GetReplicationCycleRequest.php | 81 + .../Cloud/VMMigration/V1/GetSourceRequest.php | 81 + .../V1/GetTargetProjectRequest.php | 81 + .../V1/GetUtilizationReportRequest.php | 119 + .../src/Google/Cloud/VMMigration/V1/Group.php | 224 + .../V1/InitializingReplicationStep.php | 33 + .../V1/InstantiatingMigratedVMStep.php | 33 + .../VMMigration/V1/ListCloneJobsRequest.php | 241 + .../VMMigration/V1/ListCloneJobsResponse.php | 139 + .../VMMigration/V1/ListCutoverJobsRequest.php | 241 + .../V1/ListCutoverJobsResponse.php | 139 + .../V1/ListDatacenterConnectorsRequest.php | 245 + .../V1/ListDatacenterConnectorsResponse.php | 139 + .../VMMigration/V1/ListGroupsRequest.php | 241 + .../VMMigration/V1/ListGroupsResponse.php | 139 + .../V1/ListMigratingVmsRequest.php | 275 + .../V1/ListMigratingVmsResponse.php | 139 + .../V1/ListReplicationCyclesRequest.php | 241 + .../V1/ListReplicationCyclesResponse.php | 139 + .../VMMigration/V1/ListSourcesRequest.php | 241 + .../VMMigration/V1/ListSourcesResponse.php | 139 + .../V1/ListTargetProjectsRequest.php | 241 + .../V1/ListTargetProjectsResponse.php | 139 + .../V1/ListUtilizationReportsRequest.php | 279 + .../V1/ListUtilizationReportsResponse.php | 139 + .../Cloud/VMMigration/V1/MigratingVm.php | 796 ++ .../VMMigration/V1/MigratingVm/State.php | 133 + .../Cloud/VMMigration/V1/MigratingVmView.php | 63 + .../Cloud/VMMigration/V1/MigrationError.php | 239 + .../V1/MigrationError/ErrorCode.php | 115 + .../Cloud/VMMigration/V1/NetworkInterface.php | 177 + .../VMMigration/V1/OperationMetadata.php | 307 + .../VMMigration/V1/PauseMigrationRequest.php | 67 + .../VMMigration/V1/PauseMigrationResponse.php | 33 + .../VMMigration/V1/PostProcessingStep.php | 33 + .../VMMigration/V1/PreparingVMDisksStep.php | 33 + .../V1/RemoveGroupMigrationRequest.php | 115 + .../V1/RemoveGroupMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/ReplicatingStep.php | 177 + .../Cloud/VMMigration/V1/ReplicationCycle.php | 393 + .../VMMigration/V1/ReplicationCycle/State.php | 79 + .../Cloud/VMMigration/V1/ReplicationSync.php | 81 + .../VMMigration/V1/ResumeMigrationRequest.php | 67 + .../V1/ResumeMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/SchedulePolicy.php | 119 + .../VMMigration/V1/SchedulingNodeAffinity.php | 141 + .../V1/SchedulingNodeAffinity/Operator.php | 65 + .../V1/ShuttingDownSourceVMStep.php | 33 + .../Google/Cloud/VMMigration/V1/Source.php | 299 + .../VMMigration/V1/StartMigrationRequest.php | 81 + .../VMMigration/V1/StartMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/TargetProject.php | 228 + .../VMMigration/V1/UpdateGroupRequest.php | 230 + .../V1/UpdateMigratingVmRequest.php | 230 + .../VMMigration/V1/UpdateSourceRequest.php | 230 + .../V1/UpdateTargetProjectRequest.php | 230 + .../V1/UpgradeApplianceRequest.php | 141 + .../V1/UpgradeApplianceResponse.php | 33 + .../Cloud/VMMigration/V1/UpgradeStatus.php | 223 + .../VMMigration/V1/UpgradeStatus/State.php | 71 + .../VMMigration/V1/UtilizationReport.php | 446 + .../V1/UtilizationReport/State.php | 71 + .../V1/UtilizationReport/TimeFrame.php | 71 + .../VMMigration/V1/UtilizationReportView.php | 64 + .../VMMigration/V1/VmUtilizationInfo.php | 153 + .../VMMigration/V1/VmUtilizationMetrics.php | 313 + .../VMMigration/V1/VmwareSourceDetails.php | 174 + .../Cloud/VMMigration/V1/VmwareVmDetails.php | 453 + .../V1/VmwareVmDetails/BootOption.php | 64 + .../V1/VmwareVmDetails/PowerState.php | 71 + .../Cloud/VMMigration/V1/VmwareVmsDetails.php | 67 + .../VmMigrationClient/add_group_migration.php | 83 + .../V1/VmMigrationClient/cancel_clone_job.php | 89 + .../VmMigrationClient/cancel_cutover_job.php | 89 + .../V1/VmMigrationClient/create_clone_job.php | 93 + .../VmMigrationClient/create_cutover_job.php | 95 + .../create_datacenter_connector.php | 93 + .../V1/VmMigrationClient/create_group.php | 88 + .../VmMigrationClient/create_migrating_vm.php | 88 + .../V1/VmMigrationClient/create_source.php | 88 + .../create_target_project.php | 91 + .../create_utilization_report.php | 95 + .../delete_datacenter_connector.php | 85 + .../V1/VmMigrationClient/delete_group.php | 80 + .../VmMigrationClient/delete_migrating_vm.php | 85 + .../V1/VmMigrationClient/delete_source.php | 80 + .../delete_target_project.php | 87 + .../delete_utilization_report.php | 85 + .../V1/VmMigrationClient/fetch_inventory.php | 75 + .../VmMigrationClient/finalize_migration.php | 89 + .../V1/VmMigrationClient/get_clone_job.php | 77 + .../V1/VmMigrationClient/get_cutover_job.php | 77 + .../get_datacenter_connector.php | 76 + .../V1/VmMigrationClient/get_group.php | 71 + .../V1/VmMigrationClient/get_location.php | 57 + .../V1/VmMigrationClient/get_migrating_vm.php | 76 + .../get_replication_cycle.php | 77 + .../V1/VmMigrationClient/get_source.php | 71 + .../VmMigrationClient/get_target_project.php | 78 + .../get_utilization_report.php | 76 + .../V1/VmMigrationClient/list_clone_jobs.php | 87 + .../VmMigrationClient/list_cutover_jobs.php | 87 + .../list_datacenter_connectors.php | 82 + .../V1/VmMigrationClient/list_groups.php | 82 + .../V1/VmMigrationClient/list_locations.php | 62 + .../VmMigrationClient/list_migrating_vms.php | 82 + .../list_replication_cycles.php | 87 + .../V1/VmMigrationClient/list_sources.php | 82 + .../list_target_projects.php | 85 + .../list_utilization_reports.php | 82 + .../V1/VmMigrationClient/pause_migration.php | 90 + .../remove_group_migration.php | 83 + .../V1/VmMigrationClient/resume_migration.php | 91 + .../V1/VmMigrationClient/start_migration.php | 89 + .../V1/VmMigrationClient/update_group.php | 71 + .../VmMigrationClient/update_migrating_vm.php | 71 + .../V1/VmMigrationClient/update_source.php | 71 + .../update_target_project.php | 74 + .../VmMigrationClient/upgrade_appliance.php | 89 + .../v1/src/V1/Client/VmMigrationClient.php | 1847 ++++ .../VmMigration/v1/src/V1/gapic_metadata.json | 258 + .../resources/vm_migration_client_config.json | 292 + .../vm_migration_descriptor_config.php | 891 ++ .../vm_migration_rest_client_config.php | 682 ++ .../Unit/V1/Client/VmMigrationClientTest.php | 5156 ++++++++++ .../Cloud/Vmwareengine/V1/Vmwareengine.php | Bin 0 -> 34481 bytes .../Vmwareengine/V1/VmwareengineResources.php | Bin 0 -> 16539 bytes .../VmwareEngine/V1/AutoscalingSettings.php | 240 + .../AutoscalingSettings/AutoscalingPolicy.php | 305 + .../V1/AutoscalingSettings/Thresholds.php | 105 + .../Google/Cloud/VmwareEngine/V1/Cluster.php | 411 + .../Cloud/VmwareEngine/V1/Cluster/State.php | 87 + .../VmwareEngine/V1/CreateClusterRequest.php | 306 + .../V1/CreateExternalAccessRuleRequest.php | 313 + .../V1/CreateExternalAddressRequest.php | 313 + .../V1/CreateHcxActivationKeyRequest.php | 313 + .../V1/CreateLoggingServerRequest.php | 313 + .../CreateManagementDnsZoneBindingRequest.php | 317 + .../V1/CreateNetworkPeeringRequest.php | 308 + .../V1/CreateNetworkPolicyRequest.php | 318 + .../V1/CreatePrivateCloudRequest.php | 306 + .../V1/CreatePrivateConnectionRequest.php | 308 + .../V1/CreateVmwareEngineNetworkRequest.php | 333 + .../Cloud/VmwareEngine/V1/Credentials.php | 101 + .../VmwareEngine/V1/DeleteClusterRequest.php | 140 + .../V1/DeleteExternalAccessRuleRequest.php | 180 + .../V1/DeleteExternalAddressRequest.php | 180 + .../V1/DeleteLoggingServerRequest.php | 180 + .../DeleteManagementDnsZoneBindingRequest.php | 180 + .../V1/DeleteNetworkPeeringRequest.php | 180 + .../V1/DeleteNetworkPolicyRequest.php | 180 + .../V1/DeletePrivateCloudRequest.php | 262 + .../V1/DeletePrivateConnectionRequest.php | 180 + .../V1/DeleteVmwareEngineNetworkRequest.php | 226 + .../VmwareEngine/V1/DnsBindPermission.php | 130 + .../Cloud/VmwareEngine/V1/DnsForwarding.php | 207 + .../V1/DnsForwarding/ForwardingRule.php | 107 + .../VmwareEngine/V1/ExternalAccessRule.php | 620 ++ .../V1/ExternalAccessRule/Action.php | 65 + .../V1/ExternalAccessRule/IpRange.php | 159 + .../V1/ExternalAccessRule/State.php | 78 + .../Cloud/VmwareEngine/V1/ExternalAddress.php | 342 + .../VmwareEngine/V1/ExternalAddress/State.php | 78 + ...hNetworkPolicyExternalAddressesRequest.php | 202 + ...NetworkPolicyExternalAddressesResponse.php | 110 + .../VmwareEngine/V1/GetClusterRequest.php | 102 + .../V1/GetDnsBindPermissionRequest.php | 107 + .../V1/GetDnsForwardingRequest.php | 102 + .../V1/GetExternalAccessRuleRequest.php | 102 + .../V1/GetExternalAddressRequest.php | 102 + .../V1/GetHcxActivationKeyRequest.php | 101 + .../V1/GetLoggingServerRequest.php | 102 + .../V1/GetManagementDnsZoneBindingRequest.php | 102 + .../V1/GetNetworkPeeringRequest.php | 102 + .../V1/GetNetworkPolicyRequest.php | 102 + .../Cloud/VmwareEngine/V1/GetNodeRequest.php | 92 + .../VmwareEngine/V1/GetNodeTypeRequest.php | 102 + .../V1/GetPrivateCloudRequest.php | 102 + .../V1/GetPrivateConnectionRequest.php | 102 + .../VmwareEngine/V1/GetSubnetRequest.php | 102 + .../V1/GetVmwareEngineNetworkRequest.php | 102 + .../V1/GrantDnsBindPermissionRequest.php | 241 + .../src/Google/Cloud/VmwareEngine/V1/Hcx.php | 169 + .../Cloud/VmwareEngine/V1/Hcx/State.php | 71 + .../VmwareEngine/V1/HcxActivationKey.php | 236 + .../V1/HcxActivationKey/State.php | 71 + .../VmwareEngine/V1/ListClustersRequest.php | 322 + .../VmwareEngine/V1/ListClustersResponse.php | 144 + .../V1/ListExternalAccessRulesRequest.php | 366 + .../V1/ListExternalAccessRulesResponse.php | 144 + .../V1/ListExternalAddressesRequest.php | 367 + .../V1/ListExternalAddressesResponse.php | 144 + .../V1/ListHcxActivationKeysRequest.php | 203 + .../V1/ListHcxActivationKeysResponse.php | 144 + .../V1/ListLoggingServersRequest.php | 371 + .../V1/ListLoggingServersResponse.php | 144 + .../ListManagementDnsZoneBindingsRequest.php | 371 + .../ListManagementDnsZoneBindingsResponse.php | 144 + .../V1/ListNetworkPeeringsRequest.php | 357 + .../V1/ListNetworkPeeringsResponse.php | 140 + .../V1/ListNetworkPoliciesRequest.php | 361 + .../V1/ListNetworkPoliciesResponse.php | 144 + .../VmwareEngine/V1/ListNodeTypesRequest.php | 312 + .../VmwareEngine/V1/ListNodeTypesResponse.php | 144 + .../VmwareEngine/V1/ListNodesRequest.php | 198 + .../VmwareEngine/V1/ListNodesResponse.php | 106 + .../V1/ListPeeringRoutesRequest.php | 239 + .../V1/ListPeeringRoutesResponse.php | 106 + .../V1/ListPrivateCloudsRequest.php | 362 + .../V1/ListPrivateCloudsResponse.php | 144 + ...tPrivateConnectionPeeringRoutesRequest.php | 189 + ...PrivateConnectionPeeringRoutesResponse.php | 106 + .../V1/ListPrivateConnectionsRequest.php | 357 + .../V1/ListPrivateConnectionsResponse.php | 140 + .../VmwareEngine/V1/ListSubnetsRequest.php | 199 + .../VmwareEngine/V1/ListSubnetsResponse.php | 144 + .../V1/ListVmwareEngineNetworksRequest.php | 357 + .../V1/ListVmwareEngineNetworksResponse.php | 140 + .../VmwareEngine/V1/LocationMetadata.php | 69 + .../V1/LocationMetadata/Capability.php | 58 + .../Cloud/VmwareEngine/V1/LoggingServer.php | 349 + .../V1/LoggingServer/Protocol.php | 86 + .../V1/LoggingServer/SourceType.php | 64 + .../V1/ManagementDnsZoneBinding.php | 370 + .../V1/ManagementDnsZoneBinding/State.php | 86 + .../Cloud/VmwareEngine/V1/NetworkConfig.php | 260 + .../Cloud/VmwareEngine/V1/NetworkPeering.php | 775 ++ .../V1/NetworkPeering/PeerNetworkType.php | 104 + .../VmwareEngine/V1/NetworkPeering/State.php | 78 + .../Cloud/VmwareEngine/V1/NetworkPolicy.php | 470 + .../V1/NetworkPolicy/NetworkService.php | 112 + .../V1/NetworkPolicy/NetworkService/State.php | 72 + .../src/Google/Cloud/VmwareEngine/V1/Node.php | 299 + .../Cloud/VmwareEngine/V1/Node/State.php | 78 + .../Google/Cloud/VmwareEngine/V1/NodeType.php | 439 + .../VmwareEngine/V1/NodeType/Capability.php | 58 + .../Cloud/VmwareEngine/V1/NodeType/Kind.php | 64 + .../Cloud/VmwareEngine/V1/NodeTypeConfig.php | 113 + .../src/Google/Cloud/VmwareEngine/V1/Nsx.php | 169 + .../Cloud/VmwareEngine/V1/Nsx/State.php | 64 + .../VmwareEngine/V1/OperationMetadata.php | 311 + .../Cloud/VmwareEngine/V1/PeeringRoute.php | 273 + .../V1/PeeringRoute/Direction.php | 64 + .../VmwareEngine/V1/PeeringRoute/Type.php | 72 + .../Cloud/VmwareEngine/V1/Principal.php | 109 + .../Cloud/VmwareEngine/V1/PrivateCloud.php | 637 ++ .../V1/PrivateCloud/ManagementCluster.php | 184 + .../VmwareEngine/V1/PrivateCloud/State.php | 94 + .../VmwareEngine/V1/PrivateCloud/Type.php | 68 + .../VmwareEngine/V1/PrivateConnection.php | 604 ++ .../V1/PrivateConnection/PeeringState.php | 66 + .../V1/PrivateConnection/RoutingMode.php | 68 + .../V1/PrivateConnection/State.php | 93 + .../V1/PrivateConnection/Type.php | 79 + .../RepairManagementDnsZoneBindingRequest.php | 179 + .../V1/ResetNsxCredentialsRequest.php | 185 + .../V1/ResetVcenterCredentialsRequest.php | 251 + .../V1/RevokeDnsBindPermissionRequest.php | 241 + .../V1/ShowNsxCredentialsRequest.php | 107 + .../V1/ShowVcenterCredentialsRequest.php | 177 + .../V1/StretchedClusterConfig.php | 133 + .../Google/Cloud/VmwareEngine/V1/Subnet.php | 262 + .../Cloud/VmwareEngine/V1/Subnet/State.php | 93 + .../V1/UndeletePrivateCloudRequest.php | 140 + .../VmwareEngine/V1/UpdateClusterRequest.php | 233 + .../V1/UpdateDnsForwardingRequest.php | 235 + .../V1/UpdateExternalAccessRuleRequest.php | 235 + .../V1/UpdateExternalAddressRequest.php | 235 + .../V1/UpdateLoggingServerRequest.php | 235 + .../UpdateManagementDnsZoneBindingRequest.php | 235 + .../V1/UpdateNetworkPeeringRequest.php | 235 + .../V1/UpdateNetworkPolicyRequest.php | 235 + .../V1/UpdatePrivateCloudRequest.php | 195 + .../V1/UpdatePrivateConnectionRequest.php | 235 + .../VmwareEngine/V1/UpdateSubnetRequest.php | 157 + .../V1/UpdateVmwareEngineNetworkRequest.php | 240 + .../Google/Cloud/VmwareEngine/V1/Vcenter.php | 169 + .../Cloud/VmwareEngine/V1/Vcenter/State.php | 64 + .../VmwareEngine/V1/VmwareEngineNetwork.php | 396 + .../V1/VmwareEngineNetwork/State.php | 78 + .../V1/VmwareEngineNetwork/Type.php | 66 + .../V1/VmwareEngineNetwork/VpcNetwork.php | 117 + .../VmwareEngineNetwork/VpcNetwork/Type.php | 76 + .../V1/VmwareEngineClient/create_cluster.php | 111 + .../create_external_access_rule.php | 109 + .../create_external_address.php | 109 + .../create_hcx_activation_key.php | 108 + .../create_logging_server.php | 136 + .../create_management_dns_zone_binding.php | 116 + .../create_network_peering.php | 140 + .../create_network_policy.php | 115 + .../create_private_cloud.php | 139 + .../create_private_connection.php | 150 + .../create_vmware_engine_network.php | 118 + .../V1/VmwareEngineClient/delete_cluster.php | 92 + .../delete_external_access_rule.php | 89 + .../delete_external_address.php | 91 + .../delete_logging_server.php | 89 + .../delete_management_dns_zone_binding.php | 91 + .../delete_network_peering.php | 91 + .../delete_network_policy.php | 90 + .../delete_private_cloud.php | 101 + .../delete_private_connection.php | 90 + .../delete_vmware_engine_network.php | 91 + ...etch_network_policy_external_addresses.php | 85 + .../V1/VmwareEngineClient/get_cluster.php | 80 + .../get_dns_bind_permission.php | 78 + .../VmwareEngineClient/get_dns_forwarding.php | 79 + .../get_external_access_rule.php | 80 + .../get_external_address.php | 80 + .../get_hcx_activation_key.php | 80 + .../V1/VmwareEngineClient/get_iam_policy.php | 72 + .../V1/VmwareEngineClient/get_location.php | 57 + .../VmwareEngineClient/get_logging_server.php | 80 + .../get_management_dns_zone_binding.php | 80 + .../get_network_peering.php | 82 + .../VmwareEngineClient/get_network_policy.php | 79 + .../V1/VmwareEngineClient/get_node.php | 79 + .../V1/VmwareEngineClient/get_node_type.php | 75 + .../VmwareEngineClient/get_private_cloud.php | 75 + .../get_private_connection.php | 81 + .../V1/VmwareEngineClient/get_subnet.php | 80 + .../get_vmware_engine_network.php | 82 + .../grant_dns_bind_permission.php | 94 + .../V1/VmwareEngineClient/list_clusters.php | 84 + .../list_external_access_rules.php | 84 + .../list_external_addresses.php | 86 + .../list_hcx_activation_keys.php | 85 + .../V1/VmwareEngineClient/list_locations.php | 62 + .../list_logging_servers.php | 86 + .../list_management_dns_zone_bindings.php | 85 + .../list_network_peerings.php | 80 + .../list_network_policies.php | 79 + .../V1/VmwareEngineClient/list_node_types.php | 80 + .../V1/VmwareEngineClient/list_nodes.php | 85 + .../list_peering_routes.php | 84 + .../list_private_clouds.php | 80 + ...list_private_connection_peering_routes.php | 83 + .../list_private_connections.php | 79 + .../V1/VmwareEngineClient/list_subnets.php | 85 + .../list_vmware_engine_networks.php | 79 + .../repair_management_dns_zone_binding.php | 93 + .../reset_nsx_credentials.php | 92 + .../reset_vcenter_credentials.php | 92 + .../revoke_dns_bind_permission.php | 93 + .../V1/VmwareEngineClient/set_iam_policy.php | 77 + .../show_nsx_credentials.php | 80 + .../show_vcenter_credentials.php | 80 + .../test_iam_permissions.php | 84 + .../undelete_private_cloud.php | 90 + .../V1/VmwareEngineClient/update_cluster.php | 82 + .../update_dns_forwarding.php | 101 + .../update_external_access_rule.php | 75 + .../update_external_address.php | 80 + .../update_logging_server.php | 110 + .../update_management_dns_zone_binding.php | 75 + .../update_network_peering.php | 118 + .../update_network_policy.php | 101 + .../update_private_cloud.php | 118 + .../update_private_connection.php | 129 + .../V1/VmwareEngineClient/update_subnet.php | 79 + .../update_vmware_engine_network.php | 90 + .../v1/src/V1/Client/VmwareEngineClient.php | 2997 ++++++ .../v1/src/V1/gapic_metadata.json | 413 + .../vmware_engine_client_config.json | 449 + .../vmware_engine_descriptor_config.php | 1430 +++ .../vmware_engine_rest_client_config.php | 1083 +++ .../Unit/V1/Client/VmwareEngineClientTest.php | 8496 +++++++++++++++++ .../Google/Cloud/Vpcaccess/V1/VpcAccess.php | Bin 0 -> 3596 bytes .../Google/Cloud/VpcAccess/V1/Connector.php | 421 + .../Cloud/VpcAccess/V1/Connector/State.php | 85 + .../Cloud/VpcAccess/V1/Connector/Subnet.php | 124 + .../VpcAccess/V1/CreateConnectorRequest.php | 168 + .../VpcAccess/V1/DeleteConnectorRequest.php | 81 + .../VpcAccess/V1/GetConnectorRequest.php | 81 + .../VpcAccess/V1/ListConnectorsRequest.php | 149 + .../VpcAccess/V1/ListConnectorsResponse.php | 101 + .../Cloud/VpcAccess/V1/OperationMetadata.php | 197 + .../create_connector.php | 89 + .../delete_connector.php | 81 + .../VpcAccessServiceClient/get_connector.php | 72 + .../list_connectors.php | 76 + .../VpcAccessServiceClient/list_locations.php | 62 + .../src/V1/Client/VpcAccessServiceClient.php | 428 + .../VpcAccess/v1/src/V1/gapic_metadata.json | 43 + .../vpc_access_service_client_config.json | 70 + .../vpc_access_service_descriptor_config.php | 123 + .../vpc_access_service_rest_client_config.php | 114 + .../V1/Client/VpcAccessServiceClientTest.php | 646 ++ 2409 files changed, 428413 insertions(+) create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlOperations.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php create mode 100644 owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/GPBMetadata/Google/Cloud/Storageinsights/V1/Storageinsights.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php create mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_location.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_locations.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php create mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php create mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php create mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json create mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php create mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php create mode 100644 owl-bot-staging/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/TransferTypes.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php create mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php create mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php create mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json create mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php create mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php create mode 100644 owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CommentService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Common.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Company.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompletionService.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Event.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Filters.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/JobService.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php create mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/create_company.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php create mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php create mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php create mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php create mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php create mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php create mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php create mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Queue.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Target.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Task.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php create mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_location.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_locations.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php create mode 100644 owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php create mode 100644 owl-bot-staging/Tasks/v2/src/V2/CloudTasksClient.php create mode 100644 owl-bot-staging/Tasks/v2/src/V2/Gapic/CloudTasksGapicClient.php create mode 100644 owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json create mode 100644 owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php create mode 100644 owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php create mode 100644 owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php create mode 100644 owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Cloudtasks.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Target.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php create mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php create mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php create mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/Gapic/CloudTasksGapicClient.php create mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json create mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json create mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php create mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php create mode 100644 owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Target.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Task.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php create mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php create mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php create mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/Gapic/CloudTasksGapicClient.php create mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json create mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json create mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php create mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php create mode 100644 owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/GPBMetadata/Google/Cloud/Telcoautomation/V1/Telcoautomation.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_location.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_locations.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json create mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php create mode 100644 owl-bot-staging/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTts.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTtsLrs.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php create mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php create mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php create mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php create mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php create mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechLongAudioSynthesizeClient.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_client_config.json create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_descriptor_config.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php create mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php create mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php create mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/GPBMetadata/Google/Cloud/Tpu/V1/CloudTpu.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php create mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php create mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php create mode 100644 owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php create mode 100644 owl-bot-staging/Tpu/v1/src/V1/TpuClient.php create mode 100644 owl-bot-staging/Tpu/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Tpu/v1/src/V1/resources/tpu_client_config.json create mode 100644 owl-bot-staging/Tpu/v1/src/V1/resources/tpu_descriptor_config.php create mode 100644 owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php create mode 100644 owl-bot-staging/Tpu/v1/tests/Unit/V1/TpuClientTest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/GPBMetadata/Google/Cloud/Tpu/V2/CloudTpu.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php create mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_location.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_locations.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php create mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php create mode 100644 owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php create mode 100644 owl-bot-staging/Tpu/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json create mode 100644 owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php create mode 100644 owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php create mode 100644 owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.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/TraceServiceGapicClient.php create mode 100644 owl-bot-staging/Trace/v2/src/V2/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/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AdaptiveMt.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AutomlTranslation.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/Common.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/TranslationService.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php create mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php create mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php create mode 100644 owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php create mode 100644 owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php create mode 100644 owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php create mode 100644 owl-bot-staging/Translate/v3/src/V3/gapic_metadata.json create mode 100644 owl-bot-staging/Translate/v3/src/V3/resources/translation_service_client_config.json create mode 100644 owl-bot-staging/Translate/v3/src/V3/resources/translation_service_descriptor_config.php create mode 100644 owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php create mode 100644 owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php create mode 100644 owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json create mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VodConfigs.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php create mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php create mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php create mode 100644 owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/WebDetection.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php create mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php create mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/ProductSearchClient.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_client_config.json create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_descriptor_config.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php create mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php create mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php create mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php create mode 100644 owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php create mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php create mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php create mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php create mode 100644 owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php create mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php create mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php create mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php create mode 100644 owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php new file mode 100644 index 000000000000..3f0ba3ef12ce --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +Ë +?google/cloud/sql/v1/cloud_sql_available_database_versions.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2A +#SqlAvailableDatabaseVersionsServiceÊAsqladmin.googleapis.comBn +com.google.cloud.sql.v1B&CloudSqlAvailableDatabaseVersionsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php new file mode 100644 index 0000000000000000000000000000000000000000..656eb56e3d78b4771af9b4b025799d3c6be34b5d GIT binary patch literal 3592 zcmbtX&r{o05Uw#8yaeJXKkT8?Msbn`DA>iBHXT#a@ectWi0xoIopd~-k>zJlktHEL zK}gD_ryhFip*^)TJ@?P(smJyo=%If|_dUr%7zdIx2Vy<#e*3*|ceU?*@ujtA!Ci5K z7{pd6>583Wk?s-EvQ28LrY?5eUXR$KYW6KnCw4{@%QdlDYl>32(!7JNj_KMe$&0(D zxvP_`s+(>%>m2CW!xisA#s|5hsQa!Z+pghcI5vQx^oe6BDiJs8#V3R+U4<&`4Gz;T zF_?DaKyN==Sp`sa#c@Qwh-*a-wu4yk3Pk*8xgA|oMTaUB|GTF-vSw&hQ*`YmZfQ;I zDY`=t=DcmsHB_pZhR7UhhDzoaL=ThM-m^@UU`-sbsxwtkk#@zP#5NSYT_%odYZf)_ zI-2J5yMzW>vX%J-KP-dOdg8ptF`qw2a!sVROTy7b(I(WjjaAN@0h|QC+9Nb8SX#Sa z7$#G}G@N|?bWf)cuX8Nv8ZqeG`K)V1?-t3Pa;Ta1o4bZ{>m?d@)vXbwD!%a1ibXN7JzNYOgh^n4&HllTGreiO29SU1nYJktolvqv4qVht z02tG{sfZYvj|vHx(hSrRJ0UfOD{FXVt9Il1sdl9{SbqA5LLJW!A~qB6%{f77}%zs?*td@BHtyLB8DF+cByp^CWvjD zc50HF-W`w%_d}*;u^EG(CW)B}4`G}hTO>7wF0;A&BVEEeG|^bVtaSZPE&`?E=o=S4 zg=@I=PpH7HVPL;ju5rYLH$e1@xIfTT8#^{0F73uBsCiAt?k4FGi+>C>UDe>6K+7FENx58 zO06o_rD~bEPhufo4OV@eDdxu)(J#KZ4Ku+mcy4aP`=JeNRjTFl)Em`8y|GzqB6ZwI zee-#vQYvgG#ui(U2+&Xy-b{Dlb_kFu(tKW*hCpW^UT8IIPYO*g2tMLI%F>fUwVW8s z{S<>6VO*y{>_bf@!Y>hsd1FS%UR-zV9Cv0Q&5iz$2cM60>AS!G{c&tRzW znW_02f~VS*xpt4!pS_!Qc|LH3-y$&1I$2o0T)ohko%?vCc_81JuS5DVr~0|@j#THq z{j-pC4s@m4*9<={9>tst-evwO$a|DpPClDGIyxG9nN?i6=iObFEnT5K)9x=_W{!dI z@WM(z!vhv&NMfK-`zJrPz2HsE!9m9C<585~rjR)nJ4UfOtNd>##wY&6 d2f^`m$-6;>E*xxpXzGZ|2DkJs1t)L<@E@7Re)#|Z literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php new file mode 100644 index 0000000000000000000000000000000000000000..9c37134791ac4c5e96c589d0443ed8cc5a5b30ae GIT binary patch literal 2697 zcmbVO-A?016m9^qy8~sZX+?;(>})^+x{EE+Ri%c~%5g#z2}ne;dr?`kCiWzm;@HMB z0nsfteT4Qw`W{uU+S^`KYTu!^J@(ikgs{6Q7hq=2?{~g)=6v-{&q)&N3Y>KOm(lHgpA%d9I*o0|BCd}r!YrfvwN62;w z=QuuuGea6eZxDu`V9<7%jkzEK{%kUCF^>sGT=qTWa)3L;GlqmHY3^1z=zxqa2ir0f&-v1Yo4H?M_jW^xgD}V_+bM?i^VP#LlC2r?VZGJWR7+4 zwv4e@yc6UB7U6)7ddE1VVi0=!aomxC>*1F<0WdvartW!ugo5w!V(})Y8x!{_8ZM)r zm`>-AQP(Na9=TwC`2MP+g_Tu?f}T>zpee#0R--%s(n8AbAHqCe!ms?FNkbptwL{*XPl6yLG z(TSk9+6nfF!0y|9hbhE~_Rqw)n>x`1cKvC`hjE`pnd z!dePt+B|AHq$G`Bp-=D0jt4NiDe!TLrfEwSM@{q&78ib+Lm%C|j!kF-W>e*t3{vhk zs-mVb-fD=uf(hce&5813^vD}O{_)SxGY86k^ztYD&b2qm*R_@o1vpDTuQgjf=jjYl ze#-zel4ayp^_9JeK}?iQ<1S32BH_;;#aSHY^(nG|$6u~bw<0cPKFj^^tG)`;oj85w zCBeXS=PImIzw1^{h=3P0?eg++>{25G(Ua@bZr~Ep@x%U$cZq|eX#PRr)!1PPI&~F1 zO+umcar_wHP^J-WIE~D=JCYO0Fa~X{>&NRH#0_-?A3=LR{@tFBDgOD^@GX2HH<^*e Q=ia3!mXyoMHM&OVKc*vnPyhe` literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php new file mode 100644 index 000000000000..6832b2da3391 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +„ +-google/cloud/sql/v1/cloud_sql_databases.protogoogle.cloud.sql.v1google/api/client.proto-google/cloud/sql/v1/cloud_sql_resources.proto"P +SqlDatabasesDeleteRequest +database (  +instance (  +project ( "M +SqlDatabasesGetRequest +database (  +instance (  +project ( "k +SqlDatabasesInsertRequest +instance (  +project ( + +bodyd ( 2.google.cloud.sql.v1.Database"< +SqlDatabasesListRequest +instance (  +project ( "} +SqlDatabasesUpdateRequest +database (  +instance (  +project ( + +bodyd ( 2.google.cloud.sql.v1.Database"S +DatabasesListResponse +kind ( , +items ( 2.google.cloud.sql.v1.Database2í +SqlDatabasesService¢ +Delete..google.cloud.sql.v1.SqlDatabasesDeleteRequest.google.cloud.sql.v1.Operation"H‚Óä“B*@/v1/projects/{project}/instances/{instance}/databases/{database}› +Get+.google.cloud.sql.v1.SqlDatabasesGetRequest.google.cloud.sql.v1.Database"H‚Óä“B@/v1/projects/{project}/instances/{instance}/databases/{database} +Insert..google.cloud.sql.v1.SqlDatabasesInsertRequest.google.cloud.sql.v1.Operation"C‚Óä“="5/v1/projects/{project}/instances/{instance}/databases:bodyŸ +List,.google.cloud.sql.v1.SqlDatabasesListRequest*.google.cloud.sql.v1.DatabasesListResponse"=‚Óä“75/v1/projects/{project}/instances/{instance}/databases§ +Patch..google.cloud.sql.v1.SqlDatabasesUpdateRequest.google.cloud.sql.v1.Operation"N‚Óä“H2@/v1/projects/{project}/instances/{instance}/databases/{database}:body¨ +Update..google.cloud.sql.v1.SqlDatabasesUpdateRequest.google.cloud.sql.v1.Operation"N‚Óä“H@/v1/projects/{project}/instances/{instance}/databases/{database}:body|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB^ +com.google.cloud.sql.v1BCloudSqlDatabasesProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php new file mode 100644 index 000000000000..481a3e1354b7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' + +*google/cloud/sql/v1/cloud_sql_events.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2. +SqlEventsServiceÊAsqladmin.googleapis.comB[ +com.google.cloud.sql.v1BCloudSqlEventsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php new file mode 100644 index 0000000000000000000000000000000000000000..74026d821d785d584ed9684ddc6972899b6a5772 GIT binary patch literal 1992 zcmb7FU2hsk6fFkZVW<+aR%A?-YU)NcZsSF!Q6F&K3e18~ZJ@Am6borJECU{8*IvP=qZExZ;hjJa`S{t|8CN^qK^CJiq-jv(4jK`igc4*Odyy>tg zuAJiRF#Kb|A8X{0vCsongj_PA!Y4MxjZXE9N-`vp^cw*||3ne=dsj~X{O|}N+aW^W zU=h~piU$3FFueTfz+pBPl1TV^!i2?KCK++q_t3{N9uY@SV7Q4LOL@8dhJMqPl)J>~*Ql^L^QFf-04?R4)~~p(r&RDIqpxUCS0uYXCs9iMPz35MMg%%a$=5!G_(b7;39pQgsx|?qfyrU_KqX;GFPDU@ z_e=e~+rny5W9MOC+GF&HIF2``LrX}`+_5zy4ycez0a04hQF_AMa4okE6=g~v#MH5> zI-JNao}H_(08hS)@EdpIpP?)V)fw!Z1#d~X%xwl?`5S4faHhj7vEugtnbtl-n^58a zF0fqs&d@y4;(o!=Zd8^kkPMY+?VUUfC8`4jFZWv&=Vx^2S>r@U?Z^c=X;A=>}fa*mS)GTb0a{8_xm-vM(7{WL3}y@ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php new file mode 100644 index 000000000000..80accbd77ab5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +ÿ +0google/cloud/sql/v1/cloud_sql_iam_policies.protogoogle.cloud.sql.v1google/api/client.proto23 +SqlIamPoliciesServiceÊAsqladmin.googleapis.comB` +com.google.cloud.sql.v1BCloudSqlIamPoliciesProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php new file mode 100644 index 000000000000..8867162ecf31 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +­ +2google/cloud/sql/v1/cloud_sql_instance_names.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto25 +SqlInstanceNamesServiceÊAsqladmin.googleapis.comBi +com.google.cloud.sql.v1B!CloudSqlInstanceNamesServiceProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php new file mode 100644 index 0000000000000000000000000000000000000000..c81584bd4fabcb433bd27569a684488d59762815 GIT binary patch literal 22664 zcmcIsTWlOzTHdyEv5#Y?U5S&9ol8$8Gr3G+Cr);DlFUq|Z?=2Vx9Mspla;kaySr@n zrf<_#os1U-1PEA=K)^mAA%u{S79p*Kv|*0h~+vtrq+95Q3ga>KIQ<%$*EEX1>xQ?8bs^3Em)vXdYnJI3erooDwRGghgW zZ9B>z;#t}S#eSYe@n5^UTd!53fbZa+Yc(5-)tp+nUi%LA^I>$aT(>Pi863OUZC0FG zs~M#Ud0=mnWvDexy?Ek~4i&TL~0&?u6n~v3Kmg_r7%dT{4ZKu^KVCbVq`J?ibL2V&U7M7?G;oyq2G)U0|nZXJ|g)mokLr>aLQ&KXBqv;-GTfVOuU$u1Zd zTOJ<;Z)&Lq9(2l$_8ZK7-YK`+R%ZytoOkYgRFj+%t5!Y6*nk+_@Q#uW_B#8)pNH6; zi3CVHBZjYXd0T~ut-iXqd|tvRw`-6+I#VHT%U6^advtK-t~@z8V8rSj_kiT^%MuuO&Ujdp*G}tD+798dm3()k&0#*5_TEnigg=u2PAFqM;kJ z+G%zY>wVj*IFTuOpuc7j6$n_bX^lT!d!HTKZB-8=RREh?zqJ}b@l{V5slfG**adar zq*b?^30BsBEyS+)0W?~Ul`Y#)JQHl-iEjhPquX9t0bEbx?c957$n8&otPr4LU`}{Nc46fiIQ*; zcFVTq3Y}hI=T*{VYPLt41$JVuR)@Su<#2}0HOgO@P-NY@V{-*DuW5|6%lnq;v|d`x z$aKFJImWd}ibeYuadnYBJ`d;}zcMP6oyx)Z)3rCE&u8o{6?GUsA-`=nOcN+l(zSb% z>p7KX^jGYX3fXvF!*(W=igm`SyCzwNR@dQh=hiQ{2k%;rRoA|g8VKnd{vE+_upGm# zCtA(D+Wz?D)Ss|r6@S2S%02EJtxxpd2>IE9AhbGGyj*$NZI6$L_OXxe*WK-_X1!-* zf)>$#Gt@^D@&PTEMJGTd=0oNF2vmYr(UX3=WeB29$Zq|{-*8%>=%he?HRN|8N*#Fn zAWWt;0iS4ovvv1qnhY+X|9XgBQyHybb@p1FMzUtVG!8no=F17rXB;as03VX!SYJ50 z?bpWJZNyuiB_GZ2Z>E3#IK*zKy9fVP4ywh<@gCW-^tH<&xp4_-Qup?wKPVUtp))2ZXNvl)avS)E6RiU>r6phUGZ5=KcgOgm#&ogWm}_!~spjIm8UDX8lkY zWo?hm+JI~}T2(7T&db8O5lH=sFk4lz&H}V{jh&Zxbc9;&A#xn6&Tvz$ZLr10p^e-R z$4T<+2`(kq0

-0xu$spf-oH^);=*786#{`wwzaGam>5o=U0`Q8 z!tHXWT(4Vovu?ez>X8|~X0Ujx1S-gB8JZ=0mOKlqBRC0lb~*J~DOJqHGN$n&moT&W zWIsPMb|Rn4q;n}S^Bg;w-`LJeyO_NB`GpzrErXT*ZC@ZS7-6QjcE|J6>Rm_RCt^)wH-sMq555UM1TeHw|Wx01wJ|CB9xwp7i>Ad@o>hq`Hz-Xw2Gn$EWZH3**x z6~x`9eRk0U8IU2-HrY~@Cr-=;&(8F%a3gR96_C5o3wEw=A@?Mnum!n*b*w~ zpDDehfc9lJv`1{g;)#?#w1Yv5xh}%rWDyVHzLW*L=CB(t_CXHT{O)`g_9t-Nk34D~ zx%0fg`O-R+A^ur*s$4;d!Its7NCK+6_a!K3_cfjm>BBL2_hPP#;h%*RUK4o-yN$fN z1@(IDWvyA2INf72ugje#8G86b)9?_l1RfjG_s_*R?EyPpbF799qfX<;OND6X+36-Y z+f?!yB7I@A%icK=qHbUa$3tTLE<0W!sRGKh;Ke`$<#}l5*g_eO$197}txcMiliAxg zPon7GW|zE0gMwBq&CYd1#O(TD6`yF{3`D{Q$~}svvcY0dRH|iI1hpIJCKD+rplw#l zeMcUg-1S3q*Q>G>Z*PMUpO#{0QOn_>rde<8_bs$@J#b?R9CsOqMZINWmCw7ij%C;# zJ7XaM=BkDQTP}-Nrj2)SRq(QJ#oK`k_Cs`6{o4>*Rn5b*BmCAthX0tIusWSq$7T26 zkQqy;PKES^Q#4VFDV$*qLGcPA$PiG^{hX{#Y!1)8YLntln*!TYtyJ3ii2Mm36Guc&&*vO`_$E*6y+S zb_*#3tROZ;fyR-W(w3P92fjr)pQ;J>uv2d0&?o?zB`rqvW=bY=RPD$tbl2JhWIv+Jp!TyRX_U8>MQgM5jHn z3nlvZD=gff^7e*^lS#4TI1tB;wciV*W#M@3DC*6jYI+3K|ASPyp06jekKvRYzYz_eK{LYTjL&&54*nx1lcyv;5V zcD0IS!YgZaK^LomB7!$G%mL)t1tc*bQH>gQPPPk)d|6D6EMmyqdawn{Hw$tSY*%lN zw#Am*WAy{mIIv-k1rLDykRFOmm({F_w8I$ySXjRrcq$+irKvEM(`gZz7^}W#){)_j zoaGx$AWH4pZL3Mr0u5cZA@)l+=!Ny*C;=c1Z$goeCod11a#KHC$)4lTAx!+&dHxH< zua31(dL_bt!|v?k9JoTez@I=l+AtE$YPoZ0dhc}p?m4@}Ik=ZQ>^qia44YdIw#t+< zONk^Z*7p+>PG3J@(q3IVvce$-pN$_PDXgx|g}2orch|OG!%RdjanyHq*pi!Kt|BD! zlFX6Ie1#7K4=+fU7&1{^RWj9Ng=`o)8!Z&J+5V0lxyqpqn$|eFf4FMUcCNE!Pq%Wx zLsF^gInOr;Z89&@+6$(k4raFYg#G{%qrx3|hp!NvL=D0_-*xhPL^3Er%omB-2W+mw zgL7d!cdidX+w%wnM(?uA&UM1^h1Uk)yLU1s?&P$4s?p3tMxq_imcr zU1Q;P2ks@r&Kq-|k2xL*fep5f(J1&KuRGX>35CM_p2&k9oZ~bi&CWTN|kz)jKGZ5$is0!AKN+! zyp}&@8gyyDbKq)B;Yi(KvmUDtb(lS=UjFA0?>q=p603|st92Y9YXtsiKXr-CR?1DY zN^U1#dWPFixTy3P9)Z+EGRgmhopYaHPPqyWL<0kY4C!?ZlG~GNQT(~U&YQsymj7jn zld4aLXiX?p$e5~~NN-!*pIuo0WNZQJ157@f_lOj`CDheDc8%5pNAgIf0ZFTp4-d1# z16(yCJ1)vZFWBM$Fzsy=#y`!N`R$UK-!PMDN* zG`6-&$^7#i3P%xkj<>K5Y(Ea&{x*L#3RC?rLo5vZT&dxE)ldT<^wK#Xl}n@oaYM4c zxSh+z;u)#}prmDNqvVxKqQW(WB-jG|oz88d%#}%%QsHU!S)!Q2X2ZwewasN?>0Bw5 zqjkc^(e`p;BbLqp$O#IQM3uo*$DCZAnhEK@$XkyB)S`9+Wdh)yOO>AIi%-p1F|m~{ zr4ps>Vn1~+vPdrVJa8m-gtz%jGWhLOe2Ja$ah?2Cb!bg=uZOZ2Fl)MD@ay zy^Y<=Mk%w}0TH;t6`laklL~`-9-U9#TT!aw^Y!0F<$ajH113Ra`fbo&4bf)>lPpUA zpDIbS!f8RF9^Q7lUOp7-Qye?X9Td*aK2Y(K>^L9A%jD`b{fE=+wxYTyZ9KGxgL*2o zpJS}gXw9u>0!_puU{`zVF8@V{vEEOu#!mMZ6rmc)(8BuYf?5xX;^xb29c@NgmB)4D z;>g_#n@fj!qWO&cQ;#43NzdZ4e2wl+MBm=>HXBX9B8Bec7YOULAkmsa47Ovr!;G*mpSE z1sa-M;khdaR(9Erf!>Ok7o2dn-`Pek5b*PZ=-kF zRdK<9Boe#=r2{V*H4HBk!h>f|LZ|eH?6m7Jx*(CZa}!*i1QMV1(sq14`d-iCtb5IX z?tFh?2-&Ay+1k@>nzgFTr=m^O!wC-sF_mUnQPX+MmI7-NecMJsjMs!*eIf9Bz_h_~ zL*Gm!45)VDAm_soo7Mkko_9eH&D#5S_bqnJn|p*D4ueLH;jnjHdXV6#B6(P=%Ow0y zPw~dXBj-F|cgbb(w_O;iQi=ShRI!*Z28rQ0rX}*Z99$dftst)nE)L`o&*SMFx+=_E zzGT9)f=H52_7*B%xkNr&Kr;qOX);!d#bZXwe3mL2009>bqFhWBGHAdsV;T5p$rmQj z*e<|RTSloiXKZh5q!Z~>u4ER9>1XiMHpyv2lLz{pwhM)P5e-hJzu|*Ba_4e+v#=>U zJ%nGGA*@akR=pQFYBh0JPJNa(N=A4F8I{F!?pZ98PMXirl#)q3OJ%~d+N5JwQk z^@XteDj7Emv0^M6UZe@?ikl^niCT8T8k~X^@RgA&;)KoECLJ5G1i9^i8$LtZR_B5r zh%Ztb>0Fw~6F!Ty-WhcSf0rtTm+0Jju*DL&ST=>jH_+ym*b1K`%)ljCoP>9#Vk_sh zOYDLQR`Tlx#X6;MgnV!LsEF7hCyq+UL-;~JyBVc?5t{?2gIcNZGMzytorTk%G$m7- zd}l^@g&=dj;*kji0KDijMED{R4EP)LGGCxo!2%wm8{tbtup)xB7pCm>izTxF;0+01 z9^j=w$% zRTys*IgR{w5g{T;ma!c-62&y9oDqIUoHFOBQl2KIH(m(tB9Yp;P6DA$F@b1eJ0p6< zC>-84!Z$bodKwpU%JN?a6_+7%wN3m=SF=7tB zP8zIzn{Qt|ik=X2@e%3`%Igj_eGYrMO1lGgi6SZIObm)#XkwM))<~`NK?oRjw_gks z`OJ0}%yduxKcstx)fR32hR%{zF$Cx09-r@>s9_?Cm+zYakVW*`7gFkml#_x#XzBkMBCjT(NaDBq23rw5pKjy>pR(u1Nv|@vX^wY)1}<@*o%Vt% zQIqFZKgjL&GIZKwP_ArOWX4&d!>M}YJmIeYQOMsU*WWGS*7GO20k`FAUjKSvMC20Q z9H2z@6j9_E87F$|Fv*ORhH&uOOjsn@2!Z-i70~)^p;Grw|&AldD8%KDX1UoP(?n}+s;e?|?nP?40?o6_iM?6dIntzQnY(@NCIeMwkvD_MF$4cVODbLNi1y;?3_5`~O&HPb6c$5%4?ZHd3^n+YaAJm?+j70)&4ZZ=9EjfTJUWkg_O23T8hVVZ~;5-vZVgxSAOyz z-|d0{jtcW+)5sa;>R4tNBa8YC@RQ_Uf3~^ z^EKRlHOPq;UWweFgxHLmxzK`3^y(qIL&p`2IH%qR`h!WR=UQ)xB6Q2FcM(bpzLu`y z=#3p0$plC8L;dTMAnDz(l31d6VhSZZ2 zjobWt63f9Yz@A|gLxmfo-{2_e+DMeNzX`El94Jw)SF34-acf3_pdxOVC^CM2o_x1NCK~t13sY#jK11eA` zcj?EVsDHw^sJ;Bz{D<0AN&)AH;3{YhvE1UWV+P0iDK zE%#FZW5~O2{J2?@7lyTNAH_3F3wvV=eRzRFo~NRu5Ob^ ze;@8FnkeXt4Lm0?hC8bc9~WWQE>7gmaz=3RqBzRveZOFgI7%5kE}Cx?M}ZUEuPSKx z{M4LM6B+|cW%RgMrugYUnJn6KdS7jjNB=!|8sh5(V|W_A&m4?vl9u1VB>fc<3w^f| zwZ|hhQ{N2b#^mymP275#(=wqyo8dpHu?fjRC*NBKprD*tejJ#fvaVo0d}7^n|?wPXy`2j+~6`cqE+ zls*ya$XWTn+ah`Hr%2`@{-cI#@jVw*`;qV-L-qq^xjP8%SXKouaI$1C=^1EGCOMk@ zfIa*OO^c9l-}P`UxD#E)t$&KUt5GcFdNdzQf;aSm4?p6le}_f`fd=o*jiJ#3=eaxh zXrw$1nJ!O8YHe*Ijfay7*vU_DHvM`3G0vucio3JXnqqLK+|(yroRa!P$5!sU&?=?r zA34YQ>k(t@YOvfOLi*9W8k{M2mE^nnXtG^(`bsIwzwi&S^Y-WUaup52l6UZFPJ0z! z)BUHIdEhv0`_bCk>({UQUapn9&Vl%P?j1DnIiz}Sj~b4JY>~ZRinternalAddGeneratedFile( + ' +Ó +.google/cloud/sql/v1/cloud_sql_operations.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto-google/cloud/sql/v1/cloud_sql_resources.protogoogle/protobuf/empty.proto"= +SqlOperationsGetRequest + operation (  +project ( "f +SqlOperationsListRequest +instance (  + max_results (  + +page_token (  +project ( "n +OperationsListResponse +kind ( - +items ( 2.google.cloud.sql.v1.Operation +next_page_token ( "@ +SqlOperationsCancelRequest + operation (  +project ( 2à +SqlOperationsServiceŠ +Get,.google.cloud.sql.v1.SqlOperationsGetRequest.google.cloud.sql.v1.Operation"5‚Óä“/-/v1/projects/{project}/operations/{operation} +List-.google.cloud.sql.v1.SqlOperationsListRequest+.google.cloud.sql.v1.OperationsListResponse")‚Óä“#!/v1/projects/{project}/operations +Cancel/.google.cloud.sql.v1.SqlOperationsCancelRequest.google.protobuf.Empty"<‚Óä“6"4/v1/projects/{project}/operations/{operation}/cancel|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB_ +com.google.cloud.sql.v1BCloudSqlOperationsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php new file mode 100644 index 000000000000..abf01220dbad --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +š ++google/cloud/sql/v1/cloud_sql_regions.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2/ +SqlRegionsServiceÊAsqladmin.googleapis.comBc +com.google.cloud.sql.v1BCloudSqlRegionsServiceProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php new file mode 100644 index 0000000000000000000000000000000000000000..e69a8481094d66cc7955a51251eff3da784c5b6c GIT binary patch literal 16028 zcmcgz&2t+^b~i{$BpM<(8cHHW$r23tLy|2@1SMIbZ0`<$Aqg8_20+Pj(K|H+hUA1G z0M7uFxm!LZsoKgRo5LRRQI*tIPN}3)mA@dTR6g!|$Zabhn_D(Hr7Byg%I|ge3^3pT zRD6gJGSM^ry8HF(_kQp9dOrGI_n^yeB{!|M<(NIIncO`|_71FM*Xi^+jZQ1M+uz%> zoMfYO)U{idvyx2a%E?l>p44;s`djGgcKS}kT2JnGI{Pi_exudtH}AV&x9%UWiXR4k z7>*_0b62=z#@gnQ<#x@6mE5dkidN5Tnmu!8lMC6&l8~L+*R7rBtIrr~v`p7c@nD#1nStyw|kb;Hd{M6%WXJzx7Tqhcy)b!-|G2_q?X%v zyVb6j6PHOY^YJ*RICkDg3AR3m-0-e^8}5B#OQmbgrmy1- zSmbSAE2N|M*#8`}d;cd>R2RkTE8KEdV5}?0tIIc}3~sI1^!rVz8)3i8H%FiMJO#)X zP6>D=S1F#SI&4mBwDfk*IZ@}?xnr}{w-S+LPa3}!ph+F6`Z@luPi#M3v3o!?wb2zc2PCX&O6pV%ty>2^=A=w@pQMhS+e$d!O$vs zEn$b=}y|@`dfHuFRx<5n)RivvJt(R;`}ZrbAG(dOax0RjVwHqbM4UK0F2Arg(Zi zRA*zPtoU-bAwhk_6v#B~w$(It`M9p!<7=K&e~;mA*3!?(K2qy!J}Bn~TdwMLS|e9g zzCNPIC_9%eZZDP)3S_B)WGv$q_p3rEg95bta{jRX4_d*F*XccvJH z&9yp0M&dl#y_#V+x*d2AL8&?@9EqgBMy_Uy~x+ITjUz*Wg}ZCZ|A(eIOA{u;yDiZsmIgsgY&^2 zGno`i8fPdfm1c>GRZjOzify-4s9E8VqQ zb`PGzI<{I|f#*p1{((J0+-V8*q&{Ht-pCs*6K>j5hft>p*@vBRixulcOBcBQRmW*c`$i~gv}{CL<>9tVP2#iKxNi>v2S3n50;U13)6w&PQ>j})d$3dBEEV>8$YxGXK z;>5?($xu<44FTmk-cu3SJ9~Srj@gu9>olYsgk;Qm*E}4ZwFpeFIqQsh7?}0)A4J$9 zCUj~wm)He3D>x?O>po($+^GapkYbr#%OKx~U}-thJ1((>ulqO=Ll4B>U1yi}C=GHA zynF;Cf~3~i^{ff52JX-reaOvb`R6lCIkj~-o$!h+OSpz8B3sOD99T!D(P_6%HK$DPDP3gtcVY|yus9v#XexMBkl=#$l|sVOHW$x z@{ic%&{5PCcCOK~%(fIVVIzeG(kyE4VePit^AP)4eU^VR#ch7{EYM+ed*Ba%vdMW* z#>cBTApB)`^nP1_gvpD>+UDr|atA>GJf6NDx;>Z}cMhwBIJzgou+O%LsYC>M%*Ccn z1QDf2K%fL4IQ*EnnAEQro6jGOb0pUNG3-ewwolxA(Ph|^jI2sH#&AzEc~vXk84s*TtaZo(1fKrCcz{3k zqh4@qpi~}QWVoXopwsFf0c;3Z5*Gi+-lJ+r{3BD2s^j9HNQTG6KQg4~@;^>{ekwT2 zCQ|`hof8gb{F5V$V=L67i2g(IYt*1ubYGx%mWI6HnKndGxZUwHc?r!XIAU1!yq`w! zzmOjtb+%~sdj}ndNP15gVHZlj-V8M=pDsm80MtS( z54zf21Dpj&NMYcgvwMQpF}#VAvJ52lhTu*O&d(T>^4blcy0gijPuLvRWKizTdvn=Wsi_{6{(Fp8&1*IVqSRw$HTfJ4+v+3L$m9TbaJ${GGI&@(EF`#+6x zsqhk%%+7o4R=v7iqxZ9gJm^Rxt5@qFbF)OVR`t)f^Ppmt>D0~+J1-^%54M=q!lnTN zXtP}2Ea*m2D}gV{89r^B)i8sr?DEL-tX4DdXeu+$V#Yw%nTu?JZ}dQesjpbn*Rq;m zF?!qM0m=U7gzDdASINX)!N3~G{rX1`A(<2DoB1)##MuQtpcIj6F|{D+$BN_U`zdy1 z4^&R)m9cMH28taX%_$CXhL98x&JR0nk4r~p>w>0iH;G8)?ZWK`a8T;6z_1rVB7>47 z-sc6#{?04)4x2eZO-^FUNzq%q&89&%$|Ppun@`z=eixt&`6lwPLw>^J>06~hX(pA1bKyqn!=4tQu9W#HYcc9T%Prx+-J7esinm-@E|i-TUV z_YZom@NJ+EukZ{KbgyU+ZZGJ=%M=J4Y^P@yJ9}jJl0n*LoOP*7o zutg!C&^V~+met;eH>Sm%0mq+tGwZg%{2Hiu8OTrjlFgXhIrZx)R6dBo3L|BRBy0AM zx&|i%g3;kj(go9kp|vUX1_cdsBYSdCk9wUoeZ-bzCU#(5df z{Pyun>i6R;TEXe`jExUu5G*$HQB@>H_Mx$T?f@yb(6(Ap6W$*PbMEv-w*BRj~P%YH->c^1>Rm^%Vxtvt&R&{PSp=@PM7dbYz)@ZM7NsjxCQEz75Yp4 zY?f!#zRtOtQ|tznyvr56s_{Z?{bgme;LX_ie6dolqEd?^dS3s6|2;*2qlyg_g#tGI z-mc{6?-}|#rx#HARnDm~Hj9FIT|?*dRE5uI+0V8s%IxygT!iXEwUSn;ZI$cF9B)B| zOuS({FBi6pxWZG>Nh6f!sh5YK>0Zqc6CT0Qkl!@C8kvMk%?ZTWdr$^ zIL<|lQ@Jj>@+B5EAmXa>Ce5{|5r{2mrL3;p0EE4Wzj39(s8sXM2_xq#%1ypIc$CvO z^eVvbphuEFLYR@`3#GrsTXC%c8PzJVo(vQyfe5bq9>QayrWZC0*xU1bmQsSj z`c^0v7)*+)!JhTqr$7jnG1=ohSpOKWqzS5=*Ef%#;BfO3@4#M3+P zjT>L)e{^_hc+MSs!mfJPexO)F@%*An%Ra(oHBqk(Jxbn=6rcxOL;|lz>4&sq!8L_n z4D?KZAf@K_l+NT6rXa-tiW*!pO9*Tj4vI&JEAVBDA*)Fc;G3MYWqhdNe^s2ZE@{#Ck;C#!%8zIejI(+5O9(AX@kegD5 zsYe4k$9QEEpOaAd!ru)wh#?w9vOgQ_(g0fz?SMeo;b!e4?7{o$_t|w{3&Te0k!9+c z+p)oJG#t}CFkExbf=vz#-IF2mozpp(PZM+NevBF;`6I4V?*^6t=M$~E#Fn^K<31B| z+6Hd2op>bd6+Zbf-a?wRmGgQ@zZkfXwFC)Kguw(n_6gW~B2736C+QD2k>EyiH+0*= z8L*Gof=^nBV=fxVFd-aF0LCaic|h*m#kOD^ugz-tl-ZT6dX z&(q+WT;83~)xoT5yo*LXr1qZSN-2K9!6e>A-?4;+=c{$`vM7{%&MreC#8H9Ax7uLy z8`cp*Wg^K%rNgJ;iNXv-SAEcv!v|bA5grdW`yrd0pJ$qH@%2qGP2l_}Q3HaVP2u&Z ziff`~^O&gECQJgCSKF4c2TH6Dhn%>@C5D#{G})^tI&H{4n4~a$5sIZvyu$^BdlYgf z!?9dv*Tssw>c>%wgPeUq+$3(FwM?P^9J?mP&`BiN7m#x2wWKVsBJUcBz_^!1SG@#p z6uh&yKJ_G$+T#_;Qz7OZ_7=ZHj@zZko(SDn%E&rLK@XB-t?)v7Sp!x_s#?-1xtpS$ zLyw$}@&alSltiUA*{n1;N=4|?7M?N$?xZ6FLS;j*B5OgSGev3S;I~mh`U33#6}uE_ zZkRE0pAvFsq$GN2qg>7EMJkj8ufZY>E0ya=V`RmI>H>5Auc_1;TN-C8s1?f_K%80z z#VuI$bE#j8>Q5G2nGd3b#))Vp1`WGHw>R4Tqh0@o6=f-SCc)Qz76Uxx{6BqaG=$rt#fuxNNOnXO)rL2acs2Z9jO>Ook;1j)RTRl$dG3~a!f&;5^E?$UpueG< z4YW+NLt#Sp{F4aEaAAJ(RJYxJIW3qS#MrP4zd!nn4k zP@_aOdd~aCMw-|7$!$%e2QR)2O(UbQIFD8S;B*t2fXDEVnHY;2-avOZSq!`2Uyr1_ zU`1P4e^3M)+XWK9ue)z- z2-=`d#L@KK28&}ZgvCHRb3B-2*J(OLL4k7!lL&j?$X9E1V^c3F5zYq@QA0dSj<-#b z1M%1&4AK`jegZWC)O~4~e8tdmIS@d#u#t%PkaP`qO6BePW?3*F;t|nUASpqU74u+P zs202`CpL5UuV*>uLg9(P@^ew?P$lQ$(QpH3Iy(<DjmekpRhHp!{Vd*m-SL`J2(EwDR-OrZwf?N1GlhzZz|Nr2NNd(_`g7N1HxW z{+Xiw&mc?zTXvqpXmJP@kiw zpk?v}V&p<13Q*~n^nDZtLLWR=B46GS9GLv}6#eh-cka9R z!W*?qeB_P4y1UQ#zq{u-Q@Zw^|55G-;=|^l@1Us)Y&Sx_f#z?DFO|P#-!k^UgfhGr literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php new file mode 100644 index 000000000000..e33f77f7390e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +Ñ +-google/cloud/sql/v1/cloud_sql_ssl_certs.protogoogle.cloud.sql.v1google/api/client.proto-google/cloud/sql/v1/cloud_sql_resources.proto"W +SqlSslCertsDeleteRequest +instance (  +project (  +sha1_fingerprint ( "T +SqlSslCertsGetRequest +instance (  +project (  +sha1_fingerprint ( "w +SqlSslCertsInsertRequest +instance (  +project ( 8 +bodyd ( 2*.google.cloud.sql.v1.SslCertsInsertRequest"; +SqlSslCertsListRequest +instance (  +project ( ", +SslCertsInsertRequest + common_name ( "È +SslCertsInsertResponse +kind ( 1 + operation ( 2.google.cloud.sql.v1.Operation4 +server_ca_cert ( 2.google.cloud.sql.v1.SslCert7 + client_cert ( 2".google.cloud.sql.v1.SslCertDetail"Q +SslCertsListResponse +kind ( + +items ( 2.google.cloud.sql.v1.SslCert2ª +SqlSslCertsService¨ +Delete-.google.cloud.sql.v1.SqlSslCertsDeleteRequest.google.cloud.sql.v1.Operation"O‚Óä“I*G/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}  +Get*.google.cloud.sql.v1.SqlSslCertsGetRequest.google.cloud.sql.v1.SslCert"O‚Óä“IG/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}¨ +Insert-.google.cloud.sql.v1.SqlSslCertsInsertRequest+.google.cloud.sql.v1.SslCertsInsertResponse"B‚Óä“<"4/v1/projects/{project}/instances/{instance}/sslCerts:bodyœ +List+.google.cloud.sql.v1.SqlSslCertsListRequest).google.cloud.sql.v1.SslCertsListResponse"<‚Óä“64/v1/projects/{project}/instances/{instance}/sslCerts|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB] +com.google.cloud.sql.v1BCloudSqlSslCertsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php new file mode 100644 index 000000000000..c09b8b6ec147 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile( + ' +™ +)google/cloud/sql/v1/cloud_sql_tiers.protogoogle.cloud.sql.v1google/api/client.proto"& +SqlTiersListRequest +project ( "K +TiersListResponse +kind ( ( +items ( 2.google.cloud.sql.v1.Tier"S +Tier +tier (  +RAM ( +kind (  + +Disk_Quota ( +region ( 2 +SqlTiersService~ +List(.google.cloud.sql.v1.SqlTiersListRequest&.google.cloud.sql.v1.TiersListResponse"$‚Óä“/v1/projects/{project}/tiers|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminBZ +com.google.cloud.sql.v1BCloudSqlTiersProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php new file mode 100644 index 0000000000000000000000000000000000000000..f15240c77b8951ff07401883d2505da7df5be51e GIT binary patch literal 3866 zcmb7H&r{n*6t2J!vJfB(DUO>as*^S*lh^~fB+jqe7>FB!Js8tT##4T035{TXcaowjF?th(zs zyB5h9meV#f{=SttSdtGKJZNp7cz#--B4q0=;=8&*)b(=yC1JX$GrhJh0BS27pjO$p zYCB7h5Hc*?_f@e7YgG<|-XazLx$U||4b^8lga2+(U!yip<6xygp;<7 zwrw!#*ec&pvJH}2R3#?2z2!O(_Y*aAsLZJV8frzG5zp4GT7me6M_uN4WiZWVcM0nd z$X8N}!Lb~UHq?~#F`GT%j-(ziI>M%DJ?bvu%g7;MjgP z+l{FU@u7_?79}p?sFO65M*3hWu@LOn zT?#eBb0SM6aU=4g!HL)E0rP>uz0*(jLV^SH>w&o_M9_4`3|Q{1~Ty!iZvad#T8XaUBt6!g4#ea)K+{%tiXF-_VH2iG=na{5#JJn#bbOS zSwT3&T_-FAjlxLa5JrMVU?gtng#~$@;`2xF;|RLOLn%Y6J#;*C z2YM)Y1I1N#pv4~H8)!kdEa#AzT0@5tFg2Yq(sG$E@;!#1p=)liStD;;Doaxf)g?3# zAu*I!IxJ#*3tc0&Ubjg90h-Yy#-5PP1b%?Vc`I%ELN$}iHwR`V45K1UIeViK{EnXo z#G?&rh&bb8kmZTwH)y(dGoD7{mSgM@Qv^DJAES5&AQC7qlOV`M=u;=iPP<9|J%(bO zXkIOQ)Rv&4T0+onwZK^14XPy+y-+m{wZUD!cv2hVd>Kddd_gSSM=^HflK2EXO)q~Q zIvH(4LeA+x%iCa#U!afueVC#ia3w~#W`bMP^5Yi)W^#FPAPgW>#1^;bLA&RN&c>&$!OG5 zXd+)NZftAC&DoDIM$;=BrD{Pd=3Z*m%IemvfgM+B2%bYT z-Ph||rD}P06vxqg-=ai|;hX42|C@fyvE(~6+wVP2qU(ifZbK{QDwVHGTLo?VRe4pb zZdS^xE5)_qY60B;1TAcqw3nqqaqX4XV-0c4qgi;_yE*~_yVSchnx95fZAfOA{`?g* z2gTi=faFs&KPdUUcbU}Z znS6=s1NByN`3E($(B#AK|N8g+$o)G@{EIl4dVc0@@as4e4oX-He;#Kz+dlqTL8CAZ zp_LCjBlM>`F%zfEsV{{eS^QvVKQeFm=sw230YP$*oHzB@89lxpx>3( XtH^DPe?CxSz)eh8${W)$I!5S!qn_B? literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php new file mode 100644 index 000000000000..a30afe817105 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php @@ -0,0 +1,187 @@ +google.cloud.sql.v1.AclEntry + */ +class AclEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + */ + protected $value = ''; + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + */ + protected $expiration_time = null; + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * The allowlisted value for the access control list. + * @type \Google\Protobuf\Timestamp $expiration_time + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $name + * Optional. A label to identify this entry. + * @type string $kind + * This is always `sql#aclEntry`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The allowlisted value for the access control list. + * + * 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 time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * 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 time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * 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; + } + + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php new file mode 100644 index 000000000000..429f1de7dc04 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php @@ -0,0 +1,217 @@ +google.cloud.sql.v1.AcquireSsrsLeaseContext + */ +class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message +{ + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + */ + protected $setup_login = null; + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + */ + protected $service_login = null; + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + */ + protected $report_database = null; + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $setup_login + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * @type string $service_login + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * @type string $report_database + * The report database to be used for SSRS setup. + * @type \Google\Protobuf\Duration $duration + * Lease duration needed for SSRS setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @return string + */ + public function getSetupLogin() + { + return isset($this->setup_login) ? $this->setup_login : ''; + } + + public function hasSetupLogin() + { + return isset($this->setup_login); + } + + public function clearSetupLogin() + { + unset($this->setup_login); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @param string $var + * @return $this + */ + public function setSetupLogin($var) + { + GPBUtil::checkString($var, True); + $this->setup_login = $var; + + return $this; + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @return string + */ + public function getServiceLogin() + { + return isset($this->service_login) ? $this->service_login : ''; + } + + public function hasServiceLogin() + { + return isset($this->service_login); + } + + public function clearServiceLogin() + { + unset($this->service_login); + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @param string $var + * @return $this + */ + public function setServiceLogin($var) + { + GPBUtil::checkString($var, True); + $this->service_login = $var; + + return $this; + } + + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @return string + */ + public function getReportDatabase() + { + return isset($this->report_database) ? $this->report_database : ''; + } + + public function hasReportDatabase() + { + return isset($this->report_database); + } + + public function clearReportDatabase() + { + unset($this->report_database); + } + + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @param string $var + * @return $this + */ + public function setReportDatabase($var) + { + GPBUtil::checkString($var, True); + $this->report_database = $var; + + return $this; + } + + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php new file mode 100644 index 000000000000..7918b421cd93 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.AdvancedMachineFeatures + */ +class AdvancedMachineFeatures extends \Google\Protobuf\Internal\Message +{ + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + */ + protected $threads_per_core = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $threads_per_core + * The number of threads per physical core. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + * @return int + */ + public function getThreadsPerCore() + { + return $this->threads_per_core; + } + + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + * @param int $var + * @return $this + */ + public function setThreadsPerCore($var) + { + GPBUtil::checkInt32($var); + $this->threads_per_core = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php new file mode 100644 index 000000000000..b78fa08028b9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.ApiWarning + */ +class ApiWarning extends \Google\Protobuf\Internal\Message +{ + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; + */ + protected $code = 0; + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Code to uniquely identify the warning type. + * @type string $message + * The warning message. + * @type string $region + * The region name for REGION_UNREACHABLE warning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ApiWarning\SqlApiWarningCode::class); + $this->code = $var; + + return $this; + } + + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php new file mode 100644 index 000000000000..0661de42c5d0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php @@ -0,0 +1,80 @@ +google.cloud.sql.v1.ApiWarning.SqlApiWarningCode + */ +class SqlApiWarningCode +{ + /** + * An unknown or unset warning type from Cloud SQL API. + * + * Generated from protobuf enum SQL_API_WARNING_CODE_UNSPECIFIED = 0; + */ + const SQL_API_WARNING_CODE_UNSPECIFIED = 0; + /** + * Warning when one or more regions are not reachable. The returned result + * set may be incomplete. + * + * Generated from protobuf enum REGION_UNREACHABLE = 1; + */ + const REGION_UNREACHABLE = 1; + /** + * Warning when user provided maxResults parameter exceeds the limit. The + * returned result set may be incomplete. + * + * Generated from protobuf enum MAX_RESULTS_EXCEEDS_LIMIT = 2; + */ + const MAX_RESULTS_EXCEEDS_LIMIT = 2; + /** + * Warning when user tries to create/update a user with credentials that + * have previously been compromised by a public data breach. + * + * Generated from protobuf enum COMPROMISED_CREDENTIALS = 3; + */ + const COMPROMISED_CREDENTIALS = 3; + /** + * Warning when the operation succeeds but some non-critical workflow state + * failed. + * + * Generated from protobuf enum INTERNAL_STATE_FAILURE = 4; + */ + const INTERNAL_STATE_FAILURE = 4; + + private static $valueToName = [ + self::SQL_API_WARNING_CODE_UNSPECIFIED => 'SQL_API_WARNING_CODE_UNSPECIFIED', + self::REGION_UNREACHABLE => 'REGION_UNREACHABLE', + self::MAX_RESULTS_EXCEEDS_LIMIT => 'MAX_RESULTS_EXCEEDS_LIMIT', + self::COMPROMISED_CREDENTIALS => 'COMPROMISED_CREDENTIALS', + self::INTERNAL_STATE_FAILURE => 'INTERNAL_STATE_FAILURE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlApiWarningCode::class, \Google\Cloud\Sql\V1\ApiWarning_SqlApiWarningCode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php new file mode 100644 index 000000000000..7cad64f74533 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1.AvailableDatabaseVersion + */ +class AvailableDatabaseVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The version's major version name. + * + * Generated from protobuf field optional string major_version = 3; + */ + protected $major_version = null; + /** + * The database version name. For MySQL 8.0, this string provides the database + * major and minor version. + * + * Generated from protobuf field optional string name = 8; + */ + protected $name = null; + /** + * The database version's display name. + * + * Generated from protobuf field optional string display_name = 9; + */ + protected $display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $major_version + * The version's major version name. + * @type string $name + * The database version name. For MySQL 8.0, this string provides the database + * major and minor version. + * @type string $display_name + * The database version's display name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The version's major version name. + * + * Generated from protobuf field optional string major_version = 3; + * @return string + */ + public function getMajorVersion() + { + return isset($this->major_version) ? $this->major_version : ''; + } + + public function hasMajorVersion() + { + return isset($this->major_version); + } + + public function clearMajorVersion() + { + unset($this->major_version); + } + + /** + * The version's major version name. + * + * Generated from protobuf field optional string major_version = 3; + * @param string $var + * @return $this + */ + public function setMajorVersion($var) + { + GPBUtil::checkString($var, True); + $this->major_version = $var; + + return $this; + } + + /** + * The database version name. For MySQL 8.0, this string provides the database + * major and minor version. + * + * Generated from protobuf field optional string name = 8; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * The database version name. For MySQL 8.0, this string provides the database + * major and minor version. + * + * Generated from protobuf field optional string name = 8; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The database version's display name. + * + * Generated from protobuf field optional string display_name = 9; + * @return string + */ + public function getDisplayName() + { + return isset($this->display_name) ? $this->display_name : ''; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * The database version's display name. + * + * Generated from protobuf field optional string display_name = 9; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php new file mode 100644 index 000000000000..91debce97023 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php @@ -0,0 +1,598 @@ +google.cloud.sql.v1.BackupConfiguration + */ +class BackupConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + */ + protected $start_time = ''; + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + */ + protected $enabled = null; + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + */ + protected $binary_log_enabled = null; + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + */ + protected $replication_log_archiving_enabled = null; + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + */ + protected $location = ''; + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + */ + protected $point_in_time_recovery_enabled = null; + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; + */ + protected $backup_retention_settings = null; + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + */ + protected $transaction_log_retention_days = null; + /** + * Output only. This value contains the storage location of transactional logs + * used to perform point-in-time recovery (PITR) for the database. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transactional_log_storage_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_time + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * @type \Google\Protobuf\BoolValue $enabled + * Whether this configuration is enabled. + * @type string $kind + * This is always `sql#backupConfiguration`. + * @type \Google\Protobuf\BoolValue $binary_log_enabled + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * @type \Google\Protobuf\BoolValue $replication_log_archiving_enabled + * Reserved for future use. + * @type string $location + * Location of the backup + * @type \Google\Protobuf\BoolValue $point_in_time_recovery_enabled + * Whether point in time recovery is enabled. + * @type \Google\Cloud\Sql\V1\BackupRetentionSettings $backup_retention_settings + * Backup retention settings. + * @type \Google\Protobuf\Int32Value $transaction_log_retention_days + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * @type int $transactional_log_storage_state + * Output only. This value contains the storage location of transactional logs + * used to perform point-in-time recovery (PITR) for the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + * @return string + */ + public function getStartTime() + { + return $this->start_time; + } + + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + * @param string $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkString($var, True); + $this->start_time = $var; + + return $this; + } + + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnabled() + { + return $this->enabled; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Returns the unboxed value from getEnabled() + + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @return bool|null + */ + public function getEnabledUnwrapped() + { + return $this->readWrapperValue("enabled"); + } + + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @param bool|null $var + * @return $this + */ + public function setEnabledUnwrapped($var) + { + $this->writeWrapperValue("enabled", $var); + return $this;} + + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getBinaryLogEnabled() + { + return $this->binary_log_enabled; + } + + public function hasBinaryLogEnabled() + { + return isset($this->binary_log_enabled); + } + + public function clearBinaryLogEnabled() + { + unset($this->binary_log_enabled); + } + + /** + * Returns the unboxed value from getBinaryLogEnabled() + + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @return bool|null + */ + public function getBinaryLogEnabledUnwrapped() + { + return $this->readWrapperValue("binary_log_enabled"); + } + + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setBinaryLogEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->binary_log_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @param bool|null $var + * @return $this + */ + public function setBinaryLogEnabledUnwrapped($var) + { + $this->writeWrapperValue("binary_log_enabled", $var); + return $this;} + + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @return \Google\Protobuf\BoolValue|null + */ + public function getReplicationLogArchivingEnabled() + { + return $this->replication_log_archiving_enabled; + } + + public function hasReplicationLogArchivingEnabled() + { + return isset($this->replication_log_archiving_enabled); + } + + public function clearReplicationLogArchivingEnabled() + { + unset($this->replication_log_archiving_enabled); + } + + /** + * Returns the unboxed value from getReplicationLogArchivingEnabled() + + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @return bool|null + */ + public function getReplicationLogArchivingEnabledUnwrapped() + { + return $this->readWrapperValue("replication_log_archiving_enabled"); + } + + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setReplicationLogArchivingEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->replication_log_archiving_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @param bool|null $var + * @return $this + */ + public function setReplicationLogArchivingEnabledUnwrapped($var) + { + $this->writeWrapperValue("replication_log_archiving_enabled", $var); + return $this;} + + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getPointInTimeRecoveryEnabled() + { + return $this->point_in_time_recovery_enabled; + } + + public function hasPointInTimeRecoveryEnabled() + { + return isset($this->point_in_time_recovery_enabled); + } + + public function clearPointInTimeRecoveryEnabled() + { + unset($this->point_in_time_recovery_enabled); + } + + /** + * Returns the unboxed value from getPointInTimeRecoveryEnabled() + + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @return bool|null + */ + public function getPointInTimeRecoveryEnabledUnwrapped() + { + return $this->readWrapperValue("point_in_time_recovery_enabled"); + } + + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setPointInTimeRecoveryEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->point_in_time_recovery_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @param bool|null $var + * @return $this + */ + public function setPointInTimeRecoveryEnabledUnwrapped($var) + { + $this->writeWrapperValue("point_in_time_recovery_enabled", $var); + return $this;} + + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; + * @return \Google\Cloud\Sql\V1\BackupRetentionSettings|null + */ + public function getBackupRetentionSettings() + { + return $this->backup_retention_settings; + } + + public function hasBackupRetentionSettings() + { + return isset($this->backup_retention_settings); + } + + public function clearBackupRetentionSettings() + { + unset($this->backup_retention_settings); + } + + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; + * @param \Google\Cloud\Sql\V1\BackupRetentionSettings $var + * @return $this + */ + public function setBackupRetentionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupRetentionSettings::class); + $this->backup_retention_settings = $var; + + return $this; + } + + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @return \Google\Protobuf\Int32Value|null + */ + public function getTransactionLogRetentionDays() + { + return $this->transaction_log_retention_days; + } + + public function hasTransactionLogRetentionDays() + { + return isset($this->transaction_log_retention_days); + } + + public function clearTransactionLogRetentionDays() + { + unset($this->transaction_log_retention_days); + } + + /** + * Returns the unboxed value from getTransactionLogRetentionDays() + + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @return int|null + */ + public function getTransactionLogRetentionDaysUnwrapped() + { + return $this->readWrapperValue("transaction_log_retention_days"); + } + + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setTransactionLogRetentionDays($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->transaction_log_retention_days = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @param int|null $var + * @return $this + */ + public function setTransactionLogRetentionDaysUnwrapped($var) + { + $this->writeWrapperValue("transaction_log_retention_days", $var); + return $this;} + + /** + * Output only. This value contains the storage location of transactional logs + * used to perform point-in-time recovery (PITR) for the database. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0; + } + + public function hasTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state); + } + + public function clearTransactionalLogStorageState() + { + unset($this->transactional_log_storage_state); + } + + /** + * Output only. This value contains the storage location of transactional logs + * used to perform point-in-time recovery (PITR) for the database. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransactionalLogStorageState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupConfiguration\TransactionalLogStorageState::class); + $this->transactional_log_storage_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php new file mode 100644 index 000000000000..4c48892a0c91 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php @@ -0,0 +1,85 @@ +google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState + */ +class TransactionalLogStorageState +{ + /** + * Unspecified. + * + * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + */ + const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + /** + * The transaction logs used for PITR for the instance are stored + * on a data disk. + * + * Generated from protobuf enum DISK = 1; + */ + const DISK = 1; + /** + * The transaction logs used for PITR for the instance are switching from + * being stored on a data disk to being stored in Cloud Storage. + * Only applicable to MySQL. + * + * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2; + */ + const SWITCHING_TO_CLOUD_STORAGE = 2; + /** + * The transaction logs used for PITR for the instance are now stored + * in Cloud Storage. Previously, they were stored on a data disk. + * Only applicable to MySQL. + * + * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3; + */ + const SWITCHED_TO_CLOUD_STORAGE = 3; + /** + * The transaction logs used for PITR for the instance are stored in + * Cloud Storage. Only applicable to MySQL and PostgreSQL. + * + * Generated from protobuf enum CLOUD_STORAGE = 4; + */ + const CLOUD_STORAGE = 4; + + private static $valueToName = [ + self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', + self::DISK => 'DISK', + self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE', + self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TransactionalLogStorageState::class, \Google\Cloud\Sql\V1\BackupConfiguration_TransactionalLogStorageState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php new file mode 100644 index 000000000000..961ce1b42aac --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.BackupContext + */ +class BackupContext extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + */ + protected $backup_id = 0; + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $backup_id + * The identifier of the backup. + * @type string $kind + * This is always `sql#backupContext`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + * @return int|string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + * @param int|string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkInt64($var); + $this->backup_id = $var; + + return $this; + } + + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php new file mode 100644 index 000000000000..eab7ab57883d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php @@ -0,0 +1,121 @@ +google.cloud.sql.v1.BackupReencryptionConfig + */ +class BackupReencryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + */ + protected $backup_limit = null; + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; + */ + protected $backup_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $backup_limit + * Backup re-encryption limit + * @type int $backup_type + * Type of backups users want to re-encrypt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + * @return int + */ + public function getBackupLimit() + { + return isset($this->backup_limit) ? $this->backup_limit : 0; + } + + public function hasBackupLimit() + { + return isset($this->backup_limit); + } + + public function clearBackupLimit() + { + unset($this->backup_limit); + } + + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + * @param int $var + * @return $this + */ + public function setBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->backup_limit = $var; + + return $this; + } + + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; + * @return int + */ + public function getBackupType() + { + return isset($this->backup_type) ? $this->backup_type : 0; + } + + public function hasBackupType() + { + return isset($this->backup_type); + } + + public function clearBackupType() + { + unset($this->backup_type); + } + + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupReencryptionConfig\BackupType::class); + $this->backup_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php new file mode 100644 index 000000000000..f72845f44ee1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.BackupReencryptionConfig.BackupType + */ +class BackupType +{ + /** + * Unknown backup type, will be defaulted to AUTOMATIC backup type + * + * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; + */ + const BACKUP_TYPE_UNSPECIFIED = 0; + /** + * Reencrypt automatic backups + * + * Generated from protobuf enum AUTOMATED = 1; + */ + const AUTOMATED = 1; + /** + * Reencrypt on-demand backups + * + * Generated from protobuf enum ON_DEMAND = 2; + */ + const ON_DEMAND = 2; + + private static $valueToName = [ + self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', + self::AUTOMATED => 'AUTOMATED', + self::ON_DEMAND => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackupType::class, \Google\Cloud\Sql\V1\BackupReencryptionConfig_BackupType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php new file mode 100644 index 000000000000..74494506fb6c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php @@ -0,0 +1,151 @@ +google.cloud.sql.v1.BackupRetentionSettings + */ +class BackupRetentionSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; + */ + protected $retention_unit = 0; + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + */ + protected $retained_backups = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $retention_unit + * The unit that 'retained_backups' represents. + * @type \Google\Protobuf\Int32Value $retained_backups + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; + * @return int + */ + public function getRetentionUnit() + { + return $this->retention_unit; + } + + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; + * @param int $var + * @return $this + */ + public function setRetentionUnit($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupRetentionSettings\RetentionUnit::class); + $this->retention_unit = $var; + + return $this; + } + + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getRetainedBackups() + { + return $this->retained_backups; + } + + public function hasRetainedBackups() + { + return isset($this->retained_backups); + } + + public function clearRetainedBackups() + { + unset($this->retained_backups); + } + + /** + * Returns the unboxed value from getRetainedBackups() + + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @return int|null + */ + public function getRetainedBackupsUnwrapped() + { + return $this->readWrapperValue("retained_backups"); + } + + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setRetainedBackups($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->retained_backups = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @param int|null $var + * @return $this + */ + public function setRetainedBackupsUnwrapped($var) + { + $this->writeWrapperValue("retained_backups", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php new file mode 100644 index 000000000000..b1a12d681838 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php @@ -0,0 +1,57 @@ +google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit + */ +class RetentionUnit +{ + /** + * Backup retention unit is unspecified, will be treated as COUNT. + * + * Generated from protobuf enum RETENTION_UNIT_UNSPECIFIED = 0; + */ + const RETENTION_UNIT_UNSPECIFIED = 0; + /** + * Retention will be by count, eg. "retain the most recent 7 backups". + * + * Generated from protobuf enum COUNT = 1; + */ + const COUNT = 1; + + private static $valueToName = [ + self::RETENTION_UNIT_UNSPECIFIED => 'RETENTION_UNIT_UNSPECIFIED', + self::COUNT => 'COUNT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetentionUnit::class, \Google\Cloud\Sql\V1\BackupRetentionSettings_RetentionUnit::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php new file mode 100644 index 000000000000..4c324d709909 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php @@ -0,0 +1,777 @@ +google.cloud.sql.v1.BackupRun + */ +class BackupRun extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; + */ + protected $status = 0; + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + */ + protected $enqueued_time = null; + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + */ + protected $id = 0; + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + */ + protected $start_time = null; + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; + */ + protected $error = null; + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; + */ + protected $type = 0; + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + */ + protected $description = ''; + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + */ + protected $window_start_time = null; + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + */ + protected $self_link = ''; + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + */ + protected $location = ''; + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; + */ + protected $disk_encryption_configuration = null; + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; + */ + protected $disk_encryption_status = null; + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; + */ + protected $backup_kind = 0; + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + */ + protected $time_zone = ''; + /** + * Output only. The maximum chargeable bytes for the backup. + * + * Generated from protobuf field optional int64 max_chargeable_bytes = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $max_chargeable_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#backupRun`. + * @type int $status + * The status of this run. + * @type \Google\Protobuf\Timestamp $enqueued_time + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type int|string $id + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * @type \Google\Protobuf\Timestamp $start_time + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $end_time + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Cloud\Sql\V1\OperationError $error + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * @type int $type + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * @type string $description + * The description of this run, only applicable to on-demand backups. + * @type \Google\Protobuf\Timestamp $window_start_time + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * @type string $instance + * Name of the database instance. + * @type string $self_link + * The URI of this resource. + * @type string $location + * Location of the backups. + * @type \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $disk_encryption_configuration + * Encryption configuration specific to a backup. + * @type \Google\Cloud\Sql\V1\DiskEncryptionStatus $disk_encryption_status + * Encryption status specific to a backup. + * @type int $backup_kind + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * @type string $time_zone + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * @type int|string $max_chargeable_bytes + * Output only. The maximum chargeable bytes for the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupRunStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEnqueuedTime() + { + return $this->enqueued_time; + } + + public function hasEnqueuedTime() + { + return isset($this->enqueued_time); + } + + public function clearEnqueuedTime() + { + unset($this->enqueued_time); + } + + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEnqueuedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->enqueued_time = $var; + + return $this; + } + + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * 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); + } + + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * 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; + } + + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * 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); + } + + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * 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; + } + + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; + * @return \Google\Cloud\Sql\V1\OperationError|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; + * @param \Google\Cloud\Sql\V1\OperationError $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OperationError::class); + $this->error = $var; + + return $this; + } + + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupRunType::class); + $this->type = $var; + + return $this; + } + + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getWindowStartTime() + { + return $this->window_start_time; + } + + public function hasWindowStartTime() + { + return isset($this->window_start_time); + } + + public function clearWindowStartTime() + { + unset($this->window_start_time); + } + + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setWindowStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->window_start_time = $var; + + return $this; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; + * @return \Google\Cloud\Sql\V1\DiskEncryptionConfiguration|null + */ + public function getDiskEncryptionConfiguration() + { + return $this->disk_encryption_configuration; + } + + public function hasDiskEncryptionConfiguration() + { + return isset($this->disk_encryption_configuration); + } + + public function clearDiskEncryptionConfiguration() + { + unset($this->disk_encryption_configuration); + } + + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; + * @param \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $var + * @return $this + */ + public function setDiskEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionConfiguration::class); + $this->disk_encryption_configuration = $var; + + return $this; + } + + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; + * @return \Google\Cloud\Sql\V1\DiskEncryptionStatus|null + */ + public function getDiskEncryptionStatus() + { + return $this->disk_encryption_status; + } + + public function hasDiskEncryptionStatus() + { + return isset($this->disk_encryption_status); + } + + public function clearDiskEncryptionStatus() + { + unset($this->disk_encryption_status); + } + + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; + * @param \Google\Cloud\Sql\V1\DiskEncryptionStatus $var + * @return $this + */ + public function setDiskEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionStatus::class); + $this->disk_encryption_status = $var; + + return $this; + } + + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; + * @return int + */ + public function getBackupKind() + { + return $this->backup_kind; + } + + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; + * @param int $var + * @return $this + */ + public function setBackupKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupKind::class); + $this->backup_kind = $var; + + return $this; + } + + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Output only. The maximum chargeable bytes for the backup. + * + * Generated from protobuf field optional int64 max_chargeable_bytes = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMaxChargeableBytes() + { + return isset($this->max_chargeable_bytes) ? $this->max_chargeable_bytes : 0; + } + + public function hasMaxChargeableBytes() + { + return isset($this->max_chargeable_bytes); + } + + public function clearMaxChargeableBytes() + { + unset($this->max_chargeable_bytes); + } + + /** + * Output only. The maximum chargeable bytes for the backup. + * + * Generated from protobuf field optional int64 max_chargeable_bytes = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMaxChargeableBytes($var) + { + GPBUtil::checkInt64($var); + $this->max_chargeable_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php new file mode 100644 index 000000000000..9bbd7c75674f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1.BackupRunsListResponse + */ +class BackupRunsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#backupRunsList`. + * @type array<\Google\Cloud\Sql\V1\BackupRun>|\Google\Protobuf\Internal\RepeatedField $items + * A list of backup runs in reverse chronological order of the enqueued time. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; + * @param array<\Google\Cloud\Sql\V1\BackupRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\BackupRun::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php new file mode 100644 index 000000000000..490cd7ee7edb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1.BakType + */ +class BakType +{ + /** + * Default type. + * + * Generated from protobuf enum BAK_TYPE_UNSPECIFIED = 0; + */ + const BAK_TYPE_UNSPECIFIED = 0; + /** + * Full backup. + * + * Generated from protobuf enum FULL = 1; + */ + const FULL = 1; + /** + * Differential backup. + * + * Generated from protobuf enum DIFF = 2; + */ + const DIFF = 2; + /** + * Transaction Log backup + * + * Generated from protobuf enum TLOG = 3; + */ + const TLOG = 3; + + private static $valueToName = [ + self::BAK_TYPE_UNSPECIFIED => 'BAK_TYPE_UNSPECIFIED', + self::FULL => 'FULL', + self::DIFF => 'DIFF', + self::TLOG => 'TLOG', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php new file mode 100644 index 000000000000..0cbd09e04f0b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.BinLogCoordinates + */ +class BinLogCoordinates extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + */ + protected $bin_log_file_name = ''; + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + */ + protected $bin_log_position = 0; + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bin_log_file_name + * Name of the binary log file for a Cloud SQL instance. + * @type int|string $bin_log_position + * Position (offset) within the binary log file. + * @type string $kind + * This is always `sql#binLogCoordinates`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + * @return string + */ + public function getBinLogFileName() + { + return $this->bin_log_file_name; + } + + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + * @param string $var + * @return $this + */ + public function setBinLogFileName($var) + { + GPBUtil::checkString($var, True); + $this->bin_log_file_name = $var; + + return $this; + } + + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + * @return int|string + */ + public function getBinLogPosition() + { + return $this->bin_log_position; + } + + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + * @param int|string $var + * @return $this + */ + public function setBinLogPosition($var) + { + GPBUtil::checkInt64($var); + $this->bin_log_position = $var; + + return $this; + } + + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php new file mode 100644 index 000000000000..419ee86a5372 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php @@ -0,0 +1,383 @@ +google.cloud.sql.v1.CloneContext + */ +class CloneContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + */ + protected $pitr_timestamp_ms = 0; + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + */ + protected $destination_instance_name = ''; + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; + */ + protected $bin_log_coordinates = null; + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + */ + protected $point_in_time = null; + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + */ + protected $allocated_ip_range = ''; + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + */ + private $database_names; + /** + * Optional. Copy clone and point-in-time recovery clone of an instance to the + * specified zone. If no zone is specified, clone to the same primary zone as + * the source instance. This field applies to all DB types. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preferred_zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#cloneContext`. + * @type int|string $pitr_timestamp_ms + * Reserved for future use. + * @type string $destination_instance_name + * Name of the Cloud SQL instance to be created as a clone. + * @type \Google\Cloud\Sql\V1\BinLogCoordinates $bin_log_coordinates + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * @type \Google\Protobuf\Timestamp $point_in_time + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * @type string $allocated_ip_range + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * @type array|\Google\Protobuf\Internal\RepeatedField $database_names + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * @type string $preferred_zone + * Optional. Copy clone and point-in-time recovery clone of an instance to the + * specified zone. If no zone is specified, clone to the same primary zone as + * the source instance. This field applies to all DB types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + * @return int|string + */ + public function getPitrTimestampMs() + { + return $this->pitr_timestamp_ms; + } + + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + * @param int|string $var + * @return $this + */ + public function setPitrTimestampMs($var) + { + GPBUtil::checkInt64($var); + $this->pitr_timestamp_ms = $var; + + return $this; + } + + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + * @return string + */ + public function getDestinationInstanceName() + { + return $this->destination_instance_name; + } + + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + * @param string $var + * @return $this + */ + public function setDestinationInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->destination_instance_name = $var; + + return $this; + } + + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; + * @return \Google\Cloud\Sql\V1\BinLogCoordinates|null + */ + public function getBinLogCoordinates() + { + return $this->bin_log_coordinates; + } + + public function hasBinLogCoordinates() + { + return isset($this->bin_log_coordinates); + } + + public function clearBinLogCoordinates() + { + unset($this->bin_log_coordinates); + } + + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; + * @param \Google\Cloud\Sql\V1\BinLogCoordinates $var + * @return $this + */ + public function setBinLogCoordinates($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BinLogCoordinates::class); + $this->bin_log_coordinates = $var; + + return $this; + } + + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPointInTime() + { + return $this->point_in_time; + } + + public function hasPointInTime() + { + return isset($this->point_in_time); + } + + public function clearPointInTime() + { + unset($this->point_in_time); + } + + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPointInTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->point_in_time = $var; + + return $this; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + * @return string + */ + public function getAllocatedIpRange() + { + return $this->allocated_ip_range; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + * @param string $var + * @return $this + */ + public function setAllocatedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->allocated_ip_range = $var; + + return $this; + } + + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabaseNames() + { + return $this->database_names; + } + + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabaseNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->database_names = $arr; + + return $this; + } + + /** + * Optional. Copy clone and point-in-time recovery clone of an instance to the + * specified zone. If no zone is specified, clone to the same primary zone as + * the source instance. This field applies to all DB types. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPreferredZone() + { + return isset($this->preferred_zone) ? $this->preferred_zone : ''; + } + + public function hasPreferredZone() + { + return isset($this->preferred_zone); + } + + public function clearPreferredZone() + { + unset($this->preferred_zone); + } + + /** + * Optional. Copy clone and point-in-time recovery clone of an instance to the + * specified zone. If no zone is specified, clone to the same primary zone as + * the source instance. This field applies to all DB types. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPreferredZone($var) + { + GPBUtil::checkString($var, True); + $this->preferred_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php new file mode 100644 index 000000000000..55a567be5477 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php @@ -0,0 +1,405 @@ +google.cloud.sql.v1.ConnectSettings + */ +class ConnectSettings extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; + */ + protected $server_ca_cert = null; + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; + */ + private $ip_addresses; + /** + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + */ + protected $region = ''; + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; + */ + protected $database_version = 0; + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; + */ + protected $backend_type = 0; + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + */ + protected $psc_enabled = false; + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + */ + protected $dns_name = ''; + /** + * Specify what type of CA is used for the server certificate. + * + * Generated from protobuf field .google.cloud.sql.v1.ConnectSettings.CaMode server_ca_mode = 35; + */ + protected $server_ca_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#connectSettings`. + * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert + * SSL configuration. + * @type array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * The assigned IP addresses for the instance. + * @type string $region + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * @type int $database_version + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * @type int $backend_type + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * @type bool $psc_enabled + * Whether PSC connectivity is enabled for this instance. + * @type string $dns_name + * The dns name of the instance. + * @type int $server_ca_mode + * Specify what type of CA is used for the server certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; + * @param array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\IpMapping::class); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; + * @return int + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; + * @param int $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); + $this->database_version = $var; + + return $this; + } + + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + * @return bool + */ + public function getPscEnabled() + { + return $this->psc_enabled; + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + * @param bool $var + * @return $this + */ + public function setPscEnabled($var) + { + GPBUtil::checkBool($var); + $this->psc_enabled = $var; + + return $this; + } + + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + * @return string + */ + public function getDnsName() + { + return $this->dns_name; + } + + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + * @param string $var + * @return $this + */ + public function setDnsName($var) + { + GPBUtil::checkString($var, True); + $this->dns_name = $var; + + return $this; + } + + /** + * Specify what type of CA is used for the server certificate. + * + * Generated from protobuf field .google.cloud.sql.v1.ConnectSettings.CaMode server_ca_mode = 35; + * @return int + */ + public function getServerCaMode() + { + return $this->server_ca_mode; + } + + /** + * Specify what type of CA is used for the server certificate. + * + * Generated from protobuf field .google.cloud.sql.v1.ConnectSettings.CaMode server_ca_mode = 35; + * @param int $var + * @return $this + */ + public function setServerCaMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ConnectSettings\CaMode::class); + $this->server_ca_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php new file mode 100644 index 000000000000..172d17a7b126 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1.ConnectSettings.CaMode + */ +class CaMode +{ + /** + * CA mode is unknown. + * + * Generated from protobuf enum CA_MODE_UNSPECIFIED = 0; + */ + const CA_MODE_UNSPECIFIED = 0; + /** + * Google-managed self-signed internal CA. + * + * Generated from protobuf enum GOOGLE_MANAGED_INTERNAL_CA = 1; + */ + const GOOGLE_MANAGED_INTERNAL_CA = 1; + /** + * Google-managed regional CA part of root CA hierarchy hosted on Google + * Cloud's Certificate Authority Service (CAS). + * + * Generated from protobuf enum GOOGLE_MANAGED_CAS_CA = 2; + */ + const GOOGLE_MANAGED_CAS_CA = 2; + + private static $valueToName = [ + self::CA_MODE_UNSPECIFIED => 'CA_MODE_UNSPECIFIED', + self::GOOGLE_MANAGED_INTERNAL_CA => 'GOOGLE_MANAGED_INTERNAL_CA', + self::GOOGLE_MANAGED_CAS_CA => 'GOOGLE_MANAGED_CAS_CA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CaMode::class, \Google\Cloud\Sql\V1\ConnectSettings_CaMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php new file mode 100644 index 000000000000..64063925f8c6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.DataCacheConfig + */ +class DataCacheConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + */ + protected $data_cache_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $data_cache_enabled + * Whether data cache is enabled for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + * @return bool + */ + public function getDataCacheEnabled() + { + return $this->data_cache_enabled; + } + + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + * @param bool $var + * @return $this + */ + public function setDataCacheEnabled($var) + { + GPBUtil::checkBool($var); + $this->data_cache_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php new file mode 100644 index 000000000000..820ce4a13ffe --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php @@ -0,0 +1,354 @@ +google.cloud.sql.v1.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + */ + protected $charset = ''; + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + */ + protected $collation = ''; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + */ + protected $name = ''; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + */ + protected $self_link = ''; + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + */ + protected $project = ''; + protected $database_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#database`. + * @type string $charset + * The Cloud SQL charset value. + * @type string $collation + * The Cloud SQL collation value. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. + * @type string $name + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * @type string $instance + * The name of the Cloud SQL instance. This does not include the project ID. + * @type string $self_link + * The URI of this resource. + * @type string $project + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * @type \Google\Cloud\Sql\V1\SqlServerDatabaseDetails $sqlserver_database_details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + * @return string + */ + public function getCharset() + { + return $this->charset; + } + + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + * @param string $var + * @return $this + */ + public function setCharset($var) + { + GPBUtil::checkString($var, True); + $this->charset = $var; + + return $this; + } + + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9; + * @return \Google\Cloud\Sql\V1\SqlServerDatabaseDetails|null + */ + public function getSqlserverDatabaseDetails() + { + return $this->readOneof(9); + } + + public function hasSqlserverDatabaseDetails() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9; + * @param \Google\Cloud\Sql\V1\SqlServerDatabaseDetails $var + * @return $this + */ + public function setSqlserverDatabaseDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerDatabaseDetails::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getDatabaseDetails() + { + return $this->whichOneof("database_details"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php new file mode 100644 index 000000000000..6ff8e5bfce63 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php @@ -0,0 +1,125 @@ +google.cloud.sql.v1.DatabaseFlags + */ +class DatabaseFlags extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * @type string $value + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * 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 value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php new file mode 100644 index 000000000000..f4a643d52e7e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php @@ -0,0 +1,2157 @@ +google.cloud.sql.v1.DatabaseInstance + */ +class DatabaseInstance extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; + */ + protected $state = 0; + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; + */ + protected $database_version = 0; + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; + */ + protected $settings = null; + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + */ + protected $etag = ''; + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + */ + protected $failover_replica = null; + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + */ + protected $master_instance_name = ''; + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + */ + private $replica_names; + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @deprecated + */ + protected $max_disk_size = null; + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @deprecated + */ + protected $current_disk_size = null; + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; + */ + private $ip_addresses; + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; + */ + protected $server_ca_cert = null; + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; + */ + protected $instance_type = 0; + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + */ + protected $project = ''; + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @deprecated + */ + protected $ipv6_address = ''; + /** + * The service account email address assigned to the instance.\This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + */ + protected $service_account_email_address = ''; + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; + */ + protected $on_premises_configuration = null; + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; + */ + protected $replica_configuration = null; + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; + */ + protected $backend_type = 0; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + */ + protected $self_link = ''; + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; + */ + private $suspension_reason; + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + */ + protected $connection_name = ''; + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + */ + protected $name = ''; + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + */ + protected $region = ''; + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + */ + protected $gce_zone = ''; + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + */ + protected $secondary_gce_zone = ''; + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; + */ + protected $disk_encryption_configuration = null; + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; + */ + protected $disk_encryption_status = null; + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + */ + protected $root_password = ''; + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + */ + protected $scheduled_maintenance = null; + /** + * This status indicates whether the instance satisfies PZS. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + */ + protected $satisfies_pzs = null; + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_installed_version = ''; + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + */ + protected $out_of_disk_report = null; + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_maintenance_versions; + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + */ + protected $maintenance_version = ''; + /** + * Output only. All database versions that are available for upgrade. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AvailableDatabaseVersion upgradable_database_versions = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $upgradable_database_versions; + /** + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + */ + protected $sql_network_architecture = null; + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_service_attachment_link = null; + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dns_name = null; + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $primary_dns_name = null; + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $write_endpoint = null; + /** + * Optional. A primary instance and disaster recovery (DR) replica pair. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * experiences regional failure. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replication_cluster = null; + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + */ + protected $gemini_config = null; + /** + * Output only. This status indicates whether the instance satisfies PZI. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + /** + * Input only. Whether Cloud SQL is enabled to switch storing point-in-time + * recovery log files from a data disk to Cloud Storage. + * + * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $switch_transaction_logs_to_cloud_storage_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#instance`. + * @type int $state + * The current serving state of the Cloud SQL instance. + * @type int $database_version + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * @type \Google\Cloud\Sql\V1\Settings $settings + * The user settings. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica $failover_replica + * The name and status of the failover replica. + * @type string $master_instance_name + * The name of the instance which will act as primary in the replication + * setup. + * @type array|\Google\Protobuf\Internal\RepeatedField $replica_names + * The replicas of the instance. + * @type \Google\Protobuf\Int64Value $max_disk_size + * The maximum disk size of the instance in bytes. + * @type \Google\Protobuf\Int64Value $current_disk_size + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * @type array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * The assigned IP addresses for the instance. + * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert + * SSL configuration. + * @type int $instance_type + * The instance type. + * @type string $project + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * @type string $ipv6_address + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * @type string $service_account_email_address + * The service account email address assigned to the instance.\This + * property is read-only. + * @type \Google\Cloud\Sql\V1\OnPremisesConfiguration $on_premises_configuration + * Configuration specific to on-premises instances. + * @type \Google\Cloud\Sql\V1\ReplicaConfiguration $replica_configuration + * Configuration specific to failover replicas and read replicas. + * @type int $backend_type + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * @type string $self_link + * The URI of this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $suspension_reason + * If the instance state is SUSPENDED, the reason for the suspension. + * @type string $connection_name + * Connection name of the Cloud SQL instance used in connection strings. + * @type string $name + * Name of the Cloud SQL instance. This does not include the project ID. + * @type string $region + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * @type string $gce_zone + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * @type string $secondary_gce_zone + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * @type \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $disk_encryption_configuration + * Disk encryption configuration specific to an instance. + * @type \Google\Cloud\Sql\V1\DiskEncryptionStatus $disk_encryption_status + * Disk encryption status specific to an instance. + * @type string $root_password + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance $scheduled_maintenance + * The start time of any upcoming scheduled maintenance for this instance. + * @type \Google\Protobuf\BoolValue $satisfies_pzs + * This status indicates whether the instance satisfies PZS. + * The status is reserved for future use. + * @type string $database_installed_version + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport $out_of_disk_report + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_maintenance_versions + * Output only. List all maintenance versions applicable on the instance + * @type string $maintenance_version + * The current software version on the instance. + * @type array<\Google\Cloud\Sql\V1\AvailableDatabaseVersion>|\Google\Protobuf\Internal\RepeatedField $upgradable_database_versions + * Output only. All database versions that are available for upgrade. + * @type int $sql_network_architecture + * @type string $psc_service_attachment_link + * Output only. The link to service attachment of PSC instance. + * @type string $dns_name + * Output only. The dns name of the instance. + * @type string $primary_dns_name + * Output only. DEPRECATED: please use write_endpoint instead. + * @type string $write_endpoint + * Output only. The dns name of the primary instance in a replication group. + * @type \Google\Cloud\Sql\V1\ReplicationCluster $replication_cluster + * Optional. A primary instance and disaster recovery (DR) replica pair. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * experiences regional failure. Only applicable to MySQL. + * @type \Google\Cloud\Sql\V1\GeminiInstanceConfig $gemini_config + * Gemini instance configuration. + * @type \Google\Protobuf\BoolValue $satisfies_pzi + * Output only. This status indicates whether the instance satisfies PZI. + * The status is reserved for future use. + * @type \Google\Protobuf\BoolValue $switch_transaction_logs_to_cloud_storage_enabled + * Input only. Whether Cloud SQL is enabled to switch storing point-in-time + * recovery log files from a data disk to Cloud Storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlInstanceState::class); + $this->state = $var; + + return $this; + } + + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; + * @return int + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; + * @param int $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); + $this->database_version = $var; + + return $this; + } + + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; + * @return \Google\Cloud\Sql\V1\Settings|null + */ + public function getSettings() + { + return $this->settings; + } + + public function hasSettings() + { + return isset($this->settings); + } + + public function clearSettings() + { + unset($this->settings); + } + + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; + * @param \Google\Cloud\Sql\V1\Settings $var + * @return $this + */ + public function setSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Settings::class); + $this->settings = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica|null + */ + public function getFailoverReplica() + { + return $this->failover_replica; + } + + public function hasFailoverReplica() + { + return isset($this->failover_replica); + } + + public function clearFailoverReplica() + { + unset($this->failover_replica); + } + + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica $var + * @return $this + */ + public function setFailoverReplica($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica::class); + $this->failover_replica = $var; + + return $this; + } + + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + * @return string + */ + public function getMasterInstanceName() + { + return $this->master_instance_name; + } + + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + * @param string $var + * @return $this + */ + public function setMasterInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->master_instance_name = $var; + + return $this; + } + + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicaNames() + { + return $this->replica_names; + } + + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicaNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->replica_names = $arr; + + return $this; + } + + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @return \Google\Protobuf\Int64Value|null + * @deprecated + */ + public function getMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->max_disk_size; + } + + public function hasMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return isset($this->max_disk_size); + } + + public function clearMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + unset($this->max_disk_size); + } + + /** + * Returns the unboxed value from getMaxDiskSize() + + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @return int|string|null + */ + public function getMaxDiskSizeUnwrapped() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("max_disk_size"); + } + + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + * @deprecated + */ + public function setMaxDiskSize($var) + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_disk_size = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @param int|string|null $var + * @return $this + */ + public function setMaxDiskSizeUnwrapped($var) + { + $this->writeWrapperValue("max_disk_size", $var); + return $this;} + + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @return \Google\Protobuf\Int64Value|null + * @deprecated + */ + public function getCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->current_disk_size; + } + + public function hasCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return isset($this->current_disk_size); + } + + public function clearCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + unset($this->current_disk_size); + } + + /** + * Returns the unboxed value from getCurrentDiskSize() + + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @return int|string|null + */ + public function getCurrentDiskSizeUnwrapped() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("current_disk_size"); + } + + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + * @deprecated + */ + public function setCurrentDiskSize($var) + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->current_disk_size = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @param int|string|null $var + * @return $this + */ + public function setCurrentDiskSizeUnwrapped($var) + { + $this->writeWrapperValue("current_disk_size", $var); + return $this;} + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; + * @param array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\IpMapping::class); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; + * @return int + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; + * @param int $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstanceType::class); + $this->instance_type = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @return string + * @deprecated + */ + public function getIpv6Address() + { + @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); + return $this->ipv6_address; + } + + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setIpv6Address($var) + { + @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->ipv6_address = $var; + + return $this; + } + + /** + * The service account email address assigned to the instance.\This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + * @return string + */ + public function getServiceAccountEmailAddress() + { + return $this->service_account_email_address; + } + + /** + * The service account email address assigned to the instance.\This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + * @param string $var + * @return $this + */ + public function setServiceAccountEmailAddress($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email_address = $var; + + return $this; + } + + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; + * @return \Google\Cloud\Sql\V1\OnPremisesConfiguration|null + */ + public function getOnPremisesConfiguration() + { + return $this->on_premises_configuration; + } + + public function hasOnPremisesConfiguration() + { + return isset($this->on_premises_configuration); + } + + public function clearOnPremisesConfiguration() + { + unset($this->on_premises_configuration); + } + + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; + * @param \Google\Cloud\Sql\V1\OnPremisesConfiguration $var + * @return $this + */ + public function setOnPremisesConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OnPremisesConfiguration::class); + $this->on_premises_configuration = $var; + + return $this; + } + + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; + * @return \Google\Cloud\Sql\V1\ReplicaConfiguration|null + */ + public function getReplicaConfiguration() + { + return $this->replica_configuration; + } + + public function hasReplicaConfiguration() + { + return isset($this->replica_configuration); + } + + public function clearReplicaConfiguration() + { + unset($this->replica_configuration); + } + + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; + * @param \Google\Cloud\Sql\V1\ReplicaConfiguration $var + * @return $this + */ + public function setReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicaConfiguration::class); + $this->replica_configuration = $var; + + return $this; + } + + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSuspensionReason() + { + return $this->suspension_reason; + } + + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSuspensionReason($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1\SqlSuspensionReason::class); + $this->suspension_reason = $arr; + + return $this; + } + + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + * @return string + */ + public function getConnectionName() + { + return $this->connection_name; + } + + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + * @param string $var + * @return $this + */ + public function setConnectionName($var) + { + GPBUtil::checkString($var, True); + $this->connection_name = $var; + + return $this; + } + + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + * @return string + */ + public function getGceZone() + { + return $this->gce_zone; + } + + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + * @param string $var + * @return $this + */ + public function setGceZone($var) + { + GPBUtil::checkString($var, True); + $this->gce_zone = $var; + + return $this; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + * @return string + */ + public function getSecondaryGceZone() + { + return $this->secondary_gce_zone; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + * @param string $var + * @return $this + */ + public function setSecondaryGceZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_gce_zone = $var; + + return $this; + } + + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; + * @return \Google\Cloud\Sql\V1\DiskEncryptionConfiguration|null + */ + public function getDiskEncryptionConfiguration() + { + return $this->disk_encryption_configuration; + } + + public function hasDiskEncryptionConfiguration() + { + return isset($this->disk_encryption_configuration); + } + + public function clearDiskEncryptionConfiguration() + { + unset($this->disk_encryption_configuration); + } + + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; + * @param \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $var + * @return $this + */ + public function setDiskEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionConfiguration::class); + $this->disk_encryption_configuration = $var; + + return $this; + } + + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; + * @return \Google\Cloud\Sql\V1\DiskEncryptionStatus|null + */ + public function getDiskEncryptionStatus() + { + return $this->disk_encryption_status; + } + + public function hasDiskEncryptionStatus() + { + return isset($this->disk_encryption_status); + } + + public function clearDiskEncryptionStatus() + { + unset($this->disk_encryption_status); + } + + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; + * @param \Google\Cloud\Sql\V1\DiskEncryptionStatus $var + * @return $this + */ + public function setDiskEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionStatus::class); + $this->disk_encryption_status = $var; + + return $this; + } + + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + * @return string + */ + public function getRootPassword() + { + return $this->root_password; + } + + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + * @param string $var + * @return $this + */ + public function setRootPassword($var) + { + GPBUtil::checkString($var, True); + $this->root_password = $var; + + return $this; + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance|null + */ + public function getScheduledMaintenance() + { + return $this->scheduled_maintenance; + } + + public function hasScheduledMaintenance() + { + return isset($this->scheduled_maintenance); + } + + public function clearScheduledMaintenance() + { + unset($this->scheduled_maintenance); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance $var + * @return $this + */ + public function setScheduledMaintenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance::class); + $this->scheduled_maintenance = $var; + + return $this; + } + + /** + * This status indicates whether the instance satisfies PZS. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Returns the unboxed value from getSatisfiesPzs() + + * This status indicates whether the instance satisfies PZS. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @return bool|null + */ + public function getSatisfiesPzsUnwrapped() + { + return $this->readWrapperValue("satisfies_pzs"); + } + + /** + * This status indicates whether the instance satisfies PZS. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * This status indicates whether the instance satisfies PZS. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @param bool|null $var + * @return $this + */ + public function setSatisfiesPzsUnwrapped($var) + { + $this->writeWrapperValue("satisfies_pzs", $var); + return $this;} + + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseInstalledVersion() + { + return $this->database_installed_version; + } + + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseInstalledVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_installed_version = $var; + + return $this; + } + + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport|null + */ + public function getOutOfDiskReport() + { + return $this->out_of_disk_report; + } + + public function hasOutOfDiskReport() + { + return isset($this->out_of_disk_report); + } + + public function clearOutOfDiskReport() + { + unset($this->out_of_disk_report); + } + + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport $var + * @return $this + */ + public function setOutOfDiskReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport::class); + $this->out_of_disk_report = $var; + + return $this; + } + + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.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. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAvailableMaintenanceVersions() + { + return $this->available_maintenance_versions; + } + + /** + * Output only. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAvailableMaintenanceVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->available_maintenance_versions = $arr; + + return $this; + } + + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + * @return string + */ + public function getMaintenanceVersion() + { + return $this->maintenance_version; + } + + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + * @param string $var + * @return $this + */ + public function setMaintenanceVersion($var) + { + GPBUtil::checkString($var, True); + $this->maintenance_version = $var; + + return $this; + } + + /** + * Output only. All database versions that are available for upgrade. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AvailableDatabaseVersion upgradable_database_versions = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpgradableDatabaseVersions() + { + return $this->upgradable_database_versions; + } + + /** + * Output only. All database versions that are available for upgrade. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AvailableDatabaseVersion upgradable_database_versions = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Sql\V1\AvailableDatabaseVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpgradableDatabaseVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\AvailableDatabaseVersion::class); + $this->upgradable_database_versions = $arr; + + return $this; + } + + /** + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + * @return int + */ + public function getSqlNetworkArchitecture() + { + return isset($this->sql_network_architecture) ? $this->sql_network_architecture : 0; + } + + public function hasSqlNetworkArchitecture() + { + return isset($this->sql_network_architecture); + } + + public function clearSqlNetworkArchitecture() + { + unset($this->sql_network_architecture); + } + + /** + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + * @param int $var + * @return $this + */ + public function setSqlNetworkArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlNetworkArchitecture::class); + $this->sql_network_architecture = $var; + + return $this; + } + + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPscServiceAttachmentLink() + { + return isset($this->psc_service_attachment_link) ? $this->psc_service_attachment_link : ''; + } + + public function hasPscServiceAttachmentLink() + { + return isset($this->psc_service_attachment_link); + } + + public function clearPscServiceAttachmentLink() + { + unset($this->psc_service_attachment_link); + } + + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPscServiceAttachmentLink($var) + { + GPBUtil::checkString($var, True); + $this->psc_service_attachment_link = $var; + + return $this; + } + + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDnsName() + { + return isset($this->dns_name) ? $this->dns_name : ''; + } + + public function hasDnsName() + { + return isset($this->dns_name); + } + + public function clearDnsName() + { + unset($this->dns_name); + } + + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDnsName($var) + { + GPBUtil::checkString($var, True); + $this->dns_name = $var; + + return $this; + } + + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + return isset($this->primary_dns_name) ? $this->primary_dns_name : ''; + } + + public function hasPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + return isset($this->primary_dns_name); + } + + public function clearPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + unset($this->primary_dns_name); + } + + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPrimaryDnsName($var) + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->primary_dns_name = $var; + + return $this; + } + + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWriteEndpoint() + { + return isset($this->write_endpoint) ? $this->write_endpoint : ''; + } + + public function hasWriteEndpoint() + { + return isset($this->write_endpoint); + } + + public function clearWriteEndpoint() + { + unset($this->write_endpoint); + } + + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWriteEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->write_endpoint = $var; + + return $this; + } + + /** + * Optional. A primary instance and disaster recovery (DR) replica pair. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * experiences regional failure. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ReplicationCluster|null + */ + public function getReplicationCluster() + { + return $this->replication_cluster; + } + + public function hasReplicationCluster() + { + return isset($this->replication_cluster); + } + + public function clearReplicationCluster() + { + unset($this->replication_cluster); + } + + /** + * Optional. A primary instance and disaster recovery (DR) replica pair. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * experiences regional failure. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ReplicationCluster $var + * @return $this + */ + public function setReplicationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicationCluster::class); + $this->replication_cluster = $var; + + return $this; + } + + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + * @return \Google\Cloud\Sql\V1\GeminiInstanceConfig|null + */ + public function getGeminiConfig() + { + return $this->gemini_config; + } + + public function hasGeminiConfig() + { + return isset($this->gemini_config); + } + + public function clearGeminiConfig() + { + unset($this->gemini_config); + } + + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + * @param \Google\Cloud\Sql\V1\GeminiInstanceConfig $var + * @return $this + */ + public function setGeminiConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\GeminiInstanceConfig::class); + $this->gemini_config = $var; + + return $this; + } + + /** + * Output only. This status indicates whether the instance satisfies PZI. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSatisfiesPzi() + { + return $this->satisfies_pzi; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Returns the unboxed value from getSatisfiesPzi() + + * Output only. This status indicates whether the instance satisfies PZI. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool|null + */ + public function getSatisfiesPziUnwrapped() + { + return $this->readWrapperValue("satisfies_pzi"); + } + + /** + * Output only. This status indicates whether the instance satisfies PZI. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Output only. This status indicates whether the instance satisfies PZI. + * The status is reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool|null $var + * @return $this + */ + public function setSatisfiesPziUnwrapped($var) + { + $this->writeWrapperValue("satisfies_pzi", $var); + return $this;} + + /** + * Input only. Whether Cloud SQL is enabled to switch storing point-in-time + * recovery log files from a data disk to Cloud Storage. + * + * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSwitchTransactionLogsToCloudStorageEnabled() + { + return $this->switch_transaction_logs_to_cloud_storage_enabled; + } + + public function hasSwitchTransactionLogsToCloudStorageEnabled() + { + return isset($this->switch_transaction_logs_to_cloud_storage_enabled); + } + + public function clearSwitchTransactionLogsToCloudStorageEnabled() + { + unset($this->switch_transaction_logs_to_cloud_storage_enabled); + } + + /** + * Returns the unboxed value from getSwitchTransactionLogsToCloudStorageEnabled() + + * Input only. Whether Cloud SQL is enabled to switch storing point-in-time + * recovery log files from a data disk to Cloud Storage. + * + * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool|null + */ + public function getSwitchTransactionLogsToCloudStorageEnabledUnwrapped() + { + return $this->readWrapperValue("switch_transaction_logs_to_cloud_storage_enabled"); + } + + /** + * Input only. Whether Cloud SQL is enabled to switch storing point-in-time + * recovery log files from a data disk to Cloud Storage. + * + * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSwitchTransactionLogsToCloudStorageEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->switch_transaction_logs_to_cloud_storage_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Input only. Whether Cloud SQL is enabled to switch storing point-in-time + * recovery log files from a data disk to Cloud Storage. + * + * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool|null $var + * @return $this + */ + public function setSwitchTransactionLogsToCloudStorageEnabledUnwrapped($var) + { + $this->writeWrapperValue("switch_transaction_logs_to_cloud_storage_enabled", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php new file mode 100644 index 000000000000..ee7d98530190 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php @@ -0,0 +1,159 @@ +google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica + */ +class SqlFailoverReplica extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + */ + protected $available = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * @type \Google\Protobuf\BoolValue $available + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project 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 availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getAvailable() + { + return $this->available; + } + + public function hasAvailable() + { + return isset($this->available); + } + + public function clearAvailable() + { + unset($this->available); + } + + /** + * Returns the unboxed value from getAvailable() + + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @return bool|null + */ + public function getAvailableUnwrapped() + { + return $this->readWrapperValue("available"); + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setAvailable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->available = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @param bool|null $var + * @return $this + */ + public function setAvailableUnwrapped($var) + { + $this->writeWrapperValue("available", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlFailoverReplica::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlFailoverReplica::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php new file mode 100644 index 000000000000..a4a61d210edb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php @@ -0,0 +1,100 @@ +google.cloud.sql.v1.DatabaseInstance.SqlInstanceState + */ +class SqlInstanceState +{ + /** + * The state of the instance is unknown. + * + * Generated from protobuf enum SQL_INSTANCE_STATE_UNSPECIFIED = 0; + */ + const SQL_INSTANCE_STATE_UNSPECIFIED = 0; + /** + * The instance is running, or has been stopped by owner. + * + * Generated from protobuf enum RUNNABLE = 1; + */ + const RUNNABLE = 1; + /** + * The instance is not available, for example due to problems with billing. + * + * Generated from protobuf enum SUSPENDED = 2; + */ + const SUSPENDED = 2; + /** + * The instance is being deleted. + * + * Generated from protobuf enum PENDING_DELETE = 3; + */ + const PENDING_DELETE = 3; + /** + * The instance is being created. + * + * Generated from protobuf enum PENDING_CREATE = 4; + */ + const PENDING_CREATE = 4; + /** + * The instance is down for maintenance. + * + * Generated from protobuf enum MAINTENANCE = 5; + */ + const MAINTENANCE = 5; + /** + * The creation of the instance failed or a fatal error occurred during + * maintenance. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Deprecated + * + * Generated from protobuf enum ONLINE_MAINTENANCE = 7 [deprecated = true]; + */ + const ONLINE_MAINTENANCE = 7; + + private static $valueToName = [ + self::SQL_INSTANCE_STATE_UNSPECIFIED => 'SQL_INSTANCE_STATE_UNSPECIFIED', + self::RUNNABLE => 'RUNNABLE', + self::SUSPENDED => 'SUSPENDED', + self::PENDING_DELETE => 'PENDING_DELETE', + self::PENDING_CREATE => 'PENDING_CREATE', + self::MAINTENANCE => 'MAINTENANCE', + self::FAILED => 'FAILED', + self::ONLINE_MAINTENANCE => 'ONLINE_MAINTENANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlInstanceState::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlInstanceState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php new file mode 100644 index 000000000000..78fb88c614f8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php @@ -0,0 +1,62 @@ +google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture + */ +class SqlNetworkArchitecture +{ + /** + * Generated from protobuf enum SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + */ + const SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The instance uses the new network architecture. + * + * Generated from protobuf enum NEW_NETWORK_ARCHITECTURE = 1; + */ + const NEW_NETWORK_ARCHITECTURE = 1; + /** + * The instance uses the old network architecture. + * + * Generated from protobuf enum OLD_NETWORK_ARCHITECTURE = 2; + */ + const OLD_NETWORK_ARCHITECTURE = 2; + + private static $valueToName = [ + self::SQL_NETWORK_ARCHITECTURE_UNSPECIFIED => 'SQL_NETWORK_ARCHITECTURE_UNSPECIFIED', + self::NEW_NETWORK_ARCHITECTURE => 'NEW_NETWORK_ARCHITECTURE', + self::OLD_NETWORK_ARCHITECTURE => 'OLD_NETWORK_ARCHITECTURE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlNetworkArchitecture::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlNetworkArchitecture::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php new file mode 100644 index 000000000000..8e07020085dd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php @@ -0,0 +1,160 @@ +google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport + */ +class SqlOutOfDiskReport extends \Google\Protobuf\Internal\Message +{ + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + */ + protected $sql_out_of_disk_state = null; + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + */ + protected $sql_min_recommended_increase_size_gb = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $sql_out_of_disk_state + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * @type int $sql_min_recommended_increase_size_gb + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + * @return int + */ + public function getSqlOutOfDiskState() + { + return isset($this->sql_out_of_disk_state) ? $this->sql_out_of_disk_state : 0; + } + + public function hasSqlOutOfDiskState() + { + return isset($this->sql_out_of_disk_state); + } + + public function clearSqlOutOfDiskState() + { + unset($this->sql_out_of_disk_state); + } + + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + * @param int $var + * @return $this + */ + public function setSqlOutOfDiskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport\SqlOutOfDiskState::class); + $this->sql_out_of_disk_state = $var; + + return $this; + } + + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + * @return int + */ + public function getSqlMinRecommendedIncreaseSizeGb() + { + return isset($this->sql_min_recommended_increase_size_gb) ? $this->sql_min_recommended_increase_size_gb : 0; + } + + public function hasSqlMinRecommendedIncreaseSizeGb() + { + return isset($this->sql_min_recommended_increase_size_gb); + } + + public function clearSqlMinRecommendedIncreaseSizeGb() + { + unset($this->sql_min_recommended_increase_size_gb); + } + + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + * @param int $var + * @return $this + */ + public function setSqlMinRecommendedIncreaseSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->sql_min_recommended_increase_size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOutOfDiskReport::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlOutOfDiskReport::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php new file mode 100644 index 000000000000..5138c1304df8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState + */ +class SqlOutOfDiskState +{ + /** + * Unspecified state + * + * Generated from protobuf enum SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; + */ + const SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; + /** + * The instance has plenty space on data disk + * + * Generated from protobuf enum NORMAL = 1; + */ + const NORMAL = 1; + /** + * Data disk is almost used up. It is shutdown to prevent data + * corruption. + * + * Generated from protobuf enum SOFT_SHUTDOWN = 2; + */ + const SOFT_SHUTDOWN = 2; + + private static $valueToName = [ + self::SQL_OUT_OF_DISK_STATE_UNSPECIFIED => 'SQL_OUT_OF_DISK_STATE_UNSPECIFIED', + self::NORMAL => 'NORMAL', + self::SOFT_SHUTDOWN => 'SOFT_SHUTDOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOutOfDiskState::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlOutOfDiskReport_SqlOutOfDiskState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php new file mode 100644 index 000000000000..100d09af9e5a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php @@ -0,0 +1,190 @@ +google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance + */ +class SqlScheduledMaintenance extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @deprecated + */ + protected $can_defer = false; + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + */ + protected $can_reschedule = false; + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + */ + protected $schedule_deadline_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of any upcoming scheduled maintenance for this instance. + * @type bool $can_defer + * @type bool $can_reschedule + * If the scheduled maintenance can be rescheduled. + * @type \Google\Protobuf\Timestamp $schedule_deadline_time + * Maintenance cannot be rescheduled to start beyond this deadline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * 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 any upcoming scheduled maintenance for this instance. + * + * 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; + } + + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getCanDefer() + { + @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); + return $this->can_defer; + } + + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setCanDefer($var) + { + @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->can_defer = $var; + + return $this; + } + + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + * @return bool + */ + public function getCanReschedule() + { + return $this->can_reschedule; + } + + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + * @param bool $var + * @return $this + */ + public function setCanReschedule($var) + { + GPBUtil::checkBool($var); + $this->can_reschedule = $var; + + return $this; + } + + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleDeadlineTime() + { + return $this->schedule_deadline_time; + } + + public function hasScheduleDeadlineTime() + { + return isset($this->schedule_deadline_time); + } + + public function clearScheduleDeadlineTime() + { + unset($this->schedule_deadline_time); + } + + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleDeadlineTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_deadline_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlScheduledMaintenance::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlScheduledMaintenance::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php new file mode 100644 index 000000000000..aadf490102b2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.DatabasesListResponse + */ +class DatabasesListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#databasesList`. + * @type array<\Google\Cloud\Sql\V1\Database>|\Google\Protobuf\Internal\RepeatedField $items + * List of database resources in the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; + * @param array<\Google\Cloud\Sql\V1\Database>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Database::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php new file mode 100644 index 000000000000..062b74cae1e8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1.DemoteContext + */ +class DemoteContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_representative_instance_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteContext`. + * @type string $source_representative_instance_name + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceRepresentativeInstanceName() + { + return $this->source_representative_instance_name; + } + + /** + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceRepresentativeInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->source_representative_instance_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php new file mode 100644 index 000000000000..7a13ebe2beda --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php @@ -0,0 +1,132 @@ +google.cloud.sql.v1.DemoteMasterConfiguration + */ +class DemoteMasterConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + */ + protected $mysql_replica_configuration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterConfiguration`. + * @type \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration $mysql_replica_configuration + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + * @return \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration|null + */ + public function getMysqlReplicaConfiguration() + { + return $this->mysql_replica_configuration; + } + + public function hasMysqlReplicaConfiguration() + { + return isset($this->mysql_replica_configuration); + } + + public function clearMysqlReplicaConfiguration() + { + unset($this->mysql_replica_configuration); + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + * @param \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration $var + * @return $this + */ + public function setMysqlReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration::class); + $this->mysql_replica_configuration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php new file mode 100644 index 000000000000..89f01303456f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php @@ -0,0 +1,294 @@ +google.cloud.sql.v1.DemoteMasterContext + */ +class DemoteMasterContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + */ + protected $verify_gtid_consistency = null; + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + */ + protected $master_instance_name = ''; + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; + */ + protected $replica_configuration = null; + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + */ + protected $skip_replication_setup = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterContext`. + * @type \Google\Protobuf\BoolValue $verify_gtid_consistency + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * @type string $master_instance_name + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * @type \Google\Cloud\Sql\V1\DemoteMasterConfiguration $replica_configuration + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * @type bool $skip_replication_setup + * Flag to skip replication setup on the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getVerifyGtidConsistency() + { + return $this->verify_gtid_consistency; + } + + public function hasVerifyGtidConsistency() + { + return isset($this->verify_gtid_consistency); + } + + public function clearVerifyGtidConsistency() + { + unset($this->verify_gtid_consistency); + } + + /** + * Returns the unboxed value from getVerifyGtidConsistency() + + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @return bool|null + */ + public function getVerifyGtidConsistencyUnwrapped() + { + return $this->readWrapperValue("verify_gtid_consistency"); + } + + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setVerifyGtidConsistency($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->verify_gtid_consistency = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @param bool|null $var + * @return $this + */ + public function setVerifyGtidConsistencyUnwrapped($var) + { + $this->writeWrapperValue("verify_gtid_consistency", $var); + return $this;} + + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + * @return string + */ + public function getMasterInstanceName() + { + return $this->master_instance_name; + } + + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + * @param string $var + * @return $this + */ + public function setMasterInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->master_instance_name = $var; + + return $this; + } + + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; + * @return \Google\Cloud\Sql\V1\DemoteMasterConfiguration|null + */ + public function getReplicaConfiguration() + { + return $this->replica_configuration; + } + + public function hasReplicaConfiguration() + { + return isset($this->replica_configuration); + } + + public function clearReplicaConfiguration() + { + unset($this->replica_configuration); + } + + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; + * @param \Google\Cloud\Sql\V1\DemoteMasterConfiguration $var + * @return $this + */ + public function setReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterConfiguration::class); + $this->replica_configuration = $var; + + return $this; + } + + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + * @return bool + */ + public function getSkipReplicationSetup() + { + return $this->skip_replication_setup; + } + + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + * @param bool $var + * @return $this + */ + public function setSkipReplicationSetup($var) + { + GPBUtil::checkBool($var); + $this->skip_replication_setup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php new file mode 100644 index 000000000000..3c5d89aa32d2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php @@ -0,0 +1,245 @@ +google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration + */ +class DemoteMasterMySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + */ + protected $password = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + */ + protected $client_key = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + */ + protected $client_certificate = ''; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + */ + protected $ca_certificate = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * @type string $username + * The username for the replication connection. + * @type string $password + * The password for the replication connection. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php new file mode 100644 index 000000000000..74bae8b5cfdb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php @@ -0,0 +1,164 @@ +google.cloud.sql.v1.DenyMaintenancePeriod + */ +class DenyMaintenancePeriod extends \Google\Protobuf\Internal\Message +{ + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + */ + protected $start_date = ''; + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + */ + protected $end_date = ''; + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + */ + protected $time = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_date + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * @type string $end_date + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * @type string $time + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + * @return string + */ + public function getStartDate() + { + return $this->start_date; + } + + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + * @param string $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkString($var, True); + $this->start_date = $var; + + return $this; + } + + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + * @return string + */ + public function getEndDate() + { + return $this->end_date; + } + + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + * @param string $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkString($var, True); + $this->end_date = $var; + + return $this; + } + + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + * @return string + */ + public function getTime() + { + return $this->time; + } + + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + * @param string $var + * @return $this + */ + public function setTime($var) + { + GPBUtil::checkString($var, True); + $this->time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php new file mode 100644 index 000000000000..cc5e86839a03 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.DiskEncryptionConfiguration + */ +class DiskEncryptionConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + */ + protected $kms_key_name = ''; + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Resource name of KMS key for disk encryption + * @type string $kind + * This is always `sql#diskEncryptionConfiguration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php new file mode 100644 index 000000000000..9d2eb56e3d7e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.DiskEncryptionStatus + */ +class DiskEncryptionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + */ + protected $kms_key_version_name = ''; + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_version_name + * KMS key version used to encrypt the Cloud SQL instance resource + * @type string $kind + * This is always `sql#diskEncryptionStatus`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + * @return string + */ + public function getKmsKeyVersionName() + { + return $this->kms_key_version_name; + } + + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_name = $var; + + return $this; + } + + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php new file mode 100644 index 000000000000..829e466796b3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php @@ -0,0 +1,436 @@ +google.cloud.sql.v1.ExportContext + */ +class ExportContext extends \Google\Protobuf\Internal\Message +{ + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + */ + private $databases; + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; + */ + protected $sql_export_options = null; + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; + */ + protected $csv_export_options = null; + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; + */ + protected $file_type = 0; + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + */ + protected $offload = null; + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; + */ + protected $bak_export_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * @type array|\Google\Protobuf\Internal\RepeatedField $databases + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * @type string $kind + * This is always `sql#exportContext`. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions $sql_export_options + * Options for exporting data as SQL statements. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions $csv_export_options + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * @type int $file_type + * The file type for the specified uri. + * @type \Google\Protobuf\BoolValue $offload + * Option for export offload. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions $bak_export_options + * Options for exporting data as BAK files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * 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; + } + + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabases() + { + return $this->databases; + } + + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->databases = $arr; + + return $this; + } + + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions|null + */ + public function getSqlExportOptions() + { + return $this->sql_export_options; + } + + public function hasSqlExportOptions() + { + return isset($this->sql_export_options); + } + + public function clearSqlExportOptions() + { + unset($this->sql_export_options); + } + + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions $var + * @return $this + */ + public function setSqlExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions::class); + $this->sql_export_options = $var; + + return $this; + } + + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions|null + */ + public function getCsvExportOptions() + { + return $this->csv_export_options; + } + + public function hasCsvExportOptions() + { + return isset($this->csv_export_options); + } + + public function clearCsvExportOptions() + { + unset($this->csv_export_options); + } + + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions $var + * @return $this + */ + public function setCsvExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions::class); + $this->csv_export_options = $var; + + return $this; + } + + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; + * @return int + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; + * @param int $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFileType::class); + $this->file_type = $var; + + return $this; + } + + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @return \Google\Protobuf\BoolValue|null + */ + public function getOffload() + { + return $this->offload; + } + + public function hasOffload() + { + return isset($this->offload); + } + + public function clearOffload() + { + unset($this->offload); + } + + /** + * Returns the unboxed value from getOffload() + + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @return bool|null + */ + public function getOffloadUnwrapped() + { + return $this->readWrapperValue("offload"); + } + + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setOffload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->offload = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @param bool|null $var + * @return $this + */ + public function setOffloadUnwrapped($var) + { + $this->writeWrapperValue("offload", $var); + return $this;} + + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions|null + */ + public function getBakExportOptions() + { + return $this->bak_export_options; + } + + public function hasBakExportOptions() + { + return isset($this->bak_export_options); + } + + public function clearBakExportOptions() + { + unset($this->bak_export_options); + } + + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions $var + * @return $this + */ + public function setBakExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions::class); + $this->bak_export_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php new file mode 100644 index 000000000000..9eebf409ce5f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php @@ -0,0 +1,380 @@ +google.cloud.sql.v1.ExportContext.SqlBakExportOptions + */ +class SqlBakExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + */ + protected $striped = null; + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + */ + protected $stripe_count = null; + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; + */ + protected $bak_type = 0; + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @deprecated + */ + protected $copy_only = null; + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + */ + protected $differential_base = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $striped + * Whether or not the export should be striped. + * @type \Google\Protobuf\Int32Value $stripe_count + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * @type int $bak_type + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * @type \Google\Protobuf\BoolValue $copy_only + * Deprecated: copy_only is deprecated. Use differential_base instead + * @type \Google\Protobuf\BoolValue $differential_base + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStriped() + { + return $this->striped; + } + + public function hasStriped() + { + return isset($this->striped); + } + + public function clearStriped() + { + unset($this->striped); + } + + /** + * Returns the unboxed value from getStriped() + + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @return bool|null + */ + public function getStripedUnwrapped() + { + return $this->readWrapperValue("striped"); + } + + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStriped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->striped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @param bool|null $var + * @return $this + */ + public function setStripedUnwrapped($var) + { + $this->writeWrapperValue("striped", $var); + return $this;} + + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getStripeCount() + { + return $this->stripe_count; + } + + public function hasStripeCount() + { + return isset($this->stripe_count); + } + + public function clearStripeCount() + { + unset($this->stripe_count); + } + + /** + * Returns the unboxed value from getStripeCount() + + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @return int|null + */ + public function getStripeCountUnwrapped() + { + return $this->readWrapperValue("stripe_count"); + } + + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setStripeCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->stripe_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @param int|null $var + * @return $this + */ + public function setStripeCountUnwrapped($var) + { + $this->writeWrapperValue("stripe_count", $var); + return $this;} + + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; + * @return int + */ + public function getBakType() + { + return $this->bak_type; + } + + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; + * @param int $var + * @return $this + */ + public function setBakType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BakType::class); + $this->bak_type = $var; + + return $this; + } + + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return $this->copy_only; + } + + public function hasCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return isset($this->copy_only); + } + + public function clearCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + unset($this->copy_only); + } + + /** + * Returns the unboxed value from getCopyOnly() + + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @return bool|null + */ + public function getCopyOnlyUnwrapped() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("copy_only"); + } + + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setCopyOnly($var) + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->copy_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setCopyOnlyUnwrapped($var) + { + $this->writeWrapperValue("copy_only", $var); + return $this;} + + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDifferentialBase() + { + return $this->differential_base; + } + + public function hasDifferentialBase() + { + return isset($this->differential_base); + } + + public function clearDifferentialBase() + { + unset($this->differential_base); + } + + /** + * Returns the unboxed value from getDifferentialBase() + + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @return bool|null + */ + public function getDifferentialBaseUnwrapped() + { + return $this->readWrapperValue("differential_base"); + } + + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDifferentialBase($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->differential_base = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @param bool|null $var + * @return $this + */ + public function setDifferentialBaseUnwrapped($var) + { + $this->writeWrapperValue("differential_base", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlBakExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlBakExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php new file mode 100644 index 000000000000..c73966c0af69 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php @@ -0,0 +1,216 @@ +google.cloud.sql.v1.ExportContext.SqlCsvExportOptions + */ +class SqlCsvExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + */ + protected $select_query = ''; + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + */ + protected $escape_character = ''; + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + */ + protected $quote_character = ''; + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + */ + protected $fields_terminated_by = ''; + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + */ + protected $lines_terminated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $select_query + * The select query used to extract the data. + * @type string $escape_character + * Specifies the character that should appear before a data character that + * needs to be escaped. + * @type string $quote_character + * Specifies the quoting character to be used when a data value is quoted. + * @type string $fields_terminated_by + * Specifies the character that separates columns within each row (line) of + * the file. + * @type string $lines_terminated_by + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + * @return string + */ + public function getSelectQuery() + { + return $this->select_query; + } + + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + * @param string $var + * @return $this + */ + public function setSelectQuery($var) + { + GPBUtil::checkString($var, True); + $this->select_query = $var; + + return $this; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + * @return string + */ + public function getEscapeCharacter() + { + return $this->escape_character; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + * @param string $var + * @return $this + */ + public function setEscapeCharacter($var) + { + GPBUtil::checkString($var, True); + $this->escape_character = $var; + + return $this; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + * @return string + */ + public function getQuoteCharacter() + { + return $this->quote_character; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + * @param string $var + * @return $this + */ + public function setQuoteCharacter($var) + { + GPBUtil::checkString($var, True); + $this->quote_character = $var; + + return $this; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + * @return string + */ + public function getFieldsTerminatedBy() + { + return $this->fields_terminated_by; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + * @param string $var + * @return $this + */ + public function setFieldsTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->fields_terminated_by = $var; + + return $this; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + * @return string + */ + public function getLinesTerminatedBy() + { + return $this->lines_terminated_by; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + * @param string $var + * @return $this + */ + public function setLinesTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->lines_terminated_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlCsvExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlCsvExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php new file mode 100644 index 000000000000..04e4ea02ebc9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php @@ -0,0 +1,370 @@ +google.cloud.sql.v1.ExportContext.SqlExportOptions + */ +class SqlExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + */ + private $tables; + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + */ + protected $schema_only = null; + /** + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + */ + protected $mysql_export_options = null; + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threads = null; + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallel = null; + /** + * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions postgres_export_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $postgres_export_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $tables + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * @type \Google\Protobuf\BoolValue $schema_only + * Export only schemas. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions $mysql_export_options + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel export. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the export should be parallel. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions $postgres_export_options + * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTables() + { + return $this->tables; + } + + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tables = $arr; + + return $this; + } + + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSchemaOnly() + { + return $this->schema_only; + } + + public function hasSchemaOnly() + { + return isset($this->schema_only); + } + + public function clearSchemaOnly() + { + unset($this->schema_only); + } + + /** + * Returns the unboxed value from getSchemaOnly() + + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @return bool|null + */ + public function getSchemaOnlyUnwrapped() + { + return $this->readWrapperValue("schema_only"); + } + + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSchemaOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->schema_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @param bool|null $var + * @return $this + */ + public function setSchemaOnlyUnwrapped($var) + { + $this->writeWrapperValue("schema_only", $var); + return $this;} + + /** + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions|null + */ + public function getMysqlExportOptions() + { + return $this->mysql_export_options; + } + + public function hasMysqlExportOptions() + { + return isset($this->mysql_export_options); + } + + public function clearMysqlExportOptions() + { + unset($this->mysql_export_options); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions $var + * @return $this + */ + public function setMysqlExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions::class); + $this->mysql_export_options = $var; + + return $this; + } + + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsUnwrapped() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsUnwrapped($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelUnwrapped() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelUnwrapped($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + + /** + * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions postgres_export_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions|null + */ + public function getPostgresExportOptions() + { + return $this->postgres_export_options; + } + + public function hasPostgresExportOptions() + { + return isset($this->postgres_export_options); + } + + public function clearPostgresExportOptions() + { + unset($this->postgres_export_options); + } + + /** + * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions postgres_export_options = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions $var + * @return $this + */ + public function setPostgresExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions::class); + $this->postgres_export_options = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php new file mode 100644 index 000000000000..113b82d013e4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php @@ -0,0 +1,137 @@ +google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions + */ +class MysqlExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + */ + protected $master_data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $master_data + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getMasterData() + { + return $this->master_data; + } + + public function hasMasterData() + { + return isset($this->master_data); + } + + public function clearMasterData() + { + unset($this->master_data); + } + + /** + * Returns the unboxed value from getMasterData() + + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @return int|null + */ + public function getMasterDataUnwrapped() + { + return $this->readWrapperValue("master_data"); + } + + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setMasterData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->master_data = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @param int|null $var + * @return $this + */ + public function setMasterDataUnwrapped($var) + { + $this->writeWrapperValue("master_data", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MysqlExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions_MysqlExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php new file mode 100644 index 000000000000..1ff2881f0909 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php @@ -0,0 +1,196 @@ +google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions + */ +class PostgresExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Use this option to include DROP SQL statements. + * These statements are used to delete database objects before running the + * import operation. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $clean = null; + /** + * Optional. Option to include an IF EXISTS SQL statement with each DROP + * statement produced by clean. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $if_exists = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $clean + * Optional. Use this option to include DROP SQL statements. + * These statements are used to delete database objects before running the + * import operation. + * @type \Google\Protobuf\BoolValue $if_exists + * Optional. Option to include an IF EXISTS SQL statement with each DROP + * statement produced by clean. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Use this option to include DROP SQL statements. + * These statements are used to delete database objects before running the + * import operation. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getClean() + { + return $this->clean; + } + + public function hasClean() + { + return isset($this->clean); + } + + public function clearClean() + { + unset($this->clean); + } + + /** + * Returns the unboxed value from getClean() + + * Optional. Use this option to include DROP SQL statements. + * These statements are used to delete database objects before running the + * import operation. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getCleanUnwrapped() + { + return $this->readWrapperValue("clean"); + } + + /** + * Optional. Use this option to include DROP SQL statements. + * These statements are used to delete database objects before running the + * import operation. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setClean($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->clean = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Use this option to include DROP SQL statements. + * These statements are used to delete database objects before running the + * import operation. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setCleanUnwrapped($var) + { + $this->writeWrapperValue("clean", $var); + return $this;} + + /** + * Optional. Option to include an IF EXISTS SQL statement with each DROP + * statement produced by clean. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIfExists() + { + return $this->if_exists; + } + + public function hasIfExists() + { + return isset($this->if_exists); + } + + public function clearIfExists() + { + unset($this->if_exists); + } + + /** + * Returns the unboxed value from getIfExists() + + * Optional. Option to include an IF EXISTS SQL statement with each DROP + * statement produced by clean. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getIfExistsUnwrapped() + { + return $this->readWrapperValue("if_exists"); + } + + /** + * Optional. Option to include an IF EXISTS SQL statement with each DROP + * statement produced by clean. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIfExists($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->if_exists = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Option to include an IF EXISTS SQL statement with each DROP + * statement produced by clean. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setIfExistsUnwrapped($var) + { + $this->writeWrapperValue("if_exists", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostgresExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions_PostgresExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php new file mode 100644 index 000000000000..c3d02dee27f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1.ExternalSyncParallelLevel + */ +class ExternalSyncParallelLevel +{ + /** + * Unknown sync parallel level. Will be defaulted to OPTIMAL. + * + * Generated from protobuf enum EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; + */ + const EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; + /** + * Minimal parallel level. + * + * Generated from protobuf enum MIN = 1; + */ + const MIN = 1; + /** + * Optimal parallel level. + * + * Generated from protobuf enum OPTIMAL = 2; + */ + const OPTIMAL = 2; + /** + * Maximum parallel level. + * + * Generated from protobuf enum MAX = 3; + */ + const MAX = 3; + + private static $valueToName = [ + self::EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED => 'EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED', + self::MIN => 'MIN', + self::OPTIMAL => 'OPTIMAL', + self::MAX => 'MAX', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php new file mode 100644 index 000000000000..ca709f956f5d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1.FailoverContext + */ +class FailoverContext extends \Google\Protobuf\Internal\Message +{ + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + */ + protected $settings_version = 0; + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $settings_version + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * @type string $kind + * This is always `sql#failoverContext`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + * @return int|string + */ + public function getSettingsVersion() + { + return $this->settings_version; + } + + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + * @param int|string $var + * @return $this + */ + public function setSettingsVersion($var) + { + GPBUtil::checkInt64($var); + $this->settings_version = $var; + + return $this; + } + + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php new file mode 100644 index 000000000000..3a0051417697 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php @@ -0,0 +1,579 @@ +google.cloud.sql.v1.Flag + */ +class Flag extends \Google\Protobuf\Internal\Message +{ + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; + */ + protected $type = 0; + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; + */ + private $applies_to; + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + */ + private $allowed_string_values; + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + */ + protected $min_value = null; + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + */ + protected $max_value = null; + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + */ + protected $requires_restart = null; + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + */ + protected $kind = ''; + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + */ + protected $in_beta = null; + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + */ + private $allowed_int_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * @type int $type + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * @type array|\Google\Protobuf\Internal\RepeatedField $applies_to + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_string_values + * For `STRING` flags, a list of strings that the value can be set to. + * @type \Google\Protobuf\Int64Value $min_value + * For `INTEGER` flags, the minimum allowed value. + * @type \Google\Protobuf\Int64Value $max_value + * For `INTEGER` flags, the maximum allowed value. + * @type \Google\Protobuf\BoolValue $requires_restart + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * @type string $kind + * This is always `sql#flag`. + * @type \Google\Protobuf\BoolValue $in_beta + * Whether or not the flag is considered in beta. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $allowed_int_values + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); + parent::__construct($data); + } + + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFlagType::class); + $this->type = $var; + + return $this; + } + + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliesTo() + { + return $this->applies_to; + } + + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliesTo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); + $this->applies_to = $arr; + + return $this; + } + + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedStringValues() + { + return $this->allowed_string_values; + } + + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedStringValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_string_values = $arr; + + return $this; + } + + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMinValue() + { + return $this->min_value; + } + + public function hasMinValue() + { + return isset($this->min_value); + } + + public function clearMinValue() + { + unset($this->min_value); + } + + /** + * Returns the unboxed value from getMinValue() + + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @return int|string|null + */ + public function getMinValueUnwrapped() + { + return $this->readWrapperValue("min_value"); + } + + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->min_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @param int|string|null $var + * @return $this + */ + public function setMinValueUnwrapped($var) + { + $this->writeWrapperValue("min_value", $var); + return $this;} + + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMaxValue() + { + return $this->max_value; + } + + public function hasMaxValue() + { + return isset($this->max_value); + } + + public function clearMaxValue() + { + unset($this->max_value); + } + + /** + * Returns the unboxed value from getMaxValue() + + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @return int|string|null + */ + public function getMaxValueUnwrapped() + { + return $this->readWrapperValue("max_value"); + } + + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @param int|string|null $var + * @return $this + */ + public function setMaxValueUnwrapped($var) + { + $this->writeWrapperValue("max_value", $var); + return $this;} + + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRequiresRestart() + { + return $this->requires_restart; + } + + public function hasRequiresRestart() + { + return isset($this->requires_restart); + } + + public function clearRequiresRestart() + { + unset($this->requires_restart); + } + + /** + * Returns the unboxed value from getRequiresRestart() + + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @return bool|null + */ + public function getRequiresRestartUnwrapped() + { + return $this->readWrapperValue("requires_restart"); + } + + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRequiresRestart($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->requires_restart = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @param bool|null $var + * @return $this + */ + public function setRequiresRestartUnwrapped($var) + { + $this->writeWrapperValue("requires_restart", $var); + return $this;} + + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @return \Google\Protobuf\BoolValue|null + */ + public function getInBeta() + { + return $this->in_beta; + } + + public function hasInBeta() + { + return isset($this->in_beta); + } + + public function clearInBeta() + { + unset($this->in_beta); + } + + /** + * Returns the unboxed value from getInBeta() + + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @return bool|null + */ + public function getInBetaUnwrapped() + { + return $this->readWrapperValue("in_beta"); + } + + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setInBeta($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->in_beta = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @param bool|null $var + * @return $this + */ + public function setInBetaUnwrapped($var) + { + $this->writeWrapperValue("in_beta", $var); + return $this;} + + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedIntValues() + { + return $this->allowed_int_values; + } + + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedIntValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->allowed_int_values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php new file mode 100644 index 000000000000..a6691eeb2c74 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.FlagsListResponse + */ +class FlagsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#flagsList`. + * @type array<\Google\Cloud\Sql\V1\Flag>|\Google\Protobuf\Internal\RepeatedField $items + * List of flags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; + * @param array<\Google\Cloud\Sql\V1\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Flag::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php new file mode 100644 index 000000000000..66a1a7651be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php @@ -0,0 +1,297 @@ +google.cloud.sql.v1.GeminiInstanceConfig + */ +class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entitled = null; + /** + * Output only. Whether the vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_vacuum_mgmt_enabled = null; + /** + * Output only. Whether canceling the out-of-memory (OOM) session is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oom_session_cancel_enabled = null; + /** + * Output only. Whether the active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active_query_enabled = null; + /** + * Output only. Whether the index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_advisor_enabled = null; + /** + * Output only. Whether the flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $flag_recommender_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $entitled + * Output only. Whether Gemini is enabled. + * @type bool $google_vacuum_mgmt_enabled + * Output only. Whether the vacuum management is enabled. + * @type bool $oom_session_cancel_enabled + * Output only. Whether canceling the out-of-memory (OOM) session is enabled. + * @type bool $active_query_enabled + * Output only. Whether the active query is enabled. + * @type bool $index_advisor_enabled + * Output only. Whether the index advisor is enabled. + * @type bool $flag_recommender_enabled + * Output only. Whether the flag recommender is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getEntitled() + { + return isset($this->entitled) ? $this->entitled : false; + } + + public function hasEntitled() + { + return isset($this->entitled); + } + + public function clearEntitled() + { + unset($this->entitled); + } + + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEntitled($var) + { + GPBUtil::checkBool($var); + $this->entitled = $var; + + return $this; + } + + /** + * Output only. Whether the vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false; + } + + public function hasGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled); + } + + public function clearGoogleVacuumMgmtEnabled() + { + unset($this->google_vacuum_mgmt_enabled); + } + + /** + * Output only. Whether the vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleVacuumMgmtEnabled($var) + { + GPBUtil::checkBool($var); + $this->google_vacuum_mgmt_enabled = $var; + + return $this; + } + + /** + * Output only. Whether canceling the out-of-memory (OOM) session is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false; + } + + public function hasOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled); + } + + public function clearOomSessionCancelEnabled() + { + unset($this->oom_session_cancel_enabled); + } + + /** + * Output only. Whether canceling the out-of-memory (OOM) session is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOomSessionCancelEnabled($var) + { + GPBUtil::checkBool($var); + $this->oom_session_cancel_enabled = $var; + + return $this; + } + + /** + * Output only. Whether the active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActiveQueryEnabled() + { + return isset($this->active_query_enabled) ? $this->active_query_enabled : false; + } + + public function hasActiveQueryEnabled() + { + return isset($this->active_query_enabled); + } + + public function clearActiveQueryEnabled() + { + unset($this->active_query_enabled); + } + + /** + * Output only. Whether the active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActiveQueryEnabled($var) + { + GPBUtil::checkBool($var); + $this->active_query_enabled = $var; + + return $this; + } + + /** + * Output only. Whether the index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false; + } + + public function hasIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled); + } + + public function clearIndexAdvisorEnabled() + { + unset($this->index_advisor_enabled); + } + + /** + * Output only. Whether the index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIndexAdvisorEnabled($var) + { + GPBUtil::checkBool($var); + $this->index_advisor_enabled = $var; + + return $this; + } + + /** + * Output only. Whether the flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false; + } + + public function hasFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled); + } + + public function clearFlagRecommenderEnabled() + { + unset($this->flag_recommender_enabled); + } + + /** + * Output only. Whether the flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFlagRecommenderEnabled($var) + { + GPBUtil::checkBool($var); + $this->flag_recommender_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php new file mode 100644 index 000000000000..8a1c5622df77 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php @@ -0,0 +1,261 @@ +google.cloud.sql.v1.GenerateEphemeralCertRequest + */ +class GenerateEphemeralCertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + */ + protected $public_key = ''; + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $access_token = ''; + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_time = null; + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $valid_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $public_key + * PEM encoded public key to include in the signed certificate. + * @type string $access_token + * Optional. Access token to include in the signed certificate. + * @type \Google\Protobuf\Timestamp $read_time + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * @type \Google\Protobuf\Duration $valid_duration + * Optional. If set, it will contain the cert valid duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getValidDuration() + { + return $this->valid_duration; + } + + public function hasValidDuration() + { + return isset($this->valid_duration); + } + + public function clearValidDuration() + { + unset($this->valid_duration); + } + + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setValidDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->valid_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php new file mode 100644 index 000000000000..8830de381056 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.GenerateEphemeralCertResponse + */ +class GenerateEphemeralCertResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; + */ + protected $ephemeral_cert = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\SslCert $ephemeral_cert + * Generated cert + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getEphemeralCert() + { + return $this->ephemeral_cert; + } + + public function hasEphemeralCert() + { + return isset($this->ephemeral_cert); + } + + public function clearEphemeralCert() + { + unset($this->ephemeral_cert); + } + + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setEphemeralCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->ephemeral_cert = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php new file mode 100644 index 000000000000..9e2eede2ac38 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php @@ -0,0 +1,149 @@ +google.cloud.sql.v1.GetConnectSettingsRequest + */ +class GetConnectSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Protobuf\Timestamp $read_time + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php new file mode 100644 index 000000000000..06b90533ca26 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php @@ -0,0 +1,363 @@ +google.cloud.sql.v1.ImportContext + */ +class ImportContext extends \Google\Protobuf\Internal\Message +{ + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + */ + protected $database = ''; + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; + */ + protected $file_type = 0; + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; + */ + protected $csv_import_options = null; + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + */ + protected $import_user = ''; + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; + */ + protected $bak_import_options = null; + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sql_import_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $database + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * @type string $kind + * This is always `sql#importContext`. + * @type int $file_type + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * @type \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions $csv_import_options + * Options for importing data as CSV. + * @type string $import_user + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $bak_import_options + * Import parameters specific to SQL Server .BAK files + * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $sql_import_options + * Optional. Options for importing data from SQL statements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * 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; + } + + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; + * @return int + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; + * @param int $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFileType::class); + $this->file_type = $var; + + return $this; + } + + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions|null + */ + public function getCsvImportOptions() + { + return $this->csv_import_options; + } + + public function hasCsvImportOptions() + { + return isset($this->csv_import_options); + } + + public function clearCsvImportOptions() + { + unset($this->csv_import_options); + } + + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions $var + * @return $this + */ + public function setCsvImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions::class); + $this->csv_import_options = $var; + + return $this; + } + + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + * @return string + */ + public function getImportUser() + { + return $this->import_user; + } + + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + * @param string $var + * @return $this + */ + public function setImportUser($var) + { + GPBUtil::checkString($var, True); + $this->import_user = $var; + + return $this; + } + + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions|null + */ + public function getBakImportOptions() + { + return $this->bak_import_options; + } + + public function hasBakImportOptions() + { + return isset($this->bak_import_options); + } + + public function clearBakImportOptions() + { + unset($this->bak_import_options); + } + + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $var + * @return $this + */ + public function setBakImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions::class); + $this->bak_import_options = $var; + + return $this; + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions|null + */ + public function getSqlImportOptions() + { + return $this->sql_import_options; + } + + public function hasSqlImportOptions() + { + return isset($this->sql_import_options); + } + + public function clearSqlImportOptions() + { + unset($this->sql_import_options); + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $var + * @return $this + */ + public function setSqlImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions::class); + $this->sql_import_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php new file mode 100644 index 000000000000..5d36cba31680 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php @@ -0,0 +1,452 @@ +google.cloud.sql.v1.ImportContext.SqlBakImportOptions + */ +class SqlBakImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + */ + protected $encryption_options = null; + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + */ + protected $striped = null; + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + */ + protected $no_recovery = null; + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + */ + protected $recovery_only = null; + /** + * Type of the bak content, FULL or DIFF + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; + */ + protected $bak_type = 0; + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stop_at = null; + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stop_at_mark = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions $encryption_options + * @type \Google\Protobuf\BoolValue $striped + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * @type \Google\Protobuf\BoolValue $no_recovery + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * @type \Google\Protobuf\BoolValue $recovery_only + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * @type int $bak_type + * Type of the bak content, FULL or DIFF + * @type \Google\Protobuf\Timestamp $stop_at + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * @type string $stop_at_mark + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions|null + */ + public function getEncryptionOptions() + { + return $this->encryption_options; + } + + public function hasEncryptionOptions() + { + return isset($this->encryption_options); + } + + public function clearEncryptionOptions() + { + unset($this->encryption_options); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions $var + * @return $this + */ + public function setEncryptionOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions::class); + $this->encryption_options = $var; + + return $this; + } + + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStriped() + { + return $this->striped; + } + + public function hasStriped() + { + return isset($this->striped); + } + + public function clearStriped() + { + unset($this->striped); + } + + /** + * Returns the unboxed value from getStriped() + + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @return bool|null + */ + public function getStripedUnwrapped() + { + return $this->readWrapperValue("striped"); + } + + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStriped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->striped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @param bool|null $var + * @return $this + */ + public function setStripedUnwrapped($var) + { + $this->writeWrapperValue("striped", $var); + return $this;} + + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getNoRecovery() + { + return $this->no_recovery; + } + + public function hasNoRecovery() + { + return isset($this->no_recovery); + } + + public function clearNoRecovery() + { + unset($this->no_recovery); + } + + /** + * Returns the unboxed value from getNoRecovery() + + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @return bool|null + */ + public function getNoRecoveryUnwrapped() + { + return $this->readWrapperValue("no_recovery"); + } + + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setNoRecovery($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->no_recovery = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @param bool|null $var + * @return $this + */ + public function setNoRecoveryUnwrapped($var) + { + $this->writeWrapperValue("no_recovery", $var); + return $this;} + + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRecoveryOnly() + { + return $this->recovery_only; + } + + public function hasRecoveryOnly() + { + return isset($this->recovery_only); + } + + public function clearRecoveryOnly() + { + unset($this->recovery_only); + } + + /** + * Returns the unboxed value from getRecoveryOnly() + + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @return bool|null + */ + public function getRecoveryOnlyUnwrapped() + { + return $this->readWrapperValue("recovery_only"); + } + + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRecoveryOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->recovery_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @param bool|null $var + * @return $this + */ + public function setRecoveryOnlyUnwrapped($var) + { + $this->writeWrapperValue("recovery_only", $var); + return $this;} + + /** + * Type of the bak content, FULL or DIFF + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; + * @return int + */ + public function getBakType() + { + return $this->bak_type; + } + + /** + * Type of the bak content, FULL or DIFF + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; + * @param int $var + * @return $this + */ + public function setBakType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BakType::class); + $this->bak_type = $var; + + return $this; + } + + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStopAt() + { + return $this->stop_at; + } + + public function hasStopAt() + { + return isset($this->stop_at); + } + + public function clearStopAt() + { + unset($this->stop_at); + } + + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStopAt($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->stop_at = $var; + + return $this; + } + + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getStopAtMark() + { + return $this->stop_at_mark; + } + + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setStopAtMark($var) + { + GPBUtil::checkString($var, True); + $this->stop_at_mark = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlBakImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlBakImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php new file mode 100644 index 000000000000..2e46dffcbc90 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php @@ -0,0 +1,152 @@ +google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions + */ +class EncryptionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + */ + protected $cert_path = ''; + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + */ + protected $pvk_path = ''; + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + */ + protected $pvk_password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cert_path + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $pvk_path + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $pvk_password + * Password that encrypts the private key + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + * @return string + */ + public function getCertPath() + { + return $this->cert_path; + } + + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + * @param string $var + * @return $this + */ + public function setCertPath($var) + { + GPBUtil::checkString($var, True); + $this->cert_path = $var; + + return $this; + } + + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + * @return string + */ + public function getPvkPath() + { + return $this->pvk_path; + } + + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + * @param string $var + * @return $this + */ + public function setPvkPath($var) + { + GPBUtil::checkString($var, True); + $this->pvk_path = $var; + + return $this; + } + + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + * @return string + */ + public function getPvkPassword() + { + return $this->pvk_password; + } + + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + * @param string $var + * @return $this + */ + public function setPvkPassword($var) + { + GPBUtil::checkString($var, True); + $this->pvk_password = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncryptionOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlBakImportOptions_EncryptionOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php new file mode 100644 index 000000000000..e320a13a1262 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php @@ -0,0 +1,254 @@ +google.cloud.sql.v1.ImportContext.SqlCsvImportOptions + */ +class SqlCsvImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + */ + private $columns; + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + */ + protected $escape_character = ''; + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + */ + protected $quote_character = ''; + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + */ + protected $fields_terminated_by = ''; + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + */ + protected $lines_terminated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * The table to which CSV data is imported. + * @type array|\Google\Protobuf\Internal\RepeatedField $columns + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * @type string $escape_character + * Specifies the character that should appear before a data character that + * needs to be escaped. + * @type string $quote_character + * Specifies the quoting character to be used when a data value is quoted. + * @type string $fields_terminated_by + * Specifies the character that separates columns within each row (line) of + * the file. + * @type string $lines_terminated_by + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * The table to which CSV data is imported. + * + * 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; + } + + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->columns = $arr; + + return $this; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + * @return string + */ + public function getEscapeCharacter() + { + return $this->escape_character; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + * @param string $var + * @return $this + */ + public function setEscapeCharacter($var) + { + GPBUtil::checkString($var, True); + $this->escape_character = $var; + + return $this; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + * @return string + */ + public function getQuoteCharacter() + { + return $this->quote_character; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + * @param string $var + * @return $this + */ + public function setQuoteCharacter($var) + { + GPBUtil::checkString($var, True); + $this->quote_character = $var; + + return $this; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + * @return string + */ + public function getFieldsTerminatedBy() + { + return $this->fields_terminated_by; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + * @param string $var + * @return $this + */ + public function setFieldsTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->fields_terminated_by = $var; + + return $this; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + * @return string + */ + public function getLinesTerminatedBy() + { + return $this->lines_terminated_by; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + * @param string $var + * @return $this + */ + public function setLinesTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->lines_terminated_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlCsvImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlCsvImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php new file mode 100644 index 000000000000..eddd8a30e024 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php @@ -0,0 +1,220 @@ +google.cloud.sql.v1.ImportContext.SqlImportOptions + */ +class SqlImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threads = null; + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallel = null; + /** + * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions postgres_import_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $postgres_import_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel import. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the import should be parallel. + * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions $postgres_import_options + * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsUnwrapped() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsUnwrapped($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelUnwrapped() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelUnwrapped($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + + /** + * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions postgres_import_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions|null + */ + public function getPostgresImportOptions() + { + return $this->postgres_import_options; + } + + public function hasPostgresImportOptions() + { + return isset($this->postgres_import_options); + } + + public function clearPostgresImportOptions() + { + unset($this->postgres_import_options); + } + + /** + * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions postgres_import_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions $var + * @return $this + */ + public function setPostgresImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions::class); + $this->postgres_import_options = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php new file mode 100644 index 000000000000..5333c31280a6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php @@ -0,0 +1,188 @@ +google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions + */ +class PostgresImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The --clean flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $clean = null; + /** + * Optional. The --if-exists flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $if_exists = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $clean + * Optional. The --clean flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * @type \Google\Protobuf\BoolValue $if_exists + * Optional. The --if-exists flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The --clean flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getClean() + { + return $this->clean; + } + + public function hasClean() + { + return isset($this->clean); + } + + public function clearClean() + { + unset($this->clean); + } + + /** + * Returns the unboxed value from getClean() + + * Optional. The --clean flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getCleanUnwrapped() + { + return $this->readWrapperValue("clean"); + } + + /** + * Optional. The --clean flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setClean($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->clean = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. The --clean flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setCleanUnwrapped($var) + { + $this->writeWrapperValue("clean", $var); + return $this;} + + /** + * Optional. The --if-exists flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIfExists() + { + return $this->if_exists; + } + + public function hasIfExists() + { + return isset($this->if_exists); + } + + public function clearIfExists() + { + unset($this->if_exists); + } + + /** + * Returns the unboxed value from getIfExists() + + * Optional. The --if-exists flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getIfExistsUnwrapped() + { + return $this->readWrapperValue("if_exists"); + } + + /** + * Optional. The --if-exists flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIfExists($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->if_exists = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. The --if-exists flag for the pg_restore utility. This flag + * applies only if you enabled Cloud SQL to import files in parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setIfExistsUnwrapped($var) + { + $this->writeWrapperValue("if_exists", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostgresImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlImportOptions_PostgresImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php new file mode 100644 index 000000000000..0614d521e328 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php @@ -0,0 +1,306 @@ +google.cloud.sql.v1.InsightsConfig + */ +class InsightsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + */ + protected $query_insights_enabled = false; + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + */ + protected $record_client_address = false; + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + */ + protected $record_application_tags = false; + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + */ + protected $query_string_length = null; + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + */ + protected $query_plans_per_minute = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $query_insights_enabled + * Whether Query Insights feature is enabled. + * @type bool $record_client_address + * Whether Query Insights will record client address when enabled. + * @type bool $record_application_tags + * Whether Query Insights will record application tags from query when + * enabled. + * @type \Google\Protobuf\Int32Value $query_string_length + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * @type \Google\Protobuf\Int32Value $query_plans_per_minute + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + * @return bool + */ + public function getQueryInsightsEnabled() + { + return $this->query_insights_enabled; + } + + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + * @param bool $var + * @return $this + */ + public function setQueryInsightsEnabled($var) + { + GPBUtil::checkBool($var); + $this->query_insights_enabled = $var; + + return $this; + } + + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + * @return bool + */ + public function getRecordClientAddress() + { + return $this->record_client_address; + } + + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + * @param bool $var + * @return $this + */ + public function setRecordClientAddress($var) + { + GPBUtil::checkBool($var); + $this->record_client_address = $var; + + return $this; + } + + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + * @return bool + */ + public function getRecordApplicationTags() + { + return $this->record_application_tags; + } + + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + * @param bool $var + * @return $this + */ + public function setRecordApplicationTags($var) + { + GPBUtil::checkBool($var); + $this->record_application_tags = $var; + + return $this; + } + + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @return \Google\Protobuf\Int32Value|null + */ + public function getQueryStringLength() + { + return $this->query_string_length; + } + + public function hasQueryStringLength() + { + return isset($this->query_string_length); + } + + public function clearQueryStringLength() + { + unset($this->query_string_length); + } + + /** + * Returns the unboxed value from getQueryStringLength() + + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @return int|null + */ + public function getQueryStringLengthUnwrapped() + { + return $this->readWrapperValue("query_string_length"); + } + + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQueryStringLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->query_string_length = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @param int|null $var + * @return $this + */ + public function setQueryStringLengthUnwrapped($var) + { + $this->writeWrapperValue("query_string_length", $var); + return $this;} + + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getQueryPlansPerMinute() + { + return $this->query_plans_per_minute; + } + + public function hasQueryPlansPerMinute() + { + return isset($this->query_plans_per_minute); + } + + public function clearQueryPlansPerMinute() + { + unset($this->query_plans_per_minute); + } + + /** + * Returns the unboxed value from getQueryPlansPerMinute() + + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @return int|null + */ + public function getQueryPlansPerMinuteUnwrapped() + { + return $this->readWrapperValue("query_plans_per_minute"); + } + + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQueryPlansPerMinute($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->query_plans_per_minute = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @param int|null $var + * @return $this + */ + public function setQueryPlansPerMinuteUnwrapped($var) + { + $this->writeWrapperValue("query_plans_per_minute", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php new file mode 100644 index 000000000000..408946eab2e9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php @@ -0,0 +1,143 @@ +google.cloud.sql.v1.InstanceReference + */ +class InstanceReference extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + */ + protected $region = ''; + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * @type string $region + * The region of the Cloud SQL instance being referenced. + * @type string $project + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project 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 region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..59a57b65e6a8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest + */ +class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + */ + protected $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * Contains details about the acquire SSRS lease operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php new file mode 100644 index 000000000000..966e8da45186 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesCloneRequest + */ +class InstancesCloneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; + */ + protected $clone_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\CloneContext $clone_context + * Contains details about the clone operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; + * @return \Google\Cloud\Sql\V1\CloneContext|null + */ + public function getCloneContext() + { + return $this->clone_context; + } + + public function hasCloneContext() + { + return isset($this->clone_context); + } + + public function clearCloneContext() + { + unset($this->clone_context); + } + + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; + * @param \Google\Cloud\Sql\V1\CloneContext $var + * @return $this + */ + public function setCloneContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\CloneContext::class); + $this->clone_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php new file mode 100644 index 000000000000..eb523b01e5f6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesDemoteMasterRequest + */ +class InstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; + */ + protected $demote_master_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\DemoteMasterContext $demote_master_context + * Contains details about the demoteMaster operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; + * @return \Google\Cloud\Sql\V1\DemoteMasterContext|null + */ + public function getDemoteMasterContext() + { + return $this->demote_master_context; + } + + public function hasDemoteMasterContext() + { + return isset($this->demote_master_context); + } + + public function clearDemoteMasterContext() + { + unset($this->demote_master_context); + } + + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; + * @param \Google\Cloud\Sql\V1\DemoteMasterContext $var + * @return $this + */ + public function setDemoteMasterContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterContext::class); + $this->demote_master_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php new file mode 100644 index 000000000000..d2c405572a4c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php @@ -0,0 +1,78 @@ +google.cloud.sql.v1.InstancesDemoteRequest + */ +class InstancesDemoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Contains details about the demote operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $demote_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\DemoteContext $demote_context + * Required. Contains details about the demote operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Contains details about the demote operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\DemoteContext|null + */ + public function getDemoteContext() + { + return $this->demote_context; + } + + public function hasDemoteContext() + { + return isset($this->demote_context); + } + + public function clearDemoteContext() + { + unset($this->demote_context); + } + + /** + * Required. Contains details about the demote operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\DemoteContext $var + * @return $this + */ + public function setDemoteContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteContext::class); + $this->demote_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php new file mode 100644 index 000000000000..c5b961981af4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesExportRequest + */ +class InstancesExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; + */ + protected $export_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\ExportContext $export_context + * Contains details about the export operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; + * @return \Google\Cloud\Sql\V1\ExportContext|null + */ + public function getExportContext() + { + return $this->export_context; + } + + public function hasExportContext() + { + return isset($this->export_context); + } + + public function clearExportContext() + { + unset($this->export_context); + } + + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; + * @param \Google\Cloud\Sql\V1\ExportContext $var + * @return $this + */ + public function setExportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext::class); + $this->export_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php new file mode 100644 index 000000000000..3fbccb780c2b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesFailoverRequest + */ +class InstancesFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; + */ + protected $failover_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\FailoverContext $failover_context + * Failover Context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; + * @return \Google\Cloud\Sql\V1\FailoverContext|null + */ + public function getFailoverContext() + { + return $this->failover_context; + } + + public function hasFailoverContext() + { + return isset($this->failover_context); + } + + public function clearFailoverContext() + { + unset($this->failover_context); + } + + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; + * @param \Google\Cloud\Sql\V1\FailoverContext $var + * @return $this + */ + public function setFailoverContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\FailoverContext::class); + $this->failover_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php new file mode 100644 index 000000000000..68c3f5dc1b15 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesImportRequest + */ +class InstancesImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; + */ + protected $import_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\ImportContext $import_context + * Contains details about the import operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; + * @return \Google\Cloud\Sql\V1\ImportContext|null + */ + public function getImportContext() + { + return $this->import_context; + } + + public function hasImportContext() + { + return isset($this->import_context); + } + + public function clearImportContext() + { + unset($this->import_context); + } + + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; + * @param \Google\Cloud\Sql\V1\ImportContext $var + * @return $this + */ + public function setImportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext::class); + $this->import_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php new file mode 100644 index 000000000000..8f182efcbb27 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php @@ -0,0 +1,173 @@ +google.cloud.sql.v1.InstancesListResponse + */ +class InstancesListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; + */ + private $warnings; + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#instancesList`. + * @type array<\Google\Cloud\Sql\V1\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $warnings + * List of warnings that occurred while handling the request. + * @type array<\Google\Cloud\Sql\V1\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $items + * List of database instance resources. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; + * @param array<\Google\Cloud\Sql\V1\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\ApiWarning::class); + $this->warnings = $arr; + + return $this; + } + + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; + * @param array<\Google\Cloud\Sql\V1\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + * @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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php new file mode 100644 index 000000000000..488af9f2b7e7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php @@ -0,0 +1,128 @@ +google.cloud.sql.v1.InstancesListServerCasResponse + */ +class InstancesListServerCasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; + */ + private $certs; + /** + * Generated from protobuf field string active_version = 2; + */ + protected $active_version = ''; + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $certs + * List of server CA certificates for the instance. + * @type string $active_version + * @type string $kind + * This is always `sql#instancesListServerCas`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCerts() + { + return $this->certs; + } + + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; + * @param array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SslCert::class); + $this->certs = $arr; + + return $this; + } + + /** + * Generated from protobuf field string active_version = 2; + * @return string + */ + public function getActiveVersion() + { + return $this->active_version; + } + + /** + * Generated from protobuf field string active_version = 2; + * @param string $var + * @return $this + */ + public function setActiveVersion($var) + { + GPBUtil::checkString($var, True); + $this->active_version = $var; + + return $this; + } + + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php new file mode 100644 index 000000000000..ffd45275fa43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesReencryptRequest + */ +class InstancesReencryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; + */ + protected $backup_reencryption_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\BackupReencryptionConfig $backup_reencryption_config + * Configuration specific to backup re-encryption + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; + * @return \Google\Cloud\Sql\V1\BackupReencryptionConfig|null + */ + public function getBackupReencryptionConfig() + { + return $this->backup_reencryption_config; + } + + public function hasBackupReencryptionConfig() + { + return isset($this->backup_reencryption_config); + } + + public function clearBackupReencryptionConfig() + { + unset($this->backup_reencryption_config); + } + + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; + * @param \Google\Cloud\Sql\V1\BackupReencryptionConfig $var + * @return $this + */ + public function setBackupReencryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupReencryptionConfig::class); + $this->backup_reencryption_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php new file mode 100644 index 000000000000..46c274d13f1b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesRestoreBackupRequest + */ +class InstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; + */ + protected $restore_backup_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\RestoreBackupContext $restore_backup_context + * Parameters required to perform the restore backup operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; + * @return \Google\Cloud\Sql\V1\RestoreBackupContext|null + */ + public function getRestoreBackupContext() + { + return $this->restore_backup_context; + } + + public function hasRestoreBackupContext() + { + return isset($this->restore_backup_context); + } + + public function clearRestoreBackupContext() + { + unset($this->restore_backup_context); + } + + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; + * @param \Google\Cloud\Sql\V1\RestoreBackupContext $var + * @return $this + */ + public function setRestoreBackupContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\RestoreBackupContext::class); + $this->restore_backup_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php new file mode 100644 index 000000000000..74b58e53c479 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesRotateServerCaRequest + */ +class InstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; + */ + protected $rotate_server_ca_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\RotateServerCaContext $rotate_server_ca_context + * Contains details about the rotate server CA operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; + * @return \Google\Cloud\Sql\V1\RotateServerCaContext|null + */ + public function getRotateServerCaContext() + { + return $this->rotate_server_ca_context; + } + + public function hasRotateServerCaContext() + { + return isset($this->rotate_server_ca_context); + } + + public function clearRotateServerCaContext() + { + unset($this->rotate_server_ca_context); + } + + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; + * @param \Google\Cloud\Sql\V1\RotateServerCaContext $var + * @return $this + */ + public function setRotateServerCaContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\RotateServerCaContext::class); + $this->rotate_server_ca_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php new file mode 100644 index 000000000000..2a0b469e871c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesTruncateLogRequest + */ +class InstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; + */ + protected $truncate_log_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\TruncateLogContext $truncate_log_context + * Contains details about the truncate log operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; + * @return \Google\Cloud\Sql\V1\TruncateLogContext|null + */ + public function getTruncateLogContext() + { + return $this->truncate_log_context; + } + + public function hasTruncateLogContext() + { + return isset($this->truncate_log_context); + } + + public function clearTruncateLogContext() + { + unset($this->truncate_log_context); + } + + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; + * @param \Google\Cloud\Sql\V1\TruncateLogContext $var + * @return $this + */ + public function setTruncateLogContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\TruncateLogContext::class); + $this->truncate_log_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php new file mode 100644 index 000000000000..1363a986f54d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php @@ -0,0 +1,618 @@ +google.cloud.sql.v1.IpConfiguration + */ +class IpConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + */ + protected $ipv4_enabled = null; + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + */ + protected $private_network = ''; + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + */ + protected $require_ssl = null; + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; + */ + private $authorized_networks; + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + */ + protected $allocated_ip_range = ''; + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + */ + protected $enable_private_path_for_google_cloud_services = null; + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` has priority over the value of `require_ssl`. + * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and + * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL + * connections, while `require_ssl=false` means accept both non-SSL + * and SSL connections. In this case, MySQL and PostgreSQL databases respect + * `ssl_mode` and accepts only SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; + */ + protected $ssl_mode = 0; + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; + */ + protected $psc_config = null; + /** + * Specify what type of CA is used for the server certificate. + * + * Generated from protobuf field optional .google.cloud.sql.v1.IpConfiguration.CaMode server_ca_mode = 10; + */ + protected $server_ca_mode = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $ipv4_enabled + * Whether the instance is assigned a public IP address or not. + * @type string $private_network + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * @type \Google\Protobuf\BoolValue $require_ssl + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * @type array<\Google\Cloud\Sql\V1\AclEntry>|\Google\Protobuf\Internal\RepeatedField $authorized_networks + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * @type string $allocated_ip_range + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * @type \Google\Protobuf\BoolValue $enable_private_path_for_google_cloud_services + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * @type int $ssl_mode + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` has priority over the value of `require_ssl`. + * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and + * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL + * connections, while `require_ssl=false` means accept both non-SSL + * and SSL connections. In this case, MySQL and PostgreSQL databases respect + * `ssl_mode` and accepts only SSL connections. + * @type \Google\Cloud\Sql\V1\PscConfig $psc_config + * PSC settings for this instance. + * @type int $server_ca_mode + * Specify what type of CA is used for the server certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIpv4Enabled() + { + return $this->ipv4_enabled; + } + + public function hasIpv4Enabled() + { + return isset($this->ipv4_enabled); + } + + public function clearIpv4Enabled() + { + unset($this->ipv4_enabled); + } + + /** + * Returns the unboxed value from getIpv4Enabled() + + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @return bool|null + */ + public function getIpv4EnabledUnwrapped() + { + return $this->readWrapperValue("ipv4_enabled"); + } + + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIpv4Enabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->ipv4_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @param bool|null $var + * @return $this + */ + public function setIpv4EnabledUnwrapped($var) + { + $this->writeWrapperValue("ipv4_enabled", $var); + return $this;} + + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + * @return string + */ + public function getPrivateNetwork() + { + return $this->private_network; + } + + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + * @param string $var + * @return $this + */ + public function setPrivateNetwork($var) + { + GPBUtil::checkString($var, True); + $this->private_network = $var; + + return $this; + } + + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRequireSsl() + { + return $this->require_ssl; + } + + public function hasRequireSsl() + { + return isset($this->require_ssl); + } + + public function clearRequireSsl() + { + unset($this->require_ssl); + } + + /** + * Returns the unboxed value from getRequireSsl() + + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @return bool|null + */ + public function getRequireSslUnwrapped() + { + return $this->readWrapperValue("require_ssl"); + } + + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRequireSsl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->require_ssl = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @param bool|null $var + * @return $this + */ + public function setRequireSslUnwrapped($var) + { + $this->writeWrapperValue("require_ssl", $var); + return $this;} + + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizedNetworks() + { + return $this->authorized_networks; + } + + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; + * @param array<\Google\Cloud\Sql\V1\AclEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizedNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\AclEntry::class); + $this->authorized_networks = $arr; + + return $this; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + * @return string + */ + public function getAllocatedIpRange() + { + return $this->allocated_ip_range; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + * @param string $var + * @return $this + */ + public function setAllocatedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->allocated_ip_range = $var; + + return $this; + } + + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnablePrivatePathForGoogleCloudServices() + { + return $this->enable_private_path_for_google_cloud_services; + } + + public function hasEnablePrivatePathForGoogleCloudServices() + { + return isset($this->enable_private_path_for_google_cloud_services); + } + + public function clearEnablePrivatePathForGoogleCloudServices() + { + unset($this->enable_private_path_for_google_cloud_services); + } + + /** + * Returns the unboxed value from getEnablePrivatePathForGoogleCloudServices() + + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @return bool|null + */ + public function getEnablePrivatePathForGoogleCloudServicesUnwrapped() + { + return $this->readWrapperValue("enable_private_path_for_google_cloud_services"); + } + + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnablePrivatePathForGoogleCloudServices($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_private_path_for_google_cloud_services = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @param bool|null $var + * @return $this + */ + public function setEnablePrivatePathForGoogleCloudServicesUnwrapped($var) + { + $this->writeWrapperValue("enable_private_path_for_google_cloud_services", $var); + return $this;} + + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` has priority over the value of `require_ssl`. + * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and + * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL + * connections, while `require_ssl=false` means accept both non-SSL + * and SSL connections. In this case, MySQL and PostgreSQL databases respect + * `ssl_mode` and accepts only SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; + * @return int + */ + public function getSslMode() + { + return $this->ssl_mode; + } + + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` has priority over the value of `require_ssl`. + * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and + * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL + * connections, while `require_ssl=false` means accept both non-SSL + * and SSL connections. In this case, MySQL and PostgreSQL databases respect + * `ssl_mode` and accepts only SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; + * @param int $var + * @return $this + */ + public function setSslMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\IpConfiguration\SslMode::class); + $this->ssl_mode = $var; + + return $this; + } + + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; + * @return \Google\Cloud\Sql\V1\PscConfig|null + */ + public function getPscConfig() + { + return $this->psc_config; + } + + public function hasPscConfig() + { + return isset($this->psc_config); + } + + public function clearPscConfig() + { + unset($this->psc_config); + } + + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; + * @param \Google\Cloud\Sql\V1\PscConfig $var + * @return $this + */ + public function setPscConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PscConfig::class); + $this->psc_config = $var; + + return $this; + } + + /** + * Specify what type of CA is used for the server certificate. + * + * Generated from protobuf field optional .google.cloud.sql.v1.IpConfiguration.CaMode server_ca_mode = 10; + * @return int + */ + public function getServerCaMode() + { + return isset($this->server_ca_mode) ? $this->server_ca_mode : 0; + } + + public function hasServerCaMode() + { + return isset($this->server_ca_mode); + } + + public function clearServerCaMode() + { + unset($this->server_ca_mode); + } + + /** + * Specify what type of CA is used for the server certificate. + * + * Generated from protobuf field optional .google.cloud.sql.v1.IpConfiguration.CaMode server_ca_mode = 10; + * @param int $var + * @return $this + */ + public function setServerCaMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\IpConfiguration\CaMode::class); + $this->server_ca_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php new file mode 100644 index 000000000000..bb757881488d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1.IpConfiguration.CaMode + */ +class CaMode +{ + /** + * CA mode is unknown. + * + * Generated from protobuf enum CA_MODE_UNSPECIFIED = 0; + */ + const CA_MODE_UNSPECIFIED = 0; + /** + * Google-managed self-signed internal CA. + * + * Generated from protobuf enum GOOGLE_MANAGED_INTERNAL_CA = 1; + */ + const GOOGLE_MANAGED_INTERNAL_CA = 1; + /** + * Google-managed regional CA part of root CA hierarchy hosted on Google + * Cloud's Certificate Authority Service (CAS). + * + * Generated from protobuf enum GOOGLE_MANAGED_CAS_CA = 2; + */ + const GOOGLE_MANAGED_CAS_CA = 2; + + private static $valueToName = [ + self::CA_MODE_UNSPECIFIED => 'CA_MODE_UNSPECIFIED', + self::GOOGLE_MANAGED_INTERNAL_CA => 'GOOGLE_MANAGED_INTERNAL_CA', + self::GOOGLE_MANAGED_CAS_CA => 'GOOGLE_MANAGED_CAS_CA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CaMode::class, \Google\Cloud\Sql\V1\IpConfiguration_CaMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php new file mode 100644 index 000000000000..05fac4f5a6c6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php @@ -0,0 +1,90 @@ +google.cloud.sql.v1.IpConfiguration.SslMode + */ +class SslMode +{ + /** + * The SSL mode is unknown. + * + * Generated from protobuf enum SSL_MODE_UNSPECIFIED = 0; + */ + const SSL_MODE_UNSPECIFIED = 0; + /** + * Allow non-SSL/non-TLS and SSL/TLS connections. + * For SSL connections to MySQL and PostgreSQL, the client certificate + * isn't verified. + * When this value is used, the legacy `require_ssl` flag must be false or + * cleared to avoid a conflict between the values of the two flags. + * + * Generated from protobuf enum ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; + */ + const ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; + /** + * Only allow connections encrypted with SSL/TLS. + * For SSL connections to MySQL and PostgreSQL, the client certificate + * isn't verified. + * When this value is used, the legacy `require_ssl` flag must be false or + * cleared to avoid a conflict between the values of the two flags. + * + * Generated from protobuf enum ENCRYPTED_ONLY = 2; + */ + const ENCRYPTED_ONLY = 2; + /** + * Only allow connections encrypted with SSL/TLS and with valid + * client certificates. + * When this value is used, the legacy `require_ssl` flag must be true or + * cleared to avoid the conflict between values of two flags. + * PostgreSQL clients or users that connect using IAM database + * authentication must use either the + * [Cloud SQL Auth + * Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or + * [Cloud SQL + * Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) + * to enforce client identity verification. + * Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server. + * + * Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; + */ + const TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; + + private static $valueToName = [ + self::SSL_MODE_UNSPECIFIED => 'SSL_MODE_UNSPECIFIED', + self::ALLOW_UNENCRYPTED_AND_ENCRYPTED => 'ALLOW_UNENCRYPTED_AND_ENCRYPTED', + self::ENCRYPTED_ONLY => 'ENCRYPTED_ONLY', + self::TRUSTED_CLIENT_CERTIFICATE_REQUIRED => 'TRUSTED_CLIENT_CERTIFICATE_REQUIRED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SslMode::class, \Google\Cloud\Sql\V1\IpConfiguration_SslMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php new file mode 100644 index 000000000000..c4b273578314 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1.IpMapping + */ +class IpMapping extends \Google\Protobuf\Internal\Message +{ + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; + */ + protected $type = 0; + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + */ + protected $ip_address = ''; + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + */ + protected $time_to_retire = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * @type string $ip_address + * The IP address assigned. + * @type \Google\Protobuf\Timestamp $time_to_retire + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlIpAddressType::class); + $this->type = $var; + + return $this; + } + + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeToRetire() + { + return $this->time_to_retire; + } + + public function hasTimeToRetire() + { + return isset($this->time_to_retire); + } + + public function clearTimeToRetire() + { + unset($this->time_to_retire); + } + + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeToRetire($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_to_retire = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php new file mode 100644 index 000000000000..d7c676367daa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php @@ -0,0 +1,193 @@ +google.cloud.sql.v1.LocationPreference + */ +class LocationPreference extends \Google\Protobuf\Internal\Message +{ + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @deprecated + */ + protected $follow_gae_application = ''; + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + */ + protected $zone = ''; + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + */ + protected $secondary_zone = ''; + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $follow_gae_application + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * @type string $zone + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * @type string $secondary_zone + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * @type string $kind + * This is always `sql#locationPreference`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getFollowGaeApplication() + { + @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); + return $this->follow_gae_application; + } + + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setFollowGaeApplication($var) + { + @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->follow_gae_application = $var; + + return $this; + } + + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + * @return string + */ + public function getSecondaryZone() + { + return $this->secondary_zone; + } + + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + * @param string $var + * @return $this + */ + public function setSecondaryZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_zone = $var; + + return $this; + } + + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php new file mode 100644 index 000000000000..5ca180bd001b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php @@ -0,0 +1,264 @@ +google.cloud.sql.v1.MaintenanceWindow + */ +class MaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Hour of day - 0 to 23. Specify in the UTC time zone. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + */ + protected $hour = null; + /** + * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, + * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. + * Returned in output as an integer, 1 to 7, where `1` equals Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + */ + protected $day = null; + /** + * Maintenance timing settings: `canary`, `stable`, or `week5`. + * For more information, see [About maintenance on Cloud SQL + * instances](https://cloud.google.com/sql/docs/mysql/maintenance). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; + */ + protected $update_track = 0; + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $hour + * Hour of day - 0 to 23. Specify in the UTC time zone. + * @type \Google\Protobuf\Int32Value $day + * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, + * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. + * Returned in output as an integer, 1 to 7, where `1` equals Monday. + * @type int $update_track + * Maintenance timing settings: `canary`, `stable`, or `week5`. + * For more information, see [About maintenance on Cloud SQL + * instances](https://cloud.google.com/sql/docs/mysql/maintenance). + * @type string $kind + * This is always `sql#maintenanceWindow`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Hour of day - 0 to 23. Specify in the UTC time zone. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getHour() + { + return $this->hour; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Returns the unboxed value from getHour() + + * Hour of day - 0 to 23. Specify in the UTC time zone. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @return int|null + */ + public function getHourUnwrapped() + { + return $this->readWrapperValue("hour"); + } + + /** + * Hour of day - 0 to 23. Specify in the UTC time zone. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->hour = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Hour of day - 0 to 23. Specify in the UTC time zone. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @param int|null $var + * @return $this + */ + public function setHourUnwrapped($var) + { + $this->writeWrapperValue("hour", $var); + return $this;} + + /** + * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, + * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. + * Returned in output as an integer, 1 to 7, where `1` equals Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getDay() + { + return $this->day; + } + + public function hasDay() + { + return isset($this->day); + } + + public function clearDay() + { + unset($this->day); + } + + /** + * Returns the unboxed value from getDay() + + * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, + * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. + * Returned in output as an integer, 1 to 7, where `1` equals Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @return int|null + */ + public function getDayUnwrapped() + { + return $this->readWrapperValue("day"); + } + + /** + * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, + * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. + * Returned in output as an integer, 1 to 7, where `1` equals Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->day = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, + * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. + * Returned in output as an integer, 1 to 7, where `1` equals Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @param int|null $var + * @return $this + */ + public function setDayUnwrapped($var) + { + $this->writeWrapperValue("day", $var); + return $this;} + + /** + * Maintenance timing settings: `canary`, `stable`, or `week5`. + * For more information, see [About maintenance on Cloud SQL + * instances](https://cloud.google.com/sql/docs/mysql/maintenance). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; + * @return int + */ + public function getUpdateTrack() + { + return $this->update_track; + } + + /** + * Maintenance timing settings: `canary`, `stable`, or `week5`. + * For more information, see [About maintenance on Cloud SQL + * instances](https://cloud.google.com/sql/docs/mysql/maintenance). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; + * @param int $var + * @return $this + */ + public function setUpdateTrack($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlUpdateTrack::class); + $this->update_track = $var; + + return $this; + } + + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php new file mode 100644 index 000000000000..f341b4701919 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php @@ -0,0 +1,548 @@ +google.cloud.sql.v1.MySqlReplicaConfiguration + */ +class MySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + */ + protected $dump_file_path = ''; + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + */ + protected $password = ''; + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + */ + protected $connect_retry_interval = null; + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + */ + protected $master_heartbeat_period = null; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + */ + protected $ca_certificate = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + */ + protected $client_certificate = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + */ + protected $client_key = ''; + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + */ + protected $ssl_cipher = ''; + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + */ + protected $verify_server_certificate = null; + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dump_file_path + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * @type string $username + * The username for the replication connection. + * @type string $password + * The password for the replication connection. + * @type \Google\Protobuf\Int32Value $connect_retry_interval + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * @type \Google\Protobuf\Int64Value $master_heartbeat_period + * Interval in milliseconds between replication heartbeats. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * @type string $ssl_cipher + * A list of permissible ciphers to use for SSL encryption. + * @type \Google\Protobuf\BoolValue $verify_server_certificate + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * @type string $kind + * This is always `sql#mysqlReplicaConfiguration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + * @return string + */ + public function getDumpFilePath() + { + return $this->dump_file_path; + } + + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + * @param string $var + * @return $this + */ + public function setDumpFilePath($var) + { + GPBUtil::checkString($var, True); + $this->dump_file_path = $var; + + return $this; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @return \Google\Protobuf\Int32Value|null + */ + public function getConnectRetryInterval() + { + return $this->connect_retry_interval; + } + + public function hasConnectRetryInterval() + { + return isset($this->connect_retry_interval); + } + + public function clearConnectRetryInterval() + { + unset($this->connect_retry_interval); + } + + /** + * Returns the unboxed value from getConnectRetryInterval() + + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @return int|null + */ + public function getConnectRetryIntervalUnwrapped() + { + return $this->readWrapperValue("connect_retry_interval"); + } + + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setConnectRetryInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->connect_retry_interval = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @param int|null $var + * @return $this + */ + public function setConnectRetryIntervalUnwrapped($var) + { + $this->writeWrapperValue("connect_retry_interval", $var); + return $this;} + + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMasterHeartbeatPeriod() + { + return $this->master_heartbeat_period; + } + + public function hasMasterHeartbeatPeriod() + { + return isset($this->master_heartbeat_period); + } + + public function clearMasterHeartbeatPeriod() + { + unset($this->master_heartbeat_period); + } + + /** + * Returns the unboxed value from getMasterHeartbeatPeriod() + + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @return int|string|null + */ + public function getMasterHeartbeatPeriodUnwrapped() + { + return $this->readWrapperValue("master_heartbeat_period"); + } + + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMasterHeartbeatPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->master_heartbeat_period = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @param int|string|null $var + * @return $this + */ + public function setMasterHeartbeatPeriodUnwrapped($var) + { + $this->writeWrapperValue("master_heartbeat_period", $var); + return $this;} + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + * @return string + */ + public function getSslCipher() + { + return $this->ssl_cipher; + } + + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + * @param string $var + * @return $this + */ + public function setSslCipher($var) + { + GPBUtil::checkString($var, True); + $this->ssl_cipher = $var; + + return $this; + } + + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @return \Google\Protobuf\BoolValue|null + */ + public function getVerifyServerCertificate() + { + return $this->verify_server_certificate; + } + + public function hasVerifyServerCertificate() + { + return isset($this->verify_server_certificate); + } + + public function clearVerifyServerCertificate() + { + unset($this->verify_server_certificate); + } + + /** + * Returns the unboxed value from getVerifyServerCertificate() + + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @return bool|null + */ + public function getVerifyServerCertificateUnwrapped() + { + return $this->readWrapperValue("verify_server_certificate"); + } + + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setVerifyServerCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->verify_server_certificate = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @param bool|null $var + * @return $this + */ + public function setVerifyServerCertificateUnwrapped($var) + { + $this->writeWrapperValue("verify_server_certificate", $var); + return $this;} + + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php new file mode 100644 index 000000000000..bc03053dd3ac --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.MySqlSyncConfig + */ +class MySqlSyncConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; + */ + private $initial_sync_flags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Sql\V1\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $initial_sync_flags + * Flags to use for the initial dump. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInitialSyncFlags() + { + return $this->initial_sync_flags; + } + + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; + * @param array<\Google\Cloud\Sql\V1\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInitialSyncFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SyncFlags::class); + $this->initial_sync_flags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php new file mode 100644 index 000000000000..23b8294b885a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php @@ -0,0 +1,353 @@ +google.cloud.sql.v1.OnPremisesConfiguration + */ +class OnPremisesConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + */ + protected $host_port = ''; + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + */ + protected $username = ''; + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + */ + protected $password = ''; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + */ + protected $ca_certificate = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + */ + protected $client_certificate = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + */ + protected $client_key = ''; + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + */ + protected $dump_file_path = ''; + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; + */ + protected $source_instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_port + * The host and port of the on-premises instance in host:port format + * @type string $kind + * This is always `sql#onPremisesConfiguration`. + * @type string $username + * The username for connecting to on-premises instance. + * @type string $password + * The password for connecting to on-premises instance. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * @type string $dump_file_path + * The dump file to create the Cloud SQL replica. + * @type \Google\Cloud\Sql\V1\InstanceReference $source_instance + * The reference to Cloud SQL instance if the source is Cloud SQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + * @return string + */ + public function getHostPort() + { + return $this->host_port; + } + + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + * @param string $var + * @return $this + */ + public function setHostPort($var) + { + GPBUtil::checkString($var, True); + $this->host_port = $var; + + return $this; + } + + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + * @return string + */ + public function getDumpFilePath() + { + return $this->dump_file_path; + } + + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + * @param string $var + * @return $this + */ + public function setDumpFilePath($var) + { + GPBUtil::checkString($var, True); + $this->dump_file_path = $var; + + return $this; + } + + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; + * @return \Google\Cloud\Sql\V1\InstanceReference|null + */ + public function getSourceInstance() + { + return $this->source_instance; + } + + public function hasSourceInstance() + { + return isset($this->source_instance); + } + + public function clearSourceInstance() + { + unset($this->source_instance); + } + + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; + * @param \Google\Cloud\Sql\V1\InstanceReference $var + * @return $this + */ + public function setSourceInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstanceReference::class); + $this->source_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php new file mode 100644 index 000000000000..ed7f1506f616 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php @@ -0,0 +1,814 @@ +google.cloud.sql.v1.Operation + */ +class Operation extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Generated from protobuf field string target_link = 2; + */ + protected $target_link = ''; + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; + */ + protected $status = 0; + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + */ + protected $user = ''; + /** + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + */ + protected $insert_time = null; + /** + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + */ + protected $start_time = null; + /** + * The time this operation finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + */ + protected $end_time = null; + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; + */ + protected $error = null; + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; + */ + protected $api_warning = null; + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; + */ + protected $operation_type = 0; + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; + */ + protected $import_context = null; + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; + */ + protected $export_context = null; + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; + */ + protected $backup_context = null; + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + */ + protected $name = ''; + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + */ + protected $target_id = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + */ + protected $self_link = ''; + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + */ + protected $target_project = ''; + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + */ + protected $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operation`. + * @type string $target_link + * @type int $status + * The status of an operation. + * @type string $user + * The email address of the user who initiated this operation. + * @type \Google\Protobuf\Timestamp $insert_time + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Cloud\Sql\V1\OperationErrors $error + * If errors occurred during processing of this operation, this field will be + * populated. + * @type \Google\Cloud\Sql\V1\ApiWarning $api_warning + * An Admin API warning message. + * @type int $operation_type + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * @type \Google\Cloud\Sql\V1\ImportContext $import_context + * The context for import operation, if applicable. + * @type \Google\Cloud\Sql\V1\ExportContext $export_context + * The context for export operation, if applicable. + * @type \Google\Cloud\Sql\V1\BackupContext $backup_context + * The context for backup operation, if applicable. + * @type string $name + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * @type string $target_id + * Name of the database instance related to this operation. + * @type string $self_link + * The URI of this resource. + * @type string $target_project + * The project ID of the target instance related to this operation. + * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * The context for acquire SSRS lease operation, if applicable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Generated from protobuf field string target_link = 2; + * @return string + */ + public function getTargetLink() + { + return $this->target_link; + } + + /** + * Generated from protobuf field string target_link = 2; + * @param string $var + * @return $this + */ + public function setTargetLink($var) + { + GPBUtil::checkString($var, True); + $this->target_link = $var; + + return $this; + } + + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Operation\SqlOperationStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInsertTime() + { + return $this->insert_time; + } + + public function hasInsertTime() + { + return isset($this->insert_time); + } + + public function clearInsertTime() + { + unset($this->insert_time); + } + + /** + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInsertTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->insert_time = $var; + + return $this; + } + + /** + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @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 actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @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 finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @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 finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; + * @return \Google\Cloud\Sql\V1\OperationErrors|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; + * @param \Google\Cloud\Sql\V1\OperationErrors $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OperationErrors::class); + $this->error = $var; + + return $this; + } + + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; + * @return \Google\Cloud\Sql\V1\ApiWarning|null + */ + public function getApiWarning() + { + return $this->api_warning; + } + + public function hasApiWarning() + { + return isset($this->api_warning); + } + + public function clearApiWarning() + { + unset($this->api_warning); + } + + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; + * @param \Google\Cloud\Sql\V1\ApiWarning $var + * @return $this + */ + public function setApiWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ApiWarning::class); + $this->api_warning = $var; + + return $this; + } + + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; + * @return int + */ + public function getOperationType() + { + return $this->operation_type; + } + + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; + * @param int $var + * @return $this + */ + public function setOperationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Operation\SqlOperationType::class); + $this->operation_type = $var; + + return $this; + } + + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; + * @return \Google\Cloud\Sql\V1\ImportContext|null + */ + public function getImportContext() + { + return $this->import_context; + } + + public function hasImportContext() + { + return isset($this->import_context); + } + + public function clearImportContext() + { + unset($this->import_context); + } + + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; + * @param \Google\Cloud\Sql\V1\ImportContext $var + * @return $this + */ + public function setImportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext::class); + $this->import_context = $var; + + return $this; + } + + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; + * @return \Google\Cloud\Sql\V1\ExportContext|null + */ + public function getExportContext() + { + return $this->export_context; + } + + public function hasExportContext() + { + return isset($this->export_context); + } + + public function clearExportContext() + { + unset($this->export_context); + } + + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; + * @param \Google\Cloud\Sql\V1\ExportContext $var + * @return $this + */ + public function setExportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext::class); + $this->export_context = $var; + + return $this; + } + + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; + * @return \Google\Cloud\Sql\V1\BackupContext|null + */ + public function getBackupContext() + { + return $this->backup_context; + } + + public function hasBackupContext() + { + return isset($this->backup_context); + } + + public function clearBackupContext() + { + unset($this->backup_context); + } + + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; + * @param \Google\Cloud\Sql\V1\BackupContext $var + * @return $this + */ + public function setBackupContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupContext::class); + $this->backup_context = $var; + + return $this; + } + + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + * @return string + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + * @param string $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkString($var, True); + $this->target_id = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php new file mode 100644 index 000000000000..424ad5206f10 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.Operation.SqlOperationStatus + */ +class SqlOperationStatus +{ + /** + * The state of the operation is unknown. + * + * Generated from protobuf enum SQL_OPERATION_STATUS_UNSPECIFIED = 0; + */ + const SQL_OPERATION_STATUS_UNSPECIFIED = 0; + /** + * The operation has been queued, but has not started yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The operation is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The operation completed. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + + private static $valueToName = [ + self::SQL_OPERATION_STATUS_UNSPECIFIED => 'SQL_OPERATION_STATUS_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOperationStatus::class, \Google\Cloud\Sql\V1\Operation_SqlOperationStatus::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php new file mode 100644 index 000000000000..aece4b0cb2a7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php @@ -0,0 +1,379 @@ +google.cloud.sql.v1.Operation.SqlOperationType + */ +class SqlOperationType +{ + /** + * Unknown operation type. + * + * Generated from protobuf enum SQL_OPERATION_TYPE_UNSPECIFIED = 0; + */ + const SQL_OPERATION_TYPE_UNSPECIFIED = 0; + /** + * Imports data into a Cloud SQL instance. + * + * Generated from protobuf enum IMPORT = 1; + */ + const IMPORT = 1; + /** + * Exports data from a Cloud SQL instance to a Cloud Storage + * bucket. + * + * Generated from protobuf enum EXPORT = 2; + */ + const EXPORT = 2; + /** + * Creates a new Cloud SQL instance. + * + * Generated from protobuf enum CREATE = 3; + */ + const CREATE = 3; + /** + * Updates the settings of a Cloud SQL instance. + * + * Generated from protobuf enum UPDATE = 4; + */ + const UPDATE = 4; + /** + * Deletes a Cloud SQL instance. + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * Restarts the Cloud SQL instance. + * + * Generated from protobuf enum RESTART = 6; + */ + const RESTART = 6; + /** + * Generated from protobuf enum BACKUP = 7 [deprecated = true]; + */ + const BACKUP = 7; + /** + * Generated from protobuf enum SNAPSHOT = 8 [deprecated = true]; + */ + const SNAPSHOT = 8; + /** + * Performs instance backup. + * + * Generated from protobuf enum BACKUP_VOLUME = 9; + */ + const BACKUP_VOLUME = 9; + /** + * Deletes an instance backup. + * + * Generated from protobuf enum DELETE_VOLUME = 10; + */ + const DELETE_VOLUME = 10; + /** + * Restores an instance backup. + * + * Generated from protobuf enum RESTORE_VOLUME = 11; + */ + const RESTORE_VOLUME = 11; + /** + * Injects a privileged user in mysql for MOB instances. + * + * Generated from protobuf enum INJECT_USER = 12; + */ + const INJECT_USER = 12; + /** + * Clones a Cloud SQL instance. + * + * Generated from protobuf enum CLONE = 14; + */ + const PBCLONE = 14; + /** + * Stops replication on a Cloud SQL read replica instance. + * + * Generated from protobuf enum STOP_REPLICA = 15; + */ + const STOP_REPLICA = 15; + /** + * Starts replication on a Cloud SQL read replica instance. + * + * Generated from protobuf enum START_REPLICA = 16; + */ + const START_REPLICA = 16; + /** + * Promotes a Cloud SQL replica instance. + * + * Generated from protobuf enum PROMOTE_REPLICA = 17; + */ + const PROMOTE_REPLICA = 17; + /** + * Creates a Cloud SQL replica instance. + * + * Generated from protobuf enum CREATE_REPLICA = 18; + */ + const CREATE_REPLICA = 18; + /** + * Creates a new user in a Cloud SQL instance. + * + * Generated from protobuf enum CREATE_USER = 19; + */ + const CREATE_USER = 19; + /** + * Deletes a user from a Cloud SQL instance. + * + * Generated from protobuf enum DELETE_USER = 20; + */ + const DELETE_USER = 20; + /** + * Updates an existing user in a Cloud SQL instance. + * + * Generated from protobuf enum UPDATE_USER = 21; + */ + const UPDATE_USER = 21; + /** + * Creates a database in the Cloud SQL instance. + * + * Generated from protobuf enum CREATE_DATABASE = 22; + */ + const CREATE_DATABASE = 22; + /** + * Deletes a database in the Cloud SQL instance. + * + * Generated from protobuf enum DELETE_DATABASE = 23; + */ + const DELETE_DATABASE = 23; + /** + * Updates a database in the Cloud SQL instance. + * + * Generated from protobuf enum UPDATE_DATABASE = 24; + */ + const UPDATE_DATABASE = 24; + /** + * Performs failover of an HA-enabled Cloud SQL + * failover replica. + * + * Generated from protobuf enum FAILOVER = 25; + */ + const FAILOVER = 25; + /** + * Deletes the backup taken by a backup run. + * + * Generated from protobuf enum DELETE_BACKUP = 26; + */ + const DELETE_BACKUP = 26; + /** + * Generated from protobuf enum RECREATE_REPLICA = 27; + */ + const RECREATE_REPLICA = 27; + /** + * Truncates a general or slow log table in MySQL. + * + * Generated from protobuf enum TRUNCATE_LOG = 28; + */ + const TRUNCATE_LOG = 28; + /** + * Demotes the stand-alone instance to be a Cloud SQL + * read replica for an external database server. + * + * Generated from protobuf enum DEMOTE_MASTER = 29; + */ + const DEMOTE_MASTER = 29; + /** + * Indicates that the instance is currently in maintenance. Maintenance + * typically causes the instance to be unavailable for 1-3 minutes. + * + * Generated from protobuf enum MAINTENANCE = 30; + */ + const MAINTENANCE = 30; + /** + * This field is deprecated, and will be removed in future version of API. + * + * Generated from protobuf enum ENABLE_PRIVATE_IP = 31 [deprecated = true]; + */ + const ENABLE_PRIVATE_IP = 31; + /** + * Generated from protobuf enum DEFER_MAINTENANCE = 32 [deprecated = true]; + */ + const DEFER_MAINTENANCE = 32; + /** + * Creates clone instance. + * + * Generated from protobuf enum CREATE_CLONE = 33 [deprecated = true]; + */ + const CREATE_CLONE = 33; + /** + * Reschedule maintenance to another time. + * + * Generated from protobuf enum RESCHEDULE_MAINTENANCE = 34; + */ + const RESCHEDULE_MAINTENANCE = 34; + /** + * Starts external sync of a Cloud SQL EM replica to an external primary + * instance. + * + * Generated from protobuf enum START_EXTERNAL_SYNC = 35; + */ + const START_EXTERNAL_SYNC = 35; + /** + * Recovers logs from an instance's old data disk. + * + * Generated from protobuf enum LOG_CLEANUP = 36; + */ + const LOG_CLEANUP = 36; + /** + * Performs auto-restart of an HA-enabled Cloud SQL database for auto + * recovery. + * + * Generated from protobuf enum AUTO_RESTART = 37; + */ + const AUTO_RESTART = 37; + /** + * Re-encrypts CMEK instances with latest key version. + * + * Generated from protobuf enum REENCRYPT = 38; + */ + const REENCRYPT = 38; + /** + * Switches the roles of the primary and replica pair. The target instance + * should be the replica. + * + * Generated from protobuf enum SWITCHOVER = 39; + */ + const SWITCHOVER = 39; + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42; + */ + const ACQUIRE_SSRS_LEASE = 42; + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum RELEASE_SSRS_LEASE = 43; + */ + const RELEASE_SSRS_LEASE = 43; + /** + * Reconfigures old primary after a promote replica operation. Effect of a + * promote operation to the old primary is executed in this operation, + * asynchronously from the promote replica operation executed to the + * replica. + * + * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44; + */ + const RECONFIGURE_OLD_PRIMARY = 44; + /** + * Indicates that the instance, its read replicas, and its cascading + * replicas are in maintenance. Maintenance typically gets initiated on + * groups of replicas first, followed by the primary instance. For each + * instance, maintenance typically causes the instance to be unavailable for + * 1-3 minutes. + * + * Generated from protobuf enum CLUSTER_MAINTENANCE = 45; + */ + const CLUSTER_MAINTENANCE = 45; + /** + * Indicates that the instance (and any of its replicas) are currently in + * maintenance. This is initiated as a self-service request by using SSM. + * Maintenance typically causes the instance to be unavailable for 1-3 + * minutes. + * + * Generated from protobuf enum SELF_SERVICE_MAINTENANCE = 46; + */ + const SELF_SERVICE_MAINTENANCE = 46; + /** + * Switches a primary instance to a replica. This operation runs as part of + * a switchover operation to the original primary instance. + * + * Generated from protobuf enum SWITCHOVER_TO_REPLICA = 47; + */ + const SWITCHOVER_TO_REPLICA = 47; + /** + * Updates the major version of a Cloud SQL instance. + * + * Generated from protobuf enum MAJOR_VERSION_UPGRADE = 48; + */ + const MAJOR_VERSION_UPGRADE = 48; + + private static $valueToName = [ + self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED', + self::IMPORT => 'IMPORT', + self::EXPORT => 'EXPORT', + self::CREATE => 'CREATE', + self::UPDATE => 'UPDATE', + self::DELETE => 'DELETE', + self::RESTART => 'RESTART', + self::BACKUP => 'BACKUP', + self::SNAPSHOT => 'SNAPSHOT', + self::BACKUP_VOLUME => 'BACKUP_VOLUME', + self::DELETE_VOLUME => 'DELETE_VOLUME', + self::RESTORE_VOLUME => 'RESTORE_VOLUME', + self::INJECT_USER => 'INJECT_USER', + self::PBCLONE => 'CLONE', + self::STOP_REPLICA => 'STOP_REPLICA', + self::START_REPLICA => 'START_REPLICA', + self::PROMOTE_REPLICA => 'PROMOTE_REPLICA', + self::CREATE_REPLICA => 'CREATE_REPLICA', + self::CREATE_USER => 'CREATE_USER', + self::DELETE_USER => 'DELETE_USER', + self::UPDATE_USER => 'UPDATE_USER', + self::CREATE_DATABASE => 'CREATE_DATABASE', + self::DELETE_DATABASE => 'DELETE_DATABASE', + self::UPDATE_DATABASE => 'UPDATE_DATABASE', + self::FAILOVER => 'FAILOVER', + self::DELETE_BACKUP => 'DELETE_BACKUP', + self::RECREATE_REPLICA => 'RECREATE_REPLICA', + self::TRUNCATE_LOG => 'TRUNCATE_LOG', + self::DEMOTE_MASTER => 'DEMOTE_MASTER', + self::MAINTENANCE => 'MAINTENANCE', + self::ENABLE_PRIVATE_IP => 'ENABLE_PRIVATE_IP', + self::DEFER_MAINTENANCE => 'DEFER_MAINTENANCE', + self::CREATE_CLONE => 'CREATE_CLONE', + self::RESCHEDULE_MAINTENANCE => 'RESCHEDULE_MAINTENANCE', + self::START_EXTERNAL_SYNC => 'START_EXTERNAL_SYNC', + self::LOG_CLEANUP => 'LOG_CLEANUP', + self::AUTO_RESTART => 'AUTO_RESTART', + self::REENCRYPT => 'REENCRYPT', + self::SWITCHOVER => 'SWITCHOVER', + self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE', + self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE', + self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY', + self::CLUSTER_MAINTENANCE => 'CLUSTER_MAINTENANCE', + self::SELF_SERVICE_MAINTENANCE => 'SELF_SERVICE_MAINTENANCE', + self::SWITCHOVER_TO_REPLICA => 'SWITCHOVER_TO_REPLICA', + self::MAJOR_VERSION_UPGRADE => 'MAJOR_VERSION_UPGRADE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOperationType::class, \Google\Cloud\Sql\V1\Operation_SqlOperationType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php new file mode 100644 index 000000000000..9983939c0bda --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.OperationError + */ +class OperationError extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + */ + protected $code = ''; + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationError`. + * @type string $code + * Identifies the specific error that occurred. + * @type string $message + * Additional information about the error encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the error encountered. + * + * 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; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php new file mode 100644 index 000000000000..6e439bac00ad --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.OperationErrors + */ +class OperationErrors extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationErrors`. + * @type array<\Google\Cloud\Sql\V1\OperationError>|\Google\Protobuf\Internal\RepeatedField $errors + * The list of errors encountered while processing this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; + * @param array<\Google\Cloud\Sql\V1\OperationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\OperationError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php new file mode 100644 index 000000000000..cfa3c41fcd72 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1.OperationsListResponse + */ +class OperationsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationsList`. + * @type array<\Google\Cloud\Sql\V1\Operation>|\Google\Protobuf\Internal\RepeatedField $items + * List of operation resources. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; + * @param array<\Google\Cloud\Sql\V1\Operation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Operation::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php new file mode 100644 index 000000000000..04e5de0765ce --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php @@ -0,0 +1,111 @@ +google.cloud.sql.v1.PasswordStatus + */ +class PasswordStatus extends \Google\Protobuf\Internal\Message +{ + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + */ + protected $locked = false; + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + */ + protected $password_expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $locked + * If true, user does not have login privileges. + * @type \Google\Protobuf\Timestamp $password_expiration_time + * The expiration time of the current password. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPasswordExpirationTime() + { + return $this->password_expiration_time; + } + + public function hasPasswordExpirationTime() + { + return isset($this->password_expiration_time); + } + + public function clearPasswordExpirationTime() + { + unset($this->password_expiration_time); + } + + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPasswordExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->password_expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php new file mode 100644 index 000000000000..41c3210abebc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php @@ -0,0 +1,484 @@ +google.cloud.sql.v1.PasswordValidationPolicy + */ +class PasswordValidationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + */ + protected $min_length = null; + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; + */ + protected $complexity = 0; + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + */ + protected $reuse_interval = null; + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + */ + protected $disallow_username_substring = null; + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + */ + protected $password_change_interval = null; + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + */ + protected $enable_password_policy = null; + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @deprecated + */ + protected $disallow_compromised_credentials = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $min_length + * Minimum number of characters allowed. + * @type int $complexity + * The complexity of the password. + * @type \Google\Protobuf\Int32Value $reuse_interval + * Number of previous passwords that cannot be reused. + * @type \Google\Protobuf\BoolValue $disallow_username_substring + * Disallow username as a part of the password. + * @type \Google\Protobuf\Duration $password_change_interval + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * @type \Google\Protobuf\BoolValue $enable_password_policy + * Whether the password policy is enabled or not. + * @type \Google\Protobuf\BoolValue $disallow_compromised_credentials + * This field is deprecated and will be removed in a future version of the + * API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getMinLength() + { + return $this->min_length; + } + + public function hasMinLength() + { + return isset($this->min_length); + } + + public function clearMinLength() + { + unset($this->min_length); + } + + /** + * Returns the unboxed value from getMinLength() + + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @return int|null + */ + public function getMinLengthUnwrapped() + { + return $this->readWrapperValue("min_length"); + } + + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setMinLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->min_length = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @param int|null $var + * @return $this + */ + public function setMinLengthUnwrapped($var) + { + $this->writeWrapperValue("min_length", $var); + return $this;} + + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; + * @return int + */ + public function getComplexity() + { + return $this->complexity; + } + + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; + * @param int $var + * @return $this + */ + public function setComplexity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\PasswordValidationPolicy\Complexity::class); + $this->complexity = $var; + + return $this; + } + + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @return \Google\Protobuf\Int32Value|null + */ + public function getReuseInterval() + { + return $this->reuse_interval; + } + + public function hasReuseInterval() + { + return isset($this->reuse_interval); + } + + public function clearReuseInterval() + { + unset($this->reuse_interval); + } + + /** + * Returns the unboxed value from getReuseInterval() + + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @return int|null + */ + public function getReuseIntervalUnwrapped() + { + return $this->readWrapperValue("reuse_interval"); + } + + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setReuseInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->reuse_interval = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @param int|null $var + * @return $this + */ + public function setReuseIntervalUnwrapped($var) + { + $this->writeWrapperValue("reuse_interval", $var); + return $this;} + + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDisallowUsernameSubstring() + { + return $this->disallow_username_substring; + } + + public function hasDisallowUsernameSubstring() + { + return isset($this->disallow_username_substring); + } + + public function clearDisallowUsernameSubstring() + { + unset($this->disallow_username_substring); + } + + /** + * Returns the unboxed value from getDisallowUsernameSubstring() + + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @return bool|null + */ + public function getDisallowUsernameSubstringUnwrapped() + { + return $this->readWrapperValue("disallow_username_substring"); + } + + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDisallowUsernameSubstring($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disallow_username_substring = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @param bool|null $var + * @return $this + */ + public function setDisallowUsernameSubstringUnwrapped($var) + { + $this->writeWrapperValue("disallow_username_substring", $var); + return $this;} + + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getPasswordChangeInterval() + { + return $this->password_change_interval; + } + + public function hasPasswordChangeInterval() + { + return isset($this->password_change_interval); + } + + public function clearPasswordChangeInterval() + { + unset($this->password_change_interval); + } + + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPasswordChangeInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->password_change_interval = $var; + + return $this; + } + + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnablePasswordPolicy() + { + return $this->enable_password_policy; + } + + public function hasEnablePasswordPolicy() + { + return isset($this->enable_password_policy); + } + + public function clearEnablePasswordPolicy() + { + unset($this->enable_password_policy); + } + + /** + * Returns the unboxed value from getEnablePasswordPolicy() + + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @return bool|null + */ + public function getEnablePasswordPolicyUnwrapped() + { + return $this->readWrapperValue("enable_password_policy"); + } + + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnablePasswordPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_password_policy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @param bool|null $var + * @return $this + */ + public function setEnablePasswordPolicyUnwrapped($var) + { + $this->writeWrapperValue("enable_password_policy", $var); + return $this;} + + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return $this->disallow_compromised_credentials; + } + + public function hasDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return isset($this->disallow_compromised_credentials); + } + + public function clearDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + unset($this->disallow_compromised_credentials); + } + + /** + * Returns the unboxed value from getDisallowCompromisedCredentials() + + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @return bool|null + */ + public function getDisallowCompromisedCredentialsUnwrapped() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("disallow_compromised_credentials"); + } + + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setDisallowCompromisedCredentials($var) + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disallow_compromised_credentials = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setDisallowCompromisedCredentialsUnwrapped($var) + { + $this->writeWrapperValue("disallow_compromised_credentials", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php new file mode 100644 index 000000000000..30292b5fb504 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php @@ -0,0 +1,58 @@ +google.cloud.sql.v1.PasswordValidationPolicy.Complexity + */ +class Complexity +{ + /** + * Complexity check is not specified. + * + * Generated from protobuf enum COMPLEXITY_UNSPECIFIED = 0; + */ + const COMPLEXITY_UNSPECIFIED = 0; + /** + * A combination of lowercase, uppercase, numeric, and non-alphanumeric + * characters. + * + * Generated from protobuf enum COMPLEXITY_DEFAULT = 1; + */ + const COMPLEXITY_DEFAULT = 1; + + private static $valueToName = [ + self::COMPLEXITY_UNSPECIFIED => 'COMPLEXITY_UNSPECIFIED', + self::COMPLEXITY_DEFAULT => 'COMPLEXITY_DEFAULT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Complexity::class, \Google\Cloud\Sql\V1\PasswordValidationPolicy_Complexity::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php new file mode 100644 index 000000000000..9b78ebbaf0a0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.PerformDiskShrinkContext + */ +class PerformDiskShrinkContext extends \Google\Protobuf\Internal\Message +{ + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + */ + protected $target_size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $target_size_gb + * The target disk shrink size in GigaBytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + * @return int|string + */ + public function getTargetSizeGb() + { + return $this->target_size_gb; + } + + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + * @param int|string $var + * @return $this + */ + public function setTargetSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->target_size_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php new file mode 100644 index 000000000000..9d8bb9a95229 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php @@ -0,0 +1,127 @@ +google.cloud.sql.v1.PscConfig + */ +class PscConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + */ + protected $psc_enabled = null; + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_consumer_projects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $psc_enabled + * Whether PSC connectivity is enabled for this instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_consumer_projects + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + * @return bool + */ + public function getPscEnabled() + { + return isset($this->psc_enabled) ? $this->psc_enabled : false; + } + + public function hasPscEnabled() + { + return isset($this->psc_enabled); + } + + public function clearPscEnabled() + { + unset($this->psc_enabled); + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + * @param bool $var + * @return $this + */ + public function setPscEnabled($var) + { + GPBUtil::checkBool($var); + $this->psc_enabled = $var; + + return $this; + } + + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedConsumerProjects() + { + return $this->allowed_consumer_projects; + } + + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedConsumerProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_consumer_projects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php new file mode 100644 index 000000000000..98e162465cd0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php @@ -0,0 +1,309 @@ +google.cloud.sql.v1.ReplicaConfiguration + */ +class ReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; + */ + protected $mysql_replica_configuration = null; + /** + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + */ + protected $failover_target = null; + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cascadable_replica = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#replicaConfiguration`. + * @type \Google\Cloud\Sql\V1\MySqlReplicaConfiguration $mysql_replica_configuration + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * @type \Google\Protobuf\BoolValue $failover_target + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * @type \Google\Protobuf\BoolValue $cascadable_replica + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; + * @return \Google\Cloud\Sql\V1\MySqlReplicaConfiguration|null + */ + public function getMysqlReplicaConfiguration() + { + return $this->mysql_replica_configuration; + } + + public function hasMysqlReplicaConfiguration() + { + return isset($this->mysql_replica_configuration); + } + + public function clearMysqlReplicaConfiguration() + { + unset($this->mysql_replica_configuration); + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; + * @param \Google\Cloud\Sql\V1\MySqlReplicaConfiguration $var + * @return $this + */ + public function setMysqlReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlReplicaConfiguration::class); + $this->mysql_replica_configuration = $var; + + return $this; + } + + /** + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getFailoverTarget() + { + return $this->failover_target; + } + + public function hasFailoverTarget() + { + return isset($this->failover_target); + } + + public function clearFailoverTarget() + { + unset($this->failover_target); + } + + /** + * Returns the unboxed value from getFailoverTarget() + + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @return bool|null + */ + public function getFailoverTargetUnwrapped() + { + return $this->readWrapperValue("failover_target"); + } + + /** + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setFailoverTarget($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->failover_target = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @param bool|null $var + * @return $this + */ + public function setFailoverTargetUnwrapped($var) + { + $this->writeWrapperValue("failover_target", $var); + return $this;} + + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getCascadableReplica() + { + return $this->cascadable_replica; + } + + public function hasCascadableReplica() + { + return isset($this->cascadable_replica); + } + + public function clearCascadableReplica() + { + unset($this->cascadable_replica); + } + + /** + * Returns the unboxed value from getCascadableReplica() + + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getCascadableReplicaUnwrapped() + { + return $this->readWrapperValue("cascadable_replica"); + } + + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setCascadableReplica($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->cascadable_replica = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setCascadableReplicaUnwrapped($var) + { + $this->writeWrapperValue("cascadable_replica", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php new file mode 100644 index 000000000000..8ffcc580e2bc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php @@ -0,0 +1,186 @@ +google.cloud.sql.v1.ReplicationCluster + */ +class ReplicationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If set, it indicates this instance has a private service + * access (PSA) dns endpoint that is pointing to the primary instance of the + * cluster. If this instance is the primary, the dns should be pointing to + * this instance. After Switchover or Replica failover, this DNS endpoint + * points to the promoted instance. This is a read-only field, returned to the + * user as information. This field can exist even if a standalone instance + * does not yet have a replica, or had a DR replica that was deleted. + * + * Generated from protobuf field string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psa_write_endpoint = ''; + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Set this field to a replica name + * to designate a DR replica for a primary instance. Remove the replica name + * to remove the DR replica designation. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $failover_dr_replica_name = ''; + /** + * Output only. Read-only field that indicates whether the replica is a DR + * replica. This field is not set if the instance is a primary instance. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dr_replica = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $psa_write_endpoint + * Output only. If set, it indicates this instance has a private service + * access (PSA) dns endpoint that is pointing to the primary instance of the + * cluster. If this instance is the primary, the dns should be pointing to + * this instance. After Switchover or Replica failover, this DNS endpoint + * points to the promoted instance. This is a read-only field, returned to the + * user as information. This field can exist even if a standalone instance + * does not yet have a replica, or had a DR replica that was deleted. + * @type string $failover_dr_replica_name + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Set this field to a replica name + * to designate a DR replica for a primary instance. Remove the replica name + * to remove the DR replica designation. + * @type bool $dr_replica + * Output only. Read-only field that indicates whether the replica is a DR + * replica. This field is not set if the instance is a primary instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If set, it indicates this instance has a private service + * access (PSA) dns endpoint that is pointing to the primary instance of the + * cluster. If this instance is the primary, the dns should be pointing to + * this instance. After Switchover or Replica failover, this DNS endpoint + * points to the promoted instance. This is a read-only field, returned to the + * user as information. This field can exist even if a standalone instance + * does not yet have a replica, or had a DR replica that was deleted. + * + * Generated from protobuf field string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPsaWriteEndpoint() + { + return $this->psa_write_endpoint; + } + + /** + * Output only. If set, it indicates this instance has a private service + * access (PSA) dns endpoint that is pointing to the primary instance of the + * cluster. If this instance is the primary, the dns should be pointing to + * this instance. After Switchover or Replica failover, this DNS endpoint + * points to the promoted instance. This is a read-only field, returned to the + * user as information. This field can exist even if a standalone instance + * does not yet have a replica, or had a DR replica that was deleted. + * + * Generated from protobuf field string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPsaWriteEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->psa_write_endpoint = $var; + + return $this; + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Set this field to a replica name + * to designate a DR replica for a primary instance. Remove the replica name + * to remove the DR replica designation. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFailoverDrReplicaName() + { + return $this->failover_dr_replica_name; + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Set this field to a replica name + * to designate a DR replica for a primary instance. Remove the replica name + * to remove the DR replica designation. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFailoverDrReplicaName($var) + { + GPBUtil::checkString($var, True); + $this->failover_dr_replica_name = $var; + + return $this; + } + + /** + * Output only. Read-only field that indicates whether the replica is a DR + * replica. This field is not set if the instance is a primary instance. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDrReplica() + { + return $this->dr_replica; + } + + /** + * Output only. Read-only field that indicates whether the replica is a DR + * replica. This field is not set if the instance is a primary instance. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDrReplica($var) + { + GPBUtil::checkBool($var); + $this->dr_replica = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php new file mode 100644 index 000000000000..181d00941303 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php @@ -0,0 +1,170 @@ +google.cloud.sql.v1.RestoreBackupContext + */ +class RestoreBackupContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + */ + protected $backup_run_id = 0; + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + */ + protected $instance_id = ''; + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#restoreBackupContext`. + * @type int|string $backup_run_id + * The ID of the backup run to restore from. + * @type string $instance_id + * The ID of the instance that the backup was taken from. + * @type string $project + * The full project ID of the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + * @return int|string + */ + public function getBackupRunId() + { + return $this->backup_run_id; + } + + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + * @param int|string $var + * @return $this + */ + public function setBackupRunId($var) + { + GPBUtil::checkInt64($var); + $this->backup_run_id = $var; + + return $this; + } + + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php new file mode 100644 index 000000000000..ae676d1af208 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1.RotateServerCaContext + */ +class RotateServerCaContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + */ + protected $next_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#rotateServerCaContext`. + * @type string $next_version + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + * @return string + */ + public function getNextVersion() + { + return $this->next_version; + } + + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + * @param string $var + * @return $this + */ + public function setNextVersion($var) + { + GPBUtil::checkString($var, True); + $this->next_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php new file mode 100644 index 000000000000..aa9adf24e354 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php @@ -0,0 +1,1856 @@ +google.cloud.sql.v1.Settings + */ +class Settings extends \Google\Protobuf\Internal\Message +{ + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + */ + protected $settings_version = null; + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @deprecated + */ + private $authorized_gae_applications; + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + */ + protected $tier = ''; + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + */ + private $user_labels; + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; + */ + protected $availability_type = 0; + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; + */ + protected $pricing_plan = 0; + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; + * @deprecated + */ + protected $replication_type = 0; + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + */ + protected $storage_auto_resize_limit = null; + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; + */ + protected $activation_policy = 0; + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; + */ + protected $ip_configuration = null; + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + */ + protected $storage_auto_resize = null; + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; + */ + protected $location_preference = null; + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; + */ + private $database_flags; + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; + */ + protected $data_disk_type = 0; + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; + */ + protected $maintenance_window = null; + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; + */ + protected $backup_configuration = null; + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + */ + protected $database_replication_enabled = null; + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @deprecated + */ + protected $crash_safe_replication_enabled = null; + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + */ + protected $data_disk_size_gb = null; + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; + */ + protected $active_directory_config = null; + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + */ + protected $collation = ''; + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; + */ + private $deny_maintenance_periods; + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; + */ + protected $insights_config = null; + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; + */ + protected $password_validation_policy = null; + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; + */ + protected $sql_server_audit_config = null; + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $edition = 0; + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; + */ + protected $connector_enforcement = 0; + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + */ + protected $deletion_protection_enabled = null; + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + */ + protected $time_zone = ''; + /** + * Specifies advanced machine configuration for the instances relevant only + * for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; + */ + protected $advanced_machine_features = null; + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; + */ + protected $data_cache_config = null; + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_google_ml_integration = null; + /** + * Optional. By default, Cloud SQL instances have schema extraction disabled + * for Dataplex. When this parameter is set to true, schema extraction for + * Dataplex on Cloud SQL instances is activated. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_dataplex_integration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $settings_version + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * @type array|\Google\Protobuf\Internal\RepeatedField $authorized_gae_applications + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * @type string $tier + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * @type string $kind + * This is always `sql#settings`. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * @type int $availability_type + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * @type int $pricing_plan + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * @type int $replication_type + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * @type \Google\Protobuf\Int64Value $storage_auto_resize_limit + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * @type int $activation_policy + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * @type \Google\Cloud\Sql\V1\IpConfiguration $ip_configuration + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * @type \Google\Protobuf\BoolValue $storage_auto_resize + * Configuration to increase storage size automatically. The default value is + * true. + * @type \Google\Cloud\Sql\V1\LocationPreference $location_preference + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * @type array<\Google\Cloud\Sql\V1\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $database_flags + * The database flags passed to the instance at startup. + * @type int $data_disk_type + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * @type \Google\Cloud\Sql\V1\MaintenanceWindow $maintenance_window + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * @type \Google\Cloud\Sql\V1\BackupConfiguration $backup_configuration + * The daily backup configuration for the instance. + * @type \Google\Protobuf\BoolValue $database_replication_enabled + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * @type \Google\Protobuf\BoolValue $crash_safe_replication_enabled + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * @type \Google\Protobuf\Int64Value $data_disk_size_gb + * The size of data disk, in GB. The data disk size minimum is 10GB. + * @type \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig $active_directory_config + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * @type string $collation + * The name of server Instance collation. + * @type array<\Google\Cloud\Sql\V1\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $deny_maintenance_periods + * Deny maintenance periods + * @type \Google\Cloud\Sql\V1\InsightsConfig $insights_config + * Insights configuration, for now relevant only for Postgres. + * @type \Google\Cloud\Sql\V1\PasswordValidationPolicy $password_validation_policy + * The local user password validation policy of the instance. + * @type \Google\Cloud\Sql\V1\SqlServerAuditConfig $sql_server_audit_config + * SQL Server specific audit configuration. + * @type int $edition + * Optional. The edition of the instance. + * @type int $connector_enforcement + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * @type \Google\Protobuf\BoolValue $deletion_protection_enabled + * Configuration to protect against accidental instance deletion. + * @type string $time_zone + * Server timezone, relevant only for Cloud SQL for SQL Server. + * @type \Google\Cloud\Sql\V1\AdvancedMachineFeatures $advanced_machine_features + * Specifies advanced machine configuration for the instances relevant only + * for SQL Server. + * @type \Google\Cloud\Sql\V1\DataCacheConfig $data_cache_config + * Configuration for data cache. + * @type \Google\Protobuf\BoolValue $enable_google_ml_integration + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * @type \Google\Protobuf\BoolValue $enable_dataplex_integration + * Optional. By default, Cloud SQL instances have schema extraction disabled + * for Dataplex. When this parameter is set to true, schema extraction for + * Dataplex on Cloud SQL instances is activated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @return \Google\Protobuf\Int64Value|null + */ + public function getSettingsVersion() + { + return $this->settings_version; + } + + public function hasSettingsVersion() + { + return isset($this->settings_version); + } + + public function clearSettingsVersion() + { + unset($this->settings_version); + } + + /** + * Returns the unboxed value from getSettingsVersion() + + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @return int|string|null + */ + public function getSettingsVersionUnwrapped() + { + return $this->readWrapperValue("settings_version"); + } + + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setSettingsVersion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->settings_version = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @param int|string|null $var + * @return $this + */ + public function setSettingsVersionUnwrapped($var) + { + $this->writeWrapperValue("settings_version", $var); + return $this;} + + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getAuthorizedGaeApplications() + { + @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); + return $this->authorized_gae_applications; + } + + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setAuthorizedGaeApplications($var) + { + @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->authorized_gae_applications = $arr; + + return $this; + } + + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + * @return string + */ + public function getTier() + { + return $this->tier; + } + + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + * @param string $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkString($var, True); + $this->tier = $var; + + return $this; + } + + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; + * @return int + */ + public function getAvailabilityType() + { + return $this->availability_type; + } + + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; + * @param int $var + * @return $this + */ + public function setAvailabilityType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlAvailabilityType::class); + $this->availability_type = $var; + + return $this; + } + + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; + * @return int + */ + public function getPricingPlan() + { + return $this->pricing_plan; + } + + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; + * @param int $var + * @return $this + */ + public function setPricingPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlPricingPlan::class); + $this->pricing_plan = $var; + + return $this; + } + + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; + * @return int + * @deprecated + */ + public function getReplicationType() + { + @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); + return $this->replication_type; + } + + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setReplicationType($var) + { + @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlReplicationType::class); + $this->replication_type = $var; + + return $this; + } + + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @return \Google\Protobuf\Int64Value|null + */ + public function getStorageAutoResizeLimit() + { + return $this->storage_auto_resize_limit; + } + + public function hasStorageAutoResizeLimit() + { + return isset($this->storage_auto_resize_limit); + } + + public function clearStorageAutoResizeLimit() + { + unset($this->storage_auto_resize_limit); + } + + /** + * Returns the unboxed value from getStorageAutoResizeLimit() + + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @return int|string|null + */ + public function getStorageAutoResizeLimitUnwrapped() + { + return $this->readWrapperValue("storage_auto_resize_limit"); + } + + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setStorageAutoResizeLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->storage_auto_resize_limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @param int|string|null $var + * @return $this + */ + public function setStorageAutoResizeLimitUnwrapped($var) + { + $this->writeWrapperValue("storage_auto_resize_limit", $var); + return $this;} + + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; + * @return int + */ + public function getActivationPolicy() + { + return $this->activation_policy; + } + + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; + * @param int $var + * @return $this + */ + public function setActivationPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\SqlActivationPolicy::class); + $this->activation_policy = $var; + + return $this; + } + + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; + * @return \Google\Cloud\Sql\V1\IpConfiguration|null + */ + public function getIpConfiguration() + { + return $this->ip_configuration; + } + + public function hasIpConfiguration() + { + return isset($this->ip_configuration); + } + + public function clearIpConfiguration() + { + unset($this->ip_configuration); + } + + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; + * @param \Google\Cloud\Sql\V1\IpConfiguration $var + * @return $this + */ + public function setIpConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\IpConfiguration::class); + $this->ip_configuration = $var; + + return $this; + } + + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStorageAutoResize() + { + return $this->storage_auto_resize; + } + + public function hasStorageAutoResize() + { + return isset($this->storage_auto_resize); + } + + public function clearStorageAutoResize() + { + unset($this->storage_auto_resize); + } + + /** + * Returns the unboxed value from getStorageAutoResize() + + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @return bool|null + */ + public function getStorageAutoResizeUnwrapped() + { + return $this->readWrapperValue("storage_auto_resize"); + } + + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStorageAutoResize($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->storage_auto_resize = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @param bool|null $var + * @return $this + */ + public function setStorageAutoResizeUnwrapped($var) + { + $this->writeWrapperValue("storage_auto_resize", $var); + return $this;} + + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; + * @return \Google\Cloud\Sql\V1\LocationPreference|null + */ + public function getLocationPreference() + { + return $this->location_preference; + } + + public function hasLocationPreference() + { + return isset($this->location_preference); + } + + public function clearLocationPreference() + { + unset($this->location_preference); + } + + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; + * @param \Google\Cloud\Sql\V1\LocationPreference $var + * @return $this + */ + public function setLocationPreference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\LocationPreference::class); + $this->location_preference = $var; + + return $this; + } + + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabaseFlags() + { + return $this->database_flags; + } + + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; + * @param array<\Google\Cloud\Sql\V1\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabaseFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DatabaseFlags::class); + $this->database_flags = $arr; + + return $this; + } + + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; + * @return int + */ + public function getDataDiskType() + { + return $this->data_disk_type; + } + + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; + * @param int $var + * @return $this + */ + public function setDataDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDataDiskType::class); + $this->data_disk_type = $var; + + return $this; + } + + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; + * @return \Google\Cloud\Sql\V1\MaintenanceWindow|null + */ + public function getMaintenanceWindow() + { + return $this->maintenance_window; + } + + public function hasMaintenanceWindow() + { + return isset($this->maintenance_window); + } + + public function clearMaintenanceWindow() + { + unset($this->maintenance_window); + } + + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; + * @param \Google\Cloud\Sql\V1\MaintenanceWindow $var + * @return $this + */ + public function setMaintenanceWindow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MaintenanceWindow::class); + $this->maintenance_window = $var; + + return $this; + } + + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; + * @return \Google\Cloud\Sql\V1\BackupConfiguration|null + */ + public function getBackupConfiguration() + { + return $this->backup_configuration; + } + + public function hasBackupConfiguration() + { + return isset($this->backup_configuration); + } + + public function clearBackupConfiguration() + { + unset($this->backup_configuration); + } + + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; + * @param \Google\Cloud\Sql\V1\BackupConfiguration $var + * @return $this + */ + public function setBackupConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupConfiguration::class); + $this->backup_configuration = $var; + + return $this; + } + + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDatabaseReplicationEnabled() + { + return $this->database_replication_enabled; + } + + public function hasDatabaseReplicationEnabled() + { + return isset($this->database_replication_enabled); + } + + public function clearDatabaseReplicationEnabled() + { + unset($this->database_replication_enabled); + } + + /** + * Returns the unboxed value from getDatabaseReplicationEnabled() + + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @return bool|null + */ + public function getDatabaseReplicationEnabledUnwrapped() + { + return $this->readWrapperValue("database_replication_enabled"); + } + + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDatabaseReplicationEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->database_replication_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @param bool|null $var + * @return $this + */ + public function setDatabaseReplicationEnabledUnwrapped($var) + { + $this->writeWrapperValue("database_replication_enabled", $var); + return $this;} + + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return $this->crash_safe_replication_enabled; + } + + public function hasCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return isset($this->crash_safe_replication_enabled); + } + + public function clearCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + unset($this->crash_safe_replication_enabled); + } + + /** + * Returns the unboxed value from getCrashSafeReplicationEnabled() + + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @return bool|null + */ + public function getCrashSafeReplicationEnabledUnwrapped() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("crash_safe_replication_enabled"); + } + + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setCrashSafeReplicationEnabled($var) + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->crash_safe_replication_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setCrashSafeReplicationEnabledUnwrapped($var) + { + $this->writeWrapperValue("crash_safe_replication_enabled", $var); + return $this;} + + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataDiskSizeGb() + { + return $this->data_disk_size_gb; + } + + public function hasDataDiskSizeGb() + { + return isset($this->data_disk_size_gb); + } + + public function clearDataDiskSizeGb() + { + unset($this->data_disk_size_gb); + } + + /** + * Returns the unboxed value from getDataDiskSizeGb() + + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @return int|string|null + */ + public function getDataDiskSizeGbUnwrapped() + { + return $this->readWrapperValue("data_disk_size_gb"); + } + + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataDiskSizeGb($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_disk_size_gb = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @param int|string|null $var + * @return $this + */ + public function setDataDiskSizeGbUnwrapped($var) + { + $this->writeWrapperValue("data_disk_size_gb", $var); + return $this;} + + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; + * @return \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig|null + */ + public function getActiveDirectoryConfig() + { + return $this->active_directory_config; + } + + public function hasActiveDirectoryConfig() + { + return isset($this->active_directory_config); + } + + public function clearActiveDirectoryConfig() + { + unset($this->active_directory_config); + } + + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; + * @param \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig $var + * @return $this + */ + public function setActiveDirectoryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig::class); + $this->active_directory_config = $var; + + return $this; + } + + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDenyMaintenancePeriods() + { + return $this->deny_maintenance_periods; + } + + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; + * @param array<\Google\Cloud\Sql\V1\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDenyMaintenancePeriods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DenyMaintenancePeriod::class); + $this->deny_maintenance_periods = $arr; + + return $this; + } + + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; + * @return \Google\Cloud\Sql\V1\InsightsConfig|null + */ + public function getInsightsConfig() + { + return $this->insights_config; + } + + public function hasInsightsConfig() + { + return isset($this->insights_config); + } + + public function clearInsightsConfig() + { + unset($this->insights_config); + } + + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; + * @param \Google\Cloud\Sql\V1\InsightsConfig $var + * @return $this + */ + public function setInsightsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InsightsConfig::class); + $this->insights_config = $var; + + return $this; + } + + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; + * @return \Google\Cloud\Sql\V1\PasswordValidationPolicy|null + */ + public function getPasswordValidationPolicy() + { + return $this->password_validation_policy; + } + + public function hasPasswordValidationPolicy() + { + return isset($this->password_validation_policy); + } + + public function clearPasswordValidationPolicy() + { + unset($this->password_validation_policy); + } + + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; + * @param \Google\Cloud\Sql\V1\PasswordValidationPolicy $var + * @return $this + */ + public function setPasswordValidationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PasswordValidationPolicy::class); + $this->password_validation_policy = $var; + + return $this; + } + + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; + * @return \Google\Cloud\Sql\V1\SqlServerAuditConfig|null + */ + public function getSqlServerAuditConfig() + { + return $this->sql_server_audit_config; + } + + public function hasSqlServerAuditConfig() + { + return isset($this->sql_server_audit_config); + } + + public function clearSqlServerAuditConfig() + { + unset($this->sql_server_audit_config); + } + + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; + * @param \Google\Cloud\Sql\V1\SqlServerAuditConfig $var + * @return $this + */ + public function setSqlServerAuditConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerAuditConfig::class); + $this->sql_server_audit_config = $var; + + return $this; + } + + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\Edition::class); + $this->edition = $var; + + return $this; + } + + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; + * @return int + */ + public function getConnectorEnforcement() + { + return $this->connector_enforcement; + } + + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; + * @param int $var + * @return $this + */ + public function setConnectorEnforcement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\ConnectorEnforcement::class); + $this->connector_enforcement = $var; + + return $this; + } + + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDeletionProtectionEnabled() + { + return $this->deletion_protection_enabled; + } + + public function hasDeletionProtectionEnabled() + { + return isset($this->deletion_protection_enabled); + } + + public function clearDeletionProtectionEnabled() + { + unset($this->deletion_protection_enabled); + } + + /** + * Returns the unboxed value from getDeletionProtectionEnabled() + + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @return bool|null + */ + public function getDeletionProtectionEnabledUnwrapped() + { + return $this->readWrapperValue("deletion_protection_enabled"); + } + + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDeletionProtectionEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->deletion_protection_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @param bool|null $var + * @return $this + */ + public function setDeletionProtectionEnabledUnwrapped($var) + { + $this->writeWrapperValue("deletion_protection_enabled", $var); + return $this;} + + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Specifies advanced machine configuration for the instances relevant only + * for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; + * @return \Google\Cloud\Sql\V1\AdvancedMachineFeatures|null + */ + public function getAdvancedMachineFeatures() + { + return $this->advanced_machine_features; + } + + public function hasAdvancedMachineFeatures() + { + return isset($this->advanced_machine_features); + } + + public function clearAdvancedMachineFeatures() + { + unset($this->advanced_machine_features); + } + + /** + * Specifies advanced machine configuration for the instances relevant only + * for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; + * @param \Google\Cloud\Sql\V1\AdvancedMachineFeatures $var + * @return $this + */ + public function setAdvancedMachineFeatures($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AdvancedMachineFeatures::class); + $this->advanced_machine_features = $var; + + return $this; + } + + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; + * @return \Google\Cloud\Sql\V1\DataCacheConfig|null + */ + public function getDataCacheConfig() + { + return $this->data_cache_config; + } + + public function hasDataCacheConfig() + { + return isset($this->data_cache_config); + } + + public function clearDataCacheConfig() + { + unset($this->data_cache_config); + } + + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; + * @param \Google\Cloud\Sql\V1\DataCacheConfig $var + * @return $this + */ + public function setDataCacheConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DataCacheConfig::class); + $this->data_cache_config = $var; + + return $this; + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnableGoogleMlIntegration() + { + return $this->enable_google_ml_integration; + } + + public function hasEnableGoogleMlIntegration() + { + return isset($this->enable_google_ml_integration); + } + + public function clearEnableGoogleMlIntegration() + { + unset($this->enable_google_ml_integration); + } + + /** + * Returns the unboxed value from getEnableGoogleMlIntegration() + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnableGoogleMlIntegrationUnwrapped() + { + return $this->readWrapperValue("enable_google_ml_integration"); + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnableGoogleMlIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_google_ml_integration = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnableGoogleMlIntegrationUnwrapped($var) + { + $this->writeWrapperValue("enable_google_ml_integration", $var); + return $this;} + + /** + * Optional. By default, Cloud SQL instances have schema extraction disabled + * for Dataplex. When this parameter is set to true, schema extraction for + * Dataplex on Cloud SQL instances is activated. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnableDataplexIntegration() + { + return $this->enable_dataplex_integration; + } + + public function hasEnableDataplexIntegration() + { + return isset($this->enable_dataplex_integration); + } + + public function clearEnableDataplexIntegration() + { + unset($this->enable_dataplex_integration); + } + + /** + * Returns the unboxed value from getEnableDataplexIntegration() + + * Optional. By default, Cloud SQL instances have schema extraction disabled + * for Dataplex. When this parameter is set to true, schema extraction for + * Dataplex on Cloud SQL instances is activated. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnableDataplexIntegrationUnwrapped() + { + return $this->readWrapperValue("enable_dataplex_integration"); + } + + /** + * Optional. By default, Cloud SQL instances have schema extraction disabled + * for Dataplex. When this parameter is set to true, schema extraction for + * Dataplex on Cloud SQL instances is activated. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnableDataplexIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_dataplex_integration = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. By default, Cloud SQL instances have schema extraction disabled + * for Dataplex. When this parameter is set to true, schema extraction for + * Dataplex on Cloud SQL instances is activated. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnableDataplexIntegrationUnwrapped($var) + { + $this->writeWrapperValue("enable_dataplex_integration", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php new file mode 100644 index 000000000000..b5e20e282ce4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1.Settings.ConnectorEnforcement + */ +class ConnectorEnforcement +{ + /** + * The requirement for Cloud SQL connectors is unknown. + * + * Generated from protobuf enum CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; + */ + const CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; + /** + * Do not require Cloud SQL connectors. + * + * Generated from protobuf enum NOT_REQUIRED = 1; + */ + const NOT_REQUIRED = 1; + /** + * Require all connections to use Cloud SQL connectors, including the + * Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. + * Note: This disables all existing authorized networks. + * + * Generated from protobuf enum REQUIRED = 2; + */ + const REQUIRED = 2; + + private static $valueToName = [ + self::CONNECTOR_ENFORCEMENT_UNSPECIFIED => 'CONNECTOR_ENFORCEMENT_UNSPECIFIED', + self::NOT_REQUIRED => 'NOT_REQUIRED', + self::REQUIRED => 'REQUIRED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConnectorEnforcement::class, \Google\Cloud\Sql\V1\Settings_ConnectorEnforcement::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php new file mode 100644 index 000000000000..5c3af9f7ac03 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.Settings.Edition + */ +class Edition +{ + /** + * The instance did not specify the edition. + * + * Generated from protobuf enum EDITION_UNSPECIFIED = 0; + */ + const EDITION_UNSPECIFIED = 0; + /** + * The instance is an enterprise edition. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + /** + * The instance is an Enterprise Plus edition. + * + * Generated from protobuf enum ENTERPRISE_PLUS = 3; + */ + const ENTERPRISE_PLUS = 3; + + private static $valueToName = [ + self::EDITION_UNSPECIFIED => 'EDITION_UNSPECIFIED', + self::ENTERPRISE => 'ENTERPRISE', + self::ENTERPRISE_PLUS => 'ENTERPRISE_PLUS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Edition::class, \Google\Cloud\Sql\V1\Settings_Edition::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php new file mode 100644 index 000000000000..3e387860df63 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.Settings.SqlActivationPolicy + */ +class SqlActivationPolicy +{ + /** + * Unknown activation plan. + * + * Generated from protobuf enum SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + */ + const SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + /** + * The instance is always up and running. + * + * Generated from protobuf enum ALWAYS = 1; + */ + const ALWAYS = 1; + /** + * The instance never starts. + * + * Generated from protobuf enum NEVER = 2; + */ + const NEVER = 2; + /** + * The instance starts upon receiving requests. + * + * Generated from protobuf enum ON_DEMAND = 3 [deprecated = true]; + */ + const ON_DEMAND = 3; + + private static $valueToName = [ + self::SQL_ACTIVATION_POLICY_UNSPECIFIED => 'SQL_ACTIVATION_POLICY_UNSPECIFIED', + self::ALWAYS => 'ALWAYS', + self::NEVER => 'NEVER', + self::ON_DEMAND => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlActivationPolicy::class, \Google\Cloud\Sql\V1\Settings_SqlActivationPolicy::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php new file mode 100644 index 000000000000..1ce7310f6dca --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlActiveDirectoryConfig + */ +class SqlActiveDirectoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + */ + protected $domain = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#activeDirectoryConfig. + * @type string $domain + * The name of the domain (e.g., mydomain.com). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php new file mode 100644 index 000000000000..31a166e7bd1e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlAvailabilityType + */ +class SqlAvailabilityType +{ + /** + * This is an unknown Availability type. + * + * Generated from protobuf enum SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + */ + const SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + /** + * Zonal available instance. + * + * Generated from protobuf enum ZONAL = 1; + */ + const ZONAL = 1; + /** + * Regional available instance. + * + * Generated from protobuf enum REGIONAL = 2; + */ + const REGIONAL = 2; + + private static $valueToName = [ + self::SQL_AVAILABILITY_TYPE_UNSPECIFIED => 'SQL_AVAILABILITY_TYPE_UNSPECIFIED', + self::ZONAL => 'ZONAL', + self::REGIONAL => 'REGIONAL', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php new file mode 100644 index 000000000000..83410c24b301 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1.SqlBackendType + */ +class SqlBackendType +{ + /** + * This is an unknown backend type for instance. + * + * Generated from protobuf enum SQL_BACKEND_TYPE_UNSPECIFIED = 0; + */ + const SQL_BACKEND_TYPE_UNSPECIFIED = 0; + /** + * V1 speckle instance. + * + * Generated from protobuf enum FIRST_GEN = 1 [deprecated = true]; + */ + const FIRST_GEN = 1; + /** + * V2 speckle instance. + * + * Generated from protobuf enum SECOND_GEN = 2; + */ + const SECOND_GEN = 2; + /** + * On premises instance. + * + * Generated from protobuf enum EXTERNAL = 3; + */ + const EXTERNAL = 3; + + private static $valueToName = [ + self::SQL_BACKEND_TYPE_UNSPECIFIED => 'SQL_BACKEND_TYPE_UNSPECIFIED', + self::FIRST_GEN => 'FIRST_GEN', + self::SECOND_GEN => 'SECOND_GEN', + self::EXTERNAL => 'EXTERNAL', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php new file mode 100644 index 000000000000..c4c169c2f790 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlBackupKind + */ +class SqlBackupKind +{ + /** + * This is an unknown BackupKind. + * + * Generated from protobuf enum SQL_BACKUP_KIND_UNSPECIFIED = 0; + */ + const SQL_BACKUP_KIND_UNSPECIFIED = 0; + /** + * The snapshot based backups + * + * Generated from protobuf enum SNAPSHOT = 1; + */ + const SNAPSHOT = 1; + /** + * Physical backups + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::SQL_BACKUP_KIND_UNSPECIFIED => 'SQL_BACKUP_KIND_UNSPECIFIED', + self::SNAPSHOT => 'SNAPSHOT', + self::PHYSICAL => 'PHYSICAL', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php new file mode 100644 index 000000000000..e7d2d6b71be2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php @@ -0,0 +1,113 @@ +google.cloud.sql.v1.SqlBackupRunStatus + */ +class SqlBackupRunStatus +{ + /** + * The status of the run is unknown. + * + * Generated from protobuf enum SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; + */ + const SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; + /** + * The backup operation was enqueued. + * + * Generated from protobuf enum ENQUEUED = 1; + */ + const ENQUEUED = 1; + /** + * The backup is overdue across a given backup window. Indicates a + * problem. Example: Long-running operation in progress during + * the whole window. + * + * Generated from protobuf enum OVERDUE = 2; + */ + const OVERDUE = 2; + /** + * The backup is in progress. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The backup failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The backup was successful. + * + * Generated from protobuf enum SUCCESSFUL = 5; + */ + const SUCCESSFUL = 5; + /** + * The backup was skipped (without problems) for a given backup + * window. Example: Instance was idle. + * + * Generated from protobuf enum SKIPPED = 6; + */ + const SKIPPED = 6; + /** + * The backup is about to be deleted. + * + * Generated from protobuf enum DELETION_PENDING = 7; + */ + const DELETION_PENDING = 7; + /** + * The backup deletion failed. + * + * Generated from protobuf enum DELETION_FAILED = 8; + */ + const DELETION_FAILED = 8; + /** + * The backup has been deleted. + * + * Generated from protobuf enum DELETED = 9; + */ + const DELETED = 9; + + private static $valueToName = [ + self::SQL_BACKUP_RUN_STATUS_UNSPECIFIED => 'SQL_BACKUP_RUN_STATUS_UNSPECIFIED', + self::ENQUEUED => 'ENQUEUED', + self::OVERDUE => 'OVERDUE', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCESSFUL => 'SUCCESSFUL', + self::SKIPPED => 'SKIPPED', + self::DELETION_PENDING => 'DELETION_PENDING', + self::DELETION_FAILED => 'DELETION_FAILED', + self::DELETED => 'DELETED', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php new file mode 100644 index 000000000000..af9710f16b4b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlBackupRunType + */ +class SqlBackupRunType +{ + /** + * This is an unknown BackupRun type. + * + * Generated from protobuf enum SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; + */ + const SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; + /** + * The backup schedule automatically triggers a backup. + * + * Generated from protobuf enum AUTOMATED = 1; + */ + const AUTOMATED = 1; + /** + * The user manually triggers a backup. + * + * Generated from protobuf enum ON_DEMAND = 2; + */ + const ON_DEMAND = 2; + + private static $valueToName = [ + self::SQL_BACKUP_RUN_TYPE_UNSPECIFIED => 'SQL_BACKUP_RUN_TYPE_UNSPECIFIED', + self::AUTOMATED => 'AUTOMATED', + self::ON_DEMAND => '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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php new file mode 100644 index 000000000000..3ac692b31491 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php @@ -0,0 +1,143 @@ +google.cloud.sql.v1.SqlBackupRunsDeleteRequest + */ +class SqlBackupRunsDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php new file mode 100644 index 000000000000..eb84e91a6924 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlBackupRunsGetRequest + */ +class SqlBackupRunsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * The ID of this backup run. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php new file mode 100644 index 000000000000..a65e8e21c3d4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlBackupRunsInsertRequest + */ +class SqlBackupRunsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\BackupRun $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; + * @return \Google\Cloud\Sql\V1\BackupRun|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; + * @param \Google\Cloud\Sql\V1\BackupRun $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupRun::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php new file mode 100644 index 000000000000..b674e837dd0c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php @@ -0,0 +1,177 @@ +google.cloud.sql.v1.SqlBackupRunsListRequest + */ +class SqlBackupRunsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * @type int $max_results + * Maximum number of backup runs per response. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkInt32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * 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; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php new file mode 100644 index 000000000000..e1ac52150431 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php @@ -0,0 +1,69 @@ +google.cloud.sql.v1.SqlDataDiskType + */ +class SqlDataDiskType +{ + /** + * This is an unknown data disk type. + * + * Generated from protobuf enum SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + */ + const SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + /** + * An SSD data disk. + * + * Generated from protobuf enum PD_SSD = 1; + */ + const PD_SSD = 1; + /** + * An HDD data disk. + * + * Generated from protobuf enum PD_HDD = 2; + */ + const PD_HDD = 2; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf enum OBSOLETE_LOCAL_SSD = 3 [deprecated = true]; + */ + const OBSOLETE_LOCAL_SSD = 3; + + private static $valueToName = [ + self::SQL_DATA_DISK_TYPE_UNSPECIFIED => 'SQL_DATA_DISK_TYPE_UNSPECIFIED', + self::PD_SSD => 'PD_SSD', + self::PD_HDD => 'PD_HDD', + self::OBSOLETE_LOCAL_SSD => 'OBSOLETE_LOCAL_SSD', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php new file mode 100644 index 000000000000..f251191daedb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php @@ -0,0 +1,348 @@ +google.cloud.sql.v1.SqlDatabaseVersion + */ +class SqlDatabaseVersion +{ + /** + * This is an unknown database version. + * + * Generated from protobuf enum SQL_DATABASE_VERSION_UNSPECIFIED = 0; + */ + const SQL_DATABASE_VERSION_UNSPECIFIED = 0; + /** + * The database version is MySQL 5.1. + * + * Generated from protobuf enum MYSQL_5_1 = 2 [deprecated = true]; + */ + const MYSQL_5_1 = 2; + /** + * The database version is MySQL 5.5. + * + * Generated from protobuf enum MYSQL_5_5 = 3 [deprecated = true]; + */ + const MYSQL_5_5 = 3; + /** + * The database version is MySQL 5.6. + * + * Generated from protobuf enum MYSQL_5_6 = 5; + */ + const MYSQL_5_6 = 5; + /** + * The database version is MySQL 5.7. + * + * Generated from protobuf enum MYSQL_5_7 = 6; + */ + const MYSQL_5_7 = 6; + /** + * The database version is SQL Server 2017 Standard. + * + * Generated from protobuf enum SQLSERVER_2017_STANDARD = 11; + */ + const SQLSERVER_2017_STANDARD = 11; + /** + * The database version is SQL Server 2017 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2017_ENTERPRISE = 14; + */ + const SQLSERVER_2017_ENTERPRISE = 14; + /** + * The database version is SQL Server 2017 Express. + * + * Generated from protobuf enum SQLSERVER_2017_EXPRESS = 15; + */ + const SQLSERVER_2017_EXPRESS = 15; + /** + * The database version is SQL Server 2017 Web. + * + * Generated from protobuf enum SQLSERVER_2017_WEB = 16; + */ + const SQLSERVER_2017_WEB = 16; + /** + * The database version is PostgreSQL 9.6. + * + * Generated from protobuf enum POSTGRES_9_6 = 9; + */ + const POSTGRES_9_6 = 9; + /** + * The database version is PostgreSQL 10. + * + * Generated from protobuf enum POSTGRES_10 = 18; + */ + const POSTGRES_10 = 18; + /** + * The database version is PostgreSQL 11. + * + * Generated from protobuf enum POSTGRES_11 = 10; + */ + const POSTGRES_11 = 10; + /** + * The database version is PostgreSQL 12. + * + * Generated from protobuf enum POSTGRES_12 = 19; + */ + const POSTGRES_12 = 19; + /** + * The database version is PostgreSQL 13. + * + * Generated from protobuf enum POSTGRES_13 = 23; + */ + const POSTGRES_13 = 23; + /** + * The database version is PostgreSQL 14. + * + * Generated from protobuf enum POSTGRES_14 = 110; + */ + const POSTGRES_14 = 110; + /** + * The database version is PostgreSQL 15. + * + * Generated from protobuf enum POSTGRES_15 = 172; + */ + const POSTGRES_15 = 172; + /** + * The database version is PostgreSQL 16. + * + * Generated from protobuf enum POSTGRES_16 = 272; + */ + const POSTGRES_16 = 272; + /** + * The database version is MySQL 8. + * + * Generated from protobuf enum MYSQL_8_0 = 20; + */ + const MYSQL_8_0 = 20; + /** + * The database major version is MySQL 8.0 and the minor version is 18. + * + * Generated from protobuf enum MYSQL_8_0_18 = 41; + */ + const MYSQL_8_0_18 = 41; + /** + * The database major version is MySQL 8.0 and the minor version is 26. + * + * Generated from protobuf enum MYSQL_8_0_26 = 85; + */ + const MYSQL_8_0_26 = 85; + /** + * The database major version is MySQL 8.0 and the minor version is 27. + * + * Generated from protobuf enum MYSQL_8_0_27 = 111; + */ + const MYSQL_8_0_27 = 111; + /** + * The database major version is MySQL 8.0 and the minor version is 28. + * + * Generated from protobuf enum MYSQL_8_0_28 = 132; + */ + const MYSQL_8_0_28 = 132; + /** + * The database major version is MySQL 8.0 and the minor version is 29. + * + * Generated from protobuf enum MYSQL_8_0_29 = 148 [deprecated = true]; + */ + const MYSQL_8_0_29 = 148; + /** + * The database major version is MySQL 8.0 and the minor version is 30. + * + * Generated from protobuf enum MYSQL_8_0_30 = 174; + */ + const MYSQL_8_0_30 = 174; + /** + * The database major version is MySQL 8.0 and the minor version is 31. + * + * Generated from protobuf enum MYSQL_8_0_31 = 197; + */ + const MYSQL_8_0_31 = 197; + /** + * The database major version is MySQL 8.0 and the minor version is 32. + * + * Generated from protobuf enum MYSQL_8_0_32 = 213; + */ + const MYSQL_8_0_32 = 213; + /** + * The database major version is MySQL 8.0 and the minor version is 33. + * + * Generated from protobuf enum MYSQL_8_0_33 = 238; + */ + const MYSQL_8_0_33 = 238; + /** + * The database major version is MySQL 8.0 and the minor version is 34. + * + * Generated from protobuf enum MYSQL_8_0_34 = 239; + */ + const MYSQL_8_0_34 = 239; + /** + * The database major version is MySQL 8.0 and the minor version is 35. + * + * Generated from protobuf enum MYSQL_8_0_35 = 240; + */ + const MYSQL_8_0_35 = 240; + /** + * The database major version is MySQL 8.0 and the minor version is 36. + * + * Generated from protobuf enum MYSQL_8_0_36 = 241; + */ + const MYSQL_8_0_36 = 241; + /** + * The database major version is MySQL 8.0 and the minor version is 37. + * + * Generated from protobuf enum MYSQL_8_0_37 = 355; + */ + const MYSQL_8_0_37 = 355; + /** + * The database major version is MySQL 8.0 and the minor version is 38. + * + * Generated from protobuf enum MYSQL_8_0_38 = 356; + */ + const MYSQL_8_0_38 = 356; + /** + * The database major version is MySQL 8.0 and the minor version is 39. + * + * Generated from protobuf enum MYSQL_8_0_39 = 357; + */ + const MYSQL_8_0_39 = 357; + /** + * The database major version is MySQL 8.0 and the minor version is 40. + * + * Generated from protobuf enum MYSQL_8_0_40 = 358; + */ + const MYSQL_8_0_40 = 358; + /** + * The database version is MySQL 8.4. + * + * Generated from protobuf enum MYSQL_8_4 = 398; + */ + const MYSQL_8_4 = 398; + /** + * The database version is MySQL 8.4 and the patch version is 0. + * + * Generated from protobuf enum MYSQL_8_4_0 = 399; + */ + const MYSQL_8_4_0 = 399; + /** + * The database version is SQL Server 2019 Standard. + * + * Generated from protobuf enum SQLSERVER_2019_STANDARD = 26; + */ + const SQLSERVER_2019_STANDARD = 26; + /** + * The database version is SQL Server 2019 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2019_ENTERPRISE = 27; + */ + const SQLSERVER_2019_ENTERPRISE = 27; + /** + * The database version is SQL Server 2019 Express. + * + * Generated from protobuf enum SQLSERVER_2019_EXPRESS = 28; + */ + const SQLSERVER_2019_EXPRESS = 28; + /** + * The database version is SQL Server 2019 Web. + * + * Generated from protobuf enum SQLSERVER_2019_WEB = 29; + */ + const SQLSERVER_2019_WEB = 29; + /** + * The database version is SQL Server 2022 Standard. + * + * Generated from protobuf enum SQLSERVER_2022_STANDARD = 199; + */ + const SQLSERVER_2022_STANDARD = 199; + /** + * The database version is SQL Server 2022 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2022_ENTERPRISE = 200; + */ + const SQLSERVER_2022_ENTERPRISE = 200; + /** + * The database version is SQL Server 2022 Express. + * + * Generated from protobuf enum SQLSERVER_2022_EXPRESS = 201; + */ + const SQLSERVER_2022_EXPRESS = 201; + /** + * The database version is SQL Server 2022 Web. + * + * Generated from protobuf enum SQLSERVER_2022_WEB = 202; + */ + const SQLSERVER_2022_WEB = 202; + + private static $valueToName = [ + self::SQL_DATABASE_VERSION_UNSPECIFIED => 'SQL_DATABASE_VERSION_UNSPECIFIED', + self::MYSQL_5_1 => 'MYSQL_5_1', + self::MYSQL_5_5 => 'MYSQL_5_5', + self::MYSQL_5_6 => 'MYSQL_5_6', + self::MYSQL_5_7 => 'MYSQL_5_7', + self::SQLSERVER_2017_STANDARD => 'SQLSERVER_2017_STANDARD', + self::SQLSERVER_2017_ENTERPRISE => 'SQLSERVER_2017_ENTERPRISE', + self::SQLSERVER_2017_EXPRESS => 'SQLSERVER_2017_EXPRESS', + self::SQLSERVER_2017_WEB => 'SQLSERVER_2017_WEB', + self::POSTGRES_9_6 => 'POSTGRES_9_6', + self::POSTGRES_10 => 'POSTGRES_10', + self::POSTGRES_11 => 'POSTGRES_11', + self::POSTGRES_12 => 'POSTGRES_12', + self::POSTGRES_13 => 'POSTGRES_13', + self::POSTGRES_14 => 'POSTGRES_14', + self::POSTGRES_15 => 'POSTGRES_15', + self::POSTGRES_16 => 'POSTGRES_16', + self::MYSQL_8_0 => 'MYSQL_8_0', + self::MYSQL_8_0_18 => 'MYSQL_8_0_18', + self::MYSQL_8_0_26 => 'MYSQL_8_0_26', + self::MYSQL_8_0_27 => 'MYSQL_8_0_27', + self::MYSQL_8_0_28 => 'MYSQL_8_0_28', + self::MYSQL_8_0_29 => 'MYSQL_8_0_29', + self::MYSQL_8_0_30 => 'MYSQL_8_0_30', + self::MYSQL_8_0_31 => 'MYSQL_8_0_31', + self::MYSQL_8_0_32 => 'MYSQL_8_0_32', + self::MYSQL_8_0_33 => 'MYSQL_8_0_33', + self::MYSQL_8_0_34 => 'MYSQL_8_0_34', + self::MYSQL_8_0_35 => 'MYSQL_8_0_35', + self::MYSQL_8_0_36 => 'MYSQL_8_0_36', + self::MYSQL_8_0_37 => 'MYSQL_8_0_37', + self::MYSQL_8_0_38 => 'MYSQL_8_0_38', + self::MYSQL_8_0_39 => 'MYSQL_8_0_39', + self::MYSQL_8_0_40 => 'MYSQL_8_0_40', + self::MYSQL_8_4 => 'MYSQL_8_4', + self::MYSQL_8_4_0 => 'MYSQL_8_4_0', + self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD', + self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE', + self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS', + self::SQLSERVER_2019_WEB => 'SQLSERVER_2019_WEB', + self::SQLSERVER_2022_STANDARD => 'SQLSERVER_2022_STANDARD', + self::SQLSERVER_2022_ENTERPRISE => 'SQLSERVER_2022_ENTERPRISE', + self::SQLSERVER_2022_EXPRESS => 'SQLSERVER_2022_EXPRESS', + self::SQLSERVER_2022_WEB => 'SQLSERVER_2022_WEB', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php new file mode 100644 index 000000000000..503872be9d28 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlDatabasesDeleteRequest + */ +class SqlDatabasesDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database to be deleted in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php new file mode 100644 index 000000000000..b208cae08bf2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlDatabasesGetRequest + */ +class SqlDatabasesGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php new file mode 100644 index 000000000000..c2537d9d5edc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlDatabasesInsertRequest + */ +class SqlDatabasesInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\Database $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @return \Google\Cloud\Sql\V1\Database|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @param \Google\Cloud\Sql\V1\Database $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Database::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php new file mode 100644 index 000000000000..e9163885e1c2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlDatabasesListRequest + */ +class SqlDatabasesListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php new file mode 100644 index 000000000000..c8f2042a8b84 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php @@ -0,0 +1,172 @@ +google.cloud.sql.v1.SqlDatabasesUpdateRequest + */ +class SqlDatabasesUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database to be updated in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\Database $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @return \Google\Cloud\Sql\V1\Database|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @param \Google\Cloud\Sql\V1\Database $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Database::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php new file mode 100644 index 000000000000..2bfbb89ddbc3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1.SqlExternalSyncSettingError + */ +class SqlExternalSyncSettingError extends \Google\Protobuf\Internal\Message +{ + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + */ + protected $type = 0; + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + */ + protected $detail = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * @type int $type + * Identifies the specific error that occurred. + * @type string $detail + * Additional information about the error encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError\SqlExternalSyncSettingErrorType::class); + $this->type = $var; + + return $this; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + * @return string + */ + public function getDetail() + { + return $this->detail; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + * @param string $var + * @return $this + */ + public function setDetail($var) + { + GPBUtil::checkString($var, True); + $this->detail = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php new file mode 100644 index 000000000000..81c020c0fcfc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php @@ -0,0 +1,402 @@ +google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType + */ +class SqlExternalSyncSettingErrorType +{ + /** + * Generated from protobuf enum SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; + */ + const SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CONNECTION_FAILURE = 1; + */ + const CONNECTION_FAILURE = 1; + /** + * Generated from protobuf enum BINLOG_NOT_ENABLED = 2; + */ + const BINLOG_NOT_ENABLED = 2; + /** + * Generated from protobuf enum INCOMPATIBLE_DATABASE_VERSION = 3; + */ + const INCOMPATIBLE_DATABASE_VERSION = 3; + /** + * Generated from protobuf enum REPLICA_ALREADY_SETUP = 4; + */ + const REPLICA_ALREADY_SETUP = 4; + /** + * The replication user is missing privileges that are required. + * + * Generated from protobuf enum INSUFFICIENT_PRIVILEGE = 5; + */ + const INSUFFICIENT_PRIVILEGE = 5; + /** + * Unsupported migration type. + * + * Generated from protobuf enum UNSUPPORTED_MIGRATION_TYPE = 6; + */ + const UNSUPPORTED_MIGRATION_TYPE = 6; + /** + * No pglogical extension installed on databases, applicable for postgres. + * + * Generated from protobuf enum NO_PGLOGICAL_INSTALLED = 7; + */ + const NO_PGLOGICAL_INSTALLED = 7; + /** + * pglogical node already exists on databases, applicable for postgres. + * + * Generated from protobuf enum PGLOGICAL_NODE_ALREADY_EXISTS = 8; + */ + const PGLOGICAL_NODE_ALREADY_EXISTS = 8; + /** + * The value of parameter wal_level is not set to logical. + * + * Generated from protobuf enum INVALID_WAL_LEVEL = 9; + */ + const INVALID_WAL_LEVEL = 9; + /** + * The value of parameter shared_preload_libraries does not include + * pglogical. + * + * Generated from protobuf enum INVALID_SHARED_PRELOAD_LIBRARY = 10; + */ + const INVALID_SHARED_PRELOAD_LIBRARY = 10; + /** + * The value of parameter max_replication_slots is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + */ + const INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + /** + * The value of parameter max_wal_senders is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_WAL_SENDERS = 12; + */ + const INSUFFICIENT_MAX_WAL_SENDERS = 12; + /** + * The value of parameter max_worker_processes is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + */ + const INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + /** + * Extensions installed are either not supported or having unsupported + * versions. + * + * Generated from protobuf enum UNSUPPORTED_EXTENSIONS = 14; + */ + const UNSUPPORTED_EXTENSIONS = 14; + /** + * The value of parameter rds.logical_replication is not set to 1. + * + * Generated from protobuf enum INVALID_RDS_LOGICAL_REPLICATION = 15; + */ + const INVALID_RDS_LOGICAL_REPLICATION = 15; + /** + * The primary instance logging setup doesn't allow EM sync. + * + * Generated from protobuf enum INVALID_LOGGING_SETUP = 16; + */ + const INVALID_LOGGING_SETUP = 16; + /** + * The primary instance database parameter setup doesn't allow EM sync. + * + * Generated from protobuf enum INVALID_DB_PARAM = 17; + */ + const INVALID_DB_PARAM = 17; + /** + * The gtid_mode is not supported, applicable for MySQL. + * + * Generated from protobuf enum UNSUPPORTED_GTID_MODE = 18; + */ + const UNSUPPORTED_GTID_MODE = 18; + /** + * SQL Server Agent is not running. + * + * Generated from protobuf enum SQLSERVER_AGENT_NOT_RUNNING = 19; + */ + const SQLSERVER_AGENT_NOT_RUNNING = 19; + /** + * The table definition is not support due to missing primary key or replica + * identity, applicable for postgres. + * + * Generated from protobuf enum UNSUPPORTED_TABLE_DEFINITION = 20; + */ + const UNSUPPORTED_TABLE_DEFINITION = 20; + /** + * The customer has a definer that will break EM setup. + * + * Generated from protobuf enum UNSUPPORTED_DEFINER = 21; + */ + const UNSUPPORTED_DEFINER = 21; + /** + * SQL Server @@SERVERNAME does not match actual host name. + * + * Generated from protobuf enum SQLSERVER_SERVERNAME_MISMATCH = 22; + */ + const SQLSERVER_SERVERNAME_MISMATCH = 22; + /** + * The primary instance has been setup and will fail the setup. + * + * Generated from protobuf enum PRIMARY_ALREADY_SETUP = 23; + */ + const PRIMARY_ALREADY_SETUP = 23; + /** + * The primary instance has unsupported binary log format. + * + * Generated from protobuf enum UNSUPPORTED_BINLOG_FORMAT = 24; + */ + const UNSUPPORTED_BINLOG_FORMAT = 24; + /** + * The primary instance's binary log retention setting. + * + * Generated from protobuf enum BINLOG_RETENTION_SETTING = 25; + */ + const BINLOG_RETENTION_SETTING = 25; + /** + * The primary instance has tables with unsupported storage engine. + * + * Generated from protobuf enum UNSUPPORTED_STORAGE_ENGINE = 26; + */ + const UNSUPPORTED_STORAGE_ENGINE = 26; + /** + * Source has tables with limited support + * eg: PostgreSQL tables without primary keys. + * + * Generated from protobuf enum LIMITED_SUPPORT_TABLES = 27; + */ + const LIMITED_SUPPORT_TABLES = 27; + /** + * The replica instance contains existing data. + * + * Generated from protobuf enum EXISTING_DATA_IN_REPLICA = 28; + */ + const EXISTING_DATA_IN_REPLICA = 28; + /** + * The replication user is missing privileges that are optional. + * + * Generated from protobuf enum MISSING_OPTIONAL_PRIVILEGES = 29; + */ + const MISSING_OPTIONAL_PRIVILEGES = 29; + /** + * Additional BACKUP_ADMIN privilege is granted to the replication user + * which may lock source MySQL 8 instance for DDLs during initial sync. + * + * Generated from protobuf enum RISKY_BACKUP_ADMIN_PRIVILEGE = 30; + */ + const RISKY_BACKUP_ADMIN_PRIVILEGE = 30; + /** + * The Cloud Storage bucket is missing necessary permissions. + * + * Generated from protobuf enum INSUFFICIENT_GCS_PERMISSIONS = 31; + */ + const INSUFFICIENT_GCS_PERMISSIONS = 31; + /** + * The Cloud Storage bucket has an error in the file or contains invalid + * file information. + * + * Generated from protobuf enum INVALID_FILE_INFO = 32; + */ + const INVALID_FILE_INFO = 32; + /** + * The source instance has unsupported database settings for migration. + * + * Generated from protobuf enum UNSUPPORTED_DATABASE_SETTINGS = 33; + */ + const UNSUPPORTED_DATABASE_SETTINGS = 33; + /** + * The replication user is missing parallel import specific privileges. + * (e.g. LOCK TABLES) for MySQL. + * + * Generated from protobuf enum MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; + */ + const MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; + /** + * The global variable local_infile is off on external server replica. + * + * Generated from protobuf enum LOCAL_INFILE_OFF = 35; + */ + const LOCAL_INFILE_OFF = 35; + /** + * This code instructs customers to turn on point-in-time recovery manually + * for the instance after promoting the Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf enum TURN_ON_PITR_AFTER_PROMOTE = 36; + */ + const TURN_ON_PITR_AFTER_PROMOTE = 36; + /** + * The minor version of replica database is incompatible with the source. + * + * Generated from protobuf enum INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; + */ + const INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; + /** + * This warning message indicates that Cloud SQL uses the maximum number of + * subscriptions to migrate data from the source to the destination. + * + * Generated from protobuf enum SOURCE_MAX_SUBSCRIPTIONS = 38; + */ + const SOURCE_MAX_SUBSCRIPTIONS = 38; + /** + * Unable to verify definers on the source for MySQL. + * + * Generated from protobuf enum UNABLE_TO_VERIFY_DEFINERS = 39; + */ + const UNABLE_TO_VERIFY_DEFINERS = 39; + /** + * If a time out occurs while the subscription counts are calculated, then + * this value is set to 1. Otherwise, this value is set to 2. + * + * Generated from protobuf enum SUBSCRIPTION_CALCULATION_STATUS = 40; + */ + const SUBSCRIPTION_CALCULATION_STATUS = 40; + /** + * Count of subscriptions needed to sync source data for PostgreSQL + * database. + * + * Generated from protobuf enum PG_SUBSCRIPTION_COUNT = 41; + */ + const PG_SUBSCRIPTION_COUNT = 41; + /** + * Final parallel level that is used to do migration. + * + * Generated from protobuf enum PG_SYNC_PARALLEL_LEVEL = 42; + */ + const PG_SYNC_PARALLEL_LEVEL = 42; + /** + * The disk size of the replica instance is smaller than the data size of + * the source instance. + * + * Generated from protobuf enum INSUFFICIENT_DISK_SIZE = 43; + */ + const INSUFFICIENT_DISK_SIZE = 43; + /** + * The data size of the source instance is greater than 1 TB, the number of + * cores of the replica instance is less than 8, and the memory of the + * replica is less than 32 GB. + * + * Generated from protobuf enum INSUFFICIENT_MACHINE_TIER = 44; + */ + const INSUFFICIENT_MACHINE_TIER = 44; + /** + * The warning message indicates the unsupported extensions will not be + * migrated to the destination. + * + * Generated from protobuf enum UNSUPPORTED_EXTENSIONS_NOT_MIGRATED = 45; + */ + const UNSUPPORTED_EXTENSIONS_NOT_MIGRATED = 45; + /** + * The warning message indicates the pg_cron extension and settings will not + * be migrated to the destination. + * + * Generated from protobuf enum EXTENSIONS_NOT_MIGRATED = 46; + */ + const EXTENSIONS_NOT_MIGRATED = 46; + /** + * The error message indicates that pg_cron flags are enabled on the + * destination which is not supported during the migration. + * + * Generated from protobuf enum PG_CRON_FLAG_ENABLED_IN_REPLICA = 47; + */ + const PG_CRON_FLAG_ENABLED_IN_REPLICA = 47; + /** + * This error message indicates that the specified extensions are not + * enabled on destination instance. For example, before you can migrate + * data to the destination instance, you must enable the PGAudit extension + * on the instance. + * + * Generated from protobuf enum EXTENSIONS_NOT_ENABLED_IN_REPLICA = 48; + */ + const EXTENSIONS_NOT_ENABLED_IN_REPLICA = 48; + /** + * The source database has generated columns that can't be migrated. Please + * change them to regular columns before migration. + * + * Generated from protobuf enum UNSUPPORTED_COLUMNS = 49; + */ + const UNSUPPORTED_COLUMNS = 49; + + private static $valueToName = [ + self::SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED => 'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED', + self::CONNECTION_FAILURE => 'CONNECTION_FAILURE', + self::BINLOG_NOT_ENABLED => 'BINLOG_NOT_ENABLED', + self::INCOMPATIBLE_DATABASE_VERSION => 'INCOMPATIBLE_DATABASE_VERSION', + self::REPLICA_ALREADY_SETUP => 'REPLICA_ALREADY_SETUP', + self::INSUFFICIENT_PRIVILEGE => 'INSUFFICIENT_PRIVILEGE', + self::UNSUPPORTED_MIGRATION_TYPE => 'UNSUPPORTED_MIGRATION_TYPE', + self::NO_PGLOGICAL_INSTALLED => 'NO_PGLOGICAL_INSTALLED', + self::PGLOGICAL_NODE_ALREADY_EXISTS => 'PGLOGICAL_NODE_ALREADY_EXISTS', + self::INVALID_WAL_LEVEL => 'INVALID_WAL_LEVEL', + self::INVALID_SHARED_PRELOAD_LIBRARY => 'INVALID_SHARED_PRELOAD_LIBRARY', + self::INSUFFICIENT_MAX_REPLICATION_SLOTS => 'INSUFFICIENT_MAX_REPLICATION_SLOTS', + self::INSUFFICIENT_MAX_WAL_SENDERS => 'INSUFFICIENT_MAX_WAL_SENDERS', + self::INSUFFICIENT_MAX_WORKER_PROCESSES => 'INSUFFICIENT_MAX_WORKER_PROCESSES', + self::UNSUPPORTED_EXTENSIONS => 'UNSUPPORTED_EXTENSIONS', + self::INVALID_RDS_LOGICAL_REPLICATION => 'INVALID_RDS_LOGICAL_REPLICATION', + self::INVALID_LOGGING_SETUP => 'INVALID_LOGGING_SETUP', + self::INVALID_DB_PARAM => 'INVALID_DB_PARAM', + self::UNSUPPORTED_GTID_MODE => 'UNSUPPORTED_GTID_MODE', + self::SQLSERVER_AGENT_NOT_RUNNING => 'SQLSERVER_AGENT_NOT_RUNNING', + self::UNSUPPORTED_TABLE_DEFINITION => 'UNSUPPORTED_TABLE_DEFINITION', + self::UNSUPPORTED_DEFINER => 'UNSUPPORTED_DEFINER', + self::SQLSERVER_SERVERNAME_MISMATCH => 'SQLSERVER_SERVERNAME_MISMATCH', + self::PRIMARY_ALREADY_SETUP => 'PRIMARY_ALREADY_SETUP', + self::UNSUPPORTED_BINLOG_FORMAT => 'UNSUPPORTED_BINLOG_FORMAT', + self::BINLOG_RETENTION_SETTING => 'BINLOG_RETENTION_SETTING', + self::UNSUPPORTED_STORAGE_ENGINE => 'UNSUPPORTED_STORAGE_ENGINE', + self::LIMITED_SUPPORT_TABLES => 'LIMITED_SUPPORT_TABLES', + self::EXISTING_DATA_IN_REPLICA => 'EXISTING_DATA_IN_REPLICA', + self::MISSING_OPTIONAL_PRIVILEGES => 'MISSING_OPTIONAL_PRIVILEGES', + self::RISKY_BACKUP_ADMIN_PRIVILEGE => 'RISKY_BACKUP_ADMIN_PRIVILEGE', + self::INSUFFICIENT_GCS_PERMISSIONS => 'INSUFFICIENT_GCS_PERMISSIONS', + self::INVALID_FILE_INFO => 'INVALID_FILE_INFO', + self::UNSUPPORTED_DATABASE_SETTINGS => 'UNSUPPORTED_DATABASE_SETTINGS', + self::MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE => 'MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE', + self::LOCAL_INFILE_OFF => 'LOCAL_INFILE_OFF', + self::TURN_ON_PITR_AFTER_PROMOTE => 'TURN_ON_PITR_AFTER_PROMOTE', + self::INCOMPATIBLE_DATABASE_MINOR_VERSION => 'INCOMPATIBLE_DATABASE_MINOR_VERSION', + self::SOURCE_MAX_SUBSCRIPTIONS => 'SOURCE_MAX_SUBSCRIPTIONS', + self::UNABLE_TO_VERIFY_DEFINERS => 'UNABLE_TO_VERIFY_DEFINERS', + self::SUBSCRIPTION_CALCULATION_STATUS => 'SUBSCRIPTION_CALCULATION_STATUS', + self::PG_SUBSCRIPTION_COUNT => 'PG_SUBSCRIPTION_COUNT', + self::PG_SYNC_PARALLEL_LEVEL => 'PG_SYNC_PARALLEL_LEVEL', + self::INSUFFICIENT_DISK_SIZE => 'INSUFFICIENT_DISK_SIZE', + self::INSUFFICIENT_MACHINE_TIER => 'INSUFFICIENT_MACHINE_TIER', + self::UNSUPPORTED_EXTENSIONS_NOT_MIGRATED => 'UNSUPPORTED_EXTENSIONS_NOT_MIGRATED', + self::EXTENSIONS_NOT_MIGRATED => 'EXTENSIONS_NOT_MIGRATED', + self::PG_CRON_FLAG_ENABLED_IN_REPLICA => 'PG_CRON_FLAG_ENABLED_IN_REPLICA', + self::EXTENSIONS_NOT_ENABLED_IN_REPLICA => 'EXTENSIONS_NOT_ENABLED_IN_REPLICA', + self::UNSUPPORTED_COLUMNS => 'UNSUPPORTED_COLUMNS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlExternalSyncSettingErrorType::class, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError_SqlExternalSyncSettingErrorType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php new file mode 100644 index 000000000000..724da57f17ba --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.SqlFileType + */ +class SqlFileType +{ + /** + * Unknown file type. + * + * Generated from protobuf enum SQL_FILE_TYPE_UNSPECIFIED = 0; + */ + const SQL_FILE_TYPE_UNSPECIFIED = 0; + /** + * File containing SQL statements. + * + * Generated from protobuf enum SQL = 1; + */ + const SQL = 1; + /** + * File in CSV format. + * + * Generated from protobuf enum CSV = 2; + */ + const CSV = 2; + /** + * Generated from protobuf enum BAK = 4; + */ + const BAK = 4; + + private static $valueToName = [ + self::SQL_FILE_TYPE_UNSPECIFIED => 'SQL_FILE_TYPE_UNSPECIFIED', + self::SQL => 'SQL', + self::CSV => 'CSV', + self::BAK => 'BAK', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php new file mode 100644 index 000000000000..7c6f2f5685a9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php @@ -0,0 +1,95 @@ +google.cloud.sql.v1.SqlFlagType + */ +class SqlFlagType +{ + /** + * This is an unknown flag type. + * + * Generated from protobuf enum SQL_FLAG_TYPE_UNSPECIFIED = 0; + */ + const SQL_FLAG_TYPE_UNSPECIFIED = 0; + /** + * Boolean type flag. + * + * Generated from protobuf enum BOOLEAN = 1; + */ + const BOOLEAN = 1; + /** + * String type flag. + * + * Generated from protobuf enum STRING = 2; + */ + const STRING = 2; + /** + * Integer type flag. + * + * Generated from protobuf enum INTEGER = 3; + */ + const INTEGER = 3; + /** + * Flag type used for a server startup option. + * + * Generated from protobuf enum NONE = 4; + */ + const NONE = 4; + /** + * Type introduced specially for MySQL TimeZone offset. Accept a string value + * with the format [-12:59, 13:00]. + * + * Generated from protobuf enum MYSQL_TIMEZONE_OFFSET = 5; + */ + const MYSQL_TIMEZONE_OFFSET = 5; + /** + * Float type flag. + * + * Generated from protobuf enum FLOAT = 6; + */ + const FLOAT = 6; + /** + * Comma-separated list of the strings in a SqlFlagType enum. + * + * Generated from protobuf enum REPEATED_STRING = 7; + */ + const REPEATED_STRING = 7; + + private static $valueToName = [ + self::SQL_FLAG_TYPE_UNSPECIFIED => 'SQL_FLAG_TYPE_UNSPECIFIED', + self::BOOLEAN => 'BOOLEAN', + self::STRING => 'STRING', + self::INTEGER => 'INTEGER', + self::NONE => 'NONE', + self::MYSQL_TIMEZONE_OFFSET => 'MYSQL_TIMEZONE_OFFSET', + self::FLOAT => 'FLOAT', + self::REPEATED_STRING => 'REPEATED_STRING', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php new file mode 100644 index 000000000000..329b62db5183 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.SqlFlagsListRequest + */ +class SqlFlagsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + */ + protected $database_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database_version + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); + parent::__construct($data); + } + + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + * @return string + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + * @param string $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php new file mode 100644 index 000000000000..983f95a0d726 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1.SqlInstanceType + */ +class SqlInstanceType +{ + /** + * This is an unknown Cloud SQL instance type. + * + * Generated from protobuf enum SQL_INSTANCE_TYPE_UNSPECIFIED = 0; + */ + const SQL_INSTANCE_TYPE_UNSPECIFIED = 0; + /** + * A regular Cloud SQL instance that is not replicating from a primary + * instance. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 1; + */ + const CLOUD_SQL_INSTANCE = 1; + /** + * An instance running on the customer's premises that is not managed by + * Cloud SQL. + * + * Generated from protobuf enum ON_PREMISES_INSTANCE = 2; + */ + const ON_PREMISES_INSTANCE = 2; + /** + * A Cloud SQL instance acting as a read-replica. + * + * Generated from protobuf enum READ_REPLICA_INSTANCE = 3; + */ + const READ_REPLICA_INSTANCE = 3; + + private static $valueToName = [ + self::SQL_INSTANCE_TYPE_UNSPECIFIED => 'SQL_INSTANCE_TYPE_UNSPECIFIED', + self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', + self::ON_PREMISES_INSTANCE => 'ON_PREMISES_INSTANCE', + self::READ_REPLICA_INSTANCE => 'READ_REPLICA_INSTANCE', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..cab0a2bad6f7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,161 @@ +google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest + */ +class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * @type \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $body + * Required. The request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php new file mode 100644 index 000000000000..95b0265ee5c4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseResponse + */ +class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php new file mode 100644 index 000000000000..3fd7548f2b0f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesAddServerCaRequest + */ +class SqlInstancesAddServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php new file mode 100644 index 000000000000..f7ca7510d738 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php @@ -0,0 +1,142 @@ +google.cloud.sql.v1.SqlInstancesCloneRequest + */ +class SqlInstancesCloneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * @type string $project + * Project ID of the source as well as the clone Cloud SQL instance. + * @type \Google\Cloud\Sql\V1\InstancesCloneRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesCloneRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesCloneRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesCloneRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php new file mode 100644 index 000000000000..c86fb60cbadf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest + */ +class SqlInstancesCreateEphemeralCertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; + * @return \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; + * @param \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php new file mode 100644 index 000000000000..f3a80ccc7e80 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesDeleteRequest + */ +class SqlInstancesDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php new file mode 100644 index 000000000000..3b87034db915 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesDemoteMasterRequest + */ +class SqlInstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance name. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php new file mode 100644 index 000000000000..e014b469ecbf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1.SqlInstancesDemoteRequest + */ +class SqlInstancesDemoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance name. + * @type string $project + * Required. ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesDemoteRequest $body + * Required. The request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\InstancesDemoteRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\InstancesDemoteRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesDemoteRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php new file mode 100644 index 000000000000..501b530aab43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesExportRequest + */ +class SqlInstancesExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be exported. + * @type \Google\Cloud\Sql\V1\InstancesExportRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesExportRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesExportRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesExportRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php new file mode 100644 index 000000000000..f443137e24a0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesFailoverRequest + */ +class SqlInstancesFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the read replica. + * @type \Google\Cloud\Sql\V1\InstancesFailoverRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesFailoverRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesFailoverRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesFailoverRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php new file mode 100644 index 000000000000..647f3647e66c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest + */ +class SqlInstancesGetDiskShrinkConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php new file mode 100644 index 000000000000..56f64db0042d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigResponse + */ +class SqlInstancesGetDiskShrinkConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + */ + protected $minimal_target_size_gb = 0; + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#getDiskShrinkConfig`. + * @type int|string $minimal_target_size_gb + * The minimum size to which a disk can be shrunk in GigaBytes. + * @type string $message + * Additional message to customers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + * @return int|string + */ + public function getMinimalTargetSizeGb() + { + return $this->minimal_target_size_gb; + } + + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + * @param int|string $var + * @return $this + */ + public function setMinimalTargetSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->minimal_target_size_gb = $var; + + return $this; + } + + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional message to customers. + * + * 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; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php new file mode 100644 index 000000000000..0cf92a769961 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest + */ +class SqlInstancesGetLatestRecoveryTimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php new file mode 100644 index 000000000000..9a5bfafef504 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php @@ -0,0 +1,111 @@ +google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeResponse + */ +class SqlInstancesGetLatestRecoveryTimeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + */ + protected $latest_recovery_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#getLatestRecoveryTime`. + * @type \Google\Protobuf\Timestamp $latest_recovery_time + * Timestamp, identifies the latest recovery time of the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestRecoveryTime() + { + return $this->latest_recovery_time; + } + + public function hasLatestRecoveryTime() + { + return isset($this->latest_recovery_time); + } + + public function clearLatestRecoveryTime() + { + unset($this->latest_recovery_time); + } + + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestRecoveryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_recovery_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php new file mode 100644 index 000000000000..5d2e86246d5a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesGetRequest + */ +class SqlInstancesGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php new file mode 100644 index 000000000000..6a9167d840f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesImportRequest + */ +class SqlInstancesImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesImportRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesImportRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesImportRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesImportRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php new file mode 100644 index 000000000000..572d4c1dd354 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php @@ -0,0 +1,108 @@ +google.cloud.sql.v1.SqlInstancesInsertRequest + */ +class SqlInstancesInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * @type \Google\Cloud\Sql\V1\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php new file mode 100644 index 000000000000..335999acd233 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php @@ -0,0 +1,213 @@ +google.cloud.sql.v1.SqlInstancesListRequest + */ +class SqlInstancesListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + */ + protected $filter = ''; + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * @type int $max_results + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project for which to list Cloud SQL instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * 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 maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * 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; + } + + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php new file mode 100644 index 000000000000..8ab5a35297cc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesListServerCasRequest + */ +class SqlInstancesListServerCasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php new file mode 100644 index 000000000000..5fbb01eaea97 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesPatchRequest + */ +class SqlInstancesPatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php new file mode 100644 index 000000000000..8614588e5314 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest + */ +class SqlInstancesPerformDiskShrinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\PerformDiskShrinkContext $body + * Perform disk shrink context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; + * @return \Google\Cloud\Sql\V1\PerformDiskShrinkContext|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; + * @param \Google\Cloud\Sql\V1\PerformDiskShrinkContext $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PerformDiskShrinkContext::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php new file mode 100644 index 000000000000..8be73ae30256 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php @@ -0,0 +1,159 @@ +google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest + */ +class SqlInstancesPromoteReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Set to true to invoke a replica failover to the designated DR + * replica. As part of replica failover, the promote operation attempts + * to add the original primary instance as a replica of the promoted + * DR replica when the original primary instance comes back online. + * If set to false or not specified, then the original primary + * instance becomes an independent Cloud SQL primary instance. + * Only applicable to MySQL. + * + * Generated from protobuf field bool failover = 3; + */ + protected $failover = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @type bool $failover + * Set to true to invoke a replica failover to the designated DR + * replica. As part of replica failover, the promote operation attempts + * to add the original primary instance as a replica of the promoted + * DR replica when the original primary instance comes back online. + * If set to false or not specified, then the original primary + * instance becomes an independent Cloud SQL primary instance. + * Only applicable to MySQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Set to true to invoke a replica failover to the designated DR + * replica. As part of replica failover, the promote operation attempts + * to add the original primary instance as a replica of the promoted + * DR replica when the original primary instance comes back online. + * If set to false or not specified, then the original primary + * instance becomes an independent Cloud SQL primary instance. + * Only applicable to MySQL. + * + * Generated from protobuf field bool failover = 3; + * @return bool + */ + public function getFailover() + { + return $this->failover; + } + + /** + * Set to true to invoke a replica failover to the designated DR + * replica. As part of replica failover, the promote operation attempts + * to add the original primary instance as a replica of the promoted + * DR replica when the original primary instance comes back online. + * If set to false or not specified, then the original primary + * instance becomes an independent Cloud SQL primary instance. + * Only applicable to MySQL. + * + * Generated from protobuf field bool failover = 3; + * @param bool $var + * @return $this + */ + public function setFailover($var) + { + GPBUtil::checkBool($var); + $this->failover = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php new file mode 100644 index 000000000000..be4171d47bc2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1.SqlInstancesReencryptRequest + */ +class SqlInstancesReencryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesReencryptRequest $body + * Reencrypt body that users request + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; + * @return \Google\Cloud\Sql\V1\InstancesReencryptRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; + * @param \Google\Cloud\Sql\V1\InstancesReencryptRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesReencryptRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php new file mode 100644 index 000000000000..a79384e72450 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php @@ -0,0 +1,113 @@ +google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest + */ +class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * @type string $project + * Required. The project ID that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php new file mode 100644 index 000000000000..c155d6d2135d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseResponse + */ +class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php new file mode 100644 index 000000000000..a761f690b0c0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest + */ +class SqlInstancesRescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + * @return \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + * @param \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php new file mode 100644 index 000000000000..62b51d5bb1e4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody + */ +class SqlInstancesRescheduleMaintenanceRequestBody extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + */ + protected $reschedule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $reschedule + * Required. The type of the reschedule the user wants. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + * @return \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule|null + */ + public function getReschedule() + { + return $this->reschedule; + } + + public function hasReschedule() + { + return isset($this->reschedule); + } + + public function clearReschedule() + { + unset($this->reschedule); + } + + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + * @param \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $var + * @return $this + */ + public function setReschedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule::class); + $this->reschedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php new file mode 100644 index 000000000000..cb830fe36b1d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php @@ -0,0 +1,124 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule + */ +class Reschedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + */ + protected $reschedule_type = 0; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schedule_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reschedule_type + * Required. The type of the reschedule. + * @type \Google\Protobuf\Timestamp $schedule_time + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + * @return int + */ + public function getRescheduleType() + { + return $this->reschedule_type; + } + + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + * @param int $var + * @return $this + */ + public function setRescheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\RescheduleType::class); + $this->reschedule_type = $var; + + return $this; + } + + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reschedule::class, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody_Reschedule::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php new file mode 100644 index 000000000000..8b8109bca17b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType + */ +class RescheduleType +{ + /** + * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; + */ + const RESCHEDULE_TYPE_UNSPECIFIED = 0; + /** + * Reschedules maintenance to happen now (within 5 minutes). + * + * Generated from protobuf enum IMMEDIATE = 1; + */ + const IMMEDIATE = 1; + /** + * Reschedules maintenance to occur within one week from the originally + * scheduled day and time. + * + * Generated from protobuf enum NEXT_AVAILABLE_WINDOW = 2; + */ + const NEXT_AVAILABLE_WINDOW = 2; + /** + * Reschedules maintenance to a specific time and day. + * + * Generated from protobuf enum SPECIFIC_TIME = 3; + */ + const SPECIFIC_TIME = 3; + + private static $valueToName = [ + self::RESCHEDULE_TYPE_UNSPECIFIED => 'RESCHEDULE_TYPE_UNSPECIFIED', + self::IMMEDIATE => 'IMMEDIATE', + self::NEXT_AVAILABLE_WINDOW => 'NEXT_AVAILABLE_WINDOW', + self::SPECIFIC_TIME => 'SPECIFIC_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RescheduleType::class, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody_RescheduleType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php new file mode 100644 index 000000000000..b8779a814c01 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest + */ +class SqlInstancesResetReplicaSizeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php new file mode 100644 index 000000000000..4fd11700c853 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesResetSslConfigRequest + */ +class SqlInstancesResetSslConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php new file mode 100644 index 000000000000..fd65741f020a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesRestartRequest + */ +class SqlInstancesRestartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be restarted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php new file mode 100644 index 000000000000..203876cdec69 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesRestoreBackupRequest + */ +class SqlInstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php new file mode 100644 index 000000000000..0f0c1a5593fa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesRotateServerCaRequest + */ +class SqlInstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php new file mode 100644 index 000000000000..0b9578d2ec23 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php @@ -0,0 +1,291 @@ +google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest + */ +class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + */ + protected $sync_mode = 0; + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + */ + protected $skip_verification = false; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sync_parallel_level = 0; + /** + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $migration_type = 0; + protected $sync_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type int $sync_mode + * External sync mode. + * @type bool $skip_verification + * Whether to skip the verification step (VESS). + * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config + * MySQL-specific settings for start external sync. + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * @type int $migration_type + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + * @return int + */ + public function getSyncMode() + { + return $this->sync_mode; + } + + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + * @param int $var + * @return $this + */ + public function setSyncMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); + $this->sync_mode = $var; + + return $this; + } + + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + * @return bool + */ + public function getSkipVerification() + { + return $this->skip_verification; + } + + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + * @param bool $var + * @return $this + */ + public function setSkipVerification($var) + { + GPBUtil::checkBool($var); + $this->skip_verification = $var; + + return $this; + } + + /** + * MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6; + * @return \Google\Cloud\Sql\V1\MySqlSyncConfig|null + */ + public function getMysqlSyncConfig() + { + return $this->readOneof(6); + } + + public function hasMysqlSyncConfig() + { + return $this->hasOneof(6); + } + + /** + * MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6; + * @param \Google\Cloud\Sql\V1\MySqlSyncConfig $var + * @return $this + */ + public function setMysqlSyncConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlSyncConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + + /** + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSyncConfig() + { + return $this->whichOneof("sync_config"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php new file mode 100644 index 000000000000..cd9d636bd47d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesStartReplicaRequest + */ +class SqlInstancesStartReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php new file mode 100644 index 000000000000..8460b58e74e7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesStopReplicaRequest + */ +class SqlInstancesStopReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php new file mode 100644 index 000000000000..d2194c9f7ac0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php @@ -0,0 +1,153 @@ +google.cloud.sql.v1.SqlInstancesSwitchoverRequest + */ +class SqlInstancesSwitchoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the replica. + * @type \Google\Protobuf\Duration $db_timeout + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getDbTimeout() + { + return $this->db_timeout; + } + + public function hasDbTimeout() + { + return isset($this->db_timeout); + } + + public function clearDbTimeout() + { + unset($this->db_timeout); + } + + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDbTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->db_timeout = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php new file mode 100644 index 000000000000..902c6634648a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesTruncateLogRequest + */ +class SqlInstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type \Google\Cloud\Sql\V1\InstancesTruncateLogRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesTruncateLogRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesTruncateLogRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesTruncateLogRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php new file mode 100644 index 000000000000..a1835cce803e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesUpdateRequest + */ +class SqlInstancesUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php new file mode 100644 index 000000000000..9d3de366d3dd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php @@ -0,0 +1,325 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest + */ +class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + */ + protected $verify_connection_only = false; + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + */ + protected $sync_mode = 0; + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $verify_replication_only = false; + /** + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $migration_type = 0; + /** + * Optional. Parallel level for initial data sync. Only applicable for + * PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sync_parallel_level = 0; + protected $sync_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type bool $verify_connection_only + * Flag to enable verifying connection only + * @type int $sync_mode + * External sync mode + * @type bool $verify_replication_only + * Optional. Flag to verify settings required by replication setup only + * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config + * Optional. MySQL-specific settings for start external sync. + * @type int $migration_type + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Only applicable for + * PostgreSQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + * @return bool + */ + public function getVerifyConnectionOnly() + { + return $this->verify_connection_only; + } + + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + * @param bool $var + * @return $this + */ + public function setVerifyConnectionOnly($var) + { + GPBUtil::checkBool($var); + $this->verify_connection_only = $var; + + return $this; + } + + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + * @return int + */ + public function getSyncMode() + { + return $this->sync_mode; + } + + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + * @param int $var + * @return $this + */ + public function setSyncMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); + $this->sync_mode = $var; + + return $this; + } + + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getVerifyReplicationOnly() + { + return $this->verify_replication_only; + } + + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setVerifyReplicationOnly($var) + { + GPBUtil::checkBool($var); + $this->verify_replication_only = $var; + + return $this; + } + + /** + * Optional. MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\MySqlSyncConfig|null + */ + public function getMysqlSyncConfig() + { + return $this->readOneof(6); + } + + public function hasMysqlSyncConfig() + { + return $this->hasOneof(6); + } + + /** + * Optional. MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\MySqlSyncConfig $var + * @return $this + */ + public function setMysqlSyncConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlSyncConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType configures the migration to use physical files or + * logical dump files. If not set, then the logical dump file configuration is + * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Only applicable for + * PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Only applicable for + * PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + + /** + * @return string + */ + public function getSyncConfig() + { + return $this->whichOneof("sync_config"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php new file mode 100644 index 000000000000..81bc7e811bfc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode + */ +class ExternalSyncMode +{ + /** + * Unknown external sync mode, will be defaulted to ONLINE mode + * + * Generated from protobuf enum EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; + */ + const EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; + /** + * Online external sync will set up replication after initial data external + * sync + * + * Generated from protobuf enum ONLINE = 1; + */ + const ONLINE = 1; + /** + * Offline external sync only dumps and loads a one-time snapshot of + * the primary instance's data + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + + private static $valueToName = [ + self::EXTERNAL_SYNC_MODE_UNSPECIFIED => 'EXTERNAL_SYNC_MODE_UNSPECIFIED', + self::ONLINE => 'ONLINE', + self::OFFLINE => 'OFFLINE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExternalSyncMode::class, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest_ExternalSyncMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php new file mode 100644 index 000000000000..d4e8642f4146 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType + */ +class MigrationType +{ + /** + * Default value is a logical dump file-based migration + * + * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0; + */ + const MIGRATION_TYPE_UNSPECIFIED = 0; + /** + * Logical dump file-based migration + * + * Generated from protobuf enum LOGICAL = 1; + */ + const LOGICAL = 1; + /** + * Physical file-based migration + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED', + self::LOGICAL => 'LOGICAL', + self::PHYSICAL => 'PHYSICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MigrationType::class, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest_MigrationType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php new file mode 100644 index 000000000000..9765ba2aa15c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsResponse + */ +class SqlInstancesVerifyExternalSyncSettingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; + */ + private $errors; + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; + */ + private $warnings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#migrationSettingErrorList`. + * @type array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $errors + * List of migration violations. + * @type array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $warnings + * List of migration warnings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; + * @param array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError::class); + $this->errors = $arr; + + return $this; + } + + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; + * @param array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError::class); + $this->warnings = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php new file mode 100644 index 000000000000..a4db37dc4140 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php @@ -0,0 +1,83 @@ +google.cloud.sql.v1.SqlIpAddressType + */ +class SqlIpAddressType +{ + /** + * This is an unknown IP address type. + * + * Generated from protobuf enum SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; + */ + const SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; + /** + * IP address the customer is supposed to connect to. Usually this is the + * load balancer's IP address + * + * Generated from protobuf enum PRIMARY = 1; + */ + const PRIMARY = 1; + /** + * Source IP address of the connection a read replica establishes to its + * external primary instance. This IP address can be allowlisted by the + * customer in case it has a firewall that filters incoming connection to its + * on premises primary instance. + * + * Generated from protobuf enum OUTGOING = 2; + */ + const OUTGOING = 2; + /** + * Private IP used when using private IPs and network peering. + * + * Generated from protobuf enum PRIVATE = 3; + */ + const PBPRIVATE = 3; + /** + * V1 IP of a migrated instance. We want the user to + * decommission this IP as soon as the migration is complete. + * Note: V1 instances with V1 ip addresses will be counted as PRIMARY. + * + * Generated from protobuf enum MIGRATED_1ST_GEN = 4; + */ + const MIGRATED_1ST_GEN = 4; + + private static $valueToName = [ + self::SQL_IP_ADDRESS_TYPE_UNSPECIFIED => 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED', + self::PRIMARY => 'PRIMARY', + self::OUTGOING => 'OUTGOING', + self::PBPRIVATE => 'PRIVATE', + self::MIGRATED_1ST_GEN => 'MIGRATED_1ST_GEN', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php new file mode 100644 index 000000000000..6f519700a0f1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlOperationsCancelRequest + */ +class SqlOperationsCancelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php new file mode 100644 index 000000000000..3d8bb11843ab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlOperationsGetRequest + */ +class SqlOperationsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php new file mode 100644 index 000000000000..7824a1ca0552 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php @@ -0,0 +1,173 @@ +google.cloud.sql.v1.SqlOperationsListRequest + */ +class SqlOperationsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type int $max_results + * Maximum number of operations per response. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * 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; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php new file mode 100644 index 000000000000..2752c3156e60 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlPricingPlan + */ +class SqlPricingPlan +{ + /** + * This is an unknown pricing plan for this instance. + * + * Generated from protobuf enum SQL_PRICING_PLAN_UNSPECIFIED = 0; + */ + const SQL_PRICING_PLAN_UNSPECIFIED = 0; + /** + * The instance is billed at a monthly flat rate. + * + * Generated from protobuf enum PACKAGE = 1; + */ + const PACKAGE = 1; + /** + * The instance is billed per usage. + * + * Generated from protobuf enum PER_USE = 2; + */ + const PER_USE = 2; + + private static $valueToName = [ + self::SQL_PRICING_PLAN_UNSPECIFIED => 'SQL_PRICING_PLAN_UNSPECIFIED', + self::PACKAGE => 'PACKAGE', + self::PER_USE => 'PER_USE', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php new file mode 100644 index 000000000000..d96c9de2d50f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php @@ -0,0 +1,63 @@ +google.cloud.sql.v1.SqlReplicationType + */ +class SqlReplicationType +{ + /** + * This is an unknown replication type for a Cloud SQL instance. + * + * Generated from protobuf enum SQL_REPLICATION_TYPE_UNSPECIFIED = 0; + */ + const SQL_REPLICATION_TYPE_UNSPECIFIED = 0; + /** + * The synchronous replication mode for First Generation instances. It is the + * default value. + * + * Generated from protobuf enum SYNCHRONOUS = 1; + */ + const SYNCHRONOUS = 1; + /** + * The asynchronous replication mode for First Generation instances. It + * provides a slight performance gain, but if an outage occurs while this + * option is set to asynchronous, you can lose up to a few seconds of updates + * to your data. + * + * Generated from protobuf enum ASYNCHRONOUS = 2; + */ + const ASYNCHRONOUS = 2; + + private static $valueToName = [ + self::SQL_REPLICATION_TYPE_UNSPECIFIED => 'SQL_REPLICATION_TYPE_UNSPECIFIED', + self::SYNCHRONOUS => 'SYNCHRONOUS', + self::ASYNCHRONOUS => 'ASYNCHRONOUS', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php new file mode 100644 index 000000000000..6f65acfdf334 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php @@ -0,0 +1,189 @@ +google.cloud.sql.v1.SqlServerAuditConfig + */ +class SqlServerAuditConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + */ + protected $bucket = ''; + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + */ + protected $retention_interval = null; + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + */ + protected $upload_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#sqlServerAuditConfig + * @type string $bucket + * The name of the destination bucket (e.g., gs://mybucket). + * @type \Google\Protobuf\Duration $retention_interval + * How long to keep generated audit files. + * @type \Google\Protobuf\Duration $upload_interval + * How often to upload generated audit files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionInterval() + { + return $this->retention_interval; + } + + public function hasRetentionInterval() + { + return isset($this->retention_interval); + } + + public function clearRetentionInterval() + { + unset($this->retention_interval); + } + + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_interval = $var; + + return $this; + } + + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getUploadInterval() + { + return $this->upload_interval; + } + + public function hasUploadInterval() + { + return isset($this->upload_interval); + } + + public function clearUploadInterval() + { + unset($this->upload_interval); + } + + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUploadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->upload_interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php new file mode 100644 index 000000000000..98d2b10fb0aa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlServerDatabaseDetails + */ +class SqlServerDatabaseDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + */ + protected $compatibility_level = 0; + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + */ + protected $recovery_model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $compatibility_level + * The version of SQL Server with which the database is to be made compatible + * @type string $recovery_model + * The recovery model of a SQL Server database + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + * @return int + */ + public function getCompatibilityLevel() + { + return $this->compatibility_level; + } + + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + * @param int $var + * @return $this + */ + public function setCompatibilityLevel($var) + { + GPBUtil::checkInt32($var); + $this->compatibility_level = $var; + + return $this; + } + + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + * @return string + */ + public function getRecoveryModel() + { + return $this->recovery_model; + } + + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + * @param string $var + * @return $this + */ + public function setRecoveryModel($var) + { + GPBUtil::checkString($var, True); + $this->recovery_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php new file mode 100644 index 000000000000..3b85c94c2bab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlServerUserDetails + */ +class SqlServerUserDetails extends \Google\Protobuf\Internal\Message +{ + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + */ + protected $disabled = false; + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + */ + private $server_roles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $disabled + * If the user has been disabled + * @type array|\Google\Protobuf\Internal\RepeatedField $server_roles + * The server roles for this user + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerRoles() + { + return $this->server_roles; + } + + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerRoles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->server_roles = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php new file mode 100644 index 000000000000..56c21ca3bac9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1.SqlSslCertsDeleteRequest + */ +class SqlSslCertsDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + */ + protected $sha1_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1_fingerprint + * Sha1 FingerPrint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php new file mode 100644 index 000000000000..bf1d185a176f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1.SqlSslCertsGetRequest + */ +class SqlSslCertsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + */ + protected $sha1_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1_fingerprint + * Sha1 FingerPrint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php new file mode 100644 index 000000000000..534e0d079f27 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1.SqlSslCertsInsertRequest + */ +class SqlSslCertsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\SslCertsInsertRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; + * @return \Google\Cloud\Sql\V1\SslCertsInsertRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; + * @param \Google\Cloud\Sql\V1\SslCertsInsertRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertsInsertRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php new file mode 100644 index 000000000000..1d17b4d8f053 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1.SqlSslCertsListRequest + */ +class SqlSslCertsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php new file mode 100644 index 000000000000..0cd862973ac3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php @@ -0,0 +1,78 @@ +google.cloud.sql.v1.SqlSuspensionReason + */ +class SqlSuspensionReason +{ + /** + * This is an unknown suspension reason. + * + * Generated from protobuf enum SQL_SUSPENSION_REASON_UNSPECIFIED = 0; + */ + const SQL_SUSPENSION_REASON_UNSPECIFIED = 0; + /** + * The instance is suspended due to billing issues (for example:, GCP account + * issue) + * + * Generated from protobuf enum BILLING_ISSUE = 2; + */ + const BILLING_ISSUE = 2; + /** + * The instance is suspended due to illegal content (for example:, child + * pornography, copyrighted material, etc.). + * + * Generated from protobuf enum LEGAL_ISSUE = 3; + */ + const LEGAL_ISSUE = 3; + /** + * The instance is causing operational issues (for example:, causing the + * database to crash). + * + * Generated from protobuf enum OPERATIONAL_ISSUE = 4; + */ + const OPERATIONAL_ISSUE = 4; + /** + * The KMS key used by the instance is either revoked or denied access to + * + * Generated from protobuf enum KMS_KEY_ISSUE = 5; + */ + const KMS_KEY_ISSUE = 5; + + private static $valueToName = [ + self::SQL_SUSPENSION_REASON_UNSPECIFIED => 'SQL_SUSPENSION_REASON_UNSPECIFIED', + self::BILLING_ISSUE => 'BILLING_ISSUE', + self::LEGAL_ISSUE => 'LEGAL_ISSUE', + self::OPERATIONAL_ISSUE => 'OPERATIONAL_ISSUE', + self::KMS_KEY_ISSUE => 'KMS_KEY_ISSUE', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php new file mode 100644 index 000000000000..37497ea9de91 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlTiersListRequest + */ +class SqlTiersListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID of the project for which to list tiers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php new file mode 100644 index 000000000000..b83f41093d28 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php @@ -0,0 +1,74 @@ +google.cloud.sql.v1.SqlUpdateTrack + */ +class SqlUpdateTrack +{ + /** + * This is an unknown maintenance timing preference. + * + * Generated from protobuf enum SQL_UPDATE_TRACK_UNSPECIFIED = 0; + */ + const SQL_UPDATE_TRACK_UNSPECIFIED = 0; + /** + * For an instance with a scheduled maintenance window, this maintenance + * timing indicates that the maintenance update is scheduled 7 to 14 days + * after the notification is sent out. Also referred to as `Week 1` (Console) + * and `preview` (gcloud CLI). + * + * Generated from protobuf enum canary = 1; + */ + const canary = 1; + /** + * For an instance with a scheduled maintenance window, this maintenance + * timing indicates that the maintenance update is scheduled 15 to 21 days + * after the notification is sent out. Also referred to as `Week 2` (Console) + * and `production` (gcloud CLI). + * + * Generated from protobuf enum stable = 2; + */ + const stable = 2; + /** + * For instance with a scheduled maintenance window, this maintenance + * timing indicates that the maintenance update is scheduled 35 to 42 days + * after the notification is sent out. + * + * Generated from protobuf enum week5 = 3; + */ + const week5 = 3; + + private static $valueToName = [ + self::SQL_UPDATE_TRACK_UNSPECIFIED => 'SQL_UPDATE_TRACK_UNSPECIFIED', + self::canary => 'canary', + self::stable => 'stable', + self::week5 => 'week5', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php new file mode 100644 index 000000000000..5c934f9681fb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php @@ -0,0 +1,167 @@ +google.cloud.sql.v1.SqlUsersDeleteRequest + */ +class SqlUsersDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + */ + protected $host = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the user in the instance. + * + * 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; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php new file mode 100644 index 000000000000..b018b7342a5e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1.SqlUsersGetRequest + */ +class SqlUsersGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + */ + protected $host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * User of the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $host + * Host of a user of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php new file mode 100644 index 000000000000..98e3d15e852a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1.SqlUsersInsertRequest + */ +class SqlUsersInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\User $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @return \Google\Cloud\Sql\V1\User|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @param \Google\Cloud\Sql\V1\User $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\User::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php new file mode 100644 index 000000000000..5b1872f2a7c5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1.SqlUsersListRequest + */ +class SqlUsersListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php new file mode 100644 index 000000000000..b1e560c6a665 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php @@ -0,0 +1,204 @@ +google.cloud.sql.v1.SqlUsersUpdateRequest + */ +class SqlUsersUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $host = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Optional. Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\User $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the user in the instance. + * + * 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; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @return \Google\Cloud\Sql\V1\User|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @param \Google\Cloud\Sql\V1\User $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\User::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php new file mode 100644 index 000000000000..1f6d18839eeb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php @@ -0,0 +1,375 @@ +google.cloud.sql.v1.SslCert + */ +class SslCert extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + */ + protected $cert_serial_number = ''; + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + */ + protected $cert = ''; + /** + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + */ + protected $common_name = ''; + /** + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + */ + protected $expiration_time = null; + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + */ + protected $sha1_fingerprint = ''; + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + */ + protected $self_link = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCert`. + * @type string $cert_serial_number + * Serial number, as extracted from the certificate. + * @type string $cert + * PEM representation. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * @type string $common_name + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * @type \Google\Protobuf\Timestamp $expiration_time + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $sha1_fingerprint + * Sha1 Fingerprint. + * @type string $instance + * Name of the database instance. + * @type string $self_link + * The URI of this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + * @return string + */ + public function getCertSerialNumber() + { + return $this->cert_serial_number; + } + + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + * @param string $var + * @return $this + */ + public function setCertSerialNumber($var) + { + GPBUtil::checkString($var, True); + $this->cert_serial_number = $var; + + return $this; + } + + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + * @return string + */ + public function getCert() + { + return $this->cert; + } + + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + * @param string $var + * @return $this + */ + public function setCert($var) + { + GPBUtil::checkString($var, True); + $this->cert = $var; + + return $this; + } + + /** + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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 time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + * @return string + */ + public function getCommonName() + { + return $this->common_name; + } + + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + * @param string $var + * @return $this + */ + public function setCommonName($var) + { + GPBUtil::checkString($var, True); + $this->common_name = $var; + + return $this; + } + + /** + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @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 time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php new file mode 100644 index 000000000000..4d9eb12d3397 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php @@ -0,0 +1,115 @@ +google.cloud.sql.v1.SslCertDetail + */ +class SslCertDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; + */ + protected $cert_info = null; + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + */ + protected $cert_private_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\SslCert $cert_info + * The public information about the cert. + * @type string $cert_private_key + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getCertInfo() + { + return $this->cert_info; + } + + public function hasCertInfo() + { + return isset($this->cert_info); + } + + public function clearCertInfo() + { + unset($this->cert_info); + } + + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setCertInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->cert_info = $var; + + return $this; + } + + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + * @return string + */ + public function getCertPrivateKey() + { + return $this->cert_private_key; + } + + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + * @param string $var + * @return $this + */ + public function setCertPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->cert_private_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php new file mode 100644 index 000000000000..3652c5694a2a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SslCertsCreateEphemeralRequest + */ +class SslCertsCreateEphemeralRequest extends \Google\Protobuf\Internal\Message +{ + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + */ + protected $public_key = ''; + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + */ + protected $access_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $public_key + * PEM encoded public key to include in the signed certificate. + * @type string $access_token + * Access token to include in the signed certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php new file mode 100644 index 000000000000..ee4048262803 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.SslCertsInsertRequest + */ +class SslCertsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + */ + protected $common_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $common_name + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + * @return string + */ + public function getCommonName() + { + return $this->common_name; + } + + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + * @param string $var + * @return $this + */ + public function setCommonName($var) + { + GPBUtil::checkString($var, True); + $this->common_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php new file mode 100644 index 000000000000..8c78bd59278f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php @@ -0,0 +1,207 @@ +google.cloud.sql.v1.SslCertsInsertResponse + */ +class SslCertsInsertResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; + */ + protected $operation = null; + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; + */ + protected $server_ca_cert = null; + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; + */ + protected $client_cert = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCertsInsert`. + * @type \Google\Cloud\Sql\V1\Operation $operation + * The operation to track the ssl certs insert request. + * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * @type \Google\Cloud\Sql\V1\SslCertDetail $client_cert + * The new client certificate and private key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; + * @return \Google\Cloud\Sql\V1\Operation|null + */ + public function getOperation() + { + return $this->operation; + } + + public function hasOperation() + { + return isset($this->operation); + } + + public function clearOperation() + { + unset($this->operation); + } + + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; + * @param \Google\Cloud\Sql\V1\Operation $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Operation::class); + $this->operation = $var; + + return $this; + } + + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; + * @return \Google\Cloud\Sql\V1\SslCertDetail|null + */ + public function getClientCert() + { + return $this->client_cert; + } + + public function hasClientCert() + { + return isset($this->client_cert); + } + + public function clearClientCert() + { + unset($this->client_cert); + } + + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; + * @param \Google\Cloud\Sql\V1\SslCertDetail $var + * @return $this + */ + public function setClientCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertDetail::class); + $this->client_cert = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php new file mode 100644 index 000000000000..7ecb980459f4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SslCertsListResponse + */ +class SslCertsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCertsList`. + * @type array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $items + * List of client certificates for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; + * @param array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SslCert::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php new file mode 100644 index 000000000000..cf7b01c0902d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1.SyncFlags + */ +class SyncFlags extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the flag. + * @type string $value + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the flag. + * + * 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 value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php new file mode 100644 index 000000000000..7be60ec5d8bd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php @@ -0,0 +1,207 @@ +google.cloud.sql.v1.Tier + */ +class Tier extends \Google\Protobuf\Internal\Message +{ + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + */ + protected $tier = ''; + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + */ + protected $RAM = 0; + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + */ + protected $Disk_Quota = 0; + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + */ + private $region; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tier + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * @type int|string $RAM + * The maximum RAM usage of this tier in bytes. + * @type string $kind + * This is always `sql#tier`. + * @type int|string $Disk_Quota + * The maximum disk size of this tier in bytes. + * @type array|\Google\Protobuf\Internal\RepeatedField $region + * The applicable regions for this tier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + * @return string + */ + public function getTier() + { + return $this->tier; + } + + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + * @param string $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkString($var, True); + $this->tier = $var; + + return $this; + } + + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + * @return int|string + */ + public function getRAM() + { + return $this->RAM; + } + + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + * @param int|string $var + * @return $this + */ + public function setRAM($var) + { + GPBUtil::checkInt64($var); + $this->RAM = $var; + + return $this; + } + + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + * @return int|string + */ + public function getDiskQuota() + { + return $this->Disk_Quota; + } + + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + * @param int|string $var + * @return $this + */ + public function setDiskQuota($var) + { + GPBUtil::checkInt64($var); + $this->Disk_Quota = $var; + + return $this; + } + + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegion() + { + return $this->region; + } + + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->region = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php new file mode 100644 index 000000000000..f43549e0960f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.TiersListResponse + */ +class TiersListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#tiersList`. + * @type array<\Google\Cloud\Sql\V1\Tier>|\Google\Protobuf\Internal\RepeatedField $items + * List of tiers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; + * @param array<\Google\Cloud\Sql\V1\Tier>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Tier::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php new file mode 100644 index 000000000000..e97d8dbfdb71 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1.TruncateLogContext + */ +class TruncateLogContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + */ + protected $log_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#truncateLogContext`. + * @type string $log_type + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + * @return string + */ + public function getLogType() + { + return $this->log_type; + } + + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + * @param string $var + * @return $this + */ + public function setLogType($var) + { + GPBUtil::checkString($var, True); + $this->log_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php new file mode 100644 index 000000000000..d77a1fd3563c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php @@ -0,0 +1,474 @@ +google.cloud.sql.v1.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $host = ''; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + */ + protected $instance = ''; + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + */ + protected $project = ''; + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; + */ + protected $type = 0; + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; + */ + protected $password_policy = null; + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; + */ + protected $dual_password_type = null; + protected $user_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#user`. + * @type string $password + * The password for the user. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. + * @type string $name + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * @type string $host + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * @type string $instance + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * @type string $project + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * @type int $type + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * @type \Google\Cloud\Sql\V1\SqlServerUserDetails $sqlserver_user_details + * @type \Google\Cloud\Sql\V1\UserPasswordValidationPolicy $password_policy + * User level password validation policy. + * @type int $dual_password_type + * Dual password status for the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * 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; + } + + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * 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; + } + + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\User\SqlUserType::class); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9; + * @return \Google\Cloud\Sql\V1\SqlServerUserDetails|null + */ + public function getSqlserverUserDetails() + { + return $this->readOneof(9); + } + + public function hasSqlserverUserDetails() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9; + * @param \Google\Cloud\Sql\V1\SqlServerUserDetails $var + * @return $this + */ + public function setSqlserverUserDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerUserDetails::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; + * @return \Google\Cloud\Sql\V1\UserPasswordValidationPolicy|null + */ + public function getPasswordPolicy() + { + return $this->password_policy; + } + + public function hasPasswordPolicy() + { + return isset($this->password_policy); + } + + public function clearPasswordPolicy() + { + unset($this->password_policy); + } + + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; + * @param \Google\Cloud\Sql\V1\UserPasswordValidationPolicy $var + * @return $this + */ + public function setPasswordPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\UserPasswordValidationPolicy::class); + $this->password_policy = $var; + + return $this; + } + + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; + * @return int + */ + public function getDualPasswordType() + { + return isset($this->dual_password_type) ? $this->dual_password_type : 0; + } + + public function hasDualPasswordType() + { + return isset($this->dual_password_type); + } + + public function clearDualPasswordType() + { + unset($this->dual_password_type); + } + + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; + * @param int $var + * @return $this + */ + public function setDualPasswordType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\User\DualPasswordType::class); + $this->dual_password_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getUserDetails() + { + return $this->whichOneof("user_details"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php new file mode 100644 index 000000000000..02da08dd9a1f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.User.DualPasswordType + */ +class DualPasswordType +{ + /** + * The default value. + * + * Generated from protobuf enum DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; + */ + const DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; + /** + * Do not update the user's dual password status. + * + * Generated from protobuf enum NO_MODIFY_DUAL_PASSWORD = 1; + */ + const NO_MODIFY_DUAL_PASSWORD = 1; + /** + * No dual password usable for connecting using this user. + * + * Generated from protobuf enum NO_DUAL_PASSWORD = 2; + */ + const NO_DUAL_PASSWORD = 2; + /** + * Dual password usable for connecting using this user. + * + * Generated from protobuf enum DUAL_PASSWORD = 3; + */ + const DUAL_PASSWORD = 3; + + private static $valueToName = [ + self::DUAL_PASSWORD_TYPE_UNSPECIFIED => 'DUAL_PASSWORD_TYPE_UNSPECIFIED', + self::NO_MODIFY_DUAL_PASSWORD => 'NO_MODIFY_DUAL_PASSWORD', + self::NO_DUAL_PASSWORD => 'NO_DUAL_PASSWORD', + self::DUAL_PASSWORD => 'DUAL_PASSWORD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DualPasswordType::class, \Google\Cloud\Sql\V1\User_DualPasswordType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php new file mode 100644 index 000000000000..4f6c75f172b9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php @@ -0,0 +1,85 @@ +google.cloud.sql.v1.User.SqlUserType + */ +class SqlUserType +{ + /** + * The database's built-in user type. + * + * Generated from protobuf enum BUILT_IN = 0; + */ + const BUILT_IN = 0; + /** + * Cloud IAM user. + * + * Generated from protobuf enum CLOUD_IAM_USER = 1; + */ + const CLOUD_IAM_USER = 1; + /** + * Cloud IAM service account. + * + * Generated from protobuf enum CLOUD_IAM_SERVICE_ACCOUNT = 2; + */ + const CLOUD_IAM_SERVICE_ACCOUNT = 2; + /** + * Cloud IAM group non-login user. + * + * Generated from protobuf enum CLOUD_IAM_GROUP = 3; + */ + const CLOUD_IAM_GROUP = 3; + /** + * Cloud IAM group login user. + * + * Generated from protobuf enum CLOUD_IAM_GROUP_USER = 4; + */ + const CLOUD_IAM_GROUP_USER = 4; + /** + * Cloud IAM group login service account. + * + * Generated from protobuf enum CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; + */ + const CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; + + private static $valueToName = [ + self::BUILT_IN => 'BUILT_IN', + self::CLOUD_IAM_USER => 'CLOUD_IAM_USER', + self::CLOUD_IAM_SERVICE_ACCOUNT => 'CLOUD_IAM_SERVICE_ACCOUNT', + self::CLOUD_IAM_GROUP => 'CLOUD_IAM_GROUP', + self::CLOUD_IAM_GROUP_USER => 'CLOUD_IAM_GROUP_USER', + self::CLOUD_IAM_GROUP_SERVICE_ACCOUNT => 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlUserType::class, \Google\Cloud\Sql\V1\User_SqlUserType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php new file mode 100644 index 000000000000..5db3484ac7c2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php @@ -0,0 +1,227 @@ +google.cloud.sql.v1.UserPasswordValidationPolicy + */ +class UserPasswordValidationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + */ + protected $allowed_failed_attempts = 0; + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + */ + protected $password_expiration_duration = null; + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + */ + protected $enable_failed_attempts_check = false; + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + */ + protected $enable_password_verification = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $allowed_failed_attempts + * Number of failed login attempts allowed before user get locked. + * @type \Google\Protobuf\Duration $password_expiration_duration + * Expiration duration after password is updated. + * @type bool $enable_failed_attempts_check + * If true, failed login attempts check will be enabled. + * @type \Google\Cloud\Sql\V1\PasswordStatus $status + * Output only. Read-only password status. + * @type bool $enable_password_verification + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + * @return int + */ + public function getAllowedFailedAttempts() + { + return $this->allowed_failed_attempts; + } + + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + * @param int $var + * @return $this + */ + public function setAllowedFailedAttempts($var) + { + GPBUtil::checkInt32($var); + $this->allowed_failed_attempts = $var; + + return $this; + } + + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getPasswordExpirationDuration() + { + return $this->password_expiration_duration; + } + + public function hasPasswordExpirationDuration() + { + return isset($this->password_expiration_duration); + } + + public function clearPasswordExpirationDuration() + { + unset($this->password_expiration_duration); + } + + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPasswordExpirationDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->password_expiration_duration = $var; + + return $this; + } + + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + * @return bool + */ + public function getEnableFailedAttemptsCheck() + { + return $this->enable_failed_attempts_check; + } + + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + * @param bool $var + * @return $this + */ + public function setEnableFailedAttemptsCheck($var) + { + GPBUtil::checkBool($var); + $this->enable_failed_attempts_check = $var; + + return $this; + } + + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Sql\V1\PasswordStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Sql\V1\PasswordStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PasswordStatus::class); + $this->status = $var; + + return $this; + } + + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + * @return bool + */ + public function getEnablePasswordVerification() + { + return $this->enable_password_verification; + } + + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + * @param bool $var + * @return $this + */ + public function setEnablePasswordVerification($var) + { + GPBUtil::checkBool($var); + $this->enable_password_verification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php new file mode 100644 index 000000000000..4023ff5fc2bf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php @@ -0,0 +1,140 @@ +google.cloud.sql.v1.UsersListResponse + */ +class UsersListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#usersList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; + */ + private $items; + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @deprecated + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#usersList`. + * @type array<\Google\Cloud\Sql\V1\User>|\Google\Protobuf\Internal\RepeatedField $items + * List of user resources in the instance. + * @type string $next_page_token + * Unused. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#usersList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#usersList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; + * @param array<\Google\Cloud\Sql\V1\User>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\User::class); + $this->items = $arr; + + return $this; + } + + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getNextPageToken() + { + @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); + return $this->next_page_token; + } + + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setNextPageToken($var) + { + @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php new file mode 100644 index 000000000000..3c14bb21208a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php new file mode 100644 index 000000000000..afa9913adb03 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php new file mode 100644 index 000000000000..ea1b4c617c63 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php @@ -0,0 +1,57 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php new file mode 100644 index 000000000000..8b8a1d8bfdfc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php @@ -0,0 +1,59 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php new file mode 100644 index 000000000000..c2425b500411 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php @@ -0,0 +1,60 @@ +generateEphemeralCert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlConnectService_GenerateEphemeralCert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php new file mode 100644 index 000000000000..b170636acde3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php @@ -0,0 +1,57 @@ +getConnectSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlConnectService_GetConnectSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php new file mode 100644 index 000000000000..e99a3f2bf791 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php new file mode 100644 index 000000000000..bf33a4db331d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php @@ -0,0 +1,58 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php new file mode 100644 index 000000000000..215022a1cd3a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php @@ -0,0 +1,60 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php new file mode 100644 index 000000000000..d2f9f97c5542 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php new file mode 100644 index 000000000000..71d182cb0137 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php @@ -0,0 +1,58 @@ +patch($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php new file mode 100644 index 000000000000..68601967795d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php @@ -0,0 +1,58 @@ +update($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php new file mode 100644 index 000000000000..d129c9b22da1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlFlagsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php new file mode 100644 index 000000000000..eb1711a8938e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php @@ -0,0 +1,80 @@ +setInstance($instance) + ->setProject($project) + ->setBody($body); + + // Call the API and handle any network failures. + try { + /** @var SqlInstancesAcquireSsrsLeaseResponse $response */ + $response = $sqlInstancesServiceClient->acquireSsrsLease($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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + acquire_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1_generated_SqlInstancesService_AcquireSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php new file mode 100644 index 000000000000..07344b6db82c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php @@ -0,0 +1,63 @@ +addServerCa($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_AddServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php new file mode 100644 index 000000000000..50edbc47572f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php @@ -0,0 +1,58 @@ +clone($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Clone_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php new file mode 100644 index 000000000000..c207649669a3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php @@ -0,0 +1,60 @@ +createEphemeral($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_CreateEphemeral_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php new file mode 100644 index 000000000000..a4b275b5844f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php new file mode 100644 index 000000000000..01a4b26624b6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php @@ -0,0 +1,87 @@ +setSourceRepresentativeInstanceName($bodyDemoteContextSourceRepresentativeInstanceName); + $body = (new InstancesDemoteRequest()) + ->setDemoteContext($bodyDemoteContext); + $request = (new SqlInstancesDemoteRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + + // Call the API and handle any network failures. + try { + /** @var Operation $response */ + $response = $sqlInstancesServiceClient->demote($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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + $bodyDemoteContextSourceRepresentativeInstanceName = '[SOURCE_REPRESENTATIVE_INSTANCE_NAME]'; + + demote_sample($instance, $project, $bodyDemoteContextSourceRepresentativeInstanceName); +} +// [END sqladmin_v1_generated_SqlInstancesService_Demote_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php new file mode 100644 index 000000000000..dbf950be9fb1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php @@ -0,0 +1,58 @@ +demoteMaster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_DemoteMaster_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php new file mode 100644 index 000000000000..070a2ceaf657 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php @@ -0,0 +1,58 @@ +export($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Export_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php new file mode 100644 index 000000000000..4882dda8ba22 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php @@ -0,0 +1,64 @@ +failover($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Failover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php new file mode 100644 index 000000000000..743f86f11906 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php new file mode 100644 index 000000000000..e97c4fa67898 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php @@ -0,0 +1,57 @@ +getDiskShrinkConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_GetDiskShrinkConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php new file mode 100644 index 000000000000..5ffd507acd8f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php @@ -0,0 +1,57 @@ +getLatestRecoveryTime($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_GetLatestRecoveryTime_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php new file mode 100644 index 000000000000..864538ad14a1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php @@ -0,0 +1,58 @@ +import($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Import_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php new file mode 100644 index 000000000000..6ee9257924c0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php @@ -0,0 +1,57 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php new file mode 100644 index 000000000000..03b89adf9d92 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php new file mode 100644 index 000000000000..d0497d3b2482 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php @@ -0,0 +1,61 @@ +listServerCas($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_ListServerCas_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php new file mode 100644 index 000000000000..fadfac70c04c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php @@ -0,0 +1,58 @@ +patch($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php new file mode 100644 index 000000000000..77a2c96ddcf1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php @@ -0,0 +1,57 @@ +performDiskShrink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_PerformDiskShrink_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php new file mode 100644 index 000000000000..1f61ff4141e8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php @@ -0,0 +1,59 @@ +promoteReplica($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_PromoteReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php new file mode 100644 index 000000000000..a4175c69217c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php @@ -0,0 +1,57 @@ +reencrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Reencrypt_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php new file mode 100644 index 000000000000..9795d90041e8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php @@ -0,0 +1,76 @@ +setInstance($instance) + ->setProject($project); + + // Call the API and handle any network failures. + try { + /** @var SqlInstancesReleaseSsrsLeaseResponse $response */ + $response = $sqlInstancesServiceClient->releaseSsrsLease($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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + release_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1_generated_SqlInstancesService_ReleaseSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php new file mode 100644 index 000000000000..43a7a8a7b2f8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php @@ -0,0 +1,57 @@ +rescheduleMaintenance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php new file mode 100644 index 000000000000..6d249f20d66c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php @@ -0,0 +1,57 @@ +resetReplicaSize($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_ResetReplicaSize_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php new file mode 100644 index 000000000000..2b70c2126902 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php @@ -0,0 +1,58 @@ +resetSslConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_ResetSslConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php new file mode 100644 index 000000000000..d633b1d763a7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php @@ -0,0 +1,57 @@ +restart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Restart_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php new file mode 100644 index 000000000000..ab1ba29f1674 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php @@ -0,0 +1,58 @@ +restoreBackup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_RestoreBackup_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php new file mode 100644 index 000000000000..c19ab49460c7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php @@ -0,0 +1,60 @@ +rotateServerCa($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_RotateServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php new file mode 100644 index 000000000000..9fc1ced4b130 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php @@ -0,0 +1,57 @@ +startExternalSync($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_StartExternalSync_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php new file mode 100644 index 000000000000..f97637c106f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php @@ -0,0 +1,57 @@ +startReplica($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_StartReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php new file mode 100644 index 000000000000..4b12bda8ef2c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php @@ -0,0 +1,57 @@ +stopReplica($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_StopReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php new file mode 100644 index 000000000000..58894b07f6e7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php @@ -0,0 +1,58 @@ +switchover($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Switchover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php new file mode 100644 index 000000000000..0e6f130dc788 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php @@ -0,0 +1,58 @@ +truncateLog($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_TruncateLog_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php new file mode 100644 index 000000000000..8df4adfa6f43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php @@ -0,0 +1,58 @@ +update($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php new file mode 100644 index 000000000000..98e058a44c75 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php @@ -0,0 +1,57 @@ +verifyExternalSyncSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_VerifyExternalSyncSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php new file mode 100644 index 000000000000..3666a907132b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php @@ -0,0 +1,55 @@ +cancel($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlOperationsService_Cancel_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php new file mode 100644 index 000000000000..52eb3c62d29e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlOperationsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php new file mode 100644 index 000000000000..0beed7105897 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php @@ -0,0 +1,58 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlOperationsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php new file mode 100644 index 000000000000..0d6646e07dcc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php @@ -0,0 +1,58 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php new file mode 100644 index 000000000000..3f462a607ecd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php @@ -0,0 +1,59 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php new file mode 100644 index 000000000000..092fb4ef8c79 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php @@ -0,0 +1,59 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php new file mode 100644 index 000000000000..4e69956a2289 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php new file mode 100644 index 000000000000..e2d320dddaa3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php @@ -0,0 +1,59 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlTiersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php new file mode 100644 index 000000000000..0dcccbd25a60 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php new file mode 100644 index 000000000000..b1f9784cbc43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php new file mode 100644 index 000000000000..4c09243fc801 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php @@ -0,0 +1,57 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php new file mode 100644 index 000000000000..90925d6bc614 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php new file mode 100644 index 000000000000..8c2584251ae9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php @@ -0,0 +1,57 @@ +update($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php new file mode 100644 index 000000000000..6dac880c0a7d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php @@ -0,0 +1,144 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_available_database_versions_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php new file mode 100644 index 000000000000..ab9cb33a1785 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php @@ -0,0 +1,278 @@ + deleteAsync(SqlBackupRunsDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlBackupRunsGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlBackupRunsInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlBackupRunsListRequest $request, array $optionalArgs = []) + */ +final class SqlBackupRunsServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlBackupRunsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_backup_runs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes the backup taken by a backup run. + * + * The async variant is {@see SqlBackupRunsServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/delete.php + * + * @param SqlBackupRunsDeleteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 delete(SqlBackupRunsDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a backup run. + * + * The async variant is {@see SqlBackupRunsServiceClient::getAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/get.php + * + * @param SqlBackupRunsGetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupRun + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlBackupRunsGetRequest $request, array $callOptions = []): BackupRun + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates a new backup run on demand. + * + * The async variant is {@see SqlBackupRunsServiceClient::insertAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/insert.php + * + * @param SqlBackupRunsInsertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 insert(SqlBackupRunsInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists all backup runs associated with the project or a given instance + * and configuration in the reverse chronological order of the backup + * initiation time. + * + * The async variant is {@see SqlBackupRunsServiceClient::listAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/list.php + * + * @param SqlBackupRunsListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupRunsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlBackupRunsListRequest $request, array $callOptions = []): BackupRunsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php new file mode 100644 index 000000000000..ad6ad4e31547 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php @@ -0,0 +1,223 @@ + generateEphemeralCertAsync(GenerateEphemeralCertRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectSettingsAsync(GetConnectSettingsRequest $request, array $optionalArgs = []) + */ +final class SqlConnectServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlConnectService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_connect_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_connect_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_connect_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_connect_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Generates a short-lived X509 certificate containing the provided public key + * and signed by a private key specific to the target instance. Users may use + * the certificate to authenticate as themselves when connecting to the + * database. + * + * The async variant is + * {@see SqlConnectServiceClient::generateEphemeralCertAsync()} . + * + * @example samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php + * + * @param GenerateEphemeralCertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateEphemeralCertResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateEphemeralCert(GenerateEphemeralCertRequest $request, array $callOptions = []): GenerateEphemeralCertResponse + { + return $this->startApiCall('GenerateEphemeralCert', $request, $callOptions)->wait(); + } + + /** + * Retrieves connect settings about a Cloud SQL instance. + * + * The async variant is {@see SqlConnectServiceClient::getConnectSettingsAsync()} . + * + * @example samples/V1/SqlConnectServiceClient/get_connect_settings.php + * + * @param GetConnectSettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConnectSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnectSettings(GetConnectSettingsRequest $request, array $callOptions = []): ConnectSettings + { + return $this->startApiCall('GetConnectSettings', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php new file mode 100644 index 000000000000..8c56e22a30e8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php @@ -0,0 +1,337 @@ + deleteAsync(SqlDatabasesDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlDatabasesGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlDatabasesInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlDatabasesListRequest $request, array $optionalArgs = []) + * @method PromiseInterface patchAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) + */ +final class SqlDatabasesServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlDatabasesService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_databases_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_databases_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_databases_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_databases_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes a database from a Cloud SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/delete.php + * + * @param SqlDatabasesDeleteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 delete(SqlDatabasesDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a database inside a Cloud + * SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::getAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/get.php + * + * @param SqlDatabasesGetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 get(SqlDatabasesGetRequest $request, array $callOptions = []): Database + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Inserts a resource containing information about a database inside a Cloud + * SQL instance. + * + * **Note:** You can't modify the default character set and collation. + * + * The async variant is {@see SqlDatabasesServiceClient::insertAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/insert.php + * + * @param SqlDatabasesInsertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 insert(SqlDatabasesInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists databases in the specified Cloud SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::listAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/list.php + * + * @param SqlDatabasesListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DatabasesListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlDatabasesListRequest $request, array $callOptions = []): DatabasesListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Partially updates a resource containing information about a database inside + * a Cloud SQL instance. This method supports patch semantics. + * + * The async variant is {@see SqlDatabasesServiceClient::patchAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/patch.php + * + * @param SqlDatabasesUpdateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 patch(SqlDatabasesUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Patch', $request, $callOptions)->wait(); + } + + /** + * Updates a resource containing information about a database inside a Cloud + * SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::updateAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/update.php + * + * @param SqlDatabasesUpdateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 update(SqlDatabasesUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php new file mode 100644 index 000000000000..8c66b8e93d57 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php @@ -0,0 +1,144 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_events_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_events_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_events_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_events_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php new file mode 100644 index 000000000000..0cc81d7d1d91 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php @@ -0,0 +1,190 @@ + listAsync(SqlFlagsListRequest $request, array $optionalArgs = []) + */ +final class SqlFlagsServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlFlagsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_flags_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_flags_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_flags_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_flags_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Lists all available database flags for Cloud SQL instances. + * + * The async variant is {@see SqlFlagsServiceClient::listAsync()} . + * + * @example samples/V1/SqlFlagsServiceClient/list.php + * + * @param SqlFlagsListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FlagsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlFlagsListRequest $request, array $callOptions = []): FlagsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php new file mode 100644 index 000000000000..c6372946e40a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php @@ -0,0 +1,143 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_iam_policies_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php new file mode 100644 index 000000000000..b14a6ad7fc16 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php @@ -0,0 +1,143 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_instance_names_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php new file mode 100644 index 000000000000..aecab9e45507 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php @@ -0,0 +1,1165 @@ + acquireSsrsLeaseAsync(SqlInstancesAcquireSsrsLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface addServerCaAsync(SqlInstancesAddServerCaRequest $request, array $optionalArgs = []) + * @method PromiseInterface cloneAsync(SqlInstancesCloneRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEphemeralAsync(SqlInstancesCreateEphemeralCertRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAsync(SqlInstancesDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface demoteAsync(SqlInstancesDemoteRequest $request, array $optionalArgs = []) + * @method PromiseInterface demoteMasterAsync(SqlInstancesDemoteMasterRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportAsync(SqlInstancesExportRequest $request, array $optionalArgs = []) + * @method PromiseInterface failoverAsync(SqlInstancesFailoverRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlInstancesGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDiskShrinkConfigAsync(SqlInstancesGetDiskShrinkConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLatestRecoveryTimeAsync(SqlInstancesGetLatestRecoveryTimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAsync(SqlInstancesImportRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlInstancesInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlInstancesListRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServerCasAsync(SqlInstancesListServerCasRequest $request, array $optionalArgs = []) + * @method PromiseInterface patchAsync(SqlInstancesPatchRequest $request, array $optionalArgs = []) + * @method PromiseInterface performDiskShrinkAsync(SqlInstancesPerformDiskShrinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface promoteReplicaAsync(SqlInstancesPromoteReplicaRequest $request, array $optionalArgs = []) + * @method PromiseInterface reencryptAsync(SqlInstancesReencryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface releaseSsrsLeaseAsync(SqlInstancesReleaseSsrsLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface rescheduleMaintenanceAsync(SqlInstancesRescheduleMaintenanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetReplicaSizeAsync(SqlInstancesResetReplicaSizeRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetSslConfigAsync(SqlInstancesResetSslConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface restartAsync(SqlInstancesRestartRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreBackupAsync(SqlInstancesRestoreBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface rotateServerCaAsync(SqlInstancesRotateServerCaRequest $request, array $optionalArgs = []) + * @method PromiseInterface startExternalSyncAsync(SqlInstancesStartExternalSyncRequest $request, array $optionalArgs = []) + * @method PromiseInterface startReplicaAsync(SqlInstancesStartReplicaRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopReplicaAsync(SqlInstancesStopReplicaRequest $request, array $optionalArgs = []) + * @method PromiseInterface switchoverAsync(SqlInstancesSwitchoverRequest $request, array $optionalArgs = []) + * @method PromiseInterface truncateLogAsync(SqlInstancesTruncateLogRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAsync(SqlInstancesUpdateRequest $request, array $optionalArgs = []) + * @method PromiseInterface verifyExternalSyncSettingsAsync(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $optionalArgs = []) + */ +final class SqlInstancesServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlInstancesService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_instances_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instances_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instances_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_instances_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * The async variant is {@see SqlInstancesServiceClient::acquireSsrsLeaseAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php + * + * @param SqlInstancesAcquireSsrsLeaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesAcquireSsrsLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function acquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesAcquireSsrsLeaseResponse + { + return $this->startApiCall('AcquireSsrsLease', $request, $callOptions)->wait(); + } + + /** + * Adds a new trusted Certificate Authority (CA) version for the specified + * instance. Required to prepare for a certificate rotation. If a CA version + * was previously added but never used in a certificate rotation, this + * operation replaces that version. There cannot be more than one CA version + * waiting to be rotated in. For instances that have enabled Certificate + * Authority Service (CAS) based server CA, please use AddServerCertificate to + * add a new server certificate. + * + * The async variant is {@see SqlInstancesServiceClient::addServerCaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/add_server_ca.php + * + * @param SqlInstancesAddServerCaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 addServerCa(SqlInstancesAddServerCaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('AddServerCa', $request, $callOptions)->wait(); + } + + /** + * Creates a Cloud SQL instance as a clone of the source instance. Using this + * operation might cause your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::cloneAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/clone.php + * + * @param SqlInstancesCloneRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 clone(SqlInstancesCloneRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Clone', $request, $callOptions)->wait(); + } + + /** + * Generates a short-lived X509 certificate containing the provided public key + * and signed by a private key specific to the target instance. Users may use + * the certificate to authenticate as themselves when connecting to the + * database. + * + * The async variant is {@see SqlInstancesServiceClient::createEphemeralAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/create_ephemeral.php + * + * @param SqlInstancesCreateEphemeralCertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SslCert + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEphemeral(SqlInstancesCreateEphemeralCertRequest $request, array $callOptions = []): SslCert + { + return $this->startApiCall('CreateEphemeral', $request, $callOptions)->wait(); + } + + /** + * Deletes a Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/delete.php + * + * @param SqlInstancesDeleteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 delete(SqlInstancesDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Demotes an existing standalone instance to be a Cloud SQL read replica + * for an external database server. + * + * The async variant is {@see SqlInstancesServiceClient::demoteAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/demote.php + * + * @param SqlInstancesDemoteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 demote(SqlInstancesDemoteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Demote', $request, $callOptions)->wait(); + } + + /** + * Demotes the stand-alone instance to be a Cloud SQL read replica for an + * external database server. + * + * The async variant is {@see SqlInstancesServiceClient::demoteMasterAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/demote_master.php + * + * @param SqlInstancesDemoteMasterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 demoteMaster(SqlInstancesDemoteMasterRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('DemoteMaster', $request, $callOptions)->wait(); + } + + /** + * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL + * dump or CSV file. + * + * The async variant is {@see SqlInstancesServiceClient::exportAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/export.php + * + * @param SqlInstancesExportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 export(SqlInstancesExportRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Export', $request, $callOptions)->wait(); + } + + /** + * Initiates a manual failover of a high availability (HA) primary instance + * to a standby instance, which becomes the primary instance. Users are + * then rerouted to the new primary. For more information, see the + * [Overview of high + * availability](https://cloud.google.com/sql/docs/mysql/high-availability) + * page in the Cloud SQL documentation. + * If using Legacy HA (MySQL only), this causes the instance to failover to + * its failover replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::failoverAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/failover.php + * + * @param SqlInstancesFailoverRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 failover(SqlInstancesFailoverRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Failover', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::getAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/get.php + * + * @param SqlInstancesGetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DatabaseInstance + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlInstancesGetRequest $request, array $callOptions = []): DatabaseInstance + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Get Disk Shrink Config for a given instance. + * + * The async variant is + * {@see SqlInstancesServiceClient::getDiskShrinkConfigAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php + * + * @param SqlInstancesGetDiskShrinkConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesGetDiskShrinkConfigResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDiskShrinkConfig(SqlInstancesGetDiskShrinkConfigRequest $request, array $callOptions = []): SqlInstancesGetDiskShrinkConfigResponse + { + return $this->startApiCall('GetDiskShrinkConfig', $request, $callOptions)->wait(); + } + + /** + * Get Latest Recovery Time for a given instance. + * + * The async variant is + * {@see SqlInstancesServiceClient::getLatestRecoveryTimeAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php + * + * @param SqlInstancesGetLatestRecoveryTimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesGetLatestRecoveryTimeResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLatestRecoveryTime(SqlInstancesGetLatestRecoveryTimeRequest $request, array $callOptions = []): SqlInstancesGetLatestRecoveryTimeResponse + { + return $this->startApiCall('GetLatestRecoveryTime', $request, $callOptions)->wait(); + } + + /** + * Imports data into a Cloud SQL instance from a SQL dump or CSV file in + * Cloud Storage. + * + * The async variant is {@see SqlInstancesServiceClient::importAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/import.php + * + * @param SqlInstancesImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 import(SqlInstancesImportRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Import', $request, $callOptions)->wait(); + } + + /** + * Creates a new Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::insertAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/insert.php + * + * @param SqlInstancesInsertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 insert(SqlInstancesInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists instances under a given project. + * + * The async variant is {@see SqlInstancesServiceClient::listAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/list.php + * + * @param SqlInstancesListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InstancesListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlInstancesListRequest $request, array $callOptions = []): InstancesListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Lists all of the trusted Certificate Authorities (CAs) for the specified + * instance. There can be up to three CAs listed: the CA that was used to sign + * the certificate that is currently in use, a CA that has been added but not + * yet used to sign a certificate, and a CA used to sign a certificate that + * has previously rotated out. + * + * The async variant is {@see SqlInstancesServiceClient::listServerCasAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/list_server_cas.php + * + * @param SqlInstancesListServerCasRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InstancesListServerCasResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServerCas(SqlInstancesListServerCasRequest $request, array $callOptions = []): InstancesListServerCasResponse + { + return $this->startApiCall('ListServerCas', $request, $callOptions)->wait(); + } + + /** + * Partially updates settings of a Cloud SQL instance by merging the request + * with the current configuration. This method supports patch semantics. + * + * The async variant is {@see SqlInstancesServiceClient::patchAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/patch.php + * + * @param SqlInstancesPatchRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 patch(SqlInstancesPatchRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Patch', $request, $callOptions)->wait(); + } + + /** + * Perform Disk Shrink on primary instance. + * + * The async variant is {@see SqlInstancesServiceClient::performDiskShrinkAsync()} + * . + * + * @example samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php + * + * @param SqlInstancesPerformDiskShrinkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 performDiskShrink(SqlInstancesPerformDiskShrinkRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('PerformDiskShrink', $request, $callOptions)->wait(); + } + + /** + * Promotes the read replica instance to be an independent Cloud SQL + * primary instance. + * Using this operation might cause your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::promoteReplicaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/promote_replica.php + * + * @param SqlInstancesPromoteReplicaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 promoteReplica(SqlInstancesPromoteReplicaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('PromoteReplica', $request, $callOptions)->wait(); + } + + /** + * Reencrypt CMEK instance with latest key version. + * + * The async variant is {@see SqlInstancesServiceClient::reencryptAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reencrypt.php + * + * @param SqlInstancesReencryptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 reencrypt(SqlInstancesReencryptRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Reencrypt', $request, $callOptions)->wait(); + } + + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * The async variant is {@see SqlInstancesServiceClient::releaseSsrsLeaseAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php + * + * @param SqlInstancesReleaseSsrsLeaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesReleaseSsrsLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function releaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesReleaseSsrsLeaseResponse + { + return $this->startApiCall('ReleaseSsrsLease', $request, $callOptions)->wait(); + } + + /** + * Reschedules the maintenance on the given instance. + * + * The async variant is + * {@see SqlInstancesServiceClient::rescheduleMaintenanceAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php + * + * @param SqlInstancesRescheduleMaintenanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 rescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); + } + + /** + * Reset Replica Size to primary instance disk size. + * + * The async variant is {@see SqlInstancesServiceClient::resetReplicaSizeAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reset_replica_size.php + * + * @param SqlInstancesResetReplicaSizeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resetReplicaSize(SqlInstancesResetReplicaSizeRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('ResetReplicaSize', $request, $callOptions)->wait(); + } + + /** + * Deletes all client certificates and generates a new server SSL certificate + * for the instance. + * + * The async variant is {@see SqlInstancesServiceClient::resetSslConfigAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reset_ssl_config.php + * + * @param SqlInstancesResetSslConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resetSslConfig(SqlInstancesResetSslConfigRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('ResetSslConfig', $request, $callOptions)->wait(); + } + + /** + * Restarts a Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::restartAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/restart.php + * + * @param SqlInstancesRestartRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 restart(SqlInstancesRestartRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Restart', $request, $callOptions)->wait(); + } + + /** + * Restores a backup of a Cloud SQL instance. Using this operation might cause + * your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::restoreBackupAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/restore_backup.php + * + * @param SqlInstancesRestoreBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 restoreBackup(SqlInstancesRestoreBackupRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('RestoreBackup', $request, $callOptions)->wait(); + } + + /** + * Rotates the server certificate to one signed by the Certificate Authority + * (CA) version previously added with the addServerCA method. For instances + * that have enabled Certificate Authority Service (CAS) based server CA, + * please use RotateServerCertificate to rotate the server certificate. + * + * The async variant is {@see SqlInstancesServiceClient::rotateServerCaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/rotate_server_ca.php + * + * @param SqlInstancesRotateServerCaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 rotateServerCa(SqlInstancesRotateServerCaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('RotateServerCa', $request, $callOptions)->wait(); + } + + /** + * Start External primary instance migration. + * + * The async variant is {@see SqlInstancesServiceClient::startExternalSyncAsync()} + * . + * + * @example samples/V1/SqlInstancesServiceClient/start_external_sync.php + * + * @param SqlInstancesStartExternalSyncRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 startExternalSync(SqlInstancesStartExternalSyncRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('StartExternalSync', $request, $callOptions)->wait(); + } + + /** + * Starts the replication in the read replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::startReplicaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/start_replica.php + * + * @param SqlInstancesStartReplicaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 startReplica(SqlInstancesStartReplicaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('StartReplica', $request, $callOptions)->wait(); + } + + /** + * Stops the replication in the read replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::stopReplicaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/stop_replica.php + * + * @param SqlInstancesStopReplicaRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 stopReplica(SqlInstancesStopReplicaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('StopReplica', $request, $callOptions)->wait(); + } + + /** + * Switches over from the primary instance to the designated DR replica + * instance. + * + * The async variant is {@see SqlInstancesServiceClient::switchoverAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/switchover.php + * + * @param SqlInstancesSwitchoverRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 switchover(SqlInstancesSwitchoverRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Switchover', $request, $callOptions)->wait(); + } + + /** + * Truncate MySQL general and slow query log tables + * MySQL only. + * + * The async variant is {@see SqlInstancesServiceClient::truncateLogAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/truncate_log.php + * + * @param SqlInstancesTruncateLogRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 truncateLog(SqlInstancesTruncateLogRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('TruncateLog', $request, $callOptions)->wait(); + } + + /** + * Updates settings of a Cloud SQL instance. Using this operation might cause + * your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::updateAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/update.php + * + * @param SqlInstancesUpdateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 update(SqlInstancesUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } + + /** + * Verify External primary instance external sync settings. + * + * The async variant is + * {@see SqlInstancesServiceClient::verifyExternalSyncSettingsAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php + * + * @param SqlInstancesVerifyExternalSyncSettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesVerifyExternalSyncSettingsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function verifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $callOptions = []): SqlInstancesVerifyExternalSyncSettingsResponse + { + return $this->startApiCall('VerifyExternalSyncSettings', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php new file mode 100644 index 000000000000..cbe526e53a0c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php @@ -0,0 +1,246 @@ + cancelAsync(SqlOperationsCancelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlOperationsGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlOperationsListRequest $request, array $optionalArgs = []) + */ +final class SqlOperationsServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlOperationsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_operations_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_operations_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_operations_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_operations_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Cancels an instance operation that has been performed on an instance. + * + * The async variant is {@see SqlOperationsServiceClient::cancelAsync()} . + * + * @example samples/V1/SqlOperationsServiceClient/cancel.php + * + * @param SqlOperationsCancelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 cancel(SqlOperationsCancelRequest $request, array $callOptions = []): void + { + $this->startApiCall('Cancel', $request, $callOptions)->wait(); + } + + /** + * Retrieves an instance operation that has been performed on an instance. + * + * The async variant is {@see SqlOperationsServiceClient::getAsync()} . + * + * @example samples/V1/SqlOperationsServiceClient/get.php + * + * @param SqlOperationsGetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 get(SqlOperationsGetRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Lists all instance operations that have been performed on the given Cloud + * SQL instance in the reverse chronological order of the start time. + * + * The async variant is {@see SqlOperationsServiceClient::listAsync()} . + * + * @example samples/V1/SqlOperationsServiceClient/list.php + * + * @param SqlOperationsListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlOperationsListRequest $request, array $callOptions = []): OperationsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php new file mode 100644 index 000000000000..242dbb55bbc9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php @@ -0,0 +1,144 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_regions_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_regions_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_regions_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_regions_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php new file mode 100644 index 000000000000..4068aa262cae --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php @@ -0,0 +1,282 @@ + deleteAsync(SqlSslCertsDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlSslCertsGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlSslCertsInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlSslCertsListRequest $request, array $optionalArgs = []) + */ +final class SqlSslCertsServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlSslCertsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_ssl_certs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes the SSL certificate. For First Generation instances, the + * certificate remains valid until the instance is restarted. + * + * The async variant is {@see SqlSslCertsServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/delete.php + * + * @param SqlSslCertsDeleteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 delete(SqlSslCertsDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a particular SSL certificate. Does not include the private key + * (required for usage). The private key must be saved from the response to + * initial creation. + * + * The async variant is {@see SqlSslCertsServiceClient::getAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/get.php + * + * @param SqlSslCertsGetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SslCert + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlSslCertsGetRequest $request, array $callOptions = []): SslCert + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates an SSL certificate and returns it along with the private key and + * server certificate authority. The new certificate will not be usable until + * the instance is restarted. + * + * The async variant is {@see SqlSslCertsServiceClient::insertAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/insert.php + * + * @param SqlSslCertsInsertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SslCertsInsertResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(SqlSslCertsInsertRequest $request, array $callOptions = []): SslCertsInsertResponse + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists all of the current SSL certificates for the instance. + * + * The async variant is {@see SqlSslCertsServiceClient::listAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/list.php + * + * @param SqlSslCertsListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SslCertsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlSslCertsListRequest $request, array $callOptions = []): SslCertsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php new file mode 100644 index 000000000000..20912c5f9e76 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php @@ -0,0 +1,192 @@ + listAsync(SqlTiersListRequest $request, array $optionalArgs = []) + */ +final class SqlTiersServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlTiersService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_tiers_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_tiers_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_tiers_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_tiers_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Lists all available machine types (tiers) for Cloud SQL, for example, + * `db-custom-1-3840`. For more information, see + * https://cloud.google.com/sql/pricing. + * + * The async variant is {@see SqlTiersServiceClient::listAsync()} . + * + * @example samples/V1/SqlTiersServiceClient/list.php + * + * @param SqlTiersListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TiersListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlTiersListRequest $request, array $callOptions = []): TiersListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php new file mode 100644 index 000000000000..2374a4d2b7dc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php @@ -0,0 +1,304 @@ + deleteAsync(SqlUsersDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlUsersGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlUsersInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlUsersListRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAsync(SqlUsersUpdateRequest $request, array $optionalArgs = []) + */ +final class SqlUsersServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.sql.v1.SqlUsersService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_users_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_users_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_users_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_users_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes a user from a Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/delete.php + * + * @param SqlUsersDeleteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 delete(SqlUsersDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a user. + * + * The async variant is {@see SqlUsersServiceClient::getAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/get.php + * + * @param SqlUsersGetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return User + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlUsersGetRequest $request, array $callOptions = []): User + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates a new user in a Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::insertAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/insert.php + * + * @param SqlUsersInsertRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 insert(SqlUsersInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists users in the specified Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::listAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/list.php + * + * @param SqlUsersListRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UsersListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlUsersListRequest $request, array $callOptions = []): UsersListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Updates an existing user in a Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::updateAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/update.php + * + * @param SqlUsersUpdateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 update(SqlUsersUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..a32b84c89910 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json @@ -0,0 +1,425 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.sql.v1", + "libraryPackage": "Google\\Cloud\\Sql\\V1", + "services": { + "SqlAvailableDatabaseVersionsService": { + "clients": { + "grpc": { + "libraryClient": "SqlAvailableDatabaseVersionsServiceGapicClient" + } + } + }, + "SqlBackupRunsService": { + "clients": { + "grpc": { + "libraryClient": "SqlBackupRunsServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlConnectService": { + "clients": { + "grpc": { + "libraryClient": "SqlConnectServiceGapicClient", + "rpcs": { + "GenerateEphemeralCert": { + "methods": [ + "generateEphemeralCert" + ] + }, + "GetConnectSettings": { + "methods": [ + "getConnectSettings" + ] + } + } + } + } + }, + "SqlDatabasesService": { + "clients": { + "grpc": { + "libraryClient": "SqlDatabasesServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + }, + "SqlEventsService": { + "clients": { + "grpc": { + "libraryClient": "SqlEventsServiceGapicClient" + } + } + }, + "SqlFlagsService": { + "clients": { + "grpc": { + "libraryClient": "SqlFlagsServiceGapicClient", + "rpcs": { + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlIamPoliciesService": { + "clients": { + "grpc": { + "libraryClient": "SqlIamPoliciesServiceGapicClient" + } + } + }, + "SqlInstanceNamesService": { + "clients": { + "grpc": { + "libraryClient": "SqlInstanceNamesServiceGapicClient" + } + } + }, + "SqlInstancesService": { + "clients": { + "grpc": { + "libraryClient": "SqlInstancesServiceGapicClient", + "rpcs": { + "AcquireSsrsLease": { + "methods": [ + "acquireSsrsLease" + ] + }, + "AddServerCa": { + "methods": [ + "addServerCa" + ] + }, + "Clone": { + "methods": [ + "clone" + ] + }, + "CreateEphemeral": { + "methods": [ + "createEphemeral" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Demote": { + "methods": [ + "demote" + ] + }, + "DemoteMaster": { + "methods": [ + "demoteMaster" + ] + }, + "Export": { + "methods": [ + "export" + ] + }, + "Failover": { + "methods": [ + "failover" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "GetDiskShrinkConfig": { + "methods": [ + "getDiskShrinkConfig" + ] + }, + "GetLatestRecoveryTime": { + "methods": [ + "getLatestRecoveryTime" + ] + }, + "Import": { + "methods": [ + "import" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "ListServerCas": { + "methods": [ + "listServerCas" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "PerformDiskShrink": { + "methods": [ + "performDiskShrink" + ] + }, + "PromoteReplica": { + "methods": [ + "promoteReplica" + ] + }, + "Reencrypt": { + "methods": [ + "reencrypt" + ] + }, + "ReleaseSsrsLease": { + "methods": [ + "releaseSsrsLease" + ] + }, + "RescheduleMaintenance": { + "methods": [ + "rescheduleMaintenance" + ] + }, + "ResetReplicaSize": { + "methods": [ + "resetReplicaSize" + ] + }, + "ResetSslConfig": { + "methods": [ + "resetSslConfig" + ] + }, + "Restart": { + "methods": [ + "restart" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "RotateServerCa": { + "methods": [ + "rotateServerCa" + ] + }, + "StartExternalSync": { + "methods": [ + "startExternalSync" + ] + }, + "StartReplica": { + "methods": [ + "startReplica" + ] + }, + "StopReplica": { + "methods": [ + "stopReplica" + ] + }, + "Switchover": { + "methods": [ + "switchover" + ] + }, + "TruncateLog": { + "methods": [ + "truncateLog" + ] + }, + "Update": { + "methods": [ + "update" + ] + }, + "VerifyExternalSyncSettings": { + "methods": [ + "verifyExternalSyncSettings" + ] + } + } + } + } + }, + "SqlOperationsService": { + "clients": { + "grpc": { + "libraryClient": "SqlOperationsServiceGapicClient", + "rpcs": { + "Cancel": { + "methods": [ + "cancel" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlRegionsService": { + "clients": { + "grpc": { + "libraryClient": "SqlRegionsServiceGapicClient" + } + } + }, + "SqlSslCertsService": { + "clients": { + "grpc": { + "libraryClient": "SqlSslCertsServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlTiersService": { + "clients": { + "grpc": { + "libraryClient": "SqlTiersServiceGapicClient", + "rpcs": { + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlUsersService": { + "clients": { + "grpc": { + "libraryClient": "SqlUsersServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json new file mode 100644 index 000000000000..67533dc18e0f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlAvailableDatabaseVersionsService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php new file mode 100644 index 000000000000..356e7981b252 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlAvailableDatabaseVersionsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json new file mode 100644 index 000000000000..b69646a9f35d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlBackupRunsService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php new file mode 100644 index 000000000000..afda4d34224e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php @@ -0,0 +1,112 @@ + [ + 'google.cloud.sql.v1.SqlBackupRunsService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'id', + 'fieldAccessors' => [ + 'getId', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\BackupRun', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'id', + 'fieldAccessors' => [ + 'getId', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\BackupRunsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php new file mode 100644 index 000000000000..88a3920f7733 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php @@ -0,0 +1,104 @@ + [ + 'google.cloud.sql.v1.SqlBackupRunsService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns/{id}', + 'placeholders' => [ + 'id' => [ + 'getters' => [ + 'getId', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns/{id}', + 'placeholders' => [ + 'id' => [ + 'getters' => [ + 'getId', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json new file mode 100644 index 000000000000..4c1986cfb3a9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlConnectService": { + "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": { + "GenerateEphemeralCert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetConnectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php new file mode 100644 index 000000000000..24ec469afcb7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.cloud.sql.v1.SqlConnectService' => [ + 'GenerateEphemeralCert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\GenerateEphemeralCertResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'GetConnectSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\ConnectSettings', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php new file mode 100644 index 000000000000..b68bacc8b395 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php @@ -0,0 +1,62 @@ + [ + 'google.cloud.sql.v1.SqlConnectService' => [ + 'GenerateEphemeralCert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}:generateEphemeralCert', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetConnectSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/connectSettings', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json new file mode 100644 index 000000000000..6542ee505199 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlDatabasesService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Patch": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php new file mode 100644 index 000000000000..5484e5243370 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php @@ -0,0 +1,160 @@ + [ + 'google.cloud.sql.v1.SqlDatabasesService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Database', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\DatabasesListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Patch' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Update' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php new file mode 100644 index 000000000000..92ed62735309 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.sql.v1.SqlDatabasesService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'body' => 'body', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'body' => 'body', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json new file mode 100644 index 000000000000..cb52d4e16a1f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlEventsService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php new file mode 100644 index 000000000000..55d525ef6df8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlEventsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json new file mode 100644 index 000000000000..ae3b5f2ee3d0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlFlagsService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php new file mode 100644 index 000000000000..34f76073b652 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php @@ -0,0 +1,32 @@ + [ + 'google.cloud.sql.v1.SqlFlagsService' => [ + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\FlagsListResponse', + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php new file mode 100644 index 000000000000..caa3c0daf149 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php @@ -0,0 +1,33 @@ + [ + 'google.cloud.sql.v1.SqlFlagsService' => [ + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/flags', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json new file mode 100644 index 000000000000..c14bc6174db0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlIamPoliciesService": { + "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": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php new file mode 100644 index 000000000000..45c8076dd07f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlIamPoliciesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json new file mode 100644 index 000000000000..a6173faa203a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlInstanceNamesService": { + "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": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php new file mode 100644 index 000000000000..0c94603c1c35 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlInstanceNamesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json new file mode 100644 index 000000000000..acab843eb19f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json @@ -0,0 +1,202 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlInstancesService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AcquireSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "AddServerCa": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Clone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateEphemeral": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Demote": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DemoteMaster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Export": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Failover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDiskShrinkConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLatestRecoveryTime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Import": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListServerCas": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Patch": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PerformDiskShrink": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PromoteReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Reencrypt": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReleaseSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RescheduleMaintenance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetReplicaSize": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetSslConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Restart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RotateServerCa": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartExternalSync": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Switchover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TruncateLog": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "VerifyExternalSyncSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php new file mode 100644 index 000000000000..8a91a4186997 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php @@ -0,0 +1,628 @@ + [ + 'google.cloud.sql.v1.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'AddServerCa' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Clone' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'CreateEphemeral' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCert', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Demote' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'DemoteMaster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Export' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Failover' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\DatabaseInstance', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'GetDiskShrinkConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesGetDiskShrinkConfigResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'GetLatestRecoveryTime' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesGetLatestRecoveryTimeResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Import' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\InstancesListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'ListServerCas' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\InstancesListServerCasResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Patch' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'PerformDiskShrink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'PromoteReplica' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Reencrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'ReleaseSsrsLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'ResetReplicaSize' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'ResetSslConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Restart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'RestoreBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'RotateServerCa' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'StartExternalSync' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'StartReplica' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'StopReplica' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Switchover' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'TruncateLog' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Update' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'VerifyExternalSyncSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php new file mode 100644 index 000000000000..29c60fc1eb5c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php @@ -0,0 +1,583 @@ + [ + 'google.cloud.sql.v1.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/acquireSsrsLease', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'AddServerCa' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/addServerCa', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Clone' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/clone', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'CreateEphemeral' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/createEphemeral', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Demote' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/demote', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'DemoteMaster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/demoteMaster', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Export' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/export', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Failover' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/failover', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetDiskShrinkConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/getDiskShrinkConfig', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetLatestRecoveryTime' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/getLatestRecoveryTime', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Import' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/import', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances', + 'body' => 'body', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ListServerCas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/listServerCas', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'PerformDiskShrink' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/performDiskShrink', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'PromoteReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/promoteReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Reencrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/reencrypt', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ReleaseSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/releaseSsrsLease', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rescheduleMaintenance', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ResetReplicaSize' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/resetReplicaSize', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ResetSslConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/resetSslConfig', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Restart' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/restart', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RestoreBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/restoreBackup', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RotateServerCa' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rotateServerCa', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StartExternalSync' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/startExternalSync', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StartReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/startReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StopReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/stopReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Switchover' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/switchover', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'TruncateLog' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/truncateLog', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'VerifyExternalSyncSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json new file mode 100644 index 000000000000..5ce164fb9ef6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json @@ -0,0 +1,47 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlOperationsService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Cancel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php new file mode 100644 index 000000000000..c10561a60717 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.sql.v1.SqlOperationsService' => [ + 'Cancel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'operation', + 'fieldAccessors' => [ + 'getOperation', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'operation', + 'fieldAccessors' => [ + 'getOperation', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\OperationsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php new file mode 100644 index 000000000000..1f90139216f3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php @@ -0,0 +1,72 @@ + [ + 'google.cloud.sql.v1.SqlOperationsService' => [ + 'Cancel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/operations/{operation}/cancel', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json new file mode 100644 index 000000000000..174e56eb3b97 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlRegionsService": { + "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": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php new file mode 100644 index 000000000000..d3311811274a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlRegionsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json new file mode 100644 index 000000000000..46ceaef63718 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlSslCertsService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php new file mode 100644 index 000000000000..2fd9e63e4e12 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php @@ -0,0 +1,112 @@ + [ + 'google.cloud.sql.v1.SqlSslCertsService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'sha1_fingerprint', + 'fieldAccessors' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCert', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'sha1_fingerprint', + 'fieldAccessors' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCertsInsertResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCertsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php new file mode 100644 index 000000000000..293461e0404a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php @@ -0,0 +1,104 @@ + [ + 'google.cloud.sql.v1.SqlSslCertsService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'sha1_fingerprint' => [ + 'getters' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'sha1_fingerprint' => [ + 'getters' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json new file mode 100644 index 000000000000..5cb74b67df4b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlTiersService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php new file mode 100644 index 000000000000..0b40da39b6bc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.sql.v1.SqlTiersService' => [ + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\TiersListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php new file mode 100644 index 000000000000..e983b43d09d9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.sql.v1.SqlTiersService' => [ + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/tiers', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json new file mode 100644 index 000000000000..b9b8a36e8ce7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlUsersService": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php new file mode 100644 index 000000000000..d998757a81db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php @@ -0,0 +1,124 @@ + [ + 'google.cloud.sql.v1.SqlUsersService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\User', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\UsersListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Update' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php new file mode 100644 index 000000000000..1ce8c4a32f35 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php @@ -0,0 +1,116 @@ + [ + 'google.cloud.sql.v1.SqlUsersService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users/{name}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php new file mode 100644 index 000000000000..9715a06bdc6d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlAvailableDatabaseVersionsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlAvailableDatabaseVersionsServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php new file mode 100644 index 000000000000..a111d09df748 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php @@ -0,0 +1,367 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlBackupRunsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlBackupRunsServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlBackupRunsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlBackupRunsDeleteRequest(); + try { + $gapicClient->delete($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $id2 = 3227150; + $description = 'description-1724546052'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $location = 'location1901043637'; + $timeZone = 'timeZone36848094'; + $maxChargeableBytes = 1424371595; + $expectedResponse = new BackupRun(); + $expectedResponse->setKind($kind); + $expectedResponse->setId($id2); + $expectedResponse->setDescription($description); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setLocation($location); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setMaxChargeableBytes($maxChargeableBytes); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlBackupRunsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlBackupRunsGetRequest(); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlBackupRunsService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlBackupRunsInsertRequest(); + try { + $gapicClient->insert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new BackupRunsListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlBackupRunsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlBackupRunsListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsDeleteRequest(); + $response = $gapicClient->deleteAsync($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.sql.v1.SqlBackupRunsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php new file mode 100644 index 000000000000..7463ad765f89 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php @@ -0,0 +1,202 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlConnectServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlConnectServiceClient($options); + } + + /** @test */ + public function generateEphemeralCertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateEphemeralCertResponse(); + $transport->addResponse($expectedResponse); + $request = new GenerateEphemeralCertRequest(); + $response = $gapicClient->generateEphemeralCert($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.sql.v1.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateEphemeralCertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 GenerateEphemeralCertRequest(); + try { + $gapicClient->generateEphemeralCert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $region = 'region-934795532'; + $pscEnabled = true; + $dnsName = 'dnsName411992033'; + $expectedResponse = new ConnectSettings(); + $expectedResponse->setKind($kind); + $expectedResponse->setRegion($region); + $expectedResponse->setPscEnabled($pscEnabled); + $expectedResponse->setDnsName($dnsName); + $transport->addResponse($expectedResponse); + $request = new GetConnectSettingsRequest(); + $response = $gapicClient->getConnectSettings($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.sql.v1.SqlConnectService/GetConnectSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 GetConnectSettingsRequest(); + try { + $gapicClient->getConnectSettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateEphemeralCertAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateEphemeralCertResponse(); + $transport->addResponse($expectedResponse); + $request = new GenerateEphemeralCertRequest(); + $response = $gapicClient->generateEphemeralCertAsync($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.sql.v1.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php new file mode 100644 index 000000000000..217b77521648 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php @@ -0,0 +1,502 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlDatabasesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlDatabasesServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlDatabasesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlDatabasesDeleteRequest(); + try { + $gapicClient->delete($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $charset = 'charset739074380'; + $collation = 'collation1880293257'; + $etag = 'etag3123477'; + $name = 'name3373707'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $project2 = 'project2-894831476'; + $expectedResponse = new Database(); + $expectedResponse->setKind($kind); + $expectedResponse->setCharset($charset); + $expectedResponse->setCollation($collation); + $expectedResponse->setEtag($etag); + $expectedResponse->setName($name); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setProject($project2); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlDatabasesService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlDatabasesGetRequest(); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlDatabasesService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlDatabasesInsertRequest(); + try { + $gapicClient->insert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new DatabasesListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlDatabasesService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlDatabasesListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesUpdateRequest(); + $response = $gapicClient->patch($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.sql.v1.SqlDatabasesService/Patch', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlDatabasesUpdateRequest(); + try { + $gapicClient->patch($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesUpdateRequest(); + $response = $gapicClient->update($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.sql.v1.SqlDatabasesService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlDatabasesUpdateRequest(); + try { + $gapicClient->update($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesDeleteRequest(); + $response = $gapicClient->deleteAsync($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.sql.v1.SqlDatabasesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php new file mode 100644 index 000000000000..25ef5a2c273c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlEventsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlEventsServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php new file mode 100644 index 000000000000..3a540339561b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php @@ -0,0 +1,142 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlFlagsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlFlagsServiceClient($options); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new FlagsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlFlagsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlFlagsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlFlagsListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new FlagsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlFlagsListRequest(); + $response = $gapicClient->listAsync($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.sql.v1.SqlFlagsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php new file mode 100644 index 000000000000..ecde531e3f3e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlIamPoliciesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlIamPoliciesServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php new file mode 100644 index 000000000000..64aed46c7dc5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlInstanceNamesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlInstanceNamesServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php new file mode 100644 index 000000000000..09956e8eeb12 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php @@ -0,0 +1,2466 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlInstancesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlInstancesServiceClient($options); + } + + /** @test */ + public function acquireSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->acquireSsrsLease($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.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireSsrsLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + try { + $gapicClient->acquireSsrsLease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addServerCaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesAddServerCaRequest(); + $response = $gapicClient->addServerCa($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.sql.v1.SqlInstancesService/AddServerCa', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addServerCaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesAddServerCaRequest(); + try { + $gapicClient->addServerCa($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cloneTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesCloneRequest(); + $response = $gapicClient->clone($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.sql.v1.SqlInstancesService/Clone', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cloneExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesCloneRequest(); + try { + $gapicClient->clone($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEphemeralTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $certSerialNumber = 'certSerialNumber-440611559'; + $cert = 'cert3050020'; + $commonName = 'commonName-1924955041'; + $sha1Fingerprint = 'sha1Fingerprint-1699692374'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new SslCert(); + $expectedResponse->setKind($kind); + $expectedResponse->setCertSerialNumber($certSerialNumber); + $expectedResponse->setCert($cert); + $expectedResponse->setCommonName($commonName); + $expectedResponse->setSha1Fingerprint($sha1Fingerprint); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesCreateEphemeralCertRequest(); + $response = $gapicClient->createEphemeral($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.sql.v1.SqlInstancesService/CreateEphemeral', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEphemeralExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesCreateEphemeralCertRequest(); + try { + $gapicClient->createEphemeral($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlInstancesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesDeleteRequest(); + try { + $gapicClient->delete($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesDemoteRequest(); + $bodyDemoteContext = new DemoteContext(); + $demoteContextSourceRepresentativeInstanceName = 'demoteContextSourceRepresentativeInstanceName1566063379'; + $bodyDemoteContext->setSourceRepresentativeInstanceName($demoteContextSourceRepresentativeInstanceName); + $body->setDemoteContext($bodyDemoteContext); + $request = (new SqlInstancesDemoteRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->demote($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.sql.v1.SqlInstancesService/Demote', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesDemoteRequest(); + $bodyDemoteContext = new DemoteContext(); + $demoteContextSourceRepresentativeInstanceName = 'demoteContextSourceRepresentativeInstanceName1566063379'; + $bodyDemoteContext->setSourceRepresentativeInstanceName($demoteContextSourceRepresentativeInstanceName); + $body->setDemoteContext($bodyDemoteContext); + $request = (new SqlInstancesDemoteRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + try { + $gapicClient->demote($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteMasterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesDemoteMasterRequest(); + $response = $gapicClient->demoteMaster($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.sql.v1.SqlInstancesService/DemoteMaster', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteMasterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesDemoteMasterRequest(); + try { + $gapicClient->demoteMaster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesExportRequest(); + $response = $gapicClient->export($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.sql.v1.SqlInstancesService/Export', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesExportRequest(); + try { + $gapicClient->export($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function failoverTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesFailoverRequest(); + $response = $gapicClient->failover($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.sql.v1.SqlInstancesService/Failover', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function failoverExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesFailoverRequest(); + try { + $gapicClient->failover($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $etag = 'etag3123477'; + $masterInstanceName = 'masterInstanceName-383886120'; + $project2 = 'project2-894831476'; + $ipv6Address = 'ipv6Address1952176540'; + $serviceAccountEmailAddress = 'serviceAccountEmailAddress303603125'; + $selfLink = 'selfLink-1691268851'; + $connectionName = 'connectionName731664204'; + $name = 'name3373707'; + $region = 'region-934795532'; + $gceZone = 'gceZone-227587294'; + $secondaryGceZone = 'secondaryGceZone826699149'; + $rootPassword = 'rootPassword448743768'; + $databaseInstalledVersion = 'databaseInstalledVersion-1701014705'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $pscServiceAttachmentLink = 'pscServiceAttachmentLink309057421'; + $dnsName = 'dnsName411992033'; + $primaryDnsName = 'primaryDnsName-1306966658'; + $writeEndpoint = 'writeEndpoint-1575656971'; + $expectedResponse = new DatabaseInstance(); + $expectedResponse->setKind($kind); + $expectedResponse->setEtag($etag); + $expectedResponse->setMasterInstanceName($masterInstanceName); + $expectedResponse->setProject($project2); + $expectedResponse->setIpv6Address($ipv6Address); + $expectedResponse->setServiceAccountEmailAddress($serviceAccountEmailAddress); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setConnectionName($connectionName); + $expectedResponse->setName($name); + $expectedResponse->setRegion($region); + $expectedResponse->setGceZone($gceZone); + $expectedResponse->setSecondaryGceZone($secondaryGceZone); + $expectedResponse->setRootPassword($rootPassword); + $expectedResponse->setDatabaseInstalledVersion($databaseInstalledVersion); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setPscServiceAttachmentLink($pscServiceAttachmentLink); + $expectedResponse->setDnsName($dnsName); + $expectedResponse->setPrimaryDnsName($primaryDnsName); + $expectedResponse->setWriteEndpoint($writeEndpoint); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlInstancesService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesGetRequest(); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDiskShrinkConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $minimalTargetSizeGb = 1076246647; + $message = 'message954925063'; + $expectedResponse = new SqlInstancesGetDiskShrinkConfigResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setMinimalTargetSizeGb($minimalTargetSizeGb); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesGetDiskShrinkConfigRequest(); + $response = $gapicClient->getDiskShrinkConfig($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.sql.v1.SqlInstancesService/GetDiskShrinkConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDiskShrinkConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesGetDiskShrinkConfigRequest(); + try { + $gapicClient->getDiskShrinkConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLatestRecoveryTimeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SqlInstancesGetLatestRecoveryTimeResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesGetLatestRecoveryTimeRequest(); + $response = $gapicClient->getLatestRecoveryTime($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.sql.v1.SqlInstancesService/GetLatestRecoveryTime', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLatestRecoveryTimeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesGetLatestRecoveryTimeRequest(); + try { + $gapicClient->getLatestRecoveryTime($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesImportRequest(); + $response = $gapicClient->import($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.sql.v1.SqlInstancesService/Import', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesImportRequest(); + try { + $gapicClient->import($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlInstancesService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesInsertRequest(); + try { + $gapicClient->insert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new InstancesListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlInstancesService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerCasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $activeVersion = 'activeVersion442490015'; + $kind = 'kind3292052'; + $expectedResponse = new InstancesListServerCasResponse(); + $expectedResponse->setActiveVersion($activeVersion); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesListServerCasRequest(); + $response = $gapicClient->listServerCas($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.sql.v1.SqlInstancesService/ListServerCas', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerCasExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesListServerCasRequest(); + try { + $gapicClient->listServerCas($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesPatchRequest(); + $response = $gapicClient->patch($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.sql.v1.SqlInstancesService/Patch', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesPatchRequest(); + try { + $gapicClient->patch($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function performDiskShrinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesPerformDiskShrinkRequest(); + $response = $gapicClient->performDiskShrink($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.sql.v1.SqlInstancesService/PerformDiskShrink', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function performDiskShrinkExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesPerformDiskShrinkRequest(); + try { + $gapicClient->performDiskShrink($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function promoteReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesPromoteReplicaRequest(); + $response = $gapicClient->promoteReplica($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.sql.v1.SqlInstancesService/PromoteReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function promoteReplicaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesPromoteReplicaRequest(); + try { + $gapicClient->promoteReplica($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reencryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesReencryptRequest(); + $response = $gapicClient->reencrypt($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.sql.v1.SqlInstancesService/Reencrypt', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reencryptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesReencryptRequest(); + try { + $gapicClient->reencrypt($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $request = (new SqlInstancesReleaseSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project); + $response = $gapicClient->releaseSsrsLease($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.sql.v1.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseSsrsLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $request = (new SqlInstancesReleaseSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project); + try { + $gapicClient->releaseSsrsLease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rescheduleMaintenanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRescheduleMaintenanceRequest(); + $response = $gapicClient->rescheduleMaintenance($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.sql.v1.SqlInstancesService/RescheduleMaintenance', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rescheduleMaintenanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesRescheduleMaintenanceRequest(); + try { + $gapicClient->rescheduleMaintenance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetReplicaSizeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesResetReplicaSizeRequest(); + $response = $gapicClient->resetReplicaSize($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.sql.v1.SqlInstancesService/ResetReplicaSize', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetReplicaSizeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesResetReplicaSizeRequest(); + try { + $gapicClient->resetReplicaSize($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetSslConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesResetSslConfigRequest(); + $response = $gapicClient->resetSslConfig($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.sql.v1.SqlInstancesService/ResetSslConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetSslConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesResetSslConfigRequest(); + try { + $gapicClient->resetSslConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRestartRequest(); + $response = $gapicClient->restart($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.sql.v1.SqlInstancesService/Restart', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restartExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesRestartRequest(); + try { + $gapicClient->restart($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRestoreBackupRequest(); + $response = $gapicClient->restoreBackup($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.sql.v1.SqlInstancesService/RestoreBackup', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesRestoreBackupRequest(); + try { + $gapicClient->restoreBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rotateServerCaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRotateServerCaRequest(); + $response = $gapicClient->rotateServerCa($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.sql.v1.SqlInstancesService/RotateServerCa', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rotateServerCaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesRotateServerCaRequest(); + try { + $gapicClient->rotateServerCa($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startExternalSyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesStartExternalSyncRequest(); + $response = $gapicClient->startExternalSync($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.sql.v1.SqlInstancesService/StartExternalSync', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startExternalSyncExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesStartExternalSyncRequest(); + try { + $gapicClient->startExternalSync($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesStartReplicaRequest(); + $response = $gapicClient->startReplica($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.sql.v1.SqlInstancesService/StartReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startReplicaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesStartReplicaRequest(); + try { + $gapicClient->startReplica($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesStopReplicaRequest(); + $response = $gapicClient->stopReplica($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.sql.v1.SqlInstancesService/StopReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopReplicaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesStopReplicaRequest(); + try { + $gapicClient->stopReplica($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function switchoverTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesSwitchoverRequest(); + $response = $gapicClient->switchover($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.sql.v1.SqlInstancesService/Switchover', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function switchoverExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesSwitchoverRequest(); + try { + $gapicClient->switchover($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function truncateLogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesTruncateLogRequest(); + $response = $gapicClient->truncateLog($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.sql.v1.SqlInstancesService/TruncateLog', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function truncateLogExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesTruncateLogRequest(); + try { + $gapicClient->truncateLog($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesUpdateRequest(); + $response = $gapicClient->update($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.sql.v1.SqlInstancesService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesUpdateRequest(); + try { + $gapicClient->update($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyExternalSyncSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SqlInstancesVerifyExternalSyncSettingsResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesVerifyExternalSyncSettingsRequest(); + $response = $gapicClient->verifyExternalSyncSettings($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.sql.v1.SqlInstancesService/VerifyExternalSyncSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyExternalSyncSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlInstancesVerifyExternalSyncSettingsRequest(); + try { + $gapicClient->verifyExternalSyncSettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireSsrsLeaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->acquireSsrsLeaseAsync($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.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php new file mode 100644 index 000000000000..49cb2ed5b4d0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php @@ -0,0 +1,266 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlOperationsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlOperationsServiceClient($options); + } + + /** @test */ + public function cancelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsCancelRequest(); + $gapicClient->cancel($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlOperationsService/Cancel', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlOperationsCancelRequest(); + try { + $gapicClient->cancel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlOperationsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlOperationsGetRequest(); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new OperationsListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlOperationsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlOperationsListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsCancelRequest(); + $gapicClient->cancelAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlOperationsService/Cancel', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php new file mode 100644 index 000000000000..7bc1ce6c6762 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlRegionsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlRegionsServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php new file mode 100644 index 000000000000..a89591d72e4b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php @@ -0,0 +1,352 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlSslCertsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlSslCertsServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlSslCertsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlSslCertsDeleteRequest(); + try { + $gapicClient->delete($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $certSerialNumber = 'certSerialNumber-440611559'; + $cert = 'cert3050020'; + $commonName = 'commonName-1924955041'; + $sha1Fingerprint2 = 'sha1Fingerprint2-1316795939'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new SslCert(); + $expectedResponse->setKind($kind); + $expectedResponse->setCertSerialNumber($certSerialNumber); + $expectedResponse->setCert($cert); + $expectedResponse->setCommonName($commonName); + $expectedResponse->setSha1Fingerprint($sha1Fingerprint2); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlSslCertsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlSslCertsGetRequest(); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SslCertsInsertResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlSslCertsService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlSslCertsInsertRequest(); + try { + $gapicClient->insert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SslCertsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlSslCertsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlSslCertsListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsDeleteRequest(); + $response = $gapicClient->deleteAsync($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.sql.v1.SqlSslCertsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php new file mode 100644 index 000000000000..02f50f531d47 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php @@ -0,0 +1,142 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlTiersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlTiersServiceClient($options); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new TiersListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlTiersListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlTiersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlTiersListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new TiersListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlTiersListRequest(); + $response = $gapicClient->listAsync($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.sql.v1.SqlTiersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php new file mode 100644 index 000000000000..0defde537e8e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php @@ -0,0 +1,434 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlUsersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlUsersServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlUsersService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlUsersDeleteRequest(); + try { + $gapicClient->delete($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $password = 'password1216985755'; + $etag = 'etag3123477'; + $name2 = 'name2-1052831874'; + $host2 = 'host2-1211484325'; + $instance2 = 'instance2902024968'; + $project2 = 'project2-894831476'; + $expectedResponse = new User(); + $expectedResponse->setKind($kind); + $expectedResponse->setPassword($password); + $expectedResponse->setEtag($etag); + $expectedResponse->setName($name2); + $expectedResponse->setHost($host2); + $expectedResponse->setInstance($instance2); + $expectedResponse->setProject($project2); + $transport->addResponse($expectedResponse); + $request = new SqlUsersGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlUsersService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlUsersGetRequest(); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlUsersService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlUsersInsertRequest(); + try { + $gapicClient->insert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new UsersListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlUsersListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlUsersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlUsersListRequest(); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersUpdateRequest(); + $response = $gapicClient->update($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.sql.v1.SqlUsersService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SqlUsersUpdateRequest(); + try { + $gapicClient->update($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersDeleteRequest(); + $response = $gapicClient->deleteAsync($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.sql.v1.SqlUsersService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php b/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php new file mode 100644 index 0000000000000000000000000000000000000000..37944800ca83f08715584225fd1103678b4368a3 GIT binary patch literal 7876 zcmds6&2QYs6)(AoEsbi)9@WxjUE2)h#)=~EBAd7Y)=>(sWXT5nA*hCd1Pc&c?(B*U zmt;wSI4%jx znznIYyLbPAc5~zQgI7T{@_V68YFfwlJ1(h2u^(C;Qn7t64t=+>S501-;#Ha1M#!_e zBnm8>Xj|L$yCk++R%|u4n3={8xtYc~H`91ny@8PJT2Z8lPvQ&u2x;&a^qQ_?Yf)^) z@b8KfnU3egj^#Q(fk~}tZOe@anCO>n_dGjxd{3ha_dS~|zpincRQ5{XLlD-q#IJ1{ z7l=vYwilDov)sl8iR{n`z~5~Ut<^dtPNPZREWa*>rRJQrw#H`PzJhr;QU|p7B z*WPnPJ{hf6nm(Jb;+9juDg0N_m)B8c!li~^;RB0ej9$oL6JM6Z7xxI8il1V0Y*@w>u-+mHg9_?*m;O$r#U?H5lo?bT$=eu&F`kziib+~`$IzC@Q1@no5c=Z@Q1aPmBW?O;$`&|f6)J_ptD;f-ej^nH7Dc8tT7|%cFd{f)<^&DPv-Gt=Qh>$lUtY&lLqPqYM2~o*xTIid5m2LM1OF z6mow|r&Xk2OxI_g8p^XzzW&>kI;GT0sA%@vVk6csq3;g(mX4$URYCLXEJNg(Uq`0` z3t)^zs)@Pd5qNwbiFg)O2K%cyu=4>a)+$YXjsu+{&0m)K?0rb=UKlxhJbS08{OFkI z|AKjK5SPS6p4b0BqMxV;-*F<5$x)KZCj=CL34mM72-*~e>B}5|MTFS<*#D4l#$kvl zcpefbByHyrBOCD&th9*hbRB3(ic<-^3f9oPOCCA4-wCZ?*Rf3~Lt$Lx%Z&kj37wNA zfMFP=2+Q)~nC@E~dK1k{(TD=5uLM_7!T^xq1t7)InTi+DoJStTW@h3v%cu37i9OF<7Ws-pu!^8i=DCScY>Fa*C>wC1> z+2PGj+Uq2J_3=_g>)#lq>P<8S8NsU?r<_Tv8)cg@27<~P9|W9)Snd_@5?T<%Oj@RG zL1*r|3^Yd4jHwFvB039|sRPYNWI_*NQ%a=)X6vY+f2N@CWK$;%$3rv+bq<2YDhb_r zFeaXC!Sf zKhPYWL#LsIYPzJwP@k$b8qbaQ(Ul?HkQ4^|<~U7}u*9L%f2N>C=zb(SN#&?XJ?AQG zf?gZbmD#i!@EnurnrA_lX!I{sbmp$*LCI-xF73~2sJ8Z*f=axtl_rtI z;oW21t%w93w!S1I_$KVQcyt9UqS;-}Au7oNWeXKUYa^RE*89q9h1PYs@7I5?q7v_M zCF{u~lXc6xkN+*$&^lSJ>+hQ$6g0L|<~8!z=H>-=9)D8ME42BO!jpEy|6LNin8sMf zxPNb_KSHHJGZ0;@f#&2C;)P|VI(8}!ZECAu&7oOQ55!3({!~HV&TbZQIVa<@f+8hL zqnm8~ohQa3-+8X`)>r(4#qsf9{_$&d5qb=GFu{iEyuBpT;f_D=8`ziQT??ihQKQyzpntlY$u$HUsf=2>|!#H%(-1T z-Dl|DW8+eKjyAC8eqxkpTev!K`!zB8pYsDHsinfz#K*x&APFb)%3I5l!pSrBi}Vyo zqDp){$KB!OwUp*eJXruI*`q)@VR+D^4{Ac51bvKTK zs8*@$@9zum(<5Z77w=YV*YCBi!Ok;o`(bx=GVwAToVKp{o_jD-u|@V0C)+*OO|BXz z(W8TzlMcp|_Cq*$tN%eo7vV@@IEeLmK_{Z#Z__%st$eV?f|Tfi3Ao=$?o88bR0u2F zq{7CXUaAJo8|l*@)yrG#%Cx*rV_gu2Jli^u!r9nG~o~vCjZve^m1#J-+gATN{3#PGD&`? Jd58`X`VX;kPoe+- literal 0 HcmV?d00001 diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php new file mode 100644 index 000000000000..67e1c36d73d3 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php @@ -0,0 +1,273 @@ +google.storage.control.v2.CommonLongRunningOperationMetadata + */ +class CommonLongRunningOperationMetadata 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. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $progress_percent = 0; + + /** + * 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 \Google\Protobuf\Timestamp $update_time + * Output only. The time the operation was last modified. + * @type string $type + * Output only. The type of operation invoked. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation. + * @type int $progress_percent + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::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. The time the operation was last modified. + * + * 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 operation was last modified. + * + * 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. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.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. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php new file mode 100644 index 000000000000..fa07c167ad9d --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php @@ -0,0 +1,280 @@ +google.storage.control.v2.CreateFolderRequest + */ +class CreateFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $folder = null; + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $folder_id = ''; + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recursive = false; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\Folder $folder Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * @param string $folderId Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * @return \Google\Cloud\Storage\Control\V2\CreateFolderRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\Folder $folder, string $folderId): self + { + return (new self()) + ->setParent($parent) + ->setFolder($folder) + ->setFolderId($folderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * @type \Google\Cloud\Storage\Control\V2\Folder $folder + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * @type string $folder_id + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * @type bool $recursive + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * 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. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * 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. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\Folder|null + */ + public function getFolder() + { + return $this->folder; + } + + public function hasFolder() + { + return isset($this->folder); + } + + public function clearFolder() + { + unset($this->folder); + } + + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\Folder $var + * @return $this + */ + public function setFolder($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\Folder::class); + $this->folder = $var; + + return $this; + } + + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFolderId() + { + return $this->folder_id; + } + + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFolderId($var) + { + GPBUtil::checkString($var, True); + $this->folder_id = $var; + + return $this; + } + + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRecursive() + { + return $this->recursive; + } + + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRecursive($var) + { + GPBUtil::checkBool($var); + $this->recursive = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php new file mode 100644 index 000000000000..e5320e9019f0 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.CreateManagedFolderRequest + */ +class CreateManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $managed_folder = null; + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $managed_folder_id = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * @param string $managedFolderId Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * @return \Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder, string $managedFolderId): self + { + return (new self()) + ->setParent($parent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket this managed folder belongs to. + * @type \Google\Cloud\Storage\Control\V2\ManagedFolder $managed_folder + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * @type string $managed_folder_id + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * 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. Name of the bucket this managed folder belongs to. + * + * 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. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\ManagedFolder|null + */ + public function getManagedFolder() + { + return $this->managed_folder; + } + + public function hasManagedFolder() + { + return isset($this->managed_folder); + } + + public function clearManagedFolder() + { + unset($this->managed_folder); + } + + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $var + * @return $this + */ + public function setManagedFolder($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); + $this->managed_folder = $var; + + return $this; + } + + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManagedFolderId() + { + return $this->managed_folder_id; + } + + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManagedFolderId($var) + { + GPBUtil::checkString($var, True); + $this->managed_folder_id = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php new file mode 100644 index 000000000000..a3523693513e --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.DeleteFolderRequest + */ +class DeleteFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteFolderRequest + * + * @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 folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.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; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php new file mode 100644 index 000000000000..957f9300a277 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php @@ -0,0 +1,271 @@ +google.storage.control.v2.DeleteManagedFolderRequest + */ +class DeleteManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + */ + protected $allow_non_empty = false; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest + * + * @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 managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $if_metageneration_match + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * @type int|string $if_metageneration_not_match + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * @type bool $allow_non_empty + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.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 operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + * @return bool + */ + public function getAllowNonEmpty() + { + return $this->allow_non_empty; + } + + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + * @param bool $var + * @return $this + */ + public function setAllowNonEmpty($var) + { + GPBUtil::checkBool($var); + $this->allow_non_empty = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php new file mode 100644 index 000000000000..3bcb0c88fcfc --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php @@ -0,0 +1,258 @@ +google.storage.control.v2.Folder + */ +class Folder extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metageneration = 0; + /** + * Output only. The creation time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The modification time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_rename_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $metageneration + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the folder. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The modification time of the folder. + * @type \Google\Cloud\Storage\Control\V2\PendingRenameInfo $pending_rename_info + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * 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 version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMetageneration() + { + return $this->metageneration; + } + + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMetageneration($var) + { + GPBUtil::checkInt64($var); + $this->metageneration = $var; + + return $this; + } + + /** + * Output only. The creation time of the folder. + * + * 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 time of the folder. + * + * 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 modification time of the folder. + * + * 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 modification time of the folder. + * + * 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; + } + + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\PendingRenameInfo|null + */ + public function getPendingRenameInfo() + { + return $this->pending_rename_info; + } + + public function hasPendingRenameInfo() + { + return isset($this->pending_rename_info); + } + + public function clearPendingRenameInfo() + { + unset($this->pending_rename_info); + } + + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\PendingRenameInfo $var + * @return $this + */ + public function setPendingRenameInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\PendingRenameInfo::class); + $this->pending_rename_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php new file mode 100644 index 000000000000..6ba954a244f2 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.GetFolderRequest + */ +class GetFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetFolderRequest + * + * @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 folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.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; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php new file mode 100644 index 000000000000..b4deee313827 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php @@ -0,0 +1,225 @@ +google.storage.control.v2.GetManagedFolderRequest + */ +class GetManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetManagedFolderRequest + * + * @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 managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $if_metageneration_match + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * @type int|string $if_metageneration_not_match + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.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 operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php new file mode 100644 index 000000000000..ca2429d9ac1f --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php @@ -0,0 +1,162 @@ +google.storage.control.v2.GetStorageLayoutRequest + */ +class GetStorageLayoutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + */ + protected $prefix = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * Please see {@see StorageControlClient::storageLayoutName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetStorageLayoutRequest + * + * @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 StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * @type string $prefix + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * 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 StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * 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; + } + + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php new file mode 100644 index 000000000000..9f009d6463c2 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php @@ -0,0 +1,373 @@ +google.storage.control.v2.ListFoldersRequest + */ +class ListFoldersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delimiter = ''; + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lexicographic_start = ''; + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lexicographic_end = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListFoldersRequest + * + * @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. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * @type int $page_size + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * @type string $prefix + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * @type string $delimiter + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * @type string $lexicographic_start + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * @type string $lexicographic_end + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * 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. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * 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. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * 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 previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * 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. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLexicographicStart() + { + return $this->lexicographic_start; + } + + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLexicographicStart($var) + { + GPBUtil::checkString($var, True); + $this->lexicographic_start = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLexicographicEnd() + { + return $this->lexicographic_end; + } + + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLexicographicEnd($var) + { + GPBUtil::checkString($var, True); + $this->lexicographic_end = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php new file mode 100644 index 000000000000..eb67af3ca9e8 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListFoldersResponse + */ +class ListFoldersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + */ + private $folders; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * The list of child folders + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + * @param array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\Folder::class); + $this->folders = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php new file mode 100644 index 000000000000..4af92f638e5a --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php @@ -0,0 +1,233 @@ +google.storage.control.v2.ListManagedFoldersRequest + */ +class ListManagedFoldersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListManagedFoldersRequest + * + * @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. Name of the bucket this managed folder belongs to. + * @type int $page_size + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * @type string $prefix + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * 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. Name of the bucket this managed folder belongs to. + * + * 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. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * 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 previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * 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. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php new file mode 100644 index 000000000000..7ca7daea2e9c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListManagedFoldersResponse + */ +class ListManagedFoldersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + */ + private $managed_folders; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $managed_folders + * The list of matching managed folders + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManagedFolders() + { + return $this->managed_folders; + } + + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + * @param array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManagedFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); + $this->managed_folders = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php new file mode 100644 index 000000000000..46a6d1984b82 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php @@ -0,0 +1,205 @@ +google.storage.control.v2.ManagedFolder + */ +class ManagedFolder extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metageneration = 0; + /** + * Output only. The creation time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The modification time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $metageneration + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the managed folder. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The modification time of the managed folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * 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 metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMetageneration() + { + return $this->metageneration; + } + + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMetageneration($var) + { + GPBUtil::checkInt64($var); + $this->metageneration = $var; + + return $this; + } + + /** + * Output only. The creation time of the managed folder. + * + * 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 time of the managed folder. + * + * 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 modification time of the managed folder. + * + * 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 modification time of the managed folder. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php new file mode 100644 index 000000000000..52172ad37498 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php @@ -0,0 +1,67 @@ +google.storage.control.v2.PendingRenameInfo + */ +class PendingRenameInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Output only. The name of the rename operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php new file mode 100644 index 000000000000..d9d0313fd1a7 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php @@ -0,0 +1,146 @@ +google.storage.control.v2.RenameFolderMetadata + */ +class RenameFolderMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + */ + protected $source_folder_id = ''; + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + */ + protected $destination_folder_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata + * Generic metadata for the long running operation. + * @type string $source_folder_id + * The path of the source folder. + * @type string $destination_folder_id + * The path of the destination folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + * @return string + */ + public function getSourceFolderId() + { + return $this->source_folder_id; + } + + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + * @param string $var + * @return $this + */ + public function setSourceFolderId($var) + { + GPBUtil::checkString($var, True); + $this->source_folder_id = $var; + + return $this; + } + + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + * @return string + */ + public function getDestinationFolderId() + { + return $this->destination_folder_id; + } + + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + * @param string $var + * @return $this + */ + public function setDestinationFolderId($var) + { + GPBUtil::checkString($var, True); + $this->destination_folder_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php new file mode 100644 index 000000000000..6d939843b450 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php @@ -0,0 +1,261 @@ +google.storage.control.v2.RenameFolderRequest + */ +class RenameFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_folder_id = ''; + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * @param string $destinationFolderId Required. The destination folder ID, e.g. `foo/bar/`. + * + * @return \Google\Cloud\Storage\Control\V2\RenameFolderRequest + * + * @experimental + */ + public static function build(string $name, string $destinationFolderId): self + { + return (new self()) + ->setName($name) + ->setDestinationFolderId($destinationFolderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type string $destination_folder_id + * Required. The destination folder ID, e.g. `foo/bar/`. + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.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 destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestinationFolderId() + { + return $this->destination_folder_id; + } + + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestinationFolderId($var) + { + GPBUtil::checkString($var, True); + $this->destination_folder_id = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php new file mode 100644 index 000000000000..a48fbe8ef2ee --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php @@ -0,0 +1,239 @@ +google.storage.control.v2.StorageLayout + */ +class StorageLayout extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location_type = ''; + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_placement_config = null; + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hierarchical_namespace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * @type string $location + * Output only. The location of the bucket. + * @type string $location_type + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * @type \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $custom_placement_config + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * @type \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $hierarchical_namespace + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * 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 location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocationType() + { + return $this->location_type; + } + + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocationType($var) + { + GPBUtil::checkString($var, True); + $this->location_type = $var; + + return $this; + } + + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig|null + */ + public function getCustomPlacementConfig() + { + return $this->custom_placement_config; + } + + public function hasCustomPlacementConfig() + { + return isset($this->custom_placement_config); + } + + public function clearCustomPlacementConfig() + { + unset($this->custom_placement_config); + } + + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $var + * @return $this + */ + public function setCustomPlacementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig::class); + $this->custom_placement_config = $var; + + return $this; + } + + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace|null + */ + public function getHierarchicalNamespace() + { + return $this->hierarchical_namespace; + } + + public function hasHierarchicalNamespace() + { + return isset($this->hierarchical_namespace); + } + + public function clearHierarchicalNamespace() + { + unset($this->hierarchical_namespace); + } + + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $var + * @return $this + */ + public function setHierarchicalNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace::class); + $this->hierarchical_namespace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php new file mode 100644 index 000000000000..5c05317b146b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php @@ -0,0 +1,72 @@ +google.storage.control.v2.StorageLayout.CustomPlacementConfig + */ +class CustomPlacementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + */ + private $data_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations + * List of locations to use for data placement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataLocations() + { + return $this->data_locations; + } + + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_locations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomPlacementConfig::class, \Google\Cloud\Storage\Control\V2\StorageLayout_CustomPlacementConfig::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php new file mode 100644 index 000000000000..34e91aff6d81 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php @@ -0,0 +1,70 @@ +google.storage.control.v2.StorageLayout.HierarchicalNamespace + */ +class HierarchicalNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Enables the hierarchical namespace feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HierarchicalNamespace::class, \Google\Cloud\Storage\Control\V2\StorageLayout_HierarchicalNamespace::class); + diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php new file mode 100644 index 000000000000..8f69c308974b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + + // Call the API and handle any network failures. + try { + /** @var Folder $response */ + $response = $storageControlClient->createFolder($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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + $folderId = '[FOLDER_ID]'; + + create_folder_sample($formattedParent, $folderId); +} +// [END storage_v2_generated_StorageControl_CreateFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php new file mode 100644 index 000000000000..367c733b53f7 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + + // Call the API and handle any network failures. + try { + /** @var ManagedFolder $response */ + $response = $storageControlClient->createManagedFolder($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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + $managedFolderId = '[MANAGED_FOLDER_ID]'; + + create_managed_folder_sample($formattedParent, $managedFolderId); +} +// [END storage_v2_generated_StorageControl_CreateManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php new file mode 100644 index 000000000000..40e321078635 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageControlClient->deleteFolder($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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + delete_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php new file mode 100644 index 000000000000..63dab9b8481f --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageControlClient->deleteManagedFolder($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 = StorageControlClient::managedFolderName( + '[PROJECT]', + '[BUCKET]', + '[MANAGED_FOLDER]' + ); + + delete_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php new file mode 100644 index 000000000000..1685e43ec814 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Folder $response */ + $response = $storageControlClient->getFolder($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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + get_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php new file mode 100644 index 000000000000..c6fbdeb48898 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ManagedFolder $response */ + $response = $storageControlClient->getManagedFolder($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 = StorageControlClient::managedFolderName( + '[PROJECT]', + '[BUCKET]', + '[MANAGED_FOLDER]' + ); + + get_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php new file mode 100644 index 000000000000..3a8b9e36aeb6 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var StorageLayout $response */ + $response = $storageControlClient->getStorageLayout($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 = StorageControlClient::storageLayoutName('[PROJECT]', '[BUCKET]'); + + get_storage_layout_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetStorageLayout_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php new file mode 100644 index 000000000000..ba2043d14fc8 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listFolders($request); + + /** @var Folder $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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_folders_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php new file mode 100644 index 000000000000..7b9623d4f14a --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listManagedFolders($request); + + /** @var ManagedFolder $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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_managed_folders_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListManagedFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php new file mode 100644 index 000000000000..9d8954e31f8d --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageControlClient->renameFolder($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Folder $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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = '[DESTINATION_FOLDER_ID]'; + + rename_folder_sample($formattedName, $destinationFolderId); +} +// [END storage_v2_generated_StorageControl_RenameFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php b/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php new file mode 100644 index 000000000000..1f8bdf138bb8 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php @@ -0,0 +1,612 @@ + createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getManagedFolderAsync(GetManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStorageLayoutAsync(GetStorageLayoutRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFoldersAsync(ListFoldersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listManagedFoldersAsync(ListManagedFoldersRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameFolderAsync(RenameFolderRequest $request, array $optionalArgs = []) + */ +final class StorageControlClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.storage.control.v2.StorageControl'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'storage.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'storage.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/devstorage.full_control', + 'https://www.googleapis.com/auth/devstorage.read_only', + 'https://www.googleapis.com/auth/devstorage.read_write', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_control_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_control_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_control_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + ]; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'grpc', + 'grpc-fallback', + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 bucket + * resource. + * + * @param string $project + * @param string $bucket + * + * @return string The formatted bucket resource. + */ + public static function bucketName(string $project, string $bucket): string + { + return self::getPathTemplate('bucket')->render([ + 'project' => $project, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $project + * @param string $bucket + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $project, string $bucket, string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * managed_folder resource. + * + * @param string $project + * @param string $bucket + * @param string $managedFolder + * + * @return string The formatted managed_folder resource. + */ + public static function managedFolderName(string $project, string $bucket, string $managedFolder): string + { + return self::getPathTemplate('managedFolder')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'managed_folder' => $managedFolder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * storage_layout resource. + * + * @param string $project + * @param string $bucket + * + * @return string The formatted storage_layout resource. + */ + public static function storageLayoutName(string $project, string $bucket): string + { + return self::getPathTemplate('storageLayout')->render([ + 'project' => $project, + 'bucket' => $bucket, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - bucket: projects/{project}/buckets/{bucket} + * - folder: projects/{project}/buckets/{bucket}/folders/{folder=**} + * - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**} + * - storageLayout: projects/{project}/buckets/{bucket}/storageLayout + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'storage.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `grpc`. *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' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new folder. This operation is only applicable to a hierarchical + * namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::createFolderAsync()} . + * + * @example samples/V2/StorageControlClient/create_folder.php + * + * @param CreateFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Folder + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFolder(CreateFolderRequest $request, array $callOptions = []): Folder + { + return $this->startApiCall('CreateFolder', $request, $callOptions)->wait(); + } + + /** + * Creates a new managed folder. + * + * The async variant is {@see StorageControlClient::createManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/create_managed_folder.php + * + * @param CreateManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagedFolder + * + * @throws ApiException Thrown if the API call fails. + */ + public function createManagedFolder(CreateManagedFolderRequest $request, array $callOptions = []): ManagedFolder + { + return $this->startApiCall('CreateManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes an empty folder. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::deleteFolderAsync()} . + * + * @example samples/V2/StorageControlClient/delete_folder.php + * + * @param DeleteFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteFolder(DeleteFolderRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteFolder', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes an empty managed folder. + * + * The async variant is {@see StorageControlClient::deleteManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/delete_managed_folder.php + * + * @param DeleteManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteManagedFolder(DeleteManagedFolderRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for the specified folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::getFolderAsync()} . + * + * @example samples/V2/StorageControlClient/get_folder.php + * + * @param GetFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Folder + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFolder(GetFolderRequest $request, array $callOptions = []): Folder + { + return $this->startApiCall('GetFolder', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for the specified managed folder. + * + * The async variant is {@see StorageControlClient::getManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/get_managed_folder.php + * + * @param GetManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagedFolder + * + * @throws ApiException Thrown if the API call fails. + */ + public function getManagedFolder(GetManagedFolderRequest $request, array $callOptions = []): ManagedFolder + { + return $this->startApiCall('GetManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Returns the storage layout configuration for a given bucket. + * + * The async variant is {@see StorageControlClient::getStorageLayoutAsync()} . + * + * @example samples/V2/StorageControlClient/get_storage_layout.php + * + * @param GetStorageLayoutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StorageLayout + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStorageLayout(GetStorageLayoutRequest $request, array $callOptions = []): StorageLayout + { + return $this->startApiCall('GetStorageLayout', $request, $callOptions)->wait(); + } + + /** + * Retrieves a list of folders. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::listFoldersAsync()} . + * + * @example samples/V2/StorageControlClient/list_folders.php + * + * @param ListFoldersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFolders(ListFoldersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFolders', $request, $callOptions); + } + + /** + * Retrieves a list of managed folders for a given bucket. + * + * The async variant is {@see StorageControlClient::listManagedFoldersAsync()} . + * + * @example samples/V2/StorageControlClient/list_managed_folders.php + * + * @param ListManagedFoldersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listManagedFolders(ListManagedFoldersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListManagedFolders', $request, $callOptions); + } + + /** + * Renames a source folder to a destination folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. During a rename, the + * source and destination folders are locked until the long running operation + * completes. + * + * The async variant is {@see StorageControlClient::renameFolderAsync()} . + * + * @example samples/V2/StorageControlClient/rename_folder.php + * + * @param RenameFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 renameFolder(RenameFolderRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RenameFolder', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json b/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..61ee835d8977 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.storage.control.v2", + "libraryPackage": "Google\\Cloud\\Storage\\Control\\V2", + "services": { + "StorageControl": { + "clients": { + "grpc": { + "libraryClient": "StorageControlGapicClient", + "rpcs": { + "CreateFolder": { + "methods": [ + "createFolder" + ] + }, + "CreateManagedFolder": { + "methods": [ + "createManagedFolder" + ] + }, + "DeleteFolder": { + "methods": [ + "deleteFolder" + ] + }, + "DeleteManagedFolder": { + "methods": [ + "deleteManagedFolder" + ] + }, + "GetFolder": { + "methods": [ + "getFolder" + ] + }, + "GetManagedFolder": { + "methods": [ + "getManagedFolder" + ] + }, + "GetStorageLayout": { + "methods": [ + "getStorageLayout" + ] + }, + "ListFolders": { + "methods": [ + "listFolders" + ] + }, + "ListManagedFolders": { + "methods": [ + "listManagedFolders" + ] + }, + "RenameFolder": { + "methods": [ + "renameFolder" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json new file mode 100644 index 000000000000..b6522d27f8ab --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json @@ -0,0 +1,98 @@ +{ + "interfaces": { + "google.storage.control.v2.StorageControl": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNKNOWN" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.0, + "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 + } + }, + "methods": { + "CreateFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStorageLayout": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListFolders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListManagedFolders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RenameFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php new file mode 100644 index 000000000000..6a5949b7c46c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php @@ -0,0 +1,222 @@ + [ + 'google.storage.control.v2.StorageControl' => [ + 'RenameFolder' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\Folder', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\RenameFolderMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'CreateFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'CreateManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetStorageLayout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\StorageLayout', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'ListFolders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFolders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListFoldersResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListManagedFolders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getManagedFolders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListManagedFoldersResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'templateMap' => [ + 'bucket' => 'projects/{project}/buckets/{bucket}', + 'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}', + 'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}', + 'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout', + ], + ], + ], +]; diff --git a/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php b/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php new file mode 100644 index 000000000000..615b5dfe5600 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php @@ -0,0 +1,872 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StorageControlClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StorageControlClient($options); + } + + /** @test */ + public function createFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + $response = $gapicClient->createFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFolder(); + $this->assertProtobufEquals($folder, $actualValue); + $actualValue = $actualRequestObject->getFolderId(); + $this->assertProtobufEquals($folderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + try { + $gapicClient->createFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new ManagedFolder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $managedFolder = new ManagedFolder(); + $managedFolderId = 'managedFolderId-239131156'; + $request = (new CreateManagedFolderRequest()) + ->setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + $response = $gapicClient->createManagedFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getManagedFolder(); + $this->assertProtobufEquals($managedFolder, $actualValue); + $actualValue = $actualRequestObject->getManagedFolderId(); + $this->assertProtobufEquals($managedFolderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); + $managedFolder = new ManagedFolder(); + $managedFolderId = 'managedFolderId-239131156'; + $request = (new CreateManagedFolderRequest()) + ->setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + try { + $gapicClient->createManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRequest()) + ->setName($formattedName); + $gapicClient->deleteFolder($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new DeleteManagedFolderRequest()) + ->setName($formattedName); + $gapicClient->deleteManagedFolder($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new DeleteManagedFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new GetFolderRequest()) + ->setName($formattedName); + $response = $gapicClient->getFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new GetFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->getFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new ManagedFolder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new GetManagedFolderRequest()) + ->setName($formattedName); + $response = $gapicClient->getManagedFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new GetManagedFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->getManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStorageLayoutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $locationType = 'locationType-1796591228'; + $expectedResponse = new StorageLayout(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $expectedResponse->setLocationType($locationType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); + $request = (new GetStorageLayoutRequest()) + ->setName($formattedName); + $response = $gapicClient->getStorageLayout($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetStorageLayout', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStorageLayoutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->storageLayoutName('[PROJECT]', '[BUCKET]'); + $request = (new GetStorageLayoutRequest()) + ->setName($formattedName); + try { + $gapicClient->getStorageLayout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFoldersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $foldersElement = new Folder(); + $folders = [ + $foldersElement, + ]; + $expectedResponse = new ListFoldersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFolders($folders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListFoldersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFolders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListFolders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFoldersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListFoldersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFolders($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagedFoldersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $managedFoldersElement = new ManagedFolder(); + $managedFolders = [ + $managedFoldersElement, + ]; + $expectedResponse = new ListManagedFoldersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setManagedFolders($managedFolders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListManagedFoldersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listManagedFolders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getManagedFolders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListManagedFolders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagedFoldersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListManagedFoldersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listManagedFolders($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameFolderTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/renameFolderTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/renameFolderTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = 'destinationFolderId368368539'; + $request = (new RenameFolderRequest()) + ->setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + $response = $gapicClient->renameFolder($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.storage.control.v2.StorageControl/RenameFolder', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDestinationFolderId(); + $this->assertProtobufEquals($destinationFolderId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/renameFolderTest'); + $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 renameFolderExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/renameFolderTest'); + $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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = 'destinationFolderId368368539'; + $request = (new RenameFolderRequest()) + ->setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + $response = $gapicClient->renameFolder($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/renameFolderTest'); + 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 createFolderAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + $response = $gapicClient->createFolderAsync($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.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFolder(); + $this->assertProtobufEquals($folder, $actualValue); + $actualValue = $actualRequestObject->getFolderId(); + $this->assertProtobufEquals($folderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/GPBMetadata/Google/Cloud/Storageinsights/V1/Storageinsights.php b/owl-bot-staging/StorageInsights/v1/proto/src/GPBMetadata/Google/Cloud/Storageinsights/V1/Storageinsights.php new file mode 100644 index 0000000000000000000000000000000000000000..6cde30d40d295a8fba48dad7098faff119932d01 GIT binary patch literal 7019 zcmcIp&2JmW6%R#A7KgSz#<5MyfW28Kh@x0aP)^X6j_Q&WB`dWpm6lZ`C9qg7hvHVt z-Rf&L9`?mhL|Qv&qR+h#PdyZ9FMad1B9~G~DvmFvX6C(l zpTGCs&Ib>Ic7X0^8^j}_MM+a@9BQ;pv>^1UZ~Ly+=(buU)NH>KI4%hdOA9ez%#As2^H;#PK3$uT7);K_R(h@EZ{FtPY6+%O={! zcKI=(R@0(ZeSke_7Wzx0|96ub7v_@nYjVxqr zd(gbv3FzVI7sjMq;Kx?9e-7Fm2jZ4monUm@T3|ygTeLfdFLn+CQeT729Q~S@go22t zlkq@a{-Gnow$yCKQMwLUz8J?9i?X-T|CZ7F=SpvUTaXzX6^sNb7zc%g>yob(H~<|i z<^(V-NXk6hXtBUD8#1!wfg3%Pp$s3nbyIF}h=Kgf6BZzHQvp@HDY$na3=&tzCzv6* zujK(HbQstGYs{f?sLah}KBphqU5*EoU#PkzaJ- zN?buxffa&Paw#pfm?_`;x-{|M(lUNGX-aVc7%MUWs`I_f@I1-{0LEqn@RyqaK9d+D z#FwbQPrO{3@y0V~s^z!RK>hfNZijlxIO!+g8IRAaoi;`Wd>mLHcZ` zOjkk|SZ(Py92&=P`d>ib3fxFZuY~G?SK^yZbh*!H+!y28tel3hz}FE9Mc9~5Q}~c= zr1U?58qWe2j;E>d9+;JHnk)slxw0z@%4aGEj2J7$Wdm|EAH52>c`ORKe*iWWi+1hvtPR#WcS(VZ|P4{(b>n682kzF2!;2rQQI;1#~&`tRQOp)MVMsd7fs- z9R((M0b%L;z@lw42uaKNBsa~2{dIIHYFlA5f@JDK`e$G@jde67@P@lLyMmRQ0ErAy zTJR>Ca;*k&BS>17em_uW&ca}senKnb5vQ$sG(5xxnx$3SgJ-sS(jY`r8Hxeok!YW{>2r2nNb@-v%uNC;e9wXnreTV-mE}YEr=fpEfTMBI{W+eq+`%lt}|xOcSp;B2WmD zD`-k2qbS#6aUNYbAYtPK?bG-snh_XbLemmK-514MoWFyv$r=H9WLq%cxGvWx#}b=E zU>fI878(f?7)PKf&*2Ow*Z-A5bL*UeXCH0_e6GMxP^P8Uc*f1F+#j0oNiIgbfZsw0 z6bJ?ANEn@03}e8-cZ3NUGRdMjct~GGnG?o0(AD)?^(W7&Pbwdo&z?Npu2weJH>+!N zui*@uTq|up`e-f%ozc`!tJNRF?+LwzQ03{aQZ$F=1oW5@fv(JgDNiB{bIp@e&{5I0kWT+}0^QtdFf>zvT;r{q;snxn{V@F}_!LspG@fa0}g340~nuMQ};aJ{XJnpk*GW%G0X5Enh`f zPPs|{&!npF0=X0QJ(1_4-5G3?;_5E)?WDQl)swXoBcQ`0G#_V_sVu=-@a#%qs3qcf zSH3I*LPZBLA5p>I9m?k<@WD$TqFIP|7PK)RQQGrE`Sb@n_xLTJhaLcw_}l|2!e*bC zHEV&gD<2GH{S6WPFxArtp|Khv;r_lx2)ePR69ukyX!4mN3j$`w?Kz&mEYT4=4jF;f zSJH8mXX67BT72K}nk#?2gk~l7Y|0OI_^&B6KQQXy;l1PlO-+m>3&o+{ zJcU&B5_jTi9md zx1IXanHJwN#x#6I&5z7YkD`w97j#%B|^H~8a_!TU-0>cL-{RN*pq3!keK zb@_gz9+1?TI=mpgoX`cEVv+MH788t$#oa<>6uF< literal 0 HcmV?d00001 diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php new file mode 100644 index 000000000000..25cd86d4002d --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php @@ -0,0 +1,135 @@ +google.cloud.storageinsights.v1.CSVOptions + */ +class CSVOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Record separator characters in CSV. + * + * Generated from protobuf field string record_separator = 1; + */ + protected $record_separator = ''; + /** + * Delimiter characters in CSV. + * + * Generated from protobuf field string delimiter = 2; + */ + protected $delimiter = ''; + /** + * If set, will include a header row in the CSV report. + * + * Generated from protobuf field bool header_required = 3; + */ + protected $header_required = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $record_separator + * Record separator characters in CSV. + * @type string $delimiter + * Delimiter characters in CSV. + * @type bool $header_required + * If set, will include a header row in the CSV report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Record separator characters in CSV. + * + * Generated from protobuf field string record_separator = 1; + * @return string + */ + public function getRecordSeparator() + { + return $this->record_separator; + } + + /** + * Record separator characters in CSV. + * + * Generated from protobuf field string record_separator = 1; + * @param string $var + * @return $this + */ + public function setRecordSeparator($var) + { + GPBUtil::checkString($var, True); + $this->record_separator = $var; + + return $this; + } + + /** + * Delimiter characters in CSV. + * + * Generated from protobuf field string delimiter = 2; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Delimiter characters in CSV. + * + * Generated from protobuf field string delimiter = 2; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * If set, will include a header row in the CSV report. + * + * Generated from protobuf field bool header_required = 3; + * @return bool + */ + public function getHeaderRequired() + { + return $this->header_required; + } + + /** + * If set, will include a header row in the CSV report. + * + * Generated from protobuf field bool header_required = 3; + * @param bool $var + * @return $this + */ + public function setHeaderRequired($var) + { + GPBUtil::checkBool($var); + $this->header_required = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php new file mode 100644 index 000000000000..0dfdb6efcee1 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php @@ -0,0 +1,106 @@ +google.cloud.storageinsights.v1.CloudStorageDestinationOptions + */ +class CloudStorageDestinationOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Destination bucket. + * + * Generated from protobuf field string bucket = 1; + */ + protected $bucket = ''; + /** + * Destination path is the path in the bucket where the report should be + * generated. + * + * Generated from protobuf field string destination_path = 2; + */ + protected $destination_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Destination bucket. + * @type string $destination_path + * Destination path is the path in the bucket where the report should be + * generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Destination bucket. + * + * Generated from protobuf field string bucket = 1; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Destination bucket. + * + * Generated from protobuf field string bucket = 1; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Destination path is the path in the bucket where the report should be + * generated. + * + * Generated from protobuf field string destination_path = 2; + * @return string + */ + public function getDestinationPath() + { + return $this->destination_path; + } + + /** + * Destination path is the path in the bucket where the report should be + * generated. + * + * Generated from protobuf field string destination_path = 2; + * @param string $var + * @return $this + */ + public function setDestinationPath($var) + { + GPBUtil::checkString($var, True); + $this->destination_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php new file mode 100644 index 000000000000..7d65faa4ed79 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php @@ -0,0 +1,68 @@ +google.cloud.storageinsights.v1.CloudStorageFilters + */ +class CloudStorageFilters extends \Google\Protobuf\Internal\Message +{ + /** + * Bucket for which the report will be generated. + * + * Generated from protobuf field string bucket = 1; + */ + protected $bucket = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Bucket for which the report will be generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Bucket for which the report will be generated. + * + * Generated from protobuf field string bucket = 1; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Bucket for which the report will be generated. + * + * Generated from protobuf field string bucket = 1; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php new file mode 100644 index 000000000000..182f55b16706 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php @@ -0,0 +1,201 @@ +google.cloud.storageinsights.v1.CreateReportConfigRequest + */ +class CreateReportConfigRequest 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. The resource being created + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_config = 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 StorageInsightsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\StorageInsights\V1\ReportConfig $reportConfig Required. The resource being created + * + * @return \Google\Cloud\StorageInsights\V1\CreateReportConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\StorageInsights\V1\ReportConfig $reportConfig): self + { + return (new self()) + ->setParent($parent) + ->setReportConfig($reportConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type \Google\Cloud\StorageInsights\V1\ReportConfig $report_config + * 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\Storageinsights\V1\Storageinsights::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. The resource being created + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\StorageInsights\V1\ReportConfig|null + */ + public function getReportConfig() + { + return $this->report_config; + } + + public function hasReportConfig() + { + return isset($this->report_config); + } + + public function clearReportConfig() + { + unset($this->report_config); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\StorageInsights\V1\ReportConfig $var + * @return $this + */ + public function setReportConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ReportConfig::class); + $this->report_config = $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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php new file mode 100644 index 000000000000..4fea2e9560c1 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php @@ -0,0 +1,189 @@ +google.cloud.storageinsights.v1.DeleteReportConfigRequest + */ +class DeleteReportConfigRequest 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. If set, all ReportDetails for this ReportConfig will be deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = 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 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see StorageInsightsClient::reportConfigName()} for help formatting this field. + * + * @return \Google\Cloud\StorageInsights\V1\DeleteReportConfigRequest + * + * @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 bool $force + * Optional. If set, all ReportDetails for this ReportConfig will be deleted. + * @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\Storageinsights\V1\Storageinsights::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. If set, all ReportDetails for this ReportConfig will be deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set, all ReportDetails for this ReportConfig will be deleted. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $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 = 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 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 = 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php new file mode 100644 index 000000000000..09b1f0fc3c8e --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php @@ -0,0 +1,164 @@ +google.cloud.storageinsights.v1.FrequencyOptions + */ +class FrequencyOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Frequency of report generation. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions.Frequency frequency = 1; + */ + protected $frequency = 0; + /** + * The date from which report generation should start. + * UTC time zone. + * + * Generated from protobuf field .google.type.Date start_date = 2; + */ + protected $start_date = null; + /** + * The date on which report generation should stop (Inclusive). + * UTC time zone. + * + * Generated from protobuf field .google.type.Date end_date = 3; + */ + protected $end_date = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $frequency + * Frequency of report generation. + * @type \Google\Type\Date $start_date + * The date from which report generation should start. + * UTC time zone. + * @type \Google\Type\Date $end_date + * The date on which report generation should stop (Inclusive). + * UTC time zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Frequency of report generation. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions.Frequency frequency = 1; + * @return int + */ + public function getFrequency() + { + return $this->frequency; + } + + /** + * Frequency of report generation. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions.Frequency frequency = 1; + * @param int $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageInsights\V1\FrequencyOptions\Frequency::class); + $this->frequency = $var; + + return $this; + } + + /** + * The date from which report generation should start. + * UTC time zone. + * + * Generated from protobuf field .google.type.Date start_date = 2; + * @return \Google\Type\Date|null + */ + public function getStartDate() + { + return $this->start_date; + } + + public function hasStartDate() + { + return isset($this->start_date); + } + + public function clearStartDate() + { + unset($this->start_date); + } + + /** + * The date from which report generation should start. + * UTC time zone. + * + * Generated from protobuf field .google.type.Date start_date = 2; + * @param \Google\Type\Date $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->start_date = $var; + + return $this; + } + + /** + * The date on which report generation should stop (Inclusive). + * UTC time zone. + * + * Generated from protobuf field .google.type.Date end_date = 3; + * @return \Google\Type\Date|null + */ + public function getEndDate() + { + return $this->end_date; + } + + public function hasEndDate() + { + return isset($this->end_date); + } + + public function clearEndDate() + { + unset($this->end_date); + } + + /** + * The date on which report generation should stop (Inclusive). + * UTC time zone. + * + * Generated from protobuf field .google.type.Date end_date = 3; + * @param \Google\Type\Date $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->end_date = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php new file mode 100644 index 000000000000..350afa68dca4 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php @@ -0,0 +1,64 @@ +google.cloud.storageinsights.v1.FrequencyOptions.Frequency + */ +class Frequency +{ + /** + * Unspecified. + * + * Generated from protobuf enum FREQUENCY_UNSPECIFIED = 0; + */ + const FREQUENCY_UNSPECIFIED = 0; + /** + * Report will be generated daily. + * + * Generated from protobuf enum DAILY = 1; + */ + const DAILY = 1; + /** + * Report will be generated weekly. + * + * Generated from protobuf enum WEEKLY = 2; + */ + const WEEKLY = 2; + + private static $valueToName = [ + self::FREQUENCY_UNSPECIFIED => 'FREQUENCY_UNSPECIFIED', + self::DAILY => 'DAILY', + self::WEEKLY => 'WEEKLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Frequency::class, \Google\Cloud\StorageInsights\V1\FrequencyOptions_Frequency::class); + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php new file mode 100644 index 000000000000..8158367d9ded --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.storageinsights.v1.GetReportConfigRequest + */ +class GetReportConfigRequest 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 StorageInsightsClient::reportConfigName()} for help formatting this field. + * + * @return \Google\Cloud\StorageInsights\V1\GetReportConfigRequest + * + * @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\Storageinsights\V1\Storageinsights::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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php new file mode 100644 index 000000000000..c0798c466611 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php @@ -0,0 +1,81 @@ +google.cloud.storageinsights.v1.GetReportDetailRequest + */ +class GetReportDetailRequest 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 StorageInsightsClient::reportDetailName()} for help formatting this field. + * + * @return \Google\Cloud\StorageInsights\V1\GetReportDetailRequest + * + * @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\Storageinsights\V1\Storageinsights::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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php new file mode 100644 index 000000000000..0b81255d3d05 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php @@ -0,0 +1,221 @@ +google.cloud.storageinsights.v1.ListReportConfigsRequest + */ +class ListReportConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListReportConfigsRequest + * + * 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 ListReportConfigsRequest + * Please see {@see StorageInsightsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\StorageInsights\V1\ListReportConfigsRequest + * + * @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 ListReportConfigsRequest + * @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\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListReportConfigsRequest + * + * 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 ListReportConfigsRequest + * + * 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php new file mode 100644 index 000000000000..67ce8ce5f0f2 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.storageinsights.v1.ListReportConfigsResponse + */ +class ListReportConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ReportConfig + * + * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportConfig report_configs = 1; + */ + private $report_configs; + /** + * 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 array<\Google\Cloud\StorageInsights\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $report_configs + * The list of ReportConfig + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * The list of ReportConfig + * + * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportConfig report_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReportConfigs() + { + return $this->report_configs; + } + + /** + * The list of ReportConfig + * + * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportConfig report_configs = 1; + * @param array<\Google\Cloud\StorageInsights\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReportConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageInsights\V1\ReportConfig::class); + $this->report_configs = $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php new file mode 100644 index 000000000000..1822f972ee85 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php @@ -0,0 +1,221 @@ +google.cloud.storageinsights.v1.ListReportDetailsRequest + */ +class ListReportDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListReportDetailsRequest + * + * 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 ListReportDetailsRequest + * Please see {@see StorageInsightsClient::reportConfigName()} for help formatting this field. + * + * @return \Google\Cloud\StorageInsights\V1\ListReportDetailsRequest + * + * @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 ListReportDetailsRequest + * @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\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListReportDetailsRequest + * + * 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 ListReportDetailsRequest + * + * 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php new file mode 100644 index 000000000000..906f589b9718 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php @@ -0,0 +1,135 @@ +google.cloud.storageinsights.v1.ListReportDetailsResponse + */ +class ListReportDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ReportDetail + * + * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportDetail report_details = 1; + */ + private $report_details; + /** + * 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 array<\Google\Cloud\StorageInsights\V1\ReportDetail>|\Google\Protobuf\Internal\RepeatedField $report_details + * The list of ReportDetail + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * The list of ReportDetail + * + * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportDetail report_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReportDetails() + { + return $this->report_details; + } + + /** + * The list of ReportDetail + * + * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportDetail report_details = 1; + * @param array<\Google\Cloud\StorageInsights\V1\ReportDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReportDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageInsights\V1\ReportDetail::class); + $this->report_details = $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php new file mode 100644 index 000000000000..53e660175af8 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php @@ -0,0 +1,152 @@ +google.cloud.storageinsights.v1.ObjectMetadataReportOptions + */ +class ObjectMetadataReportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Metadata fields to be included in the report. + * + * Generated from protobuf field repeated string metadata_fields = 1; + */ + private $metadata_fields; + protected $filter; + protected $destination_options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $metadata_fields + * Metadata fields to be included in the report. + * @type \Google\Cloud\StorageInsights\V1\CloudStorageFilters $storage_filters + * Cloud Storage as the storage system. + * @type \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions $storage_destination_options + * Cloud Storage as the storage system. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Metadata fields to be included in the report. + * + * Generated from protobuf field repeated string metadata_fields = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadataFields() + { + return $this->metadata_fields; + } + + /** + * Metadata fields to be included in the report. + * + * Generated from protobuf field repeated string metadata_fields = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadataFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata_fields = $arr; + + return $this; + } + + /** + * Cloud Storage as the storage system. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageFilters storage_filters = 2; + * @return \Google\Cloud\StorageInsights\V1\CloudStorageFilters|null + */ + public function getStorageFilters() + { + return $this->readOneof(2); + } + + public function hasStorageFilters() + { + return $this->hasOneof(2); + } + + /** + * Cloud Storage as the storage system. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageFilters storage_filters = 2; + * @param \Google\Cloud\StorageInsights\V1\CloudStorageFilters $var + * @return $this + */ + public function setStorageFilters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\CloudStorageFilters::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cloud Storage as the storage system. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageDestinationOptions storage_destination_options = 3; + * @return \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions|null + */ + public function getStorageDestinationOptions() + { + return $this->readOneof(3); + } + + public function hasStorageDestinationOptions() + { + return $this->hasOneof(3); + } + + /** + * Cloud Storage as the storage system. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageDestinationOptions storage_destination_options = 3; + * @param \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions $var + * @return $this + */ + public function setStorageDestinationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilter() + { + return $this->whichOneof("filter"); + } + + /** + * @return string + */ + public function getDestinationOptions() + { + return $this->whichOneof("destination_options"); + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php new file mode 100644 index 000000000000..202d568632bc --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.storageinsights.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 been cancelled successfully + * 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 been cancelled successfully + * 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\Storageinsights\V1\Storageinsights::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 been cancelled successfully + * 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 been cancelled successfully + * 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php new file mode 100644 index 000000000000..0ab81e8889bd --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php @@ -0,0 +1,33 @@ +google.cloud.storageinsights.v1.ParquetOptions + */ +class ParquetOptions extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php new file mode 100644 index 000000000000..39fb01d11da7 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php @@ -0,0 +1,397 @@ +google.cloud.storageinsights.v1.ReportConfig + */ +class ReportConfig extends \Google\Protobuf\Internal\Message +{ + /** + * name of resource. It will be of form + * projects//locations//reportConfigs/. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. [Output only] Create time stamp + * + * 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 time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The frequency of report generation. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions frequency_options = 5; + */ + protected $frequency_options = null; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * User provided display name which can be empty and limited to 256 characters + * that is editable. + * + * Generated from protobuf field string display_name = 11; + */ + protected $display_name = ''; + protected $report_format; + protected $report_kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * name of resource. It will be of form + * projects//locations//reportConfigs/. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp + * @type \Google\Cloud\StorageInsights\V1\FrequencyOptions $frequency_options + * The frequency of report generation. + * @type \Google\Cloud\StorageInsights\V1\CSVOptions $csv_options + * Options for CSV formatted reports. + * @type \Google\Cloud\StorageInsights\V1\ParquetOptions $parquet_options + * Options for Parquet formatted reports. + * @type \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions $object_metadata_report_options + * Report for exporting object metadata. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type string $display_name + * User provided display name which can be empty and limited to 256 characters + * that is editable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * name of resource. It will be of form + * projects//locations//reportConfigs/. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * name of resource. It will be of form + * projects//locations//reportConfigs/. + * + * 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 time stamp + * + * 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 time stamp + * + * 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 time stamp + * + * 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 time stamp + * + * 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; + } + + /** + * The frequency of report generation. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions frequency_options = 5; + * @return \Google\Cloud\StorageInsights\V1\FrequencyOptions|null + */ + public function getFrequencyOptions() + { + return $this->frequency_options; + } + + public function hasFrequencyOptions() + { + return isset($this->frequency_options); + } + + public function clearFrequencyOptions() + { + unset($this->frequency_options); + } + + /** + * The frequency of report generation. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions frequency_options = 5; + * @param \Google\Cloud\StorageInsights\V1\FrequencyOptions $var + * @return $this + */ + public function setFrequencyOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\FrequencyOptions::class); + $this->frequency_options = $var; + + return $this; + } + + /** + * Options for CSV formatted reports. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.CSVOptions csv_options = 6; + * @return \Google\Cloud\StorageInsights\V1\CSVOptions|null + */ + public function getCsvOptions() + { + return $this->readOneof(6); + } + + public function hasCsvOptions() + { + return $this->hasOneof(6); + } + + /** + * Options for CSV formatted reports. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.CSVOptions csv_options = 6; + * @param \Google\Cloud\StorageInsights\V1\CSVOptions $var + * @return $this + */ + public function setCsvOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\CSVOptions::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Options for Parquet formatted reports. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ParquetOptions parquet_options = 7; + * @return \Google\Cloud\StorageInsights\V1\ParquetOptions|null + */ + public function getParquetOptions() + { + return $this->readOneof(7); + } + + public function hasParquetOptions() + { + return $this->hasOneof(7); + } + + /** + * Options for Parquet formatted reports. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ParquetOptions parquet_options = 7; + * @param \Google\Cloud\StorageInsights\V1\ParquetOptions $var + * @return $this + */ + public function setParquetOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ParquetOptions::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Report for exporting object metadata. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ObjectMetadataReportOptions object_metadata_report_options = 8; + * @return \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions|null + */ + public function getObjectMetadataReportOptions() + { + return $this->readOneof(8); + } + + public function hasObjectMetadataReportOptions() + { + return $this->hasOneof(8); + } + + /** + * Report for exporting object metadata. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ObjectMetadataReportOptions object_metadata_report_options = 8; + * @param \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions $var + * @return $this + */ + public function setObjectMetadataReportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 10; + * @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; + } + + /** + * User provided display name which can be empty and limited to 256 characters + * that is editable. + * + * Generated from protobuf field string display_name = 11; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User provided display name which can be empty and limited to 256 characters + * that is editable. + * + * Generated from protobuf field string display_name = 11; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getReportFormat() + { + return $this->whichOneof("report_format"); + } + + /** + * @return string + */ + public function getReportKind() + { + return $this->whichOneof("report_kind"); + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php new file mode 100644 index 000000000000..82542d8b9d96 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php @@ -0,0 +1,383 @@ +google.cloud.storageinsights.v1.ReportDetail + */ +class ReportDetail extends \Google\Protobuf\Internal\Message +{ + /** + * Name of resource. It will be of form + * projects//locations//reportConfigs//reportDetails/. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The snapshot time. + * All the report data is referenced at this point of time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 2; + */ + protected $snapshot_time = null; + /** + * Prefix of the object name of each report's shard. This will have full + * prefix except the "extension" and "shard_id". + * For example, if the `destination_path` is + * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` + * and the value of `report_path_prefix` field would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. + * + * Generated from protobuf field string report_path_prefix = 8; + */ + protected $report_path_prefix = ''; + /** + * Total shards generated for the report. + * + * Generated from protobuf field int64 shards_count = 9; + */ + protected $shards_count = 0; + /** + * Status of the ReportDetail. + * + * Generated from protobuf field .google.rpc.Status status = 4; + */ + protected $status = null; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * The date for which report is generated. The time part of target_datetime + * will be zero till we support multiple reports per day. + * + * Generated from protobuf field .google.type.DateTime target_datetime = 6; + */ + protected $target_datetime = null; + /** + * Metrics of the report. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportDetail.Metrics report_metrics = 7; + */ + protected $report_metrics = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of resource. It will be of form + * projects//locations//reportConfigs//reportDetails/. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The snapshot time. + * All the report data is referenced at this point of time. + * @type string $report_path_prefix + * Prefix of the object name of each report's shard. This will have full + * prefix except the "extension" and "shard_id". + * For example, if the `destination_path` is + * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` + * and the value of `report_path_prefix` field would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. + * @type int|string $shards_count + * Total shards generated for the report. + * @type \Google\Rpc\Status $status + * Status of the ReportDetail. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type \Google\Type\DateTime $target_datetime + * The date for which report is generated. The time part of target_datetime + * will be zero till we support multiple reports per day. + * @type \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics $report_metrics + * Metrics of the report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Name of resource. It will be of form + * projects//locations//reportConfigs//reportDetails/. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of resource. It will be of form + * projects//locations//reportConfigs//reportDetails/. + * + * 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 snapshot time. + * All the report data is referenced at this point of time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 2; + * @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 snapshot time. + * All the report data is referenced at this point of time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + + /** + * Prefix of the object name of each report's shard. This will have full + * prefix except the "extension" and "shard_id". + * For example, if the `destination_path` is + * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` + * and the value of `report_path_prefix` field would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. + * + * Generated from protobuf field string report_path_prefix = 8; + * @return string + */ + public function getReportPathPrefix() + { + return $this->report_path_prefix; + } + + /** + * Prefix of the object name of each report's shard. This will have full + * prefix except the "extension" and "shard_id". + * For example, if the `destination_path` is + * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` + * and the value of `report_path_prefix` field would be + * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. + * + * Generated from protobuf field string report_path_prefix = 8; + * @param string $var + * @return $this + */ + public function setReportPathPrefix($var) + { + GPBUtil::checkString($var, True); + $this->report_path_prefix = $var; + + return $this; + } + + /** + * Total shards generated for the report. + * + * Generated from protobuf field int64 shards_count = 9; + * @return int|string + */ + public function getShardsCount() + { + return $this->shards_count; + } + + /** + * Total shards generated for the report. + * + * Generated from protobuf field int64 shards_count = 9; + * @param int|string $var + * @return $this + */ + public function setShardsCount($var) + { + GPBUtil::checkInt64($var); + $this->shards_count = $var; + + return $this; + } + + /** + * Status of the ReportDetail. + * + * Generated from protobuf field .google.rpc.Status status = 4; + * @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 ReportDetail. + * + * Generated from protobuf field .google.rpc.Status status = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * 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; + } + + /** + * The date for which report is generated. The time part of target_datetime + * will be zero till we support multiple reports per day. + * + * Generated from protobuf field .google.type.DateTime target_datetime = 6; + * @return \Google\Type\DateTime|null + */ + public function getTargetDatetime() + { + return $this->target_datetime; + } + + public function hasTargetDatetime() + { + return isset($this->target_datetime); + } + + public function clearTargetDatetime() + { + unset($this->target_datetime); + } + + /** + * The date for which report is generated. The time part of target_datetime + * will be zero till we support multiple reports per day. + * + * Generated from protobuf field .google.type.DateTime target_datetime = 6; + * @param \Google\Type\DateTime $var + * @return $this + */ + public function setTargetDatetime($var) + { + GPBUtil::checkMessage($var, \Google\Type\DateTime::class); + $this->target_datetime = $var; + + return $this; + } + + /** + * Metrics of the report. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportDetail.Metrics report_metrics = 7; + * @return \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics|null + */ + public function getReportMetrics() + { + return $this->report_metrics; + } + + public function hasReportMetrics() + { + return isset($this->report_metrics); + } + + public function clearReportMetrics() + { + unset($this->report_metrics); + } + + /** + * Metrics of the report. + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportDetail.Metrics report_metrics = 7; + * @param \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics $var + * @return $this + */ + public function setReportMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics::class); + $this->report_metrics = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php new file mode 100644 index 000000000000..3c8117f9dc2d --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php @@ -0,0 +1,70 @@ +google.cloud.storageinsights.v1.ReportDetail.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * Count of Cloud Storage objects which are part of the report. + * + * Generated from protobuf field int64 processed_records_count = 1; + */ + protected $processed_records_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $processed_records_count + * Count of Cloud Storage objects which are part of the report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Count of Cloud Storage objects which are part of the report. + * + * Generated from protobuf field int64 processed_records_count = 1; + * @return int|string + */ + public function getProcessedRecordsCount() + { + return $this->processed_records_count; + } + + /** + * Count of Cloud Storage objects which are part of the report. + * + * Generated from protobuf field int64 processed_records_count = 1; + * @param int|string $var + * @return $this + */ + public function setProcessedRecordsCount($var) + { + GPBUtil::checkInt64($var); + $this->processed_records_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Metrics::class, \Google\Cloud\StorageInsights\V1\ReportDetail_Metrics::class); + diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php new file mode 100644 index 000000000000..f71297f950de --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php @@ -0,0 +1,230 @@ +google.cloud.storageinsights.v1.UpdateReportConfigRequest + */ +class UpdateReportConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ReportConfig 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.storageinsights.v1.ReportConfig report_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_config = 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\StorageInsights\V1\ReportConfig $reportConfig Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * ReportConfig 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\StorageInsights\V1\UpdateReportConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\StorageInsights\V1\ReportConfig $reportConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setReportConfig($reportConfig) + ->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 + * ReportConfig 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\StorageInsights\V1\ReportConfig $report_config + * 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\Storageinsights\V1\Storageinsights::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ReportConfig 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 + * ReportConfig 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.storageinsights.v1.ReportConfig report_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\StorageInsights\V1\ReportConfig|null + */ + public function getReportConfig() + { + return $this->report_config; + } + + public function hasReportConfig() + { + return isset($this->report_config); + } + + public function clearReportConfig() + { + unset($this->report_config); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\StorageInsights\V1\ReportConfig $var + * @return $this + */ + public function setReportConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ReportConfig::class); + $this->report_config = $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/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php new file mode 100644 index 000000000000..9c3a7c679252 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php @@ -0,0 +1,73 @@ +setParent($formattedParent) + ->setReportConfig($reportConfig); + + // Call the API and handle any network failures. + try { + /** @var ReportConfig $response */ + $response = $storageInsightsClient->createReportConfig($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 = StorageInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + create_report_config_sample($formattedParent); +} +// [END storageinsights_v1_generated_StorageInsights_CreateReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php new file mode 100644 index 000000000000..892d4976a73d --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageInsightsClient->deleteReportConfig($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 = StorageInsightsClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + + delete_report_config_sample($formattedName); +} +// [END storageinsights_v1_generated_StorageInsights_DeleteReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_location.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_location.php new file mode 100644 index 000000000000..5c3dc794f219 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/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 storageinsights_v1_generated_StorageInsights_GetLocation_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php new file mode 100644 index 000000000000..c58cad7be5b9 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReportConfig $response */ + $response = $storageInsightsClient->getReportConfig($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 = StorageInsightsClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + + get_report_config_sample($formattedName); +} +// [END storageinsights_v1_generated_StorageInsights_GetReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php new file mode 100644 index 000000000000..17dde08f6656 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReportDetail $response */ + $response = $storageInsightsClient->getReportDetail($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 = StorageInsightsClient::reportDetailName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]', + '[REPORT_DETAIL]' + ); + + get_report_detail_sample($formattedName); +} +// [END storageinsights_v1_generated_StorageInsights_GetReportDetail_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_locations.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_locations.php new file mode 100644 index 000000000000..4deb67d4fa7f --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/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 storageinsights_v1_generated_StorageInsights_ListLocations_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php new file mode 100644 index 000000000000..483cec7af297 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageInsightsClient->listReportConfigs($request); + + /** @var ReportConfig $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 = StorageInsightsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_report_configs_sample($formattedParent); +} +// [END storageinsights_v1_generated_StorageInsights_ListReportConfigs_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php new file mode 100644 index 000000000000..8604d5298a32 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageInsightsClient->listReportDetails($request); + + /** @var ReportDetail $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 = StorageInsightsClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + + list_report_details_sample($formattedParent); +} +// [END storageinsights_v1_generated_StorageInsights_ListReportDetails_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php new file mode 100644 index 000000000000..61fbbc87a279 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php @@ -0,0 +1,62 @@ +setUpdateMask($updateMask) + ->setReportConfig($reportConfig); + + // Call the API and handle any network failures. + try { + /** @var ReportConfig $response */ + $response = $storageInsightsClient->updateReportConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END storageinsights_v1_generated_StorageInsights_UpdateReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php b/owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php new file mode 100644 index 000000000000..682050739ae6 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php @@ -0,0 +1,504 @@ + createReportConfigAsync(CreateReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReportConfigAsync(DeleteReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReportConfigAsync(GetReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReportDetailAsync(GetReportDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReportConfigsAsync(ListReportConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReportDetailsAsync(ListReportDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReportConfigAsync(UpdateReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class StorageInsightsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.storageinsights.v1.StorageInsights'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'storageinsights.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'storageinsights.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/storage_insights_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_insights_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_insights_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_insights_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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 + * report_config resource. + * + * @param string $project + * @param string $location + * @param string $reportConfig + * + * @return string The formatted report_config resource. + */ + public static function reportConfigName(string $project, string $location, string $reportConfig): string + { + return self::getPathTemplate('reportConfig')->render([ + 'project' => $project, + 'location' => $location, + 'report_config' => $reportConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * report_detail resource. + * + * @param string $project + * @param string $location + * @param string $reportConfig + * @param string $reportDetail + * + * @return string The formatted report_detail resource. + */ + public static function reportDetailName(string $project, string $location, string $reportConfig, string $reportDetail): string + { + return self::getPathTemplate('reportDetail')->render([ + 'project' => $project, + 'location' => $location, + 'report_config' => $reportConfig, + 'report_detail' => $reportDetail, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - reportConfig: projects/{project}/locations/{location}/reportConfigs/{report_config} + * - reportDetail: projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'storageinsights.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new ReportConfig in a given project and location. + * + * The async variant is {@see StorageInsightsClient::createReportConfigAsync()} . + * + * @example samples/V1/StorageInsightsClient/create_report_config.php + * + * @param CreateReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReportConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReportConfig(CreateReportConfigRequest $request, array $callOptions = []): ReportConfig + { + return $this->startApiCall('CreateReportConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ReportConfig. + * + * The async variant is {@see StorageInsightsClient::deleteReportConfigAsync()} . + * + * @example samples/V1/StorageInsightsClient/delete_report_config.php + * + * @param DeleteReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteReportConfig(DeleteReportConfigRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReportConfig', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ReportConfig. + * + * The async variant is {@see StorageInsightsClient::getReportConfigAsync()} . + * + * @example samples/V1/StorageInsightsClient/get_report_config.php + * + * @param GetReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReportConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReportConfig(GetReportConfigRequest $request, array $callOptions = []): ReportConfig + { + return $this->startApiCall('GetReportConfig', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ReportDetail. + * + * The async variant is {@see StorageInsightsClient::getReportDetailAsync()} . + * + * @example samples/V1/StorageInsightsClient/get_report_detail.php + * + * @param GetReportDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReportDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReportDetail(GetReportDetailRequest $request, array $callOptions = []): ReportDetail + { + return $this->startApiCall('GetReportDetail', $request, $callOptions)->wait(); + } + + /** + * Lists ReportConfigs in a given project and location. + * + * The async variant is {@see StorageInsightsClient::listReportConfigsAsync()} . + * + * @example samples/V1/StorageInsightsClient/list_report_configs.php + * + * @param ListReportConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReportConfigs(ListReportConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReportConfigs', $request, $callOptions); + } + + /** + * Lists ReportDetails in a given project and location. + * + * The async variant is {@see StorageInsightsClient::listReportDetailsAsync()} . + * + * @example samples/V1/StorageInsightsClient/list_report_details.php + * + * @param ListReportDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReportDetails(ListReportDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReportDetails', $request, $callOptions); + } + + /** + * Updates the parameters of a single ReportConfig. + * + * The async variant is {@see StorageInsightsClient::updateReportConfigAsync()} . + * + * @example samples/V1/StorageInsightsClient/update_report_config.php + * + * @param UpdateReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReportConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateReportConfig(UpdateReportConfigRequest $request, array $callOptions = []): ReportConfig + { + return $this->startApiCall('UpdateReportConfig', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see StorageInsightsClient::getLocationAsync()} . + * + * @example samples/V1/StorageInsightsClient/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 StorageInsightsClient::listLocationsAsync()} . + * + * @example samples/V1/StorageInsightsClient/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/StorageInsights/v1/src/V1/gapic_metadata.json b/owl-bot-staging/StorageInsights/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..c56c7e00942e --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/src/V1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.storageinsights.v1", + "libraryPackage": "Google\\Cloud\\StorageInsights\\V1", + "services": { + "StorageInsights": { + "clients": { + "grpc": { + "libraryClient": "StorageInsightsGapicClient", + "rpcs": { + "CreateReportConfig": { + "methods": [ + "createReportConfig" + ] + }, + "DeleteReportConfig": { + "methods": [ + "deleteReportConfig" + ] + }, + "GetReportConfig": { + "methods": [ + "getReportConfig" + ] + }, + "GetReportDetail": { + "methods": [ + "getReportDetail" + ] + }, + "ListReportConfigs": { + "methods": [ + "listReportConfigs" + ] + }, + "ListReportDetails": { + "methods": [ + "listReportDetails" + ] + }, + "UpdateReportConfig": { + "methods": [ + "updateReportConfig" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json new file mode 100644 index 000000000000..29d201413a81 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.storageinsights.v1.StorageInsights": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "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 + } + }, + "methods": { + "CreateReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetReportDetail": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReportConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReportDetails": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php new file mode 100644 index 000000000000..2db16c29fda1 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php @@ -0,0 +1,168 @@ + [ + 'google.cloud.storageinsights.v1.StorageInsights' => [ + 'CreateReportConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportConfig', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteReportConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReportConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReportDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListReportConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReportConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\StorageInsights\V1\ListReportConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReportDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReportDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\StorageInsights\V1\ListReportDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateReportConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportConfig', + 'headerParams' => [ + [ + 'keyName' => 'report_config.name', + 'fieldAccessors' => [ + 'getReportConfig', + 'getName', + ], + ], + ], + ], + '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' => [ + 'location' => 'projects/{project}/locations/{location}', + 'reportConfig' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}', + 'reportDetail' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail}', + ], + ], + ], +]; diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php new file mode 100644 index 000000000000..85d5310815ca --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php @@ -0,0 +1,183 @@ + [ + '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.storageinsights.v1.StorageInsights' => [ + 'CreateReportConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', + 'body' => 'report_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteReportConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReportConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReportDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*/reportDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListReportConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReportDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reportConfigs/*}/reportDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateReportConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{report_config.name=projects/*/locations/*/reportConfigs/*}', + 'body' => 'report_config', + 'placeholders' => [ + 'report_config.name' => [ + 'getters' => [ + 'getReportConfig', + '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/*}', + '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/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php b/owl-bot-staging/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php new file mode 100644 index 000000000000..551f6aed5cd3 --- /dev/null +++ b/owl-bot-staging/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php @@ -0,0 +1,719 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StorageInsightsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StorageInsightsClient($options); + } + + /** @test */ + public function createReportConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ReportConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $reportConfig = new ReportConfig(); + $request = (new CreateReportConfigRequest()) + ->setParent($formattedParent) + ->setReportConfig($reportConfig); + $response = $gapicClient->createReportConfig($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.storageinsights.v1.StorageInsights/CreateReportConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReportConfig(); + $this->assertProtobufEquals($reportConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReportConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $reportConfig = new ReportConfig(); + $request = (new CreateReportConfigRequest()) + ->setParent($formattedParent) + ->setReportConfig($reportConfig); + try { + $gapicClient->createReportConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReportConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new DeleteReportConfigRequest()) + ->setName($formattedName); + $gapicClient->deleteReportConfig($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.storageinsights.v1.StorageInsights/DeleteReportConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReportConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new DeleteReportConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteReportConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ReportConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new GetReportConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getReportConfig($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.storageinsights.v1.StorageInsights/GetReportConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new GetReportConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getReportConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $reportPathPrefix = 'reportPathPrefix39964001'; + $shardsCount = 2027352923; + $expectedResponse = new ReportDetail(); + $expectedResponse->setName($name2); + $expectedResponse->setReportPathPrefix($reportPathPrefix); + $expectedResponse->setShardsCount($shardsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reportDetailName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT_DETAIL]'); + $request = (new GetReportDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getReportDetail($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.storageinsights.v1.StorageInsights/GetReportDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reportDetailName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT_DETAIL]'); + $request = (new GetReportDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getReportDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reportConfigsElement = new ReportConfig(); + $reportConfigs = [ + $reportConfigsElement, + ]; + $expectedResponse = new ListReportConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReportConfigs($reportConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListReportConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReportConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReportConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.storageinsights.v1.StorageInsights/ListReportConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListReportConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReportConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reportDetailsElement = new ReportDetail(); + $reportDetails = [ + $reportDetailsElement, + ]; + $expectedResponse = new ListReportDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReportDetails($reportDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new ListReportDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReportDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReportDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.storageinsights.v1.StorageInsights/ListReportDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new ListReportDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReportDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReportConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ReportConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $reportConfig = new ReportConfig(); + $request = (new UpdateReportConfigRequest()) + ->setUpdateMask($updateMask) + ->setReportConfig($reportConfig); + $response = $gapicClient->updateReportConfig($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.storageinsights.v1.StorageInsights/UpdateReportConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getReportConfig(); + $this->assertProtobufEquals($reportConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateReportConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $reportConfig = new ReportConfig(); + $request = (new UpdateReportConfigRequest()) + ->setUpdateMask($updateMask) + ->setReportConfig($reportConfig); + try { + $gapicClient->updateReportConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createReportConfigAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ReportConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $reportConfig = new ReportConfig(); + $request = (new CreateReportConfigRequest()) + ->setParent($formattedParent) + ->setReportConfig($reportConfig); + $response = $gapicClient->createReportConfigAsync($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.storageinsights.v1.StorageInsights/CreateReportConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReportConfig(); + $this->assertProtobufEquals($reportConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php b/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php new file mode 100644 index 000000000000..97a74f5c6dce --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php @@ -0,0 +1,112 @@ +internalAddGeneratedFile( + ' +é" +(google/storagetransfer/v1/transfer.protogoogle.storagetransfer.v1google/api/client.protogoogle/api/field_behavior.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto.google/storagetransfer/v1/transfer_types.proto"9 +GetGoogleServiceAccountRequest + +project_id ( BàA"] +CreateTransferJobRequestA + transfer_job ( 2&.google.storagetransfer.v1.TransferJobBàA"Ñ +UpdateTransferJobRequest +job_name ( BàA + +project_id ( BàAA + transfer_job ( 2&.google.storagetransfer.v1.TransferJobBàAB +update_transfer_job_field_mask ( 2.google.protobuf.FieldMask"G +GetTransferJobRequest +job_name ( BàA + +project_id ( BàA"J +DeleteTransferJobRequest +job_name ( BàA + +project_id ( BàA"U +ListTransferJobsRequest +filter ( BàA + page_size ( + +page_token ( "r +ListTransferJobsResponse= + transfer_jobs ( 2&.google.storagetransfer.v1.TransferJob +next_page_token ( "2 +PauseTransferOperationRequest +name ( BàA"3 +ResumeTransferOperationRequest +name ( BàA"G +RunTransferJobRequest +job_name ( BàA + +project_id ( BàA"Œ +CreateAgentPoolRequest + +project_id ( BàA= + +agent_pool ( 2$.google.storagetransfer.v1.AgentPoolBàA + agent_pool_id ( BàA"ˆ +UpdateAgentPoolRequest= + +agent_pool ( 2$.google.storagetransfer.v1.AgentPoolBàA/ + update_mask ( 2.google.protobuf.FieldMask"( +GetAgentPoolRequest +name ( BàA"+ +DeleteAgentPoolRequest +name ( BàA"g +ListAgentPoolsRequest + +project_id ( BàA +filter (  + page_size ( + +page_token ( "l +ListAgentPoolsResponse9 + agent_pools ( 2$.google.storagetransfer.v1.AgentPool +next_page_token ( 2‘ +StorageTransferServiceµ +GetGoogleServiceAccount9.google.storagetransfer.v1.GetGoogleServiceAccountRequest/.google.storagetransfer.v1.GoogleServiceAccount".‚Óä“(&/v1/googleServiceAccounts/{project_id}˜ +CreateTransferJob3.google.storagetransfer.v1.CreateTransferJobRequest&.google.storagetransfer.v1.TransferJob"&‚Óä“ "/v1/transferJobs: transfer_job› +UpdateTransferJob3.google.storagetransfer.v1.UpdateTransferJobRequest&.google.storagetransfer.v1.TransferJob")‚Óä“#2/v1/{job_name=transferJobs/**}:*’ +GetTransferJob0.google.storagetransfer.v1.GetTransferJobRequest&.google.storagetransfer.v1.TransferJob"&‚Óä“ /v1/{job_name=transferJobs/**}• +ListTransferJobs2.google.storagetransfer.v1.ListTransferJobsRequest3.google.storagetransfer.v1.ListTransferJobsResponse"‚Óä“/v1/transferJobs +PauseTransferOperation8.google.storagetransfer.v1.PauseTransferOperationRequest.google.protobuf.Empty"1‚Óä“+"&/v1/{name=transferOperations/**}:pause:*  +ResumeTransferOperation9.google.storagetransfer.v1.ResumeTransferOperationRequest.google.protobuf.Empty"2‚Óä“,"\'/v1/{name=transferOperations/**}:resume:*½ +RunTransferJob0.google.storagetransfer.v1.RunTransferJobRequest.google.longrunning.Operation"ZÊA* +google.protobuf.EmptyTransferOperation‚Óä“\'""/v1/{job_name=transferJobs/**}:run:*ˆ +DeleteTransferJob3.google.storagetransfer.v1.DeleteTransferJobRequest.google.protobuf.Empty"&‚Óä“ */v1/{job_name=transferJobs/**}Ì +CreateAgentPool1.google.storagetransfer.v1.CreateAgentPoolRequest$.google.storagetransfer.v1.AgentPool"`ÚA#project_id,agent_pool,agent_pool_id‚Óä“4"&/v1/projects/{project_id=*}/agentPools: +agent_poolÆ +UpdateAgentPool1.google.storagetransfer.v1.UpdateAgentPoolRequest$.google.storagetransfer.v1.AgentPool"ZÚAagent_pool,update_mask‚Óä“;2-/v1/{agent_pool.name=projects/*/agentPools/*}: +agent_pool— + GetAgentPool..google.storagetransfer.v1.GetAgentPoolRequest$.google.storagetransfer.v1.AgentPool"1ÚAname‚Óä“$"/v1/{name=projects/*/agentPools/*}² +ListAgentPools0.google.storagetransfer.v1.ListAgentPoolsRequest1.google.storagetransfer.v1.ListAgentPoolsResponse";ÚA +project_id‚Óä“(&/v1/projects/{project_id=*}/agentPools +DeleteAgentPool1.google.storagetransfer.v1.DeleteAgentPoolRequest.google.protobuf.Empty"1ÚAname‚Óä“$*"/v1/{name=projects/*/agentPools/*}RÊAstoragetransfer.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBï +#com.google.storagetransfer.v1.protoB TransferProtoZMcloud.google.com/go/storagetransfer/apiv1/storagetransferpb;storagetransferpbøªGoogle.Cloud.StorageTransfer.V1ÊGoogle\\Cloud\\StorageTransfer\\V1ê"Google::Cloud::StorageTransfer::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/TransferTypes.php b/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/TransferTypes.php new file mode 100644 index 0000000000000000000000000000000000000000..120c424a099b5abc02951e4accf72f15d3591f64 GIT binary patch literal 10789 zcmb_iPjlNyb{`3nEImq;1j{z9@z^x%osnl|shCc7r{wX>f+Qr-qDT%w+0m9#2t+m| zj6nhcK-t`>sZ^yZxuj|@x#X5pE;;23N`WP!?yA#j&owOO+Rov^MnPSIq;Ej^X&O%^tTa=T;>r5~yDy;2rr`DNwW_6g_ z={UndAm4!{Q~YVLzG>OHsr=N&f-D30!{hH+CorsTZkooF*RZI*_mPqL{vI32>zoyT z81LAK$T(|B`kgv0KZI4EbkwSny5X2%L9p z5U2h3X;^9Sy_B6n7Xykj@Z~+&=vxDWj%hI4bbZz}dLhwEck-uYD@1D_x`K*j?rsue7SLAo7gxxyK-PTk zCv7BCJo+p;^F@~{#Ep=wX-1yh<_gSvj?E0y8}RKckTrH}XV~p|&LA+l4jTG^t7w7v zr{qTyP|^^>Oj6=QyZz z%fn#ecq4IAC5O_wJz;;*_3`+j{L>WN=C)Htu!9baW_5)XMf^NWVMLo}gRbjfJ`i>* zPMd`}kDXxb;9j*LZ$rj^Ve~`9!}XFWZl>s0e{sH{2q@vbFT+w7od|v1IkV6ul>eE9 zwaaMb24u`(a7t^QIwD$Ti(5Bbv7n*|TplIJIxKnY&xRNZDBdxf8%ehK^-V>#gphrb zA%6$+JYgZ~MhI4Xp)pB-eAc_{*D$tf93buu}Q}F$H`K_tb;- zuCcGRcN-PspsqKya&^0^RaQQd^Y9=(slL?>y}DCZ+XpSpc=LxVQ&&(FSEdyo7AKVR z3EXdK-yLXr+t_bZv|3`xPeGZSep79=57e5m+tAxu#n9V_H4PVj0J%xJri!N!v(w7= zu$d0>y5--PCcp`*7#dIXvKNxD~1vv%p%diU(7h z)x@!G!!n;~lwND)wr;#BqRC-5wp&FX2NnjOF&SO-y!;%VCCD)8_65k z#EA-x=s0hYU#`GP6xa<%oH?|KH0z3jdZ;Dk0G1}jK7{qg8?E)WRmBT`yQ|d`x4r}m zmFo7k*3#;2y!Hi{t!qe+mkuze*50az`ii9d<2)=z+t*#zkzc~nNyj&M7U2q~<7bLW z%JDH+A?%=(8)IMM>}e-WBxw}$3YO3Jz*`CY+OM~ZDY*nP;W$jF;uJ!HfXYu( z&cX9MW%u1F`CC{yMSL+Kfg(hv_#{O_1W8c94y?viA@-2Hu`;IQLwG0v*fHWZBSLEN zlM(1kM+=wXKHTG5_#{*mwQ>ZynK)?Ns~P(TeHk_GT8 zy3e{6VO)M>+X>646)x^NW;u=MYE{G)1EFVFvxP30hG8$1dFaXG5+m|tQQM^1cjR7C zyu;m$r67*CdI*_v%ltTLyNSf?hb&k}+>HVmg=7(Ad6rv6VGEeo*T{j5SP15`GR>AU zupn#*NlHtQi5XPs0j&SD=9T}>z;Yrw$z{0ZkNS2LptHqdip?aL3%cM$x1S;87y`#M z^qZ7GU=bsibb@t1d1bTf(^+v`i7RJ1EOiy4*f$d1ZF7jhMz4flo`zpM?%od;D z;Bxo+yggHcMcy63DiVFUn_J+w^ott^qBa9IXo#DDVq`S;;I@9aU#r&l68R4yVKkxd zRhyUs*I*?YX|^<7YrWABD1HMo+G#Gidcmu{xin^6-Z=22utz51UJGf z8Vs4U0Q9SVuwSA)tRN>@4|3vv7ddJ0oRfZyIh!Dn=^&?CPGWBb9@1b1%YrJ_7u81H zC>@mdv^EZHs|Pg#1E?FKiJjsSghDGZh-ts8Mv zTib8qQCo*t8r70Ffd-bC4=)Aly~M=%sT2d|Ld!?~y?x!-(+(3V#QH3nNL3yhW<(cT zz=llBBdCaLSNHL*2P7Ful4OKVF2dKe)gXYmxpTf$8{DYmX zaW)pslE0jWdA)PWxn2TXYfRQs( z#QC(QtMYeKkkQUCC+h(Qtp2$AjJ2d+!aYV5s2U;(HALGAn`>!()?dMc31;@ewZvl! zKUk=O6bZ`jX3>1YN3++?F?HY0yR8^kGTrbEi&|8?Xr{{ZyvXBAEXd!$(iqD4SUvFk zc}2rCT9#KEui^H<3C7KF!e>3}B$vVLkSYE=y2CI(MoZyKN1-0$!bUtY$-jcE?VOxY zu^5UGaC;*~OieI^68;G0BkK#{VH(&UTl&|q7{87X%YB-%Y}`0r!5kWKF!aO3pLXg< zcX(yI=`i%=U%(R2sd!Q1@~KgrDW+V$XjFU)cVoSJ0jh-nQBGVb02k)9^>|@Q>DO5J z6S!lezhj%wap`@T__^&ZBL9N23v<-Wz?0ntnYtMV$<%`l46Uw~YS_S-;thqrxE3EF&T1Jec10KjFO)L z2s(QB;vpcfjse!KVS>anurkG};d?V2r zlz*N(kHlr_)ickRAH)5qZ_>jtd=EMAa`4?s*igTBJVLGGQ%RD5Z&7{<4<=!bcep{_l`#0tr?EOfnrPMp)SS12Y_hWs|@3D2wK_2DV1?A7L1bNGlsn+RvaR)m!6phdfo9cni zLl45dC`?H-5!&Yr;lC&V&C&!ujvgS#oQ$m({Q%!%>lJzgyH)zHDR_cC@04hZwNBua zmLkni)b@Y9&p+IVxac+P#Mw-QYWnyJKX6Qpy2mdsjQsD^)IUr=5+6bp%JfMH-X8x_ zGFr9p=J~%y6h}v#&^4yIew-WpN&63`%-*f Y82cKLBB0f|tKYNKa6aWAK literal 0 HcmV?d00001 diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php new file mode 100644 index 000000000000..f7d504146c20 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php @@ -0,0 +1,187 @@ +google.storagetransfer.v1.AgentPool + */ +class AgentPool extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies a unique string that identifies the agent pool. + * Format: `projects/{project_id}/agentPools/{agent_pool_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Specifies the client-specified AgentPool description. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Output only. Specifies the state of the AgentPool. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Specifies the bandwidth limit details. If this field is unspecified, the + * default value is set as 'No Limit'. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool.BandwidthLimit bandwidth_limit = 5; + */ + protected $bandwidth_limit = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Specifies a unique string that identifies the agent pool. + * Format: `projects/{project_id}/agentPools/{agent_pool_id}` + * @type string $display_name + * Specifies the client-specified AgentPool description. + * @type int $state + * Output only. Specifies the state of the AgentPool. + * @type \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit $bandwidth_limit + * Specifies the bandwidth limit details. If this field is unspecified, the + * default value is set as 'No Limit'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies a unique string that identifies the agent pool. + * Format: `projects/{project_id}/agentPools/{agent_pool_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Specifies a unique string that identifies the agent pool. + * Format: `projects/{project_id}/agentPools/{agent_pool_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Specifies the client-specified AgentPool description. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Specifies the client-specified AgentPool description. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Specifies the state of the AgentPool. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Specifies the state of the AgentPool. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\AgentPool\State::class); + $this->state = $var; + + return $this; + } + + /** + * Specifies the bandwidth limit details. If this field is unspecified, the + * default value is set as 'No Limit'. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool.BandwidthLimit bandwidth_limit = 5; + * @return \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit|null + */ + public function getBandwidthLimit() + { + return $this->bandwidth_limit; + } + + public function hasBandwidthLimit() + { + return isset($this->bandwidth_limit); + } + + public function clearBandwidthLimit() + { + unset($this->bandwidth_limit); + } + + /** + * Specifies the bandwidth limit details. If this field is unspecified, the + * default value is set as 'No Limit'. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool.BandwidthLimit bandwidth_limit = 5; + * @param \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit $var + * @return $this + */ + public function setBandwidthLimit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit::class); + $this->bandwidth_limit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php new file mode 100644 index 000000000000..efbd0af7ea7f --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php @@ -0,0 +1,74 @@ +google.storagetransfer.v1.AgentPool.BandwidthLimit + */ +class BandwidthLimit extends \Google\Protobuf\Internal\Message +{ + /** + * Bandwidth rate in megabytes per second, distributed across all the agents + * in the pool. + * + * Generated from protobuf field int64 limit_mbps = 1; + */ + protected $limit_mbps = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $limit_mbps + * Bandwidth rate in megabytes per second, distributed across all the agents + * in the pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Bandwidth rate in megabytes per second, distributed across all the agents + * in the pool. + * + * Generated from protobuf field int64 limit_mbps = 1; + * @return int|string + */ + public function getLimitMbps() + { + return $this->limit_mbps; + } + + /** + * Bandwidth rate in megabytes per second, distributed across all the agents + * in the pool. + * + * Generated from protobuf field int64 limit_mbps = 1; + * @param int|string $var + * @return $this + */ + public function setLimitMbps($var) + { + GPBUtil::checkInt64($var); + $this->limit_mbps = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BandwidthLimit::class, \Google\Cloud\StorageTransfer\V1\AgentPool_BandwidthLimit::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php new file mode 100644 index 000000000000..3677f8fd9b0d --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php @@ -0,0 +1,74 @@ +google.storagetransfer.v1.AgentPool.State + */ +class State +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * This is an initialization state. During this stage, resources are + * allocated for the AgentPool. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Determines that the AgentPool is created for use. At this state, Agents + * can join the AgentPool and participate in the transfer jobs in that pool. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * Determines that the AgentPool deletion has been initiated, and all the + * resources are scheduled to be cleaned up and freed. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\StorageTransfer\V1\AgentPool_State::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php new file mode 100644 index 000000000000..9a5486d994d5 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php @@ -0,0 +1,109 @@ +google.storagetransfer.v1.AwsAccessKey + */ +class AwsAccessKey extends \Google\Protobuf\Internal\Message +{ + /** + * Required. AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $access_key_id = ''; + /** + * Required. AWS secret access key. This field is not returned in RPC + * responses. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $secret_access_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_key_id + * Required. AWS access key ID. + * @type string $secret_access_key + * Required. AWS secret access key. This field is not returned in RPC + * responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAccessKeyId() + { + return $this->access_key_id; + } + + /** + * Required. AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAccessKeyId($var) + { + GPBUtil::checkString($var, True); + $this->access_key_id = $var; + + return $this; + } + + /** + * Required. AWS secret access key. This field is not returned in RPC + * responses. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSecretAccessKey() + { + return $this->secret_access_key; + } + + /** + * Required. AWS secret access key. This field is not returned in RPC + * responses. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSecretAccessKey($var) + { + GPBUtil::checkString($var, True); + $this->secret_access_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php new file mode 100644 index 000000000000..18827d4e76a6 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php @@ -0,0 +1,227 @@ +google.storagetransfer.v1.AwsS3CompatibleData + */ +class AwsS3CompatibleData extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies the name of the bucket. + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket_name = ''; + /** + * Specifies the root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This + * field is treated as an object prefix. As such, it should generally not + * begin with a '/'. + * + * Generated from protobuf field string path = 2; + */ + protected $path = ''; + /** + * Required. Specifies the endpoint of the storage service. + * + * Generated from protobuf field string endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint = ''; + /** + * Specifies the region to sign requests with. This can be left blank if + * requests should be signed with an empty region. + * + * Generated from protobuf field string region = 5; + */ + protected $region = ''; + protected $data_provider; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket_name + * Required. Specifies the name of the bucket. + * @type string $path + * Specifies the root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This + * field is treated as an object prefix. As such, it should generally not + * begin with a '/'. + * @type string $endpoint + * Required. Specifies the endpoint of the storage service. + * @type string $region + * Specifies the region to sign requests with. This can be left blank if + * requests should be signed with an empty region. + * @type \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata $s3_metadata + * A S3 compatible metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies the name of the bucket. + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucketName() + { + return $this->bucket_name; + } + + /** + * Required. Specifies the name of the bucket. + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucketName($var) + { + GPBUtil::checkString($var, True); + $this->bucket_name = $var; + + return $this; + } + + /** + * Specifies the root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This + * field is treated as an object prefix. As such, it should generally not + * begin with a '/'. + * + * Generated from protobuf field string path = 2; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Specifies the root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This + * field is treated as an object prefix. As such, it should generally not + * begin with a '/'. + * + * Generated from protobuf field string path = 2; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Required. Specifies the endpoint of the storage service. + * + * Generated from protobuf field string endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Required. Specifies the endpoint of the storage service. + * + * Generated from protobuf field string endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Specifies the region to sign requests with. This can be left blank if + * requests should be signed with an empty region. + * + * Generated from protobuf field string region = 5; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Specifies the region to sign requests with. This can be left blank if + * requests should be signed with an empty region. + * + * Generated from protobuf field string region = 5; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * A S3 compatible metadata. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata s3_metadata = 4; + * @return \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata|null + */ + public function getS3Metadata() + { + return $this->readOneof(4); + } + + public function hasS3Metadata() + { + return $this->hasOneof(4); + } + + /** + * A S3 compatible metadata. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata s3_metadata = 4; + * @param \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata $var + * @return $this + */ + public function setS3Metadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getDataProvider() + { + return $this->whichOneof("data_provider"); + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php new file mode 100644 index 000000000000..21d2a93d42e6 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php @@ -0,0 +1,445 @@ +google.storagetransfer.v1.AwsS3Data + */ +class AwsS3Data extends \Google\Protobuf\Internal\Message +{ + /** + * Required. S3 Bucket name (see + * [Creating a + * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket_name = ''; + /** + * Input only. AWS access key used to sign the API requests to the AWS S3 + * bucket. Permissions on the bucket must be granted to the access ID of the + * AWS access key. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * + * Generated from protobuf field .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $aws_access_key = null; + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * + * Generated from protobuf field string path = 3; + */ + protected $path = ''; + /** + * The Amazon Resource Name (ARN) of the role to support temporary + * credentials via `AssumeRoleWithWebIdentity`. For more information about + * ARNs, see [IAM + * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). + * When a role ARN is provided, Transfer Service fetches temporary + * credentials for the session using a `AssumeRoleWithWebIdentity` call for + * the provided role using the + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for + * this project. + * + * Generated from protobuf field string role_arn = 4; + */ + protected $role_arn = ''; + /** + * Optional. The CloudFront distribution domain name pointing to this bucket, + * to use when fetching. + * See + * [Transfer from S3 via + * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) + * for more information. + * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must + * begin with `https://`. + * + * Generated from protobuf field string cloudfront_domain = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloudfront_domain = ''; + /** + * Optional. The Resource name of a secret in Secret Manager. + * AWS credentials must be stored in Secret Manager in JSON format: + * { + * "access_key_id": "ACCESS_KEY_ID", + * "secret_access_key": "SECRET_ACCESS_KEY" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Amazon S3] + * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or + * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * + * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $credentials_secret = ''; + protected $private_network; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket_name + * Required. S3 Bucket name (see + * [Creating a + * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + * @type \Google\Cloud\StorageTransfer\V1\AwsAccessKey $aws_access_key + * Input only. AWS access key used to sign the API requests to the AWS S3 + * bucket. Permissions on the bucket must be granted to the access ID of the + * AWS access key. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * @type string $path + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * @type string $role_arn + * The Amazon Resource Name (ARN) of the role to support temporary + * credentials via `AssumeRoleWithWebIdentity`. For more information about + * ARNs, see [IAM + * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). + * When a role ARN is provided, Transfer Service fetches temporary + * credentials for the session using a `AssumeRoleWithWebIdentity` call for + * the provided role using the + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for + * this project. + * @type string $cloudfront_domain + * Optional. The CloudFront distribution domain name pointing to this bucket, + * to use when fetching. + * See + * [Transfer from S3 via + * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) + * for more information. + * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must + * begin with `https://`. + * @type string $credentials_secret + * Optional. The Resource name of a secret in Secret Manager. + * AWS credentials must be stored in Secret Manager in JSON format: + * { + * "access_key_id": "ACCESS_KEY_ID", + * "secret_access_key": "SECRET_ACCESS_KEY" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Amazon S3] + * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or + * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * @type bool $managed_private_network + * Egress bytes over a Google-managed private network. + * This network is shared between other users of Storage Transfer Service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. S3 Bucket name (see + * [Creating a + * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucketName() + { + return $this->bucket_name; + } + + /** + * Required. S3 Bucket name (see + * [Creating a + * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucketName($var) + { + GPBUtil::checkString($var, True); + $this->bucket_name = $var; + + return $this; + } + + /** + * Input only. AWS access key used to sign the API requests to the AWS S3 + * bucket. Permissions on the bucket must be granted to the access ID of the + * AWS access key. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * + * Generated from protobuf field .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Cloud\StorageTransfer\V1\AwsAccessKey|null + */ + public function getAwsAccessKey() + { + return $this->aws_access_key; + } + + public function hasAwsAccessKey() + { + return isset($this->aws_access_key); + } + + public function clearAwsAccessKey() + { + unset($this->aws_access_key); + } + + /** + * Input only. AWS access key used to sign the API requests to the AWS S3 + * bucket. Permissions on the bucket must be granted to the access ID of the + * AWS access key. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * + * Generated from protobuf field .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Cloud\StorageTransfer\V1\AwsAccessKey $var + * @return $this + */ + public function setAwsAccessKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AwsAccessKey::class); + $this->aws_access_key = $var; + + return $this; + } + + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * + * Generated from protobuf field string path = 3; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * + * Generated from protobuf field string path = 3; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * The Amazon Resource Name (ARN) of the role to support temporary + * credentials via `AssumeRoleWithWebIdentity`. For more information about + * ARNs, see [IAM + * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). + * When a role ARN is provided, Transfer Service fetches temporary + * credentials for the session using a `AssumeRoleWithWebIdentity` call for + * the provided role using the + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for + * this project. + * + * Generated from protobuf field string role_arn = 4; + * @return string + */ + public function getRoleArn() + { + return $this->role_arn; + } + + /** + * The Amazon Resource Name (ARN) of the role to support temporary + * credentials via `AssumeRoleWithWebIdentity`. For more information about + * ARNs, see [IAM + * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). + * When a role ARN is provided, Transfer Service fetches temporary + * credentials for the session using a `AssumeRoleWithWebIdentity` call for + * the provided role using the + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for + * this project. + * + * Generated from protobuf field string role_arn = 4; + * @param string $var + * @return $this + */ + public function setRoleArn($var) + { + GPBUtil::checkString($var, True); + $this->role_arn = $var; + + return $this; + } + + /** + * Optional. The CloudFront distribution domain name pointing to this bucket, + * to use when fetching. + * See + * [Transfer from S3 via + * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) + * for more information. + * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must + * begin with `https://`. + * + * Generated from protobuf field string cloudfront_domain = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCloudfrontDomain() + { + return $this->cloudfront_domain; + } + + /** + * Optional. The CloudFront distribution domain name pointing to this bucket, + * to use when fetching. + * See + * [Transfer from S3 via + * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) + * for more information. + * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must + * begin with `https://`. + * + * Generated from protobuf field string cloudfront_domain = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCloudfrontDomain($var) + { + GPBUtil::checkString($var, True); + $this->cloudfront_domain = $var; + + return $this; + } + + /** + * Optional. The Resource name of a secret in Secret Manager. + * AWS credentials must be stored in Secret Manager in JSON format: + * { + * "access_key_id": "ACCESS_KEY_ID", + * "secret_access_key": "SECRET_ACCESS_KEY" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Amazon S3] + * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or + * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * + * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCredentialsSecret() + { + return $this->credentials_secret; + } + + /** + * Optional. The Resource name of a secret in Secret Manager. + * AWS credentials must be stored in Secret Manager in JSON format: + * { + * "access_key_id": "ACCESS_KEY_ID", + * "secret_access_key": "SECRET_ACCESS_KEY" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Amazon S3] + * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or + * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * + * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCredentialsSecret($var) + { + GPBUtil::checkString($var, True); + $this->credentials_secret = $var; + + return $this; + } + + /** + * Egress bytes over a Google-managed private network. + * This network is shared between other users of Storage Transfer Service. + * + * Generated from protobuf field bool managed_private_network = 8; + * @return bool + */ + public function getManagedPrivateNetwork() + { + return $this->readOneof(8); + } + + public function hasManagedPrivateNetwork() + { + return $this->hasOneof(8); + } + + /** + * Egress bytes over a Google-managed private network. + * This network is shared between other users of Storage Transfer Service. + * + * Generated from protobuf field bool managed_private_network = 8; + * @param bool $var + * @return $this + */ + public function setManagedPrivateNetwork($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getPrivateNetwork() + { + return $this->whichOneof("private_network"); + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php new file mode 100644 index 000000000000..24b3b9fab1b2 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php @@ -0,0 +1,291 @@ +google.storagetransfer.v1.AzureBlobStorageData + */ +class AzureBlobStorageData extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Azure Storage account. + * + * Generated from protobuf field string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_account = ''; + /** + * Required. Input only. Credentials used to authenticate API requests to + * Azure. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * + * Generated from protobuf field .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $azure_credentials = null; + /** + * Required. The container to transfer from the Azure Storage account. + * + * Generated from protobuf field string container = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $container = ''; + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * + * Generated from protobuf field string path = 5; + */ + protected $path = ''; + /** + * Optional. The Resource name of a secret in Secret Manager. + * The Azure SAS token must be stored in Secret Manager in JSON format: + * { + * "sas_token" : "SAS_TOKEN" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Microsoft Azure Blob Storage] + * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * + * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $credentials_secret = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $storage_account + * Required. The name of the Azure Storage account. + * @type \Google\Cloud\StorageTransfer\V1\AzureCredentials $azure_credentials + * Required. Input only. Credentials used to authenticate API requests to + * Azure. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * @type string $container + * Required. The container to transfer from the Azure Storage account. + * @type string $path + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * @type string $credentials_secret + * Optional. The Resource name of a secret in Secret Manager. + * The Azure SAS token must be stored in Secret Manager in JSON format: + * { + * "sas_token" : "SAS_TOKEN" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Microsoft Azure Blob Storage] + * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Azure Storage account. + * + * Generated from protobuf field string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStorageAccount() + { + return $this->storage_account; + } + + /** + * Required. The name of the Azure Storage account. + * + * Generated from protobuf field string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStorageAccount($var) + { + GPBUtil::checkString($var, True); + $this->storage_account = $var; + + return $this; + } + + /** + * Required. Input only. Credentials used to authenticate API requests to + * Azure. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * + * Generated from protobuf field .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Cloud\StorageTransfer\V1\AzureCredentials|null + */ + public function getAzureCredentials() + { + return $this->azure_credentials; + } + + public function hasAzureCredentials() + { + return isset($this->azure_credentials); + } + + public function clearAzureCredentials() + { + unset($this->azure_credentials); + } + + /** + * Required. Input only. Credentials used to authenticate API requests to + * Azure. + * For information on our data retention policy for user credentials, see + * [User credentials](/storage-transfer/docs/data-retention#user-credentials). + * + * Generated from protobuf field .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Cloud\StorageTransfer\V1\AzureCredentials $var + * @return $this + */ + public function setAzureCredentials($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AzureCredentials::class); + $this->azure_credentials = $var; + + return $this; + } + + /** + * Required. The container to transfer from the Azure Storage account. + * + * Generated from protobuf field string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContainer() + { + return $this->container; + } + + /** + * Required. The container to transfer from the Azure Storage account. + * + * Generated from protobuf field string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkString($var, True); + $this->container = $var; + + return $this; + } + + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * + * Generated from protobuf field string path = 5; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * + * Generated from protobuf field string path = 5; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. The Resource name of a secret in Secret Manager. + * The Azure SAS token must be stored in Secret Manager in JSON format: + * { + * "sas_token" : "SAS_TOKEN" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Microsoft Azure Blob Storage] + * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * + * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCredentialsSecret() + { + return $this->credentials_secret; + } + + /** + * Optional. The Resource name of a secret in Secret Manager. + * The Azure SAS token must be stored in Secret Manager in JSON format: + * { + * "sas_token" : "SAS_TOKEN" + * } + * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must + * be granted `roles/secretmanager.secretAccessor` for the resource. + * See [Configure access to a source: Microsoft Azure Blob Storage] + * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) + * for more information. + * If `credentials_secret` is specified, do not specify + * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. + * Format: `projects/{project_number}/secrets/{secret_name}` + * + * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCredentialsSecret($var) + { + GPBUtil::checkString($var, True); + $this->credentials_secret = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php new file mode 100644 index 000000000000..3195617e14c0 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php @@ -0,0 +1,85 @@ +google.storagetransfer.v1.AzureCredentials + */ +class AzureCredentials extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Azure shared access signature (SAS). + * For more information about SAS, see + * [Grant limited access to Azure Storage resources using shared access + * signatures + * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + * + * Generated from protobuf field string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sas_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sas_token + * Required. Azure shared access signature (SAS). + * For more information about SAS, see + * [Grant limited access to Azure Storage resources using shared access + * signatures + * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. Azure shared access signature (SAS). + * For more information about SAS, see + * [Grant limited access to Azure Storage resources using shared access + * signatures + * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + * + * Generated from protobuf field string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSasToken() + { + return $this->sas_token; + } + + /** + * Required. Azure shared access signature (SAS). + * For more information about SAS, see + * [Grant limited access to Azure Storage resources using shared access + * signatures + * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + * + * Generated from protobuf field string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSasToken($var) + { + GPBUtil::checkString($var, True); + $this->sas_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php new file mode 100644 index 000000000000..24da653a69be --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php @@ -0,0 +1,215 @@ +google.storagetransfer.v1.CreateAgentPoolRequest + */ +class CreateAgentPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the Google Cloud project that owns the + * agent pool. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. The agent pool to create. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent_pool = null; + /** + * Required. The ID of the agent pool to create. + * The `agent_pool_id` must meet the following requirements: + * * Length of 128 characters or less. + * * Not start with the string `goog`. + * * Start with a lowercase ASCII character, followed by: + * * Zero or more: lowercase Latin alphabet characters, numerals, + * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). + * * One or more numerals or lowercase ASCII characters. + * As expressed by the regular expression: + * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. + * + * Generated from protobuf field string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent_pool_id = ''; + + /** + * @param string $projectId Required. The ID of the Google Cloud project that owns the + * agent pool. + * @param \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool Required. The agent pool to create. + * @param string $agentPoolId Required. The ID of the agent pool to create. + * + * The `agent_pool_id` must meet the following requirements: + * + * * Length of 128 characters or less. + * * Not start with the string `goog`. + * * Start with a lowercase ASCII character, followed by: + * * Zero or more: lowercase Latin alphabet characters, numerals, + * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). + * * One or more numerals or lowercase ASCII characters. + * + * As expressed by the regular expression: + * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. + * + * @return \Google\Cloud\StorageTransfer\V1\CreateAgentPoolRequest + * + * @experimental + */ + public static function build(string $projectId, \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool, string $agentPoolId): self + { + return (new self()) + ->setProjectId($projectId) + ->setAgentPool($agentPool) + ->setAgentPoolId($agentPoolId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Required. The ID of the Google Cloud project that owns the + * agent pool. + * @type \Google\Cloud\StorageTransfer\V1\AgentPool $agent_pool + * Required. The agent pool to create. + * @type string $agent_pool_id + * Required. The ID of the agent pool to create. + * The `agent_pool_id` must meet the following requirements: + * * Length of 128 characters or less. + * * Not start with the string `goog`. + * * Start with a lowercase ASCII character, followed by: + * * Zero or more: lowercase Latin alphabet characters, numerals, + * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). + * * One or more numerals or lowercase ASCII characters. + * As expressed by the regular expression: + * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the Google Cloud project that owns the + * agent pool. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * agent pool. + * + * 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 agent pool to create. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\StorageTransfer\V1\AgentPool|null + */ + public function getAgentPool() + { + return $this->agent_pool; + } + + public function hasAgentPool() + { + return isset($this->agent_pool); + } + + public function clearAgentPool() + { + unset($this->agent_pool); + } + + /** + * Required. The agent pool to create. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\StorageTransfer\V1\AgentPool $var + * @return $this + */ + public function setAgentPool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool::class); + $this->agent_pool = $var; + + return $this; + } + + /** + * Required. The ID of the agent pool to create. + * The `agent_pool_id` must meet the following requirements: + * * Length of 128 characters or less. + * * Not start with the string `goog`. + * * Start with a lowercase ASCII character, followed by: + * * Zero or more: lowercase Latin alphabet characters, numerals, + * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). + * * One or more numerals or lowercase ASCII characters. + * As expressed by the regular expression: + * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. + * + * Generated from protobuf field string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAgentPoolId() + { + return $this->agent_pool_id; + } + + /** + * Required. The ID of the agent pool to create. + * The `agent_pool_id` must meet the following requirements: + * * Length of 128 characters or less. + * * Not start with the string `goog`. + * * Start with a lowercase ASCII character, followed by: + * * Zero or more: lowercase Latin alphabet characters, numerals, + * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). + * * One or more numerals or lowercase ASCII characters. + * As expressed by the regular expression: + * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. + * + * Generated from protobuf field string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAgentPoolId($var) + { + GPBUtil::checkString($var, True); + $this->agent_pool_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php new file mode 100644 index 000000000000..b1164d786f1b --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php @@ -0,0 +1,77 @@ +google.storagetransfer.v1.CreateTransferJobRequest + */ +class CreateTransferJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The job to create. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transfer_job = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\StorageTransfer\V1\TransferJob $transfer_job + * Required. The job to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The job to create. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\StorageTransfer\V1\TransferJob|null + */ + public function getTransferJob() + { + return $this->transfer_job; + } + + public function hasTransferJob() + { + return isset($this->transfer_job); + } + + public function clearTransferJob() + { + unset($this->transfer_job); + } + + /** + * Required. The job to create. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\StorageTransfer\V1\TransferJob $var + * @return $this + */ + public function setTransferJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferJob::class); + $this->transfer_job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php new file mode 100644 index 000000000000..85ac4ce5034c --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php @@ -0,0 +1,80 @@ +google.storagetransfer.v1.DeleteAgentPoolRequest + */ +class DeleteAgentPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent pool to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the agent pool to delete. + * + * @return \Google\Cloud\StorageTransfer\V1\DeleteAgentPoolRequest + * + * @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 agent pool to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent pool to delete. + * + * 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 agent pool to delete. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php new file mode 100644 index 000000000000..3dde1ab00126 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php @@ -0,0 +1,105 @@ +google.storagetransfer.v1.DeleteTransferJobRequest + */ +class DeleteTransferJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The job to delete. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_name = ''; + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job_name + * Required. The job to delete. + * @type string $project_id + * Required. The ID of the Google Cloud project that owns the + * job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The job to delete. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobName() + { + return $this->job_name; + } + + /** + * Required. The job to delete. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobName($var) + { + GPBUtil::checkString($var, True); + $this->job_name = $var; + + return $this; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php new file mode 100644 index 000000000000..08f96dd976ca --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php @@ -0,0 +1,105 @@ +google.storagetransfer.v1.ErrorLogEntry + */ +class ErrorLogEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A URL that refers to the target (a data source, a data sink, + * or an object) with which the error is associated. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url = ''; + /** + * A list of messages that carry the error details. + * + * Generated from protobuf field repeated string error_details = 3; + */ + private $error_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Required. A URL that refers to the target (a data source, a data sink, + * or an object) with which the error is associated. + * @type array|\Google\Protobuf\Internal\RepeatedField $error_details + * A list of messages that carry the error details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. A URL that refers to the target (a data source, a data sink, + * or an object) with which the error is associated. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Required. A URL that refers to the target (a data source, a data sink, + * or an object) with which the error is associated. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * A list of messages that carry the error details. + * + * Generated from protobuf field repeated string error_details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorDetails() + { + return $this->error_details; + } + + /** + * A list of messages that carry the error details. + * + * Generated from protobuf field repeated string error_details = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->error_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php new file mode 100644 index 000000000000..fff660e9c4ce --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php @@ -0,0 +1,144 @@ +google.storagetransfer.v1.ErrorSummary + */ +class ErrorSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Required. + * + * Generated from protobuf field .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $error_code = 0; + /** + * Required. Count of this type of error. + * + * Generated from protobuf field int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $error_count = 0; + /** + * Error samples. + * At most 5 error log entries are recorded for a given + * error code for a single transfer operation. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + private $error_log_entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $error_code + * Required. + * @type int|string $error_count + * Required. Count of this type of error. + * @type array<\Google\Cloud\StorageTransfer\V1\ErrorLogEntry>|\Google\Protobuf\Internal\RepeatedField $error_log_entries + * Error samples. + * At most 5 error log entries are recorded for a given + * error code for a single transfer operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. + * + * Generated from protobuf field .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getErrorCode() + { + return $this->error_code; + } + + /** + * Required. + * + * Generated from protobuf field .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setErrorCode($var) + { + GPBUtil::checkEnum($var, \Google\Rpc\Code::class); + $this->error_code = $var; + + return $this; + } + + /** + * Required. Count of this type of error. + * + * Generated from protobuf field int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getErrorCount() + { + return $this->error_count; + } + + /** + * Required. Count of this type of error. + * + * Generated from protobuf field int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setErrorCount($var) + { + GPBUtil::checkInt64($var); + $this->error_count = $var; + + return $this; + } + + /** + * Error samples. + * At most 5 error log entries are recorded for a given + * error code for a single transfer operation. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorLogEntries() + { + return $this->error_log_entries; + } + + /** + * Error samples. + * At most 5 error log entries are recorded for a given + * error code for a single transfer operation. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + * @param array<\Google\Cloud\StorageTransfer\V1\ErrorLogEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorLogEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\ErrorLogEntry::class); + $this->error_log_entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php new file mode 100644 index 000000000000..787bd47f1925 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php @@ -0,0 +1,188 @@ +google.storagetransfer.v1.EventStream + */ +class EventStream extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies a unique name of the resource such as AWS SQS + * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', + * or Pub/Sub subscription resource name in the form + * 'projects/{project}/subscriptions/{sub}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Specifies the date and time that Storage Transfer Service starts + * listening for events from this stream. If no start time is specified or + * start time is in the past, Storage Transfer Service starts listening + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp event_stream_start_time = 2; + */ + protected $event_stream_start_time = null; + /** + * Specifies the data and time at which Storage Transfer Service stops + * listening for events from this stream. After this time, any transfers in + * progress will complete, but no new transfers are initiated. + * + * Generated from protobuf field .google.protobuf.Timestamp event_stream_expiration_time = 3; + */ + protected $event_stream_expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Specifies a unique name of the resource such as AWS SQS + * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', + * or Pub/Sub subscription resource name in the form + * 'projects/{project}/subscriptions/{sub}'. + * @type \Google\Protobuf\Timestamp $event_stream_start_time + * Specifies the date and time that Storage Transfer Service starts + * listening for events from this stream. If no start time is specified or + * start time is in the past, Storage Transfer Service starts listening + * immediately. + * @type \Google\Protobuf\Timestamp $event_stream_expiration_time + * Specifies the data and time at which Storage Transfer Service stops + * listening for events from this stream. After this time, any transfers in + * progress will complete, but no new transfers are initiated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies a unique name of the resource such as AWS SQS + * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', + * or Pub/Sub subscription resource name in the form + * 'projects/{project}/subscriptions/{sub}'. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Specifies a unique name of the resource such as AWS SQS + * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', + * or Pub/Sub subscription resource name in the form + * 'projects/{project}/subscriptions/{sub}'. + * + * 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; + } + + /** + * Specifies the date and time that Storage Transfer Service starts + * listening for events from this stream. If no start time is specified or + * start time is in the past, Storage Transfer Service starts listening + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp event_stream_start_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventStreamStartTime() + { + return $this->event_stream_start_time; + } + + public function hasEventStreamStartTime() + { + return isset($this->event_stream_start_time); + } + + public function clearEventStreamStartTime() + { + unset($this->event_stream_start_time); + } + + /** + * Specifies the date and time that Storage Transfer Service starts + * listening for events from this stream. If no start time is specified or + * start time is in the past, Storage Transfer Service starts listening + * immediately. + * + * Generated from protobuf field .google.protobuf.Timestamp event_stream_start_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventStreamStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_stream_start_time = $var; + + return $this; + } + + /** + * Specifies the data and time at which Storage Transfer Service stops + * listening for events from this stream. After this time, any transfers in + * progress will complete, but no new transfers are initiated. + * + * Generated from protobuf field .google.protobuf.Timestamp event_stream_expiration_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventStreamExpirationTime() + { + return $this->event_stream_expiration_time; + } + + public function hasEventStreamExpirationTime() + { + return isset($this->event_stream_expiration_time); + } + + public function clearEventStreamExpirationTime() + { + unset($this->event_stream_expiration_time); + } + + /** + * Specifies the data and time at which Storage Transfer Service stops + * listening for events from this stream. After this time, any transfers in + * progress will complete, but no new transfers are initiated. + * + * Generated from protobuf field .google.protobuf.Timestamp event_stream_expiration_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventStreamExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_stream_expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php new file mode 100644 index 000000000000..ff79b3646040 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php @@ -0,0 +1,198 @@ +google.storagetransfer.v1.GcsData + */ +class GcsData extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud Storage bucket name. Must meet + * [Bucket Name Requirements](/storage/docs/naming#requirements). + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket_name = ''; + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * The root path value must meet + * [Object Name Requirements](/storage/docs/naming#objectnames). + * + * Generated from protobuf field string path = 3; + */ + protected $path = ''; + /** + * Preview. Enables the transfer of managed folders between Cloud Storage + * buckets. Set this option on the gcs_data_source. + * If set to true: + * - Managed folders in the source bucket are transferred to the + * destination bucket. + * - Managed folders in the destination bucket are overwritten. Other + * OVERWRITE options are not supported. + * See + * [Transfer Cloud Storage managed + * folders](/storage-transfer/docs/managed-folders). + * + * Generated from protobuf field bool managed_folder_transfer_enabled = 4; + */ + protected $managed_folder_transfer_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket_name + * Required. Cloud Storage bucket name. Must meet + * [Bucket Name Requirements](/storage/docs/naming#requirements). + * @type string $path + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * The root path value must meet + * [Object Name Requirements](/storage/docs/naming#objectnames). + * @type bool $managed_folder_transfer_enabled + * Preview. Enables the transfer of managed folders between Cloud Storage + * buckets. Set this option on the gcs_data_source. + * If set to true: + * - Managed folders in the source bucket are transferred to the + * destination bucket. + * - Managed folders in the destination bucket are overwritten. Other + * OVERWRITE options are not supported. + * See + * [Transfer Cloud Storage managed + * folders](/storage-transfer/docs/managed-folders). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud Storage bucket name. Must meet + * [Bucket Name Requirements](/storage/docs/naming#requirements). + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucketName() + { + return $this->bucket_name; + } + + /** + * Required. Cloud Storage bucket name. Must meet + * [Bucket Name Requirements](/storage/docs/naming#requirements). + * + * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucketName($var) + { + GPBUtil::checkString($var, True); + $this->bucket_name = $var; + + return $this; + } + + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * The root path value must meet + * [Object Name Requirements](/storage/docs/naming#objectnames). + * + * Generated from protobuf field string path = 3; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Root path to transfer objects. + * Must be an empty string or full path name that ends with a '/'. This field + * is treated as an object prefix. As such, it should generally not begin with + * a '/'. + * The root path value must meet + * [Object Name Requirements](/storage/docs/naming#objectnames). + * + * Generated from protobuf field string path = 3; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Preview. Enables the transfer of managed folders between Cloud Storage + * buckets. Set this option on the gcs_data_source. + * If set to true: + * - Managed folders in the source bucket are transferred to the + * destination bucket. + * - Managed folders in the destination bucket are overwritten. Other + * OVERWRITE options are not supported. + * See + * [Transfer Cloud Storage managed + * folders](/storage-transfer/docs/managed-folders). + * + * Generated from protobuf field bool managed_folder_transfer_enabled = 4; + * @return bool + */ + public function getManagedFolderTransferEnabled() + { + return $this->managed_folder_transfer_enabled; + } + + /** + * Preview. Enables the transfer of managed folders between Cloud Storage + * buckets. Set this option on the gcs_data_source. + * If set to true: + * - Managed folders in the source bucket are transferred to the + * destination bucket. + * - Managed folders in the destination bucket are overwritten. Other + * OVERWRITE options are not supported. + * See + * [Transfer Cloud Storage managed + * folders](/storage-transfer/docs/managed-folders). + * + * Generated from protobuf field bool managed_folder_transfer_enabled = 4; + * @param bool $var + * @return $this + */ + public function setManagedFolderTransferEnabled($var) + { + GPBUtil::checkBool($var); + $this->managed_folder_transfer_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php new file mode 100644 index 000000000000..f9c7e04c6591 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php @@ -0,0 +1,80 @@ +google.storagetransfer.v1.GetAgentPoolRequest + */ +class GetAgentPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the agent pool to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the agent pool to get. + * + * @return \Google\Cloud\StorageTransfer\V1\GetAgentPoolRequest + * + * @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 agent pool to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the agent pool to get. + * + * 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 agent pool to get. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php new file mode 100644 index 000000000000..78735764c2ea --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php @@ -0,0 +1,71 @@ +google.storagetransfer.v1.GetGoogleServiceAccountRequest + */ +class GetGoogleServiceAccountRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the Google Cloud project that the Google service + * account is associated with. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Required. The ID of the Google Cloud project that the Google service + * account is associated with. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the Google Cloud project that the Google service + * account is associated with. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that the Google service + * account is associated with. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php new file mode 100644 index 000000000000..c2efb03a573d --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php @@ -0,0 +1,105 @@ +google.storagetransfer.v1.GetTransferJobRequest + */ +class GetTransferJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The job to get. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_name = ''; + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job_name + * Required. The job to get. + * @type string $project_id + * Required. The ID of the Google Cloud project that owns the + * job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The job to get. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobName() + { + return $this->job_name; + } + + /** + * Required. The job to get. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobName($var) + { + GPBUtil::checkString($var, True); + $this->job_name = $var; + + return $this; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php new file mode 100644 index 000000000000..82f7b9177e50 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php @@ -0,0 +1,101 @@ +google.storagetransfer.v1.GoogleServiceAccount + */ +class GoogleServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Email address of the service account. + * + * Generated from protobuf field string account_email = 1; + */ + protected $account_email = ''; + /** + * Unique identifier for the service account. + * + * Generated from protobuf field string subject_id = 2; + */ + protected $subject_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $account_email + * Email address of the service account. + * @type string $subject_id + * Unique identifier for the service account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string account_email = 1; + * @return string + */ + public function getAccountEmail() + { + return $this->account_email; + } + + /** + * Email address of the service account. + * + * Generated from protobuf field string account_email = 1; + * @param string $var + * @return $this + */ + public function setAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->account_email = $var; + + return $this; + } + + /** + * Unique identifier for the service account. + * + * Generated from protobuf field string subject_id = 2; + * @return string + */ + public function getSubjectId() + { + return $this->subject_id; + } + + /** + * Unique identifier for the service account. + * + * Generated from protobuf field string subject_id = 2; + * @param string $var + * @return $this + */ + public function setSubjectId($var) + { + GPBUtil::checkString($var, True); + $this->subject_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php new file mode 100644 index 000000000000..0f758e41c179 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php @@ -0,0 +1,70 @@ +google.storagetransfer.v1.HdfsData + */ +class HdfsData extends \Google\Protobuf\Internal\Message +{ + /** + * Root path to transfer files. + * + * Generated from protobuf field string path = 1; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Root path to transfer files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Root path to transfer files. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Root path to transfer files. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php new file mode 100644 index 000000000000..add9daed9214 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php @@ -0,0 +1,103 @@ +` is + * transferred to a data sink, the name of the object at the data sink is + * `/`. + * * If the specified size of an object does not match the actual size of the + * object fetched, the object is not transferred. + * * If the specified MD5 does not match the MD5 computed from the transferred + * bytes, the object transfer fails. + * * Ensure that each URL you specify is publicly accessible. For + * example, in Cloud Storage you can + * [share an object publicly] + * (/storage/docs/cloud-console#_sharingdata) and get a link to it. + * * Storage Transfer Service obeys `robots.txt` rules and requires the source + * HTTP server to support `Range` requests and to return a `Content-Length` + * header in each response. + * * [ObjectConditions][google.storagetransfer.v1.ObjectConditions] have no + * effect when filtering objects to transfer. + * + * Generated from protobuf message google.storagetransfer.v1.HttpData + */ +class HttpData extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URL that points to the file that stores the object list + * entries. This file must allow public access. Currently, only URLs with + * HTTP and HTTPS schemes are supported. + * + * Generated from protobuf field string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $list_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $list_url + * Required. The URL that points to the file that stores the object list + * entries. This file must allow public access. Currently, only URLs with + * HTTP and HTTPS schemes are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URL that points to the file that stores the object list + * entries. This file must allow public access. Currently, only URLs with + * HTTP and HTTPS schemes are supported. + * + * Generated from protobuf field string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getListUrl() + { + return $this->list_url; + } + + /** + * Required. The URL that points to the file that stores the object list + * entries. This file must allow public access. Currently, only URLs with + * HTTP and HTTPS schemes are supported. + * + * Generated from protobuf field string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setListUrl($var) + { + GPBUtil::checkString($var, True); + $this->list_url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php new file mode 100644 index 000000000000..28498058b27d --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php @@ -0,0 +1,202 @@ +google.storagetransfer.v1.ListAgentPoolsRequest + */ +class ListAgentPoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the Google Cloud project that owns the job. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * An optional list of query parameters specified as JSON text in the + * form of: + * `{"agentPoolNames":["agentpool1","agentpool2",...]}` + * Since `agentPoolNames` support multiple values, its values must be + * specified with array notation. When the filter is either empty or not + * provided, the list returns all agent pools for the project. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The list page size. The max allowed value is `256`. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * The list page token. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $projectId Required. The ID of the Google Cloud project that owns the job. + * + * @return \Google\Cloud\StorageTransfer\V1\ListAgentPoolsRequest + * + * @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. The ID of the Google Cloud project that owns the job. + * @type string $filter + * An optional list of query parameters specified as JSON text in the + * form of: + * `{"agentPoolNames":["agentpool1","agentpool2",...]}` + * Since `agentPoolNames` support multiple values, its values must be + * specified with array notation. When the filter is either empty or not + * provided, the list returns all agent pools for the project. + * @type int $page_size + * The list page size. The max allowed value is `256`. + * @type string $page_token + * The list page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the Google Cloud project that owns the job. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that owns the job. + * + * 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; + } + + /** + * An optional list of query parameters specified as JSON text in the + * form of: + * `{"agentPoolNames":["agentpool1","agentpool2",...]}` + * Since `agentPoolNames` support multiple values, its values must be + * specified with array notation. When the filter is either empty or not + * provided, the list returns all agent pools for the project. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An optional list of query parameters specified as JSON text in the + * form of: + * `{"agentPoolNames":["agentpool1","agentpool2",...]}` + * Since `agentPoolNames` support multiple values, its values must be + * specified with array notation. When the filter is either empty or not + * provided, the list returns all agent pools for the project. + * + * 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 list page size. The max allowed value is `256`. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The list page size. The max allowed value is `256`. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The list page token. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The list page token. + * + * 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/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php new file mode 100644 index 000000000000..d2c226f11f56 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php @@ -0,0 +1,101 @@ +google.storagetransfer.v1.ListAgentPoolsResponse + */ +class ListAgentPoolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of agent pools. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.AgentPool agent_pools = 1; + */ + private $agent_pools; + /** + * The list next page token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\StorageTransfer\V1\AgentPool>|\Google\Protobuf\Internal\RepeatedField $agent_pools + * A list of agent pools. + * @type string $next_page_token + * The list next page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * A list of agent pools. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.AgentPool agent_pools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAgentPools() + { + return $this->agent_pools; + } + + /** + * A list of agent pools. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.AgentPool agent_pools = 1; + * @param array<\Google\Cloud\StorageTransfer\V1\AgentPool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAgentPools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\AgentPool::class); + $this->agent_pools = $arr; + + return $this; + } + + /** + * The list next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php new file mode 100644 index 000000000000..1709bfb490ac --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php @@ -0,0 +1,176 @@ +google.storagetransfer.v1.ListTransferJobsRequest + */ +class ListTransferJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of query parameters specified as JSON text in the form of: + * `{"projectId":"my_project_id", + * "jobNames":["jobid1","jobid2",...], + * "jobStatuses":["status1","status2",...]}` + * Since `jobNames` and `jobStatuses` support multiple values, their values + * must be specified with array notation. `projectId` is required. + * `jobNames` and `jobStatuses` are optional. The valid values for + * `jobStatuses` are case-insensitive: + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * The list page size. The max allowed value is 256. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * The list page token. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * Required. A list of query parameters specified as JSON text in the form of: + * `{"projectId":"my_project_id", + * "jobNames":["jobid1","jobid2",...], + * "jobStatuses":["status1","status2",...]}` + * Since `jobNames` and `jobStatuses` support multiple values, their values + * must be specified with array notation. `projectId` is required. + * `jobNames` and `jobStatuses` are optional. The valid values for + * `jobStatuses` are case-insensitive: + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + * @type int $page_size + * The list page size. The max allowed value is 256. + * @type string $page_token + * The list page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of query parameters specified as JSON text in the form of: + * `{"projectId":"my_project_id", + * "jobNames":["jobid1","jobid2",...], + * "jobStatuses":["status1","status2",...]}` + * Since `jobNames` and `jobStatuses` support multiple values, their values + * must be specified with array notation. `projectId` is required. + * `jobNames` and `jobStatuses` are optional. The valid values for + * `jobStatuses` are case-insensitive: + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. A list of query parameters specified as JSON text in the form of: + * `{"projectId":"my_project_id", + * "jobNames":["jobid1","jobid2",...], + * "jobStatuses":["status1","status2",...]}` + * Since `jobNames` and `jobStatuses` support multiple values, their values + * must be specified with array notation. `projectId` is required. + * `jobNames` and `jobStatuses` are optional. The valid values for + * `jobStatuses` are case-insensitive: + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The list page size. The max allowed value is 256. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The list page size. The max allowed value is 256. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The list page token. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The list page token. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php new file mode 100644 index 000000000000..d90d034828db --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php @@ -0,0 +1,101 @@ +google.storagetransfer.v1.ListTransferJobsResponse + */ +class ListTransferJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of transfer jobs. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + private $transfer_jobs; + /** + * The list next page token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\StorageTransfer\V1\TransferJob>|\Google\Protobuf\Internal\RepeatedField $transfer_jobs + * A list of transfer jobs. + * @type string $next_page_token + * The list next page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * A list of transfer jobs. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransferJobs() + { + return $this->transfer_jobs; + } + + /** + * A list of transfer jobs. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + * @param array<\Google\Cloud\StorageTransfer\V1\TransferJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransferJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\TransferJob::class); + $this->transfer_jobs = $arr; + + return $this; + } + + /** + * The list next page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php new file mode 100644 index 000000000000..22f830828e9c --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php @@ -0,0 +1,159 @@ +google.storagetransfer.v1.LoggingConfig + */ +class LoggingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the actions to be logged. If empty, no logs are generated. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableAction log_actions = 1; + */ + private $log_actions; + /** + * States in which `log_actions` are logged. If empty, no logs are generated. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableActionState log_action_states = 2; + */ + private $log_action_states; + /** + * For PosixFilesystem transfers, enables + * [file system transfer + * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) + * instead of, or in addition to, Cloud Logging. + * This option ignores [LoggableAction] and [LoggableActionState]. If these + * are set, Cloud Logging will also be enabled for this transfer. + * + * Generated from protobuf field bool enable_onprem_gcs_transfer_logs = 3; + */ + protected $enable_onprem_gcs_transfer_logs = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $log_actions + * Specifies the actions to be logged. If empty, no logs are generated. + * @type array|\Google\Protobuf\Internal\RepeatedField $log_action_states + * States in which `log_actions` are logged. If empty, no logs are generated. + * @type bool $enable_onprem_gcs_transfer_logs + * For PosixFilesystem transfers, enables + * [file system transfer + * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) + * instead of, or in addition to, Cloud Logging. + * This option ignores [LoggableAction] and [LoggableActionState]. If these + * are set, Cloud Logging will also be enabled for this transfer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the actions to be logged. If empty, no logs are generated. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableAction log_actions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogActions() + { + return $this->log_actions; + } + + /** + * Specifies the actions to be logged. If empty, no logs are generated. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableAction log_actions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\StorageTransfer\V1\LoggingConfig\LoggableAction::class); + $this->log_actions = $arr; + + return $this; + } + + /** + * States in which `log_actions` are logged. If empty, no logs are generated. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableActionState log_action_states = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogActionStates() + { + return $this->log_action_states; + } + + /** + * States in which `log_actions` are logged. If empty, no logs are generated. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableActionState log_action_states = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogActionStates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\StorageTransfer\V1\LoggingConfig\LoggableActionState::class); + $this->log_action_states = $arr; + + return $this; + } + + /** + * For PosixFilesystem transfers, enables + * [file system transfer + * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) + * instead of, or in addition to, Cloud Logging. + * This option ignores [LoggableAction] and [LoggableActionState]. If these + * are set, Cloud Logging will also be enabled for this transfer. + * + * Generated from protobuf field bool enable_onprem_gcs_transfer_logs = 3; + * @return bool + */ + public function getEnableOnpremGcsTransferLogs() + { + return $this->enable_onprem_gcs_transfer_logs; + } + + /** + * For PosixFilesystem transfers, enables + * [file system transfer + * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) + * instead of, or in addition to, Cloud Logging. + * This option ignores [LoggableAction] and [LoggableActionState]. If these + * are set, Cloud Logging will also be enabled for this transfer. + * + * Generated from protobuf field bool enable_onprem_gcs_transfer_logs = 3; + * @param bool $var + * @return $this + */ + public function setEnableOnpremGcsTransferLogs($var) + { + GPBUtil::checkBool($var); + $this->enable_onprem_gcs_transfer_logs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php new file mode 100644 index 000000000000..dccfaae7ab3f --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php @@ -0,0 +1,71 @@ +google.storagetransfer.v1.LoggingConfig.LoggableAction + */ +class LoggableAction +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum LOGGABLE_ACTION_UNSPECIFIED = 0; + */ + const LOGGABLE_ACTION_UNSPECIFIED = 0; + /** + * Listing objects in a bucket. + * + * Generated from protobuf enum FIND = 1; + */ + const FIND = 1; + /** + * Deleting objects at the source or the destination. + * + * Generated from protobuf enum DELETE = 2; + */ + const DELETE = 2; + /** + * Copying objects to Google Cloud Storage. + * + * Generated from protobuf enum COPY = 3; + */ + const COPY = 3; + + private static $valueToName = [ + self::LOGGABLE_ACTION_UNSPECIFIED => 'LOGGABLE_ACTION_UNSPECIFIED', + self::FIND => 'FIND', + self::DELETE => 'DELETE', + self::COPY => 'COPY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoggableAction::class, \Google\Cloud\StorageTransfer\V1\LoggingConfig_LoggableAction::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php new file mode 100644 index 000000000000..0547a7be29ad --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php @@ -0,0 +1,66 @@ +google.storagetransfer.v1.LoggingConfig.LoggableActionState + */ +class LoggableActionState +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum LOGGABLE_ACTION_STATE_UNSPECIFIED = 0; + */ + const LOGGABLE_ACTION_STATE_UNSPECIFIED = 0; + /** + * `LoggableAction` completed successfully. `SUCCEEDED` actions are + * logged as [INFO][google.logging.type.LogSeverity.INFO]. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * `LoggableAction` terminated in an error state. `FAILED` actions are + * logged as [ERROR][google.logging.type.LogSeverity.ERROR]. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + + private static $valueToName = [ + self::LOGGABLE_ACTION_STATE_UNSPECIFIED => 'LOGGABLE_ACTION_STATE_UNSPECIFIED', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoggableActionState::class, \Google\Cloud\StorageTransfer\V1\LoggingConfig_LoggableActionState::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php new file mode 100644 index 000000000000..e1c793ca7909 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php @@ -0,0 +1,427 @@ +google.storagetransfer.v1.MetadataOptions + */ +class MetadataOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how symlinks should be handled by the transfer. By default, + * symlinks are not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Symlink symlink = 1; + */ + protected $symlink = 0; + /** + * Specifies how each file's mode attribute should be handled by the transfer. + * By default, mode is not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Mode mode = 2; + */ + protected $mode = 0; + /** + * Specifies how each file's POSIX group ID (GID) attribute should be handled + * by the transfer. By default, GID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.GID gid = 3; + */ + protected $gid = 0; + /** + * Specifies how each file's POSIX user ID (UID) attribute should be handled + * by the transfer. By default, UID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.UID uid = 4; + */ + protected $uid = 0; + /** + * Specifies how each object's ACLs should be preserved for transfers between + * Google Cloud Storage buckets. If unspecified, the default behavior is the + * same as ACL_DESTINATION_BUCKET_DEFAULT. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Acl acl = 5; + */ + protected $acl = 0; + /** + * Specifies the storage class to set on objects being transferred to Google + * Cloud Storage buckets. If unspecified, the default behavior is the same as + * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.StorageClass storage_class = 6; + */ + protected $storage_class = 0; + /** + * Specifies how each object's temporary hold status should be preserved for + * transfers between Google Cloud Storage buckets. If unspecified, the + * default behavior is the same as + * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TemporaryHold temporary_hold = 7; + */ + protected $temporary_hold = 0; + /** + * Specifies how each object's Cloud KMS customer-managed encryption key + * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If + * unspecified, the default behavior is the same as + * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.KmsKey kms_key = 8; + */ + protected $kms_key = 0; + /** + * Specifies how each object's `timeCreated` metadata is preserved for + * transfers. If unspecified, the default behavior is the same as + * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. + * This behavior is supported for transfers to Cloud Storage buckets from + * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TimeCreated time_created = 9; + */ + protected $time_created = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $symlink + * Specifies how symlinks should be handled by the transfer. By default, + * symlinks are not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * @type int $mode + * Specifies how each file's mode attribute should be handled by the transfer. + * By default, mode is not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * @type int $gid + * Specifies how each file's POSIX group ID (GID) attribute should be handled + * by the transfer. By default, GID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * @type int $uid + * Specifies how each file's POSIX user ID (UID) attribute should be handled + * by the transfer. By default, UID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * @type int $acl + * Specifies how each object's ACLs should be preserved for transfers between + * Google Cloud Storage buckets. If unspecified, the default behavior is the + * same as ACL_DESTINATION_BUCKET_DEFAULT. + * @type int $storage_class + * Specifies the storage class to set on objects being transferred to Google + * Cloud Storage buckets. If unspecified, the default behavior is the same as + * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. + * @type int $temporary_hold + * Specifies how each object's temporary hold status should be preserved for + * transfers between Google Cloud Storage buckets. If unspecified, the + * default behavior is the same as + * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. + * @type int $kms_key + * Specifies how each object's Cloud KMS customer-managed encryption key + * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If + * unspecified, the default behavior is the same as + * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. + * @type int $time_created + * Specifies how each object's `timeCreated` metadata is preserved for + * transfers. If unspecified, the default behavior is the same as + * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. + * This behavior is supported for transfers to Cloud Storage buckets from + * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how symlinks should be handled by the transfer. By default, + * symlinks are not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Symlink symlink = 1; + * @return int + */ + public function getSymlink() + { + return $this->symlink; + } + + /** + * Specifies how symlinks should be handled by the transfer. By default, + * symlinks are not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Symlink symlink = 1; + * @param int $var + * @return $this + */ + public function setSymlink($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\Symlink::class); + $this->symlink = $var; + + return $this; + } + + /** + * Specifies how each file's mode attribute should be handled by the transfer. + * By default, mode is not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Mode mode = 2; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Specifies how each file's mode attribute should be handled by the transfer. + * By default, mode is not preserved. Only applicable to transfers involving + * POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Mode mode = 2; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Specifies how each file's POSIX group ID (GID) attribute should be handled + * by the transfer. By default, GID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.GID gid = 3; + * @return int + */ + public function getGid() + { + return $this->gid; + } + + /** + * Specifies how each file's POSIX group ID (GID) attribute should be handled + * by the transfer. By default, GID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.GID gid = 3; + * @param int $var + * @return $this + */ + public function setGid($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\GID::class); + $this->gid = $var; + + return $this; + } + + /** + * Specifies how each file's POSIX user ID (UID) attribute should be handled + * by the transfer. By default, UID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.UID uid = 4; + * @return int + */ + public function getUid() + { + return $this->uid; + } + + /** + * Specifies how each file's POSIX user ID (UID) attribute should be handled + * by the transfer. By default, UID is not preserved. Only applicable to + * transfers involving POSIX file systems, and ignored for other transfers. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.UID uid = 4; + * @param int $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\UID::class); + $this->uid = $var; + + return $this; + } + + /** + * Specifies how each object's ACLs should be preserved for transfers between + * Google Cloud Storage buckets. If unspecified, the default behavior is the + * same as ACL_DESTINATION_BUCKET_DEFAULT. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Acl acl = 5; + * @return int + */ + public function getAcl() + { + return $this->acl; + } + + /** + * Specifies how each object's ACLs should be preserved for transfers between + * Google Cloud Storage buckets. If unspecified, the default behavior is the + * same as ACL_DESTINATION_BUCKET_DEFAULT. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Acl acl = 5; + * @param int $var + * @return $this + */ + public function setAcl($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\Acl::class); + $this->acl = $var; + + return $this; + } + + /** + * Specifies the storage class to set on objects being transferred to Google + * Cloud Storage buckets. If unspecified, the default behavior is the same as + * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.StorageClass storage_class = 6; + * @return int + */ + public function getStorageClass() + { + return $this->storage_class; + } + + /** + * Specifies the storage class to set on objects being transferred to Google + * Cloud Storage buckets. If unspecified, the default behavior is the same as + * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.StorageClass storage_class = 6; + * @param int $var + * @return $this + */ + public function setStorageClass($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\StorageClass::class); + $this->storage_class = $var; + + return $this; + } + + /** + * Specifies how each object's temporary hold status should be preserved for + * transfers between Google Cloud Storage buckets. If unspecified, the + * default behavior is the same as + * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TemporaryHold temporary_hold = 7; + * @return int + */ + public function getTemporaryHold() + { + return $this->temporary_hold; + } + + /** + * Specifies how each object's temporary hold status should be preserved for + * transfers between Google Cloud Storage buckets. If unspecified, the + * default behavior is the same as + * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TemporaryHold temporary_hold = 7; + * @param int $var + * @return $this + */ + public function setTemporaryHold($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\TemporaryHold::class); + $this->temporary_hold = $var; + + return $this; + } + + /** + * Specifies how each object's Cloud KMS customer-managed encryption key + * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If + * unspecified, the default behavior is the same as + * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.KmsKey kms_key = 8; + * @return int + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Specifies how each object's Cloud KMS customer-managed encryption key + * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If + * unspecified, the default behavior is the same as + * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.KmsKey kms_key = 8; + * @param int $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\KmsKey::class); + $this->kms_key = $var; + + return $this; + } + + /** + * Specifies how each object's `timeCreated` metadata is preserved for + * transfers. If unspecified, the default behavior is the same as + * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. + * This behavior is supported for transfers to Cloud Storage buckets from + * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TimeCreated time_created = 9; + * @return int + */ + public function getTimeCreated() + { + return $this->time_created; + } + + /** + * Specifies how each object's `timeCreated` metadata is preserved for + * transfers. If unspecified, the default behavior is the same as + * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. + * This behavior is supported for transfers to Cloud Storage buckets from + * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TimeCreated time_created = 9; + * @param int $var + * @return $this + */ + public function setTimeCreated($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\TimeCreated::class); + $this->time_created = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php new file mode 100644 index 000000000000..d9f42c4fe8d2 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php @@ -0,0 +1,68 @@ +google.storagetransfer.v1.MetadataOptions.Acl + */ +class Acl +{ + /** + * ACL behavior is unspecified. + * + * Generated from protobuf enum ACL_UNSPECIFIED = 0; + */ + const ACL_UNSPECIFIED = 0; + /** + * Use the destination bucket's default object ACLS, if applicable. + * + * Generated from protobuf enum ACL_DESTINATION_BUCKET_DEFAULT = 1; + */ + const ACL_DESTINATION_BUCKET_DEFAULT = 1; + /** + * Preserve the object's original ACLs. This requires the service account + * to have `storage.objects.getIamPolicy` permission for the source object. + * [Uniform bucket-level + * access](https://cloud.google.com/storage/docs/uniform-bucket-level-access) + * must not be enabled on either the source or destination buckets. + * + * Generated from protobuf enum ACL_PRESERVE = 2; + */ + const ACL_PRESERVE = 2; + + private static $valueToName = [ + self::ACL_UNSPECIFIED => 'ACL_UNSPECIFIED', + self::ACL_DESTINATION_BUCKET_DEFAULT => 'ACL_DESTINATION_BUCKET_DEFAULT', + self::ACL_PRESERVE => 'ACL_PRESERVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Acl::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_Acl::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php new file mode 100644 index 000000000000..eca202bd832a --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.MetadataOptions.GID + */ +class GID +{ + /** + * GID behavior is unspecified. + * + * Generated from protobuf enum GID_UNSPECIFIED = 0; + */ + const GID_UNSPECIFIED = 0; + /** + * Do not preserve GID during a transfer job. + * + * Generated from protobuf enum GID_SKIP = 1; + */ + const GID_SKIP = 1; + /** + * Preserve GID during a transfer job. + * + * Generated from protobuf enum GID_NUMBER = 2; + */ + const GID_NUMBER = 2; + + private static $valueToName = [ + self::GID_UNSPECIFIED => 'GID_UNSPECIFIED', + self::GID_SKIP => 'GID_SKIP', + self::GID_NUMBER => 'GID_NUMBER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GID::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_GID::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php new file mode 100644 index 000000000000..ff533f92928b --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php @@ -0,0 +1,66 @@ +google.storagetransfer.v1.MetadataOptions.KmsKey + */ +class KmsKey +{ + /** + * KmsKey behavior is unspecified. + * + * Generated from protobuf enum KMS_KEY_UNSPECIFIED = 0; + */ + const KMS_KEY_UNSPECIFIED = 0; + /** + * Use the destination bucket's default encryption settings. + * + * Generated from protobuf enum KMS_KEY_DESTINATION_BUCKET_DEFAULT = 1; + */ + const KMS_KEY_DESTINATION_BUCKET_DEFAULT = 1; + /** + * Preserve the object's original Cloud KMS customer-managed encryption key + * (CMEK) if present. Objects that do not use a Cloud KMS encryption key + * will be encrypted using the destination bucket's encryption settings. + * + * Generated from protobuf enum KMS_KEY_PRESERVE = 2; + */ + const KMS_KEY_PRESERVE = 2; + + private static $valueToName = [ + self::KMS_KEY_UNSPECIFIED => 'KMS_KEY_UNSPECIFIED', + self::KMS_KEY_DESTINATION_BUCKET_DEFAULT => 'KMS_KEY_DESTINATION_BUCKET_DEFAULT', + self::KMS_KEY_PRESERVE => 'KMS_KEY_PRESERVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KmsKey::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_KmsKey::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php new file mode 100644 index 000000000000..4d56f1db1a4d --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.MetadataOptions.Mode + */ +class Mode +{ + /** + * Mode behavior is unspecified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Do not preserve mode during a transfer job. + * + * Generated from protobuf enum MODE_SKIP = 1; + */ + const MODE_SKIP = 1; + /** + * Preserve mode during a transfer job. + * + * Generated from protobuf enum MODE_PRESERVE = 2; + */ + const MODE_PRESERVE = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::MODE_SKIP => 'MODE_SKIP', + self::MODE_PRESERVE => 'MODE_PRESERVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_Mode::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php new file mode 100644 index 000000000000..6a74f16c95fd --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php @@ -0,0 +1,95 @@ +google.storagetransfer.v1.MetadataOptions.StorageClass + */ +class StorageClass +{ + /** + * Storage class behavior is unspecified. + * + * Generated from protobuf enum STORAGE_CLASS_UNSPECIFIED = 0; + */ + const STORAGE_CLASS_UNSPECIFIED = 0; + /** + * Use the destination bucket's default storage class. + * + * Generated from protobuf enum STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT = 1; + */ + const STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT = 1; + /** + * Preserve the object's original storage class. This is only supported for + * transfers from Google Cloud Storage buckets. REGIONAL and MULTI_REGIONAL + * storage classes will be mapped to STANDARD to ensure they can be written + * to the destination bucket. + * + * Generated from protobuf enum STORAGE_CLASS_PRESERVE = 2; + */ + const STORAGE_CLASS_PRESERVE = 2; + /** + * Set the storage class to STANDARD. + * + * Generated from protobuf enum STORAGE_CLASS_STANDARD = 3; + */ + const STORAGE_CLASS_STANDARD = 3; + /** + * Set the storage class to NEARLINE. + * + * Generated from protobuf enum STORAGE_CLASS_NEARLINE = 4; + */ + const STORAGE_CLASS_NEARLINE = 4; + /** + * Set the storage class to COLDLINE. + * + * Generated from protobuf enum STORAGE_CLASS_COLDLINE = 5; + */ + const STORAGE_CLASS_COLDLINE = 5; + /** + * Set the storage class to ARCHIVE. + * + * Generated from protobuf enum STORAGE_CLASS_ARCHIVE = 6; + */ + const STORAGE_CLASS_ARCHIVE = 6; + + private static $valueToName = [ + self::STORAGE_CLASS_UNSPECIFIED => 'STORAGE_CLASS_UNSPECIFIED', + self::STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT => 'STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT', + self::STORAGE_CLASS_PRESERVE => 'STORAGE_CLASS_PRESERVE', + self::STORAGE_CLASS_STANDARD => 'STORAGE_CLASS_STANDARD', + self::STORAGE_CLASS_NEARLINE => 'STORAGE_CLASS_NEARLINE', + self::STORAGE_CLASS_COLDLINE => 'STORAGE_CLASS_COLDLINE', + self::STORAGE_CLASS_ARCHIVE => 'STORAGE_CLASS_ARCHIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StorageClass::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_StorageClass::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php new file mode 100644 index 000000000000..31c5c5316361 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.MetadataOptions.Symlink + */ +class Symlink +{ + /** + * Symlink behavior is unspecified. + * + * Generated from protobuf enum SYMLINK_UNSPECIFIED = 0; + */ + const SYMLINK_UNSPECIFIED = 0; + /** + * Do not preserve symlinks during a transfer job. + * + * Generated from protobuf enum SYMLINK_SKIP = 1; + */ + const SYMLINK_SKIP = 1; + /** + * Preserve symlinks during a transfer job. + * + * Generated from protobuf enum SYMLINK_PRESERVE = 2; + */ + const SYMLINK_PRESERVE = 2; + + private static $valueToName = [ + self::SYMLINK_UNSPECIFIED => 'SYMLINK_UNSPECIFIED', + self::SYMLINK_SKIP => 'SYMLINK_SKIP', + self::SYMLINK_PRESERVE => 'SYMLINK_PRESERVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Symlink::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_Symlink::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php new file mode 100644 index 000000000000..35983ecf3759 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.MetadataOptions.TemporaryHold + */ +class TemporaryHold +{ + /** + * Temporary hold behavior is unspecified. + * + * Generated from protobuf enum TEMPORARY_HOLD_UNSPECIFIED = 0; + */ + const TEMPORARY_HOLD_UNSPECIFIED = 0; + /** + * Do not set a temporary hold on the destination object. + * + * Generated from protobuf enum TEMPORARY_HOLD_SKIP = 1; + */ + const TEMPORARY_HOLD_SKIP = 1; + /** + * Preserve the object's original temporary hold status. + * + * Generated from protobuf enum TEMPORARY_HOLD_PRESERVE = 2; + */ + const TEMPORARY_HOLD_PRESERVE = 2; + + private static $valueToName = [ + self::TEMPORARY_HOLD_UNSPECIFIED => 'TEMPORARY_HOLD_UNSPECIFIED', + self::TEMPORARY_HOLD_SKIP => 'TEMPORARY_HOLD_SKIP', + self::TEMPORARY_HOLD_PRESERVE => 'TEMPORARY_HOLD_PRESERVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TemporaryHold::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_TemporaryHold::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php new file mode 100644 index 000000000000..457c4b7faf2b --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php @@ -0,0 +1,68 @@ +google.storagetransfer.v1.MetadataOptions.TimeCreated + */ +class TimeCreated +{ + /** + * TimeCreated behavior is unspecified. + * + * Generated from protobuf enum TIME_CREATED_UNSPECIFIED = 0; + */ + const TIME_CREATED_UNSPECIFIED = 0; + /** + * Do not preserve the `timeCreated` metadata from the source object. + * + * Generated from protobuf enum TIME_CREATED_SKIP = 1; + */ + const TIME_CREATED_SKIP = 1; + /** + * Preserves the source object's `timeCreated` or `lastModified` metadata in + * the `customTime` field in the destination object. Note that any value + * stored in the source object's `customTime` field will not be propagated + * to the destination object. + * + * Generated from protobuf enum TIME_CREATED_PRESERVE_AS_CUSTOM_TIME = 2; + */ + const TIME_CREATED_PRESERVE_AS_CUSTOM_TIME = 2; + + private static $valueToName = [ + self::TIME_CREATED_UNSPECIFIED => 'TIME_CREATED_UNSPECIFIED', + self::TIME_CREATED_SKIP => 'TIME_CREATED_SKIP', + self::TIME_CREATED_PRESERVE_AS_CUSTOM_TIME => 'TIME_CREATED_PRESERVE_AS_CUSTOM_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeCreated::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_TimeCreated::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php new file mode 100644 index 000000000000..d0862a23bf76 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.MetadataOptions.UID + */ +class UID +{ + /** + * UID behavior is unspecified. + * + * Generated from protobuf enum UID_UNSPECIFIED = 0; + */ + const UID_UNSPECIFIED = 0; + /** + * Do not preserve UID during a transfer job. + * + * Generated from protobuf enum UID_SKIP = 1; + */ + const UID_SKIP = 1; + /** + * Preserve UID during a transfer job. + * + * Generated from protobuf enum UID_NUMBER = 2; + */ + const UID_NUMBER = 2; + + private static $valueToName = [ + self::UID_UNSPECIFIED => 'UID_UNSPECIFIED', + self::UID_SKIP => 'UID_SKIP', + self::UID_NUMBER => 'UID_NUMBER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UID::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_UID::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php new file mode 100644 index 000000000000..93dfdb45a9d1 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php @@ -0,0 +1,170 @@ +google.storagetransfer.v1.NotificationConfig + */ +class NotificationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Topic.name` of the Pub/Sub topic to which to publish + * notifications. Must be of the format: `projects/{project}/topics/{topic}`. + * Not matching this format results in an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pubsub_topic = ''; + /** + * Event types for which a notification is desired. If empty, send + * notifications for all event types. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + */ + private $event_types; + /** + * Required. The desired format of the notification message payloads. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $payload_format = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $pubsub_topic + * Required. The `Topic.name` of the Pub/Sub topic to which to publish + * notifications. Must be of the format: `projects/{project}/topics/{topic}`. + * Not matching this format results in an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * @type array|\Google\Protobuf\Internal\RepeatedField $event_types + * Event types for which a notification is desired. If empty, send + * notifications for all event types. + * @type int $payload_format + * Required. The desired format of the notification message payloads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Topic.name` of the Pub/Sub topic to which to publish + * notifications. Must be of the format: `projects/{project}/topics/{topic}`. + * Not matching this format results in an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPubsubTopic() + { + return $this->pubsub_topic; + } + + /** + * Required. The `Topic.name` of the Pub/Sub topic to which to publish + * notifications. Must be of the format: `projects/{project}/topics/{topic}`. + * Not matching this format results in an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPubsubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pubsub_topic = $var; + + return $this; + } + + /** + * Event types for which a notification is desired. If empty, send + * notifications for all event types. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEventTypes() + { + return $this->event_types; + } + + /** + * Event types for which a notification is desired. If empty, send + * notifications for all event types. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEventTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\StorageTransfer\V1\NotificationConfig\EventType::class); + $this->event_types = $arr; + + return $this; + } + + /** + * Required. The desired format of the notification message payloads. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPayloadFormat() + { + return $this->payload_format; + } + + /** + * Required. The desired format of the notification message payloads. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPayloadFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\NotificationConfig\PayloadFormat::class); + $this->payload_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php new file mode 100644 index 000000000000..e6de4c39d41c --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php @@ -0,0 +1,78 @@ +google.storagetransfer.v1.NotificationConfig.EventType + */ +class EventType +{ + /** + * Illegal value, to avoid allowing a default. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * `TransferOperation` completed with status + * [SUCCESS][google.storagetransfer.v1.TransferOperation.Status.SUCCESS]. + * + * Generated from protobuf enum TRANSFER_OPERATION_SUCCESS = 1; + */ + const TRANSFER_OPERATION_SUCCESS = 1; + /** + * `TransferOperation` completed with status + * [FAILED][google.storagetransfer.v1.TransferOperation.Status.FAILED]. + * + * Generated from protobuf enum TRANSFER_OPERATION_FAILED = 2; + */ + const TRANSFER_OPERATION_FAILED = 2; + /** + * `TransferOperation` completed with status + * [ABORTED][google.storagetransfer.v1.TransferOperation.Status.ABORTED]. + * + * Generated from protobuf enum TRANSFER_OPERATION_ABORTED = 3; + */ + const TRANSFER_OPERATION_ABORTED = 3; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::TRANSFER_OPERATION_SUCCESS => 'TRANSFER_OPERATION_SUCCESS', + self::TRANSFER_OPERATION_FAILED => 'TRANSFER_OPERATION_FAILED', + self::TRANSFER_OPERATION_ABORTED => 'TRANSFER_OPERATION_ABORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\StorageTransfer\V1\NotificationConfig_EventType::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php new file mode 100644 index 000000000000..4e63909f0ac1 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php @@ -0,0 +1,66 @@ +google.storagetransfer.v1.NotificationConfig.PayloadFormat + */ +class PayloadFormat +{ + /** + * Illegal value, to avoid allowing a default. + * + * Generated from protobuf enum PAYLOAD_FORMAT_UNSPECIFIED = 0; + */ + const PAYLOAD_FORMAT_UNSPECIFIED = 0; + /** + * No payload is included with the notification. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * `TransferOperation` is [formatted as a JSON + * response](https://developers.google.com/protocol-buffers/docs/proto3#json), + * in application/json. + * + * Generated from protobuf enum JSON = 2; + */ + const JSON = 2; + + private static $valueToName = [ + self::PAYLOAD_FORMAT_UNSPECIFIED => 'PAYLOAD_FORMAT_UNSPECIFIED', + self::NONE => 'NONE', + self::JSON => 'JSON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PayloadFormat::class, \Google\Cloud\StorageTransfer\V1\NotificationConfig_PayloadFormat::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php new file mode 100644 index 000000000000..b979bf3b0bd6 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php @@ -0,0 +1,560 @@ +google.storagetransfer.v1.ObjectConditions + */ +class ObjectConditions extends \Google\Protobuf\Internal\Message +{ + /** + * Ensures that objects are not transferred until a specific minimum time + * has elapsed after the "last modification time". When a + * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, + * objects with a "last modification time" are transferred only if the elapsed + * time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation` and the "last modification time" of the object is equal + * to or greater than the value of min_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * + * Generated from protobuf field .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + protected $min_time_elapsed_since_last_modification = null; + /** + * Ensures that objects are not transferred if a specific maximum time + * has elapsed since the "last modification time". + * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] + * begins, objects with a "last modification time" are transferred only if the + * elapsed time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation`and the "last modification time" of the object + * is less than the value of max_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * + * Generated from protobuf field .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + protected $max_time_elapsed_since_last_modification = null; + /** + * If you specify `include_prefixes`, Storage Transfer Service uses the items + * in the `include_prefixes` array to determine which objects to include in a + * transfer. Objects must start with one of the matching `include_prefixes` + * for inclusion in the transfer. If + * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] + * is specified, objects must not start with any of the `exclude_prefixes` + * specified for inclusion in the transfer. + * The following are requirements of `include_prefixes`: + * * Each include-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each include-prefix must omit the leading slash. For example, to + * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the include-prefix as `logs/y=2015/requests.gz`. + * * None of the include-prefix values can be empty, if specified. + * * Each include-prefix must include a distinct portion of the object + * namespace. No include-prefix may be a prefix of another + * include-prefix. + * The max size of `include_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * + * Generated from protobuf field repeated string include_prefixes = 3; + */ + private $include_prefixes; + /** + * If you specify `exclude_prefixes`, Storage Transfer Service uses the items + * in the `exclude_prefixes` array to determine which objects to exclude from + * a transfer. Objects must not start with one of the matching + * `exclude_prefixes` for inclusion in a transfer. + * The following are requirements of `exclude_prefixes`: + * * Each exclude-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each exclude-prefix must omit the leading slash. For example, to + * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the exclude-prefix as `logs/y=2015/requests.gz`. + * * None of the exclude-prefix values can be empty, if specified. + * * Each exclude-prefix must exclude a distinct portion of the object + * namespace. No exclude-prefix may be a prefix of another + * exclude-prefix. + * * If + * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] + * is specified, then each exclude-prefix must start with the value of a + * path explicitly included by `include_prefixes`. + * The max size of `exclude_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * + * Generated from protobuf field repeated string exclude_prefixes = 4; + */ + private $exclude_prefixes; + /** + * If specified, only objects with a "last modification time" on or after + * this timestamp and objects that don't have a "last modification time" are + * transferred. + * The `last_modified_since` and `last_modified_before` fields can be used + * together for chunked data processing. For example, consider a script that + * processes each day's worth of data at a time. For that you'd set each + * of the fields as follows: + * * `last_modified_since` to the start of the day + * * `last_modified_before` to the end of the day + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_since = 5; + */ + protected $last_modified_since = null; + /** + * If specified, only objects with a "last modification time" before this + * timestamp and objects that don't have a "last modification time" are + * transferred. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_before = 6; + */ + protected $last_modified_before = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $min_time_elapsed_since_last_modification + * Ensures that objects are not transferred until a specific minimum time + * has elapsed after the "last modification time". When a + * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, + * objects with a "last modification time" are transferred only if the elapsed + * time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation` and the "last modification time" of the object is equal + * to or greater than the value of min_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * @type \Google\Protobuf\Duration $max_time_elapsed_since_last_modification + * Ensures that objects are not transferred if a specific maximum time + * has elapsed since the "last modification time". + * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] + * begins, objects with a "last modification time" are transferred only if the + * elapsed time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation`and the "last modification time" of the object + * is less than the value of max_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_prefixes + * If you specify `include_prefixes`, Storage Transfer Service uses the items + * in the `include_prefixes` array to determine which objects to include in a + * transfer. Objects must start with one of the matching `include_prefixes` + * for inclusion in the transfer. If + * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] + * is specified, objects must not start with any of the `exclude_prefixes` + * specified for inclusion in the transfer. + * The following are requirements of `include_prefixes`: + * * Each include-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each include-prefix must omit the leading slash. For example, to + * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the include-prefix as `logs/y=2015/requests.gz`. + * * None of the include-prefix values can be empty, if specified. + * * Each include-prefix must include a distinct portion of the object + * namespace. No include-prefix may be a prefix of another + * include-prefix. + * The max size of `include_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_prefixes + * If you specify `exclude_prefixes`, Storage Transfer Service uses the items + * in the `exclude_prefixes` array to determine which objects to exclude from + * a transfer. Objects must not start with one of the matching + * `exclude_prefixes` for inclusion in a transfer. + * The following are requirements of `exclude_prefixes`: + * * Each exclude-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each exclude-prefix must omit the leading slash. For example, to + * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the exclude-prefix as `logs/y=2015/requests.gz`. + * * None of the exclude-prefix values can be empty, if specified. + * * Each exclude-prefix must exclude a distinct portion of the object + * namespace. No exclude-prefix may be a prefix of another + * exclude-prefix. + * * If + * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] + * is specified, then each exclude-prefix must start with the value of a + * path explicitly included by `include_prefixes`. + * The max size of `exclude_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * @type \Google\Protobuf\Timestamp $last_modified_since + * If specified, only objects with a "last modification time" on or after + * this timestamp and objects that don't have a "last modification time" are + * transferred. + * The `last_modified_since` and `last_modified_before` fields can be used + * together for chunked data processing. For example, consider a script that + * processes each day's worth of data at a time. For that you'd set each + * of the fields as follows: + * * `last_modified_since` to the start of the day + * * `last_modified_before` to the end of the day + * @type \Google\Protobuf\Timestamp $last_modified_before + * If specified, only objects with a "last modification time" before this + * timestamp and objects that don't have a "last modification time" are + * transferred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Ensures that objects are not transferred until a specific minimum time + * has elapsed after the "last modification time". When a + * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, + * objects with a "last modification time" are transferred only if the elapsed + * time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation` and the "last modification time" of the object is equal + * to or greater than the value of min_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * + * Generated from protobuf field .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getMinTimeElapsedSinceLastModification() + { + return $this->min_time_elapsed_since_last_modification; + } + + public function hasMinTimeElapsedSinceLastModification() + { + return isset($this->min_time_elapsed_since_last_modification); + } + + public function clearMinTimeElapsedSinceLastModification() + { + unset($this->min_time_elapsed_since_last_modification); + } + + /** + * Ensures that objects are not transferred until a specific minimum time + * has elapsed after the "last modification time". When a + * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, + * objects with a "last modification time" are transferred only if the elapsed + * time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation` and the "last modification time" of the object is equal + * to or greater than the value of min_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * + * Generated from protobuf field .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinTimeElapsedSinceLastModification($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_time_elapsed_since_last_modification = $var; + + return $this; + } + + /** + * Ensures that objects are not transferred if a specific maximum time + * has elapsed since the "last modification time". + * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] + * begins, objects with a "last modification time" are transferred only if the + * elapsed time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation`and the "last modification time" of the object + * is less than the value of max_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * + * Generated from protobuf field .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxTimeElapsedSinceLastModification() + { + return $this->max_time_elapsed_since_last_modification; + } + + public function hasMaxTimeElapsedSinceLastModification() + { + return isset($this->max_time_elapsed_since_last_modification); + } + + public function clearMaxTimeElapsedSinceLastModification() + { + unset($this->max_time_elapsed_since_last_modification); + } + + /** + * Ensures that objects are not transferred if a specific maximum time + * has elapsed since the "last modification time". + * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] + * begins, objects with a "last modification time" are transferred only if the + * elapsed time between the + * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the + * `TransferOperation`and the "last modification time" of the object + * is less than the value of max_time_elapsed_since_last_modification`. + * Objects that do not have a "last modification time" are also transferred. + * + * Generated from protobuf field .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxTimeElapsedSinceLastModification($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_time_elapsed_since_last_modification = $var; + + return $this; + } + + /** + * If you specify `include_prefixes`, Storage Transfer Service uses the items + * in the `include_prefixes` array to determine which objects to include in a + * transfer. Objects must start with one of the matching `include_prefixes` + * for inclusion in the transfer. If + * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] + * is specified, objects must not start with any of the `exclude_prefixes` + * specified for inclusion in the transfer. + * The following are requirements of `include_prefixes`: + * * Each include-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each include-prefix must omit the leading slash. For example, to + * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the include-prefix as `logs/y=2015/requests.gz`. + * * None of the include-prefix values can be empty, if specified. + * * Each include-prefix must include a distinct portion of the object + * namespace. No include-prefix may be a prefix of another + * include-prefix. + * The max size of `include_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * + * Generated from protobuf field repeated string include_prefixes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludePrefixes() + { + return $this->include_prefixes; + } + + /** + * If you specify `include_prefixes`, Storage Transfer Service uses the items + * in the `include_prefixes` array to determine which objects to include in a + * transfer. Objects must start with one of the matching `include_prefixes` + * for inclusion in the transfer. If + * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] + * is specified, objects must not start with any of the `exclude_prefixes` + * specified for inclusion in the transfer. + * The following are requirements of `include_prefixes`: + * * Each include-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each include-prefix must omit the leading slash. For example, to + * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the include-prefix as `logs/y=2015/requests.gz`. + * * None of the include-prefix values can be empty, if specified. + * * Each include-prefix must include a distinct portion of the object + * namespace. No include-prefix may be a prefix of another + * include-prefix. + * The max size of `include_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * + * Generated from protobuf field repeated string include_prefixes = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludePrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_prefixes = $arr; + + return $this; + } + + /** + * If you specify `exclude_prefixes`, Storage Transfer Service uses the items + * in the `exclude_prefixes` array to determine which objects to exclude from + * a transfer. Objects must not start with one of the matching + * `exclude_prefixes` for inclusion in a transfer. + * The following are requirements of `exclude_prefixes`: + * * Each exclude-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each exclude-prefix must omit the leading slash. For example, to + * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the exclude-prefix as `logs/y=2015/requests.gz`. + * * None of the exclude-prefix values can be empty, if specified. + * * Each exclude-prefix must exclude a distinct portion of the object + * namespace. No exclude-prefix may be a prefix of another + * exclude-prefix. + * * If + * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] + * is specified, then each exclude-prefix must start with the value of a + * path explicitly included by `include_prefixes`. + * The max size of `exclude_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * + * Generated from protobuf field repeated string exclude_prefixes = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludePrefixes() + { + return $this->exclude_prefixes; + } + + /** + * If you specify `exclude_prefixes`, Storage Transfer Service uses the items + * in the `exclude_prefixes` array to determine which objects to exclude from + * a transfer. Objects must not start with one of the matching + * `exclude_prefixes` for inclusion in a transfer. + * The following are requirements of `exclude_prefixes`: + * * Each exclude-prefix can contain any sequence of Unicode characters, to + * a max length of 1024 bytes when UTF8-encoded, and must not contain + * Carriage Return or Line Feed characters. Wildcard matching and regular + * expression matching are not supported. + * * Each exclude-prefix must omit the leading slash. For example, to + * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + * specify the exclude-prefix as `logs/y=2015/requests.gz`. + * * None of the exclude-prefix values can be empty, if specified. + * * Each exclude-prefix must exclude a distinct portion of the object + * namespace. No exclude-prefix may be a prefix of another + * exclude-prefix. + * * If + * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] + * is specified, then each exclude-prefix must start with the value of a + * path explicitly included by `include_prefixes`. + * The max size of `exclude_prefixes` is 1000. + * For more information, see [Filtering objects from + * transfers](/storage-transfer/docs/filtering-objects-from-transfers). + * + * Generated from protobuf field repeated string exclude_prefixes = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludePrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclude_prefixes = $arr; + + return $this; + } + + /** + * If specified, only objects with a "last modification time" on or after + * this timestamp and objects that don't have a "last modification time" are + * transferred. + * The `last_modified_since` and `last_modified_before` fields can be used + * together for chunked data processing. For example, consider a script that + * processes each day's worth of data at a time. For that you'd set each + * of the fields as follows: + * * `last_modified_since` to the start of the day + * * `last_modified_before` to the end of the day + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_since = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModifiedSince() + { + return $this->last_modified_since; + } + + public function hasLastModifiedSince() + { + return isset($this->last_modified_since); + } + + public function clearLastModifiedSince() + { + unset($this->last_modified_since); + } + + /** + * If specified, only objects with a "last modification time" on or after + * this timestamp and objects that don't have a "last modification time" are + * transferred. + * The `last_modified_since` and `last_modified_before` fields can be used + * together for chunked data processing. For example, consider a script that + * processes each day's worth of data at a time. For that you'd set each + * of the fields as follows: + * * `last_modified_since` to the start of the day + * * `last_modified_before` to the end of the day + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_since = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModifiedSince($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modified_since = $var; + + return $this; + } + + /** + * If specified, only objects with a "last modification time" before this + * timestamp and objects that don't have a "last modification time" are + * transferred. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_before = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModifiedBefore() + { + return $this->last_modified_before; + } + + public function hasLastModifiedBefore() + { + return isset($this->last_modified_before); + } + + public function clearLastModifiedBefore() + { + unset($this->last_modified_before); + } + + /** + * If specified, only objects with a "last modification time" before this + * timestamp and objects that don't have a "last modification time" are + * transferred. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modified_before = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModifiedBefore($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modified_before = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php new file mode 100644 index 000000000000..2c1d3fd5061c --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php @@ -0,0 +1,67 @@ +google.storagetransfer.v1.PauseTransferOperationRequest + */ +class PauseTransferOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the transfer operation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the transfer operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the transfer operation. + * + * 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 transfer operation. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php new file mode 100644 index 000000000000..9548f9724538 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php @@ -0,0 +1,67 @@ +google.storagetransfer.v1.PosixFilesystem + */ +class PosixFilesystem extends \Google\Protobuf\Internal\Message +{ + /** + * Root directory path to the filesystem. + * + * Generated from protobuf field string root_directory = 1; + */ + protected $root_directory = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $root_directory + * Root directory path to the filesystem. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Root directory path to the filesystem. + * + * Generated from protobuf field string root_directory = 1; + * @return string + */ + public function getRootDirectory() + { + return $this->root_directory; + } + + /** + * Root directory path to the filesystem. + * + * Generated from protobuf field string root_directory = 1; + * @param string $var + * @return $this + */ + public function setRootDirectory($var) + { + GPBUtil::checkString($var, True); + $this->root_directory = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php new file mode 100644 index 000000000000..b3eec9a2595b --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php @@ -0,0 +1,67 @@ +google.storagetransfer.v1.ResumeTransferOperationRequest + */ +class ResumeTransferOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the transfer operation. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the transfer operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the transfer operation. + * + * 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 transfer operation. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php new file mode 100644 index 000000000000..c38e28cd7784 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php @@ -0,0 +1,105 @@ +google.storagetransfer.v1.RunTransferJobRequest + */ +class RunTransferJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the transfer job. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_name = ''; + /** + * Required. The ID of the Google Cloud project that owns the transfer + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job_name + * Required. The name of the transfer job. + * @type string $project_id + * Required. The ID of the Google Cloud project that owns the transfer + * job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the transfer job. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobName() + { + return $this->job_name; + } + + /** + * Required. The name of the transfer job. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobName($var) + { + GPBUtil::checkString($var, True); + $this->job_name = $var; + + return $this; + } + + /** + * Required. The ID of the Google Cloud project that owns the transfer + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that owns the transfer + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php new file mode 100644 index 000000000000..701406b66fc8 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php @@ -0,0 +1,194 @@ +google.storagetransfer.v1.S3CompatibleMetadata + */ +class S3CompatibleMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the authentication and authorization method used by the storage + * service. When not specified, Transfer Service will attempt to determine + * right auth method to use. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1; + */ + protected $auth_method = 0; + /** + * Specifies the API request model used to call the storage service. When not + * specified, the default value of RequestModel + * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2; + */ + protected $request_model = 0; + /** + * Specifies the network protocol of the agent. When not specified, the + * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3; + */ + protected $protocol = 0; + /** + * The Listing API to use for discovering objects. When not specified, + * Transfer Service will attempt to determine the right API to use. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4; + */ + protected $list_api = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $auth_method + * Specifies the authentication and authorization method used by the storage + * service. When not specified, Transfer Service will attempt to determine + * right auth method to use. + * @type int $request_model + * Specifies the API request model used to call the storage service. When not + * specified, the default value of RequestModel + * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. + * @type int $protocol + * Specifies the network protocol of the agent. When not specified, the + * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. + * @type int $list_api + * The Listing API to use for discovering objects. When not specified, + * Transfer Service will attempt to determine the right API to use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the authentication and authorization method used by the storage + * service. When not specified, Transfer Service will attempt to determine + * right auth method to use. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1; + * @return int + */ + public function getAuthMethod() + { + return $this->auth_method; + } + + /** + * Specifies the authentication and authorization method used by the storage + * service. When not specified, Transfer Service will attempt to determine + * right auth method to use. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1; + * @param int $var + * @return $this + */ + public function setAuthMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\AuthMethod::class); + $this->auth_method = $var; + + return $this; + } + + /** + * Specifies the API request model used to call the storage service. When not + * specified, the default value of RequestModel + * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2; + * @return int + */ + public function getRequestModel() + { + return $this->request_model; + } + + /** + * Specifies the API request model used to call the storage service. When not + * specified, the default value of RequestModel + * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2; + * @param int $var + * @return $this + */ + public function setRequestModel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\RequestModel::class); + $this->request_model = $var; + + return $this; + } + + /** + * Specifies the network protocol of the agent. When not specified, the + * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Specifies the network protocol of the agent. When not specified, the + * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\NetworkProtocol::class); + $this->protocol = $var; + + return $this; + } + + /** + * The Listing API to use for discovering objects. When not specified, + * Transfer Service will attempt to determine the right API to use. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4; + * @return int + */ + public function getListApi() + { + return $this->list_api; + } + + /** + * The Listing API to use for discovering objects. When not specified, + * Transfer Service will attempt to determine the right API to use. + * + * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4; + * @param int $var + * @return $this + */ + public function setListApi($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\ListApi::class); + $this->list_api = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php new file mode 100644 index 000000000000..bce457c3194c --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod + */ +class AuthMethod +{ + /** + * AuthMethod is not specified. + * + * Generated from protobuf enum AUTH_METHOD_UNSPECIFIED = 0; + */ + const AUTH_METHOD_UNSPECIFIED = 0; + /** + * Auth requests with AWS SigV4. + * + * Generated from protobuf enum AUTH_METHOD_AWS_SIGNATURE_V4 = 1; + */ + const AUTH_METHOD_AWS_SIGNATURE_V4 = 1; + /** + * Auth requests with AWS SigV2. + * + * Generated from protobuf enum AUTH_METHOD_AWS_SIGNATURE_V2 = 2; + */ + const AUTH_METHOD_AWS_SIGNATURE_V2 = 2; + + private static $valueToName = [ + self::AUTH_METHOD_UNSPECIFIED => 'AUTH_METHOD_UNSPECIFIED', + self::AUTH_METHOD_AWS_SIGNATURE_V4 => 'AUTH_METHOD_AWS_SIGNATURE_V4', + self::AUTH_METHOD_AWS_SIGNATURE_V2 => 'AUTH_METHOD_AWS_SIGNATURE_V2', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AuthMethod::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_AuthMethod::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php new file mode 100644 index 000000000000..62d307b60946 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php @@ -0,0 +1,64 @@ +google.storagetransfer.v1.S3CompatibleMetadata.ListApi + */ +class ListApi +{ + /** + * ListApi is not specified. + * + * Generated from protobuf enum LIST_API_UNSPECIFIED = 0; + */ + const LIST_API_UNSPECIFIED = 0; + /** + * Perform listing using ListObjectsV2 API. + * + * Generated from protobuf enum LIST_OBJECTS_V2 = 1; + */ + const LIST_OBJECTS_V2 = 1; + /** + * Legacy ListObjects API. + * + * Generated from protobuf enum LIST_OBJECTS = 2; + */ + const LIST_OBJECTS = 2; + + private static $valueToName = [ + self::LIST_API_UNSPECIFIED => 'LIST_API_UNSPECIFIED', + self::LIST_OBJECTS_V2 => 'LIST_OBJECTS_V2', + self::LIST_OBJECTS => 'LIST_OBJECTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListApi::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_ListApi::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php new file mode 100644 index 000000000000..29c2e7d6a416 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php @@ -0,0 +1,66 @@ +google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol + */ +class NetworkProtocol +{ + /** + * NetworkProtocol is not specified. + * + * Generated from protobuf enum NETWORK_PROTOCOL_UNSPECIFIED = 0; + */ + const NETWORK_PROTOCOL_UNSPECIFIED = 0; + /** + * Perform requests using HTTPS. + * + * Generated from protobuf enum NETWORK_PROTOCOL_HTTPS = 1; + */ + const NETWORK_PROTOCOL_HTTPS = 1; + /** + * Not recommended: This sends data in clear-text. This is only + * appropriate within a closed network or for publicly available data. + * Perform requests using HTTP. + * + * Generated from protobuf enum NETWORK_PROTOCOL_HTTP = 2; + */ + const NETWORK_PROTOCOL_HTTP = 2; + + private static $valueToName = [ + self::NETWORK_PROTOCOL_UNSPECIFIED => 'NETWORK_PROTOCOL_UNSPECIFIED', + self::NETWORK_PROTOCOL_HTTPS => 'NETWORK_PROTOCOL_HTTPS', + self::NETWORK_PROTOCOL_HTTP => 'NETWORK_PROTOCOL_HTTP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkProtocol::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_NetworkProtocol::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php new file mode 100644 index 000000000000..832494b6d409 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php @@ -0,0 +1,66 @@ +google.storagetransfer.v1.S3CompatibleMetadata.RequestModel + */ +class RequestModel +{ + /** + * RequestModel is not specified. + * + * Generated from protobuf enum REQUEST_MODEL_UNSPECIFIED = 0; + */ + const REQUEST_MODEL_UNSPECIFIED = 0; + /** + * Perform requests using Virtual Hosted Style. + * Example: https://bucket-name.s3.region.amazonaws.com/key-name + * + * Generated from protobuf enum REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1; + */ + const REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1; + /** + * Perform requests using Path Style. + * Example: https://s3.region.amazonaws.com/bucket-name/key-name + * + * Generated from protobuf enum REQUEST_MODEL_PATH_STYLE = 2; + */ + const REQUEST_MODEL_PATH_STYLE = 2; + + private static $valueToName = [ + self::REQUEST_MODEL_UNSPECIFIED => 'REQUEST_MODEL_UNSPECIFIED', + self::REQUEST_MODEL_VIRTUAL_HOSTED_STYLE => 'REQUEST_MODEL_VIRTUAL_HOSTED_STYLE', + self::REQUEST_MODEL_PATH_STYLE => 'REQUEST_MODEL_PATH_STYLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequestModel::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_RequestModel::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php new file mode 100644 index 000000000000..29c271a20bcf --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php @@ -0,0 +1,441 @@ +google.storagetransfer.v1.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The start date of a transfer. Date boundaries are determined + * relative to UTC time. If `schedule_start_date` and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * are in the past relative to the job's creation time, the transfer starts + * the day after you schedule the transfer request. + * **Note:** When starting jobs at or near midnight UTC it is possible that + * a job starts later than expected. For example, if you send an outbound + * request on June 1 one millisecond prior to midnight UTC and the Storage + * Transfer Service server receives the request on June 2, then it creates + * a TransferJob with `schedule_start_date` set to June 2 and a + * `start_time_of_day` set to midnight UTC. The first scheduled + * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes + * place on June 3 at midnight UTC. + * + * Generated from protobuf field .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schedule_start_date = null; + /** + * The last day a transfer runs. Date boundaries are determined relative to + * UTC time. A job runs once per 24 hours within the following guidelines: + * * If `schedule_end_date` and + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * are the same and in + * the future relative to UTC, the transfer is executed only one time. + * * If `schedule_end_date` is later than `schedule_start_date` and + * `schedule_end_date` is in the future relative to UTC, the job runs each + * day at + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * through `schedule_end_date`. + * + * Generated from protobuf field .google.type.Date schedule_end_date = 2; + */ + protected $schedule_end_date = null; + /** + * The time in UTC that a transfer job is scheduled to run. Transfers may + * start later than this time. + * If `start_time_of_day` is not specified: + * * One-time transfers run immediately. + * * Recurring transfers run immediately, and each day at midnight UTC, + * through + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. + * If `start_time_of_day` is specified: + * * One-time transfers run at the specified time. + * * Recurring transfers run at the specified time each day, through + * `schedule_end_date`. + * + * Generated from protobuf field .google.type.TimeOfDay start_time_of_day = 3; + */ + protected $start_time_of_day = null; + /** + * The time in UTC that no further transfer operations are scheduled. Combined + * with + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], + * `end_time_of_day` specifies the end date and time for starting new transfer + * operations. This field must be greater than or equal to the timestamp + * corresponding to the combintation of + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], + * and is subject to the following: + * * If `end_time_of_day` is not set and `schedule_end_date` is set, then + * a default value of `23:59:59` is used for `end_time_of_day`. + * * If `end_time_of_day` is set and `schedule_end_date` is not set, then + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. + * + * Generated from protobuf field .google.type.TimeOfDay end_time_of_day = 4; + */ + protected $end_time_of_day = null; + /** + * Interval between the start of each scheduled TransferOperation. If + * unspecified, the default value is 24 hours. This value may not be less than + * 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration repeat_interval = 5; + */ + protected $repeat_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $schedule_start_date + * Required. The start date of a transfer. Date boundaries are determined + * relative to UTC time. If `schedule_start_date` and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * are in the past relative to the job's creation time, the transfer starts + * the day after you schedule the transfer request. + * **Note:** When starting jobs at or near midnight UTC it is possible that + * a job starts later than expected. For example, if you send an outbound + * request on June 1 one millisecond prior to midnight UTC and the Storage + * Transfer Service server receives the request on June 2, then it creates + * a TransferJob with `schedule_start_date` set to June 2 and a + * `start_time_of_day` set to midnight UTC. The first scheduled + * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes + * place on June 3 at midnight UTC. + * @type \Google\Type\Date $schedule_end_date + * The last day a transfer runs. Date boundaries are determined relative to + * UTC time. A job runs once per 24 hours within the following guidelines: + * * If `schedule_end_date` and + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * are the same and in + * the future relative to UTC, the transfer is executed only one time. + * * If `schedule_end_date` is later than `schedule_start_date` and + * `schedule_end_date` is in the future relative to UTC, the job runs each + * day at + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * through `schedule_end_date`. + * @type \Google\Type\TimeOfDay $start_time_of_day + * The time in UTC that a transfer job is scheduled to run. Transfers may + * start later than this time. + * If `start_time_of_day` is not specified: + * * One-time transfers run immediately. + * * Recurring transfers run immediately, and each day at midnight UTC, + * through + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. + * If `start_time_of_day` is specified: + * * One-time transfers run at the specified time. + * * Recurring transfers run at the specified time each day, through + * `schedule_end_date`. + * @type \Google\Type\TimeOfDay $end_time_of_day + * The time in UTC that no further transfer operations are scheduled. Combined + * with + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], + * `end_time_of_day` specifies the end date and time for starting new transfer + * operations. This field must be greater than or equal to the timestamp + * corresponding to the combintation of + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], + * and is subject to the following: + * * If `end_time_of_day` is not set and `schedule_end_date` is set, then + * a default value of `23:59:59` is used for `end_time_of_day`. + * * If `end_time_of_day` is set and `schedule_end_date` is not set, then + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. + * @type \Google\Protobuf\Duration $repeat_interval + * Interval between the start of each scheduled TransferOperation. If + * unspecified, the default value is 24 hours. This value may not be less than + * 1 hour. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Required. The start date of a transfer. Date boundaries are determined + * relative to UTC time. If `schedule_start_date` and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * are in the past relative to the job's creation time, the transfer starts + * the day after you schedule the transfer request. + * **Note:** When starting jobs at or near midnight UTC it is possible that + * a job starts later than expected. For example, if you send an outbound + * request on June 1 one millisecond prior to midnight UTC and the Storage + * Transfer Service server receives the request on June 2, then it creates + * a TransferJob with `schedule_start_date` set to June 2 and a + * `start_time_of_day` set to midnight UTC. The first scheduled + * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes + * place on June 3 at midnight UTC. + * + * Generated from protobuf field .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Date|null + */ + public function getScheduleStartDate() + { + return $this->schedule_start_date; + } + + public function hasScheduleStartDate() + { + return isset($this->schedule_start_date); + } + + public function clearScheduleStartDate() + { + unset($this->schedule_start_date); + } + + /** + * Required. The start date of a transfer. Date boundaries are determined + * relative to UTC time. If `schedule_start_date` and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * are in the past relative to the job's creation time, the transfer starts + * the day after you schedule the transfer request. + * **Note:** When starting jobs at or near midnight UTC it is possible that + * a job starts later than expected. For example, if you send an outbound + * request on June 1 one millisecond prior to midnight UTC and the Storage + * Transfer Service server receives the request on June 2, then it creates + * a TransferJob with `schedule_start_date` set to June 2 and a + * `start_time_of_day` set to midnight UTC. The first scheduled + * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes + * place on June 3 at midnight UTC. + * + * Generated from protobuf field .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Date $var + * @return $this + */ + public function setScheduleStartDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->schedule_start_date = $var; + + return $this; + } + + /** + * The last day a transfer runs. Date boundaries are determined relative to + * UTC time. A job runs once per 24 hours within the following guidelines: + * * If `schedule_end_date` and + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * are the same and in + * the future relative to UTC, the transfer is executed only one time. + * * If `schedule_end_date` is later than `schedule_start_date` and + * `schedule_end_date` is in the future relative to UTC, the job runs each + * day at + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * through `schedule_end_date`. + * + * Generated from protobuf field .google.type.Date schedule_end_date = 2; + * @return \Google\Type\Date|null + */ + public function getScheduleEndDate() + { + return $this->schedule_end_date; + } + + public function hasScheduleEndDate() + { + return isset($this->schedule_end_date); + } + + public function clearScheduleEndDate() + { + unset($this->schedule_end_date); + } + + /** + * The last day a transfer runs. Date boundaries are determined relative to + * UTC time. A job runs once per 24 hours within the following guidelines: + * * If `schedule_end_date` and + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * are the same and in + * the future relative to UTC, the transfer is executed only one time. + * * If `schedule_end_date` is later than `schedule_start_date` and + * `schedule_end_date` is in the future relative to UTC, the job runs each + * day at + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + * through `schedule_end_date`. + * + * Generated from protobuf field .google.type.Date schedule_end_date = 2; + * @param \Google\Type\Date $var + * @return $this + */ + public function setScheduleEndDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->schedule_end_date = $var; + + return $this; + } + + /** + * The time in UTC that a transfer job is scheduled to run. Transfers may + * start later than this time. + * If `start_time_of_day` is not specified: + * * One-time transfers run immediately. + * * Recurring transfers run immediately, and each day at midnight UTC, + * through + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. + * If `start_time_of_day` is specified: + * * One-time transfers run at the specified time. + * * Recurring transfers run at the specified time each day, through + * `schedule_end_date`. + * + * Generated from protobuf field .google.type.TimeOfDay start_time_of_day = 3; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTimeOfDay() + { + return $this->start_time_of_day; + } + + public function hasStartTimeOfDay() + { + return isset($this->start_time_of_day); + } + + public function clearStartTimeOfDay() + { + unset($this->start_time_of_day); + } + + /** + * The time in UTC that a transfer job is scheduled to run. Transfers may + * start later than this time. + * If `start_time_of_day` is not specified: + * * One-time transfers run immediately. + * * Recurring transfers run immediately, and each day at midnight UTC, + * through + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. + * If `start_time_of_day` is specified: + * * One-time transfers run at the specified time. + * * Recurring transfers run at the specified time each day, through + * `schedule_end_date`. + * + * Generated from protobuf field .google.type.TimeOfDay start_time_of_day = 3; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTimeOfDay($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time_of_day = $var; + + return $this; + } + + /** + * The time in UTC that no further transfer operations are scheduled. Combined + * with + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], + * `end_time_of_day` specifies the end date and time for starting new transfer + * operations. This field must be greater than or equal to the timestamp + * corresponding to the combintation of + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], + * and is subject to the following: + * * If `end_time_of_day` is not set and `schedule_end_date` is set, then + * a default value of `23:59:59` is used for `end_time_of_day`. + * * If `end_time_of_day` is set and `schedule_end_date` is not set, then + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. + * + * Generated from protobuf field .google.type.TimeOfDay end_time_of_day = 4; + * @return \Google\Type\TimeOfDay|null + */ + public function getEndTimeOfDay() + { + return $this->end_time_of_day; + } + + public function hasEndTimeOfDay() + { + return isset($this->end_time_of_day); + } + + public function clearEndTimeOfDay() + { + unset($this->end_time_of_day); + } + + /** + * The time in UTC that no further transfer operations are scheduled. Combined + * with + * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], + * `end_time_of_day` specifies the end date and time for starting new transfer + * operations. This field must be greater than or equal to the timestamp + * corresponding to the combintation of + * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + * and + * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], + * and is subject to the following: + * * If `end_time_of_day` is not set and `schedule_end_date` is set, then + * a default value of `23:59:59` is used for `end_time_of_day`. + * * If `end_time_of_day` is set and `schedule_end_date` is not set, then + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. + * + * Generated from protobuf field .google.type.TimeOfDay end_time_of_day = 4; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setEndTimeOfDay($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->end_time_of_day = $var; + + return $this; + } + + /** + * Interval between the start of each scheduled TransferOperation. If + * unspecified, the default value is 24 hours. This value may not be less than + * 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration repeat_interval = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getRepeatInterval() + { + return $this->repeat_interval; + } + + public function hasRepeatInterval() + { + return isset($this->repeat_interval); + } + + public function clearRepeatInterval() + { + unset($this->repeat_interval); + } + + /** + * Interval between the start of each scheduled TransferOperation. If + * unspecified, the default value is 24 hours. This value may not be less than + * 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration repeat_interval = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRepeatInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->repeat_interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php new file mode 100644 index 000000000000..53014ea3e1ba --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php @@ -0,0 +1,815 @@ +google.storagetransfer.v1.TransferCounters + */ +class TransferCounters extends \Google\Protobuf\Internal\Message +{ + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found_from_source = 1; + */ + protected $objects_found_from_source = 0; + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found_from_source = 2; + */ + protected $bytes_found_from_source = 0; + /** + * Objects found only in the data sink that are scheduled to be deleted. + * + * Generated from protobuf field int64 objects_found_only_from_sink = 3; + */ + protected $objects_found_only_from_sink = 0; + /** + * Bytes found only in the data sink that are scheduled to be deleted. + * + * Generated from protobuf field int64 bytes_found_only_from_sink = 4; + */ + protected $bytes_found_only_from_sink = 0; + /** + * Objects in the data source that are not transferred because they already + * exist in the data sink. + * + * Generated from protobuf field int64 objects_from_source_skipped_by_sync = 5; + */ + protected $objects_from_source_skipped_by_sync = 0; + /** + * Bytes in the data source that are not transferred because they already + * exist in the data sink. + * + * Generated from protobuf field int64 bytes_from_source_skipped_by_sync = 6; + */ + protected $bytes_from_source_skipped_by_sync = 0; + /** + * Objects that are copied to the data sink. + * + * Generated from protobuf field int64 objects_copied_to_sink = 7; + */ + protected $objects_copied_to_sink = 0; + /** + * Bytes that are copied to the data sink. + * + * Generated from protobuf field int64 bytes_copied_to_sink = 8; + */ + protected $bytes_copied_to_sink = 0; + /** + * Objects that are deleted from the data source. + * + * Generated from protobuf field int64 objects_deleted_from_source = 9; + */ + protected $objects_deleted_from_source = 0; + /** + * Bytes that are deleted from the data source. + * + * Generated from protobuf field int64 bytes_deleted_from_source = 10; + */ + protected $bytes_deleted_from_source = 0; + /** + * Objects that are deleted from the data sink. + * + * Generated from protobuf field int64 objects_deleted_from_sink = 11; + */ + protected $objects_deleted_from_sink = 0; + /** + * Bytes that are deleted from the data sink. + * + * Generated from protobuf field int64 bytes_deleted_from_sink = 12; + */ + protected $bytes_deleted_from_sink = 0; + /** + * Objects in the data source that failed to be transferred or that failed + * to be deleted after being transferred. + * + * Generated from protobuf field int64 objects_from_source_failed = 13; + */ + protected $objects_from_source_failed = 0; + /** + * Bytes in the data source that failed to be transferred or that failed to + * be deleted after being transferred. + * + * Generated from protobuf field int64 bytes_from_source_failed = 14; + */ + protected $bytes_from_source_failed = 0; + /** + * Objects that failed to be deleted from the data sink. + * + * Generated from protobuf field int64 objects_failed_to_delete_from_sink = 15; + */ + protected $objects_failed_to_delete_from_sink = 0; + /** + * Bytes that failed to be deleted from the data sink. + * + * Generated from protobuf field int64 bytes_failed_to_delete_from_sink = 16; + */ + protected $bytes_failed_to_delete_from_sink = 0; + /** + * For transfers involving PosixFilesystem only. + * Number of directories found while listing. For example, if the root + * directory of the transfer is `base/` and there are two other directories, + * `a/` and `b/` under this directory, the count after listing `base/`, + * `base/a/` and `base/b/` is 3. + * + * Generated from protobuf field int64 directories_found_from_source = 17; + */ + protected $directories_found_from_source = 0; + /** + * For transfers involving PosixFilesystem only. + * Number of listing failures for each directory found at the source. + * Potential failures when listing a directory include permission failure or + * block failure. If listing a directory fails, no files in the directory are + * transferred. + * + * Generated from protobuf field int64 directories_failed_to_list_from_source = 18; + */ + protected $directories_failed_to_list_from_source = 0; + /** + * For transfers involving PosixFilesystem only. + * Number of successful listings for each directory found at the source. + * + * Generated from protobuf field int64 directories_successfully_listed_from_source = 19; + */ + protected $directories_successfully_listed_from_source = 0; + /** + * Number of successfully cleaned up intermediate objects. + * + * Generated from protobuf field int64 intermediate_objects_cleaned_up = 22; + */ + protected $intermediate_objects_cleaned_up = 0; + /** + * Number of intermediate objects failed cleaned up. + * + * Generated from protobuf field int64 intermediate_objects_failed_cleaned_up = 23; + */ + protected $intermediate_objects_failed_cleaned_up = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $objects_found_from_source + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $bytes_found_from_source + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $objects_found_only_from_sink + * Objects found only in the data sink that are scheduled to be deleted. + * @type int|string $bytes_found_only_from_sink + * Bytes found only in the data sink that are scheduled to be deleted. + * @type int|string $objects_from_source_skipped_by_sync + * Objects in the data source that are not transferred because they already + * exist in the data sink. + * @type int|string $bytes_from_source_skipped_by_sync + * Bytes in the data source that are not transferred because they already + * exist in the data sink. + * @type int|string $objects_copied_to_sink + * Objects that are copied to the data sink. + * @type int|string $bytes_copied_to_sink + * Bytes that are copied to the data sink. + * @type int|string $objects_deleted_from_source + * Objects that are deleted from the data source. + * @type int|string $bytes_deleted_from_source + * Bytes that are deleted from the data source. + * @type int|string $objects_deleted_from_sink + * Objects that are deleted from the data sink. + * @type int|string $bytes_deleted_from_sink + * Bytes that are deleted from the data sink. + * @type int|string $objects_from_source_failed + * Objects in the data source that failed to be transferred or that failed + * to be deleted after being transferred. + * @type int|string $bytes_from_source_failed + * Bytes in the data source that failed to be transferred or that failed to + * be deleted after being transferred. + * @type int|string $objects_failed_to_delete_from_sink + * Objects that failed to be deleted from the data sink. + * @type int|string $bytes_failed_to_delete_from_sink + * Bytes that failed to be deleted from the data sink. + * @type int|string $directories_found_from_source + * For transfers involving PosixFilesystem only. + * Number of directories found while listing. For example, if the root + * directory of the transfer is `base/` and there are two other directories, + * `a/` and `b/` under this directory, the count after listing `base/`, + * `base/a/` and `base/b/` is 3. + * @type int|string $directories_failed_to_list_from_source + * For transfers involving PosixFilesystem only. + * Number of listing failures for each directory found at the source. + * Potential failures when listing a directory include permission failure or + * block failure. If listing a directory fails, no files in the directory are + * transferred. + * @type int|string $directories_successfully_listed_from_source + * For transfers involving PosixFilesystem only. + * Number of successful listings for each directory found at the source. + * @type int|string $intermediate_objects_cleaned_up + * Number of successfully cleaned up intermediate objects. + * @type int|string $intermediate_objects_failed_cleaned_up + * Number of intermediate objects failed cleaned up. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found_from_source = 1; + * @return int|string + */ + public function getObjectsFoundFromSource() + { + return $this->objects_found_from_source; + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found_from_source = 1; + * @param int|string $var + * @return $this + */ + public function setObjectsFoundFromSource($var) + { + GPBUtil::checkInt64($var); + $this->objects_found_from_source = $var; + + return $this; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found_from_source = 2; + * @return int|string + */ + public function getBytesFoundFromSource() + { + return $this->bytes_found_from_source; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found_from_source = 2; + * @param int|string $var + * @return $this + */ + public function setBytesFoundFromSource($var) + { + GPBUtil::checkInt64($var); + $this->bytes_found_from_source = $var; + + return $this; + } + + /** + * Objects found only in the data sink that are scheduled to be deleted. + * + * Generated from protobuf field int64 objects_found_only_from_sink = 3; + * @return int|string + */ + public function getObjectsFoundOnlyFromSink() + { + return $this->objects_found_only_from_sink; + } + + /** + * Objects found only in the data sink that are scheduled to be deleted. + * + * Generated from protobuf field int64 objects_found_only_from_sink = 3; + * @param int|string $var + * @return $this + */ + public function setObjectsFoundOnlyFromSink($var) + { + GPBUtil::checkInt64($var); + $this->objects_found_only_from_sink = $var; + + return $this; + } + + /** + * Bytes found only in the data sink that are scheduled to be deleted. + * + * Generated from protobuf field int64 bytes_found_only_from_sink = 4; + * @return int|string + */ + public function getBytesFoundOnlyFromSink() + { + return $this->bytes_found_only_from_sink; + } + + /** + * Bytes found only in the data sink that are scheduled to be deleted. + * + * Generated from protobuf field int64 bytes_found_only_from_sink = 4; + * @param int|string $var + * @return $this + */ + public function setBytesFoundOnlyFromSink($var) + { + GPBUtil::checkInt64($var); + $this->bytes_found_only_from_sink = $var; + + return $this; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data sink. + * + * Generated from protobuf field int64 objects_from_source_skipped_by_sync = 5; + * @return int|string + */ + public function getObjectsFromSourceSkippedBySync() + { + return $this->objects_from_source_skipped_by_sync; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data sink. + * + * Generated from protobuf field int64 objects_from_source_skipped_by_sync = 5; + * @param int|string $var + * @return $this + */ + public function setObjectsFromSourceSkippedBySync($var) + { + GPBUtil::checkInt64($var); + $this->objects_from_source_skipped_by_sync = $var; + + return $this; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data sink. + * + * Generated from protobuf field int64 bytes_from_source_skipped_by_sync = 6; + * @return int|string + */ + public function getBytesFromSourceSkippedBySync() + { + return $this->bytes_from_source_skipped_by_sync; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data sink. + * + * Generated from protobuf field int64 bytes_from_source_skipped_by_sync = 6; + * @param int|string $var + * @return $this + */ + public function setBytesFromSourceSkippedBySync($var) + { + GPBUtil::checkInt64($var); + $this->bytes_from_source_skipped_by_sync = $var; + + return $this; + } + + /** + * Objects that are copied to the data sink. + * + * Generated from protobuf field int64 objects_copied_to_sink = 7; + * @return int|string + */ + public function getObjectsCopiedToSink() + { + return $this->objects_copied_to_sink; + } + + /** + * Objects that are copied to the data sink. + * + * Generated from protobuf field int64 objects_copied_to_sink = 7; + * @param int|string $var + * @return $this + */ + public function setObjectsCopiedToSink($var) + { + GPBUtil::checkInt64($var); + $this->objects_copied_to_sink = $var; + + return $this; + } + + /** + * Bytes that are copied to the data sink. + * + * Generated from protobuf field int64 bytes_copied_to_sink = 8; + * @return int|string + */ + public function getBytesCopiedToSink() + { + return $this->bytes_copied_to_sink; + } + + /** + * Bytes that are copied to the data sink. + * + * Generated from protobuf field int64 bytes_copied_to_sink = 8; + * @param int|string $var + * @return $this + */ + public function setBytesCopiedToSink($var) + { + GPBUtil::checkInt64($var); + $this->bytes_copied_to_sink = $var; + + return $this; + } + + /** + * Objects that are deleted from the data source. + * + * Generated from protobuf field int64 objects_deleted_from_source = 9; + * @return int|string + */ + public function getObjectsDeletedFromSource() + { + return $this->objects_deleted_from_source; + } + + /** + * Objects that are deleted from the data source. + * + * Generated from protobuf field int64 objects_deleted_from_source = 9; + * @param int|string $var + * @return $this + */ + public function setObjectsDeletedFromSource($var) + { + GPBUtil::checkInt64($var); + $this->objects_deleted_from_source = $var; + + return $this; + } + + /** + * Bytes that are deleted from the data source. + * + * Generated from protobuf field int64 bytes_deleted_from_source = 10; + * @return int|string + */ + public function getBytesDeletedFromSource() + { + return $this->bytes_deleted_from_source; + } + + /** + * Bytes that are deleted from the data source. + * + * Generated from protobuf field int64 bytes_deleted_from_source = 10; + * @param int|string $var + * @return $this + */ + public function setBytesDeletedFromSource($var) + { + GPBUtil::checkInt64($var); + $this->bytes_deleted_from_source = $var; + + return $this; + } + + /** + * Objects that are deleted from the data sink. + * + * Generated from protobuf field int64 objects_deleted_from_sink = 11; + * @return int|string + */ + public function getObjectsDeletedFromSink() + { + return $this->objects_deleted_from_sink; + } + + /** + * Objects that are deleted from the data sink. + * + * Generated from protobuf field int64 objects_deleted_from_sink = 11; + * @param int|string $var + * @return $this + */ + public function setObjectsDeletedFromSink($var) + { + GPBUtil::checkInt64($var); + $this->objects_deleted_from_sink = $var; + + return $this; + } + + /** + * Bytes that are deleted from the data sink. + * + * Generated from protobuf field int64 bytes_deleted_from_sink = 12; + * @return int|string + */ + public function getBytesDeletedFromSink() + { + return $this->bytes_deleted_from_sink; + } + + /** + * Bytes that are deleted from the data sink. + * + * Generated from protobuf field int64 bytes_deleted_from_sink = 12; + * @param int|string $var + * @return $this + */ + public function setBytesDeletedFromSink($var) + { + GPBUtil::checkInt64($var); + $this->bytes_deleted_from_sink = $var; + + return $this; + } + + /** + * Objects in the data source that failed to be transferred or that failed + * to be deleted after being transferred. + * + * Generated from protobuf field int64 objects_from_source_failed = 13; + * @return int|string + */ + public function getObjectsFromSourceFailed() + { + return $this->objects_from_source_failed; + } + + /** + * Objects in the data source that failed to be transferred or that failed + * to be deleted after being transferred. + * + * Generated from protobuf field int64 objects_from_source_failed = 13; + * @param int|string $var + * @return $this + */ + public function setObjectsFromSourceFailed($var) + { + GPBUtil::checkInt64($var); + $this->objects_from_source_failed = $var; + + return $this; + } + + /** + * Bytes in the data source that failed to be transferred or that failed to + * be deleted after being transferred. + * + * Generated from protobuf field int64 bytes_from_source_failed = 14; + * @return int|string + */ + public function getBytesFromSourceFailed() + { + return $this->bytes_from_source_failed; + } + + /** + * Bytes in the data source that failed to be transferred or that failed to + * be deleted after being transferred. + * + * Generated from protobuf field int64 bytes_from_source_failed = 14; + * @param int|string $var + * @return $this + */ + public function setBytesFromSourceFailed($var) + { + GPBUtil::checkInt64($var); + $this->bytes_from_source_failed = $var; + + return $this; + } + + /** + * Objects that failed to be deleted from the data sink. + * + * Generated from protobuf field int64 objects_failed_to_delete_from_sink = 15; + * @return int|string + */ + public function getObjectsFailedToDeleteFromSink() + { + return $this->objects_failed_to_delete_from_sink; + } + + /** + * Objects that failed to be deleted from the data sink. + * + * Generated from protobuf field int64 objects_failed_to_delete_from_sink = 15; + * @param int|string $var + * @return $this + */ + public function setObjectsFailedToDeleteFromSink($var) + { + GPBUtil::checkInt64($var); + $this->objects_failed_to_delete_from_sink = $var; + + return $this; + } + + /** + * Bytes that failed to be deleted from the data sink. + * + * Generated from protobuf field int64 bytes_failed_to_delete_from_sink = 16; + * @return int|string + */ + public function getBytesFailedToDeleteFromSink() + { + return $this->bytes_failed_to_delete_from_sink; + } + + /** + * Bytes that failed to be deleted from the data sink. + * + * Generated from protobuf field int64 bytes_failed_to_delete_from_sink = 16; + * @param int|string $var + * @return $this + */ + public function setBytesFailedToDeleteFromSink($var) + { + GPBUtil::checkInt64($var); + $this->bytes_failed_to_delete_from_sink = $var; + + return $this; + } + + /** + * For transfers involving PosixFilesystem only. + * Number of directories found while listing. For example, if the root + * directory of the transfer is `base/` and there are two other directories, + * `a/` and `b/` under this directory, the count after listing `base/`, + * `base/a/` and `base/b/` is 3. + * + * Generated from protobuf field int64 directories_found_from_source = 17; + * @return int|string + */ + public function getDirectoriesFoundFromSource() + { + return $this->directories_found_from_source; + } + + /** + * For transfers involving PosixFilesystem only. + * Number of directories found while listing. For example, if the root + * directory of the transfer is `base/` and there are two other directories, + * `a/` and `b/` under this directory, the count after listing `base/`, + * `base/a/` and `base/b/` is 3. + * + * Generated from protobuf field int64 directories_found_from_source = 17; + * @param int|string $var + * @return $this + */ + public function setDirectoriesFoundFromSource($var) + { + GPBUtil::checkInt64($var); + $this->directories_found_from_source = $var; + + return $this; + } + + /** + * For transfers involving PosixFilesystem only. + * Number of listing failures for each directory found at the source. + * Potential failures when listing a directory include permission failure or + * block failure. If listing a directory fails, no files in the directory are + * transferred. + * + * Generated from protobuf field int64 directories_failed_to_list_from_source = 18; + * @return int|string + */ + public function getDirectoriesFailedToListFromSource() + { + return $this->directories_failed_to_list_from_source; + } + + /** + * For transfers involving PosixFilesystem only. + * Number of listing failures for each directory found at the source. + * Potential failures when listing a directory include permission failure or + * block failure. If listing a directory fails, no files in the directory are + * transferred. + * + * Generated from protobuf field int64 directories_failed_to_list_from_source = 18; + * @param int|string $var + * @return $this + */ + public function setDirectoriesFailedToListFromSource($var) + { + GPBUtil::checkInt64($var); + $this->directories_failed_to_list_from_source = $var; + + return $this; + } + + /** + * For transfers involving PosixFilesystem only. + * Number of successful listings for each directory found at the source. + * + * Generated from protobuf field int64 directories_successfully_listed_from_source = 19; + * @return int|string + */ + public function getDirectoriesSuccessfullyListedFromSource() + { + return $this->directories_successfully_listed_from_source; + } + + /** + * For transfers involving PosixFilesystem only. + * Number of successful listings for each directory found at the source. + * + * Generated from protobuf field int64 directories_successfully_listed_from_source = 19; + * @param int|string $var + * @return $this + */ + public function setDirectoriesSuccessfullyListedFromSource($var) + { + GPBUtil::checkInt64($var); + $this->directories_successfully_listed_from_source = $var; + + return $this; + } + + /** + * Number of successfully cleaned up intermediate objects. + * + * Generated from protobuf field int64 intermediate_objects_cleaned_up = 22; + * @return int|string + */ + public function getIntermediateObjectsCleanedUp() + { + return $this->intermediate_objects_cleaned_up; + } + + /** + * Number of successfully cleaned up intermediate objects. + * + * Generated from protobuf field int64 intermediate_objects_cleaned_up = 22; + * @param int|string $var + * @return $this + */ + public function setIntermediateObjectsCleanedUp($var) + { + GPBUtil::checkInt64($var); + $this->intermediate_objects_cleaned_up = $var; + + return $this; + } + + /** + * Number of intermediate objects failed cleaned up. + * + * Generated from protobuf field int64 intermediate_objects_failed_cleaned_up = 23; + * @return int|string + */ + public function getIntermediateObjectsFailedCleanedUp() + { + return $this->intermediate_objects_failed_cleaned_up; + } + + /** + * Number of intermediate objects failed cleaned up. + * + * Generated from protobuf field int64 intermediate_objects_failed_cleaned_up = 23; + * @param int|string $var + * @return $this + */ + public function setIntermediateObjectsFailedCleanedUp($var) + { + GPBUtil::checkInt64($var); + $this->intermediate_objects_failed_cleaned_up = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php new file mode 100644 index 000000000000..efc91b2f5ac8 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php @@ -0,0 +1,680 @@ +google.storagetransfer.v1.TransferJob + */ +class TransferJob extends \Google\Protobuf\Internal\Message +{ + /** + * A unique name (within the transfer project) assigned when the job is + * created. If this field is empty in a CreateTransferJobRequest, Storage + * Transfer Service assigns a unique name. Otherwise, the specified name + * is used as the unique name for this job. + * If the specified name is in use by a job, the creation request fails with + * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * This name must start with `"transferJobs/"` prefix and end with a letter or + * a number, and should be no more than 128 characters. For transfers + * involving PosixFilesystem, this name must start with `transferJobs/OPI` + * specifically. For all other transfer types, this name must not start with + * `transferJobs/OPI`. + * Non-PosixFilesystem example: + * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * PosixFilesystem example: + * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * Applications must not rely on the enforcement of naming requirements + * involving OPI. + * Invalid job names fail with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A description provided by the user for the job. Its max length is 1024 + * bytes when Unicode-encoded. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The ID of the Google Cloud project that owns the job. + * + * Generated from protobuf field string project_id = 3; + */ + protected $project_id = ''; + /** + * Transfer specification. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + protected $transfer_spec = null; + /** + * Notification configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + protected $notification_config = null; + /** + * Logging configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 14; + */ + protected $logging_config = null; + /** + * Specifies schedule for the transfer job. + * This is an optional field. When the field is not set, the job never + * executes a transfer, unless you invoke RunTransferJob or update the job to + * have a non-empty schedule. + * + * Generated from protobuf field .google.storagetransfer.v1.Schedule schedule = 5; + */ + protected $schedule = null; + /** + * Specifies the event stream for the transfer job for event-driven transfers. + * When EventStream is specified, the Schedule fields are ignored. + * + * Generated from protobuf field .google.storagetransfer.v1.EventStream event_stream = 15; + */ + protected $event_stream = null; + /** + * Status of the job. This value MUST be specified for + * `CreateTransferJobRequests`. + * **Note:** The effect of the new job status takes place during a subsequent + * job run. For example, if you change the job status from + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an + * operation spawned by the transfer is running, the status change would not + * affect the current operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob.Status status = 6; + */ + protected $status = 0; + /** + * Output only. The time that the transfer job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creation_time = null; + /** + * Output only. The time that the transfer job was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_modification_time = null; + /** + * Output only. The time that the transfer job was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deletion_time = null; + /** + * The name of the most recently started TransferOperation of this JobConfig. + * Present if a TransferOperation has been created for this JobConfig. + * + * Generated from protobuf field string latest_operation_name = 12; + */ + protected $latest_operation_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A unique name (within the transfer project) assigned when the job is + * created. If this field is empty in a CreateTransferJobRequest, Storage + * Transfer Service assigns a unique name. Otherwise, the specified name + * is used as the unique name for this job. + * If the specified name is in use by a job, the creation request fails with + * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * This name must start with `"transferJobs/"` prefix and end with a letter or + * a number, and should be no more than 128 characters. For transfers + * involving PosixFilesystem, this name must start with `transferJobs/OPI` + * specifically. For all other transfer types, this name must not start with + * `transferJobs/OPI`. + * Non-PosixFilesystem example: + * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * PosixFilesystem example: + * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * Applications must not rely on the enforcement of naming requirements + * involving OPI. + * Invalid job names fail with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * @type string $description + * A description provided by the user for the job. Its max length is 1024 + * bytes when Unicode-encoded. + * @type string $project_id + * The ID of the Google Cloud project that owns the job. + * @type \Google\Cloud\StorageTransfer\V1\TransferSpec $transfer_spec + * Transfer specification. + * @type \Google\Cloud\StorageTransfer\V1\NotificationConfig $notification_config + * Notification configuration. + * @type \Google\Cloud\StorageTransfer\V1\LoggingConfig $logging_config + * Logging configuration. + * @type \Google\Cloud\StorageTransfer\V1\Schedule $schedule + * Specifies schedule for the transfer job. + * This is an optional field. When the field is not set, the job never + * executes a transfer, unless you invoke RunTransferJob or update the job to + * have a non-empty schedule. + * @type \Google\Cloud\StorageTransfer\V1\EventStream $event_stream + * Specifies the event stream for the transfer job for event-driven transfers. + * When EventStream is specified, the Schedule fields are ignored. + * @type int $status + * Status of the job. This value MUST be specified for + * `CreateTransferJobRequests`. + * **Note:** The effect of the new job status takes place during a subsequent + * job run. For example, if you change the job status from + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an + * operation spawned by the transfer is running, the status change would not + * affect the current operation. + * @type \Google\Protobuf\Timestamp $creation_time + * Output only. The time that the transfer job was created. + * @type \Google\Protobuf\Timestamp $last_modification_time + * Output only. The time that the transfer job was last modified. + * @type \Google\Protobuf\Timestamp $deletion_time + * Output only. The time that the transfer job was deleted. + * @type string $latest_operation_name + * The name of the most recently started TransferOperation of this JobConfig. + * Present if a TransferOperation has been created for this JobConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * A unique name (within the transfer project) assigned when the job is + * created. If this field is empty in a CreateTransferJobRequest, Storage + * Transfer Service assigns a unique name. Otherwise, the specified name + * is used as the unique name for this job. + * If the specified name is in use by a job, the creation request fails with + * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * This name must start with `"transferJobs/"` prefix and end with a letter or + * a number, and should be no more than 128 characters. For transfers + * involving PosixFilesystem, this name must start with `transferJobs/OPI` + * specifically. For all other transfer types, this name must not start with + * `transferJobs/OPI`. + * Non-PosixFilesystem example: + * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * PosixFilesystem example: + * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * Applications must not rely on the enforcement of naming requirements + * involving OPI. + * Invalid job names fail with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A unique name (within the transfer project) assigned when the job is + * created. If this field is empty in a CreateTransferJobRequest, Storage + * Transfer Service assigns a unique name. Otherwise, the specified name + * is used as the unique name for this job. + * If the specified name is in use by a job, the creation request fails with + * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + * This name must start with `"transferJobs/"` prefix and end with a letter or + * a number, and should be no more than 128 characters. For transfers + * involving PosixFilesystem, this name must start with `transferJobs/OPI` + * specifically. For all other transfer types, this name must not start with + * `transferJobs/OPI`. + * Non-PosixFilesystem example: + * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * PosixFilesystem example: + * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + * Applications must not rely on the enforcement of naming requirements + * involving OPI. + * Invalid job names fail with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * 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; + } + + /** + * A description provided by the user for the job. Its max length is 1024 + * bytes when Unicode-encoded. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description provided by the user for the job. Its max length is 1024 + * bytes when Unicode-encoded. + * + * 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; + } + + /** + * The ID of the Google Cloud project that owns the job. + * + * Generated from protobuf field string project_id = 3; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The ID of the Google Cloud project that owns the job. + * + * Generated from protobuf field string project_id = 3; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Transfer specification. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * @return \Google\Cloud\StorageTransfer\V1\TransferSpec|null + */ + public function getTransferSpec() + { + return $this->transfer_spec; + } + + public function hasTransferSpec() + { + return isset($this->transfer_spec); + } + + public function clearTransferSpec() + { + unset($this->transfer_spec); + } + + /** + * Transfer specification. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * @param \Google\Cloud\StorageTransfer\V1\TransferSpec $var + * @return $this + */ + public function setTransferSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferSpec::class); + $this->transfer_spec = $var; + + return $this; + } + + /** + * Notification configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * @return \Google\Cloud\StorageTransfer\V1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Notification configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * @param \Google\Cloud\StorageTransfer\V1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * Logging configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 14; + * @return \Google\Cloud\StorageTransfer\V1\LoggingConfig|null + */ + public function getLoggingConfig() + { + return $this->logging_config; + } + + public function hasLoggingConfig() + { + return isset($this->logging_config); + } + + public function clearLoggingConfig() + { + unset($this->logging_config); + } + + /** + * Logging configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 14; + * @param \Google\Cloud\StorageTransfer\V1\LoggingConfig $var + * @return $this + */ + public function setLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\LoggingConfig::class); + $this->logging_config = $var; + + return $this; + } + + /** + * Specifies schedule for the transfer job. + * This is an optional field. When the field is not set, the job never + * executes a transfer, unless you invoke RunTransferJob or update the job to + * have a non-empty schedule. + * + * Generated from protobuf field .google.storagetransfer.v1.Schedule schedule = 5; + * @return \Google\Cloud\StorageTransfer\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * Specifies schedule for the transfer job. + * This is an optional field. When the field is not set, the job never + * executes a transfer, unless you invoke RunTransferJob or update the job to + * have a non-empty schedule. + * + * Generated from protobuf field .google.storagetransfer.v1.Schedule schedule = 5; + * @param \Google\Cloud\StorageTransfer\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + + /** + * Specifies the event stream for the transfer job for event-driven transfers. + * When EventStream is specified, the Schedule fields are ignored. + * + * Generated from protobuf field .google.storagetransfer.v1.EventStream event_stream = 15; + * @return \Google\Cloud\StorageTransfer\V1\EventStream|null + */ + public function getEventStream() + { + return $this->event_stream; + } + + public function hasEventStream() + { + return isset($this->event_stream); + } + + public function clearEventStream() + { + unset($this->event_stream); + } + + /** + * Specifies the event stream for the transfer job for event-driven transfers. + * When EventStream is specified, the Schedule fields are ignored. + * + * Generated from protobuf field .google.storagetransfer.v1.EventStream event_stream = 15; + * @param \Google\Cloud\StorageTransfer\V1\EventStream $var + * @return $this + */ + public function setEventStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\EventStream::class); + $this->event_stream = $var; + + return $this; + } + + /** + * Status of the job. This value MUST be specified for + * `CreateTransferJobRequests`. + * **Note:** The effect of the new job status takes place during a subsequent + * job run. For example, if you change the job status from + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an + * operation spawned by the transfer is running, the status change would not + * affect the current operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob.Status status = 6; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Status of the job. This value MUST be specified for + * `CreateTransferJobRequests`. + * **Note:** The effect of the new job status takes place during a subsequent + * job run. For example, if you change the job status from + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an + * operation spawned by the transfer is running, the status change would not + * affect the current operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob.Status status = 6; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\TransferJob\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. The time that the transfer job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreationTime() + { + return $this->creation_time; + } + + public function hasCreationTime() + { + return isset($this->creation_time); + } + + public function clearCreationTime() + { + unset($this->creation_time); + } + + /** + * Output only. The time that the transfer job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->creation_time = $var; + + return $this; + } + + /** + * Output only. The time that the transfer job was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastModificationTime() + { + return $this->last_modification_time; + } + + public function hasLastModificationTime() + { + return isset($this->last_modification_time); + } + + public function clearLastModificationTime() + { + unset($this->last_modification_time); + } + + /** + * Output only. The time that the transfer job was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastModificationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_modification_time = $var; + + return $this; + } + + /** + * Output only. The time that the transfer job was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeletionTime() + { + return $this->deletion_time; + } + + public function hasDeletionTime() + { + return isset($this->deletion_time); + } + + public function clearDeletionTime() + { + unset($this->deletion_time); + } + + /** + * Output only. The time that the transfer job was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeletionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->deletion_time = $var; + + return $this; + } + + /** + * The name of the most recently started TransferOperation of this JobConfig. + * Present if a TransferOperation has been created for this JobConfig. + * + * Generated from protobuf field string latest_operation_name = 12; + * @return string + */ + public function getLatestOperationName() + { + return $this->latest_operation_name; + } + + /** + * The name of the most recently started TransferOperation of this JobConfig. + * Present if a TransferOperation has been created for this JobConfig. + * + * Generated from protobuf field string latest_operation_name = 12; + * @param string $var + * @return $this + */ + public function setLatestOperationName($var) + { + GPBUtil::checkString($var, True); + $this->latest_operation_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php new file mode 100644 index 000000000000..f54ca4bfc2ce --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php @@ -0,0 +1,74 @@ +google.storagetransfer.v1.TransferJob.Status + */ +class Status +{ + /** + * Zero is an illegal value. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * New transfers are performed based on the schedule. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * New transfers are not scheduled. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * This is a soft delete state. After a transfer job is set to this + * state, the job and all the transfer executions are subject to + * garbage collection. Transfer jobs become eligible for garbage collection + * 30 days after their status is set to `DELETED`. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + self::DELETED => 'DELETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Status::class, \Google\Cloud\StorageTransfer\V1\TransferJob_Status::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php new file mode 100644 index 000000000000..6927b1763dac --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php @@ -0,0 +1,79 @@ +google.storagetransfer.v1.TransferManifest + */ +class TransferManifest extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the path to the manifest in Cloud Storage. The Google-managed + * service account for the transfer must have `storage.objects.get` + * permission for this object. An example path is + * `gs://bucket_name/path/manifest.csv`. + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Specifies the path to the manifest in Cloud Storage. The Google-managed + * service account for the transfer must have `storage.objects.get` + * permission for this object. An example path is + * `gs://bucket_name/path/manifest.csv`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the path to the manifest in Cloud Storage. The Google-managed + * service account for the transfer must have `storage.objects.get` + * permission for this object. An example path is + * `gs://bucket_name/path/manifest.csv`. + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Specifies the path to the manifest in Cloud Storage. The Google-managed + * service account for the transfer must have `storage.objects.get` + * permission for this object. An example path is + * `gs://bucket_name/path/manifest.csv`. + * + * Generated from protobuf field string location = 1; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php new file mode 100644 index 000000000000..e846c718a831 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php @@ -0,0 +1,467 @@ +google.storagetransfer.v1.TransferOperation + */ +class TransferOperation extends \Google\Protobuf\Internal\Message +{ + /** + * A globally unique ID assigned by the system. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The ID of the Google Cloud project that owns the operation. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * Transfer specification. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + protected $transfer_spec = null; + /** + * Notification configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + protected $notification_config = null; + /** + * Cloud Logging configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 12; + */ + protected $logging_config = null; + /** + * Start time of this transfer execution. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * End time of this transfer execution. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + /** + * Status of the transfer operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOperation.Status status = 6; + */ + protected $status = 0; + /** + * Information about the progress of the transfer operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferCounters counters = 7; + */ + protected $counters = null; + /** + * Summarizes errors encountered with sample error log entries. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + private $error_breakdowns; + /** + * The name of the transfer job that triggers this transfer operation. + * + * Generated from protobuf field string transfer_job_name = 9; + */ + protected $transfer_job_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A globally unique ID assigned by the system. + * @type string $project_id + * The ID of the Google Cloud project that owns the operation. + * @type \Google\Cloud\StorageTransfer\V1\TransferSpec $transfer_spec + * Transfer specification. + * @type \Google\Cloud\StorageTransfer\V1\NotificationConfig $notification_config + * Notification configuration. + * @type \Google\Cloud\StorageTransfer\V1\LoggingConfig $logging_config + * Cloud Logging configuration. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of this transfer execution. + * @type \Google\Protobuf\Timestamp $end_time + * End time of this transfer execution. + * @type int $status + * Status of the transfer operation. + * @type \Google\Cloud\StorageTransfer\V1\TransferCounters $counters + * Information about the progress of the transfer operation. + * @type array<\Google\Cloud\StorageTransfer\V1\ErrorSummary>|\Google\Protobuf\Internal\RepeatedField $error_breakdowns + * Summarizes errors encountered with sample error log entries. + * @type string $transfer_job_name + * The name of the transfer job that triggers this transfer operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * A globally unique ID assigned by the system. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A globally unique ID assigned by the system. + * + * 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 ID of the Google Cloud project that owns the operation. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The ID of the Google Cloud project that owns the operation. + * + * Generated from protobuf field string project_id = 2; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Transfer specification. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * @return \Google\Cloud\StorageTransfer\V1\TransferSpec|null + */ + public function getTransferSpec() + { + return $this->transfer_spec; + } + + public function hasTransferSpec() + { + return isset($this->transfer_spec); + } + + public function clearTransferSpec() + { + unset($this->transfer_spec); + } + + /** + * Transfer specification. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * @param \Google\Cloud\StorageTransfer\V1\TransferSpec $var + * @return $this + */ + public function setTransferSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferSpec::class); + $this->transfer_spec = $var; + + return $this; + } + + /** + * Notification configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * @return \Google\Cloud\StorageTransfer\V1\NotificationConfig|null + */ + public function getNotificationConfig() + { + return $this->notification_config; + } + + public function hasNotificationConfig() + { + return isset($this->notification_config); + } + + public function clearNotificationConfig() + { + unset($this->notification_config); + } + + /** + * Notification configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * @param \Google\Cloud\StorageTransfer\V1\NotificationConfig $var + * @return $this + */ + public function setNotificationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\NotificationConfig::class); + $this->notification_config = $var; + + return $this; + } + + /** + * Cloud Logging configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 12; + * @return \Google\Cloud\StorageTransfer\V1\LoggingConfig|null + */ + public function getLoggingConfig() + { + return $this->logging_config; + } + + public function hasLoggingConfig() + { + return isset($this->logging_config); + } + + public function clearLoggingConfig() + { + unset($this->logging_config); + } + + /** + * Cloud Logging configuration. + * + * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 12; + * @param \Google\Cloud\StorageTransfer\V1\LoggingConfig $var + * @return $this + */ + public function setLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\LoggingConfig::class); + $this->logging_config = $var; + + return $this; + } + + /** + * Start time of this transfer execution. + * + * 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 this transfer execution. + * + * 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 this transfer execution. + * + * 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 this transfer execution. + * + * 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; + } + + /** + * Status of the transfer operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOperation.Status status = 6; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Status of the transfer operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOperation.Status status = 6; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\TransferOperation\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Information about the progress of the transfer operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferCounters counters = 7; + * @return \Google\Cloud\StorageTransfer\V1\TransferCounters|null + */ + public function getCounters() + { + return $this->counters; + } + + public function hasCounters() + { + return isset($this->counters); + } + + public function clearCounters() + { + unset($this->counters); + } + + /** + * Information about the progress of the transfer operation. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferCounters counters = 7; + * @param \Google\Cloud\StorageTransfer\V1\TransferCounters $var + * @return $this + */ + public function setCounters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferCounters::class); + $this->counters = $var; + + return $this; + } + + /** + * Summarizes errors encountered with sample error log entries. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorBreakdowns() + { + return $this->error_breakdowns; + } + + /** + * Summarizes errors encountered with sample error log entries. + * + * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + * @param array<\Google\Cloud\StorageTransfer\V1\ErrorSummary>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorBreakdowns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\ErrorSummary::class); + $this->error_breakdowns = $arr; + + return $this; + } + + /** + * The name of the transfer job that triggers this transfer operation. + * + * Generated from protobuf field string transfer_job_name = 9; + * @return string + */ + public function getTransferJobName() + { + return $this->transfer_job_name; + } + + /** + * The name of the transfer job that triggers this transfer operation. + * + * Generated from protobuf field string transfer_job_name = 9; + * @param string $var + * @return $this + */ + public function setTransferJobName($var) + { + GPBUtil::checkString($var, True); + $this->transfer_job_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php new file mode 100644 index 000000000000..780e98a79148 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php @@ -0,0 +1,99 @@ +google.storagetransfer.v1.TransferOperation.Status + */ +class Status +{ + /** + * Zero is an illegal value. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * In progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Paused. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * Completed successfully. + * + * Generated from protobuf enum SUCCESS = 3; + */ + const SUCCESS = 3; + /** + * Terminated due to an unrecoverable failure. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * Aborted by the user. + * + * Generated from protobuf enum ABORTED = 5; + */ + const ABORTED = 5; + /** + * Temporarily delayed by the system. No user action is required. + * + * Generated from protobuf enum QUEUED = 6; + */ + const QUEUED = 6; + /** + * The operation is suspending and draining the ongoing work to completion. + * + * Generated from protobuf enum SUSPENDING = 7; + */ + const SUSPENDING = 7; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::PAUSED => 'PAUSED', + self::SUCCESS => 'SUCCESS', + self::FAILED => 'FAILED', + self::ABORTED => 'ABORTED', + self::QUEUED => 'QUEUED', + self::SUSPENDING => 'SUSPENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Status::class, \Google\Cloud\StorageTransfer\V1\TransferOperation_Status::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php new file mode 100644 index 000000000000..64ec64d7320b --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php @@ -0,0 +1,261 @@ +google.storagetransfer.v1.TransferOptions + */ +class TransferOptions extends \Google\Protobuf\Internal\Message +{ + /** + * When to overwrite objects that already exist in the sink. The default is + * that only objects that are different from the source are ovewritten. If + * true, all objects in the sink whose name matches an object in the source + * are overwritten with the source object. + * + * Generated from protobuf field bool overwrite_objects_already_existing_in_sink = 1; + */ + protected $overwrite_objects_already_existing_in_sink = false; + /** + * Whether objects that exist only in the sink should be deleted. + * **Note:** This option and + * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] + * are mutually exclusive. + * + * Generated from protobuf field bool delete_objects_unique_in_sink = 2; + */ + protected $delete_objects_unique_in_sink = false; + /** + * Whether objects should be deleted from the source after they are + * transferred to the sink. + * **Note:** This option and + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * are mutually exclusive. + * + * Generated from protobuf field bool delete_objects_from_source_after_transfer = 3; + */ + protected $delete_objects_from_source_after_transfer = false; + /** + * When to overwrite objects that already exist in the sink. If not set, + * overwrite behavior is determined by + * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOptions.OverwriteWhen overwrite_when = 4; + */ + protected $overwrite_when = 0; + /** + * Represents the selected metadata options for a transfer job. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions metadata_options = 5; + */ + protected $metadata_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $overwrite_objects_already_existing_in_sink + * When to overwrite objects that already exist in the sink. The default is + * that only objects that are different from the source are ovewritten. If + * true, all objects in the sink whose name matches an object in the source + * are overwritten with the source object. + * @type bool $delete_objects_unique_in_sink + * Whether objects that exist only in the sink should be deleted. + * **Note:** This option and + * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] + * are mutually exclusive. + * @type bool $delete_objects_from_source_after_transfer + * Whether objects should be deleted from the source after they are + * transferred to the sink. + * **Note:** This option and + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * are mutually exclusive. + * @type int $overwrite_when + * When to overwrite objects that already exist in the sink. If not set, + * overwrite behavior is determined by + * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. + * @type \Google\Cloud\StorageTransfer\V1\MetadataOptions $metadata_options + * Represents the selected metadata options for a transfer job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * When to overwrite objects that already exist in the sink. The default is + * that only objects that are different from the source are ovewritten. If + * true, all objects in the sink whose name matches an object in the source + * are overwritten with the source object. + * + * Generated from protobuf field bool overwrite_objects_already_existing_in_sink = 1; + * @return bool + */ + public function getOverwriteObjectsAlreadyExistingInSink() + { + return $this->overwrite_objects_already_existing_in_sink; + } + + /** + * When to overwrite objects that already exist in the sink. The default is + * that only objects that are different from the source are ovewritten. If + * true, all objects in the sink whose name matches an object in the source + * are overwritten with the source object. + * + * Generated from protobuf field bool overwrite_objects_already_existing_in_sink = 1; + * @param bool $var + * @return $this + */ + public function setOverwriteObjectsAlreadyExistingInSink($var) + { + GPBUtil::checkBool($var); + $this->overwrite_objects_already_existing_in_sink = $var; + + return $this; + } + + /** + * Whether objects that exist only in the sink should be deleted. + * **Note:** This option and + * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] + * are mutually exclusive. + * + * Generated from protobuf field bool delete_objects_unique_in_sink = 2; + * @return bool + */ + public function getDeleteObjectsUniqueInSink() + { + return $this->delete_objects_unique_in_sink; + } + + /** + * Whether objects that exist only in the sink should be deleted. + * **Note:** This option and + * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] + * are mutually exclusive. + * + * Generated from protobuf field bool delete_objects_unique_in_sink = 2; + * @param bool $var + * @return $this + */ + public function setDeleteObjectsUniqueInSink($var) + { + GPBUtil::checkBool($var); + $this->delete_objects_unique_in_sink = $var; + + return $this; + } + + /** + * Whether objects should be deleted from the source after they are + * transferred to the sink. + * **Note:** This option and + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * are mutually exclusive. + * + * Generated from protobuf field bool delete_objects_from_source_after_transfer = 3; + * @return bool + */ + public function getDeleteObjectsFromSourceAfterTransfer() + { + return $this->delete_objects_from_source_after_transfer; + } + + /** + * Whether objects should be deleted from the source after they are + * transferred to the sink. + * **Note:** This option and + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * are mutually exclusive. + * + * Generated from protobuf field bool delete_objects_from_source_after_transfer = 3; + * @param bool $var + * @return $this + */ + public function setDeleteObjectsFromSourceAfterTransfer($var) + { + GPBUtil::checkBool($var); + $this->delete_objects_from_source_after_transfer = $var; + + return $this; + } + + /** + * When to overwrite objects that already exist in the sink. If not set, + * overwrite behavior is determined by + * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOptions.OverwriteWhen overwrite_when = 4; + * @return int + */ + public function getOverwriteWhen() + { + return $this->overwrite_when; + } + + /** + * When to overwrite objects that already exist in the sink. If not set, + * overwrite behavior is determined by + * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOptions.OverwriteWhen overwrite_when = 4; + * @param int $var + * @return $this + */ + public function setOverwriteWhen($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\TransferOptions\OverwriteWhen::class); + $this->overwrite_when = $var; + + return $this; + } + + /** + * Represents the selected metadata options for a transfer job. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions metadata_options = 5; + * @return \Google\Cloud\StorageTransfer\V1\MetadataOptions|null + */ + public function getMetadataOptions() + { + return $this->metadata_options; + } + + public function hasMetadataOptions() + { + return isset($this->metadata_options); + } + + public function clearMetadataOptions() + { + unset($this->metadata_options); + } + + /** + * Represents the selected metadata options for a transfer job. + * + * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions metadata_options = 5; + * @param \Google\Cloud\StorageTransfer\V1\MetadataOptions $var + * @return $this + */ + public function setMetadataOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions::class); + $this->metadata_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php new file mode 100644 index 000000000000..c8287bcc3efd --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php @@ -0,0 +1,75 @@ +google.storagetransfer.v1.TransferOptions.OverwriteWhen + */ +class OverwriteWhen +{ + /** + * Overwrite behavior is unspecified. + * + * Generated from protobuf enum OVERWRITE_WHEN_UNSPECIFIED = 0; + */ + const OVERWRITE_WHEN_UNSPECIFIED = 0; + /** + * Overwrites destination objects with the source objects, only if the + * objects have the same name but different HTTP ETags or checksum values. + * + * Generated from protobuf enum DIFFERENT = 1; + */ + const DIFFERENT = 1; + /** + * Never overwrites a destination object if a source object has the + * same name. In this case, the source object is not transferred. + * + * Generated from protobuf enum NEVER = 2; + */ + const NEVER = 2; + /** + * Always overwrite the destination object with the source object, even if + * the HTTP Etags or checksum values are the same. + * + * Generated from protobuf enum ALWAYS = 3; + */ + const ALWAYS = 3; + + private static $valueToName = [ + self::OVERWRITE_WHEN_UNSPECIFIED => 'OVERWRITE_WHEN_UNSPECIFIED', + self::DIFFERENT => 'DIFFERENT', + self::NEVER => 'NEVER', + self::ALWAYS => 'ALWAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OverwriteWhen::class, \Google\Cloud\StorageTransfer\V1\TransferOptions_OverwriteWhen::class); + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php new file mode 100644 index 000000000000..28466a839393 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php @@ -0,0 +1,642 @@ +google.storagetransfer.v1.TransferSpec + */ +class TransferSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Only objects that satisfy these object conditions are included in the set + * of data source and data sink objects. Object conditions based on + * objects' "last modification time" do not exclude objects in a data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + protected $object_conditions = null; + /** + * If the option + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * is `true` and time-based object conditions such as 'last modification time' + * are specified, the request fails with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + protected $transfer_options = null; + /** + * A manifest file provides a list of objects to be transferred from the data + * source. This field points to the location of the manifest file. + * Otherwise, the entire source bucket is used. ObjectConditions still apply. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferManifest transfer_manifest = 15; + */ + protected $transfer_manifest = null; + /** + * Specifies the agent pool name associated with the posix data source. When + * unspecified, the default name is used. + * + * Generated from protobuf field string source_agent_pool_name = 17; + */ + protected $source_agent_pool_name = ''; + /** + * Specifies the agent pool name associated with the posix data sink. When + * unspecified, the default name is used. + * + * Generated from protobuf field string sink_agent_pool_name = 18; + */ + protected $sink_agent_pool_name = ''; + protected $data_sink; + protected $data_source; + protected $intermediate_data_location; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\StorageTransfer\V1\GcsData $gcs_data_sink + * A Cloud Storage data sink. + * @type \Google\Cloud\StorageTransfer\V1\PosixFilesystem $posix_data_sink + * A POSIX Filesystem data sink. + * @type \Google\Cloud\StorageTransfer\V1\GcsData $gcs_data_source + * A Cloud Storage data source. + * @type \Google\Cloud\StorageTransfer\V1\AwsS3Data $aws_s3_data_source + * An AWS S3 data source. + * @type \Google\Cloud\StorageTransfer\V1\HttpData $http_data_source + * An HTTP URL data source. + * @type \Google\Cloud\StorageTransfer\V1\PosixFilesystem $posix_data_source + * A POSIX Filesystem data source. + * @type \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData $azure_blob_storage_data_source + * An Azure Blob Storage data source. + * @type \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData $aws_s3_compatible_data_source + * An AWS S3 compatible data source. + * @type \Google\Cloud\StorageTransfer\V1\HdfsData $hdfs_data_source + * An HDFS cluster data source. + * @type \Google\Cloud\StorageTransfer\V1\GcsData $gcs_intermediate_data_location + * For transfers between file systems, specifies a Cloud Storage bucket + * to be used as an intermediate location through which to transfer data. + * See [Transfer data between file + * systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for + * more information. + * @type \Google\Cloud\StorageTransfer\V1\ObjectConditions $object_conditions + * Only objects that satisfy these object conditions are included in the set + * of data source and data sink objects. Object conditions based on + * objects' "last modification time" do not exclude objects in a data sink. + * @type \Google\Cloud\StorageTransfer\V1\TransferOptions $transfer_options + * If the option + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * is `true` and time-based object conditions such as 'last modification time' + * are specified, the request fails with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * @type \Google\Cloud\StorageTransfer\V1\TransferManifest $transfer_manifest + * A manifest file provides a list of objects to be transferred from the data + * source. This field points to the location of the manifest file. + * Otherwise, the entire source bucket is used. ObjectConditions still apply. + * @type string $source_agent_pool_name + * Specifies the agent pool name associated with the posix data source. When + * unspecified, the default name is used. + * @type string $sink_agent_pool_name + * Specifies the agent pool name associated with the posix data sink. When + * unspecified, the default name is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); + parent::__construct($data); + } + + /** + * A Cloud Storage data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * @return \Google\Cloud\StorageTransfer\V1\GcsData|null + */ + public function getGcsDataSink() + { + return $this->readOneof(4); + } + + public function hasGcsDataSink() + { + return $this->hasOneof(4); + } + + /** + * A Cloud Storage data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * @param \Google\Cloud\StorageTransfer\V1\GcsData $var + * @return $this + */ + public function setGcsDataSink($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\GcsData::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A POSIX Filesystem data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_sink = 13; + * @return \Google\Cloud\StorageTransfer\V1\PosixFilesystem|null + */ + public function getPosixDataSink() + { + return $this->readOneof(13); + } + + public function hasPosixDataSink() + { + return $this->hasOneof(13); + } + + /** + * A POSIX Filesystem data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_sink = 13; + * @param \Google\Cloud\StorageTransfer\V1\PosixFilesystem $var + * @return $this + */ + public function setPosixDataSink($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\PosixFilesystem::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * A Cloud Storage data source. + * + * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * @return \Google\Cloud\StorageTransfer\V1\GcsData|null + */ + public function getGcsDataSource() + { + return $this->readOneof(1); + } + + public function hasGcsDataSource() + { + return $this->hasOneof(1); + } + + /** + * A Cloud Storage data source. + * + * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * @param \Google\Cloud\StorageTransfer\V1\GcsData $var + * @return $this + */ + public function setGcsDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\GcsData::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An AWS S3 data source. + * + * Generated from protobuf field .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * @return \Google\Cloud\StorageTransfer\V1\AwsS3Data|null + */ + public function getAwsS3DataSource() + { + return $this->readOneof(2); + } + + public function hasAwsS3DataSource() + { + return $this->hasOneof(2); + } + + /** + * An AWS S3 data source. + * + * Generated from protobuf field .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * @param \Google\Cloud\StorageTransfer\V1\AwsS3Data $var + * @return $this + */ + public function setAwsS3DataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AwsS3Data::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An HTTP URL data source. + * + * Generated from protobuf field .google.storagetransfer.v1.HttpData http_data_source = 3; + * @return \Google\Cloud\StorageTransfer\V1\HttpData|null + */ + public function getHttpDataSource() + { + return $this->readOneof(3); + } + + public function hasHttpDataSource() + { + return $this->hasOneof(3); + } + + /** + * An HTTP URL data source. + * + * Generated from protobuf field .google.storagetransfer.v1.HttpData http_data_source = 3; + * @param \Google\Cloud\StorageTransfer\V1\HttpData $var + * @return $this + */ + public function setHttpDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\HttpData::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A POSIX Filesystem data source. + * + * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_source = 14; + * @return \Google\Cloud\StorageTransfer\V1\PosixFilesystem|null + */ + public function getPosixDataSource() + { + return $this->readOneof(14); + } + + public function hasPosixDataSource() + { + return $this->hasOneof(14); + } + + /** + * A POSIX Filesystem data source. + * + * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_source = 14; + * @param \Google\Cloud\StorageTransfer\V1\PosixFilesystem $var + * @return $this + */ + public function setPosixDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\PosixFilesystem::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * An Azure Blob Storage data source. + * + * Generated from protobuf field .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * @return \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData|null + */ + public function getAzureBlobStorageDataSource() + { + return $this->readOneof(8); + } + + public function hasAzureBlobStorageDataSource() + { + return $this->hasOneof(8); + } + + /** + * An Azure Blob Storage data source. + * + * Generated from protobuf field .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * @param \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData $var + * @return $this + */ + public function setAzureBlobStorageDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * An AWS S3 compatible data source. + * + * Generated from protobuf field .google.storagetransfer.v1.AwsS3CompatibleData aws_s3_compatible_data_source = 19; + * @return \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData|null + */ + public function getAwsS3CompatibleDataSource() + { + return $this->readOneof(19); + } + + public function hasAwsS3CompatibleDataSource() + { + return $this->hasOneof(19); + } + + /** + * An AWS S3 compatible data source. + * + * Generated from protobuf field .google.storagetransfer.v1.AwsS3CompatibleData aws_s3_compatible_data_source = 19; + * @param \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData $var + * @return $this + */ + public function setAwsS3CompatibleDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * An HDFS cluster data source. + * + * Generated from protobuf field .google.storagetransfer.v1.HdfsData hdfs_data_source = 20; + * @return \Google\Cloud\StorageTransfer\V1\HdfsData|null + */ + public function getHdfsDataSource() + { + return $this->readOneof(20); + } + + public function hasHdfsDataSource() + { + return $this->hasOneof(20); + } + + /** + * An HDFS cluster data source. + * + * Generated from protobuf field .google.storagetransfer.v1.HdfsData hdfs_data_source = 20; + * @param \Google\Cloud\StorageTransfer\V1\HdfsData $var + * @return $this + */ + public function setHdfsDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\HdfsData::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * For transfers between file systems, specifies a Cloud Storage bucket + * to be used as an intermediate location through which to transfer data. + * See [Transfer data between file + * systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for + * more information. + * + * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_intermediate_data_location = 16; + * @return \Google\Cloud\StorageTransfer\V1\GcsData|null + */ + public function getGcsIntermediateDataLocation() + { + return $this->readOneof(16); + } + + public function hasGcsIntermediateDataLocation() + { + return $this->hasOneof(16); + } + + /** + * For transfers between file systems, specifies a Cloud Storage bucket + * to be used as an intermediate location through which to transfer data. + * See [Transfer data between file + * systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for + * more information. + * + * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_intermediate_data_location = 16; + * @param \Google\Cloud\StorageTransfer\V1\GcsData $var + * @return $this + */ + public function setGcsIntermediateDataLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\GcsData::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Only objects that satisfy these object conditions are included in the set + * of data source and data sink objects. Object conditions based on + * objects' "last modification time" do not exclude objects in a data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * @return \Google\Cloud\StorageTransfer\V1\ObjectConditions|null + */ + public function getObjectConditions() + { + return $this->object_conditions; + } + + public function hasObjectConditions() + { + return isset($this->object_conditions); + } + + public function clearObjectConditions() + { + unset($this->object_conditions); + } + + /** + * Only objects that satisfy these object conditions are included in the set + * of data source and data sink objects. Object conditions based on + * objects' "last modification time" do not exclude objects in a data sink. + * + * Generated from protobuf field .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * @param \Google\Cloud\StorageTransfer\V1\ObjectConditions $var + * @return $this + */ + public function setObjectConditions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\ObjectConditions::class); + $this->object_conditions = $var; + + return $this; + } + + /** + * If the option + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * is `true` and time-based object conditions such as 'last modification time' + * are specified, the request fails with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * @return \Google\Cloud\StorageTransfer\V1\TransferOptions|null + */ + public function getTransferOptions() + { + return $this->transfer_options; + } + + public function hasTransferOptions() + { + return isset($this->transfer_options); + } + + public function clearTransferOptions() + { + unset($this->transfer_options); + } + + /** + * If the option + * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + * is `true` and time-based object conditions such as 'last modification time' + * are specified, the request fails with an + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * @param \Google\Cloud\StorageTransfer\V1\TransferOptions $var + * @return $this + */ + public function setTransferOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferOptions::class); + $this->transfer_options = $var; + + return $this; + } + + /** + * A manifest file provides a list of objects to be transferred from the data + * source. This field points to the location of the manifest file. + * Otherwise, the entire source bucket is used. ObjectConditions still apply. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferManifest transfer_manifest = 15; + * @return \Google\Cloud\StorageTransfer\V1\TransferManifest|null + */ + public function getTransferManifest() + { + return $this->transfer_manifest; + } + + public function hasTransferManifest() + { + return isset($this->transfer_manifest); + } + + public function clearTransferManifest() + { + unset($this->transfer_manifest); + } + + /** + * A manifest file provides a list of objects to be transferred from the data + * source. This field points to the location of the manifest file. + * Otherwise, the entire source bucket is used. ObjectConditions still apply. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferManifest transfer_manifest = 15; + * @param \Google\Cloud\StorageTransfer\V1\TransferManifest $var + * @return $this + */ + public function setTransferManifest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferManifest::class); + $this->transfer_manifest = $var; + + return $this; + } + + /** + * Specifies the agent pool name associated with the posix data source. When + * unspecified, the default name is used. + * + * Generated from protobuf field string source_agent_pool_name = 17; + * @return string + */ + public function getSourceAgentPoolName() + { + return $this->source_agent_pool_name; + } + + /** + * Specifies the agent pool name associated with the posix data source. When + * unspecified, the default name is used. + * + * Generated from protobuf field string source_agent_pool_name = 17; + * @param string $var + * @return $this + */ + public function setSourceAgentPoolName($var) + { + GPBUtil::checkString($var, True); + $this->source_agent_pool_name = $var; + + return $this; + } + + /** + * Specifies the agent pool name associated with the posix data sink. When + * unspecified, the default name is used. + * + * Generated from protobuf field string sink_agent_pool_name = 18; + * @return string + */ + public function getSinkAgentPoolName() + { + return $this->sink_agent_pool_name; + } + + /** + * Specifies the agent pool name associated with the posix data sink. When + * unspecified, the default name is used. + * + * Generated from protobuf field string sink_agent_pool_name = 18; + * @param string $var + * @return $this + */ + public function setSinkAgentPoolName($var) + { + GPBUtil::checkString($var, True); + $this->sink_agent_pool_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataSink() + { + return $this->whichOneof("data_sink"); + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + + /** + * @return string + */ + public function getIntermediateDataLocation() + { + return $this->whichOneof("intermediate_data_location"); + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php new file mode 100644 index 000000000000..5be6031ef1f1 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php @@ -0,0 +1,196 @@ +google.storagetransfer.v1.UpdateAgentPoolRequest + */ +class UpdateAgentPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The agent pool to update. `agent_pool` is expected to specify + * following fields: + * * [name][google.storagetransfer.v1.AgentPool.name] + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * An `UpdateAgentPoolRequest` with any other fields is rejected + * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $agent_pool = null; + /** + * The [field mask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) + * of the fields in `agentPool` to update in this request. + * The following `agentPool` fields can be updated: + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool Required. The agent pool to update. `agent_pool` is expected to specify + * following fields: + * + * * [name][google.storagetransfer.v1.AgentPool.name] + * + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * An `UpdateAgentPoolRequest` with any other fields is rejected + * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * @param \Google\Protobuf\FieldMask $updateMask The [field mask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) + * of the fields in `agentPool` to update in this request. + * The following `agentPool` fields can be updated: + * + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * + * @return \Google\Cloud\StorageTransfer\V1\UpdateAgentPoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\StorageTransfer\V1\AgentPool $agentPool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAgentPool($agentPool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\StorageTransfer\V1\AgentPool $agent_pool + * Required. The agent pool to update. `agent_pool` is expected to specify + * following fields: + * * [name][google.storagetransfer.v1.AgentPool.name] + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * An `UpdateAgentPoolRequest` with any other fields is rejected + * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * @type \Google\Protobuf\FieldMask $update_mask + * The [field mask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) + * of the fields in `agentPool` to update in this request. + * The following `agentPool` fields can be updated: + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The agent pool to update. `agent_pool` is expected to specify + * following fields: + * * [name][google.storagetransfer.v1.AgentPool.name] + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * An `UpdateAgentPoolRequest` with any other fields is rejected + * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\StorageTransfer\V1\AgentPool|null + */ + public function getAgentPool() + { + return $this->agent_pool; + } + + public function hasAgentPool() + { + return isset($this->agent_pool); + } + + public function clearAgentPool() + { + unset($this->agent_pool); + } + + /** + * Required. The agent pool to update. `agent_pool` is expected to specify + * following fields: + * * [name][google.storagetransfer.v1.AgentPool.name] + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * An `UpdateAgentPoolRequest` with any other fields is rejected + * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\StorageTransfer\V1\AgentPool $var + * @return $this + */ + public function setAgentPool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool::class); + $this->agent_pool = $var; + + return $this; + } + + /** + * The [field mask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) + * of the fields in `agentPool` to update in this request. + * The following `agentPool` fields can be updated: + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * + * 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 [field mask] + * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) + * of the fields in `agentPool` to update in this request. + * The following `agentPool` fields can be updated: + * * [display_name][google.storagetransfer.v1.AgentPool.display_name] + * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] + * + * 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/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php new file mode 100644 index 000000000000..569b3c14ca52 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php @@ -0,0 +1,277 @@ +google.storagetransfer.v1.UpdateTransferJobRequest + */ +class UpdateTransferJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of job to update. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_name = ''; + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. The job to update. `transferJob` is expected to specify one or + * more of five fields: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. An + * `UpdateTransferJobRequest` that specifies other fields are rejected with + * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a + * job status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires + * `storagetransfer.jobs.delete` permission. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transfer_job = null; + /** + * The field mask of the fields in `transferJob` that are to be updated in + * this request. Fields in `transferJob` that can be updated are: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. To update the + * `transfer_spec` of the job, a complete transfer specification must be + * provided. An incomplete specification missing any required fields is + * rejected with the error + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + protected $update_transfer_job_field_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $job_name + * Required. The name of job to update. + * @type string $project_id + * Required. The ID of the Google Cloud project that owns the + * job. + * @type \Google\Cloud\StorageTransfer\V1\TransferJob $transfer_job + * Required. The job to update. `transferJob` is expected to specify one or + * more of five fields: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. An + * `UpdateTransferJobRequest` that specifies other fields are rejected with + * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a + * job status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires + * `storagetransfer.jobs.delete` permission. + * @type \Google\Protobuf\FieldMask $update_transfer_job_field_mask + * The field mask of the fields in `transferJob` that are to be updated in + * this request. Fields in `transferJob` that can be updated are: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. To update the + * `transfer_spec` of the job, a complete transfer specification must be + * provided. An incomplete specification missing any required fields is + * rejected with the error + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of job to update. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobName() + { + return $this->job_name; + } + + /** + * Required. The name of job to update. + * + * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobName($var) + { + GPBUtil::checkString($var, True); + $this->job_name = $var; + + return $this; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The ID of the Google Cloud project that owns the + * job. + * + * Generated from protobuf field string project_id = 2 [(.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 job to update. `transferJob` is expected to specify one or + * more of five fields: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. An + * `UpdateTransferJobRequest` that specifies other fields are rejected with + * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a + * job status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires + * `storagetransfer.jobs.delete` permission. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\StorageTransfer\V1\TransferJob|null + */ + public function getTransferJob() + { + return $this->transfer_job; + } + + public function hasTransferJob() + { + return isset($this->transfer_job); + } + + public function clearTransferJob() + { + unset($this->transfer_job); + } + + /** + * Required. The job to update. `transferJob` is expected to specify one or + * more of five fields: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. An + * `UpdateTransferJobRequest` that specifies other fields are rejected with + * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a + * job status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires + * `storagetransfer.jobs.delete` permission. + * + * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\StorageTransfer\V1\TransferJob $var + * @return $this + */ + public function setTransferJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferJob::class); + $this->transfer_job = $var; + + return $this; + } + + /** + * The field mask of the fields in `transferJob` that are to be updated in + * this request. Fields in `transferJob` that can be updated are: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. To update the + * `transfer_spec` of the job, a complete transfer specification must be + * provided. An incomplete specification missing any required fields is + * rejected with the error + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateTransferJobFieldMask() + { + return $this->update_transfer_job_field_mask; + } + + public function hasUpdateTransferJobFieldMask() + { + return isset($this->update_transfer_job_field_mask); + } + + public function clearUpdateTransferJobFieldMask() + { + unset($this->update_transfer_job_field_mask); + } + + /** + * The field mask of the fields in `transferJob` that are to be updated in + * this request. Fields in `transferJob` that can be updated are: + * [description][google.storagetransfer.v1.TransferJob.description], + * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and + * [status][google.storagetransfer.v1.TransferJob.status]. To update the + * `transfer_spec` of the job, a complete transfer specification must be + * provided. An incomplete specification missing any required fields is + * rejected with the error + * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateTransferJobFieldMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_transfer_job_field_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php new file mode 100644 index 000000000000..32cce959bf7c --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php @@ -0,0 +1,96 @@ +setName($agentPoolName); + $request = (new CreateAgentPoolRequest()) + ->setProjectId($projectId) + ->setAgentPool($agentPool) + ->setAgentPoolId($agentPoolId); + + // Call the API and handle any network failures. + try { + /** @var AgentPool $response */ + $response = $storageTransferServiceClient->createAgentPool($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]'; + $agentPoolName = '[NAME]'; + $agentPoolId = '[AGENT_POOL_ID]'; + + create_agent_pool_sample($projectId, $agentPoolName, $agentPoolId); +} +// [END storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php new file mode 100644 index 000000000000..d438f00b0091 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php @@ -0,0 +1,59 @@ +setTransferJob($transferJob); + + // Call the API and handle any network failures. + try { + /** @var TransferJob $response */ + $response = $storageTransferServiceClient->createTransferJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php new file mode 100644 index 000000000000..67fc8d9b15cd --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php @@ -0,0 +1,68 @@ +setName($name); + + // Call the API and handle any network failures. + try { + $storageTransferServiceClient->deleteAgentPool($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_agent_pool_sample($name); +} +// [END storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php new file mode 100644 index 000000000000..07ebf77d734a --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php @@ -0,0 +1,73 @@ +setJobName($jobName) + ->setProjectId($projectId); + + // Call the API and handle any network failures. + try { + $storageTransferServiceClient->deleteTransferJob($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 +{ + $jobName = '[JOB_NAME]'; + $projectId = '[PROJECT_ID]'; + + delete_transfer_job_sample($jobName, $projectId); +} +// [END storagetransfer_v1_generated_StorageTransferService_DeleteTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php new file mode 100644 index 000000000000..f5eeed1e2477 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php @@ -0,0 +1,70 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var AgentPool $response */ + $response = $storageTransferServiceClient->getAgentPool($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_agent_pool_sample($name); +} +// [END storagetransfer_v1_generated_StorageTransferService_GetAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php new file mode 100644 index 000000000000..33ace4d42240 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php @@ -0,0 +1,78 @@ +setProjectId($projectId); + + // Call the API and handle any network failures. + try { + /** @var GoogleServiceAccount $response */ + $response = $storageTransferServiceClient->getGoogleServiceAccount($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]'; + + get_google_service_account_sample($projectId); +} +// [END storagetransfer_v1_generated_StorageTransferService_GetGoogleServiceAccount_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php new file mode 100644 index 000000000000..0c91f0f8b622 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php @@ -0,0 +1,74 @@ +setJobName($jobName) + ->setProjectId($projectId); + + // Call the API and handle any network failures. + try { + /** @var TransferJob $response */ + $response = $storageTransferServiceClient->getTransferJob($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 +{ + $jobName = '[JOB_NAME]'; + $projectId = '[PROJECT_ID]'; + + get_transfer_job_sample($jobName, $projectId); +} +// [END storagetransfer_v1_generated_StorageTransferService_GetTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php new file mode 100644 index 000000000000..e5d6660252e5 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php @@ -0,0 +1,75 @@ +setProjectId($projectId); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageTransferServiceClient->listAgentPools($request); + + /** @var AgentPool $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_agent_pools_sample($projectId); +} +// [END storagetransfer_v1_generated_StorageTransferService_ListAgentPools_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php new file mode 100644 index 000000000000..1cfc07fd6efb --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php @@ -0,0 +1,86 @@ +setFilter($filter); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageTransferServiceClient->listTransferJobs($request); + + /** @var TransferJob $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 +{ + $filter = '[FILTER]'; + + list_transfer_jobs_sample($filter); +} +// [END storagetransfer_v1_generated_StorageTransferService_ListTransferJobs_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php new file mode 100644 index 000000000000..bbd600ef9754 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php @@ -0,0 +1,68 @@ +setName($name); + + // Call the API and handle any network failures. + try { + $storageTransferServiceClient->pauseTransferOperation($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]'; + + pause_transfer_operation_sample($name); +} +// [END storagetransfer_v1_generated_StorageTransferService_PauseTransferOperation_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php new file mode 100644 index 000000000000..8c24f0462fb6 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php @@ -0,0 +1,68 @@ +setName($name); + + // Call the API and handle any network failures. + try { + $storageTransferServiceClient->resumeTransferOperation($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]'; + + resume_transfer_operation_sample($name); +} +// [END storagetransfer_v1_generated_StorageTransferService_ResumeTransferOperation_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php new file mode 100644 index 000000000000..92fe27f2d8fe --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php @@ -0,0 +1,86 @@ +setJobName($jobName) + ->setProjectId($projectId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageTransferServiceClient->runTransferJob($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 +{ + $jobName = '[JOB_NAME]'; + $projectId = '[PROJECT_ID]'; + + run_transfer_job_sample($jobName, $projectId); +} +// [END storagetransfer_v1_generated_StorageTransferService_RunTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php new file mode 100644 index 000000000000..3fb072f3e14a --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php @@ -0,0 +1,74 @@ +setName($agentPoolName); + $request = (new UpdateAgentPoolRequest()) + ->setAgentPool($agentPool); + + // Call the API and handle any network failures. + try { + /** @var AgentPool $response */ + $response = $storageTransferServiceClient->updateAgentPool($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 +{ + $agentPoolName = '[NAME]'; + + update_agent_pool_sample($agentPoolName); +} +// [END storagetransfer_v1_generated_StorageTransferService_UpdateAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php new file mode 100644 index 000000000000..07be9c36746b --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php @@ -0,0 +1,83 @@ +setJobName($jobName) + ->setProjectId($projectId) + ->setTransferJob($transferJob); + + // Call the API and handle any network failures. + try { + /** @var TransferJob $response */ + $response = $storageTransferServiceClient->updateTransferJob($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 +{ + $jobName = '[JOB_NAME]'; + $projectId = '[PROJECT_ID]'; + + update_transfer_job_sample($jobName, $projectId); +} +// [END storagetransfer_v1_generated_StorageTransferService_UpdateTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php b/owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php new file mode 100644 index 000000000000..ad0aa911baff --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php @@ -0,0 +1,684 @@ + createAgentPoolAsync(CreateAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTransferJobAsync(CreateTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAgentPoolAsync(DeleteAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransferJobAsync(DeleteTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAgentPoolAsync(GetAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGoogleServiceAccountAsync(GetGoogleServiceAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransferJobAsync(GetTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAgentPoolsAsync(ListAgentPoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferJobsAsync(ListTransferJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseTransferOperationAsync(PauseTransferOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeTransferOperationAsync(ResumeTransferOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface runTransferJobAsync(RunTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAgentPoolAsync(UpdateAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTransferJobAsync(UpdateTransferJobRequest $request, array $optionalArgs = []) + */ +final class StorageTransferServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.storagetransfer.v1.StorageTransferService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'storagetransfer.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'storagetransfer.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/storage_transfer_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_transfer_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_transfer_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_transfer_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 agent_pools + * resource. + * + * @param string $projectId + * @param string $agentPoolId + * + * @return string The formatted agent_pools resource. + */ + public static function agentPoolsName(string $projectId, string $agentPoolId): string + { + return self::getPathTemplate('agentPools')->render([ + 'project_id' => $projectId, + 'agent_pool_id' => $agentPoolId, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - agentPools: projects/{project_id}/agentPools/{agent_pool_id} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'storagetransfer.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates an agent pool resource. + * + * The async variant is {@see StorageTransferServiceClient::createAgentPoolAsync()} + * . + * + * @example samples/V1/StorageTransferServiceClient/create_agent_pool.php + * + * @param CreateAgentPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AgentPool + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAgentPool(CreateAgentPoolRequest $request, array $callOptions = []): AgentPool + { + return $this->startApiCall('CreateAgentPool', $request, $callOptions)->wait(); + } + + /** + * Creates a transfer job that runs periodically. + * + * The async variant is + * {@see StorageTransferServiceClient::createTransferJobAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/create_transfer_job.php + * + * @param CreateTransferJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTransferJob(CreateTransferJobRequest $request, array $callOptions = []): TransferJob + { + return $this->startApiCall('CreateTransferJob', $request, $callOptions)->wait(); + } + + /** + * Deletes an agent pool. + * + * The async variant is {@see StorageTransferServiceClient::deleteAgentPoolAsync()} + * . + * + * @example samples/V1/StorageTransferServiceClient/delete_agent_pool.php + * + * @param DeleteAgentPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAgentPool(DeleteAgentPoolRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAgentPool', $request, $callOptions)->wait(); + } + + /** + * Deletes a transfer job. Deleting a transfer job sets its status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + * + * The async variant is + * {@see StorageTransferServiceClient::deleteTransferJobAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/delete_transfer_job.php + * + * @param DeleteTransferJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTransferJob(DeleteTransferJobRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTransferJob', $request, $callOptions)->wait(); + } + + /** + * Gets an agent pool. + * + * The async variant is {@see StorageTransferServiceClient::getAgentPoolAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/get_agent_pool.php + * + * @param GetAgentPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AgentPool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAgentPool(GetAgentPoolRequest $request, array $callOptions = []): AgentPool + { + return $this->startApiCall('GetAgentPool', $request, $callOptions)->wait(); + } + + /** + * Returns the Google service account that is used by Storage Transfer + * Service to access buckets in the project where transfers + * run or in other projects. Each Google service account is associated + * with one Google Cloud project. Users + * should add this service account to the Google Cloud Storage bucket + * ACLs to grant access to Storage Transfer Service. This service + * account is created and owned by Storage Transfer Service and can + * only be used by Storage Transfer Service. + * + * The async variant is + * {@see StorageTransferServiceClient::getGoogleServiceAccountAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/get_google_service_account.php + * + * @param GetGoogleServiceAccountRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GoogleServiceAccount + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGoogleServiceAccount(GetGoogleServiceAccountRequest $request, array $callOptions = []): GoogleServiceAccount + { + return $this->startApiCall('GetGoogleServiceAccount', $request, $callOptions)->wait(); + } + + /** + * Gets a transfer job. + * + * The async variant is {@see StorageTransferServiceClient::getTransferJobAsync()} + * . + * + * @example samples/V1/StorageTransferServiceClient/get_transfer_job.php + * + * @param GetTransferJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTransferJob(GetTransferJobRequest $request, array $callOptions = []): TransferJob + { + return $this->startApiCall('GetTransferJob', $request, $callOptions)->wait(); + } + + /** + * Lists agent pools. + * + * The async variant is {@see StorageTransferServiceClient::listAgentPoolsAsync()} + * . + * + * @example samples/V1/StorageTransferServiceClient/list_agent_pools.php + * + * @param ListAgentPoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAgentPools(ListAgentPoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAgentPools', $request, $callOptions); + } + + /** + * Lists transfer jobs. + * + * The async variant is + * {@see StorageTransferServiceClient::listTransferJobsAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/list_transfer_jobs.php + * + * @param ListTransferJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTransferJobs(ListTransferJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTransferJobs', $request, $callOptions); + } + + /** + * Pauses a transfer operation. + * + * The async variant is + * {@see StorageTransferServiceClient::pauseTransferOperationAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/pause_transfer_operation.php + * + * @param PauseTransferOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 pauseTransferOperation(PauseTransferOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('PauseTransferOperation', $request, $callOptions)->wait(); + } + + /** + * Resumes a transfer operation that is paused. + * + * The async variant is + * {@see StorageTransferServiceClient::resumeTransferOperationAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/resume_transfer_operation.php + * + * @param ResumeTransferOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 resumeTransferOperation(ResumeTransferOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('ResumeTransferOperation', $request, $callOptions)->wait(); + } + + /** + * Starts a new operation for the specified transfer job. + * A `TransferJob` has a maximum of one active `TransferOperation`. If this + * method is called while a `TransferOperation` is active, an error is + * returned. + * + * The async variant is {@see StorageTransferServiceClient::runTransferJobAsync()} + * . + * + * @example samples/V1/StorageTransferServiceClient/run_transfer_job.php + * + * @param RunTransferJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 runTransferJob(RunTransferJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunTransferJob', $request, $callOptions)->wait(); + } + + /** + * Updates an existing agent pool resource. + * + * The async variant is {@see StorageTransferServiceClient::updateAgentPoolAsync()} + * . + * + * @example samples/V1/StorageTransferServiceClient/update_agent_pool.php + * + * @param UpdateAgentPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AgentPool + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAgentPool(UpdateAgentPoolRequest $request, array $callOptions = []): AgentPool + { + return $this->startApiCall('UpdateAgentPool', $request, $callOptions)->wait(); + } + + /** + * Updates a transfer job. Updating a job's transfer spec does not affect + * transfer operations that are running already. + * + * **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status] + * field can be modified using this RPC (for example, to set a job's status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]). + * + * The async variant is + * {@see StorageTransferServiceClient::updateTransferJobAsync()} . + * + * @example samples/V1/StorageTransferServiceClient/update_transfer_job.php + * + * @param UpdateTransferJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TransferJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTransferJob(UpdateTransferJobRequest $request, array $callOptions = []): TransferJob + { + return $this->startApiCall('UpdateTransferJob', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json b/owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..357d3d96c332 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json @@ -0,0 +1,88 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.storagetransfer.v1", + "libraryPackage": "Google\\Cloud\\StorageTransfer\\V1", + "services": { + "StorageTransferService": { + "clients": { + "grpc": { + "libraryClient": "StorageTransferServiceGapicClient", + "rpcs": { + "CreateAgentPool": { + "methods": [ + "createAgentPool" + ] + }, + "CreateTransferJob": { + "methods": [ + "createTransferJob" + ] + }, + "DeleteAgentPool": { + "methods": [ + "deleteAgentPool" + ] + }, + "DeleteTransferJob": { + "methods": [ + "deleteTransferJob" + ] + }, + "GetAgentPool": { + "methods": [ + "getAgentPool" + ] + }, + "GetGoogleServiceAccount": { + "methods": [ + "getGoogleServiceAccount" + ] + }, + "GetTransferJob": { + "methods": [ + "getTransferJob" + ] + }, + "ListAgentPools": { + "methods": [ + "listAgentPools" + ] + }, + "ListTransferJobs": { + "methods": [ + "listTransferJobs" + ] + }, + "PauseTransferOperation": { + "methods": [ + "pauseTransferOperation" + ] + }, + "ResumeTransferOperation": { + "methods": [ + "resumeTransferOperation" + ] + }, + "RunTransferJob": { + "methods": [ + "runTransferJob" + ] + }, + "UpdateAgentPool": { + "methods": [ + "updateAgentPool" + ] + }, + "UpdateTransferJob": { + "methods": [ + "updateTransferJob" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json new file mode 100644 index 000000000000..52816cb2166d --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json @@ -0,0 +1,114 @@ +{ + "interfaces": { + "google.storagetransfer.v1.StorageTransferService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.0, + "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 + } + }, + "methods": { + "CreateAgentPool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateTransferJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAgentPool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTransferJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAgentPool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetGoogleServiceAccount": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTransferJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAgentPools": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTransferJobs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PauseTransferOperation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ResumeTransferOperation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RunTransferJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAgentPool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTransferJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php new file mode 100644 index 000000000000..02ba6f580f9d --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php @@ -0,0 +1,207 @@ + [ + 'google.storagetransfer.v1.StorageTransferService' => [ + 'RunTransferJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\StorageTransfer\V1\TransferOperation', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'job_name', + 'fieldAccessors' => [ + 'getJobName', + ], + ], + ], + ], + 'CreateAgentPool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\AgentPool', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getProjectId', + ], + ], + ], + ], + 'CreateTransferJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\TransferJob', + ], + 'DeleteAgentPool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTransferJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'job_name', + 'fieldAccessors' => [ + 'getJobName', + ], + ], + ], + ], + 'GetAgentPool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\AgentPool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGoogleServiceAccount' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\GoogleServiceAccount', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getProjectId', + ], + ], + ], + ], + 'GetTransferJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\TransferJob', + 'headerParams' => [ + [ + 'keyName' => 'job_name', + 'fieldAccessors' => [ + 'getJobName', + ], + ], + ], + ], + 'ListAgentPools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAgentPools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\ListAgentPoolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getProjectId', + ], + ], + ], + ], + 'ListTransferJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTransferJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\ListTransferJobsResponse', + ], + 'PauseTransferOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResumeTransferOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAgentPool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\AgentPool', + 'headerParams' => [ + [ + 'keyName' => 'agent_pool.name', + 'fieldAccessors' => [ + 'getAgentPool', + 'getName', + ], + ], + ], + ], + 'UpdateTransferJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\StorageTransfer\V1\TransferJob', + 'headerParams' => [ + [ + 'keyName' => 'job_name', + 'fieldAccessors' => [ + 'getJobName', + ], + ], + ], + ], + 'templateMap' => [ + 'agentPools' => 'projects/{project_id}/agentPools/{agent_pool_id}', + ], + ], + ], +]; diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php new file mode 100644 index 000000000000..14d19decd51f --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php @@ -0,0 +1,225 @@ + [ + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=transferOperations/**}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=transferOperations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=transferOperations}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.storagetransfer.v1.StorageTransferService' => [ + 'CreateAgentPool' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project_id=*}/agentPools', + 'body' => 'agent_pool', + 'placeholders' => [ + 'project_id' => [ + 'getters' => [ + 'getProjectId', + ], + ], + ], + 'queryParams' => [ + 'agent_pool_id', + ], + ], + 'CreateTransferJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/transferJobs', + 'body' => 'transfer_job', + ], + 'DeleteAgentPool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/agentPools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTransferJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{job_name=transferJobs/**}', + 'placeholders' => [ + 'job_name' => [ + 'getters' => [ + 'getJobName', + ], + ], + ], + 'queryParams' => [ + 'project_id', + ], + ], + 'GetAgentPool' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/agentPools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGoogleServiceAccount' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/googleServiceAccounts/{project_id}', + 'placeholders' => [ + 'project_id' => [ + 'getters' => [ + 'getProjectId', + ], + ], + ], + ], + 'GetTransferJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{job_name=transferJobs/**}', + 'placeholders' => [ + 'job_name' => [ + 'getters' => [ + 'getJobName', + ], + ], + ], + 'queryParams' => [ + 'project_id', + ], + ], + 'ListAgentPools' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project_id=*}/agentPools', + 'placeholders' => [ + 'project_id' => [ + 'getters' => [ + 'getProjectId', + ], + ], + ], + ], + 'ListTransferJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/transferJobs', + 'queryParams' => [ + 'filter', + ], + ], + 'PauseTransferOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=transferOperations/**}:pause', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResumeTransferOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=transferOperations/**}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RunTransferJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{job_name=transferJobs/**}:run', + 'body' => '*', + 'placeholders' => [ + 'job_name' => [ + 'getters' => [ + 'getJobName', + ], + ], + ], + ], + 'UpdateAgentPool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{agent_pool.name=projects/*/agentPools/*}', + 'body' => 'agent_pool', + 'placeholders' => [ + 'agent_pool.name' => [ + 'getters' => [ + 'getAgentPool', + 'getName', + ], + ], + ], + ], + 'UpdateTransferJob' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{job_name=transferJobs/**}', + 'body' => '*', + 'placeholders' => [ + 'job_name' => [ + 'getters' => [ + 'getJobName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php b/owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php new file mode 100644 index 000000000000..8e04ba0e2c08 --- /dev/null +++ b/owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php @@ -0,0 +1,1158 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StorageTransferServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StorageTransferServiceClient($options); + } + + /** @test */ + public function createAgentPoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AgentPool(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $agentPool = new AgentPool(); + $agentPoolName = 'agentPoolName-2036536596'; + $agentPool->setName($agentPoolName); + $agentPoolId = 'agentPoolId-773019420'; + $request = (new CreateAgentPoolRequest()) + ->setProjectId($projectId) + ->setAgentPool($agentPool) + ->setAgentPoolId($agentPoolId); + $response = $gapicClient->createAgentPool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/CreateAgentPool', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $actualValue = $actualRequestObject->getAgentPool(); + $this->assertProtobufEquals($agentPool, $actualValue); + $actualValue = $actualRequestObject->getAgentPoolId(); + $this->assertProtobufEquals($agentPoolId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAgentPoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $agentPool = new AgentPool(); + $agentPoolName = 'agentPoolName-2036536596'; + $agentPool->setName($agentPoolName); + $agentPoolId = 'agentPoolId-773019420'; + $request = (new CreateAgentPoolRequest()) + ->setProjectId($projectId) + ->setAgentPool($agentPool) + ->setAgentPoolId($agentPoolId); + try { + $gapicClient->createAgentPool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTransferJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $projectId = 'projectId-1969970175'; + $latestOperationName = 'latestOperationName1224975899'; + $expectedResponse = new TransferJob(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setProjectId($projectId); + $expectedResponse->setLatestOperationName($latestOperationName); + $transport->addResponse($expectedResponse); + // Mock request + $transferJob = new TransferJob(); + $request = (new CreateTransferJobRequest()) + ->setTransferJob($transferJob); + $response = $gapicClient->createTransferJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/CreateTransferJob', $actualFuncCall); + $actualValue = $actualRequestObject->getTransferJob(); + $this->assertProtobufEquals($transferJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTransferJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $transferJob = new TransferJob(); + $request = (new CreateTransferJobRequest()) + ->setTransferJob($transferJob); + try { + $gapicClient->createTransferJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAgentPoolTest() + { + $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 DeleteAgentPoolRequest()) + ->setName($name); + $gapicClient->deleteAgentPool($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/DeleteAgentPool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAgentPoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 DeleteAgentPoolRequest()) + ->setName($name); + try { + $gapicClient->deleteAgentPool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransferJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $request = (new DeleteTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId); + $gapicClient->deleteTransferJob($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/DeleteTransferJob', $actualFuncCall); + $actualValue = $actualRequestObject->getJobName(); + $this->assertProtobufEquals($jobName, $actualValue); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTransferJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $request = (new DeleteTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId); + try { + $gapicClient->deleteTransferJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAgentPoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AgentPool(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetAgentPoolRequest()) + ->setName($name); + $response = $gapicClient->getAgentPool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/GetAgentPool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAgentPoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 GetAgentPoolRequest()) + ->setName($name); + try { + $gapicClient->getAgentPool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGoogleServiceAccountTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accountEmail = 'accountEmail-539286774'; + $subjectId = 'subjectId-573637362'; + $expectedResponse = new GoogleServiceAccount(); + $expectedResponse->setAccountEmail($accountEmail); + $expectedResponse->setSubjectId($subjectId); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $request = (new GetGoogleServiceAccountRequest()) + ->setProjectId($projectId); + $response = $gapicClient->getGoogleServiceAccount($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/GetGoogleServiceAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGoogleServiceAccountExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 GetGoogleServiceAccountRequest()) + ->setProjectId($projectId); + try { + $gapicClient->getGoogleServiceAccount($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransferJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $projectId2 = 'projectId2939242356'; + $latestOperationName = 'latestOperationName1224975899'; + $expectedResponse = new TransferJob(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setProjectId($projectId2); + $expectedResponse->setLatestOperationName($latestOperationName); + $transport->addResponse($expectedResponse); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $request = (new GetTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId); + $response = $gapicClient->getTransferJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/GetTransferJob', $actualFuncCall); + $actualValue = $actualRequestObject->getJobName(); + $this->assertProtobufEquals($jobName, $actualValue); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTransferJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $request = (new GetTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId); + try { + $gapicClient->getTransferJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAgentPoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $agentPoolsElement = new AgentPool(); + $agentPools = [ + $agentPoolsElement, + ]; + $expectedResponse = new ListAgentPoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAgentPools($agentPools); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $request = (new ListAgentPoolsRequest()) + ->setProjectId($projectId); + $response = $gapicClient->listAgentPools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAgentPools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/ListAgentPools', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAgentPoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListAgentPoolsRequest()) + ->setProjectId($projectId); + try { + $gapicClient->listAgentPools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transferJobsElement = new TransferJob(); + $transferJobs = [ + $transferJobsElement, + ]; + $expectedResponse = new ListTransferJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTransferJobs($transferJobs); + $transport->addResponse($expectedResponse); + // Mock request + $filter = 'filter-1274492040'; + $request = (new ListTransferJobsRequest()) + ->setFilter($filter); + $response = $gapicClient->listTransferJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTransferJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/ListTransferJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTransferJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $filter = 'filter-1274492040'; + $request = (new ListTransferJobsRequest()) + ->setFilter($filter); + try { + $gapicClient->listTransferJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseTransferOperationTest() + { + $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 PauseTransferOperationRequest()) + ->setName($name); + $gapicClient->pauseTransferOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/PauseTransferOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseTransferOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 PauseTransferOperationRequest()) + ->setName($name); + try { + $gapicClient->pauseTransferOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeTransferOperationTest() + { + $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 ResumeTransferOperationRequest()) + ->setName($name); + $gapicClient->resumeTransferOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/ResumeTransferOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeTransferOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ResumeTransferOperationRequest()) + ->setName($name); + try { + $gapicClient->resumeTransferOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTransferJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runTransferJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runTransferJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $request = (new RunTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId); + $response = $gapicClient->runTransferJob($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.storagetransfer.v1.StorageTransferService/RunTransferJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getJobName(); + $this->assertProtobufEquals($jobName, $actualValue); + $actualValue = $actualApiRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runTransferJobTest'); + $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 runTransferJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runTransferJobTest'); + $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 + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $request = (new RunTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId); + $response = $gapicClient->runTransferJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runTransferJobTest'); + 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 updateAgentPoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AgentPool(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $agentPool = new AgentPool(); + $agentPoolName = 'agentPoolName-2036536596'; + $agentPool->setName($agentPoolName); + $request = (new UpdateAgentPoolRequest()) + ->setAgentPool($agentPool); + $response = $gapicClient->updateAgentPool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/UpdateAgentPool', $actualFuncCall); + $actualValue = $actualRequestObject->getAgentPool(); + $this->assertProtobufEquals($agentPool, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAgentPoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $agentPool = new AgentPool(); + $agentPoolName = 'agentPoolName-2036536596'; + $agentPool->setName($agentPoolName); + $request = (new UpdateAgentPoolRequest()) + ->setAgentPool($agentPool); + try { + $gapicClient->updateAgentPool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTransferJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $projectId2 = 'projectId2939242356'; + $latestOperationName = 'latestOperationName1224975899'; + $expectedResponse = new TransferJob(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setProjectId($projectId2); + $expectedResponse->setLatestOperationName($latestOperationName); + $transport->addResponse($expectedResponse); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $transferJob = new TransferJob(); + $request = (new UpdateTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId) + ->setTransferJob($transferJob); + $response = $gapicClient->updateTransferJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storagetransfer.v1.StorageTransferService/UpdateTransferJob', $actualFuncCall); + $actualValue = $actualRequestObject->getJobName(); + $this->assertProtobufEquals($jobName, $actualValue); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $actualValue = $actualRequestObject->getTransferJob(); + $this->assertProtobufEquals($transferJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTransferJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $jobName = 'jobName-1615239731'; + $projectId = 'projectId-1969970175'; + $transferJob = new TransferJob(); + $request = (new UpdateTransferJobRequest()) + ->setJobName($jobName) + ->setProjectId($projectId) + ->setTransferJob($transferJob); + try { + $gapicClient->updateTransferJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAgentPoolAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AgentPool(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $agentPool = new AgentPool(); + $agentPoolName = 'agentPoolName-2036536596'; + $agentPool->setName($agentPoolName); + $agentPoolId = 'agentPoolId-773019420'; + $request = (new CreateAgentPoolRequest()) + ->setProjectId($projectId) + ->setAgentPool($agentPool) + ->setAgentPoolId($agentPoolId); + $response = $gapicClient->createAgentPoolAsync($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.storagetransfer.v1.StorageTransferService/CreateAgentPool', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $actualValue = $actualRequestObject->getAgentPool(); + $this->assertProtobufEquals($agentPool, $actualValue); + $actualValue = $actualRequestObject->getAgentPoolId(); + $this->assertProtobufEquals($agentPoolId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php new file mode 100644 index 000000000000..b6d59108b0a5 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +Ç +#google/cloud/support/v2/actor.protogoogle.cloud.support.v2"I +Actor + display_name (  +email (  +google_support (BàAB³ +com.google.cloud.support.v2B +ActorProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php new file mode 100644 index 000000000000..8f4f65d5528d --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile( + ' +ë +(google/cloud/support/v2/attachment.protogoogle.cloud.support.v2google/api/resource.proto#google/cloud/support/v2/actor.protogoogle/protobuf/timestamp.proto" + +Attachment +name ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 +creator ( 2.google.cloud.support.v2.ActorBàA +filename (  + mime_type ( BàA + +size_bytes (BàA:°êA¬ +&cloudsupport.googleapis.com/AttachmentEorganizations/{organization}/cases/{case}/attachments/{attachment_id};projects/{project}/cases/{case}/attachments/{attachment_id}B¸ +com.google.cloud.support.v2BAttachmentProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php new file mode 100644 index 000000000000..41e2894478d5 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile( + ' +Ñ +0google/cloud/support/v2/attachment_service.protogoogle.cloud.support.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/support/v2/attachment.proto"y +ListAttachmentsRequest8 +parent ( B(àAúA" + cloudsupport.googleapis.com/Case + page_size ( + +page_token ( "l +ListAttachmentsResponse8 + attachments ( 2#.google.cloud.support.v2.Attachment +next_page_token ( 2Ñ +CaseAttachmentServiceæ +ListAttachments/.google.cloud.support.v2.ListAttachmentsRequest0.google.cloud.support.v2.ListAttachmentsResponse"pÚAparent‚Óä“a+/v2/{parent=projects/*/cases/*}/attachmentsZ20/v2/{parent=organizations/*/cases/*}/attachmentsOÊAcloudsupport.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¿ +com.google.cloud.support.v2BAttachmentServiceProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php new file mode 100644 index 000000000000..99512b9f6a3b --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php @@ -0,0 +1,88 @@ +internalAddGeneratedFile( + ' +¸ +*google/cloud/support/v2/case_service.protogoogle.cloud.support.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/cloud/support/v2/case.proto(google/cloud/support/v2/escalation.proto google/protobuf/field_mask.proto"H +GetCaseRequest6 +name ( B(àAúA" + cloudsupport.googleapis.com/Case" +CreateCaseRequest8 +parent ( B(àAúA" cloudsupport.googleapis.com/Case0 +case ( 2.google.cloud.support.v2.CaseBàA"ƒ +ListCasesRequest8 +parent ( B(àAúA" cloudsupport.googleapis.com/Case +filter (  + page_size ( + +page_token ( "Z +ListCasesResponse, +cases ( 2.google.cloud.support.v2.Case +next_page_token ( "Z +SearchCasesRequest +parent (  +query (  + page_size ( + +page_token ( "\\ +SearchCasesResponse, +cases ( 2.google.cloud.support.v2.Case +next_page_token ( "† +EscalateCaseRequest6 +name ( B(àAúA" + cloudsupport.googleapis.com/Case7 + +escalation ( 2#.google.cloud.support.v2.Escalation"v +UpdateCaseRequest0 +case ( 2.google.cloud.support.v2.CaseBàA/ + update_mask ( 2.google.protobuf.FieldMask"J +CloseCaseRequest6 +name ( B(àAúA" + cloudsupport.googleapis.com/Case"X + SearchCaseClassificationsRequest +query (  + page_size ( + +page_token ( "‡ +!SearchCaseClassificationsResponseI +case_classifications ( 2+.google.cloud.support.v2.CaseClassification +next_page_token ( 2Ï + CaseService¥ +GetCase\'.google.cloud.support.v2.GetCaseRequest.google.cloud.support.v2.Case"RÚAname‚Óä“E/v2/{name=projects/*/cases/*}Z$"/v2/{name=organizations/*/cases/*}¸ + ListCases).google.cloud.support.v2.ListCasesRequest*.google.cloud.support.v2.ListCasesResponse"TÚAparent‚Óä“E/v2/{parent=projects/*}/casesZ$"/v2/{parent=organizations/*}/casesà + SearchCases+.google.cloud.support.v2.SearchCasesRequest,.google.cloud.support.v2.SearchCasesResponse"Y‚Óä“S$/v2/{parent=projects/*}/cases:searchZ+)/v2/{parent=organizations/*}/cases:search¾ + +CreateCase*.google.cloud.support.v2.CreateCaseRequest.google.cloud.support.v2.Case"eÚA parent,case‚Óä“Q"/v2/{parent=projects/*}/cases:caseZ*""/v2/{parent=organizations/*}/cases:caseÍ + +UpdateCase*.google.cloud.support.v2.UpdateCaseRequest.google.cloud.support.v2.Case"tÚAcase,update_mask‚Óä“[2"/v2/{case.name=projects/*/cases/*}:caseZ/2\'/v2/{case.name=organizations/*/cases/*}:caseÀ + EscalateCase,.google.cloud.support.v2.EscalateCaseRequest.google.cloud.support.v2.Case"c‚Óä“]"&/v2/{name=projects/*/cases/*}:escalate:*Z0"+/v2/{name=organizations/*/cases/*}:escalate:*´ + CloseCase).google.cloud.support.v2.CloseCaseRequest.google.cloud.support.v2.Case"]‚Óä“W"#/v2/{name=projects/*/cases/*}:close:*Z-"(/v2/{name=organizations/*/cases/*}:close:*º +SearchCaseClassifications9.google.cloud.support.v2.SearchCaseClassificationsRequest:.google.cloud.support.v2.SearchCaseClassificationsResponse"&‚Óä“ /v2/caseClassifications:searchOÊAcloudsupport.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¹ +com.google.cloud.support.v2BCaseServiceProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php new file mode 100644 index 000000000000..d21c0ed73696 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + ' +¶ +%google/cloud/support/v2/comment.protogoogle.cloud.support.v2google/api/resource.proto#google/cloud/support/v2/actor.protogoogle/protobuf/timestamp.proto"Ò +Comment +name ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 +creator ( 2.google.cloud.support.v2.ActorBàA +body (  +plain_text_body ( BàA:›êA— +#cloudsupport.googleapis.com/CommentinternalAddGeneratedFile( + ' +› + +-google/cloud/support/v2/comment_service.protogoogle.cloud.support.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto%google/cloud/support/v2/comment.proto"v +ListCommentsRequest8 +parent ( B(àAúA" + cloudsupport.googleapis.com/Case + page_size ( + +page_token ( "c +ListCommentsResponse2 +comments ( 2 .google.cloud.support.v2.Comment +next_page_token ( "ˆ +CreateCommentRequest8 +parent ( B(àAúA" + cloudsupport.googleapis.com/Case6 +comment ( 2 .google.cloud.support.v2.CommentBàA2¥ +CommentService× + ListComments,.google.cloud.support.v2.ListCommentsRequest-.google.cloud.support.v2.ListCommentsResponse"jÚAparent‚Óä“[(/v2/{parent=projects/*/cases/*}/commentsZ/-/v2/{parent=organizations/*/cases/*}/commentsç + CreateComment-.google.cloud.support.v2.CreateCommentRequest .google.cloud.support.v2.Comment"„ÚAparent,comment‚Óä“m"(/v2/{parent=projects/*/cases/*}/comments:commentZ8"-/v2/{parent=organizations/*/cases/*}/comments:commentOÊAcloudsupport.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¼ +com.google.cloud.support.v2BCommentServiceProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php new file mode 100644 index 0000000000000000000000000000000000000000..3d81565e3ad8879c3bc389bb29a40a462fff8f65 GIT binary patch literal 1081 zcma)5-D(p-7&VC&9MFa>*ivuCT4*Y|frvL#Yst?xF0{##-4>CBFquq}k?qbfJ6llc z3;6^-gBRX<>$Oke?CfS!r~&tC*zY^%JKxWFdmA` zlXNzt5)ytTSVW}_VQ&Zr!vH!xH+ZI@2~Q=V2+ld5N3=;Io=%%dDg>9RdEIK#gy0A( z#$(%%0ubXXng~oN?0cPas_+ym9QF-9>}L4T&+*}9>j(f6;Us}h$pgLus6UZTB1T}M zG&zC$EE%(yDTX8VMfY(GXE;izhTqMdr7_6_!3;2r32hw0oHNVa7hLy!43~<$Y!rG7 zp&KhIV;qG&-IHWOap~z)gyvM01I+$34vVrG9h<>Mt`VU-B9EbxDZO1CLP=FB<0GRx zBe*GF;Xmfp7A!nvG@5qk0$(#O5n6S%A~8+9ddG?u+S6&N_*Cz;QP#*R9)Mpp(D>hl zTHAT1ZB}m=tGBOPdp|1xtk!0ofDK7;!sDI$u+n(kdSR~t+AEMfGKfy?ce`rsf=8dy zM6nqo=Ad>SXr6~AwnxB5o@zY-*2ro5!@>As;CoKjJ$0R4{hqZ2Hb;&>Ji7>79ShuZ zr(UtP!B*gO-w)hw`)urd@SIWL`cA!?Wp^%oci{N`*gf~!-Jo9Ue6N6~+6n7)cQ#kT z&DD67k8kp+EIZ{_%{edafd$hJDJCW+N9F5Vb-Qo;U>iT!g&*w8){kW*EUZ#`MVsYM pbvK70WN-)-K!h$^lMUm)*9YaUU*^|$>sZ$ws>#gH=?2^Y@E4GKTOt4e literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php new file mode 100644 index 0000000000000000000000000000000000000000..f6618add0822ddf464f94c19ebf25d40b63d9eb8 GIT binary patch literal 2049 zcma)7-EQMV6edaAZKmCB>n^GZ((aJ1*i?W6+2uzr1?8`ir4pMYEdoWdCiWy96Av;2`)nB(MZF%W8%I!!rhKB`T(GDkVFpE@hk{t9<4iGkht|Y3Bw@b z^~*-xAu-itID~w1LF14(6!)ywca#&Ca5C;m8r8Z~IOY-{CCqu>hF9Lu&^(jVXMeg#mPX zgcsFVf&gfKZ1|i;KJmsK8aojSc@SCPs_Qe#bJ~QZc95kN;n)<{(i(OBts;*wj}m$_ zJH`>^N#q~OxQS; z&zjRYVjuxdF2cL9@)|z*hGnETT{q|W81z@mSrHsPM}L=5_5X#Z?4>@M6sMMnQ@dMypq4scw3j+m|5`&ULcPi+S`q433%F1#E058p z%i_=@SGKekrF9o=xS7a6r)o(W+h|LU0h=-hG!OO_ux~Uz(v~!(iF|D_IXOhxL1j^y zeI58zU6*mIs1hd=A?XQ?Y27GfH!Wn6+XzeKA-#8lk`$W~+jKT~Q$;o2(w z*(@n9(S{RIc(p}Z^`We|vVbqx(sD86s3e3>LWbJ9AF7TX$Xr3BK9Yzhi#)flTa%(y z-bD|cz~^v}Y1`^Pz{-LnAfI@U-&J?Ov@U4_wc6qvrtV4;fIZ^R5;CK<6S!2}li;t= zdKkeRGJd6EuxvFxTv~;=AI-|VtG}XENgR~5GaNNXUHh~@w7PBM*ywh)-%%c*QosAd zc0qZ9Dn{S724-*29S-fDY4%RK_VCoQ%)w~8sO+Lg&GyJJ`}Uyw{i!hkbV&v^Pfn#7 zpl3!0%qt2)YwZ(r2+yn46STf4Mp4mYYhaiIWAx*#GS*Ph`V^`V=Vy>joDE1I&KD3- zoG-Um^Q{^16JXu&r>liW)Aw8 z1^JqT-eA*Z{f3jn{OPyiUQcc}tu3~jHcYphcGmb~@y|G0eEH^s)%UtsNnyG!ak`!X lb^WX{S(Eeg;(7ip{5ahwH`b4sTISrbdZcH%Am(U}&_CesfX@H` literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php new file mode 100644 index 000000000000..b06b828e7944 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php @@ -0,0 +1,164 @@ +google.cloud.support.v2.Actor + */ +class Actor extends \Google\Protobuf\Internal\Message +{ + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The email address of the actor. If not provided, it is inferred from + * credentials supplied during case creation. If the authenticated principal + * does not have an email address, one must be provided. When a name is + * provided, an email must also be provided. This will be obfuscated if the + * user is a Google Support agent. + * + * Generated from protobuf field string email = 2; + */ + protected $email = ''; + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * @type string $email + * The email address of the actor. If not provided, it is inferred from + * credentials supplied during case creation. If the authenticated principal + * does not have an email address, one must be provided. When a name is + * provided, an email must also be provided. This will be obfuscated if the + * user is a Google Support agent. + * @type bool $google_support + * Output only. Whether the actor is a Google support actor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Actor::initOnce(); + parent::__construct($data); + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The email address of the actor. If not provided, it is inferred from + * credentials supplied during case creation. If the authenticated principal + * does not have an email address, one must be provided. When a name is + * provided, an email must also be provided. This will be obfuscated if the + * user is a Google Support agent. + * + * Generated from protobuf field string email = 2; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * The email address of the actor. If not provided, it is inferred from + * credentials supplied during case creation. If the authenticated principal + * does not have an email address, one must be provided. When a name is + * provided, an email must also be provided. This will be obfuscated if the + * user is a Google Support agent. + * + * Generated from protobuf field string email = 2; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleSupport() + { + return $this->google_support; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleSupport($var) + { + GPBUtil::checkBool($var); + $this->google_support = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php new file mode 100644 index 000000000000..663e8b810e46 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php @@ -0,0 +1,261 @@ +google.cloud.support.v2.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time at which the attachment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + */ + protected $filename = ''; + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mime_type = ''; + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the attachment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the attachment was created. + * @type \Google\Cloud\Support\V2\Actor $creator + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * @type string $filename + * The filename of the attachment (e.g. `"graph.jpg"`). + * @type string $mime_type + * Output only. The MIME type of the attachment (e.g. text/plain). + * @type int|string $size_bytes + * Output only. The size of the attachment in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the attachment. + * + * 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 attachment. + * + * 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 time at which the attachment was 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 at which the attachment was 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 user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php new file mode 100644 index 000000000000..1a81cb3ee8ec --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.CaseClassification + */ +class CaseClassification extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * The display name of the classification. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * @type string $display_name + * The display name of the classification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The display name of the classification. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the classification. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php new file mode 100644 index 000000000000..e73092da8df0 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php @@ -0,0 +1,67 @@ +google.cloud.support.v2.CloseCaseRequest + */ +class CloseCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of the case resource to be closed. + * + * 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 fully qualified name of the case resource to be closed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of the case resource to be closed. + * + * 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 fully qualified name of the case resource to be closed. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php new file mode 100644 index 000000000000..3de25ed6e0cc --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php @@ -0,0 +1,231 @@ +google.cloud.support.v2.Comment + */ +class Comment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name for the comment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time when this comment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent created this comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The full comment body. Maximum of 12800 characters. This can contain rich + * text syntax. + * + * Generated from protobuf field string body = 4; + */ + protected $body = ''; + /** + * Output only. DEPRECATED. An automatically generated plain text version of + * body with all rich text syntax stripped. + * + * Generated from protobuf field string plain_text_body = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $plain_text_body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name for the comment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when this comment was created. + * @type \Google\Cloud\Support\V2\Actor $creator + * Output only. The user or Google Support agent created this comment. + * @type string $body + * The full comment body. Maximum of 12800 characters. This can contain rich + * text syntax. + * @type string $plain_text_body + * Output only. DEPRECATED. An automatically generated plain text version of + * body with all rich text syntax stripped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Comment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name for the comment. + * + * 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 for the comment. + * + * 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 time when this comment was 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 when this comment was 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 user or Google Support agent created this comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user or Google Support agent created this comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The full comment body. Maximum of 12800 characters. This can contain rich + * text syntax. + * + * Generated from protobuf field string body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The full comment body. Maximum of 12800 characters. This can contain rich + * text syntax. + * + * Generated from protobuf field string body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. DEPRECATED. An automatically generated plain text version of + * body with all rich text syntax stripped. + * + * Generated from protobuf field string plain_text_body = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPlainTextBody() + { + return $this->plain_text_body; + } + + /** + * Output only. DEPRECATED. An automatically generated plain text version of + * body with all rich text syntax stripped. + * + * Generated from protobuf field string plain_text_body = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPlainTextBody($var) + { + GPBUtil::checkString($var, True); + $this->plain_text_body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php new file mode 100644 index 000000000000..32a3199a0eba --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php @@ -0,0 +1,132 @@ +google.cloud.support.v2.CreateCaseRequest + */ +class CreateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Google Cloud Resource under which the case should + * be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + + /** + * @param string $parent Required. The name of the Google Cloud Resource under which the case should + * be created. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to be created. + * + * @return \Google\Cloud\Support\V2\CreateCaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\PBCase $case): self + { + return (new self()) + ->setParent($parent) + ->setCase($case); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the Google Cloud Resource under which the case should + * be created. + * @type \Google\Cloud\Support\V2\PBCase $case + * Required. The case to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Google Cloud Resource under which the case should + * be 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 name of the Google Cloud Resource under which the case should + * be 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 case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); + $this->case = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php new file mode 100644 index 000000000000..36d7c6dea2c8 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2.CreateCommentRequest + */ +class CreateCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of Case to which this comment should be added. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Comment object to be added to this Case. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $comment = null; + + /** + * @param string $parent Required. The resource name of Case to which this comment should be added. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\Comment $comment Required. The Comment object to be added to this Case. + * + * @return \Google\Cloud\Support\V2\CreateCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\Comment $comment): self + { + return (new self()) + ->setParent($parent) + ->setComment($comment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of Case to which this comment should be added. + * @type \Google\Cloud\Support\V2\Comment $comment + * Required. The Comment object to be added to this Case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of Case to which this comment should be added. + * + * 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 Case to which this comment should be added. + * + * 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 Comment object to be added to this Case. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\Comment|null + */ + public function getComment() + { + return $this->comment; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); + } + + /** + * Required. The Comment object to be added to this Case. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Comment::class); + $this->comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php new file mode 100644 index 000000000000..d1679dd4a89f --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php @@ -0,0 +1,111 @@ +google.cloud.support.v2.EscalateCaseRequest + */ +class EscalateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of the Case resource to be escalated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The escalation object to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + */ + protected $escalation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The fully qualified name of the Case resource to be escalated. + * @type \Google\Cloud\Support\V2\Escalation $escalation + * The escalation object to be sent with the escalation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of the Case resource to be escalated. + * + * 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 fully qualified name of the Case resource to be escalated. + * + * 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 escalation object to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + * @return \Google\Cloud\Support\V2\Escalation|null + */ + public function getEscalation() + { + return $this->escalation; + } + + public function hasEscalation() + { + return isset($this->escalation); + } + + public function clearEscalation() + { + unset($this->escalation); + } + + /** + * The escalation object to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + * @param \Google\Cloud\Support\V2\Escalation $var + * @return $this + */ + public function setEscalation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Escalation::class); + $this->escalation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php new file mode 100644 index 000000000000..bfa958070799 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php @@ -0,0 +1,105 @@ +google.cloud.support.v2.Escalation + */ +class Escalation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = 0; + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $justification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * Required. The reason why the Case is being escalated. + * @type string $justification + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Escalation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\Escalation\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJustification() + { + return $this->justification; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJustification($var) + { + GPBUtil::checkString($var, True); + $this->justification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php new file mode 100644 index 000000000000..63d438e354b9 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php @@ -0,0 +1,72 @@ +google.cloud.support.v2.Escalation.Reason + */ +class Reason +{ + /** + * The escalation reason is in an unknown state or has not been specified. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * The case is taking too long to resolve. + * + * Generated from protobuf enum RESOLUTION_TIME = 1; + */ + const RESOLUTION_TIME = 1; + /** + * The support agent does not have the expertise required to successfully + * resolve the issue. + * + * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; + */ + const TECHNICAL_EXPERTISE = 2; + /** + * The issue is having a significant business impact. + * + * Generated from protobuf enum BUSINESS_IMPACT = 3; + */ + const BUSINESS_IMPACT = 3; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::RESOLUTION_TIME => 'RESOLUTION_TIME', + self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', + self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reason::class, \Google\Cloud\Support\V2\Escalation_Reason::class); + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php new file mode 100644 index 000000000000..2e56f2090688 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetCaseRequest + */ +class GetCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of a case to be retrieved. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The fully qualified name of a case to be retrieved. Please see + * {@see CaseServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetCaseRequest + * + * @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 fully qualified name of a case to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of a case to be retrieved. + * + * 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 fully qualified name of a case to be retrieved. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php new file mode 100644 index 000000000000..54623ecec4d0 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php @@ -0,0 +1,166 @@ +google.cloud.support.v2.ListAttachmentsRequest + */ +class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of Case object for which attachments should be + * listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of attachments fetched with each request. If not + * provided, the default is 10. The maximum page size that will be returned is + * 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of Case object for which attachments should be + * listed. Please see + * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListAttachmentsRequest + * + * @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 Case object for which attachments should be + * listed. + * @type int $page_size + * The maximum number of attachments fetched with each request. If not + * provided, the default is 10. The maximum page size that will be returned is + * 100. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of Case object for which attachments should be + * listed. + * + * 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 Case object for which attachments should be + * listed. + * + * 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 attachments fetched with each request. If not + * provided, the default is 10. The maximum page size that will be returned is + * 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of attachments fetched with each request. If not + * provided, the default is 10. The maximum page size that will be returned is + * 100. + * + * 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 the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php new file mode 100644 index 000000000000..a927967cb7eb --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.ListAttachmentsResponse + */ +class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of attachments associated with the given case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + */ + private $attachments; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `cases.attachments.list` requests. If + * unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Support\V2\Attachment>|\Google\Protobuf\Internal\RepeatedField $attachments + * The list of attachments associated with the given case. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `cases.attachments.list` requests. If + * unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * The list of attachments associated with the given case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachments() + { + return $this->attachments; + } + + /** + * The list of attachments associated with the given case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + * @param array<\Google\Cloud\Support\V2\Attachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Attachment::class); + $this->attachments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `cases.attachments.list` requests. If + * unspecified, there are no more results to retrieve. + * + * 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 results. This should be set in the + * `page_token` field of subsequent `cases.attachments.list` requests. If + * unspecified, there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php new file mode 100644 index 000000000000..908f6acd5030 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php @@ -0,0 +1,235 @@ +google.cloud.support.v2.ListCasesRequest + */ +class ListCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of parent resource to list cases under. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression written in filter language. If non-empty, the query returns + * the cases that match the filter. Else, the query doesn't filter the cases. + * Filter expressions use the following fields with the operators equals (`=`) + * and `AND`: + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * Examples: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The fully qualified name of parent resource to list cases under. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListCasesRequest + * + * @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 fully qualified name of parent resource to list cases under. + * @type string $filter + * An expression written in filter language. If non-empty, the query returns + * the cases that match the filter. Else, the query doesn't filter the cases. + * Filter expressions use the following fields with the operators equals (`=`) + * and `AND`: + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * Examples: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of parent resource to list cases under. + * + * 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 fully qualified name of parent resource to list cases under. + * + * 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 written in filter language. If non-empty, the query returns + * the cases that match the filter. Else, the query doesn't filter the cases. + * Filter expressions use the following fields with the operators equals (`=`) + * and `AND`: + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * Examples: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression written in filter language. If non-empty, the query returns + * the cases that match the filter. Else, the query doesn't filter the cases. + * Filter expressions use the following fields with the operators equals (`=`) + * and `AND`: + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * Examples: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * 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 maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php new file mode 100644 index 000000000000..77427330549c --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2.ListCasesResponse + */ +class ListCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of the subsequent `ListCasesRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $cases + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of the subsequent `ListCasesRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @param array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of the subsequent `ListCasesRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * 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 results. This should be set in the + * `page_token` field of the subsequent `ListCasesRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php new file mode 100644 index 000000000000..9cf6b77a2751 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php @@ -0,0 +1,158 @@ +google.cloud.support.v2.ListCommentsRequest + */ +class ListCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of Case object for which comments should be + * listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of comments fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of Case object for which comments should be + * listed. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListCommentsRequest + * + * @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 Case object for which comments should be + * listed. + * @type int $page_size + * The maximum number of comments fetched with each request. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of Case object for which comments should be + * listed. + * + * 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 Case object for which comments should be + * listed. + * + * 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 comments fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of comments fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php new file mode 100644 index 000000000000..afd122a85834 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.ListCommentsResponse + */ +class ListCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Comments associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + */ + private $comments; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ListCommentsRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Support\V2\Comment>|\Google\Protobuf\Internal\RepeatedField $comments + * The list of Comments associated with the given Case. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ListCommentsRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Comments associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComments() + { + return $this->comments; + } + + /** + * The list of Comments associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + * @param array<\Google\Cloud\Support\V2\Comment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Comment::class); + $this->comments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ListCommentsRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * 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 results. This should be set in the + * `page_token` field of subsequent `ListCommentsRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php new file mode 100644 index 000000000000..4a32250098b6 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php @@ -0,0 +1,635 @@ +google.cloud.support.v2.Case + */ +class PBCase extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name for the case. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + */ + protected $classification = null; + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + */ + protected $time_zone = ''; + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + */ + private $subscriber_email_addresses; + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + */ + protected $creator = null; + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + */ + protected $contact_email = ''; + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + */ + protected $escalated = false; + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + */ + protected $test_case = false; + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + */ + protected $language_code = ''; + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name for the case. + * @type string $display_name + * The short summary of the issue reported in this case. + * @type string $description + * A broad description of the issue. + * @type \Google\Cloud\Support\V2\CaseClassification $classification + * The issue classification applicable to this case. + * @type string $time_zone + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * @type array|\Google\Protobuf\Internal\RepeatedField $subscriber_email_addresses + * The email addresses to receive updates on this case. + * @type int $state + * Output only. The current status of the support case. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this case was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this case was last updated. + * @type \Google\Cloud\Support\V2\Actor $creator + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * @type string $contact_email + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * @type bool $escalated + * Whether the case is currently escalated. + * @type bool $test_case + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * @type string $language_code + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * @type int $priority + * The priority of this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The resource name for the case. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name for the case. + * + * 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 short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The short summary of the issue reported in this case. + * + * 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; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A broad description of the issue. + * + * 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; + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + * @return \Google\Cloud\Support\V2\CaseClassification|null + */ + public function getClassification() + { + return $this->classification; + } + + public function hasClassification() + { + return isset($this->classification); + } + + public function clearClassification() + { + unset($this->classification); + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + * @param \Google\Cloud\Support\V2\CaseClassification $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\CaseClassification::class); + $this->classification = $var; + + return $this; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubscriberEmailAddresses() + { + return $this->subscriber_email_addresses; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubscriberEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subscriber_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time this case was created. + * + * 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 time this case was created. + * + * 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 time this case was last updated. + * + * 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 time this case was last updated. + * + * 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; + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @return string + */ + public function getContactEmail() + { + return $this->contact_email; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @param string $var + * @return $this + */ + public function setContactEmail($var) + { + GPBUtil::checkString($var, True); + $this->contact_email = $var; + + return $this; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @return bool + */ + public function getEscalated() + { + return $this->escalated; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @param bool $var + * @return $this + */ + public function setEscalated($var) + { + GPBUtil::checkBool($var); + $this->escalated = $var; + + return $this; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @return bool + */ + public function getTestCase() + { + return $this->test_case; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @param bool $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkBool($var); + $this->test_case = $var; + + return $this; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\Priority::class); + $this->priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php new file mode 100644 index 000000000000..a2d22b12ff29 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php @@ -0,0 +1,88 @@ +google.cloud.support.v2.Case.Priority + */ +class Priority +{ + /** + * Priority is undefined or has not been set yet. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Extreme impact on a production service. Service is hard down. + * + * Generated from protobuf enum P0 = 1; + */ + const P0 = 1; + /** + * Critical impact on a production service. Service is currently unusable. + * + * Generated from protobuf enum P1 = 2; + */ + const P1 = 2; + /** + * Severe impact on a production service. Service is usable but greatly + * impaired. + * + * Generated from protobuf enum P2 = 3; + */ + const P2 = 3; + /** + * Medium impact on a production service. Service is available, but + * moderately impaired. + * + * Generated from protobuf enum P3 = 4; + */ + const P3 = 4; + /** + * General questions or minor issues. Production service is fully + * available. + * + * Generated from protobuf enum P4 = 5; + */ + const P4 = 5; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::P0 => 'P0', + self::P1 => 'P1', + self::P2 => 'P2', + self::P3 => 'P3', + self::P4 => 'P4', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Priority::class, \Google\Cloud\Support\V2\Case_Priority::class); + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php new file mode 100644 index 000000000000..851dbbe5b87f --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php @@ -0,0 +1,89 @@ +google.cloud.support.v2.Case.State + */ +class State +{ + /** + * Case is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The case has been created but no one is assigned to work on it yet. + * + * Generated from protobuf enum NEW = 1; + */ + const PBNEW = 1; + /** + * The case is currently being handled by Google support. + * + * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; + */ + const IN_PROGRESS_GOOGLE_SUPPORT = 2; + /** + * Google is waiting for a response. + * + * Generated from protobuf enum ACTION_REQUIRED = 3; + */ + const ACTION_REQUIRED = 3; + /** + * A solution has been offered for the case, but it isn't yet closed. + * + * Generated from protobuf enum SOLUTION_PROVIDED = 4; + */ + const SOLUTION_PROVIDED = 4; + /** + * The case has been resolved. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PBNEW => 'NEW', + self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', + self::ACTION_REQUIRED => 'ACTION_REQUIRED', + self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', + self::CLOSED => 'CLOSED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Support\V2\Case_State::class); + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php new file mode 100644 index 000000000000..7f53b4492458 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php @@ -0,0 +1,147 @@ +google.cloud.support.v2.SearchCaseClassificationsRequest + */ +class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * An expression written in the Google Cloud filter language. If non-empty, + * then only cases whose fields match the filter are returned. If empty, then + * no messages are filtered out. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of cases fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * An expression written in the Google Cloud filter language. If non-empty, + * then only cases whose fields match the filter are returned. If empty, then + * no messages are filtered out. + * @type int $page_size + * The maximum number of cases fetched with each request. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * An expression written in the Google Cloud filter language. If non-empty, + * then only cases whose fields match the filter are returned. If empty, then + * no messages are filtered out. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression written in the Google Cloud filter language. If non-empty, + * then only cases whose fields match the filter are returned. If empty, then + * no messages are filtered out. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. + * + * 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 the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php new file mode 100644 index 000000000000..bc505b11f599 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.SearchCaseClassificationsResponse + */ +class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + */ + private $case_classifications; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `SearchCaseClassificationsRequest` message + * that is issued. If unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Support\V2\CaseClassification>|\Google\Protobuf\Internal\RepeatedField $case_classifications + * The classifications retrieved. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `SearchCaseClassificationsRequest` message + * that is issued. If unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCaseClassifications() + { + return $this->case_classifications; + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + * @param array<\Google\Cloud\Support\V2\CaseClassification>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCaseClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\CaseClassification::class); + $this->case_classifications = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `SearchCaseClassificationsRequest` message + * that is issued. If unspecified, there are no more results to retrieve. + * + * 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 results. This should be set in the + * `page_token` field of subsequent `SearchCaseClassificationsRequest` message + * that is issued. If unspecified, there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php new file mode 100644 index 000000000000..ae66bcad69fc --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php @@ -0,0 +1,285 @@ +google.cloud.support.v2.SearchCasesRequest + */ +class SearchCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The fully qualified name of parent resource to search cases under. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * An expression written in filter language. + * A query uses the following fields with the operators equals (`=`) and + * `AND`: + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * - `billingAccount`: A billing account in the form + * `billingAccounts/` + * You must specify either `organization` or `project`. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * Examples: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The fully qualified name of parent resource to search cases under. + * @type string $query + * An expression written in filter language. + * A query uses the following fields with the operators equals (`=`) and + * `AND`: + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * - `billingAccount`: A billing account in the form + * `billingAccounts/` + * You must specify either `organization` or `project`. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * Examples: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. The default page + * size is 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The fully qualified name of parent resource to search cases under. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The fully qualified name of parent resource to search cases under. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression written in filter language. + * A query uses the following fields with the operators equals (`=`) and + * `AND`: + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * - `billingAccount`: A billing account in the form + * `billingAccounts/` + * You must specify either `organization` or `project`. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * Examples: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression written in filter language. + * A query uses the following fields with the operators equals (`=`) and + * `AND`: + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * - `state`: The accepted values are `OPEN` or `CLOSED`. + * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * - `billingAccount`: A billing account in the form + * `billingAccounts/` + * You must specify either `organization` or `project`. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * Examples: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * 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 the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php new file mode 100644 index 000000000000..2bf2e0df01ac --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2.SearchCasesResponse + */ +class SearchCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `SearchCaseRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $cases + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `SearchCaseRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the Google Cloud Resource, after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @param array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `SearchCaseRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * 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 results. This should be set in the + * `page_token` field of subsequent `SearchCaseRequest` message that is + * issued. If unspecified, there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php new file mode 100644 index 000000000000..2ced0c907010 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php @@ -0,0 +1,172 @@ +google.cloud.support.v2.UpdateCaseRequest + */ +class UpdateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The case object to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + /** + * A list of attributes of the case object that should be updated + * as part of this request. Supported values are `priority`, `display_name`, + * and `subscriber_email_addresses`. If no fields are specified, all supported + * fields are updated. + * WARNING: If you do not provide a field mask, then you might accidentally + * clear some fields. For example, if you leave the field mask empty and do + * not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2\PBCase $case Required. The case object to update. + * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case object that should be updated + * as part of this request. Supported values are `priority`, `display_name`, + * and `subscriber_email_addresses`. If no fields are specified, all supported + * fields are updated. + * + * WARNING: If you do not provide a field mask, then you might accidentally + * clear some fields. For example, if you leave the field mask empty and do + * not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * @return \Google\Cloud\Support\V2\UpdateCaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCase($case) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2\PBCase $case + * Required. The case object to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A list of attributes of the case object that should be updated + * as part of this request. Supported values are `priority`, `display_name`, + * and `subscriber_email_addresses`. If no fields are specified, all supported + * fields are updated. + * WARNING: If you do not provide a field mask, then you might accidentally + * clear some fields. For example, if you leave the field mask empty and do + * not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The case object to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case object to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * A list of attributes of the case object that should be updated + * as part of this request. Supported values are `priority`, `display_name`, + * and `subscriber_email_addresses`. If no fields are specified, all supported + * fields are updated. + * WARNING: If you do not provide a field mask, then you might accidentally + * clear some fields. For example, if you leave the field mask empty and do + * not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * 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 list of attributes of the case object that should be updated + * as part of this request. Supported values are `priority`, `display_name`, + * and `subscriber_email_addresses`. If no fields are specified, all supported + * fields are updated. + * WARNING: If you do not provide a field mask, then you might accidentally + * clear some fields. For example, if you leave the field mask empty and do + * not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * 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/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php new file mode 100644 index 000000000000..7ebb59e33a5a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseAttachmentServiceClient->listAttachments($request); + + /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_attachments_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php new file mode 100644 index 000000000000..dd62d99252c6 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + close_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php new file mode 100644 index 000000000000..dd22f006af31 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php @@ -0,0 +1,76 @@ +setParent($formattedParent) + ->setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->createCase($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 = CaseServiceClient::projectName('[PROJECT]'); + + create_case_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php new file mode 100644 index 000000000000..67e5d6a627a1 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + escalate_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php new file mode 100644 index 000000000000..4a8d0488600f --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + get_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php new file mode 100644 index 000000000000..0eda14b5abb8 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->listCases($request); + + /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); + + list_cases_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php new file mode 100644 index 000000000000..86fac7bd4aa7 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php @@ -0,0 +1,65 @@ + ". For example "Technical + * Issue > Compute > Compute Engine". + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function search_case_classifications_sample(): void +{ + // Create a client. + $caseServiceClient = new CaseServiceClient(); + + // Prepare the request message. + $request = new SearchCaseClassificationsRequest(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->searchCaseClassifications($request); + + /** @var CaseClassification $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 cloudsupport_v2_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php new file mode 100644 index 000000000000..4b7af732bd80 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php @@ -0,0 +1,62 @@ +searchCases($request); + + /** @var PBCase $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 cloudsupport_v2_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php new file mode 100644 index 000000000000..a440ac08a041 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php @@ -0,0 +1,59 @@ +setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->updateCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudsupport_v2_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php new file mode 100644 index 000000000000..0543ae42dfef --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setComment($comment); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->createComment($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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + create_comment_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php new file mode 100644 index 000000000000..5cfab2bbfef6 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $commentServiceClient->listComments($request); + + /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_comments_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php new file mode 100644 index 000000000000..6acdc19bf4d6 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php @@ -0,0 +1,274 @@ + listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) + */ +final class CaseAttachmentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CaseAttachmentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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/case_attachment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - projectCase: projects/{project}/cases/{case} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudsupport.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Retrieve all attachments associated with a support case. + * + * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} + * . + * + * @example samples/V2/CaseAttachmentServiceClient/list_attachments.php + * + * @param ListAttachmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttachments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php new file mode 100644 index 000000000000..9cfac7cc93d7 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php @@ -0,0 +1,519 @@ + closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) + */ +final class CaseServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CaseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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/case_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * 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_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * 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_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organization: organizations/{organization} + * - organizationCase: organizations/{organization}/cases/{case} + * - project: projects/{project} + * - projectCase: projects/{project}/cases/{case} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudsupport.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Close the specified case. + * + * The async variant is {@see CaseServiceClient::closeCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/close_case.php + * + * @param CloseCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); + } + + /** + * Create a new case and associate it with the given Google Cloud Resource. + * The case object must have the following fields set: `display_name`, + * `description`, `classification`, and `priority`. + * + * The async variant is {@see CaseServiceClient::createCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/create_case.php + * + * @param CreateCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); + } + + /** + * Escalate a case. Escalating a case will initiate the Google Cloud Support + * escalation management process. + * + * This operation is only available to certain Customer Care tiers. Go to + * https://cloud.google.com/support and look for 'Technical support + * escalations' in the feature list to find out which tiers are able to + * perform escalations. + * + * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/escalate_case.php + * + * @param EscalateCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve the specified case. + * + * The async variant is {@see CaseServiceClient::getCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/get_case.php + * + * @param GetCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('GetCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve all cases under the specified parent. + * + * Note: Listing cases under an Organization returns only the cases directly + * parented by that organization. To retrieve all cases under an organization, + * including cases parented by projects under that organization, use + * `cases.search`. + * + * The async variant is {@see CaseServiceClient::listCasesAsync()} . + * + * @example samples/V2/CaseServiceClient/list_cases.php + * + * @param ListCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCases', $request, $callOptions); + } + + /** + * Retrieve valid classifications to be used when creating a support case. + * The classications are hierarchical, with each classification containing + * all levels of the hierarchy, separated by " > ". For example "Technical + * Issue > Compute > Compute Engine". + * + * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} + * . + * + * @example samples/V2/CaseServiceClient/search_case_classifications.php + * + * @param SearchCaseClassificationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); + } + + /** + * Search cases using the specified query. + * + * The async variant is {@see CaseServiceClient::searchCasesAsync()} . + * + * @example samples/V2/CaseServiceClient/search_cases.php + * + * @param SearchCasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCases', $request, $callOptions); + } + + /** + * Update the specified case. Only a subset of fields can be updated. + * + * The async variant is {@see CaseServiceClient::updateCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/update_case.php + * + * @param UpdateCaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php new file mode 100644 index 000000000000..313ae37957df --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php @@ -0,0 +1,363 @@ + createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) + */ +final class CommentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CommentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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/comment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a comment + * resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted comment resource. + */ + public static function commentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('comment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_comment resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted organization_case_comment resource. + */ + public static function organizationCaseCommentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('organizationCaseComment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_comment resource. + * + * @param string $project + * @param string $case + * @param string $comment + * + * @return string The formatted project_case_comment resource. + */ + public static function projectCaseCommentName(string $project, string $case, string $comment): string + { + return self::getPathTemplate('projectCaseComment')->render([ + 'project' => $project, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - comment: organizations/{organization}/cases/{case}/comments/{comment} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudsupport.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Add a new comment to the specified Case. + * The comment object must have the following fields set: body. + * + * The async variant is {@see CommentServiceClient::createCommentAsync()} . + * + * @example samples/V2/CommentServiceClient/create_comment.php + * + * @param CreateCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Comment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); + } + + /** + * Retrieve all Comments associated with the Case object. + * + * The async variant is {@see CommentServiceClient::listCommentsAsync()} . + * + * @example samples/V2/CommentServiceClient/list_comments.php + * + * @param ListCommentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListComments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..d00e90d65343 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json @@ -0,0 +1,91 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.support.v2", + "libraryPackage": "Google\\Cloud\\Support\\V2", + "services": { + "CaseAttachmentService": { + "clients": { + "grpc": { + "libraryClient": "CaseAttachmentServiceGapicClient", + "rpcs": { + "ListAttachments": { + "methods": [ + "listAttachments" + ] + } + } + } + } + }, + "CaseService": { + "clients": { + "grpc": { + "libraryClient": "CaseServiceGapicClient", + "rpcs": { + "CloseCase": { + "methods": [ + "closeCase" + ] + }, + "CreateCase": { + "methods": [ + "createCase" + ] + }, + "EscalateCase": { + "methods": [ + "escalateCase" + ] + }, + "GetCase": { + "methods": [ + "getCase" + ] + }, + "ListCases": { + "methods": [ + "listCases" + ] + }, + "SearchCaseClassifications": { + "methods": [ + "searchCaseClassifications" + ] + }, + "SearchCases": { + "methods": [ + "searchCases" + ] + }, + "UpdateCase": { + "methods": [ + "updateCase" + ] + } + } + } + } + }, + "CommentService": { + "clients": { + "grpc": { + "libraryClient": "CommentServiceGapicClient", + "rpcs": { + "CreateComment": { + "methods": [ + "createComment" + ] + }, + "ListComments": { + "methods": [ + "listComments" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json new file mode 100644 index 000000000000..6ae7449b3151 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.support.v2.CaseAttachmentService": { + "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": 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 + } + }, + "methods": { + "ListAttachments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php new file mode 100644 index 000000000000..a6acb27cb7fb --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php @@ -0,0 +1,53 @@ + [ + 'google.cloud.support.v2.CaseAttachmentService' => [ + 'ListAttachments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListAttachmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php new file mode 100644 index 000000000000..44f5c6786e92 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php @@ -0,0 +1,46 @@ + [ + 'google.cloud.support.v2.CaseAttachmentService' => [ + 'ListAttachments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/attachments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/attachments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json new file mode 100644 index 000000000000..7fff474416b4 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.support.v2.CaseService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "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_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 + } + }, + "methods": { + "CloseCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EscalateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCaseClassifications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php new file mode 100644 index 000000000000..b97e8e966e33 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.support.v2.CaseService' => [ + 'CloseCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCaseClassifications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SearchCaseClassificationsResponse', + ], + 'SearchCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SearchCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'case.name', + 'fieldAccessors' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organization' => 'organizations/{organization}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'project' => 'projects/{project}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php new file mode 100644 index 000000000000..35e1aa86a107 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php @@ -0,0 +1,161 @@ + [ + 'google.cloud.support.v2.CaseService' => [ + 'CloseCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}:close', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:close', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/cases', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}:escalate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:escalate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/cases', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/caseClassifications:search', + ], + 'SearchCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/cases:search', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases:search', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{case.name=projects/*/cases/*}', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{case.name=organizations/*/cases/*}', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'case.name' => [ + 'getters' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json new file mode 100644 index 000000000000..1b66ef04b47d --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json @@ -0,0 +1,54 @@ +{ + "interfaces": { + "google.cloud.support.v2.CommentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "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_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 + } + }, + "methods": { + "CreateComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListComments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php new file mode 100644 index 000000000000..f3f31a7f53de --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php @@ -0,0 +1,68 @@ + [ + 'google.cloud.support.v2.CommentService' => [ + 'CreateComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Comment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php new file mode 100644 index 000000000000..63e87c0fef3f --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php @@ -0,0 +1,65 @@ + [ + 'google.cloud.support.v2.CommentService' => [ + 'CreateComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', + 'body' => 'comment', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', + 'body' => 'comment', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php new file mode 100644 index 000000000000..f78230ffac55 --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php @@ -0,0 +1,172 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseAttachmentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseAttachmentServiceClient($options); + } + + /** @test */ + public function listAttachmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachmentsElement = new Attachment(); + $attachments = [ + $attachmentsElement, + ]; + $expectedResponse = new ListAttachmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachments($attachments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttachments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachmentsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachmentsElement = new Attachment(); + $attachments = [ + $attachmentsElement, + ]; + $expectedResponse = new ListAttachmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachments($attachments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachmentsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php new file mode 100644 index 000000000000..c5806436f84e --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php @@ -0,0 +1,712 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseServiceClient($options); + } + + /** @test */ + public function closeCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCase($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.support.v2.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function closeCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->closeCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + $response = $gapicClient->createCase($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.support.v2.CaseService/CreateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + try { + $gapicClient->createCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function escalateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->escalateCase($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.support.v2.CaseService/EscalateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function escalateCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->escalateCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getCase($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.support.v2.CaseService/GetCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new ListCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/ListCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListCasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCaseClassificationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $caseClassificationsElement = new CaseClassification(); + $caseClassifications = [ + $caseClassificationsElement, + ]; + $expectedResponse = new SearchCaseClassificationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCaseClassifications($caseClassifications); + $transport->addResponse($expectedResponse); + $request = new SearchCaseClassificationsRequest(); + $response = $gapicClient->searchCaseClassifications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/SearchCaseClassifications', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCaseClassificationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SearchCaseClassificationsRequest(); + try { + $gapicClient->searchCaseClassifications($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new SearchCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + $request = new SearchCasesRequest(); + $response = $gapicClient->searchCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/SearchCases', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 SearchCasesRequest(); + try { + $gapicClient->searchCases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + $response = $gapicClient->updateCase($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.support.v2.CaseService/UpdateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + try { + $gapicClient->updateCase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function closeCaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCaseAsync($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.support.v2.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php new file mode 100644 index 000000000000..871515b3e1fe --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php @@ -0,0 +1,247 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CommentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CommentServiceClient($options); + } + + /** @test */ + public function createCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createComment($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.support.v2.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCommentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + try { + $gapicClient->createComment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $commentsElement = new Comment(); + $comments = [ + $commentsElement, + ]; + $expectedResponse = new ListCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setComments($comments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CommentService/ListComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCommentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listComments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCommentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createCommentAsync($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.support.v2.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Common.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..fbb17a17a223be9d7627c5758cb364fdb89fcd53 GIT binary patch literal 6223 zcmbtY-EQN?6|N-zj@Mo;_s?-Q8$}y58zYfXcY&f#w*^IxBxWg6B`G^z7$9hgwuw-r zLQ$JIL9Tk!t3E){t3E=3-t+|u^ch;9=nM1}`kf)AwY1*+Y<**D=A1ca&iT&Y{OUKO zixGQNZ3S_V`dKijo?ce7i=aA6lPu{cQT23kb{3@7eli?|QIOWFRn4lJmRseT?!E`s zaWYB!!9n#rNzS8SuOB6o!CvM^L7eTqc(Mn^VG`HHd5p#WFc^>geo$?78=WBY2Y%+C zv;^ykN~|ZYU_Ci}@(E-8$RCfZsyKpu!>afjO-`e*Uma(DhJWveV=s)uEcB!BYiR$p zdge#t0IaXlo=xI@7AA3(7_7J-JpQnnpGmauj}qMWX?3bhmkfZ*pXhNGq_H2JXu-Ij zhNCP=yC6L{I1jR!*=XhQhlN-=E6Q_!FTw9q{e! z>*N|!DWmYD83xgy5nT8$!X!O7czLUrhg`=xyOW@Z2I{x9T?&T;r zG5jow&wnISCy9g0AIZ~AaI;7m4ANly8YP9pKmK)CxEHiDZ#IGS$20qrH$Gth`j9>P z0T7q(Mx$`yjw7fKme}xvZ?v=*w}fvNbqH0<6?ii*w0|dy+|0c*tvgo z2f-Fx78}!;6f7fQ63@?Vl2g=Twl#x+?Z@YVTxSfXOEZu3+b&g0k2m&r>bZoR3Ch=J zO!7x;Erb@}_KYk#S*H6!UGc9U4v*k)9Gd!(X}wzdE9RN8_G>r=+r2VqLyXIt}E z+g?zEj;_xELVlmE!h#;KxLpxC-=4}8#DJ+0pUZdHjnp56ld(4hAjaEEAT8DYTVgk+ zng|8nVQ(3hs<^skdhT(Tdp*>Y1*6ES2Q@?6#tHbW?X+8ytt+ zQ*5qCW%+G(-|02H>ozO$4Hyj)4Bb7JmgJjkqiZ>?VtA^hacNnW*bU;Hk*vrv+q$~q z{Y+YYWo=(tBTkd+t#-q*+m@wC>w?O)Id`FoW^>1pSnZD`cGC{Nm>^qBQ?|UtRtCw? z4`bmp;$vfk8rbA3rRVR*gvj}l`q+2qDd9(nxx zkoS_Yo_`9*GghA7wH8fJ7d!B##t(IsUk8X)RypDgfMJWVj@8f&?$PfuAw@AY+tM|u zB7;h|9Jm`F4a)Q0S)IvHolP|311Je_2Le3xyG@eQNC@FTbiSE|6| zx7kLNyj(0}u|m!|3nP>@|1=7OZ`R};CVw7Wewm~LZyfk(|3d5$=6ybC= zNz*`-QTY~I@8`dQ+{kP4J+?Jl^0MHotU$ut`b9R3azNC6zs@97_fZg!MM@x#%Foy; zdWSSD?y#|c@H!YQvevIIaGY@|f6i)t98dE0z&rKFf!Dtx&`T-l6&d5r0 z$Ps&VMOc;~`(Gz5PdWduw4L8o*sWJD++s^t5dF(HGM&IM4w|4*61Lgef3t&nH~`6Z z#UCb#`Dy9;k|~s_Se#U%m`<_$KFw`PM4d`YwOS&TWTl{N8UjqX;@~@LCU$sHXXfX z>SoK!mnz5&EBv>;ywsqMbZx7tyPnflY)~N$q5MEpM|T_)JV#oQaj>g*9h4ZPJ&~bM zm=<)A)@pxR&|6?*QSY7!S@ZQ1`n0W{ZBY4y=9;48vrK9pasCY76-t~P%XHiLu|ylk zTp{{pDx8*yB&>Hh6un+O5-F|L{$64C8h+Nluz(7YjArFTWy{pcPpia}DNGit()H|h zhj^*>i9@`rz@$!PU8L?wzmM_>3{2x>nU>G|Fq)*4vS^tiW0|l$%`CJ?m2z3$V;lW6 zfSkM$%klhOZ5tRSBMe^!!>R~??_#*x=dFDob?s}moL~DcyM;r88ROL_o>zJ8r%;GgLYbPN;{)EyA?p(&a}Xaxd8Z*osJot{k=f_4?N`5IF_mdb&hA*9%Zvb#lTfzB52!C)HXLPdvS9GF?zS7I4*x>YZdL$ zJG%Z9Z1GuL+iSz=p!IEs?XAsQE9ly}+Nywf$TV`1TIrUF>I*)xnhHI>Ntk*EEhjtLMVqxO$$t7u1&6?iXwgm^OkJK}2MPXoDYeV*$^o3otPpEj9sY zTKEiNbq*wId02H6Q=zC4GmVC8hzp9V@Xxr~qmf8j-u>GO+ki|J`RP1C7YC1%Sm1}Z zEQpwoB=|;A#f*h~;Gu=~nz||AFOar4Q(@m~Hqo3zB_K`F4!P|D+yyVd`V7H=Bvhd* zC??>GQHz3fiC{o(YAQ~f#yygyajKxOKW4i|562*dc^2+1DlrvEU`|Eoi7G3!Q&b(Z zoX)9cA{Hq<_24*h9Ey>c%iwR!h&`3YO8AEm&~scQ1qvFQW($NR-25`EHponH0dAw{ zrT`vE18U$b>4v<`?lct}*)F#c{H|Gu0%?=r*5-=gw#6;CNT+rWu0nu0$TLXF(oOl~ z1NI1s1$o5CdyEdGxLg=oXm0baqT7;03DMv!WTabS#1SqhbtG9vT;SYZ6Tt3KKOq>8 zU|Zxf^d`5_ELKHKQwz~SY0guIlhfHS8vJqxbB1i`hSyT^4a(qHzbijvJ21RsnT5v$ zTVXCox<@WTk#T`K8og&5_sP+i!;wftv68mwBwXHAD34+mh8^3M)75c%>WtnZe>lh~ zxqKv3)Fx?%Jng6g?}CM!Ex-X00Oj76YwV#&OU6vFAToiYyvdRt$moY01hne_!pQnS z5{X8bKs$kicjPL20GHy40c5!&h{Uj3cvH|-M|!v$uuXdIz_exu=k(A*X2FXA+1utV z0`7bOz2;Ry)Fd;PTP72^+(5pDUtBI#c4Nj4!*O^TMqzeIkwFy#<17rca6YPi5ul!B zqA@Fx1F56rns=nTZLeinEra55VZGaH7`iG|cFNl&a8s0H&DIae;U%ig!cz!oG29<1#xvRx4Xb*riuPrR?p%<0uo5*u&`erx z1Z)Qb$7`C+2K6|2>l3fJ-O}^@ycsRt>A<&lo=jii{ZWXA`1~nybo$BkN=+@ kV%qun2ebFikMh^)E05XKxQ6{}9internalAddGeneratedFile( + ' +¹ +$google/cloud/talent/v4/company.protogoogle.cloud.talent.v4google/api/resource.proto#google/cloud/talent/v4/common.proto"È +Company +name (  + display_name ( BàA + external_id ( BàA1 +size (2#.google.cloud.talent.v4.CompanySize +headquarters_address (  + hiring_agency ( +eeo_text (  + website_uri (  +career_site_uri (  + image_uri + ( 4 +(keyword_searchable_job_custom_attributes ( BF + derived_info ( 2+.google.cloud.talent.v4.Company.DerivedInfoBàA + suspended (BàAN + DerivedInfo? +headquarters_location ( 2 .google.cloud.talent.v4.Location:YêAV +jobs.googleapis.com/Company7projects/{project}/tenants/{tenant}/companies/{company}Bf +com.google.cloud.talent.v4B CompanyProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php new file mode 100644 index 000000000000..7b0524e10a8e --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php @@ -0,0 +1,66 @@ +internalAddGeneratedFile( + ' +« +,google/cloud/talent/v4/company_service.protogoogle.cloud.talent.v4google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/talent/v4/common.proto$google/cloud/talent/v4/company.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" +CreateCompanyRequest2 +parent ( B"àAúA +jobs.googleapis.com/Tenant5 +company ( 2.google.cloud.talent.v4.CompanyBàA"F +GetCompanyRequest1 +name ( B#àAúA +jobs.googleapis.com/Company"~ +UpdateCompanyRequest5 +company ( 2.google.cloud.talent.v4.CompanyBàA/ + update_mask ( 2.google.protobuf.FieldMask"I +DeleteCompanyRequest1 +name ( B#àAúA +jobs.googleapis.com/Company"Œ +ListCompaniesRequest2 +parent ( B"àAúA +jobs.googleapis.com/Tenant + +page_token (  + page_size ( +require_open_jobs ("  +ListCompaniesResponse2 + companies ( 2.google.cloud.talent.v4.Company +next_page_token ( : +metadata ( 2(.google.cloud.talent.v4.ResponseMetadata2à +CompanyService­ + CreateCompany,.google.cloud.talent.v4.CreateCompanyRequest.google.cloud.talent.v4.Company"MÚAparent,company‚Óä“6"+/v4/{parent=projects/*/tenants/*}/companies:company” + +GetCompany).google.cloud.talent.v4.GetCompanyRequest.google.cloud.talent.v4.Company":ÚAname‚Óä“-+/v4/{name=projects/*/tenants/*/companies/*}º + UpdateCompany,.google.cloud.talent.v4.UpdateCompanyRequest.google.cloud.talent.v4.Company"ZÚAcompany,update_mask‚Óä“>23/v4/{company.name=projects/*/tenants/*/companies/*}:company‘ + DeleteCompany,.google.cloud.talent.v4.DeleteCompanyRequest.google.protobuf.Empty":ÚAname‚Óä“-*+/v4/{name=projects/*/tenants/*/companies/*}ª + ListCompanies,.google.cloud.talent.v4.ListCompaniesRequest-.google.cloud.talent.v4.ListCompaniesResponse"<ÚAparent‚Óä“-+/v4/{parent=projects/*/tenants/*}/companieslÊAjobs.googleapis.comÒAShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBm +com.google.cloud.talent.v4BCompanyServiceProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompletionService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompletionService.php new file mode 100644 index 0000000000000000000000000000000000000000..baf392f3c6aea288432de94029eea3f600c72c52 GIT binary patch literal 2293 zcmbtW-EJF26vlRv){{1v1%h#lI=GeUqQtA3NJyKeXze(WX=0mti`2@J8L!9oR_mQ* zXEu?ka)Y?wo;RojkHAB42`|6}PthyR?5uy9*dhVncrEV*{7! zw#&kvE{ID#p`YyN($S^DVP1#R;KZ?MF~Ua3BO}UvVpDwBEFV)rdPI=+VFc5zNSL-2 z!L+~G*+s~93Fo*ng=;A^^a^44`C->}Y|I4_@ORJQ9mjKoLtN*3xYQo*6PHs!xoF!D zJzJ)Sr9;EBY2g7@n9}y1&wzwIJjtsmc>zw^HBZpMBW`=2ayxK*!Gb238peQ%DVuVq z@E{H=;ha7$s2mOBLXvw}1R3K}Dz&vgkvpdZo zmN`~j2j1*zJ_inUdu2K#Ck_j)=K7Sz%DHrs=QPmpIe}C}3?1Vj$u>Pz{n(rTE;Pxr4qWuG5W~iw!=W zGYDdO;-kCq(Sq^<4wO;;rxo-;Tp;x8kOt$Y^t+I9p_R~@pdRr=Hh~j`bUFW*nS5j3 zM!A=)%Zmyc(&a^{R^5s$H4UwTb1=>(BbOAoXq#xmCEg$;1KP1!kMe8^rwVDgBGHoH|tg=A=k}k<)d09lgxjMHfCTFUb};C&0$&3FF@Ty>8~2)j#aac zs(_Y3H>AB;f8ME^$JI1@F2V@qyf`cwn zh4s?oOERRO=IDlE1{lpi*GF+9k7To6Dl9_;k0_r>m)+6G_+q5=;m8IYFo>0^p;s%dAaRNS}QX0 zU;Oar-#;fGYPuYquT;(M!MuD)ZNc@=bhQJkGs9Mos0uyj{%*d%psfBdTSFmyZs_{y z>1mwHw9-i^hH7AM`z{fE7L2z3&0Gd4`zQzDmt3v988aaZMGfg_YBm!uN~%|?h7&cL z0h@d)Kvr;P)kgj9?qu;gnW|W=?ppNG@cI2|-`-Nga&ERRovV?hntx~L455Djv1;Z(k>DRASh~OZ$XnR zxiXLz{+a$tePfQo7D*)dX_tO62tN=olaf{Vc<}r~rQe=1;Pm zg*3n!^BI2~(9EL|Wz-Mp@0|MyUie`~IP(46#WD&QjUy}oW)zUlQ=Hcnxd%ziwVvRD zizVc9=~E+OB#r!VIwV<;(uBpS#Z&wJE5gd5iAd+^s;wwT7r2vi?DyXzd4gHGB#e04&?a{ zbR}P%&r7uN{xu8qYjgu)QHMxWN36efLE?ldR4jpiiNdbBJO_vUXF_*n$li+<#kx zMv;tuf;xMX5J`UL@cGAzmt9;A$~o>ropa2%*xE|${y$aNE;@)r^cC#AFbAG~sZU(b zeP!w1#l*36%@`T_PyBfX6QzP0P`@hf&QaaG$@>gW-m_3+4;7|xlpfiQfr9{>5m(9S*QVlX!HZkwnLpRH$NF*it92avH7zXd4;>(>x!m_PNqR z3T*S;#)p$jRJKtQHqN;Iq4E&5V9OC>)Gn1BF$-hj>b9KGsjc$!Q2AsqhdsV3KkzdL zAble5pjCN&m>a3M6Y)*&DlRsspHRL$^Ba=Pj*G*e)tcryvrTE+Z=aO6@L9f7)>hC5 O*N@E1m&6_10sISftjrAn literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php new file mode 100644 index 000000000000..ae6d88b3d093 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + ' +‹ +*google/cloud/talent/v4/event_service.protogoogle.cloud.talent.v4google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/cloud/talent/v4/event.proto"Ž +CreateClientEventRequest2 +parent ( B"àAúA +jobs.googleapis.com/Tenant> + client_event ( 2#.google.cloud.talent.v4.ClientEventBàA2Å + EventServiceÆ +CreateClientEvent0.google.cloud.talent.v4.CreateClientEventRequest#.google.cloud.talent.v4.ClientEvent"ZÚAparent,client_event‚Óä“>"./v4/{parent=projects/*/tenants/*}/clientEvents: client_eventlÊAjobs.googleapis.comÒAShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBk +com.google.cloud.talent.v4BEventServiceProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Filters.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Filters.php new file mode 100644 index 0000000000000000000000000000000000000000..831cdcb3832e0877e48b983876328735cbed3e6d GIT binary patch literal 3009 zcmbVO-E!MR6t3;0O*V;}C^U6a3aT60lmWZAWdNrE{39psIJR+QpdHWbtfjRhkhMZu zr5L6c-0%jx0I$InZ^CfTJ8*U-Ij$Q+AUCmnes<4yzVGaL@|k<;qPyxLb*M);HP!xD z<)>72J;s^AY_%T@2GmmxHgYYSdO20Cw$x@zSG8(gzXPE@3p|4s)gfa;o8}Fh1!kTT zn>svy_BcPVY)(BtCley%kP-D=Vo>$4T|TCqn1qwwp^WWSL~Ku&vAr)J?;~W`#P`)& zm;?QYRQPj)zHJ$*&k2WryOxhF$Kn>Ttsmh22kL;>K84uVeFuSKaEm#r2xvJ5-Fu*h zIfd`8%b?x^HNH(-Kmg_U>JC)k5W82UzTsIeXI>jzi^U=36X3)zdk>;xMLKJs?uBue`-aoDw*b_Gr%6Y zH^EXMdmsI@fp#xLSY<2p%1K)1LR#m}9`D?p6Ad~6EJL>MycIb~?gNwZW&~Jd&qQ_( zsN`*lN@Te;ZQ*h0p)vdC0$O^?`dSFeQ5W90y)1!4iG(dn5*xamsaoq556tKc1-eH+~f3mRk7@?D#Z zu^cd&tFpL5v?)teHXgxD#G=`L21$(OVysR4g<_N~lzye3er81$SVoGRhW;rQ zB*7juon}^LeRFdQCBa}CxgFuH+(2ved&3S)YGP=lpIH;BvwtN~dZyFY(KTY49`*f* zY@2AsqeB<~A<2>wid}RKsEk43KqS%2%@}A=c@D(iaE8h@+5o^ffgudz8;?Mvf;fr2 zgwpGwElzD36T|f=yg(E@B{|ZCCvn0VQO+Kbl$w3^n@niUOqniQMsP4vdJpZ0a7(XE0dv6Ea%C^ymOw6)Y|w7vpk zQn`(`rwvbAEB*DzT*zI)pK|JtQc^iaivhfQ zq4Lv(PcDLQJ7gF$J^w4r71tkOV3yYuPzyT#0*1!T@ z0u?5>L?jnnS<3#LKu>Pz)+qN~d+-=r%+-f$SttXUCbX|TeHLJLE z-0C)U=+O?^Dm9zkQltJ{tKxF$M2l@Hk$lRgxAamYHZEj;PoXuyX=*l=&qv#c@>6C; zE&R9921^k*hZsLX8=w)70|3l3EeFP?Xx}_lg+U*o>)az})W-316A5uUZc+Rm<>CiC z47`K3iEXnN*cyT649llD(tD)MC8ds5Jw{9n2Mh+55ef2xIPt6?UqK|-fk-_JJi4Mh zL}`<{P+Z_qIlW+Li^8_zWO7`HVbvN`$@u6>wt-frQh*FIomQ!e^-if)t5;@3x{g+3 zL#?A}&~WH~xqI>qAGNxj^<;S+rK2h^bHx@@9-ti{T73LWE#=jaXTIEi+KK0d&>?;# z*(g6`@!m^Z3s&E7TX6gP@rPfNsfvEmzbf&6bbqpwycceRQ_JJr#Zh{O>)lKA5~05V D9|yg3 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php new file mode 100644 index 000000000000..e9b56f10d303 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' +‘ +&google/cloud/talent/v4/histogram.protogoogle.cloud.talent.v4") +HistogramQuery +histogram_query ( "± +HistogramQueryResult +histogram_query ( N + histogram ( 2;.google.cloud.talent.v4.HistogramQueryResult.HistogramEntry0 +HistogramEntry +key (  +value (:8Bh +com.google.cloud.talent.v4BHistogramProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php new file mode 100644 index 000000000000..d73a645cb8c9 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php @@ -0,0 +1,81 @@ +internalAddGeneratedFile( + ' +ÿ + google/cloud/talent/v4/job.protogoogle.cloud.talent.v4google/api/resource.proto#google/cloud/talent/v4/common.protogoogle/protobuf/timestamp.proto"õ +Job +name ( 4 +company ( B#àAúA +jobs.googleapis.com/Company +requisition_id ( BàA +title ( BàA + description ( BàA + addresses ( E +application_info ( 2+.google.cloud.talent.v4.Job.ApplicationInfo8 + job_benefits (2".google.cloud.talent.v4.JobBenefitC +compensation_info ( 2(.google.cloud.talent.v4.CompensationInfoL +custom_attributes + ( 21.google.cloud.talent.v4.Job.CustomAttributesEntry8 + degree_types (2".google.cloud.talent.v4.DegreeType + +department ( @ +employment_types (2&.google.cloud.talent.v4.EmploymentType + +incentives (  + language_code ( 3 + job_level (2 .google.cloud.talent.v4.JobLevel +promotion_value ( +qualifications (  +responsibilities ( = +posting_region (2%.google.cloud.talent.v4.PostingRegion: + +visibility (2".google.cloud.talent.v4.VisibilityB2 +job_start_time ( 2.google.protobuf.Timestamp0 + job_end_time ( 2.google.protobuf.Timestamp8 +posting_publish_time ( 2.google.protobuf.Timestamp7 +posting_expire_time ( 2.google.protobuf.Timestamp< +posting_create_time ( 2.google.protobuf.TimestampBàA< +posting_update_time ( 2.google.protobuf.TimestampBàA! +company_display_name ( BàAB + derived_info ( 2\'.google.cloud.talent.v4.Job.DerivedInfoBàAI +processing_options ( 2-.google.cloud.talent.v4.Job.ProcessingOptionsD +ApplicationInfo +emails (  + instruction (  +uris (  + DerivedInfo3 + locations ( 2 .google.cloud.talent.v4.Location; +job_categories (2#.google.cloud.talent.v4.JobCategoryƒ +ProcessingOptions) +!disable_street_address_resolution (C +html_sanitization (2(.google.cloud.talent.v4.HtmlSanitization` +CustomAttributesEntry +key ( 6 +value ( 2\'.google.cloud.talent.v4.CustomAttribute:8:LêAI +jobs.googleapis.com/Job.projects/{project}/tenants/{tenant}/jobs/{job}Bb +com.google.cloud.talent.v4BJobProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/JobService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/JobService.php new file mode 100644 index 0000000000000000000000000000000000000000..2f168ffe6f60ecd1c4a9ea54c609e730049880d8 GIT binary patch literal 7638 zcmcgx&2tmU6_5NO>=xK^8?X>$8D?294wecnOHv|`9Z6#&kSwnx3{ELEHIiEPz-VSN zGcq_^R8mQ*a?aN=mmE{cA^$k@P*WELtk?g@Tn++G_?)P55kKg;~ zp6`Co+PBb$!X`0@t-7Quv=0S$p9q$1x@O1Jh4!G=Beu{n`!`7yi4hIf`az zuBPhRkHCxvLQmBl0_;a=djq56YNjDjhMLhKtG5I$lhR(dOfdU_;48FEJpo>5l?|8J zhN`zp#Oc_Y<(l?3kmmDy#0~sMS5|L%$5L@xPgvzT=JQ9Cd?2{?fP_yM1e>@6+qlp4 zrUKpszgow*OR}_Van3r(>-X4=WQZ zIR=JS(d_q4WAanS`8PBjVt5KKjSG0BIj*^9tNr)a0f0O?bHz0F?15ou#$Kyt(G)#h zlmqaV2Ap^DqXSkzo!qzF!}nliV5zFk%gK4`R;SefG!G)8#L{#9q2?u{)a?ej2hk;~ zLAKD`xrzRG2dz$8neatUnd#6Pl;Jfjb8t7k;z>{~4eA@s8D7fLS3?^;nixvk%M6d; zQi#Cz;O}jH=xwpXLIo2lEnwUux*kE)<3RSPZbVS+`)Kv(-ch5+l+uT|%bEf1JfaW0 z<5)R|%9!nX;PUn_kM9!-pD`T*X70B>fW)Kly=_~aEUlaahi`~BN)~MbT?$gDPJTEb zj*GJ>ZmBjzBoz~4tMi4c|B$BsBVEEP(07~+R|LZ5WWcRi;KS=^8n#kXK%K~4_9(_9 zo&n0jG>8%(qH~+Xg+KiR*U=2^U!%vNsN<;4Pc7(gVVyk{sKOJd0462|OoT$6h1^x&;<4?&<+W{ zg=RpG1L2xJ!P$5PEgIyttAx~}D4EB3G}rg06sB+@w;H7jv^aLIKh=nTOQ59&QSHwD zS8`<;B^)M2>6=}`{JD_38>PjO12cT33cPp&C2gKO%9vHHn^6Ki2>4dX z?L!u|L{5kj0LFht>F_1AL=3g96QymNYM0Q?#sWNtCA1V2EGAVWPU;Mc+l?r>K|kiw z!>E~?2sL;C#m!#NA#Q4(0q+7j*H>S25HLI2_b(XFC0A1*6 z2QXo1J*~rfwW5;)qNmQm_CoGqlo>|@RvHykp;GX3wA>lM0Mb`%)p!Y>gORsqrWQbW zB6ojs;YB8-&SjKA1inTUcUW9rlEYVE78Dz|v!6szMnsxY5>PNW5MA@^kRvyO<(lmnT}qa4Ur5%&E_UR%(n z9T>7gHA{5R;us?q(3Ns^yH;;XTSZx^$UAaHdAilumW$<$vRq1j1J9wEt=g8HjNvnA zx>9?VoT5wBa;21<1~kR1aDjSSP0rBON9D~&$yuC0XXNM2x?Gi$aj}k2C~GgHm4+%eT`QG$?=wd%ICwF_3lV)I#TWN`*6z=f*x zTxmY4%cJyhETRv5Eq0Z{u2QMh8Xyo3DOaR=xw)I16@LL$ejG!T@rk_qtX3~6RjGNr zlhWwoC{4(c3utL{PpVYFs4FNny4)-`E3#7Cs(^LkFXIS@6W8lFRa!s*+%!Eyt>@k( zu;n5$EIEK5swS?YmC>qrr~pC-y6XT!X-~TyC3v(pLT3V|TtZ35 zBDxNXwoTZ5o>lNfZY|0o4N4DgEe0IvFJmYX_Vy~D4o@D<0NV-L{hUF+uR{OhlLB-% zy69>yG&sl5EDQPy_wQx2?C=im(jmj&q|?qkuAsAY>>s#piSMDaR4G5YY;v6>syVdi+A8!N#h>q)m5JOX-@(D`>EABJLv*n~!5_@&?>{|e zyvdED{Nzdf4>9lTVBY?}ojpFH(}*W>?;6p4KLvAoplfdILL;&Z%@ve}7#_LMG+~x9 zT>LFG%ih#jMVK#KfeTRdjbs z@g7eXzjX0&{F*Q0n30|<7>Eo9^?xKX?E9}Ka_s<}0iV)a2u`8%wB_!UUj1~gg1}s&en=YYq!P>@CSenWGop%1oP#XuQ&AJ z*U8hnHvT7ECdY7rGf|-*BlK1LrcWPwnaBh$V&ad#knTi-kJqGt+P}uUl@de49A??K z#oUCJwTERcA6vsei=jAwD8L{2s*a<2_KMXER@e&++d7 z070fi10W#rz57l8l;28=5XRes;Uff7>rQTs`3m+jC#p7vgg^u51SAXzeO)IjuKr1E zm~~<1lYD*F%R1Jx-Y4z&Vbs|G_&NX02S>kO_$0nzk)?4+$c+#mzLm~->hh_0BqL8O zfK);68uu9LA-?4YdAv4+FB0r!GaWs~hMto=Ex*IG%8Ba}7B4=DQV0Gi7QV!6n6?BT z`P{Ed&rg}2dGV7|>FH|)`lj_Sq-7{L;N5^l%7pW|`m@6PPadC&CU_CXzJn*6JR v)xPil`2Ey$vDs+HS=xVmGx&aSn|~V&eM+SBm)1GvGa{qppZngRHwgU~90kca literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php new file mode 100644 index 000000000000..f01fd0c6e4c3 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +¿ +#google/cloud/talent/v4/tenant.protogoogle.cloud.talent.v4google/api/resource.proto"v +Tenant +name (  + external_id ( BàA:DêAA +jobs.googleapis.com/Tenant#projects/{project}/tenants/{tenant}Be +com.google.cloud.talent.v4B TenantProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php new file mode 100644 index 000000000000..4f4d9da36d8e --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php @@ -0,0 +1,64 @@ +internalAddGeneratedFile( + ' +Ë ++google/cloud/talent/v4/tenant_service.protogoogle.cloud.talent.v4google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/talent/v4/common.proto#google/cloud/talent/v4/tenant.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" +CreateTenantRequestC +parent ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project3 +tenant ( 2.google.cloud.talent.v4.TenantBàA"D +GetTenantRequest0 +name ( B"àAúA +jobs.googleapis.com/Tenant"{ +UpdateTenantRequest3 +tenant ( 2.google.cloud.talent.v4.TenantBàA/ + update_mask ( 2.google.protobuf.FieldMask"G +DeleteTenantRequest0 +name ( B"àAúA +jobs.googleapis.com/Tenant"€ +ListTenantsRequestC +parent ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project + +page_token (  + page_size ("› +ListTenantsResponse/ +tenants ( 2.google.cloud.talent.v4.Tenant +next_page_token ( : +metadata ( 2(.google.cloud.talent.v4.ResponseMetadata2ð + TenantServiceœ + CreateTenant+.google.cloud.talent.v4.CreateTenantRequest.google.cloud.talent.v4.Tenant"?ÚA parent,tenant‚Óä“)"/v4/{parent=projects/*}/tenants:tenant… + GetTenant(.google.cloud.talent.v4.GetTenantRequest.google.cloud.talent.v4.Tenant".ÚAname‚Óä“!/v4/{name=projects/*/tenants/*}¨ + UpdateTenant+.google.cloud.talent.v4.UpdateTenantRequest.google.cloud.talent.v4.Tenant"KÚAtenant,update_mask‚Óä“02&/v4/{tenant.name=projects/*/tenants/*}:tenantƒ + DeleteTenant+.google.cloud.talent.v4.DeleteTenantRequest.google.protobuf.Empty".ÚAname‚Óä“!*/v4/{name=projects/*/tenants/*}˜ + ListTenants*.google.cloud.talent.v4.ListTenantsRequest+.google.cloud.talent.v4.ListTenantsResponse"0ÚAparent‚Óä“!/v4/{parent=projects/*}/tenantslÊAjobs.googleapis.comÒAShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBl +com.google.cloud.talent.v4BTenantServiceProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php new file mode 100644 index 000000000000..b28a6699f650 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php @@ -0,0 +1,133 @@ +google.cloud.talent.v4.BatchCreateJobsRequest + */ +class BatchCreateJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The jobs to be created. + * A maximum of 200 jobs can be created in a batch. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $jobs; + + /** + * @param string $parent Required. The resource name of the tenant under which the job is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". Please see + * {@see JobServiceClient::tenantName()} for help formatting this field. + * @param \Google\Cloud\Talent\V4\Job[] $jobs Required. The jobs to be created. + * A maximum of 200 jobs can be created in a batch. + * + * @return \Google\Cloud\Talent\V4\BatchCreateJobsRequest + * + * @experimental + */ + public static function build(string $parent, array $jobs): self + { + return (new self()) + ->setParent($parent) + ->setJobs($jobs); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @type array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * Required. The jobs to be created. + * A maximum of 200 jobs can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 jobs to be created. + * A maximum of 200 jobs can be created in a batch. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Required. The jobs to be created. + * A maximum of 200 jobs can be created in a batch. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Job::class); + $this->jobs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php new file mode 100644 index 000000000000..93fef511aee4 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php @@ -0,0 +1,75 @@ +google.cloud.talent.v4.BatchCreateJobsResponse + */ +class BatchCreateJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of job mutation results from a batch create operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + private $job_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $job_results + * List of job mutation results from a batch create operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * List of job mutation results from a batch create operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobResults() + { + return $this->job_results; + } + + /** + * List of job mutation results from a batch create operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + * @param array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\JobResult::class); + $this->job_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php new file mode 100644 index 000000000000..9914c8abdfa5 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php @@ -0,0 +1,151 @@ +google.cloud.talent.v4.BatchDeleteJobsRequest + */ +class BatchDeleteJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * The parent of all of the jobs specified in `names` must match this field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The names of the jobs to delete. + * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". + * For example, "projects/foo/tenants/bar/jobs/baz". + * A maximum of 200 jobs can be deleted in a batch. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.resource_reference) = { + */ + private $names; + + /** + * @param string $parent Required. The resource name of the tenant under which the job is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * The parent of all of the jobs specified in `names` must match this field. Please see + * {@see JobServiceClient::tenantName()} for help formatting this field. + * @param string[] $names The names of the jobs to delete. + * + * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". + * For example, "projects/foo/tenants/bar/jobs/baz". + * + * A maximum of 200 jobs can be deleted in a batch. + * + * @return \Google\Cloud\Talent\V4\BatchDeleteJobsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * The parent of all of the jobs specified in `names` must match this field. + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * The names of the jobs to delete. + * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". + * For example, "projects/foo/tenants/bar/jobs/baz". + * A maximum of 200 jobs can be deleted in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * The parent of all of the jobs specified in `names` must match this field. + * + * 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 tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * The parent of all of the jobs specified in `names` must match this field. + * + * 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 names of the jobs to delete. + * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". + * For example, "projects/foo/tenants/bar/jobs/baz". + * A maximum of 200 jobs can be deleted in a batch. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * The names of the jobs to delete. + * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". + * For example, "projects/foo/tenants/bar/jobs/baz". + * A maximum of 200 jobs can be deleted in a batch. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php new file mode 100644 index 000000000000..c69a951344a6 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php @@ -0,0 +1,75 @@ +google.cloud.talent.v4.BatchDeleteJobsResponse + */ +class BatchDeleteJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of job mutation results from a batch delete operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + private $job_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $job_results + * List of job mutation results from a batch delete operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * List of job mutation results from a batch delete operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobResults() + { + return $this->job_results; + } + + /** + * List of job mutation results from a batch delete operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + * @param array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\JobResult::class); + $this->job_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php new file mode 100644 index 000000000000..dd7b37355530 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php @@ -0,0 +1,353 @@ +google.cloud.talent.v4.BatchOperationMetadata + */ +class BatchOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of a long running operation. + * + * Generated from protobuf field .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * More detailed information about operation state. + * + * Generated from protobuf field string state_description = 2; + */ + protected $state_description = ''; + /** + * Count of successful item(s) inside an operation. + * + * Generated from protobuf field int32 success_count = 3; + */ + protected $success_count = 0; + /** + * Count of failed item(s) inside an operation. + * + * Generated from protobuf field int32 failure_count = 4; + */ + protected $failure_count = 0; + /** + * Count of total item(s) inside an operation. + * + * Generated from protobuf field int32 total_count = 5; + */ + protected $total_count = 0; + /** + * The time when the batch operation is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + */ + protected $create_time = null; + /** + * The time when the batch operation status is updated. The metadata and the + * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is + * refreshed every minute otherwise cached data is returned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + */ + protected $update_time = null; + /** + * The time when the batch operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to `true`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of a long running operation. + * @type string $state_description + * More detailed information about operation state. + * @type int $success_count + * Count of successful item(s) inside an operation. + * @type int $failure_count + * Count of failed item(s) inside an operation. + * @type int $total_count + * Count of total item(s) inside an operation. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the batch operation is created. + * @type \Google\Protobuf\Timestamp $update_time + * The time when the batch operation status is updated. The metadata and the + * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is + * refreshed every minute otherwise cached data is returned. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the batch operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to `true`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * The state of a long running operation. + * + * Generated from protobuf field .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of a long running operation. + * + * Generated from protobuf field .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\BatchOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * More detailed information about operation state. + * + * Generated from protobuf field string state_description = 2; + * @return string + */ + public function getStateDescription() + { + return $this->state_description; + } + + /** + * More detailed information about operation state. + * + * Generated from protobuf field string state_description = 2; + * @param string $var + * @return $this + */ + public function setStateDescription($var) + { + GPBUtil::checkString($var, True); + $this->state_description = $var; + + return $this; + } + + /** + * Count of successful item(s) inside an operation. + * + * Generated from protobuf field int32 success_count = 3; + * @return int + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Count of successful item(s) inside an operation. + * + * Generated from protobuf field int32 success_count = 3; + * @param int $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt32($var); + $this->success_count = $var; + + return $this; + } + + /** + * Count of failed item(s) inside an operation. + * + * Generated from protobuf field int32 failure_count = 4; + * @return int + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Count of failed item(s) inside an operation. + * + * Generated from protobuf field int32 failure_count = 4; + * @param int $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt32($var); + $this->failure_count = $var; + + return $this; + } + + /** + * Count of total item(s) inside an operation. + * + * Generated from protobuf field int32 total_count = 5; + * @return int + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Count of total item(s) inside an operation. + * + * Generated from protobuf field int32 total_count = 5; + * @param int $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt32($var); + $this->total_count = $var; + + return $this; + } + + /** + * The time when the batch operation is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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 time when the batch operation is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time when the batch operation status is updated. The metadata and the + * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is + * refreshed every minute otherwise cached data is returned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + * @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 time when the batch operation status is updated. The metadata and the + * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is + * refreshed every minute otherwise cached data is returned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; + * @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 time when the batch operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to `true`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8; + * @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 when the batch operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to `true`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8; + * @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/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php new file mode 100644 index 000000000000..cbae45c231d6 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php @@ -0,0 +1,96 @@ +google.cloud.talent.v4.BatchOperationMetadata.State + */ +class State +{ + /** + * Default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The batch operation is being prepared for processing. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * The batch operation is actively being processed. + * + * Generated from protobuf enum PROCESSING = 2; + */ + const PROCESSING = 2; + /** + * The batch operation is processed, and at least one item has been + * successfully processed. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The batch operation is done and no item has been successfully processed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The batch operation is in the process of cancelling after + * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + * is called. + * + * Generated from protobuf enum CANCELLING = 5; + */ + const CANCELLING = 5; + /** + * The batch operation is done after + * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] + * is called. Any items processed before cancelling are returned in the + * response. + * + * Generated from protobuf enum CANCELLED = 6; + */ + const CANCELLED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::INITIALIZING => 'INITIALIZING', + self::PROCESSING => 'PROCESSING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Talent\V4\BatchOperationMetadata_State::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php new file mode 100644 index 000000000000..b97257b42cc8 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php @@ -0,0 +1,225 @@ +google.cloud.talent.v4.BatchUpdateJobsRequest + */ +class BatchUpdateJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The jobs to be updated. + * A maximum of 200 jobs can be updated in a batch. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $jobs; + /** + * Strongly recommended for the best service experience. Be aware that it will + * also increase latency when checking the status of a batch operation. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] + * are updated. Otherwise all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, The [Job][google.cloud.talent.v4.Job] inside + * [JobResult][JobOperationResult.JobResult] + * will only contains fields that is updated, plus the Id of the Job. + * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, + * which can yield a very large response. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param string $parent Required. The resource name of the tenant under which the job is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". Please see + * {@see JobServiceClient::tenantName()} for help formatting this field. + * @param \Google\Cloud\Talent\V4\Job[] $jobs Required. The jobs to be updated. + * A maximum of 200 jobs can be updated in a batch. + * + * @return \Google\Cloud\Talent\V4\BatchUpdateJobsRequest + * + * @experimental + */ + public static function build(string $parent, array $jobs): self + { + return (new self()) + ->setParent($parent) + ->setJobs($jobs); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @type array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * Required. The jobs to be updated. + * A maximum of 200 jobs can be updated in a batch. + * @type \Google\Protobuf\FieldMask $update_mask + * Strongly recommended for the best service experience. Be aware that it will + * also increase latency when checking the status of a batch operation. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] + * are updated. Otherwise all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, The [Job][google.cloud.talent.v4.Job] inside + * [JobResult][JobOperationResult.JobResult] + * will only contains fields that is updated, plus the Id of the Job. + * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, + * which can yield a very large response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 jobs to be updated. + * A maximum of 200 jobs can be updated in a batch. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Required. The jobs to be updated. + * A maximum of 200 jobs can be updated in a batch. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * Strongly recommended for the best service experience. Be aware that it will + * also increase latency when checking the status of a batch operation. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] + * are updated. Otherwise all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, The [Job][google.cloud.talent.v4.Job] inside + * [JobResult][JobOperationResult.JobResult] + * will only contains fields that is updated, plus the Id of the Job. + * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, + * which can yield a very large response. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @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); + } + + /** + * Strongly recommended for the best service experience. Be aware that it will + * also increase latency when checking the status of a batch operation. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] + * are updated. Otherwise all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] + * is provided, The [Job][google.cloud.talent.v4.Job] inside + * [JobResult][JobOperationResult.JobResult] + * will only contains fields that is updated, plus the Id of the Job. + * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, + * which can yield a very large response. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @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/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php new file mode 100644 index 000000000000..98e15dc91515 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php @@ -0,0 +1,75 @@ +google.cloud.talent.v4.BatchUpdateJobsResponse + */ +class BatchUpdateJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of job mutation results from a batch update operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + */ + private $job_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $job_results + * List of job mutation results from a batch update operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * List of job mutation results from a batch update operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobResults() + { + return $this->job_results; + } + + /** + * List of job mutation results from a batch update operation. It can change + * until operation status is FINISHED, FAILED or CANCELLED. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; + * @param array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\JobResult::class); + $this->job_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php new file mode 100644 index 000000000000..51a941ee0c4e --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php @@ -0,0 +1,240 @@ +google.cloud.talent.v4.ClientEvent + */ +class ClientEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Strongly recommended for the best service experience. + * A unique ID generated in the API responses. It can be found in + * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. + * + * Generated from protobuf field string request_id = 1; + */ + protected $request_id = ''; + /** + * Required. A unique identifier, generated by the client application. + * + * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_id = ''; + /** + * Required. The timestamp of the event. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $create_time = null; + /** + * Notes about the event provided by recruiters or other users, for example, + * feedback on why a job was bookmarked. + * + * Generated from protobuf field string event_notes = 9; + */ + protected $event_notes = ''; + protected $event; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $request_id + * Strongly recommended for the best service experience. + * A unique ID generated in the API responses. It can be found in + * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. + * @type string $event_id + * Required. A unique identifier, generated by the client application. + * @type \Google\Protobuf\Timestamp $create_time + * Required. The timestamp of the event. + * @type \Google\Cloud\Talent\V4\JobEvent $job_event + * An event issued when a job seeker interacts with the application that + * implements Cloud Talent Solution. + * @type string $event_notes + * Notes about the event provided by recruiters or other users, for example, + * feedback on why a job was bookmarked. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Event::initOnce(); + parent::__construct($data); + } + + /** + * Strongly recommended for the best service experience. + * A unique ID generated in the API responses. It can be found in + * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. + * + * Generated from protobuf field string request_id = 1; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Strongly recommended for the best service experience. + * A unique ID generated in the API responses. It can be found in + * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. + * + * Generated from protobuf field string request_id = 1; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Required. A unique identifier, generated by the client application. + * + * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * Required. A unique identifier, generated by the client application. + * + * 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 timestamp of the event. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The timestamp of the event. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * An event issued when a job seeker interacts with the application that + * implements Cloud Talent Solution. + * + * Generated from protobuf field .google.cloud.talent.v4.JobEvent job_event = 5; + * @return \Google\Cloud\Talent\V4\JobEvent|null + */ + public function getJobEvent() + { + return $this->readOneof(5); + } + + public function hasJobEvent() + { + return $this->hasOneof(5); + } + + /** + * An event issued when a job seeker interacts with the application that + * implements Cloud Talent Solution. + * + * Generated from protobuf field .google.cloud.talent.v4.JobEvent job_event = 5; + * @param \Google\Cloud\Talent\V4\JobEvent $var + * @return $this + */ + public function setJobEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\JobEvent::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Notes about the event provided by recruiters or other users, for example, + * feedback on why a job was bookmarked. + * + * Generated from protobuf field string event_notes = 9; + * @return string + */ + public function getEventNotes() + { + return $this->event_notes; + } + + /** + * Notes about the event provided by recruiters or other users, for example, + * feedback on why a job was bookmarked. + * + * Generated from protobuf field string event_notes = 9; + * @param string $var + * @return $this + */ + public function setEventNotes($var) + { + GPBUtil::checkString($var, True); + $this->event_notes = $var; + + return $this; + } + + /** + * @return string + */ + public function getEvent() + { + return $this->whichOneof("event"); + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php new file mode 100644 index 000000000000..1837c9ce90ac --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php @@ -0,0 +1,294 @@ +google.cloud.talent.v4.CommuteFilter + */ +class CommuteFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The method of transportation to calculate the commute time for. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $commute_method = 0; + /** + * Required. The latitude and longitude of the location to calculate the + * commute time from. + * + * Generated from protobuf field .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_coordinates = null; + /** + * Required. The maximum travel time in seconds. The maximum allowed value is + * `3600s` (one hour). Format is `123s`. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $travel_duration = null; + /** + * If `true`, jobs without street level addresses may also be returned. + * For city level addresses, the city center is used. For state and coarser + * level addresses, text matching is used. + * If this field is set to `false` or isn't specified, only jobs that include + * street level addresses will be returned by commute search. + * + * Generated from protobuf field bool allow_imprecise_addresses = 4; + */ + protected $allow_imprecise_addresses = false; + protected $traffic_option; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $commute_method + * Required. The method of transportation to calculate the commute time for. + * @type \Google\Type\LatLng $start_coordinates + * Required. The latitude and longitude of the location to calculate the + * commute time from. + * @type \Google\Protobuf\Duration $travel_duration + * Required. The maximum travel time in seconds. The maximum allowed value is + * `3600s` (one hour). Format is `123s`. + * @type bool $allow_imprecise_addresses + * If `true`, jobs without street level addresses may also be returned. + * For city level addresses, the city center is used. For state and coarser + * level addresses, text matching is used. + * If this field is set to `false` or isn't specified, only jobs that include + * street level addresses will be returned by commute search. + * @type int $road_traffic + * Specifies the traffic density to use when calculating commute time. + * @type \Google\Type\TimeOfDay $departure_time + * The departure time used to calculate traffic impact, represented as + * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. + * Currently traffic model is restricted to hour level resolution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); + parent::__construct($data); + } + + /** + * Required. The method of transportation to calculate the commute time for. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCommuteMethod() + { + return $this->commute_method; + } + + /** + * Required. The method of transportation to calculate the commute time for. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCommuteMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CommuteMethod::class); + $this->commute_method = $var; + + return $this; + } + + /** + * Required. The latitude and longitude of the location to calculate the + * commute time from. + * + * Generated from protobuf field .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\LatLng|null + */ + public function getStartCoordinates() + { + return $this->start_coordinates; + } + + public function hasStartCoordinates() + { + return isset($this->start_coordinates); + } + + public function clearStartCoordinates() + { + unset($this->start_coordinates); + } + + /** + * Required. The latitude and longitude of the location to calculate the + * commute time from. + * + * Generated from protobuf field .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setStartCoordinates($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->start_coordinates = $var; + + return $this; + } + + /** + * Required. The maximum travel time in seconds. The maximum allowed value is + * `3600s` (one hour). Format is `123s`. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Required. The maximum travel time in seconds. The maximum allowed value is + * `3600s` (one hour). Format is `123s`. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * If `true`, jobs without street level addresses may also be returned. + * For city level addresses, the city center is used. For state and coarser + * level addresses, text matching is used. + * If this field is set to `false` or isn't specified, only jobs that include + * street level addresses will be returned by commute search. + * + * Generated from protobuf field bool allow_imprecise_addresses = 4; + * @return bool + */ + public function getAllowImpreciseAddresses() + { + return $this->allow_imprecise_addresses; + } + + /** + * If `true`, jobs without street level addresses may also be returned. + * For city level addresses, the city center is used. For state and coarser + * level addresses, text matching is used. + * If this field is set to `false` or isn't specified, only jobs that include + * street level addresses will be returned by commute search. + * + * Generated from protobuf field bool allow_imprecise_addresses = 4; + * @param bool $var + * @return $this + */ + public function setAllowImpreciseAddresses($var) + { + GPBUtil::checkBool($var); + $this->allow_imprecise_addresses = $var; + + return $this; + } + + /** + * Specifies the traffic density to use when calculating commute time. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * @return int + */ + public function getRoadTraffic() + { + return $this->readOneof(5); + } + + public function hasRoadTraffic() + { + return $this->hasOneof(5); + } + + /** + * Specifies the traffic density to use when calculating commute time. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; + * @param int $var + * @return $this + */ + public function setRoadTraffic($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CommuteFilter\RoadTraffic::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The departure time used to calculate traffic impact, represented as + * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. + * Currently traffic model is restricted to hour level resolution. + * + * Generated from protobuf field .google.type.TimeOfDay departure_time = 6; + * @return \Google\Type\TimeOfDay|null + */ + public function getDepartureTime() + { + return $this->readOneof(6); + } + + public function hasDepartureTime() + { + return $this->hasOneof(6); + } + + /** + * The departure time used to calculate traffic impact, represented as + * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. + * Currently traffic model is restricted to hour level resolution. + * + * Generated from protobuf field .google.type.TimeOfDay departure_time = 6; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setDepartureTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getTrafficOption() + { + return $this->whichOneof("traffic_option"); + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php new file mode 100644 index 000000000000..d0f5360e5eb3 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php @@ -0,0 +1,64 @@ +google.cloud.talent.v4.CommuteFilter.RoadTraffic + */ +class RoadTraffic +{ + /** + * Road traffic situation isn't specified. + * + * Generated from protobuf enum ROAD_TRAFFIC_UNSPECIFIED = 0; + */ + const ROAD_TRAFFIC_UNSPECIFIED = 0; + /** + * Optimal commute time without considering any traffic impact. + * + * Generated from protobuf enum TRAFFIC_FREE = 1; + */ + const TRAFFIC_FREE = 1; + /** + * Commute time calculation takes in account the peak traffic impact. + * + * Generated from protobuf enum BUSY_HOUR = 2; + */ + const BUSY_HOUR = 2; + + private static $valueToName = [ + self::ROAD_TRAFFIC_UNSPECIFIED => 'ROAD_TRAFFIC_UNSPECIFIED', + self::TRAFFIC_FREE => 'TRAFFIC_FREE', + self::BUSY_HOUR => 'BUSY_HOUR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RoadTraffic::class, \Google\Cloud\Talent\V4\CommuteFilter_RoadTraffic::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php new file mode 100644 index 000000000000..3cfc0c904de1 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php @@ -0,0 +1,85 @@ +google.cloud.talent.v4.CommuteMethod + */ +class CommuteMethod +{ + /** + * Commute method isn't specified. + * + * Generated from protobuf enum COMMUTE_METHOD_UNSPECIFIED = 0; + */ + const COMMUTE_METHOD_UNSPECIFIED = 0; + /** + * Commute time is calculated based on driving time. + * + * Generated from protobuf enum DRIVING = 1; + */ + const DRIVING = 1; + /** + * Commute time is calculated based on public transit including bus, metro, + * subway, and so on. + * + * Generated from protobuf enum TRANSIT = 2; + */ + const TRANSIT = 2; + /** + * Commute time is calculated based on walking time. + * + * Generated from protobuf enum WALKING = 3; + */ + const WALKING = 3; + /** + * Commute time is calculated based on biking time. + * + * Generated from protobuf enum CYCLING = 4; + */ + const CYCLING = 4; + /** + * Commute time is calculated based on public transit that is wheelchair + * accessible. + * + * Generated from protobuf enum TRANSIT_ACCESSIBLE = 5; + */ + const TRANSIT_ACCESSIBLE = 5; + + private static $valueToName = [ + self::COMMUTE_METHOD_UNSPECIFIED => 'COMMUTE_METHOD_UNSPECIFIED', + self::DRIVING => 'DRIVING', + self::TRANSIT => 'TRANSIT', + self::WALKING => 'WALKING', + self::CYCLING => 'CYCLING', + self::TRANSIT_ACCESSIBLE => 'TRANSIT_ACCESSIBLE', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php new file mode 100644 index 000000000000..c17e8e4821df --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php @@ -0,0 +1,616 @@ +google.cloud.talent.v4.Company + */ +class Company extends \Google\Protobuf\Internal\Message +{ + /** + * Required during company update. + * The resource name for a company. This is generated by the service when a + * company is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The display name of the company, for example, "Google LLC". + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Client side company identifier, used to uniquely identify the + * company. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_id = ''; + /** + * The employer's company size. + * + * Generated from protobuf field .google.cloud.talent.v4.CompanySize size = 4; + */ + protected $size = 0; + /** + * The street address of the company's main headquarters, which may be + * different from the job location. The service attempts + * to geolocate the provided address, and populates a more specific + * location wherever possible in + * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. + * + * Generated from protobuf field string headquarters_address = 5; + */ + protected $headquarters_address = ''; + /** + * Set to true if it is the hiring agency that post jobs for other + * employers. + * Defaults to false if not provided. + * + * Generated from protobuf field bool hiring_agency = 6; + */ + protected $hiring_agency = false; + /** + * Equal Employment Opportunity legal disclaimer text to be + * associated with all jobs, and typically to be displayed in all + * roles. + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field string eeo_text = 7; + */ + protected $eeo_text = ''; + /** + * The URI representing the company's primary web site or home page, + * for example, "https://www.google.com". + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string website_uri = 8; + */ + protected $website_uri = ''; + /** + * The URI to employer's career site or careers page on the employer's web + * site, for example, "https://careers.google.com". + * + * Generated from protobuf field string career_site_uri = 9; + */ + protected $career_site_uri = ''; + /** + * A URI that hosts the employer's company logo. + * + * Generated from protobuf field string image_uri = 10; + */ + protected $image_uri = ''; + /** + * This field is deprecated. Please set the searchability of the custom + * attribute in the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going + * forward. + * A list of keys of filterable + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], + * whose corresponding `string_values` are used in keyword searches. Jobs with + * `string_values` under these specified field keys are returned if any + * of the values match the search keyword. Custom field values with + * parenthesis, brackets and special symbols are not searchable as-is, + * and those keyword queries must be surrounded by quotes. + * + * Generated from protobuf field repeated string keyword_searchable_job_custom_attributes = 11 [deprecated = true]; + * @deprecated + */ + private $keyword_searchable_job_custom_attributes; + /** + * Output only. Derived details about the company. + * + * Generated from protobuf field .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $derived_info = null; + /** + * Output only. Indicates whether a company is flagged to be suspended from + * public availability by the service when job content appears suspicious, + * abusive, or spammy. + * + * Generated from protobuf field bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $suspended = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required during company update. + * The resource name for a company. This is generated by the service when a + * company is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * @type string $display_name + * Required. The display name of the company, for example, "Google LLC". + * @type string $external_id + * Required. Client side company identifier, used to uniquely identify the + * company. + * The maximum number of allowed characters is 255. + * @type int $size + * The employer's company size. + * @type string $headquarters_address + * The street address of the company's main headquarters, which may be + * different from the job location. The service attempts + * to geolocate the provided address, and populates a more specific + * location wherever possible in + * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. + * @type bool $hiring_agency + * Set to true if it is the hiring agency that post jobs for other + * employers. + * Defaults to false if not provided. + * @type string $eeo_text + * Equal Employment Opportunity legal disclaimer text to be + * associated with all jobs, and typically to be displayed in all + * roles. + * The maximum number of allowed characters is 500. + * @type string $website_uri + * The URI representing the company's primary web site or home page, + * for example, "https://www.google.com". + * The maximum number of allowed characters is 255. + * @type string $career_site_uri + * The URI to employer's career site or careers page on the employer's web + * site, for example, "https://careers.google.com". + * @type string $image_uri + * A URI that hosts the employer's company logo. + * @type array|\Google\Protobuf\Internal\RepeatedField $keyword_searchable_job_custom_attributes + * This field is deprecated. Please set the searchability of the custom + * attribute in the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going + * forward. + * A list of keys of filterable + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], + * whose corresponding `string_values` are used in keyword searches. Jobs with + * `string_values` under these specified field keys are returned if any + * of the values match the search keyword. Custom field values with + * parenthesis, brackets and special symbols are not searchable as-is, + * and those keyword queries must be surrounded by quotes. + * @type \Google\Cloud\Talent\V4\Company\DerivedInfo $derived_info + * Output only. Derived details about the company. + * @type bool $suspended + * Output only. Indicates whether a company is flagged to be suspended from + * public availability by the service when job content appears suspicious, + * abusive, or spammy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Company::initOnce(); + parent::__construct($data); + } + + /** + * Required during company update. + * The resource name for a company. This is generated by the service when a + * company is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required during company update. + * The resource name for a company. This is generated by the service when a + * company is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * 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 display name of the company, for example, "Google LLC". + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the company, for example, "Google LLC". + * + * 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; + } + + /** + * Required. Client side company identifier, used to uniquely identify the + * company. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Required. Client side company identifier, used to uniquely identify the + * company. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + + /** + * The employer's company size. + * + * Generated from protobuf field .google.cloud.talent.v4.CompanySize size = 4; + * @return int + */ + public function getSize() + { + return $this->size; + } + + /** + * The employer's company size. + * + * Generated from protobuf field .google.cloud.talent.v4.CompanySize size = 4; + * @param int $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompanySize::class); + $this->size = $var; + + return $this; + } + + /** + * The street address of the company's main headquarters, which may be + * different from the job location. The service attempts + * to geolocate the provided address, and populates a more specific + * location wherever possible in + * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. + * + * Generated from protobuf field string headquarters_address = 5; + * @return string + */ + public function getHeadquartersAddress() + { + return $this->headquarters_address; + } + + /** + * The street address of the company's main headquarters, which may be + * different from the job location. The service attempts + * to geolocate the provided address, and populates a more specific + * location wherever possible in + * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. + * + * Generated from protobuf field string headquarters_address = 5; + * @param string $var + * @return $this + */ + public function setHeadquartersAddress($var) + { + GPBUtil::checkString($var, True); + $this->headquarters_address = $var; + + return $this; + } + + /** + * Set to true if it is the hiring agency that post jobs for other + * employers. + * Defaults to false if not provided. + * + * Generated from protobuf field bool hiring_agency = 6; + * @return bool + */ + public function getHiringAgency() + { + return $this->hiring_agency; + } + + /** + * Set to true if it is the hiring agency that post jobs for other + * employers. + * Defaults to false if not provided. + * + * Generated from protobuf field bool hiring_agency = 6; + * @param bool $var + * @return $this + */ + public function setHiringAgency($var) + { + GPBUtil::checkBool($var); + $this->hiring_agency = $var; + + return $this; + } + + /** + * Equal Employment Opportunity legal disclaimer text to be + * associated with all jobs, and typically to be displayed in all + * roles. + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field string eeo_text = 7; + * @return string + */ + public function getEeoText() + { + return $this->eeo_text; + } + + /** + * Equal Employment Opportunity legal disclaimer text to be + * associated with all jobs, and typically to be displayed in all + * roles. + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field string eeo_text = 7; + * @param string $var + * @return $this + */ + public function setEeoText($var) + { + GPBUtil::checkString($var, True); + $this->eeo_text = $var; + + return $this; + } + + /** + * The URI representing the company's primary web site or home page, + * for example, "https://www.google.com". + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string website_uri = 8; + * @return string + */ + public function getWebsiteUri() + { + return $this->website_uri; + } + + /** + * The URI representing the company's primary web site or home page, + * for example, "https://www.google.com". + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string website_uri = 8; + * @param string $var + * @return $this + */ + public function setWebsiteUri($var) + { + GPBUtil::checkString($var, True); + $this->website_uri = $var; + + return $this; + } + + /** + * The URI to employer's career site or careers page on the employer's web + * site, for example, "https://careers.google.com". + * + * Generated from protobuf field string career_site_uri = 9; + * @return string + */ + public function getCareerSiteUri() + { + return $this->career_site_uri; + } + + /** + * The URI to employer's career site or careers page on the employer's web + * site, for example, "https://careers.google.com". + * + * Generated from protobuf field string career_site_uri = 9; + * @param string $var + * @return $this + */ + public function setCareerSiteUri($var) + { + GPBUtil::checkString($var, True); + $this->career_site_uri = $var; + + return $this; + } + + /** + * A URI that hosts the employer's company logo. + * + * Generated from protobuf field string image_uri = 10; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * A URI that hosts the employer's company logo. + * + * Generated from protobuf field string image_uri = 10; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * This field is deprecated. Please set the searchability of the custom + * attribute in the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going + * forward. + * A list of keys of filterable + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], + * whose corresponding `string_values` are used in keyword searches. Jobs with + * `string_values` under these specified field keys are returned if any + * of the values match the search keyword. Custom field values with + * parenthesis, brackets and special symbols are not searchable as-is, + * and those keyword queries must be surrounded by quotes. + * + * Generated from protobuf field repeated string keyword_searchable_job_custom_attributes = 11 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getKeywordSearchableJobCustomAttributes() + { + @trigger_error('keyword_searchable_job_custom_attributes is deprecated.', E_USER_DEPRECATED); + return $this->keyword_searchable_job_custom_attributes; + } + + /** + * This field is deprecated. Please set the searchability of the custom + * attribute in the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going + * forward. + * A list of keys of filterable + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], + * whose corresponding `string_values` are used in keyword searches. Jobs with + * `string_values` under these specified field keys are returned if any + * of the values match the search keyword. Custom field values with + * parenthesis, brackets and special symbols are not searchable as-is, + * and those keyword queries must be surrounded by quotes. + * + * Generated from protobuf field repeated string keyword_searchable_job_custom_attributes = 11 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setKeywordSearchableJobCustomAttributes($var) + { + @trigger_error('keyword_searchable_job_custom_attributes is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->keyword_searchable_job_custom_attributes = $arr; + + return $this; + } + + /** + * Output only. Derived details about the company. + * + * Generated from protobuf field .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Talent\V4\Company\DerivedInfo|null + */ + public function getDerivedInfo() + { + return $this->derived_info; + } + + public function hasDerivedInfo() + { + return isset($this->derived_info); + } + + public function clearDerivedInfo() + { + unset($this->derived_info); + } + + /** + * Output only. Derived details about the company. + * + * Generated from protobuf field .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Talent\V4\Company\DerivedInfo $var + * @return $this + */ + public function setDerivedInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Company\DerivedInfo::class); + $this->derived_info = $var; + + return $this; + } + + /** + * Output only. Indicates whether a company is flagged to be suspended from + * public availability by the service when job content appears suspicious, + * abusive, or spammy. + * + * Generated from protobuf field bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSuspended() + { + return $this->suspended; + } + + /** + * Output only. Indicates whether a company is flagged to be suspended from + * public availability by the service when job content appears suspicious, + * abusive, or spammy. + * + * Generated from protobuf field bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSuspended($var) + { + GPBUtil::checkBool($var); + $this->suspended = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php new file mode 100644 index 000000000000..1dde1b753907 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php @@ -0,0 +1,88 @@ +google.cloud.talent.v4.Company.DerivedInfo + */ +class DerivedInfo extends \Google\Protobuf\Internal\Message +{ + /** + * A structured headquarters location of the company, resolved from + * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] + * if provided. + * + * Generated from protobuf field .google.cloud.talent.v4.Location headquarters_location = 1; + */ + protected $headquarters_location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Location $headquarters_location + * A structured headquarters location of the company, resolved from + * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] + * if provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Company::initOnce(); + parent::__construct($data); + } + + /** + * A structured headquarters location of the company, resolved from + * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] + * if provided. + * + * Generated from protobuf field .google.cloud.talent.v4.Location headquarters_location = 1; + * @return \Google\Cloud\Talent\V4\Location|null + */ + public function getHeadquartersLocation() + { + return $this->headquarters_location; + } + + public function hasHeadquartersLocation() + { + return isset($this->headquarters_location); + } + + public function clearHeadquartersLocation() + { + unset($this->headquarters_location); + } + + /** + * A structured headquarters location of the company, resolved from + * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] + * if provided. + * + * Generated from protobuf field .google.cloud.talent.v4.Location headquarters_location = 1; + * @param \Google\Cloud\Talent\V4\Location $var + * @return $this + */ + public function setHeadquartersLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Location::class); + $this->headquarters_location = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DerivedInfo::class, \Google\Cloud\Talent\V4\Company_DerivedInfo::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php new file mode 100644 index 000000000000..d2e4f10c43d3 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php @@ -0,0 +1,96 @@ +google.cloud.talent.v4.CompanySize + */ +class CompanySize +{ + /** + * Default value if the size isn't specified. + * + * Generated from protobuf enum COMPANY_SIZE_UNSPECIFIED = 0; + */ + const COMPANY_SIZE_UNSPECIFIED = 0; + /** + * The company has less than 50 employees. + * + * Generated from protobuf enum MINI = 1; + */ + const MINI = 1; + /** + * The company has between 50 and 99 employees. + * + * Generated from protobuf enum SMALL = 2; + */ + const SMALL = 2; + /** + * The company has between 100 and 499 employees. + * + * Generated from protobuf enum SMEDIUM = 3; + */ + const SMEDIUM = 3; + /** + * The company has between 500 and 999 employees. + * + * Generated from protobuf enum MEDIUM = 4; + */ + const MEDIUM = 4; + /** + * The company has between 1,000 and 4,999 employees. + * + * Generated from protobuf enum BIG = 5; + */ + const BIG = 5; + /** + * The company has between 5,000 and 9,999 employees. + * + * Generated from protobuf enum BIGGER = 6; + */ + const BIGGER = 6; + /** + * The company has 10,000 or more employees. + * + * Generated from protobuf enum GIANT = 7; + */ + const GIANT = 7; + + private static $valueToName = [ + self::COMPANY_SIZE_UNSPECIFIED => 'COMPANY_SIZE_UNSPECIFIED', + self::MINI => 'MINI', + self::SMALL => 'SMALL', + self::SMEDIUM => 'SMEDIUM', + self::MEDIUM => 'MEDIUM', + self::BIG => 'BIG', + self::BIGGER => 'BIGGER', + self::GIANT => 'GIANT', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php new file mode 100644 index 000000000000..e2e1dcfd8e48 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php @@ -0,0 +1,187 @@ +google.cloud.talent.v4.CompensationFilter + */ +class CompensationFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Type of filter. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Specify desired `base compensation entry's` + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $units; + /** + * Compensation range. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + */ + protected $range = null; + /** + * If set to true, jobs with unspecified compensation range fields are + * included. + * + * Generated from protobuf field bool include_jobs_with_unspecified_compensation_range = 4; + */ + protected $include_jobs_with_unspecified_compensation_range = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. Type of filter. + * @type array|\Google\Protobuf\Internal\RepeatedField $units + * Required. Specify desired `base compensation entry's` + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. + * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $range + * Compensation range. + * @type bool $include_jobs_with_unspecified_compensation_range + * If set to true, jobs with unspecified compensation range fields are + * included. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); + parent::__construct($data); + } + + /** + * Required. Type of filter. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of filter. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompensationFilter\FilterType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Specify desired `base compensation entry's` + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnits() + { + return $this->units; + } + + /** + * Required. Specify desired `base compensation entry's` + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\CompensationInfo\CompensationUnit::class); + $this->units = $arr; + + return $this; + } + + /** + * Compensation range. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null + */ + public function getRange() + { + return $this->range; + } + + public function hasRange() + { + return isset($this->range); + } + + public function clearRange() + { + unset($this->range); + } + + /** + * Compensation range. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; + * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var + * @return $this + */ + public function setRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); + $this->range = $var; + + return $this; + } + + /** + * If set to true, jobs with unspecified compensation range fields are + * included. + * + * Generated from protobuf field bool include_jobs_with_unspecified_compensation_range = 4; + * @return bool + */ + public function getIncludeJobsWithUnspecifiedCompensationRange() + { + return $this->include_jobs_with_unspecified_compensation_range; + } + + /** + * If set to true, jobs with unspecified compensation range fields are + * included. + * + * Generated from protobuf field bool include_jobs_with_unspecified_compensation_range = 4; + * @param bool $var + * @return $this + */ + public function setIncludeJobsWithUnspecifiedCompensationRange($var) + { + GPBUtil::checkBool($var); + $this->include_jobs_with_unspecified_compensation_range = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php new file mode 100644 index 000000000000..25b0d592143e --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php @@ -0,0 +1,101 @@ +google.cloud.talent.v4.CompensationFilter.FilterType + */ +class FilterType +{ + /** + * Filter type unspecified. Position holder, INVALID, should never be used. + * + * Generated from protobuf enum FILTER_TYPE_UNSPECIFIED = 0; + */ + const FILTER_TYPE_UNSPECIFIED = 0; + /** + * Filter by `base compensation entry's` unit. A job is a match if and + * only if the job contains a base CompensationEntry and the base + * CompensationEntry's unit matches provided + * [units][google.cloud.talent.v4.CompensationFilter.units]. Populate one or + * more [units][google.cloud.talent.v4.CompensationFilter.units]. + * See + * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for definition of base compensation entry. + * + * Generated from protobuf enum UNIT_ONLY = 1; + */ + const UNIT_ONLY = 1; + /** + * Filter by `base compensation entry's` unit and amount / range. A job + * is a match if and only if the job contains a base CompensationEntry, and + * the base entry's unit matches provided + * [CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] + * and amount or range overlaps with provided + * [CompensationRange][google.cloud.talent.v4.CompensationInfo.CompensationRange]. + * See + * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for definition of base compensation entry. + * Set exactly one [units][google.cloud.talent.v4.CompensationFilter.units] + * and populate [range][google.cloud.talent.v4.CompensationFilter.range]. + * + * Generated from protobuf enum UNIT_AND_AMOUNT = 2; + */ + const UNIT_AND_AMOUNT = 2; + /** + * Filter by annualized base compensation amount and `base compensation + * entry's` unit. Populate + * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more + * [units][google.cloud.talent.v4.CompensationFilter.units]. + * + * Generated from protobuf enum ANNUALIZED_BASE_AMOUNT = 3; + */ + const ANNUALIZED_BASE_AMOUNT = 3; + /** + * Filter by annualized total compensation amount and `base compensation + * entry's` unit . Populate + * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more + * [units][google.cloud.talent.v4.CompensationFilter.units]. + * + * Generated from protobuf enum ANNUALIZED_TOTAL_AMOUNT = 4; + */ + const ANNUALIZED_TOTAL_AMOUNT = 4; + + private static $valueToName = [ + self::FILTER_TYPE_UNSPECIFIED => 'FILTER_TYPE_UNSPECIFIED', + self::UNIT_ONLY => 'UNIT_ONLY', + self::UNIT_AND_AMOUNT => 'UNIT_AND_AMOUNT', + self::ANNUALIZED_BASE_AMOUNT => 'ANNUALIZED_BASE_AMOUNT', + self::ANNUALIZED_TOTAL_AMOUNT => 'ANNUALIZED_TOTAL_AMOUNT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FilterType::class, \Google\Cloud\Talent\V4\CompensationFilter_FilterType::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php new file mode 100644 index 000000000000..53a727ac8e98 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php @@ -0,0 +1,223 @@ +google.cloud.talent.v4.CompensationInfo + */ +class CompensationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Job compensation information. + * At most one entry can be of type + * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], + * which is referred as **base compensation entry** for the job. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + */ + private $entries; + /** + * Output only. Annualized base compensation range. Computed as base + * compensation entry's + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $annualized_base_compensation_range = null; + /** + * Output only. Annualized total compensation range. Computed as all + * compensation entries' + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $annualized_total_compensation_range = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\CompensationInfo\CompensationEntry>|\Google\Protobuf\Internal\RepeatedField $entries + * Job compensation information. + * At most one entry can be of type + * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], + * which is referred as **base compensation entry** for the job. + * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $annualized_base_compensation_range + * Output only. Annualized base compensation range. Computed as base + * compensation entry's + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $annualized_total_compensation_range + * Output only. Annualized total compensation range. Computed as all + * compensation entries' + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Job compensation information. + * At most one entry can be of type + * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], + * which is referred as **base compensation entry** for the job. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Job compensation information. + * At most one entry can be of type + * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], + * which is referred as **base compensation entry** for the job. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; + * @param array<\Google\Cloud\Talent\V4\CompensationInfo\CompensationEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\CompensationInfo\CompensationEntry::class); + $this->entries = $arr; + + return $this; + } + + /** + * Output only. Annualized base compensation range. Computed as base + * compensation entry's + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null + */ + public function getAnnualizedBaseCompensationRange() + { + return $this->annualized_base_compensation_range; + } + + public function hasAnnualizedBaseCompensationRange() + { + return isset($this->annualized_base_compensation_range); + } + + public function clearAnnualizedBaseCompensationRange() + { + unset($this->annualized_base_compensation_range); + } + + /** + * Output only. Annualized base compensation range. Computed as base + * compensation entry's + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var + * @return $this + */ + public function setAnnualizedBaseCompensationRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); + $this->annualized_base_compensation_range = $var; + + return $this; + } + + /** + * Output only. Annualized total compensation range. Computed as all + * compensation entries' + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null + */ + public function getAnnualizedTotalCompensationRange() + { + return $this->annualized_total_compensation_range; + } + + public function hasAnnualizedTotalCompensationRange() + { + return isset($this->annualized_total_compensation_range); + } + + public function clearAnnualizedTotalCompensationRange() + { + unset($this->annualized_total_compensation_range); + } + + /** + * Output only. Annualized total compensation range. Computed as all + * compensation entries' + * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] + * times + * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. + * See + * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] + * for explanation on compensation annualization. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var + * @return $this + */ + public function setAnnualizedTotalCompensationRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); + $this->annualized_total_compensation_range = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php new file mode 100644 index 000000000000..98876afebecc --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php @@ -0,0 +1,376 @@ +google.cloud.talent.v4.CompensationInfo.CompensationEntry + */ +class CompensationEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Compensation type. + * Default is + * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + */ + protected $type = 0; + /** + * Frequency of the specified amount. + * Default is + * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + */ + protected $unit = 0; + /** + * Compensation description. For example, could + * indicate equity terms or provide additional context to an estimated + * bonus. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Expected number of units paid each year. If not specified, when + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + * FULLTIME, a default value is inferred based on + * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + * Default values: + * - HOURLY: 2080 + * - DAILY: 260 + * - WEEKLY: 52 + * - MONTHLY: 12 + * - ANNUAL: 1 + * + * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; + */ + protected $expected_units_per_year = null; + protected $compensation_amount; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Compensation type. + * Default is + * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + * @type int $unit + * Frequency of the specified amount. + * Default is + * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. + * @type \Google\Type\Money $amount + * Compensation amount. + * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $range + * Compensation range. + * @type string $description + * Compensation description. For example, could + * indicate equity terms or provide additional context to an estimated + * bonus. + * @type \Google\Protobuf\DoubleValue $expected_units_per_year + * Expected number of units paid each year. If not specified, when + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + * FULLTIME, a default value is inferred based on + * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + * Default values: + * - HOURLY: 2080 + * - DAILY: 260 + * - WEEKLY: 52 + * - MONTHLY: 12 + * - ANNUAL: 1 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Compensation type. + * Default is + * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Compensation type. + * Default is + * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationType::class); + $this->type = $var; + + return $this; + } + + /** + * Frequency of the specified amount. + * Default is + * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * @return int + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Frequency of the specified amount. + * Default is + * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; + * @param int $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationUnit::class); + $this->unit = $var; + + return $this; + } + + /** + * Compensation amount. + * + * Generated from protobuf field .google.type.Money amount = 3; + * @return \Google\Type\Money|null + */ + public function getAmount() + { + return $this->readOneof(3); + } + + public function hasAmount() + { + return $this->hasOneof(3); + } + + /** + * Compensation amount. + * + * Generated from protobuf field .google.type.Money amount = 3; + * @param \Google\Type\Money $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Compensation range. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null + */ + public function getRange() + { + return $this->readOneof(4); + } + + public function hasRange() + { + return $this->hasOneof(4); + } + + /** + * Compensation range. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; + * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var + * @return $this + */ + public function setRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Compensation description. For example, could + * indicate equity terms or provide additional context to an estimated + * bonus. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Compensation description. For example, could + * indicate equity terms or provide additional context to an estimated + * bonus. + * + * 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; + } + + /** + * Expected number of units paid each year. If not specified, when + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + * FULLTIME, a default value is inferred based on + * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + * Default values: + * - HOURLY: 2080 + * - DAILY: 260 + * - WEEKLY: 52 + * - MONTHLY: 12 + * - ANNUAL: 1 + * + * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getExpectedUnitsPerYear() + { + return $this->expected_units_per_year; + } + + public function hasExpectedUnitsPerYear() + { + return isset($this->expected_units_per_year); + } + + public function clearExpectedUnitsPerYear() + { + unset($this->expected_units_per_year); + } + + /** + * Returns the unboxed value from getExpectedUnitsPerYear() + + * Expected number of units paid each year. If not specified, when + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + * FULLTIME, a default value is inferred based on + * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + * Default values: + * - HOURLY: 2080 + * - DAILY: 260 + * - WEEKLY: 52 + * - MONTHLY: 12 + * - ANNUAL: 1 + * + * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; + * @return float|null + */ + public function getExpectedUnitsPerYearUnwrapped() + { + return $this->readWrapperValue("expected_units_per_year"); + } + + /** + * Expected number of units paid each year. If not specified, when + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + * FULLTIME, a default value is inferred based on + * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + * Default values: + * - HOURLY: 2080 + * - DAILY: 260 + * - WEEKLY: 52 + * - MONTHLY: 12 + * - ANNUAL: 1 + * + * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setExpectedUnitsPerYear($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->expected_units_per_year = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Expected number of units paid each year. If not specified, when + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is + * FULLTIME, a default value is inferred based on + * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. + * Default values: + * - HOURLY: 2080 + * - DAILY: 260 + * - WEEKLY: 52 + * - MONTHLY: 12 + * - ANNUAL: 1 + * + * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; + * @param float|null $var + * @return $this + */ + public function setExpectedUnitsPerYearUnwrapped($var) + { + $this->writeWrapperValue("expected_units_per_year", $var); + return $this;} + + /** + * @return string + */ + public function getCompensationAmount() + { + return $this->whichOneof("compensation_amount"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompensationEntry::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationEntry::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php new file mode 100644 index 000000000000..55d95d721d98 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php @@ -0,0 +1,144 @@ +google.cloud.talent.v4.CompensationInfo.CompensationRange + */ +class CompensationRange extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum amount of compensation. If left empty, the value is set + * to a maximal compensation value and the currency code is set to + * match the [currency code][google.type.Money.currency_code] of + * min_compensation. + * + * Generated from protobuf field .google.type.Money max_compensation = 2; + */ + protected $max_compensation = null; + /** + * The minimum amount of compensation. If left empty, the value is set + * to zero and the currency code is set to match the + * [currency code][google.type.Money.currency_code] of max_compensation. + * + * Generated from protobuf field .google.type.Money min_compensation = 1; + */ + protected $min_compensation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Money $max_compensation + * The maximum amount of compensation. If left empty, the value is set + * to a maximal compensation value and the currency code is set to + * match the [currency code][google.type.Money.currency_code] of + * min_compensation. + * @type \Google\Type\Money $min_compensation + * The minimum amount of compensation. If left empty, the value is set + * to zero and the currency code is set to match the + * [currency code][google.type.Money.currency_code] of max_compensation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * The maximum amount of compensation. If left empty, the value is set + * to a maximal compensation value and the currency code is set to + * match the [currency code][google.type.Money.currency_code] of + * min_compensation. + * + * Generated from protobuf field .google.type.Money max_compensation = 2; + * @return \Google\Type\Money|null + */ + public function getMaxCompensation() + { + return $this->max_compensation; + } + + public function hasMaxCompensation() + { + return isset($this->max_compensation); + } + + public function clearMaxCompensation() + { + unset($this->max_compensation); + } + + /** + * The maximum amount of compensation. If left empty, the value is set + * to a maximal compensation value and the currency code is set to + * match the [currency code][google.type.Money.currency_code] of + * min_compensation. + * + * Generated from protobuf field .google.type.Money max_compensation = 2; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMaxCompensation($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->max_compensation = $var; + + return $this; + } + + /** + * The minimum amount of compensation. If left empty, the value is set + * to zero and the currency code is set to match the + * [currency code][google.type.Money.currency_code] of max_compensation. + * + * Generated from protobuf field .google.type.Money min_compensation = 1; + * @return \Google\Type\Money|null + */ + public function getMinCompensation() + { + return $this->min_compensation; + } + + public function hasMinCompensation() + { + return isset($this->min_compensation); + } + + public function clearMinCompensation() + { + unset($this->min_compensation); + } + + /** + * The minimum amount of compensation. If left empty, the value is set + * to zero and the currency code is set to match the + * [currency code][google.type.Money.currency_code] of max_compensation. + * + * Generated from protobuf field .google.type.Money min_compensation = 1; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMinCompensation($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->min_compensation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompensationRange::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationRange::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php new file mode 100644 index 000000000000..07c278825c42 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php @@ -0,0 +1,132 @@ +google.cloud.talent.v4.CompensationInfo.CompensationType + */ +class CompensationType +{ + /** + * Default value. + * + * Generated from protobuf enum COMPENSATION_TYPE_UNSPECIFIED = 0; + */ + const COMPENSATION_TYPE_UNSPECIFIED = 0; + /** + * Base compensation: Refers to the fixed amount of money paid to an + * employee by an employer in return for work performed. Base compensation + * does not include benefits, bonuses or any other potential compensation + * from an employer. + * + * Generated from protobuf enum BASE = 1; + */ + const BASE = 1; + /** + * Bonus. + * + * Generated from protobuf enum BONUS = 2; + */ + const BONUS = 2; + /** + * Signing bonus. + * + * Generated from protobuf enum SIGNING_BONUS = 3; + */ + const SIGNING_BONUS = 3; + /** + * Equity. + * + * Generated from protobuf enum EQUITY = 4; + */ + const EQUITY = 4; + /** + * Profit sharing. + * + * Generated from protobuf enum PROFIT_SHARING = 5; + */ + const PROFIT_SHARING = 5; + /** + * Commission. + * + * Generated from protobuf enum COMMISSIONS = 6; + */ + const COMMISSIONS = 6; + /** + * Tips. + * + * Generated from protobuf enum TIPS = 7; + */ + const TIPS = 7; + /** + * Other compensation type. + * + * Generated from protobuf enum OTHER_COMPENSATION_TYPE = 8; + */ + const OTHER_COMPENSATION_TYPE = 8; + + private static $valueToName = [ + self::COMPENSATION_TYPE_UNSPECIFIED => 'COMPENSATION_TYPE_UNSPECIFIED', + self::BASE => 'BASE', + self::BONUS => 'BONUS', + self::SIGNING_BONUS => 'SIGNING_BONUS', + self::EQUITY => 'EQUITY', + self::PROFIT_SHARING => 'PROFIT_SHARING', + self::COMMISSIONS => 'COMMISSIONS', + self::TIPS => 'TIPS', + self::OTHER_COMPENSATION_TYPE => 'OTHER_COMPENSATION_TYPE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompensationType::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationType::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php new file mode 100644 index 000000000000..d142d9e8cd16 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php @@ -0,0 +1,99 @@ +google.cloud.talent.v4.CompensationInfo.CompensationUnit + */ +class CompensationUnit +{ + /** + * Default value. + * + * Generated from protobuf enum COMPENSATION_UNIT_UNSPECIFIED = 0; + */ + const COMPENSATION_UNIT_UNSPECIFIED = 0; + /** + * Hourly. + * + * Generated from protobuf enum HOURLY = 1; + */ + const HOURLY = 1; + /** + * Daily. + * + * Generated from protobuf enum DAILY = 2; + */ + const DAILY = 2; + /** + * Weekly + * + * Generated from protobuf enum WEEKLY = 3; + */ + const WEEKLY = 3; + /** + * Monthly. + * + * Generated from protobuf enum MONTHLY = 4; + */ + const MONTHLY = 4; + /** + * Yearly. + * + * Generated from protobuf enum YEARLY = 5; + */ + const YEARLY = 5; + /** + * One time. + * + * Generated from protobuf enum ONE_TIME = 6; + */ + const ONE_TIME = 6; + /** + * Other compensation units. + * + * Generated from protobuf enum OTHER_COMPENSATION_UNIT = 7; + */ + const OTHER_COMPENSATION_UNIT = 7; + + private static $valueToName = [ + self::COMPENSATION_UNIT_UNSPECIFIED => 'COMPENSATION_UNIT_UNSPECIFIED', + self::HOURLY => 'HOURLY', + self::DAILY => 'DAILY', + self::WEEKLY => 'WEEKLY', + self::MONTHLY => 'MONTHLY', + self::YEARLY => 'YEARLY', + self::ONE_TIME => 'ONE_TIME', + self::OTHER_COMPENSATION_UNIT => 'OTHER_COMPENSATION_UNIT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompensationUnit::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationUnit::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php new file mode 100644 index 000000000000..da12732cd46c --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php @@ -0,0 +1,323 @@ +google.cloud.talent.v4.CompleteQueryRequest + */ +class CompleteQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of tenant the completion is performed within. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $tenant = ''; + /** + * Required. The query used to generate suggestions. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * The list of languages of the query. This is + * the BCP-47 language code, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field repeated string language_codes = 3; + */ + private $language_codes; + /** + * Required. Completion result count. + * The maximum allowed page size is 10. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_size = 0; + /** + * If provided, restricts completion to specified company. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string company = 5 [(.google.api.resource_reference) = { + */ + protected $company = ''; + /** + * The scope of the completion. The defaults is + * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + */ + protected $scope = 0; + /** + * The completion topic. The default is + * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tenant + * Required. Resource name of tenant the completion is performed within. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @type string $query + * Required. The query used to generate suggestions. + * The maximum number of allowed characters is 255. + * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes + * The list of languages of the query. This is + * the BCP-47 language code, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * The maximum number of allowed characters is 255. + * @type int $page_size + * Required. Completion result count. + * The maximum allowed page size is 10. + * @type string $company + * If provided, restricts completion to specified company. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * @type int $scope + * The scope of the completion. The defaults is + * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. + * @type int $type + * The completion topic. The default is + * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of tenant the completion is performed within. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTenant() + { + return $this->tenant; + } + + /** + * Required. Resource name of tenant the completion is performed within. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTenant($var) + { + GPBUtil::checkString($var, True); + $this->tenant = $var; + + return $this; + } + + /** + * Required. The query used to generate suggestions. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The query used to generate suggestions. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The list of languages of the query. This is + * the BCP-47 language code, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field repeated string language_codes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageCodes() + { + return $this->language_codes; + } + + /** + * The list of languages of the query. This is + * the BCP-47 language code, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field repeated string language_codes = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_codes = $arr; + + return $this; + } + + /** + * Required. Completion result count. + * The maximum allowed page size is 10. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Required. Completion result count. + * The maximum allowed page size is 10. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If provided, restricts completion to specified company. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string company = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getCompany() + { + return $this->company; + } + + /** + * If provided, restricts completion to specified company. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string company = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCompany($var) + { + GPBUtil::checkString($var, True); + $this->company = $var; + + return $this; + } + + /** + * The scope of the completion. The defaults is + * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * The scope of the completion. The defaults is + * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionScope::class); + $this->scope = $var; + + return $this; + } + + /** + * The completion topic. The default is + * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The completion topic. The default is + * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php new file mode 100644 index 000000000000..397e74019856 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php @@ -0,0 +1,69 @@ +google.cloud.talent.v4.CompleteQueryRequest.CompletionScope + */ +class CompletionScope +{ + /** + * Default value. + * + * Generated from protobuf enum COMPLETION_SCOPE_UNSPECIFIED = 0; + */ + const COMPLETION_SCOPE_UNSPECIFIED = 0; + /** + * Suggestions are based only on the data provided by the client. + * + * Generated from protobuf enum TENANT = 1; + */ + const TENANT = 1; + /** + * Suggestions are based on all jobs data in the system that's visible to + * the client + * + * Generated from protobuf enum PUBLIC = 2; + */ + const PBPUBLIC = 2; + + private static $valueToName = [ + self::COMPLETION_SCOPE_UNSPECIFIED => 'COMPLETION_SCOPE_UNSPECIFIED', + self::TENANT => 'TENANT', + self::PBPUBLIC => 'PUBLIC', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompletionScope::class, \Google\Cloud\Talent\V4\CompleteQueryRequest_CompletionScope::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php new file mode 100644 index 000000000000..79b308f329a0 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php @@ -0,0 +1,88 @@ +google.cloud.talent.v4.CompleteQueryRequest.CompletionType + */ +class CompletionType +{ + /** + * Default value. + * + * Generated from protobuf enum COMPLETION_TYPE_UNSPECIFIED = 0; + */ + const COMPLETION_TYPE_UNSPECIFIED = 0; + /** + * Suggest job titles for jobs autocomplete. + * For + * [CompletionType.JOB_TITLE][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.JOB_TITLE] + * type, only open jobs with the same + * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + * are returned. + * + * Generated from protobuf enum JOB_TITLE = 1; + */ + const JOB_TITLE = 1; + /** + * Suggest company names for jobs autocomplete. + * For + * [CompletionType.COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME] + * type, only companies having open jobs with the same + * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + * are returned. + * + * Generated from protobuf enum COMPANY_NAME = 2; + */ + const COMPANY_NAME = 2; + /** + * Suggest both job titles and company names for jobs autocomplete. + * For + * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED] + * type, only open jobs with the same + * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + * or companies having open jobs with the same + * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] + * are returned. + * + * Generated from protobuf enum COMBINED = 3; + */ + const COMBINED = 3; + + private static $valueToName = [ + self::COMPLETION_TYPE_UNSPECIFIED => 'COMPLETION_TYPE_UNSPECIFIED', + self::JOB_TITLE => 'JOB_TITLE', + self::COMPANY_NAME => 'COMPANY_NAME', + self::COMBINED => 'COMBINED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompletionType::class, \Google\Cloud\Talent\V4\CompleteQueryRequest_CompletionType::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php new file mode 100644 index 000000000000..f82b0fd5713f --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php @@ -0,0 +1,115 @@ +google.cloud.talent.v4.CompleteQueryResponse + */ +class CompleteQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results of the matching job/company candidates. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + */ + private $completion_results; + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 2; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\CompleteQueryResponse\CompletionResult>|\Google\Protobuf\Internal\RepeatedField $completion_results + * Results of the matching job/company candidates. + * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata + * Additional information for the API invocation, such as the request + * tracking id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * Results of the matching job/company candidates. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompletionResults() + { + return $this->completion_results; + } + + /** + * Results of the matching job/company candidates. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; + * @param array<\Google\Cloud\Talent\V4\CompleteQueryResponse\CompletionResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompletionResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\CompleteQueryResponse\CompletionResult::class); + $this->completion_results = $arr; + + return $this; + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * @return \Google\Cloud\Talent\V4\ResponseMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 2; + * @param \Google\Cloud\Talent\V4\ResponseMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php new file mode 100644 index 000000000000..f3642f8857f9 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php @@ -0,0 +1,142 @@ +google.cloud.talent.v4.CompleteQueryResponse.CompletionResult + */ +class CompletionResult extends \Google\Protobuf\Internal\Message +{ + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + */ + protected $suggestion = ''; + /** + * The completion topic. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + */ + protected $type = 0; + /** + * The URI of the company image for + * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. + * + * Generated from protobuf field string image_uri = 3; + */ + protected $image_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $suggestion + * The suggestion for the query. + * @type int $type + * The completion topic. + * @type string $image_uri + * The URI of the company image for + * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompletionService::initOnce(); + parent::__construct($data); + } + + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + * @return string + */ + public function getSuggestion() + { + return $this->suggestion; + } + + /** + * The suggestion for the query. + * + * Generated from protobuf field string suggestion = 1; + * @param string $var + * @return $this + */ + public function setSuggestion($var) + { + GPBUtil::checkString($var, True); + $this->suggestion = $var; + + return $this; + } + + /** + * The completion topic. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The completion topic. + * + * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionType::class); + $this->type = $var; + + return $this; + } + + /** + * The URI of the company image for + * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. + * + * Generated from protobuf field string image_uri = 3; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * The URI of the company image for + * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. + * + * Generated from protobuf field string image_uri = 3; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CompletionResult::class, \Google\Cloud\Talent\V4\CompleteQueryResponse_CompletionResult::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php new file mode 100644 index 000000000000..75d74be79c23 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php @@ -0,0 +1,143 @@ +google.cloud.talent.v4.CreateClientEventRequest + */ +class CreateClientEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the tenant under which the event is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * + * Generated from protobuf field .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_event = null; + + /** + * @param string $parent Required. Resource name of the tenant under which the event is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". Please see + * {@see EventServiceClient::tenantName()} for help formatting this field. + * @param \Google\Cloud\Talent\V4\ClientEvent $clientEvent Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * + * @return \Google\Cloud\Talent\V4\CreateClientEventRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Talent\V4\ClientEvent $clientEvent): self + { + return (new self()) + ->setParent($parent) + ->setClientEvent($clientEvent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the tenant under which the event is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @type \Google\Cloud\Talent\V4\ClientEvent $client_event + * Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\EventService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the tenant under which the event is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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. Resource name of the tenant under which the event is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * + * Generated from protobuf field .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\ClientEvent|null + */ + public function getClientEvent() + { + return $this->client_event; + } + + public function hasClientEvent() + { + return isset($this->client_event); + } + + public function clearClientEvent() + { + unset($this->client_event); + } + + /** + * Required. Events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. + * + * Generated from protobuf field .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\ClientEvent $var + * @return $this + */ + public function setClientEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ClientEvent::class); + $this->client_event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php new file mode 100644 index 000000000000..f843da4a2336 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php @@ -0,0 +1,138 @@ +google.cloud.talent.v4.CreateCompanyRequest + */ +class CreateCompanyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The company to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $company = null; + + /** + * @param string $parent Required. Resource name of the tenant under which the company is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". Please see + * {@see CompanyServiceClient::tenantName()} for help formatting this field. + * @param \Google\Cloud\Talent\V4\Company $company Required. The company to be created. + * + * @return \Google\Cloud\Talent\V4\CreateCompanyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Talent\V4\Company $company): self + { + return (new self()) + ->setParent($parent) + ->setCompany($company); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @type \Google\Cloud\Talent\V4\Company $company + * Required. The company to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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 company to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\Company|null + */ + public function getCompany() + { + return $this->company; + } + + public function hasCompany() + { + return isset($this->company); + } + + public function clearCompany() + { + unset($this->company); + } + + /** + * Required. The company to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\Company $var + * @return $this + */ + public function setCompany($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Company::class); + $this->company = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php new file mode 100644 index 000000000000..b5d113855c86 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php @@ -0,0 +1,138 @@ +google.cloud.talent.v4.CreateJobRequest + */ +class CreateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Job to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + + /** + * @param string $parent Required. The resource name of the tenant under which the job is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". Please see + * {@see JobServiceClient::tenantName()} for help formatting this field. + * @param \Google\Cloud\Talent\V4\Job $job Required. The Job to be created. + * + * @return \Google\Cloud\Talent\V4\CreateJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Talent\V4\Job $job): self + { + return (new self()) + ->setParent($parent) + ->setJob($job); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @type \Google\Cloud\Talent\V4\Job $job + * Required. The Job to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 Job to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. The Job to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); + $this->job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php new file mode 100644 index 000000000000..961b03af6f54 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php @@ -0,0 +1,138 @@ +google.cloud.talent.v4.CreateTenantRequest + */ +class CreateTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The tenant to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant = null; + + /** + * @param string $parent Required. Resource name of the project under which the tenant is created. + * + * The format is "projects/{project_id}", for example, + * "projects/foo". Please see + * {@see TenantServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Talent\V4\Tenant $tenant Required. The tenant to be created. + * + * @return \Google\Cloud\Talent\V4\CreateTenantRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Talent\V4\Tenant $tenant): self + { + return (new self()) + ->setParent($parent) + ->setTenant($tenant); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * @type \Google\Cloud\Talent\V4\Tenant $tenant + * Required. The tenant to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * + * 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. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * + * 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 tenant to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\Tenant|null + */ + public function getTenant() + { + return $this->tenant; + } + + public function hasTenant() + { + return isset($this->tenant); + } + + public function clearTenant() + { + unset($this->tenant); + } + + /** + * Required. The tenant to be created. + * + * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\Tenant $var + * @return $this + */ + public function setTenant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Tenant::class); + $this->tenant = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php new file mode 100644 index 000000000000..4075404048e6 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php @@ -0,0 +1,269 @@ +google.cloud.talent.v4.CustomAttribute + */ +class CustomAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or + * `CASE_INSENSITIVE_MATCH`) search. + * For filterable `string_value`s, a maximum total number of 200 values + * is allowed, with each `string_value` has a byte size of no more than + * 500B. For unfilterable `string_values`, the maximum total byte size of + * unfilterable `string_values` is 50KB. + * Empty string isn't allowed. + * + * Generated from protobuf field repeated string string_values = 1; + */ + private $string_values; + /** + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform number range search. + * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. + * Currently at most 1 + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is + * supported. + * + * Generated from protobuf field repeated int64 long_values = 2; + */ + private $long_values; + /** + * If the `filterable` flag is true, the custom field values may be used for + * custom attribute filters + * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. + * If false, these values may not be used for custom attribute filters. + * Default is false. + * + * Generated from protobuf field bool filterable = 3; + */ + protected $filterable = false; + /** + * If the `keyword_searchable` flag is true, the keywords in custom fields are + * searchable by keyword match. + * If false, the values are not searchable by keyword match. + * Default is false. + * + * Generated from protobuf field bool keyword_searchable = 4; + */ + protected $keyword_searchable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $string_values + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or + * `CASE_INSENSITIVE_MATCH`) search. + * For filterable `string_value`s, a maximum total number of 200 values + * is allowed, with each `string_value` has a byte size of no more than + * 500B. For unfilterable `string_values`, the maximum total byte size of + * unfilterable `string_values` is 50KB. + * Empty string isn't allowed. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $long_values + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform number range search. + * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. + * Currently at most 1 + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is + * supported. + * @type bool $filterable + * If the `filterable` flag is true, the custom field values may be used for + * custom attribute filters + * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. + * If false, these values may not be used for custom attribute filters. + * Default is false. + * @type bool $keyword_searchable + * If the `keyword_searchable` flag is true, the keywords in custom fields are + * searchable by keyword match. + * If false, the values are not searchable by keyword match. + * Default is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or + * `CASE_INSENSITIVE_MATCH`) search. + * For filterable `string_value`s, a maximum total number of 200 values + * is allowed, with each `string_value` has a byte size of no more than + * 500B. For unfilterable `string_values`, the maximum total byte size of + * unfilterable `string_values` is 50KB. + * Empty string isn't allowed. + * + * Generated from protobuf field repeated string string_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStringValues() + { + return $this->string_values; + } + + /** + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or + * `CASE_INSENSITIVE_MATCH`) search. + * For filterable `string_value`s, a maximum total number of 200 values + * is allowed, with each `string_value` has a byte size of no more than + * 500B. For unfilterable `string_values`, the maximum total byte size of + * unfilterable `string_values` is 50KB. + * Empty string isn't allowed. + * + * Generated from protobuf field repeated string string_values = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStringValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->string_values = $arr; + + return $this; + } + + /** + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform number range search. + * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. + * Currently at most 1 + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is + * supported. + * + * Generated from protobuf field repeated int64 long_values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLongValues() + { + return $this->long_values; + } + + /** + * Exactly one of + * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be + * specified. + * This field is used to perform number range search. + * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. + * Currently at most 1 + * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is + * supported. + * + * Generated from protobuf field repeated int64 long_values = 2; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLongValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->long_values = $arr; + + return $this; + } + + /** + * If the `filterable` flag is true, the custom field values may be used for + * custom attribute filters + * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. + * If false, these values may not be used for custom attribute filters. + * Default is false. + * + * Generated from protobuf field bool filterable = 3; + * @return bool + */ + public function getFilterable() + { + return $this->filterable; + } + + /** + * If the `filterable` flag is true, the custom field values may be used for + * custom attribute filters + * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. + * If false, these values may not be used for custom attribute filters. + * Default is false. + * + * Generated from protobuf field bool filterable = 3; + * @param bool $var + * @return $this + */ + public function setFilterable($var) + { + GPBUtil::checkBool($var); + $this->filterable = $var; + + return $this; + } + + /** + * If the `keyword_searchable` flag is true, the keywords in custom fields are + * searchable by keyword match. + * If false, the values are not searchable by keyword match. + * Default is false. + * + * Generated from protobuf field bool keyword_searchable = 4; + * @return bool + */ + public function getKeywordSearchable() + { + return $this->keyword_searchable; + } + + /** + * If the `keyword_searchable` flag is true, the keywords in custom fields are + * searchable by keyword match. + * If false, the values are not searchable by keyword match. + * Default is false. + * + * Generated from protobuf field bool keyword_searchable = 4; + * @param bool $var + * @return $this + */ + public function setKeywordSearchable($var) + { + GPBUtil::checkBool($var); + $this->keyword_searchable = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php new file mode 100644 index 000000000000..c52d2d4181cf --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php @@ -0,0 +1,128 @@ +google.cloud.talent.v4.DegreeType + */ +class DegreeType +{ + /** + * Default value. Represents no degree, or early childhood education. + * Maps to ISCED code 0. + * Ex) Kindergarten + * + * Generated from protobuf enum DEGREE_TYPE_UNSPECIFIED = 0; + */ + const DEGREE_TYPE_UNSPECIFIED = 0; + /** + * Primary education which is typically the first stage of compulsory + * education. ISCED code 1. + * Ex) Elementary school + * + * Generated from protobuf enum PRIMARY_EDUCATION = 1; + */ + const PRIMARY_EDUCATION = 1; + /** + * Lower secondary education; First stage of secondary education building on + * primary education, typically with a more subject-oriented curriculum. + * ISCED code 2. + * Ex) Middle school + * + * Generated from protobuf enum LOWER_SECONDARY_EDUCATION = 2; + */ + const LOWER_SECONDARY_EDUCATION = 2; + /** + * Middle education; Second/final stage of secondary education preparing for + * tertiary education and/or providing skills relevant to employment. + * Usually with an increased range of subject options and streams. ISCED + * code 3. + * Ex) High school + * + * Generated from protobuf enum UPPER_SECONDARY_EDUCATION = 3; + */ + const UPPER_SECONDARY_EDUCATION = 3; + /** + * Adult Remedial Education; Programmes providing learning experiences that + * build on secondary education and prepare for labour market entry and/or + * tertiary education. The content is broader than secondary but not as + * complex as tertiary education. ISCED code 4. + * + * Generated from protobuf enum ADULT_REMEDIAL_EDUCATION = 4; + */ + const ADULT_REMEDIAL_EDUCATION = 4; + /** + * Associate's or equivalent; Short first tertiary programmes that are + * typically practically-based, occupationally-specific and prepare for + * labour market entry. These programmes may also provide a pathway to other + * tertiary programmes. ISCED code 5. + * + * Generated from protobuf enum ASSOCIATES_OR_EQUIVALENT = 5; + */ + const ASSOCIATES_OR_EQUIVALENT = 5; + /** + * Bachelor's or equivalent; Programmes designed to provide intermediate + * academic and/or professional knowledge, skills and competencies leading + * to a first tertiary degree or equivalent qualification. ISCED code 6. + * + * Generated from protobuf enum BACHELORS_OR_EQUIVALENT = 6; + */ + const BACHELORS_OR_EQUIVALENT = 6; + /** + * Master's or equivalent; Programmes designed to provide advanced academic + * and/or professional knowledge, skills and competencies leading to a + * second tertiary degree or equivalent qualification. ISCED code 7. + * + * Generated from protobuf enum MASTERS_OR_EQUIVALENT = 7; + */ + const MASTERS_OR_EQUIVALENT = 7; + /** + * Doctoral or equivalent; Programmes designed primarily to lead to an + * advanced research qualification, usually concluding with the submission + * and defense of a substantive dissertation of publishable quality based on + * original research. ISCED code 8. + * + * Generated from protobuf enum DOCTORAL_OR_EQUIVALENT = 8; + */ + const DOCTORAL_OR_EQUIVALENT = 8; + + private static $valueToName = [ + self::DEGREE_TYPE_UNSPECIFIED => 'DEGREE_TYPE_UNSPECIFIED', + self::PRIMARY_EDUCATION => 'PRIMARY_EDUCATION', + self::LOWER_SECONDARY_EDUCATION => 'LOWER_SECONDARY_EDUCATION', + self::UPPER_SECONDARY_EDUCATION => 'UPPER_SECONDARY_EDUCATION', + self::ADULT_REMEDIAL_EDUCATION => 'ADULT_REMEDIAL_EDUCATION', + self::ASSOCIATES_OR_EQUIVALENT => 'ASSOCIATES_OR_EQUIVALENT', + self::BACHELORS_OR_EQUIVALENT => 'BACHELORS_OR_EQUIVALENT', + self::MASTERS_OR_EQUIVALENT => 'MASTERS_OR_EQUIVALENT', + self::DOCTORAL_OR_EQUIVALENT => 'DOCTORAL_OR_EQUIVALENT', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php new file mode 100644 index 000000000000..bd5bf168ba50 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php @@ -0,0 +1,97 @@ +google.cloud.talent.v4.DeleteCompanyRequest + */ +class DeleteCompanyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the company to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * 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 company to be deleted. + * + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". Please see + * {@see CompanyServiceClient::companyName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\DeleteCompanyRequest + * + * @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 company to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the company to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * 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 company to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/foo/tenants/bar/companies/baz". + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php new file mode 100644 index 000000000000..ea0db2c4740f --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php @@ -0,0 +1,97 @@ +google.cloud.talent.v4.DeleteJobRequest + */ +class DeleteJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the job to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * + * 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 job to be deleted. + * + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". Please see + * {@see JobServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\DeleteJobRequest + * + * @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 job to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the job to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * + * 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 job to be deleted. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php new file mode 100644 index 000000000000..0d9ae5301184 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php @@ -0,0 +1,92 @@ +google.cloud.talent.v4.DeleteTenantRequest + */ +class DeleteTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant to be deleted. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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 tenant to be deleted. + * + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". Please see + * {@see TenantServiceClient::tenantName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\DeleteTenantRequest + * + * @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 tenant to be deleted. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant to be deleted. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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 tenant to be deleted. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php new file mode 100644 index 000000000000..4f6270525d02 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php @@ -0,0 +1,107 @@ +google.cloud.talent.v4.DeviceInfo + */ +class DeviceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the device. + * + * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + */ + protected $device_type = 0; + /** + * A device-specific ID. The ID must be a unique identifier that + * distinguishes the device from other devices. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $device_type + * Type of the device. + * @type string $id + * A device-specific ID. The ID must be a unique identifier that + * distinguishes the device from other devices. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Type of the device. + * + * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * @return int + */ + public function getDeviceType() + { + return $this->device_type; + } + + /** + * Type of the device. + * + * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; + * @param int $var + * @return $this + */ + public function setDeviceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\DeviceInfo\DeviceType::class); + $this->device_type = $var; + + return $this; + } + + /** + * A device-specific ID. The ID must be a unique identifier that + * distinguishes the device from other devices. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * A device-specific ID. The ID must be a unique identifier that + * distinguishes the device from other devices. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php new file mode 100644 index 000000000000..74f96ca4569b --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php @@ -0,0 +1,95 @@ +google.cloud.talent.v4.DeviceInfo.DeviceType + */ +class DeviceType +{ + /** + * The device type isn't specified. + * + * Generated from protobuf enum DEVICE_TYPE_UNSPECIFIED = 0; + */ + const DEVICE_TYPE_UNSPECIFIED = 0; + /** + * A desktop web browser, such as, Chrome, Firefox, Safari, or Internet + * Explorer) + * + * Generated from protobuf enum WEB = 1; + */ + const WEB = 1; + /** + * A mobile device web browser, such as a phone or tablet with a Chrome + * browser. + * + * Generated from protobuf enum MOBILE_WEB = 2; + */ + const MOBILE_WEB = 2; + /** + * An Android device native application. + * + * Generated from protobuf enum ANDROID = 3; + */ + const ANDROID = 3; + /** + * An iOS device native application. + * + * Generated from protobuf enum IOS = 4; + */ + const IOS = 4; + /** + * A bot, as opposed to a device operated by human beings, such as a web + * crawler. + * + * Generated from protobuf enum BOT = 5; + */ + const BOT = 5; + /** + * Other devices types. + * + * Generated from protobuf enum OTHER = 6; + */ + const OTHER = 6; + + private static $valueToName = [ + self::DEVICE_TYPE_UNSPECIFIED => 'DEVICE_TYPE_UNSPECIFIED', + self::WEB => 'WEB', + self::MOBILE_WEB => 'MOBILE_WEB', + self::ANDROID => 'ANDROID', + self::IOS => 'IOS', + self::BOT => 'BOT', + self::OTHER => 'OTHER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeviceType::class, \Google\Cloud\Talent\V4\DeviceInfo_DeviceType::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php new file mode 100644 index 000000000000..ce6d8cb77839 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php @@ -0,0 +1,131 @@ +google.cloud.talent.v4.EmploymentType + */ +class EmploymentType +{ + /** + * The default value if the employment type isn't specified. + * + * Generated from protobuf enum EMPLOYMENT_TYPE_UNSPECIFIED = 0; + */ + const EMPLOYMENT_TYPE_UNSPECIFIED = 0; + /** + * The job requires working a number of hours that constitute full + * time employment, typically 40 or more hours per week. + * + * Generated from protobuf enum FULL_TIME = 1; + */ + const FULL_TIME = 1; + /** + * The job entails working fewer hours than a full time job, + * typically less than 40 hours a week. + * + * Generated from protobuf enum PART_TIME = 2; + */ + const PART_TIME = 2; + /** + * The job is offered as a contracted, as opposed to a salaried employee, + * position. + * + * Generated from protobuf enum CONTRACTOR = 3; + */ + const CONTRACTOR = 3; + /** + * The job is offered as a contracted position with the understanding + * that it's converted into a full-time position at the end of the + * contract. Jobs of this type are also returned by a search for + * [EmploymentType.CONTRACTOR][google.cloud.talent.v4.EmploymentType.CONTRACTOR] + * jobs. + * + * Generated from protobuf enum CONTRACT_TO_HIRE = 4; + */ + const CONTRACT_TO_HIRE = 4; + /** + * The job is offered as a temporary employment opportunity, usually + * a short-term engagement. + * + * Generated from protobuf enum TEMPORARY = 5; + */ + const TEMPORARY = 5; + /** + * The job is a fixed-term opportunity for students or entry-level job + * seekers to obtain on-the-job training, typically offered as a summer + * position. + * + * Generated from protobuf enum INTERN = 6; + */ + const INTERN = 6; + /** + * The is an opportunity for an individual to volunteer, where there's no + * expectation of compensation for the provided services. + * + * Generated from protobuf enum VOLUNTEER = 7; + */ + const VOLUNTEER = 7; + /** + * The job requires an employee to work on an as-needed basis with a + * flexible schedule. + * + * Generated from protobuf enum PER_DIEM = 8; + */ + const PER_DIEM = 8; + /** + * The job involves employing people in remote areas and flying them + * temporarily to the work site instead of relocating employees and their + * families permanently. + * + * Generated from protobuf enum FLY_IN_FLY_OUT = 9; + */ + const FLY_IN_FLY_OUT = 9; + /** + * The job does not fit any of the other listed types. + * + * Generated from protobuf enum OTHER_EMPLOYMENT_TYPE = 10; + */ + const OTHER_EMPLOYMENT_TYPE = 10; + + private static $valueToName = [ + self::EMPLOYMENT_TYPE_UNSPECIFIED => 'EMPLOYMENT_TYPE_UNSPECIFIED', + self::FULL_TIME => 'FULL_TIME', + self::PART_TIME => 'PART_TIME', + self::CONTRACTOR => 'CONTRACTOR', + self::CONTRACT_TO_HIRE => 'CONTRACT_TO_HIRE', + self::TEMPORARY => 'TEMPORARY', + self::INTERN => 'INTERN', + self::VOLUNTEER => 'VOLUNTEER', + self::PER_DIEM => 'PER_DIEM', + self::FLY_IN_FLY_OUT => 'FLY_IN_FLY_OUT', + self::OTHER_EMPLOYMENT_TYPE => 'OTHER_EMPLOYMENT_TYPE', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php new file mode 100644 index 000000000000..fe8c26682d2d --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php @@ -0,0 +1,97 @@ +google.cloud.talent.v4.GetCompanyRequest + */ +class GetCompanyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the company to be retrieved. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". + * + * 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 company to be retrieved. + * + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". Please see + * {@see CompanyServiceClient::companyName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\GetCompanyRequest + * + * @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 company to be retrieved. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the company to be retrieved. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". + * + * 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 company to be retrieved. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for + * example, "projects/api-test-project/tenants/foo/companies/bar". + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php new file mode 100644 index 000000000000..2ab7be1ad0e4 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php @@ -0,0 +1,97 @@ +google.cloud.talent.v4.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the job to retrieve. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * + * 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 job to retrieve. + * + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". Please see + * {@see JobServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\GetJobRequest + * + * @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 job to retrieve. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the job to retrieve. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * + * 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 job to retrieve. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php new file mode 100644 index 000000000000..e8abd88ee13f --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php @@ -0,0 +1,92 @@ +google.cloud.talent.v4.GetTenantRequest + */ +class GetTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant to be retrieved. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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 tenant to be retrieved. + * + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". Please see + * {@see TenantServiceClient::tenantName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\GetTenantRequest + * + * @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 tenant to be retrieved. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant to be retrieved. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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 tenant to be retrieved. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php new file mode 100644 index 000000000000..3519c85d3beb --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php @@ -0,0 +1,83 @@ +google.cloud.talent.v4.HistogramQuery + */ +class HistogramQuery extends \Google\Protobuf\Internal\Message +{ + /** + * An expression specifies a histogram request against matching jobs for + * searches. + * See + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] + * for details about syntax. + * + * Generated from protobuf field string histogram_query = 1; + */ + protected $histogram_query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $histogram_query + * An expression specifies a histogram request against matching jobs for + * searches. + * See + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] + * for details about syntax. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Histogram::initOnce(); + parent::__construct($data); + } + + /** + * An expression specifies a histogram request against matching jobs for + * searches. + * See + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] + * for details about syntax. + * + * Generated from protobuf field string histogram_query = 1; + * @return string + */ + public function getHistogramQuery() + { + return $this->histogram_query; + } + + /** + * An expression specifies a histogram request against matching jobs for + * searches. + * See + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] + * for details about syntax. + * + * Generated from protobuf field string histogram_query = 1; + * @param string $var + * @return $this + */ + public function setHistogramQuery($var) + { + GPBUtil::checkString($var, True); + $this->histogram_query = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php new file mode 100644 index 000000000000..6b47b0078c9b --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php @@ -0,0 +1,131 @@ +google.cloud.talent.v4.HistogramQueryResult + */ +class HistogramQueryResult extends \Google\Protobuf\Internal\Message +{ + /** + * Requested histogram expression. + * + * Generated from protobuf field string histogram_query = 1; + */ + protected $histogram_query = ''; + /** + * A map from the values of the facet associated with distinct values to the + * number of matching entries with corresponding value. + * The key format is: + * * (for string histogram) string values stored in the field. + * * (for named numeric bucket) name specified in `bucket()` function, like + * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + * * (for anonymous numeric bucket) range formatted as `-`, for + * example, `0-1000`, `MIN-0`, and `0-MAX`. + * + * Generated from protobuf field map histogram = 2; + */ + private $histogram; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $histogram_query + * Requested histogram expression. + * @type array|\Google\Protobuf\Internal\MapField $histogram + * A map from the values of the facet associated with distinct values to the + * number of matching entries with corresponding value. + * The key format is: + * * (for string histogram) string values stored in the field. + * * (for named numeric bucket) name specified in `bucket()` function, like + * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + * * (for anonymous numeric bucket) range formatted as `-`, for + * example, `0-1000`, `MIN-0`, and `0-MAX`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Histogram::initOnce(); + parent::__construct($data); + } + + /** + * Requested histogram expression. + * + * Generated from protobuf field string histogram_query = 1; + * @return string + */ + public function getHistogramQuery() + { + return $this->histogram_query; + } + + /** + * Requested histogram expression. + * + * Generated from protobuf field string histogram_query = 1; + * @param string $var + * @return $this + */ + public function setHistogramQuery($var) + { + GPBUtil::checkString($var, True); + $this->histogram_query = $var; + + return $this; + } + + /** + * A map from the values of the facet associated with distinct values to the + * number of matching entries with corresponding value. + * The key format is: + * * (for string histogram) string values stored in the field. + * * (for named numeric bucket) name specified in `bucket()` function, like + * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + * * (for anonymous numeric bucket) range formatted as `-`, for + * example, `0-1000`, `MIN-0`, and `0-MAX`. + * + * Generated from protobuf field map histogram = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHistogram() + { + return $this->histogram; + } + + /** + * A map from the values of the facet associated with distinct values to the + * number of matching entries with corresponding value. + * The key format is: + * * (for string histogram) string values stored in the field. + * * (for named numeric bucket) name specified in `bucket()` function, like + * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. + * * (for anonymous numeric bucket) range formatted as `-`, for + * example, `0-1000`, `MIN-0`, and `0-MAX`. + * + * Generated from protobuf field map histogram = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHistogram($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); + $this->histogram = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php new file mode 100644 index 000000000000..eedac8211001 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php @@ -0,0 +1,64 @@ +google.cloud.talent.v4.HtmlSanitization + */ +class HtmlSanitization +{ + /** + * Default value. + * + * Generated from protobuf enum HTML_SANITIZATION_UNSPECIFIED = 0; + */ + const HTML_SANITIZATION_UNSPECIFIED = 0; + /** + * Disables sanitization on HTML input. + * + * Generated from protobuf enum HTML_SANITIZATION_DISABLED = 1; + */ + const HTML_SANITIZATION_DISABLED = 1; + /** + * Sanitizes HTML input, only accepts bold, italic, ordered list, and + * unordered list markup tags. + * + * Generated from protobuf enum SIMPLE_FORMATTING_ONLY = 2; + */ + const SIMPLE_FORMATTING_ONLY = 2; + + private static $valueToName = [ + self::HTML_SANITIZATION_UNSPECIFIED => 'HTML_SANITIZATION_UNSPECIFIED', + self::HTML_SANITIZATION_DISABLED => 'HTML_SANITIZATION_DISABLED', + self::SIMPLE_FORMATTING_ONLY => 'SIMPLE_FORMATTING_ONLY', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php new file mode 100644 index 000000000000..729131b5fef1 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php @@ -0,0 +1,1765 @@ +google.cloud.talent.v4.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * Required during job update. + * The resource name for the job. This is generated by the service when a + * job is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * Use of this field in job queries and API calls is preferred over the use of + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this + * value is unique. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The resource name of the company listing the job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $company = ''; + /** + * Required. The requisition ID, also referred to as the posting ID, is + * assigned by the client to identify a job. This field is intended to be used + * by clients for client identification and tracking of postings. A job isn't + * allowed to be created if there is another job with the same + * [company][google.cloud.talent.v4.Job.name], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $requisition_id = ''; + /** + * Required. The title of the job, such as "Software Engineer" + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field string title = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $title = ''; + /** + * Required. The description of the job, which typically includes a + * multi-paragraph description of the company and related information. + * Separate fields are provided on the job object for + * [responsibilities][google.cloud.talent.v4.Job.responsibilities], + * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job + * characteristics. Use of these separate job fields is recommended. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 100,000. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $description = ''; + /** + * Strongly recommended for the best service experience. + * Location(s) where the employer is looking to hire for this job posting. + * Specifying the full street address(es) of the hiring location enables + * better API results, especially job searches by commute time. + * At most 50 locations are allowed for best search performance. If a job has + * more locations, it is suggested to split it into multiple jobs with unique + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' + * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not + * allowed. If the original + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be + * preserved, a custom field should be used for storage. It is also suggested + * to group the locations that close to each other in the same job for better + * search experience. + * Jobs with multiple addresses must have their addresses with the same + * [LocationType][] to allow location filtering to work properly. (For + * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, + * CA, USA" and "London, UK" may not have location filters applied correctly + * at search time since the first is a [LocationType.STREET_ADDRESS][] and the + * second is a [LocationType.LOCALITY][].) If a job needs to have multiple + * addresses, it is suggested to split it into multiple jobs with same + * LocationTypes. + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field repeated string addresses = 6; + */ + private $addresses; + /** + * Job application information. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + */ + protected $application_info = null; + /** + * The benefits included with the job. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + */ + private $job_benefits; + /** + * Job compensation information (a.k.a. "pay rate") i.e., the compensation + * that will paid to the employee. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + */ + protected $compensation_info = null; + /** + * A map of fields to hold both filterable and non-filterable custom job + * attributes that are not covered by the provided structured fields. + * The keys of the map are strings up to 64 bytes and must match the + * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or + * KEY_1_LIKE_THIS. + * At most 100 filterable and at most 100 unfilterable keys are supported. + * For filterable `string_values`, across all keys at most 200 values are + * allowed, with each string no more than 255 characters. For unfilterable + * `string_values`, the maximum total size of `string_values` across all keys + * is 50KB. + * + * Generated from protobuf field map custom_attributes = 10; + */ + private $custom_attributes; + /** + * The desired education degrees for the job, such as Bachelors, Masters. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + */ + private $degree_types; + /** + * The department or functional area within the company with the open + * position. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string department = 12; + */ + protected $department = ''; + /** + * The employment type(s) of a job, for example, + * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or + * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + */ + private $employment_types; + /** + * A description of bonus, commission, and other compensation + * incentives associated with the job not including salary or pay. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string incentives = 14; + */ + protected $incentives = ''; + /** + * The language of the posting. This field is distinct from + * any requirements for fluency that are associated with the job. + * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: + * class="external" target="_blank" }. + * If this field is unspecified and + * [Job.description][google.cloud.talent.v4.Job.description] is present, + * detected language code based on + * [Job.description][google.cloud.talent.v4.Job.description] is assigned, + * otherwise defaults to 'en_US'. + * + * Generated from protobuf field string language_code = 15; + */ + protected $language_code = ''; + /** + * The experience level associated with the job, such as "Entry Level". + * + * Generated from protobuf field .google.cloud.talent.v4.JobLevel job_level = 16; + */ + protected $job_level = 0; + /** + * A promotion value of the job, as determined by the client. + * The value determines the sort order of the jobs returned when searching for + * jobs using the featured jobs search call, with higher promotional values + * being returned first and ties being resolved by relevance sort. Only the + * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + * Default value is 0, and negative values are treated as 0. + * + * Generated from protobuf field int32 promotion_value = 17; + */ + protected $promotion_value = 0; + /** + * A description of the qualifications required to perform the + * job. The use of this field is recommended + * as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string qualifications = 18; + */ + protected $qualifications = ''; + /** + * A description of job responsibilities. The use of this field is + * recommended as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string responsibilities = 19; + */ + protected $responsibilities = ''; + /** + * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, + * state, country) throughout which the job is available. If this field is + * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search + * query within the job region finds this job posting if an exact location + * match isn't specified. If this field is set to + * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or + * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], + * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the + * same location level as this field is strongly recommended. + * + * Generated from protobuf field .google.cloud.talent.v4.PostingRegion posting_region = 20; + */ + protected $posting_region = 0; + /** + * Deprecated. The job is only visible to the owner. + * The visibility of the job. + * Defaults to + * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] + * if not specified. + * + * Generated from protobuf field .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * @deprecated + */ + protected $visibility = 0; + /** + * The start timestamp of the job in UTC time zone. Typically this field + * is used for contracting engagements. Invalid timestamps are ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp job_start_time = 22; + */ + protected $job_start_time = null; + /** + * The end timestamp of the job. Typically this field is used for contracting + * engagements. Invalid timestamps are ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp job_end_time = 23; + */ + protected $job_end_time = null; + /** + * The timestamp this job posting was most recently published. The default + * value is the time the request arrives at the server. Invalid timestamps are + * ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_publish_time = 24; + */ + protected $posting_publish_time = null; + /** + * Strongly recommended for the best service experience. + * The expiration timestamp of the job. After this timestamp, the + * job is marked as expired, and it no longer appears in search results. The + * expired job can't be listed by the + * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be + * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API + * or updated with the + * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted + * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An + * expired job can be updated and opened again by using a future expiration + * timestamp. Updating an expired job fails if there is another existing open + * job with same [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The expired jobs are retained in our system for 90 days. However, the + * overall expired job count cannot exceed 3 times the maximum number of + * open jobs over previous 7 days. If this threshold is exceeded, + * expired jobs are cleaned out in order of earliest expire time. + * Expired jobs are no longer accessible after they are cleaned + * out. + * Invalid timestamps are ignored, and treated as expire time not provided. + * If the timestamp is before the instant request is made, the job + * is treated as expired immediately on creation. This kind of job can + * not be updated. And when creating a job with past timestamp, the + * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * must be set before + * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The + * purpose of this feature is to allow other objects, such as [Application][], + * to refer a job that didn't exist in the system prior to becoming expired. + * If you want to modify a job that was expired on creation, delete it and + * create a new one. + * If this value isn't provided at the time of job creation or is invalid, + * the job posting expires after 30 days from the job's creation time. For + * example, if the job was created on 2017/01/01 13:00AM UTC with an + * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. + * If this value isn't provided on job update, it depends on the field masks + * set by + * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. + * If the field masks include + * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are + * empty meaning that every field is updated, the job posting expires after 30 + * days from the job's last update time. Otherwise the expiration date isn't + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_expire_time = 25; + */ + protected $posting_expire_time = null; + /** + * Output only. The timestamp when this job posting was created. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $posting_create_time = null; + /** + * Output only. The timestamp when this job posting was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $posting_update_time = null; + /** + * Output only. Display name of the company listing the job. + * + * Generated from protobuf field string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $company_display_name = ''; + /** + * Output only. Derived details about the job posting. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $derived_info = null; + /** + * Options for job processing. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + */ + protected $processing_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required during job update. + * The resource name for the job. This is generated by the service when a + * job is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * Use of this field in job queries and API calls is preferred over the use of + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this + * value is unique. + * @type string $company + * Required. The resource name of the company listing the job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * @type string $requisition_id + * Required. The requisition ID, also referred to as the posting ID, is + * assigned by the client to identify a job. This field is intended to be used + * by clients for client identification and tracking of postings. A job isn't + * allowed to be created if there is another job with the same + * [company][google.cloud.talent.v4.Job.name], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The maximum number of allowed characters is 255. + * @type string $title + * Required. The title of the job, such as "Software Engineer" + * The maximum number of allowed characters is 500. + * @type string $description + * Required. The description of the job, which typically includes a + * multi-paragraph description of the company and related information. + * Separate fields are provided on the job object for + * [responsibilities][google.cloud.talent.v4.Job.responsibilities], + * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job + * characteristics. Use of these separate job fields is recommended. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 100,000. + * @type array|\Google\Protobuf\Internal\RepeatedField $addresses + * Strongly recommended for the best service experience. + * Location(s) where the employer is looking to hire for this job posting. + * Specifying the full street address(es) of the hiring location enables + * better API results, especially job searches by commute time. + * At most 50 locations are allowed for best search performance. If a job has + * more locations, it is suggested to split it into multiple jobs with unique + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' + * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not + * allowed. If the original + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be + * preserved, a custom field should be used for storage. It is also suggested + * to group the locations that close to each other in the same job for better + * search experience. + * Jobs with multiple addresses must have their addresses with the same + * [LocationType][] to allow location filtering to work properly. (For + * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, + * CA, USA" and "London, UK" may not have location filters applied correctly + * at search time since the first is a [LocationType.STREET_ADDRESS][] and the + * second is a [LocationType.LOCALITY][].) If a job needs to have multiple + * addresses, it is suggested to split it into multiple jobs with same + * LocationTypes. + * The maximum number of allowed characters is 500. + * @type \Google\Cloud\Talent\V4\Job\ApplicationInfo $application_info + * Job application information. + * @type array|\Google\Protobuf\Internal\RepeatedField $job_benefits + * The benefits included with the job. + * @type \Google\Cloud\Talent\V4\CompensationInfo $compensation_info + * Job compensation information (a.k.a. "pay rate") i.e., the compensation + * that will paid to the employee. + * @type array|\Google\Protobuf\Internal\MapField $custom_attributes + * A map of fields to hold both filterable and non-filterable custom job + * attributes that are not covered by the provided structured fields. + * The keys of the map are strings up to 64 bytes and must match the + * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or + * KEY_1_LIKE_THIS. + * At most 100 filterable and at most 100 unfilterable keys are supported. + * For filterable `string_values`, across all keys at most 200 values are + * allowed, with each string no more than 255 characters. For unfilterable + * `string_values`, the maximum total size of `string_values` across all keys + * is 50KB. + * @type array|\Google\Protobuf\Internal\RepeatedField $degree_types + * The desired education degrees for the job, such as Bachelors, Masters. + * @type string $department + * The department or functional area within the company with the open + * position. + * The maximum number of allowed characters is 255. + * @type array|\Google\Protobuf\Internal\RepeatedField $employment_types + * The employment type(s) of a job, for example, + * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or + * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. + * @type string $incentives + * A description of bonus, commission, and other compensation + * incentives associated with the job not including salary or pay. + * The maximum number of allowed characters is 10,000. + * @type string $language_code + * The language of the posting. This field is distinct from + * any requirements for fluency that are associated with the job. + * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: + * class="external" target="_blank" }. + * If this field is unspecified and + * [Job.description][google.cloud.talent.v4.Job.description] is present, + * detected language code based on + * [Job.description][google.cloud.talent.v4.Job.description] is assigned, + * otherwise defaults to 'en_US'. + * @type int $job_level + * The experience level associated with the job, such as "Entry Level". + * @type int $promotion_value + * A promotion value of the job, as determined by the client. + * The value determines the sort order of the jobs returned when searching for + * jobs using the featured jobs search call, with higher promotional values + * being returned first and ties being resolved by relevance sort. Only the + * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + * Default value is 0, and negative values are treated as 0. + * @type string $qualifications + * A description of the qualifications required to perform the + * job. The use of this field is recommended + * as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * @type string $responsibilities + * A description of job responsibilities. The use of this field is + * recommended as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * @type int $posting_region + * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, + * state, country) throughout which the job is available. If this field is + * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search + * query within the job region finds this job posting if an exact location + * match isn't specified. If this field is set to + * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or + * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], + * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the + * same location level as this field is strongly recommended. + * @type int $visibility + * Deprecated. The job is only visible to the owner. + * The visibility of the job. + * Defaults to + * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] + * if not specified. + * @type \Google\Protobuf\Timestamp $job_start_time + * The start timestamp of the job in UTC time zone. Typically this field + * is used for contracting engagements. Invalid timestamps are ignored. + * @type \Google\Protobuf\Timestamp $job_end_time + * The end timestamp of the job. Typically this field is used for contracting + * engagements. Invalid timestamps are ignored. + * @type \Google\Protobuf\Timestamp $posting_publish_time + * The timestamp this job posting was most recently published. The default + * value is the time the request arrives at the server. Invalid timestamps are + * ignored. + * @type \Google\Protobuf\Timestamp $posting_expire_time + * Strongly recommended for the best service experience. + * The expiration timestamp of the job. After this timestamp, the + * job is marked as expired, and it no longer appears in search results. The + * expired job can't be listed by the + * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be + * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API + * or updated with the + * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted + * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An + * expired job can be updated and opened again by using a future expiration + * timestamp. Updating an expired job fails if there is another existing open + * job with same [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The expired jobs are retained in our system for 90 days. However, the + * overall expired job count cannot exceed 3 times the maximum number of + * open jobs over previous 7 days. If this threshold is exceeded, + * expired jobs are cleaned out in order of earliest expire time. + * Expired jobs are no longer accessible after they are cleaned + * out. + * Invalid timestamps are ignored, and treated as expire time not provided. + * If the timestamp is before the instant request is made, the job + * is treated as expired immediately on creation. This kind of job can + * not be updated. And when creating a job with past timestamp, the + * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * must be set before + * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The + * purpose of this feature is to allow other objects, such as [Application][], + * to refer a job that didn't exist in the system prior to becoming expired. + * If you want to modify a job that was expired on creation, delete it and + * create a new one. + * If this value isn't provided at the time of job creation or is invalid, + * the job posting expires after 30 days from the job's creation time. For + * example, if the job was created on 2017/01/01 13:00AM UTC with an + * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. + * If this value isn't provided on job update, it depends on the field masks + * set by + * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. + * If the field masks include + * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are + * empty meaning that every field is updated, the job posting expires after 30 + * days from the job's last update time. Otherwise the expiration date isn't + * updated. + * @type \Google\Protobuf\Timestamp $posting_create_time + * Output only. The timestamp when this job posting was created. + * @type \Google\Protobuf\Timestamp $posting_update_time + * Output only. The timestamp when this job posting was last updated. + * @type string $company_display_name + * Output only. Display name of the company listing the job. + * @type \Google\Cloud\Talent\V4\Job\DerivedInfo $derived_info + * Output only. Derived details about the job posting. + * @type \Google\Cloud\Talent\V4\Job\ProcessingOptions $processing_options + * Options for job processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); + parent::__construct($data); + } + + /** + * Required during job update. + * The resource name for the job. This is generated by the service when a + * job is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * Use of this field in job queries and API calls is preferred over the use of + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this + * value is unique. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required during job update. + * The resource name for the job. This is generated by the service when a + * job is created. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For + * example, "projects/foo/tenants/bar/jobs/baz". + * Use of this field in job queries and API calls is preferred over the use of + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this + * value is unique. + * + * 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 resource name of the company listing the job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCompany() + { + return $this->company; + } + + /** + * Required. The resource name of the company listing the job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * + * Generated from protobuf field string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCompany($var) + { + GPBUtil::checkString($var, True); + $this->company = $var; + + return $this; + } + + /** + * Required. The requisition ID, also referred to as the posting ID, is + * assigned by the client to identify a job. This field is intended to be used + * by clients for client identification and tracking of postings. A job isn't + * allowed to be created if there is another job with the same + * [company][google.cloud.talent.v4.Job.name], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRequisitionId() + { + return $this->requisition_id; + } + + /** + * Required. The requisition ID, also referred to as the posting ID, is + * assigned by the client to identify a job. This field is intended to be used + * by clients for client identification and tracking of postings. A job isn't + * allowed to be created if there is another job with the same + * [company][google.cloud.talent.v4.Job.name], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRequisitionId($var) + { + GPBUtil::checkString($var, True); + $this->requisition_id = $var; + + return $this; + } + + /** + * Required. The title of the job, such as "Software Engineer" + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The title of the job, such as "Software Engineer" + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field string title = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Required. The description of the job, which typically includes a + * multi-paragraph description of the company and related information. + * Separate fields are provided on the job object for + * [responsibilities][google.cloud.talent.v4.Job.responsibilities], + * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job + * characteristics. Use of these separate job fields is recommended. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 100,000. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Required. The description of the job, which typically includes a + * multi-paragraph description of the company and related information. + * Separate fields are provided on the job object for + * [responsibilities][google.cloud.talent.v4.Job.responsibilities], + * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job + * characteristics. Use of these separate job fields is recommended. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 100,000. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Strongly recommended for the best service experience. + * Location(s) where the employer is looking to hire for this job posting. + * Specifying the full street address(es) of the hiring location enables + * better API results, especially job searches by commute time. + * At most 50 locations are allowed for best search performance. If a job has + * more locations, it is suggested to split it into multiple jobs with unique + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' + * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not + * allowed. If the original + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be + * preserved, a custom field should be used for storage. It is also suggested + * to group the locations that close to each other in the same job for better + * search experience. + * Jobs with multiple addresses must have their addresses with the same + * [LocationType][] to allow location filtering to work properly. (For + * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, + * CA, USA" and "London, UK" may not have location filters applied correctly + * at search time since the first is a [LocationType.STREET_ADDRESS][] and the + * second is a [LocationType.LOCALITY][].) If a job needs to have multiple + * addresses, it is suggested to split it into multiple jobs with same + * LocationTypes. + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field repeated string addresses = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAddresses() + { + return $this->addresses; + } + + /** + * Strongly recommended for the best service experience. + * Location(s) where the employer is looking to hire for this job posting. + * Specifying the full street address(es) of the hiring location enables + * better API results, especially job searches by commute time. + * At most 50 locations are allowed for best search performance. If a job has + * more locations, it is suggested to split it into multiple jobs with unique + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' + * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not + * allowed. If the original + * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be + * preserved, a custom field should be used for storage. It is also suggested + * to group the locations that close to each other in the same job for better + * search experience. + * Jobs with multiple addresses must have their addresses with the same + * [LocationType][] to allow location filtering to work properly. (For + * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, + * CA, USA" and "London, UK" may not have location filters applied correctly + * at search time since the first is a [LocationType.STREET_ADDRESS][] and the + * second is a [LocationType.LOCALITY][].) If a job needs to have multiple + * addresses, it is suggested to split it into multiple jobs with same + * LocationTypes. + * The maximum number of allowed characters is 500. + * + * Generated from protobuf field repeated string addresses = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->addresses = $arr; + + return $this; + } + + /** + * Job application information. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * @return \Google\Cloud\Talent\V4\Job\ApplicationInfo|null + */ + public function getApplicationInfo() + { + return $this->application_info; + } + + public function hasApplicationInfo() + { + return isset($this->application_info); + } + + public function clearApplicationInfo() + { + unset($this->application_info); + } + + /** + * Job application information. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; + * @param \Google\Cloud\Talent\V4\Job\ApplicationInfo $var + * @return $this + */ + public function setApplicationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job\ApplicationInfo::class); + $this->application_info = $var; + + return $this; + } + + /** + * The benefits included with the job. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobBenefits() + { + return $this->job_benefits; + } + + /** + * The benefits included with the job. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobBenefits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\JobBenefit::class); + $this->job_benefits = $arr; + + return $this; + } + + /** + * Job compensation information (a.k.a. "pay rate") i.e., the compensation + * that will paid to the employee. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * @return \Google\Cloud\Talent\V4\CompensationInfo|null + */ + public function getCompensationInfo() + { + return $this->compensation_info; + } + + public function hasCompensationInfo() + { + return isset($this->compensation_info); + } + + public function clearCompensationInfo() + { + unset($this->compensation_info); + } + + /** + * Job compensation information (a.k.a. "pay rate") i.e., the compensation + * that will paid to the employee. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo compensation_info = 9; + * @param \Google\Cloud\Talent\V4\CompensationInfo $var + * @return $this + */ + public function setCompensationInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo::class); + $this->compensation_info = $var; + + return $this; + } + + /** + * A map of fields to hold both filterable and non-filterable custom job + * attributes that are not covered by the provided structured fields. + * The keys of the map are strings up to 64 bytes and must match the + * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or + * KEY_1_LIKE_THIS. + * At most 100 filterable and at most 100 unfilterable keys are supported. + * For filterable `string_values`, across all keys at most 200 values are + * allowed, with each string no more than 255 characters. For unfilterable + * `string_values`, the maximum total size of `string_values` across all keys + * is 50KB. + * + * Generated from protobuf field map custom_attributes = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCustomAttributes() + { + return $this->custom_attributes; + } + + /** + * A map of fields to hold both filterable and non-filterable custom job + * attributes that are not covered by the provided structured fields. + * The keys of the map are strings up to 64 bytes and must match the + * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or + * KEY_1_LIKE_THIS. + * At most 100 filterable and at most 100 unfilterable keys are supported. + * For filterable `string_values`, across all keys at most 200 values are + * allowed, with each string no more than 255 characters. For unfilterable + * `string_values`, the maximum total size of `string_values` across all keys + * is 50KB. + * + * Generated from protobuf field map custom_attributes = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCustomAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\CustomAttribute::class); + $this->custom_attributes = $arr; + + return $this; + } + + /** + * The desired education degrees for the job, such as Bachelors, Masters. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDegreeTypes() + { + return $this->degree_types; + } + + /** + * The desired education degrees for the job, such as Bachelors, Masters. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.DegreeType degree_types = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDegreeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\DegreeType::class); + $this->degree_types = $arr; + + return $this; + } + + /** + * The department or functional area within the company with the open + * position. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string department = 12; + * @return string + */ + public function getDepartment() + { + return $this->department; + } + + /** + * The department or functional area within the company with the open + * position. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string department = 12; + * @param string $var + * @return $this + */ + public function setDepartment($var) + { + GPBUtil::checkString($var, True); + $this->department = $var; + + return $this; + } + + /** + * The employment type(s) of a job, for example, + * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or + * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEmploymentTypes() + { + return $this->employment_types; + } + + /** + * The employment type(s) of a job, for example, + * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or + * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEmploymentTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\EmploymentType::class); + $this->employment_types = $arr; + + return $this; + } + + /** + * A description of bonus, commission, and other compensation + * incentives associated with the job not including salary or pay. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string incentives = 14; + * @return string + */ + public function getIncentives() + { + return $this->incentives; + } + + /** + * A description of bonus, commission, and other compensation + * incentives associated with the job not including salary or pay. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string incentives = 14; + * @param string $var + * @return $this + */ + public function setIncentives($var) + { + GPBUtil::checkString($var, True); + $this->incentives = $var; + + return $this; + } + + /** + * The language of the posting. This field is distinct from + * any requirements for fluency that are associated with the job. + * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: + * class="external" target="_blank" }. + * If this field is unspecified and + * [Job.description][google.cloud.talent.v4.Job.description] is present, + * detected language code based on + * [Job.description][google.cloud.talent.v4.Job.description] is assigned, + * otherwise defaults to 'en_US'. + * + * Generated from protobuf field string language_code = 15; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language of the posting. This field is distinct from + * any requirements for fluency that are associated with the job. + * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: + * class="external" target="_blank" }. + * If this field is unspecified and + * [Job.description][google.cloud.talent.v4.Job.description] is present, + * detected language code based on + * [Job.description][google.cloud.talent.v4.Job.description] is assigned, + * otherwise defaults to 'en_US'. + * + * Generated from protobuf field string language_code = 15; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The experience level associated with the job, such as "Entry Level". + * + * Generated from protobuf field .google.cloud.talent.v4.JobLevel job_level = 16; + * @return int + */ + public function getJobLevel() + { + return $this->job_level; + } + + /** + * The experience level associated with the job, such as "Entry Level". + * + * Generated from protobuf field .google.cloud.talent.v4.JobLevel job_level = 16; + * @param int $var + * @return $this + */ + public function setJobLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobLevel::class); + $this->job_level = $var; + + return $this; + } + + /** + * A promotion value of the job, as determined by the client. + * The value determines the sort order of the jobs returned when searching for + * jobs using the featured jobs search call, with higher promotional values + * being returned first and ties being resolved by relevance sort. Only the + * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + * Default value is 0, and negative values are treated as 0. + * + * Generated from protobuf field int32 promotion_value = 17; + * @return int + */ + public function getPromotionValue() + { + return $this->promotion_value; + } + + /** + * A promotion value of the job, as determined by the client. + * The value determines the sort order of the jobs returned when searching for + * jobs using the featured jobs search call, with higher promotional values + * being returned first and ties being resolved by relevance sort. Only the + * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. + * Default value is 0, and negative values are treated as 0. + * + * Generated from protobuf field int32 promotion_value = 17; + * @param int $var + * @return $this + */ + public function setPromotionValue($var) + { + GPBUtil::checkInt32($var); + $this->promotion_value = $var; + + return $this; + } + + /** + * A description of the qualifications required to perform the + * job. The use of this field is recommended + * as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string qualifications = 18; + * @return string + */ + public function getQualifications() + { + return $this->qualifications; + } + + /** + * A description of the qualifications required to perform the + * job. The use of this field is recommended + * as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string qualifications = 18; + * @param string $var + * @return $this + */ + public function setQualifications($var) + { + GPBUtil::checkString($var, True); + $this->qualifications = $var; + + return $this; + } + + /** + * A description of job responsibilities. The use of this field is + * recommended as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string responsibilities = 19; + * @return string + */ + public function getResponsibilities() + { + return $this->responsibilities; + } + + /** + * A description of job responsibilities. The use of this field is + * recommended as an alternative to using the more general + * [description][google.cloud.talent.v4.Job.description] field. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 10,000. + * + * Generated from protobuf field string responsibilities = 19; + * @param string $var + * @return $this + */ + public function setResponsibilities($var) + { + GPBUtil::checkString($var, True); + $this->responsibilities = $var; + + return $this; + } + + /** + * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, + * state, country) throughout which the job is available. If this field is + * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search + * query within the job region finds this job posting if an exact location + * match isn't specified. If this field is set to + * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or + * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], + * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the + * same location level as this field is strongly recommended. + * + * Generated from protobuf field .google.cloud.talent.v4.PostingRegion posting_region = 20; + * @return int + */ + public function getPostingRegion() + { + return $this->posting_region; + } + + /** + * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, + * state, country) throughout which the job is available. If this field is + * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search + * query within the job region finds this job posting if an exact location + * match isn't specified. If this field is set to + * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or + * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], + * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the + * same location level as this field is strongly recommended. + * + * Generated from protobuf field .google.cloud.talent.v4.PostingRegion posting_region = 20; + * @param int $var + * @return $this + */ + public function setPostingRegion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\PostingRegion::class); + $this->posting_region = $var; + + return $this; + } + + /** + * Deprecated. The job is only visible to the owner. + * The visibility of the job. + * Defaults to + * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] + * if not specified. + * + * Generated from protobuf field .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * @return int + * @deprecated + */ + public function getVisibility() + { + @trigger_error('visibility is deprecated.', E_USER_DEPRECATED); + return $this->visibility; + } + + /** + * Deprecated. The job is only visible to the owner. + * The visibility of the job. + * Defaults to + * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] + * if not specified. + * + * Generated from protobuf field .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setVisibility($var) + { + @trigger_error('visibility is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\Visibility::class); + $this->visibility = $var; + + return $this; + } + + /** + * The start timestamp of the job in UTC time zone. Typically this field + * is used for contracting engagements. Invalid timestamps are ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp job_start_time = 22; + * @return \Google\Protobuf\Timestamp|null + */ + public function getJobStartTime() + { + return $this->job_start_time; + } + + public function hasJobStartTime() + { + return isset($this->job_start_time); + } + + public function clearJobStartTime() + { + unset($this->job_start_time); + } + + /** + * The start timestamp of the job in UTC time zone. Typically this field + * is used for contracting engagements. Invalid timestamps are ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp job_start_time = 22; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setJobStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->job_start_time = $var; + + return $this; + } + + /** + * The end timestamp of the job. Typically this field is used for contracting + * engagements. Invalid timestamps are ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp job_end_time = 23; + * @return \Google\Protobuf\Timestamp|null + */ + public function getJobEndTime() + { + return $this->job_end_time; + } + + public function hasJobEndTime() + { + return isset($this->job_end_time); + } + + public function clearJobEndTime() + { + unset($this->job_end_time); + } + + /** + * The end timestamp of the job. Typically this field is used for contracting + * engagements. Invalid timestamps are ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp job_end_time = 23; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setJobEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->job_end_time = $var; + + return $this; + } + + /** + * The timestamp this job posting was most recently published. The default + * value is the time the request arrives at the server. Invalid timestamps are + * ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_publish_time = 24; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPostingPublishTime() + { + return $this->posting_publish_time; + } + + public function hasPostingPublishTime() + { + return isset($this->posting_publish_time); + } + + public function clearPostingPublishTime() + { + unset($this->posting_publish_time); + } + + /** + * The timestamp this job posting was most recently published. The default + * value is the time the request arrives at the server. Invalid timestamps are + * ignored. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_publish_time = 24; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPostingPublishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->posting_publish_time = $var; + + return $this; + } + + /** + * Strongly recommended for the best service experience. + * The expiration timestamp of the job. After this timestamp, the + * job is marked as expired, and it no longer appears in search results. The + * expired job can't be listed by the + * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be + * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API + * or updated with the + * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted + * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An + * expired job can be updated and opened again by using a future expiration + * timestamp. Updating an expired job fails if there is another existing open + * job with same [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The expired jobs are retained in our system for 90 days. However, the + * overall expired job count cannot exceed 3 times the maximum number of + * open jobs over previous 7 days. If this threshold is exceeded, + * expired jobs are cleaned out in order of earliest expire time. + * Expired jobs are no longer accessible after they are cleaned + * out. + * Invalid timestamps are ignored, and treated as expire time not provided. + * If the timestamp is before the instant request is made, the job + * is treated as expired immediately on creation. This kind of job can + * not be updated. And when creating a job with past timestamp, the + * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * must be set before + * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The + * purpose of this feature is to allow other objects, such as [Application][], + * to refer a job that didn't exist in the system prior to becoming expired. + * If you want to modify a job that was expired on creation, delete it and + * create a new one. + * If this value isn't provided at the time of job creation or is invalid, + * the job posting expires after 30 days from the job's creation time. For + * example, if the job was created on 2017/01/01 13:00AM UTC with an + * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. + * If this value isn't provided on job update, it depends on the field masks + * set by + * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. + * If the field masks include + * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are + * empty meaning that every field is updated, the job posting expires after 30 + * days from the job's last update time. Otherwise the expiration date isn't + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_expire_time = 25; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPostingExpireTime() + { + return $this->posting_expire_time; + } + + public function hasPostingExpireTime() + { + return isset($this->posting_expire_time); + } + + public function clearPostingExpireTime() + { + unset($this->posting_expire_time); + } + + /** + * Strongly recommended for the best service experience. + * The expiration timestamp of the job. After this timestamp, the + * job is marked as expired, and it no longer appears in search results. The + * expired job can't be listed by the + * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be + * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API + * or updated with the + * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted + * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An + * expired job can be updated and opened again by using a future expiration + * timestamp. Updating an expired job fails if there is another existing open + * job with same [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. + * The expired jobs are retained in our system for 90 days. However, the + * overall expired job count cannot exceed 3 times the maximum number of + * open jobs over previous 7 days. If this threshold is exceeded, + * expired jobs are cleaned out in order of earliest expire time. + * Expired jobs are no longer accessible after they are cleaned + * out. + * Invalid timestamps are ignored, and treated as expire time not provided. + * If the timestamp is before the instant request is made, the job + * is treated as expired immediately on creation. This kind of job can + * not be updated. And when creating a job with past timestamp, the + * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * must be set before + * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The + * purpose of this feature is to allow other objects, such as [Application][], + * to refer a job that didn't exist in the system prior to becoming expired. + * If you want to modify a job that was expired on creation, delete it and + * create a new one. + * If this value isn't provided at the time of job creation or is invalid, + * the job posting expires after 30 days from the job's creation time. For + * example, if the job was created on 2017/01/01 13:00AM UTC with an + * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. + * If this value isn't provided on job update, it depends on the field masks + * set by + * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. + * If the field masks include + * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are + * empty meaning that every field is updated, the job posting expires after 30 + * days from the job's last update time. Otherwise the expiration date isn't + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_expire_time = 25; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPostingExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->posting_expire_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when this job posting was created. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPostingCreateTime() + { + return $this->posting_create_time; + } + + public function hasPostingCreateTime() + { + return isset($this->posting_create_time); + } + + public function clearPostingCreateTime() + { + unset($this->posting_create_time); + } + + /** + * Output only. The timestamp when this job posting was created. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPostingCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->posting_create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when this job posting was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPostingUpdateTime() + { + return $this->posting_update_time; + } + + public function hasPostingUpdateTime() + { + return isset($this->posting_update_time); + } + + public function clearPostingUpdateTime() + { + unset($this->posting_update_time); + } + + /** + * Output only. The timestamp when this job posting was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPostingUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->posting_update_time = $var; + + return $this; + } + + /** + * Output only. Display name of the company listing the job. + * + * Generated from protobuf field string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCompanyDisplayName() + { + return $this->company_display_name; + } + + /** + * Output only. Display name of the company listing the job. + * + * Generated from protobuf field string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCompanyDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->company_display_name = $var; + + return $this; + } + + /** + * Output only. Derived details about the job posting. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Talent\V4\Job\DerivedInfo|null + */ + public function getDerivedInfo() + { + return $this->derived_info; + } + + public function hasDerivedInfo() + { + return isset($this->derived_info); + } + + public function clearDerivedInfo() + { + unset($this->derived_info); + } + + /** + * Output only. Derived details about the job posting. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Talent\V4\Job\DerivedInfo $var + * @return $this + */ + public function setDerivedInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job\DerivedInfo::class); + $this->derived_info = $var; + + return $this; + } + + /** + * Options for job processing. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * @return \Google\Cloud\Talent\V4\Job\ProcessingOptions|null + */ + public function getProcessingOptions() + { + return $this->processing_options; + } + + public function hasProcessingOptions() + { + return isset($this->processing_options); + } + + public function clearProcessingOptions() + { + unset($this->processing_options); + } + + /** + * Options for job processing. + * + * Generated from protobuf field .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; + * @param \Google\Cloud\Talent\V4\Job\ProcessingOptions $var + * @return $this + */ + public function setProcessingOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job\ProcessingOptions::class); + $this->processing_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php new file mode 100644 index 000000000000..9f16a1f87afa --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php @@ -0,0 +1,170 @@ +google.cloud.talent.v4.Job.ApplicationInfo + */ +class ApplicationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Use this field to specify email address(es) to which resumes or + * applications can be sent. + * The maximum number of allowed characters for each entry is 255. + * + * Generated from protobuf field repeated string emails = 1; + */ + private $emails; + /** + * Use this field to provide instructions, such as "Mail your application + * to ...", that a candidate can follow to apply for the job. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 3,000. + * + * Generated from protobuf field string instruction = 2; + */ + protected $instruction = ''; + /** + * Use this URI field to direct an applicant to a website, for example to + * link to an online application form. + * The maximum number of allowed characters for each entry is 2,000. + * + * Generated from protobuf field repeated string uris = 3; + */ + private $uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $emails + * Use this field to specify email address(es) to which resumes or + * applications can be sent. + * The maximum number of allowed characters for each entry is 255. + * @type string $instruction + * Use this field to provide instructions, such as "Mail your application + * to ...", that a candidate can follow to apply for the job. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 3,000. + * @type array|\Google\Protobuf\Internal\RepeatedField $uris + * Use this URI field to direct an applicant to a website, for example to + * link to an online application form. + * The maximum number of allowed characters for each entry is 2,000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); + parent::__construct($data); + } + + /** + * Use this field to specify email address(es) to which resumes or + * applications can be sent. + * The maximum number of allowed characters for each entry is 255. + * + * Generated from protobuf field repeated string emails = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEmails() + { + return $this->emails; + } + + /** + * Use this field to specify email address(es) to which resumes or + * applications can be sent. + * The maximum number of allowed characters for each entry is 255. + * + * Generated from protobuf field repeated string emails = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEmails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->emails = $arr; + + return $this; + } + + /** + * Use this field to provide instructions, such as "Mail your application + * to ...", that a candidate can follow to apply for the job. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 3,000. + * + * Generated from protobuf field string instruction = 2; + * @return string + */ + public function getInstruction() + { + return $this->instruction; + } + + /** + * Use this field to provide instructions, such as "Mail your application + * to ...", that a candidate can follow to apply for the job. + * This field accepts and sanitizes HTML input, and also accepts + * bold, italic, ordered list, and unordered list markup tags. + * The maximum number of allowed characters is 3,000. + * + * Generated from protobuf field string instruction = 2; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + + /** + * Use this URI field to direct an applicant to a website, for example to + * link to an online application form. + * The maximum number of allowed characters for each entry is 2,000. + * + * Generated from protobuf field repeated string uris = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * Use this URI field to direct an applicant to a website, for example to + * link to an online application form. + * The maximum number of allowed characters for each entry is 2,000. + * + * Generated from protobuf field repeated string uris = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApplicationInfo::class, \Google\Cloud\Talent\V4\Job_ApplicationInfo::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php new file mode 100644 index 000000000000..275a6dd45c07 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php @@ -0,0 +1,124 @@ +google.cloud.talent.v4.Job.DerivedInfo + */ +class DerivedInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Structured locations of the job, resolved from + * [Job.addresses][google.cloud.talent.v4.Job.addresses]. + * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly + * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the + * same order. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Location locations = 1; + */ + private $locations; + /** + * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] + * and [Job.description][google.cloud.talent.v4.Job.description]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + */ + private $job_categories; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $locations + * Structured locations of the job, resolved from + * [Job.addresses][google.cloud.talent.v4.Job.addresses]. + * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly + * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the + * same order. + * @type array|\Google\Protobuf\Internal\RepeatedField $job_categories + * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] + * and [Job.description][google.cloud.talent.v4.Job.description]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); + parent::__construct($data); + } + + /** + * Structured locations of the job, resolved from + * [Job.addresses][google.cloud.talent.v4.Job.addresses]. + * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly + * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the + * same order. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Location locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Structured locations of the job, resolved from + * [Job.addresses][google.cloud.talent.v4.Job.addresses]. + * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly + * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the + * same order. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Location locations = 1; + * @param array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Location::class); + $this->locations = $arr; + + return $this; + } + + /** + * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] + * and [Job.description][google.cloud.talent.v4.Job.description]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobCategories() + { + return $this->job_categories; + } + + /** + * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] + * and [Job.description][google.cloud.talent.v4.Job.description]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\JobCategory::class); + $this->job_categories = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DerivedInfo::class, \Google\Cloud\Talent\V4\Job_DerivedInfo::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php new file mode 100644 index 000000000000..405792e5798a --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php @@ -0,0 +1,144 @@ +google.cloud.talent.v4.Job.ProcessingOptions + */ +class ProcessingOptions extends \Google\Protobuf\Internal\Message +{ + /** + * If set to `true`, the service does not attempt to resolve a + * more precise address for the job. + * + * Generated from protobuf field bool disable_street_address_resolution = 1; + */ + protected $disable_street_address_resolution = false; + /** + * Option for job HTML content sanitization. Applied fields are: + * * description + * * applicationInfo.instruction + * * incentives + * * qualifications + * * responsibilities + * HTML tags in these fields may be stripped if sanitiazation isn't + * disabled. + * Defaults to + * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. + * + * Generated from protobuf field .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + */ + protected $html_sanitization = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $disable_street_address_resolution + * If set to `true`, the service does not attempt to resolve a + * more precise address for the job. + * @type int $html_sanitization + * Option for job HTML content sanitization. Applied fields are: + * * description + * * applicationInfo.instruction + * * incentives + * * qualifications + * * responsibilities + * HTML tags in these fields may be stripped if sanitiazation isn't + * disabled. + * Defaults to + * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); + parent::__construct($data); + } + + /** + * If set to `true`, the service does not attempt to resolve a + * more precise address for the job. + * + * Generated from protobuf field bool disable_street_address_resolution = 1; + * @return bool + */ + public function getDisableStreetAddressResolution() + { + return $this->disable_street_address_resolution; + } + + /** + * If set to `true`, the service does not attempt to resolve a + * more precise address for the job. + * + * Generated from protobuf field bool disable_street_address_resolution = 1; + * @param bool $var + * @return $this + */ + public function setDisableStreetAddressResolution($var) + { + GPBUtil::checkBool($var); + $this->disable_street_address_resolution = $var; + + return $this; + } + + /** + * Option for job HTML content sanitization. Applied fields are: + * * description + * * applicationInfo.instruction + * * incentives + * * qualifications + * * responsibilities + * HTML tags in these fields may be stripped if sanitiazation isn't + * disabled. + * Defaults to + * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. + * + * Generated from protobuf field .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * @return int + */ + public function getHtmlSanitization() + { + return $this->html_sanitization; + } + + /** + * Option for job HTML content sanitization. Applied fields are: + * * description + * * applicationInfo.instruction + * * incentives + * * qualifications + * * responsibilities + * HTML tags in these fields may be stripped if sanitiazation isn't + * disabled. + * Defaults to + * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. + * + * Generated from protobuf field .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; + * @param int $var + * @return $this + */ + public function setHtmlSanitization($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\HtmlSanitization::class); + $this->html_sanitization = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProcessingOptions::class, \Google\Cloud\Talent\V4\Job_ProcessingOptions::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php new file mode 100644 index 000000000000..0dd04d5e8050 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php @@ -0,0 +1,130 @@ +google.cloud.talent.v4.JobBenefit + */ +class JobBenefit +{ + /** + * Default value if the type isn't specified. + * + * Generated from protobuf enum JOB_BENEFIT_UNSPECIFIED = 0; + */ + const JOB_BENEFIT_UNSPECIFIED = 0; + /** + * The job includes access to programs that support child care, such + * as daycare. + * + * Generated from protobuf enum CHILD_CARE = 1; + */ + const CHILD_CARE = 1; + /** + * The job includes dental services covered by a dental + * insurance plan. + * + * Generated from protobuf enum DENTAL = 2; + */ + const DENTAL = 2; + /** + * The job offers specific benefits to domestic partners. + * + * Generated from protobuf enum DOMESTIC_PARTNER = 3; + */ + const DOMESTIC_PARTNER = 3; + /** + * The job allows for a flexible work schedule. + * + * Generated from protobuf enum FLEXIBLE_HOURS = 4; + */ + const FLEXIBLE_HOURS = 4; + /** + * The job includes health services covered by a medical insurance plan. + * + * Generated from protobuf enum MEDICAL = 5; + */ + const MEDICAL = 5; + /** + * The job includes a life insurance plan provided by the employer or + * available for purchase by the employee. + * + * Generated from protobuf enum LIFE_INSURANCE = 6; + */ + const LIFE_INSURANCE = 6; + /** + * The job allows for a leave of absence to a parent to care for a newborn + * child. + * + * Generated from protobuf enum PARENTAL_LEAVE = 7; + */ + const PARENTAL_LEAVE = 7; + /** + * The job includes a workplace retirement plan provided by the + * employer or available for purchase by the employee. + * + * Generated from protobuf enum RETIREMENT_PLAN = 8; + */ + const RETIREMENT_PLAN = 8; + /** + * The job allows for paid time off due to illness. + * + * Generated from protobuf enum SICK_DAYS = 9; + */ + const SICK_DAYS = 9; + /** + * The job includes paid time off for vacation. + * + * Generated from protobuf enum VACATION = 10; + */ + const VACATION = 10; + /** + * The job includes vision services covered by a vision + * insurance plan. + * + * Generated from protobuf enum VISION = 11; + */ + const VISION = 11; + + private static $valueToName = [ + self::JOB_BENEFIT_UNSPECIFIED => 'JOB_BENEFIT_UNSPECIFIED', + self::CHILD_CARE => 'CHILD_CARE', + self::DENTAL => 'DENTAL', + self::DOMESTIC_PARTNER => 'DOMESTIC_PARTNER', + self::FLEXIBLE_HOURS => 'FLEXIBLE_HOURS', + self::MEDICAL => 'MEDICAL', + self::LIFE_INSURANCE => 'LIFE_INSURANCE', + self::PARENTAL_LEAVE => 'PARENTAL_LEAVE', + self::RETIREMENT_PLAN => 'RETIREMENT_PLAN', + self::SICK_DAYS => 'SICK_DAYS', + self::VACATION => 'VACATION', + self::VISION => 'VISION', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php new file mode 100644 index 000000000000..bd330bfdd433 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php @@ -0,0 +1,260 @@ +google.cloud.talent.v4.JobCategory + */ +class JobCategory +{ + /** + * The default value if the category isn't specified. + * + * Generated from protobuf enum JOB_CATEGORY_UNSPECIFIED = 0; + */ + const JOB_CATEGORY_UNSPECIFIED = 0; + /** + * An accounting and finance job, such as an Accountant. + * + * Generated from protobuf enum ACCOUNTING_AND_FINANCE = 1; + */ + const ACCOUNTING_AND_FINANCE = 1; + /** + * An administrative and office job, such as an Administrative Assistant. + * + * Generated from protobuf enum ADMINISTRATIVE_AND_OFFICE = 2; + */ + const ADMINISTRATIVE_AND_OFFICE = 2; + /** + * An advertising and marketing job, such as Marketing Manager. + * + * Generated from protobuf enum ADVERTISING_AND_MARKETING = 3; + */ + const ADVERTISING_AND_MARKETING = 3; + /** + * An animal care job, such as Veterinarian. + * + * Generated from protobuf enum ANIMAL_CARE = 4; + */ + const ANIMAL_CARE = 4; + /** + * An art, fashion, or design job, such as Designer. + * + * Generated from protobuf enum ART_FASHION_AND_DESIGN = 5; + */ + const ART_FASHION_AND_DESIGN = 5; + /** + * A business operations job, such as Business Operations Manager. + * + * Generated from protobuf enum BUSINESS_OPERATIONS = 6; + */ + const BUSINESS_OPERATIONS = 6; + /** + * A cleaning and facilities job, such as Custodial Staff. + * + * Generated from protobuf enum CLEANING_AND_FACILITIES = 7; + */ + const CLEANING_AND_FACILITIES = 7; + /** + * A computer and IT job, such as Systems Administrator. + * + * Generated from protobuf enum COMPUTER_AND_IT = 8; + */ + const COMPUTER_AND_IT = 8; + /** + * A construction job, such as General Laborer. + * + * Generated from protobuf enum CONSTRUCTION = 9; + */ + const CONSTRUCTION = 9; + /** + * A customer service job, such s Cashier. + * + * Generated from protobuf enum CUSTOMER_SERVICE = 10; + */ + const CUSTOMER_SERVICE = 10; + /** + * An education job, such as School Teacher. + * + * Generated from protobuf enum EDUCATION = 11; + */ + const EDUCATION = 11; + /** + * An entertainment and travel job, such as Flight Attendant. + * + * Generated from protobuf enum ENTERTAINMENT_AND_TRAVEL = 12; + */ + const ENTERTAINMENT_AND_TRAVEL = 12; + /** + * A farming or outdoor job, such as Park Ranger. + * + * Generated from protobuf enum FARMING_AND_OUTDOORS = 13; + */ + const FARMING_AND_OUTDOORS = 13; + /** + * A healthcare job, such as Registered Nurse. + * + * Generated from protobuf enum HEALTHCARE = 14; + */ + const HEALTHCARE = 14; + /** + * A human resources job, such as Human Resources Director. + * + * Generated from protobuf enum HUMAN_RESOURCES = 15; + */ + const HUMAN_RESOURCES = 15; + /** + * An installation, maintenance, or repair job, such as Electrician. + * + * Generated from protobuf enum INSTALLATION_MAINTENANCE_AND_REPAIR = 16; + */ + const INSTALLATION_MAINTENANCE_AND_REPAIR = 16; + /** + * A legal job, such as Law Clerk. + * + * Generated from protobuf enum LEGAL = 17; + */ + const LEGAL = 17; + /** + * A management job, often used in conjunction with another category, + * such as Store Manager. + * + * Generated from protobuf enum MANAGEMENT = 18; + */ + const MANAGEMENT = 18; + /** + * A manufacturing or warehouse job, such as Assembly Technician. + * + * Generated from protobuf enum MANUFACTURING_AND_WAREHOUSE = 19; + */ + const MANUFACTURING_AND_WAREHOUSE = 19; + /** + * A media, communications, or writing job, such as Media Relations. + * + * Generated from protobuf enum MEDIA_COMMUNICATIONS_AND_WRITING = 20; + */ + const MEDIA_COMMUNICATIONS_AND_WRITING = 20; + /** + * An oil, gas or mining job, such as Offshore Driller. + * + * Generated from protobuf enum OIL_GAS_AND_MINING = 21; + */ + const OIL_GAS_AND_MINING = 21; + /** + * A personal care and services job, such as Hair Stylist. + * + * Generated from protobuf enum PERSONAL_CARE_AND_SERVICES = 22; + */ + const PERSONAL_CARE_AND_SERVICES = 22; + /** + * A protective services job, such as Security Guard. + * + * Generated from protobuf enum PROTECTIVE_SERVICES = 23; + */ + const PROTECTIVE_SERVICES = 23; + /** + * A real estate job, such as Buyer's Agent. + * + * Generated from protobuf enum REAL_ESTATE = 24; + */ + const REAL_ESTATE = 24; + /** + * A restaurant and hospitality job, such as Restaurant Server. + * + * Generated from protobuf enum RESTAURANT_AND_HOSPITALITY = 25; + */ + const RESTAURANT_AND_HOSPITALITY = 25; + /** + * A sales and/or retail job, such Sales Associate. + * + * Generated from protobuf enum SALES_AND_RETAIL = 26; + */ + const SALES_AND_RETAIL = 26; + /** + * A science and engineering job, such as Lab Technician. + * + * Generated from protobuf enum SCIENCE_AND_ENGINEERING = 27; + */ + const SCIENCE_AND_ENGINEERING = 27; + /** + * A social services or non-profit job, such as Case Worker. + * + * Generated from protobuf enum SOCIAL_SERVICES_AND_NON_PROFIT = 28; + */ + const SOCIAL_SERVICES_AND_NON_PROFIT = 28; + /** + * A sports, fitness, or recreation job, such as Personal Trainer. + * + * Generated from protobuf enum SPORTS_FITNESS_AND_RECREATION = 29; + */ + const SPORTS_FITNESS_AND_RECREATION = 29; + /** + * A transportation or logistics job, such as Truck Driver. + * + * Generated from protobuf enum TRANSPORTATION_AND_LOGISTICS = 30; + */ + const TRANSPORTATION_AND_LOGISTICS = 30; + + private static $valueToName = [ + self::JOB_CATEGORY_UNSPECIFIED => 'JOB_CATEGORY_UNSPECIFIED', + self::ACCOUNTING_AND_FINANCE => 'ACCOUNTING_AND_FINANCE', + self::ADMINISTRATIVE_AND_OFFICE => 'ADMINISTRATIVE_AND_OFFICE', + self::ADVERTISING_AND_MARKETING => 'ADVERTISING_AND_MARKETING', + self::ANIMAL_CARE => 'ANIMAL_CARE', + self::ART_FASHION_AND_DESIGN => 'ART_FASHION_AND_DESIGN', + self::BUSINESS_OPERATIONS => 'BUSINESS_OPERATIONS', + self::CLEANING_AND_FACILITIES => 'CLEANING_AND_FACILITIES', + self::COMPUTER_AND_IT => 'COMPUTER_AND_IT', + self::CONSTRUCTION => 'CONSTRUCTION', + self::CUSTOMER_SERVICE => 'CUSTOMER_SERVICE', + self::EDUCATION => 'EDUCATION', + self::ENTERTAINMENT_AND_TRAVEL => 'ENTERTAINMENT_AND_TRAVEL', + self::FARMING_AND_OUTDOORS => 'FARMING_AND_OUTDOORS', + self::HEALTHCARE => 'HEALTHCARE', + self::HUMAN_RESOURCES => 'HUMAN_RESOURCES', + self::INSTALLATION_MAINTENANCE_AND_REPAIR => 'INSTALLATION_MAINTENANCE_AND_REPAIR', + self::LEGAL => 'LEGAL', + self::MANAGEMENT => 'MANAGEMENT', + self::MANUFACTURING_AND_WAREHOUSE => 'MANUFACTURING_AND_WAREHOUSE', + self::MEDIA_COMMUNICATIONS_AND_WRITING => 'MEDIA_COMMUNICATIONS_AND_WRITING', + self::OIL_GAS_AND_MINING => 'OIL_GAS_AND_MINING', + self::PERSONAL_CARE_AND_SERVICES => 'PERSONAL_CARE_AND_SERVICES', + self::PROTECTIVE_SERVICES => 'PROTECTIVE_SERVICES', + self::REAL_ESTATE => 'REAL_ESTATE', + self::RESTAURANT_AND_HOSPITALITY => 'RESTAURANT_AND_HOSPITALITY', + self::SALES_AND_RETAIL => 'SALES_AND_RETAIL', + self::SCIENCE_AND_ENGINEERING => 'SCIENCE_AND_ENGINEERING', + self::SOCIAL_SERVICES_AND_NON_PROFIT => 'SOCIAL_SERVICES_AND_NON_PROFIT', + self::SPORTS_FITNESS_AND_RECREATION => 'SPORTS_FITNESS_AND_RECREATION', + self::TRANSPORTATION_AND_LOGISTICS => 'TRANSPORTATION_AND_LOGISTICS', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php new file mode 100644 index 000000000000..cfd7b03e35ef --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php @@ -0,0 +1,142 @@ +google.cloud.talent.v4.JobEvent + */ +class JobEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the event (see + * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). + * + * Generated from protobuf field .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated + * with this event. For example, if this is an + * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] + * event, this field contains the identifiers of all jobs shown to the job + * seeker. If this was a + * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field + * contains the identifier of the viewed job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for + * example, "projects/foo/tenants/bar/jobs/baz". + * + * Generated from protobuf field repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $jobs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. The type of the event (see + * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). + * @type array|\Google\Protobuf\Internal\RepeatedField $jobs + * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated + * with this event. For example, if this is an + * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] + * event, this field contains the identifiers of all jobs shown to the job + * seeker. If this was a + * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field + * contains the identifier of the viewed job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for + * example, "projects/foo/tenants/bar/jobs/baz". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Event::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the event (see + * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). + * + * Generated from protobuf field .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of the event (see + * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). + * + * Generated from protobuf field .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobEvent\JobEventType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated + * with this event. For example, if this is an + * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] + * event, this field contains the identifiers of all jobs shown to the job + * seeker. If this was a + * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field + * contains the identifier of the viewed job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for + * example, "projects/foo/tenants/bar/jobs/baz". + * + * Generated from protobuf field repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated + * with this event. For example, if this is an + * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] + * event, this field contains the identifiers of all jobs shown to the job + * seeker. If this was a + * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field + * contains the identifier of the viewed job. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for + * example, "projects/foo/tenants/bar/jobs/baz". + * + * Generated from protobuf field repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->jobs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php new file mode 100644 index 000000000000..9d559eaacdf2 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php @@ -0,0 +1,203 @@ +google.cloud.talent.v4.JobEvent.JobEventType + */ +class JobEventType +{ + /** + * The event is unspecified by other provided values. + * + * Generated from protobuf enum JOB_EVENT_TYPE_UNSPECIFIED = 0; + */ + const JOB_EVENT_TYPE_UNSPECIFIED = 0; + /** + * The job seeker or other entity interacting with the service has + * had a job rendered in their view, such as in a list of search results in + * a compressed or clipped format. This event is typically associated with + * the viewing of a jobs list on a single page by a job seeker. + * + * Generated from protobuf enum IMPRESSION = 1; + */ + const IMPRESSION = 1; + /** + * The job seeker, or other entity interacting with the service, has + * viewed the details of a job, including the full description. This + * event doesn't apply to the viewing a snippet of a job appearing as a + * part of the job search results. Viewing a snippet is associated with an + * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]). + * + * Generated from protobuf enum VIEW = 2; + */ + const VIEW = 2; + /** + * The job seeker or other entity interacting with the service + * performed an action to view a job and was redirected to a different + * website for job. + * + * Generated from protobuf enum VIEW_REDIRECT = 3; + */ + const VIEW_REDIRECT = 3; + /** + * The job seeker or other entity interacting with the service + * began the process or demonstrated the intention of applying for a job. + * + * Generated from protobuf enum APPLICATION_START = 4; + */ + const APPLICATION_START = 4; + /** + * The job seeker or other entity interacting with the service + * submitted an application for a job. + * + * Generated from protobuf enum APPLICATION_FINISH = 5; + */ + const APPLICATION_FINISH = 5; + /** + * The job seeker or other entity interacting with the service + * submitted an application for a job with a single click without + * entering information. If a job seeker performs this action, send only + * this event to the service. Do not also send + * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START] + * or + * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH] + * events. + * + * Generated from protobuf enum APPLICATION_QUICK_SUBMISSION = 6; + */ + const APPLICATION_QUICK_SUBMISSION = 6; + /** + * The job seeker or other entity interacting with the service + * performed an action to apply to a job and was redirected to a different + * website to complete the application. + * + * Generated from protobuf enum APPLICATION_REDIRECT = 7; + */ + const APPLICATION_REDIRECT = 7; + /** + * The job seeker or other entity interacting with the service began the + * process or demonstrated the intention of applying for a job from the + * search results page without viewing the details of the job posting. + * If sending this event, JobEventType.VIEW event shouldn't be sent. + * + * Generated from protobuf enum APPLICATION_START_FROM_SEARCH = 8; + */ + const APPLICATION_START_FROM_SEARCH = 8; + /** + * The job seeker, or other entity interacting with the service, performs an + * action with a single click from the search results page to apply to a job + * (without viewing the details of the job posting), and is redirected + * to a different website to complete the application. If a candidate + * performs this action, send only this event to the service. Do not also + * send + * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START], + * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH] + * or [JobEventType.VIEW][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] + * events. + * + * Generated from protobuf enum APPLICATION_REDIRECT_FROM_SEARCH = 9; + */ + const APPLICATION_REDIRECT_FROM_SEARCH = 9; + /** + * This event should be used when a company submits an application + * on behalf of a job seeker. This event is intended for use by staffing + * agencies attempting to place candidates. + * + * Generated from protobuf enum APPLICATION_COMPANY_SUBMIT = 10; + */ + const APPLICATION_COMPANY_SUBMIT = 10; + /** + * The job seeker or other entity interacting with the service demonstrated + * an interest in a job by bookmarking or saving it. + * + * Generated from protobuf enum BOOKMARK = 11; + */ + const BOOKMARK = 11; + /** + * The job seeker or other entity interacting with the service was + * sent a notification, such as an email alert or device notification, + * containing one or more jobs listings generated by the service. + * + * Generated from protobuf enum NOTIFICATION = 12; + */ + const NOTIFICATION = 12; + /** + * The job seeker or other entity interacting with the service was + * employed by the hiring entity (employer). Send this event + * only if the job seeker was hired through an application that was + * initiated by a search conducted through the Cloud Talent Solution + * service. + * + * Generated from protobuf enum HIRED = 13; + */ + const HIRED = 13; + /** + * A recruiter or staffing agency submitted an application on behalf of the + * candidate after interacting with the service to identify a suitable job + * posting. + * + * Generated from protobuf enum SENT_CV = 14; + */ + const SENT_CV = 14; + /** + * The entity interacting with the service (for example, the job seeker), + * was granted an initial interview by the hiring entity (employer). This + * event should only be sent if the job seeker was granted an interview as + * part of an application that was initiated by a search conducted through / + * recommendation provided by the Cloud Talent Solution service. + * + * Generated from protobuf enum INTERVIEW_GRANTED = 15; + */ + const INTERVIEW_GRANTED = 15; + + private static $valueToName = [ + self::JOB_EVENT_TYPE_UNSPECIFIED => 'JOB_EVENT_TYPE_UNSPECIFIED', + self::IMPRESSION => 'IMPRESSION', + self::VIEW => 'VIEW', + self::VIEW_REDIRECT => 'VIEW_REDIRECT', + self::APPLICATION_START => 'APPLICATION_START', + self::APPLICATION_FINISH => 'APPLICATION_FINISH', + self::APPLICATION_QUICK_SUBMISSION => 'APPLICATION_QUICK_SUBMISSION', + self::APPLICATION_REDIRECT => 'APPLICATION_REDIRECT', + self::APPLICATION_START_FROM_SEARCH => 'APPLICATION_START_FROM_SEARCH', + self::APPLICATION_REDIRECT_FROM_SEARCH => 'APPLICATION_REDIRECT_FROM_SEARCH', + self::APPLICATION_COMPANY_SUBMIT => 'APPLICATION_COMPANY_SUBMIT', + self::BOOKMARK => 'BOOKMARK', + self::NOTIFICATION => 'NOTIFICATION', + self::HIRED => 'HIRED', + self::SENT_CV => 'SENT_CV', + self::INTERVIEW_GRANTED => 'INTERVIEW_GRANTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JobEventType::class, \Google\Cloud\Talent\V4\JobEvent_JobEventType::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php new file mode 100644 index 000000000000..10222117baa9 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php @@ -0,0 +1,84 @@ +google.cloud.talent.v4.JobLevel + */ +class JobLevel +{ + /** + * The default value if the level isn't specified. + * + * Generated from protobuf enum JOB_LEVEL_UNSPECIFIED = 0; + */ + const JOB_LEVEL_UNSPECIFIED = 0; + /** + * Entry-level individual contributors, typically with less than 2 years of + * experience in a similar role. Includes interns. + * + * Generated from protobuf enum ENTRY_LEVEL = 1; + */ + const ENTRY_LEVEL = 1; + /** + * Experienced individual contributors, typically with 2+ years of + * experience in a similar role. + * + * Generated from protobuf enum EXPERIENCED = 2; + */ + const EXPERIENCED = 2; + /** + * Entry- to mid-level managers responsible for managing a team of people. + * + * Generated from protobuf enum MANAGER = 3; + */ + const MANAGER = 3; + /** + * Senior-level managers responsible for managing teams of managers. + * + * Generated from protobuf enum DIRECTOR = 4; + */ + const DIRECTOR = 4; + /** + * Executive-level managers and above, including C-level positions. + * + * Generated from protobuf enum EXECUTIVE = 5; + */ + const EXECUTIVE = 5; + + private static $valueToName = [ + self::JOB_LEVEL_UNSPECIFIED => 'JOB_LEVEL_UNSPECIFIED', + self::ENTRY_LEVEL => 'ENTRY_LEVEL', + self::EXPERIENCED => 'EXPERIENCED', + self::MANAGER => 'MANAGER', + self::DIRECTOR => 'DIRECTOR', + self::EXECUTIVE => 'EXECUTIVE', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php new file mode 100644 index 000000000000..fec6e751a75f --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php @@ -0,0 +1,907 @@ +google.cloud.talent.v4.JobQuery + */ +class JobQuery extends \Google\Protobuf\Internal\Message +{ + /** + * The query string that matches against the job title, description, and + * location fields. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For + * example, "en-US". This field helps to better interpret the query. + * If a value isn't specified, the query language code is automatically + * detected, which may not be accurate. + * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * + * Generated from protobuf field string query_language_code = 14; + */ + protected $query_language_code = ''; + /** + * This filter specifies the company entities to search against. + * If a value isn't specified, jobs are searched for against all + * companies. + * If multiple values are specified, jobs are searched against the + * companies specified. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * At most 20 company filters are allowed. + * + * Generated from protobuf field repeated string companies = 2; + */ + private $companies; + /** + * The location filter specifies geo-regions containing the jobs to + * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] + * for more information. + * If a location value isn't specified, jobs fitting the other search + * criteria are retrieved regardless of where they're located. + * If multiple values are specified, jobs are retrieved from any of the + * specified locations. If different values are specified for the + * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] + * parameter, the maximum provided distance is used for all locations. + * At most 5 location filters are allowed. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + */ + private $location_filters; + /** + * The category filter specifies the categories of jobs to search against. + * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. + * If a value isn't specified, jobs from any category are searched against. + * If multiple values are specified, jobs from any of the specified + * categories are searched against. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + */ + private $job_categories; + /** + * Allows filtering jobs by commute time with different travel methods (for + * example, driving or public transit). + * Note: This only works when you specify a + * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, + * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is + * ignored. + * Currently we don't support sorting by commute time. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + */ + protected $commute_filter = null; + /** + * This filter specifies the company + * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the + * jobs to search against. The company name must match the value exactly. + * Alternatively, the value being searched for can be wrapped in different + * match operators. + * `SUBSTRING_MATCH([value])` + * The company name must contain a case insensitive substring match of the + * value. Using this function may increase latency. + * Sample Value: `SUBSTRING_MATCH(google)` + * `MULTI_WORD_TOKEN_MATCH([value])` + * The value will be treated as a multi word token and the company name must + * contain a case insensitive match of the value. Using this function may + * increase latency. + * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` + * If a value isn't specified, jobs within the search results are + * associated with any company. + * If multiple values are specified, jobs within the search results may be + * associated with any of the specified companies. + * At most 20 company display name filters are allowed. + * + * Generated from protobuf field repeated string company_display_names = 6; + */ + private $company_display_names; + /** + * This search filter is applied only to + * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For + * example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs meeting these criteria are searched. If a + * filter isn't defined, all open jobs are searched. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + */ + protected $compensation_filter = null; + /** + * This filter specifies a structured syntax to match against the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * marked as `filterable`. + * The syntax for this expression is a subset of SQL syntax. + * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + * left of the operator is a custom field key and the right of the operator + * is a number or a quoted string. You must escape backslash (\\) and + * quote (\") characters. + * Supported functions are `LOWER([field_name])` to + * perform a case insensitive match and `EMPTY([field_name])` to filter on the + * existence of a key. + * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of + * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + * comparisons or functions are allowed in the expression. The expression + * must be < 10000 bytes in length. + * Sample Query: + * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + * driving_years > 10` + * + * Generated from protobuf field string custom_attribute_filter = 8; + */ + protected $custom_attribute_filter = ''; + /** + * This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, + * for example, "enginee" is corrected to "engineer". + * Defaults to false: a spell check is performed. + * + * Generated from protobuf field bool disable_spell_check = 9; + */ + protected $disable_spell_check = false; + /** + * The employment type filter specifies the employment type of jobs to + * search against, such as + * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. + * If a value isn't specified, jobs in the search results includes any + * employment type. + * If multiple values are specified, jobs in the search results include + * any of the specified employment types. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + */ + private $employment_types; + /** + * This filter specifies the locale of jobs to search against, + * for example, "en-US". + * If a value isn't specified, the search results can contain jobs in any + * locale. + * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * At most 10 language code filters are allowed. + * + * Generated from protobuf field repeated string language_codes = 11; + */ + private $language_codes; + /** + * Jobs published within a range specified by this filter are searched + * against. + * + * Generated from protobuf field .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + */ + protected $publish_time_range = null; + /** + * This filter specifies a list of job names to be excluded during search. + * At most 400 excluded job names are allowed. + * + * Generated from protobuf field repeated string excluded_jobs = 13; + */ + private $excluded_jobs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * The query string that matches against the job title, description, and + * location fields. + * The maximum number of allowed characters is 255. + * @type string $query_language_code + * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For + * example, "en-US". This field helps to better interpret the query. + * If a value isn't specified, the query language code is automatically + * detected, which may not be accurate. + * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * @type array|\Google\Protobuf\Internal\RepeatedField $companies + * This filter specifies the company entities to search against. + * If a value isn't specified, jobs are searched for against all + * companies. + * If multiple values are specified, jobs are searched against the + * companies specified. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * At most 20 company filters are allowed. + * @type array<\Google\Cloud\Talent\V4\LocationFilter>|\Google\Protobuf\Internal\RepeatedField $location_filters + * The location filter specifies geo-regions containing the jobs to + * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] + * for more information. + * If a location value isn't specified, jobs fitting the other search + * criteria are retrieved regardless of where they're located. + * If multiple values are specified, jobs are retrieved from any of the + * specified locations. If different values are specified for the + * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] + * parameter, the maximum provided distance is used for all locations. + * At most 5 location filters are allowed. + * @type array|\Google\Protobuf\Internal\RepeatedField $job_categories + * The category filter specifies the categories of jobs to search against. + * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. + * If a value isn't specified, jobs from any category are searched against. + * If multiple values are specified, jobs from any of the specified + * categories are searched against. + * @type \Google\Cloud\Talent\V4\CommuteFilter $commute_filter + * Allows filtering jobs by commute time with different travel methods (for + * example, driving or public transit). + * Note: This only works when you specify a + * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, + * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is + * ignored. + * Currently we don't support sorting by commute time. + * @type array|\Google\Protobuf\Internal\RepeatedField $company_display_names + * This filter specifies the company + * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the + * jobs to search against. The company name must match the value exactly. + * Alternatively, the value being searched for can be wrapped in different + * match operators. + * `SUBSTRING_MATCH([value])` + * The company name must contain a case insensitive substring match of the + * value. Using this function may increase latency. + * Sample Value: `SUBSTRING_MATCH(google)` + * `MULTI_WORD_TOKEN_MATCH([value])` + * The value will be treated as a multi word token and the company name must + * contain a case insensitive match of the value. Using this function may + * increase latency. + * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` + * If a value isn't specified, jobs within the search results are + * associated with any company. + * If multiple values are specified, jobs within the search results may be + * associated with any of the specified companies. + * At most 20 company display name filters are allowed. + * @type \Google\Cloud\Talent\V4\CompensationFilter $compensation_filter + * This search filter is applied only to + * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For + * example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs meeting these criteria are searched. If a + * filter isn't defined, all open jobs are searched. + * @type string $custom_attribute_filter + * This filter specifies a structured syntax to match against the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * marked as `filterable`. + * The syntax for this expression is a subset of SQL syntax. + * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + * left of the operator is a custom field key and the right of the operator + * is a number or a quoted string. You must escape backslash (\\) and + * quote (\") characters. + * Supported functions are `LOWER([field_name])` to + * perform a case insensitive match and `EMPTY([field_name])` to filter on the + * existence of a key. + * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of + * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + * comparisons or functions are allowed in the expression. The expression + * must be < 10000 bytes in length. + * Sample Query: + * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + * driving_years > 10` + * @type bool $disable_spell_check + * This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, + * for example, "enginee" is corrected to "engineer". + * Defaults to false: a spell check is performed. + * @type array|\Google\Protobuf\Internal\RepeatedField $employment_types + * The employment type filter specifies the employment type of jobs to + * search against, such as + * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. + * If a value isn't specified, jobs in the search results includes any + * employment type. + * If multiple values are specified, jobs in the search results include + * any of the specified employment types. + * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes + * This filter specifies the locale of jobs to search against, + * for example, "en-US". + * If a value isn't specified, the search results can contain jobs in any + * locale. + * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * At most 10 language code filters are allowed. + * @type \Google\Cloud\Talent\V4\TimestampRange $publish_time_range + * Jobs published within a range specified by this filter are searched + * against. + * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_jobs + * This filter specifies a list of job names to be excluded during search. + * At most 400 excluded job names are allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); + parent::__construct($data); + } + + /** + * The query string that matches against the job title, description, and + * location fields. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * The query string that matches against the job title, description, and + * location fields. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For + * example, "en-US". This field helps to better interpret the query. + * If a value isn't specified, the query language code is automatically + * detected, which may not be accurate. + * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * + * Generated from protobuf field string query_language_code = 14; + * @return string + */ + public function getQueryLanguageCode() + { + return $this->query_language_code; + } + + /** + * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For + * example, "en-US". This field helps to better interpret the query. + * If a value isn't specified, the query language code is automatically + * detected, which may not be accurate. + * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * + * Generated from protobuf field string query_language_code = 14; + * @param string $var + * @return $this + */ + public function setQueryLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->query_language_code = $var; + + return $this; + } + + /** + * This filter specifies the company entities to search against. + * If a value isn't specified, jobs are searched for against all + * companies. + * If multiple values are specified, jobs are searched against the + * companies specified. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * At most 20 company filters are allowed. + * + * Generated from protobuf field repeated string companies = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanies() + { + return $this->companies; + } + + /** + * This filter specifies the company entities to search against. + * If a value isn't specified, jobs are searched for against all + * companies. + * If multiple values are specified, jobs are searched against the + * companies specified. + * The format is + * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For + * example, "projects/foo/tenants/bar/companies/baz". + * At most 20 company filters are allowed. + * + * Generated from protobuf field repeated string companies = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->companies = $arr; + + return $this; + } + + /** + * The location filter specifies geo-regions containing the jobs to + * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] + * for more information. + * If a location value isn't specified, jobs fitting the other search + * criteria are retrieved regardless of where they're located. + * If multiple values are specified, jobs are retrieved from any of the + * specified locations. If different values are specified for the + * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] + * parameter, the maximum provided distance is used for all locations. + * At most 5 location filters are allowed. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocationFilters() + { + return $this->location_filters; + } + + /** + * The location filter specifies geo-regions containing the jobs to + * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] + * for more information. + * If a location value isn't specified, jobs fitting the other search + * criteria are retrieved regardless of where they're located. + * If multiple values are specified, jobs are retrieved from any of the + * specified locations. If different values are specified for the + * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] + * parameter, the maximum provided distance is used for all locations. + * At most 5 location filters are allowed. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; + * @param array<\Google\Cloud\Talent\V4\LocationFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocationFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\LocationFilter::class); + $this->location_filters = $arr; + + return $this; + } + + /** + * The category filter specifies the categories of jobs to search against. + * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. + * If a value isn't specified, jobs from any category are searched against. + * If multiple values are specified, jobs from any of the specified + * categories are searched against. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobCategories() + { + return $this->job_categories; + } + + /** + * The category filter specifies the categories of jobs to search against. + * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. + * If a value isn't specified, jobs from any category are searched against. + * If multiple values are specified, jobs from any of the specified + * categories are searched against. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\JobCategory::class); + $this->job_categories = $arr; + + return $this; + } + + /** + * Allows filtering jobs by commute time with different travel methods (for + * example, driving or public transit). + * Note: This only works when you specify a + * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, + * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is + * ignored. + * Currently we don't support sorting by commute time. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * @return \Google\Cloud\Talent\V4\CommuteFilter|null + */ + public function getCommuteFilter() + { + return $this->commute_filter; + } + + public function hasCommuteFilter() + { + return isset($this->commute_filter); + } + + public function clearCommuteFilter() + { + unset($this->commute_filter); + } + + /** + * Allows filtering jobs by commute time with different travel methods (for + * example, driving or public transit). + * Note: This only works when you specify a + * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, + * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is + * ignored. + * Currently we don't support sorting by commute time. + * + * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter commute_filter = 5; + * @param \Google\Cloud\Talent\V4\CommuteFilter $var + * @return $this + */ + public function setCommuteFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CommuteFilter::class); + $this->commute_filter = $var; + + return $this; + } + + /** + * This filter specifies the company + * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the + * jobs to search against. The company name must match the value exactly. + * Alternatively, the value being searched for can be wrapped in different + * match operators. + * `SUBSTRING_MATCH([value])` + * The company name must contain a case insensitive substring match of the + * value. Using this function may increase latency. + * Sample Value: `SUBSTRING_MATCH(google)` + * `MULTI_WORD_TOKEN_MATCH([value])` + * The value will be treated as a multi word token and the company name must + * contain a case insensitive match of the value. Using this function may + * increase latency. + * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` + * If a value isn't specified, jobs within the search results are + * associated with any company. + * If multiple values are specified, jobs within the search results may be + * associated with any of the specified companies. + * At most 20 company display name filters are allowed. + * + * Generated from protobuf field repeated string company_display_names = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanyDisplayNames() + { + return $this->company_display_names; + } + + /** + * This filter specifies the company + * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the + * jobs to search against. The company name must match the value exactly. + * Alternatively, the value being searched for can be wrapped in different + * match operators. + * `SUBSTRING_MATCH([value])` + * The company name must contain a case insensitive substring match of the + * value. Using this function may increase latency. + * Sample Value: `SUBSTRING_MATCH(google)` + * `MULTI_WORD_TOKEN_MATCH([value])` + * The value will be treated as a multi word token and the company name must + * contain a case insensitive match of the value. Using this function may + * increase latency. + * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` + * If a value isn't specified, jobs within the search results are + * associated with any company. + * If multiple values are specified, jobs within the search results may be + * associated with any of the specified companies. + * At most 20 company display name filters are allowed. + * + * Generated from protobuf field repeated string company_display_names = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanyDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->company_display_names = $arr; + + return $this; + } + + /** + * This search filter is applied only to + * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For + * example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs meeting these criteria are searched. If a + * filter isn't defined, all open jobs are searched. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * @return \Google\Cloud\Talent\V4\CompensationFilter|null + */ + public function getCompensationFilter() + { + return $this->compensation_filter; + } + + public function hasCompensationFilter() + { + return isset($this->compensation_filter); + } + + public function clearCompensationFilter() + { + unset($this->compensation_filter); + } + + /** + * This search filter is applied only to + * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For + * example, if the filter is specified as "Hourly job with per-hour + * compensation > $15", only jobs meeting these criteria are searched. If a + * filter isn't defined, all open jobs are searched. + * + * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; + * @param \Google\Cloud\Talent\V4\CompensationFilter $var + * @return $this + */ + public function setCompensationFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationFilter::class); + $this->compensation_filter = $var; + + return $this; + } + + /** + * This filter specifies a structured syntax to match against the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * marked as `filterable`. + * The syntax for this expression is a subset of SQL syntax. + * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + * left of the operator is a custom field key and the right of the operator + * is a number or a quoted string. You must escape backslash (\\) and + * quote (\") characters. + * Supported functions are `LOWER([field_name])` to + * perform a case insensitive match and `EMPTY([field_name])` to filter on the + * existence of a key. + * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of + * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + * comparisons or functions are allowed in the expression. The expression + * must be < 10000 bytes in length. + * Sample Query: + * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + * driving_years > 10` + * + * Generated from protobuf field string custom_attribute_filter = 8; + * @return string + */ + public function getCustomAttributeFilter() + { + return $this->custom_attribute_filter; + } + + /** + * This filter specifies a structured syntax to match against the + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * marked as `filterable`. + * The syntax for this expression is a subset of SQL syntax. + * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the + * left of the operator is a custom field key and the right of the operator + * is a number or a quoted string. You must escape backslash (\\) and + * quote (\") characters. + * Supported functions are `LOWER([field_name])` to + * perform a case insensitive match and `EMPTY([field_name])` to filter on the + * existence of a key. + * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of + * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 + * comparisons or functions are allowed in the expression. The expression + * must be < 10000 bytes in length. + * Sample Query: + * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND + * driving_years > 10` + * + * Generated from protobuf field string custom_attribute_filter = 8; + * @param string $var + * @return $this + */ + public function setCustomAttributeFilter($var) + { + GPBUtil::checkString($var, True); + $this->custom_attribute_filter = $var; + + return $this; + } + + /** + * This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, + * for example, "enginee" is corrected to "engineer". + * Defaults to false: a spell check is performed. + * + * Generated from protobuf field bool disable_spell_check = 9; + * @return bool + */ + public function getDisableSpellCheck() + { + return $this->disable_spell_check; + } + + /** + * This flag controls the spell-check feature. If false, the + * service attempts to correct a misspelled query, + * for example, "enginee" is corrected to "engineer". + * Defaults to false: a spell check is performed. + * + * Generated from protobuf field bool disable_spell_check = 9; + * @param bool $var + * @return $this + */ + public function setDisableSpellCheck($var) + { + GPBUtil::checkBool($var); + $this->disable_spell_check = $var; + + return $this; + } + + /** + * The employment type filter specifies the employment type of jobs to + * search against, such as + * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. + * If a value isn't specified, jobs in the search results includes any + * employment type. + * If multiple values are specified, jobs in the search results include + * any of the specified employment types. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEmploymentTypes() + { + return $this->employment_types; + } + + /** + * The employment type filter specifies the employment type of jobs to + * search against, such as + * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. + * If a value isn't specified, jobs in the search results includes any + * employment type. + * If multiple values are specified, jobs in the search results include + * any of the specified employment types. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEmploymentTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\EmploymentType::class); + $this->employment_types = $arr; + + return $this; + } + + /** + * This filter specifies the locale of jobs to search against, + * for example, "en-US". + * If a value isn't specified, the search results can contain jobs in any + * locale. + * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * At most 10 language code filters are allowed. + * + * Generated from protobuf field repeated string language_codes = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageCodes() + { + return $this->language_codes; + } + + /** + * This filter specifies the locale of jobs to search against, + * for example, "en-US". + * If a value isn't specified, the search results can contain jobs in any + * locale. + * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". + * For more information, see + * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). + * At most 10 language code filters are allowed. + * + * Generated from protobuf field repeated string language_codes = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_codes = $arr; + + return $this; + } + + /** + * Jobs published within a range specified by this filter are searched + * against. + * + * Generated from protobuf field .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * @return \Google\Cloud\Talent\V4\TimestampRange|null + */ + public function getPublishTimeRange() + { + return $this->publish_time_range; + } + + public function hasPublishTimeRange() + { + return isset($this->publish_time_range); + } + + public function clearPublishTimeRange() + { + unset($this->publish_time_range); + } + + /** + * Jobs published within a range specified by this filter are searched + * against. + * + * Generated from protobuf field .google.cloud.talent.v4.TimestampRange publish_time_range = 12; + * @param \Google\Cloud\Talent\V4\TimestampRange $var + * @return $this + */ + public function setPublishTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\TimestampRange::class); + $this->publish_time_range = $var; + + return $this; + } + + /** + * This filter specifies a list of job names to be excluded during search. + * At most 400 excluded job names are allowed. + * + * Generated from protobuf field repeated string excluded_jobs = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludedJobs() + { + return $this->excluded_jobs; + } + + /** + * This filter specifies a list of job names to be excluded during search. + * At most 400 excluded job names are allowed. + * + * Generated from protobuf field repeated string excluded_jobs = 13; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludedJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excluded_jobs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php new file mode 100644 index 000000000000..eedd9f2185c4 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php @@ -0,0 +1,145 @@ +google.cloud.talent.v4.JobResult + */ +class JobResult extends \Google\Protobuf\Internal\Message +{ + /** + * Here [Job][google.cloud.talent.v4.Job] only contains basic information + * including [name][google.cloud.talent.v4.Job.name], + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob + * method to retrieve detailed information of the created/updated job. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; + */ + protected $job = null; + /** + * The status of the job processed. This field is populated if the + * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. + * + * Generated from protobuf field .google.rpc.Status status = 2; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Job $job + * Here [Job][google.cloud.talent.v4.Job] only contains basic information + * including [name][google.cloud.talent.v4.Job.name], + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob + * method to retrieve detailed information of the created/updated job. + * @type \Google\Rpc\Status $status + * The status of the job processed. This field is populated if the + * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Here [Job][google.cloud.talent.v4.Job] only contains basic information + * including [name][google.cloud.talent.v4.Job.name], + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob + * method to retrieve detailed information of the created/updated job. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; + * @return \Google\Cloud\Talent\V4\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Here [Job][google.cloud.talent.v4.Job] only contains basic information + * including [name][google.cloud.talent.v4.Job.name], + * [company][google.cloud.talent.v4.Job.company], + * [language_code][google.cloud.talent.v4.Job.language_code] and + * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob + * method to retrieve detailed information of the created/updated job. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; + * @param \Google\Cloud\Talent\V4\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); + $this->job = $var; + + return $this; + } + + /** + * The status of the job processed. This field is populated if the + * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status of the job processed. This field is populated if the + * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. + * + * Generated from protobuf field .google.rpc.Status status = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php new file mode 100644 index 000000000000..c58c917b5b79 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php @@ -0,0 +1,95 @@ +google.cloud.talent.v4.JobView + */ +class JobView +{ + /** + * Default value. + * + * Generated from protobuf enum JOB_VIEW_UNSPECIFIED = 0; + */ + const JOB_VIEW_UNSPECIFIED = 0; + /** + * A ID only view of job, with following attributes: + * [Job.name][google.cloud.talent.v4.Job.name], + * [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], + * [Job.language_code][google.cloud.talent.v4.Job.language_code]. + * + * Generated from protobuf enum JOB_VIEW_ID_ONLY = 1; + */ + const JOB_VIEW_ID_ONLY = 1; + /** + * A minimal view of the job, with the following attributes: + * [Job.name][google.cloud.talent.v4.Job.name], + * [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.company][google.cloud.talent.v4.Job.company], + * [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], + * [Job.language_code][google.cloud.talent.v4.Job.language_code]. + * + * Generated from protobuf enum JOB_VIEW_MINIMAL = 2; + */ + const JOB_VIEW_MINIMAL = 2; + /** + * A small view of the job, with the following attributes in the search + * results: [Job.name][google.cloud.talent.v4.Job.name], + * [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.company][google.cloud.talent.v4.Job.company], + * [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], + * [Job.visibility][google.cloud.talent.v4.Job.visibility], + * [Job.language_code][google.cloud.talent.v4.Job.language_code], + * [Job.description][google.cloud.talent.v4.Job.description]. + * + * Generated from protobuf enum JOB_VIEW_SMALL = 3; + */ + const JOB_VIEW_SMALL = 3; + /** + * All available attributes are included in the search results. + * + * Generated from protobuf enum JOB_VIEW_FULL = 4; + */ + const JOB_VIEW_FULL = 4; + + private static $valueToName = [ + self::JOB_VIEW_UNSPECIFIED => 'JOB_VIEW_UNSPECIFIED', + self::JOB_VIEW_ID_ONLY => 'JOB_VIEW_ID_ONLY', + self::JOB_VIEW_MINIMAL => 'JOB_VIEW_MINIMAL', + self::JOB_VIEW_SMALL => 'JOB_VIEW_SMALL', + self::JOB_VIEW_FULL => 'JOB_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php new file mode 100644 index 000000000000..d7f6a0090dbc --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php @@ -0,0 +1,214 @@ +google.cloud.talent.v4.ListCompaniesRequest + */ +class ListCompaniesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The starting indicator from which to return results. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of companies to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Set to true if the companies requested must have open jobs. + * Defaults to false. + * If true, at most + * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of + * companies are fetched, among which only those with open jobs are returned. + * + * Generated from protobuf field bool require_open_jobs = 4; + */ + protected $require_open_jobs = false; + + /** + * @param string $parent Required. Resource name of the tenant under which the company is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". Please see + * {@see CompanyServiceClient::tenantName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\ListCompaniesRequest + * + * @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. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @type string $page_token + * The starting indicator from which to return results. + * @type int $page_size + * The maximum number of companies to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * @type bool $require_open_jobs + * Set to true if the companies requested must have open jobs. + * Defaults to false. + * If true, at most + * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of + * companies are fetched, among which only those with open jobs are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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. Resource name of the tenant under which the company is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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 starting indicator from which to return results. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The starting indicator from which to return results. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of companies to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of companies to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * + * 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; + } + + /** + * Set to true if the companies requested must have open jobs. + * Defaults to false. + * If true, at most + * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of + * companies are fetched, among which only those with open jobs are returned. + * + * Generated from protobuf field bool require_open_jobs = 4; + * @return bool + */ + public function getRequireOpenJobs() + { + return $this->require_open_jobs; + } + + /** + * Set to true if the companies requested must have open jobs. + * Defaults to false. + * If true, at most + * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of + * companies are fetched, among which only those with open jobs are returned. + * + * Generated from protobuf field bool require_open_jobs = 4; + * @param bool $var + * @return $this + */ + public function setRequireOpenJobs($var) + { + GPBUtil::checkBool($var); + $this->require_open_jobs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php new file mode 100644 index 000000000000..80503928143c --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php @@ -0,0 +1,149 @@ +google.cloud.talent.v4.ListCompaniesResponse + */ +class ListCompaniesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Companies for the current client. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Company companies = 1; + */ + private $companies; + /** + * A token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\Company>|\Google\Protobuf\Internal\RepeatedField $companies + * Companies for the current client. + * @type string $next_page_token + * A token to retrieve the next page of results. + * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata + * Additional information for the API invocation, such as the request + * tracking id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Companies for the current client. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Company companies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanies() + { + return $this->companies; + } + + /** + * Companies for the current client. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Company companies = 1; + * @param array<\Google\Cloud\Talent\V4\Company>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Company::class); + $this->companies = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. + * + * 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 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; + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * @return \Google\Cloud\Talent\V4\ResponseMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * @param \Google\Cloud\Talent\V4\ResponseMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php new file mode 100644 index 000000000000..fe9d67a7cf48 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php @@ -0,0 +1,348 @@ +google.cloud.talent.v4.ListJobsRequest + */ +class ListJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The filter string specifies the jobs to be enumerated. + * Supported operator: =, AND + * The fields eligible for filtering are: + * * `companyName` + * * `requisitionId` + * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + * OPEN if no value is specified. + * At least one of `companyName` and `requisitionId` must present or an + * INVALID_ARGUMENT error is thrown. + * Sample Query: + * * companyName = "projects/foo/tenants/bar/companies/baz" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * requisitionId = "req-1" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * status = "EXPIRED" + * * requisitionId = "req-1" + * * requisitionId = "req-1" AND status = "EXPIRED" + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * The starting point of a query result. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The maximum number of jobs to be returned per page of results. + * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to + * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], + * the maximum allowed page size is 1000. Otherwise, the maximum allowed page + * size is 100. + * Default is 100 if empty or a number < 1 is specified. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * The desired job attributes returned for jobs in the + * search response. Defaults to + * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no + * value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 5; + */ + protected $job_view = 0; + + /** + * @param string $parent Required. The resource name of the tenant under which the job is created. + * + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". Please see + * {@see JobServiceClient::tenantName()} for help formatting this field. + * @param string $filter Required. The filter string specifies the jobs to be enumerated. + * + * Supported operator: =, AND + * + * The fields eligible for filtering are: + * + * * `companyName` + * * `requisitionId` + * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + * OPEN if no value is specified. + * + * At least one of `companyName` and `requisitionId` must present or an + * INVALID_ARGUMENT error is thrown. + * + * Sample Query: + * + * * companyName = "projects/foo/tenants/bar/companies/baz" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * requisitionId = "req-1" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * status = "EXPIRED" + * * requisitionId = "req-1" + * * requisitionId = "req-1" AND status = "EXPIRED" + * + * @return \Google\Cloud\Talent\V4\ListJobsRequest + * + * @experimental + */ + public static function build(string $parent, string $filter): self + { + return (new self()) + ->setParent($parent) + ->setFilter($filter); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @type string $filter + * Required. The filter string specifies the jobs to be enumerated. + * Supported operator: =, AND + * The fields eligible for filtering are: + * * `companyName` + * * `requisitionId` + * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + * OPEN if no value is specified. + * At least one of `companyName` and `requisitionId` must present or an + * INVALID_ARGUMENT error is thrown. + * Sample Query: + * * companyName = "projects/foo/tenants/bar/companies/baz" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * requisitionId = "req-1" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * status = "EXPIRED" + * * requisitionId = "req-1" + * * requisitionId = "req-1" AND status = "EXPIRED" + * @type string $page_token + * The starting point of a query result. + * @type int $page_size + * The maximum number of jobs to be returned per page of results. + * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to + * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], + * the maximum allowed page size is 1000. Otherwise, the maximum allowed page + * size is 100. + * Default is 100 if empty or a number < 1 is specified. + * @type int $job_view + * The desired job attributes returned for jobs in the + * search response. Defaults to + * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no + * value is specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 tenant under which the job is created. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 filter string specifies the jobs to be enumerated. + * Supported operator: =, AND + * The fields eligible for filtering are: + * * `companyName` + * * `requisitionId` + * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + * OPEN if no value is specified. + * At least one of `companyName` and `requisitionId` must present or an + * INVALID_ARGUMENT error is thrown. + * Sample Query: + * * companyName = "projects/foo/tenants/bar/companies/baz" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * requisitionId = "req-1" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * status = "EXPIRED" + * * requisitionId = "req-1" + * * requisitionId = "req-1" AND status = "EXPIRED" + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. The filter string specifies the jobs to be enumerated. + * Supported operator: =, AND + * The fields eligible for filtering are: + * * `companyName` + * * `requisitionId` + * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to + * OPEN if no value is specified. + * At least one of `companyName` and `requisitionId` must present or an + * INVALID_ARGUMENT error is thrown. + * Sample Query: + * * companyName = "projects/foo/tenants/bar/companies/baz" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * requisitionId = "req-1" + * * companyName = "projects/foo/tenants/bar/companies/baz" AND + * status = "EXPIRED" + * * requisitionId = "req-1" + * * requisitionId = "req-1" AND status = "EXPIRED" + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The starting point of a query result. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The starting point of a query result. + * + * 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 maximum number of jobs to be returned per page of results. + * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to + * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], + * the maximum allowed page size is 1000. Otherwise, the maximum allowed page + * size is 100. + * Default is 100 if empty or a number < 1 is specified. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of jobs to be returned per page of results. + * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to + * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], + * the maximum allowed page size is 1000. Otherwise, the maximum allowed page + * size is 100. + * Default is 100 if empty or a number < 1 is specified. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The desired job attributes returned for jobs in the + * search response. Defaults to + * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no + * value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 5; + * @return int + */ + public function getJobView() + { + return $this->job_view; + } + + /** + * The desired job attributes returned for jobs in the + * search response. Defaults to + * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no + * value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 5; + * @param int $var + * @return $this + */ + public function setJobView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobView::class); + $this->job_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php new file mode 100644 index 000000000000..12eeddb8b473 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php @@ -0,0 +1,157 @@ +google.cloud.talent.v4.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Jobs for a given company. + * The maximum number of items returned is based on the limit field + * provided in the request. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 1; + */ + private $jobs; + /** + * A token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * The Jobs for a given company. + * The maximum number of items returned is based on the limit field + * provided in the request. + * @type string $next_page_token + * A token to retrieve the next page of results. + * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata + * Additional information for the API invocation, such as the request + * tracking id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * The Jobs for a given company. + * The maximum number of items returned is based on the limit field + * provided in the request. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * The Jobs for a given company. + * The maximum number of items returned is based on the limit field + * provided in the request. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 1; + * @param array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. + * + * 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 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; + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * @return \Google\Cloud\Talent\V4\ResponseMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * @param \Google\Cloud\Talent\V4\ResponseMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php new file mode 100644 index 000000000000..9414420b6aab --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php @@ -0,0 +1,164 @@ +google.cloud.talent.v4.ListTenantsRequest + */ +class ListTenantsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The starting indicator from which to return results. + * + * Generated from protobuf field string page_token = 2; + */ + protected $page_token = ''; + /** + * The maximum number of tenants to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. Resource name of the project under which the tenant is created. + * + * The format is "projects/{project_id}", for example, + * "projects/foo". Please see + * {@see TenantServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Talent\V4\ListTenantsRequest + * + * @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. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * @type string $page_token + * The starting indicator from which to return results. + * @type int $page_size + * The maximum number of tenants to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * + * 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. Resource name of the project under which the tenant is created. + * The format is "projects/{project_id}", for example, + * "projects/foo". + * + * 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 starting indicator from which to return results. + * + * Generated from protobuf field string page_token = 2; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The starting indicator from which to return results. + * + * Generated from protobuf field string page_token = 2; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of tenants to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of tenants to be returned, at most 100. + * Default is 100 if a non-positive number is provided. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php new file mode 100644 index 000000000000..e9117cb9d553 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php @@ -0,0 +1,149 @@ +google.cloud.talent.v4.ListTenantsResponse + */ +class ListTenantsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Tenants for the current client. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Tenant tenants = 1; + */ + private $tenants; + /** + * A token to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\Tenant>|\Google\Protobuf\Internal\RepeatedField $tenants + * Tenants for the current client. + * @type string $next_page_token + * A token to retrieve the next page of results. + * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata + * Additional information for the API invocation, such as the request + * tracking id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); + parent::__construct($data); + } + + /** + * Tenants for the current client. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Tenant tenants = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTenants() + { + return $this->tenants; + } + + /** + * Tenants for the current client. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Tenant tenants = 1; + * @param array<\Google\Cloud\Talent\V4\Tenant>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTenants($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Tenant::class); + $this->tenants = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. + * + * 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 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; + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * @return \Google\Cloud\Talent\V4\ResponseMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; + * @param \Google\Cloud\Talent\V4\ResponseMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php new file mode 100644 index 000000000000..53edacaaba94 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php @@ -0,0 +1,237 @@ +google.cloud.talent.v4.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * The type of a location, which corresponds to the address lines field of + * [google.type.PostalAddress][google.type.PostalAddress]. For example, + * "Downtown, Atlanta, GA, USA" has a type of + * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], + * and "Kansas City, KS, USA" has a type of + * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. + * + * Generated from protobuf field .google.cloud.talent.v4.Location.LocationType location_type = 1; + */ + protected $location_type = 0; + /** + * Postal address of the location that includes human readable information, + * such as postal delivery and payments addresses. Given a postal address, + * a postal service can deliver items to a premises, P.O. Box, or other + * delivery location. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 2; + */ + protected $postal_address = null; + /** + * An object representing a latitude/longitude pair. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 3; + */ + protected $lat_lng = null; + /** + * Radius in miles of the job location. This value is derived from the + * location bounding box in which a circle with the specified radius + * centered from [google.type.LatLng][google.type.LatLng] covers the area + * associated with the job location. For example, currently, "Mountain View, + * CA, USA" has a radius of 6.17 miles. + * + * Generated from protobuf field double radius_miles = 4; + */ + protected $radius_miles = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $location_type + * The type of a location, which corresponds to the address lines field of + * [google.type.PostalAddress][google.type.PostalAddress]. For example, + * "Downtown, Atlanta, GA, USA" has a type of + * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], + * and "Kansas City, KS, USA" has a type of + * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. + * @type \Google\Type\PostalAddress $postal_address + * Postal address of the location that includes human readable information, + * such as postal delivery and payments addresses. Given a postal address, + * a postal service can deliver items to a premises, P.O. Box, or other + * delivery location. + * @type \Google\Type\LatLng $lat_lng + * An object representing a latitude/longitude pair. + * @type float $radius_miles + * Radius in miles of the job location. This value is derived from the + * location bounding box in which a circle with the specified radius + * centered from [google.type.LatLng][google.type.LatLng] covers the area + * associated with the job location. For example, currently, "Mountain View, + * CA, USA" has a radius of 6.17 miles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * The type of a location, which corresponds to the address lines field of + * [google.type.PostalAddress][google.type.PostalAddress]. For example, + * "Downtown, Atlanta, GA, USA" has a type of + * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], + * and "Kansas City, KS, USA" has a type of + * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. + * + * Generated from protobuf field .google.cloud.talent.v4.Location.LocationType location_type = 1; + * @return int + */ + public function getLocationType() + { + return $this->location_type; + } + + /** + * The type of a location, which corresponds to the address lines field of + * [google.type.PostalAddress][google.type.PostalAddress]. For example, + * "Downtown, Atlanta, GA, USA" has a type of + * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], + * and "Kansas City, KS, USA" has a type of + * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. + * + * Generated from protobuf field .google.cloud.talent.v4.Location.LocationType location_type = 1; + * @param int $var + * @return $this + */ + public function setLocationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\Location\LocationType::class); + $this->location_type = $var; + + return $this; + } + + /** + * Postal address of the location that includes human readable information, + * such as postal delivery and payments addresses. Given a postal address, + * a postal service can deliver items to a premises, P.O. Box, or other + * delivery location. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 2; + * @return \Google\Type\PostalAddress|null + */ + public function getPostalAddress() + { + return $this->postal_address; + } + + public function hasPostalAddress() + { + return isset($this->postal_address); + } + + public function clearPostalAddress() + { + unset($this->postal_address); + } + + /** + * Postal address of the location that includes human readable information, + * such as postal delivery and payments addresses. Given a postal address, + * a postal service can deliver items to a premises, P.O. Box, or other + * delivery location. + * + * Generated from protobuf field .google.type.PostalAddress postal_address = 2; + * @param \Google\Type\PostalAddress $var + * @return $this + */ + public function setPostalAddress($var) + { + GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); + $this->postal_address = $var; + + return $this; + } + + /** + * An object representing a latitude/longitude pair. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 3; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * An object representing a latitude/longitude pair. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + + /** + * Radius in miles of the job location. This value is derived from the + * location bounding box in which a circle with the specified radius + * centered from [google.type.LatLng][google.type.LatLng] covers the area + * associated with the job location. For example, currently, "Mountain View, + * CA, USA" has a radius of 6.17 miles. + * + * Generated from protobuf field double radius_miles = 4; + * @return float + */ + public function getRadiusMiles() + { + return $this->radius_miles; + } + + /** + * Radius in miles of the job location. This value is derived from the + * location bounding box in which a circle with the specified radius + * centered from [google.type.LatLng][google.type.LatLng] covers the area + * associated with the job location. For example, currently, "Mountain View, + * CA, USA" has a radius of 6.17 miles. + * + * Generated from protobuf field double radius_miles = 4; + * @param float $var + * @return $this + */ + public function setRadiusMiles($var) + { + GPBUtil::checkDouble($var); + $this->radius_miles = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php new file mode 100644 index 000000000000..d053315740f9 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php @@ -0,0 +1,124 @@ +google.cloud.talent.v4.Location.LocationType + */ +class LocationType +{ + /** + * Default value if the type isn't specified. + * + * Generated from protobuf enum LOCATION_TYPE_UNSPECIFIED = 0; + */ + const LOCATION_TYPE_UNSPECIFIED = 0; + /** + * A country level location. + * + * Generated from protobuf enum COUNTRY = 1; + */ + const COUNTRY = 1; + /** + * A state or equivalent level location. + * + * Generated from protobuf enum ADMINISTRATIVE_AREA = 2; + */ + const ADMINISTRATIVE_AREA = 2; + /** + * A county or equivalent level location. + * + * Generated from protobuf enum SUB_ADMINISTRATIVE_AREA = 3; + */ + const SUB_ADMINISTRATIVE_AREA = 3; + /** + * A city or equivalent level location. + * + * Generated from protobuf enum LOCALITY = 4; + */ + const LOCALITY = 4; + /** + * A postal code level location. + * + * Generated from protobuf enum POSTAL_CODE = 5; + */ + const POSTAL_CODE = 5; + /** + * A sublocality is a subdivision of a locality, for example a city borough, + * ward, or arrondissement. Sublocalities are usually recognized by a local + * political authority. For example, Manhattan and Brooklyn are recognized + * as boroughs by the City of New York, and are therefore modeled as + * sublocalities. + * + * Generated from protobuf enum SUB_LOCALITY = 6; + */ + const SUB_LOCALITY = 6; + /** + * A district or equivalent level location. + * + * Generated from protobuf enum SUB_LOCALITY_1 = 7; + */ + const SUB_LOCALITY_1 = 7; + /** + * A smaller district or equivalent level display. + * + * Generated from protobuf enum SUB_LOCALITY_2 = 8; + */ + const SUB_LOCALITY_2 = 8; + /** + * A neighborhood level location. + * + * Generated from protobuf enum NEIGHBORHOOD = 9; + */ + const NEIGHBORHOOD = 9; + /** + * A street address level location. + * + * Generated from protobuf enum STREET_ADDRESS = 10; + */ + const STREET_ADDRESS = 10; + + private static $valueToName = [ + self::LOCATION_TYPE_UNSPECIFIED => 'LOCATION_TYPE_UNSPECIFIED', + self::COUNTRY => 'COUNTRY', + self::ADMINISTRATIVE_AREA => 'ADMINISTRATIVE_AREA', + self::SUB_ADMINISTRATIVE_AREA => 'SUB_ADMINISTRATIVE_AREA', + self::LOCALITY => 'LOCALITY', + self::POSTAL_CODE => 'POSTAL_CODE', + self::SUB_LOCALITY => 'SUB_LOCALITY', + self::SUB_LOCALITY_1 => 'SUB_LOCALITY_1', + self::SUB_LOCALITY_2 => 'SUB_LOCALITY_2', + self::NEIGHBORHOOD => 'NEIGHBORHOOD', + self::STREET_ADDRESS => 'STREET_ADDRESS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LocationType::class, \Google\Cloud\Talent\V4\Location_LocationType::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php new file mode 100644 index 000000000000..89caf8af7ac9 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php @@ -0,0 +1,357 @@ +google.cloud.talent.v4.LocationFilter + */ +class LocationFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The address name, such as "Mountain View" or "Bay Area". + * + * Generated from protobuf field string address = 1; + */ + protected $address = ''; + /** + * CLDR region code of the country/region. This field may be used in two ways: + * 1) If telecommute preference is not set, this field is used address + * ambiguity of the user-input address. For example, "Liverpool" may refer to + * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the + * address resolution toward a specific country or territory. If this field is + * not set, address resolution is biased toward the United States by default. + * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the + * telecommute location filter will be limited to the region specified in this + * field. If this field is not set, the telecommute job locations will not be + * See + * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + * + * Generated from protobuf field string region_code = 2; + */ + protected $region_code = ''; + /** + * The latitude and longitude of the geographic center to search from. This + * field is ignored if `address` is provided. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 3; + */ + protected $lat_lng = null; + /** + * The distance_in_miles is applied when the location being searched for is + * identified as a city or smaller. This field is ignored if the location + * being searched for is a state or larger. + * + * Generated from protobuf field double distance_in_miles = 4; + */ + protected $distance_in_miles = 0.0; + /** + * Allows the client to return jobs without a + * set location, specifically, telecommuting jobs (telecommuting is considered + * by the service as a special location). + * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates + * if a job permits telecommuting. If this field is set to + * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], + * telecommuting jobs are searched, and + * [address][google.cloud.talent.v4.LocationFilter.address] and + * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If + * not set or set to + * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], + * the telecommute status of the jobs is ignored. Jobs that have + * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] + * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] + * may still be matched based on other location filters using + * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. + * This filter can be used by itself to search exclusively for telecommuting + * jobs, or it can be combined with another location + * filter to search for a combination of job locations, + * such as "Mountain View" or "telecommuting" jobs. However, when used in + * combination with other location filters, telecommuting jobs can be + * treated as less relevant than other jobs in the search response. + * This field is only used for job search requests. + * + * Generated from protobuf field .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + */ + protected $telecommute_preference = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address + * The address name, such as "Mountain View" or "Bay Area". + * @type string $region_code + * CLDR region code of the country/region. This field may be used in two ways: + * 1) If telecommute preference is not set, this field is used address + * ambiguity of the user-input address. For example, "Liverpool" may refer to + * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the + * address resolution toward a specific country or territory. If this field is + * not set, address resolution is biased toward the United States by default. + * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the + * telecommute location filter will be limited to the region specified in this + * field. If this field is not set, the telecommute job locations will not be + * See + * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + * @type \Google\Type\LatLng $lat_lng + * The latitude and longitude of the geographic center to search from. This + * field is ignored if `address` is provided. + * @type float $distance_in_miles + * The distance_in_miles is applied when the location being searched for is + * identified as a city or smaller. This field is ignored if the location + * being searched for is a state or larger. + * @type int $telecommute_preference + * Allows the client to return jobs without a + * set location, specifically, telecommuting jobs (telecommuting is considered + * by the service as a special location). + * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates + * if a job permits telecommuting. If this field is set to + * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], + * telecommuting jobs are searched, and + * [address][google.cloud.talent.v4.LocationFilter.address] and + * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If + * not set or set to + * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], + * the telecommute status of the jobs is ignored. Jobs that have + * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] + * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] + * may still be matched based on other location filters using + * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. + * This filter can be used by itself to search exclusively for telecommuting + * jobs, or it can be combined with another location + * filter to search for a combination of job locations, + * such as "Mountain View" or "telecommuting" jobs. However, when used in + * combination with other location filters, telecommuting jobs can be + * treated as less relevant than other jobs in the search response. + * This field is only used for job search requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); + parent::__construct($data); + } + + /** + * The address name, such as "Mountain View" or "Bay Area". + * + * Generated from protobuf field string address = 1; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * The address name, such as "Mountain View" or "Bay Area". + * + * Generated from protobuf field string address = 1; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * CLDR region code of the country/region. This field may be used in two ways: + * 1) If telecommute preference is not set, this field is used address + * ambiguity of the user-input address. For example, "Liverpool" may refer to + * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the + * address resolution toward a specific country or territory. If this field is + * not set, address resolution is biased toward the United States by default. + * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the + * telecommute location filter will be limited to the region specified in this + * field. If this field is not set, the telecommute job locations will not be + * See + * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + * + * Generated from protobuf field string region_code = 2; + * @return string + */ + public function getRegionCode() + { + return $this->region_code; + } + + /** + * CLDR region code of the country/region. This field may be used in two ways: + * 1) If telecommute preference is not set, this field is used address + * ambiguity of the user-input address. For example, "Liverpool" may refer to + * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the + * address resolution toward a specific country or territory. If this field is + * not set, address resolution is biased toward the United States by default. + * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the + * telecommute location filter will be limited to the region specified in this + * field. If this field is not set, the telecommute job locations will not be + * See + * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html + * for details. Example: "CH" for Switzerland. + * + * Generated from protobuf field string region_code = 2; + * @param string $var + * @return $this + */ + public function setRegionCode($var) + { + GPBUtil::checkString($var, True); + $this->region_code = $var; + + return $this; + } + + /** + * The latitude and longitude of the geographic center to search from. This + * field is ignored if `address` is provided. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 3; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * The latitude and longitude of the geographic center to search from. This + * field is ignored if `address` is provided. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + + /** + * The distance_in_miles is applied when the location being searched for is + * identified as a city or smaller. This field is ignored if the location + * being searched for is a state or larger. + * + * Generated from protobuf field double distance_in_miles = 4; + * @return float + */ + public function getDistanceInMiles() + { + return $this->distance_in_miles; + } + + /** + * The distance_in_miles is applied when the location being searched for is + * identified as a city or smaller. This field is ignored if the location + * being searched for is a state or larger. + * + * Generated from protobuf field double distance_in_miles = 4; + * @param float $var + * @return $this + */ + public function setDistanceInMiles($var) + { + GPBUtil::checkDouble($var); + $this->distance_in_miles = $var; + + return $this; + } + + /** + * Allows the client to return jobs without a + * set location, specifically, telecommuting jobs (telecommuting is considered + * by the service as a special location). + * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates + * if a job permits telecommuting. If this field is set to + * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], + * telecommuting jobs are searched, and + * [address][google.cloud.talent.v4.LocationFilter.address] and + * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If + * not set or set to + * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], + * the telecommute status of the jobs is ignored. Jobs that have + * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] + * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] + * may still be matched based on other location filters using + * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. + * This filter can be used by itself to search exclusively for telecommuting + * jobs, or it can be combined with another location + * filter to search for a combination of job locations, + * such as "Mountain View" or "telecommuting" jobs. However, when used in + * combination with other location filters, telecommuting jobs can be + * treated as less relevant than other jobs in the search response. + * This field is only used for job search requests. + * + * Generated from protobuf field .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * @return int + */ + public function getTelecommutePreference() + { + return $this->telecommute_preference; + } + + /** + * Allows the client to return jobs without a + * set location, specifically, telecommuting jobs (telecommuting is considered + * by the service as a special location). + * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates + * if a job permits telecommuting. If this field is set to + * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], + * telecommuting jobs are searched, and + * [address][google.cloud.talent.v4.LocationFilter.address] and + * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If + * not set or set to + * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], + * the telecommute status of the jobs is ignored. Jobs that have + * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] + * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] + * may still be matched based on other location filters using + * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. + * This filter can be used by itself to search exclusively for telecommuting + * jobs, or it can be combined with another location + * filter to search for a combination of job locations, + * such as "Mountain View" or "telecommuting" jobs. However, when used in + * combination with other location filters, telecommuting jobs can be + * treated as less relevant than other jobs in the search response. + * This field is only used for job search requests. + * + * Generated from protobuf field .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; + * @param int $var + * @return $this + */ + public function setTelecommutePreference($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\LocationFilter\TelecommutePreference::class); + $this->telecommute_preference = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php new file mode 100644 index 000000000000..703373bcc25c --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php @@ -0,0 +1,72 @@ +google.cloud.talent.v4.LocationFilter.TelecommutePreference + */ +class TelecommutePreference +{ + /** + * Default value if the telecommute preference isn't specified. + * + * Generated from protobuf enum TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; + */ + const TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; + /** + * Deprecated: Ignore telecommute status of jobs. Use + * TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs. + * + * Generated from protobuf enum TELECOMMUTE_EXCLUDED = 1 [deprecated = true]; + */ + const TELECOMMUTE_EXCLUDED = 1; + /** + * Allow telecommute jobs. + * + * Generated from protobuf enum TELECOMMUTE_ALLOWED = 2; + */ + const TELECOMMUTE_ALLOWED = 2; + /** + * Exclude telecommute jobs. + * + * Generated from protobuf enum TELECOMMUTE_JOBS_EXCLUDED = 3; + */ + const TELECOMMUTE_JOBS_EXCLUDED = 3; + + private static $valueToName = [ + self::TELECOMMUTE_PREFERENCE_UNSPECIFIED => 'TELECOMMUTE_PREFERENCE_UNSPECIFIED', + self::TELECOMMUTE_EXCLUDED => 'TELECOMMUTE_EXCLUDED', + self::TELECOMMUTE_ALLOWED => 'TELECOMMUTE_ALLOWED', + self::TELECOMMUTE_JOBS_EXCLUDED => 'TELECOMMUTE_JOBS_EXCLUDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TelecommutePreference::class, \Google\Cloud\Talent\V4\LocationFilter_TelecommutePreference::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php new file mode 100644 index 000000000000..ca8d7c462f5e --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php @@ -0,0 +1,86 @@ +google.cloud.talent.v4.PostingRegion + */ +class PostingRegion +{ + /** + * If the region is unspecified, the job is only returned if it + * matches the [LocationFilter][google.cloud.talent.v4.LocationFilter]. + * + * Generated from protobuf enum POSTING_REGION_UNSPECIFIED = 0; + */ + const POSTING_REGION_UNSPECIFIED = 0; + /** + * In addition to exact location matching, job posting is returned when the + * [LocationFilter][google.cloud.talent.v4.LocationFilter] in the search query + * is in the same administrative area as the returned job posting. For + * example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's + * returned if [LocationFilter][google.cloud.talent.v4.LocationFilter] has + * "Mountain View". + * Administrative area refers to top-level administrative subdivision of this + * country. For example, US state, IT region, UK constituent nation and + * JP prefecture. + * + * Generated from protobuf enum ADMINISTRATIVE_AREA = 1; + */ + const ADMINISTRATIVE_AREA = 1; + /** + * In addition to exact location matching, job is returned when + * [LocationFilter][google.cloud.talent.v4.LocationFilter] in search query is + * in the same country as this job. For example, if a `NATION_WIDE` job is + * posted in "USA", it's returned if + * [LocationFilter][google.cloud.talent.v4.LocationFilter] has 'Mountain + * View'. + * + * Generated from protobuf enum NATION = 2; + */ + const NATION = 2; + /** + * Job allows employees to work remotely (telecommute). + * If locations are provided with this value, the job is + * considered as having a location, but telecommuting is allowed. + * + * Generated from protobuf enum TELECOMMUTE = 3; + */ + const TELECOMMUTE = 3; + + private static $valueToName = [ + self::POSTING_REGION_UNSPECIFIED => 'POSTING_REGION_UNSPECIFIED', + self::ADMINISTRATIVE_AREA => 'ADMINISTRATIVE_AREA', + self::NATION => 'NATION', + self::TELECOMMUTE => 'TELECOMMUTE', + ]; + + 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php new file mode 100644 index 000000000000..cbc72199ab2c --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php @@ -0,0 +1,379 @@ +google.cloud.talent.v4.RequestMetadata + */ +class RequestMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * The client-defined scope or source of the service call, which typically + * is the domain on + * which the service has been implemented and is currently being run. + * For example, if the service is being run by client Foo, Inc., on + * job board www.foo.com and career site www.bar.com, then this field is + * set to "foo.com" for use on the job board, and "bar.com" for use on the + * career site. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique domain. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string domain = 1; + */ + protected $domain = ''; + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique session identification string. A session is defined as the + * duration of an end user's interaction with the service over a certain + * period. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique session ID. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string session_id = 2; + */ + protected $session_id = ''; + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique user identification string, as determined by the client. + * To have the strongest positive impact on search quality + * make sure the client-level is unique. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique user ID. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string user_id = 3; + */ + protected $user_id = ''; + /** + * Only set when any of + * [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available + * for some reason. It is highly recommended not to set this field and provide + * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best + * service experience. + * + * Generated from protobuf field bool allow_missing_ids = 4; + */ + protected $allow_missing_ids = false; + /** + * The type of device used by the job seeker at the time of the call to the + * service. + * + * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo device_info = 5; + */ + protected $device_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * The client-defined scope or source of the service call, which typically + * is the domain on + * which the service has been implemented and is currently being run. + * For example, if the service is being run by client Foo, Inc., on + * job board www.foo.com and career site www.bar.com, then this field is + * set to "foo.com" for use on the job board, and "bar.com" for use on the + * career site. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique domain. + * The maximum number of allowed characters is 255. + * @type string $session_id + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique session identification string. A session is defined as the + * duration of an end user's interaction with the service over a certain + * period. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique session ID. + * The maximum number of allowed characters is 255. + * @type string $user_id + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique user identification string, as determined by the client. + * To have the strongest positive impact on search quality + * make sure the client-level is unique. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique user ID. + * The maximum number of allowed characters is 255. + * @type bool $allow_missing_ids + * Only set when any of + * [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available + * for some reason. It is highly recommended not to set this field and provide + * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best + * service experience. + * @type \Google\Cloud\Talent\V4\DeviceInfo $device_info + * The type of device used by the job seeker at the time of the call to the + * service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * The client-defined scope or source of the service call, which typically + * is the domain on + * which the service has been implemented and is currently being run. + * For example, if the service is being run by client Foo, Inc., on + * job board www.foo.com and career site www.bar.com, then this field is + * set to "foo.com" for use on the job board, and "bar.com" for use on the + * career site. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique domain. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string domain = 1; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * The client-defined scope or source of the service call, which typically + * is the domain on + * which the service has been implemented and is currently being run. + * For example, if the service is being run by client Foo, Inc., on + * job board www.foo.com and career site www.bar.com, then this field is + * set to "foo.com" for use on the job board, and "bar.com" for use on the + * career site. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique domain. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string domain = 1; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique session identification string. A session is defined as the + * duration of an end user's interaction with the service over a certain + * period. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique session ID. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string session_id = 2; + * @return string + */ + public function getSessionId() + { + return $this->session_id; + } + + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique session identification string. A session is defined as the + * duration of an end user's interaction with the service over a certain + * period. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique session ID. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string session_id = 2; + * @param string $var + * @return $this + */ + public function setSessionId($var) + { + GPBUtil::checkString($var, True); + $this->session_id = $var; + + return $this; + } + + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique user identification string, as determined by the client. + * To have the strongest positive impact on search quality + * make sure the client-level is unique. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique user ID. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string user_id = 3; + * @return string + */ + public function getUserId() + { + return $this->user_id; + } + + /** + * Required if + * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] + * is unset or `false`. + * A unique user identification string, as determined by the client. + * To have the strongest positive impact on search quality + * make sure the client-level is unique. + * Obfuscate this field for privacy concerns before + * providing it to the service. + * Note that any improvements to the model for a particular tenant site rely + * on this field being set correctly to a unique user ID. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string user_id = 3; + * @param string $var + * @return $this + */ + public function setUserId($var) + { + GPBUtil::checkString($var, True); + $this->user_id = $var; + + return $this; + } + + /** + * Only set when any of + * [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available + * for some reason. It is highly recommended not to set this field and provide + * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best + * service experience. + * + * Generated from protobuf field bool allow_missing_ids = 4; + * @return bool + */ + public function getAllowMissingIds() + { + return $this->allow_missing_ids; + } + + /** + * Only set when any of + * [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available + * for some reason. It is highly recommended not to set this field and provide + * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], + * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and + * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best + * service experience. + * + * Generated from protobuf field bool allow_missing_ids = 4; + * @param bool $var + * @return $this + */ + public function setAllowMissingIds($var) + { + GPBUtil::checkBool($var); + $this->allow_missing_ids = $var; + + return $this; + } + + /** + * The type of device used by the job seeker at the time of the call to the + * service. + * + * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo device_info = 5; + * @return \Google\Cloud\Talent\V4\DeviceInfo|null + */ + public function getDeviceInfo() + { + return $this->device_info; + } + + public function hasDeviceInfo() + { + return isset($this->device_info); + } + + public function clearDeviceInfo() + { + unset($this->device_info); + } + + /** + * The type of device used by the job seeker at the time of the call to the + * service. + * + * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo device_info = 5; + * @param \Google\Cloud\Talent\V4\DeviceInfo $var + * @return $this + */ + public function setDeviceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\DeviceInfo::class); + $this->device_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php new file mode 100644 index 000000000000..35db6db77d32 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php @@ -0,0 +1,71 @@ +google.cloud.talent.v4.ResponseMetadata + */ +class ResponseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * A unique id associated with this call. + * This id is logged for tracking purposes. + * + * Generated from protobuf field string request_id = 1; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $request_id + * A unique id associated with this call. + * This id is logged for tracking purposes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * A unique id associated with this call. + * This id is logged for tracking purposes. + * + * Generated from protobuf field string request_id = 1; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A unique id associated with this call. + * This id is logged for tracking purposes. + * + * Generated from protobuf field string request_id = 1; + * @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/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php new file mode 100644 index 000000000000..640d9d634c4a --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php @@ -0,0 +1,1438 @@ +google.cloud.talent.v4.SearchJobsRequest + */ +class SearchJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the tenant to search within. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Mode of a search. + * Defaults to + * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + */ + protected $search_mode = 0; + /** + * Required. The meta information collected about the job searcher, used to + * improve the search quality of the service. The identifiers (such as + * `user_id`) are provided by users, and must be unique and consistent. + * + * Generated from protobuf field .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $request_metadata = null; + /** + * Query used to search against jobs, such as keyword, location filters, etc. + * + * Generated from protobuf field .google.cloud.talent.v4.JobQuery job_query = 4; + */ + protected $job_query = null; + /** + * Controls whether to broaden the search when it produces sparse results. + * Broadened queries append results to the end of the matching results + * list. + * Defaults to false. + * + * Generated from protobuf field bool enable_broadening = 5; + */ + protected $enable_broadening = false; + /** + * An expression specifies a histogram request against matching jobs. + * Expression syntax is an aggregation function call with histogram facets and + * other options. + * Available aggregation function calls are: + * * `count(string_histogram_facet)`: Count the number of matching entities, + * for each distinct attribute value. + * * `count(numeric_histogram_facet, list of buckets)`: Count the number of + * matching entities within each bucket. + * A maximum of 200 histogram buckets are supported. + * Data types: + * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + * * String: string like "any string with backslash escape for quote(\")." + * * Number: whole number and floating point number like 10, -1 and -0.01. + * * List: list of elements with comma(,) separator surrounded by square + * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + * Built-in constants: + * * MIN (minimum number similar to java Double.MIN_VALUE) + * * MAX (maximum number similar to java Double.MAX_VALUE) + * Built-in functions: + * * bucket(start, end[, label]): bucket built-in function creates a bucket + * with range of [start, end). Note that the end is exclusive, for example, + * bucket(1, MAX, "positive number") or bucket(1, 10). + * Job histogram facets: + * * company_display_name: histogram by + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. + * * employment_type: histogram by + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for + * example, + * "FULL_TIME", "PART_TIME". + * * company_size (DEPRECATED): histogram by + * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", + * "MEDIUM", "BIG". + * * publish_time_in_day: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in days. + * Must specify list of numeric buckets in spec. + * * publish_time_in_month: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in months. + * Must specify list of numeric buckets in spec. + * * publish_time_in_year: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in years. + * Must specify list of numeric buckets in spec. + * * degree_types: histogram by the + * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, + * "Bachelors", "Masters". + * * job_level: histogram by the + * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry + * Level". + * * country: histogram by the country code of jobs, for example, "US", "FR". + * * admin1: histogram by the admin1 code of jobs, which is a global + * placeholder referring to the state, province, or the particular term a + * country uses to define the geographic structure below the country level, + * for example, "CA", "IL". + * * city: histogram by a combination of the "city name, admin1 code". For + * example, "Mountain View, CA", "New York, NY". + * * admin1_country: histogram by a combination of the "admin1 code, country", + * for example, "CA, US", "IL, US". + * * city_coordinate: histogram by the city center's GPS coordinates (latitude + * and longitude), for example, 37.4038522,-122.0987765. Since the + * coordinates of a city center can change, customers may need to refresh + * them periodically. + * * locale: histogram by the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, + * "en-US", + * "fr-FR". + * * language: histogram by the language subtag of the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], + * for example, "en", "fr". + * * category: histogram by the + * [JobCategory][google.cloud.talent.v4.JobCategory], for example, + * "COMPUTER_AND_IT", "HEALTHCARE". + * * base_compensation_unit: histogram by the + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] + * of base salary, for example, "WEEKLY", "MONTHLY". + * * base_compensation: histogram by the base salary. Must specify list of + * numeric buckets to group results by. + * * annualized_base_compensation: histogram by the base annualized salary. + * Must specify list of numeric buckets to group results by. + * * annualized_total_compensation: histogram by the total annualized salary. + * Must specify list of numeric buckets to group results by. + * * string_custom_attribute: histogram by string + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * string_custom_attribute["key1"]. + * * numeric_custom_attribute: histogram by numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + * group results by. + * Example expressions: + * * `count(admin1)` + * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + * bucket(100000, MAX)])` + * * `count(string_custom_attribute["some-string-custom-attribute"])` + * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + * + * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + */ + private $histogram_queries; + /** + * The desired job attributes returned for jobs in the search response. + * Defaults to + * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if + * no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 8; + */ + protected $job_view = 0; + /** + * An integer that specifies the current offset (that is, starting result + * location, amongst the jobs deemed by the API as relevant) in search + * results. This field is only considered if + * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. + * The maximum allowed value is 5000. Otherwise an error is thrown. + * For example, 0 means to return results starting from the first matching + * job, and 10 means to return from the 11th job. This can be used for + * pagination, (for example, pageSize = 10 and offset = 10 means to return + * from the second page). + * + * Generated from protobuf field int32 offset = 9; + */ + protected $offset = 0; + /** + * A limit on the number of jobs returned in the search results. + * Increasing this value above the default value of 10 can increase search + * response time. The value can be between 1 and 100. + * + * Generated from protobuf field int32 max_page_size = 10; + */ + protected $max_page_size = 0; + /** + * The token specifying the current offset within + * search results. See + * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] + * for an explanation of how to obtain the next set of query results. + * + * Generated from protobuf field string page_token = 11; + */ + protected $page_token = ''; + /** + * The criteria determining how search results are sorted. Default is + * `"relevance desc"`. + * Supported options are: + * * `"relevance desc"`: By relevance descending, as determined by the API + * algorithms. Relevance thresholding of query results is only available + * with this ordering. + * * `"posting_publish_time desc"`: By + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * descending. + * * `"posting_update_time desc"`: By + * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] + * descending. + * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. + * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] + * descending. + * * `"annualized_base_compensation"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_base_compensation desc"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"annualized_total_compensation"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_total_compensation desc"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"custom_ranking desc"`: By the relevance score adjusted to the + * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * with weight factor assigned by + * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] + * in descending order. + * * Location sorting: Use the special syntax to order jobs by distance:
+ * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + * multiple locations. See details below.
+ * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + * multiple locations. See details below.
+ * The string can have a maximum of 256 characters. When multiple distance + * centers are provided, a job that is close to any of the distance centers + * would have a high rank. When a job has multiple locations, the job + * location closest to one of the distance centers will be used. Jobs that + * don't have locations will be ranked at the bottom. Distance is calculated + * with a precision of 11.3 meters (37.4 feet). Diversification strategy is + * still applied unless explicitly disabled in + * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. + * + * Generated from protobuf field string order_by = 12; + */ + protected $order_by = ''; + /** + * Controls whether highly similar jobs are returned next to each other in + * the search results. Jobs are identified as highly similar based on + * their titles, job categories, and locations. Highly similar results are + * clustered so that only one representative job of the cluster is + * displayed to the job seeker higher up in the results, with the other jobs + * being displayed lower down in the results. + * Defaults to + * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] + * if no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + */ + protected $diversification_level = 0; + /** + * Controls over how job documents get ranked on top of existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + */ + protected $custom_ranking_info = null; + /** + * This field is deprecated. Please use + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * going forward. + * To migrate, disable_keyword_match set to false maps to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], + * and disable_keyword_match set to true maps to + * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. + * If + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * is set, this field is ignored. + * Controls whether to disable exact keyword match on + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.description][google.cloud.talent.v4.Job.description], + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], + * [Job.addresses][google.cloud.talent.v4.Job.addresses], + * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When + * disable keyword match is turned off, a keyword match returns jobs that do + * not match given category filters when there are matching keywords. For + * example, for the query "program manager," a result is returned even if the + * job posting has the title "software developer," which doesn't fall into + * "program manager" ontology, but does have "program manager" appearing in + * its description. + * For queries like "cloud" that don't contain title or + * location specific ontology, jobs with "cloud" keyword matches are returned + * regardless of this flag's value. + * Use + * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] + * if company-specific globally matched custom field/attribute string values + * are needed. Enabling keyword match improves recall of subsequent search + * requests. + * Defaults to false. + * + * Generated from protobuf field bool disable_keyword_match = 16 [deprecated = true]; + * @deprecated + */ + protected $disable_keyword_match = false; + /** + * Controls what keyword match options to use. If both keyword_match_mode and + * disable_keyword_match are set, keyword_match_mode will take precedence. + * Defaults to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] + * if no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode keyword_match_mode = 18; + */ + protected $keyword_match_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the tenant to search within. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * @type int $search_mode + * Mode of a search. + * Defaults to + * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. + * @type \Google\Cloud\Talent\V4\RequestMetadata $request_metadata + * Required. The meta information collected about the job searcher, used to + * improve the search quality of the service. The identifiers (such as + * `user_id`) are provided by users, and must be unique and consistent. + * @type \Google\Cloud\Talent\V4\JobQuery $job_query + * Query used to search against jobs, such as keyword, location filters, etc. + * @type bool $enable_broadening + * Controls whether to broaden the search when it produces sparse results. + * Broadened queries append results to the end of the matching results + * list. + * Defaults to false. + * @type array<\Google\Cloud\Talent\V4\HistogramQuery>|\Google\Protobuf\Internal\RepeatedField $histogram_queries + * An expression specifies a histogram request against matching jobs. + * Expression syntax is an aggregation function call with histogram facets and + * other options. + * Available aggregation function calls are: + * * `count(string_histogram_facet)`: Count the number of matching entities, + * for each distinct attribute value. + * * `count(numeric_histogram_facet, list of buckets)`: Count the number of + * matching entities within each bucket. + * A maximum of 200 histogram buckets are supported. + * Data types: + * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + * * String: string like "any string with backslash escape for quote(\")." + * * Number: whole number and floating point number like 10, -1 and -0.01. + * * List: list of elements with comma(,) separator surrounded by square + * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + * Built-in constants: + * * MIN (minimum number similar to java Double.MIN_VALUE) + * * MAX (maximum number similar to java Double.MAX_VALUE) + * Built-in functions: + * * bucket(start, end[, label]): bucket built-in function creates a bucket + * with range of [start, end). Note that the end is exclusive, for example, + * bucket(1, MAX, "positive number") or bucket(1, 10). + * Job histogram facets: + * * company_display_name: histogram by + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. + * * employment_type: histogram by + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for + * example, + * "FULL_TIME", "PART_TIME". + * * company_size (DEPRECATED): histogram by + * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", + * "MEDIUM", "BIG". + * * publish_time_in_day: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in days. + * Must specify list of numeric buckets in spec. + * * publish_time_in_month: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in months. + * Must specify list of numeric buckets in spec. + * * publish_time_in_year: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in years. + * Must specify list of numeric buckets in spec. + * * degree_types: histogram by the + * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, + * "Bachelors", "Masters". + * * job_level: histogram by the + * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry + * Level". + * * country: histogram by the country code of jobs, for example, "US", "FR". + * * admin1: histogram by the admin1 code of jobs, which is a global + * placeholder referring to the state, province, or the particular term a + * country uses to define the geographic structure below the country level, + * for example, "CA", "IL". + * * city: histogram by a combination of the "city name, admin1 code". For + * example, "Mountain View, CA", "New York, NY". + * * admin1_country: histogram by a combination of the "admin1 code, country", + * for example, "CA, US", "IL, US". + * * city_coordinate: histogram by the city center's GPS coordinates (latitude + * and longitude), for example, 37.4038522,-122.0987765. Since the + * coordinates of a city center can change, customers may need to refresh + * them periodically. + * * locale: histogram by the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, + * "en-US", + * "fr-FR". + * * language: histogram by the language subtag of the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], + * for example, "en", "fr". + * * category: histogram by the + * [JobCategory][google.cloud.talent.v4.JobCategory], for example, + * "COMPUTER_AND_IT", "HEALTHCARE". + * * base_compensation_unit: histogram by the + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] + * of base salary, for example, "WEEKLY", "MONTHLY". + * * base_compensation: histogram by the base salary. Must specify list of + * numeric buckets to group results by. + * * annualized_base_compensation: histogram by the base annualized salary. + * Must specify list of numeric buckets to group results by. + * * annualized_total_compensation: histogram by the total annualized salary. + * Must specify list of numeric buckets to group results by. + * * string_custom_attribute: histogram by string + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * string_custom_attribute["key1"]. + * * numeric_custom_attribute: histogram by numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + * group results by. + * Example expressions: + * * `count(admin1)` + * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + * bucket(100000, MAX)])` + * * `count(string_custom_attribute["some-string-custom-attribute"])` + * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + * @type int $job_view + * The desired job attributes returned for jobs in the search response. + * Defaults to + * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if + * no value is specified. + * @type int $offset + * An integer that specifies the current offset (that is, starting result + * location, amongst the jobs deemed by the API as relevant) in search + * results. This field is only considered if + * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. + * The maximum allowed value is 5000. Otherwise an error is thrown. + * For example, 0 means to return results starting from the first matching + * job, and 10 means to return from the 11th job. This can be used for + * pagination, (for example, pageSize = 10 and offset = 10 means to return + * from the second page). + * @type int $max_page_size + * A limit on the number of jobs returned in the search results. + * Increasing this value above the default value of 10 can increase search + * response time. The value can be between 1 and 100. + * @type string $page_token + * The token specifying the current offset within + * search results. See + * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] + * for an explanation of how to obtain the next set of query results. + * @type string $order_by + * The criteria determining how search results are sorted. Default is + * `"relevance desc"`. + * Supported options are: + * * `"relevance desc"`: By relevance descending, as determined by the API + * algorithms. Relevance thresholding of query results is only available + * with this ordering. + * * `"posting_publish_time desc"`: By + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * descending. + * * `"posting_update_time desc"`: By + * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] + * descending. + * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. + * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] + * descending. + * * `"annualized_base_compensation"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_base_compensation desc"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"annualized_total_compensation"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_total_compensation desc"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"custom_ranking desc"`: By the relevance score adjusted to the + * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * with weight factor assigned by + * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] + * in descending order. + * * Location sorting: Use the special syntax to order jobs by distance:
+ * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + * multiple locations. See details below.
+ * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + * multiple locations. See details below.
+ * The string can have a maximum of 256 characters. When multiple distance + * centers are provided, a job that is close to any of the distance centers + * would have a high rank. When a job has multiple locations, the job + * location closest to one of the distance centers will be used. Jobs that + * don't have locations will be ranked at the bottom. Distance is calculated + * with a precision of 11.3 meters (37.4 feet). Diversification strategy is + * still applied unless explicitly disabled in + * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. + * @type int $diversification_level + * Controls whether highly similar jobs are returned next to each other in + * the search results. Jobs are identified as highly similar based on + * their titles, job categories, and locations. Highly similar results are + * clustered so that only one representative job of the cluster is + * displayed to the job seeker higher up in the results, with the other jobs + * being displayed lower down in the results. + * Defaults to + * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] + * if no value is specified. + * @type \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo $custom_ranking_info + * Controls over how job documents get ranked on top of existing relevance + * score (determined by API algorithm). + * @type bool $disable_keyword_match + * This field is deprecated. Please use + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * going forward. + * To migrate, disable_keyword_match set to false maps to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], + * and disable_keyword_match set to true maps to + * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. + * If + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * is set, this field is ignored. + * Controls whether to disable exact keyword match on + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.description][google.cloud.talent.v4.Job.description], + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], + * [Job.addresses][google.cloud.talent.v4.Job.addresses], + * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When + * disable keyword match is turned off, a keyword match returns jobs that do + * not match given category filters when there are matching keywords. For + * example, for the query "program manager," a result is returned even if the + * job posting has the title "software developer," which doesn't fall into + * "program manager" ontology, but does have "program manager" appearing in + * its description. + * For queries like "cloud" that don't contain title or + * location specific ontology, jobs with "cloud" keyword matches are returned + * regardless of this flag's value. + * Use + * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] + * if company-specific globally matched custom field/attribute string values + * are needed. Enabling keyword match improves recall of subsequent search + * requests. + * Defaults to false. + * @type int $keyword_match_mode + * Controls what keyword match options to use. If both keyword_match_mode and + * disable_keyword_match are set, keyword_match_mode will take precedence. + * Defaults to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] + * if no value is specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the tenant to search within. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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 tenant to search within. + * The format is "projects/{project_id}/tenants/{tenant_id}". For example, + * "projects/foo/tenants/bar". + * + * 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; + } + + /** + * Mode of a search. + * Defaults to + * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * @return int + */ + public function getSearchMode() + { + return $this->search_mode; + } + + /** + * Mode of a search. + * Defaults to + * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; + * @param int $var + * @return $this + */ + public function setSearchMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\SearchMode::class); + $this->search_mode = $var; + + return $this; + } + + /** + * Required. The meta information collected about the job searcher, used to + * improve the search quality of the service. The identifiers (such as + * `user_id`) are provided by users, and must be unique and consistent. + * + * Generated from protobuf field .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\RequestMetadata|null + */ + public function getRequestMetadata() + { + return $this->request_metadata; + } + + public function hasRequestMetadata() + { + return isset($this->request_metadata); + } + + public function clearRequestMetadata() + { + unset($this->request_metadata); + } + + /** + * Required. The meta information collected about the job searcher, used to + * improve the search quality of the service. The identifiers (such as + * `user_id`) are provided by users, and must be unique and consistent. + * + * Generated from protobuf field .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\RequestMetadata $var + * @return $this + */ + public function setRequestMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\RequestMetadata::class); + $this->request_metadata = $var; + + return $this; + } + + /** + * Query used to search against jobs, such as keyword, location filters, etc. + * + * Generated from protobuf field .google.cloud.talent.v4.JobQuery job_query = 4; + * @return \Google\Cloud\Talent\V4\JobQuery|null + */ + public function getJobQuery() + { + return $this->job_query; + } + + public function hasJobQuery() + { + return isset($this->job_query); + } + + public function clearJobQuery() + { + unset($this->job_query); + } + + /** + * Query used to search against jobs, such as keyword, location filters, etc. + * + * Generated from protobuf field .google.cloud.talent.v4.JobQuery job_query = 4; + * @param \Google\Cloud\Talent\V4\JobQuery $var + * @return $this + */ + public function setJobQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\JobQuery::class); + $this->job_query = $var; + + return $this; + } + + /** + * Controls whether to broaden the search when it produces sparse results. + * Broadened queries append results to the end of the matching results + * list. + * Defaults to false. + * + * Generated from protobuf field bool enable_broadening = 5; + * @return bool + */ + public function getEnableBroadening() + { + return $this->enable_broadening; + } + + /** + * Controls whether to broaden the search when it produces sparse results. + * Broadened queries append results to the end of the matching results + * list. + * Defaults to false. + * + * Generated from protobuf field bool enable_broadening = 5; + * @param bool $var + * @return $this + */ + public function setEnableBroadening($var) + { + GPBUtil::checkBool($var); + $this->enable_broadening = $var; + + return $this; + } + + /** + * An expression specifies a histogram request against matching jobs. + * Expression syntax is an aggregation function call with histogram facets and + * other options. + * Available aggregation function calls are: + * * `count(string_histogram_facet)`: Count the number of matching entities, + * for each distinct attribute value. + * * `count(numeric_histogram_facet, list of buckets)`: Count the number of + * matching entities within each bucket. + * A maximum of 200 histogram buckets are supported. + * Data types: + * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + * * String: string like "any string with backslash escape for quote(\")." + * * Number: whole number and floating point number like 10, -1 and -0.01. + * * List: list of elements with comma(,) separator surrounded by square + * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + * Built-in constants: + * * MIN (minimum number similar to java Double.MIN_VALUE) + * * MAX (maximum number similar to java Double.MAX_VALUE) + * Built-in functions: + * * bucket(start, end[, label]): bucket built-in function creates a bucket + * with range of [start, end). Note that the end is exclusive, for example, + * bucket(1, MAX, "positive number") or bucket(1, 10). + * Job histogram facets: + * * company_display_name: histogram by + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. + * * employment_type: histogram by + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for + * example, + * "FULL_TIME", "PART_TIME". + * * company_size (DEPRECATED): histogram by + * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", + * "MEDIUM", "BIG". + * * publish_time_in_day: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in days. + * Must specify list of numeric buckets in spec. + * * publish_time_in_month: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in months. + * Must specify list of numeric buckets in spec. + * * publish_time_in_year: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in years. + * Must specify list of numeric buckets in spec. + * * degree_types: histogram by the + * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, + * "Bachelors", "Masters". + * * job_level: histogram by the + * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry + * Level". + * * country: histogram by the country code of jobs, for example, "US", "FR". + * * admin1: histogram by the admin1 code of jobs, which is a global + * placeholder referring to the state, province, or the particular term a + * country uses to define the geographic structure below the country level, + * for example, "CA", "IL". + * * city: histogram by a combination of the "city name, admin1 code". For + * example, "Mountain View, CA", "New York, NY". + * * admin1_country: histogram by a combination of the "admin1 code, country", + * for example, "CA, US", "IL, US". + * * city_coordinate: histogram by the city center's GPS coordinates (latitude + * and longitude), for example, 37.4038522,-122.0987765. Since the + * coordinates of a city center can change, customers may need to refresh + * them periodically. + * * locale: histogram by the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, + * "en-US", + * "fr-FR". + * * language: histogram by the language subtag of the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], + * for example, "en", "fr". + * * category: histogram by the + * [JobCategory][google.cloud.talent.v4.JobCategory], for example, + * "COMPUTER_AND_IT", "HEALTHCARE". + * * base_compensation_unit: histogram by the + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] + * of base salary, for example, "WEEKLY", "MONTHLY". + * * base_compensation: histogram by the base salary. Must specify list of + * numeric buckets to group results by. + * * annualized_base_compensation: histogram by the base annualized salary. + * Must specify list of numeric buckets to group results by. + * * annualized_total_compensation: histogram by the total annualized salary. + * Must specify list of numeric buckets to group results by. + * * string_custom_attribute: histogram by string + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * string_custom_attribute["key1"]. + * * numeric_custom_attribute: histogram by numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + * group results by. + * Example expressions: + * * `count(admin1)` + * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + * bucket(100000, MAX)])` + * * `count(string_custom_attribute["some-string-custom-attribute"])` + * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + * + * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHistogramQueries() + { + return $this->histogram_queries; + } + + /** + * An expression specifies a histogram request against matching jobs. + * Expression syntax is an aggregation function call with histogram facets and + * other options. + * Available aggregation function calls are: + * * `count(string_histogram_facet)`: Count the number of matching entities, + * for each distinct attribute value. + * * `count(numeric_histogram_facet, list of buckets)`: Count the number of + * matching entities within each bucket. + * A maximum of 200 histogram buckets are supported. + * Data types: + * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. + * * String: string like "any string with backslash escape for quote(\")." + * * Number: whole number and floating point number like 10, -1 and -0.01. + * * List: list of elements with comma(,) separator surrounded by square + * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. + * Built-in constants: + * * MIN (minimum number similar to java Double.MIN_VALUE) + * * MAX (maximum number similar to java Double.MAX_VALUE) + * Built-in functions: + * * bucket(start, end[, label]): bucket built-in function creates a bucket + * with range of [start, end). Note that the end is exclusive, for example, + * bucket(1, MAX, "positive number") or bucket(1, 10). + * Job histogram facets: + * * company_display_name: histogram by + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. + * * employment_type: histogram by + * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for + * example, + * "FULL_TIME", "PART_TIME". + * * company_size (DEPRECATED): histogram by + * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", + * "MEDIUM", "BIG". + * * publish_time_in_day: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in days. + * Must specify list of numeric buckets in spec. + * * publish_time_in_month: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in months. + * Must specify list of numeric buckets in spec. + * * publish_time_in_year: histogram by the + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * in years. + * Must specify list of numeric buckets in spec. + * * degree_types: histogram by the + * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, + * "Bachelors", "Masters". + * * job_level: histogram by the + * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry + * Level". + * * country: histogram by the country code of jobs, for example, "US", "FR". + * * admin1: histogram by the admin1 code of jobs, which is a global + * placeholder referring to the state, province, or the particular term a + * country uses to define the geographic structure below the country level, + * for example, "CA", "IL". + * * city: histogram by a combination of the "city name, admin1 code". For + * example, "Mountain View, CA", "New York, NY". + * * admin1_country: histogram by a combination of the "admin1 code, country", + * for example, "CA, US", "IL, US". + * * city_coordinate: histogram by the city center's GPS coordinates (latitude + * and longitude), for example, 37.4038522,-122.0987765. Since the + * coordinates of a city center can change, customers may need to refresh + * them periodically. + * * locale: histogram by the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, + * "en-US", + * "fr-FR". + * * language: histogram by the language subtag of the + * [Job.language_code][google.cloud.talent.v4.Job.language_code], + * for example, "en", "fr". + * * category: histogram by the + * [JobCategory][google.cloud.talent.v4.JobCategory], for example, + * "COMPUTER_AND_IT", "HEALTHCARE". + * * base_compensation_unit: histogram by the + * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] + * of base salary, for example, "WEEKLY", "MONTHLY". + * * base_compensation: histogram by the base salary. Must specify list of + * numeric buckets to group results by. + * * annualized_base_compensation: histogram by the base annualized salary. + * Must specify list of numeric buckets to group results by. + * * annualized_total_compensation: histogram by the total annualized salary. + * Must specify list of numeric buckets to group results by. + * * string_custom_attribute: histogram by string + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * string_custom_attribute["key1"]. + * * numeric_custom_attribute: histogram by numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. + * Values can be accessed via square bracket notations like + * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to + * group results by. + * Example expressions: + * * `count(admin1)` + * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), + * bucket(100000, MAX)])` + * * `count(string_custom_attribute["some-string-custom-attribute"])` + * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], + * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` + * + * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; + * @param array<\Google\Cloud\Talent\V4\HistogramQuery>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHistogramQueries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\HistogramQuery::class); + $this->histogram_queries = $arr; + + return $this; + } + + /** + * The desired job attributes returned for jobs in the search response. + * Defaults to + * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if + * no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 8; + * @return int + */ + public function getJobView() + { + return $this->job_view; + } + + /** + * The desired job attributes returned for jobs in the search response. + * Defaults to + * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if + * no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 8; + * @param int $var + * @return $this + */ + public function setJobView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobView::class); + $this->job_view = $var; + + return $this; + } + + /** + * An integer that specifies the current offset (that is, starting result + * location, amongst the jobs deemed by the API as relevant) in search + * results. This field is only considered if + * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. + * The maximum allowed value is 5000. Otherwise an error is thrown. + * For example, 0 means to return results starting from the first matching + * job, and 10 means to return from the 11th job. This can be used for + * pagination, (for example, pageSize = 10 and offset = 10 means to return + * from the second page). + * + * Generated from protobuf field int32 offset = 9; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * An integer that specifies the current offset (that is, starting result + * location, amongst the jobs deemed by the API as relevant) in search + * results. This field is only considered if + * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. + * The maximum allowed value is 5000. Otherwise an error is thrown. + * For example, 0 means to return results starting from the first matching + * job, and 10 means to return from the 11th job. This can be used for + * pagination, (for example, pageSize = 10 and offset = 10 means to return + * from the second page). + * + * Generated from protobuf field int32 offset = 9; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + + /** + * A limit on the number of jobs returned in the search results. + * Increasing this value above the default value of 10 can increase search + * response time. The value can be between 1 and 100. + * + * Generated from protobuf field int32 max_page_size = 10; + * @return int + */ + public function getMaxPageSize() + { + return $this->max_page_size; + } + + /** + * A limit on the number of jobs returned in the search results. + * Increasing this value above the default value of 10 can increase search + * response time. The value can be between 1 and 100. + * + * Generated from protobuf field int32 max_page_size = 10; + * @param int $var + * @return $this + */ + public function setMaxPageSize($var) + { + GPBUtil::checkInt32($var); + $this->max_page_size = $var; + + return $this; + } + + /** + * The token specifying the current offset within + * search results. See + * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] + * for an explanation of how to obtain the next set of query results. + * + * Generated from protobuf field string page_token = 11; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The token specifying the current offset within + * search results. See + * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] + * for an explanation of how to obtain the next set of query results. + * + * Generated from protobuf field string page_token = 11; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The criteria determining how search results are sorted. Default is + * `"relevance desc"`. + * Supported options are: + * * `"relevance desc"`: By relevance descending, as determined by the API + * algorithms. Relevance thresholding of query results is only available + * with this ordering. + * * `"posting_publish_time desc"`: By + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * descending. + * * `"posting_update_time desc"`: By + * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] + * descending. + * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. + * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] + * descending. + * * `"annualized_base_compensation"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_base_compensation desc"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"annualized_total_compensation"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_total_compensation desc"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"custom_ranking desc"`: By the relevance score adjusted to the + * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * with weight factor assigned by + * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] + * in descending order. + * * Location sorting: Use the special syntax to order jobs by distance:
+ * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + * multiple locations. See details below.
+ * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + * multiple locations. See details below.
+ * The string can have a maximum of 256 characters. When multiple distance + * centers are provided, a job that is close to any of the distance centers + * would have a high rank. When a job has multiple locations, the job + * location closest to one of the distance centers will be used. Jobs that + * don't have locations will be ranked at the bottom. Distance is calculated + * with a precision of 11.3 meters (37.4 feet). Diversification strategy is + * still applied unless explicitly disabled in + * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. + * + * Generated from protobuf field string order_by = 12; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The criteria determining how search results are sorted. Default is + * `"relevance desc"`. + * Supported options are: + * * `"relevance desc"`: By relevance descending, as determined by the API + * algorithms. Relevance thresholding of query results is only available + * with this ordering. + * * `"posting_publish_time desc"`: By + * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] + * descending. + * * `"posting_update_time desc"`: By + * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] + * descending. + * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. + * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] + * descending. + * * `"annualized_base_compensation"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_base_compensation desc"`: By job's + * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"annualized_total_compensation"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * ascending. Jobs whose annualized base compensation is unspecified are put + * at the end of search results. + * * `"annualized_total_compensation desc"`: By job's + * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] + * descending. Jobs whose annualized base compensation is unspecified are + * put at the end of search results. + * * `"custom_ranking desc"`: By the relevance score adjusted to the + * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * with weight factor assigned by + * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] + * in descending order. + * * Location sorting: Use the special syntax to order jobs by distance:
+ * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
+ * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
+ * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by + * multiple locations. See details below.
+ * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by + * multiple locations. See details below.
+ * The string can have a maximum of 256 characters. When multiple distance + * centers are provided, a job that is close to any of the distance centers + * would have a high rank. When a job has multiple locations, the job + * location closest to one of the distance centers will be used. Jobs that + * don't have locations will be ranked at the bottom. Distance is calculated + * with a precision of 11.3 meters (37.4 feet). Diversification strategy is + * still applied unless explicitly disabled in + * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. + * + * Generated from protobuf field string order_by = 12; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Controls whether highly similar jobs are returned next to each other in + * the search results. Jobs are identified as highly similar based on + * their titles, job categories, and locations. Highly similar results are + * clustered so that only one representative job of the cluster is + * displayed to the job seeker higher up in the results, with the other jobs + * being displayed lower down in the results. + * Defaults to + * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] + * if no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * @return int + */ + public function getDiversificationLevel() + { + return $this->diversification_level; + } + + /** + * Controls whether highly similar jobs are returned next to each other in + * the search results. Jobs are identified as highly similar based on + * their titles, job categories, and locations. Highly similar results are + * clustered so that only one representative job of the cluster is + * displayed to the job seeker higher up in the results, with the other jobs + * being displayed lower down in the results. + * Defaults to + * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] + * if no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; + * @param int $var + * @return $this + */ + public function setDiversificationLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\DiversificationLevel::class); + $this->diversification_level = $var; + + return $this; + } + + /** + * Controls over how job documents get ranked on top of existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * @return \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo|null + */ + public function getCustomRankingInfo() + { + return $this->custom_ranking_info; + } + + public function hasCustomRankingInfo() + { + return isset($this->custom_ranking_info); + } + + public function clearCustomRankingInfo() + { + unset($this->custom_ranking_info); + } + + /** + * Controls over how job documents get ranked on top of existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; + * @param \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo $var + * @return $this + */ + public function setCustomRankingInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo::class); + $this->custom_ranking_info = $var; + + return $this; + } + + /** + * This field is deprecated. Please use + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * going forward. + * To migrate, disable_keyword_match set to false maps to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], + * and disable_keyword_match set to true maps to + * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. + * If + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * is set, this field is ignored. + * Controls whether to disable exact keyword match on + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.description][google.cloud.talent.v4.Job.description], + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], + * [Job.addresses][google.cloud.talent.v4.Job.addresses], + * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When + * disable keyword match is turned off, a keyword match returns jobs that do + * not match given category filters when there are matching keywords. For + * example, for the query "program manager," a result is returned even if the + * job posting has the title "software developer," which doesn't fall into + * "program manager" ontology, but does have "program manager" appearing in + * its description. + * For queries like "cloud" that don't contain title or + * location specific ontology, jobs with "cloud" keyword matches are returned + * regardless of this flag's value. + * Use + * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] + * if company-specific globally matched custom field/attribute string values + * are needed. Enabling keyword match improves recall of subsequent search + * requests. + * Defaults to false. + * + * Generated from protobuf field bool disable_keyword_match = 16 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getDisableKeywordMatch() + { + @trigger_error('disable_keyword_match is deprecated.', E_USER_DEPRECATED); + return $this->disable_keyword_match; + } + + /** + * This field is deprecated. Please use + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * going forward. + * To migrate, disable_keyword_match set to false maps to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], + * and disable_keyword_match set to true maps to + * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. + * If + * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] + * is set, this field is ignored. + * Controls whether to disable exact keyword match on + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.description][google.cloud.talent.v4.Job.description], + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], + * [Job.addresses][google.cloud.talent.v4.Job.addresses], + * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When + * disable keyword match is turned off, a keyword match returns jobs that do + * not match given category filters when there are matching keywords. For + * example, for the query "program manager," a result is returned even if the + * job posting has the title "software developer," which doesn't fall into + * "program manager" ontology, but does have "program manager" appearing in + * its description. + * For queries like "cloud" that don't contain title or + * location specific ontology, jobs with "cloud" keyword matches are returned + * regardless of this flag's value. + * Use + * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] + * if company-specific globally matched custom field/attribute string values + * are needed. Enabling keyword match improves recall of subsequent search + * requests. + * Defaults to false. + * + * Generated from protobuf field bool disable_keyword_match = 16 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setDisableKeywordMatch($var) + { + @trigger_error('disable_keyword_match is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->disable_keyword_match = $var; + + return $this; + } + + /** + * Controls what keyword match options to use. If both keyword_match_mode and + * disable_keyword_match are set, keyword_match_mode will take precedence. + * Defaults to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] + * if no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode keyword_match_mode = 18; + * @return int + */ + public function getKeywordMatchMode() + { + return $this->keyword_match_mode; + } + + /** + * Controls what keyword match options to use. If both keyword_match_mode and + * disable_keyword_match are set, keyword_match_mode will take precedence. + * Defaults to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] + * if no value is specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode keyword_match_mode = 18; + * @param int $var + * @return $this + */ + public function setKeywordMatchMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\KeywordMatchMode::class); + $this->keyword_match_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php new file mode 100644 index 000000000000..36cf85ca6dae --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php @@ -0,0 +1,185 @@ +google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo + */ +class CustomRankingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Controls over how important the score of + * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * gets applied to job's final ranking position. + * An error is thrown if not specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $importance_level = 0; + /** + * Required. Controls over how job documents get ranked on top of existing + * relevance score (determined by API algorithm). A combination of the + * ranking expression and relevance score is used to determine job's final + * ranking position. + * The syntax for this expression is a subset of Google SQL syntax. + * Supported operators are: +, -, *, /, where the left and right side of + * the operator is either a numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * key, integer/double value or an expression that can be evaluated to a + * number. + * Parenthesis are supported to adjust calculation precedence. The + * expression must be < 200 characters in length. + * The expression is considered invalid for a job if the expression + * references custom attributes that are not populated on the job or if the + * expression results in a divide by zero. If an expression is invalid for a + * job, that job is demoted to the end of the results. + * Sample ranking expression + * (year + 25) * 0.25 - (freshness / 0.5) + * + * Generated from protobuf field string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ranking_expression = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $importance_level + * Required. Controls over how important the score of + * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * gets applied to job's final ranking position. + * An error is thrown if not specified. + * @type string $ranking_expression + * Required. Controls over how job documents get ranked on top of existing + * relevance score (determined by API algorithm). A combination of the + * ranking expression and relevance score is used to determine job's final + * ranking position. + * The syntax for this expression is a subset of Google SQL syntax. + * Supported operators are: +, -, *, /, where the left and right side of + * the operator is either a numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * key, integer/double value or an expression that can be evaluated to a + * number. + * Parenthesis are supported to adjust calculation precedence. The + * expression must be < 200 characters in length. + * The expression is considered invalid for a job if the expression + * references custom attributes that are not populated on the job or if the + * expression results in a divide by zero. If an expression is invalid for a + * job, that job is demoted to the end of the results. + * Sample ranking expression + * (year + 25) * 0.25 - (freshness / 0.5) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Controls over how important the score of + * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * gets applied to job's final ranking position. + * An error is thrown if not specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getImportanceLevel() + { + return $this->importance_level; + } + + /** + * Required. Controls over how important the score of + * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] + * gets applied to job's final ranking position. + * An error is thrown if not specified. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setImportanceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo\ImportanceLevel::class); + $this->importance_level = $var; + + return $this; + } + + /** + * Required. Controls over how job documents get ranked on top of existing + * relevance score (determined by API algorithm). A combination of the + * ranking expression and relevance score is used to determine job's final + * ranking position. + * The syntax for this expression is a subset of Google SQL syntax. + * Supported operators are: +, -, *, /, where the left and right side of + * the operator is either a numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * key, integer/double value or an expression that can be evaluated to a + * number. + * Parenthesis are supported to adjust calculation precedence. The + * expression must be < 200 characters in length. + * The expression is considered invalid for a job if the expression + * references custom attributes that are not populated on the job or if the + * expression results in a divide by zero. If an expression is invalid for a + * job, that job is demoted to the end of the results. + * Sample ranking expression + * (year + 25) * 0.25 - (freshness / 0.5) + * + * Generated from protobuf field string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRankingExpression() + { + return $this->ranking_expression; + } + + /** + * Required. Controls over how job documents get ranked on top of existing + * relevance score (determined by API algorithm). A combination of the + * ranking expression and relevance score is used to determine job's final + * ranking position. + * The syntax for this expression is a subset of Google SQL syntax. + * Supported operators are: +, -, *, /, where the left and right side of + * the operator is either a numeric + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * key, integer/double value or an expression that can be evaluated to a + * number. + * Parenthesis are supported to adjust calculation precedence. The + * expression must be < 200 characters in length. + * The expression is considered invalid for a job if the expression + * references custom attributes that are not populated on the job or if the + * expression results in a divide by zero. If an expression is invalid for a + * job, that job is demoted to the end of the results. + * Sample ranking expression + * (year + 25) * 0.25 - (freshness / 0.5) + * + * Generated from protobuf field string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRankingExpression($var) + { + GPBUtil::checkString($var, True); + $this->ranking_expression = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomRankingInfo::class, \Google\Cloud\Talent\V4\SearchJobsRequest_CustomRankingInfo::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php new file mode 100644 index 000000000000..7f7fe32881a3 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php @@ -0,0 +1,105 @@ +google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel + */ +class ImportanceLevel +{ + /** + * Default value if the importance level isn't specified. + * + * Generated from protobuf enum IMPORTANCE_LEVEL_UNSPECIFIED = 0; + */ + const IMPORTANCE_LEVEL_UNSPECIFIED = 0; + /** + * The given ranking expression is of None importance, existing relevance + * score (determined by API algorithm) dominates job's final ranking + * position. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The given ranking expression is of Low importance in terms of job's + * final ranking position compared to existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf enum LOW = 2; + */ + const LOW = 2; + /** + * The given ranking expression is of Mild importance in terms of job's + * final ranking position compared to existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf enum MILD = 3; + */ + const MILD = 3; + /** + * The given ranking expression is of Medium importance in terms of job's + * final ranking position compared to existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf enum MEDIUM = 4; + */ + const MEDIUM = 4; + /** + * The given ranking expression is of High importance in terms of job's + * final ranking position compared to existing relevance + * score (determined by API algorithm). + * + * Generated from protobuf enum HIGH = 5; + */ + const HIGH = 5; + /** + * The given ranking expression is of Extreme importance, and dominates + * job's final ranking position with existing relevance + * score (determined by API algorithm) ignored. + * + * Generated from protobuf enum EXTREME = 6; + */ + const EXTREME = 6; + + private static $valueToName = [ + self::IMPORTANCE_LEVEL_UNSPECIFIED => 'IMPORTANCE_LEVEL_UNSPECIFIED', + self::NONE => 'NONE', + self::LOW => 'LOW', + self::MILD => 'MILD', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + self::EXTREME => 'EXTREME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImportanceLevel::class, \Google\Cloud\Talent\V4\SearchJobsRequest_CustomRankingInfo_ImportanceLevel::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php new file mode 100644 index 000000000000..fcedc3640958 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php @@ -0,0 +1,113 @@ +google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel + */ +class DiversificationLevel +{ + /** + * The diversification level isn't specified. + * + * Generated from protobuf enum DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; + */ + const DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; + /** + * Disables diversification. Jobs that would normally be pushed to the last + * page would not have their positions altered. This may result in highly + * similar jobs appearing in sequence in the search results. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Default diversifying behavior. The result list is ordered so that + * highly similar results are pushed to the end of the last page of search + * results. + * + * Generated from protobuf enum SIMPLE = 2; + */ + const SIMPLE = 2; + /** + * Only one job from the same company will be shown at once, other jobs + * under same company are pushed to the end of the last page of search + * result. + * + * Generated from protobuf enum ONE_PER_COMPANY = 3; + */ + const ONE_PER_COMPANY = 3; + /** + * Similar to ONE_PER_COMPANY, but it allows at most two jobs in the + * same company to be shown at once, the other jobs under same company are + * pushed to the end of the last page of search result. + * + * Generated from protobuf enum TWO_PER_COMPANY = 4; + */ + const TWO_PER_COMPANY = 4; + /** + * Similar to ONE_PER_COMPANY, but it allows at most three jobs in the + * same company to be shown at once, the other jobs under same company are + * dropped. + * + * Generated from protobuf enum MAX_THREE_PER_COMPANY = 6; + */ + const MAX_THREE_PER_COMPANY = 6; + /** + * The result list is ordered such that somewhat similar results are pushed + * to the end of the last page of the search results. This option is + * recommended if SIMPLE diversification does not diversify enough. + * + * Generated from protobuf enum DIVERSIFY_BY_LOOSER_SIMILARITY = 5; + */ + const DIVERSIFY_BY_LOOSER_SIMILARITY = 5; + + private static $valueToName = [ + self::DIVERSIFICATION_LEVEL_UNSPECIFIED => 'DIVERSIFICATION_LEVEL_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::SIMPLE => 'SIMPLE', + self::ONE_PER_COMPANY => 'ONE_PER_COMPANY', + self::TWO_PER_COMPANY => 'TWO_PER_COMPANY', + self::MAX_THREE_PER_COMPANY => 'MAX_THREE_PER_COMPANY', + self::DIVERSIFY_BY_LOOSER_SIMILARITY => 'DIVERSIFY_BY_LOOSER_SIMILARITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiversificationLevel::class, \Google\Cloud\Talent\V4\SearchJobsRequest_DiversificationLevel::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php new file mode 100644 index 000000000000..16211225deb8 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php @@ -0,0 +1,96 @@ +google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode + */ +class KeywordMatchMode +{ + /** + * The keyword match option isn't specified. Defaults to + * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] + * behavior. + * + * Generated from protobuf enum KEYWORD_MATCH_MODE_UNSPECIFIED = 0; + */ + const KEYWORD_MATCH_MODE_UNSPECIFIED = 0; + /** + * Disables keyword matching. + * + * Generated from protobuf enum KEYWORD_MATCH_DISABLED = 1; + */ + const KEYWORD_MATCH_DISABLED = 1; + /** + * Enable keyword matching over + * [Job.title][google.cloud.talent.v4.Job.title], + * [Job.description][google.cloud.talent.v4.Job.description], + * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], + * [Job.addresses][google.cloud.talent.v4.Job.addresses], + * [Job.qualifications][google.cloud.talent.v4.Job.qualifications], and + * keyword searchable + * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] + * fields. + * + * Generated from protobuf enum KEYWORD_MATCH_ALL = 2; + */ + const KEYWORD_MATCH_ALL = 2; + /** + * Only enable keyword matching over + * [Job.title][google.cloud.talent.v4.Job.title]. + * + * Generated from protobuf enum KEYWORD_MATCH_TITLE_ONLY = 3; + */ + const KEYWORD_MATCH_TITLE_ONLY = 3; + + private static $valueToName = [ + self::KEYWORD_MATCH_MODE_UNSPECIFIED => 'KEYWORD_MATCH_MODE_UNSPECIFIED', + self::KEYWORD_MATCH_DISABLED => 'KEYWORD_MATCH_DISABLED', + self::KEYWORD_MATCH_ALL => 'KEYWORD_MATCH_ALL', + self::KEYWORD_MATCH_TITLE_ONLY => 'KEYWORD_MATCH_TITLE_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KeywordMatchMode::class, \Google\Cloud\Talent\V4\SearchJobsRequest_KeywordMatchMode::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php new file mode 100644 index 000000000000..6ffe99fb7d5e --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php @@ -0,0 +1,71 @@ +google.cloud.talent.v4.SearchJobsRequest.SearchMode + */ +class SearchMode +{ + /** + * The mode of the search method isn't specified. The default search + * behavior is identical to JOB_SEARCH search behavior. + * + * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; + */ + const SEARCH_MODE_UNSPECIFIED = 0; + /** + * The job search matches against all jobs, and featured jobs + * (jobs with promotionValue > 0) are not specially handled. + * + * Generated from protobuf enum JOB_SEARCH = 1; + */ + const JOB_SEARCH = 1; + /** + * The job search matches only against featured jobs (jobs with a + * promotionValue > 0). This method doesn't return any jobs having a + * promotionValue <= 0. The search results order is determined by the + * promotionValue (jobs with a higher promotionValue are returned higher up + * in the search results), with relevance being used as a tiebreaker. + * + * Generated from protobuf enum FEATURED_JOB_SEARCH = 2; + */ + const FEATURED_JOB_SEARCH = 2; + + private static $valueToName = [ + self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', + self::JOB_SEARCH => 'JOB_SEARCH', + self::FEATURED_JOB_SEARCH => 'FEATURED_JOB_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchMode::class, \Google\Cloud\Talent\V4\SearchJobsRequest_SearchMode::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php new file mode 100644 index 000000000000..e643af367644 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php @@ -0,0 +1,381 @@ +google.cloud.talent.v4.SearchJobsResponse + */ +class SearchJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Job entities that match the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + */ + private $matching_jobs; + /** + * The histogram results that match with specified + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + */ + private $histogram_query_results; + /** + * The token that specifies the starting position of the next page of results. + * This field is empty if there are no more results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + /** + * The location filters that the service applied to the specified query. If + * any filters are lat-lng based, the + * [Location.location_type][google.cloud.talent.v4.Location.location_type] is + * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Location location_filters = 4; + */ + private $location_filters; + /** + * Number of jobs that match the specified query. + * Note: This size is precise only if the total is less than 100,000. + * + * Generated from protobuf field int32 total_size = 6; + */ + protected $total_size = 0; + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 7; + */ + protected $metadata = null; + /** + * If query broadening is enabled, we may append additional results from the + * broadened query. This number indicates how many of the jobs returned in the + * jobs field are from the broadened query. These results are always at the + * end of the jobs list. In particular, a value of 0, or if the field isn't + * set, all the jobs in the jobs list are from the original + * (without broadening) query. If this field is non-zero, subsequent requests + * with offset after this result set should contain all broadened results. + * + * Generated from protobuf field int32 broadened_query_jobs_count = 8; + */ + protected $broadened_query_jobs_count = 0; + /** + * The spell checking result, and correction. + * + * Generated from protobuf field .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + */ + protected $spell_correction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Talent\V4\SearchJobsResponse\MatchingJob>|\Google\Protobuf\Internal\RepeatedField $matching_jobs + * The Job entities that match the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * @type array<\Google\Cloud\Talent\V4\HistogramQueryResult>|\Google\Protobuf\Internal\RepeatedField $histogram_query_results + * The histogram results that match with specified + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. + * @type string $next_page_token + * The token that specifies the starting position of the next page of results. + * This field is empty if there are no more results. + * @type array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $location_filters + * The location filters that the service applied to the specified query. If + * any filters are lat-lng based, the + * [Location.location_type][google.cloud.talent.v4.Location.location_type] is + * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. + * @type int $total_size + * Number of jobs that match the specified query. + * Note: This size is precise only if the total is less than 100,000. + * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata + * Additional information for the API invocation, such as the request + * tracking id. + * @type int $broadened_query_jobs_count + * If query broadening is enabled, we may append additional results from the + * broadened query. This number indicates how many of the jobs returned in the + * jobs field are from the broadened query. These results are always at the + * end of the jobs list. In particular, a value of 0, or if the field isn't + * set, all the jobs in the jobs list are from the original + * (without broadening) query. If this field is non-zero, subsequent requests + * with offset after this result set should contain all broadened results. + * @type \Google\Cloud\Talent\V4\SpellingCorrection $spell_correction + * The spell checking result, and correction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * The Job entities that match the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMatchingJobs() + { + return $this->matching_jobs; + } + + /** + * The Job entities that match the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; + * @param array<\Google\Cloud\Talent\V4\SearchJobsResponse\MatchingJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMatchingJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\SearchJobsResponse\MatchingJob::class); + $this->matching_jobs = $arr; + + return $this; + } + + /** + * The histogram results that match with specified + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHistogramQueryResults() + { + return $this->histogram_query_results; + } + + /** + * The histogram results that match with specified + * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; + * @param array<\Google\Cloud\Talent\V4\HistogramQueryResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHistogramQueryResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\HistogramQueryResult::class); + $this->histogram_query_results = $arr; + + return $this; + } + + /** + * The token that specifies the starting position of the next page of results. + * This field is empty if there are no more results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token that specifies the starting position of the next page of results. + * This field is empty if there are no more results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The location filters that the service applied to the specified query. If + * any filters are lat-lng based, the + * [Location.location_type][google.cloud.talent.v4.Location.location_type] is + * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Location location_filters = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocationFilters() + { + return $this->location_filters; + } + + /** + * The location filters that the service applied to the specified query. If + * any filters are lat-lng based, the + * [Location.location_type][google.cloud.talent.v4.Location.location_type] is + * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. + * + * Generated from protobuf field repeated .google.cloud.talent.v4.Location location_filters = 4; + * @param array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocationFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Location::class); + $this->location_filters = $arr; + + return $this; + } + + /** + * Number of jobs that match the specified query. + * Note: This size is precise only if the total is less than 100,000. + * + * Generated from protobuf field int32 total_size = 6; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Number of jobs that match the specified query. + * Note: This size is precise only if the total is less than 100,000. + * + * Generated from protobuf field int32 total_size = 6; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * @return \Google\Cloud\Talent\V4\ResponseMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Additional information for the API invocation, such as the request + * tracking id. + * + * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 7; + * @param \Google\Cloud\Talent\V4\ResponseMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * If query broadening is enabled, we may append additional results from the + * broadened query. This number indicates how many of the jobs returned in the + * jobs field are from the broadened query. These results are always at the + * end of the jobs list. In particular, a value of 0, or if the field isn't + * set, all the jobs in the jobs list are from the original + * (without broadening) query. If this field is non-zero, subsequent requests + * with offset after this result set should contain all broadened results. + * + * Generated from protobuf field int32 broadened_query_jobs_count = 8; + * @return int + */ + public function getBroadenedQueryJobsCount() + { + return $this->broadened_query_jobs_count; + } + + /** + * If query broadening is enabled, we may append additional results from the + * broadened query. This number indicates how many of the jobs returned in the + * jobs field are from the broadened query. These results are always at the + * end of the jobs list. In particular, a value of 0, or if the field isn't + * set, all the jobs in the jobs list are from the original + * (without broadening) query. If this field is non-zero, subsequent requests + * with offset after this result set should contain all broadened results. + * + * Generated from protobuf field int32 broadened_query_jobs_count = 8; + * @param int $var + * @return $this + */ + public function setBroadenedQueryJobsCount($var) + { + GPBUtil::checkInt32($var); + $this->broadened_query_jobs_count = $var; + + return $this; + } + + /** + * The spell checking result, and correction. + * + * Generated from protobuf field .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * @return \Google\Cloud\Talent\V4\SpellingCorrection|null + */ + public function getSpellCorrection() + { + return $this->spell_correction; + } + + public function hasSpellCorrection() + { + return isset($this->spell_correction); + } + + public function clearSpellCorrection() + { + unset($this->spell_correction); + } + + /** + * The spell checking result, and correction. + * + * Generated from protobuf field .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; + * @param \Google\Cloud\Talent\V4\SpellingCorrection $var + * @return $this + */ + public function setSpellCorrection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\SpellingCorrection::class); + $this->spell_correction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php new file mode 100644 index 000000000000..95ec4e8c8266 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php @@ -0,0 +1,136 @@ +google.cloud.talent.v4.SearchJobsResponse.CommuteInfo + */ +class CommuteInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Location used as the destination in the commute calculation. + * + * Generated from protobuf field .google.cloud.talent.v4.Location job_location = 1; + */ + protected $job_location = null; + /** + * The number of seconds required to travel to the job location from the + * query location. A duration of 0 seconds indicates that the job isn't + * reachable within the requested duration, but was returned as part of an + * expanded query. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + */ + protected $travel_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Location $job_location + * Location used as the destination in the commute calculation. + * @type \Google\Protobuf\Duration $travel_duration + * The number of seconds required to travel to the job location from the + * query location. A duration of 0 seconds indicates that the job isn't + * reachable within the requested duration, but was returned as part of an + * expanded query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Location used as the destination in the commute calculation. + * + * Generated from protobuf field .google.cloud.talent.v4.Location job_location = 1; + * @return \Google\Cloud\Talent\V4\Location|null + */ + public function getJobLocation() + { + return $this->job_location; + } + + public function hasJobLocation() + { + return isset($this->job_location); + } + + public function clearJobLocation() + { + unset($this->job_location); + } + + /** + * Location used as the destination in the commute calculation. + * + * Generated from protobuf field .google.cloud.talent.v4.Location job_location = 1; + * @param \Google\Cloud\Talent\V4\Location $var + * @return $this + */ + public function setJobLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Location::class); + $this->job_location = $var; + + return $this; + } + + /** + * The number of seconds required to travel to the job location from the + * query location. A duration of 0 seconds indicates that the job isn't + * reachable within the requested duration, but was returned as part of an + * expanded query. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * The number of seconds required to travel to the job location from the + * query location. A duration of 0 seconds indicates that the job isn't + * reachable within the requested duration, but was returned as part of an + * expanded query. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CommuteInfo::class, \Google\Cloud\Talent\V4\SearchJobsResponse_CommuteInfo::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php new file mode 100644 index 000000000000..e0144a2c4ed7 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php @@ -0,0 +1,267 @@ +google.cloud.talent.v4.SearchJobsResponse.MatchingJob + */ +class MatchingJob extends \Google\Protobuf\Internal\Message +{ + /** + * Job resource that matches the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; + */ + protected $job = null; + /** + * A summary of the job with core information that's displayed on the search + * results listing page. + * + * Generated from protobuf field string job_summary = 2; + */ + protected $job_summary = ''; + /** + * Contains snippets of text from the + * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching + * a search query's keywords, if available. The matching query keywords are + * enclosed in HTML bold tags. + * + * Generated from protobuf field string job_title_snippet = 3; + */ + protected $job_title_snippet = ''; + /** + * Contains snippets of text from the + * [Job.description][google.cloud.talent.v4.Job.description] and similar + * fields that most closely match a search query's keywords, if available. + * All HTML tags in the original fields are stripped when returned in this + * field, and matching query keywords are enclosed in HTML bold tags. + * + * Generated from protobuf field string search_text_snippet = 4; + */ + protected $search_text_snippet = ''; + /** + * Commute information which is generated based on specified + * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + */ + protected $commute_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Job $job + * Job resource that matches the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * @type string $job_summary + * A summary of the job with core information that's displayed on the search + * results listing page. + * @type string $job_title_snippet + * Contains snippets of text from the + * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching + * a search query's keywords, if available. The matching query keywords are + * enclosed in HTML bold tags. + * @type string $search_text_snippet + * Contains snippets of text from the + * [Job.description][google.cloud.talent.v4.Job.description] and similar + * fields that most closely match a search query's keywords, if available. + * All HTML tags in the original fields are stripped when returned in this + * field, and matching query keywords are enclosed in HTML bold tags. + * @type \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo $commute_info + * Commute information which is generated based on specified + * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Job resource that matches the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; + * @return \Google\Cloud\Talent\V4\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Job resource that matches the specified + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; + * @param \Google\Cloud\Talent\V4\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); + $this->job = $var; + + return $this; + } + + /** + * A summary of the job with core information that's displayed on the search + * results listing page. + * + * Generated from protobuf field string job_summary = 2; + * @return string + */ + public function getJobSummary() + { + return $this->job_summary; + } + + /** + * A summary of the job with core information that's displayed on the search + * results listing page. + * + * Generated from protobuf field string job_summary = 2; + * @param string $var + * @return $this + */ + public function setJobSummary($var) + { + GPBUtil::checkString($var, True); + $this->job_summary = $var; + + return $this; + } + + /** + * Contains snippets of text from the + * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching + * a search query's keywords, if available. The matching query keywords are + * enclosed in HTML bold tags. + * + * Generated from protobuf field string job_title_snippet = 3; + * @return string + */ + public function getJobTitleSnippet() + { + return $this->job_title_snippet; + } + + /** + * Contains snippets of text from the + * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching + * a search query's keywords, if available. The matching query keywords are + * enclosed in HTML bold tags. + * + * Generated from protobuf field string job_title_snippet = 3; + * @param string $var + * @return $this + */ + public function setJobTitleSnippet($var) + { + GPBUtil::checkString($var, True); + $this->job_title_snippet = $var; + + return $this; + } + + /** + * Contains snippets of text from the + * [Job.description][google.cloud.talent.v4.Job.description] and similar + * fields that most closely match a search query's keywords, if available. + * All HTML tags in the original fields are stripped when returned in this + * field, and matching query keywords are enclosed in HTML bold tags. + * + * Generated from protobuf field string search_text_snippet = 4; + * @return string + */ + public function getSearchTextSnippet() + { + return $this->search_text_snippet; + } + + /** + * Contains snippets of text from the + * [Job.description][google.cloud.talent.v4.Job.description] and similar + * fields that most closely match a search query's keywords, if available. + * All HTML tags in the original fields are stripped when returned in this + * field, and matching query keywords are enclosed in HTML bold tags. + * + * Generated from protobuf field string search_text_snippet = 4; + * @param string $var + * @return $this + */ + public function setSearchTextSnippet($var) + { + GPBUtil::checkString($var, True); + $this->search_text_snippet = $var; + + return $this; + } + + /** + * Commute information which is generated based on specified + * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * @return \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo|null + */ + public function getCommuteInfo() + { + return $this->commute_info; + } + + public function hasCommuteInfo() + { + return isset($this->commute_info); + } + + public function clearCommuteInfo() + { + unset($this->commute_info); + } + + /** + * Commute information which is generated based on specified + * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. + * + * Generated from protobuf field .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; + * @param \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo $var + * @return $this + */ + public function setCommuteInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo::class); + $this->commute_info = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MatchingJob::class, \Google\Cloud\Talent\V4\SearchJobsResponse_MatchingJob::class); + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php new file mode 100644 index 000000000000..e756ab94e1b8 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php @@ -0,0 +1,155 @@ +google.cloud.talent.v4.SpellingCorrection + */ +class SpellingCorrection extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates if the query was corrected by the spell checker. + * + * Generated from protobuf field bool corrected = 1; + */ + protected $corrected = false; + /** + * Correction output consisting of the corrected keyword string. + * + * Generated from protobuf field string corrected_text = 2; + */ + protected $corrected_text = ''; + /** + * Corrected output with html tags to highlight the corrected words. + * Corrected words are called out with the "..." html tags. + * For example, the user input query is "software enginear", where the second + * word, "enginear," is incorrect. It should be "engineer". When spelling + * correction is enabled, this value is + * "software engineer". + * + * Generated from protobuf field string corrected_html = 3; + */ + protected $corrected_html = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $corrected + * Indicates if the query was corrected by the spell checker. + * @type string $corrected_text + * Correction output consisting of the corrected keyword string. + * @type string $corrected_html + * Corrected output with html tags to highlight the corrected words. + * Corrected words are called out with the "..." html tags. + * For example, the user input query is "software enginear", where the second + * word, "enginear," is incorrect. It should be "engineer". When spelling + * correction is enabled, this value is + * "software engineer". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Indicates if the query was corrected by the spell checker. + * + * Generated from protobuf field bool corrected = 1; + * @return bool + */ + public function getCorrected() + { + return $this->corrected; + } + + /** + * Indicates if the query was corrected by the spell checker. + * + * Generated from protobuf field bool corrected = 1; + * @param bool $var + * @return $this + */ + public function setCorrected($var) + { + GPBUtil::checkBool($var); + $this->corrected = $var; + + return $this; + } + + /** + * Correction output consisting of the corrected keyword string. + * + * Generated from protobuf field string corrected_text = 2; + * @return string + */ + public function getCorrectedText() + { + return $this->corrected_text; + } + + /** + * Correction output consisting of the corrected keyword string. + * + * Generated from protobuf field string corrected_text = 2; + * @param string $var + * @return $this + */ + public function setCorrectedText($var) + { + GPBUtil::checkString($var, True); + $this->corrected_text = $var; + + return $this; + } + + /** + * Corrected output with html tags to highlight the corrected words. + * Corrected words are called out with the "..." html tags. + * For example, the user input query is "software enginear", where the second + * word, "enginear," is incorrect. It should be "engineer". When spelling + * correction is enabled, this value is + * "software engineer". + * + * Generated from protobuf field string corrected_html = 3; + * @return string + */ + public function getCorrectedHtml() + { + return $this->corrected_html; + } + + /** + * Corrected output with html tags to highlight the corrected words. + * Corrected words are called out with the "..." html tags. + * For example, the user input query is "software enginear", where the second + * word, "enginear," is incorrect. It should be "engineer". When spelling + * correction is enabled, this value is + * "software engineer". + * + * Generated from protobuf field string corrected_html = 3; + * @param string $var + * @return $this + */ + public function setCorrectedHtml($var) + { + GPBUtil::checkString($var, True); + $this->corrected_html = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php new file mode 100644 index 000000000000..a10c2defe55c --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php @@ -0,0 +1,128 @@ +google.cloud.talent.v4.Tenant + */ +class Tenant extends \Google\Protobuf\Internal\Message +{ + /** + * Required during tenant update. + * The resource name for a tenant. This is generated by the service when a + * tenant is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. Client side tenant identifier, used to uniquely identify the + * tenant. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required during tenant update. + * The resource name for a tenant. This is generated by the service when a + * tenant is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * @type string $external_id + * Required. Client side tenant identifier, used to uniquely identify the + * tenant. + * The maximum number of allowed characters is 255. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Tenant::initOnce(); + parent::__construct($data); + } + + /** + * Required during tenant update. + * The resource name for a tenant. This is generated by the service when a + * tenant is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required during tenant update. + * The resource name for a tenant. This is generated by the service when a + * tenant is created. + * The format is "projects/{project_id}/tenants/{tenant_id}", for example, + * "projects/foo/tenants/bar". + * + * 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. Client side tenant identifier, used to uniquely identify the + * tenant. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getExternalId() + { + return $this->external_id; + } + + /** + * Required. Client side tenant identifier, used to uniquely identify the + * tenant. + * The maximum number of allowed characters is 255. + * + * Generated from protobuf field string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setExternalId($var) + { + GPBUtil::checkString($var, True); + $this->external_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php new file mode 100644 index 000000000000..5f006a28cc15 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php @@ -0,0 +1,121 @@ +google.cloud.talent.v4.TimestampRange + */ +class TimestampRange extends \Google\Protobuf\Internal\Message +{ + /** + * Begin of the period (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * End of the period (exclusive). + * + * 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 + * Begin of the period (inclusive). + * @type \Google\Protobuf\Timestamp $end_time + * End of the period (exclusive). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); + parent::__construct($data); + } + + /** + * Begin of the period (inclusive). + * + * 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); + } + + /** + * Begin of the period (inclusive). + * + * 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 of the period (exclusive). + * + * 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 of the period (exclusive). + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php new file mode 100644 index 000000000000..6e22017636b2 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php @@ -0,0 +1,178 @@ +google.cloud.talent.v4.UpdateCompanyRequest + */ +class UpdateCompanyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The company resource to replace the current resource in the + * system. + * + * Generated from protobuf field .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $company = null; + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] + * is provided, only the specified fields in + * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the company fields to be updated. Only + * top level fields of [Company][google.cloud.talent.v4.Company] are + * supported. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Talent\V4\Company $company Required. The company resource to replace the current resource in the + * system. + * @param \Google\Protobuf\FieldMask $updateMask Strongly recommended for the best service experience. + * + * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] + * is provided, only the specified fields in + * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. + * Otherwise all the fields are updated. + * + * A field mask to specify the company fields to be updated. Only + * top level fields of [Company][google.cloud.talent.v4.Company] are + * supported. + * + * @return \Google\Cloud\Talent\V4\UpdateCompanyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Talent\V4\Company $company, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCompany($company) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Company $company + * Required. The company resource to replace the current resource in the + * system. + * @type \Google\Protobuf\FieldMask $update_mask + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] + * is provided, only the specified fields in + * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the company fields to be updated. Only + * top level fields of [Company][google.cloud.talent.v4.Company] are + * supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The company resource to replace the current resource in the + * system. + * + * Generated from protobuf field .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\Company|null + */ + public function getCompany() + { + return $this->company; + } + + public function hasCompany() + { + return isset($this->company); + } + + public function clearCompany() + { + unset($this->company); + } + + /** + * Required. The company resource to replace the current resource in the + * system. + * + * Generated from protobuf field .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\Company $var + * @return $this + */ + public function setCompany($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Company::class); + $this->company = $var; + + return $this; + } + + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] + * is provided, only the specified fields in + * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the company fields to be updated. Only + * top level fields of [Company][google.cloud.talent.v4.Company] are + * supported. + * + * 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); + } + + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] + * is provided, only the specified fields in + * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the company fields to be updated. Only + * top level fields of [Company][google.cloud.talent.v4.Company] are + * supported. + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php new file mode 100644 index 000000000000..38ee2ed5227f --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php @@ -0,0 +1,168 @@ +google.cloud.talent.v4.UpdateJobRequest + */ +class UpdateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Job to be updated. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is + * provided, only the specified fields in + * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise + * all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Talent\V4\Job $job Required. The Job to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Strongly recommended for the best service experience. + * + * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is + * provided, only the specified fields in + * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise + * all the fields are updated. + * + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * + * @return \Google\Cloud\Talent\V4\UpdateJobRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Talent\V4\Job $job, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setJob($job) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Job $job + * Required. The Job to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is + * provided, only the specified fields in + * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise + * all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Job to be updated. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. The Job to be updated. + * + * Generated from protobuf field .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); + $this->job = $var; + + return $this; + } + + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is + * provided, only the specified fields in + * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise + * all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * + * 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); + } + + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is + * provided, only the specified fields in + * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise + * all the fields are updated. + * A field mask to restrict the fields that are updated. Only + * top level fields of [Job][google.cloud.talent.v4.Job] are supported. + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php new file mode 100644 index 000000000000..a26ad78333d2 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php @@ -0,0 +1,173 @@ +google.cloud.talent.v4.UpdateTenantRequest + */ +class UpdateTenantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The tenant resource to replace the current resource in the + * system. + * + * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tenant = null; + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is + * provided, only the specified fields in + * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the tenant fields to be updated. Only + * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Talent\V4\Tenant $tenant Required. The tenant resource to replace the current resource in the + * system. + * @param \Google\Protobuf\FieldMask $updateMask Strongly recommended for the best service experience. + * + * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is + * provided, only the specified fields in + * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. + * Otherwise all the fields are updated. + * + * A field mask to specify the tenant fields to be updated. Only + * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. + * + * @return \Google\Cloud\Talent\V4\UpdateTenantRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Talent\V4\Tenant $tenant, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTenant($tenant) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Talent\V4\Tenant $tenant + * Required. The tenant resource to replace the current resource in the + * system. + * @type \Google\Protobuf\FieldMask $update_mask + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is + * provided, only the specified fields in + * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the tenant fields to be updated. Only + * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The tenant resource to replace the current resource in the + * system. + * + * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Talent\V4\Tenant|null + */ + public function getTenant() + { + return $this->tenant; + } + + public function hasTenant() + { + return isset($this->tenant); + } + + public function clearTenant() + { + unset($this->tenant); + } + + /** + * Required. The tenant resource to replace the current resource in the + * system. + * + * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Talent\V4\Tenant $var + * @return $this + */ + public function setTenant($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Tenant::class); + $this->tenant = $var; + + return $this; + } + + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is + * provided, only the specified fields in + * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the tenant fields to be updated. Only + * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. + * + * 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); + } + + /** + * Strongly recommended for the best service experience. + * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is + * provided, only the specified fields in + * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. + * Otherwise all the fields are updated. + * A field mask to specify the tenant fields to be updated. Only + * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. + * + * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php new file mode 100644 index 000000000000..3633e1ed9f97 --- /dev/null +++ b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php @@ -0,0 +1,72 @@ +google.cloud.talent.v4.Visibility + */ +class Visibility +{ + /** + * Default value. + * + * Generated from protobuf enum VISIBILITY_UNSPECIFIED = 0; + */ + const VISIBILITY_UNSPECIFIED = 0; + /** + * The resource is only visible to the GCP account who owns it. + * + * Generated from protobuf enum ACCOUNT_ONLY = 1; + */ + const ACCOUNT_ONLY = 1; + /** + * The resource is visible to the owner and may be visible to other + * applications and processes at Google. + * + * Generated from protobuf enum SHARED_WITH_GOOGLE = 2; + */ + const SHARED_WITH_GOOGLE = 2; + /** + * The resource is visible to the owner and may be visible to all other API + * clients. + * + * Generated from protobuf enum SHARED_WITH_PUBLIC = 3; + */ + const SHARED_WITH_PUBLIC = 3; + + private static $valueToName = [ + self::VISIBILITY_UNSPECIFIED => 'VISIBILITY_UNSPECIFIED', + self::ACCOUNT_ONLY => 'ACCOUNT_ONLY', + self::SHARED_WITH_GOOGLE => 'SHARED_WITH_GOOGLE', + self::SHARED_WITH_PUBLIC => 'SHARED_WITH_PUBLIC', + ]; + + 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/Talent/v4/samples/V4/CompanyServiceClient/create_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/create_company.php new file mode 100644 index 000000000000..99bbc2e48e35 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/create_company.php @@ -0,0 +1,88 @@ +setDisplayName($companyDisplayName) + ->setExternalId($companyExternalId); + $request = (new CreateCompanyRequest()) + ->setParent($formattedParent) + ->setCompany($company); + + // Call the API and handle any network failures. + try { + /** @var Company $response */ + $response = $companyServiceClient->createCompany($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 = CompanyServiceClient::tenantName('[PROJECT]', '[TENANT]'); + $companyDisplayName = '[DISPLAY_NAME]'; + $companyExternalId = '[EXTERNAL_ID]'; + + create_company_sample($formattedParent, $companyDisplayName, $companyExternalId); +} +// [END jobs_v4_generated_CompanyService_CreateCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php new file mode 100644 index 000000000000..7e007396804b --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $companyServiceClient->deleteCompany($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 = CompanyServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + + delete_company_sample($formattedName); +} +// [END jobs_v4_generated_CompanyService_DeleteCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php new file mode 100644 index 000000000000..34cbfba1d106 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Company $response */ + $response = $companyServiceClient->getCompany($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 = CompanyServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + + get_company_sample($formattedName); +} +// [END jobs_v4_generated_CompanyService_GetCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php new file mode 100644 index 000000000000..0c4d187146ab --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $companyServiceClient->listCompanies($request); + + /** @var Company $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 = CompanyServiceClient::tenantName('[PROJECT]', '[TENANT]'); + + list_companies_sample($formattedParent); +} +// [END jobs_v4_generated_CompanyService_ListCompanies_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php new file mode 100644 index 000000000000..14026efd7541 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php @@ -0,0 +1,78 @@ +setDisplayName($companyDisplayName) + ->setExternalId($companyExternalId); + $request = (new UpdateCompanyRequest()) + ->setCompany($company); + + // Call the API and handle any network failures. + try { + /** @var Company $response */ + $response = $companyServiceClient->updateCompany($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 +{ + $companyDisplayName = '[DISPLAY_NAME]'; + $companyExternalId = '[EXTERNAL_ID]'; + + update_company_sample($companyDisplayName, $companyExternalId); +} +// [END jobs_v4_generated_CompanyService_UpdateCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php b/owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php new file mode 100644 index 000000000000..1d7e54e1013f --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php @@ -0,0 +1,85 @@ +setTenant($formattedTenant) + ->setQuery($query) + ->setPageSize($pageSize); + + // Call the API and handle any network failures. + try { + /** @var CompleteQueryResponse $response */ + $response = $completionClient->completeQuery($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedTenant = CompletionClient::tenantName('[PROJECT]', '[TENANT]'); + $query = '[QUERY]'; + $pageSize = 0; + + complete_query_sample($formattedTenant, $query, $pageSize); +} +// [END jobs_v4_generated_Completion_CompleteQuery_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php b/owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php new file mode 100644 index 000000000000..091159468189 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php @@ -0,0 +1,88 @@ +setEventId($clientEventEventId) + ->setCreateTime($clientEventCreateTime); + $request = (new CreateClientEventRequest()) + ->setParent($formattedParent) + ->setClientEvent($clientEvent); + + // Call the API and handle any network failures. + try { + /** @var ClientEvent $response */ + $response = $eventServiceClient->createClientEvent($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 = EventServiceClient::tenantName('[PROJECT]', '[TENANT]'); + $clientEventEventId = '[EVENT_ID]'; + + create_client_event_sample($formattedParent, $clientEventEventId); +} +// [END jobs_v4_generated_EventService_CreateClientEvent_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php new file mode 100644 index 000000000000..2dab5061db3b --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php @@ -0,0 +1,138 @@ +setCompany($formattedJobsCompany) + ->setRequisitionId($jobsRequisitionId) + ->setTitle($jobsTitle) + ->setDescription($jobsDescription); + $jobs = [$job,]; + $request = (new BatchCreateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobServiceClient->batchCreateJobs($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchCreateJobsResponse $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + $formattedJobsCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $jobsRequisitionId = '[REQUISITION_ID]'; + $jobsTitle = '[TITLE]'; + $jobsDescription = '[DESCRIPTION]'; + + batch_create_jobs_sample( + $formattedParent, + $formattedJobsCompany, + $jobsRequisitionId, + $jobsTitle, + $jobsDescription + ); +} +// [END jobs_v4_generated_JobService_BatchCreateJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php new file mode 100644 index 000000000000..b5ee25b26e8f --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php @@ -0,0 +1,88 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobServiceClient->batchDeleteJobs($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchDeleteJobsResponse $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + + batch_delete_jobs_sample($formattedParent); +} +// [END jobs_v4_generated_JobService_BatchDeleteJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php new file mode 100644 index 000000000000..739e32f47c61 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php @@ -0,0 +1,138 @@ +setCompany($formattedJobsCompany) + ->setRequisitionId($jobsRequisitionId) + ->setTitle($jobsTitle) + ->setDescription($jobsDescription); + $jobs = [$job,]; + $request = (new BatchUpdateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $jobServiceClient->batchUpdateJobs($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchUpdateJobsResponse $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + $formattedJobsCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $jobsRequisitionId = '[REQUISITION_ID]'; + $jobsTitle = '[TITLE]'; + $jobsDescription = '[DESCRIPTION]'; + + batch_update_jobs_sample( + $formattedParent, + $formattedJobsCompany, + $jobsRequisitionId, + $jobsTitle, + $jobsDescription + ); +} +// [END jobs_v4_generated_JobService_BatchUpdateJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php new file mode 100644 index 000000000000..e0424209c11d --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php @@ -0,0 +1,127 @@ +setCompany($formattedJobCompany) + ->setRequisitionId($jobRequisitionId) + ->setTitle($jobTitle) + ->setDescription($jobDescription); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobServiceClient->createJob($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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + $formattedJobCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $jobRequisitionId = '[REQUISITION_ID]'; + $jobTitle = '[TITLE]'; + $jobDescription = '[DESCRIPTION]'; + + create_job_sample( + $formattedParent, + $formattedJobCompany, + $jobRequisitionId, + $jobTitle, + $jobDescription + ); +} +// [END jobs_v4_generated_JobService_CreateJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php new file mode 100644 index 000000000000..f9d99c25b971 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $jobServiceClient->deleteJob($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 = JobServiceClient::jobName('[PROJECT]', '[TENANT]', '[JOB]'); + + delete_job_sample($formattedName); +} +// [END jobs_v4_generated_JobService_DeleteJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php new file mode 100644 index 000000000000..408230f56898 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobServiceClient->getJob($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 = JobServiceClient::jobName('[PROJECT]', '[TENANT]', '[JOB]'); + + get_job_sample($formattedName); +} +// [END jobs_v4_generated_JobService_GetJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php new file mode 100644 index 000000000000..62b3b4e094c9 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php @@ -0,0 +1,104 @@ +setParent($formattedParent) + ->setFilter($filter); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $jobServiceClient->listJobs($request); + + /** @var Job $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + $filter = '[FILTER]'; + + list_jobs_sample($formattedParent, $filter); +} +// [END jobs_v4_generated_JobService_ListJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php new file mode 100644 index 000000000000..7429a9370b8e --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setRequestMetadata($requestMetadata); + + // Call the API and handle any network failures. + try { + /** @var SearchJobsResponse $response */ + $response = $jobServiceClient->searchJobs($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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + + search_jobs_sample($formattedParent); +} +// [END jobs_v4_generated_JobService_SearchJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php new file mode 100644 index 000000000000..7ce6e89f416a --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setRequestMetadata($requestMetadata); + + // Call the API and handle any network failures. + try { + /** @var SearchJobsResponse $response */ + $response = $jobServiceClient->searchJobsForAlert($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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); + + search_jobs_for_alert_sample($formattedParent); +} +// [END jobs_v4_generated_JobService_SearchJobsForAlert_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php new file mode 100644 index 000000000000..33c541c7cad8 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php @@ -0,0 +1,113 @@ +setCompany($formattedJobCompany) + ->setRequisitionId($jobRequisitionId) + ->setTitle($jobTitle) + ->setDescription($jobDescription); + $request = (new UpdateJobRequest()) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $jobServiceClient->updateJob($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 +{ + $formattedJobCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $jobRequisitionId = '[REQUISITION_ID]'; + $jobTitle = '[TITLE]'; + $jobDescription = '[DESCRIPTION]'; + + update_job_sample($formattedJobCompany, $jobRequisitionId, $jobTitle, $jobDescription); +} +// [END jobs_v4_generated_JobService_UpdateJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php new file mode 100644 index 000000000000..a72cc1503173 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php @@ -0,0 +1,82 @@ +setExternalId($tenantExternalId); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenant($tenant); + + // Call the API and handle any network failures. + try { + /** @var Tenant $response */ + $response = $tenantServiceClient->createTenant($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 = TenantServiceClient::projectName('[PROJECT]'); + $tenantExternalId = '[EXTERNAL_ID]'; + + create_tenant_sample($formattedParent, $tenantExternalId); +} +// [END jobs_v4_generated_TenantService_CreateTenant_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php new file mode 100644 index 000000000000..5b78525b235b --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $tenantServiceClient->deleteTenant($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 = TenantServiceClient::tenantName('[PROJECT]', '[TENANT]'); + + delete_tenant_sample($formattedName); +} +// [END jobs_v4_generated_TenantService_DeleteTenant_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php new file mode 100644 index 000000000000..1055eb132719 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Tenant $response */ + $response = $tenantServiceClient->getTenant($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 = TenantServiceClient::tenantName('[PROJECT]', '[TENANT]'); + + get_tenant_sample($formattedName); +} +// [END jobs_v4_generated_TenantService_GetTenant_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php new file mode 100644 index 000000000000..52d7c37f2d42 --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $tenantServiceClient->listTenants($request); + + /** @var Tenant $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 = TenantServiceClient::projectName('[PROJECT]'); + + list_tenants_sample($formattedParent); +} +// [END jobs_v4_generated_TenantService_ListTenants_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php new file mode 100644 index 000000000000..b6636d96de6b --- /dev/null +++ b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php @@ -0,0 +1,75 @@ +setExternalId($tenantExternalId); + $request = (new UpdateTenantRequest()) + ->setTenant($tenant); + + // Call the API and handle any network failures. + try { + /** @var Tenant $response */ + $response = $tenantServiceClient->updateTenant($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 +{ + $tenantExternalId = '[EXTERNAL_ID]'; + + update_tenant_sample($tenantExternalId); +} +// [END jobs_v4_generated_TenantService_UpdateTenant_sync] diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php new file mode 100644 index 000000000000..63c14c67a5c3 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php @@ -0,0 +1,370 @@ + createCompanyAsync(CreateCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCompanyAsync(DeleteCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCompanyAsync(GetCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCompaniesAsync(ListCompaniesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCompanyAsync(UpdateCompanyRequest $request, array $optionalArgs = []) + */ +final class CompanyServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.talent.v4.CompanyService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'jobs.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/company_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/company_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/company_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/company_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a company + * resource. + * + * @param string $project + * @param string $tenant + * @param string $company + * + * @return string The formatted company resource. + */ + public static function companyName(string $project, string $tenant, string $company): string + { + return self::getPathTemplate('company')->render([ + 'project' => $project, + 'tenant' => $tenant, + 'company' => $company, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tenant + * resource. + * + * @param string $project + * @param string $tenant + * + * @return string The formatted tenant resource. + */ + public static function tenantName(string $project, string $tenant): string + { + return self::getPathTemplate('tenant')->render([ + 'project' => $project, + 'tenant' => $tenant, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - company: projects/{project}/tenants/{tenant}/companies/{company} + * - tenant: projects/{project}/tenants/{tenant} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'jobs.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new company entity. + * + * The async variant is {@see CompanyServiceClient::createCompanyAsync()} . + * + * @example samples/V4/CompanyServiceClient/create_company.php + * + * @param CreateCompanyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Company + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCompany(CreateCompanyRequest $request, array $callOptions = []): Company + { + return $this->startApiCall('CreateCompany', $request, $callOptions)->wait(); + } + + /** + * Deletes specified company. + * Prerequisite: The company has no jobs associated with it. + * + * The async variant is {@see CompanyServiceClient::deleteCompanyAsync()} . + * + * @example samples/V4/CompanyServiceClient/delete_company.php + * + * @param DeleteCompanyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteCompany(DeleteCompanyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteCompany', $request, $callOptions)->wait(); + } + + /** + * Retrieves specified company. + * + * The async variant is {@see CompanyServiceClient::getCompanyAsync()} . + * + * @example samples/V4/CompanyServiceClient/get_company.php + * + * @param GetCompanyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Company + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCompany(GetCompanyRequest $request, array $callOptions = []): Company + { + return $this->startApiCall('GetCompany', $request, $callOptions)->wait(); + } + + /** + * Lists all companies associated with the project. + * + * The async variant is {@see CompanyServiceClient::listCompaniesAsync()} . + * + * @example samples/V4/CompanyServiceClient/list_companies.php + * + * @param ListCompaniesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCompanies(ListCompaniesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCompanies', $request, $callOptions); + } + + /** + * Updates specified company. + * + * The async variant is {@see CompanyServiceClient::updateCompanyAsync()} . + * + * @example samples/V4/CompanyServiceClient/update_company.php + * + * @param UpdateCompanyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Company + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCompany(UpdateCompanyRequest $request, array $callOptions = []): Company + { + return $this->startApiCall('UpdateCompany', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php new file mode 100644 index 000000000000..7a5b0f9a965a --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php @@ -0,0 +1,259 @@ + completeQueryAsync(CompleteQueryRequest $request, array $optionalArgs = []) + */ +final class CompletionClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.talent.v4.Completion'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'jobs.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/completion_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/completion_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/completion_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/completion_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a company + * resource. + * + * @param string $project + * @param string $tenant + * @param string $company + * + * @return string The formatted company resource. + */ + public static function companyName(string $project, string $tenant, string $company): string + { + return self::getPathTemplate('company')->render([ + 'project' => $project, + 'tenant' => $tenant, + 'company' => $company, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tenant + * resource. + * + * @param string $project + * @param string $tenant + * + * @return string The formatted tenant resource. + */ + public static function tenantName(string $project, string $tenant): string + { + return self::getPathTemplate('tenant')->render([ + 'project' => $project, + 'tenant' => $tenant, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - company: projects/{project}/tenants/{tenant}/companies/{company} + * - tenant: projects/{project}/tenants/{tenant} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'jobs.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Completes the specified prefix with keyword suggestions. + * Intended for use by a job search auto-complete search box. + * + * The async variant is {@see CompletionClient::completeQueryAsync()} . + * + * @example samples/V4/CompletionClient/complete_query.php + * + * @param CompleteQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CompleteQueryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function completeQuery(CompleteQueryRequest $request, array $callOptions = []): CompleteQueryResponse + { + return $this->startApiCall('CompleteQuery', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php new file mode 100644 index 000000000000..0b6fb7a5b45a --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php @@ -0,0 +1,244 @@ + createClientEventAsync(CreateClientEventRequest $request, array $optionalArgs = []) + */ +final class EventServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.talent.v4.EventService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'jobs.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/event_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/event_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/event_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/event_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a tenant + * resource. + * + * @param string $project + * @param string $tenant + * + * @return string The formatted tenant resource. + */ + public static function tenantName(string $project, string $tenant): string + { + return self::getPathTemplate('tenant')->render([ + 'project' => $project, + 'tenant' => $tenant, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - tenant: projects/{project}/tenants/{tenant} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'jobs.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Report events issued when end user interacts with customer's application + * that uses Cloud Talent Solution. You may inspect the created events in + * [self service + * tools](https://console.cloud.google.com/talent-solution/overview). + * [Learn + * more](https://cloud.google.com/talent-solution/docs/management-tools) + * about self service tools. + * + * The async variant is {@see EventServiceClient::createClientEventAsync()} . + * + * @example samples/V4/EventServiceClient/create_client_event.php + * + * @param CreateClientEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ClientEvent + * + * @throws ApiException Thrown if the API call fails. + */ + public function createClientEvent(CreateClientEventRequest $request, array $callOptions = []): ClientEvent + { + return $this->startApiCall('CreateClientEvent', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php new file mode 100644 index 000000000000..a3c40cfd9cc0 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php @@ -0,0 +1,610 @@ + batchCreateJobsAsync(BatchCreateJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeleteJobsAsync(BatchDeleteJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateJobsAsync(BatchUpdateJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchJobsAsync(SearchJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchJobsForAlertAsync(SearchJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateJobAsync(UpdateJobRequest $request, array $optionalArgs = []) + */ +final class JobServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.talent.v4.JobService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'jobs.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/job_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/job_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/job_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/job_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 company + * resource. + * + * @param string $project + * @param string $tenant + * @param string $company + * + * @return string The formatted company resource. + */ + public static function companyName(string $project, string $tenant, string $company): string + { + return self::getPathTemplate('company')->render([ + 'project' => $project, + 'tenant' => $tenant, + 'company' => $company, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $tenant + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $tenant, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'tenant' => $tenant, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tenant + * resource. + * + * @param string $project + * @param string $tenant + * + * @return string The formatted tenant resource. + */ + public static function tenantName(string $project, string $tenant): string + { + return self::getPathTemplate('tenant')->render([ + 'project' => $project, + 'tenant' => $tenant, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - company: projects/{project}/tenants/{tenant}/companies/{company} + * - job: projects/{project}/tenants/{tenant}/jobs/{job} + * - tenant: projects/{project}/tenants/{tenant} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'jobs.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Begins executing a batch create jobs operation. + * + * The async variant is {@see JobServiceClient::batchCreateJobsAsync()} . + * + * @example samples/V4/JobServiceClient/batch_create_jobs.php + * + * @param BatchCreateJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 batchCreateJobs(BatchCreateJobsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchCreateJobs', $request, $callOptions)->wait(); + } + + /** + * Begins executing a batch delete jobs operation. + * + * The async variant is {@see JobServiceClient::batchDeleteJobsAsync()} . + * + * @example samples/V4/JobServiceClient/batch_delete_jobs.php + * + * @param BatchDeleteJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 batchDeleteJobs(BatchDeleteJobsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchDeleteJobs', $request, $callOptions)->wait(); + } + + /** + * Begins executing a batch update jobs operation. + * + * The async variant is {@see JobServiceClient::batchUpdateJobsAsync()} . + * + * @example samples/V4/JobServiceClient/batch_update_jobs.php + * + * @param BatchUpdateJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 batchUpdateJobs(BatchUpdateJobsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchUpdateJobs', $request, $callOptions)->wait(); + } + + /** + * Creates a new job. + * + * Typically, the job becomes searchable within 10 seconds, but it may take + * up to 5 minutes. + * + * The async variant is {@see JobServiceClient::createJobAsync()} . + * + * @example samples/V4/JobServiceClient/create_job.php + * + * @param CreateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJob(CreateJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified job. + * + * Typically, the job becomes unsearchable within 10 seconds, but it may take + * up to 5 minutes. + * + * The async variant is {@see JobServiceClient::deleteJobAsync()} . + * + * @example samples/V4/JobServiceClient/delete_job.php + * + * @param DeleteJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteJob(DeleteJobRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); + } + + /** + * Retrieves the specified job, whose status is OPEN or recently EXPIRED + * within the last 90 days. + * + * The async variant is {@see JobServiceClient::getJobAsync()} . + * + * @example samples/V4/JobServiceClient/get_job.php + * + * @param GetJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJob(GetJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('GetJob', $request, $callOptions)->wait(); + } + + /** + * Lists jobs by filter. + * + * The async variant is {@see JobServiceClient::listJobsAsync()} . + * + * @example samples/V4/JobServiceClient/list_jobs.php + * + * @param ListJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobs', $request, $callOptions); + } + + /** + * Searches for jobs using the provided + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * This call constrains the + * [visibility][google.cloud.talent.v4.Job.visibility] of jobs present in the + * database, and only returns jobs that the caller has permission to search + * against. + * + * The async variant is {@see JobServiceClient::searchJobsAsync()} . + * + * @example samples/V4/JobServiceClient/search_jobs.php + * + * @param SearchJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SearchJobsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function searchJobs(SearchJobsRequest $request, array $callOptions = []): SearchJobsResponse + { + return $this->startApiCall('SearchJobs', $request, $callOptions)->wait(); + } + + /** + * Searches for jobs using the provided + * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. + * + * This API call is intended for the use case of targeting passive job + * seekers (for example, job seekers who have signed up to receive email + * alerts about potential job opportunities), it has different algorithmic + * adjustments that are designed to specifically target passive job seekers. + * + * This call constrains the + * [visibility][google.cloud.talent.v4.Job.visibility] of jobs present in the + * database, and only returns jobs the caller has permission to search + * against. + * + * The async variant is {@see JobServiceClient::searchJobsForAlertAsync()} . + * + * @example samples/V4/JobServiceClient/search_jobs_for_alert.php + * + * @param SearchJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SearchJobsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function searchJobsForAlert(SearchJobsRequest $request, array $callOptions = []): SearchJobsResponse + { + return $this->startApiCall('SearchJobsForAlert', $request, $callOptions)->wait(); + } + + /** + * Updates specified job. + * + * Typically, updated contents become visible in search results within 10 + * seconds, but it may take up to 5 minutes. + * + * The async variant is {@see JobServiceClient::updateJobAsync()} . + * + * @example samples/V4/JobServiceClient/update_job.php + * + * @param UpdateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateJob(UpdateJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('UpdateJob', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php new file mode 100644 index 000000000000..70c200a761fd --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php @@ -0,0 +1,365 @@ + createTenantAsync(CreateTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTenantAsync(DeleteTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTenantAsync(GetTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTenantsAsync(ListTenantsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTenantAsync(UpdateTenantRequest $request, array $optionalArgs = []) + */ +final class TenantServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.talent.v4.TenantService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'jobs.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/tenant_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/tenant_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/tenant_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/tenant_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 tenant + * resource. + * + * @param string $project + * @param string $tenant + * + * @return string The formatted tenant resource. + */ + public static function tenantName(string $project, string $tenant): string + { + return self::getPathTemplate('tenant')->render([ + 'project' => $project, + 'tenant' => $tenant, + ]); + } + + /** + * 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} + * - tenant: projects/{project}/tenants/{tenant} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'jobs.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new tenant entity. + * + * The async variant is {@see TenantServiceClient::createTenantAsync()} . + * + * @example samples/V4/TenantServiceClient/create_tenant.php + * + * @param CreateTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tenant + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTenant(CreateTenantRequest $request, array $callOptions = []): Tenant + { + return $this->startApiCall('CreateTenant', $request, $callOptions)->wait(); + } + + /** + * Deletes specified tenant. + * + * The async variant is {@see TenantServiceClient::deleteTenantAsync()} . + * + * @example samples/V4/TenantServiceClient/delete_tenant.php + * + * @param DeleteTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTenant(DeleteTenantRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTenant', $request, $callOptions)->wait(); + } + + /** + * Retrieves specified tenant. + * + * The async variant is {@see TenantServiceClient::getTenantAsync()} . + * + * @example samples/V4/TenantServiceClient/get_tenant.php + * + * @param GetTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tenant + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTenant(GetTenantRequest $request, array $callOptions = []): Tenant + { + return $this->startApiCall('GetTenant', $request, $callOptions)->wait(); + } + + /** + * Lists all tenants associated with the project. + * + * The async variant is {@see TenantServiceClient::listTenantsAsync()} . + * + * @example samples/V4/TenantServiceClient/list_tenants.php + * + * @param ListTenantsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTenants(ListTenantsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTenants', $request, $callOptions); + } + + /** + * Updates specified tenant. + * + * The async variant is {@see TenantServiceClient::updateTenantAsync()} . + * + * @example samples/V4/TenantServiceClient/update_tenant.php + * + * @param UpdateTenantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Tenant + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTenant(UpdateTenantRequest $request, array $callOptions = []): Tenant + { + return $this->startApiCall('UpdateTenant', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json b/owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json new file mode 100644 index 000000000000..433483108c71 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json @@ -0,0 +1,164 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.talent.v4", + "libraryPackage": "Google\\Cloud\\Talent\\V4", + "services": { + "CompanyService": { + "clients": { + "grpc": { + "libraryClient": "CompanyServiceGapicClient", + "rpcs": { + "CreateCompany": { + "methods": [ + "createCompany" + ] + }, + "DeleteCompany": { + "methods": [ + "deleteCompany" + ] + }, + "GetCompany": { + "methods": [ + "getCompany" + ] + }, + "ListCompanies": { + "methods": [ + "listCompanies" + ] + }, + "UpdateCompany": { + "methods": [ + "updateCompany" + ] + } + } + } + } + }, + "Completion": { + "clients": { + "grpc": { + "libraryClient": "CompletionGapicClient", + "rpcs": { + "CompleteQuery": { + "methods": [ + "completeQuery" + ] + } + } + } + } + }, + "EventService": { + "clients": { + "grpc": { + "libraryClient": "EventServiceGapicClient", + "rpcs": { + "CreateClientEvent": { + "methods": [ + "createClientEvent" + ] + } + } + } + } + }, + "JobService": { + "clients": { + "grpc": { + "libraryClient": "JobServiceGapicClient", + "rpcs": { + "BatchCreateJobs": { + "methods": [ + "batchCreateJobs" + ] + }, + "BatchDeleteJobs": { + "methods": [ + "batchDeleteJobs" + ] + }, + "BatchUpdateJobs": { + "methods": [ + "batchUpdateJobs" + ] + }, + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "ListJobs": { + "methods": [ + "listJobs" + ] + }, + "SearchJobs": { + "methods": [ + "searchJobs" + ] + }, + "SearchJobsForAlert": { + "methods": [ + "searchJobsForAlert" + ] + }, + "UpdateJob": { + "methods": [ + "updateJob" + ] + } + } + } + } + }, + "TenantService": { + "clients": { + "grpc": { + "libraryClient": "TenantServiceGapicClient", + "rpcs": { + "CreateTenant": { + "methods": [ + "createTenant" + ] + }, + "DeleteTenant": { + "methods": [ + "deleteTenant" + ] + }, + "GetTenant": { + "methods": [ + "getTenant" + ] + }, + "ListTenants": { + "methods": [ + "listTenants" + ] + }, + "UpdateTenant": { + "methods": [ + "updateTenant" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json new file mode 100644 index 000000000000..b379984200f4 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json @@ -0,0 +1,70 @@ +{ + "interfaces": { + "google.cloud.talent.v4.CompanyService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_4_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "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_4_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateCompany": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "DeleteCompany": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetCompany": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListCompanies": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateCompany": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + } + } + } + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php new file mode 100644 index 000000000000..0748ac2fda3f --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php @@ -0,0 +1,101 @@ + [ + 'google.cloud.talent.v4.CompanyService' => [ + 'CreateCompany' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Company', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCompany' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCompany' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Company', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCompanies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCompanies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\ListCompaniesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCompany' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Company', + 'headerParams' => [ + [ + 'keyName' => 'company.name', + 'fieldAccessors' => [ + 'getCompany', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'company' => 'projects/{project}/tenants/{tenant}/companies/{company}', + 'tenant' => 'projects/{project}/tenants/{tenant}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php new file mode 100644 index 000000000000..04130c8e4313 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php @@ -0,0 +1,100 @@ + [ + 'google.cloud.talent.v4.CompanyService' => [ + 'CreateCompany' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/companies', + 'body' => 'company', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCompany' => [ + 'method' => 'delete', + 'uriTemplate' => '/v4/{name=projects/*/tenants/*/companies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCompany' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/tenants/*/companies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCompanies' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/companies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCompany' => [ + 'method' => 'patch', + 'uriTemplate' => '/v4/{company.name=projects/*/tenants/*/companies/*}', + 'body' => 'company', + 'placeholders' => [ + 'company.name' => [ + 'getters' => [ + 'getCompany', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json new file mode 100644 index 000000000000..604238850955 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json @@ -0,0 +1,40 @@ +{ + "interfaces": { + "google.cloud.talent.v4.Completion": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_4_codes": [ + "DEADLINE_EXCEEDED", + "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_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CompleteQuery": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + } + } + } + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php new file mode 100644 index 000000000000..195e93d58e2e --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php @@ -0,0 +1,44 @@ + [ + 'google.cloud.talent.v4.Completion' => [ + 'CompleteQuery' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\CompleteQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'tenant', + 'fieldAccessors' => [ + 'getTenant', + ], + ], + ], + ], + 'templateMap' => [ + 'company' => 'projects/{project}/tenants/{tenant}/companies/{company}', + 'tenant' => 'projects/{project}/tenants/{tenant}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php new file mode 100644 index 000000000000..cb4150f00a18 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php @@ -0,0 +1,53 @@ + [ + 'google.cloud.talent.v4.Completion' => [ + 'CompleteQuery' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{tenant=projects/*/tenants/*}:completeQuery', + 'placeholders' => [ + 'tenant' => [ + 'getters' => [ + 'getTenant', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json new file mode 100644 index 000000000000..ec9ad3a2cf9a --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.talent.v4.EventService": { + "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": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateClientEvent": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php new file mode 100644 index 000000000000..8b689666ef00 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php @@ -0,0 +1,43 @@ + [ + 'google.cloud.talent.v4.EventService' => [ + 'CreateClientEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\ClientEvent', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'tenant' => 'projects/{project}/tenants/{tenant}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php new file mode 100644 index 000000000000..1d1280916dc6 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php @@ -0,0 +1,54 @@ + [ + 'google.cloud.talent.v4.EventService' => [ + 'CreateClientEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/clientEvents', + 'body' => 'client_event', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json new file mode 100644 index 000000000000..98d69d223e8e --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json @@ -0,0 +1,95 @@ +{ + "interfaces": { + "google.cloud.talent.v4.JobService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "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_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "BatchCreateJobs": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "BatchDeleteJobs": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "BatchUpdateJobs": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateJob": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteJob": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetJob": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListJobs": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "SearchJobs": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "SearchJobsForAlert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateJob": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php new file mode 100644 index 000000000000..f524e9c3e98b --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php @@ -0,0 +1,183 @@ + [ + 'google.cloud.talent.v4.JobService' => [ + 'BatchCreateJobs' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Talent\V4\BatchCreateJobsResponse', + 'metadataReturnType' => '\Google\Cloud\Talent\V4\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteJobs' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Talent\V4\BatchDeleteJobsResponse', + 'metadataReturnType' => '\Google\Cloud\Talent\V4\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateJobs' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Talent\V4\BatchUpdateJobsResponse', + 'metadataReturnType' => '\Google\Cloud\Talent\V4\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Job', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Job', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\ListJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchJobs' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\SearchJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchJobsForAlert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\SearchJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Job', + 'headerParams' => [ + [ + 'keyName' => 'job.name', + 'fieldAccessors' => [ + 'getJob', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'company' => 'projects/{project}/tenants/{tenant}/companies/{company}', + 'job' => 'projects/{project}/tenants/{tenant}/jobs/{job}', + 'tenant' => 'projects/{project}/tenants/{tenant}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php new file mode 100644 index 000000000000..a5894278fd9a --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php @@ -0,0 +1,163 @@ + [ + 'google.cloud.talent.v4.JobService' => [ + 'BatchCreateJobs' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteJobs' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:batchDelete', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateJobs' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs', + 'body' => 'job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v4/{name=projects/*/tenants/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/tenants/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'filter', + ], + ], + 'SearchJobs' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:search', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchJobsForAlert' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:searchForAlert', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateJob' => [ + 'method' => 'patch', + 'uriTemplate' => '/v4/{job.name=projects/*/tenants/*/jobs/*}', + 'body' => 'job', + 'placeholders' => [ + 'job.name' => [ + 'getters' => [ + 'getJob', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json new file mode 100644 index 000000000000..2263de20cbcc --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json @@ -0,0 +1,70 @@ +{ + "interfaces": { + "google.cloud.talent.v4.TenantService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "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": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateTenant": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "DeleteTenant": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTenant": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTenants": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTenant": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php new file mode 100644 index 000000000000..cefb9eb0aac1 --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php @@ -0,0 +1,101 @@ + [ + 'google.cloud.talent.v4.TenantService' => [ + 'CreateTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Tenant', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Tenant', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTenants' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTenants', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\ListTenantsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTenant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Talent\V4\Tenant', + 'headerParams' => [ + [ + 'keyName' => 'tenant.name', + 'fieldAccessors' => [ + 'getTenant', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + 'tenant' => 'projects/{project}/tenants/{tenant}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php new file mode 100644 index 000000000000..a6c00dacfa9b --- /dev/null +++ b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php @@ -0,0 +1,100 @@ + [ + 'google.cloud.talent.v4.TenantService' => [ + 'CreateTenant' => [ + 'method' => 'post', + 'uriTemplate' => '/v4/{parent=projects/*}/tenants', + 'body' => 'tenant', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteTenant' => [ + 'method' => 'delete', + 'uriTemplate' => '/v4/{name=projects/*/tenants/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTenant' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/tenants/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTenants' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{parent=projects/*}/tenants', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateTenant' => [ + 'method' => 'patch', + 'uriTemplate' => '/v4/{tenant.name=projects/*/tenants/*}', + 'body' => 'tenant', + 'placeholders' => [ + 'tenant.name' => [ + 'getters' => [ + 'getTenant', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v4/{name=projects/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php new file mode 100644 index 000000000000..f498fa3aa3a2 --- /dev/null +++ b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php @@ -0,0 +1,524 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CompanyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CompanyServiceClient($options); + } + + /** @test */ + public function createCompanyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $externalId = 'externalId-1153075697'; + $headquartersAddress = 'headquartersAddress-1879520036'; + $hiringAgency = false; + $eeoText = 'eeoText-1652097123'; + $websiteUri = 'websiteUri-2118185016'; + $careerSiteUri = 'careerSiteUri1223331861'; + $imageUri = 'imageUri-877823864'; + $suspended = false; + $expectedResponse = new Company(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setHeadquartersAddress($headquartersAddress); + $expectedResponse->setHiringAgency($hiringAgency); + $expectedResponse->setEeoText($eeoText); + $expectedResponse->setWebsiteUri($websiteUri); + $expectedResponse->setCareerSiteUri($careerSiteUri); + $expectedResponse->setImageUri($imageUri); + $expectedResponse->setSuspended($suspended); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $company = new Company(); + $companyDisplayName = 'companyDisplayName-686915152'; + $company->setDisplayName($companyDisplayName); + $companyExternalId = 'companyExternalId855180963'; + $company->setExternalId($companyExternalId); + $request = (new CreateCompanyRequest()) + ->setParent($formattedParent) + ->setCompany($company); + $response = $gapicClient->createCompany($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.talent.v4.CompanyService/CreateCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCompany(); + $this->assertProtobufEquals($company, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCompanyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $company = new Company(); + $companyDisplayName = 'companyDisplayName-686915152'; + $company->setDisplayName($companyDisplayName); + $companyExternalId = 'companyExternalId855180963'; + $company->setExternalId($companyExternalId); + $request = (new CreateCompanyRequest()) + ->setParent($formattedParent) + ->setCompany($company); + try { + $gapicClient->createCompany($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCompanyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $request = (new DeleteCompanyRequest()) + ->setName($formattedName); + $gapicClient->deleteCompany($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.CompanyService/DeleteCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCompanyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $request = (new DeleteCompanyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteCompany($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCompanyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $externalId = 'externalId-1153075697'; + $headquartersAddress = 'headquartersAddress-1879520036'; + $hiringAgency = false; + $eeoText = 'eeoText-1652097123'; + $websiteUri = 'websiteUri-2118185016'; + $careerSiteUri = 'careerSiteUri1223331861'; + $imageUri = 'imageUri-877823864'; + $suspended = false; + $expectedResponse = new Company(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setHeadquartersAddress($headquartersAddress); + $expectedResponse->setHiringAgency($hiringAgency); + $expectedResponse->setEeoText($eeoText); + $expectedResponse->setWebsiteUri($websiteUri); + $expectedResponse->setCareerSiteUri($careerSiteUri); + $expectedResponse->setImageUri($imageUri); + $expectedResponse->setSuspended($suspended); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $request = (new GetCompanyRequest()) + ->setName($formattedName); + $response = $gapicClient->getCompany($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.talent.v4.CompanyService/GetCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCompanyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $request = (new GetCompanyRequest()) + ->setName($formattedName); + try { + $gapicClient->getCompany($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCompaniesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $companiesElement = new Company(); + $companies = [ + $companiesElement, + ]; + $expectedResponse = new ListCompaniesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCompanies($companies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $request = (new ListCompaniesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCompanies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCompanies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.CompanyService/ListCompanies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCompaniesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $request = (new ListCompaniesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCompanies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCompanyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $externalId = 'externalId-1153075697'; + $headquartersAddress = 'headquartersAddress-1879520036'; + $hiringAgency = false; + $eeoText = 'eeoText-1652097123'; + $websiteUri = 'websiteUri-2118185016'; + $careerSiteUri = 'careerSiteUri1223331861'; + $imageUri = 'imageUri-877823864'; + $suspended = false; + $expectedResponse = new Company(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setHeadquartersAddress($headquartersAddress); + $expectedResponse->setHiringAgency($hiringAgency); + $expectedResponse->setEeoText($eeoText); + $expectedResponse->setWebsiteUri($websiteUri); + $expectedResponse->setCareerSiteUri($careerSiteUri); + $expectedResponse->setImageUri($imageUri); + $expectedResponse->setSuspended($suspended); + $transport->addResponse($expectedResponse); + // Mock request + $company = new Company(); + $companyDisplayName = 'companyDisplayName-686915152'; + $company->setDisplayName($companyDisplayName); + $companyExternalId = 'companyExternalId855180963'; + $company->setExternalId($companyExternalId); + $request = (new UpdateCompanyRequest()) + ->setCompany($company); + $response = $gapicClient->updateCompany($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.talent.v4.CompanyService/UpdateCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getCompany(); + $this->assertProtobufEquals($company, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCompanyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $company = new Company(); + $companyDisplayName = 'companyDisplayName-686915152'; + $company->setDisplayName($companyDisplayName); + $companyExternalId = 'companyExternalId855180963'; + $company->setExternalId($companyExternalId); + $request = (new UpdateCompanyRequest()) + ->setCompany($company); + try { + $gapicClient->updateCompany($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCompanyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $externalId = 'externalId-1153075697'; + $headquartersAddress = 'headquartersAddress-1879520036'; + $hiringAgency = false; + $eeoText = 'eeoText-1652097123'; + $websiteUri = 'websiteUri-2118185016'; + $careerSiteUri = 'careerSiteUri1223331861'; + $imageUri = 'imageUri-877823864'; + $suspended = false; + $expectedResponse = new Company(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalId($externalId); + $expectedResponse->setHeadquartersAddress($headquartersAddress); + $expectedResponse->setHiringAgency($hiringAgency); + $expectedResponse->setEeoText($eeoText); + $expectedResponse->setWebsiteUri($websiteUri); + $expectedResponse->setCareerSiteUri($careerSiteUri); + $expectedResponse->setImageUri($imageUri); + $expectedResponse->setSuspended($suspended); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $company = new Company(); + $companyDisplayName = 'companyDisplayName-686915152'; + $company->setDisplayName($companyDisplayName); + $companyExternalId = 'companyExternalId855180963'; + $company->setExternalId($companyExternalId); + $request = (new CreateCompanyRequest()) + ->setParent($formattedParent) + ->setCompany($company); + $response = $gapicClient->createCompanyAsync($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.talent.v4.CompanyService/CreateCompany', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCompany(); + $this->assertProtobufEquals($company, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php new file mode 100644 index 000000000000..26299d23bb09 --- /dev/null +++ b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php @@ -0,0 +1,171 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CompletionClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CompletionClient($options); + } + + /** @test */ + public function completeQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedTenant = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $query = 'query107944136'; + $pageSize = 883849137; + $request = (new CompleteQueryRequest()) + ->setTenant($formattedTenant) + ->setQuery($query) + ->setPageSize($pageSize); + $response = $gapicClient->completeQuery($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.Completion/CompleteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($formattedTenant, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $actualValue = $actualRequestObject->getPageSize(); + $this->assertProtobufEquals($pageSize, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedTenant = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $query = 'query107944136'; + $pageSize = 883849137; + $request = (new CompleteQueryRequest()) + ->setTenant($formattedTenant) + ->setQuery($query) + ->setPageSize($pageSize); + try { + $gapicClient->completeQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeQueryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedTenant = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $query = 'query107944136'; + $pageSize = 883849137; + $request = (new CompleteQueryRequest()) + ->setTenant($formattedTenant) + ->setQuery($query) + ->setPageSize($pageSize); + $response = $gapicClient->completeQueryAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.Completion/CompleteQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($formattedTenant, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $actualValue = $actualRequestObject->getPageSize(); + $this->assertProtobufEquals($pageSize, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php new file mode 100644 index 000000000000..4782f5e3836e --- /dev/null +++ b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php @@ -0,0 +1,186 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EventServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EventServiceClient($options); + } + + /** @test */ + public function createClientEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $requestId = 'requestId37109963'; + $eventId = 'eventId278118624'; + $eventNotes = 'eventNotes445073628'; + $expectedResponse = new ClientEvent(); + $expectedResponse->setRequestId($requestId); + $expectedResponse->setEventId($eventId); + $expectedResponse->setEventNotes($eventNotes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $clientEvent = new ClientEvent(); + $clientEventEventId = 'clientEventEventId319230150'; + $clientEvent->setEventId($clientEventEventId); + $clientEventCreateTime = new Timestamp(); + $clientEvent->setCreateTime($clientEventCreateTime); + $request = (new CreateClientEventRequest()) + ->setParent($formattedParent) + ->setClientEvent($clientEvent); + $response = $gapicClient->createClientEvent($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.talent.v4.EventService/CreateClientEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getClientEvent(); + $this->assertProtobufEquals($clientEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createClientEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $clientEvent = new ClientEvent(); + $clientEventEventId = 'clientEventEventId319230150'; + $clientEvent->setEventId($clientEventEventId); + $clientEventCreateTime = new Timestamp(); + $clientEvent->setCreateTime($clientEventCreateTime); + $request = (new CreateClientEventRequest()) + ->setParent($formattedParent) + ->setClientEvent($clientEvent); + try { + $gapicClient->createClientEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createClientEventAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $requestId = 'requestId37109963'; + $eventId = 'eventId278118624'; + $eventNotes = 'eventNotes445073628'; + $expectedResponse = new ClientEvent(); + $expectedResponse->setRequestId($requestId); + $expectedResponse->setEventId($eventId); + $expectedResponse->setEventNotes($eventNotes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $clientEvent = new ClientEvent(); + $clientEventEventId = 'clientEventEventId319230150'; + $clientEvent->setEventId($clientEventEventId); + $clientEventCreateTime = new Timestamp(); + $clientEvent->setCreateTime($clientEventCreateTime); + $request = (new CreateClientEventRequest()) + ->setParent($formattedParent) + ->setClientEvent($clientEvent); + $response = $gapicClient->createClientEventAsync($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.talent.v4.EventService/CreateClientEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getClientEvent(); + $this->assertProtobufEquals($clientEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php new file mode 100644 index 000000000000..7b0e0e2e710e --- /dev/null +++ b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php @@ -0,0 +1,1107 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return JobServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new JobServiceClient($options); + } + + /** @test */ + public function batchCreateJobsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchCreateJobsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchCreateJobsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchCreateJobsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $jobs = []; + $request = (new BatchCreateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + $response = $gapicClient->batchCreateJobs($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.talent.v4.JobService/BatchCreateJobs', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getJobs(); + $this->assertProtobufEquals($jobs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreateJobsTest'); + $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 batchCreateJobsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchCreateJobsTest'); + $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->tenantName('[PROJECT]', '[TENANT]'); + $jobs = []; + $request = (new BatchCreateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + $response = $gapicClient->batchCreateJobs($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreateJobsTest'); + 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 batchDeleteJobsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchDeleteJobsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchDeleteJobsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchDeleteJobsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $request = (new BatchDeleteJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->batchDeleteJobs($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.talent.v4.JobService/BatchDeleteJobs', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteJobsTest'); + $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 batchDeleteJobsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchDeleteJobsTest'); + $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->tenantName('[PROJECT]', '[TENANT]'); + $request = (new BatchDeleteJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->batchDeleteJobs($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchDeleteJobsTest'); + 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 batchUpdateJobsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchUpdateJobsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchUpdateJobsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchUpdateJobsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $jobs = []; + $request = (new BatchUpdateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + $response = $gapicClient->batchUpdateJobs($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.talent.v4.JobService/BatchUpdateJobs', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getJobs(); + $this->assertProtobufEquals($jobs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateJobsTest'); + $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 batchUpdateJobsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchUpdateJobsTest'); + $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->tenantName('[PROJECT]', '[TENANT]'); + $jobs = []; + $request = (new BatchUpdateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + $response = $gapicClient->batchUpdateJobs($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchUpdateJobsTest'); + 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 createJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $company = 'company950484093'; + $requisitionId = 'requisitionId980224926'; + $title = 'title110371416'; + $description = 'description-1724546052'; + $department = 'department848184146'; + $incentives = 'incentives-1262874520'; + $languageCode = 'languageCode-412800396'; + $promotionValue = 353413845; + $qualifications = 'qualifications1903501412'; + $responsibilities = 'responsibilities-926952660'; + $companyDisplayName = 'companyDisplayName1982424170'; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setCompany($company); + $expectedResponse->setRequisitionId($requisitionId); + $expectedResponse->setTitle($title); + $expectedResponse->setDescription($description); + $expectedResponse->setDepartment($department); + $expectedResponse->setIncentives($incentives); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setPromotionValue($promotionValue); + $expectedResponse->setQualifications($qualifications); + $expectedResponse->setResponsibilities($responsibilities); + $expectedResponse->setCompanyDisplayName($companyDisplayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $job = new Job(); + $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $job->setCompany($jobCompany); + $jobRequisitionId = 'jobRequisitionId-1718160870'; + $job->setRequisitionId($jobRequisitionId); + $jobTitle = 'jobTitle-1625529189'; + $job->setTitle($jobTitle); + $jobDescription = 'jobDescription-549074945'; + $job->setDescription($jobDescription); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJob($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.talent.v4.JobService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $job = new Job(); + $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $job->setCompany($jobCompany); + $jobRequisitionId = 'jobRequisitionId-1718160870'; + $job->setRequisitionId($jobRequisitionId); + $jobTitle = 'jobTitle-1625529189'; + $job->setTitle($jobTitle); + $jobDescription = 'jobDescription-549074945'; + $job->setDescription($jobDescription); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + try { + $gapicClient->createJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[TENANT]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + $gapicClient->deleteJob($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.JobService/DeleteJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[TENANT]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $company = 'company950484093'; + $requisitionId = 'requisitionId980224926'; + $title = 'title110371416'; + $description = 'description-1724546052'; + $department = 'department848184146'; + $incentives = 'incentives-1262874520'; + $languageCode = 'languageCode-412800396'; + $promotionValue = 353413845; + $qualifications = 'qualifications1903501412'; + $responsibilities = 'responsibilities-926952660'; + $companyDisplayName = 'companyDisplayName1982424170'; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setCompany($company); + $expectedResponse->setRequisitionId($requisitionId); + $expectedResponse->setTitle($title); + $expectedResponse->setDescription($description); + $expectedResponse->setDepartment($department); + $expectedResponse->setIncentives($incentives); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setPromotionValue($promotionValue); + $expectedResponse->setQualifications($qualifications); + $expectedResponse->setResponsibilities($responsibilities); + $expectedResponse->setCompanyDisplayName($companyDisplayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[TENANT]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getJob($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.talent.v4.JobService/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[TENANT]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $filter = 'filter-1274492040'; + $request = (new ListJobsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + $response = $gapicClient->listJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.JobService/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $filter = 'filter-1274492040'; + $request = (new ListJobsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + try { + $gapicClient->listJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = 'nextPageToken-1530815211'; + $totalSize = 705419236; + $broadenedQueryJobsCount = 1432104658; + $expectedResponse = new SearchJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setBroadenedQueryJobsCount($broadenedQueryJobsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $requestMetadata = new RequestMetadata(); + $request = (new SearchJobsRequest()) + ->setParent($formattedParent) + ->setRequestMetadata($requestMetadata); + $response = $gapicClient->searchJobs($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.talent.v4.JobService/SearchJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequestMetadata(); + $this->assertProtobufEquals($requestMetadata, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $requestMetadata = new RequestMetadata(); + $request = (new SearchJobsRequest()) + ->setParent($formattedParent) + ->setRequestMetadata($requestMetadata); + try { + $gapicClient->searchJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchJobsForAlertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = 'nextPageToken-1530815211'; + $totalSize = 705419236; + $broadenedQueryJobsCount = 1432104658; + $expectedResponse = new SearchJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setBroadenedQueryJobsCount($broadenedQueryJobsCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $requestMetadata = new RequestMetadata(); + $request = (new SearchJobsRequest()) + ->setParent($formattedParent) + ->setRequestMetadata($requestMetadata); + $response = $gapicClient->searchJobsForAlert($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.talent.v4.JobService/SearchJobsForAlert', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequestMetadata(); + $this->assertProtobufEquals($requestMetadata, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchJobsForAlertExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $requestMetadata = new RequestMetadata(); + $request = (new SearchJobsRequest()) + ->setParent($formattedParent) + ->setRequestMetadata($requestMetadata); + try { + $gapicClient->searchJobsForAlert($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $company = 'company950484093'; + $requisitionId = 'requisitionId980224926'; + $title = 'title110371416'; + $description = 'description-1724546052'; + $department = 'department848184146'; + $incentives = 'incentives-1262874520'; + $languageCode = 'languageCode-412800396'; + $promotionValue = 353413845; + $qualifications = 'qualifications1903501412'; + $responsibilities = 'responsibilities-926952660'; + $companyDisplayName = 'companyDisplayName1982424170'; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setCompany($company); + $expectedResponse->setRequisitionId($requisitionId); + $expectedResponse->setTitle($title); + $expectedResponse->setDescription($description); + $expectedResponse->setDepartment($department); + $expectedResponse->setIncentives($incentives); + $expectedResponse->setLanguageCode($languageCode); + $expectedResponse->setPromotionValue($promotionValue); + $expectedResponse->setQualifications($qualifications); + $expectedResponse->setResponsibilities($responsibilities); + $expectedResponse->setCompanyDisplayName($companyDisplayName); + $transport->addResponse($expectedResponse); + // Mock request + $job = new Job(); + $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $job->setCompany($jobCompany); + $jobRequisitionId = 'jobRequisitionId-1718160870'; + $job->setRequisitionId($jobRequisitionId); + $jobTitle = 'jobTitle-1625529189'; + $job->setTitle($jobTitle); + $jobDescription = 'jobDescription-549074945'; + $job->setDescription($jobDescription); + $request = (new UpdateJobRequest()) + ->setJob($job); + $response = $gapicClient->updateJob($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.talent.v4.JobService/UpdateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $job = new Job(); + $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); + $job->setCompany($jobCompany); + $jobRequisitionId = 'jobRequisitionId-1718160870'; + $job->setRequisitionId($jobRequisitionId); + $jobTitle = 'jobTitle-1625529189'; + $job->setTitle($jobTitle); + $jobDescription = 'jobDescription-549074945'; + $job->setDescription($jobDescription); + $request = (new UpdateJobRequest()) + ->setJob($job); + try { + $gapicClient->updateJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateJobsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchCreateJobsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchCreateJobsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchCreateJobsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $jobs = []; + $request = (new BatchCreateJobsRequest()) + ->setParent($formattedParent) + ->setJobs($jobs); + $response = $gapicClient->batchCreateJobsAsync($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.talent.v4.JobService/BatchCreateJobs', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getJobs(); + $this->assertProtobufEquals($jobs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreateJobsTest'); + $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/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php new file mode 100644 index 000000000000..40ed45c1a39c --- /dev/null +++ b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php @@ -0,0 +1,450 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TenantServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TenantServiceClient($options); + } + + /** @test */ + public function createTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $externalId = 'externalId-1153075697'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name); + $expectedResponse->setExternalId($externalId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $tenant = new Tenant(); + $tenantExternalId = 'tenantExternalId-300736880'; + $tenant->setExternalId($tenantExternalId); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenant($tenant); + $response = $gapicClient->createTenant($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.talent.v4.TenantService/CreateTenant', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($tenant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $tenant = new Tenant(); + $tenantExternalId = 'tenantExternalId-300736880'; + $tenant->setExternalId($tenantExternalId); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenant($tenant); + try { + $gapicClient->createTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $request = (new DeleteTenantRequest()) + ->setName($formattedName); + $gapicClient->deleteTenant($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.TenantService/DeleteTenant', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $request = (new DeleteTenantRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $externalId = 'externalId-1153075697'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name2); + $expectedResponse->setExternalId($externalId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); + $request = (new GetTenantRequest()) + ->setName($formattedName); + $response = $gapicClient->getTenant($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.talent.v4.TenantService/GetTenant', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); + $request = (new GetTenantRequest()) + ->setName($formattedName); + try { + $gapicClient->getTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTenantsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tenantsElement = new Tenant(); + $tenants = [ + $tenantsElement, + ]; + $expectedResponse = new ListTenantsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTenants($tenants); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListTenantsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTenants($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTenants()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.talent.v4.TenantService/ListTenants', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTenantsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListTenantsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTenants($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTenantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $externalId = 'externalId-1153075697'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name); + $expectedResponse->setExternalId($externalId); + $transport->addResponse($expectedResponse); + // Mock request + $tenant = new Tenant(); + $tenantExternalId = 'tenantExternalId-300736880'; + $tenant->setExternalId($tenantExternalId); + $request = (new UpdateTenantRequest()) + ->setTenant($tenant); + $response = $gapicClient->updateTenant($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.talent.v4.TenantService/UpdateTenant', $actualFuncCall); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($tenant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTenantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $tenant = new Tenant(); + $tenantExternalId = 'tenantExternalId-300736880'; + $tenant->setExternalId($tenantExternalId); + $request = (new UpdateTenantRequest()) + ->setTenant($tenant); + try { + $gapicClient->updateTenant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTenantAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $externalId = 'externalId-1153075697'; + $expectedResponse = new Tenant(); + $expectedResponse->setName($name); + $expectedResponse->setExternalId($externalId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $tenant = new Tenant(); + $tenantExternalId = 'tenantExternalId-300736880'; + $tenant->setExternalId($tenantExternalId); + $request = (new CreateTenantRequest()) + ->setParent($formattedParent) + ->setTenant($tenant); + $response = $gapicClient->createTenantAsync($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.talent.v4.TenantService/CreateTenant', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTenant(); + $this->assertProtobufEquals($tenant, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php new file mode 100644 index 000000000000..ff8f3bff9a15 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php @@ -0,0 +1,114 @@ +internalAddGeneratedFile( + ' +˜% +&google/cloud/tasks/v2/cloudtasks.protogoogle.cloud.tasks.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto!google/cloud/tasks/v2/queue.proto google/cloud/tasks/v2/task.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"ƒ +ListQueuesRequest7 +parent ( B\'àAúA!cloudtasks.googleapis.com/Queue +filter (  + page_size ( + +page_token ( "[ +ListQueuesResponse, +queues ( 2.google.cloud.tasks.v2.Queue +next_page_token ( "H +GetQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue" +CreateQueueRequest7 +parent ( B\'àAúA!cloudtasks.googleapis.com/Queue0 +queue ( 2.google.cloud.tasks.v2.QueueBàA"w +UpdateQueueRequest0 +queue ( 2.google.cloud.tasks.v2.QueueBàA/ + update_mask ( 2.google.protobuf.FieldMask"K +DeleteQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"J +PurgeQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"J +PauseQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"K +ResumeQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"ª +ListTasksRequest6 +parent ( B&àAúA cloudtasks.googleapis.com/Task7 + response_view (2 .google.cloud.tasks.v2.Task.View + page_size ( + +page_token ( "X +ListTasksResponse* +tasks ( 2.google.cloud.tasks.v2.Task +next_page_token ( " +GetTaskRequest4 +name ( B&àAúA +cloudtasks.googleapis.com/Task7 + response_view (2 .google.cloud.tasks.v2.Task.View"´ +CreateTaskRequest6 +parent ( B&àAúA cloudtasks.googleapis.com/Task. +task ( 2.google.cloud.tasks.v2.TaskBàA7 + response_view (2 .google.cloud.tasks.v2.Task.View"I +DeleteTaskRequest4 +name ( B&àAúA +cloudtasks.googleapis.com/Task" +RunTaskRequest4 +name ( B&àAúA +cloudtasks.googleapis.com/Task7 + response_view (2 .google.cloud.tasks.v2.Task.View2Ý + +CloudTasksž + +ListQueues(.google.cloud.tasks.v2.ListQueuesRequest).google.cloud.tasks.v2.ListQueuesResponse";ÚAparent‚Óä“,*/v2/{parent=projects/*/locations/*}/queues‹ +GetQueue&.google.cloud.tasks.v2.GetQueueRequest.google.cloud.tasks.v2.Queue"9ÚAname‚Óä“,*/v2/{name=projects/*/locations/*/queues/*}  + CreateQueue).google.cloud.tasks.v2.CreateQueueRequest.google.cloud.tasks.v2.Queue"HÚA parent,queue‚Óä“3"*/v2/{parent=projects/*/locations/*}/queues:queue« + UpdateQueue).google.cloud.tasks.v2.UpdateQueueRequest.google.cloud.tasks.v2.Queue"SÚAqueue,update_mask‚Óä“920/v2/{queue.name=projects/*/locations/*/queues/*}:queue‹ + DeleteQueue).google.cloud.tasks.v2.DeleteQueueRequest.google.protobuf.Empty"9ÚAname‚Óä“,**/v2/{name=projects/*/locations/*/queues/*}˜ + +PurgeQueue(.google.cloud.tasks.v2.PurgeQueueRequest.google.cloud.tasks.v2.Queue"BÚAname‚Óä“5"0/v2/{name=projects/*/locations/*/queues/*}:purge:*˜ + +PauseQueue(.google.cloud.tasks.v2.PauseQueueRequest.google.cloud.tasks.v2.Queue"BÚAname‚Óä“5"0/v2/{name=projects/*/locations/*/queues/*}:pause:*› + ResumeQueue).google.cloud.tasks.v2.ResumeQueueRequest.google.cloud.tasks.v2.Queue"CÚAname‚Óä“6"1/v2/{name=projects/*/locations/*/queues/*}:resume:*œ + GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"QÚAresource‚Óä“@";/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy:*£ + SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"XÚAresource,policy‚Óä“@";/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy:*Î +TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"cÚAresource,permissions‚Óä“F"A/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions:*£ + ListTasks\'.google.cloud.tasks.v2.ListTasksRequest(.google.cloud.tasks.v2.ListTasksResponse"CÚAparent‚Óä“42/v2/{parent=projects/*/locations/*/queues/*}/tasks +GetTask%.google.cloud.tasks.v2.GetTaskRequest.google.cloud.tasks.v2.Task"AÚAname‚Óä“42/v2/{name=projects/*/locations/*/queues/*/tasks/*}  + +CreateTask(.google.cloud.tasks.v2.CreateTaskRequest.google.cloud.tasks.v2.Task"KÚA parent,task‚Óä“7"2/v2/{parent=projects/*/locations/*/queues/*}/tasks:*‘ + +DeleteTask(.google.cloud.tasks.v2.DeleteTaskRequest.google.protobuf.Empty"AÚAname‚Óä“4*2/v2/{name=projects/*/locations/*/queues/*/tasks/*}— +RunTask%.google.cloud.tasks.v2.RunTaskRequest.google.cloud.tasks.v2.Task"HÚAname‚Óä“;"6/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run:*MÊAcloudtasks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBv +com.google.cloud.tasks.v2BCloudTasksProtoPZ>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb¢TASKSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Queue.php b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Queue.php new file mode 100644 index 0000000000000000000000000000000000000000..7934457c1550ea983a9692c5f7e75c7193348064 GIT binary patch literal 1983 zcmbVN;cgp65XNmB$T(ExM356Cx-pgFN^llNRLCJkPV7dOLSk$O33Srwe7C-Ad%oN5 z?nRW!FU4P;g4f_FnBBc|9O_Vn|M+h2`*vr(`F7^J@A(yn&&erGsR$H}$n-T)SCnv( zsVvMAGRDuZK@_OKJ2gb_L=(MHT1uu@noo*j^>%DVnl{Ex=dB=*h!QznJ)ICi zRW8y)6Sv-Av3&B@2-W4x8_`1c&P_r${B^9`@}kZHbLjkM`cjf!jy^#p{|9x#u>2~R z^YvU)g)g76Li27EEhT=A)@v?B(GnfNA6u~hPR}_z7UCLPy2h67b$hR|o~eu~)~ z6&Pb)bVDmDQZK$g`sa65=4Szo-#4IY?CWg9hW38FLMqKI=L|j#IQMB9vy}QG%N0vw zKf9(vu!z?0A*j~&4&1e&yIs!vhB>lC=PA_m)%6oLXG+%Z8~Xko>=7c*4AA)&w$XUv zwI62bjK%d0Lu}kd)X)=ybiRVB_BX9pk@BE@7scf6jy2M80eFs<^R-CzO>@*ILby7);JqgZhn>XzZRO8)KQ>Jv-indRBI8-1wSXm;SE@uWNH`$!L{;nVS6O5ywa_1(Rcx{Ql)*^od>`A z5yQr*!Ye9$j(SLnMT?A|D$XbHKtravkjj_X3yp=UPC-Rvmw4LEw$x~04Yg->_OA}otob_lF_ZO&4Eiq*(wv%;9~!0S8; zy!GS1;CJ9dBTc5qLK;hB$7-Vu^}8IPrIOfyG~73R%u0C7U>6HlrgGa)$6)F?)I(ud z`Q@4YT3${pcbwU&XNMlT0O#I~Ir#K&^<}zgg!=km+0MSO6Jce5p!0FStr;E$Y5V*F H765+(Bg%xr literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Target.php b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Target.php new file mode 100644 index 0000000000000000000000000000000000000000..54926fb36dd67b638443466bc250c6cb509b8833 GIT binary patch literal 1761 zcmb7F|8Cnh5UzhDu20@72&d~eJWj3mhpfL(1Ni=M0!EQvaly`dXe_lefh!{ zM3{LvfEcexn&5z-Q)l#w2pnR8z0=&&J64{at3188{X>8t!fA@!JOX?GB%dUkMKnOE zz(W2!qp440DkzTVd&&I>&2f|x>3S18&*DH(79-_g#{ua+M@3A9eU>m;>k<0M#Zl$U z(!FUc2#;~(jY%4Cnh3@n2^|b%RhyC`Zx-U%g9I3i2Dri>2;*Hv8y$&32#B`r%BhT(?siPW;Y$)Pgt!*5OK z+%KZ>xWJgX&}J^Qx$bxVtb#TXB6&@I%}6Q?9cmem+7(pkHb=EThE?MS(3TS5uZUQ( zuw9j3KJ7m>Zw+UvP;x*d(D(@&OM*kf({>Hjx>~>YFFs{@b5eL%vEY|R3+gi#UbgEp zWy?4Kjp0lzeZekB+}@E!?M@!{P$FFgoIH>f0Ha}0I_~C<=ngWr1eShZn9%wg9}Q|3 zp~A3ccnEcT1~JHJ<9Z?hcuRFSZ<24AUQ=#mWq6e znw0;Pj;)_9*V1>4ChRyv_jsc38X7cg$DP_|=XzuG3w$oGfZG)uX~mAtm!?yB_p(?G z9}hNL^%ktS7m8~ECsf`HIVd+Iv%~E_v)%l*_6BjelxbnI%r6LMG zPq_?v!WAbm{}bN5g(oDI41kwyCwW2@PZO*G`w3<3=h*txwogS0ac<%AB_ka=gdGeM z#j=FNL7z#QaiP*|1g5?}WvU`f@3fy6*J^isg4_0uzJKYFTUcc|yLdas8B=+dY?^m# z2lHwbT)|UU@Zf+Ir2FRqo#U@UEwT$VXApybYj{OTKL?cnlm7#H#3B2NoQT_F4+ISk zA>FyW8e=l|?Q34-sT)OAT6RFJ?TScE>ofFM1Kp@n=L@T2*XY#ghLt%+dC0*OlO`pt`Q2W)0Wc4QCHM zB0_{Lnev2%Go?hBvEOr`xp@~1mOC$8>+yqV+^!G<19}6P0}FX`$MMn1f|E~-lh!p( z7O^kULrG^W%3~JlxSDkXUN6BVDQ=|$$3x3BW6*UhVChD{EA&~!p@S$o3nNCN7{YGe zGqA^(?kT0}e2G>o6ixF)HSYstN$+RSkJ3c4(C$Al``@F76P`&G5~bLQP|b$9VWYfZ zQ5kO6S~;)K3UsV<6uK44MfFq8{%9_P^=b!SbBE5odkl81m#D74&gW?DcsTeue7AQv z8f*`DhJ*gv9jAeodfmg}_FBz(fa*K%-o9PC>(Bn}GPGe{ZRKn=K?IjBv~|x2Ya8hI%vf7$_?b7M0Lz zXeLK`dW>qnytapB{Q=L@)DB0J1P|zk@pzsUG2XoRXME2T%y-YK9`=nL9Tz5zel4e0 OOc`To2f`f95&94G5|j!6 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php new file mode 100644 index 000000000000..ad547996af2e --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php @@ -0,0 +1,469 @@ +google.cloud.tasks.v2.AppEngineHttpRequest + */ +class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1; + */ + protected $http_method = 0; + /** + * Task-level setting for App Engine routing. + * * If [app_engine_routing_override is set on the + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; + */ + protected $app_engine_routing = null; + /** + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_uri = 3; + */ + protected $relative_uri = ''; + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], + * Cloud Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. + * + * Generated from protobuf field map headers = 4; + */ + private $headers; + /** + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * + * Generated from protobuf field bytes body = 5; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $http_method + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * @type \Google\Cloud\Tasks\V2\AppEngineRouting $app_engine_routing + * Task-level setting for App Engine routing. + * * If [app_engine_routing_override is set on the + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * @type string $relative_uri + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * @type array|\Google\Protobuf\Internal\MapField $headers + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], + * Cloud Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. + * @type string $body + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * Task-level setting for App Engine routing. + * * If [app_engine_routing_override is set on the + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; + * @return \Google\Cloud\Tasks\V2\AppEngineRouting|null + */ + public function getAppEngineRouting() + { + return $this->app_engine_routing; + } + + public function hasAppEngineRouting() + { + return isset($this->app_engine_routing); + } + + public function clearAppEngineRouting() + { + unset($this->app_engine_routing); + } + + /** + * Task-level setting for App Engine routing. + * * If [app_engine_routing_override is set on the + * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this + * value is used for all tasks in the queue, no matter what the setting is + * for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; + * @param \Google\Cloud\Tasks\V2\AppEngineRouting $var + * @return $this + */ + public function setAppEngineRouting($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineRouting::class); + $this->app_engine_routing = $var; + + return $this; + } + + /** + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_uri = 3; + * @return string + */ + public function getRelativeUri() + { + return $this->relative_uri; + } + + /** + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_uri = 3; + * @param string $var + * @return $this + */ + public function setRelativeUri($var) + { + GPBUtil::checkString($var, True); + $this->relative_uri = $var; + + return $this; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], + * Cloud Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. + * + * Generated from protobuf field map headers = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], + * Cloud Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. + * + * Generated from protobuf field map headers = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * + * Generated from protobuf field bytes body = 5; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * + * Generated from protobuf field bytes body = 5; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php new file mode 100644 index 000000000000..265cf9515609 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php @@ -0,0 +1,373 @@ +google.cloud.tasks.v2.AppEngineRouting + */ +class AppEngineRouting extends \Google\Protobuf\Internal\Message +{ + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * + * Generated from protobuf field string service = 1; + */ + protected $service = ''; + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + */ + protected $instance = ''; + /** + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which + * were created using the App Engine SDK might have a custom domain name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * + * Generated from protobuf field string host = 4; + */ + protected $host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * @type string $version + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * @type string $instance + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * @type string $host + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which + * were created using the App Engine SDK might have a custom domain name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); + parent::__construct($data); + } + + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * + * Generated from protobuf field string service = 1; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * + * Generated from protobuf field string service = 1; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not + * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, + * some tasks which were created using the App Engine SDK use a custom domain + * name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty + * string. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which + * were created using the App Engine SDK might have a custom domain name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * + * Generated from protobuf field string host = 4; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which + * were created using the App Engine SDK might have a custom domain name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * + * Generated from protobuf field string host = 4; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php new file mode 100644 index 000000000000..880d0b5b6f34 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php @@ -0,0 +1,229 @@ +google.cloud.tasks.v2.Attempt + */ +class Attempt extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + */ + protected $schedule_time = null; + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + */ + protected $dispatch_time = null; + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + */ + protected $response_time = null; + /** + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + */ + protected $response_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $schedule_time + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $dispatch_time + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $response_time + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * @type \Google\Rpc\Status $response_status + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDispatchTime() + { + return $this->dispatch_time; + } + + public function hasDispatchTime() + { + return isset($this->dispatch_time); + } + + public function clearDispatchTime() + { + unset($this->dispatch_time); + } + + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDispatchTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->dispatch_time = $var; + + return $this; + } + + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getResponseTime() + { + return $this->response_time; + } + + public function hasResponseTime() + { + return isset($this->response_time); + } + + public function clearResponseTime() + { + unset($this->response_time); + } + + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setResponseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->response_time = $var; + + return $this; + } + + /** + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + * @return \Google\Rpc\Status|null + */ + public function getResponseStatus() + { + return $this->response_status; + } + + public function hasResponseStatus() + { + return isset($this->response_status); + } + + public function clearResponseStatus() + { + unset($this->response_status); + } + + /** + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setResponseStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->response_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php new file mode 100644 index 000000000000..0efd1e6fd83c --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php @@ -0,0 +1,160 @@ +google.cloud.tasks.v2.CreateQueueRequest + */ +class CreateQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + * existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $queue = null; + + /** + * @param string $parent Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. Please see + * {@see CloudTasksClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Tasks\V2\Queue $queue Required. The queue to create. + * + * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + * existing queue. + * + * @return \Google\Cloud\Tasks\V2\CreateQueueRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Tasks\V2\Queue $queue): self + { + return (new self()) + ->setParent($parent) + ->setQueue($queue); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @type \Google\Cloud\Tasks\V2\Queue $queue + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + * existing queue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * 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 name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * 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 queue to create. + * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + * existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2\Queue|null + */ + public function getQueue() + { + return $this->queue; + } + + public function hasQueue() + { + return isset($this->queue); + } + + public function clearQueue() + { + unset($this->queue); + } + + /** + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + * existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2\Queue $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Queue::class); + $this->queue = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php new file mode 100644 index 000000000000..5b1c36712fe2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php @@ -0,0 +1,349 @@ +google.cloud.tasks.v2.CreateTaskRequest + */ +class CreateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 3; + */ + protected $response_view = 0; + + /** + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * The queue must already exist. Please see + * {@see CloudTasksClient::queueName()} for help formatting this field. + * @param \Google\Cloud\Tasks\V2\Task $task Required. The task to add. + * + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. + * + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. + * + * Task De-duplication: + * + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or executed. + * + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * @return \Google\Cloud\Tasks\V2\CreateTaskRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Tasks\V2\Task $task): self + { + return (new self()) + ->setParent($parent) + ->setTask($task); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @type \Google\Cloud\Tasks\V2\Task $task + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * 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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * 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 task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Task::class); + $this->task = $var; + + return $this; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 3; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 3; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php new file mode 100644 index 000000000000..9d6a391711c7 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php @@ -0,0 +1,87 @@ +google.cloud.tasks.v2.DeleteQueueRequest + */ +class DeleteQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * Please see {@see CloudTasksClient::queueName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\DeleteQueueRequest + * + * @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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php new file mode 100644 index 000000000000..8b4e795d4dcf --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php @@ -0,0 +1,87 @@ +google.cloud.tasks.v2.DeleteTaskRequest + */ +class DeleteTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * Please see {@see CloudTasksClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\DeleteTaskRequest + * + * @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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php new file mode 100644 index 000000000000..bf492cc9817b --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php @@ -0,0 +1,86 @@ +google.cloud.tasks.v2.GetQueueRequest + */ +class GetQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * Please see {@see CloudTasksClient::queueName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\GetQueueRequest + * + * @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 queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php new file mode 100644 index 000000000000..7ec071973327 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php @@ -0,0 +1,157 @@ +google.cloud.tasks.v2.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + */ + protected $response_view = 0; + + /** + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * Please see {@see CloudTasksClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\GetTaskRequest + * + * @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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php new file mode 100644 index 000000000000..f545f185d4a0 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php @@ -0,0 +1,96 @@ +google.cloud.tasks.v2.HttpMethod + */ +class HttpMethod +{ + /** + * HTTP method unspecified + * + * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; + */ + const HTTP_METHOD_UNSPECIFIED = 0; + /** + * HTTP POST + * + * Generated from protobuf enum POST = 1; + */ + const POST = 1; + /** + * HTTP GET + * + * Generated from protobuf enum GET = 2; + */ + const GET = 2; + /** + * HTTP HEAD + * + * Generated from protobuf enum HEAD = 3; + */ + const HEAD = 3; + /** + * HTTP PUT + * + * Generated from protobuf enum PUT = 4; + */ + const PUT = 4; + /** + * HTTP DELETE + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * HTTP PATCH + * + * Generated from protobuf enum PATCH = 6; + */ + const PATCH = 6; + /** + * HTTP OPTIONS + * + * Generated from protobuf enum OPTIONS = 7; + */ + const OPTIONS = 7; + + private static $valueToName = [ + self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', + self::POST => 'POST', + self::GET => 'GET', + self::HEAD => 'HEAD', + self::PUT => 'PUT', + self::DELETE => 'DELETE', + self::PATCH => 'PATCH', + self::OPTIONS => 'OPTIONS', + ]; + + 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php new file mode 100644 index 000000000000..5d4f5a2be77e --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php @@ -0,0 +1,421 @@ +google.cloud.tasks.v2.HttpRequest + */ +class HttpRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url = ''; + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 2; + */ + protected $http_method = 0; + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + */ + private $headers; + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, + * or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + */ + protected $body = ''; + protected $authorization_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * @type int $http_method + * The HTTP method to use for the request. The default is POST. + * @type array|\Google\Protobuf\Internal\MapField $headers + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * @type string $body + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, + * or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * @type \Google\Cloud\Tasks\V2\OAuthToken $oauth_token + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * @type \Google\Cloud\Tasks\V2\OidcToken $oidc_token + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 2; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 2; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, + * or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, + * or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2.OAuthToken oauth_token = 5; + * @return \Google\Cloud\Tasks\V2\OAuthToken|null + */ + public function getOauthToken() + { + return $this->readOneof(5); + } + + public function hasOauthToken() + { + return $this->hasOneof(5); + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2.OAuthToken oauth_token = 5; + * @param \Google\Cloud\Tasks\V2\OAuthToken $var + * @return $this + */ + public function setOauthToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\OAuthToken::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2.OidcToken oidc_token = 6; + * @return \Google\Cloud\Tasks\V2\OidcToken|null + */ + public function getOidcToken() + { + return $this->readOneof(6); + } + + public function hasOidcToken() + { + return $this->hasOneof(6); + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2.OidcToken oidc_token = 6; + * @param \Google\Cloud\Tasks\V2\OidcToken $var + * @return $this + */ + public function setOidcToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\OidcToken::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthorizationHeader() + { + return $this->whichOneof("authorization_header"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php new file mode 100644 index 000000000000..74ace2efa6b0 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php @@ -0,0 +1,269 @@ +google.cloud.tasks.v2.ListQueuesRequest + */ +class ListQueuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * Please see {@see CloudTasksClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\ListQueuesRequest + * + * @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 name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @type string $filter + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * @type int $page_size + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * @type string $page_token + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_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 location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_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; + } + + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * + * 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; + } + + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * 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 token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an + * error to switch the value of the + * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating + * through pages. + * + * 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php new file mode 100644 index 000000000000..35df0c08229f --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php @@ -0,0 +1,122 @@ +google.cloud.tasks.v2.ListQueuesResponse + */ +class ListQueuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2.Queue queues = 1; + */ + private $queues; + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Tasks\V2\Queue>|\Google\Protobuf\Internal\RepeatedField $queues + * The list of queues. + * @type string $next_page_token + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2.Queue queues = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQueues() + { + return $this->queues; + } + + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2.Queue queues = 1; + * @param array<\Google\Cloud\Tasks\V2\Queue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQueues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2\Queue::class); + $this->queues = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * 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. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value + * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php new file mode 100644 index 000000000000..1919c39be9d2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php @@ -0,0 +1,269 @@ +google.cloud.tasks.v2.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + */ + protected $response_view = 0; + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * Please see {@see CloudTasksClient::queueName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\ListTasksRequest + * + * @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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * @type int $page_size + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * @type string $page_token + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); + $this->response_view = $var; + + return $this; + } + + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * 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 token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php new file mode 100644 index 000000000000..4aa25374a944 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php @@ -0,0 +1,118 @@ +google.cloud.tasks.v2.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2.Task tasks = 1; + */ + private $tasks; + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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 array<\Google\Cloud\Tasks\V2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The list of tasks. + * @type string $next_page_token + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2.Task tasks = 1; + * @param array<\Google\Cloud\Tasks\V2\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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 token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as + * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php new file mode 100644 index 000000000000..a4533a9aaf28 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php @@ -0,0 +1,128 @@ +google.cloud.tasks.v2.OAuthToken + */ +class OAuthToken extends \Google\Protobuf\Internal\Message +{ + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + */ + protected $service_account_email = ''; + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + */ + protected $scope = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_email + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * @type string $scope + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); + parent::__construct($data); + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php new file mode 100644 index 000000000000..5754271fc809 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php @@ -0,0 +1,126 @@ +google.cloud.tasks.v2.OidcToken + */ +class OidcToken extends \Google\Protobuf\Internal\Message +{ + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + */ + protected $service_account_email = ''; + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + */ + protected $audience = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_email + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * @type string $audience + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); + parent::__construct($data); + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php new file mode 100644 index 000000000000..64db439c96ab --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php @@ -0,0 +1,87 @@ +google.cloud.tasks.v2.PauseQueueRequest + */ +class PauseQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * Please see {@see CloudTasksClient::queueName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\PauseQueueRequest + * + * @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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php new file mode 100644 index 000000000000..2e24c8a7f5c3 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php @@ -0,0 +1,87 @@ +google.cloud.tasks.v2.PurgeQueueRequest + */ +class PurgeQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * Please see {@see CloudTasksClient::queueName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\PurgeQueueRequest + * + * @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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php new file mode 100644 index 000000000000..d620fdefd4b3 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php @@ -0,0 +1,611 @@ +google.cloud.tasks.v2.Queue + */ +class Queue extends \Google\Protobuf\Internal\Message +{ + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it + * becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Overrides for + * [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * These settings apply only to + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this + * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. + * If set, `app_engine_routing_override` is used for all + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the + * queue, no matter what the setting is for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing_override = 2; + */ + protected $app_engine_routing_override = null; + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total + * rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what + * happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task + * retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * + * Generated from protobuf field .google.cloud.tasks.v2.RateLimits rate_limits = 3; + */ + protected $rate_limits = null; + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2.RetryConfig retry_config = 4; + */ + protected $retry_config = null; + /** + * Output only. The state of the queue. + * `state` can only be changed by calling + * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used + * to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue.State state = 5; + */ + protected $state = 0; + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine + * Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 6; + */ + protected $purge_time = null; + /** + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * + * Generated from protobuf field .google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9; + */ + protected $stackdriver_logging_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it + * becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * @type \Google\Cloud\Tasks\V2\AppEngineRouting $app_engine_routing_override + * Overrides for + * [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * These settings apply only to + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this + * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. + * If set, `app_engine_routing_override` is used for all + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the + * queue, no matter what the setting is for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * @type \Google\Cloud\Tasks\V2\RateLimits $rate_limits + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total + * rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what + * happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task + * retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * @type \Google\Cloud\Tasks\V2\RetryConfig $retry_config + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * @type int $state + * Output only. The state of the queue. + * `state` can only be changed by calling + * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used + * to change `state`. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine + * Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * @type \Google\Cloud\Tasks\V2\StackdriverLoggingConfig $stackdriver_logging_config + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it + * becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it + * becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * 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; + } + + /** + * Overrides for + * [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * These settings apply only to + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this + * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. + * If set, `app_engine_routing_override` is used for all + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the + * queue, no matter what the setting is for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing_override = 2; + * @return \Google\Cloud\Tasks\V2\AppEngineRouting|null + */ + public function getAppEngineRoutingOverride() + { + return $this->app_engine_routing_override; + } + + public function hasAppEngineRoutingOverride() + { + return isset($this->app_engine_routing_override); + } + + public function clearAppEngineRoutingOverride() + { + unset($this->app_engine_routing_override); + } + + /** + * Overrides for + * [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * These settings apply only to + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this + * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. + * If set, `app_engine_routing_override` is used for all + * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the + * queue, no matter what the setting is for the [task-level + * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing_override = 2; + * @param \Google\Cloud\Tasks\V2\AppEngineRouting $var + * @return $this + */ + public function setAppEngineRoutingOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineRouting::class); + $this->app_engine_routing_override = $var; + + return $this; + } + + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total + * rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what + * happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task + * retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * + * Generated from protobuf field .google.cloud.tasks.v2.RateLimits rate_limits = 3; + * @return \Google\Cloud\Tasks\V2\RateLimits|null + */ + public function getRateLimits() + { + return $this->rate_limits; + } + + public function hasRateLimits() + { + return isset($this->rate_limits); + } + + public function clearRateLimits() + { + unset($this->rate_limits); + } + + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total + * rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what + * happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task + * retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * + * Generated from protobuf field .google.cloud.tasks.v2.RateLimits rate_limits = 3; + * @param \Google\Cloud\Tasks\V2\RateLimits $var + * @return $this + */ + public function setRateLimits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\RateLimits::class); + $this->rate_limits = $var; + + return $this; + } + + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2.RetryConfig retry_config = 4; + * @return \Google\Cloud\Tasks\V2\RetryConfig|null + */ + public function getRetryConfig() + { + return $this->retry_config; + } + + public function hasRetryConfig() + { + return isset($this->retry_config); + } + + public function clearRetryConfig() + { + unset($this->retry_config); + } + + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2.RetryConfig retry_config = 4; + * @param \Google\Cloud\Tasks\V2\RetryConfig $var + * @return $this + */ + public function setRetryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\RetryConfig::class); + $this->retry_config = $var; + + return $this; + } + + /** + * Output only. The state of the queue. + * `state` can only be changed by calling + * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used + * to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue.State state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the queue. + * `state` can only be changed by calling + * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used + * to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue.State state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Queue\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine + * Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine + * Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + + /** + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * + * Generated from protobuf field .google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9; + * @return \Google\Cloud\Tasks\V2\StackdriverLoggingConfig|null + */ + public function getStackdriverLoggingConfig() + { + return $this->stackdriver_logging_config; + } + + public function hasStackdriverLoggingConfig() + { + return isset($this->stackdriver_logging_config); + } + + public function clearStackdriverLoggingConfig() + { + unset($this->stackdriver_logging_config); + } + + /** + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * + * Generated from protobuf field .google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9; + * @param \Google\Cloud\Tasks\V2\StackdriverLoggingConfig $var + * @return $this + */ + public function setStackdriverLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\StackdriverLoggingConfig::class); + $this->stackdriver_logging_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php new file mode 100644 index 000000000000..2c4722b35ec5 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php @@ -0,0 +1,89 @@ +google.cloud.tasks.v2.Queue.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The queue is running. Tasks can be dispatched. + * If the queue was created using Cloud Tasks and the queue has + * had no activity (method calls or task dispatches) for 30 days, + * the queue may take a few minutes to re-activate. Some method + * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + * tasks may not be dispatched for a few minutes until the queue + * has been re-activated. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * Tasks are paused by the user. If the queue is paused then Cloud + * Tasks will stop delivering tasks from it, but more tasks can + * still be added to it by the user. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * The queue is disabled. + * A queue becomes `DISABLED` when + * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + * or + * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + * is uploaded which does not contain the queue. You cannot directly disable + * a queue. + * When a queue is disabled, tasks can still be added to a queue + * but the tasks are not dispatched. + * To permanently delete this queue and all of its tasks, call + * [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Tasks\V2\Queue_State::class); + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php new file mode 100644 index 000000000000..27f254540e19 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php @@ -0,0 +1,308 @@ +google.cloud.tasks.v2.RateLimits + */ +class RateLimits extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * The maximum allowed value is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_dispatches_per_second = 1; + */ + protected $max_dispatches_per_second = 0.0; + /** + * Output only. The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * Cloud Tasks will pick the value of `max_burst_size` based on the + * value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * For queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * Since `max_burst_size` is output only, if + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a + * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on + * the value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], + * regardless of whether + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] + * is updated. + * + * Generated from protobuf field int32 max_burst_size = 2; + */ + protected $max_burst_size = 0; + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_dispatches = 3; + */ + protected $max_concurrent_dispatches = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $max_dispatches_per_second + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * The maximum allowed value is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * @type int $max_burst_size + * Output only. The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * Cloud Tasks will pick the value of `max_burst_size` based on the + * value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * For queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * Since `max_burst_size` is output only, if + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a + * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on + * the value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], + * regardless of whether + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] + * is updated. + * @type int $max_concurrent_dispatches + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * The maximum allowed value is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_dispatches_per_second = 1; + * @return float + */ + public function getMaxDispatchesPerSecond() + { + return $this->max_dispatches_per_second; + } + + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * The maximum allowed value is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_dispatches_per_second = 1; + * @param float $var + * @return $this + */ + public function setMaxDispatchesPerSecond($var) + { + GPBUtil::checkDouble($var); + $this->max_dispatches_per_second = $var; + + return $this; + } + + /** + * Output only. The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * Cloud Tasks will pick the value of `max_burst_size` based on the + * value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * For queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * Since `max_burst_size` is output only, if + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a + * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on + * the value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], + * regardless of whether + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] + * is updated. + * + * Generated from protobuf field int32 max_burst_size = 2; + * @return int + */ + public function getMaxBurstSize() + { + return $this->max_burst_size; + } + + /** + * Output only. The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * Cloud Tasks will pick the value of `max_burst_size` based on the + * value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. + * For queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * Since `max_burst_size` is output only, if + * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a + * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on + * the value of + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], + * regardless of whether + * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] + * is updated. + * + * Generated from protobuf field int32 max_burst_size = 2; + * @param int $var + * @return $this + */ + public function setMaxBurstSize($var) + { + GPBUtil::checkInt32($var); + $this->max_burst_size = $var; + + return $this; + } + + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_dispatches = 3; + * @return int + */ + public function getMaxConcurrentDispatches() + { + return $this->max_concurrent_dispatches; + } + + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_dispatches = 3; + * @param int $var + * @return $this + */ + public function setMaxConcurrentDispatches($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_dispatches = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php new file mode 100644 index 000000000000..9d16294a8e1e --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php @@ -0,0 +1,87 @@ +google.cloud.tasks.v2.ResumeQueueRequest + */ +class ResumeQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * Please see {@see CloudTasksClient::queueName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\ResumeQueueRequest + * + * @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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php new file mode 100644 index 000000000000..64252afa351d --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php @@ -0,0 +1,490 @@ +google.cloud.tasks.v2.RetryConfig + */ +class RetryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_attempts = 1; + */ + protected $max_attempts = 0; + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no + * further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; + */ + protected $max_retry_duration = null; + /** + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; + */ + protected $min_backoff = null; + /** + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; + */ + protected $max_backoff = null; + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles + * `max_doublings` times, then increases linearly, and finally + * retries at intervals of + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and + * `max_doublings` is 3, then the a task will first be retried in + * 10s. The retry interval will double three times, and then + * increase linearly by 2^3 * 10s. Finally, the task will retry at + * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] + * until the task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, + * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 5; + */ + protected $max_doublings = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_attempts + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $max_retry_duration + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no + * further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $min_backoff + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $max_backoff + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type int $max_doublings + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles + * `max_doublings` times, then increases linearly, and finally + * retries at intervals of + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and + * `max_doublings` is 3, then the a task will first be retried in + * 10s. The retry interval will double three times, and then + * increase linearly by 2^3 * 10s. Finally, the task will retry at + * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] + * until the task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, + * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_attempts = 1; + * @return int + */ + public function getMaxAttempts() + { + return $this->max_attempts; + } + + /** + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_attempts = 1; + * @param int $var + * @return $this + */ + public function setMaxAttempts($var) + { + GPBUtil::checkInt32($var); + $this->max_attempts = $var; + + return $this; + } + + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no + * further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxRetryDuration() + { + return $this->max_retry_duration; + } + + public function hasMaxRetryDuration() + { + return isset($this->max_retry_duration); + } + + public function clearMaxRetryDuration() + { + unset($this->max_retry_duration); + } + + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no + * further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxRetryDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_retry_duration = $var; + + return $this; + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBackoff() + { + return $this->min_backoff; + } + + public function hasMinBackoff() + { + return isset($this->min_backoff); + } + + public function clearMinBackoff() + { + unset($this->min_backoff); + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_backoff = $var; + + return $this; + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxBackoff() + { + return $this->max_backoff; + } + + public function hasMaxBackoff() + { + return isset($this->max_backoff); + } + + public function clearMaxBackoff() + { + unset($this->max_backoff); + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for + * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] + * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task + * should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_backoff = $var; + + return $this; + } + + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles + * `max_doublings` times, then increases linearly, and finally + * retries at intervals of + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and + * `max_doublings` is 3, then the a task will first be retried in + * 10s. The retry interval will double three times, and then + * increase linearly by 2^3 * 10s. Finally, the task will retry at + * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] + * until the task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, + * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 5; + * @return int + */ + public function getMaxDoublings() + { + return $this->max_doublings; + } + + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles + * `max_doublings` times, then increases linearly, and finally + * retries at intervals of + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and + * `max_doublings` is 3, then the a task will first be retried in + * 10s. The retry interval will double three times, and then + * increase linearly by 2^3 * 10s. Finally, the task will retry at + * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] + * until the task has been attempted + * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, + * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 5; + * @param int $var + * @return $this + */ + public function setMaxDoublings($var) + { + GPBUtil::checkInt32($var); + $this->max_doublings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php new file mode 100644 index 000000000000..bcdf65c9a418 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php @@ -0,0 +1,157 @@ +google.cloud.tasks.v2.RunTaskRequest + */ +class RunTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + */ + protected $response_view = 0; + + /** + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * Please see {@see CloudTasksClient::taskName()} for help formatting this field. + * + * @return \Google\Cloud\Tasks\V2\RunTaskRequest + * + * @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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php new file mode 100644 index 000000000000..67e03f8a8ae6 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php @@ -0,0 +1,80 @@ +google.cloud.tasks.v2.StackdriverLoggingConfig + */ +class StackdriverLoggingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * + * Generated from protobuf field double sampling_ratio = 1; + */ + protected $sampling_ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $sampling_ratio + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * + * Generated from protobuf field double sampling_ratio = 1; + * @return float + */ + public function getSamplingRatio() + { + return $this->sampling_ratio; + } + + /** + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * + * Generated from protobuf field double sampling_ratio = 1; + * @param float $var + * @return $this + */ + public function setSamplingRatio($var) + { + GPBUtil::checkDouble($var); + $this->sampling_ratio = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php new file mode 100644 index 000000000000..6606b429e387 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php @@ -0,0 +1,684 @@ +google.cloud.tasks.v2.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the task is scheduled to be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; + */ + protected $schedule_time = null; + /** + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 + * minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 + * indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 6; + */ + protected $dispatch_deadline = null; + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 dispatch_count = 7; + */ + protected $dispatch_count = 0; + /** + * Output only. The number of attempts which have received a response. + * + * Generated from protobuf field int32 response_count = 8; + */ + protected $response_count = 0; + /** + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be + * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not + * retained by Cloud Tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2.Attempt first_attempt = 9; + */ + protected $first_attempt = null; + /** + * Output only. The status of the task's last attempt. + * + * Generated from protobuf field .google.cloud.tasks.v2.Attempt last_attempt = 10; + */ + protected $last_attempt = null; + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View view = 11; + */ + protected $view = 0; + protected $message_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * @type \Google\Cloud\Tasks\V2\AppEngineHttpRequest $app_engine_http_request + * HTTP request that is sent to the App Engine app handler. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. + * @type \Google\Cloud\Tasks\V2\HttpRequest $http_request + * HTTP request that is sent to the worker. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + * @type \Google\Protobuf\Timestamp $schedule_time + * The time when the task is scheduled to be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * @type \Google\Protobuf\Duration $dispatch_deadline + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 + * minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 + * indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * @type int $dispatch_count + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * @type int $response_count + * Output only. The number of attempts which have received a response. + * @type \Google\Cloud\Tasks\V2\Attempt $first_attempt + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be + * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not + * retained by Cloud Tasks. + * @type \Google\Cloud\Tasks\V2\Attempt $last_attempt + * Output only. The status of the task's last attempt. + * @type int $view + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] has been returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * 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; + } + + /** + * HTTP request that is sent to the App Engine app handler. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2; + * @return \Google\Cloud\Tasks\V2\AppEngineHttpRequest|null + */ + public function getAppEngineHttpRequest() + { + return $this->readOneof(2); + } + + public function hasAppEngineHttpRequest() + { + return $this->hasOneof(2); + } + + /** + * HTTP request that is sent to the App Engine app handler. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2; + * @param \Google\Cloud\Tasks\V2\AppEngineHttpRequest $var + * @return $this + */ + public function setAppEngineHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineHttpRequest::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * HTTP request that is sent to the worker. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpRequest http_request = 3; + * @return \Google\Cloud\Tasks\V2\HttpRequest|null + */ + public function getHttpRequest() + { + return $this->readOneof(3); + } + + public function hasHttpRequest() + { + return $this->hasOneof(3); + } + + /** + * HTTP request that is sent to the worker. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2.HttpRequest http_request = 3; + * @param \Google\Cloud\Tasks\V2\HttpRequest $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\HttpRequest::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The time when the task is scheduled to be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * The time when the task is scheduled to be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @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 that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @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 deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 + * minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 + * indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDispatchDeadline() + { + return $this->dispatch_deadline; + } + + public function hasDispatchDeadline() + { + return isset($this->dispatch_deadline); + } + + public function clearDispatchDeadline() + { + unset($this->dispatch_deadline); + } + + /** + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 + * minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 + * indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDispatchDeadline($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->dispatch_deadline = $var; + + return $this; + } + + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 dispatch_count = 7; + * @return int + */ + public function getDispatchCount() + { + return $this->dispatch_count; + } + + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 dispatch_count = 7; + * @param int $var + * @return $this + */ + public function setDispatchCount($var) + { + GPBUtil::checkInt32($var); + $this->dispatch_count = $var; + + return $this; + } + + /** + * Output only. The number of attempts which have received a response. + * + * Generated from protobuf field int32 response_count = 8; + * @return int + */ + public function getResponseCount() + { + return $this->response_count; + } + + /** + * Output only. The number of attempts which have received a response. + * + * Generated from protobuf field int32 response_count = 8; + * @param int $var + * @return $this + */ + public function setResponseCount($var) + { + GPBUtil::checkInt32($var); + $this->response_count = $var; + + return $this; + } + + /** + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be + * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not + * retained by Cloud Tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2.Attempt first_attempt = 9; + * @return \Google\Cloud\Tasks\V2\Attempt|null + */ + public function getFirstAttempt() + { + return $this->first_attempt; + } + + public function hasFirstAttempt() + { + return isset($this->first_attempt); + } + + public function clearFirstAttempt() + { + unset($this->first_attempt); + } + + /** + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be + * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not + * retained by Cloud Tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2.Attempt first_attempt = 9; + * @param \Google\Cloud\Tasks\V2\Attempt $var + * @return $this + */ + public function setFirstAttempt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Attempt::class); + $this->first_attempt = $var; + + return $this; + } + + /** + * Output only. The status of the task's last attempt. + * + * Generated from protobuf field .google.cloud.tasks.v2.Attempt last_attempt = 10; + * @return \Google\Cloud\Tasks\V2\Attempt|null + */ + public function getLastAttempt() + { + return $this->last_attempt; + } + + public function hasLastAttempt() + { + return isset($this->last_attempt); + } + + public function clearLastAttempt() + { + unset($this->last_attempt); + } + + /** + * Output only. The status of the task's last attempt. + * + * Generated from protobuf field .google.cloud.tasks.v2.Attempt last_attempt = 10; + * @param \Google\Cloud\Tasks\V2\Attempt $var + * @return $this + */ + public function setLastAttempt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Attempt::class); + $this->last_attempt = $var; + + return $this; + } + + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View view = 11; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2.Task.View view = 11; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); + $this->view = $var; + + return $this; + } + + /** + * @return string + */ + public function getMessageType() + { + return $this->whichOneof("message_type"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php new file mode 100644 index 000000000000..14abd3e680ee --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php @@ -0,0 +1,79 @@ +google.cloud.tasks.v2.Task.View + */ +class View +{ + /** + * Unspecified. Defaults to BASIC. + * + * Generated from protobuf enum VIEW_UNSPECIFIED = 0; + */ + const VIEW_UNSPECIFIED = 0; + /** + * The basic view omits fields which can be large or can contain + * sensitive data. + * This view does not include the + * [body in + * AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. + * Bodies are desirable to return only when needed, because they + * can be large and because of the sensitivity of the data that you + * choose to store in it. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * All information is returned. + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Queue][google.cloud.tasks.v2.Queue] resource. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(View::class, \Google\Cloud\Tasks\V2\Task_View::class); + diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php new file mode 100644 index 000000000000..7a609a96f605 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php @@ -0,0 +1,165 @@ +google.cloud.tasks.v2.UpdateQueueRequest + */ +class UpdateQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $queue = null; + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Tasks\V2\Queue $queue Required. The queue to create or update. + * + * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. + * + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. + * @param \Google\Protobuf\FieldMask $updateMask A mask used to specify which fields of the queue are being updated. + * + * If empty, then all fields will be updated. + * + * @return \Google\Cloud\Tasks\V2\UpdateQueueRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Tasks\V2\Queue $queue, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setQueue($queue) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2\Queue $queue + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. + * @type \Google\Protobuf\FieldMask $update_mask + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2\Queue|null + */ + public function getQueue() + { + return $this->queue; + } + + public function hasQueue() + { + return isset($this->queue); + } + + public function clearQueue() + { + unset($this->queue); + } + + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. + * + * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2\Queue $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Queue::class); + $this->queue = $var; + + return $this; + } + + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will 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); + } + + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will 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/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php new file mode 100644 index 000000000000..80a4a56b620e --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setQueue($queue); + + // Call the API and handle any network failures. + try { + /** @var Queue $response */ + $response = $cloudTasksClient->createQueue($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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); + + create_queue_sample($formattedParent); +} +// [END cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php new file mode 100644 index 000000000000..aa2e0fce0bdb --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setTask($task); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $cloudTasksClient->createTask($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + create_task_sample($formattedParent); +} +// [END cloudtasks_v2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php new file mode 100644 index 000000000000..74fe50d44f70 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $cloudTasksClient->deleteQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + delete_queue_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php new file mode 100644 index 000000000000..b61653507f6b --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $cloudTasksClient->deleteTask($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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + delete_task_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php new file mode 100644 index 000000000000..4dc02aa93c2a --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php @@ -0,0 +1,79 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $cloudTasksClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_location.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_location.php new file mode 100644 index 000000000000..195480970c8c --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/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 cloudtasks_v2_generated_CloudTasks_GetLocation_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php new file mode 100644 index 000000000000..4d61129ad1a5 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Queue $response */ + $response = $cloudTasksClient->getQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + get_queue_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php new file mode 100644 index 000000000000..da3d8cf9ba56 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $cloudTasksClient->getTask($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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + get_task_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_locations.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_locations.php new file mode 100644 index 000000000000..469efba56cde --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/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 cloudtasks_v2_generated_CloudTasks_ListLocations_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php new file mode 100644 index 000000000000..c542b08e9048 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudTasksClient->listQueues($request); + + /** @var Queue $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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); + + list_queues_sample($formattedParent); +} +// [END cloudtasks_v2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php new file mode 100644 index 000000000000..860cd25ca38a --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudTasksClient->listTasks($request); + + /** @var Task $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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + list_tasks_sample($formattedParent); +} +// [END cloudtasks_v2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php new file mode 100644 index 000000000000..e83e2a958bd3 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Queue $response */ + $response = $cloudTasksClient->pauseQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + pause_queue_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php new file mode 100644 index 000000000000..592b7e9758d8 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Queue $response */ + $response = $cloudTasksClient->purgeQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + purge_queue_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php new file mode 100644 index 000000000000..17f2fa3b1e61 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Queue $response */ + $response = $cloudTasksClient->resumeQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + resume_queue_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php new file mode 100644 index 000000000000..59e8bfc56383 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php @@ -0,0 +1,97 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $cloudTasksClient->runTask($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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + run_task_sample($formattedName); +} +// [END cloudtasks_v2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php new file mode 100644 index 000000000000..dcc4a9703774 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php @@ -0,0 +1,83 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $cloudTasksClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php new file mode 100644 index 000000000000..9f07c46f31ae --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php @@ -0,0 +1,85 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $cloudTasksClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php new file mode 100644 index 000000000000..0fb29ecda689 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php @@ -0,0 +1,73 @@ +setQueue($queue); + + // Call the API and handle any network failures. + try { + /** @var Queue $response */ + $response = $cloudTasksClient->updateQueue($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php b/owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php new file mode 100644 index 000000000000..dfc84b3f611d --- /dev/null +++ b/owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php @@ -0,0 +1,887 @@ + createQueueAsync(CreateQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTaskAsync(CreateTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteQueueAsync(DeleteQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTaskAsync(DeleteTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getQueueAsync(GetQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface listQueuesAsync(ListQueuesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseQueueAsync(PauseQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface purgeQueueAsync(PurgeQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeQueueAsync(ResumeQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface runTaskAsync(RunTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateQueueAsync(UpdateQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class CloudTasksClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.tasks.v2.CloudTasks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.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/cloud_tasks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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 queue + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * + * @return string The formatted queue resource. + */ + public static function queueName(string $project, string $location, string $queue): string + { + return self::getPathTemplate('queue')->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName(string $project, string $location, string $queue, string $task): string + { + return self::getPathTemplate('task')->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + 'task' => $task, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - queue: projects/{project}/locations/{location}/queues/{queue} + * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtasks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a queue. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * The async variant is {@see CloudTasksClient::createQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/create_queue.php + * + * @param CreateQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Queue + * + * @throws ApiException Thrown if the API call fails. + */ + public function createQueue(CreateQueueRequest $request, array $callOptions = []): Queue + { + return $this->startApiCall('CreateQueue', $request, $callOptions)->wait(); + } + + /** + * Creates a task and adds it to a queue. + * + * Tasks cannot be updated after creation; there is no UpdateTask command. + * + * * The maximum task size is 100KB. + * + * The async variant is {@see CloudTasksClient::createTaskAsync()} . + * + * @example samples/V2/CloudTasksClient/create_task.php + * + * @param CreateTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTask(CreateTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); + } + + /** + * Deletes a queue. + * + * This command will delete the queue even if it has tasks in it. + * + * Note: If you delete a queue, a queue with the same name can't be created + * for 7 days. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * The async variant is {@see CloudTasksClient::deleteQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/delete_queue.php + * + * @param DeleteQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteQueue(DeleteQueueRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteQueue', $request, $callOptions)->wait(); + } + + /** + * Deletes a task. + * + * A task can be deleted if it is scheduled or dispatched. A task + * cannot be deleted if it has executed successfully or permanently + * failed. + * + * The async variant is {@see CloudTasksClient::deleteTaskAsync()} . + * + * @example samples/V2/CloudTasksClient/delete_task.php + * + * @param DeleteTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteTask(DeleteTaskRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTask', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.getIamPolicy` + * + * The async variant is {@see CloudTasksClient::getIamPolicyAsync()} . + * + * @example samples/V2/CloudTasksClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets a queue. + * + * The async variant is {@see CloudTasksClient::getQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/get_queue.php + * + * @param GetQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Queue + * + * @throws ApiException Thrown if the API call fails. + */ + public function getQueue(GetQueueRequest $request, array $callOptions = []): Queue + { + return $this->startApiCall('GetQueue', $request, $callOptions)->wait(); + } + + /** + * Gets a task. + * + * The async variant is {@see CloudTasksClient::getTaskAsync()} . + * + * @example samples/V2/CloudTasksClient/get_task.php + * + * @param GetTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTask(GetTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('GetTask', $request, $callOptions)->wait(); + } + + /** + * Lists queues. + * + * Queues are returned in lexicographical order. + * + * The async variant is {@see CloudTasksClient::listQueuesAsync()} . + * + * @example samples/V2/CloudTasksClient/list_queues.php + * + * @param ListQueuesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listQueues(ListQueuesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListQueues', $request, $callOptions); + } + + /** + * Lists the tasks in a queue. + * + * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is + * retrieved due to performance considerations; + * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] + * controls the subset of information which is returned. + * + * The tasks may be returned in any order. The ordering may change at any + * time. + * + * The async variant is {@see CloudTasksClient::listTasksAsync()} . + * + * @example samples/V2/CloudTasksClient/list_tasks.php + * + * @param ListTasksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTasks', $request, $callOptions); + } + + /** + * Pauses the queue. + * + * If a queue is paused then the system will stop dispatching tasks + * until the queue is resumed via + * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can + * still be added when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + * + * The async variant is {@see CloudTasksClient::pauseQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/pause_queue.php + * + * @param PauseQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Queue + * + * @throws ApiException Thrown if the API call fails. + */ + public function pauseQueue(PauseQueueRequest $request, array $callOptions = []): Queue + { + return $this->startApiCall('PauseQueue', $request, $callOptions)->wait(); + } + + /** + * Purges a queue by deleting all of its tasks. + * + * All tasks created before this method is called are permanently deleted. + * + * Purge operations can take up to one minute to take effect. Tasks + * might be dispatched before the purge takes effect. A purge is irreversible. + * + * The async variant is {@see CloudTasksClient::purgeQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/purge_queue.php + * + * @param PurgeQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Queue + * + * @throws ApiException Thrown if the API call fails. + */ + public function purgeQueue(PurgeQueueRequest $request, array $callOptions = []): Queue + { + return $this->startApiCall('PurgeQueue', $request, $callOptions)->wait(); + } + + /** + * Resume a queue. + * + * This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + * after calling this method it will be set to + * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + * + * WARNING: Resuming many high-QPS queues at the same time can + * lead to target overloading. If you are resuming high-QPS + * queues, follow the 500/50/5 pattern described in + * [Managing Cloud Tasks Scaling + * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + * + * The async variant is {@see CloudTasksClient::resumeQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/resume_queue.php + * + * @param ResumeQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Queue + * + * @throws ApiException Thrown if the API call fails. + */ + public function resumeQueue(ResumeQueueRequest $request, array $callOptions = []): Queue + { + return $this->startApiCall('ResumeQueue', $request, $callOptions)->wait(); + } + + /** + * Forces a task to run now. + * + * When this method is called, Cloud Tasks will dispatch the task, even if + * the task is already running, the queue has reached its + * [RateLimits][google.cloud.tasks.v2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + * + * This command is meant to be used for manual debugging. For + * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to + * retry a failed task after a fix has been made or to manually force a task + * to be dispatched now. + * + * The dispatched task is returned. That is, the task that is returned + * contains the [status][Task.status] after the task is dispatched but + * before the task is received by its target. + * + * If Cloud Tasks receives a successful response from the task's + * target, then the task will be deleted; otherwise the task's + * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to + * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * + * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + * task that has already succeeded or permanently failed. + * + * The async variant is {@see CloudTasksClient::runTaskAsync()} . + * + * @example samples/V2/CloudTasksClient/run_task.php + * + * @param RunTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function runTask(RunTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('RunTask', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + * Replaces any existing policy. + * + * Note: The Cloud Console does not check queue-level IAM permissions yet. + * Project-level permissions are required to use the Cloud Console. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.setIamPolicy` + * + * The async variant is {@see CloudTasksClient::setIamPolicyAsync()} . + * + * @example samples/V2/CloudTasksClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on a + * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this + * will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * The async variant is {@see CloudTasksClient::testIamPermissionsAsync()} . + * + * @example samples/V2/CloudTasksClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates a queue. + * + * This method creates the queue if it does not exist and updates + * the queue if it does exist. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * The async variant is {@see CloudTasksClient::updateQueueAsync()} . + * + * @example samples/V2/CloudTasksClient/update_queue.php + * + * @param UpdateQueueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Queue + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateQueue(UpdateQueueRequest $request, array $callOptions = []): Queue + { + return $this->startApiCall('UpdateQueue', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see CloudTasksClient::getLocationAsync()} . + * + * @example samples/V2/CloudTasksClient/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 CloudTasksClient::listLocationsAsync()} . + * + * @example samples/V2/CloudTasksClient/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/Tasks/v2/src/V2/CloudTasksClient.php b/owl-bot-staging/Tasks/v2/src/V2/CloudTasksClient.php new file mode 100644 index 000000000000..e34ca4466502 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/src/V2/CloudTasksClient.php @@ -0,0 +1,34 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $queue = new Queue(); + * $response = $cloudTasksClient->createQueue($formattedParent, $queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Tasks\V2\Client\CloudTasksClient}. + */ +class CloudTasksGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.tasks.v2.CloudTasks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $queueNameTemplate; + + private static $taskNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_tasks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getQueueNameTemplate() + { + if (self::$queueNameTemplate == null) { + self::$queueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}'); + } + + return self::$queueNameTemplate; + } + + private static function getTaskNameTemplate() + { + if (self::$taskNameTemplate == null) { + self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}/tasks/{task}'); + } + + return self::$taskNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'queue' => self::getQueueNameTemplate(), + 'task' => self::getTaskNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a queue + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * + * @return string The formatted queue resource. + */ + public static function queueName($project, $location, $queue) + { + return self::getQueueNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName($project, $location, $queue, $task) + { + return self::getTaskNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + 'task' => $task, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - queue: projects/{project}/locations/{location}/queues/{queue} + * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtasks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a queue. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); + * $queue = new Queue(); + * $response = $cloudTasksClient->createQueue($formattedParent, $queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @param Queue $queue Required. The queue to create. + * + * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an + * existing queue. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Queue + * + * @throws ApiException if the remote call fails + */ + public function createQueue($parent, $queue, array $optionalArgs = []) + { + $request = new CreateQueueRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setQueue($queue); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a task and adds it to a queue. + * + * Tasks cannot be updated after creation; there is no UpdateTask command. + * + * * The maximum task size is 100KB. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $task = new Task(); + * $response = $cloudTasksClient->createTask($formattedParent, $task); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * The queue must already exist. + * @param Task $task Required. The task to add. + * + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then + * the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2.Task.name]. + * + * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or + * is in the past then Cloud Tasks will set it to the current time. + * + * Task De-duplication: + * + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9days after the original task was deleted or executed. + * + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Task + * + * @throws ApiException if the remote call fails + */ + public function createTask($parent, $task, array $optionalArgs = []) + { + $request = new CreateTaskRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTask($task); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a queue. + * + * This command will delete the queue even if it has tasks in it. + * + * Note: If you delete a queue, a queue with the same name can't be created + * for 7 days. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $cloudTasksClient->deleteQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteQueue($name, array $optionalArgs = []) + { + $request = new DeleteQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteQueue', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a task. + * + * A task can be deleted if it is scheduled or dispatched. A task + * cannot be deleted if it has executed successfully or permanently + * failed. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $cloudTasksClient->deleteTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteTask($name, array $optionalArgs = []) + { + $request = new DeleteTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTask', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + * Returns an empty policy if the resource exists and does not have a policy + * set. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.getIamPolicy` + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $response = $cloudTasksClient->getIamPolicy($resource); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a queue. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->getQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Queue + * + * @throws ApiException if the remote call fails + */ + public function getQueue($name, array $optionalArgs = []) + { + $request = new GetQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a task. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $response = $cloudTasksClient->getTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Task + * + * @throws ApiException if the remote call fails + */ + public function getTask($name, array $optionalArgs = []) + { + $request = new GetTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists queues. + * + * Queues are returned in lexicographical order. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * + * Sample filter "state: PAUSED". + * + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listQueues($parent, array $optionalArgs = []) + { + $request = new ListQueuesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListQueues', $optionalArgs, ListQueuesResponse::class, $request); + } + + /** + * Lists the tasks in a queue. + * + * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is + * retrieved due to performance considerations; + * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] + * controls the subset of information which is returned. + * + * The tasks may be returned in any order. The ordering may change at any + * time. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTasks($parent, array $optionalArgs = []) + { + $request = new ListTasksRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); + } + + /** + * Pauses the queue. + * + * If a queue is paused then the system will stop dispatching tasks + * until the queue is resumed via + * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can + * still be added when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->pauseQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Queue + * + * @throws ApiException if the remote call fails + */ + public function pauseQueue($name, array $optionalArgs = []) + { + $request = new PauseQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PauseQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Purges a queue by deleting all of its tasks. + * + * All tasks created before this method is called are permanently deleted. + * + * Purge operations can take up to one minute to take effect. Tasks + * might be dispatched before the purge takes effect. A purge is irreversible. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->purgeQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Queue + * + * @throws ApiException if the remote call fails + */ + public function purgeQueue($name, array $optionalArgs = []) + { + $request = new PurgeQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PurgeQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Resume a queue. + * + * This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; + * after calling this method it will be set to + * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. + * + * WARNING: Resuming many high-QPS queues at the same time can + * lead to target overloading. If you are resuming high-QPS + * queues, follow the 500/50/5 pattern described in + * [Managing Cloud Tasks Scaling + * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->resumeQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Queue + * + * @throws ApiException if the remote call fails + */ + public function resumeQueue($name, array $optionalArgs = []) + { + $request = new ResumeQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResumeQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Forces a task to run now. + * + * When this method is called, Cloud Tasks will dispatch the task, even if + * the task is already running, the queue has reached its + * [RateLimits][google.cloud.tasks.v2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. + * + * This command is meant to be used for manual debugging. For + * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to + * retry a failed task after a fix has been made or to manually force a task + * to be dispatched now. + * + * The dispatched task is returned. That is, the task that is returned + * contains the [status][Task.status] after the task is dispatched but + * before the task is received by its target. + * + * If Cloud Tasks receives a successful response from the task's + * target, then the task will be deleted; otherwise the task's + * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to + * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2.RetryConfig]. + * + * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + * task that has already succeeded or permanently failed. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $response = $cloudTasksClient->runTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2.Task] will be returned. + * + * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; + * not all information is retrieved by default because some data, such as + * payloads, might be desirable to return only when needed because + * of its large size or because of the sensitivity of data that it + * contains. + * + * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires + * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + * permission on the [Task][google.cloud.tasks.v2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Task + * + * @throws ApiException if the remote call fails + */ + public function runTask($name, array $optionalArgs = []) + { + $request = new RunTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. + * Replaces any existing policy. + * + * Note: The Cloud Console does not check queue-level IAM permissions yet. + * Project-level permissions are required to use the Cloud Console. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.setIamPolicy` + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $cloudTasksClient->setIamPolicy($resource, $policy); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns permissions that a caller has on a + * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this + * will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $cloudTasksClient->testIamPermissions($resource, $permissions); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a queue. + * + * This method creates the queue if it does not exist and updates + * the queue if it does exist. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $queue = new Queue(); + * $response = $cloudTasksClient->updateQueue($queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param Queue $queue Required. The queue to create or update. + * + * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. + * + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A mask used to specify which fields of the queue are being updated. + * + * If empty, then all fields will be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2\Queue + * + * @throws ApiException if the remote call fails + */ + public function updateQueue($queue, array $optionalArgs = []) + { + $request = new UpdateQueueRequest(); + $requestParamHeaders = []; + $request->setQueue($queue); + $requestParamHeaders['queue.name'] = $queue->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $response = $cloudTasksClient->getLocation(); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..1081b788279a --- /dev/null +++ b/owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json @@ -0,0 +1,108 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.tasks.v2", + "libraryPackage": "Google\\Cloud\\Tasks\\V2", + "services": { + "CloudTasks": { + "clients": { + "grpc": { + "libraryClient": "CloudTasksGapicClient", + "rpcs": { + "CreateQueue": { + "methods": [ + "createQueue" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "DeleteQueue": { + "methods": [ + "deleteQueue" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetQueue": { + "methods": [ + "getQueue" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "ListQueues": { + "methods": [ + "listQueues" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + }, + "PauseQueue": { + "methods": [ + "pauseQueue" + ] + }, + "PurgeQueue": { + "methods": [ + "purgeQueue" + ] + }, + "ResumeQueue": { + "methods": [ + "resumeQueue" + ] + }, + "RunTask": { + "methods": [ + "runTask" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateQueue": { + "methods": [ + "updateQueue" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json new file mode 100644 index 000000000000..8f9b26e3639f --- /dev/null +++ b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json @@ -0,0 +1,135 @@ +{ + "interfaces": { + "google.cloud.tasks.v2.CloudTasks": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + } + }, + "methods": { + "CreateQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteQueue": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTask": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetQueue": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTask": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListQueues": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTasks": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PauseQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PurgeQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResumeQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RunTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_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/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php new file mode 100644 index 000000000000..b0486c1dd561 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php @@ -0,0 +1,276 @@ + [ + 'google.cloud.tasks.v2.CloudTasks' => [ + 'CreateQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Queue', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Task', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Queue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Task', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListQueues' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getQueues', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\ListQueuesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\ListTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PauseQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Queue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'PurgeQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Queue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResumeQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Queue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RunTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Task', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateQueue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tasks\V2\Queue', + 'headerParams' => [ + [ + 'keyName' => 'queue.name', + 'fieldAccessors' => [ + 'getQueue', + 'getName', + ], + ], + ], + ], + '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' => [ + 'location' => 'projects/{project}/locations/{location}', + 'queue' => 'projects/{project}/locations/{location}/queues/{queue}', + 'task' => 'projects/{project}/locations/{location}/queues/{queue}/tasks/{task}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php new file mode 100644 index 000000000000..6ab177ae9a8f --- /dev/null +++ b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php @@ -0,0 +1,240 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.tasks.v2.CloudTasks' => [ + 'CreateQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/queues', + 'body' => 'queue', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/queues/*}/tasks', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteQueue' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTask' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetQueue' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListQueues' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/queues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/queues/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PauseQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}:pause', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'PurgeQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}:purge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResumeQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RunTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateQueue' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{queue.name=projects/*/locations/*/queues/*}', + 'body' => 'queue', + 'placeholders' => [ + 'queue.name' => [ + 'getters' => [ + 'getQueue', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php new file mode 100644 index 000000000000..71034c96e057 --- /dev/null +++ b/owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php @@ -0,0 +1,1316 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudTasksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudTasksClient($options); + } + + /** @test */ + public function createQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queue = new Queue(); + $request = (new CreateQueueRequest()) + ->setParent($formattedParent) + ->setQueue($queue); + $response = $gapicClient->createQueue($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.tasks.v2.CloudTasks/CreateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $queue = new Queue(); + $request = (new CreateQueueRequest()) + ->setParent($formattedParent) + ->setQueue($queue); + try { + $gapicClient->createQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + $request = (new CreateTaskRequest()) + ->setParent($formattedParent) + ->setTask($task); + $response = $gapicClient->createTask($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.tasks.v2.CloudTasks/CreateTask', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + $request = (new CreateTaskRequest()) + ->setParent($formattedParent) + ->setTask($task); + try { + $gapicClient->createTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new DeleteQueueRequest()) + ->setName($formattedName); + $gapicClient->deleteQueue($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new DeleteQueueRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $request = (new DeleteTaskRequest()) + ->setName($formattedName); + $gapicClient->deleteTask($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $request = (new DeleteTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new GetQueueRequest()) + ->setName($formattedName); + $response = $gapicClient->getQueue($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.tasks.v2.CloudTasks/GetQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new GetQueueRequest()) + ->setName($formattedName); + try { + $gapicClient->getQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->getTask($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.tasks.v2.CloudTasks/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->getTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $queuesElement = new Queue(); + $queues = [ + $queuesElement, + ]; + $expectedResponse = new ListQueuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setQueues($queues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListQueuesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listQueues($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListQueues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListQueuesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listQueues($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTasks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTasks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new PauseQueueRequest()) + ->setName($formattedName); + $response = $gapicClient->pauseQueue($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.tasks.v2.CloudTasks/PauseQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new PauseQueueRequest()) + ->setName($formattedName); + try { + $gapicClient->pauseQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new PurgeQueueRequest()) + ->setName($formattedName); + $response = $gapicClient->purgeQueue($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.tasks.v2.CloudTasks/PurgeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new PurgeQueueRequest()) + ->setName($formattedName); + try { + $gapicClient->purgeQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new ResumeQueueRequest()) + ->setName($formattedName); + $response = $gapicClient->resumeQueue($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.tasks.v2.CloudTasks/ResumeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $request = (new ResumeQueueRequest()) + ->setName($formattedName); + try { + $gapicClient->resumeQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $request = (new RunTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->runTask($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.tasks.v2.CloudTasks/RunTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $request = (new RunTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->runTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $queue = new Queue(); + $request = (new UpdateQueueRequest()) + ->setQueue($queue); + $response = $gapicClient->updateQueue($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.tasks.v2.CloudTasks/UpdateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $queue = new Queue(); + $request = (new UpdateQueueRequest()) + ->setQueue($queue); + try { + $gapicClient->updateQueue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createQueueAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queue = new Queue(); + $request = (new CreateQueueRequest()) + ->setParent($formattedParent) + ->setQueue($queue); + $response = $gapicClient->createQueueAsync($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.tasks.v2.CloudTasks/CreateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php new file mode 100644 index 000000000000..a662ec4fc05f --- /dev/null +++ b/owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php @@ -0,0 +1,1189 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudTasksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudTasksClient($options); + } + + /** @test */ + public function createQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queue = new Queue(); + $response = $gapicClient->createQueue($formattedParent, $queue); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/CreateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $queue = new Queue(); + try { + $gapicClient->createQueue($formattedParent, $queue); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + $response = $gapicClient->createTask($formattedParent, $task); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/CreateTask', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + try { + $gapicClient->createTask($formattedParent, $task); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $gapicClient->deleteQueue($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->deleteQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $gapicClient->deleteTask($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->deleteTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->getQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->getQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $response = $gapicClient->getTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->getTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $queuesElement = new Queue(); + $queues = [ + $queuesElement, + ]; + $expectedResponse = new ListQueuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setQueues($queues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listQueues($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListQueues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listQueues($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->listTasks($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->listTasks($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->pauseQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/PauseQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->pauseQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->purgeQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/PurgeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->purgeQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->resumeQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ResumeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->resumeQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $response = $gapicClient->runTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/RunTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->runTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $queue = new Queue(); + $response = $gapicClient->updateQueue($queue); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2.CloudTasks/UpdateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $queue = new Queue(); + try { + $gapicClient->updateQueue($queue); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Cloudtasks.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Cloudtasks.php new file mode 100644 index 0000000000000000000000000000000000000000..5545835cb278fdd74354758ff5bc761b75ac0dac GIT binary patch literal 8540 zcmc&)&2QYs70=3+8jTz)nkJ5{q7Kb`SXSgEw27T`Wx3``w(L5pRa-HVVuKBLcO)_9 zk_SSQS@H)k{*io&;|j500D{uJrqUJQ-K0SbK6r6IrSeX&{N+V&XC+ME_a>O zx=7%>dHlWKyw9O7f7ji2$#cpkvzccEtf|yLP=bA?xSkU@4aZXI;qET;l!nuCO^bO& zMcKHmeE;^2a&6=0&RN*%JE7NLWo6HC_AI6~EGKMgf#KixwS!Wf1x6`)#vc{AUP5f6 z#eCOjFlBSQvIRm-BQUC)Tt#&qRaAFSMfF~(f+|)CX;_BuD}0TsA`gfHKWQS}EQ3t9db_fvs>nP0p$IfQ`3uzt|dyqImC)2}vO^T5f;HJR&b#F-838&1M{K z*C916#sPxia*llV8hL4ioJ1EQ;bH@`Pch0?B7rSDBNQ2~3CRqjB}!xq&!!f3F(hhr z5feh-bV^`fIDVfcPk6UjdQt4+Sh|wwd+5SK?u86Fv_OcR5n`s%(hgQM_*HYcH;Q#( zIxgUP$C}*hiu|WFg)&Buz8}z6$&_n&a1QeYrLZ_%sh;~npZKqSmOjfVi%u^>2506Mp?qmv13gKmc1;UX z`1}O!q;q82HTGD|hk7x83?5BVN(g@xIQN-7f1Hbz$h60dW(}dwPr{>_(n2wMK?D>^ zLos&#%CRr>g8B}jY2>~OnVHcQGR2S32k6H@%~`3YkK+|1%+HWno4p^@Qm8n1^~Yp( zlSR}>W-gNBSX{e!AwzlTFc7upFz}}ZLf3(ofN`7>!uW@CkxX)K_}S#428o^k8t5A? zbP$~|VrA$exs_3k%!FK7bk;+uP;U{s!7SGE_OZ@E{T`Xy4!yl@Q^r?jg#K5f4D5s= z9Jan1Z6-POhHE)Sle^AaM$3}!^Gz~kxNgmC3LnNJrpsg+(`OAE2jLx0$-sdKFJesd&$ded|Sh?d2a;YnWyvP%XLeC6NAh@4iCQm@J=Am3WFxepo zbF%b;1k*2yabxiw2zO>1%q-p622;zl`gWA_1YnUkG%^{W1tM=K!`?^-rVWVOlaM!1 zy(ImWjYpLCN9iMtWZZ*!nH)!YgmVmKhi8u7)5Hpp_cYa;WG;&QH2$%e zRKLVB#|)pLs)u$`C~7U^{TlM&b3!KRC34b2{WV#?d9j-*otADSD{xUZjsqA%ug%L) zs@g`5eGN)t%E~c4Tm4yqoYEWjZRgNp%{|W9!#VOL@`T^mXU))JHS9oy7xk9-xJQjD z&wt?9?!fGP$gO%L7#_{Zs(-=SZ@|=SJwnralJQ94i)rvqXg_rD_GS@m8uG?S=?~u~ zWF3bN9{Ti?0wGD;NH56v>{nP4IpKN>#k}HC=&4uRy6B{T^7)s)m{_4&d~5R{>af=! zF}%wffv+uTmeYtX7__A$jdyB3{jfkDmrW>rDeLu8N@5+}`KnjiI`4dX!C{j-0GdDs z7%7zgnN){LGwDeQjsS71t)GaPTIP&!sIRG`@>q^KU-~CNoN8vX5vK%4K>TJ~pW{%M zQ;jZ%eWi3UIesou%*C?=|4RU$>V>nxrvxSVQ__9nV#Mzuy4+wX#ceKl^!E@`Nmrd6 zQ;D2JmBUXr(|%f3Q!M5JSaz}HFBg^~q;bnW1Zgby|3r!}MWi3YS*PZK?6Xb@j)3(> zn$=bHQsSHWScOI%#uWrxBePx81}#Zn>z7!&geB%d{`naFO@W+%{05hH(S;pVrFytj zDITm8(~DBw(_J#rR`p(6e;lCmdvzX`*VL2hUg^1}=17!Q*05n#NVde(z6y*LEp z+iiVTB3X_uj2;H6pMr%@KZovO2QGRLKl56q@8h*LUF;&PS46@-pF>iV!2P!VRANf< zHg3-?_4+u}2R+!)s?Q2!IvzynvV_>r0b?;~(9k|W3=YC52%U6Y{|f-gIFXZx2W6p7K9^DeN8|G!*n!4VS~j{wPNK_fvC`tgQ{QRp zPYZUfjscbPTv6A?blfu6hHU?}KxVt9#q8|gB`hr)#CxNyQ)GC#V}#`JZ>Z}D{E<$f zY$Wq78u3p!lw{J(K9odGLLVNC@3r-_y+$neIg(AaGOkTb_bCX z%x~1!b25ztGn(-`NRVQT%ubM+kw$UTZLm`689e z&m;fRi+E$|mo@G1@UUx9Gs0j$`iy_UwTxib@mdw|$TRR=C8H!%X4m7nb{oGRZ5MvH z9#uQ>=>)&a>^Z4_5YPZm@4pSW_0LF@Ir=o8`jS8JD?XQuzP2BcBSQWMe~4+= literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php new file mode 100644 index 000000000000..e407dce1a21c --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + ' +Ê ++google/cloud/tasks/v2beta2/old_target.protogoogle.cloud.tasks.v2beta2Bw +com.google.cloud.tasks.v2beta2BOldTargetProtoPZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Queue.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Queue.php new file mode 100644 index 0000000000000000000000000000000000000000..2bcab1231d847ca2cc6823db1ba869ce269cec23 GIT binary patch literal 2576 zcmbVOVNcse7;Z{K=^H@QT9M1Ta${XdwauO~tslbJl#oCpb&x`sw8@g?*q3m_v9Ie#PFqvqLtrfQA%d`<~~0@80)$?(UoK_!);!$N`OL;t3j%{v{D- zl<*`Lu^)$|pA7~yA$~mKEToA=Nb86k9`#7O)#-hV)HKc#pVrARj)x(&{V>h~TX^Yt zYG2g)RCqP}ZALR{sgMAXH=-%`d`b?w&F^tM@Py|aD7LdF*-lTgogZpV$=(6*LoZFq z8yN-O1HnI@^+V>9RCogaJ!7fMA|{v@vR`lwyJX;nDMjXW>>!JL!QzNW!cpYY>I7{^WNQ> zHKRS)tORRt`^=M)wlY*4cH)0fdki%syb+(xRbBkzTbB2%5d@PK?W2gRlcLHJZ^Q2^ z@cee_H8wQPQYyEU%B@`G8;|oC9%puvmsX2@!`Yq_U#J4+$fr3_nFWPs2YHq9@y&ma zi=q@7u=U#_l$BGAWwmKJWjfO0u?wJtW)rrjo9Iw=DOGloyG^@dR zTM=I&PdEJ49b*?NJPX4j&OH_9`Mfw?giq6_r}6M+`aiPoKt=9YZpcPVq-ObM`Z2;^ zD>P1h8LgIFx_%rD*w9>5Y-fAk$TsWMlH(0riKkFTK%BN<=9iik)3RK(a~$$*;}b-j+%TvN!o z%~Q*et4Ny*e>4`h+ECVOdIS$odW~M&Jv}_>w)Z;wopx*Oj!}X8$ESyfox_8*k^!*T zZJeIqz+DvPQmb>)Xuig`g}USX)%X!Mm7}zwv=GrosfEXmt=0Szi}N$}MQXp#pT>3= z`)UWlZ^h$SA2#^qtvoKq%@wF0~m1)_m!?Hws zLeLRM(MoHU(MeCh$RZ_V%sm;E8J2MLYcM2B3%1w~a@)>Pg9Vili`>5FpT~oNsqJ|K zUM?}mYeUV!KY|rGtss_XaWqVoiOS7YSdOyMWEER~mH@7#W0Mh_Hss4IW){?7DEe^G54Uu{oLwa@j%V(K0u_bTSkxPvI9 KzA21h4DdHY0Ydfw literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Target.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Target.php new file mode 100644 index 0000000000000000000000000000000000000000..ebd1a9fff9ae2f8e4d134e88d0f56c536425c5a9 GIT binary patch literal 3089 zcmc&$-EP}96t3;Wu8*BeRkJQ@w?Xro#o1a1@K#`Onil?1VgpU&#!B}C0|G5GHc?sB zC@O$E^nP!!_t-P+L3XiM*!@URRh+i*TI^!EvB;d??|kR*JbWBX1Ng!?#6D(-KUWx>&{kc#LX~bOIFea2vJiP0AG#c-6 z6h04k&+8-1QC*za1oK*K6Tn9^90th6#$ms8Bm~BYqv2t!K5R?%p)J*i&+09yz6aoX zC=3ldHUqzaA^w7BCvhvyku#&J zVr(?t2y)-xEW(T44TE7GF@Gh^kgoAJXGC{C*RL+wWLU{k9UU#f7iMg|8)ruap7$k>{zxRlbIjJRRXM zL=&uk0EGa}J&MMg86#6I>m|r>G}+9GL$NZ2o6R6F{R#1Lm-9f`(4WE`6a)^A?;S=X zPW*{O&oN_UjAKKk`n}rKG1XG5CrY{UM;12HOX=za{~Y0v>w8d|ilZ~bd`eZ2>-8^} z*_PUZ(L!49g8pWpac=J!pS}TQhCM;^bL>RS+ssLP^kXPYF&bkQZmt-)YN@`zEU>rb zSL-T$)8}lySdCR#joURSUlI`2d5-5X!bN=zR?m?aVO6X~_Pb2Q1}*iHKr4-gn4J?> zRi-E}M5#j2eM(c;;5zX|gNQav5-Y>Xl!jbnC283L^~gAZ!HVU64HtC`&O-W3pQk^l#v&LVbpgNsVbj9xsUkNN*YTS83y94fUj)9 z+S3TLdHQd`QPDGO?gWUTS(u3ZwgRP7MpCIZqQpvim*B>pjwur#Ox2en=2`iNckXP8~w?H4XyXKMUoE{JQX1jOL zGdtQf{W`34ZM&~!^dhXvuYs1WjNsPW4eC3vb$ZfstY_xQNv~r%=JA1b(l(tVOB^m+ zz5#2!14pa^j`>4xU=M@~fPC}G_st)Lk5&;1j;eO60IQDd>G(rds`6J3Kz36y)%T&i zh*V6UQhm7nj_CZi8DN2?NS{_J6ikvM^}#a#7vU$fAf@^L+5dMTuco$qO|P2Qw=Gy# zQVTKX6$lCT_unh^E5}F!;9|DvpTdX9bKoG?rIF7aJVPWI=kierT^b~hO64IG)5-R4 zs^S?z(U@TQjKqWCt56Xvd5!PDN0R%_k!g3W&TB*#Ez-9Jw%~68a)+j^W#g_fn;k7D zullF9wj#ORF`t;WsjbRZ>No9nSIY~S3s&FmS;qsd(Bkl!Sd^DQ*D5K-$6IAT^HW=G zO|RA!I@_I4wL+^68U^Il5*kp+hx0}js&I6QB(4R{YB8WW|k`HC(PhD&6F zm{Y7Y(QtdlRm2mnIf?lnaDsh2BC%osycs*n5~_KcU;{W#D68*c$7y1pi4;z}kBfBr zMg$Nb>?NAXgv8+iQ&e)HQ`v{mW^>GRDV_OJ-_5r*bbN&CF2`o`Mw0tj%Z$zMjT<@Rn3_z*-LWTvhNn=t zOfAOP8hraB&lPVCho!)WV8D7Qi4kZA{fW@?J2}tWa$&wTsBaDG=LX#hcb0M(b)0{< zKFT+3zS4h+|Gc!4$)ov>jRv&e{4Td@>dMGl36erX~vK z3NG`fSrDfbdRv;nx8iXYfGfZk!KJ;=@*aC>h-d9bP;qh*r(_uE3&FPkt{^mb;HT&_ zqBWZe9Su3OUri?wO|wK>7p{17>k`^CY|QfY`ykPZcZ42~xKuhSSaR8&MR%78*mC>k z${(Unp_|{}aR$9R&-Pyxv~ivJhTqKpwcc3fH-MCCSc{s&-U=xNvJj`hvR%GLpOlbX zHg{aFkPUi;@APR)uuD2E78cmJy=KbVH4Gt4Bi+QAp&3H|0e@Y)`2YX_ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php new file mode 100644 index 000000000000..5bc989f652e1 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php @@ -0,0 +1,132 @@ +google.cloud.tasks.v2beta2.AcknowledgeTaskRequest + */ +class AcknowledgeTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schedule_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type \Google\Protobuf\Timestamp $schedule_time + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php new file mode 100644 index 000000000000..b6c1deb04396 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php @@ -0,0 +1,484 @@ +google.cloud.tasks.v2beta2.AppEngineHttpRequest + */ +class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + protected $http_method = 0; + /** + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + protected $app_engine_routing = null; + /** + * The relative URL. + * The relative URL must begin with "/" and must be a valid HTTP relative URL. + * It can contain a path and query string arguments. + * If the relative URL is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_url = 3; + */ + protected $relative_url = ''; + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + * Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * documentation. + * + * Generated from protobuf field map headers = 4; + */ + private $headers; + /** + * Payload. + * The payload will be sent as the HTTP message body. A message + * body, and thus a payload, is allowed only if the HTTP method is + * POST or PUT. It is an error to set a data payload on a task with + * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * + * Generated from protobuf field bytes payload = 5; + */ + protected $payload = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $http_method + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * @type \Google\Cloud\Tasks\V2beta2\AppEngineRouting $app_engine_routing + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * @type string $relative_url + * The relative URL. + * The relative URL must begin with "/" and must be a valid HTTP relative URL. + * It can contain a path and query string arguments. + * If the relative URL is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * @type array|\Google\Protobuf\Internal\MapField $headers + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + * Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * documentation. + * @type string $payload + * Payload. + * The payload will be sent as the HTTP message body. A message + * body, and thus a payload, is allowed only if the HTTP method is + * POST or PUT. It is an error to set a data payload on a task with + * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + * @return \Google\Cloud\Tasks\V2beta2\AppEngineRouting|null + */ + public function getAppEngineRouting() + { + return $this->app_engine_routing; + } + + public function hasAppEngineRouting() + { + return isset($this->app_engine_routing); + } + + public function clearAppEngineRouting() + { + unset($this->app_engine_routing); + } + + /** + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + * @param \Google\Cloud\Tasks\V2beta2\AppEngineRouting $var + * @return $this + */ + public function setAppEngineRouting($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineRouting::class); + $this->app_engine_routing = $var; + + return $this; + } + + /** + * The relative URL. + * The relative URL must begin with "/" and must be a valid HTTP relative URL. + * It can contain a path and query string arguments. + * If the relative URL is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_url = 3; + * @return string + */ + public function getRelativeUrl() + { + return $this->relative_url; + } + + /** + * The relative URL. + * The relative URL must begin with "/" and must be a valid HTTP relative URL. + * It can contain a path and query string arguments. + * If the relative URL is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_url = 3; + * @param string $var + * @return $this + */ + public function setRelativeUrl($var) + { + GPBUtil::checkString($var, True); + $this->relative_url = $var; + + return $this; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + * Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * documentation. + * + * Generated from protobuf field map headers = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + * Tasks sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * documentation. + * + * Generated from protobuf field map headers = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * Payload. + * The payload will be sent as the HTTP message body. A message + * body, and thus a payload, is allowed only if the HTTP method is + * POST or PUT. It is an error to set a data payload on a task with + * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * + * Generated from protobuf field bytes payload = 5; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * Payload. + * The payload will be sent as the HTTP message body. A message + * body, and thus a payload, is allowed only if the HTTP method is + * POST or PUT. It is an error to set a data payload on a task with + * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * + * Generated from protobuf field bytes payload = 5; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php new file mode 100644 index 000000000000..17f72796c02a --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php @@ -0,0 +1,114 @@ +google.cloud.tasks.v2beta2.AppEngineHttpTarget + */ +class AppEngineHttpTarget extends \Google\Protobuf\Internal\Message +{ + /** + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + protected $app_engine_routing_override = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta2\AppEngineRouting $app_engine_routing_override + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + * @return \Google\Cloud\Tasks\V2beta2\AppEngineRouting|null + */ + public function getAppEngineRoutingOverride() + { + return $this->app_engine_routing_override; + } + + public function hasAppEngineRoutingOverride() + { + return isset($this->app_engine_routing_override); + } + + public function clearAppEngineRoutingOverride() + { + unset($this->app_engine_routing_override); + } + + /** + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + * @param \Google\Cloud\Tasks\V2beta2\AppEngineRouting $var + * @return $this + */ + public function setAppEngineRoutingOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineRouting::class); + $this->app_engine_routing_override = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php new file mode 100644 index 000000000000..cb35bc64c659 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php @@ -0,0 +1,536 @@ +google.cloud.tasks.v2beta2.AppEngineRouting + */ +class AppEngineRouting extends \Google\Protobuf\Internal\Message +{ + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string service = 1; + */ + protected $service = ''; + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + */ + protected $instance = ''; + /** + * Output only. The host that the task is sent to. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * The host is constructed as: + * * `host = [application_domain_name]`
+ * `| [service] + '.' + [application_domain_name]`
+ * `| [version] + '.' + [application_domain_name]`
+ * `| [version_dot_service]+ '.' + [application_domain_name]`
+ * `| [instance] + '.' + [application_domain_name]`
+ * `| [instance_dot_service] + '.' + [application_domain_name]`
+ * `| [instance_dot_version] + '.' + [application_domain_name]`
+ * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + * * `application_domain_name` = The domain name of the app, for + * example .appspot.com, which is associated with the + * queue's project ID. Some tasks which were created using the App Engine + * SDK use a custom domain name. + * * `service =` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `version_dot_service =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + * * `instance_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance_dot_version =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `instance_dot_version_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, + * then the task will be sent to the service which is the default service when + * the task is attempted. + * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, + * then the task will be sent to the version which is the default version when + * the task is attempted. + * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * empty, then the task will be sent to an instance which is available when + * the task is attempted. + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * invalid, then the task will be sent to the default version of the default + * service when the task is attempted. + * + * Generated from protobuf field string host = 4; + */ + protected $host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * @type string $version + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * @type string $instance + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * @type string $host + * Output only. The host that the task is sent to. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * The host is constructed as: + * * `host = [application_domain_name]`
+ * `| [service] + '.' + [application_domain_name]`
+ * `| [version] + '.' + [application_domain_name]`
+ * `| [version_dot_service]+ '.' + [application_domain_name]`
+ * `| [instance] + '.' + [application_domain_name]`
+ * `| [instance_dot_service] + '.' + [application_domain_name]`
+ * `| [instance_dot_version] + '.' + [application_domain_name]`
+ * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + * * `application_domain_name` = The domain name of the app, for + * example .appspot.com, which is associated with the + * queue's project ID. Some tasks which were created using the App Engine + * SDK use a custom domain name. + * * `service =` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `version_dot_service =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + * * `instance_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance_dot_version =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `instance_dot_version_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, + * then the task will be sent to the service which is the default service when + * the task is attempted. + * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, + * then the task will be sent to the version which is the default version when + * the task is attempted. + * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * empty, then the task will be sent to an instance which is available when + * the task is attempted. + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * invalid, then the task will be sent to the default version of the default + * service when the task is attempted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string service = 1; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string service = 1; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Output only. The host that the task is sent to. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * The host is constructed as: + * * `host = [application_domain_name]`
+ * `| [service] + '.' + [application_domain_name]`
+ * `| [version] + '.' + [application_domain_name]`
+ * `| [version_dot_service]+ '.' + [application_domain_name]`
+ * `| [instance] + '.' + [application_domain_name]`
+ * `| [instance_dot_service] + '.' + [application_domain_name]`
+ * `| [instance_dot_version] + '.' + [application_domain_name]`
+ * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + * * `application_domain_name` = The domain name of the app, for + * example .appspot.com, which is associated with the + * queue's project ID. Some tasks which were created using the App Engine + * SDK use a custom domain name. + * * `service =` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `version_dot_service =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + * * `instance_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance_dot_version =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `instance_dot_version_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, + * then the task will be sent to the service which is the default service when + * the task is attempted. + * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, + * then the task will be sent to the version which is the default version when + * the task is attempted. + * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * empty, then the task will be sent to an instance which is available when + * the task is attempted. + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * invalid, then the task will be sent to the default version of the default + * service when the task is attempted. + * + * Generated from protobuf field string host = 4; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Output only. The host that the task is sent to. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * The host is constructed as: + * * `host = [application_domain_name]`
+ * `| [service] + '.' + [application_domain_name]`
+ * `| [version] + '.' + [application_domain_name]`
+ * `| [version_dot_service]+ '.' + [application_domain_name]`
+ * `| [instance] + '.' + [application_domain_name]`
+ * `| [instance_dot_service] + '.' + [application_domain_name]`
+ * `| [instance_dot_version] + '.' + [application_domain_name]`
+ * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + * * `application_domain_name` = The domain name of the app, for + * example .appspot.com, which is associated with the + * queue's project ID. Some tasks which were created using the App Engine + * SDK use a custom domain name. + * * `service =` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `version =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `version_dot_service =` + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + * * `instance_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * * `instance_dot_version =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + * * `instance_dot_version_dot_service =` + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' + * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' + * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, + * then the task will be sent to the service which is the default service when + * the task is attempted. + * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, + * then the task will be sent to the version which is the default version when + * the task is attempted. + * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * empty, then the task will be sent to an instance which is available when + * the task is attempted. + * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is + * invalid, then the task will be sent to the default version of the default + * service when the task is attempted. + * + * Generated from protobuf field string host = 4; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php new file mode 100644 index 000000000000..f249c75a16f2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php @@ -0,0 +1,229 @@ +google.cloud.tasks.v2beta2.AttemptStatus + */ +class AttemptStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + */ + protected $schedule_time = null; + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + */ + protected $dispatch_time = null; + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + */ + protected $response_time = null; + /** + * Output only. The response from the target for this attempt. + * If the task has not been attempted or the task is currently running + * then the response status is unset. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + */ + protected $response_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $schedule_time + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $dispatch_time + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $response_time + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * @type \Google\Rpc\Status $response_status + * Output only. The response from the target for this attempt. + * If the task has not been attempted or the task is currently running + * then the response status is unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDispatchTime() + { + return $this->dispatch_time; + } + + public function hasDispatchTime() + { + return isset($this->dispatch_time); + } + + public function clearDispatchTime() + { + unset($this->dispatch_time); + } + + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDispatchTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->dispatch_time = $var; + + return $this; + } + + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getResponseTime() + { + return $this->response_time; + } + + public function hasResponseTime() + { + return isset($this->response_time); + } + + public function clearResponseTime() + { + unset($this->response_time); + } + + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setResponseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->response_time = $var; + + return $this; + } + + /** + * Output only. The response from the target for this attempt. + * If the task has not been attempted or the task is currently running + * then the response status is unset. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + * @return \Google\Rpc\Status|null + */ + public function getResponseStatus() + { + return $this->response_status; + } + + public function hasResponseStatus() + { + return isset($this->response_status); + } + + public function clearResponseStatus() + { + unset($this->response_status); + } + + /** + * Output only. The response from the target for this attempt. + * If the task has not been attempted or the task is currently running + * then the response status is unset. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setResponseStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->response_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php new file mode 100644 index 000000000000..a07ba30cb995 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php @@ -0,0 +1,206 @@ +google.cloud.tasks.v2beta2.CancelLeaseRequest + */ +class CancelLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schedule_time = null; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type \Google\Protobuf\Timestamp $schedule_time + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php new file mode 100644 index 000000000000..0eeb5944f56e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php @@ -0,0 +1,136 @@ +google.cloud.tasks.v2beta2.CreateQueueRequest + */ +class CreateQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + * an existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $queue = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @type \Google\Cloud\Tasks\V2beta2\Queue $queue + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + * an existing queue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * 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 name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * 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 queue to create. + * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + * an existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2beta2\Queue|null + */ + public function getQueue() + { + return $this->queue; + } + + public function hasQueue() + { + return isset($this->queue); + } + + public function clearQueue() + { + unset($this->queue); + } + + /** + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + * an existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2beta2\Queue $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\Queue::class); + $this->queue = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php new file mode 100644 index 000000000000..ccf05e0c56db --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php @@ -0,0 +1,302 @@ +google.cloud.tasks.v2beta2.CreateTaskRequest + */ +class CreateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or completed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or completed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or completed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @type \Google\Cloud\Tasks\V2beta2\Task $task + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or completed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or completed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or completed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * 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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * 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 task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or completed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or completed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or completed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2beta2\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or completed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or completed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or completed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2beta2\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\Task::class); + $this->task = $var; + + return $this; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php new file mode 100644 index 000000000000..204cb50c0a33 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta2.DeleteQueueRequest + */ +class DeleteQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php new file mode 100644 index 000000000000..90e1ae6db930 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta2.DeleteTaskRequest + */ +class DeleteTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php new file mode 100644 index 000000000000..06c2a0ecd5ce --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php @@ -0,0 +1,128 @@ +google.cloud.tasks.v2beta2.GetQueueRequest + */ +class GetQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php new file mode 100644 index 000000000000..e1c29520dd88 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php @@ -0,0 +1,146 @@ +google.cloud.tasks.v2beta2.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php new file mode 100644 index 000000000000..b70a89dc91d7 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php @@ -0,0 +1,96 @@ +google.cloud.tasks.v2beta2.HttpMethod + */ +class HttpMethod +{ + /** + * HTTP method unspecified + * + * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; + */ + const HTTP_METHOD_UNSPECIFIED = 0; + /** + * HTTP POST + * + * Generated from protobuf enum POST = 1; + */ + const POST = 1; + /** + * HTTP GET + * + * Generated from protobuf enum GET = 2; + */ + const GET = 2; + /** + * HTTP HEAD + * + * Generated from protobuf enum HEAD = 3; + */ + const HEAD = 3; + /** + * HTTP PUT + * + * Generated from protobuf enum PUT = 4; + */ + const PUT = 4; + /** + * HTTP DELETE + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * HTTP PATCH + * + * Generated from protobuf enum PATCH = 6; + */ + const PATCH = 6; + /** + * HTTP OPTIONS + * + * Generated from protobuf enum OPTIONS = 7; + */ + const OPTIONS = 7; + + private static $valueToName = [ + self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', + self::POST => 'POST', + self::GET => 'GET', + self::HEAD => 'HEAD', + self::PUT => 'PUT', + self::DELETE => 'DELETE', + self::PATCH => 'PATCH', + self::OPTIONS => 'OPTIONS', + ]; + + 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php new file mode 100644 index 000000000000..28eb2b523d6d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php @@ -0,0 +1,416 @@ +google.cloud.tasks.v2beta2.HttpRequest + */ +class HttpRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url = ''; + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + */ + protected $http_method = 0; + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + */ + private $headers; + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + */ + protected $body = ''; + protected $authorization_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * @type int $http_method + * The HTTP method to use for the request. The default is POST. + * @type array|\Google\Protobuf\Internal\MapField $headers + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * @type string $body + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * @type \Google\Cloud\Tasks\V2beta2\OAuthToken $oauth_token + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * @type \Google\Cloud\Tasks\V2beta2\OidcToken $oidc_token + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * @return \Google\Cloud\Tasks\V2beta2\OAuthToken|null + */ + public function getOauthToken() + { + return $this->readOneof(5); + } + + public function hasOauthToken() + { + return $this->hasOneof(5); + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * @param \Google\Cloud\Tasks\V2beta2\OAuthToken $var + * @return $this + */ + public function setOauthToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OAuthToken::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * @return \Google\Cloud\Tasks\V2beta2\OidcToken|null + */ + public function getOidcToken() + { + return $this->readOneof(6); + } + + public function hasOidcToken() + { + return $this->hasOneof(6); + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * @param \Google\Cloud\Tasks\V2beta2\OidcToken $var + * @return $this + */ + public function setOidcToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OidcToken::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthorizationHeader() + { + return $this->whichOneof("authorization_header"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php new file mode 100644 index 000000000000..7b156261f564 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php @@ -0,0 +1,375 @@ +google.cloud.tasks.v2beta2.HttpTarget + */ +class HttpTarget extends \Google\Protobuf\Internal\Message +{ + /** + * Uri override. + * When specified, overrides the execution Uri for all the tasks in the queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + */ + protected $uri_override = null; + /** + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + */ + protected $http_method = 0; + /** + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-CloudTasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + */ + private $header_overrides; + protected $authorization_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta2\UriOverride $uri_override + * Uri override. + * When specified, overrides the execution Uri for all the tasks in the queue. + * @type int $http_method + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * @type array<\Google\Cloud\Tasks\V2beta2\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $header_overrides + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-CloudTasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * @type \Google\Cloud\Tasks\V2beta2\OAuthToken $oauth_token + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * @type \Google\Cloud\Tasks\V2beta2\OidcToken $oidc_token + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * Uri override. + * When specified, overrides the execution Uri for all the tasks in the queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * @return \Google\Cloud\Tasks\V2beta2\UriOverride|null + */ + public function getUriOverride() + { + return $this->uri_override; + } + + public function hasUriOverride() + { + return isset($this->uri_override); + } + + public function clearUriOverride() + { + unset($this->uri_override); + } + + /** + * Uri override. + * When specified, overrides the execution Uri for all the tasks in the queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; + * @param \Google\Cloud\Tasks\V2beta2\UriOverride $var + * @return $this + */ + public function setUriOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\UriOverride::class); + $this->uri_override = $var; + + return $this; + } + + /** + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-CloudTasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaderOverrides() + { + return $this->header_overrides; + } + + /** + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-CloudTasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; + * @param array<\Google\Cloud\Tasks\V2beta2\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaderOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\HttpTarget\HeaderOverride::class); + $this->header_overrides = $arr; + + return $this; + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * @return \Google\Cloud\Tasks\V2beta2\OAuthToken|null + */ + public function getOauthToken() + { + return $this->readOneof(5); + } + + public function hasOauthToken() + { + return $this->hasOneof(5); + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; + * @param \Google\Cloud\Tasks\V2beta2\OAuthToken $var + * @return $this + */ + public function setOauthToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OAuthToken::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * @return \Google\Cloud\Tasks\V2beta2\OidcToken|null + */ + public function getOidcToken() + { + return $this->readOneof(6); + } + + public function hasOidcToken() + { + return $this->hasOneof(6); + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; + * @param \Google\Cloud\Tasks\V2beta2\OidcToken $var + * @return $this + */ + public function setOidcToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OidcToken::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthorizationHeader() + { + return $this->whichOneof("authorization_header"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php new file mode 100644 index 000000000000..9ef84f7b4c64 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php @@ -0,0 +1,104 @@ +google.cloud.tasks.v2beta2.HttpTarget.Header + */ +class Header extends \Google\Protobuf\Internal\Message +{ + /** + * The key of the header. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the header. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The key of the header. + * @type string $value + * The value of the header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * The key of the header. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The key of the header. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the header. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the header. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Header::class, \Google\Cloud\Tasks\V2beta2\HttpTarget_Header::class); + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php new file mode 100644 index 000000000000..1581e46bffbb --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php @@ -0,0 +1,80 @@ +google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride + */ +class HeaderOverride extends \Google\Protobuf\Internal\Message +{ + /** + * header embodying a key and a value. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + */ + protected $header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta2\HttpTarget\Header $header + * header embodying a key and a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * header embodying a key and a value. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * @return \Google\Cloud\Tasks\V2beta2\HttpTarget\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * header embodying a key and a value. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; + * @param \Google\Cloud\Tasks\V2beta2\HttpTarget\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\HttpTarget\Header::class); + $this->header = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HeaderOverride::class, \Google\Cloud\Tasks\V2beta2\HttpTarget_HeaderOverride::class); + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php new file mode 100644 index 000000000000..2d91df19985e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php @@ -0,0 +1,442 @@ +google.cloud.tasks.v2beta2.LeaseTasksRequest + */ +class LeaseTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of tasks to lease. + * The system will make a best effort to return as close to as + * `max_tasks` as possible. + * The largest that `max_tasks` can be is 1000. + * The maximum total size of a [lease tasks + * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. + * + * Generated from protobuf field int32 max_tasks = 2; + */ + protected $max_tasks = 0; + /** + * Required. The duration of the lease. + * Each task returned in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the + * current time plus the `lease_duration`. The task is leased until its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the + * task will not be returned to another + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before + * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * After the worker has successfully finished the work associated + * with the task, the worker must call via + * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * Otherwise the task will be returned to a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that + * another worker can retry it. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lease_duration = null; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + protected $response_view = 0; + /** + * `filter` can be used to specify a subset of tasks to lease. + * When `filter` is set to `tag=` then the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only + * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to + * ``. `` must be less than 500 characters. + * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + * the same tag as the task with the oldest + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + * returned. + * Grammar Syntax: + * * `filter = "tag=" tag | "tag_function=" function` + * * `tag = string` + * * `function = "oldest_tag()"` + * The `oldest_tag()` function returns tasks which have the same tag as the + * oldest task (ordered by schedule time). + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + * aren't UTF-8 encoded can't be used in the + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the + * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed + * as empty in Cloud Tasks. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @type int $max_tasks + * The maximum number of tasks to lease. + * The system will make a best effort to return as close to as + * `max_tasks` as possible. + * The largest that `max_tasks` can be is 1000. + * The maximum total size of a [lease tasks + * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. + * @type \Google\Protobuf\Duration $lease_duration + * Required. The duration of the lease. + * Each task returned in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the + * current time plus the `lease_duration`. The task is leased until its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the + * task will not be returned to another + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before + * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * After the worker has successfully finished the work associated + * with the task, the worker must call via + * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * Otherwise the task will be returned to a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that + * another worker can retry it. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * @type string $filter + * `filter` can be used to specify a subset of tasks to lease. + * When `filter` is set to `tag=` then the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only + * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to + * ``. `` must be less than 500 characters. + * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + * the same tag as the task with the oldest + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + * returned. + * Grammar Syntax: + * * `filter = "tag=" tag | "tag_function=" function` + * * `tag = string` + * * `function = "oldest_tag()"` + * The `oldest_tag()` function returns tasks which have the same tag as the + * oldest task (ordered by schedule time). + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + * aren't UTF-8 encoded can't be used in the + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the + * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed + * as empty in Cloud Tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 tasks to lease. + * The system will make a best effort to return as close to as + * `max_tasks` as possible. + * The largest that `max_tasks` can be is 1000. + * The maximum total size of a [lease tasks + * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. + * + * Generated from protobuf field int32 max_tasks = 2; + * @return int + */ + public function getMaxTasks() + { + return $this->max_tasks; + } + + /** + * The maximum number of tasks to lease. + * The system will make a best effort to return as close to as + * `max_tasks` as possible. + * The largest that `max_tasks` can be is 1000. + * The maximum total size of a [lease tasks + * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. + * + * Generated from protobuf field int32 max_tasks = 2; + * @param int $var + * @return $this + */ + public function setMaxTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_tasks = $var; + + return $this; + } + + /** + * Required. The duration of the lease. + * Each task returned in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the + * current time plus the `lease_duration`. The task is leased until its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the + * task will not be returned to another + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before + * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * After the worker has successfully finished the work associated + * with the task, the worker must call via + * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * Otherwise the task will be returned to a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that + * another worker can retry it. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getLeaseDuration() + { + return $this->lease_duration; + } + + public function hasLeaseDuration() + { + return isset($this->lease_duration); + } + + public function clearLeaseDuration() + { + unset($this->lease_duration); + } + + /** + * Required. The duration of the lease. + * Each task returned in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the + * current time plus the `lease_duration`. The task is leased until its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the + * task will not be returned to another + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before + * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * After the worker has successfully finished the work associated + * with the task, the worker must call via + * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * Otherwise the task will be returned to a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that + * another worker can retry it. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLeaseDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lease_duration = $var; + + return $this; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + + /** + * `filter` can be used to specify a subset of tasks to lease. + * When `filter` is set to `tag=` then the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only + * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to + * ``. `` must be less than 500 characters. + * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + * the same tag as the task with the oldest + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + * returned. + * Grammar Syntax: + * * `filter = "tag=" tag | "tag_function=" function` + * * `tag = string` + * * `function = "oldest_tag()"` + * The `oldest_tag()` function returns tasks which have the same tag as the + * oldest task (ordered by schedule time). + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + * aren't UTF-8 encoded can't be used in the + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the + * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed + * as empty in Cloud Tasks. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * `filter` can be used to specify a subset of tasks to lease. + * When `filter` is set to `tag=` then the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only + * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to + * ``. `` must be less than 500 characters. + * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + * the same tag as the task with the oldest + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + * returned. + * Grammar Syntax: + * * `filter = "tag=" tag | "tag_function=" function` + * * `tag = string` + * * `function = "oldest_tag()"` + * The `oldest_tag()` function returns tasks which have the same tag as the + * oldest task (ordered by schedule time). + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + * aren't UTF-8 encoded can't be used in the + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the + * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed + * as empty in Cloud Tasks. + * + * 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php new file mode 100644 index 000000000000..fabd60efa760 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php @@ -0,0 +1,68 @@ +google.cloud.tasks.v2beta2.LeaseTasksResponse + */ +class LeaseTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The leased tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + private $tasks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The leased tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The leased tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The leased tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + * @param array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\Task::class); + $this->tasks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php new file mode 100644 index 000000000000..4122c329b917 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php @@ -0,0 +1,310 @@ +google.cloud.tasks.v2beta2.ListQueuesRequest + */ +class ListQueuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "app_engine_http_target: *". + * Note that using filters might cause fewer queues than the + * requested_page size to be returned. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while + * iterating through pages. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @type string $filter + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "app_engine_http_target: *". + * Note that using filters might cause fewer queues than the + * requested_page size to be returned. + * @type int $page_size + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * @type string $page_token + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while + * iterating through pages. + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_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 location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_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; + } + + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "app_engine_http_target: *". + * Note that using filters might cause fewer queues than the + * requested_page size to be returned. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "app_engine_http_target: *". + * Note that using filters might cause fewer queues than the + * requested_page size to be returned. + * + * 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; + } + + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * 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 token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while + * iterating through pages. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while + * iterating through pages. + * + * 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; + } + + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php new file mode 100644 index 000000000000..921cdffddec0 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php @@ -0,0 +1,126 @@ +google.cloud.tasks.v2beta2.ListQueuesResponse + */ +class ListQueuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + private $queues; + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Tasks\V2beta2\Queue>|\Google\Protobuf\Internal\RepeatedField $queues + * The list of queues. + * @type string $next_page_token + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQueues() + { + return $this->queues; + } + + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + * @param array<\Google\Cloud\Tasks\V2beta2\Queue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQueues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\Queue::class); + $this->queues = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * 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. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php new file mode 100644 index 000000000000..493471606cf7 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php @@ -0,0 +1,258 @@ +google.cloud.tasks.v2beta2.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + protected $response_view = 0; + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * @type int $page_size + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * @type string $page_token + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php new file mode 100644 index 000000000000..1b085c352083 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php @@ -0,0 +1,122 @@ +google.cloud.tasks.v2beta2.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + private $tasks; + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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 array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The list of tasks. + * @type string $next_page_token + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + * @param array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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 token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php new file mode 100644 index 000000000000..2753f9fc25ca --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php @@ -0,0 +1,128 @@ +google.cloud.tasks.v2beta2.OAuthToken + */ +class OAuthToken extends \Google\Protobuf\Internal\Message +{ + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + */ + protected $service_account_email = ''; + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + */ + protected $scope = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_email + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * @type string $scope + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php new file mode 100644 index 000000000000..91cdd96f6482 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php @@ -0,0 +1,126 @@ +google.cloud.tasks.v2beta2.OidcToken + */ +class OidcToken extends \Google\Protobuf\Internal\Message +{ + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + */ + protected $service_account_email = ''; + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + */ + protected $audience = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_email + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * @type string $audience + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php new file mode 100644 index 000000000000..28b7445fa458 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php @@ -0,0 +1,68 @@ +google.cloud.tasks.v2beta2.PathOverride + */ +class PathOverride extends \Google\Protobuf\Internal\Message +{ + /** + * The URI path (e.g., /users/1234). Default is an empty string. + * + * Generated from protobuf field string path = 1; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * The URI path (e.g., /users/1234). Default is an empty string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * The URI path (e.g., /users/1234). Default is an empty string. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * The URI path (e.g., /users/1234). Default is an empty string. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php new file mode 100644 index 000000000000..564bea2de0a6 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta2.PauseQueueRequest + */ +class PauseQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php new file mode 100644 index 000000000000..06bfe1eb2054 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php @@ -0,0 +1,165 @@ +google.cloud.tasks.v2beta2.PullMessage + */ +class PullMessage extends \Google\Protobuf\Internal\Message +{ + /** + * A data payload consumed by the worker to execute the task. + * + * Generated from protobuf field bytes payload = 1; + */ + protected $payload = ''; + /** + * The task's tag. + * Tags allow similar tasks to be processed in a batch. If you label + * tasks with a tag, your worker can + * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the + * same tag using + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, + * if you want to aggregate the events associated with a specific user once a + * day, you could tag tasks with the user ID. + * The task's tag can only be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The tag must be less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * + * Generated from protobuf field string tag = 2; + */ + protected $tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $payload + * A data payload consumed by the worker to execute the task. + * @type string $tag + * The task's tag. + * Tags allow similar tasks to be processed in a batch. If you label + * tasks with a tag, your worker can + * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the + * same tag using + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, + * if you want to aggregate the events associated with a specific user once a + * day, you could tag tasks with the user ID. + * The task's tag can only be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The tag must be less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * A data payload consumed by the worker to execute the task. + * + * Generated from protobuf field bytes payload = 1; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * A data payload consumed by the worker to execute the task. + * + * Generated from protobuf field bytes payload = 1; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + + /** + * The task's tag. + * Tags allow similar tasks to be processed in a batch. If you label + * tasks with a tag, your worker can + * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the + * same tag using + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, + * if you want to aggregate the events associated with a specific user once a + * day, you could tag tasks with the user ID. + * The task's tag can only be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The tag must be less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * + * Generated from protobuf field string tag = 2; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * The task's tag. + * Tags allow similar tasks to be processed in a batch. If you label + * tasks with a tag, your worker can + * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the + * same tag using + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, + * if you want to aggregate the events associated with a specific user once a + * day, you could tag tasks with the user ID. + * The task's tag can only be set when the + * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The tag must be less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * + * Generated from protobuf field string tag = 2; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php new file mode 100644 index 000000000000..32baa5104df5 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php @@ -0,0 +1,33 @@ +google.cloud.tasks.v2beta2.PullTarget + */ +class PullTarget extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php new file mode 100644 index 000000000000..0b46a038df4b --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta2.PurgeQueueRequest + */ +class PurgeQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php new file mode 100644 index 000000000000..2bbe1049c6e7 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta2.QueryOverride + */ +class QueryOverride extends \Google\Protobuf\Internal\Message +{ + /** + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * + * Generated from protobuf field string query_params = 1; + */ + protected $query_params = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_params + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * + * Generated from protobuf field string query_params = 1; + * @return string + */ + public function getQueryParams() + { + return $this->query_params; + } + + /** + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * + * Generated from protobuf field string query_params = 1; + * @param string $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkString($var, True); + $this->query_params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php new file mode 100644 index 000000000000..405393e6f812 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php @@ -0,0 +1,771 @@ +google.cloud.tasks.v2beta2.Queue + */ +class Queue extends \Google\Protobuf\Internal\Message +{ + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related + * because they both control task attempts however they control how tasks are + * attempted in different ways: + * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + protected $rate_limits = null; + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + protected $retry_config = null; + /** + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + protected $state = 0; + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8; + */ + protected $purge_time = null; + /** + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * + * Generated from protobuf field .google.protobuf.Duration task_ttl = 9; + */ + protected $task_ttl = null; + /** + * The task tombstone time to live (TTL). + * After a task is deleted or completed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 10; + */ + protected $tombstone_ttl = null; + /** + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stats = null; + protected $target_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * @type \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget $app_engine_http_target + * App Engine HTTP target. + * An App Engine queue is a queue that has an + * [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + * @type \Google\Cloud\Tasks\V2beta2\PullTarget $pull_target + * Pull target. + * A pull queue is a queue that has a + * [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + * @type \Google\Cloud\Tasks\V2beta2\HttpTarget $http_target + * An http_target is used to override the target values for HTTP tasks. + * @type \Google\Cloud\Tasks\V2beta2\RateLimits $rate_limits + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related + * because they both control task attempts however they control how tasks are + * attempted in different ways: + * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * @type \Google\Cloud\Tasks\V2beta2\RetryConfig $retry_config + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * @type int $state + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * @type \Google\Protobuf\Duration $task_ttl + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * @type \Google\Protobuf\Duration $tombstone_ttl + * The task tombstone time to live (TTL). + * After a task is deleted or completed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * @type \Google\Cloud\Tasks\V2beta2\QueueStats $stats + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * 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; + } + + /** + * App Engine HTTP target. + * An App Engine queue is a queue that has an + * [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + * @return \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget|null + */ + public function getAppEngineHttpTarget() + { + return $this->readOneof(3); + } + + public function hasAppEngineHttpTarget() + { + return $this->hasOneof(3); + } + + /** + * App Engine HTTP target. + * An App Engine queue is a queue that has an + * [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + * @param \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget $var + * @return $this + */ + public function setAppEngineHttpTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Pull target. + * A pull queue is a queue that has a + * [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + * @return \Google\Cloud\Tasks\V2beta2\PullTarget|null + */ + public function getPullTarget() + { + return $this->readOneof(4); + } + + public function hasPullTarget() + { + return $this->hasOneof(4); + } + + /** + * Pull target. + * A pull queue is a queue that has a + * [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + * @param \Google\Cloud\Tasks\V2beta2\PullTarget $var + * @return $this + */ + public function setPullTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\PullTarget::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * An http_target is used to override the target values for HTTP tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * @return \Google\Cloud\Tasks\V2beta2\HttpTarget|null + */ + public function getHttpTarget() + { + return $this->readOneof(17); + } + + public function hasHttpTarget() + { + return $this->hasOneof(17); + } + + /** + * An http_target is used to override the target values for HTTP tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; + * @param \Google\Cloud\Tasks\V2beta2\HttpTarget $var + * @return $this + */ + public function setHttpTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\HttpTarget::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related + * because they both control task attempts however they control how tasks are + * attempted in different ways: + * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + * @return \Google\Cloud\Tasks\V2beta2\RateLimits|null + */ + public function getRateLimits() + { + return $this->rate_limits; + } + + public function hasRateLimits() + { + return isset($this->rate_limits); + } + + public function clearRateLimits() + { + unset($this->rate_limits); + } + + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related + * because they both control task attempts however they control how tasks are + * attempted in different ways: + * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + * @param \Google\Cloud\Tasks\V2beta2\RateLimits $var + * @return $this + */ + public function setRateLimits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\RateLimits::class); + $this->rate_limits = $var; + + return $this; + } + + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + * @return \Google\Cloud\Tasks\V2beta2\RetryConfig|null + */ + public function getRetryConfig() + { + return $this->retry_config; + } + + public function hasRetryConfig() + { + return isset($this->retry_config); + } + + public function clearRetryConfig() + { + unset($this->retry_config); + } + + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + * @param \Google\Cloud\Tasks\V2beta2\RetryConfig $var + * @return $this + */ + public function setRetryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\RetryConfig::class); + $this->retry_config = $var; + + return $this; + } + + /** + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue.State state = 7; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue.State state = 7; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Queue\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + + /** + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * + * Generated from protobuf field .google.protobuf.Duration task_ttl = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getTaskTtl() + { + return $this->task_ttl; + } + + public function hasTaskTtl() + { + return isset($this->task_ttl); + } + + public function clearTaskTtl() + { + unset($this->task_ttl); + } + + /** + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * + * Generated from protobuf field .google.protobuf.Duration task_ttl = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTaskTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->task_ttl = $var; + + return $this; + } + + /** + * The task tombstone time to live (TTL). + * After a task is deleted or completed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getTombstoneTtl() + { + return $this->tombstone_ttl; + } + + public function hasTombstoneTtl() + { + return isset($this->tombstone_ttl); + } + + public function clearTombstoneTtl() + { + unset($this->tombstone_ttl); + } + + /** + * The task tombstone time to live (TTL). + * After a task is deleted or completed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTombstoneTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->tombstone_ttl = $var; + + return $this; + } + + /** + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Tasks\V2beta2\QueueStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Tasks\V2beta2\QueueStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\QueueStats::class); + $this->stats = $var; + + return $this; + } + + /** + * @return string + */ + public function getTargetType() + { + return $this->whichOneof("target_type"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php new file mode 100644 index 000000000000..f7bded4c9833 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php @@ -0,0 +1,93 @@ +google.cloud.tasks.v2beta2.Queue.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The queue is running. Tasks can be dispatched. + * If the queue was created using Cloud Tasks and the queue has + * had no activity (method calls or task dispatches) for 30 days, + * the queue may take a few minutes to re-activate. Some method + * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + * tasks may not be dispatched for a few minutes until the queue + * has been re-activated. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * Tasks are paused by the user. If the queue is paused then Cloud + * Tasks will stop delivering tasks from it, but more tasks can + * still be added to it by the user. When a pull queue is paused, + * all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls + * will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * The queue is disabled. + * A queue becomes `DISABLED` when + * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + * or + * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + * is uploaded which does not contain the queue. You cannot directly disable + * a queue. + * When a queue is disabled, tasks can still be added to a queue + * but the tasks are not dispatched and + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls + * return a `FAILED_PRECONDITION` error. + * To permanently delete this queue and all of its tasks, call + * [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Tasks\V2beta2\Queue_State::class); + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php new file mode 100644 index 000000000000..2088ee83cf4e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php @@ -0,0 +1,253 @@ +google.cloud.tasks.v2beta2.QueueStats + */ +class QueueStats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * + * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tasks_count = 0; + /** + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * + * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oldest_estimated_arrival_time = null; + /** + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * + * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $executed_last_minute_count = 0; + /** + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * + * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $concurrent_dispatches_count = 0; + /** + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * + * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_execution_rate = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $tasks_count + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * @type \Google\Protobuf\Timestamp $oldest_estimated_arrival_time + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * @type int|string $executed_last_minute_count + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * @type int|string $concurrent_dispatches_count + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * @type float $effective_execution_rate + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * + * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTasksCount() + { + return $this->tasks_count; + } + + /** + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * + * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTasksCount($var) + { + GPBUtil::checkInt64($var); + $this->tasks_count = $var; + + return $this; + } + + /** + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * + * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getOldestEstimatedArrivalTime() + { + return $this->oldest_estimated_arrival_time; + } + + public function hasOldestEstimatedArrivalTime() + { + return isset($this->oldest_estimated_arrival_time); + } + + public function clearOldestEstimatedArrivalTime() + { + unset($this->oldest_estimated_arrival_time); + } + + /** + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * + * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setOldestEstimatedArrivalTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->oldest_estimated_arrival_time = $var; + + return $this; + } + + /** + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * + * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getExecutedLastMinuteCount() + { + return $this->executed_last_minute_count; + } + + /** + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * + * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setExecutedLastMinuteCount($var) + { + GPBUtil::checkInt64($var); + $this->executed_last_minute_count = $var; + + return $this; + } + + /** + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * + * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getConcurrentDispatchesCount() + { + return $this->concurrent_dispatches_count; + } + + /** + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * + * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setConcurrentDispatchesCount($var) + { + GPBUtil::checkInt64($var); + $this->concurrent_dispatches_count = $var; + + return $this; + } + + /** + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * + * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getEffectiveExecutionRate() + { + return $this->effective_execution_rate; + } + + /** + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * + * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setEffectiveExecutionRate($var) + { + GPBUtil::checkDouble($var); + $this->effective_execution_rate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php new file mode 100644 index 000000000000..1607a1fb59c4 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php @@ -0,0 +1,349 @@ +google.cloud.tasks.v2beta2.RateLimits + */ +class RateLimits extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + * the maximum allowed value + * is 500. + * * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests + * are allowed per pull queue. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_tasks_dispatched_per_second = 1; + */ + protected $max_tasks_dispatched_per_second = 0.0; + /** + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is + * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * + * Generated from protobuf field int32 max_burst_size = 2; + */ + protected $max_burst_size = 0; + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field is output only for + * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which + * indicates no limit. No other queue types can have `max_concurrent_tasks` + * set to -1. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_tasks = 3; + */ + protected $max_concurrent_tasks = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $max_tasks_dispatched_per_second + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + * the maximum allowed value + * is 500. + * * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests + * are allowed per pull queue. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * @type int $max_burst_size + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is + * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * @type int $max_concurrent_tasks + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field is output only for + * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which + * indicates no limit. No other queue types can have `max_concurrent_tasks` + * set to -1. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + * the maximum allowed value + * is 500. + * * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests + * are allowed per pull queue. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_tasks_dispatched_per_second = 1; + * @return float + */ + public function getMaxTasksDispatchedPerSecond() + { + return $this->max_tasks_dispatched_per_second; + } + + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + * the maximum allowed value + * is 500. + * * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the + * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests + * are allowed per pull queue. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_tasks_dispatched_per_second = 1; + * @param float $var + * @return $this + */ + public function setMaxTasksDispatchedPerSecond($var) + { + GPBUtil::checkDouble($var); + $this->max_tasks_dispatched_per_second = $var; + + return $this; + } + + /** + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is + * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * + * Generated from protobuf field int32 max_burst_size = 2; + * @return int + */ + public function getMaxBurstSize() + { + return $this->max_burst_size; + } + + /** + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is + * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. + * + * Generated from protobuf field int32 max_burst_size = 2; + * @param int $var + * @return $this + */ + public function setMaxBurstSize($var) + { + GPBUtil::checkInt32($var); + $this->max_burst_size = $var; + + return $this; + } + + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field is output only for + * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which + * indicates no limit. No other queue types can have `max_concurrent_tasks` + * set to -1. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_tasks = 3; + * @return int + */ + public function getMaxConcurrentTasks() + { + return $this->max_concurrent_tasks; + } + + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field is output only for + * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which + * indicates no limit. No other queue types can have `max_concurrent_tasks` + * set to -1. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_tasks = 3; + * @param int $var + * @return $this + */ + public function setMaxConcurrentTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_tasks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php new file mode 100644 index 000000000000..dd4bae70caa0 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php @@ -0,0 +1,258 @@ +google.cloud.tasks.v2beta2.RenewLeaseRequest + */ +class RenewLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schedule_time = null; + /** + * Required. The desired new lease duration, starting from now. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lease_duration = null; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type \Google\Protobuf\Timestamp $schedule_time + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * @type \Google\Protobuf\Duration $lease_duration + * Required. The desired new lease duration, starting from now. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Required. The desired new lease duration, starting from now. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getLeaseDuration() + { + return $this->lease_duration; + } + + public function hasLeaseDuration() + { + return isset($this->lease_duration); + } + + public function clearLeaseDuration() + { + unset($this->lease_duration); + } + + /** + * Required. The desired new lease duration, starting from now. + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLeaseDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lease_duration = $var; + + return $this; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php new file mode 100644 index 000000000000..2313b11ba861 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta2.ResumeQueueRequest + */ +class ResumeQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php new file mode 100644 index 000000000000..72adfcb1e3c1 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php @@ -0,0 +1,548 @@ +google.cloud.tasks.v2beta2.RetryConfig + */ +class RetryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 3; + */ + protected $max_retry_duration = null; + /** + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 4; + */ + protected $min_backoff = null; + /** + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 5; + */ + protected $max_backoff = null; + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 6; + */ + protected $max_doublings = 0; + protected $num_attempts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_attempts + * The maximum number of attempts for a task. + * Cloud Tasks will attempt the task `max_attempts` times (that + * is, if the first attempt fails, then there will be + * `max_attempts - 1` retries). Must be > 0. + * @type bool $unlimited_attempts + * If true, then the number of attempts is unlimited. + * @type \Google\Protobuf\Duration $max_retry_duration + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $min_backoff + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $max_backoff + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type int $max_doublings + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of attempts for a task. + * Cloud Tasks will attempt the task `max_attempts` times (that + * is, if the first attempt fails, then there will be + * `max_attempts - 1` retries). Must be > 0. + * + * Generated from protobuf field int32 max_attempts = 1; + * @return int + */ + public function getMaxAttempts() + { + return $this->readOneof(1); + } + + public function hasMaxAttempts() + { + return $this->hasOneof(1); + } + + /** + * The maximum number of attempts for a task. + * Cloud Tasks will attempt the task `max_attempts` times (that + * is, if the first attempt fails, then there will be + * `max_attempts - 1` retries). Must be > 0. + * + * Generated from protobuf field int32 max_attempts = 1; + * @param int $var + * @return $this + */ + public function setMaxAttempts($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If true, then the number of attempts is unlimited. + * + * Generated from protobuf field bool unlimited_attempts = 2; + * @return bool + */ + public function getUnlimitedAttempts() + { + return $this->readOneof(2); + } + + public function hasUnlimitedAttempts() + { + return $this->hasOneof(2); + } + + /** + * If true, then the number of attempts is unlimited. + * + * Generated from protobuf field bool unlimited_attempts = 2; + * @param bool $var + * @return $this + */ + public function setUnlimitedAttempts($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxRetryDuration() + { + return $this->max_retry_duration; + } + + public function hasMaxRetryDuration() + { + return isset($this->max_retry_duration); + } + + public function clearMaxRetryDuration() + { + unset($this->max_retry_duration); + } + + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxRetryDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_retry_duration = $var; + + return $this; + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBackoff() + { + return $this->min_backoff; + } + + public function hasMinBackoff() + { + return isset($this->min_backoff); + } + + public function clearMinBackoff() + { + unset($this->min_backoff); + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_backoff = $var; + + return $this; + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxBackoff() + { + return $this->max_backoff; + } + + public function hasMaxBackoff() + { + return isset($this->max_backoff); + } + + public function clearMaxBackoff() + { + unset($this->max_backoff); + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_backoff = $var; + + return $this; + } + + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 6; + * @return int + */ + public function getMaxDoublings() + { + return $this->max_doublings; + } + + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field is output only for [pull + * queues][google.cloud.tasks.v2beta2.PullTarget]. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 6; + * @param int $var + * @return $this + */ + public function setMaxDoublings($var) + { + GPBUtil::checkInt32($var); + $this->max_doublings = $var; + + return $this; + } + + /** + * @return string + */ + public function getNumAttempts() + { + return $this->whichOneof("num_attempts"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php new file mode 100644 index 000000000000..43840ad89f47 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php @@ -0,0 +1,146 @@ +google.cloud.tasks.v2beta2.RunTaskRequest + */ +class RunTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php new file mode 100644 index 000000000000..820e2333cf67 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php @@ -0,0 +1,484 @@ +google.cloud.tasks.v2beta2.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * For pull queues, this is the time when the task is available to + * be leased; if a task is currently leased, this is the time when + * the current lease expires, that is, the time that the task was + * leased plus the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 5; + */ + protected $schedule_time = null; + /** + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + */ + protected $create_time = null; + /** + * Output only. The task status. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + protected $status = null; + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + protected $view = 0; + protected $payload_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * @type \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest $app_engine_http_request + * App Engine HTTP request that is sent to the task's target. Can + * be set only if + * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] + * is set on the queue. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + * set. + * @type \Google\Cloud\Tasks\V2beta2\PullMessage $pull_message + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process + * the task. Can be set only if + * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the + * queue. + * A pull task is a task that has + * [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + * @type \Google\Cloud\Tasks\V2beta2\HttpRequest $http_request + * HTTP request that is sent to the task's target. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. + * @type \Google\Protobuf\Timestamp $schedule_time + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * For pull queues, this is the time when the task is available to + * be leased; if a task is currently leased, this is the time when + * the current lease expires, that is, the time that the task was + * leased plus the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * `schedule_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * @type \Google\Cloud\Tasks\V2beta2\TaskStatus $status + * Output only. The task status. + * @type int $view + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] has been returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * 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; + } + + /** + * App Engine HTTP request that is sent to the task's target. Can + * be set only if + * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] + * is set on the queue. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + * set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + * @return \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest|null + */ + public function getAppEngineHttpRequest() + { + return $this->readOneof(3); + } + + public function hasAppEngineHttpRequest() + { + return $this->hasOneof(3); + } + + /** + * App Engine HTTP request that is sent to the task's target. Can + * be set only if + * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] + * is set on the queue. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + * set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + * @param \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest $var + * @return $this + */ + public function setAppEngineHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process + * the task. Can be set only if + * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the + * queue. + * A pull task is a task that has + * [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + * @return \Google\Cloud\Tasks\V2beta2\PullMessage|null + */ + public function getPullMessage() + { + return $this->readOneof(4); + } + + public function hasPullMessage() + { + return $this->hasOneof(4); + } + + /** + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process + * the task. Can be set only if + * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the + * queue. + * A pull task is a task that has + * [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + * @param \Google\Cloud\Tasks\V2beta2\PullMessage $var + * @return $this + */ + public function setPullMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\PullMessage::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * HTTP request that is sent to the task's target. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * @return \Google\Cloud\Tasks\V2beta2\HttpRequest|null + */ + public function getHttpRequest() + { + return $this->readOneof(13); + } + + public function hasHttpRequest() + { + return $this->hasOneof(13); + } + + /** + * HTTP request that is sent to the task's target. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; + * @param \Google\Cloud\Tasks\V2beta2\HttpRequest $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\HttpRequest::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * For pull queues, this is the time when the task is available to + * be leased; if a task is currently leased, this is the time when + * the current lease expires, that is, the time that the task was + * leased plus the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * For pull queues, this is the time when the task is available to + * be leased; if a task is currently leased, this is the time when + * the current lease expires, that is, the time that the task was + * leased plus the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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 that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * @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 task status. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.TaskStatus status = 7; + * @return \Google\Cloud\Tasks\V2beta2\TaskStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. The task status. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.TaskStatus status = 7; + * @param \Google\Cloud\Tasks\V2beta2\TaskStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\TaskStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View view = 8; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View view = 8; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); + $this->view = $var; + + return $this; + } + + /** + * @return string + */ + public function getPayloadType() + { + return $this->whichOneof("payload_type"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php new file mode 100644 index 000000000000..d3d0db2c9c71 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php @@ -0,0 +1,83 @@ +google.cloud.tasks.v2beta2.Task.View + */ +class View +{ + /** + * Unspecified. Defaults to BASIC. + * + * Generated from protobuf enum VIEW_UNSPECIFIED = 0; + */ + const VIEW_UNSPECIFIED = 0; + /** + * The basic view omits fields which can be large or can contain + * sensitive data. + * This view does not include the + * ([payload in + * AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] + * and [payload in + * PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These + * payloads are desirable to return only when needed, because they can be + * large and because of the sensitivity of the data that you choose to store + * in it. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * All information is returned. + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Queue][google.cloud.tasks.v2beta2.Queue] resource. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(View::class, \Google\Cloud\Tasks\V2beta2\Task_View::class); + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php new file mode 100644 index 000000000000..9b7ced73522f --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php @@ -0,0 +1,241 @@ +google.cloud.tasks.v2beta2.TaskStatus + */ +class TaskStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 attempt_dispatch_count = 1; + */ + protected $attempt_dispatch_count = 0; + /** + * Output only. The number of attempts which have received a response. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field int32 attempt_response_count = 2; + */ + protected $attempt_response_count = 0; + /** + * Output only. The status of the task's first attempt. + * Only + * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] + * will be set. The other + * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is + * not retained by Cloud Tasks. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + protected $first_attempt_status = null; + /** + * Output only. The status of the task's last attempt. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + protected $last_attempt_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $attempt_dispatch_count + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * @type int $attempt_response_count + * Output only. The number of attempts which have received a response. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * @type \Google\Cloud\Tasks\V2beta2\AttemptStatus $first_attempt_status + * Output only. The status of the task's first attempt. + * Only + * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] + * will be set. The other + * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is + * not retained by Cloud Tasks. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * @type \Google\Cloud\Tasks\V2beta2\AttemptStatus $last_attempt_status + * Output only. The status of the task's last attempt. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Task::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 attempt_dispatch_count = 1; + * @return int + */ + public function getAttemptDispatchCount() + { + return $this->attempt_dispatch_count; + } + + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 attempt_dispatch_count = 1; + * @param int $var + * @return $this + */ + public function setAttemptDispatchCount($var) + { + GPBUtil::checkInt32($var); + $this->attempt_dispatch_count = $var; + + return $this; + } + + /** + * Output only. The number of attempts which have received a response. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field int32 attempt_response_count = 2; + * @return int + */ + public function getAttemptResponseCount() + { + return $this->attempt_response_count; + } + + /** + * Output only. The number of attempts which have received a response. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field int32 attempt_response_count = 2; + * @param int $var + * @return $this + */ + public function setAttemptResponseCount($var) + { + GPBUtil::checkInt32($var); + $this->attempt_response_count = $var; + + return $this; + } + + /** + * Output only. The status of the task's first attempt. + * Only + * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] + * will be set. The other + * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is + * not retained by Cloud Tasks. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + * @return \Google\Cloud\Tasks\V2beta2\AttemptStatus|null + */ + public function getFirstAttemptStatus() + { + return $this->first_attempt_status; + } + + public function hasFirstAttemptStatus() + { + return isset($this->first_attempt_status); + } + + public function clearFirstAttemptStatus() + { + unset($this->first_attempt_status); + } + + /** + * Output only. The status of the task's first attempt. + * Only + * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] + * will be set. The other + * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is + * not retained by Cloud Tasks. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + * @param \Google\Cloud\Tasks\V2beta2\AttemptStatus $var + * @return $this + */ + public function setFirstAttemptStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AttemptStatus::class); + $this->first_attempt_status = $var; + + return $this; + } + + /** + * Output only. The status of the task's last attempt. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + * @return \Google\Cloud\Tasks\V2beta2\AttemptStatus|null + */ + public function getLastAttemptStatus() + { + return $this->last_attempt_status; + } + + public function hasLastAttemptStatus() + { + return isset($this->last_attempt_status); + } + + public function clearLastAttemptStatus() + { + unset($this->last_attempt_status); + } + + /** + * Output only. The status of the task's last attempt. + * This field is not calculated for [pull + * tasks][google.cloud.tasks.v2beta2.PullMessage]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + * @param \Google\Cloud\Tasks\V2beta2\AttemptStatus $var + * @return $this + */ + public function setLastAttemptStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AttemptStatus::class); + $this->last_attempt_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php new file mode 100644 index 000000000000..c32717481e98 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php @@ -0,0 +1,150 @@ +google.cloud.tasks.v2beta2.UpdateQueueRequest + */ +class UpdateQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + * changed. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $queue = null; + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta2\Queue $queue + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + * changed. + * @type \Google\Protobuf\FieldMask $update_mask + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + * changed. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2beta2\Queue|null + */ + public function getQueue() + { + return $this->queue; + } + + public function hasQueue() + { + return isset($this->queue); + } + + public function clearQueue() + { + unset($this->queue); + } + + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + * changed. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2beta2\Queue $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\Queue::class); + $this->queue = $var; + + return $this; + } + + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will 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); + } + + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php new file mode 100644 index 000000000000..1d8bc2fa466d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php @@ -0,0 +1,120 @@ +google.cloud.tasks.v2beta2.UploadQueueYamlRequest + */ +class UploadQueueYamlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The App ID is supplied as an HTTP parameter. Unlike internal + * usage of App ID, it does not include a region prefix. Rather, the App ID + * represents the Project ID against which to make the request. + * + * Generated from protobuf field string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $app_id = ''; + /** + * The http body contains the queue.yaml file which used to update queue lists + * + * Generated from protobuf field optional .google.api.HttpBody http_body = 2; + */ + protected $http_body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $app_id + * Required. The App ID is supplied as an HTTP parameter. Unlike internal + * usage of App ID, it does not include a region prefix. Rather, the App ID + * represents the Project ID against which to make the request. + * @type \Google\Api\HttpBody $http_body + * The http body contains the queue.yaml file which used to update queue lists + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The App ID is supplied as an HTTP parameter. Unlike internal + * usage of App ID, it does not include a region prefix. Rather, the App ID + * represents the Project ID against which to make the request. + * + * Generated from protobuf field string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAppId() + { + return $this->app_id; + } + + /** + * Required. The App ID is supplied as an HTTP parameter. Unlike internal + * usage of App ID, it does not include a region prefix. Rather, the App ID + * represents the Project ID against which to make the request. + * + * Generated from protobuf field string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAppId($var) + { + GPBUtil::checkString($var, True); + $this->app_id = $var; + + return $this; + } + + /** + * The http body contains the queue.yaml file which used to update queue lists + * + * Generated from protobuf field optional .google.api.HttpBody http_body = 2; + * @return \Google\Api\HttpBody|null + */ + public function getHttpBody() + { + return $this->http_body; + } + + public function hasHttpBody() + { + return isset($this->http_body); + } + + public function clearHttpBody() + { + unset($this->http_body); + } + + /** + * The http body contains the queue.yaml file which used to update queue lists + * + * Generated from protobuf field optional .google.api.HttpBody http_body = 2; + * @param \Google\Api\HttpBody $var + * @return $this + */ + public function setHttpBody($var) + { + GPBUtil::checkMessage($var, \Google\Api\HttpBody::class); + $this->http_body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php new file mode 100644 index 000000000000..7d21cb8e089e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php @@ -0,0 +1,353 @@ +google.cloud.tasks.v2beta2.UriOverride + */ +class UriOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * + * Generated from protobuf field optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + */ + protected $scheme = null; + /** + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * + * Generated from protobuf field optional string host = 2; + */ + protected $host = null; + /** + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * + * Generated from protobuf field optional int64 port = 3; + */ + protected $port = null; + /** + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + */ + protected $path_override = null; + /** + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + */ + protected $query_override = null; + /** + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + */ + protected $uri_override_enforce_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $scheme + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * @type string $host + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * @type int|string $port + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * @type \Google\Cloud\Tasks\V2beta2\PathOverride $path_override + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * @type \Google\Cloud\Tasks\V2beta2\QueryOverride $query_override + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * @type int $uri_override_enforce_mode + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); + parent::__construct($data); + } + + /** + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * + * Generated from protobuf field optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * @return int + */ + public function getScheme() + { + return isset($this->scheme) ? $this->scheme : 0; + } + + public function hasScheme() + { + return isset($this->scheme); + } + + public function clearScheme() + { + unset($this->scheme); + } + + /** + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * + * Generated from protobuf field optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; + * @param int $var + * @return $this + */ + public function setScheme($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\UriOverride\Scheme::class); + $this->scheme = $var; + + return $this; + } + + /** + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * + * Generated from protobuf field optional string host = 2; + * @return string + */ + public function getHost() + { + return isset($this->host) ? $this->host : ''; + } + + public function hasHost() + { + return isset($this->host); + } + + public function clearHost() + { + unset($this->host); + } + + /** + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * + * Generated from protobuf field optional string host = 2; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * + * Generated from protobuf field optional int64 port = 3; + * @return int|string + */ + public function getPort() + { + return isset($this->port) ? $this->port : 0; + } + + public function hasPort() + { + return isset($this->port); + } + + public function clearPort() + { + unset($this->port); + } + + /** + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * + * Generated from protobuf field optional int64 port = 3; + * @param int|string $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt64($var); + $this->port = $var; + + return $this; + } + + /** + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * @return \Google\Cloud\Tasks\V2beta2\PathOverride|null + */ + public function getPathOverride() + { + return $this->path_override; + } + + public function hasPathOverride() + { + return isset($this->path_override); + } + + public function clearPathOverride() + { + unset($this->path_override); + } + + /** + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.PathOverride path_override = 4; + * @param \Google\Cloud\Tasks\V2beta2\PathOverride $var + * @return $this + */ + public function setPathOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\PathOverride::class); + $this->path_override = $var; + + return $this; + } + + /** + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * @return \Google\Cloud\Tasks\V2beta2\QueryOverride|null + */ + public function getQueryOverride() + { + return $this->query_override; + } + + public function hasQueryOverride() + { + return isset($this->query_override); + } + + public function clearQueryOverride() + { + unset($this->query_override); + } + + /** + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; + * @param \Google\Cloud\Tasks\V2beta2\QueryOverride $var + * @return $this + */ + public function setQueryOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\QueryOverride::class); + $this->query_override = $var; + + return $this; + } + + /** + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * @return int + */ + public function getUriOverrideEnforceMode() + { + return $this->uri_override_enforce_mode; + } + + /** + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * + * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * @param int $var + * @return $this + */ + public function setUriOverrideEnforceMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\UriOverride\UriOverrideEnforceMode::class); + $this->uri_override_enforce_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php new file mode 100644 index 000000000000..d27231a2038d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php @@ -0,0 +1,66 @@ +google.cloud.tasks.v2beta2.UriOverride.Scheme + */ +class Scheme +{ + /** + * Scheme unspecified. Defaults to HTTPS. + * + * Generated from protobuf enum SCHEME_UNSPECIFIED = 0; + */ + const SCHEME_UNSPECIFIED = 0; + /** + * Convert the scheme to HTTP, e.g., https://www.google.ca will change to + * http://www.google.ca. + * + * Generated from protobuf enum HTTP = 1; + */ + const HTTP = 1; + /** + * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to + * https://www.google.ca. + * + * Generated from protobuf enum HTTPS = 2; + */ + const HTTPS = 2; + + private static $valueToName = [ + self::SCHEME_UNSPECIFIED => 'SCHEME_UNSPECIFIED', + self::HTTP => 'HTTP', + self::HTTPS => 'HTTPS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scheme::class, \Google\Cloud\Tasks\V2beta2\UriOverride_Scheme::class); + diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php new file mode 100644 index 000000000000..16736bffe052 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php @@ -0,0 +1,67 @@ +google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode + */ +class UriOverrideEnforceMode +{ + /** + * OverrideMode Unspecified. Defaults to ALWAYS. + * + * Generated from protobuf enum URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + */ + const URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + /** + * In the IF_NOT_EXISTS mode, queue-level configuration is only + * applied where task-level configuration does not exist. + * + * Generated from protobuf enum IF_NOT_EXISTS = 1; + */ + const IF_NOT_EXISTS = 1; + /** + * In the ALWAYS mode, queue-level configuration overrides all + * task-level configuration + * + * Generated from protobuf enum ALWAYS = 2; + */ + const ALWAYS = 2; + + private static $valueToName = [ + self::URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED => 'URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED', + self::IF_NOT_EXISTS => 'IF_NOT_EXISTS', + self::ALWAYS => 'ALWAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UriOverrideEnforceMode::class, \Google\Cloud\Tasks\V2beta2\UriOverride_UriOverrideEnforceMode::class); + diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php new file mode 100644 index 000000000000..dfa44bea000a --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php @@ -0,0 +1,82 @@ +acknowledgeTask($formattedName, $scheduleTime); + 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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + acknowledge_task_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php new file mode 100644 index 000000000000..fa0956fddef3 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php @@ -0,0 +1,76 @@ +cancelLease($formattedName, $scheduleTime); + 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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + cancel_lease_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php new file mode 100644 index 000000000000..b427abdbd306 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php @@ -0,0 +1,85 @@ +createQueue($formattedParent, $queue); + 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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); + + create_queue_sample($formattedParent); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php new file mode 100644 index 000000000000..e5e238114b44 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php @@ -0,0 +1,80 @@ +createTask($formattedParent, $task); + 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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + create_task_sample($formattedParent); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php new file mode 100644 index 000000000000..84fb02ab903b --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php @@ -0,0 +1,77 @@ +deleteQueue($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + delete_queue_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php new file mode 100644 index 000000000000..06124f19250e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php @@ -0,0 +1,69 @@ +deleteTask($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + delete_task_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php new file mode 100644 index 000000000000..1e41025e96ff --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php @@ -0,0 +1,74 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php new file mode 100644 index 000000000000..4aaddcc22a3d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_GetLocation_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php new file mode 100644 index 000000000000..5fb478085e54 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php @@ -0,0 +1,67 @@ +getQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + get_queue_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php new file mode 100644 index 000000000000..780914b39107 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php @@ -0,0 +1,67 @@ +getTask($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + get_task_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php new file mode 100644 index 000000000000..ff53bf1ceb01 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php @@ -0,0 +1,93 @@ +leaseTasks($formattedParent, $leaseDuration); + 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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + lease_tasks_sample($formattedParent); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php new file mode 100644 index 000000000000..4b8b6f73d3fe --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 cloudtasks_v2beta2_generated_CloudTasks_ListLocations_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php new file mode 100644 index 000000000000..e0d3bf4d4cff --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php @@ -0,0 +1,74 @@ +listQueues($formattedParent); + + /** @var Queue $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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); + + list_queues_sample($formattedParent); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php new file mode 100644 index 000000000000..47ab73268ce6 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php @@ -0,0 +1,80 @@ +listTasks($formattedParent); + + /** @var Task $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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + list_tasks_sample($formattedParent); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php new file mode 100644 index 000000000000..dd98a7e55fc3 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php @@ -0,0 +1,74 @@ +pauseQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + pause_queue_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php new file mode 100644 index 000000000000..3a1827680371 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php @@ -0,0 +1,72 @@ +purgeQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + purge_queue_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php new file mode 100644 index 000000000000..59ff5f7d8ba2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php @@ -0,0 +1,78 @@ +renewLease($formattedName, $scheduleTime, $leaseDuration); + 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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + renew_lease_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php new file mode 100644 index 000000000000..d787c841efa8 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php @@ -0,0 +1,81 @@ +resumeQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + resume_queue_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php new file mode 100644 index 000000000000..10dddc23c693 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php @@ -0,0 +1,96 @@ +runTask($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + run_task_sample($formattedName); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php new file mode 100644 index 000000000000..cb9b2123bea6 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php @@ -0,0 +1,79 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php new file mode 100644 index 000000000000..a5e276e15c38 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php @@ -0,0 +1,81 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php new file mode 100644 index 000000000000..4e20bc98ab2c --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php @@ -0,0 +1,70 @@ +updateQueue($queue); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php new file mode 100644 index 000000000000..270900884e50 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php @@ -0,0 +1,69 @@ +uploadQueueYaml($appId); + 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 +{ + $appId = '[APP_ID]'; + + upload_queue_yaml_sample($appId); +} +// [END cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php new file mode 100644 index 000000000000..f2e76ac1bacc --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php @@ -0,0 +1,36 @@ +taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $scheduleTime = new Timestamp(); + * $cloudTasksClient->acknowledgeTask($formattedName, $scheduleTime); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class CloudTasksGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.tasks.v2beta2.CloudTasks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $queueNameTemplate; + + private static $taskNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_tasks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getQueueNameTemplate() + { + if (self::$queueNameTemplate == null) { + self::$queueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}'); + } + + return self::$queueNameTemplate; + } + + private static function getTaskNameTemplate() + { + if (self::$taskNameTemplate == null) { + self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}/tasks/{task}'); + } + + return self::$taskNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'queue' => self::getQueueNameTemplate(), + 'task' => self::getTaskNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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. + * + * @experimental + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a queue + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * + * @return string The formatted queue resource. + * + * @experimental + */ + public static function queueName($project, $location, $queue) + { + return self::getQueueNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * @param string $task + * + * @return string The formatted task resource. + * + * @experimental + */ + public static function taskName($project, $location, $queue, $task) + { + return self::getTaskNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + 'task' => $task, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - queue: projects/{project}/locations/{location}/queues/{queue} + * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + * + * 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($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtasks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Acknowledges a pull task. + * + * The worker, that is, the entity that + * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must + * call this method to indicate that the work associated with the task has + * finished. + * + * The worker must acknowledge a task within the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] + * or the lease will expire and the task will become available to be leased + * again. After the task is acknowledged, it will not be returned + * by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $scheduleTime = new Timestamp(); + * $cloudTasksClient->acknowledgeTask($formattedName, $scheduleTime); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param Timestamp $scheduleTime Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function acknowledgeTask($name, $scheduleTime, array $optionalArgs = []) + { + $request = new AcknowledgeTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setScheduleTime($scheduleTime); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AcknowledgeTask', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Cancel a pull task's lease. + * + * The worker can use this method to cancel a task's lease by + * setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + * to now. This will make the task available to be leased to the next caller + * of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $scheduleTime = new Timestamp(); + * $response = $cloudTasksClient->cancelLease($formattedName, $scheduleTime); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param Timestamp $scheduleTime Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function cancelLease($name, $scheduleTime, array $optionalArgs = []) + { + $request = new CancelLeaseRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setScheduleTime($scheduleTime); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CancelLease', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a queue. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); + * $queue = new Queue(); + * $response = $cloudTasksClient->createQueue($formattedParent, $queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @param Queue $queue Required. The queue to create. + * + * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as + * an existing queue. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createQueue($parent, $queue, array $optionalArgs = []) + { + $request = new CreateQueueRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setQueue($queue); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a task and adds it to a queue. + * + * Tasks cannot be updated after creation; there is no UpdateTask command. + * + * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], + * the maximum task size is + * 100KB. + * * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum + * task size is 1MB. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $task = new Task(); + * $response = $cloudTasksClient->createTask($formattedParent, $task); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * The queue must already exist. + * @param Task $task Required. The task to add. + * + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + * + * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * + * Task De-duplication: + * + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or completed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or completed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or completed. + * + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createTask($parent, $task, array $optionalArgs = []) + { + $request = new CreateTaskRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTask($task); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a queue. + * + * This command will delete the queue even if it has tasks in it. + * + * Note: If you delete a queue, a queue with the same name can't be created + * for 7 days. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $cloudTasksClient->deleteQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteQueue($name, array $optionalArgs = []) + { + $request = new DeleteQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteQueue', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a task. + * + * A task can be deleted if it is scheduled or dispatched. A task + * cannot be deleted if it has completed successfully or permanently + * failed. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $cloudTasksClient->deleteTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteTask($name, array $optionalArgs = []) + { + $request = new DeleteTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTask', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a + * [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the + * resource exists and does not have a policy set. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.getIamPolicy` + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $response = $cloudTasksClient->getIamPolicy($resource); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a queue. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->getQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $readMask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getQueue($name, array $optionalArgs = []) + { + $request = new GetQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a task. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $response = $cloudTasksClient->getTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getTask($name, array $optionalArgs = []) + { + $request = new GetTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Leases tasks from a pull queue for + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * + * This method is invoked by the worker to obtain a lease. The + * worker must acknowledge the task via + * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + * after they have performed the work associated with the task. + * + * The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended + * to store data that the worker needs to perform the work associated with the + * task. To return the payloads in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] + * to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + * + * A maximum of 10 qps of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are + * allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + * is returned when this limit is + * exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + * is also returned when + * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + * is exceeded. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $leaseDuration = new Duration(); + * $response = $cloudTasksClient->leaseTasks($formattedParent, $leaseDuration); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param Duration $leaseDuration Required. The duration of the lease. + * + * Each task returned in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the + * current time plus the `lease_duration`. The task is leased until its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the + * task will not be returned to another + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before + * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * + * + * After the worker has successfully finished the work associated + * with the task, the worker must call via + * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] + * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * Otherwise the task will be returned to a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that + * another worker can retry it. + * + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * @param array $optionalArgs { + * Optional. + * + * @type int $maxTasks + * The maximum number of tasks to lease. + * + * The system will make a best effort to return as close to as + * `max_tasks` as possible. + * + * The largest that `max_tasks` can be is 1000. + * + * The maximum total size of a [lease tasks + * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the + * sum of all task sizes requested reaches this limit, fewer tasks than + * requested are returned. + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type string $filter + * `filter` can be used to specify a subset of tasks to lease. + * + * When `filter` is set to `tag=` then the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only + * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to + * ``. `` must be less than 500 characters. + * + * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + * the same tag as the task with the oldest + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + * returned. + * + * Grammar Syntax: + * + * * `filter = "tag=" tag | "tag_function=" function` + * + * * `tag = string` + * + * * `function = "oldest_tag()"` + * + * The `oldest_tag()` function returns tasks which have the same tag as the + * oldest task (ordered by schedule time). + * + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + * aren't UTF-8 encoded can't be used in the + * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the + * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed + * as empty in Cloud Tasks. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\LeaseTasksResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function leaseTasks($parent, $leaseDuration, array $optionalArgs = []) + { + $request = new LeaseTasksRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setLeaseDuration($leaseDuration); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['maxTasks'])) { + $request->setMaxTasks($optionalArgs['maxTasks']); + } + + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('LeaseTasks', LeaseTasksResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists queues. + * + * Queues are returned in lexicographical order. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * + * Sample filter "app_engine_http_target: *". + * + * Note that using filters might cause fewer queues than the + * requested_page size to be returned. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type FieldMask $readMask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listQueues($parent, array $optionalArgs = []) + { + $request = new ListQueuesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListQueues', $optionalArgs, ListQueuesResponse::class, $request); + } + + /** + * Lists the tasks in a queue. + * + * By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] + * view is retrieved due to performance considerations; + * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] + * controls the subset of information which is returned. + * + * The tasks may be returned in any order. The ordering may change at any + * time. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listTasks($parent, array $optionalArgs = []) + { + $request = new ListTasksRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); + } + + /** + * Pauses the queue. + * + * If a queue is paused then the system will stop dispatching tasks + * until the queue is resumed via + * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can + * still be added when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2beta2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->pauseQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function pauseQueue($name, array $optionalArgs = []) + { + $request = new PauseQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PauseQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Purges a queue by deleting all of its tasks. + * + * All tasks created before this method is called are permanently deleted. + * + * Purge operations can take up to one minute to take effect. Tasks + * might be dispatched before the purge takes effect. A purge is irreversible. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->purgeQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function purgeQueue($name, array $optionalArgs = []) + { + $request = new PurgeQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PurgeQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Renew the current lease of a pull task. + * + * The worker can use this method to extend the lease by a new + * duration, starting from now. The new task lease will be + * returned in the task's + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $scheduleTime = new Timestamp(); + * $leaseDuration = new Duration(); + * $response = $cloudTasksClient->renewLease($formattedName, $scheduleTime, $leaseDuration); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param Timestamp $scheduleTime Required. The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. + * This restriction is to ensure that your worker currently holds the lease. + * @param Duration $leaseDuration Required. The desired new lease duration, starting from now. + * + * + * The maximum lease duration is 1 week. + * `lease_duration` will be truncated to the nearest second. + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function renewLease($name, $scheduleTime, $leaseDuration, array $optionalArgs = []) + { + $request = new RenewLeaseRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setScheduleTime($scheduleTime); + $request->setLeaseDuration($leaseDuration); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RenewLease', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Resume a queue. + * + * This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's + * [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method + * it will be set to + * [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + * + * WARNING: Resuming many high-QPS queues at the same time can + * lead to target overloading. If you are resuming high-QPS + * queues, follow the 500/50/5 pattern described in + * [Managing Cloud Tasks Scaling + * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->resumeQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function resumeQueue($name, array $optionalArgs = []) + { + $request = new ResumeQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResumeQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Forces a task to run now. + * + * When this method is called, Cloud Tasks will dispatch the task, even if + * the task is already running, the queue has reached its + * [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + * This command is meant to be used for manual debugging. For + * example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be + * used to retry a failed task after a fix has been made or to manually force + * a task to be dispatched now. + * + * The dispatched task is returned. That is, the task that is returned + * contains the [status][google.cloud.tasks.v2beta2.Task.status] after the + * task is dispatched but before the task is received by its target. + * + * If Cloud Tasks receives a successful response from the task's + * target, then the task will be deleted; otherwise the task's + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be + * reset to the time that + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus + * the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + * + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + * task that has already succeeded or permanently failed. + * + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called + * on a [pull task][google.cloud.tasks.v2beta2.PullMessage]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $response = $cloudTasksClient->runTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta2.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta2.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function runTask($name, array $optionalArgs = []) + { + $request = new RunTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy for a + * [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy. + * + * Note: The Cloud Console does not check queue-level IAM permissions yet. + * Project-level permissions are required to use the Cloud Console. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.setIamPolicy` + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $cloudTasksClient->setIamPolicy($resource, $policy); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns permissions that a caller has on a + * [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist, + * this will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $cloudTasksClient->testIamPermissions($resource, $permissions); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a queue. + * + * This method creates the queue if it does not exist and updates + * the queue if it does exist. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $queue = new Queue(); + * $response = $cloudTasksClient->updateQueue($queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param Queue $queue Required. The queue to create or update. + * + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be + * specified. + * + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be + * changed. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A mask used to specify which fields of the queue are being updated. + * + * If empty, then all fields will be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta2\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateQueue($queue, array $optionalArgs = []) + { + $request = new UpdateQueueRequest(); + $requestParamHeaders = []; + $request->setQueue($queue); + $requestParamHeaders['queue.name'] = $queue->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Update queue list by uploading a queue.yaml file. + * + * The queue.yaml file is supplied in the request body as a YAML encoded + * string. This method was added to support gcloud clients versions before + * 322.0.0. New clients should use CreateQueue instead of this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $appId = 'app_id'; + * $cloudTasksClient->uploadQueueYaml($appId); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $appId Required. The App ID is supplied as an HTTP parameter. Unlike internal + * usage of App ID, it does not include a region prefix. Rather, the App ID + * represents the Project ID against which to make the request. + * @param array $optionalArgs { + * Optional. + * + * @type HttpBody $httpBody + * The http body contains the queue.yaml file which used to update queue lists + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function uploadQueueYaml($appId, array $optionalArgs = []) + { + $request = new UploadQueueYamlRequest(); + $request->setAppId($appId); + if (isset($optionalArgs['httpBody'])) { + $request->setHttpBody($optionalArgs['httpBody']); + } + + return $this->startCall('UploadQueueYaml', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $response = $cloudTasksClient->getLocation(); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json new file mode 100644 index 000000000000..92458443760a --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json @@ -0,0 +1,133 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.tasks.v2beta2", + "libraryPackage": "Google\\Cloud\\Tasks\\V2beta2", + "services": { + "CloudTasks": { + "clients": { + "grpc": { + "libraryClient": "CloudTasksGapicClient", + "rpcs": { + "AcknowledgeTask": { + "methods": [ + "acknowledgeTask" + ] + }, + "CancelLease": { + "methods": [ + "cancelLease" + ] + }, + "CreateQueue": { + "methods": [ + "createQueue" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "DeleteQueue": { + "methods": [ + "deleteQueue" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetQueue": { + "methods": [ + "getQueue" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "LeaseTasks": { + "methods": [ + "leaseTasks" + ] + }, + "ListQueues": { + "methods": [ + "listQueues" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + }, + "PauseQueue": { + "methods": [ + "pauseQueue" + ] + }, + "PurgeQueue": { + "methods": [ + "purgeQueue" + ] + }, + "RenewLease": { + "methods": [ + "renewLease" + ] + }, + "ResumeQueue": { + "methods": [ + "resumeQueue" + ] + }, + "RunTask": { + "methods": [ + "runTask" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateQueue": { + "methods": [ + "updateQueue" + ] + }, + "UploadQueueYaml": { + "methods": [ + "uploadQueueYaml" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json new file mode 100644 index 000000000000..3e49652fe97e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json @@ -0,0 +1,160 @@ +{ + "interfaces": { + "google.cloud.tasks.v2beta2.CloudTasks": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + } + }, + "methods": { + "AcknowledgeTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CancelLease": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteQueue": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTask": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetQueue": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTask": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "LeaseTasks": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListQueues": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTasks": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PauseQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PurgeQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RenewLease": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResumeQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RunTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UploadQueueYaml": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_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/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php new file mode 100644 index 000000000000..fea53dec6f93 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php @@ -0,0 +1,62 @@ + [ + 'google.cloud.tasks.v2beta2.CloudTasks' => [ + 'ListQueues' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getQueues', + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + ], + 'GetLocation' => [ + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + ], + ], +]; diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php new file mode 100644 index 000000000000..d145d8f9e126 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php @@ -0,0 +1,288 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.tasks.v2beta2.CloudTasks' => [ + 'AcknowledgeTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CancelLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*}/queues', + 'body' => 'queue', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteQueue' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTask' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetQueue' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'LeaseTasks' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListQueues' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*}/queues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PauseQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}:pause', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'PurgeQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}:purge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RenewLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResumeQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RunTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateQueue' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta2/{queue.name=projects/*/locations/*/queues/*}', + 'body' => 'queue', + 'placeholders' => [ + 'queue.name' => [ + 'getters' => [ + 'getQueue', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php new file mode 100644 index 000000000000..e3fffafd8ee9 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php @@ -0,0 +1,1492 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudTasksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudTasksClient($options); + } + + /** @test */ + public function acknowledgeTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $scheduleTime = new Timestamp(); + $gapicClient->acknowledgeTask($formattedName, $scheduleTime); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getScheduleTime(); + $this->assertProtobufEquals($scheduleTime, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acknowledgeTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $scheduleTime = new Timestamp(); + try { + $gapicClient->acknowledgeTask($formattedName, $scheduleTime); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $scheduleTime = new Timestamp(); + $response = $gapicClient->cancelLease($formattedName, $scheduleTime); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/CancelLease', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getScheduleTime(); + $this->assertProtobufEquals($scheduleTime, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $scheduleTime = new Timestamp(); + try { + $gapicClient->cancelLease($formattedName, $scheduleTime); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queue = new Queue(); + $response = $gapicClient->createQueue($formattedParent, $queue); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/CreateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $queue = new Queue(); + try { + $gapicClient->createQueue($formattedParent, $queue); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + $response = $gapicClient->createTask($formattedParent, $task); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/CreateTask', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + try { + $gapicClient->createTask($formattedParent, $task); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $gapicClient->deleteQueue($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->deleteQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $gapicClient->deleteTask($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/DeleteTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->deleteTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->getQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/GetQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->getQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $response = $gapicClient->getTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->getTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function leaseTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new LeaseTasksResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $leaseDuration = new Duration(); + $response = $gapicClient->leaseTasks($formattedParent, $leaseDuration); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getLeaseDuration(); + $this->assertProtobufEquals($leaseDuration, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function leaseTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $leaseDuration = new Duration(); + try { + $gapicClient->leaseTasks($formattedParent, $leaseDuration); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $queuesElement = new Queue(); + $queues = [ + $queuesElement, + ]; + $expectedResponse = new ListQueuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setQueues($queues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listQueues($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/ListQueues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listQueues($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->listTasks($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->listTasks($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->pauseQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/PauseQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->pauseQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->purgeQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->purgeQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renewLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $scheduleTime = new Timestamp(); + $leaseDuration = new Duration(); + $response = $gapicClient->renewLease($formattedName, $scheduleTime, $leaseDuration); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/RenewLease', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getScheduleTime(); + $this->assertProtobufEquals($scheduleTime, $actualValue); + $actualValue = $actualRequestObject->getLeaseDuration(); + $this->assertProtobufEquals($leaseDuration, $actualValue); + $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); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $scheduleTime = new Timestamp(); + $leaseDuration = new Duration(); + try { + $gapicClient->renewLease($formattedName, $scheduleTime, $leaseDuration); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->resumeQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->resumeQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $response = $gapicClient->runTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/RunTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->runTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $queue = new Queue(); + $response = $gapicClient->updateQueue($queue); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $queue = new Queue(); + try { + $gapicClient->updateQueue($queue); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uploadQueueYamlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $appId = 'appId-1411074055'; + $gapicClient->uploadQueueYaml($appId); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/UploadQueueYaml', $actualFuncCall); + $actualValue = $actualRequestObject->getAppId(); + $this->assertProtobufEquals($appId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uploadQueueYamlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $appId = 'appId-1411074055'; + try { + $gapicClient->uploadQueueYaml($appId); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php new file mode 100644 index 000000000000..adb326f38216 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php @@ -0,0 +1,116 @@ +internalAddGeneratedFile( + ' +—( ++google/cloud/tasks/v2beta3/cloudtasks.protogoogle.cloud.tasks.v2beta3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/tasks/v2beta3/queue.proto%google/cloud/tasks/v2beta3/task.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"· +ListQueuesRequest7 +parent ( B\'àAúA!cloudtasks.googleapis.com/Queue +filter (  + page_size ( + +page_token ( 2 + read_mask ( 2.google.protobuf.FieldMaskBàA"` +ListQueuesResponse1 +queues ( 2!.google.cloud.tasks.v2beta3.Queue +next_page_token ( "| +GetQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue2 + read_mask ( 2.google.protobuf.FieldMaskBàA"„ +CreateQueueRequest7 +parent ( B\'àAúA!cloudtasks.googleapis.com/Queue5 +queue ( 2!.google.cloud.tasks.v2beta3.QueueBàA"| +UpdateQueueRequest5 +queue ( 2!.google.cloud.tasks.v2beta3.QueueBàA/ + update_mask ( 2.google.protobuf.FieldMask"K +DeleteQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"J +PurgeQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"J +PauseQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"K +ResumeQueueRequest5 +name ( B\'àAúA! +cloudtasks.googleapis.com/Queue"¯ +ListTasksRequest6 +parent ( B&àAúA cloudtasks.googleapis.com/Task< + response_view (2%.google.cloud.tasks.v2beta3.Task.View + page_size ( + +page_token ( "] +ListTasksResponse/ +tasks ( 2 .google.cloud.tasks.v2beta3.Task +next_page_token ( "„ +GetTaskRequest4 +name ( B&àAúA +cloudtasks.googleapis.com/Task< + response_view (2%.google.cloud.tasks.v2beta3.Task.View"¾ +CreateTaskRequest6 +parent ( B&àAúA cloudtasks.googleapis.com/Task3 +task ( 2 .google.cloud.tasks.v2beta3.TaskBàA< + response_view (2%.google.cloud.tasks.v2beta3.Task.View"I +DeleteTaskRequest4 +name ( B&àAúA +cloudtasks.googleapis.com/Task"„ +RunTaskRequest4 +name ( B&àAúA +cloudtasks.googleapis.com/Task< + response_view (2%.google.cloud.tasks.v2beta3.Task.View2¥ + +CloudTasks­ + +ListQueues-.google.cloud.tasks.v2beta3.ListQueuesRequest..google.cloud.tasks.v2beta3.ListQueuesResponse"@ÚAparent‚Óä“1//v2beta3/{parent=projects/*/locations/*}/queuesš +GetQueue+.google.cloud.tasks.v2beta3.GetQueueRequest!.google.cloud.tasks.v2beta3.Queue">ÚAname‚Óä“1//v2beta3/{name=projects/*/locations/*/queues/*}¯ + CreateQueue..google.cloud.tasks.v2beta3.CreateQueueRequest!.google.cloud.tasks.v2beta3.Queue"MÚA parent,queue‚Óä“8"//v2beta3/{parent=projects/*/locations/*}/queues:queueº + UpdateQueue..google.cloud.tasks.v2beta3.UpdateQueueRequest!.google.cloud.tasks.v2beta3.Queue"XÚAqueue,update_mask‚Óä“>25/v2beta3/{queue.name=projects/*/locations/*/queues/*}:queue• + DeleteQueue..google.cloud.tasks.v2beta3.DeleteQueueRequest.google.protobuf.Empty">ÚAname‚Óä“1*//v2beta3/{name=projects/*/locations/*/queues/*}§ + +PurgeQueue-.google.cloud.tasks.v2beta3.PurgeQueueRequest!.google.cloud.tasks.v2beta3.Queue"GÚAname‚Óä“:"5/v2beta3/{name=projects/*/locations/*/queues/*}:purge:*§ + +PauseQueue-.google.cloud.tasks.v2beta3.PauseQueueRequest!.google.cloud.tasks.v2beta3.Queue"GÚAname‚Óä“:"5/v2beta3/{name=projects/*/locations/*/queues/*}:pause:*ª + ResumeQueue..google.cloud.tasks.v2beta3.ResumeQueueRequest!.google.cloud.tasks.v2beta3.Queue"HÚAname‚Óä“;"6/v2beta3/{name=projects/*/locations/*/queues/*}:resume:*¡ + GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"VÚAresource‚Óä“E"@/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy:*¨ + SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"]ÚAresource,policy‚Óä“E"@/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy:*Ó +TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"hÚAresource,permissions‚Óä“K"F/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions:*² + ListTasks,.google.cloud.tasks.v2beta3.ListTasksRequest-.google.cloud.tasks.v2beta3.ListTasksResponse"HÚAparent‚Óä“97/v2beta3/{parent=projects/*/locations/*/queues/*}/tasksŸ +GetTask*.google.cloud.tasks.v2beta3.GetTaskRequest .google.cloud.tasks.v2beta3.Task"FÚAname‚Óä“97/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}¯ + +CreateTask-.google.cloud.tasks.v2beta3.CreateTaskRequest .google.cloud.tasks.v2beta3.Task"PÚA parent,task‚Óä“<"7/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks:*› + +DeleteTask-.google.cloud.tasks.v2beta3.DeleteTaskRequest.google.protobuf.Empty"FÚAname‚Óä“9*7/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}¦ +RunTask*.google.cloud.tasks.v2beta3.RunTaskRequest .google.cloud.tasks.v2beta3.Task"MÚAname‚Óä“@";/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run:*MÊAcloudtasks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB€ +com.google.cloud.tasks.v2beta3BCloudTasksProtoPZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb¢TASKSbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Queue.php b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Queue.php new file mode 100644 index 0000000000000000000000000000000000000000..bb64862a08116894b48971470b8d8d6688147eef GIT binary patch literal 2709 zcmbVOe^1*+7;b<7eFKPDWipx8Uem6m+U8X0R%u~uN=Sf63^Ed?b+TkR_9a~F*sgs> zWmUe(KF+?tzQO*S_9^z>ogJb!4QNOa{_#BT`JVTA?(X{^!;26ekwfa!$mY}~{VT#R zC<&v02TtITeli%)h&aJ0WFCzSLYk-K@M3g6yzbn666c|sg%o%FcLuMW@>bVViVPCQ!s@1M%bzS6R)H9m) z?$)ds?ZIY6sKM<=o=DnE&~ey_|3U3B^bog4;cTw#;@3a0v}bkKowVoxO4 zKR4jX?cA#s70!?@H>Asr)aAwPw1yqBN|Z{gOkXs2=G5m>z!Z5u1T0-B|p)p4Vzh+*n_elc3S)GgLbRAc}FY2%GvqJN&Dn*Gp7M8ck1U|e6fI5 zUv0L#^~N#YEta0alK39&9&GkrcHS?t3QL{y<72EKuewK@3pLaHxBe0yNR3peRT?nL zv4LA(Mb1)tfjxdj9UfQSrB~yM7dUbi!)Mv$SZ#Rt*W7qM zBZ@^g9kC3b&Fo-`6e^|2FF>bw7{lYsCACy>+&;xTsgx!shi=4hA1ym4_YEaQN1Sas zx!?BH(vYqH==Nctj&V|>3Wgv%$Xy2{?C(zB^q1xG_k3rvwSJ{eH&ch9SRU499E2oN K9aqLM2KW!{ENd(P literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Target.php b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Target.php new file mode 100644 index 0000000000000000000000000000000000000000..60a36d89fa8ad8943c2ca79a34d02d289b79584f GIT binary patch literal 3007 zcmc&$+iu%N5RERDqLJ(>ted({Td-iDShKQb-d==QCzxN1aV>fok6A!Op?9mglJyTefQ zBHB4?j4?wG_#2&IR+lyb0yM)>h#agR4BCfWz(ov=4y5|1Bh*KhP#-;Sw1xUEfa9Ym z(k*EQegmEV!g%a^jvg_@_}^VGvc14#9`e1H+>1T^6!{V6s+VO?plGf&_D!&2Vv9?7^VU8M_n8_)C(D*11{QZa@W%EiIc7ElCw?2D=isFz_mUlF05q_7WT|*G;e8=hSSafVf5gnFq|2MUoh#WO6w zuQclQtKrt?6zfB&)w}U~CZpYg{FFpY;p}CSqmWRxmgCTKy{tHT0?PugO%eyz^88!5 zv9;*NHym!kit;G6up}*PFS77vP!N0;Q!j;JK-#cKs_ZKd&ek+t~<%sm^* z%ptc@dk6&;8|^k|!%ojQH0+b3;lSwh_xnb-dPBPj`JQDBsu`^WOX6u*&DO?n``re$ zZP++D?%U>b-B%G6kC ze6vVfT+VwIm)1#CgpgxJba%81;5^t>S>zqL7AYKCm$m(aImKGW+580 z#lsUC^Vv+U*L09iP|zOogqKQs%q9vSh<9` zpn{OZ{{Es1Uo)4u-o6d1!ec_cm%NXYz*fd;|74*oq>nK#rickpG4&Hr|A{pNit3IF zvc7*G;siqiIWhu9&qZGw6Zc%UhYHWb|BtykR1_x(vIYD#vp;064EY4KRu~$=#0#(p zJ?}{|)}Fx~6o$M7iDR3Rn0dh@P56ZLdy7Jt8a-CZwZF2knjX%R{1&fbx?H~+d!Stg zD$};y_#k{5pGg$^JRQ%l&AW@74khjAb>8GE9)OfV$FhT8p0&5 zVlYRTo_UTMlO=J$r&z?xN|moxg_~Z$w-LVcBwq0}mP1iYxl*kO@VcXDU%)4cJsUX= zi34Wi8S*Zwkhg}&Az{)QYLB3l_LKLiavUgjJuGm@wc*=Hwe_U4-hofW#IX+zt7mrK z8XtTx4a}j%r$!NS2ZmM6%2{Q!y49RG8k|_wyqG9m{&1}&@8s}^`4DVhVT zZypV+#WsU4`C7Yx#&%gXYPkarGQV`xdUUaTklD_JsD)SUyD0Q7R$eJ7Ps8!<{L8o? c*Wd@6>AH4LZGm%3R5U)EYZ5SuZgrW8Fq2tmPaj{KWoqnmZtnk022HM6*(hL{`2sB08++>NB zs18}+SJ+$ZdG;QAiXBNw$!5bdrZ1An``wYh``z95uf#;4$M}RrEFqEwczA{7gkh1y zGNy5ehuLVv5=`T%;2}$FjJv1!-RTAHb^8}z0W^)XgfbV8<9Hl0hlX($IFh8lq|V3Y zkV$f&|7`6Mp@>XbDhOrxWYB&K+X0cpJJDdTqrl#U0(+OuwgMj_L_?CMSgoRKgy9j{ zFys`cl1O+x;i=CfE;$MLZ*YSnJR)Jr061?u$|5Rx9AO1GjVNn8!^WqweIjDG@ewYL zGf*S|0bW0nEQv_yby-RiE@Yexz|?ieOqSHCmBzC?ta8UkxM9xdx^ss-!ZOL&?dTXM zOlC=RsL!n&%*ros0a-14@Inz{_dmPP!|HI$_aAz^8GLWy)O%ja)XDtK_aN5bd{xMWAFEMR8{3+)lgN{ zSG|HOjScG@JtRW-EE@BO`4cIHpRf-Z&|d!p3^tqJ*~a6di`gw9dK&o}fM*8x`i}Jq z)&AjWQ+x9Em${nrAhIy@A^#~Ev-;Kw9tHq-YwY0+&(T&&CoIT9<|~rwRqbN8I77j( zU5dj)s*&8N$vDP7r@V7&JnRn^=29PM28dq4W`-<=P7o&IsZ*WI~eZJ@Pw>%8CDsaW?> z_4xgpH#>LT$zLso9_dS%sxf*af~Pi26i17;1L^viQJFf|`Pa+|W2zeqtQDU#2c!$) zb*}Y$md}`L<#^WKMm0gM!k7fUyb^5h&kDL%5H%+kRUVtoWpV*XnMbX#yQ@IT6l;j7 zv1L)dMxT}tQ_#7Rts)~(>b7Zl?F5L7r^UtsVYD|CodY$q29=*W#-b>2AbT8};jA;^ sKn{xWe3KtBJiPrgT-TL!uwQo0Z_L!XHRRN}IbAT|w56FvGc-f!Zvwo*j{pDw literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php new file mode 100644 index 000000000000..685601b84245 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php @@ -0,0 +1,114 @@ +google.cloud.tasks.v2beta3.AppEngineHttpQueue + */ +class AppEngineHttpQueue extends \Google\Protobuf\Internal\Message +{ + /** + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing_override = 1; + */ + protected $app_engine_routing_override = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta3\AppEngineRouting $app_engine_routing_override + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing_override = 1; + * @return \Google\Cloud\Tasks\V2beta3\AppEngineRouting|null + */ + public function getAppEngineRoutingOverride() + { + return $this->app_engine_routing_override; + } + + public function hasAppEngineRoutingOverride() + { + return isset($this->app_engine_routing_override); + } + + public function clearAppEngineRoutingOverride() + { + unset($this->app_engine_routing_override); + } + + /** + * Overrides for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * If set, `app_engine_routing_override` is used for all tasks in + * the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing_override = 1; + * @param \Google\Cloud\Tasks\V2beta3\AppEngineRouting $var + * @return $this + */ + public function setAppEngineRoutingOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineRouting::class); + $this->app_engine_routing_override = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php new file mode 100644 index 000000000000..7257325270f2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php @@ -0,0 +1,478 @@ +google.cloud.tasks.v2beta3.AppEngineHttpRequest + */ +class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 1; + */ + protected $http_method = 0; + /** + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing = 2; + */ + protected $app_engine_routing = null; + /** + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_uri = 3; + */ + protected $relative_uri = ''; + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks + * sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * documentation. + * + * Generated from protobuf field map headers = 4; + */ + private $headers; + /** + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * + * Generated from protobuf field bytes body = 5; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $http_method + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * @type \Google\Cloud\Tasks\V2beta3\AppEngineRouting $app_engine_routing + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * @type string $relative_uri + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * @type array|\Google\Protobuf\Internal\MapField $headers + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks + * sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * documentation. + * @type string $body + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 1; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. The default is POST. + * The app's request handler for the task's target URL must be able to handle + * HTTP requests with this http_method, otherwise the task attempt fails with + * error code 405 (Method Not Allowed). See [Writing a push task request + * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + * and the App Engine documentation for your runtime on [How Requests are + * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 1; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing = 2; + * @return \Google\Cloud\Tasks\V2beta3\AppEngineRouting|null + */ + public function getAppEngineRouting() + { + return $this->app_engine_routing; + } + + public function hasAppEngineRouting() + { + return isset($this->app_engine_routing); + } + + public function clearAppEngineRouting() + { + unset($this->app_engine_routing); + } + + /** + * Task-level setting for App Engine routing. + * If set, + * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] + * is used for all tasks in the queue, no matter what the setting is for the + * [task-level + * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing = 2; + * @param \Google\Cloud\Tasks\V2beta3\AppEngineRouting $var + * @return $this + */ + public function setAppEngineRouting($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineRouting::class); + $this->app_engine_routing = $var; + + return $this; + } + + /** + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_uri = 3; + * @return string + */ + public function getRelativeUri() + { + return $this->relative_uri; + } + + /** + * The relative URI. + * The relative URI must begin with "/" and must be a valid HTTP relative URI. + * It can contain a path and query string arguments. + * If the relative URI is empty, then the root path "/" will be used. + * No spaces are allowed, and the maximum length allowed is 2083 characters. + * + * Generated from protobuf field string relative_uri = 3; + * @param string $var + * @return $this + */ + public function setRelativeUri($var) + { + GPBUtil::checkString($var, True); + $this->relative_uri = $var; + + return $this; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks + * sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * documentation. + * + * Generated from protobuf field map headers = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * Repeated headers are not supported but a header value can contain commas. + * Cloud Tasks sets some headers to default values: + * * `User-Agent`: By default, this header is + * `"AppEngine-Google; (+http://code.google.com/appengine)"`. + * This header can be modified, but Cloud Tasks will append + * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + * modified `User-Agent`. + * If the task has a + * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks + * sets the following headers: + * * `Content-Type`: By default, the `Content-Type` header is set to + * `"application/octet-stream"`. The default can be overridden by explicitly + * setting `Content-Type` to a particular media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/json"`. + * * `Content-Length`: This is computed by Cloud Tasks. This value is + * output only. It cannot be changed. + * The headers below cannot be set or overridden: + * * `Host` + * * `X-Google-*` + * * `X-AppEngine-*` + * In addition, Cloud Tasks sets some headers when the task is dispatched, + * such as headers containing information about the task; see + * [request + * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). + * These headers are set only when the task is dispatched, so they are not + * visible when the task is returned in a Cloud Tasks response. + * Although there is no specific limit for the maximum number of headers or + * the size, there is a limit on the maximum size of the + * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * documentation. + * + * Generated from protobuf field map headers = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * + * Generated from protobuf field bytes body = 5; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * HTTP request body. + * A request body is allowed only if the HTTP method is POST or PUT. It is + * an error to set a body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * + * Generated from protobuf field bytes body = 5; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php new file mode 100644 index 000000000000..2546c50f732f --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php @@ -0,0 +1,380 @@ +google.cloud.tasks.v2beta3.AppEngineRouting + */ +class AppEngineRouting extends \Google\Protobuf\Internal\Message +{ + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string service = 1; + */ + protected $service = ''; + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + */ + protected $instance = ''; + /** + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks + * which were created using the App Engine SDK might have a custom domain + * name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * + * Generated from protobuf field string host = 4; + */ + protected $host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * @type string $version + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * @type string $instance + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * @type string $host + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks + * which were created using the App Engine SDK might have a custom domain + * name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string service = 1; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * App service. + * By default, the task is sent to the service which is the default + * service when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string service = 1; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * App version. + * By default, the task is sent to the version which is the default + * version when the task is attempted. + * For some queues or tasks which were created using the App Engine + * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is + * not parsable into + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For + * example, some tasks which were created using the App Engine SDK use a + * custom domain name; custom domains are not parsed by Cloud Tasks. If + * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, + * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the + * empty string. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * App instance. + * By default, the task is sent to an instance which is available when + * the task is attempted. + * Requests can only be sent to a specific instance if + * [manual scaling is used in App Engine + * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + * App Engine Flex does not support instances. For more information, see + * [App Engine Standard request + * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) + * and [App Engine Flex request + * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). + * + * Generated from protobuf field string instance = 3; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks + * which were created using the App Engine SDK might have a custom domain + * name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * + * Generated from protobuf field string host = 4; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Output only. The host that the task is sent to. + * The host is constructed from the domain name of the app associated with + * the queue's project ID (for example .appspot.com), and the + * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], + * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and + * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks + * which were created using the App Engine SDK might have a custom domain + * name. + * For more information, see + * [How Requests are + * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). + * + * Generated from protobuf field string host = 4; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php new file mode 100644 index 000000000000..e9dc7a0cad3a --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php @@ -0,0 +1,229 @@ +google.cloud.tasks.v2beta3.Attempt + */ +class Attempt extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + */ + protected $schedule_time = null; + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + */ + protected $dispatch_time = null; + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + */ + protected $response_time = null; + /** + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + */ + protected $response_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $schedule_time + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $dispatch_time + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $response_time + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * @type \Google\Rpc\Status $response_status + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Task::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Output only. The time that this attempt was scheduled. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDispatchTime() + { + return $this->dispatch_time; + } + + public function hasDispatchTime() + { + return isset($this->dispatch_time); + } + + public function clearDispatchTime() + { + unset($this->dispatch_time); + } + + /** + * Output only. The time that this attempt was dispatched. + * `dispatch_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDispatchTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->dispatch_time = $var; + + return $this; + } + + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getResponseTime() + { + return $this->response_time; + } + + public function hasResponseTime() + { + return isset($this->response_time); + } + + public function clearResponseTime() + { + unset($this->response_time); + } + + /** + * Output only. The time that this attempt response was received. + * `response_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setResponseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->response_time = $var; + + return $this; + } + + /** + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + * @return \Google\Rpc\Status|null + */ + public function getResponseStatus() + { + return $this->response_status; + } + + public function hasResponseStatus() + { + return isset($this->response_status); + } + + public function clearResponseStatus() + { + unset($this->response_status); + } + + /** + * Output only. The response from the worker for this attempt. + * If `response_time` is unset, then the task has not been attempted or is + * currently running and the `response_status` field is meaningless. + * + * Generated from protobuf field .google.rpc.Status response_status = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setResponseStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->response_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php new file mode 100644 index 000000000000..55733073e210 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php @@ -0,0 +1,136 @@ +google.cloud.tasks.v2beta3.CreateQueueRequest + */ +class CreateQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + * an existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $queue = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @type \Google\Cloud\Tasks\V2beta3\Queue $queue + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + * an existing queue. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * 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 name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * + * 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 queue to create. + * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + * an existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2beta3\Queue|null + */ + public function getQueue() + { + return $this->queue; + } + + public function hasQueue() + { + return isset($this->queue); + } + + public function clearQueue() + { + unset($this->queue); + } + + /** + * Required. The queue to create. + * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + * an existing queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2beta3\Queue $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Queue::class); + $this->queue = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php new file mode 100644 index 000000000000..2639a9271c86 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php @@ -0,0 +1,302 @@ +google.cloud.tasks.v2beta3.CreateTaskRequest + */ +class CreateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 3; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * @type \Google\Cloud\Tasks\V2beta3\Task $task + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * 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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * The queue must already exist. + * + * 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 task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2beta3\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. The task to add. + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * Task De-duplication: + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or executed. + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2beta3\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Task::class); + $this->task = $var; + + return $this; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 3; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 3; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php new file mode 100644 index 000000000000..0eebfa9c696d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta3.DeleteQueueRequest + */ +class DeleteQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php new file mode 100644 index 000000000000..d9576067cf94 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta3.DeleteTaskRequest + */ +class DeleteTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php new file mode 100644 index 000000000000..2d6609e8a7f1 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php @@ -0,0 +1,128 @@ +google.cloud.tasks.v2beta3.GetQueueRequest + */ +class GetQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php new file mode 100644 index 000000000000..1f16efccdc25 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php @@ -0,0 +1,146 @@ +google.cloud.tasks.v2beta3.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php new file mode 100644 index 000000000000..0c8164234fca --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php @@ -0,0 +1,96 @@ +google.cloud.tasks.v2beta3.HttpMethod + */ +class HttpMethod +{ + /** + * HTTP method unspecified + * + * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; + */ + const HTTP_METHOD_UNSPECIFIED = 0; + /** + * HTTP POST + * + * Generated from protobuf enum POST = 1; + */ + const POST = 1; + /** + * HTTP GET + * + * Generated from protobuf enum GET = 2; + */ + const GET = 2; + /** + * HTTP HEAD + * + * Generated from protobuf enum HEAD = 3; + */ + const HEAD = 3; + /** + * HTTP PUT + * + * Generated from protobuf enum PUT = 4; + */ + const PUT = 4; + /** + * HTTP DELETE + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * HTTP PATCH + * + * Generated from protobuf enum PATCH = 6; + */ + const PATCH = 6; + /** + * HTTP OPTIONS + * + * Generated from protobuf enum OPTIONS = 7; + */ + const OPTIONS = 7; + + private static $valueToName = [ + self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', + self::POST => 'POST', + self::GET => 'GET', + self::HEAD => 'HEAD', + self::PUT => 'PUT', + self::DELETE => 'DELETE', + self::PATCH => 'PATCH', + self::OPTIONS => 'OPTIONS', + ]; + + 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php new file mode 100644 index 000000000000..2177366bab53 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php @@ -0,0 +1,433 @@ +google.cloud.tasks.v2beta3.HttpRequest + */ +class HttpRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + protected $http_method = 0; + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + */ + private $headers; + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + */ + protected $body = ''; + protected $authorization_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * @type int $http_method + * The HTTP method to use for the request. The default is POST. + * @type array|\Google\Protobuf\Internal\MapField $headers + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * @type string $body + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * @type \Google\Cloud\Tasks\V2beta3\OAuthToken $oauth_token + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * @type \Google\Cloud\Tasks\V2beta3\OidcToken $oidc_token + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Required. The full url path that the request will be sent to. + * This string must begin with either "http://" or "https://". Some examples + * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will + * encode some characters for safety and compatibility. The maximum allowed + * URL length is 2083 characters after encoding. + * The `Location` header response from a redirect response [`300` - `399`] + * may be followed. The redirect is not counted as a separate attempt. + * + * 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; + } + + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. The default is POST. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * HTTP request headers. + * This map contains the header field names and values. + * Headers can be set when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * These headers represent a subset of the headers that will accompany the + * task's HTTP request. Some HTTP request headers will be ignored or replaced. + * A partial list of headers that will be ignored or replaced is: + * * Any header that is prefixed with "X-CloudTasks-" will be treated + * as service header. Service headers define properties of the task and are + * predefined in CloudTask. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * * `X-Google-*`: Google use only. + * * `X-AppEngine-*`: Google use only. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example, `Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * + * Generated from protobuf field map headers = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * HTTP request body. + * A request body is allowed only if the + * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, + * PUT, or PATCH. It is an error to set body on a task with an incompatible + * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. + * + * Generated from protobuf field bytes body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * @return \Google\Cloud\Tasks\V2beta3\OAuthToken|null + */ + public function getOauthToken() + { + return $this->readOneof(5); + } + + public function hasOauthToken() + { + return $this->hasOneof(5); + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as an `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * @param \Google\Cloud\Tasks\V2beta3\OAuthToken $var + * @return $this + */ + public function setOauthToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OAuthToken::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * @return \Google\Cloud\Tasks\V2beta3\OidcToken|null + */ + public function getOidcToken() + { + return $this->readOneof(6); + } + + public function hasOidcToken() + { + return $this->hasOneof(6); + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * @param \Google\Cloud\Tasks\V2beta3\OidcToken $var + * @return $this + */ + public function setOidcToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OidcToken::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthorizationHeader() + { + return $this->whichOneof("authorization_header"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php new file mode 100644 index 000000000000..4f15822f4ebc --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php @@ -0,0 +1,367 @@ +google.cloud.tasks.v2beta3.HttpTarget + */ +class HttpTarget extends \Google\Protobuf\Internal\Message +{ + /** + * URI override. + * When specified, overrides the execution URI for all the tasks in the queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + */ + protected $uri_override = null; + /** + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + */ + protected $http_method = 0; + /** + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or + * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will be configured for + * the task's HTTP request. Some HTTP request headers will be ignored or + * replaced. + * A partial list of headers that will be ignored or replaced is: + * * Several predefined headers, prefixed with "X-CloudTasks-", can + * be used to define properties of the task. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example,`Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. The default value is set to `"application/json"`. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + */ + private $header_overrides; + protected $authorization_header; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta3\UriOverride $uri_override + * URI override. + * When specified, overrides the execution URI for all the tasks in the queue. + * @type int $http_method + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * @type array<\Google\Cloud\Tasks\V2beta3\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $header_overrides + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or + * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will be configured for + * the task's HTTP request. Some HTTP request headers will be ignored or + * replaced. + * A partial list of headers that will be ignored or replaced is: + * * Several predefined headers, prefixed with "X-CloudTasks-", can + * be used to define properties of the task. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example,`Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. The default value is set to `"application/json"`. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * @type \Google\Cloud\Tasks\V2beta3\OAuthToken $oauth_token + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as the `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * @type \Google\Cloud\Tasks\V2beta3\OidcToken $oidc_token + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * URI override. + * When specified, overrides the execution URI for all the tasks in the queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * @return \Google\Cloud\Tasks\V2beta3\UriOverride|null + */ + public function getUriOverride() + { + return $this->uri_override; + } + + public function hasUriOverride() + { + return isset($this->uri_override); + } + + public function clearUriOverride() + { + unset($this->uri_override); + } + + /** + * URI override. + * When specified, overrides the execution URI for all the tasks in the queue. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; + * @param \Google\Cloud\Tasks\V2beta3\UriOverride $var + * @return $this + */ + public function setUriOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\UriOverride::class); + $this->uri_override = $var; + + return $this; + } + + /** + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * @return int + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * The HTTP method to use for the request. + * When specified, it overrides + * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the + * task. Note that if the value is set to [HttpMethod][GET] the + * [HttpRequest][body] of the task will be ignored at execution time. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; + * @param int $var + * @return $this + */ + public function setHttpMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\HttpMethod::class); + $this->http_method = $var; + + return $this; + } + + /** + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or + * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will be configured for + * the task's HTTP request. Some HTTP request headers will be ignored or + * replaced. + * A partial list of headers that will be ignored or replaced is: + * * Several predefined headers, prefixed with "X-CloudTasks-", can + * be used to define properties of the task. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example,`Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. The default value is set to `"application/json"`. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaderOverrides() + { + return $this->header_overrides; + } + + /** + * HTTP target headers. + * This map contains the header field names and values. + * Headers will be set when running the + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or + * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. + * These headers represent a subset of the headers that will be configured for + * the task's HTTP request. Some HTTP request headers will be ignored or + * replaced. + * A partial list of headers that will be ignored or replaced is: + * * Several predefined headers, prefixed with "X-CloudTasks-", can + * be used to define properties of the task. + * * Host: This will be computed by Cloud Tasks and derived from + * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. + * * Content-Length: This will be computed by Cloud Tasks. + * `Content-Type` won't be set by Cloud Tasks. You can explicitly set + * `Content-Type` to a media type when the + * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * For example,`Content-Type` can be set to `"application/octet-stream"` or + * `"application/json"`. The default value is set to `"application/json"`. + * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. + * Headers which can have multiple values (according to RFC2616) can be + * specified using comma-separated values. + * The size of the headers must be less than 80KB. + * Queue-level headers to override headers of all the tasks in the queue. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; + * @param array<\Google\Cloud\Tasks\V2beta3\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaderOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta3\HttpTarget\HeaderOverride::class); + $this->header_overrides = $arr; + + return $this; + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as the `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * @return \Google\Cloud\Tasks\V2beta3\OAuthToken|null + */ + public function getOauthToken() + { + return $this->readOneof(5); + } + + public function hasOauthToken() + { + return $this->hasOneof(5); + } + + /** + * If specified, an + * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) + * will be generated and attached as the `Authorization` header in the HTTP + * request. + * This type of authorization should generally only be used when calling + * Google APIs hosted on *.googleapis.com. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; + * @param \Google\Cloud\Tasks\V2beta3\OAuthToken $var + * @return $this + */ + public function setOauthToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OAuthToken::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * @return \Google\Cloud\Tasks\V2beta3\OidcToken|null + */ + public function getOidcToken() + { + return $this->readOneof(6); + } + + public function hasOidcToken() + { + return $this->hasOneof(6); + } + + /** + * If specified, an + * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) + * token will be generated and attached as an `Authorization` header in the + * HTTP request. + * This type of authorization can be used for many scenarios, including + * calling Cloud Run, or endpoints where you intend to validate the token + * yourself. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; + * @param \Google\Cloud\Tasks\V2beta3\OidcToken $var + * @return $this + */ + public function setOidcToken($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OidcToken::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthorizationHeader() + { + return $this->whichOneof("authorization_header"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php new file mode 100644 index 000000000000..ad3499f31d87 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php @@ -0,0 +1,104 @@ +google.cloud.tasks.v2beta3.HttpTarget.Header + */ +class Header extends \Google\Protobuf\Internal\Message +{ + /** + * The Key of the header. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The Value of the header. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The Key of the header. + * @type string $value + * The Value of the header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * The Key of the header. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The Key of the header. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The Value of the header. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The Value of the header. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Header::class, \Google\Cloud\Tasks\V2beta3\HttpTarget_Header::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php new file mode 100644 index 000000000000..4f9f1eea5497 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php @@ -0,0 +1,80 @@ +google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride + */ +class HeaderOverride extends \Google\Protobuf\Internal\Message +{ + /** + * header embodying a key and a value. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + */ + protected $header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta3\HttpTarget\Header $header + * header embodying a key and a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * header embodying a key and a value. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * @return \Google\Cloud\Tasks\V2beta3\HttpTarget\Header|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * header embodying a key and a value. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; + * @param \Google\Cloud\Tasks\V2beta3\HttpTarget\Header $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\HttpTarget\Header::class); + $this->header = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HeaderOverride::class, \Google\Cloud\Tasks\V2beta3\HttpTarget_HeaderOverride::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php new file mode 100644 index 000000000000..4bd825aa7a6d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php @@ -0,0 +1,310 @@ +google.cloud.tasks.v2beta3.ListQueuesRequest + */ +class ListQueuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @type string $filter + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * @type int $page_size + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * @type string $page_token + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_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 location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_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; + } + + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * Sample filter "state: PAUSED". + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * + * 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; + } + + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. + * The maximum page size is 9800. If unspecified, the page size will + * be the maximum. Fewer queues than requested might be returned, + * even if more queues exist; use the + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * in the response to determine if more queues exist. + * + * 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 token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] + * returned from the previous call to + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It + * is an error to switch the value of the + * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while + * iterating through pages. + * + * 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; + } + + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php new file mode 100644 index 000000000000..cf56f8b14ac2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php @@ -0,0 +1,126 @@ +google.cloud.tasks.v2beta3.ListQueuesResponse + */ +class ListQueuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Queue queues = 1; + */ + private $queues; + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Tasks\V2beta3\Queue>|\Google\Protobuf\Internal\RepeatedField $queues + * The list of queues. + * @type string $next_page_token + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Queue queues = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQueues() + { + return $this->queues; + } + + /** + * The list of queues. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Queue queues = 1; + * @param array<\Google\Cloud\Tasks\V2beta3\Queue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQueues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta3\Queue::class); + $this->queues = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * 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. + * To return the next page of results, call + * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * The page token is valid for only 2 hours. + * + * 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php new file mode 100644 index 000000000000..c3e901881b52 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php @@ -0,0 +1,258 @@ +google.cloud.tasks.v2beta3.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + */ + protected $response_view = 0; + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * @type int $page_size + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * @type string $page_token + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); + $this->response_view = $var; + + return $this; + } + + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum page size. + * Fewer tasks than requested might be returned, even if more tasks exist; use + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * in the response to determine if more tasks exist. + * The maximum page size is 1000. If unspecified, the page size will be the + * maximum. + * + * 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 token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. + * To request the first page results, page_token must be empty. To + * request the next page of results, page_token must be the value of + * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] + * returned from the previous call to + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. + * The page token is valid for only 2 hours. + * + * 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php new file mode 100644 index 000000000000..f304ef62c9fa --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php @@ -0,0 +1,122 @@ +google.cloud.tasks.v2beta3.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Task tasks = 1; + */ + private $tasks; + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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 array<\Google\Cloud\Tasks\V2beta3\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The list of tasks. + * @type string $next_page_token + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. + * If the next_page_token is empty, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The list of tasks. + * + * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Task tasks = 1; + * @param array<\Google\Cloud\Tasks\V2beta3\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta3\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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 token to retrieve next page of results. + * To return the next page of results, call + * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this + * value as the + * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. + * If the next_page_token is empty, 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php new file mode 100644 index 000000000000..792276e9814c --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php @@ -0,0 +1,128 @@ +google.cloud.tasks.v2beta3.OAuthToken + */ +class OAuthToken extends \Google\Protobuf\Internal\Message +{ + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + */ + protected $service_account_email = ''; + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + */ + protected $scope = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_email + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * @type string $scope + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OAuth token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * OAuth scope to be used for generating OAuth access token. + * If not specified, "https://www.googleapis.com/auth/cloud-platform" + * will be used. + * + * Generated from protobuf field string scope = 2; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php new file mode 100644 index 000000000000..3a02f601f855 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php @@ -0,0 +1,126 @@ +google.cloud.tasks.v2beta3.OidcToken + */ +class OidcToken extends \Google\Protobuf\Internal\Message +{ + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + */ + protected $service_account_email = ''; + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + */ + protected $audience = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_account_email + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * @type string $audience + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @return string + */ + public function getServiceAccountEmail() + { + return $this->service_account_email; + } + + /** + * [Service account email](https://cloud.google.com/iam/docs/service-accounts) + * to be used for generating OIDC token. + * The service account must be within the same project as the queue. The + * caller must have iam.serviceAccounts.actAs permission for the service + * account. + * + * Generated from protobuf field string service_account_email = 1; + * @param string $var + * @return $this + */ + public function setServiceAccountEmail($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email = $var; + + return $this; + } + + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Audience to be used when generating OIDC token. If not specified, the URI + * specified in target will be used. + * + * Generated from protobuf field string audience = 2; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php new file mode 100644 index 000000000000..152a9f931481 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php @@ -0,0 +1,68 @@ +google.cloud.tasks.v2beta3.PathOverride + */ +class PathOverride extends \Google\Protobuf\Internal\Message +{ + /** + * The URI path (e.g., /users/1234). Default is an empty string. + * + * Generated from protobuf field string path = 1; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * The URI path (e.g., /users/1234). Default is an empty string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * The URI path (e.g., /users/1234). Default is an empty string. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * The URI path (e.g., /users/1234). Default is an empty string. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php new file mode 100644 index 000000000000..574132cc393e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta3.PauseQueueRequest + */ +class PauseQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php new file mode 100644 index 000000000000..b6d4df5107a3 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php @@ -0,0 +1,132 @@ +google.cloud.tasks.v2beta3.PullMessage + */ +class PullMessage extends \Google\Protobuf\Internal\Message +{ + /** + * A data payload consumed by the worker to execute the task. + * + * Generated from protobuf field bytes payload = 1; + */ + protected $payload = ''; + /** + * The tasks's tag. + * The tag is less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * + * Generated from protobuf field string tag = 2; + */ + protected $tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $payload + * A data payload consumed by the worker to execute the task. + * @type string $tag + * The tasks's tag. + * The tag is less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * A data payload consumed by the worker to execute the task. + * + * Generated from protobuf field bytes payload = 1; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * A data payload consumed by the worker to execute the task. + * + * Generated from protobuf field bytes payload = 1; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + + /** + * The tasks's tag. + * The tag is less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * + * Generated from protobuf field string tag = 2; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * The tasks's tag. + * The tag is less than 500 characters. + * SDK compatibility: Although the SDK allows tags to be either + * string or + * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + * encoded, the tag will be empty when the task is returned by Cloud Tasks. + * + * Generated from protobuf field string tag = 2; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php new file mode 100644 index 000000000000..6ab84bcbdaa0 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta3.PurgeQueueRequest + */ +class PurgeQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php new file mode 100644 index 000000000000..7614b5722bbb --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta3.QueryOverride + */ +class QueryOverride extends \Google\Protobuf\Internal\Message +{ + /** + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * + * Generated from protobuf field string query_params = 1; + */ + protected $query_params = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_params + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * + * Generated from protobuf field string query_params = 1; + * @return string + */ + public function getQueryParams() + { + return $this->query_params; + } + + /** + * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty + * string. + * + * Generated from protobuf field string query_params = 1; + * @param string $var + * @return $this + */ + public function setQueryParams($var) + { + GPBUtil::checkString($var, True); + $this->query_params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php new file mode 100644 index 000000000000..f670e0985645 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php @@ -0,0 +1,883 @@ +google.cloud.tasks.v2beta3.Queue + */ +class Queue extends \Google\Protobuf\Internal\Message +{ + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Modifies HTTP target for HTTP tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + */ + protected $http_target = null; + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; + */ + protected $rate_limits = null; + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; + */ + protected $retry_config = null; + /** + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.State state = 6; + */ + protected $state = 0; + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 7; + */ + protected $purge_time = null; + /** + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * + * Generated from protobuf field .google.protobuf.Duration task_ttl = 8; + */ + protected $task_ttl = null; + /** + * The task tombstone time to live (TTL). + * After a task is deleted or executed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 9; + */ + protected $tombstone_ttl = null; + /** + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriver_logging_config = 10; + */ + protected $stackdriver_logging_config = null; + /** + * Immutable. The type of a queue (push or pull). + * `Queue.type` is an immutable property of the queue that is set at the queue + * creation time. When left unspecified, the default value of `PUSH` is + * selected. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stats = null; + protected $queue_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * @type \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue $app_engine_http_queue + * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] + * settings apply only to [App Engine + * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by + * this proto. + * @type \Google\Cloud\Tasks\V2beta3\HttpTarget $http_target + * Modifies HTTP target for HTTP tasks. + * @type \Google\Cloud\Tasks\V2beta3\RateLimits $rate_limits + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * @type \Google\Cloud\Tasks\V2beta3\RetryConfig $retry_config + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * @type int $state + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * @type \Google\Protobuf\Duration $task_ttl + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * @type \Google\Protobuf\Duration $tombstone_ttl + * The task tombstone time to live (TTL). + * After a task is deleted or executed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * @type \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig $stackdriver_logging_config + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * @type int $type + * Immutable. The type of a queue (push or pull). + * `Queue.type` is an immutable property of the queue that is set at the queue + * creation time. When left unspecified, the default value of `PUSH` is + * selected. + * @type \Google\Cloud\Tasks\V2beta3\QueueStats $stats + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Caller-specified and required in + * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after + * which it becomes output only. + * The queue name. + * The queue name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the queue's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * + * 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; + } + + /** + * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] + * settings apply only to [App Engine + * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by + * this proto. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; + * @return \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue|null + */ + public function getAppEngineHttpQueue() + { + return $this->readOneof(3); + } + + public function hasAppEngineHttpQueue() + { + return $this->hasOneof(3); + } + + /** + * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] + * settings apply only to [App Engine + * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. + * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by + * this proto. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; + * @param \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue $var + * @return $this + */ + public function setAppEngineHttpQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Modifies HTTP target for HTTP tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * @return \Google\Cloud\Tasks\V2beta3\HttpTarget|null + */ + public function getHttpTarget() + { + return $this->http_target; + } + + public function hasHttpTarget() + { + return isset($this->http_target); + } + + public function clearHttpTarget() + { + unset($this->http_target); + } + + /** + * Modifies HTTP target for HTTP tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; + * @param \Google\Cloud\Tasks\V2beta3\HttpTarget $var + * @return $this + */ + public function setHttpTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\HttpTarget::class); + $this->http_target = $var; + + return $this; + } + + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; + * @return \Google\Cloud\Tasks\V2beta3\RateLimits|null + */ + public function getRateLimits() + { + return $this->rate_limits; + } + + public function hasRateLimits() + { + return isset($this->rate_limits); + } + + public function clearRateLimits() + { + unset($this->rate_limits); + } + + /** + * Rate limits for task dispatches. + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related + * because they both control task attempts. However they control task attempts + * in different ways: + * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the + * total rate of + * dispatches from a queue (i.e. all traffic dispatched from the + * queue, regardless of whether the dispatch is from a first + * attempt or a retry). + * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * what happens to + * particular a task after its first attempt fails. That is, + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls + * task retries (the second attempt, third attempt, etc). + * The queue's actual dispatch rate is the result of: + * * Number of tasks in the queue + * * User-specified throttling: + * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], + * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the + * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; + * @param \Google\Cloud\Tasks\V2beta3\RateLimits $var + * @return $this + */ + public function setRateLimits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\RateLimits::class); + $this->rate_limits = $var; + + return $this; + } + + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; + * @return \Google\Cloud\Tasks\V2beta3\RetryConfig|null + */ + public function getRetryConfig() + { + return $this->retry_config; + } + + public function hasRetryConfig() + { + return isset($this->retry_config); + } + + public function clearRetryConfig() + { + unset($this->retry_config); + } + + /** + * Settings that determine the retry behavior. + * * For tasks created using Cloud Tasks: the queue-level retry settings + * apply to all tasks in the queue that were created using Cloud Tasks. + * Retry settings cannot be set on individual tasks. + * * For tasks created using the App Engine SDK: the queue-level retry + * settings apply to all tasks in the queue which do not have retry settings + * explicitly set on the task and were created by the App Engine SDK. See + * [App Engine + * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; + * @param \Google\Cloud\Tasks\V2beta3\RetryConfig $var + * @return $this + */ + public function setRetryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\RetryConfig::class); + $this->retry_config = $var; + + return $this; + } + + /** + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.State state = 6; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the queue. + * `state` can only be changed by called + * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], + * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or + * uploading + * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be + * used to change `state`. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.State state = 6; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Queue\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The last time this queue was purged. + * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] + * before this time were purged. + * A queue can be purged using + * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App + * Engine Task Queue SDK, or the Cloud + * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + * Purge time will be truncated to the nearest microsecond. Purge + * time will be unset if the queue has never been purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + + /** + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * + * Generated from protobuf field .google.protobuf.Duration task_ttl = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getTaskTtl() + { + return $this->task_ttl; + } + + public function hasTaskTtl() + { + return isset($this->task_ttl); + } + + public function clearTaskTtl() + { + unset($this->task_ttl); + } + + /** + * The maximum amount of time that a task will be retained in + * this queue. + * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. + * After a task has lived for `task_ttl`, the task will be deleted + * regardless of whether it was dispatched or not. + * The `task_ttl` for queues created via queue.yaml/xml is equal to the + * maximum duration because there is a + * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for + * these queues. To view the maximum valid duration, see the documentation for + * [Duration][google.protobuf.Duration]. + * + * Generated from protobuf field .google.protobuf.Duration task_ttl = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTaskTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->task_ttl = $var; + + return $this; + } + + /** + * The task tombstone time to live (TTL). + * After a task is deleted or executed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getTombstoneTtl() + { + return $this->tombstone_ttl; + } + + public function hasTombstoneTtl() + { + return isset($this->tombstone_ttl); + } + + public function clearTombstoneTtl() + { + unset($this->tombstone_ttl); + } + + /** + * The task tombstone time to live (TTL). + * After a task is deleted or executed, the task's tombstone is + * retained for the length of time specified by `tombstone_ttl`. + * The tombstone is used by task de-duplication; another task with the same + * name can't be created until the tombstone has expired. For more information + * about task de-duplication, see the documentation for + * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. + * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTombstoneTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->tombstone_ttl = $var; + + return $this; + } + + /** + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriver_logging_config = 10; + * @return \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig|null + */ + public function getStackdriverLoggingConfig() + { + return $this->stackdriver_logging_config; + } + + public function hasStackdriverLoggingConfig() + { + return isset($this->stackdriver_logging_config); + } + + public function clearStackdriverLoggingConfig() + { + unset($this->stackdriver_logging_config); + } + + /** + * Configuration options for writing logs to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this + * field is unset, then no logs are written. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriver_logging_config = 10; + * @param \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig $var + * @return $this + */ + public function setStackdriverLoggingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig::class); + $this->stackdriver_logging_config = $var; + + return $this; + } + + /** + * Immutable. The type of a queue (push or pull). + * `Queue.type` is an immutable property of the queue that is set at the queue + * creation time. When left unspecified, the default value of `PUSH` is + * selected. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. The type of a queue (push or pull). + * `Queue.type` is an immutable property of the queue that is set at the queue + * creation time. When left unspecified, the default value of `PUSH` is + * selected. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Queue\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Tasks\V2beta3\QueueStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Output only. The realtime, informational statistics for a queue. In order + * to receive the statistics the caller should include this field in the + * FieldMask. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Tasks\V2beta3\QueueStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\QueueStats::class); + $this->stats = $var; + + return $this; + } + + /** + * @return string + */ + public function getQueueType() + { + return $this->whichOneof("queue_type"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php new file mode 100644 index 000000000000..74d486e2a300 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php @@ -0,0 +1,89 @@ +google.cloud.tasks.v2beta3.Queue.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The queue is running. Tasks can be dispatched. + * If the queue was created using Cloud Tasks and the queue has + * had no activity (method calls or task dispatches) for 30 days, + * the queue may take a few minutes to re-activate. Some method + * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + * tasks may not be dispatched for a few minutes until the queue + * has been re-activated. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * Tasks are paused by the user. If the queue is paused then Cloud + * Tasks will stop delivering tasks from it, but more tasks can + * still be added to it by the user. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * The queue is disabled. + * A queue becomes `DISABLED` when + * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + * or + * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + * is uploaded which does not contain the queue. You cannot directly disable + * a queue. + * When a queue is disabled, tasks can still be added to a queue + * but the tasks are not dispatched. + * To permanently delete this queue and all of its tasks, call + * [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Tasks\V2beta3\Queue_State::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php new file mode 100644 index 000000000000..289c58b4f926 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php @@ -0,0 +1,64 @@ +google.cloud.tasks.v2beta3.Queue.Type + */ +class Type +{ + /** + * Default value. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A pull queue. + * + * Generated from protobuf enum PULL = 1; + */ + const PULL = 1; + /** + * A push queue. + * + * Generated from protobuf enum PUSH = 2; + */ + const PUSH = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PULL => 'PULL', + self::PUSH => 'PUSH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Tasks\V2beta3\Queue_Type::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php new file mode 100644 index 000000000000..a02919639558 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php @@ -0,0 +1,253 @@ +google.cloud.tasks.v2beta3.QueueStats + */ +class QueueStats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * + * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tasks_count = 0; + /** + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * + * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oldest_estimated_arrival_time = null; + /** + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * + * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $executed_last_minute_count = 0; + /** + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * + * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $concurrent_dispatches_count = 0; + /** + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * + * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_execution_rate = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $tasks_count + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * @type \Google\Protobuf\Timestamp $oldest_estimated_arrival_time + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * @type int|string $executed_last_minute_count + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * @type int|string $concurrent_dispatches_count + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * @type float $effective_execution_rate + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * + * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTasksCount() + { + return $this->tasks_count; + } + + /** + * Output only. An estimation of the number of tasks in the queue, that is, + * the tasks in the queue that haven't been executed, the tasks in the queue + * which the queue has dispatched but has not yet received a reply for, and + * the failed tasks that the queue is retrying. + * + * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTasksCount($var) + { + GPBUtil::checkInt64($var); + $this->tasks_count = $var; + + return $this; + } + + /** + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * + * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getOldestEstimatedArrivalTime() + { + return $this->oldest_estimated_arrival_time; + } + + public function hasOldestEstimatedArrivalTime() + { + return isset($this->oldest_estimated_arrival_time); + } + + public function clearOldestEstimatedArrivalTime() + { + unset($this->oldest_estimated_arrival_time); + } + + /** + * Output only. An estimation of the nearest time in the future where a task + * in the queue is scheduled to be executed. + * + * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setOldestEstimatedArrivalTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->oldest_estimated_arrival_time = $var; + + return $this; + } + + /** + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * + * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getExecutedLastMinuteCount() + { + return $this->executed_last_minute_count; + } + + /** + * Output only. The number of tasks that the queue has dispatched and received + * a reply for during the last minute. This variable counts both successful + * and non-successful executions. + * + * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setExecutedLastMinuteCount($var) + { + GPBUtil::checkInt64($var); + $this->executed_last_minute_count = $var; + + return $this; + } + + /** + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * + * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getConcurrentDispatchesCount() + { + return $this->concurrent_dispatches_count; + } + + /** + * Output only. The number of requests that the queue has dispatched but has + * not received a reply for yet. + * + * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setConcurrentDispatchesCount($var) + { + GPBUtil::checkInt64($var); + $this->concurrent_dispatches_count = $var; + + return $this; + } + + /** + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * + * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getEffectiveExecutionRate() + { + return $this->effective_execution_rate; + } + + /** + * Output only. The current maximum number of tasks per second executed by the + * queue. The maximum value of this variable is controlled by the RateLimits + * of the Queue. However, this value could be less to avoid overloading the + * endpoints tasks in the queue are targeting. + * + * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setEffectiveExecutionRate($var) + { + GPBUtil::checkDouble($var); + $this->effective_execution_rate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php new file mode 100644 index 000000000000..9e87d52e942a --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php @@ -0,0 +1,317 @@ +google.cloud.tasks.v2beta3.RateLimits + */ +class RateLimits extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], + * the maximum allowed value + * is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_dispatches_per_second = 1; + */ + protected $max_dispatches_per_second = 0.0; + /** + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is + * updating + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * + * Generated from protobuf field int32 max_burst_size = 2; + */ + protected $max_burst_size = 0; + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_dispatches = 3; + */ + protected $max_concurrent_dispatches = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $max_dispatches_per_second + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], + * the maximum allowed value + * is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * @type int $max_burst_size + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is + * updating + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * @type int $max_concurrent_dispatches + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); + parent::__construct($data); + } + + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], + * the maximum allowed value + * is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_dispatches_per_second = 1; + * @return float + */ + public function getMaxDispatchesPerSecond() + { + return $this->max_dispatches_per_second; + } + + /** + * The maximum rate at which tasks are dispatched from this queue. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], + * the maximum allowed value + * is 500. + * This field has the same meaning as + * [rate in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). + * + * Generated from protobuf field double max_dispatches_per_second = 1; + * @param float $var + * @return $this + */ + public function setMaxDispatchesPerSecond($var) + { + GPBUtil::checkDouble($var); + $this->max_dispatches_per_second = $var; + + return $this; + } + + /** + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is + * updating + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * + * Generated from protobuf field int32 max_burst_size = 2; + * @return int + */ + public function getMaxBurstSize() + { + return $this->max_burst_size; + } + + /** + * The max burst size. + * Max burst size limits how fast tasks in queue are processed when + * many tasks are in the queue and the rate is high. This field + * allows the queue to have a high rate so processing starts shortly + * after a task is enqueued, but still limits resource usage when + * many tasks are enqueued in a short period of time. + * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + * algorithm is used to control the rate of task dispatches. Each + * queue has a token bucket that holds tokens, up to the maximum + * specified by `max_burst_size`. Each time a task is dispatched, a + * token is removed from the bucket. Tasks will be dispatched until + * the queue's bucket runs out of tokens. The bucket will be + * continuously refilled with new tokens based on + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The default value of `max_burst_size` is picked by Cloud Tasks + * based on the value of + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * The maximum value of `max_burst_size` is 500. + * For App Engine queues that were created or updated using + * `queue.yaml/xml`, `max_burst_size` is equal to + * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). + * If + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called + * on a queue without explicitly setting a value for `max_burst_size`, + * `max_burst_size` value will get updated if + * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is + * updating + * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. + * + * Generated from protobuf field int32 max_burst_size = 2; + * @param int $var + * @return $this + */ + public function setMaxBurstSize($var) + { + GPBUtil::checkInt32($var); + $this->max_burst_size = $var; + + return $this; + } + + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_dispatches = 3; + * @return int + */ + public function getMaxConcurrentDispatches() + { + return $this->max_concurrent_dispatches; + } + + /** + * The maximum number of concurrent tasks that Cloud Tasks allows + * to be dispatched for this queue. After this threshold has been + * reached, Cloud Tasks stops dispatching tasks until the number of + * concurrent requests decreases. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * The maximum allowed value is 5,000. + * This field has the same meaning as + * [max_concurrent_requests in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + * + * Generated from protobuf field int32 max_concurrent_dispatches = 3; + * @param int $var + * @return $this + */ + public function setMaxConcurrentDispatches($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_dispatches = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php new file mode 100644 index 000000000000..c1b61275d139 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php @@ -0,0 +1,72 @@ +google.cloud.tasks.v2beta3.ResumeQueueRequest + */ +class ResumeQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php new file mode 100644 index 000000000000..39fa65ea3b58 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php @@ -0,0 +1,502 @@ +google.cloud.tasks.v2beta3.RetryConfig + */ +class RetryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_attempts = 1; + */ + protected $max_attempts = 0; + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; + */ + protected $max_retry_duration = null; + /** + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; + */ + protected $min_backoff = null; + /** + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; + */ + protected $max_backoff = null; + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 5; + */ + protected $max_doublings = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_attempts + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $max_retry_duration + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $min_backoff + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type \Google\Protobuf\Duration $max_backoff + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * @type int $max_doublings + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_attempts = 1; + * @return int + */ + public function getMaxAttempts() + { + return $this->max_attempts; + } + + /** + * Number of attempts per task. + * Cloud Tasks will attempt the task `max_attempts` times (that is, if the + * first attempt fails, then there will be `max_attempts - 1` retries). Must + * be >= -1. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * -1 indicates unlimited attempts. + * This field has the same meaning as + * [task_retry_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_attempts = 1; + * @param int $var + * @return $this + */ + public function setMaxAttempts($var) + { + GPBUtil::checkInt32($var); + $this->max_attempts = $var; + + return $this; + } + + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxRetryDuration() + { + return $this->max_retry_duration; + } + + public function hasMaxRetryDuration() + { + return isset($this->max_retry_duration); + } + + public function clearMaxRetryDuration() + { + unset($this->max_retry_duration); + } + + /** + * If positive, `max_retry_duration` specifies the time limit for + * retrying a failed task, measured from when the task was first + * attempted. Once `max_retry_duration` time has passed *and* the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, + * no further attempts will be made and the task will be deleted. + * If zero, then the task age is unlimited. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_retry_duration` will be truncated to the nearest second. + * This field has the same meaning as + * [task_age_limit in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxRetryDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_retry_duration = $var; + + return $this; + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBackoff() + { + return $this->min_backoff; + } + + public function hasMinBackoff() + { + return isset($this->min_backoff); + } + + public function clearMinBackoff() + { + unset($this->min_backoff); + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `min_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [min_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_backoff = $var; + + return $this; + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxBackoff() + { + return $this->max_backoff; + } + + public function hasMaxBackoff() + { + return isset($this->max_backoff); + } + + public function clearMaxBackoff() + { + unset($this->max_backoff); + } + + /** + * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] + * for retry between + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration + * after it fails, if the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the + * task should be retried. + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * `max_backoff` will be truncated to the nearest second. + * This field has the same meaning as + * [max_backoff_seconds in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxBackoff($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_backoff = $var; + + return $this; + } + + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 5; + * @return int + */ + public function getMaxDoublings() + { + return $this->max_doublings; + } + + /** + * The time between retries will double `max_doublings` times. + * A task's retry interval starts at + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then + * doubles `max_doublings` times, then increases linearly, and finally retries + * at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * For example, if + * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, + * and `max_doublings` is 3, then the a task will first be retried in 10s. The + * retry interval will double three times, and then increase linearly by 2^3 * + * 10s. Finally, the task will retry at intervals of + * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the + * task has been attempted + * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. + * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, + * 300s, .... + * If unspecified when the queue is created, Cloud Tasks will pick the + * default. + * This field has the same meaning as + * [max_doublings in + * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). + * + * Generated from protobuf field int32 max_doublings = 5; + * @param int $var + * @return $this + */ + public function setMaxDoublings($var) + { + GPBUtil::checkInt32($var); + $this->max_doublings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php new file mode 100644 index 000000000000..01e52b93e151 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php @@ -0,0 +1,146 @@ +google.cloud.tasks.v2beta3.RunTaskRequest + */ +class RunTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + */ + protected $response_view = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @type int $response_view + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + * @return int + */ + public function getResponseView() + { + return $this->response_view; + } + + /** + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; + * @param int $var + * @return $this + */ + public function setResponseView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); + $this->response_view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php new file mode 100644 index 000000000000..77ae9bd3407e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php @@ -0,0 +1,80 @@ +google.cloud.tasks.v2beta3.StackdriverLoggingConfig + */ +class StackdriverLoggingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * + * Generated from protobuf field double sampling_ratio = 1; + */ + protected $sampling_ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $sampling_ratio + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * + * Generated from protobuf field double sampling_ratio = 1; + * @return float + */ + public function getSamplingRatio() + { + return $this->sampling_ratio; + } + + /** + * Specifies the fraction of operations to write to + * [Stackdriver Logging](https://cloud.google.com/logging/docs/). + * This field may contain any value between 0.0 and 1.0, inclusive. + * 0.0 is the default and means that no operations are logged. + * + * Generated from protobuf field double sampling_ratio = 1; + * @param float $var + * @return $this + */ + public function setSamplingRatio($var) + { + GPBUtil::checkDouble($var); + $this->sampling_ratio = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php new file mode 100644 index 000000000000..5663cef6459a --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php @@ -0,0 +1,746 @@ +google.cloud.tasks.v2beta3.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; + */ + protected $schedule_time = null; + /** + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], + * 0 indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 12; + */ + protected $dispatch_deadline = null; + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 dispatch_count = 6; + */ + protected $dispatch_count = 0; + /** + * Output only. The number of attempts which have received a response. + * + * Generated from protobuf field int32 response_count = 7; + */ + protected $response_count = 0; + /** + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will + * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information + * is not retained by Cloud Tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt first_attempt = 8; + */ + protected $first_attempt = null; + /** + * Output only. The status of the task's last attempt. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt last_attempt = 9; + */ + protected $last_attempt = null; + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View view = 10; + */ + protected $view = 0; + protected $payload_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * @type \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest $app_engine_http_request + * HTTP request that is sent to the App Engine app handler. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] + * set. + * @type \Google\Cloud\Tasks\V2beta3\HttpRequest $http_request + * HTTP request that is sent to the task's target. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + * @type \Google\Cloud\Tasks\V2beta3\PullMessage $pull_message + * Pull Message contained in a task in a + * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload + * type cannot be explicitly set through Cloud Tasks API. Its purpose, + * currently is to provide backward compatibility with App Engine Task Queue + * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) + * queues to provide a way to inspect contents of pull tasks through the + * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. + * @type \Google\Protobuf\Timestamp $schedule_time + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * @type \Google\Protobuf\Duration $dispatch_deadline + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], + * 0 indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * @type int $dispatch_count + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * @type int $response_count + * Output only. The number of attempts which have received a response. + * @type \Google\Cloud\Tasks\V2beta3\Attempt $first_attempt + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will + * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information + * is not retained by Cloud Tasks. + * @type \Google\Cloud\Tasks\V2beta3\Attempt $last_attempt + * Output only. The status of the task's last attempt. + * @type int $view + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] has been returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Task::initOnce(); + parent::__construct($data); + } + + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optionally caller-specified in + * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. + * The task name. + * The task name must have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), colons (:), or periods (.). + * For more information, see + * [Identifying + * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) + * * `LOCATION_ID` is the canonical ID for the task's location. + * The list of available locations can be obtained by calling + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * For more information, see https://cloud.google.com/about/locations/. + * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + * hyphens (-). The maximum length is 100 characters. + * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + * hyphens (-), or underscores (_). The maximum length is 500 characters. + * + * 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; + } + + /** + * HTTP request that is sent to the App Engine app handler. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] + * set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3; + * @return \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest|null + */ + public function getAppEngineHttpRequest() + { + return $this->readOneof(3); + } + + public function hasAppEngineHttpRequest() + { + return $this->hasOneof(3); + } + + /** + * HTTP request that is sent to the App Engine app handler. + * An App Engine task is a task that has + * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] + * set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3; + * @param \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest $var + * @return $this + */ + public function setAppEngineHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * HTTP request that is sent to the task's target. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + * @return \Google\Cloud\Tasks\V2beta3\HttpRequest|null + */ + public function getHttpRequest() + { + return $this->readOneof(11); + } + + public function hasHttpRequest() + { + return $this->hasOneof(11); + } + + /** + * HTTP request that is sent to the task's target. + * An HTTP task is a task that has + * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; + * @param \Google\Cloud\Tasks\V2beta3\HttpRequest $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\HttpRequest::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Pull Message contained in a task in a + * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload + * type cannot be explicitly set through Cloud Tasks API. Its purpose, + * currently is to provide backward compatibility with App Engine Task Queue + * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) + * queues to provide a way to inspect contents of pull tasks through the + * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * @return \Google\Cloud\Tasks\V2beta3\PullMessage|null + */ + public function getPullMessage() + { + return $this->readOneof(13); + } + + public function hasPullMessage() + { + return $this->hasOneof(13); + } + + /** + * Pull Message contained in a task in a + * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload + * type cannot be explicitly set through Cloud Tasks API. Its purpose, + * currently is to provide backward compatibility with App Engine Task Queue + * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) + * queues to provide a way to inspect contents of pull tasks through the + * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; + * @param \Google\Cloud\Tasks\V2beta3\PullMessage $var + * @return $this + */ + public function setPullMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\PullMessage::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * The time when the task is scheduled to be attempted. + * For App Engine queues, this is when the task will be attempted or retried. + * `schedule_time` will be truncated to the nearest microsecond. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + + /** + * Output only. The time that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @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 that the task was created. + * `create_time` will be truncated to the nearest second. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @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 deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], + * 0 indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 12; + * @return \Google\Protobuf\Duration|null + */ + public function getDispatchDeadline() + { + return $this->dispatch_deadline; + } + + public function hasDispatchDeadline() + { + return isset($this->dispatch_deadline); + } + + public function clearDispatchDeadline() + { + unset($this->dispatch_deadline); + } + + /** + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + * Note that when the request is cancelled, Cloud Tasks will stop listening + * for the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * The default and maximum values depend on the type of request: + * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is + * 10 minutes. The deadline + * must be in the interval [15 seconds, 30 minutes]. + * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], + * 0 indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling + * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 12; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDispatchDeadline($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->dispatch_deadline = $var; + + return $this; + } + + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 dispatch_count = 6; + * @return int + */ + public function getDispatchCount() + { + return $this->dispatch_count; + } + + /** + * Output only. The number of attempts dispatched. + * This count includes attempts which have been dispatched but haven't + * received a response. + * + * Generated from protobuf field int32 dispatch_count = 6; + * @param int $var + * @return $this + */ + public function setDispatchCount($var) + { + GPBUtil::checkInt32($var); + $this->dispatch_count = $var; + + return $this; + } + + /** + * Output only. The number of attempts which have received a response. + * + * Generated from protobuf field int32 response_count = 7; + * @return int + */ + public function getResponseCount() + { + return $this->response_count; + } + + /** + * Output only. The number of attempts which have received a response. + * + * Generated from protobuf field int32 response_count = 7; + * @param int $var + * @return $this + */ + public function setResponseCount($var) + { + GPBUtil::checkInt32($var); + $this->response_count = $var; + + return $this; + } + + /** + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will + * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information + * is not retained by Cloud Tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt first_attempt = 8; + * @return \Google\Cloud\Tasks\V2beta3\Attempt|null + */ + public function getFirstAttempt() + { + return $this->first_attempt; + } + + public function hasFirstAttempt() + { + return isset($this->first_attempt); + } + + public function clearFirstAttempt() + { + unset($this->first_attempt); + } + + /** + * Output only. The status of the task's first attempt. + * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will + * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information + * is not retained by Cloud Tasks. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt first_attempt = 8; + * @param \Google\Cloud\Tasks\V2beta3\Attempt $var + * @return $this + */ + public function setFirstAttempt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Attempt::class); + $this->first_attempt = $var; + + return $this; + } + + /** + * Output only. The status of the task's last attempt. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt last_attempt = 9; + * @return \Google\Cloud\Tasks\V2beta3\Attempt|null + */ + public function getLastAttempt() + { + return $this->last_attempt; + } + + public function hasLastAttempt() + { + return isset($this->last_attempt); + } + + public function clearLastAttempt() + { + unset($this->last_attempt); + } + + /** + * Output only. The status of the task's last attempt. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt last_attempt = 9; + * @param \Google\Cloud\Tasks\V2beta3\Attempt $var + * @return $this + */ + public function setLastAttempt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Attempt::class); + $this->last_attempt = $var; + + return $this; + } + + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View view = 10; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Output only. The view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] has been returned. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View view = 10; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); + $this->view = $var; + + return $this; + } + + /** + * @return string + */ + public function getPayloadType() + { + return $this->whichOneof("payload_type"); + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php new file mode 100644 index 000000000000..7c45c3bd5ac8 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php @@ -0,0 +1,81 @@ +google.cloud.tasks.v2beta3.Task.View + */ +class View +{ + /** + * Unspecified. Defaults to BASIC. + * + * Generated from protobuf enum VIEW_UNSPECIFIED = 0; + */ + const VIEW_UNSPECIFIED = 0; + /** + * The basic view omits fields which can be large or can contain + * sensitive data. + * This view does not include the + * [body in + * AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. + * Bodies are desirable to return only when needed, because they + * can be large and because of the sensitivity of the data that you + * choose to store in it. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * All information is returned. + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Queue][google.cloud.tasks.v2beta3.Queue] resource. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(View::class, \Google\Cloud\Tasks\V2beta3\Task_View::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php new file mode 100644 index 000000000000..8fa7fdcb2fdd --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php @@ -0,0 +1,150 @@ +google.cloud.tasks.v2beta3.UpdateQueueRequest + */ +class UpdateQueueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be + * changed. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $queue = null; + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tasks\V2beta3\Queue $queue + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be + * changed. + * @type \Google\Protobuf\FieldMask $update_mask + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); + parent::__construct($data); + } + + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be + * changed. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tasks\V2beta3\Queue|null + */ + public function getQueue() + { + return $this->queue; + } + + public function hasQueue() + { + return isset($this->queue); + } + + public function clearQueue() + { + unset($this->queue); + } + + /** + * Required. The queue to create or update. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be + * specified. + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be + * changed. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tasks\V2beta3\Queue $var + * @return $this + */ + public function setQueue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Queue::class); + $this->queue = $var; + + return $this; + } + + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will 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); + } + + /** + * A mask used to specify which fields of the queue are being updated. + * If empty, then all fields will 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php new file mode 100644 index 000000000000..99ef21814b14 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php @@ -0,0 +1,353 @@ +google.cloud.tasks.v2beta3.UriOverride + */ +class UriOverride extends \Google\Protobuf\Internal\Message +{ + /** + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * + * Generated from protobuf field optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + */ + protected $scheme = null; + /** + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * + * Generated from protobuf field optional string host = 2; + */ + protected $host = null; + /** + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * + * Generated from protobuf field optional int64 port = 3; + */ + protected $port = null; + /** + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + */ + protected $path_override = null; + /** + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + */ + protected $query_override = null; + /** + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + */ + protected $uri_override_enforce_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $scheme + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * @type string $host + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * @type int|string $port + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * @type \Google\Cloud\Tasks\V2beta3\PathOverride $path_override + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * @type \Google\Cloud\Tasks\V2beta3\QueryOverride $query_override + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * @type int $uri_override_enforce_mode + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); + parent::__construct($data); + } + + /** + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * + * Generated from protobuf field optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * @return int + */ + public function getScheme() + { + return isset($this->scheme) ? $this->scheme : 0; + } + + public function hasScheme() + { + return isset($this->scheme); + } + + public function clearScheme() + { + unset($this->scheme); + } + + /** + * Scheme override. + * When specified, the task URI scheme is replaced by the provided value (HTTP + * or HTTPS). + * + * Generated from protobuf field optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; + * @param int $var + * @return $this + */ + public function setScheme($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\UriOverride\Scheme::class); + $this->scheme = $var; + + return $this; + } + + /** + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * + * Generated from protobuf field optional string host = 2; + * @return string + */ + public function getHost() + { + return isset($this->host) ? $this->host : ''; + } + + public function hasHost() + { + return isset($this->host); + } + + public function clearHost() + { + unset($this->host); + } + + /** + * Host override. + * When specified, replaces the host part of the task URL. For example, + * if the task URL is "https://www.google.com," and host value is set to + * "example.net", the overridden URI will be changed to "https://example.net." + * Host value cannot be an empty string (INVALID_ARGUMENT). + * + * Generated from protobuf field optional string host = 2; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * + * Generated from protobuf field optional int64 port = 3; + * @return int|string + */ + public function getPort() + { + return isset($this->port) ? $this->port : 0; + } + + public function hasPort() + { + return isset($this->port); + } + + public function clearPort() + { + unset($this->port); + } + + /** + * Port override. + * When specified, replaces the port part of the task URI. For instance, + * for a URI http://www.google.com/foo and port=123, the overridden URI + * becomes http://www.google.com:123/foo. Note that the port value must be a + * positive integer. Setting the port to 0 (Zero) clears the URI port. + * + * Generated from protobuf field optional int64 port = 3; + * @param int|string $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt64($var); + $this->port = $var; + + return $this; + } + + /** + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * @return \Google\Cloud\Tasks\V2beta3\PathOverride|null + */ + public function getPathOverride() + { + return $this->path_override; + } + + public function hasPathOverride() + { + return isset($this->path_override); + } + + public function clearPathOverride() + { + unset($this->path_override); + } + + /** + * URI path. + * When specified, replaces the existing path of the task URL. Setting the + * path value to an empty string clears the URI path segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.PathOverride path_override = 4; + * @param \Google\Cloud\Tasks\V2beta3\PathOverride $var + * @return $this + */ + public function setPathOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\PathOverride::class); + $this->path_override = $var; + + return $this; + } + + /** + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * @return \Google\Cloud\Tasks\V2beta3\QueryOverride|null + */ + public function getQueryOverride() + { + return $this->query_override; + } + + public function hasQueryOverride() + { + return isset($this->query_override); + } + + public function clearQueryOverride() + { + unset($this->query_override); + } + + /** + * URI Query. + * When specified, replaces the query part of the task URI. Setting the + * query value to an empty string clears the URI query segment. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; + * @param \Google\Cloud\Tasks\V2beta3\QueryOverride $var + * @return $this + */ + public function setQueryOverride($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\QueryOverride::class); + $this->query_override = $var; + + return $this; + } + + /** + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * @return int + */ + public function getUriOverrideEnforceMode() + { + return $this->uri_override_enforce_mode; + } + + /** + * URI Override Enforce Mode + * When specified, determines the Target UriOverride mode. If not specified, + * it defaults to ALWAYS. + * + * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; + * @param int $var + * @return $this + */ + public function setUriOverrideEnforceMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\UriOverride\UriOverrideEnforceMode::class); + $this->uri_override_enforce_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php new file mode 100644 index 000000000000..1711330bfdfb --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php @@ -0,0 +1,66 @@ +google.cloud.tasks.v2beta3.UriOverride.Scheme + */ +class Scheme +{ + /** + * Scheme unspecified. Defaults to HTTPS. + * + * Generated from protobuf enum SCHEME_UNSPECIFIED = 0; + */ + const SCHEME_UNSPECIFIED = 0; + /** + * Convert the scheme to HTTP, e.g., https://www.google.ca will change to + * http://www.google.ca. + * + * Generated from protobuf enum HTTP = 1; + */ + const HTTP = 1; + /** + * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to + * https://www.google.ca. + * + * Generated from protobuf enum HTTPS = 2; + */ + const HTTPS = 2; + + private static $valueToName = [ + self::SCHEME_UNSPECIFIED => 'SCHEME_UNSPECIFIED', + self::HTTP => 'HTTP', + self::HTTPS => 'HTTPS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scheme::class, \Google\Cloud\Tasks\V2beta3\UriOverride_Scheme::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php new file mode 100644 index 000000000000..be36cdfbe464 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php @@ -0,0 +1,67 @@ +google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode + */ +class UriOverrideEnforceMode +{ + /** + * OverrideMode Unspecified. Defaults to ALWAYS. + * + * Generated from protobuf enum URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + */ + const URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; + /** + * In the IF_NOT_EXISTS mode, queue-level configuration is only + * applied where task-level configuration does not exist. + * + * Generated from protobuf enum IF_NOT_EXISTS = 1; + */ + const IF_NOT_EXISTS = 1; + /** + * In the ALWAYS mode, queue-level configuration overrides all + * task-level configuration + * + * Generated from protobuf enum ALWAYS = 2; + */ + const ALWAYS = 2; + + private static $valueToName = [ + self::URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED => 'URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED', + self::IF_NOT_EXISTS => 'IF_NOT_EXISTS', + self::ALWAYS => 'ALWAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UriOverrideEnforceMode::class, \Google\Cloud\Tasks\V2beta3\UriOverride_UriOverrideEnforceMode::class); + diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php new file mode 100644 index 000000000000..a550d82cc75c --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php @@ -0,0 +1,85 @@ +createQueue($formattedParent, $queue); + 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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); + + create_queue_sample($formattedParent); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php new file mode 100644 index 000000000000..4210d260bed5 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php @@ -0,0 +1,76 @@ +createTask($formattedParent, $task); + 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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + create_task_sample($formattedParent); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php new file mode 100644 index 000000000000..a2468d76a522 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php @@ -0,0 +1,77 @@ +deleteQueue($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + delete_queue_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php new file mode 100644 index 000000000000..a131ad410095 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php @@ -0,0 +1,69 @@ +deleteTask($formattedName); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + delete_task_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php new file mode 100644 index 000000000000..287e8a4b9401 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php @@ -0,0 +1,74 @@ +getIamPolicy($resource); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php new file mode 100644 index 000000000000..c87c50e29e10 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_GetLocation_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php new file mode 100644 index 000000000000..b7bb947057e2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php @@ -0,0 +1,67 @@ +getQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + get_queue_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php new file mode 100644 index 000000000000..679006068828 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php @@ -0,0 +1,67 @@ +getTask($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + get_task_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php new file mode 100644 index 000000000000..f5495e55af5d --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 cloudtasks_v2beta3_generated_CloudTasks_ListLocations_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php new file mode 100644 index 000000000000..5158c1b76ade --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php @@ -0,0 +1,74 @@ +listQueues($formattedParent); + + /** @var Queue $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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); + + list_queues_sample($formattedParent); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php new file mode 100644 index 000000000000..63228c12a8cc --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php @@ -0,0 +1,80 @@ +listTasks($formattedParent); + + /** @var Task $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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + list_tasks_sample($formattedParent); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php new file mode 100644 index 000000000000..ec9dc04545e2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php @@ -0,0 +1,74 @@ +pauseQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + pause_queue_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php new file mode 100644 index 000000000000..3b2d46dd6ac7 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php @@ -0,0 +1,72 @@ +purgeQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + purge_queue_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php new file mode 100644 index 000000000000..7c944dd8e591 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php @@ -0,0 +1,81 @@ +resumeQueue($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + + resume_queue_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php new file mode 100644 index 000000000000..2ada5904ec08 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php @@ -0,0 +1,93 @@ +runTask($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + + run_task_sample($formattedName); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php new file mode 100644 index 000000000000..547643a9d362 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php @@ -0,0 +1,79 @@ +setIamPolicy($resource, $policy); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php new file mode 100644 index 000000000000..fcf085d532b7 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php @@ -0,0 +1,81 @@ +testIamPermissions($resource, $permissions); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php new file mode 100644 index 000000000000..d793d7f4046f --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php @@ -0,0 +1,70 @@ +updateQueue($queue); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php new file mode 100644 index 000000000000..59762f56ffc9 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php @@ -0,0 +1,36 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $queue = new Queue(); + * $response = $cloudTasksClient->createQueue($formattedParent, $queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class CloudTasksGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.tasks.v2beta3.CloudTasks'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $queueNameTemplate; + + private static $taskNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_tasks_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getQueueNameTemplate() + { + if (self::$queueNameTemplate == null) { + self::$queueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}'); + } + + return self::$queueNameTemplate; + } + + private static function getTaskNameTemplate() + { + if (self::$taskNameTemplate == null) { + self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}/tasks/{task}'); + } + + return self::$taskNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'queue' => self::getQueueNameTemplate(), + 'task' => self::getTaskNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * 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. + * + * @experimental + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a queue + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * + * @return string The formatted queue resource. + * + * @experimental + */ + public static function queueName($project, $location, $queue) + { + return self::getQueueNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $project + * @param string $location + * @param string $queue + * @param string $task + * + * @return string The formatted task resource. + * + * @experimental + */ + public static function taskName($project, $location, $queue, $task) + { + return self::getTaskNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'queue' => $queue, + 'task' => $task, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - queue: projects/{project}/locations/{location}/queues/{queue} + * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} + * + * 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($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtasks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a queue. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); + * $queue = new Queue(); + * $response = $cloudTasksClient->createQueue($formattedParent, $queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The location name in which the queue will be created. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * + * The list of allowed locations can be obtained by calling Cloud + * Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @param Queue $queue Required. The queue to create. + * + * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as + * an existing queue. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createQueue($parent, $queue, array $optionalArgs = []) + { + $request = new CreateQueueRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setQueue($queue); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a task and adds it to a queue. + * + * Tasks cannot be updated after creation; there is no UpdateTask command. + * + * * The maximum task size is 100KB. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $task = new Task(); + * $response = $cloudTasksClient->createTask($formattedParent, $task); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * + * The queue must already exist. + * @param Task $task Required. The task to add. + * + * Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + * The user can optionally specify a task + * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified + * then the system will generate a random unique task id, which will be set in + * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. + * + * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not + * set or is in the past then Cloud Tasks will set it to the current time. + * + * Task De-duplication: + * + * Explicitly specifying a task ID enables task de-duplication. If + * a task's ID is identical to that of an existing task or a task + * that was deleted or executed recently then the call will fail + * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + * If the task's queue was created using Cloud Tasks, then another task with + * the same name can't be created for ~1 hour after the original task was + * deleted or executed. If the task's queue was created using queue.yaml or + * queue.xml, then another task with the same name can't be created + * for ~9 days after the original task was deleted or executed. + * + * Because there is an extra lookup cost to identify duplicate task + * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] + * calls have significantly increased latency. Using hashed strings for the + * task id or for the prefix of the task id is recommended. Choosing task ids + * that are sequential or have sequential prefixes, for example using a + * timestamp, causes an increase in latency and error rates in all + * task commands. The infrastructure relies on an approximately + * uniform distribution of task ids to store and serve tasks + * efficiently. + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createTask($parent, $task, array $optionalArgs = []) + { + $request = new CreateTaskRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTask($task); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a queue. + * + * This command will delete the queue even if it has tasks in it. + * + * Note: If you delete a queue, a queue with the same name can't be created + * for 7 days. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $cloudTasksClient->deleteQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteQueue($name, array $optionalArgs = []) + { + $request = new DeleteQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteQueue', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a task. + * + * A task can be deleted if it is scheduled or dispatched. A task + * cannot be deleted if it has executed successfully or permanently + * failed. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $cloudTasksClient->deleteTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteTask($name, array $optionalArgs = []) + { + $request = new DeleteTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteTask', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a + * [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the + * resource exists and does not have a policy set. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.getIamPolicy` + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $response = $cloudTasksClient->getIamPolicy($resource); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a queue. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->getQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $readMask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getQueue($name, array $optionalArgs = []) + { + $request = new GetQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a task. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $response = $cloudTasksClient->getTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getTask($name, array $optionalArgs = []) + { + $request = new GetTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists queues. + * + * Queues are returned in lexicographical order. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The location name. + * For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * `filter` can be used to specify a subset of queues. Any + * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and + * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The + * filter syntax is the same as described in [Stackdriver's Advanced Logs + * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). + * + * Sample filter "state: PAUSED". + * + * Note that using filters might cause fewer queues than the + * requested page_size to be returned. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type FieldMask $readMask + * Optional. Read mask is used for a more granular control over what the API + * returns. If the mask is not present all fields will be returned except + * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly + * specified in the mask. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listQueues($parent, array $optionalArgs = []) + { + $request = new ListQueuesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListQueues', $optionalArgs, ListQueuesResponse::class, $request); + } + + /** + * Lists the tasks in a queue. + * + * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] + * view is retrieved due to performance considerations; + * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] + * controls the subset of information which is returned. + * + * The tasks may be returned in any order. The ordering may change at any + * time. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $parent Required. The queue name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listTasks($parent, array $optionalArgs = []) + { + $request = new ListTasksRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); + } + + /** + * Pauses the queue. + * + * If a queue is paused then the system will stop dispatching tasks + * until the queue is resumed via + * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can + * still be added when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2beta3.Queue.state] is + * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->pauseQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function pauseQueue($name, array $optionalArgs = []) + { + $request = new PauseQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PauseQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Purges a queue by deleting all of its tasks. + * + * All tasks created before this method is called are permanently deleted. + * + * Purge operations can take up to one minute to take effect. Tasks + * might be dispatched before the purge takes effect. A purge is irreversible. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->purgeQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function purgeQueue($name, array $optionalArgs = []) + { + $request = new PurgeQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PurgeQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Resume a queue. + * + * This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a + * queue is stored in the queue's + * [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method + * it will be set to + * [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. + * + * WARNING: Resuming many high-QPS queues at the same time can + * lead to target overloading. If you are resuming high-QPS + * queues, follow the 500/50/5 pattern described in + * [Managing Cloud Tasks Scaling + * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + * $response = $cloudTasksClient->resumeQueue($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The queue name. For example: + * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function resumeQueue($name, array $optionalArgs = []) + { + $request = new ResumeQueueRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResumeQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Forces a task to run now. + * + * When this method is called, Cloud Tasks will dispatch the task, even if + * the task is already running, the queue has reached its + * [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. + * + * This command is meant to be used for manual debugging. For + * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be + * used to retry a failed task after a fix has been made or to manually force + * a task to be dispatched now. + * + * The dispatched task is returned. That is, the task that is returned + * contains the [status][Task.status] after the task is dispatched but + * before the task is received by its target. + * + * If Cloud Tasks receives a successful response from the task's + * target, then the task will be deleted; otherwise the task's + * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be + * reset to the time that + * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus + * the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + * + * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + * task that has already succeeded or permanently failed. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + * $response = $cloudTasksClient->runTask($formattedName); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $name Required. The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $responseView + * The response_view specifies which subset of the + * [Task][google.cloud.tasks.v2beta3.Task] will be returned. + * + * By default response_view is + * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is + * retrieved by default because some data, such as payloads, might be + * desirable to return only when needed because of its large size or because + * of the sensitivity of data that it contains. + * + * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] + * requires `cloudtasks.tasks.fullView` [Google + * IAM](https://cloud.google.com/iam/) permission on the + * [Task][google.cloud.tasks.v2beta3.Task] resource. + * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Task + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function runTask($name, array $optionalArgs = []) + { + $request = new RunTaskRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['responseView'])) { + $request->setResponseView($optionalArgs['responseView']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunTask', Task::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy for a + * [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy. + * + * Note: The Cloud Console does not check queue-level IAM permissions yet. + * Project-level permissions are required to use the Cloud Console. + * + * Authorization requires the following + * [Google IAM](https://cloud.google.com/iam) permission on the specified + * resource parent: + * + * * `cloudtasks.queues.setIamPolicy` + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $cloudTasksClient->setIamPolicy($resource, $policy); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns permissions that a caller has on a + * [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist, + * this will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + * Note: This operation is designed to be used for building permission-aware + * UIs and command-line tools, not for authorization checking. This operation + * may "fail open" without warning. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $cloudTasksClient->testIamPermissions($resource, $permissions); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function testIamPermissions($resource, $permissions, array $optionalArgs = []) + { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a queue. + * + * This method creates the queue if it does not exist and updates + * the queue if it does exist. + * + * Queues created with this method allow tasks to live for a maximum of 31 + * days. After a task is 31 days old, the task will be deleted regardless of + * whether it was dispatched or not. + * + * WARNING: Using this method may have unintended side effects if you are + * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + * Read + * [Overview of Queue Management and + * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using + * this method. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $queue = new Queue(); + * $response = $cloudTasksClient->updateQueue($queue); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param Queue $queue Required. The queue to create or update. + * + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be + * specified. + * + * Output only fields cannot be modified using UpdateQueue. + * Any value specified for an output only field will be ignored. + * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be + * changed. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A mask used to specify which fields of the queue are being updated. + * + * If empty, then all fields will be updated. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tasks\V2beta3\Queue + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateQueue($queue, array $optionalArgs = []) + { + $request = new UpdateQueueRequest(); + $requestParamHeaders = []; + $request->setQueue($queue); + $requestParamHeaders['queue.name'] = $queue->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateQueue', Queue::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * $response = $cloudTasksClient->getLocation(); + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $cloudTasksClient = new CloudTasksClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $cloudTasksClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $cloudTasksClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $cloudTasksClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json new file mode 100644 index 000000000000..91fdac01bfc2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json @@ -0,0 +1,108 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.tasks.v2beta3", + "libraryPackage": "Google\\Cloud\\Tasks\\V2beta3", + "services": { + "CloudTasks": { + "clients": { + "grpc": { + "libraryClient": "CloudTasksGapicClient", + "rpcs": { + "CreateQueue": { + "methods": [ + "createQueue" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "DeleteQueue": { + "methods": [ + "deleteQueue" + ] + }, + "DeleteTask": { + "methods": [ + "deleteTask" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetQueue": { + "methods": [ + "getQueue" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "ListQueues": { + "methods": [ + "listQueues" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + }, + "PauseQueue": { + "methods": [ + "pauseQueue" + ] + }, + "PurgeQueue": { + "methods": [ + "purgeQueue" + ] + }, + "ResumeQueue": { + "methods": [ + "resumeQueue" + ] + }, + "RunTask": { + "methods": [ + "runTask" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateQueue": { + "methods": [ + "updateQueue" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json new file mode 100644 index 000000000000..d68dd2e3a24f --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json @@ -0,0 +1,135 @@ +{ + "interfaces": { + "google.cloud.tasks.v2beta3.CloudTasks": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "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": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 20000 + } + }, + "methods": { + "CreateQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteQueue": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteTask": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetQueue": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTask": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListQueues": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTasks": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PauseQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PurgeQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResumeQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RunTask": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 20000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateQueue": { + "timeout_millis": 20000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_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/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php new file mode 100644 index 000000000000..af3d8e7b96d1 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php @@ -0,0 +1,62 @@ + [ + 'google.cloud.tasks.v2beta3.CloudTasks' => [ + 'ListQueues' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getQueues', + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + ], + 'GetLocation' => [ + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + ], + ], +]; diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php new file mode 100644 index 000000000000..228b1f2c978e --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php @@ -0,0 +1,240 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.tasks.v2beta3.CloudTasks' => [ + 'CreateQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*}/queues', + 'body' => 'queue', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteQueue' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTask' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetQueue' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListQueues' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*}/queues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PauseQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}:pause', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'PurgeQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}:purge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResumeQueue' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RunTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UpdateQueue' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta3/{queue.name=projects/*/locations/*/queues/*}', + 'body' => 'queue', + 'placeholders' => [ + 'queue.name' => [ + 'getters' => [ + 'getQueue', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php new file mode 100644 index 000000000000..539258bf1eb2 --- /dev/null +++ b/owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php @@ -0,0 +1,1189 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudTasksClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudTasksClient($options); + } + + /** @test */ + public function createQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queue = new Queue(); + $response = $gapicClient->createQueue($formattedParent, $queue); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/CreateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $queue = new Queue(); + try { + $gapicClient->createQueue($formattedParent, $queue); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + $response = $gapicClient->createTask($formattedParent, $task); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/CreateTask', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $task = new Task(); + try { + $gapicClient->createTask($formattedParent, $task); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $gapicClient->deleteQueue($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/DeleteQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->deleteQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $gapicClient->deleteTask($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/DeleteTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->deleteTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->getQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/GetQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->getQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $response = $gapicClient->getTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->getTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $queuesElement = new Queue(); + $queues = [ + $queuesElement, + ]; + $expectedResponse = new ListQueuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setQueues($queues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listQueues($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/ListQueues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listQueuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listQueues($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->listTasks($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->listTasks($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->pauseQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/PauseQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->pauseQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->purgeQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/PurgeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->purgeQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + $response = $gapicClient->resumeQueue($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/ResumeQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); + try { + $gapicClient->resumeQueue($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dispatchCount = 1217252086; + $responseCount = 424727441; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setDispatchCount($dispatchCount); + $expectedResponse->setResponseCount($responseCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + $response = $gapicClient->runTask($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/RunTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); + try { + $gapicClient->runTask($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Queue(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $queue = new Queue(); + $response = $gapicClient->updateQueue($queue); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/UpdateQueue', $actualFuncCall); + $actualValue = $actualRequestObject->getQueue(); + $this->assertProtobufEquals($queue, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateQueueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $queue = new Queue(); + try { + $gapicClient->updateQueue($queue); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/GPBMetadata/Google/Cloud/Telcoautomation/V1/Telcoautomation.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/GPBMetadata/Google/Cloud/Telcoautomation/V1/Telcoautomation.php new file mode 100644 index 0000000000000000000000000000000000000000..01a27db9624c1e248b8b3238b23121e87a3c5f3b GIT binary patch literal 24410 zcmeG^TWlOzR$JY15+5gybK^LUlSw)?J3AR~rakF-Fw>b#rfs(!&vassUzv=&^t8Ln zc9V8jPgS*NO)xC`F@RXmY7uB95D4+X;{(J)XnANQBpxDsAi)PHAXpw>BUlOXUL?f1 z&w6x~tGey1<^zAVtM0k?ywADko?EZqYHhXP>CCLrG^~na)H3V48E4DLv@Fvxt7ap! z-rm?StW4G1Zq*xxmCaM%Ape z9doo)+Z zjf!n&0&N?Q*?Ycj}c!{kxIEo0*MD!!~e^&aoTqW|bnG zp#byEs&VzX44;#Z{dCJjj@-;h^cE8jfNu zeRB0Vu`HdgzLB}gam?pCki403thV7@J(IBvr)@QFFudsmd+OI(2=fZ9`dXpcG$|L% zrk&5bG`Ukm0ZujQM$_pIW~Od5YLmuRWv6ah-GMF|LX8q5Su&fOR=e4(H#gVjTU2?w zBT~r@Ial0nIlIXbR-laFI~Dsu53tL1)O)A0-3o_gs`mUFb)i^=T21NE4BFvUC3&g` z&%*EjrUozfWP#)|2g@?U%?1oNyK{Z)oS3)Ls-tyNwcxfpCLky1iw!FK^12Yd7;xSL zX$c97S5J#q4Ofg4rV^tVbU_Sat^)0B!k~f@FQvm#FF6X^C=M|~;-^M9lIMJY{%d_O zJa1LEP!L>yrW$P23y<*M1-sBez;;j4k%^(;p* zl6%=Z3UZ18l9ynhY8mKj%M_i_6q{#E&LeTnD*c#Df1{A5Q0*4FMgf&h2K5dcZB*8c zhCO;DlSXt4a+xS$XT#W$EwMR@O~=|LqcGq!E9D)-veDp1k5UeC6z8FjdNX767(N@! z-RNztB{~J0aO`;)@UA=n=?BKHkjY8t+o?3#oPYiK)T^4l2z?BgoQ2a%%Z24)dFAfX zLUC$tX0A9r^eGhT@u|gPVR`QE?2twPjuxht=T?hDDf(u*SSqqNY5HcSFjqpDBl$0D z9~Zu)!HYq&;8I7$x3d@-C&IW!R#2ATWmFw|;-UDpH_Y8->1a6<+R*m~W@n&IPpgrC3c8{O~F& zRUvI3ZJqRMYc}y3u7Z;H;p~T|^`K!^YEnLBXSZdH9%mNtdg3|niCKjIS;jdS{+|F7 z(C6Vy2zulhxN>iP@$J%lVY)n3T3K2yE|!E$k{Xf0O#NJwGcd$cl=8X+AEjQHjY#1jaubFXxYxt;ND=GdS75NxLTb^imAN0K zzI8D7YOEG1da?yEfk#Kr!--nmZZ#^qWfsz?b7l@(Bj*4tqh;E4OjmcA&I(Wd8uV>o zl3|bbv#9Y*ECw_s;Rg4%vRz=Xuf)Q-*n6BkpDf^X1`zduTr494q4GpBsEcq)$d}5X zUNfxGlaf_wG7m#Fqt!5XSqjiFc8td8Aif^Vy%0;_v;r(qI7(WYJOx9R*=Vd+st?L` zyVWu+XY>?Kc$~fN*6vr~q)+tZ5{wlV78d7M3#D>cEbNEA>BYj#GTJ2uKODF)zk~sg zg+dO9|E2T4j^XcDG`JdLtV)EWk7^sQ;8%=GPb(6P3B!8qg$)mw_=oobl{W02*|2Y)H&uGw* zoCmUyAkA+j6$algD`p{+`IE9_-`@C8a7^x0;EDdtV*swM2ROd3Z~Y9M5Bk=!bfv<{ zqS2%xJuH<+0>@C4A)hjRFhTC_Qj^`sqpB1*=uwrcO%vr&k9X}+OUk2iZ~PryIGoOe zDBw~d8Rr5nHK8L8ajDc9iy(smHJCgJkIO@@_DOfT(=q!EkB=RIW9U^&bRQDfZREd( zw*4C#JQw3)T~#E_q-NcnkFBXNh4%0Mvp0@TQAR#H2kt-mM@N9%-mS5^;j|h?LPO`{X zwQsLDC$>5yhVqsV%dU9$#?Q#7u5j%f>3pbvO@mCSZaec~8`(wUgEkge2xf+@iiH&v zzJsUR(G+e+Nl$z0)6n0-f=t=QiY`mk`v~sa*(1k%V94M-2uCrI#flErKWLmCg5#!z zsa<(}mv4&oU(n#nKB(I*tehHT1x9?vBzJo@(n9MhFUKl$7;9)g&@?{pls$N>Or+h! zB2jg#vfeN-1g5X{>kr`4tP#p%$>KSmT6MKccmoW2v}E^S=UvPbf0}_2KD_K4EqrjHgp5}<<4B1&DB`55oC60Deu5(v=jj= zIrO^EI0S!^)*aUT?a%?#|`jV>R8moww(FkN_57bCoodTNJoyrpJUm~ z6R>#=koo2hU?hm3@O^K9r&J+whAwm^(*5c8;T$jg7>X^DD+lE_PQ756SROq5sZmK5 z4SFqP37Pi}&z-PFM*ec8%H7aVibmG|J>qOoo67>AFa{Mk8RG&Pr)>T+_c@>D<2UQw zwjGaSqDN3|3}xs);r>>Tr*F^JVj59cyn$B!RDd!hj(6g^>2@4&D;KJlEi$h7&zSR3k` zJ37ezGUCG%!cHhDn-x%JJRW@50nI?J7j#%I+GD0zhfB;I5~(I`B~FdSseLYXm=Rd1vSxK&M}+!a5Jp+zfHk# zm_YuY!-vJ;KSYneza&T%yXlo$N=G_(K>22;aLP%l=uFaMx1e7=A;E@9>KKF(VP)7w z#$!nO+8P|8J(9FHqE&IWT+2&QZ9(O9=)t%urD^nOjU71Fn60rWtYK$69tqVQb|_3O zj6c?YF9n1CtSHcZH3mfGThx5mg)6=s!A|;3%WSu}O_Nh_O!oFO8>TZos5fgoV<2;I zQq9C#oq3b$^RXP4_{rYpG?g~Hvd8Yb1G_{UQti7LA6ViG}E-yiKpW=Y^ufQRBo))nI^N?=~8!8HX9#9)shJ1 zMdvRyAf4~10@3+h1!AqFEleEoA{251&!}ndBE?8#ZnvSI=N$AoKO>K?&+!=reGc36r$i;K|p6G1%%%hudDlk8??F1!D<(E9#UW?VLB?MaKS5cT0Ssdd^rHm=9 zFT;RmAe9|z&JOa-w7iU@k#U1J@VmhDSd)$B_g&O+Pg-xnpr5)YOU3v)oK%HsTEU`C zzLTYu;=mgc6g=l2|(3A~wEDV2s&;~OyO?w{Bqm*K*6 zaiKJS|4uP{mGf{mI6y9g2n1h=b-oi$cpU;Zz@A?$F3qnjP8Gv$5sXkav-O} zvw(V$8prE!N4d(Ov=2+|IV;BDMcOj!44f)VmWo3I<6qX`lq&(&FplZb zMGuvw;%c!Jpyed=-@cCx-OF?Hcaa2o0SZ?t6$Q(v=&_+zOX3%$yXilJk{=Eh#xs6F=<2mLVFY%2r z!-tOw7v1ZnVR~~x7#_urwx(T^KcsoRs&^%XylQeIe~LtMJ4jBXZ+t=`w|X{}>^P?_ zso4Gnqd6CY%G^l&{fz*Gq^gUCA$|98;VB^~bvl1d{gR?u(r4oBB{FJwZe``&MmzGa zNOPcLE&vmc4S9UKIa1a{+2 z-uJ57l75$2(t%YiUt!mkjl4F_hzqtGCLk^d@(CgiHJ&z4QsVvsO)Ajvn7}0lAbKIK z?3LT1e&>+nX0hf?O4+K{Z`-SKr8FZWZUzlR>-G^&{38HWi zL{iaBx1hfFxNuqcDc6*)xj*HmWksKjmr`^>+*hXkx}dp>1prcg4=ZS;wAo1aOaK6=%GBmyx<$(6WOa?m7OD8tox~K)UM1= z8Np-YpGqNf7Y3`xNW`a#@f-)dLWcW@n;`j%fRv=hD|zGuLb#XS+3$vAY1ALl1%7I-bn8dwc%@)`>i*&CtA^Yh42szTz=Y%ivPdy-YUk*&aOrhpS^~{ zNvh*}OFGxo8(wLb$>$D7+Myp6!F-acK6SF4h}a2KKLS$HAFuk66S%7HJs_6s=qa#G z_{~3zBjgXz)ANL}lOYK_eH5r~8{^Z42*?9*vF$ahExr0g%}RxqvBgJ)OZ$Iv=+6q-Eyrou`H6`S zKm1VaNY!_1X{RjzV*B&>g-B<^w6-VzU4y65cgJmBCx=;22+kmSLa-F;m{V3LK9rML!)yK83@sF^3zS(YLb6LF_^1XI8 Ml7Cly5B3254<56}bN~PV literal 0 HcmV?d00001 diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php new file mode 100644 index 000000000000..7a6a464b778d --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php @@ -0,0 +1,83 @@ +google.cloud.telcoautomation.v1.ApplyDeploymentRequest + */ +class ApplyDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment to apply to orchestration cluster. + * + * 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 deployment to apply to orchestration cluster. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ApplyDeploymentRequest + * + * @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 deployment to apply to orchestration cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment to apply to orchestration cluster. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the deployment to apply to orchestration cluster. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php new file mode 100644 index 000000000000..bd968a50653a --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest + */ +class ApplyHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hydrated deployment to apply. + * + * 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 hydrated deployment to apply. Please see + * {@see TelcoAutomationClient::hydratedDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ApplyHydratedDeploymentRequest + * + * @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 hydrated deployment to apply. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hydrated deployment to apply. + * + * 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 hydrated deployment to apply. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php new file mode 100644 index 000000000000..c75363cccf22 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php @@ -0,0 +1,86 @@ +google.cloud.telcoautomation.v1.ApproveBlueprintRequest + */ +class ApproveBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * + * 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 blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ApproveBlueprintRequest + * + * @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 blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * + * 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 blueprint to approve. The blueprint must be in + * Proposed state. A new revision is committed on approval. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php new file mode 100644 index 000000000000..17a778e9c60f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php @@ -0,0 +1,586 @@ +google.cloud.telcoautomation.v1.Blueprint + */ +class Blueprint extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * + * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $source_blueprint = ''; + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $approval_state = 0; + /** + * Optional. Human readable name of a Blueprint. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Name of the repository where the blueprint files are stored. + * + * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $repository = ''; + /** + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $files; + /** + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Blueprint creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the blueprint was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * + * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_provider = ''; + /** + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deployment_level = 0; + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollback_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * @type string $revision_id + * Output only. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * @type string $source_blueprint + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the revision was created. + * @type int $approval_state + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * @type string $display_name + * Optional. Human readable name of a Blueprint. + * @type string $repository + * Output only. Name of the repository where the blueprint files are stored. + * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Blueprint creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the blueprint was updated. + * @type string $source_provider + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * @type int $deployment_level + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * @type bool $rollback_support + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the blueprint. If unspecified, the name will be autogenerated + * from server side. Name of the blueprint must not contain `@` character. + * + * 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. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the blueprint. + * A new revision is committed whenever a blueprint is approved. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * + * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getSourceBlueprint() + { + return $this->source_blueprint; + } + + /** + * Required. Immutable. The public blueprint ID from which this blueprint was + * created. + * + * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setSourceBlueprint($var) + { + GPBUtil::checkString($var, True); + $this->source_blueprint = $var; + + return $this; + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getApprovalState() + { + return $this->approval_state; + } + + /** + * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setApprovalState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Blueprint\ApprovalState::class); + $this->approval_state = $var; + + return $this; + } + + /** + * Optional. Human readable name of a Blueprint. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Human readable name of a Blueprint. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Name of the repository where the blueprint files are stored. + * + * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Output only. Name of the repository where the blueprint files are stored. + * + * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * Optional. Files present in a blueprint. + * When invoking UpdateBlueprint API, only the modified files should be + * included in this. Files that are not included in the update of a blueprint + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key-value attributes that can be set on a blueprint + * resource by the user. + * + * Generated from protobuf field map labels = 10 [(.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. Blueprint creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. Blueprint creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 when the blueprint was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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 when the blueprint was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * + * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceProvider() + { + return $this->source_provider; + } + + /** + * Output only. Source provider is the author of a public blueprint, from + * which this blueprint is created. + * + * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceProvider($var) + { + GPBUtil::checkString($var, True); + $this->source_provider = $var; + + return $this; + } + + /** + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDeploymentLevel() + { + return $this->deployment_level; + } + + /** + * Output only. DeploymentLevel of a blueprint signifies where the blueprint + * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDeploymentLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); + $this->deployment_level = $var; + + return $this; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRollbackSupport() + { + return $this->rollback_support; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRollbackSupport($var) + { + GPBUtil::checkBool($var); + $this->rollback_support = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php new file mode 100644 index 000000000000..1a1fe828d0a8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php @@ -0,0 +1,78 @@ +google.cloud.telcoautomation.v1.Blueprint.ApprovalState + */ +class ApprovalState +{ + /** + * Unspecified state. + * + * Generated from protobuf enum APPROVAL_STATE_UNSPECIFIED = 0; + */ + const APPROVAL_STATE_UNSPECIFIED = 0; + /** + * A blueprint starts in DRAFT state once it is created. All edits are made + * to the blueprint in DRAFT state. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * When the edits are ready for review, blueprint can be proposed and moves + * to PROPOSED state. Edits cannot be made to a blueprint in PROPOSED state. + * + * Generated from protobuf enum PROPOSED = 2; + */ + const PROPOSED = 2; + /** + * When a proposed blueprint is approved, it moves to APPROVED state. A new + * revision is committed. The latest committed revision can be used to + * create a deployment on Orchestration or Workload Cluster. Edits to an + * APPROVED blueprint changes its state back to DRAFT. The last committed + * revision of a blueprint represents its latest APPROVED state. + * + * Generated from protobuf enum APPROVED = 3; + */ + const APPROVED = 3; + + private static $valueToName = [ + self::APPROVAL_STATE_UNSPECIFIED => 'APPROVAL_STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::PROPOSED => 'PROPOSED', + self::APPROVED => 'APPROVED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApprovalState::class, \Google\Cloud\TelcoAutomation\V1\Blueprint_ApprovalState::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php new file mode 100644 index 000000000000..d7586bd49f05 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php @@ -0,0 +1,61 @@ +google.cloud.telcoautomation.v1.BlueprintView + */ +class BlueprintView +{ + /** + * Unspecified enum value. + * + * Generated from protobuf enum BLUEPRINT_VIEW_UNSPECIFIED = 0; + */ + const BLUEPRINT_VIEW_UNSPECIFIED = 0; + /** + * View which only contains metadata. + * + * Generated from protobuf enum BLUEPRINT_VIEW_BASIC = 1; + */ + const BLUEPRINT_VIEW_BASIC = 1; + /** + * View which contains metadata and files it encapsulates. + * + * Generated from protobuf enum BLUEPRINT_VIEW_FULL = 2; + */ + const BLUEPRINT_VIEW_FULL = 2; + + private static $valueToName = [ + self::BLUEPRINT_VIEW_UNSPECIFIED => 'BLUEPRINT_VIEW_UNSPECIFIED', + self::BLUEPRINT_VIEW_BASIC => 'BLUEPRINT_VIEW_BASIC', + self::BLUEPRINT_VIEW_FULL => 'BLUEPRINT_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php new file mode 100644 index 000000000000..c517f57b7d9c --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest + */ +class ComputeDeploymentStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment without revisionID. + * + * 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 deployment without revisionID. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ComputeDeploymentStatusRequest + * + * @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 deployment without revisionID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment without revisionID. + * + * 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 deployment without revisionID. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php new file mode 100644 index 000000000000..0822acdbd981 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse + */ +class ComputeDeploymentStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Aggregated status of a deployment. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $aggregated_status = 0; + /** + * Output only. Resource level status details in deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $resource_statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the deployment. + * @type int $aggregated_status + * Output only. Aggregated status of a deployment. + * @type array<\Google\Cloud\TelcoAutomation\V1\ResourceStatus>|\Google\Protobuf\Internal\RepeatedField $resource_statuses + * Output only. Resource level status details in deployments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the deployment. + * + * 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. Aggregated status of a deployment. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAggregatedStatus() + { + return $this->aggregated_status; + } + + /** + * Output only. Aggregated status of a deployment. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAggregatedStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Status::class); + $this->aggregated_status = $var; + + return $this; + } + + /** + * Output only. Resource level status details in deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceStatuses() + { + return $this->resource_statuses; + } + + /** + * Output only. Resource level status details in deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\TelcoAutomation\V1\ResourceStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\ResourceStatus::class); + $this->resource_statuses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php new file mode 100644 index 000000000000..358159e75a04 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php @@ -0,0 +1,173 @@ +google.cloud.telcoautomation.v1.CreateBlueprintRequest + */ +class CreateBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The name of the blueprint. + * + * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $blueprint_id = ''; + /** + * Required. The `Blueprint` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $blueprint = null; + + /** + * @param string $parent Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint Required. The `Blueprint` to create. + * @param string $blueprintId Optional. The name of the blueprint. + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateBlueprintRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint, string $blueprintId): self + { + return (new self()) + ->setParent($parent) + ->setBlueprint($blueprint) + ->setBlueprintId($blueprintId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $blueprint_id + * Optional. The name of the blueprint. + * @type \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint + * Required. The `Blueprint` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The name of the blueprint. + * + * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBlueprintId() + { + return $this->blueprint_id; + } + + /** + * Optional. The name of the blueprint. + * + * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBlueprintId($var) + { + GPBUtil::checkString($var, True); + $this->blueprint_id = $var; + + return $this; + } + + /** + * Required. The `Blueprint` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Blueprint|null + */ + public function getBlueprint() + { + return $this->blueprint; + } + + public function hasBlueprint() + { + return isset($this->blueprint); + } + + public function clearBlueprint() + { + unset($this->blueprint); + } + + /** + * Required. The `Blueprint` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $var + * @return $this + */ + public function setBlueprint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php new file mode 100644 index 000000000000..c479894e6802 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php @@ -0,0 +1,173 @@ +google.cloud.telcoautomation.v1.CreateDeploymentRequest + */ +class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The name of the deployment. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deployment_id = ''; + /** + * Required. The `Deployment` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment = null; + + /** + * @param string $parent Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $deployment Required. The `Deployment` to create. + * @param string $deploymentId Optional. The name of the deployment. + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateDeploymentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\Deployment $deployment, string $deploymentId): self + { + return (new self()) + ->setParent($parent) + ->setDeployment($deployment) + ->setDeploymentId($deploymentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $deployment_id + * Optional. The name of the deployment. + * @type \Google\Cloud\TelcoAutomation\V1\Deployment $deployment + * Required. The `Deployment` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The name of the deployment. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDeploymentId() + { + return $this->deployment_id; + } + + /** + * Optional. The name of the deployment. + * + * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->deployment_id = $var; + + return $this; + } + + /** + * Required. The `Deployment` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Deployment|null + */ + public function getDeployment() + { + return $this->deployment; + } + + public function hasDeployment() + { + return isset($this->deployment); + } + + public function clearDeployment() + { + unset($this->deployment); + } + + /** + * Required. The `Deployment` to create. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php new file mode 100644 index 000000000000..12291acdb971 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php @@ -0,0 +1,247 @@ +google.cloud.telcoautomation.v1.CreateEdgeSlmRequest + */ +class CreateEdgeSlmRequest 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 + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edge_slm_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edge_slm = 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 TelcoAutomationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edgeSlm Required. The resource being created + * @param string $edgeSlmId Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateEdgeSlmRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edgeSlm, string $edgeSlmId): self + { + return (new self()) + ->setParent($parent) + ->setEdgeSlm($edgeSlm) + ->setEdgeSlmId($edgeSlmId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $edge_slm_id + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * @type \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edge_slm + * 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\Telcoautomation\V1\Telcoautomation::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 + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEdgeSlmId() + { + return $this->edge_slm_id; + } + + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * edge_slm_id from the method_signature of Create RPC + * + * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEdgeSlmId($var) + { + GPBUtil::checkString($var, True); + $this->edge_slm_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\EdgeSlm|null + */ + public function getEdgeSlm() + { + return $this->edge_slm; + } + + public function hasEdgeSlm() + { + return isset($this->edge_slm); + } + + public function clearEdgeSlm() + { + unset($this->edge_slm); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\EdgeSlm $var + * @return $this + */ + public function setEdgeSlm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm::class); + $this->edge_slm = $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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php new file mode 100644 index 000000000000..8c98f3f758d4 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php @@ -0,0 +1,247 @@ +google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest + */ +class CreateOrchestrationClusterRequest 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 + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $orchestration_cluster_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $orchestration_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 TelcoAutomationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestrationCluster Required. The resource being created + * @param string $orchestrationClusterId Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * @return \Google\Cloud\TelcoAutomation\V1\CreateOrchestrationClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestrationCluster, string $orchestrationClusterId): self + { + return (new self()) + ->setParent($parent) + ->setOrchestrationCluster($orchestrationCluster) + ->setOrchestrationClusterId($orchestrationClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $orchestration_cluster_id + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * @type \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestration_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\Telcoautomation\V1\Telcoautomation::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 + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOrchestrationClusterId() + { + return $this->orchestration_cluster_id; + } + + /** + * Required. Id of the requesting object + * If auto-generating Id server-side, remove this field and + * orchestration_cluster_id from the method_signature of Create RPC + * + * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOrchestrationClusterId($var) + { + GPBUtil::checkString($var, True); + $this->orchestration_cluster_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster|null + */ + public function getOrchestrationCluster() + { + return $this->orchestration_cluster; + } + + public function hasOrchestrationCluster() + { + return isset($this->orchestration_cluster); + } + + public function clearOrchestrationCluster() + { + unset($this->orchestration_cluster); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $var + * @return $this + */ + public function setOrchestrationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster::class); + $this->orchestration_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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php new file mode 100644 index 000000000000..8bd4fde06229 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php @@ -0,0 +1,96 @@ +google.cloud.telcoautomation.v1.DeleteBlueprintRequest + */ +class DeleteBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * + * 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 blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DeleteBlueprintRequest + * + * @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 blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * + * 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 blueprint to delete. + * Blueprint name should be in the format {blueprint_id}, if + * {blueprint_id}@{revision_id} is passed then the API throws invalid + * argument. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php new file mode 100644 index 000000000000..fb80f6e26235 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php @@ -0,0 +1,155 @@ +google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest + */ +class DeleteEdgeSlmRequest 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 TelcoAutomationClient::edgeSlmName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DeleteEdgeSlmRequest + * + * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php new file mode 100644 index 000000000000..a7b6698f204a --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php @@ -0,0 +1,155 @@ +google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest + */ +class DeleteOrchestrationClusterRequest 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 TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DeleteOrchestrationClusterRequest + * + * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php new file mode 100644 index 000000000000..57440dc2eacb --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php @@ -0,0 +1,623 @@ +google.cloud.telcoautomation.v1.Deployment + */ +class Deployment extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Required. The blueprint revision from which this deployment was created. + * + * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_blueprint_revision = ''; + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Human readable name of a Deployment. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Name of the repository where the deployment package files are + * stored. + * + * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $repository = ''; + /** + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $files; + /** + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Deployment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the deployment was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * + * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_provider = ''; + /** + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. + * + * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $workload_cluster = ''; + /** + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deployment_level = 0; + /** + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollback_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the deployment. + * @type string $revision_id + * Output only. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * @type string $source_blueprint_revision + * Required. The blueprint revision from which this deployment was created. + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the revision was created. + * @type int $state + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * @type string $display_name + * Optional. Human readable name of a Deployment. + * @type string $repository + * Output only. Name of the repository where the deployment package files are + * stored. + * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Deployment creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the deployment was updated. + * @type string $source_provider + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * @type string $workload_cluster + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. + * @type int $deployment_level + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * @type bool $rollback_support + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The name of the deployment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the deployment. + * + * 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. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. Immutable. The revision ID of the deployment. + * A new revision is committed whenever a change in deployment is applied. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Required. The blueprint revision from which this deployment was created. + * + * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceBlueprintRevision() + { + return $this->source_blueprint_revision; + } + + /** + * Required. The blueprint revision from which this deployment was created. + * + * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceBlueprintRevision($var) + { + GPBUtil::checkString($var, True); + $this->source_blueprint_revision = $var; + + return $this; + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the deployment (DRAFT, APPLIED, DELETING). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Deployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Human readable name of a Deployment. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Human readable name of a Deployment. + * + * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Name of the repository where the deployment package files are + * stored. + * + * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Output only. Name of the repository where the deployment package files are + * stored. + * + * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * Optional. Files present in a deployment. + * When invoking UpdateDeployment API, only the modified files should be + * included in this. Files that are not included in the update of a deployment + * will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels are key-value attributes that can be set on a deployment + * resource by the user. + * + * Generated from protobuf field map labels = 9 [(.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. Deployment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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. Deployment creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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 when the deployment was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.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 when the deployment was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.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. Source provider is the author of a public blueprint, from + * which this deployment is created. + * + * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceProvider() + { + return $this->source_provider; + } + + /** + * Output only. Source provider is the author of a public blueprint, from + * which this deployment is created. + * + * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceProvider($var) + { + GPBUtil::checkString($var, True); + $this->source_provider = $var; + + return $this; + } + + /** + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. + * + * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWorkloadCluster() + { + return $this->workload_cluster; + } + + /** + * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. + * + * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWorkloadCluster($var) + { + GPBUtil::checkString($var, True); + $this->workload_cluster = $var; + + return $this; + } + + /** + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDeploymentLevel() + { + return $this->deployment_level; + } + + /** + * Output only. Attributes to where the deployment can inflict changes. The + * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDeploymentLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); + $this->deployment_level = $var; + + return $this; + } + + /** + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRollbackSupport() + { + return $this->rollback_support; + } + + /** + * Output only. Indicates if the deployment can be rolled back, exported from + * public blueprint. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRollbackSupport($var) + { + GPBUtil::checkBool($var); + $this->rollback_support = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php new file mode 100644 index 000000000000..0b3b8df63823 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php @@ -0,0 +1,80 @@ +google.cloud.telcoautomation.v1.Deployment.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A deployment starts in DRAFT state. All edits are made in DRAFT state. A + * deployment opened for editing after applying will be in draft state, + * while its prevision revision will be its current applied version. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * This state means that the contents (YAML files containing kubernetes + * resources) of the deployment have been applied to an Orchestration or + * Workload Cluster. A revision is created when a deployment is applied. + * This revision will represent the latest view of what is applied on the + * cluster until the deployment is modified and applied again, which will + * create a new revision. + * + * Generated from protobuf enum APPLIED = 2; + */ + const APPLIED = 2; + /** + * A deployment in DELETING state has been marked for deletion. Its + * deletion status can be queried using `ComputeDeploymentStatus` API. No + * updates are allowed to a deployment in DELETING state. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::APPLIED => 'APPLIED', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\Deployment_State::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php new file mode 100644 index 000000000000..f30a5e1284f6 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php @@ -0,0 +1,89 @@ +google.cloud.telcoautomation.v1.DeploymentLevel + */ +class DeploymentLevel +{ + /** + * Default unspecified deployment level. + * + * Generated from protobuf enum DEPLOYMENT_LEVEL_UNSPECIFIED = 0; + */ + const DEPLOYMENT_LEVEL_UNSPECIFIED = 0; + /** + * Blueprints at HYDRATION level cannot be used to create a Deployment + * (A user cannot manually initate deployment of these blueprints on + * orchestration or workload cluster). + * These blueprints stay in a user's private catalog and are configured and + * deployed by TNA automation. + * + * Generated from protobuf enum HYDRATION = 1; + */ + const HYDRATION = 1; + /** + * Blueprints at SINGLE_DEPLOYMENT level can be + * a) Modified in private catalog. + * b) Used to create a deployment on orchestration cluster by the user, once + * approved. + * + * Generated from protobuf enum SINGLE_DEPLOYMENT = 2; + */ + const SINGLE_DEPLOYMENT = 2; + /** + * Blueprints at MULTI_DEPLOYMENT level can be + * a) Modified in private catalog. + * b) Used to create a deployment on orchestration cluster which will create + * further hydrated deployments. + * + * Generated from protobuf enum MULTI_DEPLOYMENT = 3; + */ + const MULTI_DEPLOYMENT = 3; + /** + * Blueprints at WORKLOAD_CLUSTER_DEPLOYMENT level can be + * a) Modified in private catalog. + * b) Used to create a deployment on workload cluster by the user, once + * approved. + * + * Generated from protobuf enum WORKLOAD_CLUSTER_DEPLOYMENT = 4; + */ + const WORKLOAD_CLUSTER_DEPLOYMENT = 4; + + private static $valueToName = [ + self::DEPLOYMENT_LEVEL_UNSPECIFIED => 'DEPLOYMENT_LEVEL_UNSPECIFIED', + self::HYDRATION => 'HYDRATION', + self::SINGLE_DEPLOYMENT => 'SINGLE_DEPLOYMENT', + self::MULTI_DEPLOYMENT => 'MULTI_DEPLOYMENT', + self::WORKLOAD_CLUSTER_DEPLOYMENT => 'WORKLOAD_CLUSTER_DEPLOYMENT', + ]; + + 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php new file mode 100644 index 000000000000..22be9d27a288 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php @@ -0,0 +1,61 @@ +google.cloud.telcoautomation.v1.DeploymentView + */ +class DeploymentView +{ + /** + * Unspecified enum value. + * + * Generated from protobuf enum DEPLOYMENT_VIEW_UNSPECIFIED = 0; + */ + const DEPLOYMENT_VIEW_UNSPECIFIED = 0; + /** + * View which only contains metadata. + * + * Generated from protobuf enum DEPLOYMENT_VIEW_BASIC = 1; + */ + const DEPLOYMENT_VIEW_BASIC = 1; + /** + * View which contains metadata and files it encapsulates. + * + * Generated from protobuf enum DEPLOYMENT_VIEW_FULL = 2; + */ + const DEPLOYMENT_VIEW_FULL = 2; + + private static $valueToName = [ + self::DEPLOYMENT_VIEW_UNSPECIFIED => 'DEPLOYMENT_VIEW_UNSPECIFIED', + self::DEPLOYMENT_VIEW_BASIC => 'DEPLOYMENT_VIEW_BASIC', + self::DEPLOYMENT_VIEW_FULL => 'DEPLOYMENT_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php new file mode 100644 index 000000000000..7b4d9258c0eb --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest + */ +class DiscardBlueprintChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint of which changes are being discarded. + * + * 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 blueprint of which changes are being discarded. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DiscardBlueprintChangesRequest + * + * @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 blueprint of which changes are being discarded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint of which changes are being discarded. + * + * 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 blueprint of which changes are being discarded. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php new file mode 100644 index 000000000000..3fa79c1c86ed --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php @@ -0,0 +1,33 @@ +google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse + */ +class DiscardBlueprintChangesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php new file mode 100644 index 000000000000..43f2d7329008 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest + */ +class DiscardDeploymentChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment of which changes are being discarded. + * + * 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 deployment of which changes are being discarded. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\DiscardDeploymentChangesRequest + * + * @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 deployment of which changes are being discarded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment of which changes are being discarded. + * + * 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 deployment of which changes are being discarded. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php new file mode 100644 index 000000000000..7699c38576c8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php @@ -0,0 +1,33 @@ +google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse + */ +class DiscardDeploymentChangesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php new file mode 100644 index 000000000000..39267d98f3dc --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php @@ -0,0 +1,343 @@ +google.cloud.telcoautomation.v1.EdgeSlm + */ +class EdgeSlm extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the EdgeSlm resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * + * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $orchestration_cluster = ''; + /** + * Output only. [Output only] Create time stamp. + * + * 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 time stamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Provides the active TNA version for this resource. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tna_version = ''; + /** + * Output only. State of the EdgeSlm resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $workload_cluster_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the EdgeSlm resource. + * @type string $orchestration_cluster + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * @type string $tna_version + * Output only. Provides the active TNA version for this resource. + * @type int $state + * Output only. State of the EdgeSlm resource. + * @type int $workload_cluster_type + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the EdgeSlm resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the EdgeSlm 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; + } + + /** + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * + * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getOrchestrationCluster() + { + return $this->orchestration_cluster; + } + + /** + * Immutable. Reference to the orchestration cluster on which templates for + * this resources will be applied. This should be of format + * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. + * + * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOrchestrationCluster($var) + { + GPBUtil::checkString($var, True); + $this->orchestration_cluster = $var; + + return $this; + } + + /** + * Output only. [Output only] Create time stamp. + * + * 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 time stamp. + * + * 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 time stamp. + * + * 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 time stamp. + * + * 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; + } + + /** + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. The key and value should contain + * characters which are UTF-8 compliant and less than 50 characters. + * + * Generated from protobuf field map labels = 4 [(.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. Provides the active TNA version for this resource. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTnaVersion() + { + return $this->tna_version; + } + + /** + * Output only. Provides the active TNA version for this resource. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTnaVersion($var) + { + GPBUtil::checkString($var, True); + $this->tna_version = $var; + + return $this; + } + + /** + * Output only. State of the EdgeSlm resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the EdgeSlm resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWorkloadClusterType() + { + return $this->workload_cluster_type; + } + + /** + * Optional. Type of workload cluster for which an EdgeSLM resource is + * created. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWorkloadClusterType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm\WorkloadClusterType::class); + $this->workload_cluster_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php new file mode 100644 index 000000000000..82fcd65e0ab5 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php @@ -0,0 +1,79 @@ +google.cloud.telcoautomation.v1.EdgeSlm.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * EdgeSlm is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * EdgeSlm has been created and is ready for use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * EdgeSlm is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * EdgeSlm encountered an error and is in an indeterministic + * state. User can still initiate a delete operation on this state. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\EdgeSlm_State::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php new file mode 100644 index 000000000000..41f286b4ac3b --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php @@ -0,0 +1,65 @@ +google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType + */ +class WorkloadClusterType +{ + /** + * Unspecified workload cluster. + * + * Generated from protobuf enum WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0; + */ + const WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0; + /** + * Workload cluster is a GDCE cluster. + * + * Generated from protobuf enum GDCE = 1; + */ + const GDCE = 1; + /** + * Workload cluster is a GKE cluster. + * + * Generated from protobuf enum GKE = 2; + */ + const GKE = 2; + + private static $valueToName = [ + self::WORKLOAD_CLUSTER_TYPE_UNSPECIFIED => 'WORKLOAD_CLUSTER_TYPE_UNSPECIFIED', + self::GDCE => 'GDCE', + self::GKE => 'GKE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WorkloadClusterType::class, \Google\Cloud\TelcoAutomation\V1\EdgeSlm_WorkloadClusterType::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php new file mode 100644 index 000000000000..d5b01324ed6c --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php @@ -0,0 +1,177 @@ +google.cloud.telcoautomation.v1.File + */ +class File extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $path = ''; + /** + * Optional. The contents of a file in string format. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $content = ''; + /** + * Optional. Signifies whether a file is marked for deletion. + * + * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deleted = false; + /** + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * + * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $editable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * @type string $content + * Optional. The contents of a file in string format. + * @type bool $deleted + * Optional. Signifies whether a file is marked for deletion. + * @type bool $editable + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Required. Path of the file in package. + * e.g. `gdce/v1/cluster.yaml` + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. The contents of a file in string format. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Optional. The contents of a file in string format. + * + * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Optional. Signifies whether a file is marked for deletion. + * + * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDeleted() + { + return $this->deleted; + } + + /** + * Optional. Signifies whether a file is marked for deletion. + * + * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDeleted($var) + { + GPBUtil::checkBool($var); + $this->deleted = $var; + + return $this; + } + + /** + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * + * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEditable() + { + return $this->editable; + } + + /** + * Optional. Indicates whether changes are allowed to a file. If the field is + * not set, the file cannot be edited. + * + * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEditable($var) + { + GPBUtil::checkBool($var); + $this->editable = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php new file mode 100644 index 000000000000..9a1138aa7425 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php @@ -0,0 +1,383 @@ +google.cloud.telcoautomation.v1.FullManagementConfig + */ +class FullManagementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet = ''; + /** + * Optional. The /28 network that the masters will use. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_ipv4_cidr_block = ''; + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_cidr_block = ''; + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_cidr_block = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_named_range = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_named_range = ''; + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_authorized_networks_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * @type string $subnet + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * @type string $master_ipv4_cidr_block + * Optional. The /28 network that the masters will use. + * @type string $cluster_cidr_block + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $services_cidr_block + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $cluster_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * @type string $services_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * @type \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Optional. The /28 network that the masters will use. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMasterIpv4CidrBlock() + { + return $this->master_ipv4_cidr_block; + } + + /** + * Optional. The /28 network that the masters will use. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMasterIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->master_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterCidrBlock() + { + return $this->cluster_cidr_block; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cluster_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesCidrBlock() + { + return $this->services_cidr_block; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->services_cidr_block = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterNamedRange() + { + return $this->cluster_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->cluster_named_range = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesNamedRange() + { + return $this->services_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->services_named_range = $var; + + return $this; + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig|null + */ + public function getMasterAuthorizedNetworksConfig() + { + return $this->master_authorized_networks_config; + } + + public function hasMasterAuthorizedNetworksConfig() + { + return isset($this->master_authorized_networks_config); + } + + public function clearMasterAuthorizedNetworksConfig() + { + unset($this->master_authorized_networks_config); + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $var + * @return $this + */ + public function setMasterAuthorizedNetworksConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig::class); + $this->master_authorized_networks_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php new file mode 100644 index 000000000000..5ff49a3cb1b2 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php @@ -0,0 +1,139 @@ +google.cloud.telcoautomation.v1.GetBlueprintRequest + */ +class GetBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetBlueprintRequest + * + * @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 blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * @type int $view + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the blueprint. + * Case 1: If the name provided in the request is + * {blueprint_id}@{revision_id}, then the revision with revision_id will be + * returned. Case 2: If the name provided in the request is {blueprint}, then + * the current state of the blueprint is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Defines the type of view of the blueprint. + * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\BlueprintView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php new file mode 100644 index 000000000000..246d68fc20e7 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php @@ -0,0 +1,144 @@ +google.cloud.telcoautomation.v1.GetDeploymentRequest + */ +class GetDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetDeploymentRequest + * + * @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 deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * @type int $view + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the deployment. + * Case 1: If the name provided in the request is + * {deployment_id}@{revision_id}, then the revision with revision_id will be + * returned. + * Case 2: If the name provided in the request is {deployment}, then + * the current state of the deployment is returned. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Defines the type of view of the deployment. + * When field is not present VIEW_BASIC is considered as default. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php new file mode 100644 index 000000000000..64848428d743 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetEdgeSlmRequest + */ +class GetEdgeSlmRequest 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 TelcoAutomationClient::edgeSlmName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetEdgeSlmRequest + * + * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php new file mode 100644 index 000000000000..895c91bcdec2 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest + */ +class GetHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the hydrated deployment. + * + * 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 hydrated deployment. Please see + * {@see TelcoAutomationClient::hydratedDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetHydratedDeploymentRequest + * + * @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 hydrated deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the hydrated deployment. + * + * 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 hydrated deployment. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php new file mode 100644 index 000000000000..4fc7dcd45bee --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest + */ +class GetOrchestrationClusterRequest 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 TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetOrchestrationClusterRequest + * + * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php new file mode 100644 index 000000000000..825d020fa884 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.GetPublicBlueprintRequest + */ +class GetPublicBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the public blueprint. + * + * 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 public blueprint. Please see + * {@see TelcoAutomationClient::publicBlueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\GetPublicBlueprintRequest + * + * @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 public blueprint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the public blueprint. + * + * 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 public blueprint. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php new file mode 100644 index 000000000000..efc74725b2e4 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php @@ -0,0 +1,186 @@ +google.cloud.telcoautomation.v1.HydratedDeployment + */ +class HydratedDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the hydrated deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. State of the hydrated deployment (DRAFT, APPLIED). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $files; + /** + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * + * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the hydrated deployment. + * @type int $state + * Output only. State of the hydrated deployment (DRAFT, APPLIED). + * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * @type string $workload_cluster + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the hydrated deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the hydrated deployment. + * + * 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. State of the hydrated deployment (DRAFT, APPLIED). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the hydrated deployment (DRAFT, APPLIED). + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFiles() + { + return $this->files; + } + + /** + * Optional. File contents of a hydrated deployment. + * When invoking UpdateHydratedBlueprint API, only the modified files should + * be included in this. Files that are not included in the update of a + * hydrated deployment will not be changed. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); + $this->files = $arr; + + return $this; + } + + /** + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * + * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkloadCluster() + { + return $this->workload_cluster; + } + + /** + * Output only. WorkloadCluster identifies which workload cluster will the + * hydrated deployment will be deployed on. + * + * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkloadCluster($var) + { + GPBUtil::checkString($var, True); + $this->workload_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php new file mode 100644 index 000000000000..8e9287c16123 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php @@ -0,0 +1,66 @@ +google.cloud.telcoautomation.v1.HydratedDeployment.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * A hydrated deployment starts in DRAFT state. All edits are made in DRAFT + * state. + * + * Generated from protobuf enum DRAFT = 1; + */ + const DRAFT = 1; + /** + * When the edit is applied, the hydrated deployment moves to APPLIED + * state. No changes can be made once a hydrated deployment is applied. + * + * Generated from protobuf enum APPLIED = 2; + */ + const APPLIED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::DRAFT => 'DRAFT', + self::APPLIED => 'APPLIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment_State::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php new file mode 100644 index 000000000000..46c4cdb1c2c8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php @@ -0,0 +1,111 @@ +google.cloud.telcoautomation.v1.HydrationStatus + */ +class HydrationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. SiteVersion Hydration is targeting. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $site_version = null; + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\SiteVersion $site_version + * Output only. SiteVersion Hydration is targeting. + * @type string $status + * Output only. Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. SiteVersion Hydration is targeting. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\SiteVersion|null + */ + public function getSiteVersion() + { + return $this->site_version; + } + + public function hasSiteVersion() + { + return isset($this->site_version); + } + + public function clearSiteVersion() + { + unset($this->site_version); + } + + /** + * Output only. SiteVersion Hydration is targeting. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\SiteVersion $var + * @return $this + */ + public function setSiteVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\SiteVersion::class); + $this->site_version = $var; + + return $this; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php new file mode 100644 index 000000000000..baedb5d45cad --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php @@ -0,0 +1,153 @@ +google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest + */ +class ListBlueprintRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The name of the blueprint to list revisions for. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListBlueprintRevisionsRequest + * + * @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 blueprint to list revisions for. + * @type int $page_size + * The maximum number of revisions to return per page. + * @type string $page_token + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint to list revisions for. + * + * 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 blueprint to list revisions for. + * + * 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 maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of revisions to return per page. + * + * 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 page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token, received from a previous ListBlueprintRevisions call + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php new file mode 100644 index 000000000000..c935afeb4fe9 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse + */ +class ListBlueprintRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The revisions of the blueprint. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + */ + private $blueprints; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints + * The revisions of the blueprint. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The revisions of the blueprint. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlueprints() + { + return $this->blueprints; + } + + /** + * The revisions of the blueprint. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprints = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php new file mode 100644 index 000000000000..2b9f18e3d3cd --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php @@ -0,0 +1,205 @@ +google.cloud.telcoautomation.v1.ListBlueprintsRequest + */ +class ListBlueprintsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of blueprints to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListBlueprintsRequest + * + * @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 parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $filter + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * @type int $page_size + * Optional. The maximum number of blueprints to return per page. + * @type string $page_token + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering only supports equality on blueprint state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". + * + * 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; + } + + /** + * Optional. The maximum number of blueprints to return per page. + * + * 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 blueprints to return per page. + * + * 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. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListBlueprints call. + * It can be provided to retrieve the subsequent page. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php new file mode 100644 index 000000000000..98af4e8efc40 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListBlueprintsResponse + */ +class ListBlueprintsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested blueprints. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + */ + private $blueprints; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints + * The list of requested blueprints. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested blueprints. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlueprints() + { + return $this->blueprints; + } + + /** + * The list of requested blueprints. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprints = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php new file mode 100644 index 000000000000..a5b6236e0de4 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php @@ -0,0 +1,153 @@ +google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest + */ +class ListDeploymentRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the deployment to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The maximum number of revisions to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The name of the deployment to list revisions for. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListDeploymentRevisionsRequest + * + * @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 deployment to list revisions for. + * @type int $page_size + * Optional. The maximum number of revisions to return per page. + * @type string $page_token + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the deployment to list revisions for. + * + * 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 deployment to list revisions for. + * + * 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 maximum number of revisions to return per page. + * + * 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 revisions to return per page. + * + * 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. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListDeploymentRevisions + * call Provide this to retrieve the subsequent page. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php new file mode 100644 index 000000000000..977b44de59c2 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse + */ +class ListDeploymentRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The revisions of the deployment. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The revisions of the deployment. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The revisions of the deployment. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The revisions of the deployment. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php new file mode 100644 index 000000000000..6b3f2db56d61 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php @@ -0,0 +1,205 @@ +google.cloud.telcoautomation.v1.ListDeploymentsRequest + */ +class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of deployments to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListDeploymentsRequest + * + * @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 parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $filter + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * @type int $page_size + * Optional. The maximum number of deployments to return per page. + * @type string $page_token + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering only supports equality on deployment state. + * It should be in the form: "state = DRAFT". `OR` operator can be used to + * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". + * + * 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; + } + + /** + * Optional. The maximum number of deployments to return per page. + * + * 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 deployments to return per page. + * + * 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. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListDeployments call. + * It can be provided to retrieve the subsequent page. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php new file mode 100644 index 000000000000..451c88afd295 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListDeploymentsResponse + */ +class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The list of requested deployments. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The list of requested deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php new file mode 100644 index 000000000000..3fd5a27fa80a --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php @@ -0,0 +1,221 @@ +google.cloud.telcoautomation.v1.ListEdgeSlmsRequest + */ +class ListEdgeSlmsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListEdgeSlmsRequest + * + * 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 ListEdgeSlmsRequest + * Please see {@see TelcoAutomationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListEdgeSlmsRequest + * + * @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 ListEdgeSlmsRequest + * @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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListEdgeSlmsRequest + * + * 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 ListEdgeSlmsRequest + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php new file mode 100644 index 000000000000..381a04774e22 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.ListEdgeSlmsResponse + */ +class ListEdgeSlmsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of EdgeSlm + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; + */ + private $edge_slms; + /** + * 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 array<\Google\Cloud\TelcoAutomation\V1\EdgeSlm>|\Google\Protobuf\Internal\RepeatedField $edge_slms + * The list of EdgeSlm + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of EdgeSlm + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEdgeSlms() + { + return $this->edge_slms; + } + + /** + * The list of EdgeSlm + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\EdgeSlm>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEdgeSlms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\EdgeSlm::class); + $this->edge_slms = $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php new file mode 100644 index 000000000000..c25e8a018545 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php @@ -0,0 +1,165 @@ +google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest + */ +class ListHydratedDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The deployment managing the hydrated deployments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The deployment managing the hydrated deployments. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListHydratedDeploymentsRequest + * + * @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 deployment managing the hydrated deployments. + * @type int $page_size + * Optional. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set to 1000. + * @type string $page_token + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The deployment managing the hydrated deployments. + * + * 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 deployment managing the hydrated deployments. + * + * 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 maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set 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. The maximum number of hydrated deployments to return. The service + * may return fewer than this value. If unspecified, at most 50 hydrated + * deployments will be returned. The maximum value is 1000. Values above 1000 + * will be set 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. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous ListHydratedDeployments + * call. Provide this to retrieve the subsequent page. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php new file mode 100644 index 000000000000..bebff355c6f6 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse + */ +class ListHydratedDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of hydrated deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; + */ + private $hydrated_deployments; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\HydratedDeployment>|\Google\Protobuf\Internal\RepeatedField $hydrated_deployments + * The list of hydrated deployments. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of hydrated deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHydratedDeployments() + { + return $this->hydrated_deployments; + } + + /** + * The list of hydrated deployments. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\HydratedDeployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHydratedDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment::class); + $this->hydrated_deployments = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php new file mode 100644 index 000000000000..9577ff201170 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php @@ -0,0 +1,221 @@ +google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest + */ +class ListOrchestrationClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListOrchestrationClustersRequest + * + * 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 ListOrchestrationClustersRequest + * Please see {@see TelcoAutomationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListOrchestrationClustersRequest + * + * @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 ListOrchestrationClustersRequest + * @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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListOrchestrationClustersRequest + * + * 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 ListOrchestrationClustersRequest + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php new file mode 100644 index 000000000000..762548d5a74b --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse + */ +class ListOrchestrationClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of OrchestrationCluster + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; + */ + private $orchestration_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 array<\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster>|\Google\Protobuf\Internal\RepeatedField $orchestration_clusters + * The list of OrchestrationCluster + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of OrchestrationCluster + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrchestrationClusters() + { + return $this->orchestration_clusters; + } + + /** + * The list of OrchestrationCluster + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrchestrationClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster::class); + $this->orchestration_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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php new file mode 100644 index 000000000000..29491797f726 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php @@ -0,0 +1,163 @@ +google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest + */ +class ListPublicBlueprintsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * + * 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. If unspecified, server will pick an appropriate default. + * + * 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 = ''; + + /** + * @param string $parent Required. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". Please see + * {@see TelcoAutomationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ListPublicBlueprintsRequest + * + * @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 of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * + * 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 of public blueprint. + * Format should be - + * "projects/{project_id}/locations/{location_name}". + * + * 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. If unspecified, server will pick an appropriate default. + * + * 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. If unspecified, server will pick an appropriate default. + * + * 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; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php new file mode 100644 index 000000000000..8c788b83b9f3 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse + */ +class ListPublicBlueprintsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of public blueprints to return. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; + */ + private $public_blueprints; + /** + * Output only. A token identifying a page of results the server should + * return. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\PublicBlueprint>|\Google\Protobuf\Internal\RepeatedField $public_blueprints + * The list of public blueprints to return. + * @type string $next_page_token + * Output only. A token identifying a page of results the server should + * return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of public blueprints to return. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPublicBlueprints() + { + return $this->public_blueprints; + } + + /** + * The list of public blueprints to return. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\PublicBlueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPublicBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\PublicBlueprint::class); + $this->public_blueprints = $arr; + + return $this; + } + + /** + * Output only. A token identifying a page of results the server should + * return. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token identifying a page of results the server should + * return. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php new file mode 100644 index 000000000000..b4f1b49bdefe --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php @@ -0,0 +1,111 @@ +google.cloud.telcoautomation.v1.ManagementConfig + */ +class ManagementConfig extends \Google\Protobuf\Internal\Message +{ + protected $oneof_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig $standard_management_config + * Configuration of the standard (GKE) cluster management + * @type \Google\Cloud\TelcoAutomation\V1\FullManagementConfig $full_management_config + * Configuration of the full (Autopilot) cluster management. Full cluster + * management is a preview feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Configuration of the standard (GKE) cluster management + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.StandardManagementConfig standard_management_config = 1; + * @return \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig|null + */ + public function getStandardManagementConfig() + { + return $this->readOneof(1); + } + + public function hasStandardManagementConfig() + { + return $this->hasOneof(1); + } + + /** + * Configuration of the standard (GKE) cluster management + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.StandardManagementConfig standard_management_config = 1; + * @param \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig $var + * @return $this + */ + public function setStandardManagementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Configuration of the full (Autopilot) cluster management. Full cluster + * management is a preview feature. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.FullManagementConfig full_management_config = 2; + * @return \Google\Cloud\TelcoAutomation\V1\FullManagementConfig|null + */ + public function getFullManagementConfig() + { + return $this->readOneof(2); + } + + public function hasFullManagementConfig() + { + return $this->hasOneof(2); + } + + /** + * Configuration of the full (Autopilot) cluster management. Full cluster + * management is a preview feature. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.FullManagementConfig full_management_config = 2; + * @param \Google\Cloud\TelcoAutomation\V1\FullManagementConfig $var + * @return $this + */ + public function setFullManagementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\FullManagementConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOneofConfig() + { + return $this->whichOneof("oneof_config"); + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php new file mode 100644 index 000000000000..fb7c70431adc --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php @@ -0,0 +1,71 @@ +google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig + */ +class MasterAuthorizedNetworksConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cidr_blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $cidr_blocks + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCidrBlocks() + { + return $this->cidr_blocks; + } + + /** + * Optional. cidr_blocks define up to 50 external networks that could access + * Kubernetes master through HTTPS. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock::class); + $this->cidr_blocks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php new file mode 100644 index 000000000000..d6bb751fb2ba --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php @@ -0,0 +1,120 @@ +google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock + */ +class CidrBlock extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * + * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cidr_block = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * @type string $cidr_block + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. display_name is an optional field for users to identify CIDR + * blocks. + * + * Generated from protobuf field string display_name = 1 [(.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. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * + * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCidrBlock() + { + return $this->cidr_block; + } + + /** + * Optional. cidr_block must be specified in CIDR notation when using + * master_authorized_networks_config. Currently, the user could still use + * the deprecated man_block field, so this field is currently optional, but + * will be required in the future. + * + * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cidr_block = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CidrBlock::class, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig_CidrBlock::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php new file mode 100644 index 000000000000..34b67fa12bcd --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php @@ -0,0 +1,189 @@ +google.cloud.telcoautomation.v1.NFDeploySiteStatus + */ +class NFDeploySiteStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Site id. + * + * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $site = ''; + /** + * Output only. If true, the Site Deletion is in progress. + * + * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_deletion = false; + /** + * Output only. Hydration status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hydration = null; + /** + * Output only. Workload status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $site + * Output only. Site id. + * @type bool $pending_deletion + * Output only. If true, the Site Deletion is in progress. + * @type \Google\Cloud\TelcoAutomation\V1\HydrationStatus $hydration + * Output only. Hydration status. + * @type \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $workload + * Output only. Workload status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Site id. + * + * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSite() + { + return $this->site; + } + + /** + * Output only. Site id. + * + * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSite($var) + { + GPBUtil::checkString($var, True); + $this->site = $var; + + return $this; + } + + /** + * Output only. If true, the Site Deletion is in progress. + * + * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getPendingDeletion() + { + return $this->pending_deletion; + } + + /** + * Output only. If true, the Site Deletion is in progress. + * + * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setPendingDeletion($var) + { + GPBUtil::checkBool($var); + $this->pending_deletion = $var; + + return $this; + } + + /** + * Output only. Hydration status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\HydrationStatus|null + */ + public function getHydration() + { + return $this->hydration; + } + + public function hasHydration() + { + return isset($this->hydration); + } + + public function clearHydration() + { + unset($this->hydration); + } + + /** + * Output only. Hydration status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\HydrationStatus $var + * @return $this + */ + public function setHydration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydrationStatus::class); + $this->hydration = $var; + + return $this; + } + + /** + * Output only. Workload status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\WorkloadStatus|null + */ + public function getWorkload() + { + return $this->workload; + } + + public function hasWorkload() + { + return isset($this->workload); + } + + public function clearWorkload() + { + unset($this->workload); + } + + /** + * Output only. Workload status. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $var + * @return $this + */ + public function setWorkload($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\WorkloadStatus::class); + $this->workload = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php new file mode 100644 index 000000000000..8bfc09183fbf --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php @@ -0,0 +1,139 @@ +google.cloud.telcoautomation.v1.NFDeployStatus + */ +class NFDeployStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Total number of NFs targeted by this deployment + * + * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $targeted_nfs = 0; + /** + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * + * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ready_nfs = 0; + /** + * Output only. Per-Site Status. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sites; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $targeted_nfs + * Output only. Total number of NFs targeted by this deployment + * @type int $ready_nfs + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * @type array<\Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus>|\Google\Protobuf\Internal\RepeatedField $sites + * Output only. Per-Site Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Total number of NFs targeted by this deployment + * + * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTargetedNfs() + { + return $this->targeted_nfs; + } + + /** + * Output only. Total number of NFs targeted by this deployment + * + * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTargetedNfs($var) + { + GPBUtil::checkInt32($var); + $this->targeted_nfs = $var; + + return $this; + } + + /** + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * + * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReadyNfs() + { + return $this->ready_nfs; + } + + /** + * Output only. Total number of NFs targeted by this deployment with a Ready + * Condition set. + * + * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReadyNfs($var) + { + GPBUtil::checkInt32($var); + $this->ready_nfs = $var; + + return $this; + } + + /** + * Output only. Per-Site Status. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSites() + { + return $this->sites; + } + + /** + * Output only. Per-Site Status. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus::class); + $this->sites = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php new file mode 100644 index 000000000000..c01fc50eab26 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.telcoautomation.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 been cancelled successfully + * 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 been cancelled successfully + * 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\Telcoautomation\V1\Telcoautomation::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 been cancelled successfully + * 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 been cancelled successfully + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php new file mode 100644 index 000000000000..997a97f6304f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php @@ -0,0 +1,306 @@ +google.cloud.telcoautomation.v1.OrchestrationCluster + */ +class OrchestrationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Management configuration of the underlying GKE cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; + */ + protected $management_config = null; + /** + * Output only. [Output only] Create time stamp. + * + * 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 time stamp. + * + * 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; + /** + * Output only. Provides the TNA version installed on the cluster. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tna_version = ''; + /** + * Output only. State of the Orchestration Cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * @type \Google\Cloud\TelcoAutomation\V1\ManagementConfig $management_config + * Management configuration of the underlying GKE cluster. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type string $tna_version + * Output only. Provides the TNA version installed on the cluster. + * @type int $state + * Output only. State of the Orchestration Cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the orchestration cluster. The name of orchestration cluster cannot + * be more than 24 characters. + * + * 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; + } + + /** + * Management configuration of the underlying GKE cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; + * @return \Google\Cloud\TelcoAutomation\V1\ManagementConfig|null + */ + public function getManagementConfig() + { + return $this->management_config; + } + + public function hasManagementConfig() + { + return isset($this->management_config); + } + + public function clearManagementConfig() + { + unset($this->management_config); + } + + /** + * Management configuration of the underlying GKE cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; + * @param \Google\Cloud\TelcoAutomation\V1\ManagementConfig $var + * @return $this + */ + public function setManagementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\ManagementConfig::class); + $this->management_config = $var; + + return $this; + } + + /** + * Output only. [Output only] Create time stamp. + * + * 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 time stamp. + * + * 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 time stamp. + * + * 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 time stamp. + * + * 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; + } + + /** + * Output only. Provides the TNA version installed on the cluster. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTnaVersion() + { + return $this->tna_version; + } + + /** + * Output only. Provides the TNA version installed on the cluster. + * + * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTnaVersion($var) + { + GPBUtil::checkString($var, True); + $this->tna_version = $var; + + return $this; + } + + /** + * Output only. State of the Orchestration Cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the Orchestration Cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php new file mode 100644 index 000000000000..37e6dbd18bb0 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php @@ -0,0 +1,79 @@ +google.cloud.telcoautomation.v1.OrchestrationCluster.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * OrchestrationCluster is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * OrchestrationCluster has been created and is ready for use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * OrchestrationCluster is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * OrchestrationCluster encountered an error and is in an indeterministic + * state. User can still initiate a delete operation on this state. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => '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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster_State::class); + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php new file mode 100644 index 000000000000..55d600ee30af --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.ProposeBlueprintRequest + */ +class ProposeBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint being proposed. + * + * 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 blueprint being proposed. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\ProposeBlueprintRequest + * + * @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 blueprint being proposed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint being proposed. + * + * 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 blueprint being proposed. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php new file mode 100644 index 000000000000..0f344f29b8ca --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php @@ -0,0 +1,250 @@ +google.cloud.telcoautomation.v1.PublicBlueprint + */ +class PublicBlueprint extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the public blueprint. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The display name of the public blueprint. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The description of the public blueprint. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; + */ + protected $deployment_level = 0; + /** + * Source provider is the author of a public blueprint. e.g. Google, vendors + * + * Generated from protobuf field string source_provider = 5; + */ + protected $source_provider = ''; + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollback_support = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the public blueprint. + * @type string $display_name + * The display name of the public blueprint. + * @type string $description + * The description of the public blueprint. + * @type int $deployment_level + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * @type string $source_provider + * Source provider is the author of a public blueprint. e.g. Google, vendors + * @type bool $rollback_support + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Name of the public blueprint. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the public blueprint. + * + * 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 display name of the public blueprint. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the public blueprint. + * + * 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 description of the public blueprint. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the public blueprint. + * + * 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; + } + + /** + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; + * @return int + */ + public function getDeploymentLevel() + { + return $this->deployment_level; + } + + /** + * DeploymentLevel of a blueprint signifies where the blueprint will be + * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; + * @param int $var + * @return $this + */ + public function setDeploymentLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); + $this->deployment_level = $var; + + return $this; + } + + /** + * Source provider is the author of a public blueprint. e.g. Google, vendors + * + * Generated from protobuf field string source_provider = 5; + * @return string + */ + public function getSourceProvider() + { + return $this->source_provider; + } + + /** + * Source provider is the author of a public blueprint. e.g. Google, vendors + * + * Generated from protobuf field string source_provider = 5; + * @param string $var + * @return $this + */ + public function setSourceProvider($var) + { + GPBUtil::checkString($var, True); + $this->source_provider = $var; + + return $this; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRollbackSupport() + { + return $this->rollback_support; + } + + /** + * Output only. Indicates if the deployment created from this blueprint can be + * rolled back. + * + * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRollbackSupport($var) + { + GPBUtil::checkBool($var); + $this->rollback_support = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php new file mode 100644 index 000000000000..7222716ce547 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.RejectBlueprintRequest + */ +class RejectBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the blueprint being rejected. + * + * 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 blueprint being rejected. Please see + * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\RejectBlueprintRequest + * + * @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 blueprint being rejected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the blueprint being rejected. + * + * 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 blueprint being rejected. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php new file mode 100644 index 000000000000..adae44ce3934 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php @@ -0,0 +1,81 @@ +google.cloud.telcoautomation.v1.RemoveDeploymentRequest + */ +class RemoveDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of deployment to initiate delete. + * + * 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 deployment to initiate delete. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * + * @return \Google\Cloud\TelcoAutomation\V1\RemoveDeploymentRequest + * + * @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 deployment to initiate delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of deployment to initiate 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 name of deployment to initiate 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php new file mode 100644 index 000000000000..d9beabf366fe --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php @@ -0,0 +1,315 @@ +google.cloud.telcoautomation.v1.ResourceStatus + */ +class ResourceStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Namespace of the resource. + * + * Generated from protobuf field string resource_namespace = 2; + */ + protected $resource_namespace = ''; + /** + * Group to which the resource belongs to. + * + * Generated from protobuf field string group = 3; + */ + protected $group = ''; + /** + * Version of the resource. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Kind of the resource. + * + * Generated from protobuf field string kind = 5; + */ + protected $kind = ''; + /** + * Output only. Resource type. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_type = 0; + /** + * Output only. Status of the resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = 0; + /** + * Output only. Detailed status of NFDeploy. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_deploy_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type string $resource_namespace + * Namespace of the resource. + * @type string $group + * Group to which the resource belongs to. + * @type string $version + * Version of the resource. + * @type string $kind + * Kind of the resource. + * @type int $resource_type + * Output only. Resource type. + * @type int $status + * Output only. Status of the resource. + * @type \Google\Cloud\TelcoAutomation\V1\NFDeployStatus $nf_deploy_status + * Output only. Detailed status of NFDeploy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::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; + } + + /** + * Namespace of the resource. + * + * Generated from protobuf field string resource_namespace = 2; + * @return string + */ + public function getResourceNamespace() + { + return $this->resource_namespace; + } + + /** + * Namespace of the resource. + * + * Generated from protobuf field string resource_namespace = 2; + * @param string $var + * @return $this + */ + public function setResourceNamespace($var) + { + GPBUtil::checkString($var, True); + $this->resource_namespace = $var; + + return $this; + } + + /** + * Group to which the resource belongs to. + * + * Generated from protobuf field string group = 3; + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Group to which the resource belongs to. + * + * Generated from protobuf field string group = 3; + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Version of the resource. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the resource. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Kind of the resource. + * + * Generated from protobuf field string kind = 5; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Kind of the resource. + * + * Generated from protobuf field string kind = 5; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Output only. Resource type. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Output only. Resource type. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\ResourceType::class); + $this->resource_type = $var; + + return $this; + } + + /** + * Output only. Status of the resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status of the resource. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. Detailed status of NFDeploy. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\NFDeployStatus|null + */ + public function getNfDeployStatus() + { + return $this->nf_deploy_status; + } + + public function hasNfDeployStatus() + { + return isset($this->nf_deploy_status); + } + + public function clearNfDeployStatus() + { + unset($this->nf_deploy_status); + } + + /** + * Output only. Detailed status of NFDeploy. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\NFDeployStatus $var + * @return $this + */ + public function setNfDeployStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\NFDeployStatus::class); + $this->nf_deploy_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php new file mode 100644 index 000000000000..e6f0ba0d7f44 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php @@ -0,0 +1,61 @@ +google.cloud.telcoautomation.v1.ResourceType + */ +class ResourceType +{ + /** + * Unspecified resource type. + * + * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; + */ + const RESOURCE_TYPE_UNSPECIFIED = 0; + /** + * User specified NF Deploy CR. + * + * Generated from protobuf enum NF_DEPLOY_RESOURCE = 1; + */ + const NF_DEPLOY_RESOURCE = 1; + /** + * CRs that are part of a blueprint. + * + * Generated from protobuf enum DEPLOYMENT_RESOURCE = 2; + */ + const DEPLOYMENT_RESOURCE = 2; + + private static $valueToName = [ + self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', + self::NF_DEPLOY_RESOURCE => 'NF_DEPLOY_RESOURCE', + self::DEPLOYMENT_RESOURCE => 'DEPLOYMENT_RESOURCE', + ]; + + 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php new file mode 100644 index 000000000000..378f43cd394f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php @@ -0,0 +1,117 @@ +google.cloud.telcoautomation.v1.RollbackDeploymentRequest + */ +class RollbackDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the deployment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The revision id of deployment to roll back to. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $revision_id = ''; + + /** + * @param string $name Required. Name of the deployment. Please see + * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. + * @param string $revisionId Required. The revision id of deployment to roll back to. + * + * @return \Google\Cloud\TelcoAutomation\V1\RollbackDeploymentRequest + * + * @experimental + */ + public static function build(string $name, string $revisionId): self + { + return (new self()) + ->setName($name) + ->setRevisionId($revisionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the deployment. + * @type string $revision_id + * Required. The revision id of deployment to roll back to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the deployment. + * + * 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 deployment. + * + * 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 revision id of deployment to roll back to. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Required. The revision id of deployment to roll back to. + * + * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php new file mode 100644 index 000000000000..def3ca0e6efe --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php @@ -0,0 +1,233 @@ +google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest + */ +class SearchBlueprintRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name={name}" : Lists all revisions of blueprint with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of blueprint with name + * {name} + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param string $query Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name={name}" : Lists all revisions of blueprint with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of blueprint with name + * {name} + * + * @return \Google\Cloud\TelcoAutomation\V1\SearchBlueprintRevisionsRequest + * + * @experimental + */ + public static function build(string $parent, string $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $query + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name={name}" : Lists all revisions of blueprint with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of blueprint with name + * {name} + * @type int $page_size + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * @type string $page_token + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name={name}" : Lists all revisions of blueprint with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of blueprint with name + * {name} + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all blueprints. + * 2. "latest=true" : Lists latest revisions across all blueprints. + * 3. "name={name}" : Lists all revisions of blueprint with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of blueprint with name + * {name} + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Optional. The maximum number of blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * + * 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 blueprints revisions to return per page. + * max page size = 100, default page size = 20. + * + * 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. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * 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; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php new file mode 100644 index 000000000000..34ea86345a84 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse + */ +class SearchBlueprintRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested blueprint revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + */ + private $blueprints; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints + * The list of requested blueprint revisions. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested blueprint revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlueprints() + { + return $this->blueprints; + } + + /** + * The list of requested blueprint revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlueprints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprints = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php new file mode 100644 index 000000000000..1e5ecd13bc64 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php @@ -0,0 +1,238 @@ +google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest + */ +class SearchDeploymentRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name={name}" : Lists all revisions of deployment with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of deployment with name + * {name} + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see + * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. + * @param string $query Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name={name}" : Lists all revisions of deployment with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of deployment with name + * {name} + * + * @return \Google\Cloud\TelcoAutomation\V1\SearchDeploymentRevisionsRequest + * + * @experimental + */ + public static function build(string $parent, string $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * @type string $query + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name={name}" : Lists all revisions of deployment with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of deployment with name + * {name} + * @type int $page_size + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * @type string $page_token + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of parent orchestration cluster resource. + * Format should be - + * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name={name}" : Lists all revisions of deployment with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of deployment with name + * {name} + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. Supported queries: + * 1. "" : Lists all revisions across all deployments. + * 2. "latest=true" : Lists latest revisions across all + * deployments. + * 3. "name={name}" : Lists all revisions of deployment with name + * {name}. + * 4. "name={name} latest=true": Lists latest revision of deployment with name + * {name} + * + * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Optional. The maximum number of deployment revisions to return per page. + * max page size = 100, default page size = 20. + * + * 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 deployment revisions to return per page. + * max page size = 100, default page size = 20. + * + * 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. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token, received from a previous search call. + * It can be provided to retrieve the subsequent page. + * + * 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; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php new file mode 100644 index 000000000000..430cb0ea2a8d --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse + */ +class SearchDeploymentRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of requested deployment revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + */ + private $deployments; + /** + * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments + * The list of requested deployment revisions. + * @type string $next_page_token + * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * The list of requested deployment revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeployments() + { + return $this->deployments; + } + + /** + * The list of requested deployment revisions. + * + * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; + * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployments = $arr; + + return $this; + } + + /** + * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php new file mode 100644 index 000000000000..cd8bed6849c2 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php @@ -0,0 +1,135 @@ +google.cloud.telcoautomation.v1.SiteVersion + */ +class SiteVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. NF vendor. + * + * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_vendor = ''; + /** + * Output only. NF vendor type. + * + * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_type = ''; + /** + * Output only. NF version. + * + * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nf_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $nf_vendor + * Output only. NF vendor. + * @type string $nf_type + * Output only. NF vendor type. + * @type string $nf_version + * Output only. NF version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. NF vendor. + * + * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfVendor() + { + return $this->nf_vendor; + } + + /** + * Output only. NF vendor. + * + * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfVendor($var) + { + GPBUtil::checkString($var, True); + $this->nf_vendor = $var; + + return $this; + } + + /** + * Output only. NF vendor type. + * + * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfType() + { + return $this->nf_type; + } + + /** + * Output only. NF vendor type. + * + * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfType($var) + { + GPBUtil::checkString($var, True); + $this->nf_type = $var; + + return $this; + } + + /** + * Output only. NF version. + * + * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNfVersion() + { + return $this->nf_version; + } + + /** + * Output only. NF version. + * + * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNfVersion($var) + { + GPBUtil::checkString($var, True); + $this->nf_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php new file mode 100644 index 000000000000..915ac6f9e4dc --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php @@ -0,0 +1,387 @@ +google.cloud.telcoautomation.v1.StandardManagementConfig + */ +class StandardManagementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet = ''; + /** + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_ipv4_cidr_block = ''; + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_cidr_block = ''; + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_cidr_block = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_named_range = ''; + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $services_named_range = ''; + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_authorized_networks_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * @type string $subnet + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * @type string $master_ipv4_cidr_block + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * @type string $cluster_cidr_block + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $services_cidr_block + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * @type string $cluster_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * @type string $services_named_range + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * @type \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The + * VPC will be created if it doesn't exist. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Optional. Specifies the subnet that the interface will be part of. Network + * key must be specified and the subnet must be a subnetwork of the specified + * network. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMasterIpv4CidrBlock() + { + return $this->master_ipv4_cidr_block; + } + + /** + * Optional. The /28 network that the masters will use. It should be free + * within the network. + * + * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMasterIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->master_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterCidrBlock() + { + return $this->cluster_cidr_block; + } + + /** + * Optional. The IP address range for the cluster pod IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation + * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cluster_cidr_block = $var; + + return $this; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesCidrBlock() + { + return $this->services_cidr_block; + } + + /** + * Optional. The IP address range for the cluster service IPs. Set to blank to + * have a range chosen with the default size. Set to /netmask (e.g. /14) to + * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. + * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, + * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. + * + * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->services_cidr_block = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterNamedRange() + { + return $this->cluster_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block + * can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->cluster_named_range = $var; + + return $this; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesNamedRange() + { + return $this->services_named_range; + } + + /** + * Optional. The name of the existing secondary range in the cluster's + * subnetwork to use for service ClusterIPs. Alternatively, + * services_cidr_block can be used to automatically create a GKE-managed one. + * + * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesNamedRange($var) + { + GPBUtil::checkString($var, True); + $this->services_named_range = $var; + + return $this; + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig|null + */ + public function getMasterAuthorizedNetworksConfig() + { + return $this->master_authorized_networks_config; + } + + public function hasMasterAuthorizedNetworksConfig() + { + return isset($this->master_authorized_networks_config); + } + + public function clearMasterAuthorizedNetworksConfig() + { + unset($this->master_authorized_networks_config); + } + + /** + * Optional. Master Authorized Network that supports multiple CIDR blocks. + * Allows access to the k8s master from multiple blocks. It cannot be set at + * the same time with the field man_block. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $var + * @return $this + */ + public function setMasterAuthorizedNetworksConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig::class); + $this->master_authorized_networks_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php new file mode 100644 index 000000000000..19c10628daa4 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php @@ -0,0 +1,97 @@ +google.cloud.telcoautomation.v1.Status + */ +class Status +{ + /** + * Unknown state. + * + * Generated from protobuf enum STATUS_UNSPECIFIED = 0; + */ + const STATUS_UNSPECIFIED = 0; + /** + * Under progress. + * + * Generated from protobuf enum STATUS_IN_PROGRESS = 1; + */ + const STATUS_IN_PROGRESS = 1; + /** + * Running and ready to serve traffic. + * + * Generated from protobuf enum STATUS_ACTIVE = 2; + */ + const STATUS_ACTIVE = 2; + /** + * Failed or stalled. + * + * Generated from protobuf enum STATUS_FAILED = 3; + */ + const STATUS_FAILED = 3; + /** + * Delete in progress. + * + * Generated from protobuf enum STATUS_DELETING = 4; + */ + const STATUS_DELETING = 4; + /** + * Deleted deployment. + * + * Generated from protobuf enum STATUS_DELETED = 5; + */ + const STATUS_DELETED = 5; + /** + * NFDeploy specific status. Peering in progress. + * + * Generated from protobuf enum STATUS_PEERING = 10; + */ + const STATUS_PEERING = 10; + /** + * K8s objects such as NetworkAttachmentDefinition don't have a defined + * status. + * + * Generated from protobuf enum STATUS_NOT_APPLICABLE = 11; + */ + const STATUS_NOT_APPLICABLE = 11; + + private static $valueToName = [ + self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', + self::STATUS_IN_PROGRESS => 'STATUS_IN_PROGRESS', + self::STATUS_ACTIVE => 'STATUS_ACTIVE', + self::STATUS_FAILED => 'STATUS_FAILED', + self::STATUS_DELETING => 'STATUS_DELETING', + self::STATUS_DELETED => 'STATUS_DELETED', + self::STATUS_PEERING => 'STATUS_PEERING', + self::STATUS_NOT_APPLICABLE => 'STATUS_NOT_APPLICABLE', + ]; + + 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php new file mode 100644 index 000000000000..c57a0a7dc882 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php @@ -0,0 +1,141 @@ +google.cloud.telcoautomation.v1.UpdateBlueprintRequest + */ +class UpdateBlueprintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `blueprint` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $blueprint = null; + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint Required. The `blueprint` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * @return \Google\Cloud\TelcoAutomation\V1\UpdateBlueprintRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint + * Required. The `blueprint` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `blueprint` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Blueprint|null + */ + public function getBlueprint() + { + return $this->blueprint; + } + + public function hasBlueprint() + { + return isset($this->blueprint); + } + + public function clearBlueprint() + { + unset($this->blueprint); + } + + /** + * Required. The `blueprint` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $var + * @return $this + */ + public function setBlueprint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); + $this->blueprint = $var; + + return $this; + } + + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * 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. Update mask is used to specify the fields to be overwritten in + * the `blueprint` resource by the update. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php new file mode 100644 index 000000000000..f36906a99d3d --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php @@ -0,0 +1,141 @@ +google.cloud.telcoautomation.v1.UpdateDeploymentRequest + */ +class UpdateDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `deployment` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployment = null; + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $deployment Required. The `deployment` to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * @return \Google\Cloud\TelcoAutomation\V1\UpdateDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TelcoAutomation\V1\Deployment $deployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\Deployment $deployment + * Required. The `deployment` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `deployment` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\Deployment|null + */ + public function getDeployment() + { + return $this->deployment; + } + + public function hasDeployment() + { + return isset($this->deployment); + } + + public function clearDeployment() + { + unset($this->deployment); + } + + /** + * Required. The `deployment` to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\Deployment $var + * @return $this + */ + public function setDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Deployment::class); + $this->deployment = $var; + + return $this; + } + + /** + * Required. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * 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. Update mask is used to specify the fields to be overwritten in + * the `deployment` resource by the update. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php new file mode 100644 index 000000000000..69f410fff00c --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php @@ -0,0 +1,141 @@ +google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest + */ +class UpdateHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The hydrated deployment to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hydrated_deployment = null; + /** + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydratedDeployment Required. The hydrated deployment to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * @return \Google\Cloud\TelcoAutomation\V1\UpdateHydratedDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydratedDeployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydrated_deployment + * Required. The hydrated deployment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The hydrated deployment to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TelcoAutomation\V1\HydratedDeployment|null + */ + public function getHydratedDeployment() + { + return $this->hydrated_deployment; + } + + public function hasHydratedDeployment() + { + return isset($this->hydrated_deployment); + } + + public function clearHydratedDeployment() + { + unset($this->hydrated_deployment); + } + + /** + * Required. The hydrated deployment to update. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $var + * @return $this + */ + public function setHydratedDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment::class); + $this->hydrated_deployment = $var; + + return $this; + } + + /** + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The list of fields to update. Update mask supports a special + * value `*` which fully replaces (equivalent to PUT) the resource provided. + * + * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php new file mode 100644 index 000000000000..50a5b9606b9e --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php @@ -0,0 +1,111 @@ +google.cloud.telcoautomation.v1.WorkloadStatus + */ +class WorkloadStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. SiteVersion running in the workload cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $site_version = null; + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TelcoAutomation\V1\SiteVersion $site_version + * Output only. SiteVersion running in the workload cluster. + * @type string $status + * Output only. Status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. SiteVersion running in the workload cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\TelcoAutomation\V1\SiteVersion|null + */ + public function getSiteVersion() + { + return $this->site_version; + } + + public function hasSiteVersion() + { + return isset($this->site_version); + } + + public function clearSiteVersion() + { + unset($this->site_version); + } + + /** + * Output only. SiteVersion running in the workload cluster. + * + * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\TelcoAutomation\V1\SiteVersion $var + * @return $this + */ + public function setSiteVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\SiteVersion::class); + $this->site_version = $var; + + return $this; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatus() + { + return $this->status; + } + + /** + * Output only. Status. + * + * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php new file mode 100644 index 000000000000..3f3337659fcd --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->applyDeployment($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + apply_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php new file mode 100644 index 000000000000..70c4f8ff1851 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HydratedDeployment $response */ + $response = $telcoAutomationClient->applyHydratedDeployment($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 = TelcoAutomationClient::hydratedDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]', + '[HYDRATED_DEPLOYMENT]' + ); + + apply_hydrated_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php new file mode 100644 index 000000000000..bfcee4cead38 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->approveBlueprint($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + approve_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php new file mode 100644 index 000000000000..d8fa92cb908c --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ComputeDeploymentStatusResponse $response */ + $response = $telcoAutomationClient->computeDeploymentStatus($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + compute_deployment_status_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php new file mode 100644 index 000000000000..8f11e1f704f1 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php @@ -0,0 +1,83 @@ +setSourceBlueprint($blueprintSourceBlueprint); + $request = (new CreateBlueprintRequest()) + ->setParent($formattedParent) + ->setBlueprint($blueprint); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->createBlueprint($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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $blueprintSourceBlueprint = '[SOURCE_BLUEPRINT]'; + + create_blueprint_sample($formattedParent, $blueprintSourceBlueprint); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php new file mode 100644 index 000000000000..ae143d080eb3 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php @@ -0,0 +1,84 @@ +setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $request = (new CreateDeploymentRequest()) + ->setParent($formattedParent) + ->setDeployment($deployment); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->createDeployment($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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $deploymentSourceBlueprintRevision = '[SOURCE_BLUEPRINT_REVISION]'; + + create_deployment_sample($formattedParent, $deploymentSourceBlueprintRevision); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php new file mode 100644 index 000000000000..1c0b15c35e8d --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php @@ -0,0 +1,90 @@ +setParent($formattedParent) + ->setEdgeSlmId($edgeSlmId) + ->setEdgeSlm($edgeSlm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->createEdgeSlm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EdgeSlm $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + $edgeSlmId = '[EDGE_SLM_ID]'; + + create_edge_slm_sample($formattedParent, $edgeSlmId); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php new file mode 100644 index 000000000000..db7993ab7935 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setOrchestrationClusterId($orchestrationClusterId) + ->setOrchestrationCluster($orchestrationCluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->createOrchestrationCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var OrchestrationCluster $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + $orchestrationClusterId = '[ORCHESTRATION_CLUSTER_ID]'; + + create_orchestration_cluster_sample($formattedParent, $orchestrationClusterId); +} +// [END telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php new file mode 100644 index 000000000000..b0814ab1aa07 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $telcoAutomationClient->deleteBlueprint($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + delete_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php new file mode 100644 index 000000000000..951a7f4616e1 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->deleteEdgeSlm($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 = TelcoAutomationClient::edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + + delete_edge_slm_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php new file mode 100644 index 000000000000..ae8882dc2f5c --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $telcoAutomationClient->deleteOrchestrationCluster($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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + delete_orchestration_cluster_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php new file mode 100644 index 000000000000..5c5ac4d25531 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DiscardBlueprintChangesResponse $response */ + $response = $telcoAutomationClient->discardBlueprintChanges($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + discard_blueprint_changes_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php new file mode 100644 index 000000000000..c1760b1b5385 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DiscardDeploymentChangesResponse $response */ + $response = $telcoAutomationClient->discardDeploymentChanges($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + discard_deployment_changes_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php new file mode 100644 index 000000000000..26e0e1a8e429 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->getBlueprint($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + get_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php new file mode 100644 index 000000000000..ac86606f3b5e --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->getDeployment($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + get_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php new file mode 100644 index 000000000000..323089bd54f8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EdgeSlm $response */ + $response = $telcoAutomationClient->getEdgeSlm($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 = TelcoAutomationClient::edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + + get_edge_slm_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php new file mode 100644 index 000000000000..40bd87f814fe --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HydratedDeployment $response */ + $response = $telcoAutomationClient->getHydratedDeployment($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 = TelcoAutomationClient::hydratedDeploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]', + '[HYDRATED_DEPLOYMENT]' + ); + + get_hydrated_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_location.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_location.php new file mode 100644 index 000000000000..5b9a69497043 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/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 telcoautomation_v1_generated_TelcoAutomation_GetLocation_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php new file mode 100644 index 000000000000..887522d54c52 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OrchestrationCluster $response */ + $response = $telcoAutomationClient->getOrchestrationCluster($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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + get_orchestration_cluster_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php new file mode 100644 index 000000000000..e7a9a0ea86e5 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PublicBlueprint $response */ + $response = $telcoAutomationClient->getPublicBlueprint($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 = TelcoAutomationClient::publicBlueprintName( + '[PROJECT]', + '[LOCATION]', + '[PUBLIC_LUEPRINT]' + ); + + get_public_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php new file mode 100644 index 000000000000..9f05628c6f38 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listBlueprintRevisions($request); + + /** @var Blueprint $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 +{ + $formattedName = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + list_blueprint_revisions_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php new file mode 100644 index 000000000000..0d3c8d771851 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listBlueprints($request); + + /** @var Blueprint $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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + list_blueprints_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php new file mode 100644 index 000000000000..69dbdb9d6b63 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listDeploymentRevisions($request); + + /** @var Deployment $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 +{ + $formattedName = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + list_deployment_revisions_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php new file mode 100644 index 000000000000..1b468e2e94e3 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listDeployments($request); + + /** @var Deployment $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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + + list_deployments_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php new file mode 100644 index 000000000000..5200d6d13c89 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listEdgeSlms($request); + + /** @var EdgeSlm $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_edge_slms_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php new file mode 100644 index 000000000000..6d493233c952 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listHydratedDeployments($request); + + /** @var HydratedDeployment $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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + list_hydrated_deployments_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_locations.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_locations.php new file mode 100644 index 000000000000..db9114a3decd --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/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 telcoautomation_v1_generated_TelcoAutomation_ListLocations_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php new file mode 100644 index 000000000000..33934470433f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listOrchestrationClusters($request); + + /** @var OrchestrationCluster $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_orchestration_clusters_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php new file mode 100644 index 000000000000..1f6d121c7b6f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->listPublicBlueprints($request); + + /** @var PublicBlueprint $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); + + list_public_blueprints_sample($formattedParent); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php new file mode 100644 index 000000000000..255f8c5c9504 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->proposeBlueprint($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + propose_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php new file mode 100644 index 000000000000..f3d3718e2218 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->rejectBlueprint($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 = TelcoAutomationClient::blueprintName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[BLUEPRINT]' + ); + + reject_blueprint_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php new file mode 100644 index 000000000000..19eebc49d413 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $telcoAutomationClient->removeDeployment($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + + remove_deployment_sample($formattedName); +} +// [END telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php new file mode 100644 index 000000000000..db6c7bf104d7 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php @@ -0,0 +1,80 @@ +setName($formattedName) + ->setRevisionId($revisionId); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->rollbackDeployment($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 = TelcoAutomationClient::deploymentName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]', + '[DEPLOYMENT]' + ); + $revisionId = '[REVISION_ID]'; + + rollback_deployment_sample($formattedName, $revisionId); +} +// [END telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php new file mode 100644 index 000000000000..3e4903ebf15c --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->searchBlueprintRevisions($request); + + /** @var Blueprint $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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $query = '[QUERY]'; + + search_blueprint_revisions_sample($formattedParent, $query); +} +// [END telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php new file mode 100644 index 000000000000..29a233d8254f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $telcoAutomationClient->searchDeploymentRevisions($request); + + /** @var Deployment $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 = TelcoAutomationClient::orchestrationClusterName( + '[PROJECT]', + '[LOCATION]', + '[ORCHESTRATION_CLUSTER]' + ); + $query = '[QUERY]'; + + search_deployment_revisions_sample($formattedParent, $query); +} +// [END telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php new file mode 100644 index 000000000000..552fd5df70e8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php @@ -0,0 +1,76 @@ +setSourceBlueprint($blueprintSourceBlueprint); + $updateMask = new FieldMask(); + $request = (new UpdateBlueprintRequest()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Blueprint $response */ + $response = $telcoAutomationClient->updateBlueprint($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 +{ + $blueprintSourceBlueprint = '[SOURCE_BLUEPRINT]'; + + update_blueprint_sample($blueprintSourceBlueprint); +} +// [END telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php new file mode 100644 index 000000000000..f9ae960386b8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php @@ -0,0 +1,75 @@ +setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $updateMask = new FieldMask(); + $request = (new UpdateDeploymentRequest()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Deployment $response */ + $response = $telcoAutomationClient->updateDeployment($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 +{ + $deploymentSourceBlueprintRevision = '[SOURCE_BLUEPRINT_REVISION]'; + + update_deployment_sample($deploymentSourceBlueprintRevision); +} +// [END telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php new file mode 100644 index 000000000000..0b9649b16d6f --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php @@ -0,0 +1,62 @@ +setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var HydratedDeployment $response */ + $response = $telcoAutomationClient->updateHydratedDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php b/owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php new file mode 100644 index 000000000000..7416153d9b3d --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php @@ -0,0 +1,1487 @@ + applyDeploymentAsync(ApplyDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface applyHydratedDeploymentAsync(ApplyHydratedDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface approveBlueprintAsync(ApproveBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface computeDeploymentStatusAsync(ComputeDeploymentStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBlueprintAsync(CreateBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDeploymentAsync(CreateDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEdgeSlmAsync(CreateEdgeSlmRequest $request, array $optionalArgs = []) + * @method PromiseInterface createOrchestrationClusterAsync(CreateOrchestrationClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBlueprintAsync(DeleteBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEdgeSlmAsync(DeleteEdgeSlmRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteOrchestrationClusterAsync(DeleteOrchestrationClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface discardBlueprintChangesAsync(DiscardBlueprintChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface discardDeploymentChangesAsync(DiscardDeploymentChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBlueprintAsync(GetBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEdgeSlmAsync(GetEdgeSlmRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHydratedDeploymentAsync(GetHydratedDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOrchestrationClusterAsync(GetOrchestrationClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPublicBlueprintAsync(GetPublicBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBlueprintRevisionsAsync(ListBlueprintRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBlueprintsAsync(ListBlueprintsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeploymentRevisionsAsync(ListDeploymentRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEdgeSlmsAsync(ListEdgeSlmsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHydratedDeploymentsAsync(ListHydratedDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrchestrationClustersAsync(ListOrchestrationClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPublicBlueprintsAsync(ListPublicBlueprintsRequest $request, array $optionalArgs = []) + * @method PromiseInterface proposeBlueprintAsync(ProposeBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface rejectBlueprintAsync(RejectBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeDeploymentAsync(RemoveDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackDeploymentAsync(RollbackDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchBlueprintRevisionsAsync(SearchBlueprintRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchDeploymentRevisionsAsync(SearchDeploymentRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBlueprintAsync(UpdateBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDeploymentAsync(UpdateDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateHydratedDeploymentAsync(UpdateHydratedDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class TelcoAutomationClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.telcoautomation.v1.TelcoAutomation'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'telcoautomation.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'telcoautomation.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/telco_automation_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/telco_automation_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/telco_automation_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/telco_automation_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 blueprint + * resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * @param string $blueprint + * + * @return string The formatted blueprint resource. + */ + public static function blueprintName(string $project, string $location, string $orchestrationCluster, string $blueprint): string + { + return self::getPathTemplate('blueprint')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + 'blueprint' => $blueprint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a deployment + * resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * @param string $deployment + * + * @return string The formatted deployment resource. + */ + public static function deploymentName(string $project, string $location, string $orchestrationCluster, string $deployment): string + { + return self::getPathTemplate('deployment')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + 'deployment' => $deployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a edge_slm + * resource. + * + * @param string $project + * @param string $location + * @param string $edgeSlm + * + * @return string The formatted edge_slm resource. + */ + public static function edgeSlmName(string $project, string $location, string $edgeSlm): string + { + return self::getPathTemplate('edgeSlm')->render([ + 'project' => $project, + 'location' => $location, + 'edge_slm' => $edgeSlm, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * hydrated_deployment resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * @param string $deployment + * @param string $hydratedDeployment + * + * @return string The formatted hydrated_deployment resource. + */ + public static function hydratedDeploymentName(string $project, string $location, string $orchestrationCluster, string $deployment, string $hydratedDeployment): string + { + return self::getPathTemplate('hydratedDeployment')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + 'deployment' => $deployment, + 'hydrated_deployment' => $hydratedDeployment, + ]); + } + + /** + * 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 + * orchestration_cluster resource. + * + * @param string $project + * @param string $location + * @param string $orchestrationCluster + * + * @return string The formatted orchestration_cluster resource. + */ + public static function orchestrationClusterName(string $project, string $location, string $orchestrationCluster): string + { + return self::getPathTemplate('orchestrationCluster')->render([ + 'project' => $project, + 'location' => $location, + 'orchestration_cluster' => $orchestrationCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * public_blueprint resource. + * + * @param string $project + * @param string $location + * @param string $publicLueprint + * + * @return string The formatted public_blueprint resource. + */ + public static function publicBlueprintName(string $project, string $location, string $publicLueprint): string + { + return self::getPathTemplate('publicBlueprint')->render([ + 'project' => $project, + 'location' => $location, + 'public_lueprint' => $publicLueprint, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - blueprint: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint} + * - deployment: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment} + * - edgeSlm: projects/{project}/locations/{location}/edgeSlms/{edge_slm} + * - hydratedDeployment: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment} + * - location: projects/{project}/locations/{location} + * - orchestrationCluster: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster} + * - publicBlueprint: projects/{project}/locations/{location}/publicBlueprints/{public_lueprint} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'telcoautomation.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Applies the deployment's YAML files to the parent orchestration cluster. + * + * The async variant is {@see TelcoAutomationClient::applyDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/apply_deployment.php + * + * @param ApplyDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function applyDeployment(ApplyDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('ApplyDeployment', $request, $callOptions)->wait(); + } + + /** + * Applies a hydrated deployment to a workload cluster. + * + * The async variant is + * {@see TelcoAutomationClient::applyHydratedDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php + * + * @param ApplyHydratedDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HydratedDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function applyHydratedDeployment(ApplyHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment + { + return $this->startApiCall('ApplyHydratedDeployment', $request, $callOptions)->wait(); + } + + /** + * Approves a blueprint and commits a new revision. + * + * The async variant is {@see TelcoAutomationClient::approveBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/approve_blueprint.php + * + * @param ApproveBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function approveBlueprint(ApproveBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('ApproveBlueprint', $request, $callOptions)->wait(); + } + + /** + * Returns the requested deployment status. + * + * The async variant is + * {@see TelcoAutomationClient::computeDeploymentStatusAsync()} . + * + * @example samples/V1/TelcoAutomationClient/compute_deployment_status.php + * + * @param ComputeDeploymentStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ComputeDeploymentStatusResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function computeDeploymentStatus(ComputeDeploymentStatusRequest $request, array $callOptions = []): ComputeDeploymentStatusResponse + { + return $this->startApiCall('ComputeDeploymentStatus', $request, $callOptions)->wait(); + } + + /** + * Creates a blueprint. + * + * The async variant is {@see TelcoAutomationClient::createBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_blueprint.php + * + * @param CreateBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBlueprint(CreateBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('CreateBlueprint', $request, $callOptions)->wait(); + } + + /** + * Creates a deployment. + * + * The async variant is {@see TelcoAutomationClient::createDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_deployment.php + * + * @param CreateDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDeployment(CreateDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('CreateDeployment', $request, $callOptions)->wait(); + } + + /** + * Creates a new EdgeSlm in a given project and location. + * + * The async variant is {@see TelcoAutomationClient::createEdgeSlmAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_edge_slm.php + * + * @param CreateEdgeSlmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createEdgeSlm(CreateEdgeSlmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEdgeSlm', $request, $callOptions)->wait(); + } + + /** + * Creates a new OrchestrationCluster in a given project and location. + * + * The async variant is + * {@see TelcoAutomationClient::createOrchestrationClusterAsync()} . + * + * @example samples/V1/TelcoAutomationClient/create_orchestration_cluster.php + * + * @param CreateOrchestrationClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createOrchestrationCluster(CreateOrchestrationClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateOrchestrationCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a blueprint and all its revisions. + * + * The async variant is {@see TelcoAutomationClient::deleteBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/delete_blueprint.php + * + * @param DeleteBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteBlueprint(DeleteBlueprintRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBlueprint', $request, $callOptions)->wait(); + } + + /** + * Deletes a single EdgeSlm. + * + * The async variant is {@see TelcoAutomationClient::deleteEdgeSlmAsync()} . + * + * @example samples/V1/TelcoAutomationClient/delete_edge_slm.php + * + * @param DeleteEdgeSlmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteEdgeSlm(DeleteEdgeSlmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEdgeSlm', $request, $callOptions)->wait(); + } + + /** + * Deletes a single OrchestrationCluster. + * + * The async variant is + * {@see TelcoAutomationClient::deleteOrchestrationClusterAsync()} . + * + * @example samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php + * + * @param DeleteOrchestrationClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteOrchestrationCluster(DeleteOrchestrationClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteOrchestrationCluster', $request, $callOptions)->wait(); + } + + /** + * Discards the changes in a blueprint and reverts the blueprint to the last + * approved blueprint revision. No changes take place if a blueprint does not + * have revisions. + * + * The async variant is + * {@see TelcoAutomationClient::discardBlueprintChangesAsync()} . + * + * @example samples/V1/TelcoAutomationClient/discard_blueprint_changes.php + * + * @param DiscardBlueprintChangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DiscardBlueprintChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function discardBlueprintChanges(DiscardBlueprintChangesRequest $request, array $callOptions = []): DiscardBlueprintChangesResponse + { + return $this->startApiCall('DiscardBlueprintChanges', $request, $callOptions)->wait(); + } + + /** + * Discards the changes in a deployment and reverts the deployment to the last + * approved deployment revision. No changes take place if a deployment does + * not have revisions. + * + * The async variant is + * {@see TelcoAutomationClient::discardDeploymentChangesAsync()} . + * + * @example samples/V1/TelcoAutomationClient/discard_deployment_changes.php + * + * @param DiscardDeploymentChangesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DiscardDeploymentChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function discardDeploymentChanges(DiscardDeploymentChangesRequest $request, array $callOptions = []): DiscardDeploymentChangesResponse + { + return $this->startApiCall('DiscardDeploymentChanges', $request, $callOptions)->wait(); + } + + /** + * Returns the requested blueprint. + * + * The async variant is {@see TelcoAutomationClient::getBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_blueprint.php + * + * @param GetBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBlueprint(GetBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('GetBlueprint', $request, $callOptions)->wait(); + } + + /** + * Returns the requested deployment. + * + * The async variant is {@see TelcoAutomationClient::getDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_deployment.php + * + * @param GetDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDeployment(GetDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('GetDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single EdgeSlm. + * + * The async variant is {@see TelcoAutomationClient::getEdgeSlmAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_edge_slm.php + * + * @param GetEdgeSlmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EdgeSlm + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEdgeSlm(GetEdgeSlmRequest $request, array $callOptions = []): EdgeSlm + { + return $this->startApiCall('GetEdgeSlm', $request, $callOptions)->wait(); + } + + /** + * Returns the requested hydrated deployment. + * + * The async variant is {@see TelcoAutomationClient::getHydratedDeploymentAsync()} + * . + * + * @example samples/V1/TelcoAutomationClient/get_hydrated_deployment.php + * + * @param GetHydratedDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HydratedDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHydratedDeployment(GetHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment + { + return $this->startApiCall('GetHydratedDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single OrchestrationCluster. + * + * The async variant is + * {@see TelcoAutomationClient::getOrchestrationClusterAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_orchestration_cluster.php + * + * @param GetOrchestrationClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OrchestrationCluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOrchestrationCluster(GetOrchestrationClusterRequest $request, array $callOptions = []): OrchestrationCluster + { + return $this->startApiCall('GetOrchestrationCluster', $request, $callOptions)->wait(); + } + + /** + * Returns the requested public blueprint. + * + * The async variant is {@see TelcoAutomationClient::getPublicBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/get_public_blueprint.php + * + * @param GetPublicBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PublicBlueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPublicBlueprint(GetPublicBlueprintRequest $request, array $callOptions = []): PublicBlueprint + { + return $this->startApiCall('GetPublicBlueprint', $request, $callOptions)->wait(); + } + + /** + * List blueprint revisions of a given blueprint. + * + * The async variant is {@see TelcoAutomationClient::listBlueprintRevisionsAsync()} + * . + * + * @example samples/V1/TelcoAutomationClient/list_blueprint_revisions.php + * + * @param ListBlueprintRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBlueprintRevisions(ListBlueprintRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBlueprintRevisions', $request, $callOptions); + } + + /** + * List all blueprints. + * + * The async variant is {@see TelcoAutomationClient::listBlueprintsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_blueprints.php + * + * @param ListBlueprintsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listBlueprints(ListBlueprintsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBlueprints', $request, $callOptions); + } + + /** + * List deployment revisions of a given deployment. + * + * The async variant is + * {@see TelcoAutomationClient::listDeploymentRevisionsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_deployment_revisions.php + * + * @param ListDeploymentRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDeploymentRevisions(ListDeploymentRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDeploymentRevisions', $request, $callOptions); + } + + /** + * List all deployments. + * + * The async variant is {@see TelcoAutomationClient::listDeploymentsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_deployments.php + * + * @param ListDeploymentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDeployments(ListDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDeployments', $request, $callOptions); + } + + /** + * Lists EdgeSlms in a given project and location. + * + * The async variant is {@see TelcoAutomationClient::listEdgeSlmsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_edge_slms.php + * + * @param ListEdgeSlmsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listEdgeSlms(ListEdgeSlmsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEdgeSlms', $request, $callOptions); + } + + /** + * List all hydrated deployments present under a deployment. + * + * The async variant is + * {@see TelcoAutomationClient::listHydratedDeploymentsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_hydrated_deployments.php + * + * @param ListHydratedDeploymentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listHydratedDeployments(ListHydratedDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHydratedDeployments', $request, $callOptions); + } + + /** + * Lists OrchestrationClusters in a given project and location. + * + * The async variant is + * {@see TelcoAutomationClient::listOrchestrationClustersAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_orchestration_clusters.php + * + * @param ListOrchestrationClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listOrchestrationClusters(ListOrchestrationClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOrchestrationClusters', $request, $callOptions); + } + + /** + * Lists the blueprints in TNA's public catalog. Default page size = 20, + * Max Page Size = 100. + * + * The async variant is {@see TelcoAutomationClient::listPublicBlueprintsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/list_public_blueprints.php + * + * @param ListPublicBlueprintsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPublicBlueprints(ListPublicBlueprintsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPublicBlueprints', $request, $callOptions); + } + + /** + * Proposes a blueprint for approval of changes. + * + * The async variant is {@see TelcoAutomationClient::proposeBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/propose_blueprint.php + * + * @param ProposeBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function proposeBlueprint(ProposeBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('ProposeBlueprint', $request, $callOptions)->wait(); + } + + /** + * Rejects a blueprint revision proposal and flips it back to Draft state. + * + * The async variant is {@see TelcoAutomationClient::rejectBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/reject_blueprint.php + * + * @param RejectBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function rejectBlueprint(RejectBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('RejectBlueprint', $request, $callOptions)->wait(); + } + + /** + * Removes the deployment by marking it as DELETING. Post which deployment and + * it's revisions gets deleted. + * + * The async variant is {@see TelcoAutomationClient::removeDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/remove_deployment.php + * + * @param RemoveDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 removeDeployment(RemoveDeploymentRequest $request, array $callOptions = []): void + { + $this->startApiCall('RemoveDeployment', $request, $callOptions)->wait(); + } + + /** + * Rollback the active deployment to the given past approved deployment + * revision. + * + * The async variant is {@see TelcoAutomationClient::rollbackDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/rollback_deployment.php + * + * @param RollbackDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function rollbackDeployment(RollbackDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('RollbackDeployment', $request, $callOptions)->wait(); + } + + /** + * Searches across blueprint revisions. + * + * The async variant is + * {@see TelcoAutomationClient::searchBlueprintRevisionsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/search_blueprint_revisions.php + * + * @param SearchBlueprintRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchBlueprintRevisions(SearchBlueprintRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchBlueprintRevisions', $request, $callOptions); + } + + /** + * Searches across deployment revisions. + * + * The async variant is + * {@see TelcoAutomationClient::searchDeploymentRevisionsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/search_deployment_revisions.php + * + * @param SearchDeploymentRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchDeploymentRevisions(SearchDeploymentRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchDeploymentRevisions', $request, $callOptions); + } + + /** + * Updates a blueprint. + * + * The async variant is {@see TelcoAutomationClient::updateBlueprintAsync()} . + * + * @example samples/V1/TelcoAutomationClient/update_blueprint.php + * + * @param UpdateBlueprintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Blueprint + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBlueprint(UpdateBlueprintRequest $request, array $callOptions = []): Blueprint + { + return $this->startApiCall('UpdateBlueprint', $request, $callOptions)->wait(); + } + + /** + * Updates a deployment. + * + * The async variant is {@see TelcoAutomationClient::updateDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/update_deployment.php + * + * @param UpdateDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Deployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDeployment(UpdateDeploymentRequest $request, array $callOptions = []): Deployment + { + return $this->startApiCall('UpdateDeployment', $request, $callOptions)->wait(); + } + + /** + * Updates a hydrated deployment. + * + * The async variant is + * {@see TelcoAutomationClient::updateHydratedDeploymentAsync()} . + * + * @example samples/V1/TelcoAutomationClient/update_hydrated_deployment.php + * + * @param UpdateHydratedDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HydratedDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateHydratedDeployment(UpdateHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment + { + return $this->startApiCall('UpdateHydratedDeployment', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see TelcoAutomationClient::getLocationAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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 TelcoAutomationClient::listLocationsAsync()} . + * + * @example samples/V1/TelcoAutomationClient/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/TelcoAutomation/v1/src/V1/gapic_metadata.json b/owl-bot-staging/TelcoAutomation/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..920267ed1b4b --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/src/V1/gapic_metadata.json @@ -0,0 +1,208 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.telcoautomation.v1", + "libraryPackage": "Google\\Cloud\\TelcoAutomation\\V1", + "services": { + "TelcoAutomation": { + "clients": { + "grpc": { + "libraryClient": "TelcoAutomationGapicClient", + "rpcs": { + "ApplyDeployment": { + "methods": [ + "applyDeployment" + ] + }, + "ApplyHydratedDeployment": { + "methods": [ + "applyHydratedDeployment" + ] + }, + "ApproveBlueprint": { + "methods": [ + "approveBlueprint" + ] + }, + "ComputeDeploymentStatus": { + "methods": [ + "computeDeploymentStatus" + ] + }, + "CreateBlueprint": { + "methods": [ + "createBlueprint" + ] + }, + "CreateDeployment": { + "methods": [ + "createDeployment" + ] + }, + "CreateEdgeSlm": { + "methods": [ + "createEdgeSlm" + ] + }, + "CreateOrchestrationCluster": { + "methods": [ + "createOrchestrationCluster" + ] + }, + "DeleteBlueprint": { + "methods": [ + "deleteBlueprint" + ] + }, + "DeleteEdgeSlm": { + "methods": [ + "deleteEdgeSlm" + ] + }, + "DeleteOrchestrationCluster": { + "methods": [ + "deleteOrchestrationCluster" + ] + }, + "DiscardBlueprintChanges": { + "methods": [ + "discardBlueprintChanges" + ] + }, + "DiscardDeploymentChanges": { + "methods": [ + "discardDeploymentChanges" + ] + }, + "GetBlueprint": { + "methods": [ + "getBlueprint" + ] + }, + "GetDeployment": { + "methods": [ + "getDeployment" + ] + }, + "GetEdgeSlm": { + "methods": [ + "getEdgeSlm" + ] + }, + "GetHydratedDeployment": { + "methods": [ + "getHydratedDeployment" + ] + }, + "GetOrchestrationCluster": { + "methods": [ + "getOrchestrationCluster" + ] + }, + "GetPublicBlueprint": { + "methods": [ + "getPublicBlueprint" + ] + }, + "ListBlueprintRevisions": { + "methods": [ + "listBlueprintRevisions" + ] + }, + "ListBlueprints": { + "methods": [ + "listBlueprints" + ] + }, + "ListDeploymentRevisions": { + "methods": [ + "listDeploymentRevisions" + ] + }, + "ListDeployments": { + "methods": [ + "listDeployments" + ] + }, + "ListEdgeSlms": { + "methods": [ + "listEdgeSlms" + ] + }, + "ListHydratedDeployments": { + "methods": [ + "listHydratedDeployments" + ] + }, + "ListOrchestrationClusters": { + "methods": [ + "listOrchestrationClusters" + ] + }, + "ListPublicBlueprints": { + "methods": [ + "listPublicBlueprints" + ] + }, + "ProposeBlueprint": { + "methods": [ + "proposeBlueprint" + ] + }, + "RejectBlueprint": { + "methods": [ + "rejectBlueprint" + ] + }, + "RemoveDeployment": { + "methods": [ + "removeDeployment" + ] + }, + "RollbackDeployment": { + "methods": [ + "rollbackDeployment" + ] + }, + "SearchBlueprintRevisions": { + "methods": [ + "searchBlueprintRevisions" + ] + }, + "SearchDeploymentRevisions": { + "methods": [ + "searchDeploymentRevisions" + ] + }, + "UpdateBlueprint": { + "methods": [ + "updateBlueprint" + ] + }, + "UpdateDeployment": { + "methods": [ + "updateDeployment" + ] + }, + "UpdateHydratedDeployment": { + "methods": [ + "updateHydratedDeployment" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json new file mode 100644 index 000000000000..596ed5133dc8 --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json @@ -0,0 +1,212 @@ +{ + "interfaces": { + "google.cloud.telcoautomation.v1.TelcoAutomation": { + "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": { + "ApplyDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ApplyHydratedDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ApproveBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ComputeDeploymentStatus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateEdgeSlm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateOrchestrationCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteEdgeSlm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteOrchestrationCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DiscardBlueprintChanges": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DiscardDeploymentChanges": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEdgeSlm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetHydratedDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetOrchestrationCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetPublicBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBlueprintRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBlueprints": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDeploymentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEdgeSlms": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListHydratedDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListOrchestrationClusters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPublicBlueprints": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ProposeBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RejectBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RemoveDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RollbackDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchBlueprintRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SearchDeploymentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBlueprint": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateHydratedDeployment": { + "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/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php new file mode 100644 index 000000000000..67b54f6c288d --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php @@ -0,0 +1,614 @@ + [ + 'google.cloud.telcoautomation.v1.TelcoAutomation' => [ + 'CreateEdgeSlm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\TelcoAutomation\V1\EdgeSlm', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateOrchestrationCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEdgeSlm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOrchestrationCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApplyDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApplyHydratedDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ApproveBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ComputeDeploymentStatus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ComputeDeploymentStatusResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiscardBlueprintChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\DiscardBlueprintChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiscardDeploymentChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\DiscardDeploymentChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEdgeSlm' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\EdgeSlm', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHydratedDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOrchestrationCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\OrchestrationCluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\PublicBlueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprintRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListBlueprintRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListBlueprintsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDeploymentRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListDeploymentRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEdgeSlms' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEdgeSlms', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListEdgeSlmsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHydratedDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHydratedDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListHydratedDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrchestrationClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOrchestrationClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListOrchestrationClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPublicBlueprints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPublicBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListPublicBlueprintsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ProposeBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RejectBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RollbackDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SearchBlueprintRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBlueprints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\SearchBlueprintRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchDeploymentRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\SearchDeploymentRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBlueprint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', + 'headerParams' => [ + [ + 'keyName' => 'blueprint.name', + 'fieldAccessors' => [ + 'getBlueprint', + 'getName', + ], + ], + ], + ], + 'UpdateDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', + 'headerParams' => [ + [ + 'keyName' => 'deployment.name', + 'fieldAccessors' => [ + 'getDeployment', + 'getName', + ], + ], + ], + ], + 'UpdateHydratedDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', + 'headerParams' => [ + [ + 'keyName' => 'hydrated_deployment.name', + 'fieldAccessors' => [ + 'getHydratedDeployment', + 'getName', + ], + ], + ], + ], + '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' => [ + 'blueprint' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}', + 'deployment' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}', + 'edgeSlm' => 'projects/{project}/locations/{location}/edgeSlms/{edge_slm}', + 'hydratedDeployment' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}', + 'location' => 'projects/{project}/locations/{location}', + 'orchestrationCluster' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}', + 'publicBlueprint' => 'projects/{project}/locations/{location}/publicBlueprints/{public_lueprint}', + ], + ], + ], +]; diff --git a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php new file mode 100644 index 000000000000..c30e914f633e --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php @@ -0,0 +1,530 @@ + [ + '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.telcoautomation.v1.TelcoAutomation' => [ + 'ApplyDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:apply', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ApplyHydratedDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:apply', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ApproveBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:approve', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ComputeDeploymentStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:computeDeploymentStatus', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints', + 'body' => 'blueprint', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments', + 'body' => 'deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEdgeSlm' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/edgeSlms', + 'body' => 'edge_slm', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'edge_slm_id', + ], + ], + 'CreateOrchestrationCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/orchestrationClusters', + 'body' => 'orchestration_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'orchestration_cluster_id', + ], + ], + 'DeleteBlueprint' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEdgeSlm' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/edgeSlms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOrchestrationCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiscardBlueprintChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:discard', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiscardDeploymentChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:discard', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBlueprint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEdgeSlm' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/edgeSlms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHydratedDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrchestrationCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPublicBlueprint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/publicBlueprints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprintRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:listRevisions', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBlueprints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDeploymentRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:listRevisions', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEdgeSlms' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/edgeSlms', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHydratedDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*/deployments/*}/hydratedDeployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOrchestrationClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/orchestrationClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPublicBlueprints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/publicBlueprints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ProposeBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:propose', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RejectBlueprint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:reject', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RemoveDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:remove', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RollbackDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:rollback', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SearchBlueprintRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:searchRevisions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchDeploymentRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:searchRevisions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBlueprint' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{blueprint.name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', + 'body' => 'blueprint', + 'placeholders' => [ + 'blueprint.name' => [ + 'getters' => [ + 'getBlueprint', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*}', + 'body' => 'deployment', + 'placeholders' => [ + 'deployment.name' => [ + 'getters' => [ + 'getDeployment', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateHydratedDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{hydrated_deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}', + 'body' => 'hydrated_deployment', + 'placeholders' => [ + 'hydrated_deployment.name' => [ + 'getters' => [ + 'getHydratedDeployment', + '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/*}', + '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/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php b/owl-bot-staging/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php new file mode 100644 index 000000000000..c9fb4832eaff --- /dev/null +++ b/owl-bot-staging/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php @@ -0,0 +1,3154 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TelcoAutomationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TelcoAutomationClient($options); + } + + /** @test */ + public function applyDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ApplyDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->applyDeployment($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.telcoautomation.v1.TelcoAutomation/ApplyDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ApplyDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->applyDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyHydratedDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $workloadCluster = 'workloadCluster531492146'; + $expectedResponse = new HydratedDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setWorkloadCluster($workloadCluster); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new ApplyHydratedDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->applyHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/ApplyHydratedDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyHydratedDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new ApplyHydratedDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->applyHydratedDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function approveBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ApproveBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->approveBlueprint($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.telcoautomation.v1.TelcoAutomation/ApproveBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function approveBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ApproveBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->approveBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeDeploymentStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ComputeDeploymentStatusResponse(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ComputeDeploymentStatusRequest()) + ->setName($formattedName); + $response = $gapicClient->computeDeploymentStatus($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.telcoautomation.v1.TelcoAutomation/ComputeDeploymentStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function computeDeploymentStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ComputeDeploymentStatusRequest()) + ->setName($formattedName); + try { + $gapicClient->computeDeploymentStatus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $request = (new CreateBlueprintRequest()) + ->setParent($formattedParent) + ->setBlueprint($blueprint); + $response = $gapicClient->createBlueprint($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.telcoautomation.v1.TelcoAutomation/CreateBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBlueprint(); + $this->assertProtobufEquals($blueprint, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $request = (new CreateBlueprintRequest()) + ->setParent($formattedParent) + ->setBlueprint($blueprint); + try { + $gapicClient->createBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $request = (new CreateDeploymentRequest()) + ->setParent($formattedParent) + ->setDeployment($deployment); + $response = $gapicClient->createDeployment($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.telcoautomation.v1.TelcoAutomation/CreateDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDeployment(); + $this->assertProtobufEquals($deployment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $request = (new CreateDeploymentRequest()) + ->setParent($formattedParent) + ->setDeployment($deployment); + try { + $gapicClient->createDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEdgeSlmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEdgeSlmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $orchestrationCluster = 'orchestrationCluster-1006439940'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new EdgeSlm(); + $expectedResponse->setName($name); + $expectedResponse->setOrchestrationCluster($orchestrationCluster); + $expectedResponse->setTnaVersion($tnaVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEdgeSlmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $edgeSlmId = 'edgeSlmId974932168'; + $edgeSlm = new EdgeSlm(); + $request = (new CreateEdgeSlmRequest()) + ->setParent($formattedParent) + ->setEdgeSlmId($edgeSlmId) + ->setEdgeSlm($edgeSlm); + $response = $gapicClient->createEdgeSlm($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.telcoautomation.v1.TelcoAutomation/CreateEdgeSlm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEdgeSlmId(); + $this->assertProtobufEquals($edgeSlmId, $actualValue); + $actualValue = $actualApiRequestObject->getEdgeSlm(); + $this->assertProtobufEquals($edgeSlm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEdgeSlmTest'); + $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 createEdgeSlmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEdgeSlmTest'); + $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]'); + $edgeSlmId = 'edgeSlmId974932168'; + $edgeSlm = new EdgeSlm(); + $request = (new CreateEdgeSlmRequest()) + ->setParent($formattedParent) + ->setEdgeSlmId($edgeSlmId) + ->setEdgeSlm($edgeSlm); + $response = $gapicClient->createEdgeSlm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEdgeSlmTest'); + 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 createOrchestrationClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createOrchestrationClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new OrchestrationCluster(); + $expectedResponse->setName($name); + $expectedResponse->setTnaVersion($tnaVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createOrchestrationClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $orchestrationClusterId = 'orchestrationClusterId314535486'; + $orchestrationCluster = new OrchestrationCluster(); + $request = (new CreateOrchestrationClusterRequest()) + ->setParent($formattedParent) + ->setOrchestrationClusterId($orchestrationClusterId) + ->setOrchestrationCluster($orchestrationCluster); + $response = $gapicClient->createOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/CreateOrchestrationCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getOrchestrationClusterId(); + $this->assertProtobufEquals($orchestrationClusterId, $actualValue); + $actualValue = $actualApiRequestObject->getOrchestrationCluster(); + $this->assertProtobufEquals($orchestrationCluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOrchestrationClusterTest'); + $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 createOrchestrationClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createOrchestrationClusterTest'); + $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]'); + $orchestrationClusterId = 'orchestrationClusterId314535486'; + $orchestrationCluster = new OrchestrationCluster(); + $request = (new CreateOrchestrationClusterRequest()) + ->setParent($formattedParent) + ->setOrchestrationClusterId($orchestrationClusterId) + ->setOrchestrationCluster($orchestrationCluster); + $response = $gapicClient->createOrchestrationCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOrchestrationClusterTest'); + 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 deleteBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DeleteBlueprintRequest()) + ->setName($formattedName); + $gapicClient->deleteBlueprint($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/DeleteBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DeleteBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEdgeSlmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEdgeSlmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEdgeSlmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new DeleteEdgeSlmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEdgeSlm($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.telcoautomation.v1.TelcoAutomation/DeleteEdgeSlm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEdgeSlmTest'); + $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 deleteEdgeSlmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEdgeSlmTest'); + $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->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new DeleteEdgeSlmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEdgeSlm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEdgeSlmTest'); + 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 deleteOrchestrationClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteOrchestrationClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteOrchestrationClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new DeleteOrchestrationClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/DeleteOrchestrationCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOrchestrationClusterTest'); + $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 deleteOrchestrationClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteOrchestrationClusterTest'); + $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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new DeleteOrchestrationClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOrchestrationCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOrchestrationClusterTest'); + 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 discardBlueprintChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DiscardBlueprintChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DiscardBlueprintChangesRequest()) + ->setName($formattedName); + $response = $gapicClient->discardBlueprintChanges($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.telcoautomation.v1.TelcoAutomation/DiscardBlueprintChanges', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discardBlueprintChangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new DiscardBlueprintChangesRequest()) + ->setName($formattedName); + try { + $gapicClient->discardBlueprintChanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discardDeploymentChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DiscardDeploymentChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new DiscardDeploymentChangesRequest()) + ->setName($formattedName); + $response = $gapicClient->discardDeploymentChanges($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.telcoautomation.v1.TelcoAutomation/DiscardDeploymentChanges', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discardDeploymentChangesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new DiscardDeploymentChangesRequest()) + ->setName($formattedName); + try { + $gapicClient->discardDeploymentChanges($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new GetBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->getBlueprint($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.telcoautomation.v1.TelcoAutomation/GetBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new GetBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->getBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new GetDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getDeployment($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.telcoautomation.v1.TelcoAutomation/GetDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new GetDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEdgeSlmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $orchestrationCluster = 'orchestrationCluster-1006439940'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new EdgeSlm(); + $expectedResponse->setName($name2); + $expectedResponse->setOrchestrationCluster($orchestrationCluster); + $expectedResponse->setTnaVersion($tnaVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new GetEdgeSlmRequest()) + ->setName($formattedName); + $response = $gapicClient->getEdgeSlm($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.telcoautomation.v1.TelcoAutomation/GetEdgeSlm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEdgeSlmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); + $request = (new GetEdgeSlmRequest()) + ->setName($formattedName); + try { + $gapicClient->getEdgeSlm($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHydratedDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $workloadCluster = 'workloadCluster531492146'; + $expectedResponse = new HydratedDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setWorkloadCluster($workloadCluster); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new GetHydratedDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/GetHydratedDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHydratedDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); + $request = (new GetHydratedDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getHydratedDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrchestrationClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $tnaVersion = 'tnaVersion1050832320'; + $expectedResponse = new OrchestrationCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setTnaVersion($tnaVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new GetOrchestrationClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/GetOrchestrationCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrchestrationClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new GetOrchestrationClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getOrchestrationCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new PublicBlueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->publicBlueprintName('[PROJECT]', '[LOCATION]', '[PUBLIC_LUEPRINT]'); + $request = (new GetPublicBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->getPublicBlueprint($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.telcoautomation.v1.TelcoAutomation/GetPublicBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPublicBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->publicBlueprintName('[PROJECT]', '[LOCATION]', '[PUBLIC_LUEPRINT]'); + $request = (new GetPublicBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->getPublicBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $blueprintsElement = new Blueprint(); + $blueprints = [ + $blueprintsElement, + ]; + $expectedResponse = new ListBlueprintRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBlueprints($blueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ListBlueprintRevisionsRequest()) + ->setName($formattedName); + $response = $gapicClient->listBlueprintRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprintRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ListBlueprintRevisionsRequest()) + ->setName($formattedName); + try { + $gapicClient->listBlueprintRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $blueprintsElement = new Blueprint(); + $blueprints = [ + $blueprintsElement, + ]; + $expectedResponse = new ListBlueprintsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBlueprints($blueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new ListBlueprintsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBlueprints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBlueprintsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new ListBlueprintsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBlueprints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new ListDeploymentRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListDeploymentRevisionsRequest()) + ->setName($formattedName); + $response = $gapicClient->listDeploymentRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListDeploymentRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListDeploymentRevisionsRequest()) + ->setName($formattedName); + try { + $gapicClient->listDeploymentRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new ListDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new ListDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $request = (new ListDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDeployments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEdgeSlmsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $edgeSlmsElement = new EdgeSlm(); + $edgeSlms = [ + $edgeSlmsElement, + ]; + $expectedResponse = new ListEdgeSlmsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEdgeSlms($edgeSlms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEdgeSlmsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEdgeSlms($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEdgeSlms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListEdgeSlms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEdgeSlmsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListEdgeSlmsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEdgeSlms($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHydratedDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hydratedDeploymentsElement = new HydratedDeployment(); + $hydratedDeployments = [ + $hydratedDeploymentsElement, + ]; + $expectedResponse = new ListHydratedDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHydratedDeployments($hydratedDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListHydratedDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHydratedDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHydratedDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListHydratedDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHydratedDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ListHydratedDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHydratedDeployments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrchestrationClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $orchestrationClustersElement = new OrchestrationCluster(); + $orchestrationClusters = [ + $orchestrationClustersElement, + ]; + $expectedResponse = new ListOrchestrationClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOrchestrationClusters($orchestrationClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOrchestrationClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOrchestrationClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOrchestrationClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListOrchestrationClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOrchestrationClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListOrchestrationClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOrchestrationClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPublicBlueprintsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $publicBlueprintsElement = new PublicBlueprint(); + $publicBlueprints = [ + $publicBlueprintsElement, + ]; + $expectedResponse = new ListPublicBlueprintsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPublicBlueprints($publicBlueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPublicBlueprintsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPublicBlueprints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPublicBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListPublicBlueprints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPublicBlueprintsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListPublicBlueprintsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPublicBlueprints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function proposeBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ProposeBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->proposeBlueprint($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.telcoautomation.v1.TelcoAutomation/ProposeBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function proposeBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new ProposeBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->proposeBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rejectBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new RejectBlueprintRequest()) + ->setName($formattedName); + $response = $gapicClient->rejectBlueprint($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.telcoautomation.v1.TelcoAutomation/RejectBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rejectBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); + $request = (new RejectBlueprintRequest()) + ->setName($formattedName); + try { + $gapicClient->rejectBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new RemoveDeploymentRequest()) + ->setName($formattedName); + $gapicClient->removeDeployment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/RemoveDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new RemoveDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->removeDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId2 = 'revisionId2-100208654'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId2); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $revisionId = 'revisionId513861631'; + $request = (new RollbackDeploymentRequest()) + ->setName($formattedName) + ->setRevisionId($revisionId); + $response = $gapicClient->rollbackDeployment($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.telcoautomation.v1.TelcoAutomation/RollbackDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getRevisionId(); + $this->assertProtobufEquals($revisionId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $revisionId = 'revisionId513861631'; + $request = (new RollbackDeploymentRequest()) + ->setName($formattedName) + ->setRevisionId($revisionId); + try { + $gapicClient->rollbackDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchBlueprintRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $blueprintsElement = new Blueprint(); + $blueprints = [ + $blueprintsElement, + ]; + $expectedResponse = new SearchBlueprintRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBlueprints($blueprints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchBlueprintRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + $response = $gapicClient->searchBlueprintRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/SearchBlueprintRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchBlueprintRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchBlueprintRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + try { + $gapicClient->searchBlueprintRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDeploymentRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $deploymentsElement = new Deployment(); + $deployments = [ + $deploymentsElement, + ]; + $expectedResponse = new SearchDeploymentRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDeployments($deployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchDeploymentRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + $response = $gapicClient->searchDeploymentRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/SearchDeploymentRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDeploymentRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); + $query = 'query107944136'; + $request = (new SearchDeploymentRevisionsRequest()) + ->setParent($formattedParent) + ->setQuery($query); + try { + $gapicClient->searchDeploymentRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBlueprintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprint = 'sourceBlueprint-1884166289'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $rollbackSupport = true; + $expectedResponse = new Blueprint(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprint($sourceBlueprint); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $updateMask = new FieldMask(); + $request = (new UpdateBlueprintRequest()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateBlueprint($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.telcoautomation.v1.TelcoAutomation/UpdateBlueprint', $actualFuncCall); + $actualValue = $actualRequestObject->getBlueprint(); + $this->assertProtobufEquals($blueprint, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBlueprintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $blueprint = new Blueprint(); + $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; + $blueprint->setSourceBlueprint($blueprintSourceBlueprint); + $updateMask = new FieldMask(); + $request = (new UpdateBlueprintRequest()) + ->setBlueprint($blueprint) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateBlueprint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $updateMask = new FieldMask(); + $request = (new UpdateDeploymentRequest()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDeployment($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.telcoautomation.v1.TelcoAutomation/UpdateDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getDeployment(); + $this->assertProtobufEquals($deployment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $deployment = new Deployment(); + $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; + $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); + $updateMask = new FieldMask(); + $request = (new UpdateDeploymentRequest()) + ->setDeployment($deployment) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateHydratedDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $workloadCluster = 'workloadCluster531492146'; + $expectedResponse = new HydratedDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setWorkloadCluster($workloadCluster); + $transport->addResponse($expectedResponse); + // Mock request + $hydratedDeployment = new HydratedDeployment(); + $updateMask = new FieldMask(); + $request = (new UpdateHydratedDeploymentRequest()) + ->setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/UpdateHydratedDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getHydratedDeployment(); + $this->assertProtobufEquals($hydratedDeployment, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateHydratedDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $hydratedDeployment = new HydratedDeployment(); + $updateMask = new FieldMask(); + $request = (new UpdateHydratedDeploymentRequest()) + ->setHydratedDeployment($hydratedDeployment) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateHydratedDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 applyDeploymentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $revisionId = 'revisionId513861631'; + $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; + $displayName = 'displayName1615086568'; + $repository = 'repository1950800714'; + $sourceProvider = 'sourceProvider2074918293'; + $workloadCluster = 'workloadCluster531492146'; + $rollbackSupport = true; + $expectedResponse = new Deployment(); + $expectedResponse->setName($name2); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRepository($repository); + $expectedResponse->setSourceProvider($sourceProvider); + $expectedResponse->setWorkloadCluster($workloadCluster); + $expectedResponse->setRollbackSupport($rollbackSupport); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); + $request = (new ApplyDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->applyDeploymentAsync($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.telcoautomation.v1.TelcoAutomation/ApplyDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTts.php b/owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTts.php new file mode 100644 index 0000000000000000000000000000000000000000..6d6a89bd79873be88fbb9d20cbd0fb45ad7189e0 GIT binary patch literal 4912 zcmcIo&u`oI6*pzev7c;BW}HS=>Xc;))X5yFR=R9amTiM@@p4u)kjCO%yv|D2s?bCy&0Ggq?uE4&wJQrSrfPePz%+NK#^;8f4eWbgJZt9+{ z8u}{?=b6w|4VR$uv}|{1YMySH0#&G)8ri!q_?T4oBiq98p9!H;b(#^(M!RBq#4%N) zT_mpN=(cA$brj9zdc?cRBYm@XKQK$-^scby`X zub$d7QYP7YTQW_HX2CMuTy7N82;yyu1w$vM_ij3eIx#wV(pS%Q%Xv4|1_^3rrjso1 z4}YTvS(ZATtE3)c1@2v?fhOf+_@@B-?^1gF`@VFV6>56CP}AoJsoMdTYU^0EG%bF` zral<^(50~}XF>3Rz|NR}6GZ5L5;L%Mq`Tg!rEA1(kUtKI>+vbrG*q)URC`3xtPV+X z0=KuGU;a+w#0v1^3a*VyO87^xdd?tFba^k9y_cRBN}8Dy|HeU-J@M~Be8Qm1VAlB! zSfRTy8KL(1Jj7ggU?@Fec8HT)#+UKz!}*q)sK9LCN}&?}A?%ncRYS^%={iiaX0y8GAHc3*y;Ka8H?<4pb0im&Tqy2^iLB)6)MsvQ zt-SOXj>`*hSD7m;{wD&rn}O;p(qwcL=KpsP)lGZoF~nGQe?f?$0~M-6S1H0DLiC)j z2g_V6o1Krq!fXgnT;&IiNH=_=z7)w+0jHg)fxTx!SOd?)$Tj08_brnkSu422R!28`EP?TCd49xiHI%LgfO3FW=CC~I2E%4E@`~kky&S=Bq6LZT zN?5hK^>Xc4ZdD43d|ap%E5{|}9KQ=Y)1UsJG^Hwj zj^x+jhTvKKwL5x`o=THd7f`p+ER-xPdbPwZV2BW4j2y1uK+>eF9<% z;`bcH!;R~*Eyu?LDMpj!CHk8Zm9K@r>##kbK`4O*Wx&El3y^C*5B6#pK9?OE(Fr$t2m53DW2Mi8#gYLuvB+06XJ`B5_O zgI!;Sm`^|0U`>*YGL-au6sC`Jok>Q#$cg{sAT~yGd>P_CPhRl`t%Z2@=kviCL`V%j zSMI_ls}kfM)|yxmarxEnq!nBs{uV@S-P8JPp+~RpLj2q^h6AGXRNYiMXRNlyzi&;q zI~sqKtvfFQPjHylJeL+!7l#=|?<7~Tm#>GWY0O*GIn6?JfFptt?3#PneSVO3;f^{) z>NSG!ab$7RIHzZ-RFrSGA?^^{a&W3whAxg7ESz}u+5B`(Sx+|tloJY)k0v=fqWm5< zC*JdSA=QxUwMI)WDkn{;Bwyps4OnZ)(ow5Ym60xEaHDp3cvLx-6A>{BiR%@Ba9g7? zqU-d6T#S*1cmT%!8Qj(S6K67gSYUko8%v?^2H>t~XM98^U#&g^Q9tW43GYX9V)dE+-T{QA3 zO!JeUpc&+QX^;DaOVz%T?o6C1{Uch)&EH7rzUSF)E|Yor@?~Hw{Fp&H@B3FJ4{baF zbuDL*|1tvf@@1}H`K|F)8KjDUFL~IN_Yw}_S4F`!0?`rI`r{mt+Xa9(- z6k4t3zasCK*xgJTyY#S=9=Df1J@_j8+z#$;*yT-F{B69w`9AW250J|-gj{YMB9}u6 z>12LGdyGxinternalAddGeneratedFile( + ' +ü + +0google/cloud/texttospeech/v1/cloud_tts_lrs.protogoogle.cloud.texttospeech.v1google/api/client.protogoogle/api/field_behavior.proto,google/cloud/texttospeech/v1/cloud_tts.proto#google/longrunning/operations.protogoogle/protobuf/timestamp.proto"™ +SynthesizeLongAudioRequest +parent ( @ +input ( 2,.google.cloud.texttospeech.v1.SynthesisInputBàAD + audio_config ( 2).google.cloud.texttospeech.v1.AudioConfigBàA +output_gcs_uri ( BàAF +voice ( 22.google.cloud.texttospeech.v1.VoiceSelectionParamsBàA" +SynthesizeLongAudioResponse"¤ +SynthesizeLongAudioMetadata. + +start_time ( 2.google.protobuf.Timestamp8 +last_update_time ( 2.google.protobuf.TimestampB +progress_percentage (2Ÿ +TextToSpeechLongAudioSynthesizeª +SynthesizeLongAudio8.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest.google.longrunning.Operation"¹ÊAt +8google.cloud.texttospeech.v1.SynthesizeLongAudioResponse8google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata‚Óä“<"7/v1/{parent=projects/*/locations/*}:synthesizeLongAudio:*OÊAtexttospeech.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBï + com.google.cloud.texttospeech.v1B#TextToSpeechLongAudioSynthesisProtoPZDcloud.google.com/go/texttospeech/apiv1/texttospeechpb;texttospeechpbªGoogle.Cloud.TextToSpeech.V1ÊGoogle\\Cloud\\TextToSpeech\\V1êGoogle::Cloud::TextToSpeech::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php new file mode 100644 index 000000000000..2222ba2fcb32 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php @@ -0,0 +1,81 @@ +google.cloud.texttospeech.v1.AdvancedVoiceOptions + */ +class AdvancedVoiceOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Only for Journey voices. If false, the synthesis will be context aware + * and have higher latency. + * + * Generated from protobuf field optional bool low_latency_journey_synthesis = 1; + */ + protected $low_latency_journey_synthesis = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $low_latency_journey_synthesis + * Only for Journey voices. If false, the synthesis will be context aware + * and have higher latency. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Only for Journey voices. If false, the synthesis will be context aware + * and have higher latency. + * + * Generated from protobuf field optional bool low_latency_journey_synthesis = 1; + * @return bool + */ + public function getLowLatencyJourneySynthesis() + { + return isset($this->low_latency_journey_synthesis) ? $this->low_latency_journey_synthesis : false; + } + + public function hasLowLatencyJourneySynthesis() + { + return isset($this->low_latency_journey_synthesis); + } + + public function clearLowLatencyJourneySynthesis() + { + unset($this->low_latency_journey_synthesis); + } + + /** + * Only for Journey voices. If false, the synthesis will be context aware + * and have higher latency. + * + * Generated from protobuf field optional bool low_latency_journey_synthesis = 1; + * @param bool $var + * @return $this + */ + public function setLowLatencyJourneySynthesis($var) + { + GPBUtil::checkBool($var); + $this->low_latency_journey_synthesis = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php new file mode 100644 index 000000000000..7d299d36de5a --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php @@ -0,0 +1,329 @@ +google.cloud.texttospeech.v1.AudioConfig + */ +class AudioConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The format of the audio byte stream. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_encoding = 0; + /** + * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + * the normal native speed supported by the specific voice. 2.0 is twice as + * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + * speed. Any other values < 0.25 or > 4.0 will return an error. + * + * Generated from protobuf field double speaking_rate = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $speaking_rate = 0.0; + /** + * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + * increase 20 semitones from the original pitch. -20 means decrease 20 + * semitones from the original pitch. + * + * Generated from protobuf field double pitch = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $pitch = 0.0; + /** + * Optional. Input only. Volume gain (in dB) of the normal native volume + * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + * set to a value of 0.0 (dB), will play at normal native signal amplitude. A + * value of -6.0 (dB) will play at approximately half the amplitude of the + * normal native signal amplitude. A value of +6.0 (dB) will play at + * approximately twice the amplitude of the normal native signal amplitude. + * Strongly recommend not to exceed +10 (dB) as there's usually no effective + * increase in loudness for any value greater than that. + * + * Generated from protobuf field double volume_gain_db = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $volume_gain_db = 0.0; + /** + * Optional. The synthesis sample rate (in hertz) for this audio. When this is + * specified in SynthesizeSpeechRequest, if this is different from the voice's + * natural sample rate, then the synthesizer will honor this request by + * converting to the desired sample rate (which might result in worse audio + * quality), unless the specified sample rate is not supported for the + * encoding chosen, in which case it will fail the request and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_rate_hertz = 0; + /** + * Optional. Input only. An identifier which selects 'audio effects' profiles + * that are applied on (post synthesized) text to speech. Effects are applied + * on top of each other in the order they are given. See + * [audio + * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + * current supported profile ids. + * + * Generated from protobuf field repeated string effects_profile_id = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + private $effects_profile_id; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $audio_encoding + * Required. The format of the audio byte stream. + * @type float $speaking_rate + * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + * the normal native speed supported by the specific voice. 2.0 is twice as + * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + * speed. Any other values < 0.25 or > 4.0 will return an error. + * @type float $pitch + * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + * increase 20 semitones from the original pitch. -20 means decrease 20 + * semitones from the original pitch. + * @type float $volume_gain_db + * Optional. Input only. Volume gain (in dB) of the normal native volume + * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + * set to a value of 0.0 (dB), will play at normal native signal amplitude. A + * value of -6.0 (dB) will play at approximately half the amplitude of the + * normal native signal amplitude. A value of +6.0 (dB) will play at + * approximately twice the amplitude of the normal native signal amplitude. + * Strongly recommend not to exceed +10 (dB) as there's usually no effective + * increase in loudness for any value greater than that. + * @type int $sample_rate_hertz + * Optional. The synthesis sample rate (in hertz) for this audio. When this is + * specified in SynthesizeSpeechRequest, if this is different from the voice's + * natural sample rate, then the synthesizer will honor this request by + * converting to the desired sample rate (which might result in worse audio + * quality), unless the specified sample rate is not supported for the + * encoding chosen, in which case it will fail the request and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * @type array|\Google\Protobuf\Internal\RepeatedField $effects_profile_id + * Optional. Input only. An identifier which selects 'audio effects' profiles + * that are applied on (post synthesized) text to speech. Effects are applied + * on top of each other in the order they are given. See + * [audio + * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + * current supported profile ids. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. The format of the audio byte stream. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAudioEncoding() + { + return $this->audio_encoding; + } + + /** + * Required. The format of the audio byte stream. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAudioEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\AudioEncoding::class); + $this->audio_encoding = $var; + + return $this; + } + + /** + * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + * the normal native speed supported by the specific voice. 2.0 is twice as + * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + * speed. Any other values < 0.25 or > 4.0 will return an error. + * + * Generated from protobuf field double speaking_rate = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSpeakingRate() + { + return $this->speaking_rate; + } + + /** + * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + * the normal native speed supported by the specific voice. 2.0 is twice as + * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + * speed. Any other values < 0.25 or > 4.0 will return an error. + * + * Generated from protobuf field double speaking_rate = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSpeakingRate($var) + { + GPBUtil::checkDouble($var); + $this->speaking_rate = $var; + + return $this; + } + + /** + * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + * increase 20 semitones from the original pitch. -20 means decrease 20 + * semitones from the original pitch. + * + * Generated from protobuf field double pitch = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getPitch() + { + return $this->pitch; + } + + /** + * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + * increase 20 semitones from the original pitch. -20 means decrease 20 + * semitones from the original pitch. + * + * Generated from protobuf field double pitch = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setPitch($var) + { + GPBUtil::checkDouble($var); + $this->pitch = $var; + + return $this; + } + + /** + * Optional. Input only. Volume gain (in dB) of the normal native volume + * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + * set to a value of 0.0 (dB), will play at normal native signal amplitude. A + * value of -6.0 (dB) will play at approximately half the amplitude of the + * normal native signal amplitude. A value of +6.0 (dB) will play at + * approximately twice the amplitude of the normal native signal amplitude. + * Strongly recommend not to exceed +10 (dB) as there's usually no effective + * increase in loudness for any value greater than that. + * + * Generated from protobuf field double volume_gain_db = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getVolumeGainDb() + { + return $this->volume_gain_db; + } + + /** + * Optional. Input only. Volume gain (in dB) of the normal native volume + * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + * set to a value of 0.0 (dB), will play at normal native signal amplitude. A + * value of -6.0 (dB) will play at approximately half the amplitude of the + * normal native signal amplitude. A value of +6.0 (dB) will play at + * approximately twice the amplitude of the normal native signal amplitude. + * Strongly recommend not to exceed +10 (dB) as there's usually no effective + * increase in loudness for any value greater than that. + * + * Generated from protobuf field double volume_gain_db = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setVolumeGainDb($var) + { + GPBUtil::checkDouble($var); + $this->volume_gain_db = $var; + + return $this; + } + + /** + * Optional. The synthesis sample rate (in hertz) for this audio. When this is + * specified in SynthesizeSpeechRequest, if this is different from the voice's + * natural sample rate, then the synthesizer will honor this request by + * converting to the desired sample rate (which might result in worse audio + * quality), unless the specified sample rate is not supported for the + * encoding chosen, in which case it will fail the request and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * Optional. The synthesis sample rate (in hertz) for this audio. When this is + * specified in SynthesizeSpeechRequest, if this is different from the voice's + * natural sample rate, then the synthesizer will honor this request by + * converting to the desired sample rate (which might result in worse audio + * quality), unless the specified sample rate is not supported for the + * encoding chosen, in which case it will fail the request and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * Optional. Input only. An identifier which selects 'audio effects' profiles + * that are applied on (post synthesized) text to speech. Effects are applied + * on top of each other in the order they are given. See + * [audio + * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + * current supported profile ids. + * + * Generated from protobuf field repeated string effects_profile_id = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEffectsProfileId() + { + return $this->effects_profile_id; + } + + /** + * Optional. Input only. An identifier which selects 'audio effects' profiles + * that are applied on (post synthesized) text to speech. Effects are applied + * on top of each other in the order they are given. See + * [audio + * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + * current supported profile ids. + * + * Generated from protobuf field repeated string effects_profile_id = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEffectsProfileId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->effects_profile_id = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php new file mode 100644 index 000000000000..1a3ee8800a95 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php @@ -0,0 +1,90 @@ +google.cloud.texttospeech.v1.AudioEncoding + */ +class AudioEncoding +{ + /** + * Not specified. Will return result + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + * + * Generated from protobuf enum AUDIO_ENCODING_UNSPECIFIED = 0; + */ + const AUDIO_ENCODING_UNSPECIFIED = 0; + /** + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * Audio content returned as LINEAR16 also contains a WAV header. + * + * Generated from protobuf enum LINEAR16 = 1; + */ + const LINEAR16 = 1; + /** + * MP3 audio at 32kbps. + * + * Generated from protobuf enum MP3 = 2; + */ + const MP3 = 2; + /** + * Opus encoded audio wrapped in an ogg container. The result will be a + * file which can be played natively on Android, and in browsers (at least + * Chrome and Firefox). The quality of the encoding is considerably higher + * than MP3 while using approximately the same bitrate. + * + * Generated from protobuf enum OGG_OPUS = 3; + */ + const OGG_OPUS = 3; + /** + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * Audio content returned as MULAW also contains a WAV header. + * + * Generated from protobuf enum MULAW = 5; + */ + const MULAW = 5; + /** + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. + * Audio content returned as ALAW also contains a WAV header. + * + * Generated from protobuf enum ALAW = 6; + */ + const ALAW = 6; + + private static $valueToName = [ + self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED', + self::LINEAR16 => 'LINEAR16', + self::MP3 => 'MP3', + self::OGG_OPUS => 'OGG_OPUS', + self::MULAW => 'MULAW', + self::ALAW => 'ALAW', + ]; + + 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/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php new file mode 100644 index 000000000000..2a2283ce0dea --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php @@ -0,0 +1,177 @@ +google.cloud.texttospeech.v1.CustomPronunciationParams + */ +class CustomPronunciationParams extends \Google\Protobuf\Internal\Message +{ + /** + * The phrase to which the customization will be applied. + * The phrase can be multiple words (in the case of proper nouns etc), but + * should not span to a whole sentence. + * + * Generated from protobuf field optional string phrase = 1; + */ + protected $phrase = null; + /** + * The phonetic encoding of the phrase. + * + * Generated from protobuf field optional .google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding phonetic_encoding = 2; + */ + protected $phonetic_encoding = null; + /** + * The pronunciation of the phrase. This must be in the phonetic encoding + * specified above. + * + * Generated from protobuf field optional string pronunciation = 3; + */ + protected $pronunciation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $phrase + * The phrase to which the customization will be applied. + * The phrase can be multiple words (in the case of proper nouns etc), but + * should not span to a whole sentence. + * @type int $phonetic_encoding + * The phonetic encoding of the phrase. + * @type string $pronunciation + * The pronunciation of the phrase. This must be in the phonetic encoding + * specified above. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The phrase to which the customization will be applied. + * The phrase can be multiple words (in the case of proper nouns etc), but + * should not span to a whole sentence. + * + * Generated from protobuf field optional string phrase = 1; + * @return string + */ + public function getPhrase() + { + return isset($this->phrase) ? $this->phrase : ''; + } + + public function hasPhrase() + { + return isset($this->phrase); + } + + public function clearPhrase() + { + unset($this->phrase); + } + + /** + * The phrase to which the customization will be applied. + * The phrase can be multiple words (in the case of proper nouns etc), but + * should not span to a whole sentence. + * + * Generated from protobuf field optional string phrase = 1; + * @param string $var + * @return $this + */ + public function setPhrase($var) + { + GPBUtil::checkString($var, True); + $this->phrase = $var; + + return $this; + } + + /** + * The phonetic encoding of the phrase. + * + * Generated from protobuf field optional .google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding phonetic_encoding = 2; + * @return int + */ + public function getPhoneticEncoding() + { + return isset($this->phonetic_encoding) ? $this->phonetic_encoding : 0; + } + + public function hasPhoneticEncoding() + { + return isset($this->phonetic_encoding); + } + + public function clearPhoneticEncoding() + { + unset($this->phonetic_encoding); + } + + /** + * The phonetic encoding of the phrase. + * + * Generated from protobuf field optional .google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding phonetic_encoding = 2; + * @param int $var + * @return $this + */ + public function setPhoneticEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\CustomPronunciationParams\PhoneticEncoding::class); + $this->phonetic_encoding = $var; + + return $this; + } + + /** + * The pronunciation of the phrase. This must be in the phonetic encoding + * specified above. + * + * Generated from protobuf field optional string pronunciation = 3; + * @return string + */ + public function getPronunciation() + { + return isset($this->pronunciation) ? $this->pronunciation : ''; + } + + public function hasPronunciation() + { + return isset($this->pronunciation); + } + + public function clearPronunciation() + { + unset($this->pronunciation); + } + + /** + * The pronunciation of the phrase. This must be in the phonetic encoding + * specified above. + * + * Generated from protobuf field optional string pronunciation = 3; + * @param string $var + * @return $this + */ + public function setPronunciation($var) + { + GPBUtil::checkString($var, True); + $this->pronunciation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php new file mode 100644 index 000000000000..d7631a1efee4 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php @@ -0,0 +1,66 @@ +google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding + */ +class PhoneticEncoding +{ + /** + * Not specified. + * + * Generated from protobuf enum PHONETIC_ENCODING_UNSPECIFIED = 0; + */ + const PHONETIC_ENCODING_UNSPECIFIED = 0; + /** + * IPA. (e.g. apple -> ˈæpÉ™l ) + * https://en.wikipedia.org/wiki/International_Phonetic_Alphabet + * + * Generated from protobuf enum PHONETIC_ENCODING_IPA = 1; + */ + const PHONETIC_ENCODING_IPA = 1; + /** + * X-SAMPA (e.g. apple -> "{p@l" ) + * https://en.wikipedia.org/wiki/X-SAMPA + * + * Generated from protobuf enum PHONETIC_ENCODING_X_SAMPA = 2; + */ + const PHONETIC_ENCODING_X_SAMPA = 2; + + private static $valueToName = [ + self::PHONETIC_ENCODING_UNSPECIFIED => 'PHONETIC_ENCODING_UNSPECIFIED', + self::PHONETIC_ENCODING_IPA => 'PHONETIC_ENCODING_IPA', + self::PHONETIC_ENCODING_X_SAMPA => 'PHONETIC_ENCODING_X_SAMPA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PhoneticEncoding::class, \Google\Cloud\TextToSpeech\V1\CustomPronunciationParams_PhoneticEncoding::class); + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php new file mode 100644 index 000000000000..fffc75dae4d1 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php @@ -0,0 +1,67 @@ +google.cloud.texttospeech.v1.CustomPronunciations + */ +class CustomPronunciations extends \Google\Protobuf\Internal\Message +{ + /** + * The pronunciation customizations to be applied. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.CustomPronunciationParams pronunciations = 1; + */ + private $pronunciations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TextToSpeech\V1\CustomPronunciationParams>|\Google\Protobuf\Internal\RepeatedField $pronunciations + * The pronunciation customizations to be applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The pronunciation customizations to be applied. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.CustomPronunciationParams pronunciations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPronunciations() + { + return $this->pronunciations; + } + + /** + * The pronunciation customizations to be applied. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.CustomPronunciationParams pronunciations = 1; + * @param array<\Google\Cloud\TextToSpeech\V1\CustomPronunciationParams>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPronunciations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\CustomPronunciationParams::class); + $this->pronunciations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php new file mode 100644 index 000000000000..bc208aa890c7 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php @@ -0,0 +1,106 @@ +google.cloud.texttospeech.v1.CustomVoiceParams + */ +class CustomVoiceParams extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the AutoML model that synthesizes the custom voice. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $model = ''; + /** + * Optional. Deprecated. The usage of the synthesized audio to be reported. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $reported_usage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Required. The name of the AutoML model that synthesizes the custom voice. + * @type int $reported_usage + * Optional. Deprecated. The usage of the synthesized audio to be reported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the AutoML model that synthesizes the custom voice. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Required. The name of the AutoML model that synthesizes the custom voice. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Optional. Deprecated. The usage of the synthesized audio to be reported. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return int + * @deprecated + */ + public function getReportedUsage() + { + @trigger_error('reported_usage is deprecated.', E_USER_DEPRECATED); + return $this->reported_usage; + } + + /** + * Optional. Deprecated. The usage of the synthesized audio to be reported. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + * @deprecated + */ + public function setReportedUsage($var) + { + @trigger_error('reported_usage is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\CustomVoiceParams\ReportedUsage::class); + $this->reported_usage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php new file mode 100644 index 000000000000..6e8d93d63f04 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php @@ -0,0 +1,68 @@ +google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage + */ +class ReportedUsage +{ + /** + * Request with reported usage unspecified will be rejected. + * + * Generated from protobuf enum REPORTED_USAGE_UNSPECIFIED = 0; + */ + const REPORTED_USAGE_UNSPECIFIED = 0; + /** + * For scenarios where the synthesized audio is not downloadable and can + * only be used once. For example, real-time request in IVR system. + * + * Generated from protobuf enum REALTIME = 1; + */ + const REALTIME = 1; + /** + * For scenarios where the synthesized audio is downloadable and can be + * reused. For example, the synthesized audio is downloaded, stored in + * customer service system and played repeatedly. + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + + private static $valueToName = [ + self::REPORTED_USAGE_UNSPECIFIED => 'REPORTED_USAGE_UNSPECIFIED', + self::REALTIME => 'REALTIME', + self::OFFLINE => 'OFFLINE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReportedUsage::class, \Google\Cloud\TextToSpeech\V1\CustomVoiceParams_ReportedUsage::class); + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php new file mode 100644 index 000000000000..a1f5971ee7a9 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php @@ -0,0 +1,115 @@ +google.cloud.texttospeech.v1.ListVoicesRequest + */ +class ListVoicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Recommended. + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * If not specified, the API will return all supported voices. + * If specified, the ListVoices call will only return voices that can be used + * to synthesize this language_code. For example, if you specify `"en-NZ"`, + * all `"en-NZ"` voices will be returned. If you specify `"no"`, both + * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + * returned. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $language_code = ''; + + /** + * @param string $languageCode Optional. Recommended. + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * If not specified, the API will return all supported voices. + * If specified, the ListVoices call will only return voices that can be used + * to synthesize this language_code. For example, if you specify `"en-NZ"`, + * all `"en-NZ"` voices will be returned. If you specify `"no"`, both + * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + * returned. + * + * @return \Google\Cloud\TextToSpeech\V1\ListVoicesRequest + * + * @experimental + */ + public static function build(string $languageCode): self + { + return (new self()) + ->setLanguageCode($languageCode); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * Optional. Recommended. + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * If not specified, the API will return all supported voices. + * If specified, the ListVoices call will only return voices that can be used + * to synthesize this language_code. For example, if you specify `"en-NZ"`, + * all `"en-NZ"` voices will be returned. If you specify `"no"`, both + * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + * returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Recommended. + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * If not specified, the API will return all supported voices. + * If specified, the ListVoices call will only return voices that can be used + * to synthesize this language_code. For example, if you specify `"en-NZ"`, + * all `"en-NZ"` voices will be returned. If you specify `"no"`, both + * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + * returned. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Optional. Recommended. + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * If not specified, the API will return all supported voices. + * If specified, the ListVoices call will only return voices that can be used + * to synthesize this language_code. For example, if you specify `"en-NZ"`, + * all `"en-NZ"` voices will be returned. If you specify `"no"`, both + * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + * returned. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php new file mode 100644 index 000000000000..d28b7ae0e154 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php @@ -0,0 +1,67 @@ +google.cloud.texttospeech.v1.ListVoicesResponse + */ +class ListVoicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of voices. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.Voice voices = 1; + */ + private $voices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TextToSpeech\V1\Voice>|\Google\Protobuf\Internal\RepeatedField $voices + * The list of voices. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The list of voices. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.Voice voices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVoices() + { + return $this->voices; + } + + /** + * The list of voices. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.Voice voices = 1; + * @param array<\Google\Cloud\TextToSpeech\V1\Voice>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVoices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\Voice::class); + $this->voices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php new file mode 100644 index 000000000000..bb7faf68acc0 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php @@ -0,0 +1,67 @@ +google.cloud.texttospeech.v1.MultiSpeakerMarkup + */ +class MultiSpeakerMarkup extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Speaker turns. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn turns = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $turns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup\Turn>|\Google\Protobuf\Internal\RepeatedField $turns + * Required. Speaker turns. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. Speaker turns. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn turns = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTurns() + { + return $this->turns; + } + + /** + * Required. Speaker turns. + * + * Generated from protobuf field repeated .google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn turns = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup\Turn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTurns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup\Turn::class); + $this->turns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php new file mode 100644 index 000000000000..c2ad106a5e69 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php @@ -0,0 +1,108 @@ +google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn + */ +class Turn extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + * to documentation for available speakers. + * + * Generated from protobuf field string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $speaker = ''; + /** + * Required. The text to speak. + * + * Generated from protobuf field string text = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $speaker + * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + * to documentation for available speakers. + * @type string $text + * Required. The text to speak. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + * to documentation for available speakers. + * + * Generated from protobuf field string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSpeaker() + { + return $this->speaker; + } + + /** + * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + * to documentation for available speakers. + * + * Generated from protobuf field string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSpeaker($var) + { + GPBUtil::checkString($var, True); + $this->speaker = $var; + + return $this; + } + + /** + * Required. The text to speak. + * + * Generated from protobuf field string text = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. The text to speak. + * + * Generated from protobuf field string text = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Turn::class, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup_Turn::class); + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php new file mode 100644 index 000000000000..ca9b5bfd29a5 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php @@ -0,0 +1,73 @@ +google.cloud.texttospeech.v1.SsmlVoiceGender + */ +class SsmlVoiceGender +{ + /** + * An unspecified gender. + * In VoiceSelectionParams, this means that the client doesn't care which + * gender the selected voice will have. In the Voice field of + * ListVoicesResponse, this may mean that the voice doesn't fit any of the + * other categories in this enum, or that the gender of the voice isn't known. + * + * Generated from protobuf enum SSML_VOICE_GENDER_UNSPECIFIED = 0; + */ + const SSML_VOICE_GENDER_UNSPECIFIED = 0; + /** + * A male voice. + * + * Generated from protobuf enum MALE = 1; + */ + const MALE = 1; + /** + * A female voice. + * + * Generated from protobuf enum FEMALE = 2; + */ + const FEMALE = 2; + /** + * A gender-neutral voice. This voice is not yet supported. + * + * Generated from protobuf enum NEUTRAL = 3; + */ + const NEUTRAL = 3; + + private static $valueToName = [ + self::SSML_VOICE_GENDER_UNSPECIFIED => 'SSML_VOICE_GENDER_UNSPECIFIED', + self::MALE => 'MALE', + self::FEMALE => 'FEMALE', + self::NEUTRAL => 'NEUTRAL', + ]; + + 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/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php new file mode 100644 index 000000000000..c533cb8c4c2a --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php @@ -0,0 +1,84 @@ +google.cloud.texttospeech.v1.StreamingSynthesisInput + */ +class StreamingSynthesisInput extends \Google\Protobuf\Internal\Message +{ + protected $input_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The raw text to be synthesized. It is recommended that each input + * contains complete, terminating sentences, as this will likely result in + * better prosody in the output audio. That being said, users are free to + * input text however they please. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The raw text to be synthesized. It is recommended that each input + * contains complete, terminating sentences, as this will likely result in + * better prosody in the output audio. That being said, users are free to + * input text however they please. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * The raw text to be synthesized. It is recommended that each input + * contains complete, terminating sentences, as this will likely result in + * better prosody in the output audio. That being said, users are free to + * input text however they please. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getInputSource() + { + return $this->whichOneof("input_source"); + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php new file mode 100644 index 000000000000..85db9a292704 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php @@ -0,0 +1,77 @@ +google.cloud.texttospeech.v1.StreamingSynthesizeConfig + */ +class StreamingSynthesizeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $voice = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice + * Required. The desired voice of the synthesized audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null + */ + public function getVoice() + { + return $this->voice; + } + + public function hasVoice() + { + return isset($this->voice); + } + + public function clearVoice() + { + unset($this->voice); + } + + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php new file mode 100644 index 000000000000..a6eed7b698ac --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php @@ -0,0 +1,118 @@ +google.cloud.texttospeech.v1.StreamingSynthesizeRequest + */ +class StreamingSynthesizeRequest extends \Google\Protobuf\Internal\Message +{ + protected $streaming_request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig $streaming_config + * StreamingSynthesizeConfig to be used in this streaming attempt. Only + * specified in the first message sent in a `StreamingSynthesize` call. + * @type \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput $input + * Input to synthesize. Specified in all messages but the first in a + * `StreamingSynthesize` call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * StreamingSynthesizeConfig to be used in this streaming attempt. Only + * specified in the first message sent in a `StreamingSynthesize` call. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesizeConfig streaming_config = 1; + * @return \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig|null + */ + public function getStreamingConfig() + { + return $this->readOneof(1); + } + + public function hasStreamingConfig() + { + return $this->hasOneof(1); + } + + /** + * StreamingSynthesizeConfig to be used in this streaming attempt. Only + * specified in the first message sent in a `StreamingSynthesize` call. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesizeConfig streaming_config = 1; + * @param \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig $var + * @return $this + */ + public function setStreamingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Input to synthesize. Specified in all messages but the first in a + * `StreamingSynthesize` call. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesisInput input = 2; + * @return \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput|null + */ + public function getInput() + { + return $this->readOneof(2); + } + + public function hasInput() + { + return $this->hasOneof(2); + } + + /** + * Input to synthesize. Specified in all messages but the first in a + * `StreamingSynthesize` call. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesisInput input = 2; + * @param \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getStreamingRequest() + { + return $this->whichOneof("streaming_request"); + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php new file mode 100644 index 000000000000..34eb029802fd --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php @@ -0,0 +1,73 @@ +google.cloud.texttospeech.v1.StreamingSynthesizeResponse + */ +class StreamingSynthesizeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The audio data bytes encoded as specified in the request. This is + * headerless LINEAR16 audio with a sample rate of 24000. + * + * Generated from protobuf field bytes audio_content = 1; + */ + protected $audio_content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $audio_content + * The audio data bytes encoded as specified in the request. This is + * headerless LINEAR16 audio with a sample rate of 24000. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The audio data bytes encoded as specified in the request. This is + * headerless LINEAR16 audio with a sample rate of 24000. + * + * Generated from protobuf field bytes audio_content = 1; + * @return string + */ + public function getAudioContent() + { + return $this->audio_content; + } + + /** + * The audio data bytes encoded as specified in the request. This is + * headerless LINEAR16 audio with a sample rate of 24000. + * + * Generated from protobuf field bytes audio_content = 1; + * @param string $var + * @return $this + */ + public function setAudioContent($var) + { + GPBUtil::checkString($var, False); + $this->audio_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php new file mode 100644 index 000000000000..35aa6a12b35e --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php @@ -0,0 +1,239 @@ +google.cloud.texttospeech.v1.SynthesisInput + */ +class SynthesisInput extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The pronunciation customizations to be applied to the input. If + * this is set, the input will be synthesized using the given pronunciation + * customizations. + * The initial support will be for EFIGS (English, French, + * Italian, German, Spanish) languages, as provided in + * VoiceSelectionParams. Journey and Instant Clone voices are + * not supported yet. + * In order to customize the pronunciation of a phrase, there must be an exact + * match of the phrase in the input types. If using SSML, the phrase must not + * be inside a phoneme tag (entirely or partially). + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomPronunciations custom_pronunciations = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_pronunciations = null; + protected $input_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The raw text to be synthesized. + * @type string $ssml + * The SSML document to be synthesized. The SSML document must be valid + * and well-formed. Otherwise the RPC will fail and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + * more information, see + * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). + * @type \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup $multi_speaker_markup + * The multi-speaker input to be synthesized. Only applicable for + * multi-speaker synthesis. + * @type \Google\Cloud\TextToSpeech\V1\CustomPronunciations $custom_pronunciations + * Optional. The pronunciation customizations to be applied to the input. If + * this is set, the input will be synthesized using the given pronunciation + * customizations. + * The initial support will be for EFIGS (English, French, + * Italian, German, Spanish) languages, as provided in + * VoiceSelectionParams. Journey and Instant Clone voices are + * not supported yet. + * In order to customize the pronunciation of a phrase, there must be an exact + * match of the phrase in the input types. If using SSML, the phrase must not + * be inside a phoneme tag (entirely or partially). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The raw text to be synthesized. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * The raw text to be synthesized. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The SSML document to be synthesized. The SSML document must be valid + * and well-formed. Otherwise the RPC will fail and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + * more information, see + * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). + * + * Generated from protobuf field string ssml = 2; + * @return string + */ + public function getSsml() + { + return $this->readOneof(2); + } + + public function hasSsml() + { + return $this->hasOneof(2); + } + + /** + * The SSML document to be synthesized. The SSML document must be valid + * and well-formed. Otherwise the RPC will fail and return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + * more information, see + * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). + * + * Generated from protobuf field string ssml = 2; + * @param string $var + * @return $this + */ + public function setSsml($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The multi-speaker input to be synthesized. Only applicable for + * multi-speaker synthesis. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.MultiSpeakerMarkup multi_speaker_markup = 4; + * @return \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup|null + */ + public function getMultiSpeakerMarkup() + { + return $this->readOneof(4); + } + + public function hasMultiSpeakerMarkup() + { + return $this->hasOneof(4); + } + + /** + * The multi-speaker input to be synthesized. Only applicable for + * multi-speaker synthesis. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.MultiSpeakerMarkup multi_speaker_markup = 4; + * @param \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup $var + * @return $this + */ + public function setMultiSpeakerMarkup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. The pronunciation customizations to be applied to the input. If + * this is set, the input will be synthesized using the given pronunciation + * customizations. + * The initial support will be for EFIGS (English, French, + * Italian, German, Spanish) languages, as provided in + * VoiceSelectionParams. Journey and Instant Clone voices are + * not supported yet. + * In order to customize the pronunciation of a phrase, there must be an exact + * match of the phrase in the input types. If using SSML, the phrase must not + * be inside a phoneme tag (entirely or partially). + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomPronunciations custom_pronunciations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\TextToSpeech\V1\CustomPronunciations|null + */ + public function getCustomPronunciations() + { + return $this->custom_pronunciations; + } + + public function hasCustomPronunciations() + { + return isset($this->custom_pronunciations); + } + + public function clearCustomPronunciations() + { + unset($this->custom_pronunciations); + } + + /** + * Optional. The pronunciation customizations to be applied to the input. If + * this is set, the input will be synthesized using the given pronunciation + * customizations. + * The initial support will be for EFIGS (English, French, + * Italian, German, Spanish) languages, as provided in + * VoiceSelectionParams. Journey and Instant Clone voices are + * not supported yet. + * In order to customize the pronunciation of a phrase, there must be an exact + * match of the phrase in the input types. If using SSML, the phrase must not + * be inside a phoneme tag (entirely or partially). + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomPronunciations custom_pronunciations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\TextToSpeech\V1\CustomPronunciations $var + * @return $this + */ + public function setCustomPronunciations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\CustomPronunciations::class); + $this->custom_pronunciations = $var; + + return $this; + } + + /** + * @return string + */ + public function getInputSource() + { + return $this->whichOneof("input_source"); + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php new file mode 100644 index 000000000000..ab9407b4e614 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php @@ -0,0 +1,162 @@ +google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata + */ +class SynthesizeLongAudioMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Deprecated. Do not use. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [deprecated = true]; + * @deprecated + */ + protected $last_update_time = null; + /** + * The progress of the most recent processing update in percentage, ie. 70.0%. + * + * Generated from protobuf field double progress_percentage = 3; + */ + protected $progress_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Time when the request was received. + * @type \Google\Protobuf\Timestamp $last_update_time + * Deprecated. Do not use. + * @type float $progress_percentage + * The progress of the most recent processing update in percentage, ie. 70.0%. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); + parent::__construct($data); + } + + /** + * Time when the request was received. + * + * 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); + } + + /** + * Time when the request was received. + * + * 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; + } + + /** + * Deprecated. Do not use. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [deprecated = true]; + * @return \Google\Protobuf\Timestamp|null + * @deprecated + */ + public function getLastUpdateTime() + { + @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); + unset($this->last_update_time); + } + + /** + * Deprecated. Do not use. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [deprecated = true]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + * @deprecated + */ + public function setLastUpdateTime($var) + { + @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * The progress of the most recent processing update in percentage, ie. 70.0%. + * + * Generated from protobuf field double progress_percentage = 3; + * @return float + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + /** + * The progress of the most recent processing update in percentage, ie. 70.0%. + * + * Generated from protobuf field double progress_percentage = 3; + * @param float $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkDouble($var); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php new file mode 100644 index 000000000000..951eaaae4f4d --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php @@ -0,0 +1,246 @@ +google.cloud.texttospeech.v1.SynthesizeLongAudioRequest + */ +class SynthesizeLongAudioRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource states of the request in the form of + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_config = null; + /** + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * + * Generated from protobuf field string output_gcs_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_gcs_uri = ''; + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $voice = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The resource states of the request in the form of + * `projects/*/locations/*`. + * @type \Google\Cloud\TextToSpeech\V1\SynthesisInput $input + * Required. The Synthesizer requires either plain text or SSML as input. + * @type \Google\Cloud\TextToSpeech\V1\AudioConfig $audio_config + * Required. The configuration of the synthesized audio. + * @type string $output_gcs_uri + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice + * Required. The desired voice of the synthesized audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); + parent::__construct($data); + } + + /** + * The resource states of the request in the form of + * `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The resource states of the request in the form of + * `projects/*/locations/*`. + * + * 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; + } + + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\SynthesisInput|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); + $this->input = $var; + + return $this; + } + + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\AudioConfig|null + */ + public function getAudioConfig() + { + return $this->audio_config; + } + + public function hasAudioConfig() + { + return isset($this->audio_config); + } + + public function clearAudioConfig() + { + unset($this->audio_config); + } + + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $var + * @return $this + */ + public function setAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); + $this->audio_config = $var; + + return $this; + } + + /** + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * + * Generated from protobuf field string output_gcs_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOutputGcsUri() + { + return $this->output_gcs_uri; + } + + /** + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * + * Generated from protobuf field string output_gcs_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOutputGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->output_gcs_uri = $var; + + return $this; + } + + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null + */ + public function getVoice() + { + return $this->voice; + } + + public function hasVoice() + { + return isset($this->voice); + } + + public function clearVoice() + { + unset($this->voice); + } + + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); + $this->voice = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php new file mode 100644 index 000000000000..e1a3d25b4131 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php @@ -0,0 +1,33 @@ +google.cloud.texttospeech.v1.SynthesizeLongAudioResponse + */ +class SynthesizeLongAudioResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php new file mode 100644 index 000000000000..ee0e47f31fe5 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php @@ -0,0 +1,226 @@ +google.cloud.texttospeech.v1.SynthesizeSpeechRequest + */ +class SynthesizeSpeechRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $voice = null; + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_config = null; + /** + * Advanced voice options. + * + * Generated from protobuf field optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + */ + protected $advanced_voice_options = null; + + /** + * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. + * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice Required. The desired voice of the synthesized audio. + * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $audioConfig Required. The configuration of the synthesized audio. + * + * @return \Google\Cloud\TextToSpeech\V1\SynthesizeSpeechRequest + * + * @experimental + */ + public static function build(\Google\Cloud\TextToSpeech\V1\SynthesisInput $input, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice, \Google\Cloud\TextToSpeech\V1\AudioConfig $audioConfig): self + { + return (new self()) + ->setInput($input) + ->setVoice($voice) + ->setAudioConfig($audioConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\TextToSpeech\V1\SynthesisInput $input + * Required. The Synthesizer requires either plain text or SSML as input. + * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice + * Required. The desired voice of the synthesized audio. + * @type \Google\Cloud\TextToSpeech\V1\AudioConfig $audio_config + * Required. The configuration of the synthesized audio. + * @type \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions $advanced_voice_options + * Advanced voice options. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\SynthesisInput|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The Synthesizer requires either plain text or SSML as input. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); + $this->input = $var; + + return $this; + } + + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null + */ + public function getVoice() + { + return $this->voice; + } + + public function hasVoice() + { + return isset($this->voice); + } + + public function clearVoice() + { + unset($this->voice); + } + + /** + * Required. The desired voice of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var + * @return $this + */ + public function setVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); + $this->voice = $var; + + return $this; + } + + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\TextToSpeech\V1\AudioConfig|null + */ + public function getAudioConfig() + { + return $this->audio_config; + } + + public function hasAudioConfig() + { + return isset($this->audio_config); + } + + public function clearAudioConfig() + { + unset($this->audio_config); + } + + /** + * Required. The configuration of the synthesized audio. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $var + * @return $this + */ + public function setAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); + $this->audio_config = $var; + + return $this; + } + + /** + * Advanced voice options. + * + * Generated from protobuf field optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * @return \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions|null + */ + public function getAdvancedVoiceOptions() + { + return $this->advanced_voice_options; + } + + public function hasAdvancedVoiceOptions() + { + return isset($this->advanced_voice_options); + } + + public function clearAdvancedVoiceOptions() + { + unset($this->advanced_voice_options); + } + + /** + * Advanced voice options. + * + * Generated from protobuf field optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; + * @param \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions $var + * @return $this + */ + public function setAdvancedVoiceOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions::class); + $this->advanced_voice_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php new file mode 100644 index 000000000000..bfe3329eb5e2 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php @@ -0,0 +1,83 @@ +google.cloud.texttospeech.v1.SynthesizeSpeechResponse + */ +class SynthesizeSpeechResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The audio data bytes encoded as specified in the request, including the + * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + * For LINEAR16 audio, we include the WAV header. Note: as + * with all bytes fields, protobuffers use a pure binary representation, + * whereas JSON representations use base64. + * + * Generated from protobuf field bytes audio_content = 1; + */ + protected $audio_content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $audio_content + * The audio data bytes encoded as specified in the request, including the + * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + * For LINEAR16 audio, we include the WAV header. Note: as + * with all bytes fields, protobuffers use a pure binary representation, + * whereas JSON representations use base64. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The audio data bytes encoded as specified in the request, including the + * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + * For LINEAR16 audio, we include the WAV header. Note: as + * with all bytes fields, protobuffers use a pure binary representation, + * whereas JSON representations use base64. + * + * Generated from protobuf field bytes audio_content = 1; + * @return string + */ + public function getAudioContent() + { + return $this->audio_content; + } + + /** + * The audio data bytes encoded as specified in the request, including the + * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + * For LINEAR16 audio, we include the WAV header. Note: as + * with all bytes fields, protobuffers use a pure binary representation, + * whereas JSON representations use base64. + * + * Generated from protobuf field bytes audio_content = 1; + * @param string $var + * @return $this + */ + public function setAudioContent($var) + { + GPBUtil::checkString($var, False); + $this->audio_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php new file mode 100644 index 000000000000..f53642965390 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php @@ -0,0 +1,177 @@ +google.cloud.texttospeech.v1.Voice + */ +class Voice extends \Google\Protobuf\Internal\Message +{ + /** + * The languages that this voice supports, expressed as + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + * "en-US", "es-419", "cmn-tw"). + * + * Generated from protobuf field repeated string language_codes = 1; + */ + private $language_codes; + /** + * The name of this voice. Each distinct voice has a unique name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The gender of this voice. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; + */ + protected $ssml_gender = 0; + /** + * The natural sample rate (in hertz) for this voice. + * + * Generated from protobuf field int32 natural_sample_rate_hertz = 4; + */ + protected $natural_sample_rate_hertz = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes + * The languages that this voice supports, expressed as + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + * "en-US", "es-419", "cmn-tw"). + * @type string $name + * The name of this voice. Each distinct voice has a unique name. + * @type int $ssml_gender + * The gender of this voice. + * @type int $natural_sample_rate_hertz + * The natural sample rate (in hertz) for this voice. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * The languages that this voice supports, expressed as + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + * "en-US", "es-419", "cmn-tw"). + * + * Generated from protobuf field repeated string language_codes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageCodes() + { + return $this->language_codes; + } + + /** + * The languages that this voice supports, expressed as + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + * "en-US", "es-419", "cmn-tw"). + * + * Generated from protobuf field repeated string language_codes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_codes = $arr; + + return $this; + } + + /** + * The name of this voice. Each distinct voice has a unique name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this voice. Each distinct voice has a unique name. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The gender of this voice. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; + * @return int + */ + public function getSsmlGender() + { + return $this->ssml_gender; + } + + /** + * The gender of this voice. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; + * @param int $var + * @return $this + */ + public function setSsmlGender($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\SsmlVoiceGender::class); + $this->ssml_gender = $var; + + return $this; + } + + /** + * The natural sample rate (in hertz) for this voice. + * + * Generated from protobuf field int32 natural_sample_rate_hertz = 4; + * @return int + */ + public function getNaturalSampleRateHertz() + { + return $this->natural_sample_rate_hertz; + } + + /** + * The natural sample rate (in hertz) for this voice. + * + * Generated from protobuf field int32 natural_sample_rate_hertz = 4; + * @param int $var + * @return $this + */ + public function setNaturalSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->natural_sample_rate_hertz = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php new file mode 100644 index 000000000000..83d52d421f52 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php @@ -0,0 +1,67 @@ +google.cloud.texttospeech.v1.VoiceCloneParams + */ +class VoiceCloneParams extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Created by GenerateVoiceCloningKey. + * + * Generated from protobuf field string voice_cloning_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $voice_cloning_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $voice_cloning_key + * Required. Created by GenerateVoiceCloningKey. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. Created by GenerateVoiceCloningKey. + * + * Generated from protobuf field string voice_cloning_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVoiceCloningKey() + { + return $this->voice_cloning_key; + } + + /** + * Required. Created by GenerateVoiceCloningKey. + * + * Generated from protobuf field string voice_cloning_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVoiceCloningKey($var) + { + GPBUtil::checkString($var, True); + $this->voice_cloning_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php new file mode 100644 index 000000000000..5ccf9c11db9b --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php @@ -0,0 +1,303 @@ +google.cloud.texttospeech.v1.VoiceSelectionParams + */ +class VoiceSelectionParams extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use + * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + * from the input provided in the SynthesisInput. The TTS service + * will use this parameter to help choose an appropriate voice. Note that + * the TTS service may choose a voice with a slightly different language code + * than the one selected; it may substitute a different region + * (e.g. using en-US rather than en-CA if there isn't a Canadian voice + * available), or even a different language, e.g. using "nb" (Norwegian + * Bokmal) instead of "no" (Norwegian)". + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + /** + * The name of the voice. If both the name and the gender are not set, + * the service will choose a voice based on the other parameters such as + * language_code. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * name. Note that this is only a preference, not requirement; if a + * voice of the appropriate gender is not available, the synthesizer should + * substitute a voice with a different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; + */ + protected $ssml_gender = 0; + /** + * The configuration for a custom voice. If [CustomVoiceParams.model] is set, + * the service will choose the custom voice matching the specified + * configuration. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4; + */ + protected $custom_voice = null; + /** + * Optional. The configuration for a voice clone. If + * [VoiceCloneParams.voice_clone_key] is set, the service will choose the + * voice clone matching the specified configuration. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $voice_clone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use + * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + * from the input provided in the SynthesisInput. The TTS service + * will use this parameter to help choose an appropriate voice. Note that + * the TTS service may choose a voice with a slightly different language code + * than the one selected; it may substitute a different region + * (e.g. using en-US rather than en-CA if there isn't a Canadian voice + * available), or even a different language, e.g. using "nb" (Norwegian + * Bokmal) instead of "no" (Norwegian)". + * @type string $name + * The name of the voice. If both the name and the gender are not set, + * the service will choose a voice based on the other parameters such as + * language_code. + * @type int $ssml_gender + * The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * name. Note that this is only a preference, not requirement; if a + * voice of the appropriate gender is not available, the synthesizer should + * substitute a voice with a different gender rather than failing the request. + * @type \Google\Cloud\TextToSpeech\V1\CustomVoiceParams $custom_voice + * The configuration for a custom voice. If [CustomVoiceParams.model] is set, + * the service will choose the custom voice matching the specified + * configuration. + * @type \Google\Cloud\TextToSpeech\V1\VoiceCloneParams $voice_clone + * Optional. The configuration for a voice clone. If + * [VoiceCloneParams.voice_clone_key] is set, the service will choose the + * voice clone matching the specified configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); + parent::__construct($data); + } + + /** + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use + * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + * from the input provided in the SynthesisInput. The TTS service + * will use this parameter to help choose an appropriate voice. Note that + * the TTS service may choose a voice with a slightly different language code + * than the one selected; it may substitute a different region + * (e.g. using en-US rather than en-CA if there isn't a Canadian voice + * available), or even a different language, e.g. using "nb" (Norwegian + * Bokmal) instead of "no" (Norwegian)". + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. The language (and potentially also the region) of the voice + * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag, e.g. "en-US". This should not include a script tag (e.g. use + * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + * from the input provided in the SynthesisInput. The TTS service + * will use this parameter to help choose an appropriate voice. Note that + * the TTS service may choose a voice with a slightly different language code + * than the one selected; it may substitute a different region + * (e.g. using en-US rather than en-CA if there isn't a Canadian voice + * available), or even a different language, e.g. using "nb" (Norwegian + * Bokmal) instead of "no" (Norwegian)". + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The name of the voice. If both the name and the gender are not set, + * the service will choose a voice based on the other parameters such as + * language_code. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the voice. If both the name and the gender are not set, + * the service will choose a voice based on the other parameters such as + * language_code. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * name. Note that this is only a preference, not requirement; if a + * voice of the appropriate gender is not available, the synthesizer should + * substitute a voice with a different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; + * @return int + */ + public function getSsmlGender() + { + return $this->ssml_gender; + } + + /** + * The preferred gender of the voice. If not set, the service will + * choose a voice based on the other parameters such as language_code and + * name. Note that this is only a preference, not requirement; if a + * voice of the appropriate gender is not available, the synthesizer should + * substitute a voice with a different gender rather than failing the request. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; + * @param int $var + * @return $this + */ + public function setSsmlGender($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\SsmlVoiceGender::class); + $this->ssml_gender = $var; + + return $this; + } + + /** + * The configuration for a custom voice. If [CustomVoiceParams.model] is set, + * the service will choose the custom voice matching the specified + * configuration. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4; + * @return \Google\Cloud\TextToSpeech\V1\CustomVoiceParams|null + */ + public function getCustomVoice() + { + return $this->custom_voice; + } + + public function hasCustomVoice() + { + return isset($this->custom_voice); + } + + public function clearCustomVoice() + { + unset($this->custom_voice); + } + + /** + * The configuration for a custom voice. If [CustomVoiceParams.model] is set, + * the service will choose the custom voice matching the specified + * configuration. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4; + * @param \Google\Cloud\TextToSpeech\V1\CustomVoiceParams $var + * @return $this + */ + public function setCustomVoice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\CustomVoiceParams::class); + $this->custom_voice = $var; + + return $this; + } + + /** + * Optional. The configuration for a voice clone. If + * [VoiceCloneParams.voice_clone_key] is set, the service will choose the + * voice clone matching the specified configuration. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\TextToSpeech\V1\VoiceCloneParams|null + */ + public function getVoiceClone() + { + return $this->voice_clone; + } + + public function hasVoiceClone() + { + return isset($this->voice_clone); + } + + public function clearVoiceClone() + { + unset($this->voice_clone); + } + + /** + * Optional. The configuration for a voice clone. If + * [VoiceCloneParams.voice_clone_key] is set, the service will choose the + * voice clone matching the specified configuration. + * + * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\TextToSpeech\V1\VoiceCloneParams $var + * @return $this + */ + public function setVoiceClone($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceCloneParams::class); + $this->voice_clone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php new file mode 100644 index 000000000000..2a4357540ab2 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php @@ -0,0 +1,57 @@ +listVoices($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END texttospeech_v1_generated_TextToSpeech_ListVoices_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php new file mode 100644 index 000000000000..47a97cf434aa --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php @@ -0,0 +1,64 @@ +streamingSynthesize(); + $stream->writeAll([$request,]); + + /** @var StreamingSynthesizeResponse $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 texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php new file mode 100644 index 000000000000..f6bac9ae2c38 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php @@ -0,0 +1,94 @@ +setLanguageCode($voiceLanguageCode); + $audioConfig = (new AudioConfig()) + ->setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeSpeechRequest()) + ->setInput($input) + ->setVoice($voice) + ->setAudioConfig($audioConfig); + + // Call the API and handle any network failures. + try { + /** @var SynthesizeSpeechResponse $response */ + $response = $textToSpeechClient->synthesizeSpeech($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 +{ + $voiceLanguageCode = '[LANGUAGE_CODE]'; + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + + synthesize_speech_sample($voiceLanguageCode, $audioConfigAudioEncoding); +} +// [END texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php new file mode 100644 index 000000000000..cf9eaa3f258c --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php @@ -0,0 +1,89 @@ +setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeLongAudioRequest()) + ->setInput($input) + ->setAudioConfig($audioConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SynthesizeLongAudioResponse $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 +{ + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + + synthesize_long_audio_sample($audioConfigAudioEncoding); +} +// [END texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php new file mode 100644 index 000000000000..f3436bc8dc84 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php @@ -0,0 +1,292 @@ + listVoicesAsync(ListVoicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface synthesizeSpeechAsync(SynthesizeSpeechRequest $request, array $optionalArgs = []) + */ +final class TextToSpeechClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeech'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.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/text_to_speech_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName(string $project, string $location, string $model): string + { + return self::getPathTemplate('model')->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - model: projects/{project}/locations/{location}/models/{model} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'texttospeech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Returns a list of Voice supported for synthesis. + * + * The async variant is {@see TextToSpeechClient::listVoicesAsync()} . + * + * @example samples/V1/TextToSpeechClient/list_voices.php + * + * @param ListVoicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListVoicesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVoices(ListVoicesRequest $request, array $callOptions = []): ListVoicesResponse + { + return $this->startApiCall('ListVoices', $request, $callOptions)->wait(); + } + + /** + * Performs bidirectional streaming speech synthesis: receive audio while + * sending text. + * + * @example samples/V1/TextToSpeechClient/streaming_synthesize.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 streamingSynthesize(array $callOptions = []): BidiStream + { + return $this->startApiCall('StreamingSynthesize', null, $callOptions); + } + + /** + * Synthesizes speech synchronously: receive results after all text input + * has been processed. + * + * The async variant is {@see TextToSpeechClient::synthesizeSpeechAsync()} . + * + * @example samples/V1/TextToSpeechClient/synthesize_speech.php + * + * @param SynthesizeSpeechRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SynthesizeSpeechResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function synthesizeSpeech(SynthesizeSpeechRequest $request, array $callOptions = []): SynthesizeSpeechResponse + { + return $this->startApiCall('SynthesizeSpeech', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php new file mode 100644 index 000000000000..63a91697a5d0 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php @@ -0,0 +1,274 @@ + synthesizeLongAudioAsync(SynthesizeLongAudioRequest $request, array $optionalArgs = []) + */ +final class TextToSpeechLongAudioSynthesizeClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.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/text_to_speech_long_audio_synthesize_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName(string $project, string $location, string $model): string + { + return self::getPathTemplate('model')->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - model: projects/{project}/locations/{location}/models/{model} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'texttospeech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Synthesizes long form text asynchronously. + * + * The async variant is + * {@see TextToSpeechLongAudioSynthesizeClient::synthesizeLongAudioAsync()} . + * + * @example samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php + * + * @param SynthesizeLongAudioRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 synthesizeLongAudio(SynthesizeLongAudioRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SynthesizeLongAudio', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php new file mode 100644 index 000000000000..755f6b2fc575 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php @@ -0,0 +1,412 @@ +listVoices(); + * } finally { + * $textToSpeechClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\TextToSpeech\V1\Client\TextToSpeechClient}. + */ +class TextToSpeechGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeech'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $modelNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/text_to_speech_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_rest_client_config.php', + ], + ], + ]; + } + + private static function getModelNameTemplate() + { + if (self::$modelNameTemplate == null) { + self::$modelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/models/{model}'); + } + + return self::$modelNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'model' => self::getModelNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName($project, $location, $model) + { + return self::getModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - model: projects/{project}/locations/{location}/models/{model} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'texttospeech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Returns a list of Voice supported for synthesis. + * + * Sample code: + * ``` + * $textToSpeechClient = new TextToSpeechClient(); + * try { + * $response = $textToSpeechClient->listVoices(); + * } finally { + * $textToSpeechClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $languageCode + * Optional. Recommended. + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * If not specified, the API will return all supported voices. + * If specified, the ListVoices call will only return voices that can be used + * to synthesize this language_code. For example, if you specify `"en-NZ"`, + * all `"en-NZ"` voices will be returned. If you specify `"no"`, both + * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + * returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\TextToSpeech\V1\ListVoicesResponse + * + * @throws ApiException if the remote call fails + */ + public function listVoices(array $optionalArgs = []) + { + $request = new ListVoicesRequest(); + if (isset($optionalArgs['languageCode'])) { + $request->setLanguageCode($optionalArgs['languageCode']); + } + + return $this->startCall('ListVoices', ListVoicesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Performs bidirectional streaming speech synthesis: receive audio while + * sending text. + * + * Sample code: + * ``` + * $textToSpeechClient = new TextToSpeechClient(); + * try { + * $request = new StreamingSynthesizeRequest(); + * // Write all requests to the server, then read all responses until the + * // stream is complete + * $requests = [ + * $request, + * ]; + * $stream = $textToSpeechClient->streamingSynthesize(); + * $stream->writeAll($requests); + * foreach ($stream->closeWriteAndReadAll() as $element) { + * // doSomethingWith($element); + * } + * // Alternatively: + * // Write requests individually, making read() calls if + * // required. Call closeWrite() once writes are complete, and read the + * // remaining responses from the server. + * $requests = [ + * $request, + * ]; + * $stream = $textToSpeechClient->streamingSynthesize(); + * foreach ($requests as $request) { + * $stream->write($request); + * // if required, read a single response from the stream + * $element = $stream->read(); + * // doSomethingWith($element) + * } + * $stream->closeWrite(); + * $element = $stream->read(); + * while (!is_null($element)) { + * // doSomethingWith($element) + * $element = $stream->read(); + * } + * } finally { + * $textToSpeechClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\BidiStream + * + * @throws ApiException if the remote call fails + */ + public function streamingSynthesize(array $optionalArgs = []) + { + return $this->startCall('StreamingSynthesize', StreamingSynthesizeResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); + } + + /** + * Synthesizes speech synchronously: receive results after all text input + * has been processed. + * + * Sample code: + * ``` + * $textToSpeechClient = new TextToSpeechClient(); + * try { + * $input = new SynthesisInput(); + * $voice = new VoiceSelectionParams(); + * $audioConfig = new AudioConfig(); + * $response = $textToSpeechClient->synthesizeSpeech($input, $voice, $audioConfig); + * } finally { + * $textToSpeechClient->close(); + * } + * ``` + * + * @param SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. + * @param VoiceSelectionParams $voice Required. The desired voice of the synthesized audio. + * @param AudioConfig $audioConfig Required. The configuration of the synthesized audio. + * @param array $optionalArgs { + * Optional. + * + * @type AdvancedVoiceOptions $advancedVoiceOptions + * Advanced voice options. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\TextToSpeech\V1\SynthesizeSpeechResponse + * + * @throws ApiException if the remote call fails + */ + public function synthesizeSpeech($input, $voice, $audioConfig, array $optionalArgs = []) + { + $request = new SynthesizeSpeechRequest(); + $request->setInput($input); + $request->setVoice($voice); + $request->setAudioConfig($audioConfig); + if (isset($optionalArgs['advancedVoiceOptions'])) { + $request->setAdvancedVoiceOptions($optionalArgs['advancedVoiceOptions']); + } + + return $this->startCall('SynthesizeSpeech', SynthesizeSpeechResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php new file mode 100644 index 000000000000..17fc72e734fa --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php @@ -0,0 +1,403 @@ +synthesizeLongAudio($input, $audioConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $textToSpeechLongAudioSynthesizeClient->resumeOperation($operationName, 'synthesizeLongAudio'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $textToSpeechLongAudioSynthesizeClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\TextToSpeech\V1\Client\TextToSpeechLongAudioSynthesizeClient}. + */ +class TextToSpeechLongAudioSynthesizeGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $modelNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_rest_client_config.php', + ], + ], + ]; + } + + private static function getModelNameTemplate() + { + if (self::$modelNameTemplate == null) { + self::$modelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/models/{model}'); + } + + return self::$modelNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'model' => self::getModelNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName($project, $location, $model) + { + return self::getModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - model: projects/{project}/locations/{location}/models/{model} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'texttospeech.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Synthesizes long form text asynchronously. + * + * Sample code: + * ``` + * $textToSpeechLongAudioSynthesizeClient = new TextToSpeechLongAudioSynthesizeClient(); + * try { + * $input = new SynthesisInput(); + * $audioConfig = new AudioConfig(); + * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $textToSpeechLongAudioSynthesizeClient->resumeOperation($operationName, 'synthesizeLongAudio'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $textToSpeechLongAudioSynthesizeClient->close(); + * } + * ``` + * + * @param SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. + * @param AudioConfig $audioConfig Required. The configuration of the synthesized audio. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * The resource states of the request in the form of + * `projects/*/locations/*`. + * @type string $outputGcsUri + * Required. Specifies a Cloud Storage URI for the synthesis results. Must be + * specified in the format: `gs://bucket_name/object_name`, and the bucket + * must already exist. + * @type VoiceSelectionParams $voice + * Required. The desired voice of the synthesized audio. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function synthesizeLongAudio($input, $audioConfig, array $optionalArgs = []) + { + $request = new SynthesizeLongAudioRequest(); + $requestParamHeaders = []; + $request->setInput($input); + $request->setAudioConfig($audioConfig); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['outputGcsUri'])) { + $request->setOutputGcsUri($optionalArgs['outputGcsUri']); + } + + if (isset($optionalArgs['voice'])) { + $request->setVoice($optionalArgs['voice']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('SynthesizeLongAudio', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php new file mode 100644 index 000000000000..0942280d0856 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.texttospeech.v1.TextToSpeech' => [ + 'ListVoices' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TextToSpeech\V1\ListVoicesResponse', + ], + 'StreamingSynthesize' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\TextToSpeech\V1\StreamingSynthesizeResponse', + ], + 'SynthesizeSpeech' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\TextToSpeech\V1\SynthesizeSpeechResponse', + ], + 'templateMap' => [ + 'model' => 'projects/{project}/locations/{location}/models/{model}', + ], + ], + ], +]; diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json new file mode 100644 index 000000000000..1f2cda4e7cf5 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize": { + "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": 5000000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000000, + "total_timeout_millis": 5000000 + } + }, + "methods": { + "SynthesizeLongAudio": { + "timeout_millis": 5000000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php new file mode 100644 index 000000000000..63aa9b8d0232 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php @@ -0,0 +1,50 @@ + [ + 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' => [ + 'SynthesizeLongAudio' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\TextToSpeech\V1\SynthesizeLongAudioResponse', + 'metadataReturnType' => '\Google\Cloud\TextToSpeech\V1\SynthesizeLongAudioMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'model' => 'projects/{project}/locations/{location}/models/{model}', + ], + ], + ], +]; diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php new file mode 100644 index 000000000000..690fa540c6d7 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php @@ -0,0 +1,65 @@ + [ + 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' => [ + 'SynthesizeLongAudio' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:synthesizeLongAudio', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php new file mode 100644 index 000000000000..7014d6557556 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php @@ -0,0 +1,62 @@ + [ + 'google.cloud.texttospeech.v1.TextToSpeech' => [ + 'ListVoices' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/voices', + ], + 'SynthesizeSpeech' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/text:synthesize', + 'body' => '*', + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php new file mode 100644 index 000000000000..f2e456c2a51a --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php @@ -0,0 +1,325 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TextToSpeechClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TextToSpeechClient($options); + } + + /** @test */ + public function listVoicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListVoicesResponse(); + $transport->addResponse($expectedResponse); + $request = new ListVoicesRequest(); + $response = $gapicClient->listVoices($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.texttospeech.v1.TextToSpeech/ListVoices', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVoicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 ListVoicesRequest(); + try { + $gapicClient->listVoices($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function streamingSynthesizeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audioContent = '16'; + $expectedResponse = new StreamingSynthesizeResponse(); + $expectedResponse->setAudioContent($audioContent); + $transport->addResponse($expectedResponse); + $audioContent2 = '-61'; + $expectedResponse2 = new StreamingSynthesizeResponse(); + $expectedResponse2->setAudioContent($audioContent2); + $transport->addResponse($expectedResponse2); + $audioContent3 = '-60'; + $expectedResponse3 = new StreamingSynthesizeResponse(); + $expectedResponse3->setAudioContent($audioContent3); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new StreamingSynthesizeRequest(); + $request2 = new StreamingSynthesizeRequest(); + $request3 = new StreamingSynthesizeRequest(); + $bidi = $gapicClient->streamingSynthesize(); + $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.texttospeech.v1.TextToSpeech/StreamingSynthesize', $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 streamingSynthesizeExceptionTest() + { + $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->streamingSynthesize(); + $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 synthesizeSpeechTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audioContent = '16'; + $expectedResponse = new SynthesizeSpeechResponse(); + $expectedResponse->setAudioContent($audioContent); + $transport->addResponse($expectedResponse); + // Mock request + $input = new SynthesisInput(); + $voice = new VoiceSelectionParams(); + $voiceLanguageCode = 'voiceLanguageCode-686472265'; + $voice->setLanguageCode($voiceLanguageCode); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeSpeechRequest()) + ->setInput($input) + ->setVoice($voice) + ->setAudioConfig($audioConfig); + $response = $gapicClient->synthesizeSpeech($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.texttospeech.v1.TextToSpeech/SynthesizeSpeech', $actualFuncCall); + $actualValue = $actualRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualRequestObject->getVoice(); + $this->assertProtobufEquals($voice, $actualValue); + $actualValue = $actualRequestObject->getAudioConfig(); + $this->assertProtobufEquals($audioConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function synthesizeSpeechExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $input = new SynthesisInput(); + $voice = new VoiceSelectionParams(); + $voiceLanguageCode = 'voiceLanguageCode-686472265'; + $voice->setLanguageCode($voiceLanguageCode); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeSpeechRequest()) + ->setInput($input) + ->setVoice($voice) + ->setAudioConfig($audioConfig); + try { + $gapicClient->synthesizeSpeech($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVoicesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListVoicesResponse(); + $transport->addResponse($expectedResponse); + $request = new ListVoicesRequest(); + $response = $gapicClient->listVoicesAsync($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.texttospeech.v1.TextToSpeech/ListVoices', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php new file mode 100644 index 000000000000..ca56e0e2c179 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php @@ -0,0 +1,270 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TextToSpeechLongAudioSynthesizeClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TextToSpeechLongAudioSynthesizeClient($options); + } + + /** @test */ + public function synthesizeLongAudioTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new SynthesizeLongAudioResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/synthesizeLongAudioTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeLongAudioRequest()) + ->setInput($input) + ->setAudioConfig($audioConfig); + $response = $gapicClient->synthesizeLongAudio($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.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getAudioConfig(); + $this->assertProtobufEquals($audioConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + $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 synthesizeLongAudioExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $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 + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeLongAudioRequest()) + ->setInput($input) + ->setAudioConfig($audioConfig); + $response = $gapicClient->synthesizeLongAudio($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + 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 synthesizeLongAudioAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new SynthesizeLongAudioResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/synthesizeLongAudioTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $request = (new SynthesizeLongAudioRequest()) + ->setInput($input) + ->setAudioConfig($audioConfig); + $response = $gapicClient->synthesizeLongAudioAsync($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.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getAudioConfig(); + $this->assertProtobufEquals($audioConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + $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/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php new file mode 100644 index 000000000000..5692c96e6075 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php @@ -0,0 +1,291 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TextToSpeechClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TextToSpeechClient($options); + } + + /** @test */ + public function listVoicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListVoicesResponse(); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listVoices(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.texttospeech.v1.TextToSpeech/ListVoices', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVoicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listVoices(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function streamingSynthesizeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audioContent = '16'; + $expectedResponse = new StreamingSynthesizeResponse(); + $expectedResponse->setAudioContent($audioContent); + $transport->addResponse($expectedResponse); + $audioContent2 = '-61'; + $expectedResponse2 = new StreamingSynthesizeResponse(); + $expectedResponse2->setAudioContent($audioContent2); + $transport->addResponse($expectedResponse2); + $audioContent3 = '-60'; + $expectedResponse3 = new StreamingSynthesizeResponse(); + $expectedResponse3->setAudioContent($audioContent3); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new StreamingSynthesizeRequest(); + $request2 = new StreamingSynthesizeRequest(); + $request3 = new StreamingSynthesizeRequest(); + $bidi = $gapicClient->streamingSynthesize(); + $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.texttospeech.v1.TextToSpeech/StreamingSynthesize', $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 streamingSynthesizeExceptionTest() + { + $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->streamingSynthesize(); + $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 synthesizeSpeechTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $audioContent = '16'; + $expectedResponse = new SynthesizeSpeechResponse(); + $expectedResponse->setAudioContent($audioContent); + $transport->addResponse($expectedResponse); + // Mock request + $input = new SynthesisInput(); + $voice = new VoiceSelectionParams(); + $voiceLanguageCode = 'voiceLanguageCode-686472265'; + $voice->setLanguageCode($voiceLanguageCode); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $response = $gapicClient->synthesizeSpeech($input, $voice, $audioConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.texttospeech.v1.TextToSpeech/SynthesizeSpeech', $actualFuncCall); + $actualValue = $actualRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualRequestObject->getVoice(); + $this->assertProtobufEquals($voice, $actualValue); + $actualValue = $actualRequestObject->getAudioConfig(); + $this->assertProtobufEquals($audioConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function synthesizeSpeechExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $input = new SynthesisInput(); + $voice = new VoiceSelectionParams(); + $voiceLanguageCode = 'voiceLanguageCode-686472265'; + $voice->setLanguageCode($voiceLanguageCode); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + try { + $gapicClient->synthesizeSpeech($input, $voice, $audioConfig); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php new file mode 100644 index 000000000000..0b386e4c2de0 --- /dev/null +++ b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php @@ -0,0 +1,193 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TextToSpeechLongAudioSynthesizeClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TextToSpeechLongAudioSynthesizeClient($options); + } + + /** @test */ + public function synthesizeLongAudioTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new SynthesizeLongAudioResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/synthesizeLongAudioTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $response = $gapicClient->synthesizeLongAudio($input, $audioConfig); + $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.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getAudioConfig(); + $this->assertProtobufEquals($audioConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + $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 synthesizeLongAudioExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/synthesizeLongAudioTest'); + $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 + $input = new SynthesisInput(); + $audioConfig = new AudioConfig(); + $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; + $audioConfig->setAudioEncoding($audioConfigAudioEncoding); + $response = $gapicClient->synthesizeLongAudio($input, $audioConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Tpu/v1/proto/src/GPBMetadata/Google/Cloud/Tpu/V1/CloudTpu.php b/owl-bot-staging/Tpu/v1/proto/src/GPBMetadata/Google/Cloud/Tpu/V1/CloudTpu.php new file mode 100644 index 0000000000000000000000000000000000000000..e088051a70f0d11c816eb162605a04d233d6f390 GIT binary patch literal 6967 zcmb_h&2QVt6|ba7v7TdFo_xtpvSFDtaoj{&+i8$0o1~OP+iGn|kYsmL7$9hAY;!}C zT#|Cu4SZ=&J@m9d|A4kA&{Ho3dh20bUfiUv z+EHC~XN@o2DY2zHEvvh;z4Q#At*eeB@If4dw;5nrR4ZLCt8>g$IJClgZw-Of>en5MZe@`_cBDis4e*Q1zWM zb=tOOxu#u5(L!OLx;?M4k%b5TwoIM2CoFgv3xy$&&jr`+((vwrU{kki8_zgyrr@Oa zZ70H0lBMlPhG8-^IBQ`^*Qnu+w`NtNdZ$Pa)FaKb$6MNF$C z?XF>H#{N#tVsSa1k-f8PX&7y;dT2!>=4bxsh322I)ampNbQNQLp?3uAK<>jgdAKt| zkdw=vP>yFpjs^eG()@LQrD|!I73=`Kl$gIAn%HArR(5?i`vP+z0o(VbKNY~y`wq*S zJ%QtA+|6H8PVaD)Hb33$EMNP*U~M>1b3>s} zhFKrFLj6N_vR8!!?tV8?!$3rMI6j4x=fdnY+?dx4rZ93|WB* z=NR+CJan=<_c^kgk+w8FDZXm{5ln_bPD0`}J@&I>3X(^v-laS}(uMfbnE3A)BzgRi zt1#PaNiA8~sy6F#sj^y;%bD+BMop9&vec?n*D^7Zh9v$dzskhPG(bbf6%9U>AXAWT z$dyfLjY(c$>&o(m%qNrHWL>H>*kp=K!o_B*RkEu8Ydm*r|^nkm_;`ZF`)uVN_X9rZOJ>$0@bS|6|y z0eR!E(8w%YDa*KRiS2@d!AzXtZdEqr+Ey!*U}C*Fr6pIJwZ`g3?Wbt_99-?sY)X|X z&PvsioJoo`fc`m?8*p8!SCnnJ(X7;}1DMeE?IlIpsIN;)h$;o~?IrX(8(t2E6NSb{ zsRq|s?f2>nhMbc_4wdJH?=fcU7qsm<`M3VJlRVY|ug~S*247F|21XzXv5yn+3&?C} zj>|MS4fsd%!>OSTN@+Gexvr@!|T=O;c>#g`2 zW zM!8*qS&vS22H&VN{VD!32D2qz8`FXD`d~xLAbQ zGIl7JhCz&J$qOJ2svY79g_U6c>^Dj>4tw#QU(O`l!M085shBnc$5n;Wm3BzJePV zKSMhOaZm_DFFxcMa&I)S;vZsgizUL4@?HjhHjsg1=_jM5BUaedo~GkP#3Mb7iJ5kX zB7Hc{rdVQ$U&r8+vw-^PTY}4;`@-I16pbbGy~t!9GJDL-{#^`aq&{zJA#EFoB#bLg z=DaX+KT2PM7!gK;N`5kG5FwEYSR>mVLnt)DdE|+>1#=ib16u^q^Ym2oEb{2NI|@ee zw=uZEj$}Y_FLDY4ku!$w|6knvItDkRLHbei5@rWI7Q{?6YZ@?j%!v6XR-fLTFL*$J zZSEBJW!I5&xi41k2_&l?Q)Z!czBHy6)GRG*zCBO;_qWH8D4V}vdvdW@oJk&>s5V_fFkEZR;6sp zo3#dGXR|Pc{7b2=219X1UFFZ^(iW0eM$gKMN6;?A%%$A7+#f1f;HPqW^7RO@-K_AG{2+oI3b2$GSDKAjt5AjIOM#?l9qHSd7e&EJa zSL=|-h;TnY4=(rY6LE=$<|sG|wnr@su|W2|T7d2fD1sN3HP^|6>A2PzV3hV@+xuCZb=M4KG492pVO!hsblW3BN^*V^gQ z^^`mrrF8X)p-=c7@|PG~!Adn`3;8q>R+MO9NObiX(k#m1au*;!FS3VW=dt#EgUFd@ z2bhR+2J$G;0Qpj+tg@GQJ@&H)UV#lB;^G6AeUra@!X2<y8r+H literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php new file mode 100644 index 000000000000..a83457de33c6 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v1.AcceleratorType + */ +class AcceleratorType extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * the accelerator type. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * @type string $type + * the accelerator type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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 accelerator type. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * the accelerator 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php new file mode 100644 index 000000000000..c64762275f5f --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php @@ -0,0 +1,145 @@ +google.cloud.tpu.v1.CreateNodeRequest + */ +class CreateNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The unqualified resource name. + * + * Generated from protobuf field string node_id = 2; + */ + protected $node_id = ''; + /** + * Required. The node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * @type string $node_id + * The unqualified resource name. + * @type \Google\Cloud\Tpu\V1\Node $node + * Required. The node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 unqualified resource name. + * + * Generated from protobuf field string node_id = 2; + * @return string + */ + public function getNodeId() + { + return $this->node_id; + } + + /** + * The unqualified resource name. + * + * Generated from protobuf field string node_id = 2; + * @param string $var + * @return $this + */ + public function setNodeId($var) + { + GPBUtil::checkString($var, True); + $this->node_id = $var; + + return $this; + } + + /** + * Required. The node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tpu\V1\Node|null + */ + public function getNode() + { + return $this->node; + } + + public function hasNode() + { + return isset($this->node); + } + + public function clearNode() + { + unset($this->node); + } + + /** + * Required. The node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tpu\V1\Node $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V1\Node::class); + $this->node = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php new file mode 100644 index 000000000000..3eb256de47f8 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v1.DeleteNodeRequest + */ +class DeleteNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php new file mode 100644 index 000000000000..30719823c9a2 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v1.GetAcceleratorTypeRequest + */ +class GetAcceleratorTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php new file mode 100644 index 000000000000..baaa8d1d81c0 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v1.GetNodeRequest + */ +class GetNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php new file mode 100644 index 000000000000..f0347012a607 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php @@ -0,0 +1,68 @@ +google.cloud.tpu.v1.GetTensorFlowVersionRequest + */ +class GetTensorFlowVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php new file mode 100644 index 000000000000..606cdb3ac2bd --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php @@ -0,0 +1,204 @@ +google.cloud.tpu.v1.ListAcceleratorTypesRequest + */ +class ListAcceleratorTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * List filter. + * @type string $order_by + * Sort results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * 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; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php new file mode 100644 index 000000000000..cae7e8f79e10 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php @@ -0,0 +1,136 @@ +google.cloud.tpu.v1.ListAcceleratorTypesResponse + */ +class ListAcceleratorTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; + */ + private $accelerator_types; + /** + * The next page token or empty if none. + * + * 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 array<\Google\Cloud\Tpu\V1\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $accelerator_types + * The listed nodes. + * @type string $next_page_token + * The next page token or empty if none. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAcceleratorTypes() + { + return $this->accelerator_types; + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; + * @param array<\Google\Cloud\Tpu\V1\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAcceleratorTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\AcceleratorType::class); + $this->accelerator_types = $arr; + + return $this; + } + + /** + * The next page token or empty if none. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next page token or empty if none. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php new file mode 100644 index 000000000000..95228886da71 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php @@ -0,0 +1,135 @@ +google.cloud.tpu.v1.ListNodesRequest + */ +class ListNodesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php new file mode 100644 index 000000000000..e2c5a0b7462a --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php @@ -0,0 +1,135 @@ +google.cloud.tpu.v1.ListNodesResponse + */ +class ListNodesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.Node nodes = 1; + */ + private $nodes; + /** + * The next page token or empty if none. + * + * 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 array<\Google\Cloud\Tpu\V1\Node>|\Google\Protobuf\Internal\RepeatedField $nodes + * The listed nodes. + * @type string $next_page_token + * The next page token or empty if none. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.Node nodes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.Node nodes = 1; + * @param array<\Google\Cloud\Tpu\V1\Node>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\Node::class); + $this->nodes = $arr; + + return $this; + } + + /** + * The next page token or empty if none. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next page token or empty if none. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php new file mode 100644 index 000000000000..c5f8aee08320 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php @@ -0,0 +1,204 @@ +google.cloud.tpu.v1.ListTensorFlowVersionsRequest + */ +class ListTensorFlowVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * List filter. + * @type string $order_by + * Sort results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * 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; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php new file mode 100644 index 000000000000..0d01cd3d2c6e --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php @@ -0,0 +1,136 @@ +google.cloud.tpu.v1.ListTensorFlowVersionsResponse + */ +class ListTensorFlowVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; + */ + private $tensorflow_versions; + /** + * The next page token or empty if none. + * + * 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 array<\Google\Cloud\Tpu\V1\TensorFlowVersion>|\Google\Protobuf\Internal\RepeatedField $tensorflow_versions + * The listed nodes. + * @type string $next_page_token + * The next page token or empty if none. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTensorflowVersions() + { + return $this->tensorflow_versions; + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; + * @param array<\Google\Cloud\Tpu\V1\TensorFlowVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTensorflowVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\TensorFlowVersion::class); + $this->tensorflow_versions = $arr; + + return $this; + } + + /** + * The next page token or empty if none. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next page token or empty if none. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php new file mode 100644 index 000000000000..815d81fd007a --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v1.NetworkEndpoint + */ +class NetworkEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * The IP address of this network endpoint. + * + * Generated from protobuf field string ip_address = 1; + */ + protected $ip_address = ''; + /** + * The port of this network endpoint. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * The IP address of this network endpoint. + * @type int $port + * The port of this network endpoint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The IP address of this network endpoint. + * + * Generated from protobuf field string ip_address = 1; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address of this network endpoint. + * + * Generated from protobuf field string ip_address = 1; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The port of this network endpoint. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * The port of this network endpoint. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php new file mode 100644 index 000000000000..a2b4917aa1e5 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php @@ -0,0 +1,797 @@ +google.cloud.tpu.v1.Node + */ +class Node extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Immutable. The name of the TPU + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The user-supplied description of the TPU. Maximum of 512 characters. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Required. The type of hardware accelerators associated with this node. + * + * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $accelerator_type = ''; + /** + * Output only. DEPRECATED! Use network_endpoints instead. + * The network address for the TPU Node as visible to Compute Engine + * instances. + * + * Generated from protobuf field string ip_address = 8 [deprecated = true]; + * @deprecated + */ + protected $ip_address = ''; + /** + * Output only. DEPRECATED! Use network_endpoints instead. + * The network port for the TPU Node as visible to Compute Engine instances. + * + * Generated from protobuf field string port = 14 [deprecated = true]; + * @deprecated + */ + protected $port = ''; + /** + * Output only. The current state for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * + * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_description = ''; + /** + * Required. The version of Tensorflow running in the Node. + * + * Generated from protobuf field string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tensorflow_version = ''; + /** + * The name of a network they wish to peer the TPU node to. It must be a + * preexisting Compute Engine network inside of the project on which this API + * has been activated. If none is provided, "default" will be used. + * + * Generated from protobuf field string network = 12; + */ + protected $network = ''; + /** + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * + * Generated from protobuf field string cidr_block = 13; + */ + protected $cidr_block = ''; + /** + * Output only. The service account used to run the tensor flow services + * within the node. To share resources, including Google Cloud Storage data, + * with the Tensorflow job running in the Node, this account must have + * permissions to that data. + * + * Generated from protobuf field string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = ''; + /** + * Output only. The time when the node was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * The scheduling options for this node. + * + * Generated from protobuf field .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; + */ + protected $scheduling_config = null; + /** + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that Tensorflow clients of the node reach out + * to the 0th entry in this map first. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $network_endpoints; + /** + * The health status of the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.Health health = 22; + */ + protected $health = 0; + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 24; + */ + private $labels; + /** + * Whether the VPC peering for the node is set up through Service Networking + * API. The VPC Peering should be set up before provisioning the node. + * If this field is set, cidr_block field should not be specified. If the + * network, that you want to peer the TPU Node to, is Shared VPC networks, + * the node must be created with this this field enabled. + * + * Generated from protobuf field bool use_service_networking = 27; + */ + protected $use_service_networking = false; + /** + * Output only. The API version that created this Node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = 0; + /** + * Output only. The Symptoms that have occurred to the TPU Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $symptoms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Immutable. The name of the TPU + * @type string $description + * The user-supplied description of the TPU. Maximum of 512 characters. + * @type string $accelerator_type + * Required. The type of hardware accelerators associated with this node. + * @type string $ip_address + * Output only. DEPRECATED! Use network_endpoints instead. + * The network address for the TPU Node as visible to Compute Engine + * instances. + * @type string $port + * Output only. DEPRECATED! Use network_endpoints instead. + * The network port for the TPU Node as visible to Compute Engine instances. + * @type int $state + * Output only. The current state for the TPU Node. + * @type string $health_description + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * @type string $tensorflow_version + * Required. The version of Tensorflow running in the Node. + * @type string $network + * The name of a network they wish to peer the TPU node to. It must be a + * preexisting Compute Engine network inside of the project on which this API + * has been activated. If none is provided, "default" will be used. + * @type string $cidr_block + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * @type string $service_account + * Output only. The service account used to run the tensor flow services + * within the node. To share resources, including Google Cloud Storage data, + * with the Tensorflow job running in the Node, this account must have + * permissions to that data. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the node was created. + * @type \Google\Cloud\Tpu\V1\SchedulingConfig $scheduling_config + * The scheduling options for this node. + * @type array<\Google\Cloud\Tpu\V1\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $network_endpoints + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that Tensorflow clients of the node reach out + * to the 0th entry in this map first. + * @type int $health + * The health status of the TPU node. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user-provided metadata. + * @type bool $use_service_networking + * Whether the VPC peering for the node is set up through Service Networking + * API. The VPC Peering should be set up before provisioning the node. + * If this field is set, cidr_block field should not be specified. If the + * network, that you want to peer the TPU Node to, is Shared VPC networks, + * the node must be created with this this field enabled. + * @type int $api_version + * Output only. The API version that created this Node. + * @type array<\Google\Cloud\Tpu\V1\Symptom>|\Google\Protobuf\Internal\RepeatedField $symptoms + * Output only. The Symptoms that have occurred to the TPU Node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Immutable. The name of the TPU + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Immutable. The name of the TPU + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.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 user-supplied description of the TPU. Maximum of 512 characters. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The user-supplied description of the TPU. Maximum of 512 characters. + * + * 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; + } + + /** + * Required. The type of hardware accelerators associated with this node. + * + * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAcceleratorType() + { + return $this->accelerator_type; + } + + /** + * Required. The type of hardware accelerators associated with this node. + * + * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAcceleratorType($var) + { + GPBUtil::checkString($var, True); + $this->accelerator_type = $var; + + return $this; + } + + /** + * Output only. DEPRECATED! Use network_endpoints instead. + * The network address for the TPU Node as visible to Compute Engine + * instances. + * + * Generated from protobuf field string ip_address = 8 [deprecated = true]; + * @return string + * @deprecated + */ + public function getIpAddress() + { + @trigger_error('ip_address is deprecated.', E_USER_DEPRECATED); + return $this->ip_address; + } + + /** + * Output only. DEPRECATED! Use network_endpoints instead. + * The network address for the TPU Node as visible to Compute Engine + * instances. + * + * Generated from protobuf field string ip_address = 8 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setIpAddress($var) + { + @trigger_error('ip_address is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Output only. DEPRECATED! Use network_endpoints instead. + * The network port for the TPU Node as visible to Compute Engine instances. + * + * Generated from protobuf field string port = 14 [deprecated = true]; + * @return string + * @deprecated + */ + public function getPort() + { + @trigger_error('port is deprecated.', E_USER_DEPRECATED); + return $this->port; + } + + /** + * Output only. DEPRECATED! Use network_endpoints instead. + * The network port for the TPU Node as visible to Compute Engine instances. + * + * Generated from protobuf field string port = 14 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPort($var) + { + @trigger_error('port is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->port = $var; + + return $this; + } + + /** + * Output only. The current state for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Node\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * + * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHealthDescription() + { + return $this->health_description; + } + + /** + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * + * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHealthDescription($var) + { + GPBUtil::checkString($var, True); + $this->health_description = $var; + + return $this; + } + + /** + * Required. The version of Tensorflow running in the Node. + * + * Generated from protobuf field string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTensorflowVersion() + { + return $this->tensorflow_version; + } + + /** + * Required. The version of Tensorflow running in the Node. + * + * Generated from protobuf field string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTensorflowVersion($var) + { + GPBUtil::checkString($var, True); + $this->tensorflow_version = $var; + + return $this; + } + + /** + * The name of a network they wish to peer the TPU node to. It must be a + * preexisting Compute Engine network inside of the project on which this API + * has been activated. If none is provided, "default" will be used. + * + * Generated from protobuf field string network = 12; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The name of a network they wish to peer the TPU node to. It must be a + * preexisting Compute Engine network inside of the project on which this API + * has been activated. If none is provided, "default" will be used. + * + * Generated from protobuf field string network = 12; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * + * Generated from protobuf field string cidr_block = 13; + * @return string + */ + public function getCidrBlock() + { + return $this->cidr_block; + } + + /** + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * + * Generated from protobuf field string cidr_block = 13; + * @param string $var + * @return $this + */ + public function setCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cidr_block = $var; + + return $this; + } + + /** + * Output only. The service account used to run the tensor flow services + * within the node. To share resources, including Google Cloud Storage data, + * with the Tensorflow job running in the Node, this account must have + * permissions to that data. + * + * Generated from protobuf field string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. The service account used to run the tensor flow services + * within the node. To share resources, including Google Cloud Storage data, + * with the Tensorflow job running in the Node, this account must have + * permissions to that data. + * + * Generated from protobuf field string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Output only. The time when the node was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the node was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The scheduling options for this node. + * + * Generated from protobuf field .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; + * @return \Google\Cloud\Tpu\V1\SchedulingConfig|null + */ + public function getSchedulingConfig() + { + return $this->scheduling_config; + } + + public function hasSchedulingConfig() + { + return isset($this->scheduling_config); + } + + public function clearSchedulingConfig() + { + unset($this->scheduling_config); + } + + /** + * The scheduling options for this node. + * + * Generated from protobuf field .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; + * @param \Google\Cloud\Tpu\V1\SchedulingConfig $var + * @return $this + */ + public function setSchedulingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V1\SchedulingConfig::class); + $this->scheduling_config = $var; + + return $this; + } + + /** + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that Tensorflow clients of the node reach out + * to the 0th entry in this map first. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkEndpoints() + { + return $this->network_endpoints; + } + + /** + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that Tensorflow clients of the node reach out + * to the 0th entry in this map first. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Tpu\V1\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\NetworkEndpoint::class); + $this->network_endpoints = $arr; + + return $this; + } + + /** + * The health status of the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.Health health = 22; + * @return int + */ + public function getHealth() + { + return $this->health; + } + + /** + * The health status of the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.Health health = 22; + * @param int $var + * @return $this + */ + public function setHealth($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Node\Health::class); + $this->health = $var; + + return $this; + } + + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 24; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 24; + * @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; + } + + /** + * Whether the VPC peering for the node is set up through Service Networking + * API. The VPC Peering should be set up before provisioning the node. + * If this field is set, cidr_block field should not be specified. If the + * network, that you want to peer the TPU Node to, is Shared VPC networks, + * the node must be created with this this field enabled. + * + * Generated from protobuf field bool use_service_networking = 27; + * @return bool + */ + public function getUseServiceNetworking() + { + return $this->use_service_networking; + } + + /** + * Whether the VPC peering for the node is set up through Service Networking + * API. The VPC Peering should be set up before provisioning the node. + * If this field is set, cidr_block field should not be specified. If the + * network, that you want to peer the TPU Node to, is Shared VPC networks, + * the node must be created with this this field enabled. + * + * Generated from protobuf field bool use_service_networking = 27; + * @param bool $var + * @return $this + */ + public function setUseServiceNetworking($var) + { + GPBUtil::checkBool($var); + $this->use_service_networking = $var; + + return $this; + } + + /** + * Output only. The API version that created this Node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. The API version that created this Node. + * + * Generated from protobuf field .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Node\ApiVersion::class); + $this->api_version = $var; + + return $this; + } + + /** + * Output only. The Symptoms that have occurred to the TPU Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSymptoms() + { + return $this->symptoms; + } + + /** + * Output only. The Symptoms that have occurred to the TPU Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Tpu\V1\Symptom>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSymptoms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\Symptom::class); + $this->symptoms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php new file mode 100644 index 000000000000..9554026fddf2 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php @@ -0,0 +1,71 @@ +google.cloud.tpu.v1.Node.ApiVersion + */ +class ApiVersion +{ + /** + * API version is unknown. + * + * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; + */ + const API_VERSION_UNSPECIFIED = 0; + /** + * TPU API V1Alpha1 version. + * + * Generated from protobuf enum V1_ALPHA1 = 1; + */ + const V1_ALPHA1 = 1; + /** + * TPU API V1 version. + * + * Generated from protobuf enum V1 = 2; + */ + const V1 = 2; + /** + * TPU API V2Alpha1 version. + * + * Generated from protobuf enum V2_ALPHA1 = 3; + */ + const V2_ALPHA1 = 3; + + private static $valueToName = [ + self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', + self::V1_ALPHA1 => 'V1_ALPHA1', + self::V1 => 'V1', + self::V2_ALPHA1 => 'V2_ALPHA1', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApiVersion::class, \Google\Cloud\Tpu\V1\Node_ApiVersion::class); + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php new file mode 100644 index 000000000000..3ecf7cbae531 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php @@ -0,0 +1,87 @@ +google.cloud.tpu.v1.Node.Health + */ +class Health +{ + /** + * Health status is unknown: not initialized or failed to retrieve. + * + * Generated from protobuf enum HEALTH_UNSPECIFIED = 0; + */ + const HEALTH_UNSPECIFIED = 0; + /** + * The resource is healthy. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * The resource is unhealthy. + * + * Generated from protobuf enum DEPRECATED_UNHEALTHY = 2; + */ + const DEPRECATED_UNHEALTHY = 2; + /** + * The resource is unresponsive. + * + * Generated from protobuf enum TIMEOUT = 3; + */ + const TIMEOUT = 3; + /** + * The in-guest ML stack is unhealthy. + * + * Generated from protobuf enum UNHEALTHY_TENSORFLOW = 4; + */ + const UNHEALTHY_TENSORFLOW = 4; + /** + * The node is under maintenance/priority boost caused rescheduling and + * will resume running once rescheduled. + * + * Generated from protobuf enum UNHEALTHY_MAINTENANCE = 5; + */ + const UNHEALTHY_MAINTENANCE = 5; + + private static $valueToName = [ + self::HEALTH_UNSPECIFIED => 'HEALTH_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::DEPRECATED_UNHEALTHY => 'DEPRECATED_UNHEALTHY', + self::TIMEOUT => 'TIMEOUT', + self::UNHEALTHY_TENSORFLOW => 'UNHEALTHY_TENSORFLOW', + self::UNHEALTHY_MAINTENANCE => 'UNHEALTHY_MAINTENANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Health::class, \Google\Cloud\Tpu\V1\Node_Health::class); + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php new file mode 100644 index 000000000000..de2ffa8f5e33 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php @@ -0,0 +1,150 @@ +google.cloud.tpu.v1.Node.State + */ +class State +{ + /** + * TPU node state is not known/set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * TPU node is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * TPU node has been created. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * TPU node is restarting. + * + * Generated from protobuf enum RESTARTING = 3; + */ + const RESTARTING = 3; + /** + * TPU node is undergoing reimaging. + * + * Generated from protobuf enum REIMAGING = 4; + */ + const REIMAGING = 4; + /** + * TPU node is being deleted. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * TPU node is being repaired and may be unusable. Details can be + * found in the `help_description` field. + * + * Generated from protobuf enum REPAIRING = 6; + */ + const REPAIRING = 6; + /** + * TPU node is stopped. + * + * Generated from protobuf enum STOPPED = 8; + */ + const STOPPED = 8; + /** + * TPU node is currently stopping. + * + * Generated from protobuf enum STOPPING = 9; + */ + const STOPPING = 9; + /** + * TPU node is currently starting. + * + * Generated from protobuf enum STARTING = 10; + */ + const STARTING = 10; + /** + * TPU node has been preempted. Only applies to Preemptible TPU Nodes. + * + * Generated from protobuf enum PREEMPTED = 11; + */ + const PREEMPTED = 11; + /** + * TPU node has been terminated due to maintenance or has reached the end of + * its life cycle (for preemptible nodes). + * + * Generated from protobuf enum TERMINATED = 12; + */ + const TERMINATED = 12; + /** + * TPU node is currently hiding. + * + * Generated from protobuf enum HIDING = 13; + */ + const HIDING = 13; + /** + * TPU node has been hidden. + * + * Generated from protobuf enum HIDDEN = 14; + */ + const HIDDEN = 14; + /** + * TPU node is currently unhiding. + * + * Generated from protobuf enum UNHIDING = 15; + */ + const UNHIDING = 15; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::RESTARTING => 'RESTARTING', + self::REIMAGING => 'REIMAGING', + self::DELETING => 'DELETING', + self::REPAIRING => 'REPAIRING', + self::STOPPED => 'STOPPED', + self::STOPPING => 'STOPPING', + self::STARTING => 'STARTING', + self::PREEMPTED => 'PREEMPTED', + self::TERMINATED => 'TERMINATED', + self::HIDING => 'HIDING', + self::HIDDEN => 'HIDDEN', + self::UNHIDING => 'UNHIDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Tpu\V1\Node_State::class); + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php new file mode 100644 index 000000000000..eaff85524679 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php @@ -0,0 +1,295 @@ +google.cloud.tpu.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + */ + protected $status_detail = ''; + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + */ + protected $cancel_requested = false; + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_detail + * Human-readable status of the operation, if any. + * @type bool $cancel_requested + * Specifies if cancellation was requested for the operation. + * @type string $api_version + * API version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * 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 operation finished running. + * + * 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; + } + + /** + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + * @return string + */ + public function getStatusDetail() + { + return $this->status_detail; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + * @param string $var + * @return $this + */ + public function setStatusDetail($var) + { + GPBUtil::checkString($var, True); + $this->status_detail = $var; + + return $this; + } + + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + * @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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php new file mode 100644 index 000000000000..7223eed48da8 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v1.ReimageNodeRequest + */ +class ReimageNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The version for reimage to create. + * + * Generated from protobuf field string tensorflow_version = 2; + */ + protected $tensorflow_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * @type string $tensorflow_version + * The version for reimage to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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 version for reimage to create. + * + * Generated from protobuf field string tensorflow_version = 2; + * @return string + */ + public function getTensorflowVersion() + { + return $this->tensorflow_version; + } + + /** + * The version for reimage to create. + * + * Generated from protobuf field string tensorflow_version = 2; + * @param string $var + * @return $this + */ + public function setTensorflowVersion($var) + { + GPBUtil::checkString($var, True); + $this->tensorflow_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php new file mode 100644 index 000000000000..5d8d5689861e --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v1.SchedulingConfig + */ +class SchedulingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines whether the node is preemptible. + * + * Generated from protobuf field bool preemptible = 1; + */ + protected $preemptible = false; + /** + * Whether the node is created under a reservation. + * + * Generated from protobuf field bool reserved = 2; + */ + protected $reserved = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $preemptible + * Defines whether the node is preemptible. + * @type bool $reserved + * Whether the node is created under a reservation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Defines whether the node is preemptible. + * + * Generated from protobuf field bool preemptible = 1; + * @return bool + */ + public function getPreemptible() + { + return $this->preemptible; + } + + /** + * Defines whether the node is preemptible. + * + * Generated from protobuf field bool preemptible = 1; + * @param bool $var + * @return $this + */ + public function setPreemptible($var) + { + GPBUtil::checkBool($var); + $this->preemptible = $var; + + return $this; + } + + /** + * Whether the node is created under a reservation. + * + * Generated from protobuf field bool reserved = 2; + * @return bool + */ + public function getReserved() + { + return $this->reserved; + } + + /** + * Whether the node is created under a reservation. + * + * Generated from protobuf field bool reserved = 2; + * @param bool $var + * @return $this + */ + public function setReserved($var) + { + GPBUtil::checkBool($var); + $this->reserved = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php new file mode 100644 index 000000000000..bcb6fdf73a3c --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v1.StartNodeRequest + */ +class StartNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php new file mode 100644 index 000000000000..a1d1c4ac9711 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v1.StopNodeRequest + */ +class StopNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php new file mode 100644 index 000000000000..d3ff773b4c6f --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php @@ -0,0 +1,179 @@ +google.cloud.tpu.v1.Symptom + */ +class Symptom extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp when the Symptom is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Type of the Symptom. + * + * Generated from protobuf field .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; + */ + protected $symptom_type = 0; + /** + * Detailed information of the current Symptom. + * + * Generated from protobuf field string details = 3; + */ + protected $details = ''; + /** + * A string used to uniquely distinguish a worker within a TPU node. + * + * Generated from protobuf field string worker_id = 4; + */ + protected $worker_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when the Symptom is created. + * @type int $symptom_type + * Type of the Symptom. + * @type string $details + * Detailed information of the current Symptom. + * @type string $worker_id + * A string used to uniquely distinguish a worker within a TPU node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp when the Symptom is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Timestamp when the Symptom is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Type of the Symptom. + * + * Generated from protobuf field .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; + * @return int + */ + public function getSymptomType() + { + return $this->symptom_type; + } + + /** + * Type of the Symptom. + * + * Generated from protobuf field .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; + * @param int $var + * @return $this + */ + public function setSymptomType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Symptom\SymptomType::class); + $this->symptom_type = $var; + + return $this; + } + + /** + * Detailed information of the current Symptom. + * + * Generated from protobuf field string details = 3; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Detailed information of the current Symptom. + * + * Generated from protobuf field string details = 3; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + + /** + * A string used to uniquely distinguish a worker within a TPU node. + * + * Generated from protobuf field string worker_id = 4; + * @return string + */ + public function getWorkerId() + { + return $this->worker_id; + } + + /** + * A string used to uniquely distinguish a worker within a TPU node. + * + * Generated from protobuf field string worker_id = 4; + * @param string $var + * @return $this + */ + public function setWorkerId($var) + { + GPBUtil::checkString($var, True); + $this->worker_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php new file mode 100644 index 000000000000..18acc6726915 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php @@ -0,0 +1,94 @@ +google.cloud.tpu.v1.Symptom.SymptomType + */ +class SymptomType +{ + /** + * Unspecified symptom. + * + * Generated from protobuf enum SYMPTOM_TYPE_UNSPECIFIED = 0; + */ + const SYMPTOM_TYPE_UNSPECIFIED = 0; + /** + * TPU VM memory is low. + * + * Generated from protobuf enum LOW_MEMORY = 1; + */ + const LOW_MEMORY = 1; + /** + * TPU runtime is out of memory. + * + * Generated from protobuf enum OUT_OF_MEMORY = 2; + */ + const OUT_OF_MEMORY = 2; + /** + * TPU runtime execution has timed out. + * + * Generated from protobuf enum EXECUTE_TIMED_OUT = 3; + */ + const EXECUTE_TIMED_OUT = 3; + /** + * TPU runtime fails to construct a mesh that recognizes each TPU device's + * neighbors. + * + * Generated from protobuf enum MESH_BUILD_FAIL = 4; + */ + const MESH_BUILD_FAIL = 4; + /** + * TPU HBM is out of memory. + * + * Generated from protobuf enum HBM_OUT_OF_MEMORY = 5; + */ + const HBM_OUT_OF_MEMORY = 5; + /** + * Abusive behaviors have been identified on the current project. + * + * Generated from protobuf enum PROJECT_ABUSE = 6; + */ + const PROJECT_ABUSE = 6; + + private static $valueToName = [ + self::SYMPTOM_TYPE_UNSPECIFIED => 'SYMPTOM_TYPE_UNSPECIFIED', + self::LOW_MEMORY => 'LOW_MEMORY', + self::OUT_OF_MEMORY => 'OUT_OF_MEMORY', + self::EXECUTE_TIMED_OUT => 'EXECUTE_TIMED_OUT', + self::MESH_BUILD_FAIL => 'MESH_BUILD_FAIL', + self::HBM_OUT_OF_MEMORY => 'HBM_OUT_OF_MEMORY', + self::PROJECT_ABUSE => 'PROJECT_ABUSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SymptomType::class, \Google\Cloud\Tpu\V1\Symptom_SymptomType::class); + diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php new file mode 100644 index 000000000000..cf53dab11a8d --- /dev/null +++ b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v1.TensorFlowVersion + */ +class TensorFlowVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * the tensorflow version. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * @type string $version + * the tensorflow version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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 tensorflow version. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * the tensorflow version. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php new file mode 100644 index 000000000000..72e569aa922c --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php @@ -0,0 +1,90 @@ +setAcceleratorType($nodeAcceleratorType) + ->setTensorflowVersion($nodeTensorflowVersion); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $tpuClient->createNode($formattedParent, $node); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + $nodeAcceleratorType = '[ACCELERATOR_TYPE]'; + $nodeTensorflowVersion = '[TENSORFLOW_VERSION]'; + + create_node_sample($formattedParent, $nodeAcceleratorType, $nodeTensorflowVersion); +} +// [END tpu_v1_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php new file mode 100644 index 000000000000..04740897dad2 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php @@ -0,0 +1,78 @@ +deleteNode($formattedName); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + delete_node_sample($formattedName); +} +// [END tpu_v1_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php new file mode 100644 index 000000000000..1627eafb8dd8 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php @@ -0,0 +1,66 @@ +getAcceleratorType($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TpuClient::acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + + get_accelerator_type_sample($formattedName); +} +// [END tpu_v1_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php new file mode 100644 index 000000000000..ccfd9866cf6b --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php @@ -0,0 +1,53 @@ +getLocation(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END tpu_v1_generated_Tpu_GetLocation_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php new file mode 100644 index 000000000000..483410a2b4a8 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php @@ -0,0 +1,66 @@ +getNode($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + get_node_sample($formattedName); +} +// [END tpu_v1_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php new file mode 100644 index 000000000000..d041df473c90 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php @@ -0,0 +1,70 @@ +getTensorFlowVersion($formattedName); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TpuClient::tensorFlowVersionName( + '[PROJECT]', + '[LOCATION]', + '[TENSOR_FLOW_VERSION]' + ); + + get_tensor_flow_version_sample($formattedName); +} +// [END tpu_v1_generated_Tpu_GetTensorFlowVersion_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php new file mode 100644 index 000000000000..c14bff499b71 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php @@ -0,0 +1,71 @@ +listAcceleratorTypes($formattedParent); + + /** @var AcceleratorType $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 = TpuClient::acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + + list_accelerator_types_sample($formattedParent); +} +// [END tpu_v1_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php new file mode 100644 index 000000000000..a9494b94d88c --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php @@ -0,0 +1,58 @@ +listLocations(); + + /** @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 tpu_v1_generated_Tpu_ListLocations_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php new file mode 100644 index 000000000000..20d40dac5991 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php @@ -0,0 +1,71 @@ +listNodes($formattedParent); + + /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + + list_nodes_sample($formattedParent); +} +// [END tpu_v1_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php new file mode 100644 index 000000000000..3669b40c6b18 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php @@ -0,0 +1,75 @@ +listTensorFlowVersions($formattedParent); + + /** @var TensorFlowVersion $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 = TpuClient::tensorFlowVersionName( + '[PROJECT]', + '[LOCATION]', + '[TENSOR_FLOW_VERSION]' + ); + + list_tensor_flow_versions_sample($formattedParent); +} +// [END tpu_v1_generated_Tpu_ListTensorFlowVersions_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php new file mode 100644 index 000000000000..05fc7269ebb5 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php @@ -0,0 +1,65 @@ +reimageNode(); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 tpu_v1_generated_Tpu_ReimageNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php new file mode 100644 index 000000000000..57b0668e1696 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php @@ -0,0 +1,65 @@ +startNode(); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 tpu_v1_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php new file mode 100644 index 000000000000..f0cb4284a448 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php @@ -0,0 +1,65 @@ +stopNode(); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 tpu_v1_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php b/owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php new file mode 100644 index 000000000000..a1cac6eb069e --- /dev/null +++ b/owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php @@ -0,0 +1,1237 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $node = new Node(); + * $operationResponse = $tpuClient->createNode($formattedParent, $node); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $tpuClient->createNode($formattedParent, $node); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'createNode'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated This class will be removed in the next major version update. + */ +class TpuGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.tpu.v1.Tpu'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'tpu.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'tpu.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $acceleratorTypeNameTemplate; + + private static $locationNameTemplate; + + private static $nodeNameTemplate; + + private static $tensorFlowVersionNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/tpu_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/tpu_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/tpu_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/tpu_rest_client_config.php', + ], + ], + ]; + } + + private static function getAcceleratorTypeNameTemplate() + { + if (self::$acceleratorTypeNameTemplate == null) { + self::$acceleratorTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}'); + } + + return self::$acceleratorTypeNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getNodeNameTemplate() + { + if (self::$nodeNameTemplate == null) { + self::$nodeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/nodes/{node}'); + } + + return self::$nodeNameTemplate; + } + + private static function getTensorFlowVersionNameTemplate() + { + if (self::$tensorFlowVersionNameTemplate == null) { + self::$tensorFlowVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}'); + } + + return self::$tensorFlowVersionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'acceleratorType' => self::getAcceleratorTypeNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'node' => self::getNodeNameTemplate(), + 'tensorFlowVersion' => self::getTensorFlowVersionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * accelerator_type resource. + * + * @param string $project + * @param string $location + * @param string $acceleratorType + * + * @return string The formatted accelerator_type resource. + */ + public static function acceleratorTypeName($project, $location, $acceleratorType) + { + return self::getAcceleratorTypeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'accelerator_type' => $acceleratorType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a node + * resource. + * + * @param string $project + * @param string $location + * @param string $node + * + * @return string The formatted node resource. + */ + public static function nodeName($project, $location, $node) + { + return self::getNodeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'node' => $node, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * tensor_flow_version resource. + * + * @param string $project + * @param string $location + * @param string $tensorFlowVersion + * + * @return string The formatted tensor_flow_version resource. + */ + public static function tensorFlowVersionName($project, $location, $tensorFlowVersion) + { + return self::getTensorFlowVersionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'tensor_flow_version' => $tensorFlowVersion, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - acceleratorType: projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type} + * - location: projects/{project}/locations/{location} + * - node: projects/{project}/locations/{location}/nodes/{node} + * - tensorFlowVersion: projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'tpu.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a node. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedParent = $tpuClient->locationName('[PROJECT]', '[LOCATION]'); + * $node = new Node(); + * $operationResponse = $tpuClient->createNode($formattedParent, $node); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $tpuClient->createNode($formattedParent, $node); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'createNode'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. + * @param Node $node Required. The node. + * @param array $optionalArgs { + * Optional. + * + * @type string $nodeId + * The unqualified resource name. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createNode($parent, $node, array $optionalArgs = []) + { + $request = new CreateNodeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNode($node); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['nodeId'])) { + $request->setNodeId($optionalArgs['nodeId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a node. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedName = $tpuClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + * $operationResponse = $tpuClient->deleteNode($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $tpuClient->deleteNode($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'deleteNode'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteNode($name, array $optionalArgs = []) + { + $request = new DeleteNodeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets AcceleratorType. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedName = $tpuClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + * $response = $tpuClient->getAcceleratorType($formattedName); + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tpu\V1\AcceleratorType + * + * @throws ApiException if the remote call fails + */ + public function getAcceleratorType($name, array $optionalArgs = []) + { + $request = new GetAcceleratorTypeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAcceleratorType', AcceleratorType::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the details of a node. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedName = $tpuClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + * $response = $tpuClient->getNode($formattedName); + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tpu\V1\Node + * + * @throws ApiException if the remote call fails + */ + public function getNode($name, array $optionalArgs = []) + { + $request = new GetNodeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNode', Node::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets TensorFlow Version. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedName = $tpuClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); + * $response = $tpuClient->getTensorFlowVersion($formattedName); + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Tpu\V1\TensorFlowVersion + * + * @throws ApiException if the remote call fails + */ + public function getTensorFlowVersion($name, array $optionalArgs = []) + { + $request = new GetTensorFlowVersionRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetTensorFlowVersion', TensorFlowVersion::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists accelerator types supported by this API. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedParent = $tpuClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + * // Iterate over pages of elements + * $pagedResponse = $tpuClient->listAcceleratorTypes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $tpuClient->listAcceleratorTypes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * List filter. + * @type string $orderBy + * Sort results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAcceleratorTypes($parent, array $optionalArgs = []) + { + $request = new ListAcceleratorTypesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAcceleratorTypes', $optionalArgs, ListAcceleratorTypesResponse::class, $request); + } + + /** + * Lists nodes. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedParent = $tpuClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $tpuClient->listNodes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $tpuClient->listNodes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNodes($parent, array $optionalArgs = []) + { + $request = new ListNodesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNodes', $optionalArgs, ListNodesResponse::class, $request); + } + + /** + * List TensorFlow versions supported by this API. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $formattedParent = $tpuClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); + * // Iterate over pages of elements + * $pagedResponse = $tpuClient->listTensorFlowVersions($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $tpuClient->listTensorFlowVersions($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent resource name. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * List filter. + * @type string $orderBy + * Sort results. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTensorFlowVersions($parent, array $optionalArgs = []) + { + $request = new ListTensorFlowVersionsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTensorFlowVersions', $optionalArgs, ListTensorFlowVersionsResponse::class, $request); + } + + /** + * Reimages a node's OS. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $operationResponse = $tpuClient->reimageNode(); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $tpuClient->reimageNode(); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'reimageNode'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource name. + * @type string $tensorflowVersion + * The version for reimage to create. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function reimageNode(array $optionalArgs = []) + { + $request = new ReimageNodeRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['tensorflowVersion'])) { + $request->setTensorflowVersion($optionalArgs['tensorflowVersion']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ReimageNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Starts a node. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $operationResponse = $tpuClient->startNode(); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $tpuClient->startNode(); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'startNode'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource name. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function startNode(array $optionalArgs = []) + { + $request = new StartNodeRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('StartNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Stops a node, this operation is only available with single TPU nodes. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $operationResponse = $tpuClient->stopNode(); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $tpuClient->stopNode(); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'stopNode'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource name. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function stopNode(array $optionalArgs = []) + { + $request = new StopNodeRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('StopNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * $response = $tpuClient->getLocation(); + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $tpuClient = new TpuClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $tpuClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $tpuClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $tpuClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); + } +} diff --git a/owl-bot-staging/Tpu/v1/src/V1/TpuClient.php b/owl-bot-staging/Tpu/v1/src/V1/TpuClient.php new file mode 100644 index 000000000000..085dae53c3e0 --- /dev/null +++ b/owl-bot-staging/Tpu/v1/src/V1/TpuClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.tpu.v1.Tpu' => [ + 'CreateNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'DeleteNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ReimageNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'StartNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'StopNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + ], + 'ListAcceleratorTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAcceleratorTypes', + ], + ], + 'ListNodes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNodes', + ], + ], + 'ListTensorFlowVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTensorflowVersions', + ], + ], + 'GetLocation' => [ + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + ], + ], +]; diff --git a/owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php b/owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php new file mode 100644 index 000000000000..982ab1004eea --- /dev/null +++ b/owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php @@ -0,0 +1,224 @@ + [ + '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.tpu.v1.Tpu' => [ + 'CreateNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodes', + 'body' => 'node', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNode' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAcceleratorType' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/acceleratorTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNode' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTensorFlowVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorflowVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAcceleratorTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/acceleratorTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTensorFlowVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tensorflowVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReimageNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}:reimage', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StartNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + '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/*}', + '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/Tpu/v1/tests/Unit/V1/TpuClientTest.php b/owl-bot-staging/Tpu/v1/tests/Unit/V1/TpuClientTest.php new file mode 100644 index 000000000000..875a5029126e --- /dev/null +++ b/owl-bot-staging/Tpu/v1/tests/Unit/V1/TpuClientTest.php @@ -0,0 +1,1289 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TpuClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TpuClient($options); + } + + /** @test */ + public function createNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $ipAddress = 'ipAddress1480014044'; + $port = 'port3446913'; + $healthDescription = 'healthDescription-1057342823'; + $tensorflowVersion = 'tensorflowVersion-1353701984'; + $network = 'network1843485230'; + $cidrBlock = 'cidrBlock313022466'; + $serviceAccount = 'serviceAccount-1948028253'; + $useServiceNetworking = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setPort($port); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setTensorflowVersion($tensorflowVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setUseServiceNetworking($useServiceNetworking); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $node = new Node(); + $nodeAcceleratorType = 'nodeAcceleratorType-620315165'; + $node->setAcceleratorType($nodeAcceleratorType); + $nodeTensorflowVersion = 'nodeTensorflowVersion-1950315537'; + $node->setTensorflowVersion($nodeTensorflowVersion); + $response = $gapicClient->createNode($formattedParent, $node); + $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.tpu.v1.Tpu/CreateNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNode(); + $this->assertProtobufEquals($node, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNodeTest'); + $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 createNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNodeTest'); + $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]'); + $node = new Node(); + $nodeAcceleratorType = 'nodeAcceleratorType-620315165'; + $node->setAcceleratorType($nodeAcceleratorType); + $nodeTensorflowVersion = 'nodeTensorflowVersion-1950315537'; + $node->setTensorflowVersion($nodeTensorflowVersion); + $response = $gapicClient->createNode($formattedParent, $node); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNodeTest'); + 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 deleteNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $ipAddress = 'ipAddress1480014044'; + $port = 'port3446913'; + $healthDescription = 'healthDescription-1057342823'; + $tensorflowVersion = 'tensorflowVersion-1353701984'; + $network = 'network1843485230'; + $cidrBlock = 'cidrBlock313022466'; + $serviceAccount = 'serviceAccount-1948028253'; + $useServiceNetworking = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setPort($port); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setTensorflowVersion($tensorflowVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setUseServiceNetworking($useServiceNetworking); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $response = $gapicClient->deleteNode($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/DeleteNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); + $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 deleteNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNodeTest'); + $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $response = $gapicClient->deleteNode($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); + 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 getAcceleratorTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $expectedResponse = new AcceleratorType(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + $response = $gapicClient->getAcceleratorType($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/GetAcceleratorType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAcceleratorTypeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + try { + $gapicClient->getAcceleratorType($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $ipAddress = 'ipAddress1480014044'; + $port = 'port3446913'; + $healthDescription = 'healthDescription-1057342823'; + $tensorflowVersion = 'tensorflowVersion-1353701984'; + $network = 'network1843485230'; + $cidrBlock = 'cidrBlock313022466'; + $serviceAccount = 'serviceAccount-1948028253'; + $useServiceNetworking = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setPort($port); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setTensorflowVersion($tensorflowVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setUseServiceNetworking($useServiceNetworking); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $response = $gapicClient->getNode($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/GetNode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + try { + $gapicClient->getNode($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTensorFlowVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $expectedResponse = new TensorFlowVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); + $response = $gapicClient->getTensorFlowVersion($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/GetTensorFlowVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTensorFlowVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); + try { + $gapicClient->getTensorFlowVersion($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAcceleratorTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $acceleratorTypesElement = new AcceleratorType(); + $acceleratorTypes = [ + $acceleratorTypesElement, + ]; + $expectedResponse = new ListAcceleratorTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAcceleratorTypes($acceleratorTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + $response = $gapicClient->listAcceleratorTypes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAcceleratorTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/ListAcceleratorTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAcceleratorTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + try { + $gapicClient->listAcceleratorTypes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nodesElement = new Node(); + $nodes = [ + $nodesElement, + ]; + $expectedResponse = new ListNodesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNodes($nodes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listNodes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNodes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/ListNodes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listNodes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTensorFlowVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tensorflowVersionsElement = new TensorFlowVersion(); + $tensorflowVersions = [ + $tensorflowVersionsElement, + ]; + $expectedResponse = new ListTensorFlowVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTensorflowVersions($tensorflowVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); + $response = $gapicClient->listTensorFlowVersions($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTensorflowVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v1.Tpu/ListTensorFlowVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTensorFlowVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); + try { + $gapicClient->listTensorFlowVersions($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reimageNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reimageNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $ipAddress = 'ipAddress1480014044'; + $port = 'port3446913'; + $healthDescription = 'healthDescription-1057342823'; + $tensorflowVersion2 = 'tensorflowVersion2467487059'; + $network = 'network1843485230'; + $cidrBlock = 'cidrBlock313022466'; + $serviceAccount = 'serviceAccount-1948028253'; + $useServiceNetworking = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setPort($port); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setTensorflowVersion($tensorflowVersion2); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setUseServiceNetworking($useServiceNetworking); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reimageNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $response = $gapicClient->reimageNode(); + $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.tpu.v1.Tpu/ReimageNode', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reimageNodeTest'); + $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 reimageNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reimageNodeTest'); + $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); + $response = $gapicClient->reimageNode(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reimageNodeTest'); + 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 startNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $ipAddress = 'ipAddress1480014044'; + $port = 'port3446913'; + $healthDescription = 'healthDescription-1057342823'; + $tensorflowVersion = 'tensorflowVersion-1353701984'; + $network = 'network1843485230'; + $cidrBlock = 'cidrBlock313022466'; + $serviceAccount = 'serviceAccount-1948028253'; + $useServiceNetworking = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setPort($port); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setTensorflowVersion($tensorflowVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setUseServiceNetworking($useServiceNetworking); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $response = $gapicClient->startNode(); + $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.tpu.v1.Tpu/StartNode', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNodeTest'); + $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 startNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNodeTest'); + $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); + $response = $gapicClient->startNode(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNodeTest'); + 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 stopNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $ipAddress = 'ipAddress1480014044'; + $port = 'port3446913'; + $healthDescription = 'healthDescription-1057342823'; + $tensorflowVersion = 'tensorflowVersion-1353701984'; + $network = 'network1843485230'; + $cidrBlock = 'cidrBlock313022466'; + $serviceAccount = 'serviceAccount-1948028253'; + $useServiceNetworking = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setIpAddress($ipAddress); + $expectedResponse->setPort($port); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setTensorflowVersion($tensorflowVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setUseServiceNetworking($useServiceNetworking); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $response = $gapicClient->stopNode(); + $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.tpu.v1.Tpu/StopNode', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopNodeTest'); + $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 stopNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopNodeTest'); + $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); + $response = $gapicClient->stopNode(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopNodeTest'); + 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); + $response = $gapicClient->getLocation(); + $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); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); + $response = $gapicClient->listLocations(); + $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); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Tpu/v2/proto/src/GPBMetadata/Google/Cloud/Tpu/V2/CloudTpu.php b/owl-bot-staging/Tpu/v2/proto/src/GPBMetadata/Google/Cloud/Tpu/V2/CloudTpu.php new file mode 100644 index 0000000000000000000000000000000000000000..0e43d7c9ea6ac9f00880d1b92710e73d78912a13 GIT binary patch literal 9430 zcmb_i&2JlN8OQmm^Q1|fH~nz4UFuG|+a$ZSw{CXXb+_$KVka>hf5>*S6e5i#_M2oj zj%Rje+!Cr>;D*Eri8BI(ggC&N142k#R-8cM(9kYU?g-rS?uz?jcQCw&|Kpvz^-O?(b7O)ijSSqfPB}DwVIK z%9Tc{kS{iF;#SA(+D)2E9hl}pn`WAAv)jtJRyXrBD;_j_NOO7s9sQU(mfobPjp}NN zx_V1@_1z7=b$5+z-ECOi-JR?MfM#2FoD?6#F?bFs{Ij}yZKIiTT;0Ww+lHeV9m6&B zw(&g#|1h<$w;hU```7MwJ5ARxJ1MrI(rMDgrIet_*50;EWcFdo!%}7ZBk#M#j!W&1 z-rmhqr)e9OYuZ&@n#&zf*OwX_SzMCGGIGX#YEfX!<@!KAOu2TK22W3=Z0dIH&I68{ z5jgd~?M6sSwTxZ0(=nM8%#M@Go$+)=V$jC5wn01Y`Sz?EwB1^zhx${)w9mJ-Mx})e z4RXuu9N67X$LJjFRxD9ZIfnY`G`H1NOIahD*A0^grxv7-;0Ker!eW<)(J` zks%FBZMA$mT1OXK^fk}y;12vtgl%;%nF7p}^kx@Dj@f@^^Vwp5{<^5C@3^pr7uJ;_C{$^G2%(UCHgX+lnV!NQ*u5ROsaa)pP_ zU*UQ}6$=y!vm0F$v+BCGvDbB}LkPfUU230bmhK)VW2xBUBzXi=V(h8j?$YE44o+p4 z(gIwMtkNNJJ8Xkeg-cQ6CZZM$5r7S@XE#X>&uH8KNGE2w$xlUlJ+NW>83B!8}y zx1Jc!;<4%;Wwih=PLy&Wf8?0 zcqU1hqTdyvUo$Lm*y`vP>ZoGCv;-y@nuQA;fmC8boKAPo8)G&%NnV3_+R>3=EkM@c zYKoI9Fw@jKc#gJj+Rt>m#T6D;(lAp;nHWuq*vu}90Ih%?>qc9igpW=WeGl0mMWgub zG>nx|d*l*~F=LXjClK}*>Nt~pOJ*^QsM17UhXfND=5`%(o93P%H72!5#%+w;#}hEk z(BveJ&17#xN|K$KuCrxaMC1mLL#nskLoIk7cvMHpb(qBn&wN^YN^OUsnet{wNDgMC z@H{o%#>uIy5`DOky;KIuzG<{7|1Ruei<6FMR#vI@KhPO8us?&Xbl7~4@3RHT4lf2Bs z&Fx4E zWkHuz_{QBkgU|A6Kd~2`*wqi5d|4{T0yi4z~-(!q#` zu^;oEZ(wh7{s)MT@sCy2jxa`X?0twkCm5zo4D-8p_^H<;IjW0QVpj>0&LPXFw1u@P z`VN+wp8oH0{l67WL~bg|J<^_6fdt*NDZ*Ns6M8d}5QYlRn@3`csi2l+N)oZxPf0w)S;(MNGjY7FzsjY8SK0yXCE1%7j)M6QD)$&>)F|K?9aAwSydakO~qPA10 z)r*yK=wxJY=bol+RX5dpc=iO0?A$})vf->ZJj#c&iLqSmOSJ-5S#c>UDD*EUjlE%p zXPp%chM&@=>tvqGZ>Jdy!=irAJomnyW|)!TBKC2rdWwedk^iXI$iSnqdb0EbsyWyP%31&w!iQY*h{|NA9Kl@REXTs;iIPPa=Ya4m zR?A(B^eP6AT!q;Vrf)1T@hCx8WOvN0-3}&+<{?Y*m|0miehf1kl=J1Wb+;!iOQr_O zQ~6O0=GJ)XVW)dUJ_yNXiOc2|-1Ow@gq5=;b%2re0^?M}@G5Y>jeu}~mjW;2oW+6> zWfkV~7+PE!gmX@wK7!f0Yg%7{f{HbztJ_~iu+Ly_+rpI6!wBa2E+5obAHof9D%+pu z{mzifgm@BU@_e-fQ^>ujM2ao6Zo@r6PYYIb%6H)FUOO0C`PKEWJb@bniA!gA58{S| zCPfgPF+<>#f5u=oka-$dMq(5URH5vN7nj2F)?mIrud#ZVx!{nAE$4ozeg;ZJI0_^A zc-Y7kz{FU&p6aqPxKD=1=qe~LI;jShvW3a^S~vyCwjt#OaH z_mf!hPGf)Ib{%Y!UDnj|z8g!v1l|T<5s&3MFNg3>gn3__HSocX<^p%gKaF59D>{(# zv-1cp${t5_{*0xW>|$gIBo9f;PafjYy##h~l`+Y#vDlpr#tbYn*tOH7@{1Tu1@~Ns zWc>+N)RmIfcv215`&eRQeXErUrAm!e!*ei=m9SP>_l8DTr%?D-VQm|G1y(5MHBlgsmAkeEjM$84`t851! z$wbVIeI^^-jrQ$IGj)rS=Q6~xf-~FZfxMd()!_<^ag(?Ni3qi_#v+T21^c{@dSRa{ zi3`dKT&YKQz6(I)jhRE6U7KoqrYZV?c=q1}MjKX_{3HgGenC&7Zz}wGsmq1v>LRdA zNMFglP-PeL{lEU>$0Ki%CH9-vbJ3VQ^wYy~pvPI3y$$(63@)HzS(!_sgPEN5Kn?CX zl=ok#yr$?u!HSFl7-W03d`f;F12}6SNHpVT3p^~Zd+r~&;ZOUqQ!zeQugQDH{)qZQ zofiUnn>7~vA4UQW{hl(s0CT)AA-_Wg&RUKE44f?(k^%a;x(t`)Zvd!A{!3q)|5QYx zI0{IAS+Fpa^nV${s|4BWkZ6bXriTQ+{W8gO8Q)jZ+(?H3m~#+ZF1Ad5g#g30*{R3LWS?@N$BF+{JiT3DaXkVxaZp(r0kjwhLtdunxdU_~< z3#0yX46Y7n!^nNl^?L4x2dws(TRGn*8Q#`86CWuLhKOqTYqxkoAk_9Tjr=hNmss!& zqzv9Vk#{0tMJ@Fhxp$5ol8ZubkbaM>48cxDKf5CpSbq}(f)P2y14%~$>R;$F5bfn5 zs>)h0pnHg4W(%)77MNJ>NuI1!1nP<a>a_Q=PL<`-WG4k1YW9Py^_(4c%g=`6feGgoogle.cloud.tpu.v2.AcceleratorConfig + */ +class AcceleratorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Type of TPU. + * + * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Topology of TPU in chips. + * + * Generated from protobuf field string topology = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $topology = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. Type of TPU. + * @type string $topology + * Required. Topology of TPU in chips. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. Type of TPU. + * + * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of TPU. + * + * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\AcceleratorConfig\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Topology of TPU in chips. + * + * Generated from protobuf field string topology = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTopology() + { + return $this->topology; + } + + /** + * Required. Topology of TPU in chips. + * + * Generated from protobuf field string topology = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTopology($var) + { + GPBUtil::checkString($var, True); + $this->topology = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php new file mode 100644 index 000000000000..acc1fb827c60 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php @@ -0,0 +1,71 @@ +google.cloud.tpu.v2.AcceleratorConfig.Type + */ +class Type +{ + /** + * Unspecified version. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * TPU v2. + * + * Generated from protobuf enum V2 = 2; + */ + const V2 = 2; + /** + * TPU v3. + * + * Generated from protobuf enum V3 = 4; + */ + const V3 = 4; + /** + * TPU v4. + * + * Generated from protobuf enum V4 = 7; + */ + const V4 = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::V2 => 'V2', + self::V3 => 'V3', + self::V4 => 'V4', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Tpu\V2\AcceleratorConfig_Type::class); + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php new file mode 100644 index 000000000000..eeb1b245c88d --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php @@ -0,0 +1,135 @@ +google.cloud.tpu.v2.AcceleratorType + */ +class AcceleratorType extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The accelerator type. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * The accelerator config. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorConfig accelerator_configs = 3; + */ + private $accelerator_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * @type string $type + * The accelerator type. + * @type array<\Google\Cloud\Tpu\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $accelerator_configs + * The accelerator config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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 accelerator type. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The accelerator 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; + } + + /** + * The accelerator config. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorConfig accelerator_configs = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAcceleratorConfigs() + { + return $this->accelerator_configs; + } + + /** + * The accelerator config. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorConfig accelerator_configs = 3; + * @param array<\Google\Cloud\Tpu\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAcceleratorConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\AcceleratorConfig::class); + $this->accelerator_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php new file mode 100644 index 000000000000..3b041666ea5e --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v2.AccessConfig + */ +class AccessConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. An external IP address associated with the TPU worker. + * + * Generated from protobuf field string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $external_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $external_ip + * Output only. An external IP address associated with the TPU worker. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Output only. An external IP address associated with the TPU worker. + * + * Generated from protobuf field string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * Output only. An external IP address associated with the TPU worker. + * + * Generated from protobuf field string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php new file mode 100644 index 000000000000..246f0f6075c7 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php @@ -0,0 +1,114 @@ +google.cloud.tpu.v2.AttachedDisk + */ +class AttachedDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the full path to an existing disk. + * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". + * + * Generated from protobuf field string source_disk = 3; + */ + protected $source_disk = ''; + /** + * The mode in which to attach this disk. + * If not specified, the default is READ_WRITE mode. + * Only applicable to data_disks. + * + * Generated from protobuf field .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_disk + * Specifies the full path to an existing disk. + * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". + * @type int $mode + * The mode in which to attach this disk. + * If not specified, the default is READ_WRITE mode. + * Only applicable to data_disks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the full path to an existing disk. + * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". + * + * Generated from protobuf field string source_disk = 3; + * @return string + */ + public function getSourceDisk() + { + return $this->source_disk; + } + + /** + * Specifies the full path to an existing disk. + * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". + * + * Generated from protobuf field string source_disk = 3; + * @param string $var + * @return $this + */ + public function setSourceDisk($var) + { + GPBUtil::checkString($var, True); + $this->source_disk = $var; + + return $this; + } + + /** + * The mode in which to attach this disk. + * If not specified, the default is READ_WRITE mode. + * Only applicable to data_disks. + * + * Generated from protobuf field .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * The mode in which to attach this disk. + * If not specified, the default is READ_WRITE mode. + * Only applicable to data_disks. + * + * Generated from protobuf field .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\AttachedDisk\DiskMode::class); + $this->mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php new file mode 100644 index 000000000000..eea643e2e00c --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php @@ -0,0 +1,66 @@ +google.cloud.tpu.v2.AttachedDisk.DiskMode + */ +class DiskMode +{ + /** + * The disk mode is not known/set. + * + * Generated from protobuf enum DISK_MODE_UNSPECIFIED = 0; + */ + const DISK_MODE_UNSPECIFIED = 0; + /** + * Attaches the disk in read-write mode. Only one TPU node can attach a disk + * in read-write mode at a time. + * + * Generated from protobuf enum READ_WRITE = 1; + */ + const READ_WRITE = 1; + /** + * Attaches the disk in read-only mode. Multiple TPU nodes can attach + * a disk in read-only mode at a time. + * + * Generated from protobuf enum READ_ONLY = 2; + */ + const READ_ONLY = 2; + + private static $valueToName = [ + self::DISK_MODE_UNSPECIFIED => 'DISK_MODE_UNSPECIFIED', + self::READ_WRITE => 'READ_WRITE', + self::READ_ONLY => 'READ_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiskMode::class, \Google\Cloud\Tpu\V2\AttachedDisk_DiskMode::class); + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php new file mode 100644 index 000000000000..969d7fa4a370 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php @@ -0,0 +1,163 @@ +google.cloud.tpu.v2.CreateNodeRequest + */ +class CreateNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The unqualified resource name. + * + * Generated from protobuf field string node_id = 2; + */ + protected $node_id = ''; + /** + * Required. The node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node = null; + + /** + * @param string $parent Required. The parent resource name. Please see + * {@see TpuClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Tpu\V2\Node $node Required. The node. + * @param string $nodeId The unqualified resource name. + * + * @return \Google\Cloud\Tpu\V2\CreateNodeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Tpu\V2\Node $node, string $nodeId): self + { + return (new self()) + ->setParent($parent) + ->setNode($node) + ->setNodeId($nodeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * @type string $node_id + * The unqualified resource name. + * @type \Google\Cloud\Tpu\V2\Node $node + * Required. The node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 unqualified resource name. + * + * Generated from protobuf field string node_id = 2; + * @return string + */ + public function getNodeId() + { + return $this->node_id; + } + + /** + * The unqualified resource name. + * + * Generated from protobuf field string node_id = 2; + * @param string $var + * @return $this + */ + public function setNodeId($var) + { + GPBUtil::checkString($var, True); + $this->node_id = $var; + + return $this; + } + + /** + * Required. The node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tpu\V2\Node|null + */ + public function getNode() + { + return $this->node; + } + + public function hasNode() + { + return isset($this->node); + } + + public function clearNode() + { + unset($this->node); + } + + /** + * Required. The node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tpu\V2\Node $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\Node::class); + $this->node = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php new file mode 100644 index 000000000000..44f643988baa --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php @@ -0,0 +1,81 @@ +google.cloud.tpu.v2.DeleteNodeRequest + */ +class DeleteNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. Please see + * {@see TpuClient::nodeName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\DeleteNodeRequest + * + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php new file mode 100644 index 000000000000..7dd5df7d149d --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php @@ -0,0 +1,68 @@ +google.cloud.tpu.v2.GenerateServiceIdentityRequest + */ +class GenerateServiceIdentityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php new file mode 100644 index 000000000000..81731c6854a2 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php @@ -0,0 +1,78 @@ +google.cloud.tpu.v2.GenerateServiceIdentityResponse + */ +class GenerateServiceIdentityResponse extends \Google\Protobuf\Internal\Message +{ + /** + * ServiceIdentity that was created or retrieved. + * + * Generated from protobuf field .google.cloud.tpu.v2.ServiceIdentity identity = 1; + */ + protected $identity = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Tpu\V2\ServiceIdentity $identity + * ServiceIdentity that was created or retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * ServiceIdentity that was created or retrieved. + * + * Generated from protobuf field .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @return \Google\Cloud\Tpu\V2\ServiceIdentity|null + */ + public function getIdentity() + { + return $this->identity; + } + + public function hasIdentity() + { + return isset($this->identity); + } + + public function clearIdentity() + { + unset($this->identity); + } + + /** + * ServiceIdentity that was created or retrieved. + * + * Generated from protobuf field .google.cloud.tpu.v2.ServiceIdentity identity = 1; + * @param \Google\Cloud\Tpu\V2\ServiceIdentity $var + * @return $this + */ + public function setIdentity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\ServiceIdentity::class); + $this->identity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php new file mode 100644 index 000000000000..55bb38fc7fac --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php @@ -0,0 +1,81 @@ +google.cloud.tpu.v2.GetAcceleratorTypeRequest + */ +class GetAcceleratorTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. Please see + * {@see TpuClient::acceleratorTypeName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\GetAcceleratorTypeRequest + * + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php new file mode 100644 index 000000000000..74e47599eae5 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php @@ -0,0 +1,139 @@ +google.cloud.tpu.v2.GetGuestAttributesRequest + */ +class GetGuestAttributesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The guest attributes path to be queried. + * + * Generated from protobuf field string query_path = 2; + */ + protected $query_path = ''; + /** + * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be + * returned. + * + * Generated from protobuf field repeated string worker_ids = 3; + */ + private $worker_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name. + * @type string $query_path + * The guest attributes path to be queried. + * @type array|\Google\Protobuf\Internal\RepeatedField $worker_ids + * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be + * returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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 guest attributes path to be queried. + * + * Generated from protobuf field string query_path = 2; + * @return string + */ + public function getQueryPath() + { + return $this->query_path; + } + + /** + * The guest attributes path to be queried. + * + * Generated from protobuf field string query_path = 2; + * @param string $var + * @return $this + */ + public function setQueryPath($var) + { + GPBUtil::checkString($var, True); + $this->query_path = $var; + + return $this; + } + + /** + * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be + * returned. + * + * Generated from protobuf field repeated string worker_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkerIds() + { + return $this->worker_ids; + } + + /** + * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be + * returned. + * + * Generated from protobuf field repeated string worker_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkerIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->worker_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php new file mode 100644 index 000000000000..7765fae22da7 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php @@ -0,0 +1,68 @@ +google.cloud.tpu.v2.GetGuestAttributesResponse + */ +class GetGuestAttributesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The guest attributes for the TPU workers. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + */ + private $guest_attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Tpu\V2\GuestAttributes>|\Google\Protobuf\Internal\RepeatedField $guest_attributes + * The guest attributes for the TPU workers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The guest attributes for the TPU workers. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGuestAttributes() + { + return $this->guest_attributes; + } + + /** + * The guest attributes for the TPU workers. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; + * @param array<\Google\Cloud\Tpu\V2\GuestAttributes>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGuestAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\GuestAttributes::class); + $this->guest_attributes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php new file mode 100644 index 000000000000..087299e90ca2 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php @@ -0,0 +1,81 @@ +google.cloud.tpu.v2.GetNodeRequest + */ +class GetNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. Please see + * {@see TpuClient::nodeName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\GetNodeRequest + * + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php new file mode 100644 index 000000000000..dde6c2194dd2 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php @@ -0,0 +1,81 @@ +google.cloud.tpu.v2.GetRuntimeVersionRequest + */ +class GetRuntimeVersionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. Please see + * {@see TpuClient::runtimeVersionName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\GetRuntimeVersionRequest + * + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php new file mode 100644 index 000000000000..b87b881016a1 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php @@ -0,0 +1,119 @@ +google.cloud.tpu.v2.GuestAttributes + */ +class GuestAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * The path to be queried. This can be the default namespace ('/') or a + * nested namespace ('/\/') or a specified key + * ('/\/\') + * + * Generated from protobuf field string query_path = 1; + */ + protected $query_path = ''; + /** + * The value of the requested queried path. + * + * Generated from protobuf field .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + */ + protected $query_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_path + * The path to be queried. This can be the default namespace ('/') or a + * nested namespace ('/\/') or a specified key + * ('/\/\') + * @type \Google\Cloud\Tpu\V2\GuestAttributesValue $query_value + * The value of the requested queried path. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The path to be queried. This can be the default namespace ('/') or a + * nested namespace ('/\/') or a specified key + * ('/\/\') + * + * Generated from protobuf field string query_path = 1; + * @return string + */ + public function getQueryPath() + { + return $this->query_path; + } + + /** + * The path to be queried. This can be the default namespace ('/') or a + * nested namespace ('/\/') or a specified key + * ('/\/\') + * + * Generated from protobuf field string query_path = 1; + * @param string $var + * @return $this + */ + public function setQueryPath($var) + { + GPBUtil::checkString($var, True); + $this->query_path = $var; + + return $this; + } + + /** + * The value of the requested queried path. + * + * Generated from protobuf field .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @return \Google\Cloud\Tpu\V2\GuestAttributesValue|null + */ + public function getQueryValue() + { + return $this->query_value; + } + + public function hasQueryValue() + { + return isset($this->query_value); + } + + public function clearQueryValue() + { + unset($this->query_value); + } + + /** + * The value of the requested queried path. + * + * Generated from protobuf field .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; + * @param \Google\Cloud\Tpu\V2\GuestAttributesValue $var + * @return $this + */ + public function setQueryValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\GuestAttributesValue::class); + $this->query_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php new file mode 100644 index 000000000000..e854d48559e5 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php @@ -0,0 +1,135 @@ +google.cloud.tpu.v2.GuestAttributesEntry + */ +class GuestAttributesEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Namespace for the guest attribute entry. + * + * Generated from protobuf field string namespace = 1; + */ + protected $namespace = ''; + /** + * Key for the guest attribute entry. + * + * Generated from protobuf field string key = 2; + */ + protected $key = ''; + /** + * Value for the guest attribute entry. + * + * Generated from protobuf field string value = 3; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $namespace + * Namespace for the guest attribute entry. + * @type string $key + * Key for the guest attribute entry. + * @type string $value + * Value for the guest attribute entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Namespace for the guest attribute entry. + * + * Generated from protobuf field string namespace = 1; + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Namespace for the guest attribute entry. + * + * Generated from protobuf field string namespace = 1; + * @param string $var + * @return $this + */ + public function setNamespace($var) + { + GPBUtil::checkString($var, True); + $this->namespace = $var; + + return $this; + } + + /** + * Key for the guest attribute entry. + * + * Generated from protobuf field string key = 2; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Key for the guest attribute entry. + * + * Generated from protobuf field string key = 2; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Value for the guest attribute entry. + * + * Generated from protobuf field string value = 3; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Value for the guest attribute entry. + * + * Generated from protobuf field string value = 3; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php new file mode 100644 index 000000000000..38a060bdb1c3 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v2.GuestAttributesValue + */ +class GuestAttributesValue extends \Google\Protobuf\Internal\Message +{ + /** + * The list of guest attributes entries. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Tpu\V2\GuestAttributesEntry>|\Google\Protobuf\Internal\RepeatedField $items + * The list of guest attributes entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The list of guest attributes entries. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * The list of guest attributes entries. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; + * @param array<\Google\Cloud\Tpu\V2\GuestAttributesEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\GuestAttributesEntry::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php new file mode 100644 index 000000000000..e9bc2618b215 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php @@ -0,0 +1,218 @@ +google.cloud.tpu.v2.ListAcceleratorTypesRequest + */ +class ListAcceleratorTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource name. Please see + * {@see TpuClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\ListAcceleratorTypesRequest + * + * @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 name. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * List filter. + * @type string $order_by + * Sort results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * 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; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php new file mode 100644 index 000000000000..da739205691f --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php @@ -0,0 +1,136 @@ +google.cloud.tpu.v2.ListAcceleratorTypesResponse + */ +class ListAcceleratorTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + */ + private $accelerator_types; + /** + * The next page token or empty if none. + * + * 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 array<\Google\Cloud\Tpu\V2\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $accelerator_types + * The listed nodes. + * @type string $next_page_token + * The next page token or empty if none. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAcceleratorTypes() + { + return $this->accelerator_types; + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; + * @param array<\Google\Cloud\Tpu\V2\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAcceleratorTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\AcceleratorType::class); + $this->accelerator_types = $arr; + + return $this; + } + + /** + * The next page token or empty if none. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next page token or empty if none. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php new file mode 100644 index 000000000000..5c500f37efd3 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php @@ -0,0 +1,149 @@ +google.cloud.tpu.v2.ListNodesRequest + */ +class ListNodesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource name. Please see + * {@see TpuClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\ListNodesRequest + * + * @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 name. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php new file mode 100644 index 000000000000..de31a212e25f --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php @@ -0,0 +1,135 @@ +google.cloud.tpu.v2.ListNodesResponse + */ +class ListNodesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.Node nodes = 1; + */ + private $nodes; + /** + * The next page token or empty if none. + * + * 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 array<\Google\Cloud\Tpu\V2\Node>|\Google\Protobuf\Internal\RepeatedField $nodes + * The listed nodes. + * @type string $next_page_token + * The next page token or empty if none. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.Node nodes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.Node nodes = 1; + * @param array<\Google\Cloud\Tpu\V2\Node>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\Node::class); + $this->nodes = $arr; + + return $this; + } + + /** + * The next page token or empty if none. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next page token or empty if none. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php new file mode 100644 index 000000000000..fd9596d6d199 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php @@ -0,0 +1,218 @@ +google.cloud.tpu.v2.ListRuntimeVersionsRequest + */ +class ListRuntimeVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource name. Please see + * {@see TpuClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Tpu\V2\ListRuntimeVersionsRequest + * + * @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 name. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * List filter. + * @type string $order_by + * Sort results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * 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; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. + * + * Generated from protobuf field string order_by = 6; + * @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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php new file mode 100644 index 000000000000..30b41ec3e8a9 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php @@ -0,0 +1,136 @@ +google.cloud.tpu.v2.ListRuntimeVersionsResponse + */ +class ListRuntimeVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + */ + private $runtime_versions; + /** + * The next page token or empty if none. + * + * 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 array<\Google\Cloud\Tpu\V2\RuntimeVersion>|\Google\Protobuf\Internal\RepeatedField $runtime_versions + * The listed nodes. + * @type string $next_page_token + * The next page token or empty if none. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRuntimeVersions() + { + return $this->runtime_versions; + } + + /** + * The listed nodes. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; + * @param array<\Google\Cloud\Tpu\V2\RuntimeVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRuntimeVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\RuntimeVersion::class); + $this->runtime_versions = $arr; + + return $this; + } + + /** + * The next page token or empty if none. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next page token or empty if none. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php new file mode 100644 index 000000000000..34fdb30cd9e8 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php @@ -0,0 +1,197 @@ +google.cloud.tpu.v2.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the network for the TPU node. It must be a preexisting Google + * Compute Engine network. If none is provided, "default" will be used. + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * The name of the subnetwork for the TPU node. It must be a preexisting + * Google Compute Engine subnetwork. If none is provided, "default" will be + * used. + * + * Generated from protobuf field string subnetwork = 2; + */ + protected $subnetwork = ''; + /** + * Indicates that external IP addresses would be associated with the TPU + * workers. If set to false, the specified subnetwork or network should have + * Private Google Access enabled. + * + * Generated from protobuf field bool enable_external_ips = 3; + */ + protected $enable_external_ips = false; + /** + * Allows the TPU node to send and receive packets with non-matching + * destination or source IPs. This is required if you plan to use the TPU + * workers to forward routes. + * + * Generated from protobuf field bool can_ip_forward = 4; + */ + protected $can_ip_forward = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The name of the network for the TPU node. It must be a preexisting Google + * Compute Engine network. If none is provided, "default" will be used. + * @type string $subnetwork + * The name of the subnetwork for the TPU node. It must be a preexisting + * Google Compute Engine subnetwork. If none is provided, "default" will be + * used. + * @type bool $enable_external_ips + * Indicates that external IP addresses would be associated with the TPU + * workers. If set to false, the specified subnetwork or network should have + * Private Google Access enabled. + * @type bool $can_ip_forward + * Allows the TPU node to send and receive packets with non-matching + * destination or source IPs. This is required if you plan to use the TPU + * workers to forward routes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The name of the network for the TPU node. It must be a preexisting Google + * Compute Engine network. If none is provided, "default" will be used. + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The name of the network for the TPU node. It must be a preexisting Google + * Compute Engine network. If none is provided, "default" will be used. + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The name of the subnetwork for the TPU node. It must be a preexisting + * Google Compute Engine subnetwork. If none is provided, "default" will be + * used. + * + * Generated from protobuf field string subnetwork = 2; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * The name of the subnetwork for the TPU node. It must be a preexisting + * Google Compute Engine subnetwork. If none is provided, "default" will be + * used. + * + * Generated from protobuf field string subnetwork = 2; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * Indicates that external IP addresses would be associated with the TPU + * workers. If set to false, the specified subnetwork or network should have + * Private Google Access enabled. + * + * Generated from protobuf field bool enable_external_ips = 3; + * @return bool + */ + public function getEnableExternalIps() + { + return $this->enable_external_ips; + } + + /** + * Indicates that external IP addresses would be associated with the TPU + * workers. If set to false, the specified subnetwork or network should have + * Private Google Access enabled. + * + * Generated from protobuf field bool enable_external_ips = 3; + * @param bool $var + * @return $this + */ + public function setEnableExternalIps($var) + { + GPBUtil::checkBool($var); + $this->enable_external_ips = $var; + + return $this; + } + + /** + * Allows the TPU node to send and receive packets with non-matching + * destination or source IPs. This is required if you plan to use the TPU + * workers to forward routes. + * + * Generated from protobuf field bool can_ip_forward = 4; + * @return bool + */ + public function getCanIpForward() + { + return $this->can_ip_forward; + } + + /** + * Allows the TPU node to send and receive packets with non-matching + * destination or source IPs. This is required if you plan to use the TPU + * workers to forward routes. + * + * Generated from protobuf field bool can_ip_forward = 4; + * @param bool $var + * @return $this + */ + public function setCanIpForward($var) + { + GPBUtil::checkBool($var); + $this->can_ip_forward = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php new file mode 100644 index 000000000000..96c0447e55ce --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php @@ -0,0 +1,145 @@ +google.cloud.tpu.v2.NetworkEndpoint + */ +class NetworkEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * The internal IP address of this network endpoint. + * + * Generated from protobuf field string ip_address = 1; + */ + protected $ip_address = ''; + /** + * The port of this network endpoint. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + /** + * The access config for the TPU worker. + * + * Generated from protobuf field .google.cloud.tpu.v2.AccessConfig access_config = 5; + */ + protected $access_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * The internal IP address of this network endpoint. + * @type int $port + * The port of this network endpoint. + * @type \Google\Cloud\Tpu\V2\AccessConfig $access_config + * The access config for the TPU worker. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The internal IP address of this network endpoint. + * + * Generated from protobuf field string ip_address = 1; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The internal IP address of this network endpoint. + * + * Generated from protobuf field string ip_address = 1; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The port of this network endpoint. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * The port of this network endpoint. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * The access config for the TPU worker. + * + * Generated from protobuf field .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @return \Google\Cloud\Tpu\V2\AccessConfig|null + */ + public function getAccessConfig() + { + return $this->access_config; + } + + public function hasAccessConfig() + { + return isset($this->access_config); + } + + public function clearAccessConfig() + { + unset($this->access_config); + } + + /** + * The access config for the TPU worker. + * + * Generated from protobuf field .google.cloud.tpu.v2.AccessConfig access_config = 5; + * @param \Google\Cloud\Tpu\V2\AccessConfig $var + * @return $this + */ + public function setAccessConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\AccessConfig::class); + $this->access_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php new file mode 100644 index 000000000000..d8cb3157b607 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php @@ -0,0 +1,965 @@ +google.cloud.tpu.v2.Node + */ +class Node extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Immutable. The name of the TPU. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The user-supplied description of the TPU. Maximum of 512 characters. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Optional. The type of hardware accelerators associated with this node. + * + * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $accelerator_type = ''; + /** + * Output only. The current state for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * + * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_description = ''; + /** + * Required. The runtime version running in the Node. + * + * Generated from protobuf field string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $runtime_version = ''; + /** + * Network configurations for the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v2.NetworkConfig network_config = 36; + */ + protected $network_config = null; + /** + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * + * Generated from protobuf field string cidr_block = 13; + */ + protected $cidr_block = ''; + /** + * The Google Cloud Platform Service Account to be used by the TPU node VMs. + * If None is specified, the default compute service account will be used. + * + * Generated from protobuf field .google.cloud.tpu.v2.ServiceAccount service_account = 37; + */ + protected $service_account = null; + /** + * Output only. The time when the node was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * The scheduling options for this node. + * + * Generated from protobuf field .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + */ + protected $scheduling_config = null; + /** + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that runtime clients of the node reach out + * to the 0th entry in this map first. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $network_endpoints; + /** + * The health status of the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.Health health = 22; + */ + protected $health = 0; + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 24; + */ + private $labels; + /** + * Custom metadata to apply to the TPU Node. + * Can set startup-script and shutdown-script + * + * Generated from protobuf field map metadata = 34; + */ + private $metadata; + /** + * Tags to apply to the TPU Node. Tags are used to identify valid sources or + * targets for network firewalls. + * + * Generated from protobuf field repeated string tags = 40; + */ + private $tags; + /** + * Output only. The unique identifier for the TPU Node. + * + * Generated from protobuf field int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = 0; + /** + * The additional data disks for the Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + */ + private $data_disks; + /** + * Output only. The API version that created this Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = 0; + /** + * Output only. The Symptoms that have occurred to the TPU Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $symptoms; + /** + * Shielded Instance options. + * + * Generated from protobuf field .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + */ + protected $shielded_instance_config = null; + /** + * The AccleratorConfig for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig accelerator_config = 46; + */ + protected $accelerator_config = null; + /** + * Output only. The qualified name of the QueuedResource that requested this + * Node. + * + * Generated from protobuf field string queued_resource = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $queued_resource = ''; + /** + * Output only. Whether the Node belongs to a Multislice group. + * + * Generated from protobuf field bool multislice_node = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $multislice_node = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Immutable. The name of the TPU. + * @type string $description + * The user-supplied description of the TPU. Maximum of 512 characters. + * @type string $accelerator_type + * Optional. The type of hardware accelerators associated with this node. + * @type int $state + * Output only. The current state for the TPU Node. + * @type string $health_description + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * @type string $runtime_version + * Required. The runtime version running in the Node. + * @type \Google\Cloud\Tpu\V2\NetworkConfig $network_config + * Network configurations for the TPU node. + * @type string $cidr_block + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * @type \Google\Cloud\Tpu\V2\ServiceAccount $service_account + * The Google Cloud Platform Service Account to be used by the TPU node VMs. + * If None is specified, the default compute service account will be used. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the node was created. + * @type \Google\Cloud\Tpu\V2\SchedulingConfig $scheduling_config + * The scheduling options for this node. + * @type array<\Google\Cloud\Tpu\V2\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $network_endpoints + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that runtime clients of the node reach out + * to the 0th entry in this map first. + * @type int $health + * The health status of the TPU node. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user-provided metadata. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Custom metadata to apply to the TPU Node. + * Can set startup-script and shutdown-script + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Tags to apply to the TPU Node. Tags are used to identify valid sources or + * targets for network firewalls. + * @type int|string $id + * Output only. The unique identifier for the TPU Node. + * @type array<\Google\Cloud\Tpu\V2\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $data_disks + * The additional data disks for the Node. + * @type int $api_version + * Output only. The API version that created this Node. + * @type array<\Google\Cloud\Tpu\V2\Symptom>|\Google\Protobuf\Internal\RepeatedField $symptoms + * Output only. The Symptoms that have occurred to the TPU Node. + * @type \Google\Cloud\Tpu\V2\ShieldedInstanceConfig $shielded_instance_config + * Shielded Instance options. + * @type \Google\Cloud\Tpu\V2\AcceleratorConfig $accelerator_config + * The AccleratorConfig for the TPU Node. + * @type string $queued_resource + * Output only. The qualified name of the QueuedResource that requested this + * Node. + * @type bool $multislice_node + * Output only. Whether the Node belongs to a Multislice group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Immutable. The name of the TPU. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Immutable. The name of the TPU. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The user-supplied description of the TPU. Maximum of 512 characters. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The user-supplied description of the TPU. Maximum of 512 characters. + * + * 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; + } + + /** + * Optional. The type of hardware accelerators associated with this node. + * + * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAcceleratorType() + { + return $this->accelerator_type; + } + + /** + * Optional. The type of hardware accelerators associated with this node. + * + * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAcceleratorType($var) + { + GPBUtil::checkString($var, True); + $this->accelerator_type = $var; + + return $this; + } + + /** + * Output only. The current state for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Node\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * + * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHealthDescription() + { + return $this->health_description; + } + + /** + * Output only. If this field is populated, it contains a description of why + * the TPU Node is unhealthy. + * + * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHealthDescription($var) + { + GPBUtil::checkString($var, True); + $this->health_description = $var; + + return $this; + } + + /** + * Required. The runtime version running in the Node. + * + * Generated from protobuf field string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRuntimeVersion() + { + return $this->runtime_version; + } + + /** + * Required. The runtime version running in the Node. + * + * Generated from protobuf field string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRuntimeVersion($var) + { + GPBUtil::checkString($var, True); + $this->runtime_version = $var; + + return $this; + } + + /** + * Network configurations for the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @return \Google\Cloud\Tpu\V2\NetworkConfig|null + */ + public function getNetworkConfig() + { + return $this->network_config; + } + + public function hasNetworkConfig() + { + return isset($this->network_config); + } + + public function clearNetworkConfig() + { + unset($this->network_config); + } + + /** + * Network configurations for the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v2.NetworkConfig network_config = 36; + * @param \Google\Cloud\Tpu\V2\NetworkConfig $var + * @return $this + */ + public function setNetworkConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\NetworkConfig::class); + $this->network_config = $var; + + return $this; + } + + /** + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * + * Generated from protobuf field string cidr_block = 13; + * @return string + */ + public function getCidrBlock() + { + return $this->cidr_block; + } + + /** + * The CIDR block that the TPU node will use when selecting an IP address. + * This CIDR block must be a /29 block; the Compute Engine networks API + * forbids a smaller block, and using a larger block would be wasteful (a + * node can only consume one IP address). Errors will occur if the CIDR block + * has already been used for a currently existing TPU node, the CIDR block + * conflicts with any subnetworks in the user's provided network, or the + * provided network is peered with another network that is using that CIDR + * block. + * + * Generated from protobuf field string cidr_block = 13; + * @param string $var + * @return $this + */ + public function setCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cidr_block = $var; + + return $this; + } + + /** + * The Google Cloud Platform Service Account to be used by the TPU node VMs. + * If None is specified, the default compute service account will be used. + * + * Generated from protobuf field .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @return \Google\Cloud\Tpu\V2\ServiceAccount|null + */ + public function getServiceAccount() + { + return $this->service_account; + } + + public function hasServiceAccount() + { + return isset($this->service_account); + } + + public function clearServiceAccount() + { + unset($this->service_account); + } + + /** + * The Google Cloud Platform Service Account to be used by the TPU node VMs. + * If None is specified, the default compute service account will be used. + * + * Generated from protobuf field .google.cloud.tpu.v2.ServiceAccount service_account = 37; + * @param \Google\Cloud\Tpu\V2\ServiceAccount $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\ServiceAccount::class); + $this->service_account = $var; + + return $this; + } + + /** + * Output only. The time when the node was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the node was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The scheduling options for this node. + * + * Generated from protobuf field .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @return \Google\Cloud\Tpu\V2\SchedulingConfig|null + */ + public function getSchedulingConfig() + { + return $this->scheduling_config; + } + + public function hasSchedulingConfig() + { + return isset($this->scheduling_config); + } + + public function clearSchedulingConfig() + { + unset($this->scheduling_config); + } + + /** + * The scheduling options for this node. + * + * Generated from protobuf field .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; + * @param \Google\Cloud\Tpu\V2\SchedulingConfig $var + * @return $this + */ + public function setSchedulingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\SchedulingConfig::class); + $this->scheduling_config = $var; + + return $this; + } + + /** + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that runtime clients of the node reach out + * to the 0th entry in this map first. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkEndpoints() + { + return $this->network_endpoints; + } + + /** + * Output only. The network endpoints where TPU workers can be accessed and + * sent work. It is recommended that runtime clients of the node reach out + * to the 0th entry in this map first. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Tpu\V2\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\NetworkEndpoint::class); + $this->network_endpoints = $arr; + + return $this; + } + + /** + * The health status of the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.Health health = 22; + * @return int + */ + public function getHealth() + { + return $this->health; + } + + /** + * The health status of the TPU node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.Health health = 22; + * @param int $var + * @return $this + */ + public function setHealth($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Node\Health::class); + $this->health = $var; + + return $this; + } + + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 24; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 24; + * @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; + } + + /** + * Custom metadata to apply to the TPU Node. + * Can set startup-script and shutdown-script + * + * Generated from protobuf field map metadata = 34; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Custom metadata to apply to the TPU Node. + * Can set startup-script and shutdown-script + * + * Generated from protobuf field map metadata = 34; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Tags to apply to the TPU Node. Tags are used to identify valid sources or + * targets for network firewalls. + * + * Generated from protobuf field repeated string tags = 40; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Tags to apply to the TPU Node. Tags are used to identify valid sources or + * targets for network firewalls. + * + * Generated from protobuf field repeated string tags = 40; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Output only. The unique identifier for the TPU Node. + * + * Generated from protobuf field int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. The unique identifier for the TPU Node. + * + * Generated from protobuf field int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * The additional data disks for the Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataDisks() + { + return $this->data_disks; + } + + /** + * The additional data disks for the Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; + * @param array<\Google\Cloud\Tpu\V2\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\AttachedDisk::class); + $this->data_disks = $arr; + + return $this; + } + + /** + * Output only. The API version that created this Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. The API version that created this Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Node\ApiVersion::class); + $this->api_version = $var; + + return $this; + } + + /** + * Output only. The Symptoms that have occurred to the TPU Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSymptoms() + { + return $this->symptoms; + } + + /** + * Output only. The Symptoms that have occurred to the TPU Node. + * + * Generated from protobuf field repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Tpu\V2\Symptom>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSymptoms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\Symptom::class); + $this->symptoms = $arr; + + return $this; + } + + /** + * Shielded Instance options. + * + * Generated from protobuf field .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @return \Google\Cloud\Tpu\V2\ShieldedInstanceConfig|null + */ + public function getShieldedInstanceConfig() + { + return $this->shielded_instance_config; + } + + public function hasShieldedInstanceConfig() + { + return isset($this->shielded_instance_config); + } + + public function clearShieldedInstanceConfig() + { + unset($this->shielded_instance_config); + } + + /** + * Shielded Instance options. + * + * Generated from protobuf field .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; + * @param \Google\Cloud\Tpu\V2\ShieldedInstanceConfig $var + * @return $this + */ + public function setShieldedInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\ShieldedInstanceConfig::class); + $this->shielded_instance_config = $var; + + return $this; + } + + /** + * The AccleratorConfig for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig accelerator_config = 46; + * @return \Google\Cloud\Tpu\V2\AcceleratorConfig|null + */ + public function getAcceleratorConfig() + { + return $this->accelerator_config; + } + + public function hasAcceleratorConfig() + { + return isset($this->accelerator_config); + } + + public function clearAcceleratorConfig() + { + unset($this->accelerator_config); + } + + /** + * The AccleratorConfig for the TPU Node. + * + * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig accelerator_config = 46; + * @param \Google\Cloud\Tpu\V2\AcceleratorConfig $var + * @return $this + */ + public function setAcceleratorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\AcceleratorConfig::class); + $this->accelerator_config = $var; + + return $this; + } + + /** + * Output only. The qualified name of the QueuedResource that requested this + * Node. + * + * Generated from protobuf field string queued_resource = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getQueuedResource() + { + return $this->queued_resource; + } + + /** + * Output only. The qualified name of the QueuedResource that requested this + * Node. + * + * Generated from protobuf field string queued_resource = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setQueuedResource($var) + { + GPBUtil::checkString($var, True); + $this->queued_resource = $var; + + return $this; + } + + /** + * Output only. Whether the Node belongs to a Multislice group. + * + * Generated from protobuf field bool multislice_node = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getMultisliceNode() + { + return $this->multislice_node; + } + + /** + * Output only. Whether the Node belongs to a Multislice group. + * + * Generated from protobuf field bool multislice_node = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setMultisliceNode($var) + { + GPBUtil::checkBool($var); + $this->multislice_node = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php new file mode 100644 index 000000000000..61fc55ced296 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php @@ -0,0 +1,78 @@ +google.cloud.tpu.v2.Node.ApiVersion + */ +class ApiVersion +{ + /** + * API version is unknown. + * + * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; + */ + const API_VERSION_UNSPECIFIED = 0; + /** + * TPU API V1Alpha1 version. + * + * Generated from protobuf enum V1_ALPHA1 = 1; + */ + const V1_ALPHA1 = 1; + /** + * TPU API V1 version. + * + * Generated from protobuf enum V1 = 2; + */ + const V1 = 2; + /** + * TPU API V2Alpha1 version. + * + * Generated from protobuf enum V2_ALPHA1 = 3; + */ + const V2_ALPHA1 = 3; + /** + * TPU API V2 version. + * + * Generated from protobuf enum V2 = 4; + */ + const V2 = 4; + + private static $valueToName = [ + self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', + self::V1_ALPHA1 => 'V1_ALPHA1', + self::V1 => 'V1', + self::V2_ALPHA1 => 'V2_ALPHA1', + self::V2 => 'V2', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ApiVersion::class, \Google\Cloud\Tpu\V2\Node_ApiVersion::class); + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php new file mode 100644 index 000000000000..0c29dd2c488a --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php @@ -0,0 +1,80 @@ +google.cloud.tpu.v2.Node.Health + */ +class Health +{ + /** + * Health status is unknown: not initialized or failed to retrieve. + * + * Generated from protobuf enum HEALTH_UNSPECIFIED = 0; + */ + const HEALTH_UNSPECIFIED = 0; + /** + * The resource is healthy. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * The resource is unresponsive. + * + * Generated from protobuf enum TIMEOUT = 3; + */ + const TIMEOUT = 3; + /** + * The in-guest ML stack is unhealthy. + * + * Generated from protobuf enum UNHEALTHY_TENSORFLOW = 4; + */ + const UNHEALTHY_TENSORFLOW = 4; + /** + * The node is under maintenance/priority boost caused rescheduling and + * will resume running once rescheduled. + * + * Generated from protobuf enum UNHEALTHY_MAINTENANCE = 5; + */ + const UNHEALTHY_MAINTENANCE = 5; + + private static $valueToName = [ + self::HEALTH_UNSPECIFIED => 'HEALTH_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::TIMEOUT => 'TIMEOUT', + self::UNHEALTHY_TENSORFLOW => 'UNHEALTHY_TENSORFLOW', + self::UNHEALTHY_MAINTENANCE => 'UNHEALTHY_MAINTENANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Health::class, \Google\Cloud\Tpu\V2\Node_Health::class); + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php new file mode 100644 index 000000000000..79805f3f2f91 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php @@ -0,0 +1,150 @@ +google.cloud.tpu.v2.Node.State + */ +class State +{ + /** + * TPU node state is not known/set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * TPU node is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * TPU node has been created. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * TPU node is restarting. + * + * Generated from protobuf enum RESTARTING = 3; + */ + const RESTARTING = 3; + /** + * TPU node is undergoing reimaging. + * + * Generated from protobuf enum REIMAGING = 4; + */ + const REIMAGING = 4; + /** + * TPU node is being deleted. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * TPU node is being repaired and may be unusable. Details can be + * found in the 'help_description' field. + * + * Generated from protobuf enum REPAIRING = 6; + */ + const REPAIRING = 6; + /** + * TPU node is stopped. + * + * Generated from protobuf enum STOPPED = 8; + */ + const STOPPED = 8; + /** + * TPU node is currently stopping. + * + * Generated from protobuf enum STOPPING = 9; + */ + const STOPPING = 9; + /** + * TPU node is currently starting. + * + * Generated from protobuf enum STARTING = 10; + */ + const STARTING = 10; + /** + * TPU node has been preempted. Only applies to Preemptible TPU Nodes. + * + * Generated from protobuf enum PREEMPTED = 11; + */ + const PREEMPTED = 11; + /** + * TPU node has been terminated due to maintenance or has reached the end of + * its life cycle (for preemptible nodes). + * + * Generated from protobuf enum TERMINATED = 12; + */ + const TERMINATED = 12; + /** + * TPU node is currently hiding. + * + * Generated from protobuf enum HIDING = 13; + */ + const HIDING = 13; + /** + * TPU node has been hidden. + * + * Generated from protobuf enum HIDDEN = 14; + */ + const HIDDEN = 14; + /** + * TPU node is currently unhiding. + * + * Generated from protobuf enum UNHIDING = 15; + */ + const UNHIDING = 15; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::RESTARTING => 'RESTARTING', + self::REIMAGING => 'REIMAGING', + self::DELETING => 'DELETING', + self::REPAIRING => 'REPAIRING', + self::STOPPED => 'STOPPED', + self::STOPPING => 'STOPPING', + self::STARTING => 'STARTING', + self::PREEMPTED => 'PREEMPTED', + self::TERMINATED => 'TERMINATED', + self::HIDING => 'HIDING', + self::HIDDEN => 'HIDDEN', + self::UNHIDING => 'UNHIDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Tpu\V2\Node_State::class); + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php new file mode 100644 index 000000000000..a379c95e6f14 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php @@ -0,0 +1,295 @@ +google.cloud.tpu.v2.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + */ + protected $status_detail = ''; + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + */ + protected $cancel_requested = false; + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_detail + * Human-readable status of the operation, if any. + * @type bool $cancel_requested + * Specifies if cancellation was requested for the operation. + * @type string $api_version + * API version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * 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 operation finished running. + * + * 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; + } + + /** + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target of the operation - for example + * projects/project-1/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + * @return string + */ + public function getStatusDetail() + { + return $this->status_detail; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + * @param string $var + * @return $this + */ + public function setStatusDetail($var) + { + GPBUtil::checkString($var, True); + $this->status_detail = $var; + + return $this; + } + + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + * @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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php new file mode 100644 index 000000000000..f22ae02ff60d --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v2.RuntimeVersion + */ +class RuntimeVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The runtime version. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name. + * @type string $version + * The runtime version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The resource name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name. + * + * 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 runtime version. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The runtime version. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php new file mode 100644 index 000000000000..b4da318b761c --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php @@ -0,0 +1,101 @@ +google.cloud.tpu.v2.SchedulingConfig + */ +class SchedulingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines whether the node is preemptible. + * + * Generated from protobuf field bool preemptible = 1; + */ + protected $preemptible = false; + /** + * Whether the node is created under a reservation. + * + * Generated from protobuf field bool reserved = 2; + */ + protected $reserved = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $preemptible + * Defines whether the node is preemptible. + * @type bool $reserved + * Whether the node is created under a reservation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Defines whether the node is preemptible. + * + * Generated from protobuf field bool preemptible = 1; + * @return bool + */ + public function getPreemptible() + { + return $this->preemptible; + } + + /** + * Defines whether the node is preemptible. + * + * Generated from protobuf field bool preemptible = 1; + * @param bool $var + * @return $this + */ + public function setPreemptible($var) + { + GPBUtil::checkBool($var); + $this->preemptible = $var; + + return $this; + } + + /** + * Whether the node is created under a reservation. + * + * Generated from protobuf field bool reserved = 2; + * @return bool + */ + public function getReserved() + { + return $this->reserved; + } + + /** + * Whether the node is created under a reservation. + * + * Generated from protobuf field bool reserved = 2; + * @param bool $var + * @return $this + */ + public function setReserved($var) + { + GPBUtil::checkBool($var); + $this->reserved = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php new file mode 100644 index 000000000000..d60a1baef2b7 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php @@ -0,0 +1,109 @@ +google.cloud.tpu.v2.ServiceAccount + */ +class ServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Email address of the service account. If empty, default Compute service + * account will be used. + * + * Generated from protobuf field string email = 1; + */ + protected $email = ''; + /** + * The list of scopes to be made available for this service account. If empty, + * access to all Cloud APIs will be allowed. + * + * Generated from protobuf field repeated string scope = 2; + */ + private $scope; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Email address of the service account. If empty, default Compute service + * account will be used. + * @type array|\Google\Protobuf\Internal\RepeatedField $scope + * The list of scopes to be made available for this service account. If empty, + * access to all Cloud APIs will be allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Email address of the service account. If empty, default Compute service + * account will be used. + * + * Generated from protobuf field string email = 1; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Email address of the service account. If empty, default Compute service + * account will be used. + * + * Generated from protobuf field string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * The list of scopes to be made available for this service account. If empty, + * access to all Cloud APIs will be allowed. + * + * Generated from protobuf field repeated string scope = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScope() + { + return $this->scope; + } + + /** + * The list of scopes to be made available for this service account. If empty, + * access to all Cloud APIs will be allowed. + * + * Generated from protobuf field repeated string scope = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScope($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scope = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php new file mode 100644 index 000000000000..2e2ead14fdfd --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v2.ServiceIdentity + */ +class ServiceIdentity extends \Google\Protobuf\Internal\Message +{ + /** + * The email address of the service identity. + * + * Generated from protobuf field string email = 1; + */ + protected $email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * The email address of the service identity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * The email address of the service identity. + * + * Generated from protobuf field string email = 1; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * The email address of the service identity. + * + * Generated from protobuf field string email = 1; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php new file mode 100644 index 000000000000..26d257130719 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v2.ShieldedInstanceConfig + */ +class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines whether the instance has Secure Boot enabled. + * + * Generated from protobuf field bool enable_secure_boot = 1; + */ + protected $enable_secure_boot = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_secure_boot + * Defines whether the instance has Secure Boot enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Defines whether the instance has Secure Boot enabled. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @return bool + */ + public function getEnableSecureBoot() + { + return $this->enable_secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @param bool $var + * @return $this + */ + public function setEnableSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->enable_secure_boot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php new file mode 100644 index 000000000000..31f7c5bc5c13 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v2.StartNodeRequest + */ +class StartNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php new file mode 100644 index 000000000000..ffa5a6bf091f --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php @@ -0,0 +1,67 @@ +google.cloud.tpu.v2.StopNodeRequest + */ +class StopNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name. + * + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name. + * + * 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. + * + * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php new file mode 100644 index 000000000000..647e1eb91a08 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php @@ -0,0 +1,179 @@ +google.cloud.tpu.v2.Symptom + */ +class Symptom extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp when the Symptom is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * Type of the Symptom. + * + * Generated from protobuf field .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + */ + protected $symptom_type = 0; + /** + * Detailed information of the current Symptom. + * + * Generated from protobuf field string details = 3; + */ + protected $details = ''; + /** + * A string used to uniquely distinguish a worker within a TPU node. + * + * Generated from protobuf field string worker_id = 4; + */ + protected $worker_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Timestamp when the Symptom is created. + * @type int $symptom_type + * Type of the Symptom. + * @type string $details + * Detailed information of the current Symptom. + * @type string $worker_id + * A string used to uniquely distinguish a worker within a TPU node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp when the Symptom is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Timestamp when the Symptom is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Type of the Symptom. + * + * Generated from protobuf field .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @return int + */ + public function getSymptomType() + { + return $this->symptom_type; + } + + /** + * Type of the Symptom. + * + * Generated from protobuf field .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; + * @param int $var + * @return $this + */ + public function setSymptomType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Symptom\SymptomType::class); + $this->symptom_type = $var; + + return $this; + } + + /** + * Detailed information of the current Symptom. + * + * Generated from protobuf field string details = 3; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Detailed information of the current Symptom. + * + * Generated from protobuf field string details = 3; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + + /** + * A string used to uniquely distinguish a worker within a TPU node. + * + * Generated from protobuf field string worker_id = 4; + * @return string + */ + public function getWorkerId() + { + return $this->worker_id; + } + + /** + * A string used to uniquely distinguish a worker within a TPU node. + * + * Generated from protobuf field string worker_id = 4; + * @param string $var + * @return $this + */ + public function setWorkerId($var) + { + GPBUtil::checkString($var, True); + $this->worker_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php new file mode 100644 index 000000000000..63ba37fe0b4c --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php @@ -0,0 +1,94 @@ +google.cloud.tpu.v2.Symptom.SymptomType + */ +class SymptomType +{ + /** + * Unspecified symptom. + * + * Generated from protobuf enum SYMPTOM_TYPE_UNSPECIFIED = 0; + */ + const SYMPTOM_TYPE_UNSPECIFIED = 0; + /** + * TPU VM memory is low. + * + * Generated from protobuf enum LOW_MEMORY = 1; + */ + const LOW_MEMORY = 1; + /** + * TPU runtime is out of memory. + * + * Generated from protobuf enum OUT_OF_MEMORY = 2; + */ + const OUT_OF_MEMORY = 2; + /** + * TPU runtime execution has timed out. + * + * Generated from protobuf enum EXECUTE_TIMED_OUT = 3; + */ + const EXECUTE_TIMED_OUT = 3; + /** + * TPU runtime fails to construct a mesh that recognizes each TPU device's + * neighbors. + * + * Generated from protobuf enum MESH_BUILD_FAIL = 4; + */ + const MESH_BUILD_FAIL = 4; + /** + * TPU HBM is out of memory. + * + * Generated from protobuf enum HBM_OUT_OF_MEMORY = 5; + */ + const HBM_OUT_OF_MEMORY = 5; + /** + * Abusive behaviors have been identified on the current project. + * + * Generated from protobuf enum PROJECT_ABUSE = 6; + */ + const PROJECT_ABUSE = 6; + + private static $valueToName = [ + self::SYMPTOM_TYPE_UNSPECIFIED => 'SYMPTOM_TYPE_UNSPECIFIED', + self::LOW_MEMORY => 'LOW_MEMORY', + self::OUT_OF_MEMORY => 'OUT_OF_MEMORY', + self::EXECUTE_TIMED_OUT => 'EXECUTE_TIMED_OUT', + self::MESH_BUILD_FAIL => 'MESH_BUILD_FAIL', + self::HBM_OUT_OF_MEMORY => 'HBM_OUT_OF_MEMORY', + self::PROJECT_ABUSE => 'PROJECT_ABUSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SymptomType::class, \Google\Cloud\Tpu\V2\Symptom_SymptomType::class); + diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php new file mode 100644 index 000000000000..ccf8a1a8a1aa --- /dev/null +++ b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php @@ -0,0 +1,146 @@ +google.cloud.tpu.v2.UpdateNodeRequest + */ +class UpdateNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields from [Node][Tpu.Node] to update. + * Supported fields: [description, tags, labels, metadata, + * network_config.enable_external_ips]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The node. Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node = null; + + /** + * @param \Google\Cloud\Tpu\V2\Node $node Required. The node. Only fields specified in update_mask are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields from [Node][Tpu.Node] to update. + * Supported fields: [description, tags, labels, metadata, + * network_config.enable_external_ips]. + * + * @return \Google\Cloud\Tpu\V2\UpdateNodeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Tpu\V2\Node $node, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNode($node) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields from [Node][Tpu.Node] to update. + * Supported fields: [description, tags, labels, metadata, + * network_config.enable_external_ips]. + * @type \Google\Cloud\Tpu\V2\Node $node + * Required. The node. Only fields specified in update_mask are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields from [Node][Tpu.Node] to update. + * Supported fields: [description, tags, labels, metadata, + * network_config.enable_external_ips]. + * + * 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. Mask of fields from [Node][Tpu.Node] to update. + * Supported fields: [description, tags, labels, metadata, + * network_config.enable_external_ips]. + * + * 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 node. Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Tpu\V2\Node|null + */ + public function getNode() + { + return $this->node; + } + + public function hasNode() + { + return isset($this->node); + } + + public function clearNode() + { + unset($this->node); + } + + /** + * Required. The node. Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Tpu\V2\Node $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\Node::class); + $this->node = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php new file mode 100644 index 000000000000..ce91ceaa31e5 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php @@ -0,0 +1,88 @@ +setRuntimeVersion($nodeRuntimeVersion); + $request = (new CreateNodeRequest()) + ->setParent($formattedParent) + ->setNode($node); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $tpuClient->createNode($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + $nodeRuntimeVersion = '[RUNTIME_VERSION]'; + + create_node_sample($formattedParent, $nodeRuntimeVersion); +} +// [END tpu_v2_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php new file mode 100644 index 000000000000..5fc7f8ceccef --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $tpuClient->deleteNode($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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + delete_node_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php new file mode 100644 index 000000000000..d2a38e6cbda0 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php @@ -0,0 +1,71 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var GenerateServiceIdentityResponse $response */ + $response = $tpuClient->generateServiceIdentity($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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + + generate_service_identity_sample($formattedParent); +} +// [END tpu_v2_generated_Tpu_GenerateServiceIdentity_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php new file mode 100644 index 000000000000..72be76c87df1 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AcceleratorType $response */ + $response = $tpuClient->getAcceleratorType($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 = TpuClient::acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + + get_accelerator_type_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php new file mode 100644 index 000000000000..b7db1bcc83a1 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GetGuestAttributesResponse $response */ + $response = $tpuClient->getGuestAttributes($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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + get_guest_attributes_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_GetGuestAttributes_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_location.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_location.php new file mode 100644 index 000000000000..d646747809a4 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/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 tpu_v2_generated_Tpu_GetLocation_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php new file mode 100644 index 000000000000..62de241f7e9f --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Node $response */ + $response = $tpuClient->getNode($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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + get_node_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php new file mode 100644 index 000000000000..7145700a02ce --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RuntimeVersion $response */ + $response = $tpuClient->getRuntimeVersion($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 = TpuClient::runtimeVersionName('[PROJECT]', '[LOCATION]', '[RUNTIME_VERSION]'); + + get_runtime_version_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_GetRuntimeVersion_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php new file mode 100644 index 000000000000..050e231be850 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $tpuClient->listAcceleratorTypes($request); + + /** @var AcceleratorType $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + + list_accelerator_types_sample($formattedParent); +} +// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_locations.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_locations.php new file mode 100644 index 000000000000..33ac01cf10e0 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/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 tpu_v2_generated_Tpu_ListLocations_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php new file mode 100644 index 000000000000..1aa01332f81e --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $tpuClient->listNodes($request); + + /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + + list_nodes_sample($formattedParent); +} +// [END tpu_v2_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php new file mode 100644 index 000000000000..334e1b0a7fe0 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $tpuClient->listRuntimeVersions($request); + + /** @var RuntimeVersion $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); + + list_runtime_versions_sample($formattedParent); +} +// [END tpu_v2_generated_Tpu_ListRuntimeVersions_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php new file mode 100644 index 000000000000..391c83536ebc --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $tpuClient->startNode($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + start_node_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php new file mode 100644 index 000000000000..089b68929429 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $tpuClient->stopNode($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + + stop_node_sample($formattedName); +} +// [END tpu_v2_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php new file mode 100644 index 000000000000..7509f0a2ee48 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php @@ -0,0 +1,87 @@ +setRuntimeVersion($nodeRuntimeVersion); + $request = (new UpdateNodeRequest()) + ->setUpdateMask($updateMask) + ->setNode($node); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $tpuClient->updateNode($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Node $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 +{ + $nodeRuntimeVersion = '[RUNTIME_VERSION]'; + + update_node_sample($nodeRuntimeVersion); +} +// [END tpu_v2_generated_Tpu_UpdateNode_sync] diff --git a/owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php b/owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php new file mode 100644 index 000000000000..3cac383a4256 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php @@ -0,0 +1,751 @@ + createNodeAsync(CreateNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNodeAsync(DeleteNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateServiceIdentityAsync(GenerateServiceIdentityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAcceleratorTypeAsync(GetAcceleratorTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGuestAttributesAsync(GetGuestAttributesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRuntimeVersionAsync(GetRuntimeVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAcceleratorTypesAsync(ListAcceleratorTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRuntimeVersionsAsync(ListRuntimeVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startNodeAsync(StartNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopNodeAsync(StopNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNodeAsync(UpdateNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class TpuClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.tpu.v2.Tpu'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'tpu.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'tpu.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/tpu_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/tpu_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/tpu_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/tpu_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 + * accelerator_type resource. + * + * @param string $project + * @param string $location + * @param string $acceleratorType + * + * @return string The formatted accelerator_type resource. + */ + public static function acceleratorTypeName(string $project, string $location, string $acceleratorType): string + { + return self::getPathTemplate('acceleratorType')->render([ + 'project' => $project, + 'location' => $location, + 'accelerator_type' => $acceleratorType, + ]); + } + + /** + * 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 node + * resource. + * + * @param string $project + * @param string $location + * @param string $node + * + * @return string The formatted node resource. + */ + public static function nodeName(string $project, string $location, string $node): string + { + return self::getPathTemplate('node')->render([ + 'project' => $project, + 'location' => $location, + 'node' => $node, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * runtime_version resource. + * + * @param string $project + * @param string $location + * @param string $runtimeVersion + * + * @return string The formatted runtime_version resource. + */ + public static function runtimeVersionName(string $project, string $location, string $runtimeVersion): string + { + return self::getPathTemplate('runtimeVersion')->render([ + 'project' => $project, + 'location' => $location, + 'runtime_version' => $runtimeVersion, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - acceleratorType: projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type} + * - location: projects/{project}/locations/{location} + * - node: projects/{project}/locations/{location}/nodes/{node} + * - runtimeVersion: projects/{project}/locations/{location}/runtimeVersions/{runtime_version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'tpu.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a node. + * + * The async variant is {@see TpuClient::createNodeAsync()} . + * + * @example samples/V2/TpuClient/create_node.php + * + * @param CreateNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createNode(CreateNodeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateNode', $request, $callOptions)->wait(); + } + + /** + * Deletes a node. + * + * The async variant is {@see TpuClient::deleteNodeAsync()} . + * + * @example samples/V2/TpuClient/delete_node.php + * + * @param DeleteNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteNode(DeleteNodeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNode', $request, $callOptions)->wait(); + } + + /** + * Generates the Cloud TPU service identity for the project. + * + * The async variant is {@see TpuClient::generateServiceIdentityAsync()} . + * + * @example samples/V2/TpuClient/generate_service_identity.php + * + * @param GenerateServiceIdentityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateServiceIdentityResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateServiceIdentity(GenerateServiceIdentityRequest $request, array $callOptions = []): GenerateServiceIdentityResponse + { + return $this->startApiCall('GenerateServiceIdentity', $request, $callOptions)->wait(); + } + + /** + * Gets AcceleratorType. + * + * The async variant is {@see TpuClient::getAcceleratorTypeAsync()} . + * + * @example samples/V2/TpuClient/get_accelerator_type.php + * + * @param GetAcceleratorTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AcceleratorType + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAcceleratorType(GetAcceleratorTypeRequest $request, array $callOptions = []): AcceleratorType + { + return $this->startApiCall('GetAcceleratorType', $request, $callOptions)->wait(); + } + + /** + * Retrieves the guest attributes for the node. + * + * The async variant is {@see TpuClient::getGuestAttributesAsync()} . + * + * @example samples/V2/TpuClient/get_guest_attributes.php + * + * @param GetGuestAttributesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GetGuestAttributesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGuestAttributes(GetGuestAttributesRequest $request, array $callOptions = []): GetGuestAttributesResponse + { + return $this->startApiCall('GetGuestAttributes', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a node. + * + * The async variant is {@see TpuClient::getNodeAsync()} . + * + * @example samples/V2/TpuClient/get_node.php + * + * @param GetNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Node + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNode(GetNodeRequest $request, array $callOptions = []): Node + { + return $this->startApiCall('GetNode', $request, $callOptions)->wait(); + } + + /** + * Gets a runtime version. + * + * The async variant is {@see TpuClient::getRuntimeVersionAsync()} . + * + * @example samples/V2/TpuClient/get_runtime_version.php + * + * @param GetRuntimeVersionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RuntimeVersion + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRuntimeVersion(GetRuntimeVersionRequest $request, array $callOptions = []): RuntimeVersion + { + return $this->startApiCall('GetRuntimeVersion', $request, $callOptions)->wait(); + } + + /** + * Lists accelerator types supported by this API. + * + * The async variant is {@see TpuClient::listAcceleratorTypesAsync()} . + * + * @example samples/V2/TpuClient/list_accelerator_types.php + * + * @param ListAcceleratorTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAcceleratorTypes(ListAcceleratorTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAcceleratorTypes', $request, $callOptions); + } + + /** + * Lists nodes. + * + * The async variant is {@see TpuClient::listNodesAsync()} . + * + * @example samples/V2/TpuClient/list_nodes.php + * + * @param ListNodesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNodes(ListNodesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNodes', $request, $callOptions); + } + + /** + * Lists runtime versions supported by this API. + * + * The async variant is {@see TpuClient::listRuntimeVersionsAsync()} . + * + * @example samples/V2/TpuClient/list_runtime_versions.php + * + * @param ListRuntimeVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRuntimeVersions(ListRuntimeVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRuntimeVersions', $request, $callOptions); + } + + /** + * Starts a node. + * + * The async variant is {@see TpuClient::startNodeAsync()} . + * + * @example samples/V2/TpuClient/start_node.php + * + * @param StartNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 startNode(StartNodeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartNode', $request, $callOptions)->wait(); + } + + /** + * Stops a node. This operation is only available with single TPU nodes. + * + * The async variant is {@see TpuClient::stopNodeAsync()} . + * + * @example samples/V2/TpuClient/stop_node.php + * + * @param StopNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 stopNode(StopNodeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopNode', $request, $callOptions)->wait(); + } + + /** + * Updates the configurations of a node. + * + * The async variant is {@see TpuClient::updateNodeAsync()} . + * + * @example samples/V2/TpuClient/update_node.php + * + * @param UpdateNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateNode(UpdateNodeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateNode', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see TpuClient::getLocationAsync()} . + * + * @example samples/V2/TpuClient/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 TpuClient::listLocationsAsync()} . + * + * @example samples/V2/TpuClient/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/Tpu/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Tpu/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..578c9042f1cc --- /dev/null +++ b/owl-bot-staging/Tpu/v2/src/V2/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.tpu.v2", + "libraryPackage": "Google\\Cloud\\Tpu\\V2", + "services": { + "Tpu": { + "clients": { + "grpc": { + "libraryClient": "TpuGapicClient", + "rpcs": { + "CreateNode": { + "methods": [ + "createNode" + ] + }, + "DeleteNode": { + "methods": [ + "deleteNode" + ] + }, + "GenerateServiceIdentity": { + "methods": [ + "generateServiceIdentity" + ] + }, + "GetAcceleratorType": { + "methods": [ + "getAcceleratorType" + ] + }, + "GetGuestAttributes": { + "methods": [ + "getGuestAttributes" + ] + }, + "GetNode": { + "methods": [ + "getNode" + ] + }, + "GetRuntimeVersion": { + "methods": [ + "getRuntimeVersion" + ] + }, + "ListAcceleratorTypes": { + "methods": [ + "listAcceleratorTypes" + ] + }, + "ListNodes": { + "methods": [ + "listNodes" + ] + }, + "ListRuntimeVersions": { + "methods": [ + "listRuntimeVersions" + ] + }, + "StartNode": { + "methods": [ + "startNode" + ] + }, + "StopNode": { + "methods": [ + "stopNode" + ] + }, + "UpdateNode": { + "methods": [ + "updateNode" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json new file mode 100644 index 000000000000..322cbc5f3768 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json @@ -0,0 +1,107 @@ +{ + "interfaces": { + "google.cloud.tpu.v2.Tpu": { + "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": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateNode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteNode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateServiceIdentity": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAcceleratorType": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGuestAttributes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetNode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetRuntimeVersion": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListAcceleratorTypes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListNodes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListRuntimeVersions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartNode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopNode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateNode": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php new file mode 100644 index 000000000000..0ff6e23ea756 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php @@ -0,0 +1,284 @@ + [ + 'google.cloud.tpu.v2.Tpu' => [ + 'CreateNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateNode' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', + 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'node.name', + 'fieldAccessors' => [ + 'getNode', + 'getName', + ], + ], + ], + ], + 'GenerateServiceIdentity' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\GenerateServiceIdentityResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetAcceleratorType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\AcceleratorType', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGuestAttributes' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\GetGuestAttributesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNode' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\Node', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRuntimeVersion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\RuntimeVersion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAcceleratorTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAcceleratorTypes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\ListAcceleratorTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNodes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\ListNodesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuntimeVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRuntimeVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Tpu\V2\ListRuntimeVersionsResponse', + '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' => [ + 'acceleratorType' => 'projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}', + 'location' => 'projects/{project}/locations/{location}', + 'node' => 'projects/{project}/locations/{location}/nodes/{node}', + 'runtimeVersion' => 'projects/{project}/locations/{location}/runtimeVersions/{runtime_version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php new file mode 100644 index 000000000000..ce0a034d715e --- /dev/null +++ b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php @@ -0,0 +1,252 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.tpu.v2.Tpu' => [ + 'CreateNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nodes', + 'body' => 'node', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNode' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateServiceIdentity' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}:generateServiceIdentity', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetAcceleratorType' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/acceleratorTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGuestAttributes' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}:getGuestAttributes', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNode' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRuntimeVersion' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/runtimeVersions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAcceleratorTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/acceleratorTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodes' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nodes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRuntimeVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/runtimeVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopNode' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateNode' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{node.name=projects/*/locations/*/nodes/*}', + 'body' => 'node', + 'placeholders' => [ + 'node.name' => [ + 'getters' => [ + 'getNode', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.php b/owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.php new file mode 100644 index 000000000000..cfa3f69120e0 --- /dev/null +++ b/owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.php @@ -0,0 +1,1552 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TpuClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TpuClient($options); + } + + /** @test */ + public function createNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $healthDescription = 'healthDescription-1057342823'; + $runtimeVersion = 'runtimeVersion1819622257'; + $cidrBlock = 'cidrBlock313022466'; + $id = 3355; + $queuedResource = 'queuedResource-1642799782'; + $multisliceNode = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setRuntimeVersion($runtimeVersion); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setId($id); + $expectedResponse->setQueuedResource($queuedResource); + $expectedResponse->setMultisliceNode($multisliceNode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $node = new Node(); + $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; + $node->setRuntimeVersion($nodeRuntimeVersion); + $request = (new CreateNodeRequest()) + ->setParent($formattedParent) + ->setNode($node); + $response = $gapicClient->createNode($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.tpu.v2.Tpu/CreateNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNode(); + $this->assertProtobufEquals($node, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNodeTest'); + $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 createNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNodeTest'); + $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]'); + $node = new Node(); + $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; + $node->setRuntimeVersion($nodeRuntimeVersion); + $request = (new CreateNodeRequest()) + ->setParent($formattedParent) + ->setNode($node); + $response = $gapicClient->createNode($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNodeTest'); + 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 deleteNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new DeleteNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNode($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.tpu.v2.Tpu/DeleteNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); + $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 deleteNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNodeTest'); + $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new DeleteNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNode($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); + 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 generateServiceIdentityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateServiceIdentityResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new GenerateServiceIdentityRequest()) + ->setParent($formattedParent); + $response = $gapicClient->generateServiceIdentity($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.tpu.v2.Tpu/GenerateServiceIdentity', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateServiceIdentityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 GenerateServiceIdentityRequest()) + ->setParent($formattedParent); + try { + $gapicClient->generateServiceIdentity($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAcceleratorTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $expectedResponse = new AcceleratorType(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + $request = (new GetAcceleratorTypeRequest()) + ->setName($formattedName); + $response = $gapicClient->getAcceleratorType($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.tpu.v2.Tpu/GetAcceleratorType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAcceleratorTypeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); + $request = (new GetAcceleratorTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->getAcceleratorType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGuestAttributesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GetGuestAttributesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new GetGuestAttributesRequest()) + ->setName($formattedName); + $response = $gapicClient->getGuestAttributes($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.tpu.v2.Tpu/GetGuestAttributes', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGuestAttributesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new GetGuestAttributesRequest()) + ->setName($formattedName); + try { + $gapicClient->getGuestAttributes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $healthDescription = 'healthDescription-1057342823'; + $runtimeVersion = 'runtimeVersion1819622257'; + $cidrBlock = 'cidrBlock313022466'; + $id = 3355; + $queuedResource = 'queuedResource-1642799782'; + $multisliceNode = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setRuntimeVersion($runtimeVersion); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setId($id); + $expectedResponse->setQueuedResource($queuedResource); + $expectedResponse->setMultisliceNode($multisliceNode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new GetNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->getNode($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.tpu.v2.Tpu/GetNode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new GetNodeRequest()) + ->setName($formattedName); + try { + $gapicClient->getNode($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRuntimeVersionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $version = 'version351608024'; + $expectedResponse = new RuntimeVersion(); + $expectedResponse->setName($name2); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->runtimeVersionName('[PROJECT]', '[LOCATION]', '[RUNTIME_VERSION]'); + $request = (new GetRuntimeVersionRequest()) + ->setName($formattedName); + $response = $gapicClient->getRuntimeVersion($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.tpu.v2.Tpu/GetRuntimeVersion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRuntimeVersionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->runtimeVersionName('[PROJECT]', '[LOCATION]', '[RUNTIME_VERSION]'); + $request = (new GetRuntimeVersionRequest()) + ->setName($formattedName); + try { + $gapicClient->getRuntimeVersion($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAcceleratorTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $acceleratorTypesElement = new AcceleratorType(); + $acceleratorTypes = [ + $acceleratorTypesElement, + ]; + $expectedResponse = new ListAcceleratorTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAcceleratorTypes($acceleratorTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAcceleratorTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAcceleratorTypes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAcceleratorTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v2.Tpu/ListAcceleratorTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAcceleratorTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListAcceleratorTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAcceleratorTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nodesElement = new Node(); + $nodes = [ + $nodesElement, + ]; + $expectedResponse = new ListNodesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNodes($nodes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNodesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNodes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNodes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v2.Tpu/ListNodes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListNodesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNodes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRuntimeVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $runtimeVersionsElement = new RuntimeVersion(); + $runtimeVersions = [ + $runtimeVersionsElement, + ]; + $expectedResponse = new ListRuntimeVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRuntimeVersions($runtimeVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRuntimeVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRuntimeVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRuntimeVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.tpu.v2.Tpu/ListRuntimeVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRuntimeVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListRuntimeVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRuntimeVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $healthDescription = 'healthDescription-1057342823'; + $runtimeVersion = 'runtimeVersion1819622257'; + $cidrBlock = 'cidrBlock313022466'; + $id = 3355; + $queuedResource = 'queuedResource-1642799782'; + $multisliceNode = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setRuntimeVersion($runtimeVersion); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setId($id); + $expectedResponse->setQueuedResource($queuedResource); + $expectedResponse->setMultisliceNode($multisliceNode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new StartNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->startNode($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.tpu.v2.Tpu/StartNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNodeTest'); + $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 startNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNodeTest'); + $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new StartNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->startNode($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNodeTest'); + 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 stopNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $healthDescription = 'healthDescription-1057342823'; + $runtimeVersion = 'runtimeVersion1819622257'; + $cidrBlock = 'cidrBlock313022466'; + $id = 3355; + $queuedResource = 'queuedResource-1642799782'; + $multisliceNode = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setRuntimeVersion($runtimeVersion); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setId($id); + $expectedResponse->setQueuedResource($queuedResource); + $expectedResponse->setMultisliceNode($multisliceNode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new StopNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->stopNode($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.tpu.v2.Tpu/StopNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopNodeTest'); + $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 stopNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopNodeTest'); + $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); + $request = (new StopNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->stopNode($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopNodeTest'); + 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 updateNodeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $healthDescription = 'healthDescription-1057342823'; + $runtimeVersion = 'runtimeVersion1819622257'; + $cidrBlock = 'cidrBlock313022466'; + $id = 3355; + $queuedResource = 'queuedResource-1642799782'; + $multisliceNode = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setRuntimeVersion($runtimeVersion); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setId($id); + $expectedResponse->setQueuedResource($queuedResource); + $expectedResponse->setMultisliceNode($multisliceNode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $node = new Node(); + $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; + $node->setRuntimeVersion($nodeRuntimeVersion); + $request = (new UpdateNodeRequest()) + ->setUpdateMask($updateMask) + ->setNode($node); + $response = $gapicClient->updateNode($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.tpu.v2.Tpu/UpdateNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getNode(); + $this->assertProtobufEquals($node, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNodeTest'); + $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 updateNodeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNodeTest'); + $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(); + $node = new Node(); + $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; + $node->setRuntimeVersion($nodeRuntimeVersion); + $request = (new UpdateNodeRequest()) + ->setUpdateMask($updateMask) + ->setNode($node); + $response = $gapicClient->updateNode($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNodeTest'); + 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 createNodeAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNodeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $acceleratorType = 'acceleratorType1748643982'; + $healthDescription = 'healthDescription-1057342823'; + $runtimeVersion = 'runtimeVersion1819622257'; + $cidrBlock = 'cidrBlock313022466'; + $id = 3355; + $queuedResource = 'queuedResource-1642799782'; + $multisliceNode = true; + $expectedResponse = new Node(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAcceleratorType($acceleratorType); + $expectedResponse->setHealthDescription($healthDescription); + $expectedResponse->setRuntimeVersion($runtimeVersion); + $expectedResponse->setCidrBlock($cidrBlock); + $expectedResponse->setId($id); + $expectedResponse->setQueuedResource($queuedResource); + $expectedResponse->setMultisliceNode($multisliceNode); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNodeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $node = new Node(); + $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; + $node->setRuntimeVersion($nodeRuntimeVersion); + $request = (new CreateNodeRequest()) + ->setParent($formattedParent) + ->setNode($node); + $response = $gapicClient->createNodeAsync($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.tpu.v2.Tpu/CreateNode', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNode(); + $this->assertProtobufEquals($node, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNodeTest'); + $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/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 0000000000000000000000000000000000000000..24aa0ed04f30b1d54422dfae6fc086c09993a7ee GIT binary patch literal 4514 zcmbVQTT|Oc6vj3t<`^h!AaR_VLemM%By#Jdos7uMH^2iJ4|d43;~9-CEubPKjU>~d z8Gb-t`r1DA2Xv-?q<^6g>2vzjr@r>=t|aV0g26AgclVqtCr-j2}f&Y-XRsdT&puUSU(n_8qw~2Bv12KcXkkr5(-kDN3GRyVJAv zz;tYh32fRrU09TaPPX>GiyokSWKxp_0|U{i+X3}#%|au6-80?5@tU|)QFdt%hmegd zEQZ@Mb>@z=AZ%2WQ${|Q0 z;FbIakR0uE zcAjJwF1Zv-kr$9fTlIaF^HVOvl`Nj8gh_B7A{EFoFI9SoLG^Rv!yCc;uW>2z6w;Py z@B29zZhPj#IujtB2QVfek;`&f5}A%*ky{)rEWQa+g_}M?M8){))b~}*SNo8Vo8Z!? zvs6Yd+t#ce6Sx#-Pk<2b>{m5+;kvQ-%8pxZZXBR7RYQ^kjo z(5JG+QnrRN+=Bc+34p%*y@AOX1L}e1VhN-Wxvz#%e4^$A5gVFYvjgvlNRTr;2N}vx z;|+XOc+3hao$ta-tRWW5LTaBLi9#gLAbrSU$15;fd~}Xcu{ItwCHXXwe>V!_F;K_? zj54rs?b+h#WU-Zqh69&0urzGjVdtV_huc3rXM0{6@n&)gz_US*z5S>$U3i2+80HQERlP6J!E1TeV89zK!F_@|6&p`Cl;!angNK z0$>mmd=?hddAJ<}4!H+6;>wA$J5W00KHQ3y48ST{#T-xP|4YCqqd77S8BWjaFyluY z`Rs$!jVy%;Vv_`s%ooQYG6*T z0cn=DFh2w1$$X~+X+iMcz^H|GhM8Cx26#MVH{og&VJ061mNVD8KbV% z8`Tf6gNUg&+O@4lX&r3^7;DwGwrg9{N%p(4UT3&UF&6B60i=cO)Iz>aNwf0+vt%%e~y3Sdw3_o9|AmH#ajZp;^x6_|{!HKL2V zWEe;jt~s8$YvM&m9n>i3^um21wn^hV*n$hQSO71>>{lU+SVkqigD&-Qoc_ohOyVuI zcVI`utlvx#1=l*7p&mF!&!RceQGRhw4mS8=MAMYG5vhlGKVfH)=q)eocHV_-e=;kO z=9mbp`N=uva8cf7_CbQ&g4w9D1;F~75>^~zp&PGYEcE`eI4DD=+hg5ccvxK`Y4fjO z=F~NTOh%27U~_Z{@4)OTf#)AP`ubfe|B--uNEV+CRvCDpn(U(9OnfIEA0iP(HM@== zl>(Aa^c>-Kmv~vZ-QSaQEBy6A=8q0|v%yCOdAs;$G~N-f5uFa7>EMIJ`(#dtC<>QR q6h5UW+r{n}Z-O5`h;N(^#U;P*O#rJJ-z?5}58x}st^F8|0saTZv8rSM literal 0 HcmV?d00001 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..721cc99ca708 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php @@ -0,0 +1,42 @@ +internalAddGeneratedFile( + ' +÷ ++google/devtools/cloudtrace/v2/tracing.protogoogle.devtools.cloudtrace.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/devtools/cloudtrace/v2/trace.protogoogle/protobuf/empty.proto"” +BatchWriteSpansRequestA +name ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project7 +spans ( 2#.google.devtools.cloudtrace.v2.SpanBàA2º + TraceService¡ +BatchWriteSpans5.google.devtools.cloudtrace.v2.BatchWriteSpansRequest.google.protobuf.Empty"?ÚA +name,spans‚Óä“,"\'/v2/{name=projects/*}/traces:batchWrite:*‰ + +CreateSpan#.google.devtools.cloudtrace.v2.Span#.google.devtools.cloudtrace.v2.Span"1‚Óä“+"&/v2/{name=projects/*/traces/*/spans/*}:*zÊAcloudtrace.googleapis.comÒA[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.appendB¯ +!com.google.devtools.cloudtrace.v2B TracingProtoPZ/cloud.google.com/go/trace/apiv2/tracepb;tracepbªGoogle.Cloud.Trace.V2ÊGoogle\\Cloud\\Trace\\V2êGoogle::Cloud::Trace::V2bproto3' + , 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..21c9a6c262c5 --- /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..dc1949df1342 --- /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 array<\Google\Cloud\Trace\V2\Span>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField + */ + 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 array<\Google\Cloud\Trace\V2\Span>|\Google\Protobuf\Internal\RepeatedField $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..030ebe5ab66f --- /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..b329573dbc89 --- /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..35cf07c116ed --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php @@ -0,0 +1,132 @@ +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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Attributes::class, \Google\Cloud\Trace\V2\Span_Attributes::class); + 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..240cefeafd90 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php @@ -0,0 +1,189 @@ +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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Link::class, \Google\Cloud\Trace\V2\Span_Link::class); + 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..ef405db278e4 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php @@ -0,0 +1,65 @@ +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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Trace\V2\Span_Link_Type::class); + 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..4a02c6c17837 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php @@ -0,0 +1,109 @@ +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 array<\Google\Cloud\Trace\V2\Span\Link>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getLink() + { + return $this->link; + } + + /** + * A collection of links. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; + * @param array<\Google\Cloud\Trace\V2\Span\Link>|\Google\Protobuf\Internal\RepeatedField $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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Links::class, \Google\Cloud\Trace\V2\Span_Links::class); + 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..48d69c458c90 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php @@ -0,0 +1,95 @@ +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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpanKind::class, \Google\Cloud\Trace\V2\Span_SpanKind::class); + 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..56f7b30850fd --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php @@ -0,0 +1,155 @@ +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"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeEvent::class, \Google\Cloud\Trace\V2\Span_TimeEvent::class); + 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..20002e12795f --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php @@ -0,0 +1,132 @@ +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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Annotation::class, \Google\Cloud\Trace\V2\Span_TimeEvent_Annotation::class); + 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..598e46a3e82f --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php @@ -0,0 +1,188 @@ +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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MessageEvent::class, \Google\Cloud\Trace\V2\Span_TimeEvent_MessageEvent::class); + 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..0bac6fac8603 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php @@ -0,0 +1,64 @@ +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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Trace\V2\Span_TimeEvent_MessageEvent_Type::class); + 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..d51a25429d7c --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php @@ -0,0 +1,148 @@ +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 array<\Google\Cloud\Trace\V2\Span\TimeEvent>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField + */ + 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 array<\Google\Cloud\Trace\V2\Span\TimeEvent>|\Google\Protobuf\Internal\RepeatedField $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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeEvents::class, \Google\Cloud\Trace\V2\Span_TimeEvents::class); + 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..63ee036a72e7 --- /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..38450d2d46d7 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php @@ -0,0 +1,348 @@ +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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StackFrame::class, \Google\Cloud\Trace\V2\StackTrace_StackFrame::class); + 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..41cff97de5f5 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php @@ -0,0 +1,112 @@ +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 array<\Google\Cloud\Trace\V2\StackTrace\StackFrame>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField + */ + 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 array<\Google\Cloud\Trace\V2\StackTrace\StackFrame>|\Google\Protobuf\Internal\RepeatedField $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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StackFrames::class, \Google\Cloud\Trace\V2\StackTrace_StackFrames::class); + 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..fdc645b9b14a --- /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..8366ec42c7d9 --- /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..7cc936cd2be1 --- /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..37eab10f1575 --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php @@ -0,0 +1,288 @@ + 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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * 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/TraceServiceGapicClient.php b/owl-bot-staging/Trace/v2/src/V2/Gapic/TraceServiceGapicClient.php new file mode 100644 index 000000000000..21fed4d2ee48 --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/Gapic/TraceServiceGapicClient.php @@ -0,0 +1,477 @@ +projectName('[PROJECT]'); + * $spans = []; + * $traceServiceClient->batchWriteSpans($formattedName, $spans); + * } finally { + * $traceServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Trace\V2\Client\TraceServiceClient}. + */ +class TraceServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.devtools.cloudtrace.v2.TraceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + 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. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/trace.append', + ]; + + private static $projectNameTemplate; + + private static $spanNameTemplate; + + private static $pathTemplateMap; + + 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', + ], + ], + ]; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getSpanNameTemplate() + { + if (self::$spanNameTemplate == null) { + self::$spanNameTemplate = new PathTemplate('projects/{project}/traces/{trace}/spans/{span}'); + } + + return self::$spanNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'project' => self::getProjectNameTemplate(), + 'span' => self::getSpanNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * 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($project, $trace, $span) + { + return self::getSpanNameTemplate()->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($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtrace.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Batch writes new spans to new or existing traces. You cannot update + * existing spans. + * + * Sample code: + * ``` + * $traceServiceClient = new TraceServiceClient(); + * try { + * $formattedName = $traceServiceClient->projectName('[PROJECT]'); + * $spans = []; + * $traceServiceClient->batchWriteSpans($formattedName, $spans); + * } finally { + * $traceServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the project where the spans belong. The format is + * `projects/[PROJECT_ID]`. + * @param Span[] $spans Required. A list of new spans. The span names must not match existing + * spans, otherwise the results are undefined. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function batchWriteSpans($name, $spans, array $optionalArgs = []) + { + $request = new BatchWriteSpansRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setSpans($spans); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchWriteSpans', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new span. + * + * Sample code: + * ``` + * $traceServiceClient = new TraceServiceClient(); + * try { + * $name = 'name'; + * $spanId = 'span_id'; + * $displayName = new TruncatableString(); + * $startTime = new Timestamp(); + * $endTime = new Timestamp(); + * $response = $traceServiceClient->createSpan($name, $spanId, $displayName, $startTime, $endTime); + * } finally { + * $traceServiceClient->close(); + * } + * ``` + * + * @param 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. + * . + * @param string $spanId Required. The `[SPAN_ID]` portion of the span's resource name. + * @param TruncatableString $displayName 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. + * @param Timestamp $startTime 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. + * @param Timestamp $endTime 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. + * @param array $optionalArgs { + * Optional. + * + * @type string $parentSpanId + * The `[SPAN_ID]` of this span's parent span. If this is a root span, + * then this field must be empty. + * @type Attributes $attributes + * A set of attributes on the span. You can have up to 32 attributes per + * span. + * @type StackTrace $stackTrace + * Stack trace captured at the start of the span. + * @type TimeEvents $timeEvents + * A set of time events. You can have up to 32 annotations and 128 message + * events per span. + * @type Links $links + * Links associated with the span. You can have up to 128 links per Span. + * @type Status $status + * Optional. The final status for this span. + * @type BoolValue $sameProcessAsParentSpan + * 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 Int32Value $childSpanCount + * 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 $spanKind + * 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. + * For allowed values, use constants defined on {@see \Google\Cloud\Trace\V2\Span\SpanKind} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Trace\V2\Span + * + * @throws ApiException if the remote call fails + */ + public function createSpan($name, $spanId, $displayName, $startTime, $endTime, array $optionalArgs = []) + { + $request = new Span(); + $requestParamHeaders = []; + $request->setName($name); + $request->setSpanId($spanId); + $request->setDisplayName($displayName); + $request->setStartTime($startTime); + $request->setEndTime($endTime); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['parentSpanId'])) { + $request->setParentSpanId($optionalArgs['parentSpanId']); + } + + if (isset($optionalArgs['attributes'])) { + $request->setAttributes($optionalArgs['attributes']); + } + + if (isset($optionalArgs['stackTrace'])) { + $request->setStackTrace($optionalArgs['stackTrace']); + } + + if (isset($optionalArgs['timeEvents'])) { + $request->setTimeEvents($optionalArgs['timeEvents']); + } + + if (isset($optionalArgs['links'])) { + $request->setLinks($optionalArgs['links']); + } + + if (isset($optionalArgs['status'])) { + $request->setStatus($optionalArgs['status']); + } + + if (isset($optionalArgs['sameProcessAsParentSpan'])) { + $request->setSameProcessAsParentSpan($optionalArgs['sameProcessAsParentSpan']); + } + + if (isset($optionalArgs['childSpanCount'])) { + $request->setChildSpanCount($optionalArgs['childSpanCount']); + } + + if (isset($optionalArgs['spanKind'])) { + $request->setSpanKind($optionalArgs['spanKind']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateSpan', Span::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Trace/v2/src/V2/TraceServiceClient.php b/owl-bot-staging/Trace/v2/src/V2/TraceServiceClient.php new file mode 100644 index 000000000000..462d412571cb --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/TraceServiceClient.php @@ -0,0 +1,34 @@ + [ + '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..6fe09272fd07 --- /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..8ec56307a4bc --- /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/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php b/owl-bot-staging/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php new file mode 100644 index 000000000000..e7898694140e --- /dev/null +++ b/owl-bot-staging/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php @@ -0,0 +1,205 @@ +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 = []; + $gapicClient->batchWriteSpans($formattedName, $spans); + $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 = []; + try { + $gapicClient->batchWriteSpans($formattedName, $spans); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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(); + $response = $gapicClient->createSpan($name, $spanId, $displayName, $startTime, $endTime); + $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(); + try { + $gapicClient->createSpan($name, $spanId, $displayName, $startTime, $endTime); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AdaptiveMt.php b/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AdaptiveMt.php new file mode 100644 index 0000000000000000000000000000000000000000..3519bbd86b75191729b2398fce72d1ec5f870c65 GIT binary patch literal 5617 zcmcIo-EY%Y6vqja_7o^Jbfjqk6WC}eBvQLQ%w5Nlc7$$pEl?qCi)1;@O)zt8&%WvS zP~MTYmr48q+tZ{?`$M)Dq&-ZN_QErN!L*m{+-qOw!%k^R=}RNud%n;4opa9z*WLRr zTvW=$CZ0}7O{qRo=zXHNo4bujwu|cZk-cdCnKW)|AtTNLslCUo`8aXZmVjUhT>D5;=fC#ubH+$sp1@Bn;x7sp283tUAr6WA9yX5nwdDaAO+vv4|ywPxvdqop^9W;ivHNsCjedzi_6 zr-%9J6dWfHF-{hvY1uS$1V0~<--U6*BUtMiGc7ZQAIBH7p@M;tXm>seb1D6zm}XQh z7pp#`f;~~Gt(Qe_C@-v`-yaZz`h_RquXe$53`7gZ#&6@^N)WPn9b`b<P!{=|on9Gvi z$3DS5eS~>VlFtC}@6`E<*g;hU2d7}9Zd!=_8D0$hWA1y*i$N;-E@l{!Z^P+?;QE*) z>HS4FjWs-BlZRC6Qj`~WpwqXbknKbz>Y@kWvsF0SotyiGrK5&}SdN8~Mi-1RrBm`Z zFzpeXGYIx!&BsIj125LiMrMQ;!sZ?eq2J>C9l`i+$aj^qy?N-VB*`XBG%UyWb?*^^ z8W(qzi@UL3apjO*Ace=|ri7xh>o65lWlJ|b%(;mWlZE90hOmPWj-vw}=;Ppn3zZcb-9Au_xEltwx~LH*wmRMj zv(F?r(Hls48Ae5>^h5l>t}Ix{85lPkw&P*v#E!xNXOyRgya4Ag?X< zY`toc8poU9a%mQ_T7oxX8iQWGkM$((x+rs80L+!=@nVWg%p`Jq*;JLmqEU?xsS za8L|TZ3B)8YSu_YG+P`ph)Bwuke0J>ymuUl@GOl0Iu#k!Bl9pv(0$0vJxjxhj&*E` zlvjG@tpab}^H8}gBlBP5=5T0X^AgLg*u2Er$?)?M8@*mlrT!wlEdC@7 zVaJyTF)wuuQ_MLyNnz_G?JE;{^nByr7fIMBb2LDV5Wa4I!ONi zVacpFUB~MhSi1R_`Ub@P%=GIpSx1-P8`o`7Eod6yoOpHD+GC2WGorivwSM!ET!xbk zgT0o!II;X3UtHLgQ`zu)7?nn0Bv2&x0A`aN5Q4@ha8kq@R{T=ibeyG4F8*Z{Vn4e&pFHfP)b literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AutomlTranslation.php b/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AutomlTranslation.php new file mode 100644 index 0000000000000000000000000000000000000000..674bec987c914bcad7806431600d4cf9f4e47c16 GIT binary patch literal 5823 zcmds5PjlN;5Jz#HH0!jPD4|V5X%)BArUO`zbTU+-Fm}?0l%&bDnGOR6k0QS~0$Ea} zr_hq|ffFZg@Flo%LSxr-Bg;YkLDHt9M6tpqs%p`B~%D|VBlYvY|gdl z=u{tK$dkCc43FL$@47Np<$660&0WOwOzKSL+UxMgHJE*VFzc@fnG#QcQWosHb5j?j zLOXQLNcvYK!PK>*ZDG=(6Xm|kavx6}#GXl&r{sq7azhk4CPP;ei-lqWV=K)ti0Be# z*8}o6K?my-FvOBACUjCWw3*>b?)UP5eh)@mKTK%N3H)uhF*$%sg;}#CRCm2wiD^YO zD@<;Yi*a4WUo_AUuj%)pAWUqd?_)HcLkqW_(?W?`W6_)PU^xAu>yS@kyFvKD`JFVq z4A5}mngI1=j^F6Dp7xfVn5%rqsqOujDyLykh!=mwOSPS;C`-2>&s#TL8~KFU7tIPyS6a< zR!=h+IiUvmSP5eM&Ojlfi3hQL+mjQ-`!KOYJVJ@|sLJ(uIK?WhO!OH{^uNnRz&ay~ zv~($wQ(QvMF{OC%nFcR+C_Fi?`T)k32`5CPuH*XYD-Fh1-B_uMmA+dr7}^o>6~*4* zp1%UqUf^&{#|J&XDi`!~FdQO})ne>iI3?s6scQOp0REl^pA(;xnP9nM1136;5Ql*u z6MY^|BULbhR$P0vX9mgGqoGlsJfXFWHC7CUi{EH4vB>%A0LqSWTdQ4+M8)arjH1ji zkanEsHCrG%u*RxMSFEwx(TTP8vD#Q8 z@~E<|_l~1fa5UC_)?i3&8tWi2OoklZrXb34jUrUVmDo#aN7#Rhm+U^n?Y3j7&yXl(AurGZe`;{4VpC^_f4$(R zm1?&!y3&me7{(rvr?1M{&7L{iTVLs*C1q&p6PP?|O+Twz9#J*eZ{b$y=Cr2}?MJts z;>R2eDLNU+Mh~0Mk-8g)p8d4O3lnD+{US`raC)}iNErP&L7fPeW2-W*ovS>e`V^dz zE=HLI88@$RoYM^$$5Q9|way)b?HyO(+%A43V%*4qO+)QXmqDl4RUFuGy1n6MXCpU^ zD}~t}eHr7goQ_i2ZVvjAvh4lxr#--{+;07M@D{(uR#y<~8b-lW`(kpEM3y{Vxz2@mP4&CS%UWJ}rAbkB4O` z+#vFiuzXP|BX+_AOH%>_?u166>rv9|)_$PU9lFvTG&OoqSLi`MLk~_XdjOvAMiHrN z7I*;!e_?#)Gmk{lmH797MGgy?WUkMC#vJy^$n_(N&^K*Iao|bD1EK((z@w!dl5i^9 z2O-Ct_emB{SCs)vFlYsmioo>;2Q=~o3ndp_G_~z9m3i^hPH87~tLWH>l#&>2`;8#? zi4-xN_fCkQG8Vy}j$0AT^3~v)YE?rvIAqix*66u=!ML#P%d9R*-UdCU>D^t6(xv$N zDN7Tt4u^T3hp2>79+`^s5&Q%2@ZBU}ZY6e>mWq{01@FYVsBCVeByPycA`LK+&UOiI zH@&D8gt6>t(V6#PiK$N~7Hr)hMro2-balKUIDi&1o9iGEQGk_D(i9+;oO8rPdD7$+2T#GcPN z+J04lm8Q?5$Q9E@AjQ;NgMuc{1OL!G20)!nA}4g2&;b>9pIHAy2$bU z4YLbN31>v5PNcZI_kSsSR3hU?P#mVu05e}NsN!t?V!&D!Ozz%%3dKZZj*3Coqqw{C zPVNaD|8<6!lMxdoqGH8?(Lw_EMzs$t%T zjjM;flX|_;I6&-zxe52K9v@a)M|ie~Z)@}FS-sk>H;#@Jb>TYd^c>+gYkwGUA8+S+ z)luv^wPG?|bi3~w&-Rkml)XE=*fF1*X?Wc@)^ZVqXM1z&SBCN1!bVfiGfU4itDns? z>$LJ$b~Z?d-Q2XparbiJ(*$bU8f)7**tSnAXSYyDl2;z(-S?|xip&k2w+TW@h0i)O}d+Sotf;oZIVf{yW@{IF1F*fy$J-v^m^vn zzU<80>AiQ7n8-X(6;`cOfp{qJ(iS0v`h-9T38|=+T990+&{70-K?2bSSU#S3sCeRk zzV1Ee&i$G=tae}4nS0Lv{J+ot|2ya2TW_^@+UP=l-e?)N?i%&{=5F5IG4gHOa;=)x z$ZvMGwhTL8vzl$QVc3Oye)e8|`QCbdZgye)6`1N+9lK_f^V^oS-7t!^hSjMTU0ZKC z4Io&2H0Axnv|3fiupgN9|}XR~3}@{X&!@V|?uQ#D(rYw8X2mqEDO`7OQS7(k|b z>{h2$bAeu-Ot{yo8J8~S8BH?wV%q{`+|CQ$R)~H;HyaBr*RWf9V`J8EYPQ*SEqeuq zmdo3Q>uHtza_KT(mXI^I@|PHo<#HF3xAU&uG33?rdE0P1cIzhPn-JLZ{@O^Txs6I) zZ@cCrW63R-eF=SnX~}e4tJ#p$e<*4*ReI%K{>ZfK-j-W6cx0qj_oCI>wmYqs+1lQ?*Cz4Un~jOP)s)|9%a9@H-ha^$bY`zsx2T zXeKI%Oa!VdJenFWMN`zNYggq7G)s-Y8a)TnA~-P1X5(l1IK6Eab>B<*)6>$^8g)hf z;A7H*E#hz0P3~}fz!_ITp>j&4dkq%L7am>6nWcw$XIBC z3-A$wKW~I9?92ve*U%}J5KKsg)M;m|)|R=A&!bVJrEfM2u2k>&SSFvjG^l;)MRZc6 z5@X$X;;tH>?SKp6Q)sYefuFQo2Zr`t8k+9==SmijqM;_NU3GWc##kSapucDEE9fMP zwQ56eZFlr-qgu1-#@LI>5LdS$CkKY~iy>Kj0}Zrw8`c~fq(5GUCI7c_0lm_&YAh5B zOxs{zrvR2OF7gK$qy8o=*cclSFQRbqaHU;?+O1_kWyf;-Qyov@I`liuv#t^7HSGt{o5bW@h-3p6z{#?to zcPX>uS5Qv+4d+nbd&Vxc{tzBP{g3oU#~8~JrIoYSGul@(!j(M2P8$-vf!{>KOloEc z>J_=trBp0J=;L{G%Cm+-sE^8;nvnK~8I%(?B7{$)mjpedUUk8Veesx2Q1M7C)D73D zL5&q~LF%RWoo;s_9)1XS(Y}yDCswVd-h$dkvXbQJEI@j2^oYQW3P374^#tt>8s@xE z3qmX(wK;E!+M@MDiD^HJPO36-2YDNfaC(Y|T#oe+nIr8hS#)ZanrM+{5s{Ak%)rt` z4+`@#gOrPoqa!@KF;}_!LS$xJ^I~#<`stgo;)HU4*r1#qL<20lYPZobwuDg^DuPr! zq9$FE+J_(`BAWE-22|2C!n4{#G#cd4Gv1IO!V-S2bR~tPJ{#I^X3*Jr!(HpN+m;P6 zCiru@ZOAr`9&D(gQ+3m6H}u^=Hx%>l!yZONt)Fo>nR@N>WS{ohj`Z3B7 zC(*EAo-|u5*^=mUn5wGGwsboklz(U2CEY^@wF_uyzUHjaR*yKV*=l#(YR5L22NNA+ zwI<3fkl)#+qWZL?s#^$c*Br4f(O0hYYODslrSHBVdE-@d6dpj^<(e&)Q_iE~R>$R> zRok|)Wj>J^G|=!p`kZrk2XZcOQuj&F(Yey=N$g0g0#73-C(+P82YGkas&$%BOUMcd z#QiYD{h@S$kIVHCOE7-0LiRr?xKO12ndc!j_4??<6;#Pz^rJDcYZ`(p5t=8w!prlL zY-CO6#}^qATGM%zVHU4L=yFQ{5I{VGW~FWF*16KvSUU?oB^y#lhth7;qskqQlO_8@ zuJlGKva(SEN#sK)Bky}V%OKrZDzQ9A*{*AI!57eIt>XYlKmeDj?z*>Z#1?71U;q2&j>v7dKnikZJ(wwnjfB430 zXq=A+godUCFu83*;YD~LB{C!2YiVluF)frq%DM1vUaS2<7M&6Fr9k2Pm-L372Wg|*lmQs4y?GtO+EQW$0Eb%z7iF&>212jN2;6SP& z-PCk!d__u9SR#F;6xIj$IvksQgK6`M54bB7g5gXY&K1|N+2b0Wa5J3f=7Wj6+B!~Gf+R{ z<`h)G>y`Dn>buKpD|0gocNXSmkG%jUIkNih^76v+{ILw+3qxz~&dkis&BC)RG$aFe zDhrG7cOO2A&`f1{W^Qqj41JLd<^P7q{n~dkL4^XC%W#M=VMvPUJA{G)YG9c$Mh$op z4H_-zn$s!m7tjgry1P;u2$Y^|2YHq<{CE4&pr8*s-ix%$U|E-fcK4(Pv8|gn?KEVHT!Gn8a;_sRnnl>!q40)7C6^a;&p_2#GhCnw_=KERxiiM^ ze1c0^tz#$$Wk1FIIshe-wAxQHP9Oe+>g@~+j4?Bt^@e0?f=k8*2%B;y(DDtzG=`Lp zFQa2YjpDNr=qa@!c^bCYu|9HqLZwG^NqR`tK9GE1TPzzNR5sBoUJ~K<_rO%4One&x z|CgX%bBa&-UwcIlf-OE3f9@5xy`87{l>fcEH=UFEYwb4xP@I9v%ryjg(RBEj4)fI> zDui2TP%KB)kSl#Wl`|9TWVK%dmfmf{IcFD3GF=vrJvk{ifJa+G z7!Z@7Ualz->}e&@Y}yJz&l-TAJvWNK4Vqds9l;_L2G7BG0A94o0f7Vk2~`q}&J5tV zi2m+c?-?!mZ~?m0Ewcez9ZfMTjc2 zvJ|b3geGn&<|@!5i%aO$L~~IhfXI!jHhYe=-_M|NNk_YcbQ%*TvQB`do=iwW?&VNc zxXl*OF%i&JgRx0-R<1OWDzK^6NOWf)U549`J|*WH<7zrm6dswAl65kVjw&MT@&wSM z09h!p#?|bkaM-;JOH@5C^FGw9swPCeiHBvE_A6Kt3P}}gI7ME;2Fff_oW^dZA6B*b zC!h*d<(?|8Njpt1J3?<-3t#*rt~KI7YVPv1b_fRwr}z<9#pj`2Q5pBz6;&012w>n& zcZuNjTS}vm953HLg3hUZs6bG~ZWWo}L{aAit3vOH{W-xh?*!2khR%F4HqTR`ge+3A zPYXJ{8iZ0<9~<9_C?vaam7n*}BX;iB3#K9%B#`xLHB!p?40k*d0m~4sZlbY4c5mJ*NSbCHy%7Q1+qck2Iom z9gT)7PDQaou4HVYF~wIU_kV5>g3X~^;aGA!Kx6*@a!B{1EIJ>Rtaw>?0_7NRMXF7L z=?gSV1VWvb>H-3TlU5FavGEN3BK{L2N0cYy{*SCw8>Vwf&#CF}n~f=RyyZI!nvkPAkl z^XJFwHv`q{&~$n@0Z`+dx!tmCxXPzHtW)PFg0G|VaN0_4T6F+a7OfF%FVMS@0ISnR zoeeI1V+LWtBMjk}#qkfbXhi%>4~}sBnXNLGZ>-~KZrTCN!>(SjoTB|Wb5Oa+t{F~- z;cAmqG`RP8P+8!^=rPiyckyvD?5blttzZ4ypZr#KQ+tD4#(&DF`XJkc1g=f&m4!Yj z+vUu}!wK!<;q$u3;{VEcx4f8ELw^-2?tcM5f|aHOf&dMG%DOZ`Rgr1KFj!qq^vP}fS~ z;;34vD>vVW;a}HY4WGDI?i!50443CZ?_c5gGpEowLNCQwy>wlHa^M!&K}Az^BJMsZ zh&0v97XDPYc#2+%{F;<>qwL`%o(P}07cv@uJA;mU=|faFIKJWN8ZR^w-&BN5jm$n2hH8DT#Y<~i#Y70 zBHq-}Shc*_b#s8o*nN;HG=R&3-_YYKRZcM}rL6yu*{{4ERWNy-d_=J-ilBqa68HPm z+k-PHA9y*F%6$N;%(t|18h=rhDWoR~{l^SCs$y~p`B5F5Qh|^6E1Gl$8G$SMn}h&L zc}x^i$S9pPmA%6s{2w5m3Z5m1rw&dj-sizT6!}ytz6YEXf=zb(gCHv8Oz9dGQVb}N zL)wTEKoYeG^?)z!pM$g#iVp35g0$*jA#MC-7o5ZM*INe_{&EJD=PK^eX!!Tx+P-v# zg5$RqX{2B~-BFx&`=CNkz!f%AYa9O^=vamF5_GH%7R)AO*EY?r!KqBuH~=O3?j^}J z!PK8#uJ2^fF-fTuv%#N;&8flRLbe``8nk<|HKy^~GzijiEdoKDTtPJ8AH&sN$wkE@ zd@WX#kQqXn_?Lk~C-RVZM-2%f9oq#`#dc6Y{GTA5nt_?2;-w3jA*AcYR_%kzDZYh? zG(`{Nc4;WBYRq_t5U(6KA;bRz;;OkcjkqB*o<&?}S_1q~IrY*#B~vpMq|VntladS` zSO)(Yxt^|^)Ta?UWQGuXR5-tPV~f6h8i>A$!$;o_GiZc)+bp~$4!3?1x^`u(;5H#Q zes;f-M@IyGetCrd)6a!Rxu?Q44#EdD-8F48O(nsnIOQY!FZ`7ZLXhqFA~^nS5PzT$ z=%P@6Xlcr+YB%LnSip?cxKt?kBx&!Dp|2;oh!b;gd|xjQ6sMYIBMcQkoz{;g>!9Er_gOY*VS?RUbA*2o{wK zR2e3opA7#EGAuO78>_0;aJ&p*Q-lohaBKKX?s>WzO{>~cay=ti#y8hq*$fei_~E}o zoT)KQ?U@i~Av1)y@rnwa$ff-`Ra)VivGElyt@JCC=I^uUw7T?~LB3{D1IVP8eCN#) z(%y>QW?z`7oX9>L6IRKrJp>$A1>p?XIvqa9{x8dm6;C{Z%ZhZ z{eeP%3Dw*e0BL(Ys+_|JLmQ>K9{0^~w37p5m;=;KY1H8d(ibG9v3Ycz-eX1il^w`8`E{A%+Thllu#Q z2G0O@)o{3hQ|z!_dqF(j5bXXXpo^@;rtg#`po`K-!F_^bZtqvlqJBo3BQ*3MzIBFq z$v_W_sRK@F5vNqjVNa1xaLVj;P5gCmI+8{xbtl2;{DDG@cvMv$&rJYbshp7_Pu9YC z#$V0=>TfV!@nmdj6vG6gTI^^ly>>&cTm)xvbu&{XsZF5j&#^*-l1lIgX{6vU!5?<^ zE0a-qieo!;Vc$RergL(F`9&&8#(!nMGUkdKG+b%om7O0{KC|PxZKqr;K7RZ-@URG< z)7oKQ1H1yC&Tz?Pz{zyO#d>gGWBNxKbPhhX6mBj9zUVc5S`@ne^^O(talVzz!#K`XU(cSIXC3|w`68kJiKfE+ zseSQmgMY42`d%S?u<(QISvIv?rgO_>!L3m)-=A7}VI{MY-5j96+0<*^7tkiz7XYOX X29mcp&05IE0_jNh8NWTWhtU5404Myq literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php new file mode 100644 index 000000000000..dce6452a2be6 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php @@ -0,0 +1,303 @@ +google.cloud.translation.v3.AdaptiveMtDataset + */ +class AdaptiveMtDataset extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 3; + */ + protected $source_language_code = ''; + /** + * The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 4; + */ + protected $target_language_code = ''; + /** + * The number of examples in the dataset. + * + * Generated from protobuf field int32 example_count = 5; + */ + protected $example_count = 0; + /** + * Output only. Timestamp when this dataset was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this dataset was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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. The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` + * @type string $display_name + * The name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * @type string $source_language_code + * The BCP-47 language code of the source language. + * @type string $target_language_code + * The BCP-47 language code of the target language. + * @type int $example_count + * The number of examples in the dataset. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this dataset was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this dataset was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_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 dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_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 name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * 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 BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 3; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 3; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 4; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 4; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + + /** + * The number of examples in the dataset. + * + * Generated from protobuf field int32 example_count = 5; + * @return int + */ + public function getExampleCount() + { + return $this->example_count; + } + + /** + * The number of examples in the dataset. + * + * Generated from protobuf field int32 example_count = 5; + * @param int $var + * @return $this + */ + public function setExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->example_count = $var; + + return $this; + } + + /** + * Output only. Timestamp when this dataset was created. + * + * 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. Timestamp when this dataset was created. + * + * 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. Timestamp when this dataset was last updated. + * + * 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. Timestamp when this dataset was last updated. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php new file mode 100644 index 000000000000..fcd6d230e4b7 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php @@ -0,0 +1,227 @@ +google.cloud.translation.v3.AdaptiveMtFile + */ +class AdaptiveMtFile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The file's display name. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The number of entries that the file contains. + * + * Generated from protobuf field int32 entry_count = 3; + */ + protected $entry_count = 0; + /** + * Output only. Timestamp when this file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this file was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * @type string $display_name + * The file's display name. + * @type int $entry_count + * The number of entries that the file contains. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this file was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this file was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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 file's display name. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The file's display name. + * + * 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 number of entries that the file contains. + * + * Generated from protobuf field int32 entry_count = 3; + * @return int + */ + public function getEntryCount() + { + return $this->entry_count; + } + + /** + * The number of entries that the file contains. + * + * Generated from protobuf field int32 entry_count = 3; + * @param int $var + * @return $this + */ + public function setEntryCount($var) + { + GPBUtil::checkInt32($var); + $this->entry_count = $var; + + return $this; + } + + /** + * Output only. Timestamp when this file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp when this file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when this file was last updated. + * + * 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. Timestamp when this file was last updated. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php new file mode 100644 index 000000000000..72c6dfe743de --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php @@ -0,0 +1,227 @@ +google.cloud.translation.v3.AdaptiveMtSentence + */ +class AdaptiveMtSentence extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The source sentence. + * + * Generated from protobuf field string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_sentence = ''; + /** + * Required. The target sentence. + * + * Generated from protobuf field string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_sentence = ''; + /** + * Output only. Timestamp when this sentence was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this sentence was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` + * @type string $source_sentence + * Required. The source sentence. + * @type string $target_sentence + * Required. The target sentence. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this sentence was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this sentence was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` + * + * 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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` + * + * 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 source sentence. + * + * Generated from protobuf field string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceSentence() + { + return $this->source_sentence; + } + + /** + * Required. The source sentence. + * + * Generated from protobuf field string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceSentence($var) + { + GPBUtil::checkString($var, True); + $this->source_sentence = $var; + + return $this; + } + + /** + * Required. The target sentence. + * + * Generated from protobuf field string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetSentence() + { + return $this->target_sentence; + } + + /** + * Required. The target sentence. + * + * Generated from protobuf field string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetSentence($var) + { + GPBUtil::checkString($var, True); + $this->target_sentence = $var; + + return $this; + } + + /** + * Output only. Timestamp when this sentence was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp when this sentence was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when this sentence was last updated. + * + * 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. Timestamp when this sentence was last updated. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php new file mode 100644 index 000000000000..c58d6cec4b91 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php @@ -0,0 +1,257 @@ +google.cloud.translation.v3.AdaptiveMtTranslateRequest + */ +class AdaptiveMtTranslateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource name for the dataset to use for adaptive MT. + * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + * + * Generated from protobuf field string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $dataset = ''; + /** + * Required. The content of the input in string format. + * + * Generated from protobuf field repeated string content = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $content; + /** + * Configuration for caller provided reference sentences. + * + * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; + */ + protected $reference_sentence_config = null; + /** + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $glossary_config = null; + + /** + * @param string $parent Required. Location to make a regional call. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}`. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string[] $content Required. The content of the input in string format. + * + * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest + * + * @experimental + */ + public static function build(string $parent, array $content): self + { + return (new self()) + ->setParent($parent) + ->setContent($content); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * @type string $dataset + * Required. The resource name for the dataset to use for adaptive MT. + * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + * @type array|\Google\Protobuf\Internal\RepeatedField $content + * Required. The content of the input in string format. + * @type \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig $reference_sentence_config + * Configuration for caller provided reference sentences. + * @type \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig $glossary_config + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-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. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-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 resource name for the dataset to use for adaptive MT. + * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + * + * Generated from protobuf field string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Required. The resource name for the dataset to use for adaptive MT. + * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + * + * Generated from protobuf field string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Required. The content of the input in string format. + * + * Generated from protobuf field repeated string content = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContent() + { + return $this->content; + } + + /** + * Required. The content of the input in string format. + * + * Generated from protobuf field repeated string content = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->content = $arr; + + return $this; + } + + /** + * Configuration for caller provided reference sentences. + * + * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; + * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig|null + */ + public function getReferenceSentenceConfig() + { + return $this->reference_sentence_config; + } + + public function hasReferenceSentenceConfig() + { + return isset($this->reference_sentence_config); + } + + public function clearReferenceSentenceConfig() + { + unset($this->reference_sentence_config); + } + + /** + * Configuration for caller provided reference sentences. + * + * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; + * @param \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig $var + * @return $this + */ + public function setReferenceSentenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig::class); + $this->reference_sentence_config = $var; + + return $this; + } + + /** + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig|null + */ + public function getGlossaryConfig() + { + return $this->glossary_config; + } + + public function hasGlossaryConfig() + { + return isset($this->glossary_config); + } + + public function clearGlossaryConfig() + { + unset($this->glossary_config); + } + + /** + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig $var + * @return $this + */ + public function setGlossaryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig::class); + $this->glossary_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php new file mode 100644 index 000000000000..9f17c5a626f7 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php @@ -0,0 +1,160 @@ +google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig + */ +class GlossaryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * + * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $glossary = ''; + /** + * Optional. Indicates match is case insensitive. The default value is + * `false` if missing. + * + * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_case = false; + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $contextual_translation_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $glossary + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * @type bool $ignore_case + * Optional. Indicates match is case insensitive. The default value is + * `false` if missing. + * @type bool $contextual_translation_enabled + * Optional. If set to true, the glossary will be used for contextual + * translation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * + * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGlossary() + { + return $this->glossary; + } + + /** + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * + * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGlossary($var) + { + GPBUtil::checkString($var, True); + $this->glossary = $var; + + return $this; + } + + /** + * Optional. Indicates match is case insensitive. The default value is + * `false` if missing. + * + * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreCase() + { + return $this->ignore_case; + } + + /** + * Optional. Indicates match is case insensitive. The default value is + * `false` if missing. + * + * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreCase($var) + { + GPBUtil::checkBool($var); + $this->ignore_case = $var; + + return $this; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getContextualTranslationEnabled() + { + return $this->contextual_translation_enabled; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setContextualTranslationEnabled($var) + { + GPBUtil::checkBool($var); + $this->contextual_translation_enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GlossaryConfig::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_GlossaryConfig::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php new file mode 100644 index 000000000000..dc9832691240 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php @@ -0,0 +1,150 @@ +google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig + */ +class ReferenceSentenceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Reference sentences pair lists. Each list will be used as the references + * to translate the sentence under "content" field at the corresponding + * index. Length of the list is required to be equal to the length of + * "content" field. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList reference_sentence_pair_lists = 1; + */ + private $reference_sentence_pair_lists; + /** + * Source language code. + * + * Generated from protobuf field string source_language_code = 2; + */ + protected $source_language_code = ''; + /** + * Target language code. + * + * Generated from protobuf field string target_language_code = 3; + */ + protected $target_language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePairList>|\Google\Protobuf\Internal\RepeatedField $reference_sentence_pair_lists + * Reference sentences pair lists. Each list will be used as the references + * to translate the sentence under "content" field at the corresponding + * index. Length of the list is required to be equal to the length of + * "content" field. + * @type string $source_language_code + * Source language code. + * @type string $target_language_code + * Target language code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Reference sentences pair lists. Each list will be used as the references + * to translate the sentence under "content" field at the corresponding + * index. Length of the list is required to be equal to the length of + * "content" field. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList reference_sentence_pair_lists = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferenceSentencePairLists() + { + return $this->reference_sentence_pair_lists; + } + + /** + * Reference sentences pair lists. Each list will be used as the references + * to translate the sentence under "content" field at the corresponding + * index. Length of the list is required to be equal to the length of + * "content" field. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList reference_sentence_pair_lists = 1; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePairList>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferenceSentencePairLists($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePairList::class); + $this->reference_sentence_pair_lists = $arr; + + return $this; + } + + /** + * Source language code. + * + * Generated from protobuf field string source_language_code = 2; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Source language code. + * + * Generated from protobuf field string source_language_code = 2; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Target language code. + * + * Generated from protobuf field string target_language_code = 3; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * Target language code. + * + * Generated from protobuf field string target_language_code = 3; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReferenceSentenceConfig::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_ReferenceSentenceConfig::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php new file mode 100644 index 000000000000..2be985f639e7 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php @@ -0,0 +1,104 @@ +google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair + */ +class ReferenceSentencePair extends \Google\Protobuf\Internal\Message +{ + /** + * Source sentence in the sentence pair. + * + * Generated from protobuf field string source_sentence = 1; + */ + protected $source_sentence = ''; + /** + * Target sentence in the sentence pair. + * + * Generated from protobuf field string target_sentence = 2; + */ + protected $target_sentence = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_sentence + * Source sentence in the sentence pair. + * @type string $target_sentence + * Target sentence in the sentence pair. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Source sentence in the sentence pair. + * + * Generated from protobuf field string source_sentence = 1; + * @return string + */ + public function getSourceSentence() + { + return $this->source_sentence; + } + + /** + * Source sentence in the sentence pair. + * + * Generated from protobuf field string source_sentence = 1; + * @param string $var + * @return $this + */ + public function setSourceSentence($var) + { + GPBUtil::checkString($var, True); + $this->source_sentence = $var; + + return $this; + } + + /** + * Target sentence in the sentence pair. + * + * Generated from protobuf field string target_sentence = 2; + * @return string + */ + public function getTargetSentence() + { + return $this->target_sentence; + } + + /** + * Target sentence in the sentence pair. + * + * Generated from protobuf field string target_sentence = 2; + * @param string $var + * @return $this + */ + public function setTargetSentence($var) + { + GPBUtil::checkString($var, True); + $this->target_sentence = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReferenceSentencePair::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_ReferenceSentencePair::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php new file mode 100644 index 000000000000..4cf1d0cd0b60 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php @@ -0,0 +1,70 @@ +google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList + */ +class ReferenceSentencePairList extends \Google\Protobuf\Internal\Message +{ + /** + * Reference sentence pairs. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair reference_sentence_pairs = 1; + */ + private $reference_sentence_pairs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePair>|\Google\Protobuf\Internal\RepeatedField $reference_sentence_pairs + * Reference sentence pairs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Reference sentence pairs. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair reference_sentence_pairs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferenceSentencePairs() + { + return $this->reference_sentence_pairs; + } + + /** + * Reference sentence pairs. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair reference_sentence_pairs = 1; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePair>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferenceSentencePairs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePair::class); + $this->reference_sentence_pairs = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReferenceSentencePairList::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_ReferenceSentencePairList::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php new file mode 100644 index 000000000000..23bd73ce8eb5 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php @@ -0,0 +1,139 @@ +google.cloud.translation.v3.AdaptiveMtTranslateResponse + */ +class AdaptiveMtTranslateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The translation. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation translations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $translations; + /** + * Output only. The translation's language code. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $language_code = ''; + /** + * Text translation response if a glossary is provided in the request. This + * could be the same as 'translation' above if no terms apply. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation glossary_translations = 4; + */ + private $glossary_translations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $translations + * Output only. The translation. + * @type string $language_code + * Output only. The translation's language code. + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $glossary_translations + * Text translation response if a glossary is provided in the request. This + * could be the same as 'translation' above if no terms apply. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The translation. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation translations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTranslations() + { + return $this->translations; + } + + /** + * Output only. The translation. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation translations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTranslations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslation::class); + $this->translations = $arr; + + return $this; + } + + /** + * Output only. The translation's language code. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Output only. The translation's language code. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Text translation response if a glossary is provided in the request. This + * could be the same as 'translation' above if no terms apply. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation glossary_translations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGlossaryTranslations() + { + return $this->glossary_translations; + } + + /** + * Text translation response if a glossary is provided in the request. This + * could be the same as 'translation' above if no terms apply. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation glossary_translations = 4; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGlossaryTranslations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslation::class); + $this->glossary_translations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php new file mode 100644 index 000000000000..6dd8e9911c65 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php @@ -0,0 +1,67 @@ +google.cloud.translation.v3.AdaptiveMtTranslation + */ +class AdaptiveMtTranslation extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The translated text. + * + * Generated from protobuf field string translated_text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $translated_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $translated_text + * Output only. The translated text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The translated text. + * + * Generated from protobuf field string translated_text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTranslatedText() + { + return $this->translated_text; + } + + /** + * Output only. The translated text. + * + * Generated from protobuf field string translated_text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTranslatedText($var) + { + GPBUtil::checkString($var, True); + $this->translated_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php new file mode 100644 index 000000000000..43a05b43f1b0 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php @@ -0,0 +1,123 @@ +google.cloud.translation.v3.BatchDocumentInputConfig + */ +class BatchDocumentInputConfig extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size to support for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size to support for all input documents is 1GB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size to support for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size to support for all input documents is 1GB. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; + * @return \Google\Cloud\Translate\V3\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size to support for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size to support for all input documents is 1GB. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; + * @param \Google\Cloud\Translate\V3\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php new file mode 100644 index 000000000000..60ecb3217132 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php @@ -0,0 +1,186 @@ +google.cloud.translation.v3.BatchDocumentOutputConfig + */ +class BatchDocumentOutputConfig extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GcsDestination $gcs_destination + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * `gs://translation_output/a_b_c_[trg]_translation.[extension]` + * `glossary_translation_output`: + * `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` + * `glossary_error_output`: + * `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error + * output is a txt file containing error details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * `gs://translation_output/a_b_c_[trg]_translation.[extension]` + * `glossary_translation_output`: + * `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` + * `glossary_error_output`: + * `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error + * output is a txt file containing error details. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; + * @return \Google\Cloud\Translate\V3\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * `gs://translation_output/a_b_c_[trg]_translation.[extension]` + * `glossary_translation_output`: + * `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` + * `glossary_error_output`: + * `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error + * output is a txt file containing error details. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; + * @param \Google\Cloud\Translate\V3\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php new file mode 100644 index 000000000000..6a158a539946 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php @@ -0,0 +1,67 @@ +google.cloud.translation.v3.BatchTransferResourcesResponse + */ +class BatchTransferResourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Responses of the transfer for individual resources. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\BatchTransferResourcesResponse\TransferResourceResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * Responses of the transfer for individual resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Responses of the transfer for individual resources. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Responses of the transfer for individual resources. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse responses = 1; + * @param array<\Google\Cloud\Translate\V3\BatchTransferResourcesResponse\TransferResourceResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\BatchTransferResourcesResponse\TransferResourceResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php new file mode 100644 index 000000000000..dbe0d9f6393d --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php @@ -0,0 +1,152 @@ +google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse + */ +class TransferResourceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Full name of the resource to transfer as specified in the request. + * + * Generated from protobuf field string source = 1; + */ + protected $source = ''; + /** + * Full name of the new resource successfully transferred from the source + * hosted by Translation API. Target will be empty if the transfer failed. + * + * Generated from protobuf field string target = 2; + */ + protected $target = ''; + /** + * The error result in case of failure. + * + * Generated from protobuf field .google.rpc.Status error = 3; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * Full name of the resource to transfer as specified in the request. + * @type string $target + * Full name of the new resource successfully transferred from the source + * hosted by Translation API. Target will be empty if the transfer failed. + * @type \Google\Rpc\Status $error + * The error result in case of failure. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Full name of the resource to transfer as specified in the request. + * + * Generated from protobuf field string source = 1; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Full name of the resource to transfer as specified in the request. + * + * Generated from protobuf field string source = 1; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Full name of the new resource successfully transferred from the source + * hosted by Translation API. Target will be empty if the transfer failed. + * + * Generated from protobuf field string target = 2; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Full name of the new resource successfully transferred from the source + * hosted by Translation API. Target will be empty if the transfer failed. + * + * Generated from protobuf field string target = 2; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * The error result in case of failure. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * The error result in case of failure. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TransferResourceResponse::class, \Google\Cloud\Translate\V3\BatchTransferResourcesResponse_TransferResourceResponse::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php new file mode 100644 index 000000000000..578301767c67 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php @@ -0,0 +1,411 @@ +google.cloud.translation.v3.BatchTranslateDocumentMetadata + */ +class BatchTranslateDocumentMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1; + */ + protected $state = 0; + /** + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 total_pages = 2; + */ + protected $total_pages = 0; + /** + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 translated_pages = 3; + */ + protected $translated_pages = 0; + /** + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 failed_pages = 4; + */ + protected $failed_pages = 0; + /** + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + * + * Generated from protobuf field int64 total_billable_pages = 5; + */ + protected $total_billable_pages = 0; + /** + * Total number of characters (Unicode codepoints) in all documents so far. + * + * Generated from protobuf field int64 total_characters = 6; + */ + protected $total_characters = 0; + /** + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + * + * Generated from protobuf field int64 translated_characters = 7; + */ + protected $translated_characters = 0; + /** + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + * + * Generated from protobuf field int64 failed_characters = 8; + */ + protected $failed_characters = 0; + /** + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + * + * Generated from protobuf field int64 total_billable_characters = 9; + */ + protected $total_billable_characters = 0; + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 10; + */ + protected $submit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the operation. + * @type int|string $total_pages + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * @type int|string $translated_pages + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * @type int|string $failed_pages + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * @type int|string $total_billable_pages + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + * @type int|string $total_characters + * Total number of characters (Unicode codepoints) in all documents so far. + * @type int|string $translated_characters + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + * @type int|string $failed_characters + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + * @type int|string $total_billable_characters + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + * @type \Google\Protobuf\Timestamp $submit_time + * Time when the operation was submitted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\BatchTranslateDocumentMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 total_pages = 2; + * @return int|string + */ + public function getTotalPages() + { + return $this->total_pages; + } + + /** + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 total_pages = 2; + * @param int|string $var + * @return $this + */ + public function setTotalPages($var) + { + GPBUtil::checkInt64($var); + $this->total_pages = $var; + + return $this; + } + + /** + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 translated_pages = 3; + * @return int|string + */ + public function getTranslatedPages() + { + return $this->translated_pages; + } + + /** + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 translated_pages = 3; + * @param int|string $var + * @return $this + */ + public function setTranslatedPages($var) + { + GPBUtil::checkInt64($var); + $this->translated_pages = $var; + + return $this; + } + + /** + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 failed_pages = 4; + * @return int|string + */ + public function getFailedPages() + { + return $this->failed_pages; + } + + /** + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 failed_pages = 4; + * @param int|string $var + * @return $this + */ + public function setFailedPages($var) + { + GPBUtil::checkInt64($var); + $this->failed_pages = $var; + + return $this; + } + + /** + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + * + * Generated from protobuf field int64 total_billable_pages = 5; + * @return int|string + */ + public function getTotalBillablePages() + { + return $this->total_billable_pages; + } + + /** + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + * + * Generated from protobuf field int64 total_billable_pages = 5; + * @param int|string $var + * @return $this + */ + public function setTotalBillablePages($var) + { + GPBUtil::checkInt64($var); + $this->total_billable_pages = $var; + + return $this; + } + + /** + * Total number of characters (Unicode codepoints) in all documents so far. + * + * Generated from protobuf field int64 total_characters = 6; + * @return int|string + */ + public function getTotalCharacters() + { + return $this->total_characters; + } + + /** + * Total number of characters (Unicode codepoints) in all documents so far. + * + * Generated from protobuf field int64 total_characters = 6; + * @param int|string $var + * @return $this + */ + public function setTotalCharacters($var) + { + GPBUtil::checkInt64($var); + $this->total_characters = $var; + + return $this; + } + + /** + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + * + * Generated from protobuf field int64 translated_characters = 7; + * @return int|string + */ + public function getTranslatedCharacters() + { + return $this->translated_characters; + } + + /** + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + * + * Generated from protobuf field int64 translated_characters = 7; + * @param int|string $var + * @return $this + */ + public function setTranslatedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->translated_characters = $var; + + return $this; + } + + /** + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + * + * Generated from protobuf field int64 failed_characters = 8; + * @return int|string + */ + public function getFailedCharacters() + { + return $this->failed_characters; + } + + /** + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + * + * Generated from protobuf field int64 failed_characters = 8; + * @param int|string $var + * @return $this + */ + public function setFailedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->failed_characters = $var; + + return $this; + } + + /** + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + * + * Generated from protobuf field int64 total_billable_characters = 9; + * @return int|string + */ + public function getTotalBillableCharacters() + { + return $this->total_billable_characters; + } + + /** + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + * + * Generated from protobuf field int64 total_billable_characters = 9; + * @param int|string $var + * @return $this + */ + public function setTotalBillableCharacters($var) + { + GPBUtil::checkInt64($var); + $this->total_billable_characters = $var; + + return $this; + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php new file mode 100644 index 000000000000..6631a48171fb --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php @@ -0,0 +1,88 @@ +google.cloud.translation.v3.BatchTranslateDocumentMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The batch is processed, and at least one item was successfully processed. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The batch is done and no item was successfully processed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The batch is done after the user has called the + * longrunning.Operations.CancelOperation. Any records processed before the + * cancel command are output as specified in the request. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Translate\V3\BatchTranslateDocumentMetadata_State::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php new file mode 100644 index 000000000000..6b8310ad887c --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php @@ -0,0 +1,595 @@ +google.cloud.translation.v3.BatchTranslateDocumentRequest + */ +class BatchTranslateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * [Language Support](https://cloud.google.com/translate/docs/languages). + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_language_code = ''; + /** + * Required. The ISO-639 language code to use for translation of the input + * document. Specify up to 10 language codes here. + * + * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $target_language_codes; + /** + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size to translate should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $input_configs; + /** + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + /** + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * + * Generated from protobuf field map models = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $models; + /** + * Optional. Glossaries to be applied. It's keyed by target language code. + * + * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $glossaries; + /** + * Optional. The file format conversion map that is applied to all input + * files. The map key is the original mime_type. The map value is the target + * mime_type of translated documents. + * Supported file format conversion includes: + * - `application/pdf` to + * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + * If nothing specified, output files will be in the same format as the + * original file. + * + * Generated from protobuf field map format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $format_conversions; + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * + * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $customized_attribution = ''; + /** + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * + * Generated from protobuf field bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_shadow_removal_native_pdf = false; + /** + * Optional. If true, enable auto rotation correction in DVS. + * + * Generated from protobuf field bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_rotation_correction = false; + + /** + * @param string $parent Required. Location to make a regional call. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * + * The `global` location is not supported for batch translation. + * + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string $sourceLanguageCode Required. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * [Language Support](https://cloud.google.com/translate/docs/languages). + * @param string[] $targetLanguageCodes Required. The ISO-639 language code to use for translation of the input + * document. Specify up to 10 language codes here. + * @param \Google\Cloud\Translate\V3\BatchDocumentInputConfig[] $inputConfigs Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size to translate should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * @param \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $outputConfig Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * @return \Google\Cloud\Translate\V3\BatchTranslateDocumentRequest + * + * @experimental + */ + public static function build(string $parent, string $sourceLanguageCode, array $targetLanguageCodes, array $inputConfigs, \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $outputConfig): self + { + return (new self()) + ->setParent($parent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * @type string $source_language_code + * Required. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * [Language Support](https://cloud.google.com/translate/docs/languages). + * @type array|\Google\Protobuf\Internal\RepeatedField $target_language_codes + * Required. The ISO-639 language code to use for translation of the input + * document. Specify up to 10 language codes here. + * @type array<\Google\Cloud\Translate\V3\BatchDocumentInputConfig>|\Google\Protobuf\Internal\RepeatedField $input_configs + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size to translate should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * @type \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $output_config + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * @type array|\Google\Protobuf\Internal\MapField $models + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * @type array|\Google\Protobuf\Internal\MapField $glossaries + * Optional. Glossaries to be applied. It's keyed by target language code. + * @type array|\Google\Protobuf\Internal\MapField $format_conversions + * Optional. The file format conversion map that is applied to all input + * files. The map key is the original mime_type. The map value is the target + * mime_type of translated documents. + * Supported file format conversion includes: + * - `application/pdf` to + * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + * If nothing specified, output files will be in the same format as the + * original file. + * @type string $customized_attribution + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * @type bool $enable_shadow_removal_native_pdf + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * @type bool $enable_rotation_correction + * Optional. If true, enable auto rotation correction in DVS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * [Language Support](https://cloud.google.com/translate/docs/languages). + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Required. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * [Language Support](https://cloud.google.com/translate/docs/languages). + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Required. The ISO-639 language code to use for translation of the input + * document. Specify up to 10 language codes here. + * + * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetLanguageCodes() + { + return $this->target_language_codes; + } + + /** + * Required. The ISO-639 language code to use for translation of the input + * document. Specify up to 10 language codes here. + * + * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_language_codes = $arr; + + return $this; + } + + /** + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size to translate should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputConfigs() + { + return $this->input_configs; + } + + /** + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size to translate should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Translate\V3\BatchDocumentInputConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\BatchDocumentInputConfig::class); + $this->input_configs = $arr; + + return $this; + } + + /** + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\BatchDocumentOutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\BatchDocumentOutputConfig::class); + $this->output_config = $var; + + return $this; + } + + /** + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * + * Generated from protobuf field map models = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getModels() + { + return $this->models; + } + + /** + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * + * Generated from protobuf field map models = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setModels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->models = $arr; + + return $this; + } + + /** + * Optional. Glossaries to be applied. It's keyed by target language code. + * + * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getGlossaries() + { + return $this->glossaries; + } + + /** + * Optional. Glossaries to be applied. It's keyed by target language code. + * + * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setGlossaries($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); + $this->glossaries = $arr; + + return $this; + } + + /** + * Optional. The file format conversion map that is applied to all input + * files. The map key is the original mime_type. The map value is the target + * mime_type of translated documents. + * Supported file format conversion includes: + * - `application/pdf` to + * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + * If nothing specified, output files will be in the same format as the + * original file. + * + * Generated from protobuf field map format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFormatConversions() + { + return $this->format_conversions; + } + + /** + * Optional. The file format conversion map that is applied to all input + * files. The map key is the original mime_type. The map value is the target + * mime_type of translated documents. + * Supported file format conversion includes: + * - `application/pdf` to + * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + * If nothing specified, output files will be in the same format as the + * original file. + * + * Generated from protobuf field map format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFormatConversions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->format_conversions = $arr; + + return $this; + } + + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * + * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomizedAttribution() + { + return $this->customized_attribution; + } + + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * + * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomizedAttribution($var) + { + GPBUtil::checkString($var, True); + $this->customized_attribution = $var; + + return $this; + } + + /** + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * + * Generated from protobuf field bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableShadowRemovalNativePdf() + { + return $this->enable_shadow_removal_native_pdf; + } + + /** + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * + * Generated from protobuf field bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableShadowRemovalNativePdf($var) + { + GPBUtil::checkBool($var); + $this->enable_shadow_removal_native_pdf = $var; + + return $this; + } + + /** + * Optional. If true, enable auto rotation correction in DVS. + * + * Generated from protobuf field bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableRotationCorrection() + { + return $this->enable_rotation_correction; + } + + /** + * Optional. If true, enable auto rotation correction in DVS. + * + * Generated from protobuf field bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableRotationCorrection($var) + { + GPBUtil::checkBool($var); + $this->enable_rotation_correction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php new file mode 100644 index 000000000000..ac0c68355f78 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php @@ -0,0 +1,432 @@ +google.cloud.translation.v3.BatchTranslateDocumentResponse + */ +class BatchTranslateDocumentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of pages to translate in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 total_pages = 1; + */ + protected $total_pages = 0; + /** + * Number of successfully translated pages in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 translated_pages = 2; + */ + protected $translated_pages = 0; + /** + * Number of pages that failed to process in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 failed_pages = 3; + */ + protected $failed_pages = 0; + /** + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + * + * Generated from protobuf field int64 total_billable_pages = 4; + */ + protected $total_billable_pages = 0; + /** + * Total number of characters (Unicode codepoints) in all documents. + * + * Generated from protobuf field int64 total_characters = 5; + */ + protected $total_characters = 0; + /** + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + * + * Generated from protobuf field int64 translated_characters = 6; + */ + protected $translated_characters = 0; + /** + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + * + * Generated from protobuf field int64 failed_characters = 7; + */ + protected $failed_characters = 0; + /** + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + * + * Generated from protobuf field int64 total_billable_characters = 8; + */ + protected $total_billable_characters = 0; + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 9; + */ + protected $submit_time = null; + /** + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 10; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $total_pages + * Total number of pages to translate in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * @type int|string $translated_pages + * Number of successfully translated pages in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * @type int|string $failed_pages + * Number of pages that failed to process in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * @type int|string $total_billable_pages + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + * @type int|string $total_characters + * Total number of characters (Unicode codepoints) in all documents. + * @type int|string $translated_characters + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + * @type int|string $failed_characters + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + * @type int|string $total_billable_characters + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + * @type \Google\Protobuf\Timestamp $submit_time + * Time when the operation was submitted. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Total number of pages to translate in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 total_pages = 1; + * @return int|string + */ + public function getTotalPages() + { + return $this->total_pages; + } + + /** + * Total number of pages to translate in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 total_pages = 1; + * @param int|string $var + * @return $this + */ + public function setTotalPages($var) + { + GPBUtil::checkInt64($var); + $this->total_pages = $var; + + return $this; + } + + /** + * Number of successfully translated pages in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 translated_pages = 2; + * @return int|string + */ + public function getTranslatedPages() + { + return $this->translated_pages; + } + + /** + * Number of successfully translated pages in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 translated_pages = 2; + * @param int|string $var + * @return $this + */ + public function setTranslatedPages($var) + { + GPBUtil::checkInt64($var); + $this->translated_pages = $var; + + return $this; + } + + /** + * Number of pages that failed to process in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 failed_pages = 3; + * @return int|string + */ + public function getFailedPages() + { + return $this->failed_pages; + } + + /** + * Number of pages that failed to process in all documents. Documents without + * clear page definition (such as XLSX) are not counted. + * + * Generated from protobuf field int64 failed_pages = 3; + * @param int|string $var + * @return $this + */ + public function setFailedPages($var) + { + GPBUtil::checkInt64($var); + $this->failed_pages = $var; + + return $this; + } + + /** + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + * + * Generated from protobuf field int64 total_billable_pages = 4; + * @return int|string + */ + public function getTotalBillablePages() + { + return $this->total_billable_pages; + } + + /** + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + * + * Generated from protobuf field int64 total_billable_pages = 4; + * @param int|string $var + * @return $this + */ + public function setTotalBillablePages($var) + { + GPBUtil::checkInt64($var); + $this->total_billable_pages = $var; + + return $this; + } + + /** + * Total number of characters (Unicode codepoints) in all documents. + * + * Generated from protobuf field int64 total_characters = 5; + * @return int|string + */ + public function getTotalCharacters() + { + return $this->total_characters; + } + + /** + * Total number of characters (Unicode codepoints) in all documents. + * + * Generated from protobuf field int64 total_characters = 5; + * @param int|string $var + * @return $this + */ + public function setTotalCharacters($var) + { + GPBUtil::checkInt64($var); + $this->total_characters = $var; + + return $this; + } + + /** + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + * + * Generated from protobuf field int64 translated_characters = 6; + * @return int|string + */ + public function getTranslatedCharacters() + { + return $this->translated_characters; + } + + /** + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + * + * Generated from protobuf field int64 translated_characters = 6; + * @param int|string $var + * @return $this + */ + public function setTranslatedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->translated_characters = $var; + + return $this; + } + + /** + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + * + * Generated from protobuf field int64 failed_characters = 7; + * @return int|string + */ + public function getFailedCharacters() + { + return $this->failed_characters; + } + + /** + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + * + * Generated from protobuf field int64 failed_characters = 7; + * @param int|string $var + * @return $this + */ + public function setFailedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->failed_characters = $var; + + return $this; + } + + /** + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + * + * Generated from protobuf field int64 total_billable_characters = 8; + * @return int|string + */ + public function getTotalBillableCharacters() + { + return $this->total_billable_characters; + } + + /** + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + * + * Generated from protobuf field int64 total_billable_characters = 8; + * @param int|string $var + * @return $this + */ + public function setTotalBillableCharacters($var) + { + GPBUtil::checkInt64($var); + $this->total_billable_characters = $var; + + return $this; + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 10; + * @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 when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 10; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php new file mode 100644 index 000000000000..088d15ac8a90 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php @@ -0,0 +1,225 @@ +google.cloud.translation.v3.BatchTranslateMetadata + */ +class BatchTranslateMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateMetadata.State state = 1; + */ + protected $state = 0; + /** + * Number of successfully translated characters so far (Unicode codepoints). + * + * Generated from protobuf field int64 translated_characters = 2; + */ + protected $translated_characters = 0; + /** + * Number of characters that have failed to process so far (Unicode + * codepoints). + * + * Generated from protobuf field int64 failed_characters = 3; + */ + protected $failed_characters = 0; + /** + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages and appears here shortly after the call is submitted. + * + * Generated from protobuf field int64 total_characters = 4; + */ + protected $total_characters = 0; + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 5; + */ + protected $submit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the operation. + * @type int|string $translated_characters + * Number of successfully translated characters so far (Unicode codepoints). + * @type int|string $failed_characters + * Number of characters that have failed to process so far (Unicode + * codepoints). + * @type int|string $total_characters + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages and appears here shortly after the call is submitted. + * @type \Google\Protobuf\Timestamp $submit_time + * Time when the operation was submitted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\BatchTranslateMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * Number of successfully translated characters so far (Unicode codepoints). + * + * Generated from protobuf field int64 translated_characters = 2; + * @return int|string + */ + public function getTranslatedCharacters() + { + return $this->translated_characters; + } + + /** + * Number of successfully translated characters so far (Unicode codepoints). + * + * Generated from protobuf field int64 translated_characters = 2; + * @param int|string $var + * @return $this + */ + public function setTranslatedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->translated_characters = $var; + + return $this; + } + + /** + * Number of characters that have failed to process so far (Unicode + * codepoints). + * + * Generated from protobuf field int64 failed_characters = 3; + * @return int|string + */ + public function getFailedCharacters() + { + return $this->failed_characters; + } + + /** + * Number of characters that have failed to process so far (Unicode + * codepoints). + * + * Generated from protobuf field int64 failed_characters = 3; + * @param int|string $var + * @return $this + */ + public function setFailedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->failed_characters = $var; + + return $this; + } + + /** + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages and appears here shortly after the call is submitted. + * + * Generated from protobuf field int64 total_characters = 4; + * @return int|string + */ + public function getTotalCharacters() + { + return $this->total_characters; + } + + /** + * Total number of characters (Unicode codepoints). + * This is the total number of codepoints from input files times the number of + * target languages and appears here shortly after the call is submitted. + * + * Generated from protobuf field int64 total_characters = 4; + * @param int|string $var + * @return $this + */ + public function setTotalCharacters($var) + { + GPBUtil::checkInt64($var); + $this->total_characters = $var; + + return $this; + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php new file mode 100644 index 000000000000..287dfff03890 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php @@ -0,0 +1,89 @@ +google.cloud.translation.v3.BatchTranslateMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The batch is processed, and at least one item was successfully + * processed. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The batch is done and no item was successfully processed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The batch is done after the user has called the + * longrunning.Operations.CancelOperation. Any records processed before the + * cancel command are output as specified in the request. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Translate\V3\BatchTranslateMetadata_State::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php new file mode 100644 index 000000000000..dfd33736f5e8 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php @@ -0,0 +1,234 @@ +google.cloud.translation.v3.BatchTranslateResponse + */ +class BatchTranslateResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of characters (Unicode codepoints). + * + * Generated from protobuf field int64 total_characters = 1; + */ + protected $total_characters = 0; + /** + * Number of successfully translated characters (Unicode codepoints). + * + * Generated from protobuf field int64 translated_characters = 2; + */ + protected $translated_characters = 0; + /** + * Number of characters that have failed to process (Unicode codepoints). + * + * Generated from protobuf field int64 failed_characters = 3; + */ + protected $failed_characters = 0; + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; + */ + protected $submit_time = null; + /** + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $total_characters + * Total number of characters (Unicode codepoints). + * @type int|string $translated_characters + * Number of successfully translated characters (Unicode codepoints). + * @type int|string $failed_characters + * Number of characters that have failed to process (Unicode codepoints). + * @type \Google\Protobuf\Timestamp $submit_time + * Time when the operation was submitted. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Total number of characters (Unicode codepoints). + * + * Generated from protobuf field int64 total_characters = 1; + * @return int|string + */ + public function getTotalCharacters() + { + return $this->total_characters; + } + + /** + * Total number of characters (Unicode codepoints). + * + * Generated from protobuf field int64 total_characters = 1; + * @param int|string $var + * @return $this + */ + public function setTotalCharacters($var) + { + GPBUtil::checkInt64($var); + $this->total_characters = $var; + + return $this; + } + + /** + * Number of successfully translated characters (Unicode codepoints). + * + * Generated from protobuf field int64 translated_characters = 2; + * @return int|string + */ + public function getTranslatedCharacters() + { + return $this->translated_characters; + } + + /** + * Number of successfully translated characters (Unicode codepoints). + * + * Generated from protobuf field int64 translated_characters = 2; + * @param int|string $var + * @return $this + */ + public function setTranslatedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->translated_characters = $var; + + return $this; + } + + /** + * Number of characters that have failed to process (Unicode codepoints). + * + * Generated from protobuf field int64 failed_characters = 3; + * @return int|string + */ + public function getFailedCharacters() + { + return $this->failed_characters; + } + + /** + * Number of characters that have failed to process (Unicode codepoints). + * + * Generated from protobuf field int64 failed_characters = 3; + * @param int|string $var + * @return $this + */ + public function setFailedCharacters($var) + { + GPBUtil::checkInt64($var); + $this->failed_characters = $var; + + return $this; + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * Time when the operation was submitted. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * 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); + } + + /** + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php new file mode 100644 index 000000000000..79d9d7031130 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php @@ -0,0 +1,419 @@ +google.cloud.translation.v3.BatchTranslateTextRequest + */ +class BatchTranslateTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Location to make a call. Must refer to a caller's project. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Source language code. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_language_code = ''; + /** + * Required. Specify up to 10 language codes here. + * + * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $target_language_codes; + /** + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * + * Generated from protobuf field map models = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $models; + /** + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $input_configs; + /** + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * Generated from protobuf field .google.cloud.translation.v3.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + /** + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + * + * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $glossaries; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Location to make a call. Must refer to a caller's project. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * @type string $source_language_code + * Required. Source language code. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_language_codes + * Required. Specify up to 10 language codes here. + * @type array|\Google\Protobuf\Internal\MapField $models + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * @type array<\Google\Cloud\Translate\V3\InputConfig>|\Google\Protobuf\Internal\RepeatedField $input_configs + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * @type \Google\Cloud\Translate\V3\OutputConfig $output_config + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * @type array|\Google\Protobuf\Internal\MapField $glossaries + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Location to make a call. Must refer to a caller's project. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Location to make a call. Must refer to a caller's project. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * The `global` location is not supported for batch translation. + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Source language code. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Required. Source language code. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Required. Specify up to 10 language codes here. + * + * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetLanguageCodes() + { + return $this->target_language_codes; + } + + /** + * Required. Specify up to 10 language codes here. + * + * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_language_codes = $arr; + + return $this; + } + + /** + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * + * Generated from protobuf field map models = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getModels() + { + return $this->models; + } + + /** + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * + * Generated from protobuf field map models = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setModels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->models = $arr; + + return $this; + } + + /** + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputConfigs() + { + return $this->input_configs; + } + + /** + * Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Translate\V3\InputConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\InputConfig::class); + $this->input_configs = $arr; + + return $this; + } + + /** + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * Generated from protobuf field .google.cloud.translation.v3.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * + * Generated from protobuf field .google.cloud.translation.v3.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + + /** + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + * + * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getGlossaries() + { + return $this->glossaries; + } + + /** + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + * + * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setGlossaries($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); + $this->glossaries = $arr; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 9 [(.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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php new file mode 100644 index 000000000000..4fe3a22800c2 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php @@ -0,0 +1,132 @@ +google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest + */ +class CreateAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The AdaptiveMtDataset to be created. + * + * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $adaptive_mt_dataset = null; + + /** + * @param string $parent Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptiveMtDataset Required. The AdaptiveMtDataset to be created. + * + * @return \Google\Cloud\Translate\V3\CreateAdaptiveMtDatasetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptiveMtDataset): self + { + return (new self()) + ->setParent($parent) + ->setAdaptiveMtDataset($adaptiveMtDataset); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * @type \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptive_mt_dataset + * Required. The AdaptiveMtDataset to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-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. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-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 AdaptiveMtDataset to be created. + * + * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset|null + */ + public function getAdaptiveMtDataset() + { + return $this->adaptive_mt_dataset; + } + + public function hasAdaptiveMtDataset() + { + return isset($this->adaptive_mt_dataset); + } + + public function clearAdaptiveMtDataset() + { + unset($this->adaptive_mt_dataset); + } + + /** + * Required. The AdaptiveMtDataset to be created. + * + * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\AdaptiveMtDataset $var + * @return $this + */ + public function setAdaptiveMtDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtDataset::class); + $this->adaptive_mt_dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php new file mode 100644 index 000000000000..181ae224ce41 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php @@ -0,0 +1,199 @@ +google.cloud.translation.v3.CreateDatasetMetadata + */ +class CreateDatasetMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + */ + protected $state = 0; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Rpc\Status $error + * Only populated when operation doesn't succeed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The creation time of the 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 creation time of the 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 last 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 last 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; + } + + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Only populated when operation doesn't succeed. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php new file mode 100644 index 000000000000..cba93978545d --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php @@ -0,0 +1,127 @@ +google.cloud.translation.v3.CreateDatasetRequest + */ +class CreateDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Dataset to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset = null; + + /** + * @param string $parent Required. The project name. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Translate\V3\Dataset $dataset Required. The Dataset to create. + * + * @return \Google\Cloud\Translate\V3\CreateDatasetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Translate\V3\Dataset $dataset): self + { + return (new self()) + ->setParent($parent) + ->setDataset($dataset); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project name. + * @type \Google\Cloud\Translate\V3\Dataset $dataset + * Required. The Dataset to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project name. + * + * 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 name. + * + * 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 Dataset to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\Dataset|null + */ + public function getDataset() + { + return $this->dataset; + } + + public function hasDataset() + { + return isset($this->dataset); + } + + public function clearDataset() + { + unset($this->dataset); + } + + /** + * Required. The Dataset to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\Dataset $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Dataset::class); + $this->dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php new file mode 100644 index 000000000000..d4c38b6d0acb --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php @@ -0,0 +1,127 @@ +google.cloud.translation.v3.CreateGlossaryEntryRequest + */ +class CreateGlossaryEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the glossary to create the entry under. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The glossary entry to create + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $glossary_entry = null; + + /** + * @param string $parent Required. The resource name of the glossary to create the entry under. Please see + * {@see TranslationServiceClient::glossaryName()} for help formatting this field. + * @param \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry Required. The glossary entry to create + * + * @return \Google\Cloud\Translate\V3\CreateGlossaryEntryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry): self + { + return (new self()) + ->setParent($parent) + ->setGlossaryEntry($glossaryEntry); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the glossary to create the entry under. + * @type \Google\Cloud\Translate\V3\GlossaryEntry $glossary_entry + * Required. The glossary entry to create + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the glossary to create the entry under. + * + * 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 glossary to create the entry under. + * + * 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 glossary entry to create + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\GlossaryEntry|null + */ + public function getGlossaryEntry() + { + return $this->glossary_entry; + } + + public function hasGlossaryEntry() + { + return isset($this->glossary_entry); + } + + public function clearGlossaryEntry() + { + unset($this->glossary_entry); + } + + /** + * Required. The glossary entry to create + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\GlossaryEntry $var + * @return $this + */ + public function setGlossaryEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry::class); + $this->glossary_entry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php new file mode 100644 index 000000000000..cf902834a451 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php @@ -0,0 +1,147 @@ +google.cloud.translation.v3.CreateGlossaryMetadata + */ +class CreateGlossaryMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the glossary that is being created. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The current state of the glossary creation operation. + * + * Generated from protobuf field .google.cloud.translation.v3.CreateGlossaryMetadata.State state = 2; + */ + protected $state = 0; + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + */ + protected $submit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the glossary that is being created. + * @type int $state + * The current state of the glossary creation operation. + * @type \Google\Protobuf\Timestamp $submit_time + * The time when the operation was submitted to the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the glossary that is being created. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the glossary that is being created. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The current state of the glossary creation operation. + * + * Generated from protobuf field .google.cloud.translation.v3.CreateGlossaryMetadata.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the glossary creation operation. + * + * Generated from protobuf field .google.cloud.translation.v3.CreateGlossaryMetadata.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\CreateGlossaryMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php new file mode 100644 index 000000000000..3aed3689d193 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.CreateGlossaryMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The glossary was successfully created. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Failed to create the glossary. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The glossary creation request was successfully canceled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Translate\V3\CreateGlossaryMetadata_State::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php new file mode 100644 index 000000000000..d56a13da90c0 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php @@ -0,0 +1,127 @@ +google.cloud.translation.v3.CreateGlossaryRequest + */ +class CreateGlossaryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The glossary to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $glossary = null; + + /** + * @param string $parent Required. The project name. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Translate\V3\Glossary $glossary Required. The glossary to create. + * + * @return \Google\Cloud\Translate\V3\CreateGlossaryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Translate\V3\Glossary $glossary): self + { + return (new self()) + ->setParent($parent) + ->setGlossary($glossary); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project name. + * @type \Google\Cloud\Translate\V3\Glossary $glossary + * Required. The glossary to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project name. + * + * 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 name. + * + * 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 glossary to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\Glossary|null + */ + public function getGlossary() + { + return $this->glossary; + } + + public function hasGlossary() + { + return isset($this->glossary); + } + + public function clearGlossary() + { + unset($this->glossary); + } + + /** + * Required. The glossary to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\Glossary $var + * @return $this + */ + public function setGlossary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary::class); + $this->glossary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php new file mode 100644 index 000000000000..1cce1eadfba5 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php @@ -0,0 +1,199 @@ +google.cloud.translation.v3.CreateModelMetadata + */ +class CreateModelMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + */ + protected $state = 0; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Rpc\Status $error + * Only populated when operation doesn't succeed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The creation time of the 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 creation time of the 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 last 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 last 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; + } + + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Only populated when operation doesn't succeed. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php new file mode 100644 index 000000000000..1084dfbed001 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php @@ -0,0 +1,132 @@ +google.cloud.translation.v3.CreateModelRequest + */ +class CreateModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project name, in form of + * `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Model to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $model = null; + + /** + * @param string $parent Required. The project name, in form of + * `projects/{project}/locations/{location}` + * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Translate\V3\Model $model Required. The Model to create. + * + * @return \Google\Cloud\Translate\V3\CreateModelRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Translate\V3\Model $model): self + { + return (new self()) + ->setParent($parent) + ->setModel($model); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project name, in form of + * `projects/{project}/locations/{location}` + * @type \Google\Cloud\Translate\V3\Model $model + * Required. The Model to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project name, in form of + * `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. The project name, in form of + * `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; + } + + /** + * Required. The Model to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\Model|null + */ + public function getModel() + { + return $this->model; + } + + public function hasModel() + { + return isset($this->model); + } + + public function clearModel() + { + unset($this->model); + } + + /** + * Required. The Model to create. + * + * Generated from protobuf field .google.cloud.translation.v3.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\Model $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Model::class); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php new file mode 100644 index 000000000000..4705c6e85305 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php @@ -0,0 +1,406 @@ +google.cloud.translation.v3.Dataset + */ +class Dataset extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 3; + */ + protected $source_language_code = ''; + /** + * The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 4; + */ + protected $target_language_code = ''; + /** + * Output only. The number of examples in the dataset. + * + * Generated from protobuf field int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $example_count = 0; + /** + * Output only. Number of training examples (sentence pairs). + * + * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $train_example_count = 0; + /** + * Output only. Number of validation examples (sentence pairs). + * + * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $validate_example_count = 0; + /** + * Output only. Number of test examples (sentence pairs). + * + * Generated from protobuf field int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $test_example_count = 0; + /** + * Output only. Timestamp when this dataset was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this dataset was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * @type string $display_name + * The name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * @type string $source_language_code + * The BCP-47 language code of the source language. + * @type string $target_language_code + * The BCP-47 language code of the target language. + * @type int $example_count + * Output only. The number of examples in the dataset. + * @type int $train_example_count + * Output only. Number of training examples (sentence pairs). + * @type int $validate_example_count + * Output only. Number of validation examples (sentence pairs). + * @type int $test_example_count + * Output only. Number of test examples (sentence pairs). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this dataset was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this dataset was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the dataset, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_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 name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name of the dataset to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * 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 BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 3; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 3; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 4; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 4; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + + /** + * Output only. The number of examples in the dataset. + * + * Generated from protobuf field int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getExampleCount() + { + return $this->example_count; + } + + /** + * Output only. The number of examples in the dataset. + * + * Generated from protobuf field int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->example_count = $var; + + return $this; + } + + /** + * Output only. Number of training examples (sentence pairs). + * + * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTrainExampleCount() + { + return $this->train_example_count; + } + + /** + * Output only. Number of training examples (sentence pairs). + * + * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTrainExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->train_example_count = $var; + + return $this; + } + + /** + * Output only. Number of validation examples (sentence pairs). + * + * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getValidateExampleCount() + { + return $this->validate_example_count; + } + + /** + * Output only. Number of validation examples (sentence pairs). + * + * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setValidateExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->validate_example_count = $var; + + return $this; + } + + /** + * Output only. Number of test examples (sentence pairs). + * + * Generated from protobuf field int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTestExampleCount() + { + return $this->test_example_count; + } + + /** + * Output only. Number of test examples (sentence pairs). + * + * Generated from protobuf field int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTestExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->test_example_count = $var; + + return $this; + } + + /** + * Output only. Timestamp when this dataset was created. + * + * 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. Timestamp when this dataset was created. + * + * 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. Timestamp when this dataset was last updated. + * + * 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. Timestamp when this dataset was last updated. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php new file mode 100644 index 000000000000..638e7c4fb111 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php @@ -0,0 +1,67 @@ +google.cloud.translation.v3.DatasetInputConfig + */ +class DatasetInputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Files containing the sentence pairs to be imported to the dataset. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.DatasetInputConfig.InputFile input_files = 1; + */ + private $input_files; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\DatasetInputConfig\InputFile>|\Google\Protobuf\Internal\RepeatedField $input_files + * Files containing the sentence pairs to be imported to the dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Files containing the sentence pairs to be imported to the dataset. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.DatasetInputConfig.InputFile input_files = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputFiles() + { + return $this->input_files; + } + + /** + * Files containing the sentence pairs to be imported to the dataset. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.DatasetInputConfig.InputFile input_files = 1; + * @param array<\Google\Cloud\Translate\V3\DatasetInputConfig\InputFile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\DatasetInputConfig\InputFile::class); + $this->input_files = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php new file mode 100644 index 000000000000..42eba94de6ca --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php @@ -0,0 +1,116 @@ +google.cloud.translation.v3.DatasetInputConfig.InputFile + */ +class InputFile extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, + * or UNASSIGNED (by default) for auto split. + * + * Generated from protobuf field string usage = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $usage = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $usage + * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, + * or UNASSIGNED (by default) for auto split. + * @type \Google\Cloud\Translate\V3\GcsInputSource $gcs_source + * Google Cloud Storage file source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, + * or UNASSIGNED (by default) for auto split. + * + * Generated from protobuf field string usage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUsage() + { + return $this->usage; + } + + /** + * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, + * or UNASSIGNED (by default) for auto split. + * + * Generated from protobuf field string usage = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUsage($var) + { + GPBUtil::checkString($var, True); + $this->usage = $var; + + return $this; + } + + /** + * Google Cloud Storage file source. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_source = 3; + * @return \Google\Cloud\Translate\V3\GcsInputSource|null + */ + public function getGcsSource() + { + return $this->readOneof(3); + } + + public function hasGcsSource() + { + return $this->hasOneof(3); + } + + /** + * Google Cloud Storage file source. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_source = 3; + * @param \Google\Cloud\Translate\V3\GcsInputSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsInputSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InputFile::class, \Google\Cloud\Translate\V3\DatasetInputConfig_InputFile::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php new file mode 100644 index 000000000000..876f96a2bbcd --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php @@ -0,0 +1,75 @@ +google.cloud.translation.v3.DatasetOutputConfig + */ +class DatasetOutputConfig extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GcsOutputDestination $gcs_destination + * Google Cloud Storage destination to write the output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage destination to write the output. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsOutputDestination gcs_destination = 1; + * @return \Google\Cloud\Translate\V3\GcsOutputDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * Google Cloud Storage destination to write the output. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsOutputDestination gcs_destination = 1; + * @param \Google\Cloud\Translate\V3\GcsOutputDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsOutputDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php new file mode 100644 index 000000000000..c0dbe46bc86c --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest + */ +class DeleteAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * + * 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 dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\DeleteAdaptiveMtDatasetRequest + * + * @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 dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php new file mode 100644 index 000000000000..4f3599a6c258 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.DeleteAdaptiveMtFileRequest + */ +class DeleteAdaptiveMtFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the file to delete, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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 file to delete, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * Please see {@see TranslationServiceClient::adaptiveMtFileName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\DeleteAdaptiveMtFileRequest + * + * @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 file to delete, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the file to delete, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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 file to delete, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php new file mode 100644 index 000000000000..df3810c11948 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php @@ -0,0 +1,199 @@ +google.cloud.translation.v3.DeleteDatasetMetadata + */ +class DeleteDatasetMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + */ + protected $state = 0; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Rpc\Status $error + * Only populated when operation doesn't succeed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The creation time of the 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 creation time of the 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 last 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 last 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; + } + + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Only populated when operation doesn't succeed. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php new file mode 100644 index 000000000000..633edd278b4a --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.DeleteDatasetRequest + */ +class DeleteDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the dataset 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 name of the dataset to delete. Please see + * {@see TranslationServiceClient::datasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\DeleteDatasetRequest + * + * @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 dataset to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the dataset 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 name of the dataset 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php new file mode 100644 index 000000000000..eb176da675a8 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.DeleteGlossaryEntryRequest + */ +class DeleteGlossaryEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the glossary entry 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 glossary entry to delete + * Please see {@see TranslationServiceClient::glossaryEntryName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\DeleteGlossaryEntryRequest + * + * @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 glossary entry to delete + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the glossary entry 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 glossary entry 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php new file mode 100644 index 000000000000..4c4c6c924c29 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php @@ -0,0 +1,147 @@ +google.cloud.translation.v3.DeleteGlossaryMetadata + */ +class DeleteGlossaryMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the glossary that is being deleted. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The current state of the glossary deletion operation. + * + * Generated from protobuf field .google.cloud.translation.v3.DeleteGlossaryMetadata.State state = 2; + */ + protected $state = 0; + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + */ + protected $submit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the glossary that is being deleted. + * @type int $state + * The current state of the glossary deletion operation. + * @type \Google\Protobuf\Timestamp $submit_time + * The time when the operation was submitted to the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the glossary that is being deleted. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the glossary that is being 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; + } + + /** + * The current state of the glossary deletion operation. + * + * Generated from protobuf field .google.cloud.translation.v3.DeleteGlossaryMetadata.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the glossary deletion operation. + * + * Generated from protobuf field .google.cloud.translation.v3.DeleteGlossaryMetadata.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\DeleteGlossaryMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php new file mode 100644 index 000000000000..65fe6b5df28c --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.DeleteGlossaryMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The glossary was successfully deleted. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Failed to delete the glossary. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The glossary deletion request was successfully canceled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Translate\V3\DeleteGlossaryMetadata_State::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php new file mode 100644 index 000000000000..58522ba2b1df --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.DeleteGlossaryRequest + */ +class DeleteGlossaryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the glossary 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 name of the glossary to delete. Please see + * {@see TranslationServiceClient::glossaryName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\DeleteGlossaryRequest + * + * @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 glossary to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the glossary 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 name of the glossary 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php new file mode 100644 index 000000000000..d3bc457df686 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php @@ -0,0 +1,165 @@ +google.cloud.translation.v3.DeleteGlossaryResponse + */ +class DeleteGlossaryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the deleted glossary. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + */ + protected $submit_time = null; + /** + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the deleted glossary. + * @type \Google\Protobuf\Timestamp $submit_time + * The time when the operation was submitted to the server. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the deleted glossary. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the deleted glossary. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time when the glossary deletion is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php new file mode 100644 index 000000000000..e60ed41d67f9 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php @@ -0,0 +1,199 @@ +google.cloud.translation.v3.DeleteModelMetadata + */ +class DeleteModelMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + */ + protected $state = 0; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Rpc\Status $error + * Only populated when operation doesn't succeed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The creation time of the 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 creation time of the 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 last 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 last 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; + } + + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Only populated when operation doesn't succeed. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php new file mode 100644 index 000000000000..5b76ab3676fd --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.DeleteModelRequest + */ +class DeleteModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the model 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 name of the model to delete. Please see + * {@see TranslationServiceClient::modelName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\DeleteModelRequest + * + * @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 model to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the model 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 name of the model 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php new file mode 100644 index 000000000000..99ceeed57cdc --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php @@ -0,0 +1,326 @@ +google.cloud.translation.v3.DetectLanguageRequest + */ +class DetectLanguageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region (has same location-id) can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language detection model to be used. + * Format: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + * Only one language detection model is currently supported: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + * If not specified, the default model is used. + * + * Generated from protobuf field string model = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = ''; + /** + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mime_type = ''; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + protected $source; + + /** + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Only models within the same region (has same location-id) can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string $model Optional. The language detection model to be used. + * + * Format: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + * + * Only one language detection model is currently supported: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + * + * If not specified, the default model is used. + * @param string $mimeType Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * @param string $content The content of the input stored as a string. + * + * @return \Google\Cloud\Translate\V3\DetectLanguageRequest + * + * @experimental + */ + public static function build(string $parent, string $model, string $mimeType, string $content): self + { + return (new self()) + ->setParent($parent) + ->setModel($model) + ->setMimeType($mimeType) + ->setContent($content); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region (has same location-id) can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. + * @type string $model + * Optional. The language detection model to be used. + * Format: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + * Only one language detection model is currently supported: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + * If not specified, the default model is used. + * @type string $content + * The content of the input stored as a string. + * @type string $mime_type + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region (has same location-id) can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region (has same location-id) can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 5 [(.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 language detection model to be used. + * Format: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + * Only one language detection model is currently supported: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + * If not specified, the default model is used. + * + * Generated from protobuf field string model = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. The language detection model to be used. + * Format: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + * Only one language detection model is currently supported: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + * If not specified, the default model is used. + * + * Generated from protobuf field string model = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * The content of the input stored as a string. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->readOneof(1); + } + + public function hasContent() + { + return $this->hasOneof(1); + } + + /** + * The content of the input stored as a string. + * + * Generated from protobuf field string content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * 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 with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * 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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php new file mode 100644 index 000000000000..7bcf6ef7f395 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php @@ -0,0 +1,71 @@ +google.cloud.translation.v3.DetectLanguageResponse + */ +class DetectLanguageResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The most probable language detected by the Translation API. For each + * request, the Translation API will always return only one result. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.DetectedLanguage languages = 1; + */ + private $languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $languages + * The most probable language detected by the Translation API. For each + * request, the Translation API will always return only one result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The most probable language detected by the Translation API. For each + * request, the Translation API will always return only one result. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.DetectedLanguage languages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguages() + { + return $this->languages; + } + + /** + * The most probable language detected by the Translation API. For each + * request, the Translation API will always return only one result. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.DetectedLanguage languages = 1; + * @param array<\Google\Cloud\Translate\V3\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\DetectedLanguage::class); + $this->languages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php new file mode 100644 index 000000000000..b0e30fd6ed85 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php @@ -0,0 +1,105 @@ +google.cloud.translation.v3.DetectedLanguage + */ +class DetectedLanguage extends \Google\Protobuf\Internal\Message +{ + /** + * The ISO-639 language code of the source content in the request, detected + * automatically. + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * The confidence of the detection result for this language. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * The ISO-639 language code of the source content in the request, detected + * automatically. + * @type float $confidence + * The confidence of the detection result for this language. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The ISO-639 language code of the source content in the request, detected + * automatically. + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The ISO-639 language code of the source content in the request, detected + * automatically. + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The confidence of the detection result for this language. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The confidence of the detection result for this language. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php new file mode 100644 index 000000000000..2285639ebfcf --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php @@ -0,0 +1,177 @@ +google.cloud.translation.v3.DocumentInputConfig + */ +class DocumentInputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * + * Generated from protobuf field string mime_type = 4; + */ + protected $mime_type = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Document's content represented as a stream of bytes. + * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + * @type string $mime_type + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Document's content represented as a stream of bytes. + * + * Generated from protobuf field bytes content = 1; + * @return string + */ + public function getContent() + { + return $this->readOneof(1); + } + + public function hasContent() + { + return $this->hasOneof(1); + } + + /** + * Document's content represented as a stream of bytes. + * + * Generated from protobuf field bytes content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; + * @return \Google\Cloud\Translate\V3\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(2); + } + + public function hasGcsSource() + { + return $this->hasOneof(2); + } + + /** + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; + * @param \Google\Cloud\Translate\V3\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * + * Generated from protobuf field string mime_type = 4; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * + * Generated from protobuf field string mime_type = 4; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php new file mode 100644 index 000000000000..96a6346c7240 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php @@ -0,0 +1,240 @@ +google.cloud.translation.v3.DocumentOutputConfig + */ +class DocumentOutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mime_type = ''; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GcsDestination $gcs_destination + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + * @type string $mime_type + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Translate\V3\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Translate\V3\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php new file mode 100644 index 000000000000..a03fe5adad20 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php @@ -0,0 +1,159 @@ +google.cloud.translation.v3.DocumentTranslation + */ +class DocumentTranslation extends \Google\Protobuf\Internal\Message +{ + /** + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + * + * Generated from protobuf field repeated bytes byte_stream_outputs = 1; + */ + private $byte_stream_outputs; + /** + * The translated document's mime type. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + /** + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + * + * Generated from protobuf field string detected_language_code = 3; + */ + protected $detected_language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $byte_stream_outputs + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + * @type string $mime_type + * The translated document's mime type. + * @type string $detected_language_code + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + * + * Generated from protobuf field repeated bytes byte_stream_outputs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getByteStreamOutputs() + { + return $this->byte_stream_outputs; + } + + /** + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + * + * Generated from protobuf field repeated bytes byte_stream_outputs = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setByteStreamOutputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->byte_stream_outputs = $arr; + + return $this; + } + + /** + * The translated document's mime type. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The translated document's mime type. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + * + * Generated from protobuf field string detected_language_code = 3; + * @return string + */ + public function getDetectedLanguageCode() + { + return $this->detected_language_code; + } + + /** + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + * + * Generated from protobuf field string detected_language_code = 3; + * @param string $var + * @return $this + */ + public function setDetectedLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->detected_language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php new file mode 100644 index 000000000000..65ddb1da9f12 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php @@ -0,0 +1,173 @@ +google.cloud.translation.v3.Example + */ +class Example extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the example, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Sentence in source language. + * + * Generated from protobuf field string source_text = 2; + */ + protected $source_text = ''; + /** + * Sentence in target language. + * + * Generated from protobuf field string target_text = 3; + */ + protected $target_text = ''; + /** + * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. + * + * Generated from protobuf field string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $usage = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the example, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` + * @type string $source_text + * Sentence in source language. + * @type string $target_text + * Sentence in target language. + * @type string $usage + * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the example, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` + * + * 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 example, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_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; + } + + /** + * Sentence in source language. + * + * Generated from protobuf field string source_text = 2; + * @return string + */ + public function getSourceText() + { + return $this->source_text; + } + + /** + * Sentence in source language. + * + * Generated from protobuf field string source_text = 2; + * @param string $var + * @return $this + */ + public function setSourceText($var) + { + GPBUtil::checkString($var, True); + $this->source_text = $var; + + return $this; + } + + /** + * Sentence in target language. + * + * Generated from protobuf field string target_text = 3; + * @return string + */ + public function getTargetText() + { + return $this->target_text; + } + + /** + * Sentence in target language. + * + * Generated from protobuf field string target_text = 3; + * @param string $var + * @return $this + */ + public function setTargetText($var) + { + GPBUtil::checkString($var, True); + $this->target_text = $var; + + return $this; + } + + /** + * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. + * + * Generated from protobuf field string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUsage() + { + return $this->usage; + } + + /** + * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. + * + * Generated from protobuf field string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUsage($var) + { + GPBUtil::checkString($var, True); + $this->usage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php new file mode 100644 index 000000000000..71e5abba7065 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php @@ -0,0 +1,199 @@ +google.cloud.translation.v3.ExportDataMetadata + */ +class ExportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + */ + protected $state = 0; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Rpc\Status $error + * Only populated when operation doesn't succeed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The creation time of the 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 creation time of the 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 last 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 last 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; + } + + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Only populated when operation doesn't succeed. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php new file mode 100644 index 000000000000..a2871613aba5 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php @@ -0,0 +1,131 @@ +google.cloud.translation.v3.ExportDataRequest + */ +class ExportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset = ''; + /** + * Required. The config for the output content. + * + * Generated from protobuf field .google.cloud.translation.v3.DatasetOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + + /** + * @param string $dataset Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @param \Google\Cloud\Translate\V3\DatasetOutputConfig $outputConfig Required. The config for the output content. + * + * @return \Google\Cloud\Translate\V3\ExportDataRequest + * + * @experimental + */ + public static function build(string $dataset, \Google\Cloud\Translate\V3\DatasetOutputConfig $outputConfig): self + { + return (new self()) + ->setDataset($dataset) + ->setOutputConfig($outputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @type \Google\Cloud\Translate\V3\DatasetOutputConfig $output_config + * Required. The config for the output content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Required. The config for the output content. + * + * Generated from protobuf field .google.cloud.translation.v3.DatasetOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\DatasetOutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The config for the output content. + * + * Generated from protobuf field .google.cloud.translation.v3.DatasetOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\DatasetOutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DatasetOutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php new file mode 100644 index 000000000000..2faf57ac7171 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php @@ -0,0 +1,135 @@ +google.cloud.translation.v3.FileInputSource + */ +class FileInputSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The file's mime type. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mime_type = ''; + /** + * Required. The file's byte contents. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $content = ''; + /** + * Required. The file's display name. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mime_type + * Required. The file's mime type. + * @type string $content + * Required. The file's byte contents. + * @type string $display_name + * Required. The file's display name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The file's mime type. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Required. The file's mime type. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Required. The file's byte contents. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Required. The file's byte contents. + * + * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * Required. The file's display name. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The file's display name. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php new file mode 100644 index 000000000000..6294ede95c7d --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php @@ -0,0 +1,83 @@ +google.cloud.translation.v3.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The bucket used in 'output_uri_prefix' must exist and there must + * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with + * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one + * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error + * is returned. + * + * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_uri_prefix + * Required. The bucket used in 'output_uri_prefix' must exist and there must + * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with + * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one + * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error + * is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The bucket used in 'output_uri_prefix' must exist and there must + * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with + * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one + * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error + * is returned. + * + * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Required. The bucket used in 'output_uri_prefix' must exist and there must + * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with + * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one + * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error + * is returned. + * + * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php new file mode 100644 index 000000000000..e4f5d74d11d3 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php @@ -0,0 +1,67 @@ +google.cloud.translation.v3.GcsInputSource + */ +class GcsInputSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * + * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_uri + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * + * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * + * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php new file mode 100644 index 000000000000..81e9d86f3077 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php @@ -0,0 +1,75 @@ +google.cloud.translation.v3.GcsOutputDestination + */ +class GcsOutputDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Storage URI to output directory. For example, + * `gs://bucket/directory`. The requesting user must have write permission to + * the bucket. The directory will be created if it doesn't exist. + * + * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_uri_prefix + * Required. Google Cloud Storage URI to output directory. For example, + * `gs://bucket/directory`. The requesting user must have write permission to + * the bucket. The directory will be created if it doesn't exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Storage URI to output directory. For example, + * `gs://bucket/directory`. The requesting user must have write permission to + * the bucket. The directory will be created if it doesn't exist. + * + * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Required. Google Cloud Storage URI to output directory. For example, + * `gs://bucket/directory`. The requesting user must have write permission to + * the bucket. The directory will be created if it doesn't exist. + * + * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php new file mode 100644 index 000000000000..9dfda6fc818a --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php @@ -0,0 +1,67 @@ +google.cloud.translation.v3.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * + * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_uri + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * + * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Required. Source data URI. For example, `gs://my_bucket/my_object`. + * + * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php new file mode 100644 index 000000000000..4107de1639f4 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.GetAdaptiveMtDatasetRequest + */ +class GetAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * + * 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 dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\GetAdaptiveMtDatasetRequest + * + * @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 dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php new file mode 100644 index 000000000000..4020332cc0ce --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.GetAdaptiveMtFileRequest + */ +class GetAdaptiveMtFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * Please see {@see TranslationServiceClient::adaptiveMtFileName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\GetAdaptiveMtFileRequest + * + * @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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php new file mode 100644 index 000000000000..5b6d6b170012 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.GetDatasetRequest + */ +class GetDatasetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the dataset 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 dataset to retrieve. Please see + * {@see TranslationServiceClient::datasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\GetDatasetRequest + * + * @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 dataset to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the dataset 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 dataset 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php new file mode 100644 index 000000000000..bcc45b5ca1f6 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.GetGlossaryEntryRequest + */ +class GetGlossaryEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the glossary entry to get + * + * 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 glossary entry to get + * Please see {@see TranslationServiceClient::glossaryEntryName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\GetGlossaryEntryRequest + * + * @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 glossary entry to get + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the glossary entry to get + * + * 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 glossary entry to get + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php new file mode 100644 index 000000000000..c4b68b01391c --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.GetGlossaryRequest + */ +class GetGlossaryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the glossary 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 name of the glossary to retrieve. Please see + * {@see TranslationServiceClient::glossaryName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\GetGlossaryRequest + * + * @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 glossary to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the glossary 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 name of the glossary 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php new file mode 100644 index 000000000000..9484ddb5b7ce --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php @@ -0,0 +1,81 @@ +google.cloud.translation.v3.GetModelRequest + */ +class GetModelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the model 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 model to retrieve. Please see + * {@see TranslationServiceClient::modelName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\GetModelRequest + * + * @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 model to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the model 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 model 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php new file mode 100644 index 000000000000..86dc2cda5a39 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php @@ -0,0 +1,247 @@ +google.cloud.translation.v3.GetSupportedLanguagesRequest + */ +class GetSupportedLanguagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for AutoML models. + * Only models within the same region (have same location-id) can be used, + * otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, then display names are not returned + * in a response. + * + * Generated from protobuf field string display_language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_language_code = ''; + /** + * Optional. Get supported languages of this model. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * Returns languages supported by the specified model. + * If missing, we get supported languages of Google general NMT model. + * + * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = ''; + + /** + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Non-global location is required for AutoML models. + * + * Only models within the same region (have same location-id) can be used, + * otherwise an INVALID_ARGUMENT (400) error is returned. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string $model Optional. Get supported languages of this model. + * + * The format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * + * Returns languages supported by the specified model. + * If missing, we get supported languages of Google general NMT model. + * @param string $displayLanguageCode Optional. The language to use to return localized, human readable names + * of supported languages. If missing, then display names are not returned + * in a response. + * + * @return \Google\Cloud\Translate\V3\GetSupportedLanguagesRequest + * + * @experimental + */ + public static function build(string $parent, string $model, string $displayLanguageCode): self + { + return (new self()) + ->setParent($parent) + ->setModel($model) + ->setDisplayLanguageCode($displayLanguageCode); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for AutoML models. + * Only models within the same region (have same location-id) can be used, + * otherwise an INVALID_ARGUMENT (400) error is returned. + * @type string $display_language_code + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, then display names are not returned + * in a response. + * @type string $model + * Optional. Get supported languages of this model. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * Returns languages supported by the specified model. + * If missing, we get supported languages of Google general NMT model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for AutoML models. + * Only models within the same region (have same location-id) can be used, + * otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for AutoML models. + * Only models within the same region (have same location-id) can be used, + * otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 3 [(.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 language to use to return localized, human readable names + * of supported languages. If missing, then display names are not returned + * in a response. + * + * Generated from protobuf field string display_language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayLanguageCode() + { + return $this->display_language_code; + } + + /** + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, then display names are not returned + * in a response. + * + * Generated from protobuf field string display_language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->display_language_code = $var; + + return $this; + } + + /** + * Optional. Get supported languages of this model. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * Returns languages supported by the specified model. + * If missing, we get supported languages of Google general NMT model. + * + * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. Get supported languages of this model. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * Returns languages supported by the specified model. + * If missing, we get supported languages of Google general NMT model. + * + * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php new file mode 100644 index 000000000000..dac3eb5708c2 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php @@ -0,0 +1,350 @@ +google.cloud.translation.v3.Glossary + */ +class Glossary extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the glossary. Glossary names have the form + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryInputConfig input_config = 5; + */ + protected $input_config = null; + /** + * Output only. The number of entries defined in the glossary. + * + * Generated from protobuf field int32 entry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entry_count = 0; + /** + * Output only. When CreateGlossary was called. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $submit_time = null; + /** + * Output only. When the glossary creation was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Optional. The display name of the glossary. + * + * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + protected $languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the glossary. Glossary names have the form + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. + * @type \Google\Cloud\Translate\V3\Glossary\LanguageCodePair $language_pair + * Used with unidirectional glossaries. + * @type \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet $language_codes_set + * Used with equivalent term set glossaries. + * @type \Google\Cloud\Translate\V3\GlossaryInputConfig $input_config + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + * @type int $entry_count + * Output only. The number of entries defined in the glossary. + * @type \Google\Protobuf\Timestamp $submit_time + * Output only. When CreateGlossary was called. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. When the glossary creation was finished. + * @type string $display_name + * Optional. The display name of the glossary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the glossary. Glossary names have the form + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. + * + * 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 glossary. Glossary names have the form + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. + * + * 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; + } + + /** + * Used with unidirectional glossaries. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodePair language_pair = 3; + * @return \Google\Cloud\Translate\V3\Glossary\LanguageCodePair|null + */ + public function getLanguagePair() + { + return $this->readOneof(3); + } + + public function hasLanguagePair() + { + return $this->hasOneof(3); + } + + /** + * Used with unidirectional glossaries. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodePair language_pair = 3; + * @param \Google\Cloud\Translate\V3\Glossary\LanguageCodePair $var + * @return $this + */ + public function setLanguagePair($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary\LanguageCodePair::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Used with equivalent term set glossaries. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodesSet language_codes_set = 4; + * @return \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet|null + */ + public function getLanguageCodesSet() + { + return $this->readOneof(4); + } + + public function hasLanguageCodesSet() + { + return $this->hasOneof(4); + } + + /** + * Used with equivalent term set glossaries. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodesSet language_codes_set = 4; + * @param \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet $var + * @return $this + */ + public function setLanguageCodesSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryInputConfig input_config = 5; + * @return \Google\Cloud\Translate\V3\GlossaryInputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Provides examples to build the glossary from. + * Total glossary must not exceed 10M Unicode codepoints. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryInputConfig input_config = 5; + * @param \Google\Cloud\Translate\V3\GlossaryInputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryInputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Output only. The number of entries defined in the glossary. + * + * Generated from protobuf field int32 entry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEntryCount() + { + return $this->entry_count; + } + + /** + * Output only. The number of entries defined in the glossary. + * + * Generated from protobuf field int32 entry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEntryCount($var) + { + GPBUtil::checkInt32($var); + $this->entry_count = $var; + + return $this; + } + + /** + * Output only. When CreateGlossary was called. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * Output only. When CreateGlossary was called. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * Output only. When the glossary creation was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.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. When the glossary creation was finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.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; + } + + /** + * Optional. The display name of the glossary. + * + * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The display name of the glossary. + * + * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getLanguages() + { + return $this->whichOneof("languages"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php new file mode 100644 index 000000000000..4b228dd3f157 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php @@ -0,0 +1,112 @@ +google.cloud.translation.v3.Glossary.LanguageCodePair + */ +class LanguageCodePair extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ISO-639 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field string source_language_code = 1; + */ + protected $source_language_code = ''; + /** + * Required. The ISO-639 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field string target_language_code = 2; + */ + protected $target_language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_language_code + * Required. The ISO-639 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + * @type string $target_language_code + * Required. The ISO-639 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ISO-639 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field string source_language_code = 1; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Required. The ISO-639 language code of the input text, for example, + * "en-US". Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field string source_language_code = 1; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Required. The ISO-639 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field string target_language_code = 2; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * Required. The ISO-639 language code for translation output, for example, + * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field string target_language_code = 2; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LanguageCodePair::class, \Google\Cloud\Translate\V3\Glossary_LanguageCodePair::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php new file mode 100644 index 000000000000..164d340406c0 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php @@ -0,0 +1,78 @@ +google.cloud.translation.v3.Glossary.LanguageCodesSet + */ +class LanguageCodesSet extends \Google\Protobuf\Internal\Message +{ + /** + * The ISO-639 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field repeated string language_codes = 1; + */ + private $language_codes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes + * The ISO-639 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The ISO-639 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field repeated string language_codes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageCodes() + { + return $this->language_codes; + } + + /** + * The ISO-639 language code(s) for terms defined in the glossary. + * All entries are unique. The list contains at least two entries. + * Expected to be an exact match for GlossaryTerm.language_code. + * + * Generated from protobuf field repeated string language_codes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_codes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LanguageCodesSet::class, \Google\Cloud\Translate\V3\Glossary_LanguageCodesSet::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php new file mode 100644 index 000000000000..334518294710 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php @@ -0,0 +1,184 @@ +google.cloud.translation.v3.GlossaryEntry + */ +class GlossaryEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the entry. + * Format: + * `projects/*/locations/*/glossaries/*/glossaryEntries/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Describes the glossary entry. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the entry. + * Format: + * `projects/*/locations/*/glossaries/*/glossaryEntries/*` + * @type \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair $terms_pair + * Used for an unidirectional glossary. + * @type \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet $terms_set + * Used for an equivalent term sets glossary. + * @type string $description + * Describes the glossary entry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the entry. + * Format: + * `projects/*/locations/*/glossaries/*/glossaryEntries/*` + * + * 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 entry. + * Format: + * `projects/*/locations/*/glossaries/*/glossaryEntries/*` + * + * 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; + } + + /** + * Used for an unidirectional glossary. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair terms_pair = 2; + * @return \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair|null + */ + public function getTermsPair() + { + return $this->readOneof(2); + } + + public function hasTermsPair() + { + return $this->hasOneof(2); + } + + /** + * Used for an unidirectional glossary. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair terms_pair = 2; + * @param \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair $var + * @return $this + */ + public function setTermsPair($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Used for an equivalent term sets glossary. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet terms_set = 3; + * @return \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet|null + */ + public function getTermsSet() + { + return $this->readOneof(3); + } + + public function hasTermsSet() + { + return $this->hasOneof(3); + } + + /** + * Used for an equivalent term sets glossary. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet terms_set = 3; + * @param \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet $var + * @return $this + */ + public function setTermsSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Describes the glossary entry. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Describes the glossary entry. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php new file mode 100644 index 000000000000..4d4839f22722 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php @@ -0,0 +1,124 @@ +google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair + */ +class GlossaryTermsPair extends \Google\Protobuf\Internal\Message +{ + /** + * The source term is the term that will get match in the text, + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm source_term = 1; + */ + protected $source_term = null; + /** + * The term that will replace the match source term. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm target_term = 2; + */ + protected $target_term = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GlossaryTerm $source_term + * The source term is the term that will get match in the text, + * @type \Google\Cloud\Translate\V3\GlossaryTerm $target_term + * The term that will replace the match source term. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * The source term is the term that will get match in the text, + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm source_term = 1; + * @return \Google\Cloud\Translate\V3\GlossaryTerm|null + */ + public function getSourceTerm() + { + return $this->source_term; + } + + public function hasSourceTerm() + { + return isset($this->source_term); + } + + public function clearSourceTerm() + { + unset($this->source_term); + } + + /** + * The source term is the term that will get match in the text, + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm source_term = 1; + * @param \Google\Cloud\Translate\V3\GlossaryTerm $var + * @return $this + */ + public function setSourceTerm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryTerm::class); + $this->source_term = $var; + + return $this; + } + + /** + * The term that will replace the match source term. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm target_term = 2; + * @return \Google\Cloud\Translate\V3\GlossaryTerm|null + */ + public function getTargetTerm() + { + return $this->target_term; + } + + public function hasTargetTerm() + { + return isset($this->target_term); + } + + public function clearTargetTerm() + { + unset($this->target_term); + } + + /** + * The term that will replace the match source term. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm target_term = 2; + * @param \Google\Cloud\Translate\V3\GlossaryTerm $var + * @return $this + */ + public function setTargetTerm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryTerm::class); + $this->target_term = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GlossaryTermsPair::class, \Google\Cloud\Translate\V3\GlossaryEntry_GlossaryTermsPair::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php new file mode 100644 index 000000000000..a6c6e89c53d8 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php @@ -0,0 +1,76 @@ +google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet + */ +class GlossaryTermsSet extends \Google\Protobuf\Internal\Message +{ + /** + * Each term in the set represents a term that can be replaced by the other + * terms. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryTerm terms = 1; + */ + private $terms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\GlossaryTerm>|\Google\Protobuf\Internal\RepeatedField $terms + * Each term in the set represents a term that can be replaced by the other + * terms. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * Each term in the set represents a term that can be replaced by the other + * terms. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryTerm terms = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTerms() + { + return $this->terms; + } + + /** + * Each term in the set represents a term that can be replaced by the other + * terms. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryTerm terms = 1; + * @param array<\Google\Cloud\Translate\V3\GlossaryTerm>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTerms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\GlossaryTerm::class); + $this->terms = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GlossaryTermsSet::class, \Google\Cloud\Translate\V3\GlossaryEntry_GlossaryTermsSet::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php new file mode 100644 index 000000000000..a58008342231 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php @@ -0,0 +1,120 @@ +google.cloud.translation.v3.GlossaryInputConfig + */ +class GlossaryInputConfig extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on the filename extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For unidirectional glossaries: + * - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * No headers in this file. The first row contains data and not column + * names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For equivalent term sets glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. See documentation for more information - + * [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on the filename extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For unidirectional glossaries: + * - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * No headers in this file. The first row contains data and not column + * names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For equivalent term sets glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. See documentation for more information - + * [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; + * @return \Google\Cloud\Translate\V3\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * Required. Google Cloud Storage location of glossary data. + * File format is determined based on the filename extension. API returns + * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file + * formats. Wildcards are not allowed. This must be a single file in one of + * the following formats: + * For unidirectional glossaries: + * - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. + * The first column is source text. The second column is target text. + * No headers in this file. The first row contains data and not column + * names. + * - TMX (`.tmx`): TMX file with parallel data defining source/target term + * pairs. + * For equivalent term sets glossaries: + * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + * in multiple languages. See documentation for more information - + * [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; + * @param \Google\Cloud\Translate\V3\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php new file mode 100644 index 000000000000..b0579a657ab5 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php @@ -0,0 +1,101 @@ +google.cloud.translation.v3.GlossaryTerm + */ +class GlossaryTerm extends \Google\Protobuf\Internal\Message +{ + /** + * The language for this glossary term. + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * The text for the glossary term. + * + * Generated from protobuf field string text = 2; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * The language for this glossary term. + * @type string $text + * The text for the glossary term. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * The language for this glossary term. + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language for this glossary term. + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The text for the glossary term. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text for the glossary term. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php new file mode 100644 index 000000000000..59bf3d43f5a8 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php @@ -0,0 +1,161 @@ +google.cloud.translation.v3.ImportAdaptiveMtFileRequest + */ +class ImportAdaptiveMtFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $source; + + /** + * @param string $parent Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ImportAdaptiveMtFileRequest + * + * @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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + * @type \Google\Cloud\Translate\V3\FileInputSource $file_input_source + * Inline file source. + * @type \Google\Cloud\Translate\V3\GcsInputSource $gcs_input_source + * Google Cloud Storage file source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + * + * 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 file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + * + * 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; + } + + /** + * Inline file source. + * + * Generated from protobuf field .google.cloud.translation.v3.FileInputSource file_input_source = 2; + * @return \Google\Cloud\Translate\V3\FileInputSource|null + */ + public function getFileInputSource() + { + return $this->readOneof(2); + } + + public function hasFileInputSource() + { + return $this->hasOneof(2); + } + + /** + * Inline file source. + * + * Generated from protobuf field .google.cloud.translation.v3.FileInputSource file_input_source = 2; + * @param \Google\Cloud\Translate\V3\FileInputSource $var + * @return $this + */ + public function setFileInputSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\FileInputSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Google Cloud Storage file source. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_input_source = 3; + * @return \Google\Cloud\Translate\V3\GcsInputSource|null + */ + public function getGcsInputSource() + { + return $this->readOneof(3); + } + + public function hasGcsInputSource() + { + return $this->hasOneof(3); + } + + /** + * Google Cloud Storage file source. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_input_source = 3; + * @param \Google\Cloud\Translate\V3\GcsInputSource $var + * @return $this + */ + public function setGcsInputSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsInputSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php new file mode 100644 index 000000000000..807aa40206d0 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php @@ -0,0 +1,77 @@ +google.cloud.translation.v3.ImportAdaptiveMtFileResponse + */ +class ImportAdaptiveMtFileResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Adaptive MT file that was imported. + * + * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $adaptive_mt_file = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\AdaptiveMtFile $adaptive_mt_file + * Output only. The Adaptive MT file that was imported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Adaptive MT file that was imported. + * + * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Translate\V3\AdaptiveMtFile|null + */ + public function getAdaptiveMtFile() + { + return $this->adaptive_mt_file; + } + + public function hasAdaptiveMtFile() + { + return isset($this->adaptive_mt_file); + } + + public function clearAdaptiveMtFile() + { + unset($this->adaptive_mt_file); + } + + /** + * Output only. The Adaptive MT file that was imported. + * + * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Translate\V3\AdaptiveMtFile $var + * @return $this + */ + public function setAdaptiveMtFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtFile::class); + $this->adaptive_mt_file = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php new file mode 100644 index 000000000000..da2332653b27 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php @@ -0,0 +1,199 @@ +google.cloud.translation.v3.ImportDataMetadata + */ +class ImportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + */ + protected $state = 0; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The current state of the operation. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * @type \Google\Rpc\Status $error + * Only populated when operation doesn't succeed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the operation. + * + * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The creation time of the 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 creation time of the 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 last 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 last 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; + } + + /** + * Only populated when operation doesn't succeed. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Only populated when operation doesn't succeed. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php new file mode 100644 index 000000000000..2511822eb678 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php @@ -0,0 +1,131 @@ +google.cloud.translation.v3.ImportDataRequest + */ +class ImportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dataset = ''; + /** + * Required. The config for the input content. + * + * Generated from protobuf field .google.cloud.translation.v3.DatasetInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + + /** + * @param string $dataset Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @param \Google\Cloud\Translate\V3\DatasetInputConfig $inputConfig Required. The config for the input content. + * + * @return \Google\Cloud\Translate\V3\ImportDataRequest + * + * @experimental + */ + public static function build(string $dataset, \Google\Cloud\Translate\V3\DatasetInputConfig $inputConfig): self + { + return (new self()) + ->setDataset($dataset) + ->setInputConfig($inputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @type \Google\Cloud\Translate\V3\DatasetInputConfig $input_config + * Required. The config for the input content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Required. The config for the input content. + * + * Generated from protobuf field .google.cloud.translation.v3.DatasetInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\DatasetInputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. The config for the input content. + * + * Generated from protobuf field .google.cloud.translation.v3.DatasetInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\DatasetInputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DatasetInputConfig::class); + $this->input_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php new file mode 100644 index 000000000000..ced50d3a94bb --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php @@ -0,0 +1,166 @@ +google.cloud.translation.v3.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mime_type = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mime_type + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * Note that the input tsv must be RFC 4180 compliant. + * You could use https://github.com/Clever/csvlint to check potential + * formatting errors in your tsv file. + * csvlint --delimiter='\t' your_input_file.tsv + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Optional. Can be "text/plain" or "text/html". + * For `.tsv`, "text/html" is used if mime_type is missing. + * For `.html`, this field must be "text/html" or empty. + * For `.txt`, this field must be "text/plain" or empty. + * + * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * Note that the input tsv must be RFC 4180 compliant. + * You could use https://github.com/Clever/csvlint to check potential + * formatting errors in your tsv file. + * csvlint --delimiter='\t' your_input_file.tsv + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; + * @return \Google\Cloud\Translate\V3\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(2); + } + + public function hasGcsSource() + { + return $this->hasOneof(2); + } + + /** + * Required. Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.tsv`) or a wildcard (for example, + * `gs://translation-test/*`). If a file extension is `.tsv`, it can + * contain either one or two columns. The first column (optional) is the id + * of the text request. If the first column is missing, we use the row + * number (0-based) from the input file as the ID in the output file. The + * second column is the actual text to be + * translated. We recommend each row be <= 10K Unicode codepoints, + * otherwise an error might be returned. + * Note that the input tsv must be RFC 4180 compliant. + * You could use https://github.com/Clever/csvlint to check potential + * formatting errors in your tsv file. + * csvlint --delimiter='\t' your_input_file.tsv + * The other supported file extensions are `.txt` or `.html`, which is + * treated as a single large chunk of text. + * + * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; + * @param \Google\Cloud\Translate\V3\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php new file mode 100644 index 000000000000..d056833ac952 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php @@ -0,0 +1,213 @@ +google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest + */ +class ListAdaptiveMtDatasetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project from which to list the Adaptive + * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server may return fewer results than + * requested. If unspecified, the server picks an appropriate default. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtDatasetsResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtDatasets` method. The first page is + * returned if `page_token`is empty or missing. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. An expression for filtering the results of the request. + * Filter is not supported yet. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the project from which to list the Adaptive + * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListAdaptiveMtDatasetsRequest + * + * @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 the Adaptive + * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + * @type int $page_size + * Optional. Requested page size. The server may return fewer results than + * requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of + * ListAdaptiveMtDatasetsResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtDatasets` method. The first page is + * returned if `page_token`is empty or missing. + * @type string $filter + * Optional. An expression for filtering the results of the request. + * Filter is not supported yet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project from which to list the Adaptive + * MT datasets. `projects/{project-number-or-id}/locations/{location-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 of the project from which to list the Adaptive + * MT datasets. `projects/{project-number-or-id}/locations/{location-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. Requested page size. The server may return fewer results than + * requested. If unspecified, the server picks an appropriate default. + * + * 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. The server may return fewer results than + * requested. If unspecified, the server picks an appropriate default. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtDatasetsResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtDatasets` method. The first page is + * returned if `page_token`is empty or missing. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtDatasetsResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtDatasets` method. The first page is + * returned if `page_token`is empty or missing. + * + * 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. An expression for filtering the results of the request. + * Filter is not supported yet. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. + * Filter is not supported yet. + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php new file mode 100644 index 000000000000..6aa796807558 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php @@ -0,0 +1,109 @@ +google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse + */ +class ListAdaptiveMtDatasetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A list of Adaptive MT datasets. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_datasets = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $adaptive_mt_datasets; + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to + * `ListAdaptiveMtDatasets` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtDataset>|\Google\Protobuf\Internal\RepeatedField $adaptive_mt_datasets + * Output only. A list of Adaptive MT datasets. + * @type string $next_page_token + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to + * `ListAdaptiveMtDatasets` method to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A list of Adaptive MT datasets. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_datasets = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdaptiveMtDatasets() + { + return $this->adaptive_mt_datasets; + } + + /** + * Output only. A list of Adaptive MT datasets. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_datasets = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtDataset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdaptiveMtDatasets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtDataset::class); + $this->adaptive_mt_datasets = $arr; + + return $this; + } + + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to + * `ListAdaptiveMtDatasets` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to + * `ListAdaptiveMtDatasets` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php new file mode 100644 index 000000000000..414b8a8f221e --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php @@ -0,0 +1,175 @@ +google.cloud.translation.v3.ListAdaptiveMtFilesRequest + */ +class ListAdaptiveMtFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project from which to list the Adaptive + * MT files. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtFilesResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtFiles` method. The first page is + * returned if `page_token`is empty or missing. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the project from which to list the Adaptive + * MT files. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListAdaptiveMtFilesRequest + * + * @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 the Adaptive + * MT files. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * @type int $page_size + * Optional. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of + * ListAdaptiveMtFilesResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtFiles` method. The first page is + * returned if `page_token`is empty or missing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project from which to list the Adaptive + * MT files. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * + * 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 from which to list the Adaptive + * MT files. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * + * 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. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtFilesResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtFiles` method. The first page is + * returned if `page_token`is empty or missing. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtFilesResponse.next_page_token returned from the + * previous call to `ListAdaptiveMtFiles` method. The first page is + * returned if `page_token`is empty or missing. + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php new file mode 100644 index 000000000000..8f62be3dc154 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php @@ -0,0 +1,109 @@ +google.cloud.translation.v3.ListAdaptiveMtFilesResponse + */ +class ListAdaptiveMtFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Adaptive MT files. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_files = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $adaptive_mt_files; + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to + * `ListAdaptiveMtFiles` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtFile>|\Google\Protobuf\Internal\RepeatedField $adaptive_mt_files + * Output only. The Adaptive MT files. + * @type string $next_page_token + * Optional. A token to retrieve a page of results. Pass this value in the + * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to + * `ListAdaptiveMtFiles` method to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Adaptive MT files. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_files = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdaptiveMtFiles() + { + return $this->adaptive_mt_files; + } + + /** + * Output only. The Adaptive MT files. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_files = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtFile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdaptiveMtFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtFile::class); + $this->adaptive_mt_files = $arr; + + return $this; + } + + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to + * `ListAdaptiveMtFiles` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to + * `ListAdaptiveMtFiles` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php new file mode 100644 index 000000000000..dc0a5b6eca60 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php @@ -0,0 +1,178 @@ +google.cloud.translation.v3.ListAdaptiveMtSentencesRequest + */ +class ListAdaptiveMtSentencesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project from which to list the Adaptive + * MT files. The following format lists all sentences under a file. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * The following format lists all sentences within a dataset. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListAdaptiveMtSentencesRequest.next_page_token returned from the + * previous call to `ListTranslationMemories` method. The first page is + * returned if `page_token` is empty or missing. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the project from which to list the Adaptive + * MT files. The following format lists all sentences under a file. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * The following format lists all sentences within a dataset. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * Please see {@see TranslationServiceClient::adaptiveMtFileName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListAdaptiveMtSentencesRequest + * + * @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 the Adaptive + * MT files. The following format lists all sentences under a file. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * The following format lists all sentences within a dataset. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * @type int $page_size + * @type string $page_token + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListAdaptiveMtSentencesRequest.next_page_token returned from the + * previous call to `ListTranslationMemories` method. The first page is + * returned if `page_token` is empty or missing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project from which to list the Adaptive + * MT files. The following format lists all sentences under a file. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * The following format lists all sentences within a dataset. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * + * 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 from which to list the Adaptive + * MT files. The following format lists all sentences under a file. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * The following format lists all sentences within a dataset. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * + * 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; + } + + /** + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->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; + } + + /** + * A token identifying a page of results the server should return. + * Typically, this is the value of + * ListAdaptiveMtSentencesRequest.next_page_token returned from the + * previous call to `ListTranslationMemories` method. The first page is + * returned if `page_token` is empty or missing. + * + * 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. + * Typically, this is the value of + * ListAdaptiveMtSentencesRequest.next_page_token returned from the + * previous call to `ListTranslationMemories` method. The first page is + * returned if `page_token` is empty or missing. + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php new file mode 100644 index 000000000000..86d22bc4b9e1 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php @@ -0,0 +1,101 @@ +google.cloud.translation.v3.ListAdaptiveMtSentencesResponse + */ +class ListAdaptiveMtSentencesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of AdaptiveMtSentences. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtSentence adaptive_mt_sentences = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $adaptive_mt_sentences; + /** + * Optional. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\AdaptiveMtSentence>|\Google\Protobuf\Internal\RepeatedField $adaptive_mt_sentences + * Output only. The list of AdaptiveMtSentences. + * @type string $next_page_token + * Optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of AdaptiveMtSentences. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtSentence adaptive_mt_sentences = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdaptiveMtSentences() + { + return $this->adaptive_mt_sentences; + } + + /** + * Output only. The list of AdaptiveMtSentences. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtSentence adaptive_mt_sentences = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Translate\V3\AdaptiveMtSentence>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdaptiveMtSentences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtSentence::class); + $this->adaptive_mt_sentences = $arr; + + return $this; + } + + /** + * Optional. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php new file mode 100644 index 000000000000..9fec40ecfcc6 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php @@ -0,0 +1,166 @@ +google.cloud.translation.v3.ListDatasetsRequest + */ +class ListDatasetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server can return fewer results than + * requested. + * + * 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 for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListDatasets call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListDatasetsRequest + * + * @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. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * @type int $page_size + * Optional. Requested page size. The server can return fewer results than + * requested. + * @type string $page_token + * Optional. A token identifying a page of results for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListDatasets call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-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. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-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. Requested page size. The server can return fewer results than + * requested. + * + * 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. The server can return fewer results than + * requested. + * + * 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 for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListDatasets call. + * + * 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 for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListDatasets 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php new file mode 100644 index 000000000000..eabcc76ff92e --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php @@ -0,0 +1,109 @@ +google.cloud.translation.v3.ListDatasetsResponse + */ +class ListDatasetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The datasets read. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Dataset datasets = 1; + */ + private $datasets; + /** + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListDatasetsRequest to + * obtain the corresponding page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\Dataset>|\Google\Protobuf\Internal\RepeatedField $datasets + * The datasets read. + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListDatasetsRequest to + * obtain the corresponding page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The datasets read. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Dataset datasets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatasets() + { + return $this->datasets; + } + + /** + * The datasets read. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Dataset datasets = 1; + * @param array<\Google\Cloud\Translate\V3\Dataset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatasets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Dataset::class); + $this->datasets = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListDatasetsRequest to + * obtain the corresponding 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 this token to the page_token field in the ListDatasetsRequest to + * obtain the corresponding 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php new file mode 100644 index 000000000000..3f4dee718cd0 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php @@ -0,0 +1,208 @@ +google.cloud.translation.v3.ListExamplesRequest + */ +class ListExamplesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. An expression for filtering the examples that will be returned. + * Example filter: + * * `usage=TRAIN` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Requested page size. The server can return fewer results than + * requested. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListExamples call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of the parent dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * Please see {@see TranslationServiceClient::datasetName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListExamplesRequest + * + * @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. Name of the parent dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @type string $filter + * Optional. An expression for filtering the examples that will be returned. + * Example filter: + * * `usage=TRAIN` + * @type int $page_size + * Optional. Requested page size. The server can return fewer results than + * requested. + * @type string $page_token + * Optional. A token identifying a page of results for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListExamples call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-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. Name of the parent dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-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. An expression for filtering the examples that will be returned. + * Example filter: + * * `usage=TRAIN` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the examples that will be returned. + * Example filter: + * * `usage=TRAIN` + * + * 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. Requested page size. The server can return fewer results than + * requested. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. The server can return fewer results than + * requested. + * + * 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 token identifying a page of results for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListExamples call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListExamples call. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php new file mode 100644 index 000000000000..b4ce65bbb934 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php @@ -0,0 +1,109 @@ +google.cloud.translation.v3.ListExamplesResponse + */ +class ListExamplesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The sentence pairs. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Example examples = 1; + */ + private $examples; + /** + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListExamplesRequest to + * obtain the corresponding page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\Example>|\Google\Protobuf\Internal\RepeatedField $examples + * The sentence pairs. + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListExamplesRequest to + * obtain the corresponding page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The sentence pairs. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Example examples = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExamples() + { + return $this->examples; + } + + /** + * The sentence pairs. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Example examples = 1; + * @param array<\Google\Cloud\Translate\V3\Example>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Example::class); + $this->examples = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListExamplesRequest to + * obtain the corresponding 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 this token to the page_token field in the ListExamplesRequest to + * obtain the corresponding 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php new file mode 100644 index 000000000000..732d892af976 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php @@ -0,0 +1,259 @@ +google.cloud.translation.v3.ListGlossariesRequest + */ +class ListGlossariesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project from which to list all of the glossaries. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + * + * 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. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter specifying constraints of a list operation. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. + * If missing, no filtering is performed. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The name of the project from which to list all of the glossaries. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListGlossariesRequest + * + * @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 from which to list all of the glossaries. + * @type int $page_size + * Optional. Requested page size. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + * @type string $filter + * Optional. Filter specifying constraints of a list operation. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. + * If missing, no filtering is performed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project from which to list all of the glossaries. + * + * 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 from which to list all of the glossaries. + * + * 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. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + * + * 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. The server may return fewer glossaries than + * requested. If unspecified, the server picks an appropriate default. + * + * 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. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + * + * 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. + * Typically, this is the value of [ListGlossariesResponse.next_page_token] + * returned from the previous call to `ListGlossaries` method. + * The first page is returned if `page_token`is empty or missing. + * + * 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. Filter specifying constraints of a list operation. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. + * If missing, no filtering is performed. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter specifying constraints of a list operation. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. + * If missing, no filtering is performed. + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php new file mode 100644 index 000000000000..4671da068fa9 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php @@ -0,0 +1,109 @@ +google.cloud.translation.v3.ListGlossariesResponse + */ +class ListGlossariesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of glossaries for a project. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Glossary glossaries = 1; + */ + private $glossaries; + /** + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\Glossary>|\Google\Protobuf\Internal\RepeatedField $glossaries + * The list of glossaries for a project. + * @type string $next_page_token + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The list of glossaries for a project. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Glossary glossaries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGlossaries() + { + return $this->glossaries; + } + + /** + * The list of glossaries for a project. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Glossary glossaries = 1; + * @param array<\Google\Cloud\Translate\V3\Glossary>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGlossaries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Glossary::class); + $this->glossaries = $arr; + + return $this; + } + + /** + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve a page of results. Pass this value in the + * [ListGlossariesRequest.page_token] field in the subsequent call to + * `ListGlossaries` method to retrieve the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php new file mode 100644 index 000000000000..ee2cc959c6b2 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php @@ -0,0 +1,170 @@ +google.cloud.translation.v3.ListGlossaryEntriesRequest + */ +class ListGlossaryEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent glossary resource name for listing the glossary's + * entries. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server may return fewer glossary entries + * than requested. If unspecified, the server picks an appropriate default. + * + * 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. + * Typically, this is the value of + * [ListGlossaryEntriesResponse.next_page_token] returned from the previous + * call. The first page is returned if `page_token`is empty or missing. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent glossary resource name for listing the glossary's + * entries. Please see + * {@see TranslationServiceClient::glossaryName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListGlossaryEntriesRequest + * + * @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 glossary resource name for listing the glossary's + * entries. + * @type int $page_size + * Optional. Requested page size. The server may return fewer glossary entries + * than requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * Typically, this is the value of + * [ListGlossaryEntriesResponse.next_page_token] returned from the previous + * call. The first page is returned if `page_token`is empty or missing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent glossary resource name for listing the glossary's + * entries. + * + * 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 glossary resource name for listing the glossary's + * entries. + * + * 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. The server may return fewer glossary entries + * than requested. If unspecified, the server picks an appropriate default. + * + * 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. The server may return fewer glossary entries + * than requested. If unspecified, the server picks an appropriate default. + * + * 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. + * Typically, this is the value of + * [ListGlossaryEntriesResponse.next_page_token] returned from the previous + * call. The first page is returned if `page_token`is empty or missing. + * + * 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. + * Typically, this is the value of + * [ListGlossaryEntriesResponse.next_page_token] returned from the previous + * call. The first page is returned if `page_token`is empty or missing. + * + * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php new file mode 100644 index 000000000000..fb54f7a450c5 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php @@ -0,0 +1,105 @@ +google.cloud.translation.v3.ListGlossaryEntriesResponse + */ +class ListGlossaryEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Glossary Entries + * + * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryEntry glossary_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $glossary_entries; + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\GlossaryEntry>|\Google\Protobuf\Internal\RepeatedField $glossary_entries + * Optional. The Glossary Entries + * @type string $next_page_token + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Glossary Entries + * + * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryEntry glossary_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGlossaryEntries() + { + return $this->glossary_entries; + } + + /** + * Optional. The Glossary Entries + * + * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryEntry glossary_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Translate\V3\GlossaryEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGlossaryEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\GlossaryEntry::class); + $this->glossary_entries = $arr; + + return $this; + } + + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. A token to retrieve a page of results. Pass this value in the + * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php new file mode 100644 index 000000000000..0ecd1f15ed6e --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php @@ -0,0 +1,208 @@ +google.cloud.translation.v3.ListModelsRequest + */ +class ListModelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. An expression for filtering the models that will be returned. + * Supported filter: + * `dataset_id=${dataset_id}` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Requested page size. The server can return fewer results than + * requested. + * + * 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 for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListModels call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Translate\V3\ListModelsRequest + * + * @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. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * @type string $filter + * Optional. An expression for filtering the models that will be returned. + * Supported filter: + * `dataset_id=${dataset_id}` + * @type int $page_size + * Optional. Requested page size. The server can return fewer results than + * requested. + * @type string $page_token + * Optional. A token identifying a page of results for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListModels call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-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. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-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. An expression for filtering the models that will be returned. + * Supported filter: + * `dataset_id=${dataset_id}` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the models that will be returned. + * Supported filter: + * `dataset_id=${dataset_id}` + * + * 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; + } + + /** + * Optional. Requested page size. The server can return fewer results than + * requested. + * + * 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. The server can return fewer results than + * requested. + * + * 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 for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListModels call. + * + * 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 for the server to return. + * Typically obtained from next_page_token field in the response of a + * ListModels 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php new file mode 100644 index 000000000000..6b412ee82d54 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php @@ -0,0 +1,109 @@ +google.cloud.translation.v3.ListModelsResponse + */ +class ListModelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The models read. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Model models = 1; + */ + private $models; + /** + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListModelsRequest to + * obtain the corresponding page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\Model>|\Google\Protobuf\Internal\RepeatedField $models + * The models read. + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListModelsRequest to + * obtain the corresponding page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The models read. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Model models = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModels() + { + return $this->models; + } + + /** + * The models read. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Model models = 1; + * @param array<\Google\Cloud\Translate\V3\Model>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Model::class); + $this->models = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass this token to the page_token field in the ListModelsRequest to + * obtain the corresponding 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 this token to the page_token field in the ListModelsRequest to + * obtain the corresponding 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php new file mode 100644 index 000000000000..a71a45c1b211 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php @@ -0,0 +1,417 @@ +google.cloud.translation.v3.Model + */ +class Model extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the model, in form of + * `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The name of the model to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The dataset from which the model is trained, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * + * Generated from protobuf field string dataset = 3; + */ + protected $dataset = ''; + /** + * Output only. The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_language_code = ''; + /** + * Output only. The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_language_code = ''; + /** + * Output only. Number of examples (sentence pairs) used to train the model. + * + * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $train_example_count = 0; + /** + * Output only. Number of examples (sentence pairs) used to validate the + * model. + * + * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $validate_example_count = 0; + /** + * Output only. Number of examples (sentence pairs) used to test the model. + * + * Generated from protobuf field int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $test_example_count = 0; + /** + * Output only. Timestamp when the model resource was created, which is also + * when the training started. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this model was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the model, in form of + * `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` + * @type string $display_name + * The name of the model to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * @type string $dataset + * The dataset from which the model is trained, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * @type string $source_language_code + * Output only. The BCP-47 language code of the source language. + * @type string $target_language_code + * Output only. The BCP-47 language code of the target language. + * @type int $train_example_count + * Output only. Number of examples (sentence pairs) used to train the model. + * @type int $validate_example_count + * Output only. Number of examples (sentence pairs) used to validate the + * model. + * @type int $test_example_count + * Output only. Number of examples (sentence pairs) used to test the model. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when the model resource was created, which is also + * when the training started. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this model was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the model, in form of + * `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the model, in form of + * `projects/{project-number-or-id}/locations/{location_id}/models/{model_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 name of the model to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name of the model to show in the interface. The name can be + * up to 32 characters long and can consist only of ASCII Latin letters A-Z + * and a-z, underscores (_), and ASCII digits 0-9. + * + * 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 dataset from which the model is trained, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * + * Generated from protobuf field string dataset = 3; + * @return string + */ + public function getDataset() + { + return $this->dataset; + } + + /** + * The dataset from which the model is trained, in form of + * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` + * + * Generated from protobuf field string dataset = 3; + * @param string $var + * @return $this + */ + public function setDataset($var) + { + GPBUtil::checkString($var, True); + $this->dataset = $var; + + return $this; + } + + /** + * Output only. The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Output only. The BCP-47 language code of the source language. + * + * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Output only. The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * Output only. The BCP-47 language code of the target language. + * + * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + + /** + * Output only. Number of examples (sentence pairs) used to train the model. + * + * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTrainExampleCount() + { + return $this->train_example_count; + } + + /** + * Output only. Number of examples (sentence pairs) used to train the model. + * + * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTrainExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->train_example_count = $var; + + return $this; + } + + /** + * Output only. Number of examples (sentence pairs) used to validate the + * model. + * + * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getValidateExampleCount() + { + return $this->validate_example_count; + } + + /** + * Output only. Number of examples (sentence pairs) used to validate the + * model. + * + * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setValidateExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->validate_example_count = $var; + + return $this; + } + + /** + * Output only. Number of examples (sentence pairs) used to test the model. + * + * Generated from protobuf field int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTestExampleCount() + { + return $this->test_example_count; + } + + /** + * Output only. Number of examples (sentence pairs) used to test the model. + * + * Generated from protobuf field int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTestExampleCount($var) + { + GPBUtil::checkInt32($var); + $this->test_example_count = $var; + + return $this; + } + + /** + * Output only. Timestamp when the model resource was created, which is also + * when the training started. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when the model resource was created, which is also + * when the training started. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when this model was last updated. + * + * 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. Timestamp when this model was last updated. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php new file mode 100644 index 000000000000..b4365124c6c9 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php @@ -0,0 +1,83 @@ +google.cloud.translation.v3.OperationState + */ +class OperationState +{ + /** + * Invalid. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum OPERATION_STATE_RUNNING = 1; + */ + const OPERATION_STATE_RUNNING = 1; + /** + * The operation was successful. + * + * Generated from protobuf enum OPERATION_STATE_SUCCEEDED = 2; + */ + const OPERATION_STATE_SUCCEEDED = 2; + /** + * Failed to process operation. + * + * Generated from protobuf enum OPERATION_STATE_FAILED = 3; + */ + const OPERATION_STATE_FAILED = 3; + /** + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + * + * Generated from protobuf enum OPERATION_STATE_CANCELLING = 4; + */ + const OPERATION_STATE_CANCELLING = 4; + /** + * The operation request was successfully canceled. + * + * Generated from protobuf enum OPERATION_STATE_CANCELLED = 5; + */ + const OPERATION_STATE_CANCELLED = 5; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::OPERATION_STATE_RUNNING => 'OPERATION_STATE_RUNNING', + self::OPERATION_STATE_SUCCEEDED => 'OPERATION_STATE_SUCCEEDED', + self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', + self::OPERATION_STATE_CANCELLING => 'OPERATION_STATE_CANCELLING', + 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php new file mode 100644 index 000000000000..700e61927867 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php @@ -0,0 +1,249 @@ +google.cloud.translation.v3.OutputConfig + */ +class OutputConfig extends \Google\Protobuf\Internal\Message +{ + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GcsDestination $gcs_destination + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file and glossary_errors_file are always empty + * strings if the input_file is tsv. They could also be empty if we have no + * content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + * The format of translations_file (for target language code 'trg') is: + * `gs://translation_test/a_b_c_'trg'_translations.[extension]` + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` + * The format of errors file (for target language code 'trg') is: + * `gs://translation_test/a_b_c_'trg'_errors.[extension]` + * If the input file extension is tsv, errors_file contains the following: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file and glossary_errors_file are always empty + * strings if the input_file is tsv. They could also be empty if we have no + * content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + * The format of translations_file (for target language code 'trg') is: + * `gs://translation_test/a_b_c_'trg'_translations.[extension]` + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` + * The format of errors file (for target language code 'trg') is: + * `gs://translation_test/a_b_c_'trg'_errors.[extension]` + * If the input file extension is tsv, errors_file contains the following: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` + * + * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; + * @return \Google\Cloud\Translate\V3\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * Google Cloud Storage destination for output content. + * For every single input file (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateTextRequest). + * Output files (tsv) generated are compliant with RFC 4180 except that + * record delimiters are '\n' instead of '\r\n'. We don't provide any way to + * change record delimiters. + * While the input files are being processed, we write/update an index file + * 'index.csv' under 'output_uri_prefix' (for example, + * gs://translation-test/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_file,target_language_code,translations_file,errors_file, + * glossary_translations_file,glossary_errors_file + * input_file is one file we matched using gcs_source.input_uri. + * target_language_code is provided in the request. + * translations_file contains the translations. (details provided below) + * errors_file contains the errors during processing of the file. (details + * below). Both translations_file and errors_file could be empty + * strings if we have no content to output. + * glossary_translations_file and glossary_errors_file are always empty + * strings if the input_file is tsv. They could also be empty if we have no + * content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) + * The format of translations_file (for target language code 'trg') is: + * `gs://translation_test/a_b_c_'trg'_translations.[extension]` + * If the input file extension is tsv, the output has the following + * columns: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: translation without applying a glossary. Empty string if there + * is an error. + * Column 4 (only present if a glossary is provided in the request): + * translation after applying the glossary. Empty string if there is an + * error applying the glossary. Could be same string as column 3 if there is + * no glossary applied. + * If input file extension is a txt or html, the translation is directly + * written to the output file. If glossary is requested, a separate + * glossary_translations_file has format of + * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` + * The format of errors file (for target language code 'trg') is: + * `gs://translation_test/a_b_c_'trg'_errors.[extension]` + * If the input file extension is tsv, errors_file contains the following: + * Column 1: ID of the request provided in the input, if it's not + * provided in the input, then the input row number is used (0-based). + * Column 2: source sentence. + * Column 3: Error detail for the translation. Could be empty. + * Column 4 (only present if a glossary is provided in the request): + * Error when applying the glossary. + * If the input file extension is txt or html, glossary_error_file will be + * generated that contains error details. glossary_error_file has format of + * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` + * + * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; + * @param \Google\Cloud\Translate\V3\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php new file mode 100644 index 000000000000..1e749df25547 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php @@ -0,0 +1,121 @@ +google.cloud.translation.v3.Romanization + */ +class Romanization extends \Google\Protobuf\Internal\Message +{ + /** + * Romanized text. + * If an error occurs during romanization, this field might be excluded from + * the response. + * + * Generated from protobuf field string romanized_text = 1; + */ + protected $romanized_text = ''; + /** + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * + * Generated from protobuf field string detected_language_code = 2; + */ + protected $detected_language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $romanized_text + * Romanized text. + * If an error occurs during romanization, this field might be excluded from + * the response. + * @type string $detected_language_code + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Romanized text. + * If an error occurs during romanization, this field might be excluded from + * the response. + * + * Generated from protobuf field string romanized_text = 1; + * @return string + */ + public function getRomanizedText() + { + return $this->romanized_text; + } + + /** + * Romanized text. + * If an error occurs during romanization, this field might be excluded from + * the response. + * + * Generated from protobuf field string romanized_text = 1; + * @param string $var + * @return $this + */ + public function setRomanizedText($var) + { + GPBUtil::checkString($var, True); + $this->romanized_text = $var; + + return $this; + } + + /** + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * + * Generated from protobuf field string detected_language_code = 2; + * @return string + */ + public function getDetectedLanguageCode() + { + return $this->detected_language_code; + } + + /** + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * + * Generated from protobuf field string detected_language_code = 2; + * @param string $var + * @return $this + */ + public function setDetectedLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->detected_language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php new file mode 100644 index 000000000000..597960eb3d1f --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php @@ -0,0 +1,190 @@ +google.cloud.translation.v3.RomanizeTextRequest + */ +class RomanizeTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The content of the input in string format. + * + * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $contents; + /** + * Optional. The ISO-639 language code of the input text if + * known, for example, "hi" or "zh". If the source language isn't specified, + * the API attempts to identify the source language automatically and returns + * the source language for each content in the response. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $source_language_code = ''; + + /** + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string[] $contents Required. The content of the input in string format. + * + * @return \Google\Cloud\Translate\V3\RomanizeTextRequest + * + * @experimental + */ + public static function build(string $parent, array $contents): self + { + return (new self()) + ->setParent($parent) + ->setContents($contents); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $contents + * Required. The content of the input in string format. + * @type string $source_language_code + * Optional. The ISO-639 language code of the input text if + * known, for example, "hi" or "zh". If the source language isn't specified, + * the API attempts to identify the source language automatically and returns + * the source language for each content in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Generated from protobuf field string parent = 4 [(.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 content of the input in string format. + * + * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContents() + { + return $this->contents; + } + + /** + * Required. The content of the input in string format. + * + * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->contents = $arr; + + return $this; + } + + /** + * Optional. The ISO-639 language code of the input text if + * known, for example, "hi" or "zh". If the source language isn't specified, + * the API attempts to identify the source language automatically and returns + * the source language for each content in the response. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Optional. The ISO-639 language code of the input text if + * known, for example, "hi" or "zh". If the source language isn't specified, + * the API attempts to identify the source language automatically and returns + * the source language for each content in the response. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php new file mode 100644 index 000000000000..2adecb7ca04f --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php @@ -0,0 +1,75 @@ +google.cloud.translation.v3.RomanizeTextResponse + */ +class RomanizeTextResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Text romanization responses. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Romanization romanizations = 1; + */ + private $romanizations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\Romanization>|\Google\Protobuf\Internal\RepeatedField $romanizations + * Text romanization responses. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Text romanization responses. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Romanization romanizations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRomanizations() + { + return $this->romanizations; + } + + /** + * Text romanization responses. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Romanization romanizations = 1; + * @param array<\Google\Cloud\Translate\V3\Romanization>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRomanizations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Romanization::class); + $this->romanizations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php new file mode 100644 index 000000000000..cfb8756c2c13 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php @@ -0,0 +1,186 @@ +google.cloud.translation.v3.SupportedLanguage + */ +class SupportedLanguage extends \Google\Protobuf\Internal\Message +{ + /** + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN'). + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * Human-readable name of the language localized in the display language + * specified in the request. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Can be used as a source language. + * + * Generated from protobuf field bool support_source = 3; + */ + protected $support_source = false; + /** + * Can be used as a target language. + * + * Generated from protobuf field bool support_target = 4; + */ + protected $support_target = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN'). + * @type string $display_name + * Human-readable name of the language localized in the display language + * specified in the request. + * @type bool $support_source + * Can be used as a source language. + * @type bool $support_target + * Can be used as a target language. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN'). + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Supported language code, generally consisting of its ISO 639-1 + * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes + * including language and region identifiers are returned (for example, + * 'zh-TW' and 'zh-CN'). + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Human-readable name of the language localized in the display language + * specified in the request. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Human-readable name of the language localized in the display language + * specified in the request. + * + * 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; + } + + /** + * Can be used as a source language. + * + * Generated from protobuf field bool support_source = 3; + * @return bool + */ + public function getSupportSource() + { + return $this->support_source; + } + + /** + * Can be used as a source language. + * + * Generated from protobuf field bool support_source = 3; + * @param bool $var + * @return $this + */ + public function setSupportSource($var) + { + GPBUtil::checkBool($var); + $this->support_source = $var; + + return $this; + } + + /** + * Can be used as a target language. + * + * Generated from protobuf field bool support_target = 4; + * @return bool + */ + public function getSupportTarget() + { + return $this->support_target; + } + + /** + * Can be used as a target language. + * + * Generated from protobuf field bool support_target = 4; + * @param bool $var + * @return $this + */ + public function setSupportTarget($var) + { + GPBUtil::checkBool($var); + $this->support_target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php new file mode 100644 index 000000000000..1bfb36123e52 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php @@ -0,0 +1,71 @@ +google.cloud.translation.v3.SupportedLanguages + */ +class SupportedLanguages extends \Google\Protobuf\Internal\Message +{ + /** + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.SupportedLanguage languages = 1; + */ + private $languages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\SupportedLanguage>|\Google\Protobuf\Internal\RepeatedField $languages + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.SupportedLanguage languages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguages() + { + return $this->languages; + } + + /** + * A list of supported language responses. This list contains an entry + * for each language the Translation API supports. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.SupportedLanguage languages = 1; + * @param array<\Google\Cloud\Translate\V3\SupportedLanguage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\SupportedLanguage::class); + $this->languages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php new file mode 100644 index 000000000000..ed1a08a279ba --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php @@ -0,0 +1,631 @@ +google.cloud.translation.v3.TranslateDocumentRequest + */ +class TranslateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * Language Support. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $source_language_code = ''; + /** + * Required. The ISO-639 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + * + * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_language_code = ''; + /** + * Required. Input configurations. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document_input_config = null; + /** + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $document_output_config = null; + /** + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If not provided, the default Google model (NMT) will be used for + * translation. + * + * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = ''; + /** + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $glossary_config = null; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * + * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $customized_attribution = ''; + /** + * Optional. is_translate_native_pdf_only field for external customers. + * If true, the page limit of online native pdf translation is 300 and only + * native pdf pages will be translated. + * + * Generated from protobuf field bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_translate_native_pdf_only = false; + /** + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * + * Generated from protobuf field bool enable_shadow_removal_native_pdf = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_shadow_removal_native_pdf = false; + /** + * Optional. If true, enable auto rotation correction in DVS. + * + * Generated from protobuf field bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_rotation_correction = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * @type string $source_language_code + * Optional. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * Language Support. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + * @type string $target_language_code + * Required. The ISO-639 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + * @type \Google\Cloud\Translate\V3\DocumentInputConfig $document_input_config + * Required. Input configurations. + * @type \Google\Cloud\Translate\V3\DocumentOutputConfig $document_output_config + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + * @type string $model + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If not provided, the default Google model (NMT) will be used for + * translation. + * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * @type string $customized_attribution + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * @type bool $is_translate_native_pdf_only + * Optional. is_translate_native_pdf_only field for external customers. + * If true, the page limit of online native pdf translation is 300 and only + * native pdf pages will be translated. + * @type bool $enable_shadow_removal_native_pdf + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * @type bool $enable_rotation_correction + * Optional. If true, enable auto rotation correction in DVS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * + * 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 ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * Language Support. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Optional. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * Language Support. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Required. The ISO-639 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + * + * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * Required. The ISO-639 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + * + * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + + /** + * Required. Input configurations. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\DocumentInputConfig|null + */ + public function getDocumentInputConfig() + { + return $this->document_input_config; + } + + public function hasDocumentInputConfig() + { + return isset($this->document_input_config); + } + + public function clearDocumentInputConfig() + { + unset($this->document_input_config); + } + + /** + * Required. Input configurations. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\DocumentInputConfig $var + * @return $this + */ + public function setDocumentInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentInputConfig::class); + $this->document_input_config = $var; + + return $this; + } + + /** + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Translate\V3\DocumentOutputConfig|null + */ + public function getDocumentOutputConfig() + { + return $this->document_output_config; + } + + public function hasDocumentOutputConfig() + { + return isset($this->document_output_config); + } + + public function clearDocumentOutputConfig() + { + unset($this->document_output_config); + } + + /** + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Translate\V3\DocumentOutputConfig $var + * @return $this + */ + public function setDocumentOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentOutputConfig::class); + $this->document_output_config = $var; + + return $this; + } + + /** + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If not provided, the default Google model (NMT) will be used for + * translation. + * + * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * If not provided, the default Google model (NMT) will be used for + * translation. + * + * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null + */ + public function getGlossaryConfig() + { + return $this->glossary_config; + } + + public function hasGlossaryConfig() + { + return isset($this->glossary_config); + } + + public function clearGlossaryConfig() + { + unset($this->glossary_config); + } + + /** + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var + * @return $this + */ + public function setGlossaryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); + $this->glossary_config = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 8 [(.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. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * + * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomizedAttribution() + { + return $this->customized_attribution; + } + + /** + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * + * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomizedAttribution($var) + { + GPBUtil::checkString($var, True); + $this->customized_attribution = $var; + + return $this; + } + + /** + * Optional. is_translate_native_pdf_only field for external customers. + * If true, the page limit of online native pdf translation is 300 and only + * native pdf pages will be translated. + * + * Generated from protobuf field bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsTranslateNativePdfOnly() + { + return $this->is_translate_native_pdf_only; + } + + /** + * Optional. is_translate_native_pdf_only field for external customers. + * If true, the page limit of online native pdf translation is 300 and only + * native pdf pages will be translated. + * + * Generated from protobuf field bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsTranslateNativePdfOnly($var) + { + GPBUtil::checkBool($var); + $this->is_translate_native_pdf_only = $var; + + return $this; + } + + /** + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * + * Generated from protobuf field bool enable_shadow_removal_native_pdf = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableShadowRemovalNativePdf() + { + return $this->enable_shadow_removal_native_pdf; + } + + /** + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * + * Generated from protobuf field bool enable_shadow_removal_native_pdf = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableShadowRemovalNativePdf($var) + { + GPBUtil::checkBool($var); + $this->enable_shadow_removal_native_pdf = $var; + + return $this; + } + + /** + * Optional. If true, enable auto rotation correction in DVS. + * + * Generated from protobuf field bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableRotationCorrection() + { + return $this->enable_rotation_correction; + } + + /** + * Optional. If true, enable auto rotation correction in DVS. + * + * Generated from protobuf field bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableRotationCorrection($var) + { + GPBUtil::checkBool($var); + $this->enable_rotation_correction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php new file mode 100644 index 000000000000..cb03652f9530 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php @@ -0,0 +1,231 @@ +google.cloud.translation.v3.TranslateDocumentResponse + */ +class TranslateDocumentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Translated document. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation document_translation = 1; + */ + protected $document_translation = null; + /** + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; + */ + protected $glossary_document_translation = null; + /** + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * + * Generated from protobuf field string model = 3; + */ + protected $model = ''; + /** + * The `glossary_config` used for this translation. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; + */ + protected $glossary_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\DocumentTranslation $document_translation + * Translated document. + * @type \Google\Cloud\Translate\V3\DocumentTranslation $glossary_document_translation + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + * @type string $model + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config + * The `glossary_config` used for this translation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Translated document. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation document_translation = 1; + * @return \Google\Cloud\Translate\V3\DocumentTranslation|null + */ + public function getDocumentTranslation() + { + return $this->document_translation; + } + + public function hasDocumentTranslation() + { + return isset($this->document_translation); + } + + public function clearDocumentTranslation() + { + unset($this->document_translation); + } + + /** + * Translated document. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation document_translation = 1; + * @param \Google\Cloud\Translate\V3\DocumentTranslation $var + * @return $this + */ + public function setDocumentTranslation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentTranslation::class); + $this->document_translation = $var; + + return $this; + } + + /** + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; + * @return \Google\Cloud\Translate\V3\DocumentTranslation|null + */ + public function getGlossaryDocumentTranslation() + { + return $this->glossary_document_translation; + } + + public function hasGlossaryDocumentTranslation() + { + return isset($this->glossary_document_translation); + } + + public function clearGlossaryDocumentTranslation() + { + unset($this->glossary_document_translation); + } + + /** + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + * + * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; + * @param \Google\Cloud\Translate\V3\DocumentTranslation $var + * @return $this + */ + public function setGlossaryDocumentTranslation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentTranslation::class); + $this->glossary_document_translation = $var; + + return $this; + } + + /** + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * + * Generated from protobuf field string model = 3; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * + * Generated from protobuf field string model = 3; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * The `glossary_config` used for this translation. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; + * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null + */ + public function getGlossaryConfig() + { + return $this->glossary_config; + } + + public function hasGlossaryConfig() + { + return isset($this->glossary_config); + } + + public function clearGlossaryConfig() + { + unset($this->glossary_config); + } + + /** + * The `glossary_config` used for this translation. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; + * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var + * @return $this + */ + public function setGlossaryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); + $this->glossary_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php new file mode 100644 index 000000000000..ce2fa4f3fce8 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php @@ -0,0 +1,156 @@ +google.cloud.translation.v3.TranslateTextGlossaryConfig + */ +class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * + * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $glossary = ''; + /** + * Optional. Indicates match is case insensitive. The default value is `false` + * if missing. + * + * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ignore_case = false; + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $contextual_translation_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $glossary + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * @type bool $ignore_case + * Optional. Indicates match is case insensitive. The default value is `false` + * if missing. + * @type bool $contextual_translation_enabled + * Optional. If set to true, the glossary will be used for contextual + * translation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * + * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGlossary() + { + return $this->glossary; + } + + /** + * Required. The `glossary` to be applied for this translation. + * The format depends on the glossary: + * - User-provided custom glossary: + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` + * + * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGlossary($var) + { + GPBUtil::checkString($var, True); + $this->glossary = $var; + + return $this; + } + + /** + * Optional. Indicates match is case insensitive. The default value is `false` + * if missing. + * + * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreCase() + { + return $this->ignore_case; + } + + /** + * Optional. Indicates match is case insensitive. The default value is `false` + * if missing. + * + * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreCase($var) + { + GPBUtil::checkBool($var); + $this->ignore_case = $var; + + return $this; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getContextualTranslationEnabled() + { + return $this->contextual_translation_enabled; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setContextualTranslationEnabled($var) + { + GPBUtil::checkBool($var); + $this->contextual_translation_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php new file mode 100644 index 000000000000..d916d70eb688 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php @@ -0,0 +1,599 @@ +google.cloud.translation.v3.TranslateTextRequest + */ +class TranslateTextRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * + * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $contents; + /** + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mime_type = ''; + /** + * Optional. The ISO-639 language code of the input text if + * known, for example, "en-US" or "sr-Latn". Supported language codes are + * listed in Language Support. If the source language isn't specified, the API + * attempts to identify the source language automatically and returns the + * source language within the response. + * + * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $source_language_code = ''; + /** + * Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * + * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_language_code = ''; + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * - Translation LLM models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + * For global (non-regionalized) requests, use `location-id` `global`. + * For example, + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. + * If not provided, the default Google model (NMT) will be used + * + * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = ''; + /** + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $glossary_config = null; + /** + * Optional. Transliteration to be applied. + * + * Generated from protobuf field .google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $transliteration_config = null; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * @param string[] $contents Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * + * @return \Google\Cloud\Translate\V3\TranslateTextRequest + * + * @experimental + */ + public static function build(string $parent, string $targetLanguageCode, array $contents): self + { + return (new self()) + ->setParent($parent) + ->setTargetLanguageCode($targetLanguageCode) + ->setContents($contents); + } + + /** + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. Please see + * {@see TranslationServiceClient::locationName()} for help formatting this field. + * @param string $model Optional. The `model` type requested for this translation. + * + * The format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * - Translation LLM models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + * + * For global (non-regionalized) requests, use `location-id` `global`. + * For example, + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. + * + * If not provided, the default Google model (NMT) will be used + * @param string $mimeType Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * @param string $sourceLanguageCode Optional. The ISO-639 language code of the input text if + * known, for example, "en-US" or "sr-Latn". Supported language codes are + * listed in Language Support. If the source language isn't specified, the API + * attempts to identify the source language automatically and returns the + * source language within the response. + * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * @param string[] $contents Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * + * @return \Google\Cloud\Translate\V3\TranslateTextRequest + * + * @experimental + */ + public static function buildFromParentModelMimeTypeSourceLanguageCodeTargetLanguageCodeContents(string $parent, string $model, string $mimeType, string $sourceLanguageCode, string $targetLanguageCode, array $contents): self + { + return (new self()) + ->setParent($parent) + ->setModel($model) + ->setMimeType($mimeType) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCode($targetLanguageCode) + ->setContents($contents); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $contents + * Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * @type string $mime_type + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * @type string $source_language_code + * Optional. The ISO-639 language code of the input text if + * known, for example, "en-US" or "sr-Latn". Supported language codes are + * listed in Language Support. If the source language isn't specified, the API + * attempts to identify the source language automatically and returns the + * source language within the response. + * @type string $target_language_code + * Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * @type string $parent + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * @type string $model + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * - Translation LLM models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + * For global (non-regionalized) requests, use `location-id` `global`. + * For example, + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. + * If not provided, the default Google model (NMT) will be used + * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * @type \Google\Cloud\Translate\V3\TransliterationConfig $transliteration_config + * Optional. Transliteration to be applied. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * + * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContents() + { + return $this->contents; + } + + /** + * Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * + * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->contents = $arr; + + return $this; + } + + /** + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * + * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Optional. The ISO-639 language code of the input text if + * known, for example, "en-US" or "sr-Latn". Supported language codes are + * listed in Language Support. If the source language isn't specified, the API + * attempts to identify the source language automatically and returns the + * source language within the response. + * + * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Optional. The ISO-639 language code of the input text if + * known, for example, "en-US" or "sr-Latn". Supported language codes are + * listed in Language Support. If the source language isn't specified, the API + * attempts to identify the source language automatically and returns the + * source language within the response. + * + * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * + * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * + * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Project or location to make a call. Must refer to a caller's + * project. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field string parent = 8 [(.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 `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * - Translation LLM models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + * For global (non-regionalized) requests, use `location-id` `global`. + * For example, + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. + * If not provided, the default Google model (NMT) will be used + * + * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * - Translation LLM models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + * For global (non-regionalized) requests, use `location-id` `global`. + * For example, + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. + * If not provided, the default Google model (NMT) will be used + * + * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null + */ + public function getGlossaryConfig() + { + return $this->glossary_config; + } + + public function hasGlossaryConfig() + { + return isset($this->glossary_config); + } + + public function clearGlossaryConfig() + { + unset($this->glossary_config); + } + + /** + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var + * @return $this + */ + public function setGlossaryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); + $this->glossary_config = $var; + + return $this; + } + + /** + * Optional. Transliteration to be applied. + * + * Generated from protobuf field .google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Translate\V3\TransliterationConfig|null + */ + public function getTransliterationConfig() + { + return $this->transliteration_config; + } + + public function hasTransliterationConfig() + { + return isset($this->transliteration_config); + } + + public function clearTransliterationConfig() + { + unset($this->transliteration_config); + } + + /** + * Optional. Transliteration to be applied. + * + * Generated from protobuf field .google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Translate\V3\TransliterationConfig $var + * @return $this + */ + public function setTransliterationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TransliterationConfig::class); + $this->transliteration_config = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * + * Generated from protobuf field map labels = 10 [(.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; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php new file mode 100644 index 000000000000..421453b69591 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php @@ -0,0 +1,123 @@ +google.cloud.translation.v3.TranslateTextResponse + */ +class TranslateTextResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Text translation responses with no glossary applied. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Translation translations = 1; + */ + private $translations; + /** + * Text translation responses if a glossary is provided in the request. + * This can be the same as + * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Translation glossary_translations = 3; + */ + private $glossary_translations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $translations + * Text translation responses with no glossary applied. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * @type array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $glossary_translations + * Text translation responses if a glossary is provided in the request. + * This can be the same as + * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Text translation responses with no glossary applied. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Translation translations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTranslations() + { + return $this->translations; + } + + /** + * Text translation responses with no glossary applied. + * This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Translation translations = 1; + * @param array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTranslations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Translation::class); + $this->translations = $arr; + + return $this; + } + + /** + * Text translation responses if a glossary is provided in the request. + * This can be the same as + * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Translation glossary_translations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGlossaryTranslations() + { + return $this->glossary_translations; + } + + /** + * Text translation responses if a glossary is provided in the request. + * This can be the same as + * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as + * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. + * + * Generated from protobuf field repeated .google.cloud.translation.v3.Translation glossary_translations = 3; + * @param array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGlossaryTranslations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Translation::class); + $this->glossary_translations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php new file mode 100644 index 000000000000..f57fa9baac73 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php @@ -0,0 +1,223 @@ +google.cloud.translation.v3.Translation + */ +class Translation extends \Google\Protobuf\Internal\Message +{ + /** + * Text translated into the target language. + * If an error occurs during translation, this field might be excluded from + * the response. + * + * Generated from protobuf field string translated_text = 1; + */ + protected $translated_text = ''; + /** + * Only present when `model` is present in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * + * Generated from protobuf field string model = 2; + */ + protected $model = ''; + /** + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * + * Generated from protobuf field string detected_language_code = 4; + */ + protected $detected_language_code = ''; + /** + * The `glossary_config` used for this translation. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 3; + */ + protected $glossary_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $translated_text + * Text translated into the target language. + * If an error occurs during translation, this field might be excluded from + * the response. + * @type string $model + * Only present when `model` is present in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * @type string $detected_language_code + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config + * The `glossary_config` used for this translation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Text translated into the target language. + * If an error occurs during translation, this field might be excluded from + * the response. + * + * Generated from protobuf field string translated_text = 1; + * @return string + */ + public function getTranslatedText() + { + return $this->translated_text; + } + + /** + * Text translated into the target language. + * If an error occurs during translation, this field might be excluded from + * the response. + * + * Generated from protobuf field string translated_text = 1; + * @param string $var + * @return $this + */ + public function setTranslatedText($var) + { + GPBUtil::checkString($var, True); + $this->translated_text = $var; + + return $this; + } + + /** + * Only present when `model` is present in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * + * Generated from protobuf field string model = 2; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Only present when `model` is present in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + * + * Generated from protobuf field string model = 2; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * + * Generated from protobuf field string detected_language_code = 4; + * @return string + */ + public function getDetectedLanguageCode() + { + return $this->detected_language_code; + } + + /** + * The ISO-639 language code of source text in the initial request, detected + * automatically, if no source language was passed within the initial + * request. If the source language was passed, auto-detection of the language + * does not occur and this field is empty. + * + * Generated from protobuf field string detected_language_code = 4; + * @param string $var + * @return $this + */ + public function setDetectedLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->detected_language_code = $var; + + return $this; + } + + /** + * The `glossary_config` used for this translation. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 3; + * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null + */ + public function getGlossaryConfig() + { + return $this->glossary_config; + } + + public function hasGlossaryConfig() + { + return isset($this->glossary_config); + } + + public function clearGlossaryConfig() + { + unset($this->glossary_config); + } + + /** + * The `glossary_config` used for this translation. + * + * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 3; + * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var + * @return $this + */ + public function setGlossaryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); + $this->glossary_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php new file mode 100644 index 000000000000..3d511df97dc9 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php @@ -0,0 +1,71 @@ +google.cloud.translation.v3.TransliterationConfig + */ +class TransliterationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * If true, source text in romanized form can be translated to the target + * language. + * + * Generated from protobuf field bool enable_transliteration = 1; + */ + protected $enable_transliteration = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_transliteration + * If true, source text in romanized form can be translated to the target + * language. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * If true, source text in romanized form can be translated to the target + * language. + * + * Generated from protobuf field bool enable_transliteration = 1; + * @return bool + */ + public function getEnableTransliteration() + { + return $this->enable_transliteration; + } + + /** + * If true, source text in romanized form can be translated to the target + * language. + * + * Generated from protobuf field bool enable_transliteration = 1; + * @param bool $var + * @return $this + */ + public function setEnableTransliteration($var) + { + GPBUtil::checkBool($var); + $this->enable_transliteration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php new file mode 100644 index 000000000000..992f570f73b9 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php @@ -0,0 +1,90 @@ +google.cloud.translation.v3.UpdateGlossaryEntryRequest + */ +class UpdateGlossaryEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The glossary entry to update. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $glossary_entry = null; + + /** + * @param \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry Required. The glossary entry to update. + * + * @return \Google\Cloud\Translate\V3\UpdateGlossaryEntryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry): self + { + return (new self()) + ->setGlossaryEntry($glossaryEntry); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\GlossaryEntry $glossary_entry + * Required. The glossary entry to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The glossary entry to update. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\GlossaryEntry|null + */ + public function getGlossaryEntry() + { + return $this->glossary_entry; + } + + public function hasGlossaryEntry() + { + return isset($this->glossary_entry); + } + + public function clearGlossaryEntry() + { + unset($this->glossary_entry); + } + + /** + * Required. The glossary entry to update. + * + * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\GlossaryEntry $var + * @return $this + */ + public function setGlossaryEntry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry::class); + $this->glossary_entry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php new file mode 100644 index 000000000000..14698a198d91 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php @@ -0,0 +1,161 @@ +google.cloud.translation.v3.UpdateGlossaryMetadata + */ +class UpdateGlossaryMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The updated glossary object. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1; + */ + protected $glossary = null; + /** + * The current state of the glossary update operation. If the glossary input + * file was not updated this will be completed immediately + * + * Generated from protobuf field .google.cloud.translation.v3.UpdateGlossaryMetadata.State state = 2; + */ + protected $state = 0; + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + */ + protected $submit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\Glossary $glossary + * The updated glossary object. + * @type int $state + * The current state of the glossary update operation. If the glossary input + * file was not updated this will be completed immediately + * @type \Google\Protobuf\Timestamp $submit_time + * The time when the operation was submitted to the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * The updated glossary object. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1; + * @return \Google\Cloud\Translate\V3\Glossary|null + */ + public function getGlossary() + { + return $this->glossary; + } + + public function hasGlossary() + { + return isset($this->glossary); + } + + public function clearGlossary() + { + unset($this->glossary); + } + + /** + * The updated glossary object. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1; + * @param \Google\Cloud\Translate\V3\Glossary $var + * @return $this + */ + public function setGlossary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary::class); + $this->glossary = $var; + + return $this; + } + + /** + * The current state of the glossary update operation. If the glossary input + * file was not updated this will be completed immediately + * + * Generated from protobuf field .google.cloud.translation.v3.UpdateGlossaryMetadata.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the glossary update operation. If the glossary input + * file was not updated this will be completed immediately + * + * Generated from protobuf field .google.cloud.translation.v3.UpdateGlossaryMetadata.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\UpdateGlossaryMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * The time when the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php new file mode 100644 index 000000000000..af62f118b6c5 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php @@ -0,0 +1,86 @@ +google.cloud.translation.v3.UpdateGlossaryMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The glossary was successfully updated. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Failed to update the glossary. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + * + * Generated from protobuf enum CANCELLING = 4; + */ + const CANCELLING = 4; + /** + * The glossary update request was successfully canceled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Translate\V3\UpdateGlossaryMetadata_State::class); + diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php new file mode 100644 index 000000000000..d4ad17b260d3 --- /dev/null +++ b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php @@ -0,0 +1,141 @@ +google.cloud.translation.v3.UpdateGlossaryRequest + */ +class UpdateGlossaryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The glossary entry to update. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $glossary = null; + /** + * The list of fields to be updated. Currently only `display_name` and + * 'input_config' + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Translate\V3\Glossary $glossary Required. The glossary entry to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. Currently only `display_name` and + * 'input_config' + * + * @return \Google\Cloud\Translate\V3\UpdateGlossaryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Translate\V3\Glossary $glossary, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGlossary($glossary) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Translate\V3\Glossary $glossary + * Required. The glossary entry to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. Currently only `display_name` and + * 'input_config' + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The glossary entry to update. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Translate\V3\Glossary|null + */ + public function getGlossary() + { + return $this->glossary; + } + + public function hasGlossary() + { + return isset($this->glossary); + } + + public function clearGlossary() + { + unset($this->glossary); + } + + /** + * Required. The glossary entry to update. + * + * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Translate\V3\Glossary $var + * @return $this + */ + public function setGlossary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary::class); + $this->glossary = $var; + + return $this; + } + + /** + * The list of fields to be updated. Currently only `display_name` and + * 'input_config' + * + * 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. Currently only `display_name` and + * 'input_config' + * + * 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/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php new file mode 100644 index 000000000000..445fcc3c00bd --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setDataset($formattedDataset) + ->setContent($content); + + // Call the API and handle any network failures. + try { + /** @var AdaptiveMtTranslateResponse $response */ + $response = $translationServiceClient->adaptiveMtTranslate($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedDataset = TranslationServiceClient::adaptiveMtDatasetName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]' + ); + $contentElement = '[CONTENT]'; + + adaptive_mt_translate_sample($formattedParent, $formattedDataset, $contentElement); +} +// [END translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php new file mode 100644 index 000000000000..7d14ea9bc116 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php @@ -0,0 +1,116 @@ +setParent($formattedParent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->batchTranslateDocument($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchTranslateDocumentResponse $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $sourceLanguageCode = '[SOURCE_LANGUAGE_CODE]'; + $targetLanguageCodesElement = '[TARGET_LANGUAGE_CODES]'; + + batch_translate_document_sample($formattedParent, $sourceLanguageCode, $targetLanguageCodesElement); +} +// [END translate_v3_generated_TranslationService_BatchTranslateDocument_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php new file mode 100644 index 000000000000..17f600ae7a25 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php @@ -0,0 +1,113 @@ +setParent($formattedParent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->batchTranslateText($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchTranslateResponse $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $sourceLanguageCode = '[SOURCE_LANGUAGE_CODE]'; + $targetLanguageCodesElement = '[TARGET_LANGUAGE_CODES]'; + + batch_translate_text_sample($formattedParent, $sourceLanguageCode, $targetLanguageCodesElement); +} +// [END translate_v3_generated_TranslationService_BatchTranslateText_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php new file mode 100644 index 000000000000..98a77eeaf05c --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php @@ -0,0 +1,85 @@ +setName($formattedAdaptiveMtDatasetName); + $request = (new CreateAdaptiveMtDatasetRequest()) + ->setParent($formattedParent) + ->setAdaptiveMtDataset($adaptiveMtDataset); + + // Call the API and handle any network failures. + try { + /** @var AdaptiveMtDataset $response */ + $response = $translationServiceClient->createAdaptiveMtDataset($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedAdaptiveMtDatasetName = TranslationServiceClient::adaptiveMtDatasetName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]' + ); + + create_adaptive_mt_dataset_sample($formattedParent, $formattedAdaptiveMtDatasetName); +} +// [END translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php new file mode 100644 index 000000000000..158e8454a694 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setDataset($dataset); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->createDataset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Dataset $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_dataset_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_CreateDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php new file mode 100644 index 000000000000..c6779a21048a --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php @@ -0,0 +1,90 @@ +setName($glossaryName); + $request = (new CreateGlossaryRequest()) + ->setParent($formattedParent) + ->setGlossary($glossary); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->createGlossary($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Glossary $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $glossaryName = '[NAME]'; + + create_glossary_sample($formattedParent, $glossaryName); +} +// [END translate_v3_generated_TranslationService_CreateGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php new file mode 100644 index 000000000000..760e1aeb893c --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php @@ -0,0 +1,73 @@ +setParent($formattedParent) + ->setGlossaryEntry($glossaryEntry); + + // Call the API and handle any network failures. + try { + /** @var GlossaryEntry $response */ + $response = $translationServiceClient->createGlossaryEntry($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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + + create_glossary_entry_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_CreateGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php new file mode 100644 index 000000000000..79accf9238f0 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php @@ -0,0 +1,86 @@ +setParent($formattedParent) + ->setModel($model); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->createModel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Model $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_model_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_CreateModel_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php new file mode 100644 index 000000000000..5a4e58077d9c --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $translationServiceClient->deleteAdaptiveMtDataset($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 = TranslationServiceClient::adaptiveMtDatasetName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]' + ); + + delete_adaptive_mt_dataset_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php new file mode 100644 index 000000000000..83d86f0d8558 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $translationServiceClient->deleteAdaptiveMtFile($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 = TranslationServiceClient::adaptiveMtFileName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]', + '[FILE]' + ); + + delete_adaptive_mt_file_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php new file mode 100644 index 000000000000..9333f0d2d005 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->deleteDataset($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 = TranslationServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + + delete_dataset_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_DeleteDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php new file mode 100644 index 000000000000..00eecc233830 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->deleteGlossary($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeleteGlossaryResponse $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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + + delete_glossary_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_DeleteGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php new file mode 100644 index 000000000000..cbda6919ebdc --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $translationServiceClient->deleteGlossaryEntry($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 = TranslationServiceClient::glossaryEntryName( + '[PROJECT]', + '[LOCATION]', + '[GLOSSARY]', + '[GLOSSARY_ENTRY]' + ); + + delete_glossary_entry_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php new file mode 100644 index 000000000000..fbc46fca7be1 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->deleteModel($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 = TranslationServiceClient::modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + + delete_model_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_DeleteModel_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php new file mode 100644 index 000000000000..20caef711ee4 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var DetectLanguageResponse $response */ + $response = $translationServiceClient->detectLanguage($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + detect_language_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_DetectLanguage_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php new file mode 100644 index 000000000000..523e203272f4 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php @@ -0,0 +1,83 @@ +setDataset($dataset) + ->setOutputConfig($outputConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->exportData($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 +{ + $dataset = '[DATASET]'; + + export_data_sample($dataset); +} +// [END translate_v3_generated_TranslationService_ExportData_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php new file mode 100644 index 000000000000..053180b3888b --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AdaptiveMtDataset $response */ + $response = $translationServiceClient->getAdaptiveMtDataset($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 = TranslationServiceClient::adaptiveMtDatasetName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]' + ); + + get_adaptive_mt_dataset_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php new file mode 100644 index 000000000000..1e9347c31212 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AdaptiveMtFile $response */ + $response = $translationServiceClient->getAdaptiveMtFile($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 = TranslationServiceClient::adaptiveMtFileName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]', + '[FILE]' + ); + + get_adaptive_mt_file_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php new file mode 100644 index 000000000000..cae6165e6dad --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Dataset $response */ + $response = $translationServiceClient->getDataset($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 = TranslationServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + + get_dataset_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_GetDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php new file mode 100644 index 000000000000..5f2c564c7f25 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Glossary $response */ + $response = $translationServiceClient->getGlossary($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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + + get_glossary_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_GetGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php new file mode 100644 index 000000000000..02897ea75a5f --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GlossaryEntry $response */ + $response = $translationServiceClient->getGlossaryEntry($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 = TranslationServiceClient::glossaryEntryName( + '[PROJECT]', + '[LOCATION]', + '[GLOSSARY]', + '[GLOSSARY_ENTRY]' + ); + + get_glossary_entry_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_GetGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php new file mode 100644 index 000000000000..3d282873ecef --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Model $response */ + $response = $translationServiceClient->getModel($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 = TranslationServiceClient::modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + + get_model_sample($formattedName); +} +// [END translate_v3_generated_TranslationService_GetModel_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php new file mode 100644 index 000000000000..d7e7c8b08c47 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var SupportedLanguages $response */ + $response = $translationServiceClient->getSupportedLanguages($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + get_supported_languages_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_GetSupportedLanguages_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php new file mode 100644 index 000000000000..2e0dfadb8f7c --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ImportAdaptiveMtFileResponse $response */ + $response = $translationServiceClient->importAdaptiveMtFile($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 = TranslationServiceClient::adaptiveMtDatasetName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]' + ); + + import_adaptive_mt_file_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php new file mode 100644 index 000000000000..f25383c46759 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php @@ -0,0 +1,83 @@ +setDataset($dataset) + ->setInputConfig($inputConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->importData($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 +{ + $dataset = '[DATASET]'; + + import_data_sample($dataset); +} +// [END translate_v3_generated_TranslationService_ImportData_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php new file mode 100644 index 000000000000..51627d5ae774 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listAdaptiveMtDatasets($request); + + /** @var AdaptiveMtDataset $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_adaptive_mt_datasets_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php new file mode 100644 index 000000000000..4653eb47c8dc --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listAdaptiveMtFiles($request); + + /** @var AdaptiveMtFile $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 = TranslationServiceClient::adaptiveMtDatasetName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]' + ); + + list_adaptive_mt_files_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php new file mode 100644 index 000000000000..d0ee81cae69b --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listAdaptiveMtSentences($request); + + /** @var AdaptiveMtSentence $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 = TranslationServiceClient::adaptiveMtFileName( + '[PROJECT]', + '[LOCATION]', + '[DATASET]', + '[FILE]' + ); + + list_adaptive_mt_sentences_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php new file mode 100644 index 000000000000..97ab036f8c18 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listDatasets($request); + + /** @var Dataset $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_datasets_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListDatasets_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php new file mode 100644 index 000000000000..a0f0a9942933 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listExamples($request); + + /** @var Example $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 = TranslationServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + + list_examples_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListExamples_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php new file mode 100644 index 000000000000..62ea546ca194 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listGlossaries($request); + + /** @var Glossary $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_glossaries_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListGlossaries_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php new file mode 100644 index 000000000000..e5e3af640d52 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listGlossaryEntries($request); + + /** @var GlossaryEntry $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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + + list_glossary_entries_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListGlossaryEntries_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php new file mode 100644 index 000000000000..79c3fffdaf6e --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $translationServiceClient->listModels($request); + + /** @var Model $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_models_sample($formattedParent); +} +// [END translate_v3_generated_TranslationService_ListModels_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php new file mode 100644 index 000000000000..3e917c5cc2c8 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setContents($contents); + + // Call the API and handle any network failures. + try { + /** @var RomanizeTextResponse $response */ + $response = $translationServiceClient->romanizeText($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $contentsElement = '[CONTENTS]'; + + romanize_text_sample($formattedParent, $contentsElement); +} +// [END translate_v3_generated_TranslationService_RomanizeText_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php new file mode 100644 index 000000000000..977188613c2f --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php @@ -0,0 +1,88 @@ +setParent($parent) + ->setTargetLanguageCode($targetLanguageCode) + ->setDocumentInputConfig($documentInputConfig); + + // Call the API and handle any network failures. + try { + /** @var TranslateDocumentResponse $response */ + $response = $translationServiceClient->translateDocument($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]'; + $targetLanguageCode = '[TARGET_LANGUAGE_CODE]'; + + translate_document_sample($parent, $targetLanguageCode); +} +// [END translate_v3_generated_TranslationService_TranslateDocument_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php new file mode 100644 index 000000000000..95af91345fbc --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php @@ -0,0 +1,97 @@ +setContents($contents) + ->setTargetLanguageCode($targetLanguageCode) + ->setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var TranslateTextResponse $response */ + $response = $translationServiceClient->translateText($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 +{ + $contentsElement = '[CONTENTS]'; + $targetLanguageCode = '[TARGET_LANGUAGE_CODE]'; + $formattedParent = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + translate_text_sample($contentsElement, $targetLanguageCode, $formattedParent); +} +// [END translate_v3_generated_TranslationService_TranslateText_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php new file mode 100644 index 000000000000..46c2c779b051 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php @@ -0,0 +1,86 @@ +setName($glossaryName); + $request = (new UpdateGlossaryRequest()) + ->setGlossary($glossary); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $translationServiceClient->updateGlossary($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Glossary $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 +{ + $glossaryName = '[NAME]'; + + update_glossary_sample($glossaryName); +} +// [END translate_v3_generated_TranslationService_UpdateGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php new file mode 100644 index 000000000000..5b79eabe9838 --- /dev/null +++ b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php @@ -0,0 +1,59 @@ +setGlossaryEntry($glossaryEntry); + + // Call the API and handle any network failures. + try { + /** @var GlossaryEntry $response */ + $response = $translationServiceClient->updateGlossaryEntry($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php b/owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php new file mode 100644 index 000000000000..ebd285fe56c9 --- /dev/null +++ b/owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php @@ -0,0 +1,1476 @@ + adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) + */ +final class TranslationServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.translation.v3.TranslationService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'translate.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'translate.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-translation', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/translation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/translation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/translation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/translation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * adaptive_mt_dataset resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * + * @return string The formatted adaptive_mt_dataset resource. + */ + public static function adaptiveMtDatasetName(string $project, string $location, string $dataset): string + { + return self::getPathTemplate('adaptiveMtDataset')->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * adaptive_mt_file resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * @param string $file + * + * @return string The formatted adaptive_mt_file resource. + */ + public static function adaptiveMtFileName(string $project, string $location, string $dataset, string $file): string + { + return self::getPathTemplate('adaptiveMtFile')->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + 'file' => $file, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a dataset + * resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * + * @return string The formatted dataset resource. + */ + public static function datasetName(string $project, string $location, string $dataset): string + { + return self::getPathTemplate('dataset')->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a glossary + * resource. + * + * @param string $project + * @param string $location + * @param string $glossary + * + * @return string The formatted glossary resource. + */ + public static function glossaryName(string $project, string $location, string $glossary): string + { + return self::getPathTemplate('glossary')->render([ + 'project' => $project, + 'location' => $location, + 'glossary' => $glossary, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * glossary_entry resource. + * + * @param string $project + * @param string $location + * @param string $glossary + * @param string $glossaryEntry + * + * @return string The formatted glossary_entry resource. + */ + public static function glossaryEntryName(string $project, string $location, string $glossary, string $glossaryEntry): string + { + return self::getPathTemplate('glossaryEntry')->render([ + 'project' => $project, + 'location' => $location, + 'glossary' => $glossary, + 'glossary_entry' => $glossaryEntry, + ]); + } + + /** + * 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 model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName(string $project, string $location, string $model): string + { + return self::getPathTemplate('model')->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adaptiveMtDataset: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset} + * - adaptiveMtFile: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file} + * - dataset: projects/{project}/locations/{location}/datasets/{dataset} + * - glossary: projects/{project}/locations/{location}/glossaries/{glossary} + * - glossaryEntry: projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry} + * - location: projects/{project}/locations/{location} + * - model: projects/{project}/locations/{location}/models/{model} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'translate.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Translate text using Adaptive MT. + * + * The async variant is {@see TranslationServiceClient::adaptiveMtTranslateAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/adaptive_mt_translate.php + * + * @param AdaptiveMtTranslateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AdaptiveMtTranslateResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function adaptiveMtTranslate(AdaptiveMtTranslateRequest $request, array $callOptions = []): AdaptiveMtTranslateResponse + { + return $this->startApiCall('AdaptiveMtTranslate', $request, $callOptions)->wait(); + } + + /** + * Translates a large volume of document in asynchronous batch mode. + * This function provides real-time output as the inputs are being processed. + * If caller cancels a request, the partial results (for an input file, it's + * all or nothing) may still be available on the specified output location. + * + * This call returns immediately and you can use + * google.longrunning.Operation.name to poll the status of the call. + * + * The async variant is + * {@see TranslationServiceClient::batchTranslateDocumentAsync()} . + * + * @example samples/V3/TranslationServiceClient/batch_translate_document.php + * + * @param BatchTranslateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 batchTranslateDocument(BatchTranslateDocumentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchTranslateDocument', $request, $callOptions)->wait(); + } + + /** + * Translates a large volume of text in asynchronous batch mode. + * This function provides real-time output as the inputs are being processed. + * If caller cancels a request, the partial results (for an input file, it's + * all or nothing) may still be available on the specified output location. + * + * This call returns immediately and you can + * use google.longrunning.Operation.name to poll the status of the call. + * + * The async variant is {@see TranslationServiceClient::batchTranslateTextAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/batch_translate_text.php + * + * @param BatchTranslateTextRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 batchTranslateText(BatchTranslateTextRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchTranslateText', $request, $callOptions)->wait(); + } + + /** + * Creates an Adaptive MT dataset. + * + * The async variant is + * {@see TranslationServiceClient::createAdaptiveMtDatasetAsync()} . + * + * @example samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php + * + * @param CreateAdaptiveMtDatasetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AdaptiveMtDataset + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest $request, array $callOptions = []): AdaptiveMtDataset + { + return $this->startApiCall('CreateAdaptiveMtDataset', $request, $callOptions)->wait(); + } + + /** + * Creates a Dataset. + * + * The async variant is {@see TranslationServiceClient::createDatasetAsync()} . + * + * @example samples/V3/TranslationServiceClient/create_dataset.php + * + * @param CreateDatasetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createDataset(CreateDatasetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDataset', $request, $callOptions)->wait(); + } + + /** + * Creates a glossary and returns the long-running operation. Returns + * NOT_FOUND, if the project doesn't exist. + * + * The async variant is {@see TranslationServiceClient::createGlossaryAsync()} . + * + * @example samples/V3/TranslationServiceClient/create_glossary.php + * + * @param CreateGlossaryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createGlossary(CreateGlossaryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGlossary', $request, $callOptions)->wait(); + } + + /** + * Creates a glossary entry. + * + * The async variant is {@see TranslationServiceClient::createGlossaryEntryAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/create_glossary_entry.php + * + * @param CreateGlossaryEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GlossaryEntry + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGlossaryEntry(CreateGlossaryEntryRequest $request, array $callOptions = []): GlossaryEntry + { + return $this->startApiCall('CreateGlossaryEntry', $request, $callOptions)->wait(); + } + + /** + * Creates a Model. + * + * The async variant is {@see TranslationServiceClient::createModelAsync()} . + * + * @example samples/V3/TranslationServiceClient/create_model.php + * + * @param CreateModelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createModel(CreateModelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateModel', $request, $callOptions)->wait(); + } + + /** + * Deletes an Adaptive MT dataset, including all its entries and associated + * metadata. + * + * The async variant is + * {@see TranslationServiceClient::deleteAdaptiveMtDatasetAsync()} . + * + * @example samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php + * + * @param DeleteAdaptiveMtDatasetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAdaptiveMtDataset', $request, $callOptions)->wait(); + } + + /** + * Deletes an AdaptiveMtFile along with its sentences. + * + * The async variant is + * {@see TranslationServiceClient::deleteAdaptiveMtFileAsync()} . + * + * @example samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php + * + * @param DeleteAdaptiveMtFileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAdaptiveMtFile', $request, $callOptions)->wait(); + } + + /** + * Deletes a dataset and all of its contents. + * + * The async variant is {@see TranslationServiceClient::deleteDatasetAsync()} . + * + * @example samples/V3/TranslationServiceClient/delete_dataset.php + * + * @param DeleteDatasetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteDataset(DeleteDatasetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDataset', $request, $callOptions)->wait(); + } + + /** + * Deletes a glossary, or cancels glossary construction + * if the glossary isn't created yet. + * Returns NOT_FOUND, if the glossary doesn't exist. + * + * The async variant is {@see TranslationServiceClient::deleteGlossaryAsync()} . + * + * @example samples/V3/TranslationServiceClient/delete_glossary.php + * + * @param DeleteGlossaryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteGlossary(DeleteGlossaryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGlossary', $request, $callOptions)->wait(); + } + + /** + * Deletes a single entry from the glossary + * + * The async variant is {@see TranslationServiceClient::deleteGlossaryEntryAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/delete_glossary_entry.php + * + * @param DeleteGlossaryEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteGlossaryEntry(DeleteGlossaryEntryRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteGlossaryEntry', $request, $callOptions)->wait(); + } + + /** + * Deletes a model. + * + * The async variant is {@see TranslationServiceClient::deleteModelAsync()} . + * + * @example samples/V3/TranslationServiceClient/delete_model.php + * + * @param DeleteModelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteModel(DeleteModelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteModel', $request, $callOptions)->wait(); + } + + /** + * Detects the language of text within a request. + * + * The async variant is {@see TranslationServiceClient::detectLanguageAsync()} . + * + * @example samples/V3/TranslationServiceClient/detect_language.php + * + * @param DetectLanguageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DetectLanguageResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function detectLanguage(DetectLanguageRequest $request, array $callOptions = []): DetectLanguageResponse + { + return $this->startApiCall('DetectLanguage', $request, $callOptions)->wait(); + } + + /** + * Exports dataset's data to the provided output location. + * + * The async variant is {@see TranslationServiceClient::exportDataAsync()} . + * + * @example samples/V3/TranslationServiceClient/export_data.php + * + * @param ExportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportData', $request, $callOptions)->wait(); + } + + /** + * Gets the Adaptive MT dataset. + * + * The async variant is + * {@see TranslationServiceClient::getAdaptiveMtDatasetAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php + * + * @param GetAdaptiveMtDatasetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AdaptiveMtDataset + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest $request, array $callOptions = []): AdaptiveMtDataset + { + return $this->startApiCall('GetAdaptiveMtDataset', $request, $callOptions)->wait(); + } + + /** + * Gets and AdaptiveMtFile + * + * The async variant is {@see TranslationServiceClient::getAdaptiveMtFileAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_adaptive_mt_file.php + * + * @param GetAdaptiveMtFileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AdaptiveMtFile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAdaptiveMtFile(GetAdaptiveMtFileRequest $request, array $callOptions = []): AdaptiveMtFile + { + return $this->startApiCall('GetAdaptiveMtFile', $request, $callOptions)->wait(); + } + + /** + * Gets a Dataset. + * + * The async variant is {@see TranslationServiceClient::getDatasetAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_dataset.php + * + * @param GetDatasetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Dataset + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataset(GetDatasetRequest $request, array $callOptions = []): Dataset + { + return $this->startApiCall('GetDataset', $request, $callOptions)->wait(); + } + + /** + * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + * exist. + * + * The async variant is {@see TranslationServiceClient::getGlossaryAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_glossary.php + * + * @param GetGlossaryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Glossary + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGlossary(GetGlossaryRequest $request, array $callOptions = []): Glossary + { + return $this->startApiCall('GetGlossary', $request, $callOptions)->wait(); + } + + /** + * Gets a single glossary entry by the given id. + * + * The async variant is {@see TranslationServiceClient::getGlossaryEntryAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_glossary_entry.php + * + * @param GetGlossaryEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GlossaryEntry + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGlossaryEntry(GetGlossaryEntryRequest $request, array $callOptions = []): GlossaryEntry + { + return $this->startApiCall('GetGlossaryEntry', $request, $callOptions)->wait(); + } + + /** + * Gets a model. + * + * The async variant is {@see TranslationServiceClient::getModelAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_model.php + * + * @param GetModelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Model + * + * @throws ApiException Thrown if the API call fails. + */ + public function getModel(GetModelRequest $request, array $callOptions = []): Model + { + return $this->startApiCall('GetModel', $request, $callOptions)->wait(); + } + + /** + * Returns a list of supported languages for translation. + * + * The async variant is + * {@see TranslationServiceClient::getSupportedLanguagesAsync()} . + * + * @example samples/V3/TranslationServiceClient/get_supported_languages.php + * + * @param GetSupportedLanguagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SupportedLanguages + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSupportedLanguages(GetSupportedLanguagesRequest $request, array $callOptions = []): SupportedLanguages + { + return $this->startApiCall('GetSupportedLanguages', $request, $callOptions)->wait(); + } + + /** + * Imports an AdaptiveMtFile and adds all of its sentences into the + * AdaptiveMtDataset. + * + * The async variant is + * {@see TranslationServiceClient::importAdaptiveMtFileAsync()} . + * + * @example samples/V3/TranslationServiceClient/import_adaptive_mt_file.php + * + * @param ImportAdaptiveMtFileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportAdaptiveMtFileResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importAdaptiveMtFile(ImportAdaptiveMtFileRequest $request, array $callOptions = []): ImportAdaptiveMtFileResponse + { + return $this->startApiCall('ImportAdaptiveMtFile', $request, $callOptions)->wait(); + } + + /** + * Import sentence pairs into translation Dataset. + * + * The async variant is {@see TranslationServiceClient::importDataAsync()} . + * + * @example samples/V3/TranslationServiceClient/import_data.php + * + * @param ImportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 importData(ImportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportData', $request, $callOptions)->wait(); + } + + /** + * Lists all Adaptive MT datasets for which the caller has read permission. + * + * The async variant is + * {@see TranslationServiceClient::listAdaptiveMtDatasetsAsync()} . + * + * @example samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php + * + * @param ListAdaptiveMtDatasetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAdaptiveMtDatasets', $request, $callOptions); + } + + /** + * Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. + * + * The async variant is {@see TranslationServiceClient::listAdaptiveMtFilesAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/list_adaptive_mt_files.php + * + * @param ListAdaptiveMtFilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAdaptiveMtFiles(ListAdaptiveMtFilesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAdaptiveMtFiles', $request, $callOptions); + } + + /** + * Lists all AdaptiveMtSentences under a given file/dataset. + * + * The async variant is + * {@see TranslationServiceClient::listAdaptiveMtSentencesAsync()} . + * + * @example samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php + * + * @param ListAdaptiveMtSentencesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAdaptiveMtSentences', $request, $callOptions); + } + + /** + * Lists datasets. + * + * The async variant is {@see TranslationServiceClient::listDatasetsAsync()} . + * + * @example samples/V3/TranslationServiceClient/list_datasets.php + * + * @param ListDatasetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDatasets(ListDatasetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDatasets', $request, $callOptions); + } + + /** + * Lists sentence pairs in the dataset. + * + * The async variant is {@see TranslationServiceClient::listExamplesAsync()} . + * + * @example samples/V3/TranslationServiceClient/list_examples.php + * + * @param ListExamplesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listExamples(ListExamplesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExamples', $request, $callOptions); + } + + /** + * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + * exist. + * + * The async variant is {@see TranslationServiceClient::listGlossariesAsync()} . + * + * @example samples/V3/TranslationServiceClient/list_glossaries.php + * + * @param ListGlossariesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listGlossaries(ListGlossariesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGlossaries', $request, $callOptions); + } + + /** + * List the entries for the glossary. + * + * The async variant is {@see TranslationServiceClient::listGlossaryEntriesAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/list_glossary_entries.php + * + * @param ListGlossaryEntriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listGlossaryEntries(ListGlossaryEntriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGlossaryEntries', $request, $callOptions); + } + + /** + * Lists models. + * + * The async variant is {@see TranslationServiceClient::listModelsAsync()} . + * + * @example samples/V3/TranslationServiceClient/list_models.php + * + * @param ListModelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listModels(ListModelsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListModels', $request, $callOptions); + } + + /** + * Romanize input text written in non-Latin scripts to Latin text. + * + * The async variant is {@see TranslationServiceClient::romanizeTextAsync()} . + * + * @example samples/V3/TranslationServiceClient/romanize_text.php + * + * @param RomanizeTextRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RomanizeTextResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function romanizeText(RomanizeTextRequest $request, array $callOptions = []): RomanizeTextResponse + { + return $this->startApiCall('RomanizeText', $request, $callOptions)->wait(); + } + + /** + * Translates documents in synchronous mode. + * + * The async variant is {@see TranslationServiceClient::translateDocumentAsync()} . + * + * @example samples/V3/TranslationServiceClient/translate_document.php + * + * @param TranslateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TranslateDocumentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function translateDocument(TranslateDocumentRequest $request, array $callOptions = []): TranslateDocumentResponse + { + return $this->startApiCall('TranslateDocument', $request, $callOptions)->wait(); + } + + /** + * Translates input text and returns translated text. + * + * The async variant is {@see TranslationServiceClient::translateTextAsync()} . + * + * @example samples/V3/TranslationServiceClient/translate_text.php + * + * @param TranslateTextRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TranslateTextResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function translateText(TranslateTextRequest $request, array $callOptions = []): TranslateTextResponse + { + return $this->startApiCall('TranslateText', $request, $callOptions)->wait(); + } + + /** + * Updates a glossary. A LRO is used since the update can be async if the + * glossary's entry file is updated. + * + * The async variant is {@see TranslationServiceClient::updateGlossaryAsync()} . + * + * @example samples/V3/TranslationServiceClient/update_glossary.php + * + * @param UpdateGlossaryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateGlossary(UpdateGlossaryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGlossary', $request, $callOptions)->wait(); + } + + /** + * Updates a glossary entry. + * + * The async variant is {@see TranslationServiceClient::updateGlossaryEntryAsync()} + * . + * + * @example samples/V3/TranslationServiceClient/update_glossary_entry.php + * + * @param UpdateGlossaryEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GlossaryEntry + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGlossaryEntry(UpdateGlossaryEntryRequest $request, array $callOptions = []): GlossaryEntry + { + return $this->startApiCall('UpdateGlossaryEntry', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php b/owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php new file mode 100644 index 000000000000..817db729f027 --- /dev/null +++ b/owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php @@ -0,0 +1,3147 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $formattedDataset = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $content = []; + * $response = $translationServiceClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Translate\V3\Client\TranslationServiceClient}. + */ +class TranslationServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.translation.v3.TranslationService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'translate.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'translate.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-translation', + ]; + + private static $adaptiveMtDatasetNameTemplate; + + private static $adaptiveMtFileNameTemplate; + + private static $datasetNameTemplate; + + private static $glossaryNameTemplate; + + private static $glossaryEntryNameTemplate; + + private static $locationNameTemplate; + + private static $modelNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/translation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/translation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/translation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/translation_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getAdaptiveMtDatasetNameTemplate() + { + if (self::$adaptiveMtDatasetNameTemplate == null) { + self::$adaptiveMtDatasetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}'); + } + + return self::$adaptiveMtDatasetNameTemplate; + } + + private static function getAdaptiveMtFileNameTemplate() + { + if (self::$adaptiveMtFileNameTemplate == null) { + self::$adaptiveMtFileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}'); + } + + return self::$adaptiveMtFileNameTemplate; + } + + private static function getDatasetNameTemplate() + { + if (self::$datasetNameTemplate == null) { + self::$datasetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/datasets/{dataset}'); + } + + return self::$datasetNameTemplate; + } + + private static function getGlossaryNameTemplate() + { + if (self::$glossaryNameTemplate == null) { + self::$glossaryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/glossaries/{glossary}'); + } + + return self::$glossaryNameTemplate; + } + + private static function getGlossaryEntryNameTemplate() + { + if (self::$glossaryEntryNameTemplate == null) { + self::$glossaryEntryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}'); + } + + return self::$glossaryEntryNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getModelNameTemplate() + { + if (self::$modelNameTemplate == null) { + self::$modelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/models/{model}'); + } + + return self::$modelNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'adaptiveMtDataset' => self::getAdaptiveMtDatasetNameTemplate(), + 'adaptiveMtFile' => self::getAdaptiveMtFileNameTemplate(), + 'dataset' => self::getDatasetNameTemplate(), + 'glossary' => self::getGlossaryNameTemplate(), + 'glossaryEntry' => self::getGlossaryEntryNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'model' => self::getModelNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * adaptive_mt_dataset resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * + * @return string The formatted adaptive_mt_dataset resource. + */ + public static function adaptiveMtDatasetName($project, $location, $dataset) + { + return self::getAdaptiveMtDatasetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * adaptive_mt_file resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * @param string $file + * + * @return string The formatted adaptive_mt_file resource. + */ + public static function adaptiveMtFileName($project, $location, $dataset, $file) + { + return self::getAdaptiveMtFileNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + 'file' => $file, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a dataset + * resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * + * @return string The formatted dataset resource. + */ + public static function datasetName($project, $location, $dataset) + { + return self::getDatasetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a glossary + * resource. + * + * @param string $project + * @param string $location + * @param string $glossary + * + * @return string The formatted glossary resource. + */ + public static function glossaryName($project, $location, $glossary) + { + return self::getGlossaryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'glossary' => $glossary, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * glossary_entry resource. + * + * @param string $project + * @param string $location + * @param string $glossary + * @param string $glossaryEntry + * + * @return string The formatted glossary_entry resource. + */ + public static function glossaryEntryName($project, $location, $glossary, $glossaryEntry) + { + return self::getGlossaryEntryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'glossary' => $glossary, + 'glossary_entry' => $glossaryEntry, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName($project, $location, $model) + { + return self::getModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - adaptiveMtDataset: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset} + * - adaptiveMtFile: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file} + * - dataset: projects/{project}/locations/{location}/datasets/{dataset} + * - glossary: projects/{project}/locations/{location}/glossaries/{glossary} + * - glossaryEntry: projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry} + * - location: projects/{project}/locations/{location} + * - model: projects/{project}/locations/{location}/models/{model} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'translate.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Translate text using Adaptive MT. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $formattedDataset = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $content = []; + * $response = $translationServiceClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Location to make a regional call. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * @param string $dataset Required. The resource name for the dataset to use for adaptive MT. + * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` + * @param string[] $content Required. The content of the input in string format. + * @param array $optionalArgs { + * Optional. + * + * @type ReferenceSentenceConfig $referenceSentenceConfig + * Configuration for caller provided reference sentences. + * @type GlossaryConfig $glossaryConfig + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateResponse + * + * @throws ApiException if the remote call fails + */ + public function adaptiveMtTranslate($parent, $dataset, $content, array $optionalArgs = []) + { + $request = new AdaptiveMtTranslateRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataset($dataset); + $request->setContent($content); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['referenceSentenceConfig'])) { + $request->setReferenceSentenceConfig($optionalArgs['referenceSentenceConfig']); + } + + if (isset($optionalArgs['glossaryConfig'])) { + $request->setGlossaryConfig($optionalArgs['glossaryConfig']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AdaptiveMtTranslate', AdaptiveMtTranslateResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Translates a large volume of document in asynchronous batch mode. + * This function provides real-time output as the inputs are being processed. + * If caller cancels a request, the partial results (for an input file, it's + * all or nothing) may still be available on the specified output location. + * + * This call returns immediately and you can use + * google.longrunning.Operation.name to poll the status of the call. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $sourceLanguageCode = 'source_language_code'; + * $targetLanguageCodes = []; + * $inputConfigs = []; + * $outputConfig = new BatchDocumentOutputConfig(); + * $operationResponse = $translationServiceClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'batchTranslateDocument'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Location to make a regional call. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * + * The `global` location is not supported for batch translation. + * + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * @param string $sourceLanguageCode Required. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * [Language Support](https://cloud.google.com/translate/docs/languages). + * @param string[] $targetLanguageCodes Required. The ISO-639 language code to use for translation of the input + * document. Specify up to 10 language codes here. + * @param BatchDocumentInputConfig[] $inputConfigs Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size to translate should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * @param BatchDocumentOutputConfig $outputConfig Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * @param array $optionalArgs { + * Optional. + * + * @type array $models + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * + * The value format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * @type array $glossaries + * Optional. Glossaries to be applied. It's keyed by target language code. + * @type array $formatConversions + * Optional. The file format conversion map that is applied to all input + * files. The map key is the original mime_type. The map value is the target + * mime_type of translated documents. + * + * Supported file format conversion includes: + * - `application/pdf` to + * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + * + * If nothing specified, output files will be in the same format as the + * original file. + * @type string $customizedAttribution + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * @type bool $enableShadowRemovalNativePdf + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * @type bool $enableRotationCorrection + * Optional. If true, enable auto rotation correction in DVS. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function batchTranslateDocument($parent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig, array $optionalArgs = []) + { + $request = new BatchTranslateDocumentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSourceLanguageCode($sourceLanguageCode); + $request->setTargetLanguageCodes($targetLanguageCodes); + $request->setInputConfigs($inputConfigs); + $request->setOutputConfig($outputConfig); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['models'])) { + $request->setModels($optionalArgs['models']); + } + + if (isset($optionalArgs['glossaries'])) { + $request->setGlossaries($optionalArgs['glossaries']); + } + + if (isset($optionalArgs['formatConversions'])) { + $request->setFormatConversions($optionalArgs['formatConversions']); + } + + if (isset($optionalArgs['customizedAttribution'])) { + $request->setCustomizedAttribution($optionalArgs['customizedAttribution']); + } + + if (isset($optionalArgs['enableShadowRemovalNativePdf'])) { + $request->setEnableShadowRemovalNativePdf($optionalArgs['enableShadowRemovalNativePdf']); + } + + if (isset($optionalArgs['enableRotationCorrection'])) { + $request->setEnableRotationCorrection($optionalArgs['enableRotationCorrection']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchTranslateDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Translates a large volume of text in asynchronous batch mode. + * This function provides real-time output as the inputs are being processed. + * If caller cancels a request, the partial results (for an input file, it's + * all or nothing) may still be available on the specified output location. + * + * This call returns immediately and you can + * use google.longrunning.Operation.name to poll the status of the call. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $sourceLanguageCode = 'source_language_code'; + * $targetLanguageCodes = []; + * $inputConfigs = []; + * $outputConfig = new OutputConfig(); + * $operationResponse = $translationServiceClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'batchTranslateText'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Location to make a call. Must refer to a caller's project. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * + * The `global` location is not supported for batch translation. + * + * Only AutoML Translation models or glossaries within the same region (have + * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) + * error is returned. + * @param string $sourceLanguageCode Required. Source language code. + * @param string[] $targetLanguageCodes Required. Specify up to 10 language codes here. + * @param InputConfig[] $inputConfigs Required. Input configurations. + * The total number of files matched should be <= 100. + * The total content size should be <= 100M Unicode codepoints. + * The files must use UTF-8 encoding. + * @param OutputConfig $outputConfig Required. Output configuration. + * If 2 input configs match to the same file (that is, same input path), + * we don't generate output for duplicate inputs. + * @param array $optionalArgs { + * Optional. + * + * @type array $models + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is model name. Value can be a built-in general model, + * or an AutoML Translation model. + * + * The value format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * + * If the map is empty or a specific model is + * not requested for a language pair, then default google model (nmt) is used. + * @type array $glossaries + * Optional. Glossaries to be applied for translation. + * It's keyed by target language code. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function batchTranslateText($parent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig, array $optionalArgs = []) + { + $request = new BatchTranslateTextRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSourceLanguageCode($sourceLanguageCode); + $request->setTargetLanguageCodes($targetLanguageCodes); + $request->setInputConfigs($inputConfigs); + $request->setOutputConfig($outputConfig); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['models'])) { + $request->setModels($optionalArgs['models']); + } + + if (isset($optionalArgs['glossaries'])) { + $request->setGlossaries($optionalArgs['glossaries']); + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('BatchTranslateText', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates an Adaptive MT dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $adaptiveMtDataset = new AdaptiveMtDataset(); + * $response = $translationServiceClient->createAdaptiveMtDataset($formattedParent, $adaptiveMtDataset); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * @param AdaptiveMtDataset $adaptiveMtDataset Required. The AdaptiveMtDataset to be created. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset + * + * @throws ApiException if the remote call fails + */ + public function createAdaptiveMtDataset($parent, $adaptiveMtDataset, array $optionalArgs = []) + { + $request = new CreateAdaptiveMtDatasetRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAdaptiveMtDataset($adaptiveMtDataset); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateAdaptiveMtDataset', AdaptiveMtDataset::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a Dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $dataset = new Dataset(); + * $operationResponse = $translationServiceClient->createDataset($formattedParent, $dataset); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->createDataset($formattedParent, $dataset); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'createDataset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project name. + * @param Dataset $dataset Required. The Dataset to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createDataset($parent, $dataset, array $optionalArgs = []) + { + $request = new CreateDatasetRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setDataset($dataset); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a glossary and returns the long-running operation. Returns + * NOT_FOUND, if the project doesn't exist. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $glossary = new Glossary(); + * $operationResponse = $translationServiceClient->createGlossary($formattedParent, $glossary); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->createGlossary($formattedParent, $glossary); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'createGlossary'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project name. + * @param Glossary $glossary Required. The glossary to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createGlossary($parent, $glossary, array $optionalArgs = []) + { + $request = new CreateGlossaryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGlossary($glossary); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateGlossary', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Creates a glossary entry. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + * $glossaryEntry = new GlossaryEntry(); + * $response = $translationServiceClient->createGlossaryEntry($formattedParent, $glossaryEntry); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the glossary to create the entry under. + * @param GlossaryEntry $glossaryEntry Required. The glossary entry to create + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\GlossaryEntry + * + * @throws ApiException if the remote call fails + */ + public function createGlossaryEntry($parent, $glossaryEntry, array $optionalArgs = []) + { + $request = new CreateGlossaryEntryRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setGlossaryEntry($glossaryEntry); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateGlossaryEntry', GlossaryEntry::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a Model. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $model = new Model(); + * $operationResponse = $translationServiceClient->createModel($formattedParent, $model); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->createModel($formattedParent, $model); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'createModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The project name, in form of + * `projects/{project}/locations/{location}` + * @param Model $model Required. The Model to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createModel($parent, $model, array $optionalArgs = []) + { + $request = new CreateModelRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setModel($model); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes an Adaptive MT dataset, including all its entries and associated + * metadata. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $translationServiceClient->deleteAdaptiveMtDataset($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteAdaptiveMtDataset($name, array $optionalArgs = []) + { + $request = new DeleteAdaptiveMtDatasetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteAdaptiveMtDataset', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an AdaptiveMtFile along with its sentences. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + * $translationServiceClient->deleteAdaptiveMtFile($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the file to delete, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteAdaptiveMtFile($name, array $optionalArgs = []) + { + $request = new DeleteAdaptiveMtFileRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteAdaptiveMtFile', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a dataset and all of its contents. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $operationResponse = $translationServiceClient->deleteDataset($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->deleteDataset($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'deleteDataset'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the dataset to delete. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteDataset($name, array $optionalArgs = []) + { + $request = new DeleteDatasetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a glossary, or cancels glossary construction + * if the glossary isn't created yet. + * Returns NOT_FOUND, if the glossary doesn't exist. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + * $operationResponse = $translationServiceClient->deleteGlossary($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->deleteGlossary($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'deleteGlossary'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the glossary to delete. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteGlossary($name, array $optionalArgs = []) + { + $request = new DeleteGlossaryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteGlossary', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Deletes a single entry from the glossary + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + * $translationServiceClient->deleteGlossaryEntry($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the glossary entry to delete + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteGlossaryEntry($name, array $optionalArgs = []) + { + $request = new DeleteGlossaryEntryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteGlossaryEntry', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a model. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + * $operationResponse = $translationServiceClient->deleteModel($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->deleteModel($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'deleteModel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the model to delete. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteModel($name, array $optionalArgs = []) + { + $request = new DeleteModelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('DeleteModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Detects the language of text within a request. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $translationServiceClient->detectLanguage($formattedParent); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Only models within the same region (has same location-id) can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. + * @param array $optionalArgs { + * Optional. + * + * @type string $model + * Optional. The language detection model to be used. + * + * Format: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` + * + * Only one language detection model is currently supported: + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. + * + * If not specified, the default model is used. + * @type string $content + * The content of the input stored as a string. + * @type string $mimeType + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\DetectLanguageResponse + * + * @throws ApiException if the remote call fails + */ + public function detectLanguage($parent, array $optionalArgs = []) + { + $request = new DetectLanguageRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['model'])) { + $request->setModel($optionalArgs['model']); + } + + if (isset($optionalArgs['content'])) { + $request->setContent($optionalArgs['content']); + } + + if (isset($optionalArgs['mimeType'])) { + $request->setMimeType($optionalArgs['mimeType']); + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DetectLanguage', DetectLanguageResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Exports dataset's data to the provided output location. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $dataset = 'dataset'; + * $outputConfig = new DatasetOutputConfig(); + * $operationResponse = $translationServiceClient->exportData($dataset, $outputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->exportData($dataset, $outputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'exportData'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $dataset Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @param DatasetOutputConfig $outputConfig Required. The config for the output content. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function exportData($dataset, $outputConfig, array $optionalArgs = []) + { + $request = new ExportDataRequest(); + $requestParamHeaders = []; + $request->setDataset($dataset); + $request->setOutputConfig($outputConfig); + $requestParamHeaders['dataset'] = $dataset; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ExportData', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Gets the Adaptive MT dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $response = $translationServiceClient->getAdaptiveMtDataset($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Name of the dataset. In the form of + * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset + * + * @throws ApiException if the remote call fails + */ + public function getAdaptiveMtDataset($name, array $optionalArgs = []) + { + $request = new GetAdaptiveMtDatasetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAdaptiveMtDataset', AdaptiveMtDataset::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets and AdaptiveMtFile + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + * $response = $translationServiceClient->getAdaptiveMtFile($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\AdaptiveMtFile + * + * @throws ApiException if the remote call fails + */ + public function getAdaptiveMtFile($name, array $optionalArgs = []) + { + $request = new GetAdaptiveMtFileRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAdaptiveMtFile', AdaptiveMtFile::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a Dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $response = $translationServiceClient->getDataset($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the dataset to retrieve. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\Dataset + * + * @throws ApiException if the remote call fails + */ + public function getDataset($name, array $optionalArgs = []) + { + $request = new GetDatasetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDataset', Dataset::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + * exist. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + * $response = $translationServiceClient->getGlossary($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the glossary to retrieve. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\Glossary + * + * @throws ApiException if the remote call fails + */ + public function getGlossary($name, array $optionalArgs = []) + { + $request = new GetGlossaryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGlossary', Glossary::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single glossary entry by the given id. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + * $response = $translationServiceClient->getGlossaryEntry($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the glossary entry to get + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\GlossaryEntry + * + * @throws ApiException if the remote call fails + */ + public function getGlossaryEntry($name, array $optionalArgs = []) + { + $request = new GetGlossaryEntryRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGlossaryEntry', GlossaryEntry::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a model. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedName = $translationServiceClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + * $response = $translationServiceClient->getModel($formattedName); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the model to retrieve. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\Model + * + * @throws ApiException if the remote call fails + */ + public function getModel($name, array $optionalArgs = []) + { + $request = new GetModelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetModel', Model::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns a list of supported languages for translation. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $translationServiceClient->getSupportedLanguages($formattedParent); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Non-global location is required for AutoML models. + * + * Only models within the same region (have same location-id) can be used, + * otherwise an INVALID_ARGUMENT (400) error is returned. + * @param array $optionalArgs { + * Optional. + * + * @type string $displayLanguageCode + * Optional. The language to use to return localized, human readable names + * of supported languages. If missing, then display names are not returned + * in a response. + * @type string $model + * Optional. Get supported languages of this model. + * + * The format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * + * Returns languages supported by the specified model. + * If missing, we get supported languages of Google general NMT model. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\SupportedLanguages + * + * @throws ApiException if the remote call fails + */ + public function getSupportedLanguages($parent, array $optionalArgs = []) + { + $request = new GetSupportedLanguagesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['displayLanguageCode'])) { + $request->setDisplayLanguageCode($optionalArgs['displayLanguageCode']); + } + + if (isset($optionalArgs['model'])) { + $request->setModel($optionalArgs['model']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSupportedLanguages', SupportedLanguages::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports an AdaptiveMtFile and adds all of its sentences into the + * AdaptiveMtDataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * $response = $translationServiceClient->importAdaptiveMtFile($formattedParent); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the file, in form of + * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` + * @param array $optionalArgs { + * Optional. + * + * @type FileInputSource $fileInputSource + * Inline file source. + * @type GcsInputSource $gcsInputSource + * Google Cloud Storage file source. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\ImportAdaptiveMtFileResponse + * + * @throws ApiException if the remote call fails + */ + public function importAdaptiveMtFile($parent, array $optionalArgs = []) + { + $request = new ImportAdaptiveMtFileRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['fileInputSource'])) { + $request->setFileInputSource($optionalArgs['fileInputSource']); + } + + if (isset($optionalArgs['gcsInputSource'])) { + $request->setGcsInputSource($optionalArgs['gcsInputSource']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ImportAdaptiveMtFile', ImportAdaptiveMtFileResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Import sentence pairs into translation Dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $dataset = 'dataset'; + * $inputConfig = new DatasetInputConfig(); + * $operationResponse = $translationServiceClient->importData($dataset, $inputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->importData($dataset, $inputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'importData'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $dataset Required. Name of the dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @param DatasetInputConfig $inputConfig Required. The config for the input content. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importData($dataset, $inputConfig, array $optionalArgs = []) + { + $request = new ImportDataRequest(); + $requestParamHeaders = []; + $request->setDataset($dataset); + $request->setInputConfig($inputConfig); + $requestParamHeaders['dataset'] = $dataset; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportData', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists all Adaptive MT datasets for which the caller has read permission. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listAdaptiveMtDatasets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listAdaptiveMtDatasets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the project from which to list the Adaptive + * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. An expression for filtering the results of the request. + * Filter is not supported yet. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAdaptiveMtDatasets($parent, array $optionalArgs = []) + { + $request = new ListAdaptiveMtDatasetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAdaptiveMtDatasets', $optionalArgs, ListAdaptiveMtDatasetsResponse::class, $request); + } + + /** + * Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listAdaptiveMtFiles($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listAdaptiveMtFiles($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the project from which to list the Adaptive + * MT files. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAdaptiveMtFiles($parent, array $optionalArgs = []) + { + $request = new ListAdaptiveMtFilesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAdaptiveMtFiles', $optionalArgs, ListAdaptiveMtFilesResponse::class, $request); + } + + /** + * Lists all AdaptiveMtSentences under a given file/dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listAdaptiveMtSentences($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listAdaptiveMtSentences($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the project from which to list the Adaptive + * MT files. The following format lists all sentences under a file. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` + * The following format lists all sentences within a dataset. + * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAdaptiveMtSentences($parent, array $optionalArgs = []) + { + $request = new ListAdaptiveMtSentencesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAdaptiveMtSentences', $optionalArgs, ListAdaptiveMtSentencesResponse::class, $request); + } + + /** + * Lists datasets. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listDatasets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listDatasets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listDatasets($parent, array $optionalArgs = []) + { + $request = new ListDatasetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListDatasets', $optionalArgs, ListDatasetsResponse::class, $request); + } + + /** + * Lists sentence pairs in the dataset. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listExamples($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listExamples($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the parent dataset. In form of + * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. An expression for filtering the examples that will be returned. + * Example filter: + * * `usage=TRAIN` + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listExamples($parent, array $optionalArgs = []) + { + $request = new ListExamplesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListExamples', $optionalArgs, ListExamplesResponse::class, $request); + } + + /** + * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + * exist. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listGlossaries($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listGlossaries($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The name of the project from which to list all of the glossaries. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * Optional. Filter specifying constraints of a list operation. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. + * If missing, no filtering is performed. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listGlossaries($parent, array $optionalArgs = []) + { + $request = new ListGlossariesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGlossaries', $optionalArgs, ListGlossariesResponse::class, $request); + } + + /** + * List the entries for the glossary. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listGlossaryEntries($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listGlossaryEntries($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The parent glossary resource name for listing the glossary's + * entries. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listGlossaryEntries($parent, array $optionalArgs = []) + { + $request = new ListGlossaryEntriesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGlossaryEntries', $optionalArgs, ListGlossaryEntriesResponse::class, $request); + } + + /** + * Lists models. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $translationServiceClient->listModels($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $translationServiceClient->listModels($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Name of the parent project. In form of + * `projects/{project-number-or-id}/locations/{location-id}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. An expression for filtering the models that will be returned. + * Supported filter: + * `dataset_id=${dataset_id}` + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listModels($parent, array $optionalArgs = []) + { + $request = new ListModelsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListModels', $optionalArgs, ListModelsResponse::class, $request); + } + + /** + * Romanize input text written in non-Latin scripts to Latin text. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $contents = []; + * $response = $translationServiceClient->romanizeText($formattedParent, $contents); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * @param string[] $contents Required. The content of the input in string format. + * @param array $optionalArgs { + * Optional. + * + * @type string $sourceLanguageCode + * Optional. The ISO-639 language code of the input text if + * known, for example, "hi" or "zh". If the source language isn't specified, + * the API attempts to identify the source language automatically and returns + * the source language for each content in the response. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\RomanizeTextResponse + * + * @throws ApiException if the remote call fails + */ + public function romanizeText($parent, $contents, array $optionalArgs = []) + { + $request = new RomanizeTextRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setContents($contents); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['sourceLanguageCode'])) { + $request->setSourceLanguageCode($optionalArgs['sourceLanguageCode']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RomanizeText', RomanizeTextResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Translates documents in synchronous mode. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $parent = 'parent'; + * $targetLanguageCode = 'target_language_code'; + * $documentInputConfig = new DocumentInputConfig(); + * $response = $translationServiceClient->translateDocument($parent, $targetLanguageCode, $documentInputConfig); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Location to make a regional call. + * + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + * @param DocumentInputConfig $documentInputConfig Required. Input configurations. + * @param array $optionalArgs { + * Optional. + * + * @type string $sourceLanguageCode + * Optional. The ISO-639 language code of the input document if known, for + * example, "en-US" or "sr-Latn". Supported language codes are listed in + * Language Support. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + * @type DocumentOutputConfig $documentOutputConfig + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + * @type string $model + * Optional. The `model` type requested for this translation. + * + * The format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * + * If not provided, the default Google model (NMT) will be used for + * translation. + * @type TranslateTextGlossaryConfig $glossaryConfig + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * @type string $customizedAttribution + * Optional. This flag is to support user customized attribution. + * If not provided, the default is `Machine Translated by Google`. + * Customized attribution should follow rules in + * https://cloud.google.com/translate/attribution#attribution_and_logos + * @type bool $isTranslateNativePdfOnly + * Optional. is_translate_native_pdf_only field for external customers. + * If true, the page limit of online native pdf translation is 300 and only + * native pdf pages will be translated. + * @type bool $enableShadowRemovalNativePdf + * Optional. If true, use the text removal server to remove the shadow text on + * background image for native pdf translation. + * Shadow removal feature can only be enabled when + * is_translate_native_pdf_only: false && pdf_native_only: false + * @type bool $enableRotationCorrection + * Optional. If true, enable auto rotation correction in DVS. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\TranslateDocumentResponse + * + * @throws ApiException if the remote call fails + */ + public function translateDocument($parent, $targetLanguageCode, $documentInputConfig, array $optionalArgs = []) + { + $request = new TranslateDocumentRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTargetLanguageCode($targetLanguageCode); + $request->setDocumentInputConfig($documentInputConfig); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['sourceLanguageCode'])) { + $request->setSourceLanguageCode($optionalArgs['sourceLanguageCode']); + } + + if (isset($optionalArgs['documentOutputConfig'])) { + $request->setDocumentOutputConfig($optionalArgs['documentOutputConfig']); + } + + if (isset($optionalArgs['model'])) { + $request->setModel($optionalArgs['model']); + } + + if (isset($optionalArgs['glossaryConfig'])) { + $request->setGlossaryConfig($optionalArgs['glossaryConfig']); + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + if (isset($optionalArgs['customizedAttribution'])) { + $request->setCustomizedAttribution($optionalArgs['customizedAttribution']); + } + + if (isset($optionalArgs['isTranslateNativePdfOnly'])) { + $request->setIsTranslateNativePdfOnly($optionalArgs['isTranslateNativePdfOnly']); + } + + if (isset($optionalArgs['enableShadowRemovalNativePdf'])) { + $request->setEnableShadowRemovalNativePdf($optionalArgs['enableShadowRemovalNativePdf']); + } + + if (isset($optionalArgs['enableRotationCorrection'])) { + $request->setEnableRotationCorrection($optionalArgs['enableRotationCorrection']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TranslateDocument', TranslateDocumentResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Translates input text and returns translated text. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $contents = []; + * $targetLanguageCode = 'target_language_code'; + * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $response = $translationServiceClient->translateText($contents, $targetLanguageCode, $formattedParent); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param string[] $contents Required. The content of the input in string format. + * We recommend the total content be less than 30,000 codepoints. The max + * length of this field is 1024. Use BatchTranslateText for larger text. + * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input + * text, set to one of the language codes listed in Language Support. + * @param string $parent Required. Project or location to make a call. Must refer to a caller's + * project. + * + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * + * Non-global location is required for requests using AutoML models or + * custom glossaries. + * + * Models and glossaries must be within the same region (have same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + * @param array $optionalArgs { + * Optional. + * + * @type string $mimeType + * Optional. The format of the source text, for example, "text/html", + * "text/plain". If left blank, the MIME type defaults to "text/html". + * @type string $sourceLanguageCode + * Optional. The ISO-639 language code of the input text if + * known, for example, "en-US" or "sr-Latn". Supported language codes are + * listed in Language Support. If the source language isn't specified, the API + * attempts to identify the source language automatically and returns the + * source language within the response. + * @type string $model + * Optional. The `model` type requested for this translation. + * + * The format depends on model type: + * + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * + * - Translation LLM models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, + * + * For global (non-regionalized) requests, use `location-id` `global`. + * For example, + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. + * + * If not provided, the default Google model (NMT) will be used + * @type TranslateTextGlossaryConfig $glossaryConfig + * Optional. Glossary to be applied. The glossary must be + * within the same region (have the same location-id) as the model, otherwise + * an INVALID_ARGUMENT (400) error is returned. + * @type TransliterationConfig $transliterationConfig + * Optional. Transliteration to be applied. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\TranslateTextResponse + * + * @throws ApiException if the remote call fails + */ + public function translateText($contents, $targetLanguageCode, $parent, array $optionalArgs = []) + { + $request = new TranslateTextRequest(); + $requestParamHeaders = []; + $request->setContents($contents); + $request->setTargetLanguageCode($targetLanguageCode); + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['mimeType'])) { + $request->setMimeType($optionalArgs['mimeType']); + } + + if (isset($optionalArgs['sourceLanguageCode'])) { + $request->setSourceLanguageCode($optionalArgs['sourceLanguageCode']); + } + + if (isset($optionalArgs['model'])) { + $request->setModel($optionalArgs['model']); + } + + if (isset($optionalArgs['glossaryConfig'])) { + $request->setGlossaryConfig($optionalArgs['glossaryConfig']); + } + + if (isset($optionalArgs['transliterationConfig'])) { + $request->setTransliterationConfig($optionalArgs['transliterationConfig']); + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TranslateText', TranslateTextResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a glossary. A LRO is used since the update can be async if the + * glossary's entry file is updated. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $glossary = new Glossary(); + * $operationResponse = $translationServiceClient->updateGlossary($glossary); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $translationServiceClient->updateGlossary($glossary); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'updateGlossary'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param Glossary $glossary Required. The glossary entry to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The list of fields to be updated. Currently only `display_name` and + * 'input_config' + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateGlossary($glossary, array $optionalArgs = []) + { + $request = new UpdateGlossaryRequest(); + $requestParamHeaders = []; + $request->setGlossary($glossary); + $requestParamHeaders['glossary.name'] = $glossary->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateGlossary', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Updates a glossary entry. + * + * Sample code: + * ``` + * $translationServiceClient = new TranslationServiceClient(); + * try { + * $glossaryEntry = new GlossaryEntry(); + * $response = $translationServiceClient->updateGlossaryEntry($glossaryEntry); + * } finally { + * $translationServiceClient->close(); + * } + * ``` + * + * @param GlossaryEntry $glossaryEntry Required. The glossary entry to update. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Translate\V3\GlossaryEntry + * + * @throws ApiException if the remote call fails + */ + public function updateGlossaryEntry($glossaryEntry, array $optionalArgs = []) + { + $request = new UpdateGlossaryEntryRequest(); + $requestParamHeaders = []; + $request->setGlossaryEntry($glossaryEntry); + $requestParamHeaders['glossary_entry.name'] = $glossaryEntry->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateGlossaryEntry', GlossaryEntry::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php b/owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php new file mode 100644 index 000000000000..b1cacbc0fe42 --- /dev/null +++ b/owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.translation.v3.TranslationService' => [ + 'BatchTranslateDocument' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateDocumentResponse', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateDocumentMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchTranslateText' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateResponse', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\Dataset', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\CreateDatasetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGlossary' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\Glossary', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\CreateGlossaryMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\Model', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\CreateModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\DeleteDatasetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGlossary' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\DeleteGlossaryResponse', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\DeleteGlossaryMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteModel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\DeleteModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\ExportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'dataset', + 'fieldAccessors' => [ + 'getDataset', + ], + ], + ], + ], + 'ImportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\ImportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'dataset', + 'fieldAccessors' => [ + 'getDataset', + ], + ], + ], + ], + 'UpdateGlossary' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Translate\V3\Glossary', + 'metadataReturnType' => '\Google\Cloud\Translate\V3\UpdateGlossaryMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'glossary.name', + 'fieldAccessors' => [ + 'getGlossary', + 'getName', + ], + ], + ], + ], + 'AdaptiveMtTranslate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtTranslateResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAdaptiveMtDataset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtDataset', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGlossaryEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\GlossaryEntry', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAdaptiveMtDataset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAdaptiveMtFile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGlossaryEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DetectLanguage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\DetectLanguageResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetAdaptiveMtDataset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtDataset', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAdaptiveMtFile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtFile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\Dataset', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGlossary' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\Glossary', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGlossaryEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\GlossaryEntry', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetModel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\Model', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportedLanguages' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\SupportedLanguages', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ImportAdaptiveMtFile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ImportAdaptiveMtFileResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdaptiveMtDatasets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAdaptiveMtDatasets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListAdaptiveMtDatasetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdaptiveMtFiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAdaptiveMtFiles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListAdaptiveMtFilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdaptiveMtSentences' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAdaptiveMtSentences', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListAdaptiveMtSentencesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatasets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDatasets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListDatasetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListExamples' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExamples', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListExamplesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGlossaries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGlossaries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListGlossariesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGlossaryEntries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGlossaryEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListGlossaryEntriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListModels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getModels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\ListModelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RomanizeText' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\RomanizeTextResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'TranslateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\TranslateDocumentResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'TranslateText' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\TranslateTextResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateGlossaryEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Translate\V3\GlossaryEntry', + 'headerParams' => [ + [ + 'keyName' => 'glossary_entry.name', + 'fieldAccessors' => [ + 'getGlossaryEntry', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'adaptiveMtDataset' => 'projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}', + 'adaptiveMtFile' => 'projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}', + 'dataset' => 'projects/{project}/locations/{location}/datasets/{dataset}', + 'glossary' => 'projects/{project}/locations/{location}/glossaries/{glossary}', + 'glossaryEntry' => 'projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}', + 'location' => 'projects/{project}/locations/{location}', + 'model' => 'projects/{project}/locations/{location}/models/{model}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php b/owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php new file mode 100644 index 000000000000..b2b9af836e85 --- /dev/null +++ b/owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php @@ -0,0 +1,582 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.translation.v3.TranslationService' => [ + 'AdaptiveMtTranslate' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchTranslateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:batchTranslateDocument', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchTranslateText' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:batchTranslateText', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAdaptiveMtDataset' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets', + 'body' => 'adaptive_mt_dataset', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataset' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/datasets', + 'body' => 'dataset', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGlossary' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/glossaries', + 'body' => 'glossary', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGlossaryEntry' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries', + 'body' => 'glossary_entry', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateModel' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/models', + 'body' => 'model', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAdaptiveMtDataset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAdaptiveMtFile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/datasets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGlossary' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGlossaryEntry' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteModel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/models/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DetectLanguage' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:detectLanguage', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*}:detectLanguage', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ExportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{dataset=projects/*/locations/*/datasets/*}:exportData', + 'body' => '*', + 'placeholders' => [ + 'dataset' => [ + 'getters' => [ + 'getDataset', + ], + ], + ], + ], + 'GetAdaptiveMtDataset' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAdaptiveMtFile' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataset' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/datasets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGlossary' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGlossaryEntry' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetModel' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/models/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportedLanguages' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/supportedLanguages', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*}/supportedLanguages', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ImportAdaptiveMtFile' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ImportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{dataset=projects/*/locations/*/datasets/*}:importData', + 'body' => '*', + 'placeholders' => [ + 'dataset' => [ + 'getters' => [ + 'getDataset', + ], + ], + ], + ], + 'ListAdaptiveMtDatasets' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdaptiveMtFiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtFiles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAdaptiveMtSentences' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}/adaptiveMtSentences', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtSentences', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatasets' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/datasets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListExamples' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/datasets/*}/examples', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGlossaries' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/glossaries', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGlossaryEntries' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListModels' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/models', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RomanizeText' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:romanizeText', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*}:romanizeText', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'TranslateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:translateDocument', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'TranslateText' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:translateText', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*}:translateText', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateGlossary' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{glossary.name=projects/*/locations/*/glossaries/*}', + 'body' => 'glossary', + 'placeholders' => [ + 'glossary.name' => [ + 'getters' => [ + 'getGlossary', + 'getName', + ], + ], + ], + ], + 'UpdateGlossaryEntry' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{glossary_entry.name=projects/*/locations/*/glossaries/*/glossaryEntries/*}', + 'body' => 'glossary_entry', + 'placeholders' => [ + 'glossary_entry.name' => [ + 'getters' => [ + 'getGlossaryEntry', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:wait', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php b/owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php new file mode 100644 index 000000000000..269995c17d9a --- /dev/null +++ b/owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php @@ -0,0 +1,3545 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TranslationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TranslationServiceClient($options); + } + + /** @test */ + public function adaptiveMtTranslateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $languageCode = 'languageCode-412800396'; + $expectedResponse = new AdaptiveMtTranslateResponse(); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $content = []; + $request = (new AdaptiveMtTranslateRequest()) + ->setParent($formattedParent) + ->setDataset($formattedDataset) + ->setContent($content); + $response = $gapicClient->adaptiveMtTranslate($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.translation.v3.TranslationService/AdaptiveMtTranslate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataset(); + $this->assertProtobufEquals($formattedDataset, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function adaptiveMtTranslateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $content = []; + $request = (new AdaptiveMtTranslateRequest()) + ->setParent($formattedParent) + ->setDataset($formattedDataset) + ->setContent($content); + try { + $gapicClient->adaptiveMtTranslate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchTranslateDocumentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $totalPages = 396186871; + $translatedPages = 1652747493; + $failedPages = 2002254526; + $totalBillablePages = 1292117569; + $totalCharacters = 1368640955; + $translatedCharacters = 1337326221; + $failedCharacters = 1723028396; + $totalBillableCharacters = 1242495501; + $expectedResponse = new BatchTranslateDocumentResponse(); + $expectedResponse->setTotalPages($totalPages); + $expectedResponse->setTranslatedPages($translatedPages); + $expectedResponse->setFailedPages($failedPages); + $expectedResponse->setTotalBillablePages($totalBillablePages); + $expectedResponse->setTotalCharacters($totalCharacters); + $expectedResponse->setTranslatedCharacters($translatedCharacters); + $expectedResponse->setFailedCharacters($failedCharacters); + $expectedResponse->setTotalBillableCharacters($totalBillableCharacters); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchTranslateDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new BatchDocumentOutputConfig(); + $request = (new BatchTranslateDocumentRequest()) + ->setParent($formattedParent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + $response = $gapicClient->batchTranslateDocument($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.translation.v3.TranslationService/BatchTranslateDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceLanguageCode(); + $this->assertProtobufEquals($sourceLanguageCode, $actualValue); + $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); + $this->assertProtobufEquals($targetLanguageCodes, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfigs(); + $this->assertProtobufEquals($inputConfigs, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); + $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 batchTranslateDocumentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateDocumentTest'); + $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]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new BatchDocumentOutputConfig(); + $request = (new BatchTranslateDocumentRequest()) + ->setParent($formattedParent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + $response = $gapicClient->batchTranslateDocument($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); + 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 batchTranslateTextTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateTextTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $totalCharacters = 1368640955; + $translatedCharacters = 1337326221; + $failedCharacters = 1723028396; + $expectedResponse = new BatchTranslateResponse(); + $expectedResponse->setTotalCharacters($totalCharacters); + $expectedResponse->setTranslatedCharacters($translatedCharacters); + $expectedResponse->setFailedCharacters($failedCharacters); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchTranslateTextTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new OutputConfig(); + $request = (new BatchTranslateTextRequest()) + ->setParent($formattedParent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + $response = $gapicClient->batchTranslateText($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.translation.v3.TranslationService/BatchTranslateText', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceLanguageCode(); + $this->assertProtobufEquals($sourceLanguageCode, $actualValue); + $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); + $this->assertProtobufEquals($targetLanguageCodes, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfigs(); + $this->assertProtobufEquals($inputConfigs, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); + $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 batchTranslateTextExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateTextTest'); + $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]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new OutputConfig(); + $request = (new BatchTranslateTextRequest()) + ->setParent($formattedParent) + ->setSourceLanguageCode($sourceLanguageCode) + ->setTargetLanguageCodes($targetLanguageCodes) + ->setInputConfigs($inputConfigs) + ->setOutputConfig($outputConfig); + $response = $gapicClient->batchTranslateText($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); + 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 createAdaptiveMtDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $expectedResponse = new AdaptiveMtDataset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $adaptiveMtDataset = new AdaptiveMtDataset(); + $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $adaptiveMtDataset->setName($adaptiveMtDatasetName); + $request = (new CreateAdaptiveMtDatasetRequest()) + ->setParent($formattedParent) + ->setAdaptiveMtDataset($adaptiveMtDataset); + $response = $gapicClient->createAdaptiveMtDataset($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.translation.v3.TranslationService/CreateAdaptiveMtDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAdaptiveMtDataset(); + $this->assertProtobufEquals($adaptiveMtDataset, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAdaptiveMtDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $adaptiveMtDataset = new AdaptiveMtDataset(); + $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $adaptiveMtDataset->setName($adaptiveMtDatasetName); + $request = (new CreateAdaptiveMtDatasetRequest()) + ->setParent($formattedParent) + ->setAdaptiveMtDataset($adaptiveMtDataset); + try { + $gapicClient->createAdaptiveMtDataset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDatasetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatasetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Dataset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatasetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataset = new Dataset(); + $request = (new CreateDatasetRequest()) + ->setParent($formattedParent) + ->setDataset($dataset); + $response = $gapicClient->createDataset($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.translation.v3.TranslationService/CreateDataset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataset(); + $this->assertProtobufEquals($dataset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatasetTest'); + $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 createDatasetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatasetTest'); + $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]'); + $dataset = new Dataset(); + $request = (new CreateDatasetRequest()) + ->setParent($formattedParent) + ->setDataset($dataset); + $response = $gapicClient->createDataset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatasetTest'); + 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 createGlossaryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGlossaryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $entryCount = 811131134; + $displayName = 'displayName1615086568'; + $expectedResponse = new Glossary(); + $expectedResponse->setName($name); + $expectedResponse->setEntryCount($entryCount); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGlossaryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $request = (new CreateGlossaryRequest()) + ->setParent($formattedParent) + ->setGlossary($glossary); + $response = $gapicClient->createGlossary($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.translation.v3.TranslationService/CreateGlossary', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGlossary(); + $this->assertProtobufEquals($glossary, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); + $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 createGlossaryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGlossaryTest'); + $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]'); + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $request = (new CreateGlossaryRequest()) + ->setParent($formattedParent) + ->setGlossary($glossary); + $response = $gapicClient->createGlossary($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); + 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 createGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new GlossaryEntry(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $glossaryEntry = new GlossaryEntry(); + $request = (new CreateGlossaryEntryRequest()) + ->setParent($formattedParent) + ->setGlossaryEntry($glossaryEntry); + $response = $gapicClient->createGlossaryEntry($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.translation.v3.TranslationService/CreateGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGlossaryEntry(); + $this->assertProtobufEquals($glossaryEntry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $glossaryEntry = new GlossaryEntry(); + $request = (new CreateGlossaryEntryRequest()) + ->setParent($formattedParent) + ->setGlossaryEntry($glossaryEntry); + try { + $gapicClient->createGlossaryEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createModelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $dataset = 'dataset1443214456'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Model(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataset($dataset); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $model = new Model(); + $request = (new CreateModelRequest()) + ->setParent($formattedParent) + ->setModel($model); + $response = $gapicClient->createModel($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.translation.v3.TranslationService/CreateModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getModel(); + $this->assertProtobufEquals($model, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createModelTest'); + $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 createModelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createModelTest'); + $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]'); + $model = new Model(); + $request = (new CreateModelRequest()) + ->setParent($formattedParent) + ->setModel($model); + $response = $gapicClient->createModel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createModelTest'); + 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 deleteAdaptiveMtDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new DeleteAdaptiveMtDatasetRequest()) + ->setName($formattedName); + $gapicClient->deleteAdaptiveMtDataset($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAdaptiveMtDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new DeleteAdaptiveMtDatasetRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAdaptiveMtDataset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAdaptiveMtFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $request = (new DeleteAdaptiveMtFileRequest()) + ->setName($formattedName); + $gapicClient->deleteAdaptiveMtFile($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtFile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAdaptiveMtFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $request = (new DeleteAdaptiveMtFileRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAdaptiveMtFile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDatasetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatasetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatasetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new DeleteDatasetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataset($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.translation.v3.TranslationService/DeleteDataset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); + $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 deleteDatasetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatasetTest'); + $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new DeleteDatasetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDataset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); + 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 deleteGlossaryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGlossaryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new DeleteGlossaryResponse(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGlossaryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $request = (new DeleteGlossaryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGlossary($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.translation.v3.TranslationService/DeleteGlossary', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); + $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 deleteGlossaryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGlossaryTest'); + $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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $request = (new DeleteGlossaryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGlossary($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); + 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 deleteGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + $request = (new DeleteGlossaryEntryRequest()) + ->setName($formattedName); + $gapicClient->deleteGlossaryEntry($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + $request = (new DeleteGlossaryEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteGlossaryEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteModelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $request = (new DeleteModelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteModel($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.translation.v3.TranslationService/DeleteModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteModelTest'); + $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 deleteModelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteModelTest'); + $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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $request = (new DeleteModelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteModel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteModelTest'); + 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 detectLanguageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DetectLanguageResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new DetectLanguageRequest()) + ->setParent($formattedParent); + $response = $gapicClient->detectLanguage($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.translation.v3.TranslationService/DetectLanguage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function detectLanguageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 DetectLanguageRequest()) + ->setParent($formattedParent); + try { + $gapicClient->detectLanguage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dataset = 'dataset1443214456'; + $outputConfig = new DatasetOutputConfig(); + $request = (new ExportDataRequest()) + ->setDataset($dataset) + ->setOutputConfig($outputConfig); + $response = $gapicClient->exportData($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.translation.v3.TranslationService/ExportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDataset(); + $this->assertProtobufEquals($dataset, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + $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 exportDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $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 + $dataset = 'dataset1443214456'; + $outputConfig = new DatasetOutputConfig(); + $request = (new ExportDataRequest()) + ->setDataset($dataset) + ->setOutputConfig($outputConfig); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + 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 getAdaptiveMtDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $expectedResponse = new AdaptiveMtDataset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new GetAdaptiveMtDatasetRequest()) + ->setName($formattedName); + $response = $gapicClient->getAdaptiveMtDataset($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.translation.v3.TranslationService/GetAdaptiveMtDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdaptiveMtDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new GetAdaptiveMtDatasetRequest()) + ->setName($formattedName); + try { + $gapicClient->getAdaptiveMtDataset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdaptiveMtFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $entryCount = 811131134; + $expectedResponse = new AdaptiveMtFile(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEntryCount($entryCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $request = (new GetAdaptiveMtFileRequest()) + ->setName($formattedName); + $response = $gapicClient->getAdaptiveMtFile($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.translation.v3.TranslationService/GetAdaptiveMtFile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdaptiveMtFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $request = (new GetAdaptiveMtFileRequest()) + ->setName($formattedName); + try { + $gapicClient->getAdaptiveMtFile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Dataset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new GetDatasetRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataset($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.translation.v3.TranslationService/GetDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new GetDatasetRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $entryCount = 811131134; + $displayName = 'displayName1615086568'; + $expectedResponse = new Glossary(); + $expectedResponse->setName($name2); + $expectedResponse->setEntryCount($entryCount); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $request = (new GetGlossaryRequest()) + ->setName($formattedName); + $response = $gapicClient->getGlossary($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.translation.v3.TranslationService/GetGlossary', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $request = (new GetGlossaryRequest()) + ->setName($formattedName); + try { + $gapicClient->getGlossary($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new GlossaryEntry(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + $request = (new GetGlossaryEntryRequest()) + ->setName($formattedName); + $response = $gapicClient->getGlossaryEntry($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.translation.v3.TranslationService/GetGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + $request = (new GetGlossaryEntryRequest()) + ->setName($formattedName); + try { + $gapicClient->getGlossaryEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $dataset = 'dataset1443214456'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Model(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataset($dataset); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $request = (new GetModelRequest()) + ->setName($formattedName); + $response = $gapicClient->getModel($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.translation.v3.TranslationService/GetModel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getModelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $request = (new GetModelRequest()) + ->setName($formattedName); + try { + $gapicClient->getModel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportedLanguagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SupportedLanguages(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new GetSupportedLanguagesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->getSupportedLanguages($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.translation.v3.TranslationService/GetSupportedLanguages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportedLanguagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 GetSupportedLanguagesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->getSupportedLanguages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAdaptiveMtFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ImportAdaptiveMtFileResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new ImportAdaptiveMtFileRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importAdaptiveMtFile($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.translation.v3.TranslationService/ImportAdaptiveMtFile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAdaptiveMtFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new ImportAdaptiveMtFileRequest()) + ->setParent($formattedParent); + try { + $gapicClient->importAdaptiveMtFile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dataset = 'dataset1443214456'; + $inputConfig = new DatasetInputConfig(); + $request = (new ImportDataRequest()) + ->setDataset($dataset) + ->setInputConfig($inputConfig); + $response = $gapicClient->importData($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.translation.v3.TranslationService/ImportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDataset(); + $this->assertProtobufEquals($dataset, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + $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 importDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $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 + $dataset = 'dataset1443214456'; + $inputConfig = new DatasetInputConfig(); + $request = (new ImportDataRequest()) + ->setDataset($dataset) + ->setInputConfig($inputConfig); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + 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 listAdaptiveMtDatasetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adaptiveMtDatasetsElement = new AdaptiveMtDataset(); + $adaptiveMtDatasets = [ + $adaptiveMtDatasetsElement, + ]; + $expectedResponse = new ListAdaptiveMtDatasetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdaptiveMtDatasets($adaptiveMtDatasets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAdaptiveMtDatasetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAdaptiveMtDatasets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdaptiveMtDatasets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtDatasets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtDatasetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListAdaptiveMtDatasetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAdaptiveMtDatasets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adaptiveMtFilesElement = new AdaptiveMtFile(); + $adaptiveMtFiles = [ + $adaptiveMtFilesElement, + ]; + $expectedResponse = new ListAdaptiveMtFilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdaptiveMtFiles($adaptiveMtFiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new ListAdaptiveMtFilesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAdaptiveMtFiles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdaptiveMtFiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new ListAdaptiveMtFilesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAdaptiveMtFiles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtSentencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adaptiveMtSentencesElement = new AdaptiveMtSentence(); + $adaptiveMtSentences = [ + $adaptiveMtSentencesElement, + ]; + $expectedResponse = new ListAdaptiveMtSentencesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdaptiveMtSentences($adaptiveMtSentences); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $request = (new ListAdaptiveMtSentencesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAdaptiveMtSentences($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdaptiveMtSentences()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtSentences', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtSentencesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $request = (new ListAdaptiveMtSentencesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAdaptiveMtSentences($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatasetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $datasetsElement = new Dataset(); + $datasets = [ + $datasetsElement, + ]; + $expectedResponse = new ListDatasetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDatasets($datasets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDatasetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDatasets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDatasets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListDatasets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatasetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListDatasetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDatasets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExamplesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $examplesElement = new Example(); + $examples = [ + $examplesElement, + ]; + $expectedResponse = new ListExamplesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExamples($examples); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new ListExamplesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExamples($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExamples()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListExamples', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExamplesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $request = (new ListExamplesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExamples($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossariesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $glossariesElement = new Glossary(); + $glossaries = [ + $glossariesElement, + ]; + $expectedResponse = new ListGlossariesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGlossaries($glossaries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGlossariesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGlossaries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGlossaries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossariesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListGlossariesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGlossaries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossaryEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $glossaryEntriesElement = new GlossaryEntry(); + $glossaryEntries = [ + $glossaryEntriesElement, + ]; + $expectedResponse = new ListGlossaryEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGlossaryEntries($glossaryEntries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $request = (new ListGlossaryEntriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGlossaryEntries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGlossaryEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaryEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossaryEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $request = (new ListGlossaryEntriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGlossaryEntries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listModelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $modelsElement = new Model(); + $models = [ + $modelsElement, + ]; + $expectedResponse = new ListModelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setModels($models); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListModelsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listModels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getModels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListModels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listModelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListModelsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listModels($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function romanizeTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RomanizeTextResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $contents = []; + $request = (new RomanizeTextRequest()) + ->setParent($formattedParent) + ->setContents($contents); + $response = $gapicClient->romanizeText($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.translation.v3.TranslationService/RomanizeText', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContents(); + $this->assertProtobufEquals($contents, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function romanizeTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $contents = []; + $request = (new RomanizeTextRequest()) + ->setParent($formattedParent) + ->setContents($contents); + try { + $gapicClient->romanizeText($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $model2 = 'model21226956956'; + $expectedResponse = new TranslateDocumentResponse(); + $expectedResponse->setModel($model2); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $documentInputConfig = new DocumentInputConfig(); + $request = (new TranslateDocumentRequest()) + ->setParent($parent) + ->setTargetLanguageCode($targetLanguageCode) + ->setDocumentInputConfig($documentInputConfig); + $response = $gapicClient->translateDocument($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.translation.v3.TranslationService/TranslateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getTargetLanguageCode(); + $this->assertProtobufEquals($targetLanguageCode, $actualValue); + $actualValue = $actualRequestObject->getDocumentInputConfig(); + $this->assertProtobufEquals($documentInputConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $documentInputConfig = new DocumentInputConfig(); + $request = (new TranslateDocumentRequest()) + ->setParent($parent) + ->setTargetLanguageCode($targetLanguageCode) + ->setDocumentInputConfig($documentInputConfig); + try { + $gapicClient->translateDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TranslateTextResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $contents = []; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new TranslateTextRequest()) + ->setContents($contents) + ->setTargetLanguageCode($targetLanguageCode) + ->setParent($formattedParent); + $response = $gapicClient->translateText($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.translation.v3.TranslationService/TranslateText', $actualFuncCall); + $actualValue = $actualRequestObject->getContents(); + $this->assertProtobufEquals($contents, $actualValue); + $actualValue = $actualRequestObject->getTargetLanguageCode(); + $this->assertProtobufEquals($targetLanguageCode, $actualValue); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $contents = []; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new TranslateTextRequest()) + ->setContents($contents) + ->setTargetLanguageCode($targetLanguageCode) + ->setParent($formattedParent); + try { + $gapicClient->translateText($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGlossaryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGlossaryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $entryCount = 811131134; + $displayName = 'displayName1615086568'; + $expectedResponse = new Glossary(); + $expectedResponse->setName($name); + $expectedResponse->setEntryCount($entryCount); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGlossaryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $request = (new UpdateGlossaryRequest()) + ->setGlossary($glossary); + $response = $gapicClient->updateGlossary($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.translation.v3.TranslationService/UpdateGlossary', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGlossary(); + $this->assertProtobufEquals($glossary, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); + $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 updateGlossaryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGlossaryTest'); + $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 + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $request = (new UpdateGlossaryRequest()) + ->setGlossary($glossary); + $response = $gapicClient->updateGlossary($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); + 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 updateGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new GlossaryEntry(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $glossaryEntry = new GlossaryEntry(); + $request = (new UpdateGlossaryEntryRequest()) + ->setGlossaryEntry($glossaryEntry); + $response = $gapicClient->updateGlossaryEntry($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.translation.v3.TranslationService/UpdateGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getGlossaryEntry(); + $this->assertProtobufEquals($glossaryEntry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $glossaryEntry = new GlossaryEntry(); + $request = (new UpdateGlossaryEntryRequest()) + ->setGlossaryEntry($glossaryEntry); + try { + $gapicClient->updateGlossaryEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function adaptiveMtTranslateAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $languageCode = 'languageCode-412800396'; + $expectedResponse = new AdaptiveMtTranslateResponse(); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $content = []; + $request = (new AdaptiveMtTranslateRequest()) + ->setParent($formattedParent) + ->setDataset($formattedDataset) + ->setContent($content); + $response = $gapicClient->adaptiveMtTranslateAsync($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.translation.v3.TranslationService/AdaptiveMtTranslate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataset(); + $this->assertProtobufEquals($formattedDataset, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php b/owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php new file mode 100644 index 000000000000..5c87249486a6 --- /dev/null +++ b/owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php @@ -0,0 +1,3274 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TranslationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TranslationServiceClient($options); + } + + /** @test */ + public function adaptiveMtTranslateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $languageCode = 'languageCode-412800396'; + $expectedResponse = new AdaptiveMtTranslateResponse(); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $content = []; + $response = $gapicClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/AdaptiveMtTranslate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataset(); + $this->assertProtobufEquals($formattedDataset, $actualValue); + $actualValue = $actualRequestObject->getContent(); + $this->assertProtobufEquals($content, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function adaptiveMtTranslateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $content = []; + try { + $gapicClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchTranslateDocumentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateDocumentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $totalPages = 396186871; + $translatedPages = 1652747493; + $failedPages = 2002254526; + $totalBillablePages = 1292117569; + $totalCharacters = 1368640955; + $translatedCharacters = 1337326221; + $failedCharacters = 1723028396; + $totalBillableCharacters = 1242495501; + $expectedResponse = new BatchTranslateDocumentResponse(); + $expectedResponse->setTotalPages($totalPages); + $expectedResponse->setTranslatedPages($translatedPages); + $expectedResponse->setFailedPages($failedPages); + $expectedResponse->setTotalBillablePages($totalBillablePages); + $expectedResponse->setTotalCharacters($totalCharacters); + $expectedResponse->setTranslatedCharacters($translatedCharacters); + $expectedResponse->setFailedCharacters($failedCharacters); + $expectedResponse->setTotalBillableCharacters($totalBillableCharacters); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchTranslateDocumentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new BatchDocumentOutputConfig(); + $response = $gapicClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + $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.translation.v3.TranslationService/BatchTranslateDocument', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceLanguageCode(); + $this->assertProtobufEquals($sourceLanguageCode, $actualValue); + $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); + $this->assertProtobufEquals($targetLanguageCodes, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfigs(); + $this->assertProtobufEquals($inputConfigs, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); + $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 batchTranslateDocumentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateDocumentTest'); + $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]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new BatchDocumentOutputConfig(); + $response = $gapicClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); + 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 batchTranslateTextTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateTextTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $totalCharacters = 1368640955; + $translatedCharacters = 1337326221; + $failedCharacters = 1723028396; + $expectedResponse = new BatchTranslateResponse(); + $expectedResponse->setTotalCharacters($totalCharacters); + $expectedResponse->setTranslatedCharacters($translatedCharacters); + $expectedResponse->setFailedCharacters($failedCharacters); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchTranslateTextTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new OutputConfig(); + $response = $gapicClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + $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.translation.v3.TranslationService/BatchTranslateText', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceLanguageCode(); + $this->assertProtobufEquals($sourceLanguageCode, $actualValue); + $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); + $this->assertProtobufEquals($targetLanguageCodes, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfigs(); + $this->assertProtobufEquals($inputConfigs, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); + $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 batchTranslateTextExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchTranslateTextTest'); + $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]'); + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCodes = []; + $inputConfigs = []; + $outputConfig = new OutputConfig(); + $response = $gapicClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); + 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 createAdaptiveMtDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $expectedResponse = new AdaptiveMtDataset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $adaptiveMtDataset = new AdaptiveMtDataset(); + $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $adaptiveMtDataset->setName($adaptiveMtDatasetName); + $response = $gapicClient->createAdaptiveMtDataset($formattedParent, $adaptiveMtDataset); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/CreateAdaptiveMtDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAdaptiveMtDataset(); + $this->assertProtobufEquals($adaptiveMtDataset, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAdaptiveMtDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $adaptiveMtDataset = new AdaptiveMtDataset(); + $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $adaptiveMtDataset->setName($adaptiveMtDatasetName); + try { + $gapicClient->createAdaptiveMtDataset($formattedParent, $adaptiveMtDataset); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDatasetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatasetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Dataset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatasetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $dataset = new Dataset(); + $response = $gapicClient->createDataset($formattedParent, $dataset); + $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.translation.v3.TranslationService/CreateDataset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDataset(); + $this->assertProtobufEquals($dataset, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatasetTest'); + $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 createDatasetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatasetTest'); + $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]'); + $dataset = new Dataset(); + $response = $gapicClient->createDataset($formattedParent, $dataset); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatasetTest'); + 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 createGlossaryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGlossaryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $entryCount = 811131134; + $displayName = 'displayName1615086568'; + $expectedResponse = new Glossary(); + $expectedResponse->setName($name); + $expectedResponse->setEntryCount($entryCount); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGlossaryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $response = $gapicClient->createGlossary($formattedParent, $glossary); + $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.translation.v3.TranslationService/CreateGlossary', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGlossary(); + $this->assertProtobufEquals($glossary, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); + $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 createGlossaryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGlossaryTest'); + $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]'); + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $response = $gapicClient->createGlossary($formattedParent, $glossary); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); + 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 createGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new GlossaryEntry(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $glossaryEntry = new GlossaryEntry(); + $response = $gapicClient->createGlossaryEntry($formattedParent, $glossaryEntry); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/CreateGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getGlossaryEntry(); + $this->assertProtobufEquals($glossaryEntry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $glossaryEntry = new GlossaryEntry(); + try { + $gapicClient->createGlossaryEntry($formattedParent, $glossaryEntry); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createModelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $dataset = 'dataset1443214456'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Model(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataset($dataset); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $model = new Model(); + $response = $gapicClient->createModel($formattedParent, $model); + $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.translation.v3.TranslationService/CreateModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getModel(); + $this->assertProtobufEquals($model, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createModelTest'); + $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 createModelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createModelTest'); + $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]'); + $model = new Model(); + $response = $gapicClient->createModel($formattedParent, $model); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createModelTest'); + 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 deleteAdaptiveMtDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $gapicClient->deleteAdaptiveMtDataset($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAdaptiveMtDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + try { + $gapicClient->deleteAdaptiveMtDataset($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAdaptiveMtFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $gapicClient->deleteAdaptiveMtFile($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtFile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAdaptiveMtFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + try { + $gapicClient->deleteAdaptiveMtFile($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDatasetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatasetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatasetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->deleteDataset($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteDataset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); + $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 deleteDatasetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatasetTest'); + $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->deleteDataset($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); + 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 deleteGlossaryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGlossaryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new DeleteGlossaryResponse(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGlossaryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $response = $gapicClient->deleteGlossary($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteGlossary', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); + $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 deleteGlossaryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGlossaryTest'); + $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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $response = $gapicClient->deleteGlossary($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); + 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 deleteGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + $gapicClient->deleteGlossaryEntry($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + try { + $gapicClient->deleteGlossaryEntry($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteModelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteModelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteModelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $response = $gapicClient->deleteModel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteModel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteModelTest'); + $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 deleteModelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteModelTest'); + $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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $response = $gapicClient->deleteModel($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteModelTest'); + 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 detectLanguageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DetectLanguageResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->detectLanguage($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/DetectLanguage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function detectLanguageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->detectLanguage($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dataset = 'dataset1443214456'; + $outputConfig = new DatasetOutputConfig(); + $response = $gapicClient->exportData($dataset, $outputConfig); + $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.translation.v3.TranslationService/ExportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDataset(); + $this->assertProtobufEquals($dataset, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + $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 exportDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $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 + $dataset = 'dataset1443214456'; + $outputConfig = new DatasetOutputConfig(); + $response = $gapicClient->exportData($dataset, $outputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + 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 getAdaptiveMtDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $expectedResponse = new AdaptiveMtDataset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->getAdaptiveMtDataset($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetAdaptiveMtDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdaptiveMtDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + try { + $gapicClient->getAdaptiveMtDataset($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdaptiveMtFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $entryCount = 811131134; + $expectedResponse = new AdaptiveMtFile(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEntryCount($entryCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $response = $gapicClient->getAdaptiveMtFile($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetAdaptiveMtFile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAdaptiveMtFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + try { + $gapicClient->getAdaptiveMtFile($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatasetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $exampleCount = 1517063674; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Dataset(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setExampleCount($exampleCount); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->getDataset($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetDataset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatasetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + try { + $gapicClient->getDataset($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $entryCount = 811131134; + $displayName = 'displayName1615086568'; + $expectedResponse = new Glossary(); + $expectedResponse->setName($name2); + $expectedResponse->setEntryCount($entryCount); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $response = $gapicClient->getGlossary($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetGlossary', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + try { + $gapicClient->getGlossary($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new GlossaryEntry(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + $response = $gapicClient->getGlossaryEntry($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); + try { + $gapicClient->getGlossaryEntry($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getModelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $dataset = 'dataset1443214456'; + $sourceLanguageCode = 'sourceLanguageCode1687263568'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $trainExampleCount = 1755438077; + $validateExampleCount = 159308433; + $testExampleCount = 483147021; + $expectedResponse = new Model(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDataset($dataset); + $expectedResponse->setSourceLanguageCode($sourceLanguageCode); + $expectedResponse->setTargetLanguageCode($targetLanguageCode); + $expectedResponse->setTrainExampleCount($trainExampleCount); + $expectedResponse->setValidateExampleCount($validateExampleCount); + $expectedResponse->setTestExampleCount($testExampleCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + $response = $gapicClient->getModel($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetModel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getModelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); + try { + $gapicClient->getModel($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportedLanguagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SupportedLanguages(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->getSupportedLanguages($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/GetSupportedLanguages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportedLanguagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->getSupportedLanguages($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAdaptiveMtFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ImportAdaptiveMtFileResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->importAdaptiveMtFile($formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ImportAdaptiveMtFile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importAdaptiveMtFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + try { + $gapicClient->importAdaptiveMtFile($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dataset = 'dataset1443214456'; + $inputConfig = new DatasetInputConfig(); + $response = $gapicClient->importData($dataset, $inputConfig); + $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.translation.v3.TranslationService/ImportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDataset(); + $this->assertProtobufEquals($dataset, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + $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 importDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $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 + $dataset = 'dataset1443214456'; + $inputConfig = new DatasetInputConfig(); + $response = $gapicClient->importData($dataset, $inputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + 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 listAdaptiveMtDatasetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adaptiveMtDatasetsElement = new AdaptiveMtDataset(); + $adaptiveMtDatasets = [ + $adaptiveMtDatasetsElement, + ]; + $expectedResponse = new ListAdaptiveMtDatasetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdaptiveMtDatasets($adaptiveMtDatasets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listAdaptiveMtDatasets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdaptiveMtDatasets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtDatasets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtDatasetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listAdaptiveMtDatasets($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adaptiveMtFilesElement = new AdaptiveMtFile(); + $adaptiveMtFiles = [ + $adaptiveMtFilesElement, + ]; + $expectedResponse = new ListAdaptiveMtFilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdaptiveMtFiles($adaptiveMtFiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->listAdaptiveMtFiles($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdaptiveMtFiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + try { + $gapicClient->listAdaptiveMtFiles($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtSentencesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $adaptiveMtSentencesElement = new AdaptiveMtSentence(); + $adaptiveMtSentences = [ + $adaptiveMtSentencesElement, + ]; + $expectedResponse = new ListAdaptiveMtSentencesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAdaptiveMtSentences($adaptiveMtSentences); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + $response = $gapicClient->listAdaptiveMtSentences($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAdaptiveMtSentences()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtSentences', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAdaptiveMtSentencesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); + try { + $gapicClient->listAdaptiveMtSentences($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatasetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $datasetsElement = new Dataset(); + $datasets = [ + $datasetsElement, + ]; + $expectedResponse = new ListDatasetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDatasets($datasets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listDatasets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDatasets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListDatasets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatasetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listDatasets($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExamplesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $examplesElement = new Example(); + $examples = [ + $examplesElement, + ]; + $expectedResponse = new ListExamplesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExamples($examples); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + $response = $gapicClient->listExamples($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExamples()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListExamples', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExamplesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); + try { + $gapicClient->listExamples($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossariesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $glossariesElement = new Glossary(); + $glossaries = [ + $glossariesElement, + ]; + $expectedResponse = new ListGlossariesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGlossaries($glossaries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listGlossaries($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGlossaries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossariesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listGlossaries($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossaryEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $glossaryEntriesElement = new GlossaryEntry(); + $glossaryEntries = [ + $glossaryEntriesElement, + ]; + $expectedResponse = new ListGlossaryEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGlossaryEntries($glossaryEntries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + $response = $gapicClient->listGlossaryEntries($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGlossaryEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaryEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGlossaryEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); + try { + $gapicClient->listGlossaryEntries($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listModelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $modelsElement = new Model(); + $models = [ + $modelsElement, + ]; + $expectedResponse = new ListModelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setModels($models); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listModels($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getModels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/ListModels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listModelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listModels($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function romanizeTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RomanizeTextResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $contents = []; + $response = $gapicClient->romanizeText($formattedParent, $contents); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/RomanizeText', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getContents(); + $this->assertProtobufEquals($contents, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function romanizeTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $contents = []; + try { + $gapicClient->romanizeText($formattedParent, $contents); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $model2 = 'model21226956956'; + $expectedResponse = new TranslateDocumentResponse(); + $expectedResponse->setModel($model2); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $documentInputConfig = new DocumentInputConfig(); + $response = $gapicClient->translateDocument($parent, $targetLanguageCode, $documentInputConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/TranslateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getTargetLanguageCode(); + $this->assertProtobufEquals($targetLanguageCode, $actualValue); + $actualValue = $actualRequestObject->getDocumentInputConfig(); + $this->assertProtobufEquals($documentInputConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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'; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $documentInputConfig = new DocumentInputConfig(); + try { + $gapicClient->translateDocument($parent, $targetLanguageCode, $documentInputConfig); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateTextTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TranslateTextResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $contents = []; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->translateText($contents, $targetLanguageCode, $formattedParent); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/TranslateText', $actualFuncCall); + $actualValue = $actualRequestObject->getContents(); + $this->assertProtobufEquals($contents, $actualValue); + $actualValue = $actualRequestObject->getTargetLanguageCode(); + $this->assertProtobufEquals($targetLanguageCode, $actualValue); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function translateTextExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $contents = []; + $targetLanguageCode = 'targetLanguageCode1323228230'; + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->translateText($contents, $targetLanguageCode, $formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGlossaryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGlossaryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $entryCount = 811131134; + $displayName = 'displayName1615086568'; + $expectedResponse = new Glossary(); + $expectedResponse->setName($name); + $expectedResponse->setEntryCount($entryCount); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGlossaryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $response = $gapicClient->updateGlossary($glossary); + $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.translation.v3.TranslationService/UpdateGlossary', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGlossary(); + $this->assertProtobufEquals($glossary, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); + $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 updateGlossaryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGlossaryTest'); + $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 + $glossary = new Glossary(); + $glossaryName = 'glossaryName-297469495'; + $glossary->setName($glossaryName); + $response = $gapicClient->updateGlossary($glossary); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); + 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 updateGlossaryEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new GlossaryEntry(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $glossaryEntry = new GlossaryEntry(); + $response = $gapicClient->updateGlossaryEntry($glossaryEntry); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.translation.v3.TranslationService/UpdateGlossaryEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getGlossaryEntry(); + $this->assertProtobufEquals($glossaryEntry, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGlossaryEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $glossaryEntry = new GlossaryEntry(); + try { + $gapicClient->updateGlossaryEntry($glossaryEntry); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php new file mode 100644 index 000000000000..8f9939b79853 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php @@ -0,0 +1,271 @@ +internalAddGeneratedFile( + ' +ÙJ +:google/cloud/videointelligence/v1/video_intelligence.proto!google.cloud.videointelligence.v1google/api/client.protogoogle/api/field_behavior.proto#google/longrunning/operations.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.protogoogle/rpc/status.proto"þ +AnnotateVideoRequest + input_uri (  + input_content ( A +features (2*.google.cloud.videointelligence.v1.FeatureBàAF + video_context ( 2/.google.cloud.videointelligence.v1.VideoContext + +output_uri ( BàA + location_id ( BàA"Á + VideoContextA +segments ( 2/.google.cloud.videointelligence.v1.VideoSegmentW +label_detection_config ( 27.google.cloud.videointelligence.v1.LabelDetectionConfigb +shot_change_detection_config ( 2<.google.cloud.videointelligence.v1.ShotChangeDetectionConfigl +!explicit_content_detection_config ( 2A.google.cloud.videointelligence.v1.ExplicitContentDetectionConfigU +face_detection_config ( 26.google.cloud.videointelligence.v1.FaceDetectionConfiga +speech_transcription_config ( 2<.google.cloud.videointelligence.v1.SpeechTranscriptionConfigU +text_detection_config ( 26.google.cloud.videointelligence.v1.TextDetectionConfigY +person_detection_config ( 28.google.cloud.videointelligence.v1.PersonDetectionConfigW +object_tracking_config ( 27.google.cloud.videointelligence.v1.ObjectTrackingConfig"Ý +LabelDetectionConfigS +label_detection_mode (25.google.cloud.videointelligence.v1.LabelDetectionMode +stationary_camera ( +model ( " +frame_confidence_threshold (" +video_confidence_threshold ("* +ShotChangeDetectionConfig +model ( "% +ObjectTrackingConfig +model ( "` +FaceDetectionConfig +model (  +include_bounding_boxes ( +include_attributes ("s +PersonDetectionConfig +include_bounding_boxes ( +include_pose_landmarks ( +include_attributes ("/ +ExplicitContentDetectionConfig +model ( "< +TextDetectionConfig +language_hints (  +model ( "x + VideoSegment4 +start_time_offset ( 2.google.protobuf.Duration2 +end_time_offset ( 2.google.protobuf.Duration"d + LabelSegment@ +segment ( 2/.google.cloud.videointelligence.v1.VideoSegment + +confidence ("P + +LabelFrame. + time_offset ( 2.google.protobuf.Duration + +confidence ("G +Entity + entity_id (  + description (  + language_code ( "¥ +LabelAnnotation9 +entity ( 2).google.cloud.videointelligence.v1.EntityD +category_entities ( 2).google.cloud.videointelligence.v1.EntityA +segments ( 2/.google.cloud.videointelligence.v1.LabelSegment= +frames ( 2-.google.cloud.videointelligence.v1.LabelFrame +version ( "• +ExplicitContentFrame. + time_offset ( 2.google.protobuf.DurationM +pornography_likelihood (2-.google.cloud.videointelligence.v1.Likelihood"u +ExplicitContentAnnotationG +frames ( 27.google.cloud.videointelligence.v1.ExplicitContentFrame +version ( "Q +NormalizedBoundingBox +left ( +top ( +right ( +bottom ("w +FaceDetectionAnnotation8 +tracks ( 2(.google.cloud.videointelligence.v1.Track + thumbnail (  +version ( "f +PersonDetectionAnnotation8 +tracks ( 2(.google.cloud.videointelligence.v1.Track +version ( "O + FaceSegment@ +segment ( 2/.google.cloud.videointelligence.v1.VideoSegment"œ + FaceFrame[ +normalized_bounding_boxes ( 28.google.cloud.videointelligence.v1.NormalizedBoundingBox. + time_offset ( 2.google.protobuf.Duration:"§ +FaceAnnotation + thumbnail ( @ +segments ( 2..google.cloud.videointelligence.v1.FaceSegment< +frames ( 2,.google.cloud.videointelligence.v1.FaceFrame:"º +TimestampedObjectY +normalized_bounding_box ( 28.google.cloud.videointelligence.v1.NormalizedBoundingBox. + time_offset ( 2.google.protobuf.DurationM + +attributes ( 24.google.cloud.videointelligence.v1.DetectedAttributeBàAK + landmarks ( 23.google.cloud.videointelligence.v1.DetectedLandmarkBàA"„ +Track@ +segment ( 2/.google.cloud.videointelligence.v1.VideoSegmentQ +timestamped_objects ( 24.google.cloud.videointelligence.v1.TimestampedObjectM + +attributes ( 24.google.cloud.videointelligence.v1.DetectedAttributeBàA + +confidence (BàA"D +DetectedAttribute +name (  + +confidence ( +value ( "x +DetectedLandmark +name ( B +point ( 23.google.cloud.videointelligence.v1.NormalizedVertex + +confidence ("é + +VideoAnnotationResults + input_uri ( @ +segment + ( 2/.google.cloud.videointelligence.v1.VideoSegmentU +segment_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotation^ +"segment_presence_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotationR +shot_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotation[ +shot_presence_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotationS +frame_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotationO +face_annotations ( 21.google.cloud.videointelligence.v1.FaceAnnotationB^ +face_detection_annotations ( 2:.google.cloud.videointelligence.v1.FaceDetectionAnnotationI +shot_annotations ( 2/.google.cloud.videointelligence.v1.VideoSegmentY +explicit_annotation ( 2<.google.cloud.videointelligence.v1.ExplicitContentAnnotationU +speech_transcriptions ( 26.google.cloud.videointelligence.v1.SpeechTranscriptionK +text_annotations ( 21.google.cloud.videointelligence.v1.TextAnnotationW +object_annotations ( 2;.google.cloud.videointelligence.v1.ObjectTrackingAnnotationb +logo_recognition_annotations ( 2<.google.cloud.videointelligence.v1.LogoRecognitionAnnotationb +person_detection_annotations ( 2<.google.cloud.videointelligence.v1.PersonDetectionAnnotation! +error ( 2.google.rpc.Status"n +AnnotateVideoResponseU +annotation_results ( 29.google.cloud.videointelligence.v1.VideoAnnotationResults"¦ +VideoAnnotationProgress + input_uri (  +progress_percent (. + +start_time ( 2.google.protobuf.Timestamp/ + update_time ( 2.google.protobuf.Timestamp; +feature (2*.google.cloud.videointelligence.v1.Feature@ +segment ( 2/.google.cloud.videointelligence.v1.VideoSegment"p +AnnotateVideoProgressW +annotation_progress ( 2:.google.cloud.videointelligence.v1.VideoAnnotationProgress" +SpeechTranscriptionConfig + language_code ( BàA +max_alternatives (BàA +filter_profanity (BàAN +speech_contexts ( 20.google.cloud.videointelligence.v1.SpeechContextBàA) +enable_automatic_punctuation (BàA + audio_tracks (BàA\' +enable_speaker_diarization (BàA& +diarization_speaker_count (BàA# +enable_word_confidence (BàA"% + SpeechContext +phrases ( BàA"ˆ +SpeechTranscriptionU + alternatives ( 2?.google.cloud.videointelligence.v1.SpeechRecognitionAlternative + language_code ( BàA"Œ +SpeechRecognitionAlternative + +transcript (  + +confidence (BàA? +words ( 2+.google.cloud.videointelligence.v1.WordInfoBàA"§ +WordInfo- + +start_time ( 2.google.protobuf.Duration+ +end_time ( 2.google.protobuf.Duration +word (  + +confidence (BàA + speaker_tag (BàA"( +NormalizedVertex +x ( +y ("_ +NormalizedBoundingPolyE +vertices ( 23.google.cloud.videointelligence.v1.NormalizedVertex"¡ + TextSegment@ +segment ( 2/.google.cloud.videointelligence.v1.VideoSegment + +confidence (< +frames ( 2,.google.cloud.videointelligence.v1.TextFrame"” + TextFrameW +rotated_bounding_box ( 29.google.cloud.videointelligence.v1.NormalizedBoundingPoly. + time_offset ( 2.google.protobuf.Duration"q +TextAnnotation +text ( @ +segments ( 2..google.cloud.videointelligence.v1.TextSegment +version ( "  +ObjectTrackingFrameY +normalized_bounding_box ( 28.google.cloud.videointelligence.v1.NormalizedBoundingBox. + time_offset ( 2.google.protobuf.Duration"¨ +ObjectTrackingAnnotationB +segment ( 2/.google.cloud.videointelligence.v1.VideoSegmentH +track_id (H9 +entity ( 2).google.cloud.videointelligence.v1.Entity + +confidence (F +frames ( 26.google.cloud.videointelligence.v1.ObjectTrackingFrame +version ( B + +track_info"Ó +LogoRecognitionAnnotation9 +entity ( 2).google.cloud.videointelligence.v1.Entity8 +tracks ( 2(.google.cloud.videointelligence.v1.TrackA +segments ( 2/.google.cloud.videointelligence.v1.VideoSegment*õ +Feature +FEATURE_UNSPECIFIED +LABEL_DETECTION +SHOT_CHANGE_DETECTION +EXPLICIT_CONTENT_DETECTION +FACE_DETECTION +SPEECH_TRANSCRIPTION +TEXT_DETECTION +OBJECT_TRACKING  +LOGO_RECOGNITION  +PERSON_DETECTION*r +LabelDetectionMode$ + LABEL_DETECTION_MODE_UNSPECIFIED + SHOT_MODE + +FRAME_MODE +SHOT_AND_FRAME_MODE*t + +Likelihood +LIKELIHOOD_UNSPECIFIED + VERY_UNLIKELY +UNLIKELY +POSSIBLE + +LIKELY + VERY_LIKELY2À +VideoIntelligenceServiceÍ + AnnotateVideo7.google.cloud.videointelligence.v1.AnnotateVideoRequest.google.longrunning.Operation"dÊA. +AnnotateVideoResponseAnnotateVideoProgressÚAinput_uri,features‚Óä“"/v1/videos:annotate:*TÊA videointelligence.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBŒ +%com.google.cloud.videointelligence.v1BVideoIntelligenceServiceProtoPZScloud.google.com/go/videointelligence/apiv1/videointelligencepb;videointelligencepbª!Google.Cloud.VideoIntelligence.V1Ê!Google\\Cloud\\VideoIntelligence\\V1ê$Google::Cloud::VideoIntelligence::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php new file mode 100644 index 000000000000..9018fd0c861f --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php @@ -0,0 +1,69 @@ +google.cloud.videointelligence.v1.AnnotateVideoProgress + */ +class AnnotateVideoProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationProgress annotation_progress = 1; + */ + private $annotation_progress; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationProgress>|\Google\Protobuf\Internal\RepeatedField $annotation_progress + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationProgress annotation_progress = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnnotationProgress() + { + return $this->annotation_progress; + } + + /** + * Progress metadata for all videos specified in `AnnotateVideoRequest`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationProgress annotation_progress = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationProgress>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnnotationProgress($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoAnnotationProgress::class); + $this->annotation_progress = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php new file mode 100644 index 000000000000..a83044c1c487 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php @@ -0,0 +1,357 @@ +google.cloud.videointelligence.v1.AnnotateVideoRequest + */ +class AnnotateVideoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + * + * Generated from protobuf field string input_uri = 1; + */ + protected $input_uri = ''; + /** + * The video data bytes. + * If unset, the input video(s) should be specified via the `input_uri`. + * If set, `input_uri` must be unset. + * + * Generated from protobuf field bytes input_content = 6; + */ + protected $input_content = ''; + /** + * Required. Requested video annotation features. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $features; + /** + * Additional video context and/or feature-specific parameters. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoContext video_context = 3; + */ + protected $video_context = null; + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported. These must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + * + * Generated from protobuf field string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_uri = ''; + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, the region will be determined based on video file + * location. + * + * Generated from protobuf field string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $location_id = ''; + + /** + * @param string $inputUri Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + * @param int[] $features Required. Requested video annotation features. + * For allowed values, use constants defined on {@see \Google\Cloud\VideoIntelligence\V1\Feature} + * + * @return \Google\Cloud\VideoIntelligence\V1\AnnotateVideoRequest + * + * @experimental + */ + public static function build(string $inputUri, array $features): self + { + return (new self()) + ->setInputUri($inputUri) + ->setFeatures($features); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_uri + * Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + * @type string $input_content + * The video data bytes. + * If unset, the input video(s) should be specified via the `input_uri`. + * If set, `input_uri` must be unset. + * @type array|\Google\Protobuf\Internal\RepeatedField $features + * Required. Requested video annotation features. + * @type \Google\Cloud\VideoIntelligence\V1\VideoContext $video_context + * Additional video context and/or feature-specific parameters. + * @type string $output_uri + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported. These must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + * @type string $location_id + * Optional. Cloud region where annotation should take place. Supported cloud + * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, the region will be determined based on video file + * location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + * + * Generated from protobuf field string input_uri = 1; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Input video location. Currently, only + * [Cloud Storage](https://cloud.google.com/storage/) URIs are + * supported. URIs must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify + * multiple videos, a video URI may include wildcards in the `object-id`. + * Supported wildcards: '*' to match 0 or more characters; + * '?' to match 1 character. If unset, the input video should be embedded + * in the request as `input_content`. If set, `input_content` must be unset. + * + * Generated from protobuf field string input_uri = 1; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + + /** + * The video data bytes. + * If unset, the input video(s) should be specified via the `input_uri`. + * If set, `input_uri` must be unset. + * + * Generated from protobuf field bytes input_content = 6; + * @return string + */ + public function getInputContent() + { + return $this->input_content; + } + + /** + * The video data bytes. + * If unset, the input video(s) should be specified via the `input_uri`. + * If set, `input_uri` must be unset. + * + * Generated from protobuf field bytes input_content = 6; + * @param string $var + * @return $this + */ + public function setInputContent($var) + { + GPBUtil::checkString($var, False); + $this->input_content = $var; + + return $this; + } + + /** + * Required. Requested video annotation features. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Required. Requested video annotation features. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VideoIntelligence\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional video context and/or feature-specific parameters. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoContext video_context = 3; + * @return \Google\Cloud\VideoIntelligence\V1\VideoContext|null + */ + public function getVideoContext() + { + return $this->video_context; + } + + public function hasVideoContext() + { + return isset($this->video_context); + } + + public function clearVideoContext() + { + unset($this->video_context); + } + + /** + * Additional video context and/or feature-specific parameters. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoContext video_context = 3; + * @param \Google\Cloud\VideoIntelligence\V1\VideoContext $var + * @return $this + */ + public function setVideoContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoContext::class); + $this->video_context = $var; + + return $this; + } + + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported. These must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + * + * Generated from protobuf field string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOutputUri() + { + return $this->output_uri; + } + + /** + * Optional. Location where the output (in JSON format) should be stored. + * Currently, only [Cloud Storage](https://cloud.google.com/storage/) + * URIs are supported. These must be specified in the following format: + * `gs://bucket-id/object-id` (other URI formats return + * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For + * more information, see [Request + * URIs](https://cloud.google.com/storage/docs/request-endpoints). + * + * Generated from protobuf field string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOutputUri($var) + { + GPBUtil::checkString($var, True); + $this->output_uri = $var; + + return $this; + } + + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, the region will be determined based on video file + * location. + * + * Generated from protobuf field string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLocationId() + { + return $this->location_id; + } + + /** + * Optional. Cloud region where annotation should take place. Supported cloud + * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no + * region is specified, the region will be determined based on video file + * location. + * + * Generated from protobuf field string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLocationId($var) + { + GPBUtil::checkString($var, True); + $this->location_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php new file mode 100644 index 000000000000..25d2c7cf89de --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php @@ -0,0 +1,69 @@ +google.cloud.videointelligence.v1.AnnotateVideoResponse + */ +class AnnotateVideoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationResults annotation_results = 1; + */ + private $annotation_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationResults>|\Google\Protobuf\Internal\RepeatedField $annotation_results + * Annotation results for all videos specified in `AnnotateVideoRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationResults annotation_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnnotationResults() + { + return $this->annotation_results; + } + + /** + * Annotation results for all videos specified in `AnnotateVideoRequest`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationResults annotation_results = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationResults>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnnotationResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoAnnotationResults::class); + $this->annotation_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php new file mode 100644 index 000000000000..a3869d67c043 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php @@ -0,0 +1,143 @@ +google.cloud.videointelligence.v1.DetectedAttribute + */ +class DetectedAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the attribute, for example, glasses, dark_glasses, mouth_open. + * A full list of supported type names will be provided in the document. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Detected attribute confidence. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * Text value of the detection result. For example, the value for "HairColor" + * can be "black", "blonde", etc. + * + * Generated from protobuf field string value = 3; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the attribute, for example, glasses, dark_glasses, mouth_open. + * A full list of supported type names will be provided in the document. + * @type float $confidence + * Detected attribute confidence. Range [0, 1]. + * @type string $value + * Text value of the detection result. For example, the value for "HairColor" + * can be "black", "blonde", etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * The name of the attribute, for example, glasses, dark_glasses, mouth_open. + * A full list of supported type names will be provided in the document. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the attribute, for example, glasses, dark_glasses, mouth_open. + * A full list of supported type names will be provided in the document. + * + * 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; + } + + /** + * Detected attribute confidence. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Detected attribute confidence. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Text value of the detection result. For example, the value for "HairColor" + * can be "black", "blonde", etc. + * + * Generated from protobuf field string value = 3; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Text value of the detection result. For example, the value for "HairColor" + * can be "black", "blonde", etc. + * + * Generated from protobuf field string value = 3; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php new file mode 100644 index 000000000000..50f56b1a634b --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php @@ -0,0 +1,150 @@ +google.cloud.videointelligence.v1.DetectedLandmark + */ +class DetectedLandmark extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this landmark, for example, left_hand, right_shoulder. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The 2D point of the detected landmark using the normalized image + * coordindate system. The normalized coordinates have the range from 0 to 1. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedVertex point = 2; + */ + protected $point = null; + /** + * The confidence score of the detected landmark. Range [0, 1]. + * + * Generated from protobuf field float confidence = 3; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of this landmark, for example, left_hand, right_shoulder. + * @type \Google\Cloud\VideoIntelligence\V1\NormalizedVertex $point + * The 2D point of the detected landmark using the normalized image + * coordindate system. The normalized coordinates have the range from 0 to 1. + * @type float $confidence + * The confidence score of the detected landmark. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * The name of this landmark, for example, left_hand, right_shoulder. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this landmark, for example, left_hand, right_shoulder. + * + * 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 2D point of the detected landmark using the normalized image + * coordindate system. The normalized coordinates have the range from 0 to 1. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedVertex point = 2; + * @return \Google\Cloud\VideoIntelligence\V1\NormalizedVertex|null + */ + public function getPoint() + { + return $this->point; + } + + public function hasPoint() + { + return isset($this->point); + } + + public function clearPoint() + { + unset($this->point); + } + + /** + * The 2D point of the detected landmark using the normalized image + * coordindate system. The normalized coordinates have the range from 0 to 1. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedVertex point = 2; + * @param \Google\Cloud\VideoIntelligence\V1\NormalizedVertex $var + * @return $this + */ + public function setPoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedVertex::class); + $this->point = $var; + + return $this; + } + + /** + * The confidence score of the detected landmark. Range [0, 1]. + * + * Generated from protobuf field float confidence = 3; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The confidence score of the detected landmark. Range [0, 1]. + * + * 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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php new file mode 100644 index 000000000000..d62bc773e7d4 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php @@ -0,0 +1,143 @@ +google.cloud.videointelligence.v1.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string entity_id = 1; + */ + protected $entity_id = ''; + /** + * Textual description, e.g., `Fixed-gear bicycle`. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Language code for `description` in BCP-47 format. + * + * Generated from protobuf field string language_code = 3; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity_id + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * @type string $description + * Textual description, e.g., `Fixed-gear bicycle`. + * @type string $language_code + * Language code for `description` in BCP-47 format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string entity_id = 1; + * @return string + */ + public function getEntityId() + { + return $this->entity_id; + } + + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string entity_id = 1; + * @param string $var + * @return $this + */ + public function setEntityId($var) + { + GPBUtil::checkString($var, True); + $this->entity_id = $var; + + return $this; + } + + /** + * Textual description, e.g., `Fixed-gear bicycle`. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Textual description, e.g., `Fixed-gear bicycle`. + * + * 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; + } + + /** + * Language code for `description` in BCP-47 format. + * + * Generated from protobuf field string language_code = 3; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Language code for `description` in BCP-47 format. + * + * Generated from protobuf field string language_code = 3; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php new file mode 100644 index 000000000000..dabb7a061483 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php @@ -0,0 +1,103 @@ +google.cloud.videointelligence.v1.ExplicitContentAnnotation + */ +class ExplicitContentAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * All video frames where explicit content was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ExplicitContentFrame frames = 1; + */ + private $frames; + /** + * Feature version. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\ExplicitContentFrame>|\Google\Protobuf\Internal\RepeatedField $frames + * All video frames where explicit content was detected. + * @type string $version + * Feature version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * All video frames where explicit content was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ExplicitContentFrame frames = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrames() + { + return $this->frames; + } + + /** + * All video frames where explicit content was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ExplicitContentFrame frames = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\ExplicitContentFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\ExplicitContentFrame::class); + $this->frames = $arr; + + return $this; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php new file mode 100644 index 000000000000..582cd1808f9f --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php @@ -0,0 +1,75 @@ +google.cloud.videointelligence.v1.ExplicitContentDetectionConfig + */ +class ExplicitContentDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Model to use for explicit content detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Model to use for explicit content detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Model to use for explicit content detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for explicit content detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php new file mode 100644 index 000000000000..9d249b46301c --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php @@ -0,0 +1,115 @@ +google.cloud.videointelligence.v1.ExplicitContentFrame + */ +class ExplicitContentFrame extends \Google\Protobuf\Internal\Message +{ + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + */ + protected $time_offset = null; + /** + * Likelihood of the pornography content.. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Likelihood pornography_likelihood = 2; + */ + protected $pornography_likelihood = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $time_offset + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * @type int $pornography_likelihood + * Likelihood of the pornography content.. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + + /** + * Likelihood of the pornography content.. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Likelihood pornography_likelihood = 2; + * @return int + */ + public function getPornographyLikelihood() + { + return $this->pornography_likelihood; + } + + /** + * Likelihood of the pornography content.. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Likelihood pornography_likelihood = 2; + * @param int $var + * @return $this + */ + public function setPornographyLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\Likelihood::class); + $this->pornography_likelihood = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php new file mode 100644 index 000000000000..6c8796da5c58 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php @@ -0,0 +1,136 @@ +google.cloud.videointelligence.v1.FaceAnnotation + */ +class FaceAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Thumbnail of a representative face view (in JPEG format). + * + * Generated from protobuf field bytes thumbnail = 1; + */ + protected $thumbnail = ''; + /** + * All video segments where a face was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceSegment segments = 2; + */ + private $segments; + /** + * All video frames where a face was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceFrame frames = 3; + */ + private $frames; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $thumbnail + * Thumbnail of a representative face view (in JPEG format). + * @type array<\Google\Cloud\VideoIntelligence\V1\FaceSegment>|\Google\Protobuf\Internal\RepeatedField $segments + * All video segments where a face was detected. + * @type array<\Google\Cloud\VideoIntelligence\V1\FaceFrame>|\Google\Protobuf\Internal\RepeatedField $frames + * All video frames where a face was detected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Thumbnail of a representative face view (in JPEG format). + * + * Generated from protobuf field bytes thumbnail = 1; + * @return string + */ + public function getThumbnail() + { + return $this->thumbnail; + } + + /** + * Thumbnail of a representative face view (in JPEG format). + * + * Generated from protobuf field bytes thumbnail = 1; + * @param string $var + * @return $this + */ + public function setThumbnail($var) + { + GPBUtil::checkString($var, False); + $this->thumbnail = $var; + + return $this; + } + + /** + * All video segments where a face was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceSegment segments = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * All video segments where a face was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceSegment segments = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\FaceSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceSegment::class); + $this->segments = $arr; + + return $this; + } + + /** + * All video frames where a face was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceFrame frames = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrames() + { + return $this->frames; + } + + /** + * All video frames where a face was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceFrame frames = 3; + * @param array<\Google\Cloud\VideoIntelligence\V1\FaceFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceFrame::class); + $this->frames = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php new file mode 100644 index 000000000000..ebbbbc2c5152 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php @@ -0,0 +1,135 @@ +google.cloud.videointelligence.v1.FaceDetectionAnnotation + */ +class FaceDetectionAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The face tracks with attributes. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 3; + */ + private $tracks; + /** + * The thumbnail of a person's face. + * + * Generated from protobuf field bytes thumbnail = 4; + */ + protected $thumbnail = ''; + /** + * Feature version. + * + * Generated from protobuf field string version = 5; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $tracks + * The face tracks with attributes. + * @type string $thumbnail + * The thumbnail of a person's face. + * @type string $version + * Feature version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * The face tracks with attributes. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTracks() + { + return $this->tracks; + } + + /** + * The face tracks with attributes. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 3; + * @param array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTracks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Track::class); + $this->tracks = $arr; + + return $this; + } + + /** + * The thumbnail of a person's face. + * + * Generated from protobuf field bytes thumbnail = 4; + * @return string + */ + public function getThumbnail() + { + return $this->thumbnail; + } + + /** + * The thumbnail of a person's face. + * + * Generated from protobuf field bytes thumbnail = 4; + * @param string $var + * @return $this + */ + public function setThumbnail($var) + { + GPBUtil::checkString($var, False); + $this->thumbnail = $var; + + return $this; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 5; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 5; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php new file mode 100644 index 000000000000..4ff17755b38e --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php @@ -0,0 +1,147 @@ +google.cloud.videointelligence.v1.FaceDetectionConfig + */ +class FaceDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Model to use for face detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + */ + protected $model = ''; + /** + * Whether bounding boxes are included in the face annotation output. + * + * Generated from protobuf field bool include_bounding_boxes = 2; + */ + protected $include_bounding_boxes = false; + /** + * Whether to enable face attributes detection, such as glasses, dark_glasses, + * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_attributes = 5; + */ + protected $include_attributes = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Model to use for face detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * @type bool $include_bounding_boxes + * Whether bounding boxes are included in the face annotation output. + * @type bool $include_attributes + * Whether to enable face attributes detection, such as glasses, dark_glasses, + * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Model to use for face detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for face detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Whether bounding boxes are included in the face annotation output. + * + * Generated from protobuf field bool include_bounding_boxes = 2; + * @return bool + */ + public function getIncludeBoundingBoxes() + { + return $this->include_bounding_boxes; + } + + /** + * Whether bounding boxes are included in the face annotation output. + * + * Generated from protobuf field bool include_bounding_boxes = 2; + * @param bool $var + * @return $this + */ + public function setIncludeBoundingBoxes($var) + { + GPBUtil::checkBool($var); + $this->include_bounding_boxes = $var; + + return $this; + } + + /** + * Whether to enable face attributes detection, such as glasses, dark_glasses, + * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_attributes = 5; + * @return bool + */ + public function getIncludeAttributes() + { + return $this->include_attributes; + } + + /** + * Whether to enable face attributes detection, such as glasses, dark_glasses, + * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_attributes = 5; + * @param bool $var + * @return $this + */ + public function setIncludeAttributes($var) + { + GPBUtil::checkBool($var); + $this->include_attributes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php new file mode 100644 index 000000000000..32de97e8e348 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php @@ -0,0 +1,124 @@ +google.cloud.videointelligence.v1.FaceFrame + */ +class FaceFrame extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized Bounding boxes in a frame. + * There can be more than one boxes if the same face is detected in multiple + * locations within the current frame. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1; + */ + private $normalized_bounding_boxes; + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + */ + protected $time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox>|\Google\Protobuf\Internal\RepeatedField $normalized_bounding_boxes + * Normalized Bounding boxes in a frame. + * There can be more than one boxes if the same face is detected in multiple + * locations within the current frame. + * @type \Google\Protobuf\Duration $time_offset + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Normalized Bounding boxes in a frame. + * There can be more than one boxes if the same face is detected in multiple + * locations within the current frame. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNormalizedBoundingBoxes() + { + return $this->normalized_bounding_boxes; + } + + /** + * Normalized Bounding boxes in a frame. + * There can be more than one boxes if the same face is detected in multiple + * locations within the current frame. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNormalizedBoundingBoxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class); + $this->normalized_bounding_boxes = $arr; + + return $this; + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php new file mode 100644 index 000000000000..66e742d5504b --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php @@ -0,0 +1,77 @@ +google.cloud.videointelligence.v1.FaceSegment + */ +class FaceSegment extends \Google\Protobuf\Internal\Message +{ + /** + * Video segment where a face was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + */ + protected $segment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Video segment where a face was detected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video segment where a face was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * Video segment where a face was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php new file mode 100644 index 000000000000..6a3a2b4518c5 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php @@ -0,0 +1,110 @@ +google.cloud.videointelligence.v1.Feature + */ +class Feature +{ + /** + * Unspecified. + * + * Generated from protobuf enum FEATURE_UNSPECIFIED = 0; + */ + const FEATURE_UNSPECIFIED = 0; + /** + * Label detection. Detect objects, such as dog or flower. + * + * Generated from protobuf enum LABEL_DETECTION = 1; + */ + const LABEL_DETECTION = 1; + /** + * Shot change detection. + * + * Generated from protobuf enum SHOT_CHANGE_DETECTION = 2; + */ + const SHOT_CHANGE_DETECTION = 2; + /** + * Explicit content detection. + * + * Generated from protobuf enum EXPLICIT_CONTENT_DETECTION = 3; + */ + const EXPLICIT_CONTENT_DETECTION = 3; + /** + * Human face detection. + * + * Generated from protobuf enum FACE_DETECTION = 4; + */ + const FACE_DETECTION = 4; + /** + * Speech transcription. + * + * Generated from protobuf enum SPEECH_TRANSCRIPTION = 6; + */ + const SPEECH_TRANSCRIPTION = 6; + /** + * OCR text detection and tracking. + * + * Generated from protobuf enum TEXT_DETECTION = 7; + */ + const TEXT_DETECTION = 7; + /** + * Object detection and tracking. + * + * Generated from protobuf enum OBJECT_TRACKING = 9; + */ + const OBJECT_TRACKING = 9; + /** + * Logo detection, tracking, and recognition. + * + * Generated from protobuf enum LOGO_RECOGNITION = 12; + */ + const LOGO_RECOGNITION = 12; + /** + * Person detection. + * + * Generated from protobuf enum PERSON_DETECTION = 14; + */ + const PERSON_DETECTION = 14; + + private static $valueToName = [ + self::FEATURE_UNSPECIFIED => 'FEATURE_UNSPECIFIED', + self::LABEL_DETECTION => 'LABEL_DETECTION', + self::SHOT_CHANGE_DETECTION => 'SHOT_CHANGE_DETECTION', + self::EXPLICIT_CONTENT_DETECTION => 'EXPLICIT_CONTENT_DETECTION', + self::FACE_DETECTION => 'FACE_DETECTION', + self::SPEECH_TRANSCRIPTION => 'SPEECH_TRANSCRIPTION', + self::TEXT_DETECTION => 'TEXT_DETECTION', + self::OBJECT_TRACKING => 'OBJECT_TRACKING', + self::LOGO_RECOGNITION => 'LOGO_RECOGNITION', + self::PERSON_DETECTION => 'PERSON_DETECTION', + ]; + + 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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php new file mode 100644 index 000000000000..5c9afbaef898 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php @@ -0,0 +1,225 @@ +google.cloud.videointelligence.v1.LabelAnnotation + */ +class LabelAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Detected entity. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + */ + protected $entity = null; + /** + * Common categories for the detected entity. + * For example, when the label is `Terrier`, the category is likely `dog`. And + * in some cases there might be more than one categories e.g., `Terrier` could + * also be a `pet`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Entity category_entities = 2; + */ + private $category_entities; + /** + * All video segments where a label was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelSegment segments = 3; + */ + private $segments; + /** + * All video frames where a label was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4; + */ + private $frames; + /** + * Feature version. + * + * Generated from protobuf field string version = 5; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\Entity $entity + * Detected entity. + * @type array<\Google\Cloud\VideoIntelligence\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $category_entities + * Common categories for the detected entity. + * For example, when the label is `Terrier`, the category is likely `dog`. And + * in some cases there might be more than one categories e.g., `Terrier` could + * also be a `pet`. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelSegment>|\Google\Protobuf\Internal\RepeatedField $segments + * All video segments where a label was detected. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelFrame>|\Google\Protobuf\Internal\RepeatedField $frames + * All video frames where a label was detected. + * @type string $version + * Feature version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Detected entity. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + * @return \Google\Cloud\VideoIntelligence\V1\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Detected entity. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + * @param \Google\Cloud\VideoIntelligence\V1\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * Common categories for the detected entity. + * For example, when the label is `Terrier`, the category is likely `dog`. And + * in some cases there might be more than one categories e.g., `Terrier` could + * also be a `pet`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Entity category_entities = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategoryEntities() + { + return $this->category_entities; + } + + /** + * Common categories for the detected entity. + * For example, when the label is `Terrier`, the category is likely `dog`. And + * in some cases there might be more than one categories e.g., `Terrier` could + * also be a `pet`. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Entity category_entities = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategoryEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Entity::class); + $this->category_entities = $arr; + + return $this; + } + + /** + * All video segments where a label was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelSegment segments = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * All video segments where a label was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelSegment segments = 3; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelSegment::class); + $this->segments = $arr; + + return $this; + } + + /** + * All video frames where a label was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrames() + { + return $this->frames; + } + + /** + * All video frames where a label was detected. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelFrame::class); + $this->frames = $arr; + + return $this; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 5; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 5; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php new file mode 100644 index 000000000000..b51b3128785f --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php @@ -0,0 +1,267 @@ +google.cloud.videointelligence.v1.LabelDetectionConfig + */ +class LabelDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * What labels should be detected with LABEL_DETECTION, in addition to + * video-level labels or segment-level labels. + * If unspecified, defaults to `SHOT_MODE`. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1; + */ + protected $label_detection_mode = 0; + /** + * Whether the video has been shot from a stationary (i.e., non-moving) + * camera. When set to true, might improve detection accuracy for moving + * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + * + * Generated from protobuf field bool stationary_camera = 2; + */ + protected $stationary_camera = false; + /** + * Model to use for label detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 3; + */ + protected $model = ''; + /** + * The confidence threshold we perform filtering on the labels from + * frame-level detection. If not set, it is set to 0.4 by default. The valid + * range for this threshold is [0.1, 0.9]. Any value set outside of this + * range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * + * Generated from protobuf field float frame_confidence_threshold = 4; + */ + protected $frame_confidence_threshold = 0.0; + /** + * The confidence threshold we perform filtering on the labels from + * video-level and shot-level detections. If not set, it's set to 0.3 by + * default. The valid range for this threshold is [0.1, 0.9]. Any value set + * outside of this range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * + * Generated from protobuf field float video_confidence_threshold = 5; + */ + protected $video_confidence_threshold = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $label_detection_mode + * What labels should be detected with LABEL_DETECTION, in addition to + * video-level labels or segment-level labels. + * If unspecified, defaults to `SHOT_MODE`. + * @type bool $stationary_camera + * Whether the video has been shot from a stationary (i.e., non-moving) + * camera. When set to true, might improve detection accuracy for moving + * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + * @type string $model + * Model to use for label detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * @type float $frame_confidence_threshold + * The confidence threshold we perform filtering on the labels from + * frame-level detection. If not set, it is set to 0.4 by default. The valid + * range for this threshold is [0.1, 0.9]. Any value set outside of this + * range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * @type float $video_confidence_threshold + * The confidence threshold we perform filtering on the labels from + * video-level and shot-level detections. If not set, it's set to 0.3 by + * default. The valid range for this threshold is [0.1, 0.9]. Any value set + * outside of this range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * What labels should be detected with LABEL_DETECTION, in addition to + * video-level labels or segment-level labels. + * If unspecified, defaults to `SHOT_MODE`. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1; + * @return int + */ + public function getLabelDetectionMode() + { + return $this->label_detection_mode; + } + + /** + * What labels should be detected with LABEL_DETECTION, in addition to + * video-level labels or segment-level labels. + * If unspecified, defaults to `SHOT_MODE`. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1; + * @param int $var + * @return $this + */ + public function setLabelDetectionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\LabelDetectionMode::class); + $this->label_detection_mode = $var; + + return $this; + } + + /** + * Whether the video has been shot from a stationary (i.e., non-moving) + * camera. When set to true, might improve detection accuracy for moving + * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + * + * Generated from protobuf field bool stationary_camera = 2; + * @return bool + */ + public function getStationaryCamera() + { + return $this->stationary_camera; + } + + /** + * Whether the video has been shot from a stationary (i.e., non-moving) + * camera. When set to true, might improve detection accuracy for moving + * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. + * + * Generated from protobuf field bool stationary_camera = 2; + * @param bool $var + * @return $this + */ + public function setStationaryCamera($var) + { + GPBUtil::checkBool($var); + $this->stationary_camera = $var; + + return $this; + } + + /** + * Model to use for label detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 3; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for label detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 3; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * The confidence threshold we perform filtering on the labels from + * frame-level detection. If not set, it is set to 0.4 by default. The valid + * range for this threshold is [0.1, 0.9]. Any value set outside of this + * range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * + * Generated from protobuf field float frame_confidence_threshold = 4; + * @return float + */ + public function getFrameConfidenceThreshold() + { + return $this->frame_confidence_threshold; + } + + /** + * The confidence threshold we perform filtering on the labels from + * frame-level detection. If not set, it is set to 0.4 by default. The valid + * range for this threshold is [0.1, 0.9]. Any value set outside of this + * range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * + * Generated from protobuf field float frame_confidence_threshold = 4; + * @param float $var + * @return $this + */ + public function setFrameConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->frame_confidence_threshold = $var; + + return $this; + } + + /** + * The confidence threshold we perform filtering on the labels from + * video-level and shot-level detections. If not set, it's set to 0.3 by + * default. The valid range for this threshold is [0.1, 0.9]. Any value set + * outside of this range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * + * Generated from protobuf field float video_confidence_threshold = 5; + * @return float + */ + public function getVideoConfidenceThreshold() + { + return $this->video_confidence_threshold; + } + + /** + * The confidence threshold we perform filtering on the labels from + * video-level and shot-level detections. If not set, it's set to 0.3 by + * default. The valid range for this threshold is [0.1, 0.9]. Any value set + * outside of this range will be clipped. + * Note: For best results, follow the default threshold. We will update + * the default threshold everytime when we release a new model. + * + * Generated from protobuf field float video_confidence_threshold = 5; + * @param float $var + * @return $this + */ + public function setVideoConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->video_confidence_threshold = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php new file mode 100644 index 000000000000..0f2117f3fd5c --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php @@ -0,0 +1,68 @@ +google.cloud.videointelligence.v1.LabelDetectionMode + */ +class LabelDetectionMode +{ + /** + * Unspecified. + * + * Generated from protobuf enum LABEL_DETECTION_MODE_UNSPECIFIED = 0; + */ + const LABEL_DETECTION_MODE_UNSPECIFIED = 0; + /** + * Detect shot-level labels. + * + * Generated from protobuf enum SHOT_MODE = 1; + */ + const SHOT_MODE = 1; + /** + * Detect frame-level labels. + * + * Generated from protobuf enum FRAME_MODE = 2; + */ + const FRAME_MODE = 2; + /** + * Detect both shot-level and frame-level labels. + * + * Generated from protobuf enum SHOT_AND_FRAME_MODE = 3; + */ + const SHOT_AND_FRAME_MODE = 3; + + private static $valueToName = [ + self::LABEL_DETECTION_MODE_UNSPECIFIED => 'LABEL_DETECTION_MODE_UNSPECIFIED', + self::SHOT_MODE => 'SHOT_MODE', + self::FRAME_MODE => 'FRAME_MODE', + self::SHOT_AND_FRAME_MODE => 'SHOT_AND_FRAME_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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php new file mode 100644 index 000000000000..4d84657a20c0 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php @@ -0,0 +1,115 @@ +google.cloud.videointelligence.v1.LabelFrame + */ +class LabelFrame extends \Google\Protobuf\Internal\Message +{ + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + */ + protected $time_offset = null; + /** + * Confidence that the label is accurate. Range: [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $time_offset + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * @type float $confidence + * Confidence that the label is accurate. Range: [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * Time-offset, relative to the beginning of the video, corresponding to the + * video frame for this location. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + + /** + * Confidence that the label is accurate. Range: [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence that the label is accurate. Range: [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php new file mode 100644 index 000000000000..c605883d7957 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php @@ -0,0 +1,111 @@ +google.cloud.videointelligence.v1.LabelSegment + */ +class LabelSegment extends \Google\Protobuf\Internal\Message +{ + /** + * Video segment where a label was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + */ + protected $segment = null; + /** + * Confidence that the label is accurate. Range: [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Video segment where a label was detected. + * @type float $confidence + * Confidence that the label is accurate. Range: [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video segment where a label was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * Video segment where a label was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segment = $var; + + return $this; + } + + /** + * Confidence that the label is accurate. Range: [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence that the label is accurate. Range: [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php new file mode 100644 index 000000000000..605525be5d52 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php @@ -0,0 +1,82 @@ +google.cloud.videointelligence.v1.Likelihood + */ +class Likelihood +{ + /** + * Unspecified likelihood. + * + * Generated from protobuf enum LIKELIHOOD_UNSPECIFIED = 0; + */ + const LIKELIHOOD_UNSPECIFIED = 0; + /** + * Very unlikely. + * + * Generated from protobuf enum VERY_UNLIKELY = 1; + */ + const VERY_UNLIKELY = 1; + /** + * Unlikely. + * + * Generated from protobuf enum UNLIKELY = 2; + */ + const UNLIKELY = 2; + /** + * Possible. + * + * Generated from protobuf enum POSSIBLE = 3; + */ + const POSSIBLE = 3; + /** + * Likely. + * + * Generated from protobuf enum LIKELY = 4; + */ + const LIKELY = 4; + /** + * Very likely. + * + * Generated from protobuf enum VERY_LIKELY = 5; + */ + const VERY_LIKELY = 5; + + private static $valueToName = [ + self::LIKELIHOOD_UNSPECIFIED => 'LIKELIHOOD_UNSPECIFIED', + self::VERY_UNLIKELY => 'VERY_UNLIKELY', + self::UNLIKELY => 'UNLIKELY', + self::POSSIBLE => 'POSSIBLE', + self::LIKELY => 'LIKELY', + self::VERY_LIKELY => 'VERY_LIKELY', + ]; + + 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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php new file mode 100644 index 000000000000..2745490b4b1f --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php @@ -0,0 +1,157 @@ +google.cloud.videointelligence.v1.LogoRecognitionAnnotation + */ +class LogoRecognitionAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Entity category information to specify the logo class that all the logo + * tracks within this LogoRecognitionAnnotation are recognized as. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + */ + protected $entity = null; + /** + * All logo tracks where the recognized logo appears. Each track corresponds + * to one logo instance appearing in consecutive frames. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 2; + */ + private $tracks; + /** + * All video segments where the recognized logo appears. There might be + * multiple instances of the same logo class appearing in one VideoSegment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 3; + */ + private $segments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\Entity $entity + * Entity category information to specify the logo class that all the logo + * tracks within this LogoRecognitionAnnotation are recognized as. + * @type array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $tracks + * All logo tracks where the recognized logo appears. Each track corresponds + * to one logo instance appearing in consecutive frames. + * @type array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $segments + * All video segments where the recognized logo appears. There might be + * multiple instances of the same logo class appearing in one VideoSegment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Entity category information to specify the logo class that all the logo + * tracks within this LogoRecognitionAnnotation are recognized as. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + * @return \Google\Cloud\VideoIntelligence\V1\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Entity category information to specify the logo class that all the logo + * tracks within this LogoRecognitionAnnotation are recognized as. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + * @param \Google\Cloud\VideoIntelligence\V1\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * All logo tracks where the recognized logo appears. Each track corresponds + * to one logo instance appearing in consecutive frames. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTracks() + { + return $this->tracks; + } + + /** + * All logo tracks where the recognized logo appears. Each track corresponds + * to one logo instance appearing in consecutive frames. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTracks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Track::class); + $this->tracks = $arr; + + return $this; + } + + /** + * All video segments where the recognized logo appears. There might be + * multiple instances of the same logo class appearing in one VideoSegment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * All video segments where the recognized logo appears. There might be + * multiple instances of the same logo class appearing in one VideoSegment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 3; + * @param array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segments = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php new file mode 100644 index 000000000000..8f33cb0d7cb5 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php @@ -0,0 +1,171 @@ +google.cloud.videointelligence.v1.NormalizedBoundingBox + */ +class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message +{ + /** + * Left X coordinate. + * + * Generated from protobuf field float left = 1; + */ + protected $left = 0.0; + /** + * Top Y coordinate. + * + * Generated from protobuf field float top = 2; + */ + protected $top = 0.0; + /** + * Right X coordinate. + * + * Generated from protobuf field float right = 3; + */ + protected $right = 0.0; + /** + * Bottom Y coordinate. + * + * Generated from protobuf field float bottom = 4; + */ + protected $bottom = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $left + * Left X coordinate. + * @type float $top + * Top Y coordinate. + * @type float $right + * Right X coordinate. + * @type float $bottom + * Bottom Y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Left X coordinate. + * + * Generated from protobuf field float left = 1; + * @return float + */ + public function getLeft() + { + return $this->left; + } + + /** + * Left X coordinate. + * + * Generated from protobuf field float left = 1; + * @param float $var + * @return $this + */ + public function setLeft($var) + { + GPBUtil::checkFloat($var); + $this->left = $var; + + return $this; + } + + /** + * Top Y coordinate. + * + * Generated from protobuf field float top = 2; + * @return float + */ + public function getTop() + { + return $this->top; + } + + /** + * Top Y coordinate. + * + * Generated from protobuf field float top = 2; + * @param float $var + * @return $this + */ + public function setTop($var) + { + GPBUtil::checkFloat($var); + $this->top = $var; + + return $this; + } + + /** + * Right X coordinate. + * + * Generated from protobuf field float right = 3; + * @return float + */ + public function getRight() + { + return $this->right; + } + + /** + * Right X coordinate. + * + * Generated from protobuf field float right = 3; + * @param float $var + * @return $this + */ + public function setRight($var) + { + GPBUtil::checkFloat($var); + $this->right = $var; + + return $this; + } + + /** + * Bottom Y coordinate. + * + * Generated from protobuf field float bottom = 4; + * @return float + */ + public function getBottom() + { + return $this->bottom; + } + + /** + * Bottom Y coordinate. + * + * Generated from protobuf field float bottom = 4; + * @param float $var + * @return $this + */ + public function setBottom($var) + { + GPBUtil::checkFloat($var); + $this->bottom = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php new file mode 100644 index 000000000000..f69adf5d9169 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php @@ -0,0 +1,81 @@ +google.cloud.videointelligence.v1.NormalizedBoundingPoly + */ +class NormalizedBoundingPoly extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized vertices of the bounding polygon. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedVertex vertices = 1; + */ + private $vertices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $vertices + * Normalized vertices of the bounding polygon. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Normalized vertices of the bounding polygon. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedVertex vertices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVertices() + { + return $this->vertices; + } + + /** + * Normalized vertices of the bounding polygon. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedVertex vertices = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\NormalizedVertex::class); + $this->vertices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php new file mode 100644 index 000000000000..a30850203838 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php @@ -0,0 +1,103 @@ +google.cloud.videointelligence.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\Videointelligence\V1\VideoIntelligence::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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php new file mode 100644 index 000000000000..8ba52ba7fbb1 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php @@ -0,0 +1,284 @@ +google.cloud.videointelligence.v1.ObjectTrackingAnnotation + */ +class ObjectTrackingAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Entity to specify the object category that this track is labeled as. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + */ + protected $entity = null; + /** + * Object category's labeling confidence of this track. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + /** + * Information corresponding to all frames where this object track appears. + * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + * messages in frames. + * Streaming mode: it can only be one ObjectTrackingFrame message in frames. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingFrame frames = 2; + */ + private $frames; + /** + * Feature version. + * + * Generated from protobuf field string version = 6; + */ + protected $version = ''; + protected $track_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Non-streaming batch mode ONLY. + * Each object track corresponds to one video segment where it appears. + * @type int|string $track_id + * Streaming mode ONLY. + * In streaming mode, we do not know the end time of a tracked object + * before it is completed. Hence, there is no VideoSegment info returned. + * Instead, we provide a unique identifiable integer track_id so that + * the customers can correlate the results of the ongoing + * ObjectTrackAnnotation of the same track_id over time. + * @type \Google\Cloud\VideoIntelligence\V1\Entity $entity + * Entity to specify the object category that this track is labeled as. + * @type float $confidence + * Object category's labeling confidence of this track. + * @type array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingFrame>|\Google\Protobuf\Internal\RepeatedField $frames + * Information corresponding to all frames where this object track appears. + * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + * messages in frames. + * Streaming mode: it can only be one ObjectTrackingFrame message in frames. + * @type string $version + * Feature version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Non-streaming batch mode ONLY. + * Each object track corresponds to one video segment where it appears. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 3; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->readOneof(3); + } + + public function hasSegment() + { + return $this->hasOneof(3); + } + + /** + * Non-streaming batch mode ONLY. + * Each object track corresponds to one video segment where it appears. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 3; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Streaming mode ONLY. + * In streaming mode, we do not know the end time of a tracked object + * before it is completed. Hence, there is no VideoSegment info returned. + * Instead, we provide a unique identifiable integer track_id so that + * the customers can correlate the results of the ongoing + * ObjectTrackAnnotation of the same track_id over time. + * + * Generated from protobuf field int64 track_id = 5; + * @return int|string + */ + public function getTrackId() + { + return $this->readOneof(5); + } + + public function hasTrackId() + { + return $this->hasOneof(5); + } + + /** + * Streaming mode ONLY. + * In streaming mode, we do not know the end time of a tracked object + * before it is completed. Hence, there is no VideoSegment info returned. + * Instead, we provide a unique identifiable integer track_id so that + * the customers can correlate the results of the ongoing + * ObjectTrackAnnotation of the same track_id over time. + * + * Generated from protobuf field int64 track_id = 5; + * @param int|string $var + * @return $this + */ + public function setTrackId($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Entity to specify the object category that this track is labeled as. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + * @return \Google\Cloud\VideoIntelligence\V1\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Entity to specify the object category that this track is labeled as. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; + * @param \Google\Cloud\VideoIntelligence\V1\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * Object category's labeling confidence of this track. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Object category's labeling confidence of this track. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Information corresponding to all frames where this object track appears. + * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + * messages in frames. + * Streaming mode: it can only be one ObjectTrackingFrame message in frames. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingFrame frames = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrames() + { + return $this->frames; + } + + /** + * Information corresponding to all frames where this object track appears. + * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame + * messages in frames. + * Streaming mode: it can only be one ObjectTrackingFrame message in frames. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingFrame frames = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\ObjectTrackingFrame::class); + $this->frames = $arr; + + return $this; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 6; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 6; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * @return string + */ + public function getTrackInfo() + { + return $this->whichOneof("track_info"); + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php new file mode 100644 index 000000000000..25de54434f6e --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php @@ -0,0 +1,75 @@ +google.cloud.videointelligence.v1.ObjectTrackingConfig + */ +class ObjectTrackingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Model to use for object tracking. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Model to use for object tracking. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Model to use for object tracking. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for object tracking. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php new file mode 100644 index 000000000000..88cc134fb3c3 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php @@ -0,0 +1,122 @@ +google.cloud.videointelligence.v1.ObjectTrackingFrame + */ +class ObjectTrackingFrame extends \Google\Protobuf\Internal\Message +{ + /** + * The normalized bounding box location of this object track for the frame. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; + */ + protected $normalized_bounding_box = null; + /** + * The timestamp of the frame in microseconds. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + */ + protected $time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $normalized_bounding_box + * The normalized bounding box location of this object track for the frame. + * @type \Google\Protobuf\Duration $time_offset + * The timestamp of the frame in microseconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * The normalized bounding box location of this object track for the frame. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; + * @return \Google\Cloud\VideoIntelligence\V1\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); + } + + /** + * The normalized bounding box location of this object track for the frame. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; + * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $var + * @return $this + */ + public function setNormalizedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class); + $this->normalized_bounding_box = $var; + + return $this; + } + + /** + * The timestamp of the frame in microseconds. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * The timestamp of the frame in microseconds. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php new file mode 100644 index 000000000000..6d98140dbbef --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php @@ -0,0 +1,101 @@ +google.cloud.videointelligence.v1.PersonDetectionAnnotation + */ +class PersonDetectionAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The detected tracks of a person. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 1; + */ + private $tracks; + /** + * Feature version. + * + * Generated from protobuf field string version = 2; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $tracks + * The detected tracks of a person. + * @type string $version + * Feature version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * The detected tracks of a person. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTracks() + { + return $this->tracks; + } + + /** + * The detected tracks of a person. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTracks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Track::class); + $this->tracks = $arr; + + return $this; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 2; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 2; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php new file mode 100644 index 000000000000..d3bb4963b47c --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php @@ -0,0 +1,155 @@ +google.cloud.videointelligence.v1.PersonDetectionConfig + */ +class PersonDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether bounding boxes are included in the person detection annotation + * output. + * + * Generated from protobuf field bool include_bounding_boxes = 1; + */ + protected $include_bounding_boxes = false; + /** + * Whether to enable pose landmarks detection. Ignored if + * 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_pose_landmarks = 2; + */ + protected $include_pose_landmarks = false; + /** + * Whether to enable person attributes detection, such as cloth color (black, + * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + * etc. + * Ignored if 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_attributes = 3; + */ + protected $include_attributes = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $include_bounding_boxes + * Whether bounding boxes are included in the person detection annotation + * output. + * @type bool $include_pose_landmarks + * Whether to enable pose landmarks detection. Ignored if + * 'include_bounding_boxes' is set to false. + * @type bool $include_attributes + * Whether to enable person attributes detection, such as cloth color (black, + * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + * etc. + * Ignored if 'include_bounding_boxes' is set to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Whether bounding boxes are included in the person detection annotation + * output. + * + * Generated from protobuf field bool include_bounding_boxes = 1; + * @return bool + */ + public function getIncludeBoundingBoxes() + { + return $this->include_bounding_boxes; + } + + /** + * Whether bounding boxes are included in the person detection annotation + * output. + * + * Generated from protobuf field bool include_bounding_boxes = 1; + * @param bool $var + * @return $this + */ + public function setIncludeBoundingBoxes($var) + { + GPBUtil::checkBool($var); + $this->include_bounding_boxes = $var; + + return $this; + } + + /** + * Whether to enable pose landmarks detection. Ignored if + * 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_pose_landmarks = 2; + * @return bool + */ + public function getIncludePoseLandmarks() + { + return $this->include_pose_landmarks; + } + + /** + * Whether to enable pose landmarks detection. Ignored if + * 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_pose_landmarks = 2; + * @param bool $var + * @return $this + */ + public function setIncludePoseLandmarks($var) + { + GPBUtil::checkBool($var); + $this->include_pose_landmarks = $var; + + return $this; + } + + /** + * Whether to enable person attributes detection, such as cloth color (black, + * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + * etc. + * Ignored if 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_attributes = 3; + * @return bool + */ + public function getIncludeAttributes() + { + return $this->include_attributes; + } + + /** + * Whether to enable person attributes detection, such as cloth color (black, + * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, + * etc. + * Ignored if 'include_bounding_boxes' is set to false. + * + * Generated from protobuf field bool include_attributes = 3; + * @param bool $var + * @return $this + */ + public function setIncludeAttributes($var) + { + GPBUtil::checkBool($var); + $this->include_attributes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php new file mode 100644 index 000000000000..48f8998705f7 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php @@ -0,0 +1,75 @@ +google.cloud.videointelligence.v1.ShotChangeDetectionConfig + */ +class ShotChangeDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Model to use for shot change detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Model to use for shot change detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Model to use for shot change detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for shot change detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 1; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php new file mode 100644 index 000000000000..e8e49aff263a --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php @@ -0,0 +1,88 @@ +google.cloud.videointelligence.v1.SpeechContext + */ +class SpeechContext extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of strings containing words and phrases "hints" so that + * the speech recognition is more likely to recognize them. This can be used + * to improve the accuracy for specific words and phrases, for example, if + * specific commands are typically spoken by the user. This can also be used + * to add additional words to the vocabulary of the recognizer. See + * [usage limits](https://cloud.google.com/speech/limits#content). + * + * Generated from protobuf field repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $phrases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $phrases + * Optional. A list of strings containing words and phrases "hints" so that + * the speech recognition is more likely to recognize them. This can be used + * to improve the accuracy for specific words and phrases, for example, if + * specific commands are typically spoken by the user. This can also be used + * to add additional words to the vocabulary of the recognizer. See + * [usage limits](https://cloud.google.com/speech/limits#content). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of strings containing words and phrases "hints" so that + * the speech recognition is more likely to recognize them. This can be used + * to improve the accuracy for specific words and phrases, for example, if + * specific commands are typically spoken by the user. This can also be used + * to add additional words to the vocabulary of the recognizer. See + * [usage limits](https://cloud.google.com/speech/limits#content). + * + * Generated from protobuf field repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPhrases() + { + return $this->phrases; + } + + /** + * Optional. A list of strings containing words and phrases "hints" so that + * the speech recognition is more likely to recognize them. This can be used + * to improve the accuracy for specific words and phrases, for example, if + * specific commands are typically spoken by the user. This can also be used + * to add additional words to the vocabulary of the recognizer. See + * [usage limits](https://cloud.google.com/speech/limits#content). + * + * Generated from protobuf field repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPhrases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->phrases = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php new file mode 100644 index 000000000000..38d349c1b07b --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php @@ -0,0 +1,163 @@ +google.cloud.videointelligence.v1.SpeechRecognitionAlternative + */ +class SpeechRecognitionAlternative extends \Google\Protobuf\Internal\Message +{ + /** + * Transcript text representing the words that the user spoke. + * + * Generated from protobuf field string transcript = 1; + */ + protected $transcript = ''; + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * + * Generated from protobuf field float confidence = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = 0.0; + /** + * Output only. A list of word-specific information for each recognized word. + * Note: When `enable_speaker_diarization` is set to true, you will see all + * the words from the beginning of the audio. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.WordInfo words = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $words; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transcript + * Transcript text representing the words that the user spoke. + * @type float $confidence + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * @type array<\Google\Cloud\VideoIntelligence\V1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words + * Output only. A list of word-specific information for each recognized word. + * Note: When `enable_speaker_diarization` is set to true, you will see all + * the words from the beginning of the audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Transcript text representing the words that the user spoke. + * + * Generated from protobuf field string transcript = 1; + * @return string + */ + public function getTranscript() + { + return $this->transcript; + } + + /** + * Transcript text representing the words that the user spoke. + * + * Generated from protobuf field string transcript = 1; + * @param string $var + * @return $this + */ + public function setTranscript($var) + { + GPBUtil::checkString($var, True); + $this->transcript = $var; + + return $this; + } + + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * + * Generated from protobuf field float confidence = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * + * Generated from protobuf field float confidence = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Output only. A list of word-specific information for each recognized word. + * Note: When `enable_speaker_diarization` is set to true, you will see all + * the words from the beginning of the audio. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.WordInfo words = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWords() + { + return $this->words; + } + + /** + * Output only. A list of word-specific information for each recognized word. + * Note: When `enable_speaker_diarization` is set to true, you will see all + * the words from the beginning of the audio. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.WordInfo words = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VideoIntelligence\V1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\WordInfo::class); + $this->words = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php new file mode 100644 index 000000000000..b42482f5ddf1 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php @@ -0,0 +1,121 @@ +google.cloud.videointelligence.v1.SpeechTranscription + */ +class SpeechTranscription extends \Google\Protobuf\Internal\Message +{ + /** + * May contain one or more recognition hypotheses (up to the maximum specified + * in `max_alternatives`). These alternatives are ordered in terms of + * accuracy, with the top (first) alternative being the most probable, as + * ranked by the recognizer. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1; + */ + private $alternatives; + /** + * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag of the language in this result. This language code was + * detected to have the most likelihood of being spoken in the audio. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives + * May contain one or more recognition hypotheses (up to the maximum specified + * in `max_alternatives`). These alternatives are ordered in terms of + * accuracy, with the top (first) alternative being the most probable, as + * ranked by the recognizer. + * @type string $language_code + * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag of the language in this result. This language code was + * detected to have the most likelihood of being spoken in the audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * May contain one or more recognition hypotheses (up to the maximum specified + * in `max_alternatives`). These alternatives are ordered in terms of + * accuracy, with the top (first) alternative being the most probable, as + * ranked by the recognizer. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAlternatives() + { + return $this->alternatives; + } + + /** + * May contain one or more recognition hypotheses (up to the maximum specified + * in `max_alternatives`). These alternatives are ordered in terms of + * accuracy, with the top (first) alternative being the most probable, as + * ranked by the recognizer. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAlternatives($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative::class); + $this->alternatives = $arr; + + return $this; + } + + /** + * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag of the language in this result. This language code was + * detected to have the most likelihood of being spoken in the audio. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + * language tag of the language in this result. This language code was + * detected to have the most likelihood of being spoken in the audio. + * + * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php new file mode 100644 index 000000000000..1c0f54e6f1b2 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php @@ -0,0 +1,447 @@ +google.cloud.videointelligence.v1.SpeechTranscriptionConfig + */ +class SpeechTranscriptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. *Required* The language of the supplied audio as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * See [Language Support](https://cloud.google.com/speech/docs/languages) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $language_code = ''; + /** + * Optional. Maximum number of recognition hypotheses to be returned. + * Specifically, the maximum number of `SpeechRecognitionAlternative` messages + * within each `SpeechTranscription`. The server may return fewer than + * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + * return a maximum of one. If omitted, will return a maximum of one. + * + * Generated from protobuf field int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_alternatives = 0; + /** + * Optional. If set to `true`, the server will attempt to filter out + * profanities, replacing all but the initial character in each filtered word + * with asterisks, e.g. "f***". If set to `false` or omitted, profanities + * won't be filtered out. + * + * Generated from protobuf field bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter_profanity = false; + /** + * Optional. A means to provide context to assist the speech recognition. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $speech_contexts; + /** + * Optional. If 'true', adds punctuation to recognition result hypotheses. + * This feature is only available in select languages. Setting this for + * requests in other languages has no effect at all. The default 'false' value + * does not add punctuation to result hypotheses. NOTE: "This is currently + * offered as an experimental service, complimentary to all users. In the + * future this may be exclusively available as a premium feature." + * + * Generated from protobuf field bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_automatic_punctuation = false; + /** + * Optional. For file formats, such as MXF or MKV, supporting multiple audio + * tracks, specify up to two tracks. Default: track 0. + * + * Generated from protobuf field repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $audio_tracks; + /** + * Optional. If 'true', enables speaker detection for each recognized word in + * the top alternative of the recognition result using a speaker_tag provided + * in the WordInfo. + * Note: When this is true, we send all the words from the beginning of the + * audio for the top alternative in every consecutive response. + * This is done in order to improve our speaker tags as our models learn to + * identify the speakers in the conversation over time. + * + * Generated from protobuf field bool enable_speaker_diarization = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_speaker_diarization = false; + /** + * Optional. If set, specifies the estimated number of speakers in the + * conversation. If not set, defaults to '2'. Ignored unless + * enable_speaker_diarization is set to true. + * + * Generated from protobuf field int32 diarization_speaker_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $diarization_speaker_count = 0; + /** + * Optional. If `true`, the top result includes a list of words and the + * confidence for those words. If `false`, no word-level confidence + * information is returned. The default is `false`. + * + * Generated from protobuf field bool enable_word_confidence = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_word_confidence = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * Required. *Required* The language of the supplied audio as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * See [Language Support](https://cloud.google.com/speech/docs/languages) + * for a list of the currently supported language codes. + * @type int $max_alternatives + * Optional. Maximum number of recognition hypotheses to be returned. + * Specifically, the maximum number of `SpeechRecognitionAlternative` messages + * within each `SpeechTranscription`. The server may return fewer than + * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + * return a maximum of one. If omitted, will return a maximum of one. + * @type bool $filter_profanity + * Optional. If set to `true`, the server will attempt to filter out + * profanities, replacing all but the initial character in each filtered word + * with asterisks, e.g. "f***". If set to `false` or omitted, profanities + * won't be filtered out. + * @type array<\Google\Cloud\VideoIntelligence\V1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $speech_contexts + * Optional. A means to provide context to assist the speech recognition. + * @type bool $enable_automatic_punctuation + * Optional. If 'true', adds punctuation to recognition result hypotheses. + * This feature is only available in select languages. Setting this for + * requests in other languages has no effect at all. The default 'false' value + * does not add punctuation to result hypotheses. NOTE: "This is currently + * offered as an experimental service, complimentary to all users. In the + * future this may be exclusively available as a premium feature." + * @type array|\Google\Protobuf\Internal\RepeatedField $audio_tracks + * Optional. For file formats, such as MXF or MKV, supporting multiple audio + * tracks, specify up to two tracks. Default: track 0. + * @type bool $enable_speaker_diarization + * Optional. If 'true', enables speaker detection for each recognized word in + * the top alternative of the recognition result using a speaker_tag provided + * in the WordInfo. + * Note: When this is true, we send all the words from the beginning of the + * audio for the top alternative in every consecutive response. + * This is done in order to improve our speaker tags as our models learn to + * identify the speakers in the conversation over time. + * @type int $diarization_speaker_count + * Optional. If set, specifies the estimated number of speakers in the + * conversation. If not set, defaults to '2'. Ignored unless + * enable_speaker_diarization is set to true. + * @type bool $enable_word_confidence + * Optional. If `true`, the top result includes a list of words and the + * confidence for those words. If `false`, no word-level confidence + * information is returned. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Required. *Required* The language of the supplied audio as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * See [Language Support](https://cloud.google.com/speech/docs/languages) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Required. *Required* The language of the supplied audio as a + * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + * Example: "en-US". + * See [Language Support](https://cloud.google.com/speech/docs/languages) + * for a list of the currently supported language codes. + * + * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Optional. Maximum number of recognition hypotheses to be returned. + * Specifically, the maximum number of `SpeechRecognitionAlternative` messages + * within each `SpeechTranscription`. The server may return fewer than + * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + * return a maximum of one. If omitted, will return a maximum of one. + * + * Generated from protobuf field int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxAlternatives() + { + return $this->max_alternatives; + } + + /** + * Optional. Maximum number of recognition hypotheses to be returned. + * Specifically, the maximum number of `SpeechRecognitionAlternative` messages + * within each `SpeechTranscription`. The server may return fewer than + * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will + * return a maximum of one. If omitted, will return a maximum of one. + * + * Generated from protobuf field int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxAlternatives($var) + { + GPBUtil::checkInt32($var); + $this->max_alternatives = $var; + + return $this; + } + + /** + * Optional. If set to `true`, the server will attempt to filter out + * profanities, replacing all but the initial character in each filtered word + * with asterisks, e.g. "f***". If set to `false` or omitted, profanities + * won't be filtered out. + * + * Generated from protobuf field bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getFilterProfanity() + { + return $this->filter_profanity; + } + + /** + * Optional. If set to `true`, the server will attempt to filter out + * profanities, replacing all but the initial character in each filtered word + * with asterisks, e.g. "f***". If set to `false` or omitted, profanities + * won't be filtered out. + * + * Generated from protobuf field bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setFilterProfanity($var) + { + GPBUtil::checkBool($var); + $this->filter_profanity = $var; + + return $this; + } + + /** + * Optional. A means to provide context to assist the speech recognition. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpeechContexts() + { + return $this->speech_contexts; + } + + /** + * Optional. A means to provide context to assist the speech recognition. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\VideoIntelligence\V1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\SpeechContext::class); + $this->speech_contexts = $arr; + + return $this; + } + + /** + * Optional. If 'true', adds punctuation to recognition result hypotheses. + * This feature is only available in select languages. Setting this for + * requests in other languages has no effect at all. The default 'false' value + * does not add punctuation to result hypotheses. NOTE: "This is currently + * offered as an experimental service, complimentary to all users. In the + * future this may be exclusively available as a premium feature." + * + * Generated from protobuf field bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableAutomaticPunctuation() + { + return $this->enable_automatic_punctuation; + } + + /** + * Optional. If 'true', adds punctuation to recognition result hypotheses. + * This feature is only available in select languages. Setting this for + * requests in other languages has no effect at all. The default 'false' value + * does not add punctuation to result hypotheses. NOTE: "This is currently + * offered as an experimental service, complimentary to all users. In the + * future this may be exclusively available as a premium feature." + * + * Generated from protobuf field bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableAutomaticPunctuation($var) + { + GPBUtil::checkBool($var); + $this->enable_automatic_punctuation = $var; + + return $this; + } + + /** + * Optional. For file formats, such as MXF or MKV, supporting multiple audio + * tracks, specify up to two tracks. Default: track 0. + * + * Generated from protobuf field repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAudioTracks() + { + return $this->audio_tracks; + } + + /** + * Optional. For file formats, such as MXF or MKV, supporting multiple audio + * tracks, specify up to two tracks. Default: track 0. + * + * Generated from protobuf field repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAudioTracks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->audio_tracks = $arr; + + return $this; + } + + /** + * Optional. If 'true', enables speaker detection for each recognized word in + * the top alternative of the recognition result using a speaker_tag provided + * in the WordInfo. + * Note: When this is true, we send all the words from the beginning of the + * audio for the top alternative in every consecutive response. + * This is done in order to improve our speaker tags as our models learn to + * identify the speakers in the conversation over time. + * + * Generated from protobuf field bool enable_speaker_diarization = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableSpeakerDiarization() + { + return $this->enable_speaker_diarization; + } + + /** + * Optional. If 'true', enables speaker detection for each recognized word in + * the top alternative of the recognition result using a speaker_tag provided + * in the WordInfo. + * Note: When this is true, we send all the words from the beginning of the + * audio for the top alternative in every consecutive response. + * This is done in order to improve our speaker tags as our models learn to + * identify the speakers in the conversation over time. + * + * Generated from protobuf field bool enable_speaker_diarization = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableSpeakerDiarization($var) + { + GPBUtil::checkBool($var); + $this->enable_speaker_diarization = $var; + + return $this; + } + + /** + * Optional. If set, specifies the estimated number of speakers in the + * conversation. If not set, defaults to '2'. Ignored unless + * enable_speaker_diarization is set to true. + * + * Generated from protobuf field int32 diarization_speaker_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiarizationSpeakerCount() + { + return $this->diarization_speaker_count; + } + + /** + * Optional. If set, specifies the estimated number of speakers in the + * conversation. If not set, defaults to '2'. Ignored unless + * enable_speaker_diarization is set to true. + * + * Generated from protobuf field int32 diarization_speaker_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiarizationSpeakerCount($var) + { + GPBUtil::checkInt32($var); + $this->diarization_speaker_count = $var; + + return $this; + } + + /** + * Optional. If `true`, the top result includes a list of words and the + * confidence for those words. If `false`, no word-level confidence + * information is returned. The default is `false`. + * + * Generated from protobuf field bool enable_word_confidence = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableWordConfidence() + { + return $this->enable_word_confidence; + } + + /** + * Optional. If `true`, the top result includes a list of words and the + * confidence for those words. If `false`, no word-level confidence + * information is returned. The default is `false`. + * + * Generated from protobuf field bool enable_word_confidence = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableWordConfidence($var) + { + GPBUtil::checkBool($var); + $this->enable_word_confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php new file mode 100644 index 000000000000..da9a3b3e6f89 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php @@ -0,0 +1,137 @@ +google.cloud.videointelligence.v1.TextAnnotation + */ +class TextAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The detected text. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * All video segments where OCR detected text appears. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextSegment segments = 2; + */ + private $segments; + /** + * Feature version. + * + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The detected text. + * @type array<\Google\Cloud\VideoIntelligence\V1\TextSegment>|\Google\Protobuf\Internal\RepeatedField $segments + * All video segments where OCR detected text appears. + * @type string $version + * Feature version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * The detected text. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The detected text. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * All video segments where OCR detected text appears. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextSegment segments = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * All video segments where OCR detected text appears. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextSegment segments = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\TextSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TextSegment::class); + $this->segments = $arr; + + return $this; + } + + /** + * Feature version. + * + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Feature version. + * + * 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; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php new file mode 100644 index 000000000000..4b5eadb6e3bd --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php @@ -0,0 +1,121 @@ +google.cloud.videointelligence.v1.TextDetectionConfig + */ +class TextDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Language hint can be specified if the language to be detected is known a + * priori. It can increase the accuracy of the detection. Language hint must + * be language code in BCP-47 format. + * Automatic language detection is performed if no hint is provided. + * + * Generated from protobuf field repeated string language_hints = 1; + */ + private $language_hints; + /** + * Model to use for text detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 2; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $language_hints + * Language hint can be specified if the language to be detected is known a + * priori. It can increase the accuracy of the detection. Language hint must + * be language code in BCP-47 format. + * Automatic language detection is performed if no hint is provided. + * @type string $model + * Model to use for text detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Language hint can be specified if the language to be detected is known a + * priori. It can increase the accuracy of the detection. Language hint must + * be language code in BCP-47 format. + * Automatic language detection is performed if no hint is provided. + * + * Generated from protobuf field repeated string language_hints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageHints() + { + return $this->language_hints; + } + + /** + * Language hint can be specified if the language to be detected is known a + * priori. It can increase the accuracy of the detection. Language hint must + * be language code in BCP-47 format. + * Automatic language detection is performed if no hint is provided. + * + * Generated from protobuf field repeated string language_hints = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_hints = $arr; + + return $this; + } + + /** + * Model to use for text detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 2; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for text detection. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". + * + * Generated from protobuf field string model = 2; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php new file mode 100644 index 000000000000..eb2062c90da5 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php @@ -0,0 +1,123 @@ +google.cloud.videointelligence.v1.TextFrame + */ +class TextFrame extends \Google\Protobuf\Internal\Message +{ + /** + * Bounding polygon of the detected text for this frame. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingPoly rotated_bounding_box = 1; + */ + protected $rotated_bounding_box = null; + /** + * Timestamp of this frame. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + */ + protected $time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly $rotated_bounding_box + * Bounding polygon of the detected text for this frame. + * @type \Google\Protobuf\Duration $time_offset + * Timestamp of this frame. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Bounding polygon of the detected text for this frame. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingPoly rotated_bounding_box = 1; + * @return \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly|null + */ + public function getRotatedBoundingBox() + { + return $this->rotated_bounding_box; + } + + public function hasRotatedBoundingBox() + { + return isset($this->rotated_bounding_box); + } + + public function clearRotatedBoundingBox() + { + unset($this->rotated_bounding_box); + } + + /** + * Bounding polygon of the detected text for this frame. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingPoly rotated_bounding_box = 1; + * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly $var + * @return $this + */ + public function setRotatedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly::class); + $this->rotated_bounding_box = $var; + + return $this; + } + + /** + * Timestamp of this frame. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * Timestamp of this frame. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php new file mode 100644 index 000000000000..8c0f1485df06 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php @@ -0,0 +1,149 @@ +google.cloud.videointelligence.v1.TextSegment + */ +class TextSegment extends \Google\Protobuf\Internal\Message +{ + /** + * Video segment where a text snippet was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + */ + protected $segment = null; + /** + * Confidence for the track of detected text. It is calculated as the highest + * over all frames where OCR detected text appears. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * Information related to the frames where OCR detected text appears. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextFrame frames = 3; + */ + private $frames; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Video segment where a text snippet was detected. + * @type float $confidence + * Confidence for the track of detected text. It is calculated as the highest + * over all frames where OCR detected text appears. + * @type array<\Google\Cloud\VideoIntelligence\V1\TextFrame>|\Google\Protobuf\Internal\RepeatedField $frames + * Information related to the frames where OCR detected text appears. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video segment where a text snippet was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * Video segment where a text snippet was detected. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segment = $var; + + return $this; + } + + /** + * Confidence for the track of detected text. It is calculated as the highest + * over all frames where OCR detected text appears. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence for the track of detected text. It is calculated as the highest + * over all frames where OCR detected text appears. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Information related to the frames where OCR detected text appears. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextFrame frames = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrames() + { + return $this->frames; + } + + /** + * Information related to the frames where OCR detected text appears. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextFrame frames = 3; + * @param array<\Google\Cloud\VideoIntelligence\V1\TextFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TextFrame::class); + $this->frames = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php new file mode 100644 index 000000000000..44afbfdf9242 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php @@ -0,0 +1,195 @@ +google.cloud.videointelligence.v1.TimestampedObject + */ +class TimestampedObject extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized Bounding box in a frame, where the object is located. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; + */ + protected $normalized_bounding_box = null; + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this object. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + */ + protected $time_offset = null; + /** + * Optional. The attributes of the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $attributes; + /** + * Optional. The detected landmarks. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedLandmark landmarks = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $landmarks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $normalized_bounding_box + * Normalized Bounding box in a frame, where the object is located. + * @type \Google\Protobuf\Duration $time_offset + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this object. + * @type array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes + * Optional. The attributes of the object in the bounding box. + * @type array<\Google\Cloud\VideoIntelligence\V1\DetectedLandmark>|\Google\Protobuf\Internal\RepeatedField $landmarks + * Optional. The detected landmarks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Normalized Bounding box in a frame, where the object is located. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; + * @return \Google\Cloud\VideoIntelligence\V1\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); + } + + /** + * Normalized Bounding box in a frame, where the object is located. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; + * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $var + * @return $this + */ + public function setNormalizedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class); + $this->normalized_bounding_box = $var; + + return $this; + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this object. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the video frame for this object. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + + /** + * Optional. The attributes of the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Optional. The attributes of the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\DetectedAttribute::class); + $this->attributes = $arr; + + return $this; + } + + /** + * Optional. The detected landmarks. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedLandmark landmarks = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLandmarks() + { + return $this->landmarks; + } + + /** + * Optional. The detected landmarks. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedLandmark landmarks = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\VideoIntelligence\V1\DetectedLandmark>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLandmarks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\DetectedLandmark::class); + $this->landmarks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php new file mode 100644 index 000000000000..e4ac51167e87 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php @@ -0,0 +1,179 @@ +google.cloud.videointelligence.v1.Track + */ +class Track extends \Google\Protobuf\Internal\Message +{ + /** + * Video segment of a track. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + */ + protected $segment = null; + /** + * The object with timestamp and attributes per frame in the track. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TimestampedObject timestamped_objects = 2; + */ + private $timestamped_objects; + /** + * Optional. Attributes in the track level. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $attributes; + /** + * Optional. The confidence score of the tracked object. + * + * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Video segment of a track. + * @type array<\Google\Cloud\VideoIntelligence\V1\TimestampedObject>|\Google\Protobuf\Internal\RepeatedField $timestamped_objects + * The object with timestamp and attributes per frame in the track. + * @type array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes + * Optional. Attributes in the track level. + * @type float $confidence + * Optional. The confidence score of the tracked object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video segment of a track. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * Video segment of a track. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segment = $var; + + return $this; + } + + /** + * The object with timestamp and attributes per frame in the track. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TimestampedObject timestamped_objects = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimestampedObjects() + { + return $this->timestamped_objects; + } + + /** + * The object with timestamp and attributes per frame in the track. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TimestampedObject timestamped_objects = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\TimestampedObject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimestampedObjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TimestampedObject::class); + $this->timestamped_objects = $arr; + + return $this; + } + + /** + * Optional. Attributes in the track level. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Optional. Attributes in the track level. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\DetectedAttribute::class); + $this->attributes = $arr; + + return $this; + } + + /** + * Optional. The confidence score of the tracked object. + * + * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Optional. The confidence score of the tracked object. + * + * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php new file mode 100644 index 000000000000..e9502cd96acb --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php @@ -0,0 +1,283 @@ +google.cloud.videointelligence.v1.VideoAnnotationProgress + */ +class VideoAnnotationProgress extends \Google\Protobuf\Internal\Message +{ + /** + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * + * Generated from protobuf field string input_uri = 1; + */ + protected $input_uri = ''; + /** + * Approximate percentage processed thus far. Guaranteed to be + * 100 when fully processed. + * + * Generated from protobuf field int32 progress_percent = 2; + */ + protected $progress_percent = 0; + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + */ + protected $start_time = null; + /** + * Time of the most recent update. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * Specifies which feature is being tracked if the request contains more than + * one feature. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Feature feature = 5; + */ + protected $feature = 0; + /** + * Specifies which segment is being tracked if the request contains more than + * one segment. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 6; + */ + protected $segment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_uri + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * @type int $progress_percent + * Approximate percentage processed thus far. Guaranteed to be + * 100 when fully processed. + * @type \Google\Protobuf\Timestamp $start_time + * Time when the request was received. + * @type \Google\Protobuf\Timestamp $update_time + * Time of the most recent update. + * @type int $feature + * Specifies which feature is being tracked if the request contains more than + * one feature. + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Specifies which segment is being tracked if the request contains more than + * one segment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * + * Generated from protobuf field string input_uri = 1; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * + * Generated from protobuf field string input_uri = 1; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + + /** + * Approximate percentage processed thus far. Guaranteed to be + * 100 when fully processed. + * + * Generated from protobuf field int32 progress_percent = 2; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Approximate percentage processed thus far. Guaranteed to be + * 100 when fully processed. + * + * Generated from protobuf field int32 progress_percent = 2; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Time when the request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Time of the most recent update. + * + * 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); + } + + /** + * Time of the most recent update. + * + * 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; + } + + /** + * Specifies which feature is being tracked if the request contains more than + * one feature. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Feature feature = 5; + * @return int + */ + public function getFeature() + { + return $this->feature; + } + + /** + * Specifies which feature is being tracked if the request contains more than + * one feature. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.Feature feature = 5; + * @param int $var + * @return $this + */ + public function setFeature($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\Feature::class); + $this->feature = $var; + + return $this; + } + + /** + * Specifies which segment is being tracked if the request contains more than + * one segment. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 6; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * Specifies which segment is being tracked if the request contains more than + * one segment. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 6; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php new file mode 100644 index 000000000000..e97685870f14 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php @@ -0,0 +1,710 @@ +google.cloud.videointelligence.v1.VideoAnnotationResults + */ +class VideoAnnotationResults extends \Google\Protobuf\Internal\Message +{ + /** + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * + * Generated from protobuf field string input_uri = 1; + */ + protected $input_uri = ''; + /** + * Video segment on which the annotation is run. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 10; + */ + protected $segment = null; + /** + * Topical label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_label_annotations = 2; + */ + private $segment_label_annotations; + /** + * Presence label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. Compared to the + * existing topical `segment_label_annotations`, this field presents more + * fine-grained, segment-level labels detected in video content and is made + * available only when the client sets `LabelDetectionConfig.model` to + * "builtin/latest" in the request. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_presence_label_annotations = 23; + */ + private $segment_presence_label_annotations; + /** + * Topical label annotations on shot level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_label_annotations = 3; + */ + private $shot_label_annotations; + /** + * Presence label annotations on shot level. There is exactly one element for + * each unique label. Compared to the existing topical + * `shot_label_annotations`, this field presents more fine-grained, shot-level + * labels detected in video content and is made available only when the client + * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_presence_label_annotations = 24; + */ + private $shot_presence_label_annotations; + /** + * Label annotations on frame level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation frame_label_annotations = 4; + */ + private $frame_label_annotations; + /** + * Deprecated. Please use `face_detection_annotations` instead. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceAnnotation face_annotations = 5 [deprecated = true]; + * @deprecated + */ + private $face_annotations; + /** + * Face detection annotations. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceDetectionAnnotation face_detection_annotations = 13; + */ + private $face_detection_annotations; + /** + * Shot annotations. Each shot is represented as a video segment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment shot_annotations = 6; + */ + private $shot_annotations; + /** + * Explicit content annotation. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentAnnotation explicit_annotation = 7; + */ + protected $explicit_annotation = null; + /** + * Speech transcription. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechTranscription speech_transcriptions = 11; + */ + private $speech_transcriptions; + /** + * OCR text detection and tracking. + * Annotations for list of detected text snippets. Each will have list of + * frame information associated with it. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextAnnotation text_annotations = 12; + */ + private $text_annotations; + /** + * Annotations for list of objects detected and tracked in video. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingAnnotation object_annotations = 14; + */ + private $object_annotations; + /** + * Annotations for list of logos detected, tracked and recognized in video. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LogoRecognitionAnnotation logo_recognition_annotations = 19; + */ + private $logo_recognition_annotations; + /** + * Person detection annotations. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.PersonDetectionAnnotation person_detection_annotations = 20; + */ + private $person_detection_annotations; + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + * + * Generated from protobuf field .google.rpc.Status error = 9; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_uri + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment + * Video segment on which the annotation is run. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $segment_label_annotations + * Topical label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $segment_presence_label_annotations + * Presence label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. Compared to the + * existing topical `segment_label_annotations`, this field presents more + * fine-grained, segment-level labels detected in video content and is made + * available only when the client sets `LabelDetectionConfig.model` to + * "builtin/latest" in the request. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $shot_label_annotations + * Topical label annotations on shot level. + * There is exactly one element for each unique label. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $shot_presence_label_annotations + * Presence label annotations on shot level. There is exactly one element for + * each unique label. Compared to the existing topical + * `shot_label_annotations`, this field presents more fine-grained, shot-level + * labels detected in video content and is made available only when the client + * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $frame_label_annotations + * Label annotations on frame level. + * There is exactly one element for each unique label. + * @type array<\Google\Cloud\VideoIntelligence\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_annotations + * Deprecated. Please use `face_detection_annotations` instead. + * @type array<\Google\Cloud\VideoIntelligence\V1\FaceDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_detection_annotations + * Face detection annotations. + * @type array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $shot_annotations + * Shot annotations. Each shot is represented as a video segment. + * @type \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation $explicit_annotation + * Explicit content annotation. + * @type array<\Google\Cloud\VideoIntelligence\V1\SpeechTranscription>|\Google\Protobuf\Internal\RepeatedField $speech_transcriptions + * Speech transcription. + * @type array<\Google\Cloud\VideoIntelligence\V1\TextAnnotation>|\Google\Protobuf\Internal\RepeatedField $text_annotations + * OCR text detection and tracking. + * Annotations for list of detected text snippets. Each will have list of + * frame information associated with it. + * @type array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingAnnotation>|\Google\Protobuf\Internal\RepeatedField $object_annotations + * Annotations for list of objects detected and tracked in video. + * @type array<\Google\Cloud\VideoIntelligence\V1\LogoRecognitionAnnotation>|\Google\Protobuf\Internal\RepeatedField $logo_recognition_annotations + * Annotations for list of logos detected, tracked and recognized in video. + * @type array<\Google\Cloud\VideoIntelligence\V1\PersonDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $person_detection_annotations + * Person detection annotations. + * @type \Google\Rpc\Status $error + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * + * Generated from protobuf field string input_uri = 1; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Video file location in + * [Cloud Storage](https://cloud.google.com/storage/). + * + * Generated from protobuf field string input_uri = 1; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + + /** + * Video segment on which the annotation is run. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 10; + * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * Video segment on which the annotation is run. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 10; + * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segment = $var; + + return $this; + } + + /** + * Topical label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_label_annotations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegmentLabelAnnotations() + { + return $this->segment_label_annotations; + } + + /** + * Topical label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_label_annotations = 2; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegmentLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); + $this->segment_label_annotations = $arr; + + return $this; + } + + /** + * Presence label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. Compared to the + * existing topical `segment_label_annotations`, this field presents more + * fine-grained, segment-level labels detected in video content and is made + * available only when the client sets `LabelDetectionConfig.model` to + * "builtin/latest" in the request. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_presence_label_annotations = 23; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegmentPresenceLabelAnnotations() + { + return $this->segment_presence_label_annotations; + } + + /** + * Presence label annotations on video level or user-specified segment level. + * There is exactly one element for each unique label. Compared to the + * existing topical `segment_label_annotations`, this field presents more + * fine-grained, segment-level labels detected in video content and is made + * available only when the client sets `LabelDetectionConfig.model` to + * "builtin/latest" in the request. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_presence_label_annotations = 23; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegmentPresenceLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); + $this->segment_presence_label_annotations = $arr; + + return $this; + } + + /** + * Topical label annotations on shot level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_label_annotations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShotLabelAnnotations() + { + return $this->shot_label_annotations; + } + + /** + * Topical label annotations on shot level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_label_annotations = 3; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShotLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); + $this->shot_label_annotations = $arr; + + return $this; + } + + /** + * Presence label annotations on shot level. There is exactly one element for + * each unique label. Compared to the existing topical + * `shot_label_annotations`, this field presents more fine-grained, shot-level + * labels detected in video content and is made available only when the client + * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_presence_label_annotations = 24; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShotPresenceLabelAnnotations() + { + return $this->shot_presence_label_annotations; + } + + /** + * Presence label annotations on shot level. There is exactly one element for + * each unique label. Compared to the existing topical + * `shot_label_annotations`, this field presents more fine-grained, shot-level + * labels detected in video content and is made available only when the client + * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_presence_label_annotations = 24; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShotPresenceLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); + $this->shot_presence_label_annotations = $arr; + + return $this; + } + + /** + * Label annotations on frame level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation frame_label_annotations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrameLabelAnnotations() + { + return $this->frame_label_annotations; + } + + /** + * Label annotations on frame level. + * There is exactly one element for each unique label. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation frame_label_annotations = 4; + * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrameLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); + $this->frame_label_annotations = $arr; + + return $this; + } + + /** + * Deprecated. Please use `face_detection_annotations` instead. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceAnnotation face_annotations = 5 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getFaceAnnotations() + { + @trigger_error('face_annotations is deprecated.', E_USER_DEPRECATED); + return $this->face_annotations; + } + + /** + * Deprecated. Please use `face_detection_annotations` instead. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceAnnotation face_annotations = 5 [deprecated = true]; + * @param array<\Google\Cloud\VideoIntelligence\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setFaceAnnotations($var) + { + @trigger_error('face_annotations is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceAnnotation::class); + $this->face_annotations = $arr; + + return $this; + } + + /** + * Face detection annotations. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceDetectionAnnotation face_detection_annotations = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFaceDetectionAnnotations() + { + return $this->face_detection_annotations; + } + + /** + * Face detection annotations. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceDetectionAnnotation face_detection_annotations = 13; + * @param array<\Google\Cloud\VideoIntelligence\V1\FaceDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFaceDetectionAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceDetectionAnnotation::class); + $this->face_detection_annotations = $arr; + + return $this; + } + + /** + * Shot annotations. Each shot is represented as a video segment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment shot_annotations = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShotAnnotations() + { + return $this->shot_annotations; + } + + /** + * Shot annotations. Each shot is represented as a video segment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment shot_annotations = 6; + * @param array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShotAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->shot_annotations = $arr; + + return $this; + } + + /** + * Explicit content annotation. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentAnnotation explicit_annotation = 7; + * @return \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation|null + */ + public function getExplicitAnnotation() + { + return $this->explicit_annotation; + } + + public function hasExplicitAnnotation() + { + return isset($this->explicit_annotation); + } + + public function clearExplicitAnnotation() + { + unset($this->explicit_annotation); + } + + /** + * Explicit content annotation. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentAnnotation explicit_annotation = 7; + * @param \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation $var + * @return $this + */ + public function setExplicitAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation::class); + $this->explicit_annotation = $var; + + return $this; + } + + /** + * Speech transcription. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechTranscription speech_transcriptions = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpeechTranscriptions() + { + return $this->speech_transcriptions; + } + + /** + * Speech transcription. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechTranscription speech_transcriptions = 11; + * @param array<\Google\Cloud\VideoIntelligence\V1\SpeechTranscription>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpeechTranscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\SpeechTranscription::class); + $this->speech_transcriptions = $arr; + + return $this; + } + + /** + * OCR text detection and tracking. + * Annotations for list of detected text snippets. Each will have list of + * frame information associated with it. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextAnnotation text_annotations = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTextAnnotations() + { + return $this->text_annotations; + } + + /** + * OCR text detection and tracking. + * Annotations for list of detected text snippets. Each will have list of + * frame information associated with it. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextAnnotation text_annotations = 12; + * @param array<\Google\Cloud\VideoIntelligence\V1\TextAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTextAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TextAnnotation::class); + $this->text_annotations = $arr; + + return $this; + } + + /** + * Annotations for list of objects detected and tracked in video. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingAnnotation object_annotations = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getObjectAnnotations() + { + return $this->object_annotations; + } + + /** + * Annotations for list of objects detected and tracked in video. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingAnnotation object_annotations = 14; + * @param array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setObjectAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\ObjectTrackingAnnotation::class); + $this->object_annotations = $arr; + + return $this; + } + + /** + * Annotations for list of logos detected, tracked and recognized in video. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LogoRecognitionAnnotation logo_recognition_annotations = 19; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogoRecognitionAnnotations() + { + return $this->logo_recognition_annotations; + } + + /** + * Annotations for list of logos detected, tracked and recognized in video. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LogoRecognitionAnnotation logo_recognition_annotations = 19; + * @param array<\Google\Cloud\VideoIntelligence\V1\LogoRecognitionAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogoRecognitionAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LogoRecognitionAnnotation::class); + $this->logo_recognition_annotations = $arr; + + return $this; + } + + /** + * Person detection annotations. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.PersonDetectionAnnotation person_detection_annotations = 20; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPersonDetectionAnnotations() + { + return $this->person_detection_annotations; + } + + /** + * Person detection annotations. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.PersonDetectionAnnotation person_detection_annotations = 20; + * @param array<\Google\Cloud\VideoIntelligence\V1\PersonDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPersonDetectionAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\PersonDetectionAnnotation::class); + $this->person_detection_annotations = $arr; + + return $this; + } + + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + * + * Generated from protobuf field .google.rpc.Status error = 9; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If set, indicates an error. Note that for a single `AnnotateVideoRequest` + * some videos may succeed and some may fail. + * + * Generated from protobuf field .google.rpc.Status error = 9; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php new file mode 100644 index 000000000000..b74187dab46d --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php @@ -0,0 +1,427 @@ +google.cloud.videointelligence.v1.VideoContext + */ +class VideoContext extends \Google\Protobuf\Internal\Message +{ + /** + * Video segments to annotate. The segments may overlap and are not required + * to be contiguous or span the whole video. If unspecified, each video is + * treated as a single segment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 1; + */ + private $segments; + /** + * Config for LABEL_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionConfig label_detection_config = 2; + */ + protected $label_detection_config = null; + /** + * Config for SHOT_CHANGE_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ShotChangeDetectionConfig shot_change_detection_config = 3; + */ + protected $shot_change_detection_config = null; + /** + * Config for EXPLICIT_CONTENT_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + */ + protected $explicit_content_detection_config = null; + /** + * Config for FACE_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.FaceDetectionConfig face_detection_config = 5; + */ + protected $face_detection_config = null; + /** + * Config for SPEECH_TRANSCRIPTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.SpeechTranscriptionConfig speech_transcription_config = 6; + */ + protected $speech_transcription_config = null; + /** + * Config for TEXT_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.TextDetectionConfig text_detection_config = 8; + */ + protected $text_detection_config = null; + /** + * Config for PERSON_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.PersonDetectionConfig person_detection_config = 11; + */ + protected $person_detection_config = null; + /** + * Config for OBJECT_TRACKING. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ObjectTrackingConfig object_tracking_config = 13; + */ + protected $object_tracking_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $segments + * Video segments to annotate. The segments may overlap and are not required + * to be contiguous or span the whole video. If unspecified, each video is + * treated as a single segment. + * @type \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig $label_detection_config + * Config for LABEL_DETECTION. + * @type \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig $shot_change_detection_config + * Config for SHOT_CHANGE_DETECTION. + * @type \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig $explicit_content_detection_config + * Config for EXPLICIT_CONTENT_DETECTION. + * @type \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig $face_detection_config + * Config for FACE_DETECTION. + * @type \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig $speech_transcription_config + * Config for SPEECH_TRANSCRIPTION. + * @type \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig $text_detection_config + * Config for TEXT_DETECTION. + * @type \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig $person_detection_config + * Config for PERSON_DETECTION. + * @type \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig $object_tracking_config + * Config for OBJECT_TRACKING. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Video segments to annotate. The segments may overlap and are not required + * to be contiguous or span the whole video. If unspecified, each video is + * treated as a single segment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSegments() + { + return $this->segments; + } + + /** + * Video segments to annotate. The segments may overlap and are not required + * to be contiguous or span the whole video. If unspecified, each video is + * treated as a single segment. + * + * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 1; + * @param array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); + $this->segments = $arr; + + return $this; + } + + /** + * Config for LABEL_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionConfig label_detection_config = 2; + * @return \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig|null + */ + public function getLabelDetectionConfig() + { + return $this->label_detection_config; + } + + public function hasLabelDetectionConfig() + { + return isset($this->label_detection_config); + } + + public function clearLabelDetectionConfig() + { + unset($this->label_detection_config); + } + + /** + * Config for LABEL_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionConfig label_detection_config = 2; + * @param \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig $var + * @return $this + */ + public function setLabelDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig::class); + $this->label_detection_config = $var; + + return $this; + } + + /** + * Config for SHOT_CHANGE_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * @return \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig|null + */ + public function getShotChangeDetectionConfig() + { + return $this->shot_change_detection_config; + } + + public function hasShotChangeDetectionConfig() + { + return isset($this->shot_change_detection_config); + } + + public function clearShotChangeDetectionConfig() + { + unset($this->shot_change_detection_config); + } + + /** + * Config for SHOT_CHANGE_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ShotChangeDetectionConfig shot_change_detection_config = 3; + * @param \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig $var + * @return $this + */ + public function setShotChangeDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig::class); + $this->shot_change_detection_config = $var; + + return $this; + } + + /** + * Config for EXPLICIT_CONTENT_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * @return \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig|null + */ + public function getExplicitContentDetectionConfig() + { + return $this->explicit_content_detection_config; + } + + public function hasExplicitContentDetectionConfig() + { + return isset($this->explicit_content_detection_config); + } + + public function clearExplicitContentDetectionConfig() + { + unset($this->explicit_content_detection_config); + } + + /** + * Config for EXPLICIT_CONTENT_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; + * @param \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig $var + * @return $this + */ + public function setExplicitContentDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig::class); + $this->explicit_content_detection_config = $var; + + return $this; + } + + /** + * Config for FACE_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.FaceDetectionConfig face_detection_config = 5; + * @return \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig|null + */ + public function getFaceDetectionConfig() + { + return $this->face_detection_config; + } + + public function hasFaceDetectionConfig() + { + return isset($this->face_detection_config); + } + + public function clearFaceDetectionConfig() + { + unset($this->face_detection_config); + } + + /** + * Config for FACE_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.FaceDetectionConfig face_detection_config = 5; + * @param \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig $var + * @return $this + */ + public function setFaceDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig::class); + $this->face_detection_config = $var; + + return $this; + } + + /** + * Config for SPEECH_TRANSCRIPTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.SpeechTranscriptionConfig speech_transcription_config = 6; + * @return \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig|null + */ + public function getSpeechTranscriptionConfig() + { + return $this->speech_transcription_config; + } + + public function hasSpeechTranscriptionConfig() + { + return isset($this->speech_transcription_config); + } + + public function clearSpeechTranscriptionConfig() + { + unset($this->speech_transcription_config); + } + + /** + * Config for SPEECH_TRANSCRIPTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.SpeechTranscriptionConfig speech_transcription_config = 6; + * @param \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig $var + * @return $this + */ + public function setSpeechTranscriptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig::class); + $this->speech_transcription_config = $var; + + return $this; + } + + /** + * Config for TEXT_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.TextDetectionConfig text_detection_config = 8; + * @return \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig|null + */ + public function getTextDetectionConfig() + { + return $this->text_detection_config; + } + + public function hasTextDetectionConfig() + { + return isset($this->text_detection_config); + } + + public function clearTextDetectionConfig() + { + unset($this->text_detection_config); + } + + /** + * Config for TEXT_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.TextDetectionConfig text_detection_config = 8; + * @param \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig $var + * @return $this + */ + public function setTextDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig::class); + $this->text_detection_config = $var; + + return $this; + } + + /** + * Config for PERSON_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.PersonDetectionConfig person_detection_config = 11; + * @return \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig|null + */ + public function getPersonDetectionConfig() + { + return $this->person_detection_config; + } + + public function hasPersonDetectionConfig() + { + return isset($this->person_detection_config); + } + + public function clearPersonDetectionConfig() + { + unset($this->person_detection_config); + } + + /** + * Config for PERSON_DETECTION. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.PersonDetectionConfig person_detection_config = 11; + * @param \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig $var + * @return $this + */ + public function setPersonDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig::class); + $this->person_detection_config = $var; + + return $this; + } + + /** + * Config for OBJECT_TRACKING. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ObjectTrackingConfig object_tracking_config = 13; + * @return \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig|null + */ + public function getObjectTrackingConfig() + { + return $this->object_tracking_config; + } + + public function hasObjectTrackingConfig() + { + return isset($this->object_tracking_config); + } + + public function clearObjectTrackingConfig() + { + unset($this->object_tracking_config); + } + + /** + * Config for OBJECT_TRACKING. + * + * Generated from protobuf field .google.cloud.videointelligence.v1.ObjectTrackingConfig object_tracking_config = 13; + * @param \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig $var + * @return $this + */ + public function setObjectTrackingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig::class); + $this->object_tracking_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php new file mode 100644 index 000000000000..5153eebff212 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php @@ -0,0 +1,129 @@ +google.cloud.videointelligence.v1.VideoSegment + */ +class VideoSegment extends \Google\Protobuf\Internal\Message +{ + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the start of the segment (inclusive). + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + */ + protected $start_time_offset = null; + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the end of the segment (inclusive). + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 2; + */ + protected $end_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_time_offset + * Time-offset, relative to the beginning of the video, + * corresponding to the start of the segment (inclusive). + * @type \Google\Protobuf\Duration $end_time_offset + * Time-offset, relative to the beginning of the video, + * corresponding to the end of the segment (inclusive). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the start of the segment (inclusive). + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the start of the segment (inclusive). + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the end of the segment (inclusive). + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * Time-offset, relative to the beginning of the video, + * corresponding to the end of the segment (inclusive). + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php new file mode 100644 index 000000000000..9e83ca0bd3d6 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php @@ -0,0 +1,281 @@ +google.cloud.videointelligence.v1.WordInfo + */ +class WordInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Time offset relative to the beginning of the audio, and + * corresponding to the start of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration start_time = 1; + */ + protected $start_time = null; + /** + * Time offset relative to the beginning of the audio, and + * corresponding to the end of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration end_time = 2; + */ + protected $end_time = null; + /** + * The word corresponding to this set of information. + * + * Generated from protobuf field string word = 3; + */ + protected $word = ''; + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * + * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = 0.0; + /** + * Output only. A distinct integer value is assigned for every speaker within + * the audio. This field specifies which one of those speakers was detected to + * have spoken this word. Value ranges from 1 up to diarization_speaker_count, + * and is only set if speaker diarization is enabled. + * + * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $speaker_tag = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_time + * Time offset relative to the beginning of the audio, and + * corresponding to the start of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * @type \Google\Protobuf\Duration $end_time + * Time offset relative to the beginning of the audio, and + * corresponding to the end of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * @type string $word + * The word corresponding to this set of information. + * @type float $confidence + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * @type int $speaker_tag + * Output only. A distinct integer value is assigned for every speaker within + * the audio. This field specifies which one of those speakers was detected to + * have spoken this word. Value ranges from 1 up to diarization_speaker_count, + * and is only set if speaker diarization is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); + parent::__construct($data); + } + + /** + * Time offset relative to the beginning of the audio, and + * corresponding to the start of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration start_time = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Time offset relative to the beginning of the audio, and + * corresponding to the start of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration start_time = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time = $var; + + return $this; + } + + /** + * Time offset relative to the beginning of the audio, and + * corresponding to the end of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration end_time = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Time offset relative to the beginning of the audio, and + * corresponding to the end of the spoken word. This field is only set if + * `enable_word_time_offsets=true` and only in the top hypothesis. This is an + * experimental feature and the accuracy of the time offset can vary. + * + * Generated from protobuf field .google.protobuf.Duration end_time = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time = $var; + + return $this; + } + + /** + * The word corresponding to this set of information. + * + * Generated from protobuf field string word = 3; + * @return string + */ + public function getWord() + { + return $this->word; + } + + /** + * The word corresponding to this set of information. + * + * Generated from protobuf field string word = 3; + * @param string $var + * @return $this + */ + public function setWord($var) + { + GPBUtil::checkString($var, True); + $this->word = $var; + + return $this; + } + + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * + * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Output only. The confidence estimate between 0.0 and 1.0. A higher number + * indicates an estimated greater likelihood that the recognized words are + * correct. This field is set only for the top alternative. + * This field is not guaranteed to be accurate and users should not rely on it + * to be always provided. + * The default of 0.0 is a sentinel value indicating `confidence` was not set. + * + * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Output only. A distinct integer value is assigned for every speaker within + * the audio. This field specifies which one of those speakers was detected to + * have spoken this word. Value ranges from 1 up to diarization_speaker_count, + * and is only set if speaker diarization is enabled. + * + * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSpeakerTag() + { + return $this->speaker_tag; + } + + /** + * Output only. A distinct integer value is assigned for every speaker within + * the audio. This field specifies which one of those speakers was detected to + * have spoken this word. Value ranges from 1 up to diarization_speaker_count, + * and is only set if speaker diarization is enabled. + * + * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSpeakerTag($var) + { + GPBUtil::checkInt32($var); + $this->speaker_tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php b/owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php new file mode 100644 index 000000000000..db898623b6b9 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php @@ -0,0 +1,72 @@ +annotateVideo($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AnnotateVideoResponse $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 videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php b/owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php new file mode 100644 index 000000000000..dd4523ab4809 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php @@ -0,0 +1,248 @@ + annotateVideoAsync(AnnotateVideoRequest $request, array $optionalArgs = []) + */ +final class VideoIntelligenceServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.videointelligence.v1.VideoIntelligenceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'videointelligence.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'videointelligence.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/video_intelligence_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/video_intelligence_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/video_intelligence_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/video_intelligence_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videointelligence.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Performs asynchronous video annotation. Progress and results can be + * retrieved through the `google.longrunning.Operations` interface. + * `Operation.metadata` contains `AnnotateVideoProgress` (progress). + * `Operation.response` contains `AnnotateVideoResponse` (results). + * + * The async variant is {@see VideoIntelligenceServiceClient::annotateVideoAsync()} + * . + * + * @example samples/V1/VideoIntelligenceServiceClient/annotate_video.php + * + * @param AnnotateVideoRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 annotateVideo(AnnotateVideoRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AnnotateVideo', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..021ecaf93127 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json @@ -0,0 +1,23 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.videointelligence.v1", + "libraryPackage": "Google\\Cloud\\VideoIntelligence\\V1", + "services": { + "VideoIntelligenceService": { + "clients": { + "grpc": { + "libraryClient": "VideoIntelligenceServiceGapicClient", + "rpcs": { + "AnnotateVideo": { + "methods": [ + "annotateVideo" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json new file mode 100644 index 000000000000..7bf68af5fc25 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json @@ -0,0 +1,40 @@ +{ + "interfaces": { + "google.cloud.videointelligence.v1.VideoIntelligenceService": { + "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": 1000, + "retry_delay_multiplier": 2.5, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AnnotateVideo": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php new file mode 100644 index 000000000000..a02a6c5b3c81 --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php @@ -0,0 +1,39 @@ + [ + 'google.cloud.videointelligence.v1.VideoIntelligenceService' => [ + 'AnnotateVideo' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VideoIntelligence\V1\AnnotateVideoResponse', + 'metadataReturnType' => '\Google\Cloud\VideoIntelligence\V1\AnnotateVideoProgress', + 'initialPollDelayMillis' => '20000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '45000', + 'totalPollTimeoutMillis' => '86400000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php new file mode 100644 index 000000000000..9dfb17be6a1e --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php @@ -0,0 +1,100 @@ + [ + 'google.cloud.videointelligence.v1.VideoIntelligenceService' => [ + 'AnnotateVideo' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/videos:annotate', + 'body' => '*', + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/operations/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/operations/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/operations/{name=projects/*/locations/*/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/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php b/owl-bot-staging/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php new file mode 100644 index 000000000000..7047bc74a24a --- /dev/null +++ b/owl-bot-staging/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php @@ -0,0 +1,238 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VideoIntelligenceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VideoIntelligenceServiceClient($options); + } + + /** @test */ + public function annotateVideoTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/annotateVideoTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AnnotateVideoResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/annotateVideoTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new AnnotateVideoRequest(); + $response = $gapicClient->annotateVideo($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.videointelligence.v1.VideoIntelligenceService/AnnotateVideo', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/annotateVideoTest'); + $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 annotateVideoExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/annotateVideoTest'); + $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); + $request = new AnnotateVideoRequest(); + $response = $gapicClient->annotateVideo($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/annotateVideoTest'); + 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 annotateVideoAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/annotateVideoTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AnnotateVideoResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/annotateVideoTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new AnnotateVideoRequest(); + $response = $gapicClient->annotateVideoAsync($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.videointelligence.v1.VideoIntelligenceService/AnnotateVideo', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/annotateVideoTest'); + $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/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php new file mode 100644 index 0000000000000000000000000000000000000000..9191ca26bfc92841e2fb67d1561213b39fe55dd4 GIT binary patch literal 3877 zcmcIn-EJF26prmUv5ynS*)+v*1#C^ErqHgH6!GIwApXe@)QyGRN))5jdOfyRUGHvp zXVbW-*GPyb0p0>}!v)WP#1)8lfHO0@Yo|$?P>I~cJ2U5-bH4e`nK>VQ;tU;lOWq?E zaWzVMa(67#A(0)|rnYXIa@X(oi7V^&$T3XfDzaQVl1eZL`_%ENr*LQhOB)f-(R3p3H7gB5wVp<`&K^hU zR2fR=Aw%ihi%>cbH@5+FQ}aCeP@us#Amg9ocTGc=J*rXsw{CcC~_-nHd~fI@!1>3rx0l-La8_yK?APlhJ~dbPg;^TuU=MHR9>6;ZWOc z;?icPo{U5WtULjwYIt64B&b6t8)fxJC4!W zHHg`(kfC;D*lxKziE09JmT44N%|{&|AD1_6j~&vfp?IhCf0L6G$WP(&Q@H$;iTsqK&B7Z2B9|W?VW}5HDg;?51oITbDWMj5 zIAX5&Z5(oSlZ=Q(HFwc&unM5%MP{ki(kZ$>4sz)d_tbvzLaz{5WcC;ldTY;gp z3X8u?9yl)7m zgg==0D~aEC;!++mBmX$y$wLA#NHMbp%OeeEf@pQywzT4U$_!EU|P zR@+}T>*|C1t!BM?uzOIis283CECmr%I`^G|%dD(E<$V%Ei9 z60p*A36ic8&qHNaZL4n#P%cTHok4bQho^IH(NWGoQFy9K`!K7!w!q7t_ip|Qm&7L*b2VkG z?4xBBQ%w)6&i+i{`vfeX8fTH75P8JaNns1FUIXa6Sdvus{^F+?iwa8Dplnp_I;?6U zvts5dWHr-7$=eRG)B&o9sXisG!4iI`0#0NI6MqsfmQ7e-Q&D|kLVsCOpb4JsQTIso z@Cl`&BVInuuyB)QHr)43)57c!Q^2Qq6{e`kF(zXVZ-ERB^NXRYI%5nH3-baFrMPZR z__@ddP&e8WUP7$_9pTblMm_kY|4@)&q_LQ^;Np3T#VAHJgGZL(0box-UEMf+wM#vfuBOErhF+Osm z`)z)tISy72EanL$`w}@m<*6tW4S~Q&_q36Nw-?vLkht_2KlEhbyBI8RyKwDQNE;Tu zv{m*x;rC#qCozr$=#P2f3G`HeMKKcuGF_FgK~_B6)o^l3h0kkw~4%9F_>v$Yx)8TQcN8$80v{h8v|6aRzl z-h^xIgGRl2SgWh8!v|kfU%Zf4V5xy^*N)1Twc0z4CSJ~~uv~9c>a|+E#>bg?E?!y0 zCm?f0IA8fQ2J6_vh0dINV^tP{#;VCWoo4J&O)M3UV+A2f1N(G)r#S|8c#{XW)7_r_ z_#rOu@y1T6vc^t4dKK2#iHD@}aP!x2NhfIjg6@yEe_~Y!`@g^9>jJ4<=1}D_FVW@l j1Pq5ZyL0@-bmvCYS=Nhj39j#}H&NV3xuDhQgow%JG| zK~hfKfj8ZB+dt5Cfms&)0bLbE|3iVUT@>h|s{so1oO>^+M{J9l4lt+}7De6j@tkwd z`|`8Tog)X{&TTS_xw_A~x&4!zf5dW*Yx}lg_j3D#g9GN~47=}`J?0j2xk^2^Q*Y<0 zm0J52l6v;QHCQosXxoQ9wr2F~L3i!g>@s_;XC5=pcbVQ_JHEf>GO^SvaBu)i?=#QQ z4VK$%l(w0#cXeOyY;v4VnQ%ILgwxpyaXNeV9|9OX-ScwI01v)|9R4|j{hn#$JYVk?vFA?o;6IQy98W;rM>`ro_}8Gjt{4N!h~G$Jt^lzPNsHZTtOOe3hw z9NtW?2Yd@q{N??;7bBMqlDnVVUfkrru`6^IX9Gm}Kplu$wot~)NntumPB znbx6Z*w%r0m`QPMd^DZ2#wc}}6DwP=My*;|c}=+rsb+h- zp*40}PgY`R#S5)wTYQ_#e}ts8Nkm$!HYZ4vFxRRe4SqhUtjsA_Aij$i@nWZQraptW zM%-Dr4|=j!z{I-7rB^;iwf&MAzPI+JygFU$*#-}UcrUm-UE{jOJN)xB|NBL_Qa;ix zi}k)kud7aYT?E6FOpp297F^?EX}a(0#!;VHzL#0yetbWoZK@%qauXJH%VMNpKEbZPR9wciq8Rhb{I5Q z`Qixr+_Dd4sI0*<$CPc_7pl88` z!KGUZ_T|FDhVPbX)CC=f%ie&ba54p>IpsrMMa&xMzly=qxDhFD!5gi1v#M^_b~d$E zTWy~c|HB0s%N1BspQ^PsEwAk~cH0=&S7A9^qE(yCdUIu7`5q|4n>%&6ID!0MX|?N( z1}2vz&n9iPNoXrq#5eqjzAY5@&r}U=U7RC=2w#kvB@B@gFi*&<)BMM9eaCkDq9ZEX zw%au=bS-5GVlTOhV`4Y)`w6en#P@MJ>JWMZG999OF+q1UO81`_TqR!&cUSos64<&i zUu0oc`r=gIMVtU8@MW#)*nq5W&}x8tSyeRjUf47 zz%u`NcuTnjKj0>-wVu}650twQaTe3~e7ExvlQ( zs#`1Z{GVcw8ivGeSfrThG4xrIn7ngo{gdeugb)S1YDw~Z7Yn%ISLOSV*{Y*=R*|b( z``JX5g;iC3V*}YsL84ME?QX7g@p8Vlvr%993l(fvo~q3q@~Pj(QG|qW(0|ACby%JV zUCL*0a~KC-m{!+*p#`lF7b?AeGY|^hj(7cqpf}B*#b8zFe5`I&K7m!7Pxu;2$smG&M zGNIgnt4GW{Jo1Cv58Ue4Ug8 zd6tnGbMU|t+Dc$1Sqg4r9>p3J!xOeS`M<@ai;vW|W4+D;l7OmQQc0?GdrDm8rmJY6 z=mX!z&BEM$pqo9)-!dSU1KYnicXN;-Lj^U!+K^D$&KQ_@fha&1N2idHHc7N3y5u`kq8w?4lItb!i9>`fsw@(b~%+qS;aE_CC)dn z2eRxJygyt})?rE9q?(xzv4B6~k|CC&qEdM8lg6b>>k;ChRLZd7`5`1kn$I`N& zz(TO!Gcl1}1Q>4eteu1n394fm=9z03bq(bw)ynP`*7-3i`kT8uya<`2iBfB~T&`9t z_#2fZNh-PUdY;xbsyh`bR>nJpqJ5_JE-Q+;ohUVQ;YbssS9^gqMs|hHKx3dc_gUgkvbd=hgkZa)s( zm8P$ehQ1tvTZZ5QcUKIRG-_I}AWTXLJy;BEFY;h4Mw1?%U*T9&OphYW1;pctNNHfz zfbwXQqn`-FZ;nF$w&e_nWSPrakfQNLi^H$sSW0)Fn=vJ8)q47eB}$4_1(lSYQS*%B;{N=HM%Kuc79h`N%?th_$9eKbbScKWiko7{v z?Y9KE2y1mn>dd>p{wZ&P(@|zkBWNlo9o~2n!|^_Nc*Ndg8sbX7no)L6j?fdhslLN- zTF)#)dYU?uO1F`^Z1?-NHHw?nVf7qkD?j0?He#Ie_6tQICgn z4Nfm}UWB>NP{=~?a00?Uo(MO~sEQN9tPll9Rn&50ag-TOk zWzrm}Q)sImamLTj_Ydt?Ux>png73r)i#cci;pmsI z=5m|-MYuwlUW6;~internalAddGeneratedFile( + ' +êO +.google/cloud/video/livestream/v1/service.proto google.cloud.video.livestream.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.proto0google/cloud/video/livestream/v1/resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"µ +CreateAssetRequest7 +parent ( B\'àAúA!livestream.googleapis.com/Asset; +asset ( 2\'.google.cloud.video.livestream.v1.AssetBàA +asset_id ( BàA + +request_id ( "_ +DeleteAssetRequest5 +name ( B\'àAúA! +livestream.googleapis.com/Asset + +request_id ( "• +ListAssetsRequest7 +parent ( B\'àAúA!livestream.googleapis.com/Asset + page_size ( + +page_token (  +filter (  +order_by ( "{ +ListAssetsResponse7 +assets ( 2\'.google.cloud.video.livestream.v1.Asset +next_page_token (  + unreachable ( "H +GetAssetRequest5 +name ( B\'àAúA! +livestream.googleapis.com/Asset"¿ +CreateChannelRequest9 +parent ( B)àAúA#!livestream.googleapis.com/Channel? +channel ( 2).google.cloud.video.livestream.v1.ChannelBàA + +channel_id ( BàA + +request_id ( "™ +ListChannelsRequest9 +parent ( B)àAúA#!livestream.googleapis.com/Channel + page_size ( + +page_token (  +filter (  +order_by ( " +ListChannelsResponse; +channels ( 2).google.cloud.video.livestream.v1.Channel +next_page_token (  + unreachable ( "L +GetChannelRequest7 +name ( B)àAúA# +!livestream.googleapis.com/Channel"r +DeleteChannelRequest7 +name ( B)àAúA# +!livestream.googleapis.com/Channel + +request_id (  +force ("œ +UpdateChannelRequest/ + update_mask ( 2.google.protobuf.FieldMask? +channel ( 2).google.cloud.video.livestream.v1.ChannelBàA + +request_id ( "b +StartChannelRequest7 +name ( B)àAúA# +!livestream.googleapis.com/Channel + +request_id ( "a +StopChannelRequest7 +name ( B)àAúA# +!livestream.googleapis.com/Channel + +request_id ( "µ +CreateInputRequest7 +parent ( B\'àAúA!livestream.googleapis.com/Input; +input ( 2\'.google.cloud.video.livestream.v1.InputBàA +input_id ( BàA + +request_id ( "• +ListInputsRequest7 +parent ( B\'àAúA!livestream.googleapis.com/Input + page_size ( + +page_token (  +filter (  +order_by ( "{ +ListInputsResponse7 +inputs ( 2\'.google.cloud.video.livestream.v1.Input +next_page_token (  + unreachable ( "H +GetInputRequest5 +name ( B\'àAúA! +livestream.googleapis.com/Input"_ +DeleteInputRequest5 +name ( B\'àAúA! +livestream.googleapis.com/Input + +request_id ( "– +UpdateInputRequest/ + update_mask ( 2.google.protobuf.FieldMask; +input ( 2\'.google.cloud.video.livestream.v1.InputBàA + +request_id ( "µ +CreateEventRequest7 +parent ( B\'àAúA!livestream.googleapis.com/Event; +event ( 2\'.google.cloud.video.livestream.v1.EventBàA +event_id ( BàA + +request_id ( "• +ListEventsRequest7 +parent ( B\'àAúA!livestream.googleapis.com/Event + page_size ( + +page_token (  +filter (  +order_by ( "{ +ListEventsResponse7 +events ( 2\'.google.cloud.video.livestream.v1.Event +next_page_token (  + unreachable ( "H +GetEventRequest5 +name ( B\'àAúA! +livestream.googleapis.com/Event"_ +DeleteEventRequest5 +name ( B\'àAúA! +livestream.googleapis.com/Event + +request_id ( " +ChannelOperationResponse"“ +ListClipsRequest6 +parent ( B&àAúA livestream.googleapis.com/Clip + page_size ( + +page_token (  +filter (  +order_by ( "x +ListClipsResponse5 +clips ( 2&.google.cloud.video.livestream.v1.Clip +next_page_token (  + unreachable ( "F +GetClipRequest4 +name ( B&àAúA +livestream.googleapis.com/Clip"µ +CreateClipRequest6 +parent ( B&àAúA livestream.googleapis.com/Clip +clip_id ( BàA9 +clip ( 2&.google.cloud.video.livestream.v1.ClipBàA + +request_id ( BàA"j +DeleteClipRequest4 +name ( B&àAúA +livestream.googleapis.com/Clip + +request_id ( B àAâŒÏ×"ã +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA# +requested_cancellation (BàA + api_version ( BàA"F +GetPoolRequest4 +name ( B&àAúA +livestream.googleapis.com/Pool"“ +UpdatePoolRequest/ + update_mask ( 2.google.protobuf.FieldMask9 +pool ( 2&.google.cloud.video.livestream.v1.PoolBàA + +request_id ( 2Ù( +LivestreamServiceà + CreateChannel6.google.cloud.video.livestream.v1.CreateChannelRequest.google.longrunning.Operation"xÊA +ChannelOperationMetadataÚAparent,channel,channel_id‚Óä“7",/v1/{parent=projects/*/locations/*}/channels:channel¼ + ListChannels5.google.cloud.video.livestream.v1.ListChannelsRequest6.google.cloud.video.livestream.v1.ListChannelsResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/channels© + +GetChannel3.google.cloud.video.livestream.v1.GetChannelRequest).google.cloud.video.livestream.v1.Channel";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/channels/*}Ð + DeleteChannel6.google.cloud.video.livestream.v1.DeleteChannelRequest.google.longrunning.Operation"hÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/channels/*}â + UpdateChannel6.google.cloud.video.livestream.v1.UpdateChannelRequest.google.longrunning.Operation"zÊA +ChannelOperationMetadataÚAchannel,update_mask‚Óä“?24/v1/{channel.name=projects/*/locations/*/channels/*}:channelÚ + StartChannel5.google.cloud.video.livestream.v1.StartChannelRequest.google.longrunning.Operation"tÊA- +ChannelOperationResponseOperationMetadataÚAname‚Óä“7"2/v1/{name=projects/*/locations/*/channels/*}:start:*× + StopChannel4.google.cloud.video.livestream.v1.StopChannelRequest.google.longrunning.Operation"sÊA- +ChannelOperationResponseOperationMetadataÚAname‚Óä“6"1/v1/{name=projects/*/locations/*/channels/*}:stop:*Ò + CreateInput4.google.cloud.video.livestream.v1.CreateInputRequest.google.longrunning.Operation"nÊA +InputOperationMetadataÚAparent,input,input_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/inputs:input´ + +ListInputs3.google.cloud.video.livestream.v1.ListInputsRequest4.google.cloud.video.livestream.v1.ListInputsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/inputs¡ +GetInput1.google.cloud.video.livestream.v1.GetInputRequest\'.google.cloud.video.livestream.v1.Input"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/inputs/*}Ê + DeleteInput4.google.cloud.video.livestream.v1.DeleteInputRequest.google.longrunning.Operation"fÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/inputs/*}Ô + UpdateInput4.google.cloud.video.livestream.v1.UpdateInputRequest.google.longrunning.Operation"pÊA +InputOperationMetadataÚAinput,update_mask‚Óä“920/v1/{input.name=projects/*/locations/*/inputs/*}:inputÊ + CreateEvent4.google.cloud.video.livestream.v1.CreateEventRequest\'.google.cloud.video.livestream.v1.Event"\\ÚAparent,event,event_id‚Óä“>"5/v1/{parent=projects/*/locations/*/channels/*}/events:event¿ + +ListEvents3.google.cloud.video.livestream.v1.ListEventsRequest4.google.cloud.video.livestream.v1.ListEventsResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*/channels/*}/events¬ +GetEvent1.google.cloud.video.livestream.v1.GetEventRequest\'.google.cloud.video.livestream.v1.Event"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/channels/*/events/*}¡ + DeleteEvent4.google.cloud.video.livestream.v1.DeleteEventRequest.google.protobuf.Empty"DÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/channels/*/events/*}» + ListClips2.google.cloud.video.livestream.v1.ListClipsRequest3.google.cloud.video.livestream.v1.ListClipsResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*/channels/*}/clips¨ +GetClip0.google.cloud.video.livestream.v1.GetClipRequest&.google.cloud.video.livestream.v1.Clip"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/channels/*/clips/*}Ö + +CreateClip3.google.cloud.video.livestream.v1.CreateClipRequest.google.longrunning.Operation"tÊA +ClipOperationMetadataÚAparent,clip,clip_id‚Óä“<"4/v1/{parent=projects/*/locations/*/channels/*}/clips:clipÒ + +DeleteClip3.google.cloud.video.livestream.v1.DeleteClipRequest.google.longrunning.Operation"pÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“6*4/v1/{name=projects/*/locations/*/channels/*/clips/*}Ò + CreateAsset4.google.cloud.video.livestream.v1.CreateAssetRequest.google.longrunning.Operation"nÊA +AssetOperationMetadataÚAparent,asset,asset_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/assets:assetÊ + DeleteAsset4.google.cloud.video.livestream.v1.DeleteAssetRequest.google.longrunning.Operation"fÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/assets/*}¡ +GetAsset1.google.cloud.video.livestream.v1.GetAssetRequest\'.google.cloud.video.livestream.v1.Asset"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/assets/*}´ + +ListAssets3.google.cloud.video.livestream.v1.ListAssetsRequest4.google.cloud.video.livestream.v1.ListAssetsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/assets +GetPool0.google.cloud.video.livestream.v1.GetPoolRequest&.google.cloud.video.livestream.v1.Pool"8ÚAname‚Óä“+)/v1/{name=projects/*/locations/*/pools/*}Í + +UpdatePool3.google.cloud.video.livestream.v1.UpdatePoolRequest.google.longrunning.Operation"kÊA +PoolOperationMetadataÚApool,update_mask‚Óä“62./v1/{pool.name=projects/*/locations/*/pools/*}:poolMÊAlivestream.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¡ +$com.google.cloud.video.livestream.v1B ServiceProtoPZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampbª Google.Cloud.Video.LiveStream.V1Ê Google\\Cloud\\Video\\LiveStream\\V1ê$Google::Cloud::Video::LiveStream::V1êAd +*secretmanager.googleapis.com/SecretVersion6projects/{project}/secrets/{secret}/versions/{version}êAN +compute.googleapis.com/Network,projects/{project}/global/networks/{network}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php new file mode 100644 index 000000000000..bf34809341f8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php @@ -0,0 +1,424 @@ +google.cloud.video.livestream.v1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the asset, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Based64-encoded CRC32c checksum of the asset file. For more information, + * see the crc32c checksum of the [Cloud Storage Objects + * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). + * If crc32c is omitted or left empty when the asset is created, this field is + * filled by the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If + * crc32c is set, the asset can't be created if the crc32c value does not + * match with the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. + * + * Generated from protobuf field string crc32c = 7; + */ + protected $crc32c = ''; + /** + * Output only. The state of the asset resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Only present when `state` is `ERROR`. The reason for the error + * state of the asset. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + protected $resource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the asset, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset $video + * VideoAsset represents a video. + * @type \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset $image + * ImageAsset represents an image. + * @type string $crc32c + * Based64-encoded CRC32c checksum of the asset file. For more information, + * see the crc32c checksum of the [Cloud Storage Objects + * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). + * If crc32c is omitted or left empty when the asset is created, this field is + * filled by the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If + * crc32c is set, the asset can't be created if the crc32c value does not + * match with the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. + * @type int $state + * Output only. The state of the asset resource. + * @type \Google\Rpc\Status $error + * Output only. Only present when `state` is `ERROR`. The reason for the error + * state of the asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the asset, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the asset, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * 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 creation time. + * + * 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 creation time. + * + * 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 time. + * + * 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 time. + * + * 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; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * 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; + } + + /** + * VideoAsset represents a video. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.VideoAsset video = 5; + * @return \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset|null + */ + public function getVideo() + { + return $this->readOneof(5); + } + + public function hasVideo() + { + return $this->hasOneof(5); + } + + /** + * VideoAsset represents a video. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.VideoAsset video = 5; + * @param \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset $var + * @return $this + */ + public function setVideo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * ImageAsset represents an image. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.ImageAsset image = 6; + * @return \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset|null + */ + public function getImage() + { + return $this->readOneof(6); + } + + public function hasImage() + { + return $this->hasOneof(6); + } + + /** + * ImageAsset represents an image. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.ImageAsset image = 6; + * @param \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Based64-encoded CRC32c checksum of the asset file. For more information, + * see the crc32c checksum of the [Cloud Storage Objects + * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). + * If crc32c is omitted or left empty when the asset is created, this field is + * filled by the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If + * crc32c is set, the asset can't be created if the crc32c value does not + * match with the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. + * + * Generated from protobuf field string crc32c = 7; + * @return string + */ + public function getCrc32C() + { + return $this->crc32c; + } + + /** + * Based64-encoded CRC32c checksum of the asset file. For more information, + * see the crc32c checksum of the [Cloud Storage Objects + * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). + * If crc32c is omitted or left empty when the asset is created, this field is + * filled by the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If + * crc32c is set, the asset can't be created if the crc32c value does not + * match with the crc32c checksum of the Cloud Storage object indicated by + * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or + * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. + * + * Generated from protobuf field string crc32c = 7; + * @param string $var + * @return $this + */ + public function setCrc32C($var) + { + GPBUtil::checkString($var, True); + $this->crc32c = $var; + + return $this; + } + + /** + * Output only. The state of the asset resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the asset resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Asset\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Only present when `state` is `ERROR`. The reason for the error + * state of the asset. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Only present when `state` is `ERROR`. The reason for the error + * state of the asset. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * @return string + */ + public function getResource() + { + return $this->whichOneof("resource"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php new file mode 100644 index 000000000000..c4c6f34514b4 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php @@ -0,0 +1,70 @@ +google.cloud.video.livestream.v1.Asset.ImageAsset + */ +class ImageAsset extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImageAsset::class, \Google\Cloud\Video\LiveStream\V1\Asset_ImageAsset::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php new file mode 100644 index 000000000000..4e41f6461532 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php @@ -0,0 +1,78 @@ +google.cloud.video.livestream.v1.Asset.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The asset is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The asset is ready for use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The asset is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The asset has an error. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Asset_State::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php new file mode 100644 index 000000000000..31acfd1216f6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php @@ -0,0 +1,72 @@ +google.cloud.video.livestream.v1.Asset.VideoAsset + */ +class VideoAsset extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VideoAsset::class, \Google\Cloud\Video\LiveStream\V1\Asset_VideoAsset::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php new file mode 100644 index 000000000000..183a21001565 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php @@ -0,0 +1,135 @@ +google.cloud.video.livestream.v1.AudioFormat + */ +class AudioFormat extends \Google\Protobuf\Internal\Message +{ + /** + * Audio codec used in this audio stream. + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * The number of audio channels. + * + * Generated from protobuf field int32 channel_count = 2; + */ + protected $channel_count = 0; + /** + * A list of channel names specifying the layout of the audio channels. + * + * Generated from protobuf field repeated string channel_layout = 3; + */ + private $channel_layout; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * Audio codec used in this audio stream. + * @type int $channel_count + * The number of audio channels. + * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout + * A list of channel names specifying the layout of the audio channels. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Audio codec used in this audio stream. + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * Audio codec used in this audio stream. + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * The number of audio channels. + * + * Generated from protobuf field int32 channel_count = 2; + * @return int + */ + public function getChannelCount() + { + return $this->channel_count; + } + + /** + * The number of audio channels. + * + * Generated from protobuf field int32 channel_count = 2; + * @param int $var + * @return $this + */ + public function setChannelCount($var) + { + GPBUtil::checkInt32($var); + $this->channel_count = $var; + + return $this; + } + + /** + * A list of channel names specifying the layout of the audio channels. + * + * Generated from protobuf field repeated string channel_layout = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelLayout() + { + return $this->channel_layout; + } + + /** + * A list of channel names specifying the layout of the audio channels. + * + * Generated from protobuf field repeated string channel_layout = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelLayout($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channel_layout = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php new file mode 100644 index 000000000000..004559384953 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php @@ -0,0 +1,327 @@ +google.cloud.video.livestream.v1.AudioStream + */ +class AudioStream extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * + * Generated from protobuf field bool transmux = 8; + */ + protected $transmux = false; + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + */ + protected $channel_count = 0; + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + */ + private $channel_layout; + /** + * The mapping for the input streams and audio channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; + */ + private $mapping; + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + */ + protected $sample_rate_hertz = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $transmux + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * @type string $codec + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * @type int $bitrate_bps + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * @type int $channel_count + * Number of audio channels. Must be between 1 and 6. The default is 2. + * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping + * The mapping for the input streams and audio channels. + * @type int $sample_rate_hertz + * The audio sample rate in Hertz. The default is 48000 Hertz. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * + * Generated from protobuf field bool transmux = 8; + * @return bool + */ + public function getTransmux() + { + return $this->transmux; + } + + /** + * Specifies whether pass through (transmuxing) is enabled or not. + * If set to `true`, the rest of the settings, other than `mapping`, will be + * ignored. The default is `false`. + * + * Generated from protobuf field bool transmux = 8; + * @param bool $var + * @return $this + */ + public function setTransmux($var) + { + GPBUtil::checkBool($var); + $this->transmux = $var; + + return $this; + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @return int + */ + public function getChannelCount() + { + return $this->channel_count; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @param int $var + * @return $this + */ + public function setChannelCount($var) + { + GPBUtil::checkInt32($var); + $this->channel_count = $var; + + return $this; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelLayout() + { + return $this->channel_layout; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `[fl, fr]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelLayout($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channel_layout = $arr; + + return $this; + } + + /** + * The mapping for the input streams and audio channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * The mapping for the input streams and audio channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; + * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping::class); + $this->mapping = $arr; + + return $this; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php new file mode 100644 index 000000000000..032ef41bd53a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php @@ -0,0 +1,246 @@ +google.cloud.video.livestream.v1.AudioStream.AudioMapping + */ +class AudioMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * + * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_key = ''; + /** + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * + * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_track = 0; + /** + * Required. The zero-based index of the channel in the input stream. + * + * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_channel = 0; + /** + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * + * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_channel = 0; + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 5; + */ + protected $gain_db = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_key + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * @type int $input_track + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * @type int $input_channel + * Required. The zero-based index of the channel in the input stream. + * @type int $output_channel + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * @type float $gain_db + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * + * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * Required. The `Channel` + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that identifies the input that this audio mapping applies to. If an + * active input doesn't have an audio mapping, the primary audio track in + * the input stream will be selected. + * + * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + + /** + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * + * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputTrack() + { + return $this->input_track; + } + + /** + * Required. The zero-based index of the track in the input stream. + * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in + * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must + * have the same input track. + * + * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputTrack($var) + { + GPBUtil::checkInt32($var); + $this->input_track = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the input stream. + * + * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputChannel() + { + return $this->input_channel; + } + + /** + * Required. The zero-based index of the channel in the input stream. + * + * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputChannel($var) + { + GPBUtil::checkInt32($var); + $this->input_channel = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * + * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOutputChannel() + { + return $this->output_channel; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * Must be consistent with the + * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. + * + * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOutputChannel($var) + { + GPBUtil::checkInt32($var); + $this->output_channel = $var; + + return $this; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 5; + * @return float + */ + public function getGainDb() + { + return $this->gain_db; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 5; + * @param float $var + * @return $this + */ + public function setGainDb($var) + { + GPBUtil::checkDouble($var); + $this->gain_db = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AudioMapping::class, \Google\Cloud\Video\LiveStream\V1\AudioStream_AudioMapping::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php new file mode 100644 index 000000000000..320aecc20086 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php @@ -0,0 +1,111 @@ +google.cloud.video.livestream.v1.AudioStreamProperty + */ +class AudioStreamProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Index of this audio stream. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Properties of the audio format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; + */ + protected $audio_format = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * Index of this audio stream. + * @type \Google\Cloud\Video\LiveStream\V1\AudioFormat $audio_format + * Properties of the audio format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Index of this audio stream. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Index of this audio stream. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Properties of the audio format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; + * @return \Google\Cloud\Video\LiveStream\V1\AudioFormat|null + */ + public function getAudioFormat() + { + return $this->audio_format; + } + + public function hasAudioFormat() + { + return isset($this->audio_format); + } + + public function clearAudioFormat() + { + unset($this->audio_format); + } + + /** + * Properties of the audio format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; + * @param \Google\Cloud\Video\LiveStream\V1\AudioFormat $var + * @return $this + */ + public function setAudioFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioFormat::class); + $this->audio_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php new file mode 100644 index 000000000000..6218cc4acbdf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php @@ -0,0 +1,827 @@ +google.cloud.video.livestream.v1.Channel + */ +class Channel extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; + */ + private $input_attachments; + /** + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * + * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active_input = ''; + /** + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output = null; + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; + */ + private $elementary_streams; + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; + */ + private $mux_streams; + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; + */ + private $manifests; + /** + * List of output sprite sheets. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; + */ + private $sprite_sheets; + /** + * Output only. State of the streaming operation. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $streaming_state = 0; + /** + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * + * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $streaming_error = null; + /** + * Configuration of platform logs for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; + */ + protected $log_config = null; + /** + * Configuration of timecode for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; + */ + protected $timecode_config = null; + /** + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; + */ + private $encryptions; + /** + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; + */ + protected $input_config = null; + /** + * Optional. Configuration for retention of output files for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.RetentionConfig retention_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retention_config = null; + /** + * Optional. List of static overlay images. Those images display over the + * output content for the whole duration of the live stream. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.StaticOverlay static_overlays = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $static_overlays; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $input_attachments + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * @type string $active_input + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * @type \Google\Cloud\Video\LiveStream\V1\Channel\Output $output + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * @type array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of elementary streams. + * @type array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams + * List of multiplexing settings for output streams. + * @type array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests + * List of output manifests. + * @type array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets + * List of output sprite sheets. + * @type int $streaming_state + * Output only. State of the streaming operation. + * @type \Google\Rpc\Status $streaming_error + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * @type \Google\Cloud\Video\LiveStream\V1\LogConfig $log_config + * Configuration of platform logs for this channel. + * @type \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $timecode_config + * Configuration of timecode for this channel. + * @type array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $encryptions + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * @type \Google\Cloud\Video\LiveStream\V1\InputConfig $input_config + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * @type \Google\Cloud\Video\LiveStream\V1\RetentionConfig $retention_config + * Optional. Configuration for retention of output files for this channel. + * @type array<\Google\Cloud\Video\LiveStream\V1\StaticOverlay>|\Google\Protobuf\Internal\RepeatedField $static_overlays + * Optional. List of static overlay images. Those images display over the + * output content for the whole duration of the live stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the channel, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 creation time. + * + * 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 creation time. + * + * 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 time. + * + * 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 time. + * + * 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; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * 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; + } + + /** + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputAttachments() + { + return $this->input_attachments; + } + + /** + * A list of input attachments that this channel uses. + * One channel can have multiple inputs as the input sources. Only one + * input can be selected as the input source at one time. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; + * @param array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\InputAttachment::class); + $this->input_attachments = $arr; + + return $this; + } + + /** + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * + * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getActiveInput() + { + return $this->active_input; + } + + /** + * Output only. The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * that serves as the current input source. The first input in the + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] + * is the initial input source. + * + * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setActiveInput($var) + { + GPBUtil::checkString($var, True); + $this->active_input = $var; + + return $this; + } + + /** + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Channel\Output|null + */ + public function getOutput() + { + return $this->output; + } + + public function hasOutput() + { + return isset($this->output); + } + + public function clearOutput() + { + unset($this->output); + } + + /** + * Required. Information about the output (that is, the Cloud Storage bucket + * to store the generated live stream). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Channel\Output $var + * @return $this + */ + public function setOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel\Output::class); + $this->output = $var; + + return $this; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; + * @param array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\ElementaryStream::class); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; + * @param array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\MuxStream::class); + $this->mux_streams = $arr; + + return $this; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManifests() + { + return $this->manifests; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; + * @param array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManifests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Manifest::class); + $this->manifests = $arr; + + return $this; + } + + /** + * List of output sprite sheets. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpriteSheets() + { + return $this->sprite_sheets; + } + + /** + * List of output sprite sheets. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; + * @param array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpriteSheets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\SpriteSheet::class); + $this->sprite_sheets = $arr; + + return $this; + } + + /** + * Output only. State of the streaming operation. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStreamingState() + { + return $this->streaming_state; + } + + /** + * Output only. State of the streaming operation. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStreamingState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Channel\StreamingState::class); + $this->streaming_state = $var; + + return $this; + } + + /** + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * + * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getStreamingError() + { + return $this->streaming_error; + } + + public function hasStreamingError() + { + return isset($this->streaming_error); + } + + public function clearStreamingError() + { + unset($this->streaming_error); + } + + /** + * Output only. A description of the reason for the streaming error. This + * property is always present when + * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] + * is + * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. + * + * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStreamingError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->streaming_error = $var; + + return $this; + } + + /** + * Configuration of platform logs for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; + * @return \Google\Cloud\Video\LiveStream\V1\LogConfig|null + */ + public function getLogConfig() + { + return $this->log_config; + } + + public function hasLogConfig() + { + return isset($this->log_config); + } + + public function clearLogConfig() + { + unset($this->log_config); + } + + /** + * Configuration of platform logs for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; + * @param \Google\Cloud\Video\LiveStream\V1\LogConfig $var + * @return $this + */ + public function setLogConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\LogConfig::class); + $this->log_config = $var; + + return $this; + } + + /** + * Configuration of timecode for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; + * @return \Google\Cloud\Video\LiveStream\V1\TimecodeConfig|null + */ + public function getTimecodeConfig() + { + return $this->timecode_config; + } + + public function hasTimecodeConfig() + { + return isset($this->timecode_config); + } + + public function clearTimecodeConfig() + { + unset($this->timecode_config); + } + + /** + * Configuration of timecode for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; + * @param \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $var + * @return $this + */ + public function setTimecodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig::class); + $this->timecode_config = $var; + + return $this; + } + + /** + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEncryptions() + { + return $this->encryptions; + } + + /** + * Encryption configurations for this channel. Each configuration has an ID + * which is referred to by each MuxStream to indicate which configuration is + * used for that output. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; + * @param array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEncryptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Encryption::class); + $this->encryptions = $arr; + + return $this; + } + + /** + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; + * @return \Google\Cloud\Video\LiveStream\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * The configuration for input sources defined in + * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; + * @param \Google\Cloud\Video\LiveStream\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Optional. Configuration for retention of output files for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.RetentionConfig retention_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Video\LiveStream\V1\RetentionConfig|null + */ + public function getRetentionConfig() + { + return $this->retention_config; + } + + public function hasRetentionConfig() + { + return isset($this->retention_config); + } + + public function clearRetentionConfig() + { + unset($this->retention_config); + } + + /** + * Optional. Configuration for retention of output files for this channel. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.RetentionConfig retention_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Video\LiveStream\V1\RetentionConfig $var + * @return $this + */ + public function setRetentionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\RetentionConfig::class); + $this->retention_config = $var; + + return $this; + } + + /** + * Optional. List of static overlay images. Those images display over the + * output content for the whole duration of the live stream. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.StaticOverlay static_overlays = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStaticOverlays() + { + return $this->static_overlays; + } + + /** + * Optional. List of static overlay images. Those images display over the + * output content for the whole duration of the live stream. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.StaticOverlay static_overlays = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Video\LiveStream\V1\StaticOverlay>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStaticOverlays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\StaticOverlay::class); + $this->static_overlays = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php new file mode 100644 index 000000000000..1124a8488084 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php @@ -0,0 +1,70 @@ +google.cloud.video.livestream.v1.Channel.Output + */ +class Output extends \Google\Protobuf\Internal\Message +{ + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Output::class, \Google\Cloud\Video\LiveStream\V1\Channel_Output::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php new file mode 100644 index 000000000000..87b538780fb8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php @@ -0,0 +1,104 @@ +google.cloud.video.livestream.v1.Channel.StreamingState + */ +class StreamingState +{ + /** + * Streaming state is not specified. + * + * Generated from protobuf enum STREAMING_STATE_UNSPECIFIED = 0; + */ + const STREAMING_STATE_UNSPECIFIED = 0; + /** + * Channel is getting the input stream, generating the live streams to the + * specified output location. + * + * Generated from protobuf enum STREAMING = 1; + */ + const STREAMING = 1; + /** + * Channel is waiting for the input stream through the input. + * + * Generated from protobuf enum AWAITING_INPUT = 2; + */ + const AWAITING_INPUT = 2; + /** + * Channel is running, but has trouble publishing the live streams onto the + * specified output location (for example, the specified Cloud Storage + * bucket is not writable). + * + * Generated from protobuf enum STREAMING_ERROR = 4; + */ + const STREAMING_ERROR = 4; + /** + * Channel is generating live streams with no input stream. Live streams are + * filled out with black screen, while input stream is missing. + * Not supported yet. + * + * Generated from protobuf enum STREAMING_NO_INPUT = 5; + */ + const STREAMING_NO_INPUT = 5; + /** + * Channel is stopped, finishing live streams. + * + * Generated from protobuf enum STOPPED = 6; + */ + const STOPPED = 6; + /** + * Channel is starting. + * + * Generated from protobuf enum STARTING = 7; + */ + const STARTING = 7; + /** + * Channel is stopping. + * + * Generated from protobuf enum STOPPING = 8; + */ + const STOPPING = 8; + + private static $valueToName = [ + self::STREAMING_STATE_UNSPECIFIED => 'STREAMING_STATE_UNSPECIFIED', + self::STREAMING => 'STREAMING', + self::AWAITING_INPUT => 'AWAITING_INPUT', + self::STREAMING_ERROR => 'STREAMING_ERROR', + self::STREAMING_NO_INPUT => 'STREAMING_NO_INPUT', + self::STOPPED => 'STOPPED', + self::STARTING => 'STARTING', + self::STOPPING => 'STOPPING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StreamingState::class, \Google\Cloud\Video\LiveStream\V1\Channel_StreamingState::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php new file mode 100644 index 000000000000..df5cc4567242 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php @@ -0,0 +1,33 @@ +google.cloud.video.livestream.v1.ChannelOperationResponse + */ +class ChannelOperationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php new file mode 100644 index 000000000000..105269ba8790 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php @@ -0,0 +1,471 @@ +google.cloud.video.livestream.v1.Clip + */ +class Clip extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the clip, in the following format: + * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. + * `{clipId}` is a user-specified resource id that conforms to the following + * criteria: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation timestamp of the clip resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the clip request starts to be processed. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The update timestamp of the clip resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels associated with this resource. Each label is a key-value pair. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * Output only. The state of the clip. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Specify the `output_uri` to determine where to place the clip segments and + * clip manifest files in Cloud Storage. The manifests specified in + * `clip_manifests` fields will be placed under this URI. The exact URI of the + * generated manifests will be provided in `clip_manifests.output_uri` for + * each manifest. + * Example: + * "output_uri": "gs://my-bucket/clip-outputs" + * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" + * + * Generated from protobuf field string output_uri = 7; + */ + protected $output_uri = ''; + /** + * Output only. An error object that describes the reason for the failure. + * This property only presents when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * The specified ranges of segments to generate a clip. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.Slice slices = 10; + */ + private $slices; + /** + * Required. A list of clip manifests. Currently only one clip manifest is + * allowed. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.ClipManifest clip_manifests = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + private $clip_manifests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the clip, in the following format: + * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. + * `{clipId}` is a user-specified resource id that conforms to the following + * criteria: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the clip resource. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The timestamp when the clip request starts to be processed. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp of the clip resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this resource. Each label is a key-value pair. + * @type int $state + * Output only. The state of the clip. + * @type string $output_uri + * Specify the `output_uri` to determine where to place the clip segments and + * clip manifest files in Cloud Storage. The manifests specified in + * `clip_manifests` fields will be placed under this URI. The exact URI of the + * generated manifests will be provided in `clip_manifests.output_uri` for + * each manifest. + * Example: + * "output_uri": "gs://my-bucket/clip-outputs" + * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" + * @type \Google\Rpc\Status $error + * Output only. An error object that describes the reason for the failure. + * This property only presents when `state` is `FAILED`. + * @type array<\Google\Cloud\Video\LiveStream\V1\Clip\Slice>|\Google\Protobuf\Internal\RepeatedField $slices + * The specified ranges of segments to generate a clip. + * @type array<\Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest>|\Google\Protobuf\Internal\RepeatedField $clip_manifests + * Required. A list of clip manifests. Currently only one clip manifest is + * allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the clip, in the following format: + * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. + * `{clipId}` is a user-specified resource id that conforms to the following + * criteria: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the clip, in the following format: + * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. + * `{clipId}` is a user-specified resource id that conforms to the following + * criteria: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * 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 creation timestamp of the clip resource. + * + * 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 creation timestamp of the clip resource. + * + * 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 timestamp when the clip request starts to be processed. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The timestamp when the clip request starts to be processed. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp of the clip resource. + * + * 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 of the clip resource. + * + * 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; + } + + /** + * The labels associated with this resource. Each label is a key-value pair. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this resource. Each label is a key-value pair. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The state of the clip. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the clip. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Clip\State::class); + $this->state = $var; + + return $this; + } + + /** + * Specify the `output_uri` to determine where to place the clip segments and + * clip manifest files in Cloud Storage. The manifests specified in + * `clip_manifests` fields will be placed under this URI. The exact URI of the + * generated manifests will be provided in `clip_manifests.output_uri` for + * each manifest. + * Example: + * "output_uri": "gs://my-bucket/clip-outputs" + * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" + * + * Generated from protobuf field string output_uri = 7; + * @return string + */ + public function getOutputUri() + { + return $this->output_uri; + } + + /** + * Specify the `output_uri` to determine where to place the clip segments and + * clip manifest files in Cloud Storage. The manifests specified in + * `clip_manifests` fields will be placed under this URI. The exact URI of the + * generated manifests will be provided in `clip_manifests.output_uri` for + * each manifest. + * Example: + * "output_uri": "gs://my-bucket/clip-outputs" + * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" + * + * Generated from protobuf field string output_uri = 7; + * @param string $var + * @return $this + */ + public function setOutputUri($var) + { + GPBUtil::checkString($var, True); + $this->output_uri = $var; + + return $this; + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property only presents when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property only presents when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * The specified ranges of segments to generate a clip. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.Slice slices = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSlices() + { + return $this->slices; + } + + /** + * The specified ranges of segments to generate a clip. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.Slice slices = 10; + * @param array<\Google\Cloud\Video\LiveStream\V1\Clip\Slice>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSlices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Clip\Slice::class); + $this->slices = $arr; + + return $this; + } + + /** + * Required. A list of clip manifests. Currently only one clip manifest is + * allowed. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.ClipManifest clip_manifests = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClipManifests() + { + return $this->clip_manifests; + } + + /** + * Required. A list of clip manifests. Currently only one clip manifest is + * allowed. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.ClipManifest clip_manifests = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClipManifests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest::class); + $this->clip_manifests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php new file mode 100644 index 000000000000..7837bde82c67 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php @@ -0,0 +1,132 @@ +google.cloud.video.livestream.v1.Clip.ClipManifest + */ +class ClipManifest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A unique key that identifies a manifest config in the parent + * channel. This key is the same as `channel.manifests.key` for the selected + * manifest. + * + * Generated from protobuf field string manifest_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $manifest_key = ''; + /** + * Output only. The output URI of the generated clip manifest. This field + * will be populated when the CreateClip request is accepted. Current output + * format is provided below but may change in the future. Please read this + * field to get the uri to the generated clip manifest. Format: + * {clip.output_uri}/{channel.manifest.fileName} Example: + * gs://my-bucket/clip-outputs/main.m3u8 + * + * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $output_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $manifest_key + * Required. A unique key that identifies a manifest config in the parent + * channel. This key is the same as `channel.manifests.key` for the selected + * manifest. + * @type string $output_uri + * Output only. The output URI of the generated clip manifest. This field + * will be populated when the CreateClip request is accepted. Current output + * format is provided below but may change in the future. Please read this + * field to get the uri to the generated clip manifest. Format: + * {clip.output_uri}/{channel.manifest.fileName} Example: + * gs://my-bucket/clip-outputs/main.m3u8 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. A unique key that identifies a manifest config in the parent + * channel. This key is the same as `channel.manifests.key` for the selected + * manifest. + * + * Generated from protobuf field string manifest_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManifestKey() + { + return $this->manifest_key; + } + + /** + * Required. A unique key that identifies a manifest config in the parent + * channel. This key is the same as `channel.manifests.key` for the selected + * manifest. + * + * Generated from protobuf field string manifest_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManifestKey($var) + { + GPBUtil::checkString($var, True); + $this->manifest_key = $var; + + return $this; + } + + /** + * Output only. The output URI of the generated clip manifest. This field + * will be populated when the CreateClip request is accepted. Current output + * format is provided below but may change in the future. Please read this + * field to get the uri to the generated clip manifest. Format: + * {clip.output_uri}/{channel.manifest.fileName} Example: + * gs://my-bucket/clip-outputs/main.m3u8 + * + * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOutputUri() + { + return $this->output_uri; + } + + /** + * Output only. The output URI of the generated clip manifest. This field + * will be populated when the CreateClip request is accepted. Current output + * format is provided below but may change in the future. Please read this + * field to get the uri to the generated clip manifest. Format: + * {clip.output_uri}/{channel.manifest.fileName} Example: + * gs://my-bucket/clip-outputs/main.m3u8 + * + * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOutputUri($var) + { + GPBUtil::checkString($var, True); + $this->output_uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClipManifest::class, \Google\Cloud\Video\LiveStream\V1\Clip_ClipManifest::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php new file mode 100644 index 000000000000..772ffb023629 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php @@ -0,0 +1,78 @@ +google.cloud.video.livestream.v1.Clip.Slice + */ +class Slice extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice $time_slice + * A slice in form of a tuple of Unix epoch time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A slice in form of a tuple of Unix epoch time. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.TimeSlice time_slice = 1; + * @return \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice|null + */ + public function getTimeSlice() + { + return $this->readOneof(1); + } + + public function hasTimeSlice() + { + return $this->hasOneof(1); + } + + /** + * A slice in form of a tuple of Unix epoch time. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.TimeSlice time_slice = 1; + * @param \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice $var + * @return $this + */ + public function setTimeSlice($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Slice::class, \Google\Cloud\Video\LiveStream\V1\Clip_Slice::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php new file mode 100644 index 000000000000..4fcadc9db8e8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php @@ -0,0 +1,81 @@ +google.cloud.video.livestream.v1.Clip.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The operation is pending to be picked up by the server. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The server admitted this create clip request, and + * outputs are under processing. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Outputs are available in the specified Cloud Storage bucket. For + * additional information, see the `outputs` field. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The operation has failed. For additional information, see the `error` + * field. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::CREATING => 'CREATING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Clip_State::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php new file mode 100644 index 000000000000..ac88f0b4d794 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php @@ -0,0 +1,125 @@ +google.cloud.video.livestream.v1.Clip.TimeSlice + */ +class TimeSlice extends \Google\Protobuf\Internal\Message +{ + /** + * The mark-in Unix epoch time in the original live stream manifest. + * + * Generated from protobuf field .google.protobuf.Timestamp markin_time = 1; + */ + protected $markin_time = null; + /** + * The mark-out Unix epoch time in the original live stream manifest. + * + * Generated from protobuf field .google.protobuf.Timestamp markout_time = 2; + */ + protected $markout_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $markin_time + * The mark-in Unix epoch time in the original live stream manifest. + * @type \Google\Protobuf\Timestamp $markout_time + * The mark-out Unix epoch time in the original live stream manifest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The mark-in Unix epoch time in the original live stream manifest. + * + * Generated from protobuf field .google.protobuf.Timestamp markin_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMarkinTime() + { + return $this->markin_time; + } + + public function hasMarkinTime() + { + return isset($this->markin_time); + } + + public function clearMarkinTime() + { + unset($this->markin_time); + } + + /** + * The mark-in Unix epoch time in the original live stream manifest. + * + * Generated from protobuf field .google.protobuf.Timestamp markin_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMarkinTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->markin_time = $var; + + return $this; + } + + /** + * The mark-out Unix epoch time in the original live stream manifest. + * + * Generated from protobuf field .google.protobuf.Timestamp markout_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMarkoutTime() + { + return $this->markout_time; + } + + public function hasMarkoutTime() + { + return isset($this->markout_time); + } + + public function clearMarkoutTime() + { + unset($this->markout_time); + } + + /** + * The mark-out Unix epoch time in the original live stream manifest. + * + * Generated from protobuf field .google.protobuf.Timestamp markout_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMarkoutTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->markout_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeSlice::class, \Google\Cloud\Video\LiveStream\V1\Clip_TimeSlice::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php new file mode 100644 index 000000000000..101635a63526 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateAssetRequest + */ +class CreateAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The asset resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset = null; + /** + * Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string asset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Asset $asset Required. The asset resource to be created. + * @param string $assetId Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateAssetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\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 location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\Video\LiveStream\V1\Asset $asset + * Required. The asset resource to be created. + * @type string $asset_id + * Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `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. The parent location for the resource, in the form of: + * `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; + } + + /** + * Required. The asset resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\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 resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string asset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * Required. The ID of the asset resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string asset_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php new file mode 100644 index 000000000000..6945278c5aa1 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateChannelRequest + */ +class CreateChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The channel resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel = null; + /** + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be created. + * @param string $channelId Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateChannelRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\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. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel + * Required. The channel resource to be created. + * @type string $channel_id + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `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. The parent location for the resource, in the form of: + * `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; + } + + /** + * Required. The channel resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * Required. The channel resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getChannelId() + { + return $this->channel_id; + } + + /** + * Required. The ID of the channel resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setChannelId($var) + { + GPBUtil::checkString($var, True); + $this->channel_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php new file mode 100644 index 000000000000..bb1d6b657ceb --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php @@ -0,0 +1,253 @@ +google.cloud.video.livestream.v1.CreateClipRequest + */ +class CreateClipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object in the following form: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * Generated from protobuf field string clip_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $clip_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip clip = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $clip = 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. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Clip $clip Required. The resource being created + * @param string $clipId Required. Id of the requesting object in the following form: + * + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateClipRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Clip $clip, string $clipId): self + { + return (new self()) + ->setParent($parent) + ->setClip($clip) + ->setClipId($clipId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}`. + * @type string $clip_id + * Required. Id of the requesting object in the following form: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * @type \Google\Cloud\Video\LiveStream\V1\Clip $clip + * 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}`. + * + * 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 in the following form: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * Generated from protobuf field string clip_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClipId() + { + return $this->clip_id; + } + + /** + * Required. Id of the requesting object in the following form: + * 1. 1 character minimum, 63 characters maximum + * 2. Only contains letters, digits, underscores, and hyphens + * + * Generated from protobuf field string clip_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClipId($var) + { + GPBUtil::checkString($var, True); + $this->clip_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip clip = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Clip|null + */ + public function getClip() + { + return $this->clip; + } + + public function hasClip() + { + return isset($this->clip); + } + + public function clearClip() + { + unset($this->clip); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Clip clip = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Clip $var + * @return $this + */ + public function setClip($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Clip::class); + $this->clip = $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php new file mode 100644 index 000000000000..821c7f956b9e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateEventRequest + */ +class CreateEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The event resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + /** + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Event $event Required. The event resource to be created. + * @param string $eventId Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateEventRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\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. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type \Google\Cloud\Video\LiveStream\V1\Event $event + * Required. The event resource to be created. + * @type string $event_id + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 event resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The event resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event::class); + $this->event = $var; + + return $this; + } + + /** + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * Required. The ID of the event resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkString($var, True); + $this->event_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php new file mode 100644 index 000000000000..839b2d4d046e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php @@ -0,0 +1,252 @@ +google.cloud.video.livestream.v1.CreateInputRequest + */ +class CreateInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The input resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be created. + * @param string $inputId Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * @return \Google\Cloud\Video\LiveStream\V1\CreateInputRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Input $input, string $inputId): self + { + return (new self()) + ->setParent($parent) + ->setInput($input) + ->setInputId($inputId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\Video\LiveStream\V1\Input $input + * Required. The input resource to be created. + * @type string $input_id + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `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. The parent location for the resource, in the form of: + * `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; + } + + /** + * Required. The input resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The input resource to be created. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); + $this->input = $var; + + return $this; + } + + /** + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputId() + { + return $this->input_id; + } + + /** + * Required. The ID of the input resource to be created. + * This value must be 1-63 characters, begin and end with `[a-z0-9]`, + * could contain dashes (-) in between. + * + * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputId($var) + { + GPBUtil::checkString($var, True); + $this->input_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php new file mode 100644 index 000000000000..6265ac92c35e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.DeleteAssetRequest + */ +class DeleteAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the asset resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the asset resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. Please see + * {@see LivestreamServiceClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\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 resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the asset resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * 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 resource, in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php new file mode 100644 index 000000000000..e5ad476fe21d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php @@ -0,0 +1,206 @@ +google.cloud.video.livestream.v1.DeleteChannelRequest + */ +class DeleteChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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; + */ + protected $request_id = ''; + /** + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * + * Generated from protobuf field bool force = 3; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest + * + * @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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * + * Generated from protobuf field bool force = 3; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If the `force` field is set to the default value of `false`, you must + * delete all of a channel's events before you can delete the channel itself. + * If the field is set to `true`, requests to delete a channel also delete + * associated channel events. + * + * Generated from protobuf field bool force = 3; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php new file mode 100644 index 000000000000..51f4566069c1 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.DeleteClipRequest + */ +class DeleteClipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the clip resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the clip resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. Please see + * {@see LivestreamServiceClient::clipName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\DeleteClipRequest + * + * @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 clip resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the clip resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + * + * 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 clip resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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, (.google.api.field_info) = { + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php new file mode 100644 index 000000000000..870470706fe4 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.DeleteEventRequest + */ +class DeleteEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see + * {@see LivestreamServiceClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\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. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * 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 event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php new file mode 100644 index 000000000000..457d3d144f65 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.DeleteInputRequest + */ +class DeleteInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see + * {@see LivestreamServiceClient::inputName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\DeleteInputRequest + * + * @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 input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * 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 input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php new file mode 100644 index 000000000000..b5c05a4a2e52 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php @@ -0,0 +1,185 @@ +google.cloud.video.livestream.v1.ElementaryStream + */ +class ElementaryStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this elementary stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 4; + */ + protected $key = ''; + protected $elementary_stream; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this elementary stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * @type \Google\Cloud\Video\LiveStream\V1\VideoStream $video_stream + * Encoding of a video stream. + * @type \Google\Cloud\Video\LiveStream\V1\AudioStream $audio_stream + * Encoding of an audio stream. + * @type \Google\Cloud\Video\LiveStream\V1\TextStream $text_stream + * Encoding of a text stream. For example, closed captions or subtitles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this elementary stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this elementary stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; + * @return \Google\Cloud\Video\LiveStream\V1\VideoStream|null + */ + public function getVideoStream() + { + return $this->readOneof(1); + } + + public function hasVideoStream() + { + return $this->hasOneof(1); + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; + * @param \Google\Cloud\Video\LiveStream\V1\VideoStream $var + * @return $this + */ + public function setVideoStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; + * @return \Google\Cloud\Video\LiveStream\V1\AudioStream|null + */ + public function getAudioStream() + { + return $this->readOneof(2); + } + + public function hasAudioStream() + { + return $this->hasOneof(2); + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; + * @param \Google\Cloud\Video\LiveStream\V1\AudioStream $var + * @return $this + */ + public function setAudioStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioStream::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; + * @return \Google\Cloud\Video\LiveStream\V1\TextStream|null + */ + public function getTextStream() + { + return $this->readOneof(3); + } + + public function hasTextStream() + { + return $this->hasOneof(3); + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; + * @param \Google\Cloud\Video\LiveStream\V1\TextStream $var + * @return $this + */ + public function setTextStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TextStream::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getElementaryStream() + { + return $this->whichOneof("elementary_stream"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php new file mode 100644 index 000000000000..dd8f1862eecf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php @@ -0,0 +1,273 @@ +google.cloud.video.livestream.v1.Encryption + */ +class Encryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier for this set of encryption options. The ID must be + * 1-63 characters in length. The ID must begin and end with a letter + * (regardless of case) or a number, but can contain dashes or underscores in + * between. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Required. Configuration for DRM systems. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $drm_systems = null; + protected $secret_source; + protected $encryption_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. Identifier for this set of encryption options. The ID must be + * 1-63 characters in length. The ID must begin and end with a letter + * (regardless of case) or a number, but can contain dashes or underscores in + * between. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $secret_manager_key_source + * For keys stored in Google Secret Manager. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $drm_systems + * Required. Configuration for DRM systems. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $aes128 + * Configuration for HLS AES-128 encryption. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $sample_aes + * Configuration for HLS SAMPLE-AES encryption. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $mpeg_cenc + * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier for this set of encryption options. The ID must be + * 1-63 characters in length. The ID must begin and end with a letter + * (regardless of case) or a number, but can contain dashes or underscores in + * between. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. Identifier for this set of encryption options. The ID must be + * 1-63 characters in length. The ID must begin and end with a letter + * (regardless of case) or a number, but can contain dashes or underscores in + * between. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * For keys stored in Google Secret Manager. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource|null + */ + public function getSecretManagerKeySource() + { + return $this->readOneof(7); + } + + public function hasSecretManagerKeySource() + { + return $this->hasOneof(7); + } + + /** + * For keys stored in Google Secret Manager. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $var + * @return $this + */ + public function setSecretManagerKeySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Required. Configuration for DRM systems. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems|null + */ + public function getDrmSystems() + { + return $this->drm_systems; + } + + public function hasDrmSystems() + { + return isset($this->drm_systems); + } + + public function clearDrmSystems() + { + unset($this->drm_systems); + } + + /** + * Required. Configuration for DRM systems. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $var + * @return $this + */ + public function setDrmSystems($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems::class); + $this->drm_systems = $var; + + return $this; + } + + /** + * Configuration for HLS AES-128 encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption|null + */ + public function getAes128() + { + return $this->readOneof(4); + } + + public function hasAes128() + { + return $this->hasOneof(4); + } + + /** + * Configuration for HLS AES-128 encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $var + * @return $this + */ + public function setAes128($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Configuration for HLS SAMPLE-AES encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption|null + */ + public function getSampleAes() + { + return $this->readOneof(5); + } + + public function hasSampleAes() + { + return $this->hasOneof(5); + } + + /** + * Configuration for HLS SAMPLE-AES encryption. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $var + * @return $this + */ + public function setSampleAes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption|null + */ + public function getMpegCenc() + { + return $this->readOneof(6); + } + + public function hasMpegCenc() + { + return $this->hasOneof(6); + } + + /** + * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $var + * @return $this + */ + public function setMpegCenc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getSecretSource() + { + return $this->whichOneof("secret_source"); + } + + /** + * @return string + */ + public function getEncryptionMode() + { + return $this->whichOneof("encryption_mode"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php new file mode 100644 index 000000000000..1903c805f7fb --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Aes128Encryption + */ +class Aes128Encryption extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aes128Encryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Aes128Encryption::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php new file mode 100644 index 000000000000..cf2a3c4ff2de --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Clearkey + */ +class Clearkey extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Clearkey::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Clearkey::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php new file mode 100644 index 000000000000..c0123be1577a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php @@ -0,0 +1,213 @@ +google.cloud.video.livestream.v1.Encryption.DrmSystems + */ +class DrmSystems extends \Google\Protobuf\Internal\Message +{ + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; + */ + protected $widevine = null; + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; + */ + protected $fairplay = null; + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; + */ + protected $playready = null; + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; + */ + protected $clearkey = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $widevine + * Widevine configuration. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $fairplay + * Fairplay configuration. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $playready + * Playready configuration. + * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $clearkey + * Clearkey configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine|null + */ + public function getWidevine() + { + return $this->widevine; + } + + public function hasWidevine() + { + return isset($this->widevine); + } + + public function clearWidevine() + { + unset($this->widevine); + } + + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $var + * @return $this + */ + public function setWidevine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine::class); + $this->widevine = $var; + + return $this; + } + + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay|null + */ + public function getFairplay() + { + return $this->fairplay; + } + + public function hasFairplay() + { + return isset($this->fairplay); + } + + public function clearFairplay() + { + unset($this->fairplay); + } + + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $var + * @return $this + */ + public function setFairplay($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay::class); + $this->fairplay = $var; + + return $this; + } + + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Playready|null + */ + public function getPlayready() + { + return $this->playready; + } + + public function hasPlayready() + { + return isset($this->playready); + } + + public function clearPlayready() + { + unset($this->playready); + } + + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $var + * @return $this + */ + public function setPlayready($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Playready::class); + $this->playready = $var; + + return $this; + } + + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; + * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey|null + */ + public function getClearkey() + { + return $this->clearkey; + } + + public function hasClearkey() + { + return isset($this->clearkey); + } + + public function clearClearkey() + { + unset($this->clearkey); + } + + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; + * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $var + * @return $this + */ + public function setClearkey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey::class); + $this->clearkey = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DrmSystems::class, \Google\Cloud\Video\LiveStream\V1\Encryption_DrmSystems::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php new file mode 100644 index 000000000000..dc53b5d3a7d9 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Fairplay + */ +class Fairplay extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Fairplay::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Fairplay::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php new file mode 100644 index 000000000000..828acd25e267 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php @@ -0,0 +1,78 @@ +google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption + */ +class MpegCommonEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * + * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scheme = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scheme + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * + * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScheme() + { + return $this->scheme; + } + + /** + * Required. Specify the encryption scheme, supported schemes: + * - `cenc` - AES-CTR subsample + * - `cbcs`- AES-CBC subsample pattern + * + * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScheme($var) + { + GPBUtil::checkString($var, True); + $this->scheme = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MpegCommonEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_MpegCommonEncryption::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php new file mode 100644 index 000000000000..a1296c0e2581 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Playready + */ +class Playready extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Playready::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Playready::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php new file mode 100644 index 000000000000..566b81c20da9 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.SampleAesEncryption + */ +class SampleAesEncryption extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SampleAesEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SampleAesEncryption::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php new file mode 100644 index 000000000000..0cd575268442 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php @@ -0,0 +1,74 @@ +google.cloud.video.livestream.v1.Encryption.SecretManagerSource + */ +class SecretManagerSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $secret_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_version + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSecretVersion() + { + return $this->secret_version; + } + + /** + * Required. The name of the Secret Version containing the encryption key. + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecretVersion($var) + { + GPBUtil::checkString($var, True); + $this->secret_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecretManagerSource::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SecretManagerSource::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php new file mode 100644 index 000000000000..a14e8b2be44b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Encryption.Widevine + */ +class Widevine extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Widevine::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Widevine::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php new file mode 100644 index 000000000000..bfd03c15ae6e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php @@ -0,0 +1,601 @@ +google.cloud.video.livestream.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * + * Generated from protobuf field bool execute_now = 9; + */ + protected $execute_now = false; + /** + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; + */ + protected $execution_time = null; + /** + * Output only. The state of the event. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + protected $task; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $input_switch + * Switches to another input stream. + * @type \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $ad_break + * Inserts a new ad opportunity. + * @type \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $return_to_program + * Stops any running ad break. + * @type \Google\Cloud\Video\LiveStream\V1\Event\SlateTask $slate + * Inserts a slate. + * @type \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $mute + * Mutes the stream. + * @type \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $unmute + * Unmutes the stream. + * @type bool $execute_now + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * @type \Google\Protobuf\Timestamp $execution_time + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * @type int $state + * Output only. The state of the event. + * @type \Google\Rpc\Status $error + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the event, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * 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 creation time. + * + * 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 creation time. + * + * 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 time. + * + * 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 time. + * + * 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; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * 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; + } + + /** + * Switches to another input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5; + * @return \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask|null + */ + public function getInputSwitch() + { + return $this->readOneof(5); + } + + public function hasInputSwitch() + { + return $this->hasOneof(5); + } + + /** + * Switches to another input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5; + * @param \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $var + * @return $this + */ + public function setInputSwitch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Inserts a new ad opportunity. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6; + * @return \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask|null + */ + public function getAdBreak() + { + return $this->readOneof(6); + } + + public function hasAdBreak() + { + return $this->hasOneof(6); + } + + /** + * Inserts a new ad opportunity. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6; + * @param \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $var + * @return $this + */ + public function setAdBreak($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Stops any running ad break. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13; + * @return \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask|null + */ + public function getReturnToProgram() + { + return $this->readOneof(13); + } + + public function hasReturnToProgram() + { + return $this->hasOneof(13); + } + + /** + * Stops any running ad break. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13; + * @param \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $var + * @return $this + */ + public function setReturnToProgram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Inserts a slate. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.SlateTask slate = 14; + * @return \Google\Cloud\Video\LiveStream\V1\Event\SlateTask|null + */ + public function getSlate() + { + return $this->readOneof(14); + } + + public function hasSlate() + { + return $this->hasOneof(14); + } + + /** + * Inserts a slate. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.SlateTask slate = 14; + * @param \Google\Cloud\Video\LiveStream\V1\Event\SlateTask $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\SlateTask::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Mutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15; + * @return \Google\Cloud\Video\LiveStream\V1\Event\MuteTask|null + */ + public function getMute() + { + return $this->readOneof(15); + } + + public function hasMute() + { + return $this->hasOneof(15); + } + + /** + * Mutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15; + * @param \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $var + * @return $this + */ + public function setMute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\MuteTask::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Unmutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16; + * @return \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask|null + */ + public function getUnmute() + { + return $this->readOneof(16); + } + + public function hasUnmute() + { + return $this->hasOneof(16); + } + + /** + * Unmutes the stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16; + * @param \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $var + * @return $this + */ + public function setUnmute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * + * Generated from protobuf field bool execute_now = 9; + * @return bool + */ + public function getExecuteNow() + { + return $this->execute_now; + } + + /** + * When this field is set to true, the event will be executed at the earliest + * time that the server can schedule the event and + * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] + * will be populated with the time that the server actually schedules the + * event. + * + * Generated from protobuf field bool execute_now = 9; + * @param bool $var + * @return $this + */ + public function setExecuteNow($var) + { + GPBUtil::checkBool($var); + $this->execute_now = $var; + + return $this; + } + + /** + * The time to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; + * @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 to execute the event. If you set + * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `true`, then do not set this field in the `CreateEvent` request. In + * this case, the server schedules the event and populates this field. If you + * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to + * `false`, then you must set this field to at least 10 seconds in the future + * or else the event can't be created. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExecutionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->execution_time = $var; + + return $this; + } + + /** + * Output only. The state of the event. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the event. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Event\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * @return string + */ + public function getTask() + { + return $this->whichOneof("task"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php new file mode 100644 index 000000000000..31d381b2eedf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php @@ -0,0 +1,80 @@ +google.cloud.video.livestream.v1.Event.AdBreakTask + */ +class AdBreakTask extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of an ad opportunity. Must be greater than 0. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration of an ad opportunity. Must be greater than 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Duration of an ad opportunity. Must be greater than 0. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @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 an ad opportunity. Must be greater than 0. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AdBreakTask::class, \Google\Cloud\Video\LiveStream\V1\Event_AdBreakTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php new file mode 100644 index 000000000000..bae050a14d8b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php @@ -0,0 +1,78 @@ +google.cloud.video.livestream.v1.Event.InputSwitchTask + */ +class InputSwitchTask extends \Google\Protobuf\Internal\Message +{ + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * + * Generated from protobuf field string input_key = 1; + */ + protected $input_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_key + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * + * Generated from protobuf field string input_key = 1; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] + * of the input to switch to. + * + * Generated from protobuf field string input_key = 1; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InputSwitchTask::class, \Google\Cloud\Video\LiveStream\V1\Event_InputSwitchTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php new file mode 100644 index 000000000000..f080a8603fb6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php @@ -0,0 +1,84 @@ +google.cloud.video.livestream.v1.Event.MuteTask + */ +class MuteTask extends \Google\Protobuf\Internal\Message +{ + /** + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Duration for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @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 for which the stream should be muted. If omitted, the stream + * will be muted until an UnmuteTask event is sent. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_MuteTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php new file mode 100644 index 000000000000..f544f6fa571e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php @@ -0,0 +1,37 @@ +google.cloud.video.livestream.v1.Event.ReturnToProgramTask + */ +class ReturnToProgramTask extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReturnToProgramTask::class, \Google\Cloud\Video\LiveStream\V1\Event_ReturnToProgramTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php new file mode 100644 index 000000000000..5338379a6c45 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php @@ -0,0 +1,130 @@ +google.cloud.video.livestream.v1.Event.SlateTask + */ +class SlateTask extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Duration of the slate. Must be greater than 0 if specified. + * Omit this field for a long running slate. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + /** + * Slate asset to use for the duration. If its duration is less than the + * duration of the SlateTask, then the slate loops. The slate must be + * represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { + */ + protected $asset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Optional. Duration of the slate. Must be greater than 0 if specified. + * Omit this field for a long running slate. + * @type string $asset + * Slate asset to use for the duration. If its duration is less than the + * duration of the SlateTask, then the slate loops. The slate must be + * represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Duration of the slate. Must be greater than 0 if specified. + * Omit this field for a long running slate. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Optional. Duration of the slate. Must be greater than 0 if specified. + * Omit this field for a long running slate. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Slate asset to use for the duration. If its duration is less than the + * duration of the SlateTask, then the slate loops. The slate must be + * represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Slate asset to use for the duration. If its duration is less than the + * duration of the SlateTask, then the slate loops. The slate must be + * represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * + * 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->asset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SlateTask::class, \Google\Cloud\Video\LiveStream\V1\Event_SlateTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php new file mode 100644 index 000000000000..fd2043aa0168 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php @@ -0,0 +1,92 @@ +google.cloud.video.livestream.v1.Event.State + */ +class State +{ + /** + * Event state is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Event is scheduled but not executed yet. + * + * Generated from protobuf enum SCHEDULED = 1; + */ + const SCHEDULED = 1; + /** + * Event is being executed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * Event has been successfully executed. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * Event fails to be executed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * Event has been created but not scheduled yet. + * + * Generated from protobuf enum PENDING = 5; + */ + const PENDING = 5; + /** + * Event was stopped before running for its full duration. + * + * Generated from protobuf enum STOPPED = 6; + */ + const STOPPED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SCHEDULED => 'SCHEDULED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::PENDING => 'PENDING', + self::STOPPED => 'STOPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Event_State::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php new file mode 100644 index 000000000000..e1994b1a8638 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php @@ -0,0 +1,36 @@ +google.cloud.video.livestream.v1.Event.UnmuteTask + */ +class UnmuteTask extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnmuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_UnmuteTask::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php new file mode 100644 index 000000000000..9077122dea4c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetAssetRequest + */ +class GetAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/assets/{asset}`. + * + * 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, in the following form: + * `projects/{project}/locations/{location}/assets/{asset}`. Please see + * {@see LivestreamServiceClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\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. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/assets/{asset}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/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. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php new file mode 100644 index 000000000000..2050793dd1f3 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetChannelRequest + */ +class GetChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetChannelRequest + * + * @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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php new file mode 100644 index 000000000000..196bd5fc919d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetClipRequest + */ +class GetClipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + * + * 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, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. Please see + * {@see LivestreamServiceClient::clipName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetClipRequest + * + * @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, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + * + * 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, in the following form: + * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php new file mode 100644 index 000000000000..cc2a65775439 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetEventRequest + */ +class GetEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * 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 event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see + * {@see LivestreamServiceClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\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. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * 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 event resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php new file mode 100644 index 000000000000..da3712d40ecf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetInputRequest + */ +class GetInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * 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 input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see + * {@see LivestreamServiceClient::inputName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetInputRequest + * + * @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 input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * 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 input resource, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php new file mode 100644 index 000000000000..413d850b4b53 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.livestream.v1.GetPoolRequest + */ +class GetPoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * + * 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 pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. Please see + * {@see LivestreamServiceClient::poolName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\GetPoolRequest + * + * @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 pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * + * 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 pool resource, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php new file mode 100644 index 000000000000..804f7b0d808c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php @@ -0,0 +1,460 @@ +google.cloud.video.livestream.v1.Input + */ +class Input extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Source type. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; + */ + protected $type = 0; + /** + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; + */ + protected $tier = 0; + /** + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * + * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; + */ + protected $preprocessing_config = null; + /** + * Security rule for access control. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; + */ + protected $security_rules = null; + /** + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $input_stream_property = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type int $type + * Source type. + * @type int $tier + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * @type string $uri + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $preprocessing_config + * Preprocessing configurations. + * @type \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $security_rules + * Security rule for access control. + * @type \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $input_stream_property + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * 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 creation time. + * + * 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 creation time. + * + * 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 time. + * + * 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 time. + * + * 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; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * 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; + } + + /** + * Source type. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Source type. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; + * @return int + */ + public function getTier() + { + return $this->tier; + } + + /** + * Tier defines the maximum input specification that is accepted by the + * video pipeline. The billing is charged based on the tier specified here. + * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. + * The default is `HD`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; + * @param int $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Tier::class); + $this->tier = $var; + + return $this; + } + + /** + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * + * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. URI to push the input stream to. + * Its format depends on the input + * [type][google.cloud.video.livestream.v1.Input.type], for example: + * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` + * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` + * + * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig|null + */ + public function getPreprocessingConfig() + { + return $this->preprocessing_config; + } + + public function hasPreprocessingConfig() + { + return isset($this->preprocessing_config); + } + + public function clearPreprocessingConfig() + { + unset($this->preprocessing_config); + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $var + * @return $this + */ + public function setPreprocessingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig::class); + $this->preprocessing_config = $var; + + return $this; + } + + /** + * Security rule for access control. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; + * @return \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule|null + */ + public function getSecurityRules() + { + return $this->security_rules; + } + + public function hasSecurityRules() + { + return isset($this->security_rules); + } + + public function clearSecurityRules() + { + unset($this->security_rules); + } + + /** + * Security rule for access control. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; + * @param \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $var + * @return $this + */ + public function setSecurityRules($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule::class); + $this->security_rules = $var; + + return $this; + } + + /** + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Video\LiveStream\V1\InputStreamProperty|null + */ + public function getInputStreamProperty() + { + return $this->input_stream_property; + } + + public function hasInputStreamProperty() + { + return isset($this->input_stream_property); + } + + public function clearInputStreamProperty() + { + unset($this->input_stream_property); + } + + /** + * Output only. The information for the input stream. This field will be + * present only when this input receives the input stream. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $var + * @return $this + */ + public function setInputStreamProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputStreamProperty::class); + $this->input_stream_property = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php new file mode 100644 index 000000000000..c5c7244181e5 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php @@ -0,0 +1,80 @@ +google.cloud.video.livestream.v1.Input.SecurityRule + */ +class SecurityRule extends \Google\Protobuf\Internal\Message +{ + /** + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * + * Generated from protobuf field repeated string ip_ranges = 1; + */ + private $ip_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * + * Generated from protobuf field repeated string ip_ranges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpRanges() + { + return $this->ip_ranges; + } + + /** + * At least one ip range must match unless none specified. The IP range is + * defined by CIDR block: for example, `192.0.1.0/24` for a range and + * `192.0.1.0/32` for a single IP address. + * + * Generated from protobuf field repeated string ip_ranges = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_ranges = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecurityRule::class, \Google\Cloud\Video\LiveStream\V1\Input_SecurityRule::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php new file mode 100644 index 000000000000..e1cc73c68de0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php @@ -0,0 +1,71 @@ +google.cloud.video.livestream.v1.Input.Tier + */ +class Tier +{ + /** + * Tier is not specified. + * + * Generated from protobuf enum TIER_UNSPECIFIED = 0; + */ + const TIER_UNSPECIFIED = 0; + /** + * Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. + * + * Generated from protobuf enum SD = 1; + */ + const SD = 1; + /** + * Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. + * + * Generated from protobuf enum HD = 2; + */ + const HD = 2; + /** + * Resolution <= 4096x2160. Not supported yet. + * + * Generated from protobuf enum UHD = 3; + */ + const UHD = 3; + + private static $valueToName = [ + self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', + self::SD => 'SD', + self::HD => 'HD', + self::UHD => 'UHD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tier::class, \Google\Cloud\Video\LiveStream\V1\Input_Tier::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php new file mode 100644 index 000000000000..2008bef32975 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php @@ -0,0 +1,64 @@ +google.cloud.video.livestream.v1.Input.Type + */ +class Type +{ + /** + * Input type is not specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Input will take an rtmp input stream. + * + * Generated from protobuf enum RTMP_PUSH = 1; + */ + const RTMP_PUSH = 1; + /** + * Input will take an srt (Secure Reliable Transport) input stream. + * + * Generated from protobuf enum SRT_PUSH = 2; + */ + const SRT_PUSH = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::RTMP_PUSH => 'RTMP_PUSH', + self::SRT_PUSH => 'SRT_PUSH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Video\LiveStream\V1\Input_Type::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php new file mode 100644 index 000000000000..51845017da34 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php @@ -0,0 +1,157 @@ +google.cloud.video.livestream.v1.InputAttachment + */ +class InputAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this input attachment. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { + */ + protected $input = ''; + /** + * Automatic failover configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; + */ + protected $automatic_failover = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this input attachment. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * @type string $input + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * @type \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $automatic_failover + * Automatic failover configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this input attachment. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this input attachment. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getInput() + { + return $this->input; + } + + /** + * The resource name of an existing input, in the form of: + * `projects/{project}/locations/{location}/inputs/{inputId}`. + * + * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkString($var, True); + $this->input = $var; + + return $this; + } + + /** + * Automatic failover configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; + * @return \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover|null + */ + public function getAutomaticFailover() + { + return $this->automatic_failover; + } + + public function hasAutomaticFailover() + { + return isset($this->automatic_failover); + } + + public function clearAutomaticFailover() + { + unset($this->automatic_failover); + } + + /** + * Automatic failover configurations. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; + * @param \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $var + * @return $this + */ + public function setAutomaticFailover($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover::class); + $this->automatic_failover = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php new file mode 100644 index 000000000000..d9ae8181935d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php @@ -0,0 +1,82 @@ +google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover + */ +class AutomaticFailover extends \Google\Protobuf\Internal\Message +{ + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * + * Generated from protobuf field repeated string input_keys = 1; + */ + private $input_keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $input_keys + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * + * Generated from protobuf field repeated string input_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputKeys() + { + return $this->input_keys; + } + + /** + * The + * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s + * of inputs to failover to when this input is disconnected. Currently, only + * up to one backup input is supported. + * + * Generated from protobuf field repeated string input_keys = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_keys = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AutomaticFailover::class, \Google\Cloud\Video\LiveStream\V1\InputAttachment_AutomaticFailover::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php new file mode 100644 index 000000000000..fc6b529049d0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php @@ -0,0 +1,67 @@ +google.cloud.video.livestream.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; + */ + protected $input_switch_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $input_switch_mode + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; + * @return int + */ + public function getInputSwitchMode() + { + return $this->input_switch_mode; + } + + /** + * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; + * @param int $var + * @return $this + */ + public function setInputSwitchMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\InputConfig\InputSwitchMode::class); + $this->input_switch_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php new file mode 100644 index 000000000000..0a991af82491 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php @@ -0,0 +1,72 @@ +google.cloud.video.livestream.v1.InputConfig.InputSwitchMode + */ +class InputSwitchMode +{ + /** + * The input switch mode is not specified. + * + * Generated from protobuf enum INPUT_SWITCH_MODE_UNSPECIFIED = 0; + */ + const INPUT_SWITCH_MODE_UNSPECIFIED = 0; + /** + * Automatic failover is enabled. The primary input stream is always + * preferred over its backup input streams configured using the + * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] + * field. + * + * Generated from protobuf enum FAILOVER_PREFER_PRIMARY = 1; + */ + const FAILOVER_PREFER_PRIMARY = 1; + /** + * Automatic failover is disabled. You must use the + * [inputSwitch][google.cloud.video.livestream.v1.Event.input_switch] event + * to switch the active input source for the channel to stream from. When + * this mode is chosen, the + * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] + * field is ignored. + * + * Generated from protobuf enum MANUAL = 3; + */ + const MANUAL = 3; + + private static $valueToName = [ + self::INPUT_SWITCH_MODE_UNSPECIFIED => 'INPUT_SWITCH_MODE_UNSPECIFIED', + self::FAILOVER_PREFER_PRIMARY => 'FAILOVER_PREFER_PRIMARY', + self::MANUAL => 'MANUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InputSwitchMode::class, \Google\Cloud\Video\LiveStream\V1\InputConfig_InputSwitchMode::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php new file mode 100644 index 000000000000..42b27a630665 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php @@ -0,0 +1,149 @@ +google.cloud.video.livestream.v1.InputStreamProperty + */ +class InputStreamProperty extends \Google\Protobuf\Internal\Message +{ + /** + * The time that the current input stream is accepted and the connection is + * established. + * + * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; + */ + protected $last_establish_time = null; + /** + * Properties of the video streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; + */ + private $video_streams; + /** + * Properties of the audio streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; + */ + private $audio_streams; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $last_establish_time + * The time that the current input stream is accepted and the connection is + * established. + * @type array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $video_streams + * Properties of the video streams. + * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $audio_streams + * Properties of the audio streams. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The time that the current input stream is accepted and the connection is + * established. + * + * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastEstablishTime() + { + return $this->last_establish_time; + } + + public function hasLastEstablishTime() + { + return isset($this->last_establish_time); + } + + public function clearLastEstablishTime() + { + unset($this->last_establish_time); + } + + /** + * The time that the current input stream is accepted and the connection is + * established. + * + * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastEstablishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_establish_time = $var; + + return $this; + } + + /** + * Properties of the video streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVideoStreams() + { + return $this->video_streams; + } + + /** + * Properties of the video streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; + * @param array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVideoStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\VideoStreamProperty::class); + $this->video_streams = $arr; + + return $this; + } + + /** + * Properties of the audio streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAudioStreams() + { + return $this->audio_streams; + } + + /** + * Properties of the audio streams. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; + * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAudioStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStreamProperty::class); + $this->audio_streams = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php new file mode 100644 index 000000000000..ed3d44e9986b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php @@ -0,0 +1,226 @@ +google.cloud.video.livestream.v1.ListAssetsRequest + */ +class ListAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * 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. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\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 location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `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. The parent location for the resource, in the form of: + * `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; + } + + /** + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php new file mode 100644 index 000000000000..ec154d7bbafc --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.livestream.v1.ListAssetsResponse + */ +class ListAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Assets + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Asset assets = 1; + */ + private $assets; + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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 array<\Google\Cloud\Video\LiveStream\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets + * The list of Assets + * @type string $next_page_token + * The next_page_token value returned from a previous List request, if any. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of Assets + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Asset assets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssets() + { + return $this->assets; + } + + /** + * The list of Assets + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Asset assets = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Asset::class); + $this->assets = $arr; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php new file mode 100644 index 000000000000..2dbfdfd1b10c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.livestream.v1.ListChannelsRequest + */ +class ListChannelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\ListChannelsRequest + * + * @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 location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * The filter to apply to list results. + * @type string $order_by + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `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. The parent location for the resource, in the form of: + * `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; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * 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 next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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 to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list 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; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php new file mode 100644 index 000000000000..c535a18d3457 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php @@ -0,0 +1,139 @@ +google.cloud.video.livestream.v1.ListChannelsResponse + */ +class ListChannelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; + */ + private $channels; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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 array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $channels + * A list of channels. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * A list of channels. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Channel::class); + $this->channels = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php new file mode 100644 index 000000000000..a6584a676cd5 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php @@ -0,0 +1,221 @@ +google.cloud.video.livestream.v1.ListClipsRequest + */ +class ListClipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListClipsRequest + * + * 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 ListClipsRequest + * Please see {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\ListClipsRequest + * + * @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 ListClipsRequest + * @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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListClipsRequest + * + * 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 ListClipsRequest + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php new file mode 100644 index 000000000000..ec817a73deef --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.livestream.v1.ListClipsResponse + */ +class ListClipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Clip + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip clips = 1; + */ + private $clips; + /** + * 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 array<\Google\Cloud\Video\LiveStream\V1\Clip>|\Google\Protobuf\Internal\RepeatedField $clips + * The list of Clip + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The list of Clip + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip clips = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClips() + { + return $this->clips; + } + + /** + * The list of Clip + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip clips = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Clip>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClips($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Clip::class); + $this->clips = $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php new file mode 100644 index 000000000000..2e459d167a5c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.livestream.v1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\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. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type int $page_size + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * The filter to apply to list results. + * @type string $order_by + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel for the resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * 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 next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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 to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list 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; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the ordering of results following syntax at + * https://cloud.google.com/apis/design/design_patterns#sorting_order. + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php new file mode 100644 index 000000000000..9c30220fcb35 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php @@ -0,0 +1,139 @@ +google.cloud.video.livestream.v1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of events. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; + */ + private $events; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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 array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * A list of events. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of events. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * A list of events. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Event::class); + $this->events = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php new file mode 100644 index 000000000000..95a3d958d8f5 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.livestream.v1.ListInputsRequest + */ +class ListInputsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location for the resource, in the form of: + * `projects/{project}/locations/{location}`. Please see + * {@see LivestreamServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\ListInputsRequest + * + * @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 location for the resource, in the form of: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * The filter to apply to list results. + * @type string $order_by + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location for the resource, in the form of: + * `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. The parent location for the resource, in the form of: + * `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; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. If unspecified, server + * will pick an appropriate default. Server may return fewer items than + * requested. A caller should only rely on response's + * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] + * to determine if there are more items left to be queried. + * + * 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 next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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 to apply to list results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list 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; + } + + /** + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Specifies the ordering of results following syntax at [Sorting + * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php new file mode 100644 index 000000000000..a996747b4e20 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php @@ -0,0 +1,139 @@ +google.cloud.video.livestream.v1.ListInputsResponse + */ +class ListInputsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of inputs. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; + */ + private $inputs; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * 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 array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs + * A list of inputs. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of inputs. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * A list of inputs. + * + * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; + * @param array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Input::class); + $this->inputs = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php new file mode 100644 index 000000000000..24c7138b5826 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php @@ -0,0 +1,70 @@ +google.cloud.video.livestream.v1.LogConfig + */ +class LogConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The severity level of platform logging for this resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; + */ + protected $log_severity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $log_severity + * The severity level of platform logging for this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The severity level of platform logging for this resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; + * @return int + */ + public function getLogSeverity() + { + return $this->log_severity; + } + + /** + * The severity level of platform logging for this resource. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; + * @param int $var + * @return $this + */ + public function setLogSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\LogConfig\LogSeverity::class); + $this->log_severity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php new file mode 100644 index 000000000000..f8a3b5c54235 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php @@ -0,0 +1,92 @@ +google.cloud.video.livestream.v1.LogConfig.LogSeverity + */ +class LogSeverity +{ + /** + * Log severity is not specified. This is the same as log severity is OFF. + * + * Generated from protobuf enum LOG_SEVERITY_UNSPECIFIED = 0; + */ + const LOG_SEVERITY_UNSPECIFIED = 0; + /** + * Log is turned off. + * + * Generated from protobuf enum OFF = 1; + */ + const OFF = 1; + /** + * Log with severity higher than or equal to DEBUG are logged. + * + * Generated from protobuf enum DEBUG = 100; + */ + const DEBUG = 100; + /** + * Logs with severity higher than or equal to INFO are logged. + * + * Generated from protobuf enum INFO = 200; + */ + const INFO = 200; + /** + * Logs with severity higher than or equal to WARNING are logged. + * + * Generated from protobuf enum WARNING = 400; + */ + const WARNING = 400; + /** + * Logs with severity higher than or equal to ERROR are logged. + * + * Generated from protobuf enum ERROR = 500; + */ + const ERROR = 500; + + private static $valueToName = [ + self::LOG_SEVERITY_UNSPECIFIED => 'LOG_SEVERITY_UNSPECIFIED', + self::OFF => 'OFF', + self::DEBUG => 'DEBUG', + self::INFO => 'INFO', + self::WARNING => 'WARNING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogSeverity::class, \Google\Cloud\Video\LiveStream\V1\LogConfig_LogSeverity::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php new file mode 100644 index 000000000000..80243c16f9e8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php @@ -0,0 +1,381 @@ +google.cloud.video.livestream.v1.Manifest + */ +class Manifest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * + * Generated from protobuf field string file_name = 1; + */ + protected $file_name = ''; + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $mux_streams; + /** + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * + * Generated from protobuf field int32 max_segment_count = 4; + */ + protected $max_segment_count = 0; + /** + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * If both segment_keep_duration and + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * are set, + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * is used and segment_keep_duration is ignored. + * + * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; + */ + protected $segment_keep_duration = null; + /** + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * + * Generated from protobuf field bool use_timecode_as_timeline = 6; + */ + protected $use_timecode_as_timeline = false; + /** + * Optional. A unique key for this manifest. + * + * Generated from protobuf field string key = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_name + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * @type int $type + * Required. Type of the manifest, can be `HLS` or `DASH`. + * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * @type int $max_segment_count + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * @type \Google\Protobuf\Duration $segment_keep_duration + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * If both segment_keep_duration and + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * are set, + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * is used and segment_keep_duration is ignored. + * @type bool $use_timecode_as_timeline + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * @type string $key + * Optional. A unique key for this manifest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * + * Generated from protobuf field string file_name = 1; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest` + * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple + * manifests are added to the channel, each must have a unique file name. + * + * Generated from protobuf field string file_name = 1; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the manifest, can be `HLS` or `DASH`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Manifest\ManifestType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * Required. List of `MuxStream` + * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear + * in this manifest. + * - For HLS, either `fmp4` or `ts` mux streams can be specified but not + * mixed. + * - For DASH, only `fmp4` mux streams can be specified. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mux_streams = $arr; + + return $this; + } + + /** + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * + * Generated from protobuf field int32 max_segment_count = 4; + * @return int + */ + public function getMaxSegmentCount() + { + return $this->max_segment_count; + } + + /** + * Maximum number of segments that this manifest holds. Once the manifest + * reaches this maximum number of segments, whenever a new segment is added to + * the manifest, the oldest segment will be removed from the manifest. + * The minimum value is 3 and the default value is 5. + * + * Generated from protobuf field int32 max_segment_count = 4; + * @param int $var + * @return $this + */ + public function setMaxSegmentCount($var) + { + GPBUtil::checkInt32($var); + $this->max_segment_count = $var; + + return $this; + } + + /** + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * If both segment_keep_duration and + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * are set, + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * is used and segment_keep_duration is ignored. + * + * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getSegmentKeepDuration() + { + return $this->segment_keep_duration; + } + + public function hasSegmentKeepDuration() + { + return isset($this->segment_keep_duration); + } + + public function clearSegmentKeepDuration() + { + unset($this->segment_keep_duration); + } + + /** + * How long to keep a segment on the output Google Cloud Storage bucket after + * it is removed from the manifest. This field should be large enough to cover + * the manifest propagation delay. Otherwise, a player could receive 404 + * errors while accessing segments which are listed in the manifest that the + * player has, but were already deleted from the output Google Cloud Storage + * bucket. Default value is `60s`. + * If both segment_keep_duration and + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * are set, + * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] + * is used and segment_keep_duration is ignored. + * + * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSegmentKeepDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->segment_keep_duration = $var; + + return $this; + } + + /** + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * + * Generated from protobuf field bool use_timecode_as_timeline = 6; + * @return bool + */ + public function getUseTimecodeAsTimeline() + { + return $this->use_timecode_as_timeline; + } + + /** + * Whether to use the timecode, as specified in timecode config, when setting: + * - `availabilityStartTime` attribute in DASH manifests. + * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. + * If false, ignore the input timecode and use the time from system clock + * when the manifest is first generated. This is the default behavior. + * + * Generated from protobuf field bool use_timecode_as_timeline = 6; + * @param bool $var + * @return $this + */ + public function setUseTimecodeAsTimeline($var) + { + GPBUtil::checkBool($var); + $this->use_timecode_as_timeline = $var; + + return $this; + } + + /** + * Optional. A unique key for this manifest. + * + * Generated from protobuf field string key = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Optional. A unique key for this manifest. + * + * Generated from protobuf field string key = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php new file mode 100644 index 000000000000..f3c9bee3a916 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php @@ -0,0 +1,64 @@ +google.cloud.video.livestream.v1.Manifest.ManifestType + */ +class ManifestType +{ + /** + * The manifest type is not specified. + * + * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; + */ + const MANIFEST_TYPE_UNSPECIFIED = 0; + /** + * Create an `HLS` manifest. The corresponding file extension is `.m3u8`. + * + * Generated from protobuf enum HLS = 1; + */ + const HLS = 1; + /** + * Create a `DASH` manifest. The corresponding file extension is `.mpd`. + * + * Generated from protobuf enum DASH = 2; + */ + const DASH = 2; + + private static $valueToName = [ + self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', + self::HLS => 'HLS', + self::DASH => 'DASH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManifestType::class, \Google\Cloud\Video\LiveStream\V1\Manifest_ManifestType::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php new file mode 100644 index 000000000000..63c319904ce2 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php @@ -0,0 +1,257 @@ +google.cloud.video.livestream.v1.MuxStream + */ +class MuxStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this multiplexed stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * + * Generated from protobuf field string container = 3; + */ + protected $container = ''; + /** + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + */ + private $elementary_streams; + /** + * Segment settings for `fmp4` and `ts`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; + */ + protected $segment_settings = null; + /** + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * + * Generated from protobuf field string encryption_id = 6; + */ + protected $encryption_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this multiplexed stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * @type string $container + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * @type \Google\Cloud\Video\LiveStream\V1\SegmentSettings $segment_settings + * Segment settings for `fmp4` and `ts`. + * @type string $encryption_id + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this multiplexed stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this multiplexed stream. The key must be 1-63 + * characters in length. The key must begin and end with a letter (regardless + * of case) or a number, but can contain dashes or underscores in between. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * + * Generated from protobuf field string container = 3; + * @return string + */ + public function getContainer() + { + return $this->container; + } + + /** + * The container format. The default is `fmp4`. + * Supported container formats: + * - `fmp4` - the corresponding file extension is `.m4s` + * - `ts` - the corresponding file extension is `.ts` + * + * Generated from protobuf field string container = 3; + * @param string $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkString($var, True); + $this->container = $var; + + return $this; + } + + /** + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of `ElementaryStream` + * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed + * in this stream. + * - For `fmp4` container, must contain either one video or one audio stream. + * - For `ts` container, must contain exactly one audio stream and up to one + * video stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * Segment settings for `fmp4` and `ts`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; + * @return \Google\Cloud\Video\LiveStream\V1\SegmentSettings|null + */ + public function getSegmentSettings() + { + return $this->segment_settings; + } + + public function hasSegmentSettings() + { + return isset($this->segment_settings); + } + + public function clearSegmentSettings() + { + unset($this->segment_settings); + } + + /** + * Segment settings for `fmp4` and `ts`. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; + * @param \Google\Cloud\Video\LiveStream\V1\SegmentSettings $var + * @return $this + */ + public function setSegmentSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\SegmentSettings::class); + $this->segment_settings = $var; + + return $this; + } + + /** + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * + * Generated from protobuf field string encryption_id = 6; + * @return string + */ + public function getEncryptionId() + { + return $this->encryption_id; + } + + /** + * Identifier of the encryption configuration to use. If omitted, output + * will be unencrypted. + * + * Generated from protobuf field string encryption_id = 6; + * @param string $var + * @return $this + */ + public function setEncryptionId($var) + { + GPBUtil::checkString($var, True); + $this->encryption_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php new file mode 100644 index 000000000000..e5146c57d91c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php @@ -0,0 +1,101 @@ +google.cloud.video.livestream.v1.NormalizedCoordinate + */ +class NormalizedCoordinate extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double x = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $x = 0.0; + /** + * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double y = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $y = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. + * @type float $y + * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double x = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double x = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkDouble($var); + $this->x = $var; + + return $this; + } + + /** + * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double y = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double y = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkDouble($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php new file mode 100644 index 000000000000..d1b3eeb82c97 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php @@ -0,0 +1,101 @@ +google.cloud.video.livestream.v1.NormalizedResolution + */ +class NormalizedResolution extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double w = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $w = 0.0; + /** + * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double h = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $h = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $w + * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. + * @type float $h + * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double w = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getW() + { + return $this->w; + } + + /** + * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double w = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setW($var) + { + GPBUtil::checkDouble($var); + $this->w = $var; + + return $this; + } + + /** + * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double h = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getH() + { + return $this->h; + } + + /** + * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. + * + * Generated from protobuf field double h = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setH($var) + { + GPBUtil::checkDouble($var); + $this->h = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php new file mode 100644 index 000000000000..ccb892bc11cf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php @@ -0,0 +1,273 @@ +google.cloud.video.livestream.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. 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 = 5 [(.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 = 6 [(.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 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\Video\Livestream\V1\Service::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. 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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 6 [(.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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php new file mode 100644 index 000000000000..83f7a3a308a7 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php @@ -0,0 +1,240 @@ +google.cloud.video.livestream.v1.Pool + */ +class Pool extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the pool, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Network configuration for the pool. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Pool.NetworkConfig network_config = 5; + */ + protected $network_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the pool, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined key/value metadata. + * @type \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig $network_config + * Network configuration for the pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the pool, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the pool, in the form of: + * `projects/{project}/locations/{location}/pools/{poolId}`. + * + * 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 creation time. + * + * 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 creation time. + * + * 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 time. + * + * 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 time. + * + * 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; + } + + /** + * User-defined key/value metadata. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined key/value metadata. + * + * 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; + } + + /** + * Network configuration for the pool. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Pool.NetworkConfig network_config = 5; + * @return \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig|null + */ + public function getNetworkConfig() + { + return $this->network_config; + } + + public function hasNetworkConfig() + { + return isset($this->network_config); + } + + public function clearNetworkConfig() + { + unset($this->network_config); + } + + /** + * Network configuration for the pool. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Pool.NetworkConfig network_config = 5; + * @param \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig $var + * @return $this + */ + public function setNetworkConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig::class); + $this->network_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php new file mode 100644 index 000000000000..55b3f9770e0d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php @@ -0,0 +1,94 @@ +google.cloud.video.livestream.v1.Pool.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * peered_network is the network resource URL of the network that is peered + * to the service provider network. Must be of the format + * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where + * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that + * holds your VPC network and NETWORK_NAME is the name of your VPC network. + * If peered_network is omitted or empty, the pool will use endpoints that + * are publicly available. + * + * Generated from protobuf field string peered_network = 1 [(.google.api.resource_reference) = { + */ + protected $peered_network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $peered_network + * peered_network is the network resource URL of the network that is peered + * to the service provider network. Must be of the format + * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where + * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that + * holds your VPC network and NETWORK_NAME is the name of your VPC network. + * If peered_network is omitted or empty, the pool will use endpoints that + * are publicly available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * peered_network is the network resource URL of the network that is peered + * to the service provider network. Must be of the format + * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where + * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that + * holds your VPC network and NETWORK_NAME is the name of your VPC network. + * If peered_network is omitted or empty, the pool will use endpoints that + * are publicly available. + * + * Generated from protobuf field string peered_network = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getPeeredNetwork() + { + return $this->peered_network; + } + + /** + * peered_network is the network resource URL of the network that is peered + * to the service provider network. Must be of the format + * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where + * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that + * holds your VPC network and NETWORK_NAME is the name of your VPC network. + * If peered_network is omitted or empty, the pool will use endpoints that + * are publicly available. + * + * Generated from protobuf field string peered_network = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPeeredNetwork($var) + { + GPBUtil::checkString($var, True); + $this->peered_network = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkConfig::class, \Google\Cloud\Video\LiveStream\V1\Pool_NetworkConfig::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php new file mode 100644 index 000000000000..3f4966135443 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php @@ -0,0 +1,165 @@ +google.cloud.video.livestream.v1.PreprocessingConfig + */ +class PreprocessingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; + */ + protected $audio = null; + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; + */ + protected $crop = null; + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; + */ + protected $pad = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $audio + * Audio preprocessing configuration. + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $crop + * Specify the video cropping configuration. + * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $pad + * Specify the video pad filter configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio|null + */ + public function getAudio() + { + return $this->audio; + } + + public function hasAudio() + { + return isset($this->audio); + } + + public function clearAudio() + { + unset($this->audio); + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio::class); + $this->audio = $var; + + return $this; + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop|null + */ + public function getCrop() + { + return $this->crop; + } + + public function hasCrop() + { + return isset($this->crop); + } + + public function clearCrop() + { + unset($this->crop); + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $var + * @return $this + */ + public function setCrop($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop::class); + $this->crop = $var; + + return $this; + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; + * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad|null + */ + public function getPad() + { + return $this->pad; + } + + public function hasPad() + { + return isset($this->pad); + } + + public function clearPad() + { + unset($this->pad); + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; + * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $var + * @return $this + */ + public function setPad($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad::class); + $this->pad = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php new file mode 100644 index 000000000000..5e62f61a0530 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php @@ -0,0 +1,106 @@ +google.cloud.video.livestream.v1.PreprocessingConfig.Audio + */ +class Audio extends \Google\Protobuf\Internal\Message +{ + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * + * Generated from protobuf field double lufs = 1; + */ + protected $lufs = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $lufs + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * + * Generated from protobuf field double lufs = 1; + * @return float + */ + public function getLufs() + { + return $this->lufs; + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 according to the following: + * - -24 is the Advanced Television Systems Committee (ATSC A/85) + * - -23 is the EU R128 broadcast standard + * - -19 is the prior standard for online mono audio + * - -18 is the ReplayGain standard + * - -16 is the prior standard for stereo audio + * - -14 is the new online audio standard recommended by Spotify, as well as + * Amazon Echo + * - 0 disables normalization. The default is 0. + * + * Generated from protobuf field double lufs = 1; + * @param float $var + * @return $this + */ + public function setLufs($var) + { + GPBUtil::checkDouble($var); + $this->lufs = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Audio::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Audio::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php new file mode 100644 index 000000000000..71c8d4b86cde --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php @@ -0,0 +1,173 @@ +google.cloud.video.livestream.v1.PreprocessingConfig.Crop + */ +class Crop extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to crop from the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to crop from the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to crop from the left. The default is 0. + * @type int $right_pixels + * The number of pixels to crop from the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Crop::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Crop::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php new file mode 100644 index 000000000000..ee40c165846e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php @@ -0,0 +1,173 @@ +google.cloud.video.livestream.v1.PreprocessingConfig.Pad + */ +class Pad extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to add to the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to add to the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to add to the left. The default is 0. + * @type int $right_pixels + * The number of pixels to add to the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Pad::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Pad::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php new file mode 100644 index 000000000000..d2a87def8c4d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php @@ -0,0 +1,129 @@ +google.cloud.video.livestream.v1.RetentionConfig + */ +class RetentionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The minimum duration for which the output files from the channel will + * remain in the output bucket. After this duration, output files are + * deleted asynchronously. + * When the channel is deleted, all output files are deleted from the output + * bucket asynchronously. + * If omitted or set to zero, output files will remain in the output bucket + * based on + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], + * which defaults to 60s. + * If both retention_window_duration and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * are set, retention_window_duration is used and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * is ignored. + * + * Generated from protobuf field .google.protobuf.Duration retention_window_duration = 1; + */ + protected $retention_window_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $retention_window_duration + * The minimum duration for which the output files from the channel will + * remain in the output bucket. After this duration, output files are + * deleted asynchronously. + * When the channel is deleted, all output files are deleted from the output + * bucket asynchronously. + * If omitted or set to zero, output files will remain in the output bucket + * based on + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], + * which defaults to 60s. + * If both retention_window_duration and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * are set, retention_window_duration is used and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * is ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The minimum duration for which the output files from the channel will + * remain in the output bucket. After this duration, output files are + * deleted asynchronously. + * When the channel is deleted, all output files are deleted from the output + * bucket asynchronously. + * If omitted or set to zero, output files will remain in the output bucket + * based on + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], + * which defaults to 60s. + * If both retention_window_duration and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * are set, retention_window_duration is used and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * is ignored. + * + * Generated from protobuf field .google.protobuf.Duration retention_window_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionWindowDuration() + { + return $this->retention_window_duration; + } + + public function hasRetentionWindowDuration() + { + return isset($this->retention_window_duration); + } + + public function clearRetentionWindowDuration() + { + unset($this->retention_window_duration); + } + + /** + * The minimum duration for which the output files from the channel will + * remain in the output bucket. After this duration, output files are + * deleted asynchronously. + * When the channel is deleted, all output files are deleted from the output + * bucket asynchronously. + * If omitted or set to zero, output files will remain in the output bucket + * based on + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], + * which defaults to 60s. + * If both retention_window_duration and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * are set, retention_window_duration is used and + * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] + * is ignored. + * + * Generated from protobuf field .google.protobuf.Duration retention_window_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionWindowDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_window_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php new file mode 100644 index 000000000000..6778ece42f49 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php @@ -0,0 +1,105 @@ +google.cloud.video.livestream.v1.SegmentSettings + */ +class SegmentSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + */ + protected $segment_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $segment_duration + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getSegmentDuration() + { + return $this->segment_duration; + } + + public function hasSegmentDuration() + { + return isset($this->segment_duration); + } + + public function clearSegmentDuration() + { + unset($this->segment_duration); + } + + /** + * Duration of the segments in seconds. The default is `6s`. Note that + * `segmentDuration` must be greater than or equal to + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], + * and `segmentDuration` must be divisible by + * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. + * Valid range is [2s, 20s]. + * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in + * the same manifest must have the same segment duration. + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSegmentDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->segment_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php new file mode 100644 index 000000000000..719cf70bff52 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php @@ -0,0 +1,367 @@ +google.cloud.video.livestream.v1.SpriteSheet + */ +class SpriteSheet extends \Google\Protobuf\Internal\Message +{ + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + */ + protected $format = ''; + /** + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $file_prefix = ''; + /** + * Required. The width of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_width_pixels = 0; + /** + * Required. The height of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_height_pixels = 0; + /** + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * + * Generated from protobuf field int32 column_count = 5; + */ + protected $column_count = 0; + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * + * Generated from protobuf field int32 row_count = 6; + */ + protected $row_count = 0; + /** + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * + * Generated from protobuf field .google.protobuf.Duration interval = 7; + */ + protected $interval = null; + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 8; + */ + protected $quality = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $format + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * @type string $file_prefix + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * @type int $sprite_width_pixels + * Required. The width of the sprite in pixels. Must be an even integer. + * @type int $sprite_height_pixels + * Required. The height of the sprite in pixels. Must be an even integer. + * @type int $column_count + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * @type int $row_count + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * @type \Google\Protobuf\Duration $interval + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * @type int $quality + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * 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; + } + + /** + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilePrefix() + { + return $this->file_prefix; + } + + /** + * Required. File name prefix for the generated sprite sheets. If multiple + * sprite sheets are added to the channel, each must have a unique file + * prefix. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilePrefix($var) + { + GPBUtil::checkString($var, True); + $this->file_prefix = $var; + + return $this; + } + + /** + * Required. The width of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteWidthPixels() + { + return $this->sprite_width_pixels; + } + + /** + * Required. The width of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_width_pixels = $var; + + return $this; + } + + /** + * Required. The height of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteHeightPixels() + { + return $this->sprite_height_pixels; + } + + /** + * Required. The height of the sprite in pixels. Must be an even integer. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_height_pixels = $var; + + return $this; + } + + /** + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * + * Generated from protobuf field int32 column_count = 5; + * @return int + */ + public function getColumnCount() + { + return $this->column_count; + } + + /** + * The maximum number of sprites per row in a sprite sheet. Valid range is + * [1, 10] and the default value is 1. + * + * Generated from protobuf field int32 column_count = 5; + * @param int $var + * @return $this + */ + public function setColumnCount($var) + { + GPBUtil::checkInt32($var); + $this->column_count = $var; + + return $this; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * + * Generated from protobuf field int32 row_count = 6; + * @return int + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. Valid range is [1, 10] and the default value + * is 1. + * + * Generated from protobuf field int32 row_count = 6; + * @param int $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt32($var); + $this->row_count = $var; + + return $this; + } + + /** + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * + * Generated from protobuf field .google.protobuf.Duration interval = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and + * the default value is `10s`. + * + * Generated from protobuf field .google.protobuf.Duration interval = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->interval = $var; + + return $this; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 8; + * @return int + */ + public function getQuality() + { + return $this->quality; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 8; + * @param int $var + * @return $this + */ + public function setQuality($var) + { + GPBUtil::checkInt32($var); + $this->quality = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php new file mode 100644 index 000000000000..d70e8707a2a4 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.StartChannelRequest + */ +class StartChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\StartChannelRequest + * + * @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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php new file mode 100644 index 000000000000..b6a76e5ff6ad --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php @@ -0,0 +1,233 @@ +google.cloud.video.livestream.v1.StaticOverlay + */ +class StaticOverlay extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Asset to use for the overlaid image. + * The asset must be represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * The asset's resource type must be image. + * + * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $asset = ''; + /** + * Optional. Normalized image resolution, based on output video resolution. + * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, + * set either `w` or `h` to 0. To use the original image resolution, set both + * `w` and `h` to 0. The default is {0, 0}. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resolution = null; + /** + * Optional. Position of the image in terms of normalized coordinates of the + * upper-left corner of the image, based on output video resolution. For + * example, use the x and y coordinates {0, 0} to position the top-left corner + * of the overlay animation in the top-left corner of the output video. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $position = null; + /** + * Optional. Target image opacity. Valid values are from `1.0` (solid, + * default) to `0.0` (transparent), exclusive. Set this to a value greater + * than `0.0`. + * + * Generated from protobuf field double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $opacity = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset + * Required. Asset to use for the overlaid image. + * The asset must be represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * The asset's resource type must be image. + * @type \Google\Cloud\Video\LiveStream\V1\NormalizedResolution $resolution + * Optional. Normalized image resolution, based on output video resolution. + * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, + * set either `w` or `h` to 0. To use the original image resolution, set both + * `w` and `h` to 0. The default is {0, 0}. + * @type \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate $position + * Optional. Position of the image in terms of normalized coordinates of the + * upper-left corner of the image, based on output video resolution. For + * example, use the x and y coordinates {0, 0} to position the top-left corner + * of the overlay animation in the top-left corner of the output video. + * @type float $opacity + * Optional. Target image opacity. Valid values are from `1.0` (solid, + * default) to `0.0` (transparent), exclusive. Set this to a value greater + * than `0.0`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Asset to use for the overlaid image. + * The asset must be represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * The asset's resource type must be image. + * + * 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. Asset to use for the overlaid image. + * The asset must be represented in the form of: + * `projects/{project}/locations/{location}/assets/{assetId}`. + * The asset's resource type must be image. + * + * 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; + } + + /** + * Optional. Normalized image resolution, based on output video resolution. + * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, + * set either `w` or `h` to 0. To use the original image resolution, set both + * `w` and `h` to 0. The default is {0, 0}. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Video\LiveStream\V1\NormalizedResolution|null + */ + public function getResolution() + { + return $this->resolution; + } + + public function hasResolution() + { + return isset($this->resolution); + } + + public function clearResolution() + { + unset($this->resolution); + } + + /** + * Optional. Normalized image resolution, based on output video resolution. + * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, + * set either `w` or `h` to 0. To use the original image resolution, set both + * `w` and `h` to 0. The default is {0, 0}. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Video\LiveStream\V1\NormalizedResolution $var + * @return $this + */ + public function setResolution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\NormalizedResolution::class); + $this->resolution = $var; + + return $this; + } + + /** + * Optional. Position of the image in terms of normalized coordinates of the + * upper-left corner of the image, based on output video resolution. For + * example, use the x and y coordinates {0, 0} to position the top-left corner + * of the overlay animation in the top-left corner of the output video. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate|null + */ + public function getPosition() + { + return $this->position; + } + + public function hasPosition() + { + return isset($this->position); + } + + public function clearPosition() + { + unset($this->position); + } + + /** + * Optional. Position of the image in terms of normalized coordinates of the + * upper-left corner of the image, based on output video resolution. For + * example, use the x and y coordinates {0, 0} to position the top-left corner + * of the overlay animation in the top-left corner of the output video. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate $var + * @return $this + */ + public function setPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate::class); + $this->position = $var; + + return $this; + } + + /** + * Optional. Target image opacity. Valid values are from `1.0` (solid, + * default) to `0.0` (transparent), exclusive. Set this to a value greater + * than `0.0`. + * + * Generated from protobuf field double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getOpacity() + { + return $this->opacity; + } + + /** + * Optional. Target image opacity. Valid values are from `1.0` (solid, + * default) to `0.0` (transparent), exclusive. Set this to a value greater + * than `0.0`. + * + * Generated from protobuf field double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setOpacity($var) + { + GPBUtil::checkDouble($var); + $this->opacity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php new file mode 100644 index 000000000000..59ed1b5512cf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php @@ -0,0 +1,160 @@ +google.cloud.video.livestream.v1.StopChannelRequest + */ +class StopChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. Please see + * {@see LivestreamServiceClient::channelName()} for help formatting this field. + * + * @return \Google\Cloud\Video\LiveStream\V1\StopChannelRequest + * + * @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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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 channel resource, in the form of: + * `projects/{project}/locations/{location}/channels/{channelId}`. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php new file mode 100644 index 000000000000..65259f395c0a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php @@ -0,0 +1,79 @@ +google.cloud.video.livestream.v1.TextStream + */ +class TextStream extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * + * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $codec = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * + * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * Required. The codec for this text stream. + * Supported text codecs: + * - `cea608` + * - `cea708` + * + * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php new file mode 100644 index 000000000000..0bfb38e5aa03 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php @@ -0,0 +1,150 @@ +google.cloud.video.livestream.v1.TimecodeConfig + */ +class TimecodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; + */ + protected $source = 0; + protected $time_offset; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $source + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * @type \Google\Protobuf\Duration $utc_offset + * UTC offset. Must be whole seconds, between -18 hours and +18 hours. + * @type \Google\Type\TimeZone $time_zone + * Time zone e.g. "America/Los_Angeles". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; + * @return int + */ + public function getSource() + { + return $this->source; + } + + /** + * The source of the timecode that will later be used in outputs/manifests. + * It determines the initial timecode/timestamp (first frame) of output + * streams. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; + * @param int $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig\TimecodeSource::class); + $this->source = $var; + + return $this; + } + + /** + * UTC offset. Must be whole seconds, between -18 hours and +18 hours. + * + * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getUtcOffset() + { + return $this->readOneof(2); + } + + public function hasUtcOffset() + { + return $this->hasOneof(2); + } + + /** + * UTC offset. Must be whole seconds, between -18 hours and +18 hours. + * + * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUtcOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Time zone e.g. "America/Los_Angeles". + * + * Generated from protobuf field .google.type.TimeZone time_zone = 3; + * @return \Google\Type\TimeZone|null + */ + public function getTimeZone() + { + return $this->readOneof(3); + } + + public function hasTimeZone() + { + return $this->hasOneof(3); + } + + /** + * Time zone e.g. "America/Los_Angeles". + * + * Generated from protobuf field .google.type.TimeZone time_zone = 3; + * @param \Google\Type\TimeZone $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getTimeOffset() + { + return $this->whichOneof("time_offset"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php new file mode 100644 index 000000000000..143ed3952b6b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php @@ -0,0 +1,64 @@ +google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource + */ +class TimecodeSource +{ + /** + * The timecode source is not specified. + * + * Generated from protobuf enum TIMECODE_SOURCE_UNSPECIFIED = 0; + */ + const TIMECODE_SOURCE_UNSPECIFIED = 0; + /** + * Use input media timestamp. + * + * Generated from protobuf enum MEDIA_TIMESTAMP = 1; + */ + const MEDIA_TIMESTAMP = 1; + /** + * Use input embedded timecode e.g. picture timing SEI message. + * + * Generated from protobuf enum EMBEDDED_TIMECODE = 2; + */ + const EMBEDDED_TIMECODE = 2; + + private static $valueToName = [ + self::TIMECODE_SOURCE_UNSPECIFIED => 'TIMECODE_SOURCE_UNSPECIFIED', + self::MEDIA_TIMESTAMP => 'MEDIA_TIMESTAMP', + self::EMBEDDED_TIMECODE => 'EMBEDDED_TIMECODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimecodeSource::class, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig_TimecodeSource::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php new file mode 100644 index 000000000000..0d41cb29e8b9 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php @@ -0,0 +1,293 @@ +google.cloud.video.livestream.v1.UpdateChannelRequest + */ +class UpdateChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The channel resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * @return \Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\LiveStream\V1\Channel $channel, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setChannel($channel) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel + * Required. The channel resource to be updated. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Channel + * resource by the update. You can only update the following fields: + * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) + * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) + * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) + * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) + * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) + * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) + * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) + * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) + * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) + * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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 channel resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * Required. The channel resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php new file mode 100644 index 000000000000..c68b33c975ce --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php @@ -0,0 +1,253 @@ +google.cloud.video.livestream.v1.UpdateInputRequest + */ +class UpdateInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The input resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * @return \Google\Cloud\Video\LiveStream\V1\UpdateInputRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\LiveStream\V1\Input $input, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInput($input) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * @type \Google\Cloud\Video\LiveStream\V1\Input $input + * Required. The input resource to be updated. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Input + * resource by the update. You can only update the following fields: + * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) + * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) + * 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 mask is not present, then each field from the list above is updated + * if the field appears in the request payload. To unset a field, add the + * field to the update mask and remove it from the request payload. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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 input resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Input|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * Required. The input resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Input $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); + $this->input = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php new file mode 100644 index 000000000000..55b139eecc28 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php @@ -0,0 +1,232 @@ +google.cloud.video.livestream.v1.UpdatePoolRequest + */ +class UpdatePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * * `networkConfig` + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + */ + protected $update_mask = null; + /** + * Required. The pool resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Pool pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pool = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Video\LiveStream\V1\Pool $pool Required. The pool resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * + * * `networkConfig` + * + * 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. + * + * @return \Google\Cloud\Video\LiveStream\V1\UpdatePoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\LiveStream\V1\Pool $pool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPool($pool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * * `networkConfig` + * 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. + * @type \Google\Cloud\Video\LiveStream\V1\Pool $pool + * Required. The pool resource to be updated. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * * `networkConfig` + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the Pool + * resource by the update. You can only update the following fields: + * * `networkConfig` + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; + * @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 pool resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Pool pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\LiveStream\V1\Pool|null + */ + public function getPool() + { + return $this->pool; + } + + public function hasPool() + { + return isset($this->pool); + } + + public function clearPool() + { + unset($this->pool); + } + + /** + * Required. The pool resource to be updated. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.Pool pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\LiveStream\V1\Pool $var + * @return $this + */ + public function setPool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Pool::class); + $this->pool = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php new file mode 100644 index 000000000000..605d4d41bf8e --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php @@ -0,0 +1,169 @@ +google.cloud.video.livestream.v1.VideoFormat + */ +class VideoFormat extends \Google\Protobuf\Internal\Message +{ + /** + * Video codec used in this video stream. + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * The width of the video stream in pixels. + * + * Generated from protobuf field int32 width_pixels = 2; + */ + protected $width_pixels = 0; + /** + * The height of the video stream in pixels. + * + * Generated from protobuf field int32 height_pixels = 3; + */ + protected $height_pixels = 0; + /** + * The frame rate of the input video stream. + * + * Generated from protobuf field double frame_rate = 4; + */ + protected $frame_rate = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * Video codec used in this video stream. + * @type int $width_pixels + * The width of the video stream in pixels. + * @type int $height_pixels + * The height of the video stream in pixels. + * @type float $frame_rate + * The frame rate of the input video stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Video codec used in this video stream. + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * Video codec used in this video stream. + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * The width of the video stream in pixels. + * + * Generated from protobuf field int32 width_pixels = 2; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video stream in pixels. + * + * Generated from protobuf field int32 width_pixels = 2; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video stream in pixels. + * + * Generated from protobuf field int32 height_pixels = 3; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video stream in pixels. + * + * Generated from protobuf field int32 height_pixels = 3; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * The frame rate of the input video stream. + * + * Generated from protobuf field double frame_rate = 4; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * The frame rate of the input video stream. + * + * Generated from protobuf field double frame_rate = 4; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php new file mode 100644 index 000000000000..6213a93235f8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php @@ -0,0 +1,75 @@ +google.cloud.video.livestream.v1.VideoStream + */ +class VideoStream extends \Google\Protobuf\Internal\Message +{ + protected $codec_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $h264 + * H264 codec settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; + * @return \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings|null + */ + public function getH264() + { + return $this->readOneof(20); + } + + public function hasH264() + { + return $this->hasOneof(20); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; + * @param \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $var + * @return $this + */ + public function setH264($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * @return string + */ + public function getCodecSettings() + { + return $this->whichOneof("codec_settings"); + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php new file mode 100644 index 000000000000..e6953375134f --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php @@ -0,0 +1,743 @@ +google.cloud.video.livestream.v1.VideoStream.H264CodecSettings + */ +class H264CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 6; + */ + protected $allow_open_gop = false; + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * + * Generated from protobuf field int32 vbv_size_bits = 9; + */ + protected $vbv_size_bits = 0; + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * + * Generated from protobuf field int32 vbv_fullness_bits = 10; + */ + protected $vbv_fullness_bits = 0; + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 11; + */ + protected $entropy_coder = ''; + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 12; + */ + protected $b_pyramid = false; + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * + * Generated from protobuf field int32 b_frame_count = 13; + */ + protected $b_frame_count = 0; + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 14; + */ + protected $aq_strength = 0.0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string profile = 15; + */ + protected $profile = ''; + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string tune = 16; + */ + protected $tune = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * @type int $height_pixels + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * @type bool $allow_open_gop + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. + * If GOP frame count is set instead of GOP duration, GOP duration will be + * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + * must satisfy the limitations on `gopDuration` as well. + * Valid range is [60, 600]. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `2s`. Note that `gopDuration` must be less than or equal to + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], + * and + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] + * must be divisible by `gopDuration`. Valid range is [2s, 20s]. + * All video streams in the same channel must have the same GOP size. + * @type int $vbv_size_bits + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * @type int $vbv_fullness_bits + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * @type string $entropy_coder + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * @type bool $b_pyramid + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * @type int $b_frame_count + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * @type float $aq_strength + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * @type string $tune + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * Required. The width of the video in pixels. Must be an even integer. + * Valid range is [320, 1920]. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * Required. The height of the video in pixels. Must be an even integer. + * Valid range is [180, 1080]. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 60. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. Minimum value is 10,000. + * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). + * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 6; + * @return bool + */ + public function getAllowOpenGop() + { + return $this->allow_open_gop; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 6; + * @param bool $var + * @return $this + */ + public function setAllowOpenGop($var) + { + GPBUtil::checkBool($var); + $this->allow_open_gop = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. + * If GOP frame count is set instead of GOP duration, GOP duration will be + * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + * must satisfy the limitations on `gopDuration` as well. + * Valid range is [60, 600]. + * + * Generated from protobuf field int32 gop_frame_count = 7; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(7); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(7); + } + + /** + * Select the GOP size based on the specified frame count. + * If GOP frame count is set instead of GOP duration, GOP duration will be + * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration + * must satisfy the limitations on `gopDuration` as well. + * Valid range is [60, 600]. + * + * Generated from protobuf field int32 gop_frame_count = 7; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `2s`. Note that `gopDuration` must be less than or equal to + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], + * and + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] + * must be divisible by `gopDuration`. Valid range is [2s, 20s]. + * All video streams in the same channel must have the same GOP size. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(8); + } + + public function hasGopDuration() + { + return $this->hasOneof(8); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `2s`. Note that `gopDuration` must be less than or equal to + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], + * and + * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] + * must be divisible by `gopDuration`. Valid range is [2s, 20s]. + * All video streams in the same channel must have the same GOP size. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * + * Generated from protobuf field int32 vbv_size_bits = 9; + * @return int + */ + public function getVbvSizeBits() + { + return $this->vbv_size_bits; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to + * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. + * + * Generated from protobuf field int32 vbv_size_bits = 9; + * @param int $var + * @return $this + */ + public function setVbvSizeBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_size_bits = $var; + + return $this; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * + * Generated from protobuf field int32 vbv_fullness_bits = 10; + * @return int + */ + public function getVbvFullnessBits() + { + return $this->vbv_fullness_bits; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. + * + * Generated from protobuf field int32 vbv_fullness_bits = 10; + * @param int $var + * @return $this + */ + public function setVbvFullnessBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_fullness_bits = $var; + + return $this; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 11; + * @return string + */ + public function getEntropyCoder() + { + return $this->entropy_coder; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 11; + * @param string $var + * @return $this + */ + public function setEntropyCoder($var) + { + GPBUtil::checkString($var, True); + $this->entropy_coder = $var; + + return $this; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 12; + * @return bool + */ + public function getBPyramid() + { + return $this->b_pyramid; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 12; + * @param bool $var + * @return $this + */ + public function setBPyramid($var) + { + GPBUtil::checkBool($var); + $this->b_pyramid = $var; + + return $this; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * + * Generated from protobuf field int32 b_frame_count = 13; + * @return int + */ + public function getBFrameCount() + { + return $this->b_frame_count; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than + * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] + * if set. The default is 0. + * + * Generated from protobuf field int32 b_frame_count = 13; + * @param int $var + * @return $this + */ + public function setBFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->b_frame_count = $var; + + return $this; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 14; + * @return float + */ + public function getAqStrength() + { + return $this->aq_strength; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 14; + * @param float $var + * @return $this + */ + public function setAqStrength($var) + { + GPBUtil::checkDouble($var); + $this->aq_strength = $var; + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string profile = 15; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` (default) + * * `high` + * The available options are [FFmpeg-compatible Profile + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string profile = 15; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string tune = 16; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible Encode + * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) + * Note that certain values for this field may cause the transcoder to + * override other fields you set in the + * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] + * message. + * + * Generated from protobuf field string tune = 16; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(H264CodecSettings::class, \Google\Cloud\Video\LiveStream\V1\VideoStream_H264CodecSettings::class); + diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php new file mode 100644 index 000000000000..ffda21dceb46 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php @@ -0,0 +1,111 @@ +google.cloud.video.livestream.v1.VideoStreamProperty + */ +class VideoStreamProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Index of this video stream. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Properties of the video format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; + */ + protected $video_format = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * Index of this video stream. + * @type \Google\Cloud\Video\LiveStream\V1\VideoFormat $video_format + * Properties of the video format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Index of this video stream. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Index of this video stream. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Properties of the video format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; + * @return \Google\Cloud\Video\LiveStream\V1\VideoFormat|null + */ + public function getVideoFormat() + { + return $this->video_format; + } + + public function hasVideoFormat() + { + return isset($this->video_format); + } + + public function clearVideoFormat() + { + unset($this->video_format); + } + + /** + * Properties of the video format. + * + * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; + * @param \Google\Cloud\Video\LiveStream\V1\VideoFormat $var + * @return $this + */ + public function setVideoFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoFormat::class); + $this->video_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php new file mode 100644 index 000000000000..d78b185c9aa3 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setAsset($asset) + ->setAssetId($assetId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->createAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Asset $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $assetId = '[ASSET_ID]'; + + create_asset_sample($formattedParent, $assetId); +} +// [END livestream_v1_generated_LivestreamService_CreateAsset_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php new file mode 100644 index 000000000000..87c456a7450a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php @@ -0,0 +1,95 @@ +setOutput($channelOutput); + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->createChannel($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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $channelId = '[CHANNEL_ID]'; + + create_channel_sample($formattedParent, $channelId); +} +// [END livestream_v1_generated_LivestreamService_CreateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php new file mode 100644 index 000000000000..500d8f1c317a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php @@ -0,0 +1,104 @@ +setManifestKey($clipClipManifestsManifestKey); + $clipClipManifests = [$clipManifest,]; + $clip = (new Clip()) + ->setClipManifests($clipClipManifests); + $request = (new CreateClipRequest()) + ->setParent($formattedParent) + ->setClipId($clipId) + ->setClip($clip); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->createClip($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Clip $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $clipId = '[CLIP_ID]'; + $clipClipManifestsManifestKey = '[MANIFEST_KEY]'; + + create_clip_sample($formattedParent, $clipId, $clipClipManifestsManifestKey); +} +// [END livestream_v1_generated_LivestreamService_CreateClip_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php new file mode 100644 index 000000000000..9a71176eefb6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setEvent($event) + ->setEventId($eventId); + + // Call the API and handle any network failures. + try { + /** @var Event $response */ + $response = $livestreamServiceClient->createEvent($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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $eventId = '[EVENT_ID]'; + + create_event_sample($formattedParent, $eventId); +} +// [END livestream_v1_generated_LivestreamService_CreateEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php new file mode 100644 index 000000000000..cab250d8915f --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setInput($input) + ->setInputId($inputId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->createInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Input $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $inputId = '[INPUT_ID]'; + + create_input_sample($formattedParent, $inputId); +} +// [END livestream_v1_generated_LivestreamService_CreateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php new file mode 100644 index 000000000000..101273b1066b --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->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 = LivestreamServiceClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + + delete_asset_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteAsset_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php new file mode 100644 index 000000000000..9e248f5e7f96 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->deleteChannel($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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + delete_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php new file mode 100644 index 000000000000..f87b491b93aa --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->deleteClip($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 = LivestreamServiceClient::clipName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]', + '[CLIP]' + ); + + delete_clip_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteClip_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php new file mode 100644 index 000000000000..1d889cf7cf86 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $livestreamServiceClient->deleteEvent($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 = LivestreamServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]', + '[EVENT]' + ); + + delete_event_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php new file mode 100644 index 000000000000..90ae3ffb911a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->deleteInput($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 = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + + delete_input_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_DeleteInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php new file mode 100644 index 000000000000..c23945c2c661 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $livestreamServiceClient->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 = LivestreamServiceClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + + get_asset_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetAsset_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php new file mode 100644 index 000000000000..bc5923b29e28 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Channel $response */ + $response = $livestreamServiceClient->getChannel($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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + get_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php new file mode 100644 index 000000000000..8e78a1a75205 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Clip $response */ + $response = $livestreamServiceClient->getClip($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 = LivestreamServiceClient::clipName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]', + '[CLIP]' + ); + + get_clip_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetClip_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php new file mode 100644 index 000000000000..96941dc49a25 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Event $response */ + $response = $livestreamServiceClient->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 = LivestreamServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CHANNEL]', + '[EVENT]' + ); + + get_event_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php new file mode 100644 index 000000000000..d4050c30f4f3 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Input $response */ + $response = $livestreamServiceClient->getInput($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 = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + + get_input_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php new file mode 100644 index 000000000000..74f1b89dcff0 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/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 livestream_v1_generated_LivestreamService_GetLocation_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php new file mode 100644 index 000000000000..2ae26bfe61f6 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Pool $response */ + $response = $livestreamServiceClient->getPool($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 = LivestreamServiceClient::poolName('[PROJECT]', '[LOCATION]', '[POOL]'); + + get_pool_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_GetPool_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php new file mode 100644 index 000000000000..6cadc6e72784 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_assets_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListAssets_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php new file mode 100644 index 000000000000..a09d21fad919 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->listChannels($request); + + /** @var Channel $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_channels_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListChannels_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php new file mode 100644 index 000000000000..732db92d0790 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->listClips($request); + + /** @var Clip $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + list_clips_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListClips_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php new file mode 100644 index 000000000000..cdddc296a241 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + list_events_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListEvents_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php new file mode 100644 index 000000000000..b10a4e8637b8 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $livestreamServiceClient->listInputs($request); + + /** @var Input $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_inputs_sample($formattedParent); +} +// [END livestream_v1_generated_LivestreamService_ListInputs_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php new file mode 100644 index 000000000000..44a01d3dfb77 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/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 livestream_v1_generated_LivestreamService_ListLocations_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php new file mode 100644 index 000000000000..764f07e06895 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->startChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ChannelOperationResponse $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + start_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_StartChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php new file mode 100644 index 000000000000..e475b45492ba --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->stopChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ChannelOperationResponse $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + + stop_channel_sample($formattedName); +} +// [END livestream_v1_generated_LivestreamService_StopChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php new file mode 100644 index 000000000000..984af23ee27c --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php @@ -0,0 +1,74 @@ +setOutput($channelOutput); + $request = (new UpdateChannelRequest()) + ->setChannel($channel); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->updateChannel($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()); + } +} +// [END livestream_v1_generated_LivestreamService_UpdateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php new file mode 100644 index 000000000000..679fc2197cda --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php @@ -0,0 +1,71 @@ +setInput($input); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->updateInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Input $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 livestream_v1_generated_LivestreamService_UpdateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php new file mode 100644 index 000000000000..6a271f6dbbdf --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php @@ -0,0 +1,71 @@ +setPool($pool); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $livestreamServiceClient->updatePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Pool $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 livestream_v1_generated_LivestreamService_UpdatePool_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php new file mode 100644 index 000000000000..08e7b87ec33d --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php @@ -0,0 +1,1223 @@ + createAssetAsync(CreateAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createChannelAsync(CreateChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClipAsync(CreateClipRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEventAsync(CreateEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInputAsync(CreateInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteChannelAsync(DeleteChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClipAsync(DeleteClipRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEventAsync(DeleteEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInputAsync(DeleteInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getChannelAsync(GetChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClipAsync(GetClipRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEventAsync(GetEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInputAsync(GetInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPoolAsync(GetPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listChannelsAsync(ListChannelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClipsAsync(ListClipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInputsAsync(ListInputsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startChannelAsync(StartChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopChannelAsync(StopChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateChannelAsync(UpdateChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInputAsync(UpdateInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePoolAsync(UpdatePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class LivestreamServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.video.livestream.v1.LivestreamService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'livestream.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'livestream.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/livestream_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/livestream_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/livestream_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/livestream_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 asset + * resource. + * + * @param string $project + * @param string $location + * @param string $asset + * + * @return string The formatted asset resource. + */ + public static function assetName(string $project, string $location, string $asset): string + { + return self::getPathTemplate('asset')->render([ + 'project' => $project, + 'location' => $location, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a channel + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * + * @return string The formatted channel resource. + */ + public static function channelName(string $project, string $location, string $channel): string + { + return self::getPathTemplate('channel')->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a clip + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * @param string $clip + * + * @return string The formatted clip resource. + */ + public static function clipName(string $project, string $location, string $channel, string $clip): string + { + return self::getPathTemplate('clip')->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + 'clip' => $clip, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a event + * resource. + * + * @param string $project + * @param string $location + * @param string $channel + * @param string $event + * + * @return string The formatted event resource. + */ + public static function eventName(string $project, string $location, string $channel, string $event): string + { + return self::getPathTemplate('event')->render([ + 'project' => $project, + 'location' => $location, + 'channel' => $channel, + 'event' => $event, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a input + * resource. + * + * @param string $project + * @param string $location + * @param string $input + * + * @return string The formatted input resource. + */ + public static function inputName(string $project, string $location, string $input): string + { + return self::getPathTemplate('input')->render([ + 'project' => $project, + 'location' => $location, + 'input' => $input, + ]); + } + + /** + * 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 network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a pool + * resource. + * + * @param string $project + * @param string $location + * @param string $pool + * + * @return string The formatted pool resource. + */ + public static function poolName(string $project, string $location, string $pool): string + { + return self::getPathTemplate('pool')->render([ + 'project' => $project, + 'location' => $location, + 'pool' => $pool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $version + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $version): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'version' => $version, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - asset: projects/{project}/locations/{location}/assets/{asset} + * - channel: projects/{project}/locations/{location}/channels/{channel} + * - clip: projects/{project}/locations/{location}/channels/{channel}/clips/{clip} + * - event: projects/{project}/locations/{location}/channels/{channel}/events/{event} + * - input: projects/{project}/locations/{location}/inputs/{input} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - pool: projects/{project}/locations/{location}/pools/{pool} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'livestream.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a Asset with the provided unique ID in the specified + * region. + * + * The async variant is {@see LivestreamServiceClient::createAssetAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAsset(CreateAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); + } + + /** + * Creates a channel with the provided unique ID in the specified + * region. + * + * The async variant is {@see LivestreamServiceClient::createChannelAsync()} . + * + * @example samples/V1/LivestreamServiceClient/create_channel.php + * + * @param CreateChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createChannel(CreateChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateChannel', $request, $callOptions)->wait(); + } + + /** + * Creates a clip with the provided clip ID in the specified channel. + * + * The async variant is {@see LivestreamServiceClient::createClipAsync()} . + * + * @example samples/V1/LivestreamServiceClient/create_clip.php + * + * @param CreateClipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createClip(CreateClipRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateClip', $request, $callOptions)->wait(); + } + + /** + * Creates an event with the provided unique ID in the specified channel. + * + * The async variant is {@see LivestreamServiceClient::createEventAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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 Event + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEvent(CreateEventRequest $request, array $callOptions = []): Event + { + return $this->startApiCall('CreateEvent', $request, $callOptions)->wait(); + } + + /** + * Creates an input with the provided unique ID in the specified region. + * + * The async variant is {@see LivestreamServiceClient::createInputAsync()} . + * + * @example samples/V1/LivestreamServiceClient/create_input.php + * + * @param CreateInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createInput(CreateInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInput', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified asset if it is not used. + * + * The async variant is {@see LivestreamServiceClient::deleteAssetAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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 the specified channel. + * + * The async variant is {@see LivestreamServiceClient::deleteChannelAsync()} . + * + * @example samples/V1/LivestreamServiceClient/delete_channel.php + * + * @param DeleteChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteChannel(DeleteChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteChannel', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified clip job resource. This method only deletes the clip + * job and does not delete the VOD clip stored in the GCS. + * + * The async variant is {@see LivestreamServiceClient::deleteClipAsync()} . + * + * @example samples/V1/LivestreamServiceClient/delete_clip.php + * + * @param DeleteClipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteClip(DeleteClipRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteClip', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified event. + * + * The async variant is {@see LivestreamServiceClient::deleteEventAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEvent(DeleteEventRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteEvent', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified input. + * + * The async variant is {@see LivestreamServiceClient::deleteInputAsync()} . + * + * @example samples/V1/LivestreamServiceClient/delete_input.php + * + * @param DeleteInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteInput(DeleteInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInput', $request, $callOptions)->wait(); + } + + /** + * Returns the specified asset. + * + * The async variant is {@see LivestreamServiceClient::getAssetAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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(); + } + + /** + * Returns the specified channel. + * + * The async variant is {@see LivestreamServiceClient::getChannelAsync()} . + * + * @example samples/V1/LivestreamServiceClient/get_channel.php + * + * @param GetChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Channel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getChannel(GetChannelRequest $request, array $callOptions = []): Channel + { + return $this->startApiCall('GetChannel', $request, $callOptions)->wait(); + } + + /** + * Returns the specified clip. + * + * The async variant is {@see LivestreamServiceClient::getClipAsync()} . + * + * @example samples/V1/LivestreamServiceClient/get_clip.php + * + * @param GetClipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Clip + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClip(GetClipRequest $request, array $callOptions = []): Clip + { + return $this->startApiCall('GetClip', $request, $callOptions)->wait(); + } + + /** + * Returns the specified event. + * + * The async variant is {@see LivestreamServiceClient::getEventAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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(); + } + + /** + * Returns the specified input. + * + * The async variant is {@see LivestreamServiceClient::getInputAsync()} . + * + * @example samples/V1/LivestreamServiceClient/get_input.php + * + * @param GetInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Input + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInput(GetInputRequest $request, array $callOptions = []): Input + { + return $this->startApiCall('GetInput', $request, $callOptions)->wait(); + } + + /** + * Returns the specified pool. + * + * The async variant is {@see LivestreamServiceClient::getPoolAsync()} . + * + * @example samples/V1/LivestreamServiceClient/get_pool.php + * + * @param GetPoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Pool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPool(GetPoolRequest $request, array $callOptions = []): Pool + { + return $this->startApiCall('GetPool', $request, $callOptions)->wait(); + } + + /** + * Returns a list of all assets in the specified region. + * + * The async variant is {@see LivestreamServiceClient::listAssetsAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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); + } + + /** + * Returns a list of all channels in the specified region. + * + * The async variant is {@see LivestreamServiceClient::listChannelsAsync()} . + * + * @example samples/V1/LivestreamServiceClient/list_channels.php + * + * @param ListChannelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listChannels(ListChannelsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListChannels', $request, $callOptions); + } + + /** + * Returns a list of all clips in the specified channel. + * + * The async variant is {@see LivestreamServiceClient::listClipsAsync()} . + * + * @example samples/V1/LivestreamServiceClient/list_clips.php + * + * @param ListClipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listClips(ListClipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClips', $request, $callOptions); + } + + /** + * Returns a list of all events in the specified channel. + * + * The async variant is {@see LivestreamServiceClient::listEventsAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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); + } + + /** + * Returns a list of all inputs in the specified region. + * + * The async variant is {@see LivestreamServiceClient::listInputsAsync()} . + * + * @example samples/V1/LivestreamServiceClient/list_inputs.php + * + * @param ListInputsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listInputs(ListInputsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInputs', $request, $callOptions); + } + + /** + * Starts the specified channel. Part of the video pipeline will be created + * only when the StartChannel request is received by the server. + * + * The async variant is {@see LivestreamServiceClient::startChannelAsync()} . + * + * @example samples/V1/LivestreamServiceClient/start_channel.php + * + * @param StartChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 startChannel(StartChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartChannel', $request, $callOptions)->wait(); + } + + /** + * Stops the specified channel. Part of the video pipeline will be released + * when the StopChannel request is received by the server. + * + * The async variant is {@see LivestreamServiceClient::stopChannelAsync()} . + * + * @example samples/V1/LivestreamServiceClient/stop_channel.php + * + * @param StopChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 stopChannel(StopChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopChannel', $request, $callOptions)->wait(); + } + + /** + * Updates the specified channel. + * + * The async variant is {@see LivestreamServiceClient::updateChannelAsync()} . + * + * @example samples/V1/LivestreamServiceClient/update_channel.php + * + * @param UpdateChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateChannel(UpdateChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateChannel', $request, $callOptions)->wait(); + } + + /** + * Updates the specified input. + * + * The async variant is {@see LivestreamServiceClient::updateInputAsync()} . + * + * @example samples/V1/LivestreamServiceClient/update_input.php + * + * @param UpdateInputRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateInput(UpdateInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInput', $request, $callOptions)->wait(); + } + + /** + * Updates the specified pool. + * + * The async variant is {@see LivestreamServiceClient::updatePoolAsync()} . + * + * @example samples/V1/LivestreamServiceClient/update_pool.php + * + * @param UpdatePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updatePool(UpdatePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePool', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see LivestreamServiceClient::getLocationAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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 LivestreamServiceClient::listLocationsAsync()} . + * + * @example samples/V1/LivestreamServiceClient/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/VideoLiveStream/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..375baec444e7 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json @@ -0,0 +1,158 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.video.livestream.v1", + "libraryPackage": "Google\\Cloud\\Video\\LiveStream\\V1", + "services": { + "LivestreamService": { + "clients": { + "grpc": { + "libraryClient": "LivestreamServiceGapicClient", + "rpcs": { + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "CreateChannel": { + "methods": [ + "createChannel" + ] + }, + "CreateClip": { + "methods": [ + "createClip" + ] + }, + "CreateEvent": { + "methods": [ + "createEvent" + ] + }, + "CreateInput": { + "methods": [ + "createInput" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "DeleteChannel": { + "methods": [ + "deleteChannel" + ] + }, + "DeleteClip": { + "methods": [ + "deleteClip" + ] + }, + "DeleteEvent": { + "methods": [ + "deleteEvent" + ] + }, + "DeleteInput": { + "methods": [ + "deleteInput" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetChannel": { + "methods": [ + "getChannel" + ] + }, + "GetClip": { + "methods": [ + "getClip" + ] + }, + "GetEvent": { + "methods": [ + "getEvent" + ] + }, + "GetInput": { + "methods": [ + "getInput" + ] + }, + "GetPool": { + "methods": [ + "getPool" + ] + }, + "ListAssets": { + "methods": [ + "listAssets" + ] + }, + "ListChannels": { + "methods": [ + "listChannels" + ] + }, + "ListClips": { + "methods": [ + "listClips" + ] + }, + "ListEvents": { + "methods": [ + "listEvents" + ] + }, + "ListInputs": { + "methods": [ + "listInputs" + ] + }, + "StartChannel": { + "methods": [ + "startChannel" + ] + }, + "StopChannel": { + "methods": [ + "stopChannel" + ] + }, + "UpdateChannel": { + "methods": [ + "updateChannel" + ] + }, + "UpdateInput": { + "methods": [ + "updateInput" + ] + }, + "UpdatePool": { + "methods": [ + "updatePool" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json new file mode 100644 index 000000000000..10df1dc07eff --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json @@ -0,0 +1,184 @@ +{ + "interfaces": { + "google.cloud.video.livestream.v1.LivestreamService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "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_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 + } + }, + "methods": { + "CreateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateClip": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateInput": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteClip": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteInput": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetChannel": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetClip": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEvent": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInput": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListChannels": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListClips": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEvents": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListInputs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StartChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateInput": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdatePool": { + "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/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php new file mode 100644 index 000000000000..ba81fcbde06a --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php @@ -0,0 +1,519 @@ + [ + 'google.cloud.video.livestream.v1.LivestreamService' => [ + 'CreateAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Asset', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateClip' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Clip', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + '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\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteClip' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'channel.name', + 'fieldAccessors' => [ + 'getChannel', + 'getName', + ], + ], + ], + ], + 'UpdateInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'input.name', + 'fieldAccessors' => [ + 'getInput', + 'getName', + ], + ], + ], + ], + 'UpdatePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Pool', + 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'pool.name', + 'fieldAccessors' => [ + 'getPool', + 'getName', + ], + ], + ], + ], + 'CreateEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Channel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetClip' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Clip', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInput' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Input', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Pool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListChannels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getChannels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListChannelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListClips' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClips', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListClipsResponse', + '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\Video\LiveStream\V1\ListEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInputs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInputs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListInputsResponse', + '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' => [ + 'asset' => 'projects/{project}/locations/{location}/assets/{asset}', + 'channel' => 'projects/{project}/locations/{location}/channels/{channel}', + 'clip' => 'projects/{project}/locations/{location}/channels/{channel}/clips/{clip}', + 'event' => 'projects/{project}/locations/{location}/channels/{channel}/events/{event}', + 'input' => 'projects/{project}/locations/{location}/inputs/{input}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'pool' => 'projects/{project}/locations/{location}/pools/{pool}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php new file mode 100644 index 000000000000..be632de59289 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php @@ -0,0 +1,414 @@ + [ + '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.video.livestream.v1.LivestreamService' => [ + 'CreateAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets', + 'body' => 'asset', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'asset_id', + ], + ], + 'CreateChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', + 'body' => 'channel', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'channel_id', + ], + ], + 'CreateClip' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/clips', + 'body' => 'clip', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'clip_id', + ], + ], + 'CreateEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', + 'body' => 'event', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'event_id', + ], + ], + 'CreateInput' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', + 'body' => 'input', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'input_id', + ], + ], + 'DeleteAsset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteChannel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteClip' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/clips/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEvent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInput' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetChannel' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetClip' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/clips/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInput' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPool' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListChannels' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListClips' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/clips', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInputs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateChannel' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{channel.name=projects/*/locations/*/channels/*}', + 'body' => 'channel', + 'placeholders' => [ + 'channel.name' => [ + 'getters' => [ + 'getChannel', + 'getName', + ], + ], + ], + ], + 'UpdateInput' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{input.name=projects/*/locations/*/inputs/*}', + 'body' => 'input', + 'placeholders' => [ + 'input.name' => [ + 'getters' => [ + 'getInput', + 'getName', + ], + ], + ], + ], + 'UpdatePool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{pool.name=projects/*/locations/*/pools/*}', + 'body' => 'pool', + 'placeholders' => [ + 'pool.name' => [ + 'getters' => [ + 'getPool', + '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/*}', + '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/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php new file mode 100644 index 000000000000..eb2433dd7014 --- /dev/null +++ b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php @@ -0,0 +1,2860 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LivestreamServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LivestreamServiceClient($options); + } + + /** @test */ + public function createAssetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $crc32c = 'crc32c-1352399984'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $expectedResponse->setCrc32c($crc32c); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $asset = new Asset(); + $assetId = 'assetId-373202742'; + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAsset($asset) + ->setAssetId($assetId); + $response = $gapicClient->createAsset($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.video.livestream.v1.LivestreamService/CreateAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $actualValue = $actualApiRequestObject->getAssetId(); + $this->assertProtobufEquals($assetId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + $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 createAssetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAssetTest'); + $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]'); + $asset = new Asset(); + $assetId = 'assetId-373202742'; + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAsset($asset) + ->setAssetId($assetId); + $response = $gapicClient->createAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + 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 createChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + $response = $gapicClient->createChannel($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.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $actualValue = $actualApiRequestObject->getChannelId(); + $this->assertProtobufEquals($channelId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + $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 createChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createChannelTest'); + $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]'); + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $channelId = 'channelId-1930808873'; + $request = (new CreateChannelRequest()) + ->setParent($formattedParent) + ->setChannel($channel) + ->setChannelId($channelId); + $response = $gapicClient->createChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createChannelTest'); + 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 createClipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $outputUri = 'outputUri-1273518802'; + $expectedResponse = new Clip(); + $expectedResponse->setName($name); + $expectedResponse->setOutputUri($outputUri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $clipId = 'clipId860900458'; + $clip = new Clip(); + $clipClipManifests = []; + $clip->setClipManifests($clipClipManifests); + $request = (new CreateClipRequest()) + ->setParent($formattedParent) + ->setClipId($clipId) + ->setClip($clip); + $response = $gapicClient->createClip($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.video.livestream.v1.LivestreamService/CreateClip', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClipId(); + $this->assertProtobufEquals($clipId, $actualValue); + $actualValue = $actualApiRequestObject->getClip(); + $this->assertProtobufEquals($clip, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClipTest'); + $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 createClipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClipTest'); + $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $clipId = 'clipId860900458'; + $clip = new Clip(); + $clipClipManifests = []; + $clip->setClipManifests($clipClipManifests); + $request = (new CreateClipRequest()) + ->setParent($formattedParent) + ->setClipId($clipId) + ->setClip($clip); + $response = $gapicClient->createClip($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClipTest'); + 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $executeNow = true; + $expectedResponse = new Event(); + $expectedResponse->setName($name); + $expectedResponse->setExecuteNow($executeNow); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $event = new Event(); + $eventId = 'eventId278118624'; + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEvent($event) + ->setEventId($eventId); + $response = $gapicClient->createEvent($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.video.livestream.v1.LivestreamService/CreateEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $actualValue = $actualRequestObject->getEventId(); + $this->assertProtobufEquals($eventId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $event = new Event(); + $eventId = 'eventId278118624'; + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEvent($event) + ->setEventId($eventId); + try { + $gapicClient->createEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $input = new Input(); + $inputId = 'inputId470715824'; + $request = (new CreateInputRequest()) + ->setParent($formattedParent) + ->setInput($input) + ->setInputId($inputId); + $response = $gapicClient->createInput($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.video.livestream.v1.LivestreamService/CreateInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $actualValue = $actualApiRequestObject->getInputId(); + $this->assertProtobufEquals($inputId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInputTest'); + $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 createInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInputTest'); + $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]'); + $input = new Input(); + $inputId = 'inputId470715824'; + $request = (new CreateInputRequest()) + ->setParent($formattedParent) + ->setInput($input) + ->setInputId($inputId); + $response = $gapicClient->createInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInputTest'); + 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 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]', '[LOCATION]', '[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.video.livestream.v1.LivestreamService/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]', '[LOCATION]', '[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 deleteChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new DeleteChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteChannel($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.video.livestream.v1.LivestreamService/DeleteChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + $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 deleteChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteChannelTest'); + $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new DeleteChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); + 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 deleteClipTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClipTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClipTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); + $request = (new DeleteClipRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClip($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.video.livestream.v1.LivestreamService/DeleteClip', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClipTest'); + $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 deleteClipExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClipTest'); + $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->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); + $request = (new DeleteClipRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClip($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClipTest'); + 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); + $request = (new DeleteEventRequest()) + ->setName($formattedName); + $gapicClient->deleteEvent($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[CHANNEL]', '[EVENT]'); + $request = (new DeleteEventRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteEvent($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new DeleteInputRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInput($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.video.livestream.v1.LivestreamService/DeleteInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInputTest'); + $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 deleteInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInputTest'); + $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->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new DeleteInputRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInputTest'); + 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 getAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $crc32c = 'crc32c-1352399984'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name2); + $expectedResponse->setCrc32c($crc32c); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[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.video.livestream.v1.LivestreamService/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]', '[LOCATION]', '[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 getChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name2); + $expectedResponse->setActiveInput($activeInput); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new GetChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->getChannel($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.video.livestream.v1.LivestreamService/GetChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new GetChannelRequest()) + ->setName($formattedName); + try { + $gapicClient->getChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $outputUri = 'outputUri-1273518802'; + $expectedResponse = new Clip(); + $expectedResponse->setName($name2); + $expectedResponse->setOutputUri($outputUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); + $request = (new GetClipRequest()) + ->setName($formattedName); + $response = $gapicClient->getClip($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.video.livestream.v1.LivestreamService/GetClip', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); + $request = (new GetClipRequest()) + ->setName($formattedName); + try { + $gapicClient->getClip($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $executeNow = true; + $expectedResponse = new Event(); + $expectedResponse->setName($name2); + $expectedResponse->setExecuteNow($executeNow); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[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.video.livestream.v1.LivestreamService/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]', '[CHANNEL]', '[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 getInputTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new GetInputRequest()) + ->setName($formattedName); + $response = $gapicClient->getInput($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.video.livestream.v1.LivestreamService/GetInput', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInputExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); + $request = (new GetInputRequest()) + ->setName($formattedName); + try { + $gapicClient->getInput($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Pool(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->poolName('[PROJECT]', '[LOCATION]', '[POOL]'); + $request = (new GetPoolRequest()) + ->setName($formattedName); + $response = $gapicClient->getPool($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.video.livestream.v1.LivestreamService/GetPool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->poolName('[PROJECT]', '[LOCATION]', '[POOL]'); + $request = (new GetPoolRequest()) + ->setName($formattedName); + try { + $gapicClient->getPool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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->locationName('[PROJECT]', '[LOCATION]'); + $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.video.livestream.v1.LivestreamService/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->locationName('[PROJECT]', '[LOCATION]'); + $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 listChannelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelsElement = new Channel(); + $channels = [ + $channelsElement, + ]; + $expectedResponse = new ListChannelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannels($channels); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListChannelsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listChannels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listChannelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListChannelsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listChannels($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clipsElement = new Clip(); + $clips = [ + $clipsElement, + ]; + $expectedResponse = new ListClipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClips($clips); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new ListClipsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClips($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClips()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListClips', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new ListClipsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClips($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $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.video.livestream.v1.LivestreamService/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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $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 listInputsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $inputsElement = new Input(); + $inputs = [ + $inputsElement, + ]; + $expectedResponse = new ListInputsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInputs($inputs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInputsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInputs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInputs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInputsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListInputsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInputs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ChannelOperationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StartChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->startChannel($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.video.livestream.v1.LivestreamService/StartChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startChannelTest'); + $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 startChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startChannelTest'); + $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StartChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->startChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startChannelTest'); + 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 stopChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ChannelOperationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StopChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->stopChannel($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.video.livestream.v1.LivestreamService/StopChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopChannelTest'); + $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 stopChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopChannelTest'); + $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); + $request = (new StopChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->stopChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopChannelTest'); + 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 updateChannelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activeInput = 'activeInput1758551377'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setActiveInput($activeInput); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $request = (new UpdateChannelRequest()) + ->setChannel($channel); + $response = $gapicClient->updateChannel($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.video.livestream.v1.LivestreamService/UpdateChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + $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 updateChannelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateChannelTest'); + $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 + $channel = new Channel(); + $channelOutput = new Output(); + $channel->setOutput($channelOutput); + $request = (new UpdateChannelRequest()) + ->setChannel($channel); + $response = $gapicClient->updateChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateChannelTest'); + 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 updateInputTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Input(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $input = new Input(); + $request = (new UpdateInputRequest()) + ->setInput($input); + $response = $gapicClient->updateInput($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.video.livestream.v1.LivestreamService/UpdateInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInput(); + $this->assertProtobufEquals($input, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInputTest'); + $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 updateInputExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInputTest'); + $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 + $input = new Input(); + $request = (new UpdateInputRequest()) + ->setInput($input); + $response = $gapicClient->updateInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInputTest'); + 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 updatePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Pool(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $pool = new Pool(); + $request = (new UpdatePoolRequest()) + ->setPool($pool); + $response = $gapicClient->updatePool($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.video.livestream.v1.LivestreamService/UpdatePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPool(); + $this->assertProtobufEquals($pool, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePoolTest'); + $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 updatePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePoolTest'); + $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 + $pool = new Pool(); + $request = (new UpdatePoolRequest()) + ->setPool($pool); + $response = $gapicClient->updatePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePoolTest'); + 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 createAssetAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $crc32c = 'crc32c-1352399984'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $expectedResponse->setCrc32c($crc32c); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $asset = new Asset(); + $assetId = 'assetId-373202742'; + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAsset($asset) + ->setAssetId($assetId); + $response = $gapicClient->createAssetAsync($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.video.livestream.v1.LivestreamService/CreateAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $actualValue = $actualApiRequestObject->getAssetId(); + $this->assertProtobufEquals($assetId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAssetTest'); + $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/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php new file mode 100644 index 000000000000..c8f68cb7b757 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +¶ +3google/cloud/video/stitcher/v1/ad_tag_details.protogoogle.cloud.video.stitcher.v1google/protobuf/duration.protogoogle/protobuf/struct.proto"ÿ +LiveAdTagDetail +name ( > + ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:êA™ +,videostitcher.googleapis.com/LiveAdTagDetailiprojects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}"ù +VodAdTagDetail +name ( > + ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:˜êA” ++videostitcher.googleapis.com/VodAdTagDetaileprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}"° + AdRequest +uri ( I +request_metadata ( 2/.google.cloud.video.stitcher.v1.RequestMetadataK +response_metadata ( 20.google.cloud.video.stitcher.v1.ResponseMetadata"; +RequestMetadata( +headers ( 2.google.protobuf.Struct"¯ +ResponseMetadata +error ( ( +headers ( 2.google.protobuf.Struct + status_code (  + +size_bytes (+ +duration ( 2.google.protobuf.Duration +body ( By +"com.google.cloud.video.stitcher.v1BAdTagDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php new file mode 100644 index 0000000000000000000000000000000000000000..7fa721f167f8d88e5a7157482f863a02df5d9356 GIT binary patch literal 1567 zcmb7E&rcIU6t;i}(~4vdrV?YuLZk%P4SFyxf@!H#Vvq(K4rY@&ot?HL+nsfGwh59R z{I~pTJbU-<{MarV0g=7z%gcM;eD8ZdUcZS35m<&z5)zIC@nQE2iUENUXM$lCz;4p( z5e_jMMl>MYhOlu2KOD8;+r~lrsZ5Po!ZC4SpRs;G92~I3cSh7F%!vgRctE%_+H$ZT zc23DzY-?lyLNp|CgfM~4R{f9&M9K$_7d@r%U zIe_wul5RjTj0F<%w?g9%4XL0gpxn8@7AvArb3g0c{*grg9X>KZhdDt0Ae zQh*&eVbxNaNIkrRP!JxXz-y2ga~cW8TQbyj`$S|)Do=GSeOAHI9;_OUu6v2(4ir2g z`PU)jL?k@i*1Q$KIJ3MfG^<6_+ovS(>tujNlyTR+sOkdby3}KmHuB0WEyd<8O$)F2 zepctc9E)nkOz~U=-|vCVTg`*@#Dv>=d~7{F_GEnQ(bm$V6b?ny;VD%!N|oPJVAc$T zwGS3dTqhm3@?BV{7N2j}|Ax1ldhQI$yE_U8ouVP48P4qg;nZ|ihSLD|hs38SgPGGX z>o?IkR7n|13CyT%DHmk&ytN4C1}qlZGow5%{#E-7mbGS?WTsxJR&2}FbqtpEN-p0Q zf<^3{r`FgB7?yj(Lg|~BW3{bn!JKnxsI?u}7r{bmcQ6Zkv|n*SDKDE<2E~Zek-Q=* zL$fW_r+?OF6lLk@Xv$NHa^)E)<)yM7f_cGCiGC}WS@}@_#he(odBZveC4*`BmZ!D$ zFK?l}-Bz6Tbh)aM!qPe@=6u#;@Zf7g_*o}HTy{ua1=A!QTo<4swZGxLddc)A*4L#~ z__S+QU^1|>d42ZxJ(YcxCw0>7sJne(c4uX01$(iYt>lI|ExAi{?G@6I=2ncs7=S;T C&-u9k literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php new file mode 100644 index 0000000000000000000000000000000000000000..8295feed69ccba158eb9cedccdd643e741abc7b5 GIT binary patch literal 1738 zcmb7_?@!u57{^8Y#e+YvW*gg!c|(nuY-PG^FK}o;(6J~mP!pFXO=%CgthC+rin_%& z`v>>e?ES7+D4^SLyy0?p&*z?>-@e~>+77ItBWz)+F>Ijb4PtGK9BMOLw@uXaS}jbG zZg(7FVk#q4tfETw6qSnQ(-+*-wLPliEV{JqOA}{w)Ao!^ml)X2xQsBpjcKO4o$&#h zMQqEJ1slN9I@onI9iyXK;RG|y(3qwi35;^!W0Z3rqcnOL<$QY=KsPnlMF$}cz60Vv z$7`BIM=sMC|63=nN-V;NW|D6_svK%*ri;1x{ktvC(iwLQ`36->$LTE;F#Wshj?J@> zLw(0;eqwl1l(NMzwKP*HVppfcVK%MttJ&-&W??%0o%B}kSszDQC>{8i&E9h|hZyzn z@aqUs%sguC3cr28ZMae%o;Ib_#TIk3*+GZ{qKNR-9_huCH;mBzLtgT9_@Mv%Cj6X( z%zxHedL9_aqB&&I9CE)o$70ny2q$sdr5Z5ua8wjK;koq_ZR=o+jR%Z=J`{z9#nKAn~8rIS+S zR6VOSYNdnnVYyUHOh~g3%^x2pB4SawNK8s|Fjc8mN{MLdR}^BQ=TZeE(xQAuRL$Ty z2*xZ4JOS~Y*W-LG3(LGw@7aBr@OeSwjqu_R<2A%sjqpA~qRl$y2yI@_SR0eeHdCEzUZqHST1vp&6){-b--(KyC$Pi?0W)=QbxIsO z0|{Sq%`vbsbT%!{9>Zc_6vAf2{!>^EZNj5jaU=ooLb#^QRAMCO_+CtU3o}?uRx&1f zXk%RDVh#%n5Fe^(Y6BKWGa{`(T;#S_bieCksZ~haEvpoVs7FbVuGBk7+^y5d1&OCw zrmb*uoSkYD>Sec`Mej*bAK4^4i|>I($DM4)xSUNPIGs# eY|e-;!JExcVO|CTIHZ?<)k<+Q5V2dh1^5k&5GSkv literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php new file mode 100644 index 0000000000000000000000000000000000000000..03acc1702d6098ac4cea9bc04a2c82f73708dc97 GIT binary patch literal 1464 zcmb7EU2oeq6kTG+jjxlG5zxZzfPu?8)ImEL>97}P>EOtWL&UZ;Np?SAK#*nH5uiwd zL>cIYJnRqb&+QM5q++L7*ADZ8d_|pmc<#N2{P~ykI)(3WpT#WmIh*6z2h6V-PP2q3 zK@#Cvu~@JS2gywuMl91Y?wNRGx|sB+`>jaLlOhXP2QQOk8L@T{CB?kG3g;|o=RD-W zHOtzolQvtinCH6U1&I9{mZyHeaNjx~GVafP?oa!QVroc==|oaYojZ!@Fa6ocmn-JqvR$j6)v!QTUsv<_s_VC}$$|Q|zLM10E(ZmI-DYu+}jy zIVJX4nuzMp@LH558zP!9r7>q&>_^ic%Y!UTd6HQI+UYDA-?UM#w2tq#m2}|(w@Qtj z&L<+zFwYA1@$MLBj2Bsas&q?&+f6k6mzHhR^$IaYQBbV9rdC2!D{R)-zO?b zT%iM1iwr&Y(l*EaOY~4C+2josVo@18;~_zZGK<)@X(J&BYUHie6_7`zlEI*B3F^ls zwJE};hG5Sah|n9*5$W3Ki4^8sQ42lQ9>HPPFo@-PbTpx^=%whz*GDVZ7tUQ~EYC|{ z=+NNd4fF1XDDCm3A!>KW84H#kI?v%qTxkD+J#Q#YxjI|c*8A5b z=h~{tO?#RA^P=<9P~3HE&!@A~`*2oM9{ln7=8(NCkNrot#Aj~^g)GnUE!+b94M)+c A@c;k- literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php new file mode 100644 index 000000000000..fc5cf1667356 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +ä +2google/cloud/video/stitcher/v1/fetch_options.protogoogle.cloud.video.stitcher.v1"Š + FetchOptionsJ +headers ( 29.google.cloud.video.stitcher.v1.FetchOptions.HeadersEntry. + HeadersEntry +key (  +value ( :8By +"com.google.cloud.video.stitcher.v1BFetchOptionsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php new file mode 100644 index 0000000000000000000000000000000000000000..e3f3ffe8377e9ae1d61fe9e6b5c0a3f4cac6e0cc GIT binary patch literal 2272 zcmb7GQB&JS5H2PVSSP{Jq>V}1&edfGl1ZdM-%Oz+Tf%iqu*Vk6q@x+lSvng9p;M(3 zEzR(o`hWV==l+B~_3k8DhJ-lvi_dqr-|c?8->$#^Av%rVTht*Ti7_J{8eJlGN>CJ2 zMqL`9Q92%z7`gO3@&gj92pK(e)U%Ljbggf=X+qQ3B~3J;bP^EF4QT3V7rsZRmN1{W zrzF-cwza^&AdXAJu|G*vi4G9rbCN{ZC8*PHy(SEMm|?pkf$X*bvQGq%Jlw;0#odjFaw7In;aOjB!+Ej0AtP~!1KS{p8~YKXai3ppHYbEl85KKQ&+=yl zoIgfenUBrpdrs~l7N=zPb%bKV(m33eehYxB>B{~9Z+hh02R;eB7CFTiK8>5rGO7~f zHq!yg6Z*+kwfc~imc#ex^&ApMz82@aWwrfeXU=P5L5@Q+c5<8iIZdjA z*O%ty6lCX(zm@^Ys#hMu9U-9l0$SKwZ7u$-FDj1#vg|o&?AI&BK}Asju;(y5kq3+7 zKskW52|jmbgjv7C52`ya)sM%mcJTR(9|kOmawhd9Zv9~A)jaFcR2>St%yk2*!owK5 zXMQ-TFH5ZF^RRT!$}I#+McIe@9vR~_U``SUpYDoKTlVI^`UW&)2B!(kg5N`Y9d#aPKR3%d zo$?br$`gF8fa*1g_F^8|tRx#IEJ^;A&*9eLpLRaoLbj5oE4I55mZQywffj$tip&t

z8qRztNkN4b^5)-Zu`v*>@}#ik1eNt zJQ$cq7Kaxbz1Mw?YC5`6t2F69dI0w3M^jcZuIOAeZ;8ti?OndQ(gNzr4#M|}CEqN^ z2H!4+(p6&&4{osi2=0;)j{@RJk*yRp_B5X>4zJjl{F;)4IfYiG>Z&{IMJft0t3^L+ zV7Px>Kv6er16mXoDv&A%){$b>;Nw%KZ!2Bhn@G)b$BwTap?1d3$c*f*)EV_Wu3 zP?;j}D)5cB;1S>r_`FBh2gJGdb>eo-yde6ej(yMXo^yWZ{LZ}(9=Rtjd?N2rn|g#% zL++o+?1aj$=P*ZiEV(}(45%mT&d4<_>M63^?8pb5W4YCAAAgLdzBBf8T9b#4Gqk9x zTh7=}C#FFi)n_KtPpGF(HdUYczUkP$5+DQEWJG%2~zV@c;U?o!PneH1QNg5FYs-cq98QYM?F z8v>5Frs@eA!#*pi2|Mw=4!IHrw-XF#K!{kpnXuTxtZRChc3~o7Q3DykUQ!K_+wgn& zw-tbAjv+c+T8ArKDT*mMRmtvT{;p@FHspg;^9*2*`^7YV%T@0xp)-rJqy$YH8HG^q z!8O++XWG~^i&y45NC06k1Rt*Q4-&p3hQ`P+c()R~`wrH`yAjbnM;j5h__mxuXSS1^ znTM# zh)u|G*FB=2n)a}m!!N7V&y&E>Rbj#NmzJKw^&uH)2+t73FXjUu?DsXL!PnNeFe)`MYOQ9OOGKJ$GZX7ZOVRfyi>$9Vl|YO z-iNHuJc_@ibK}M-LPR-$jp86|)gdI`uhEjUUdvY5CU_W!)PyV&+Q*nqee{$U z;pUt3P&anCrSt>}Vh>IOL+usawFDND!41oQq~JPoBO<69(rvgFHG7cDT=hoeVWb91 zq_k24@-uDHh!J)9oycN=7AmvhQ#X9+AruJC_le2Qv{1N;nIJWvCcy-Ar~DY!=Mjjw zmI|Z%OF9k_rFj<$81WFb+K>DSDN7Wwt}qMylfH&bm>N!ZVru50AQ@FCP#YD%98t{~ z46ubUHC#tu!^u5Z$McKF&RKEYe4SPK_Z7(T@hb}9GD(l?@T?m%(h=n2`sx=~0`eXt zkr&%7rmp^CZRNt4t1hjr`xoS|5Wsx7jC*mtLQReh%;FlNWp`B6*_ZWON%F!&4pk6k z^qjP>Bg|6LUivF_UPsS~do#Y6vk;lyy$BXa+9#{EQ?-cUt}@ z1%-H*xMWYSYu~~vU$8Q~ Jm`z~{@Gp@_Aano# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php new file mode 100644 index 000000000000..b64766ec3512 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +õ ++google/cloud/video/stitcher/v1/slates.protogoogle.cloud.video.stitcher.v1google/api/resource.proto" +Slate +name ( BàA +uri ( A + gam_slate ( 2..google.cloud.video.stitcher.v1.Slate.GamSlate@ +GamSlate + network_code ( BàA + gam_slate_id (BàA:_êA\\ +"videostitcher.googleapis.com/Slate6projects/{project}/locations/{location}/slates/{slate}Bs +"com.google.cloud.video.stitcher.v1B SlatesProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php new file mode 100644 index 000000000000..27b7f5f709f0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php @@ -0,0 +1,45 @@ +internalAddGeneratedFile( + ' +ä +3google/cloud/video/stitcher/v1/stitch_details.protogoogle.cloud.video.stitcher.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/struct.proto"‡ +VodStitchDetail +name ( I +ad_stitch_details ( 2..google.cloud.video.stitcher.v1.AdStitchDetail:šêA– +,videostitcher.googleapis.com/VodStitchDetailfprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}"¥ +AdStitchDetail + ad_break_id ( BàA +ad_id ( BàA6 +ad_time_offset ( 2.google.protobuf.DurationBàA + skip_reason ( BàAM +media ( 29.google.cloud.video.stitcher.v1.AdStitchDetail.MediaEntryBàAD + +MediaEntry +key ( % +value ( 2.google.protobuf.Value:8Bz +"com.google.cloud.video.stitcher.v1BStitchDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php new file mode 100644 index 000000000000..1faef2c46a9d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php @@ -0,0 +1,243 @@ +internalAddGeneratedFile( + ' +õc +;google/cloud/video/stitcher/v1/video_stitcher_service.protogoogle.cloud.video.stitcher.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/video/stitcher/v1/ad_tag_details.proto-google/cloud/video/stitcher/v1/cdn_keys.proto1google/cloud/video/stitcher/v1/live_configs.proto-google/cloud/video/stitcher/v1/sessions.proto+google/cloud/video/stitcher/v1/slates.proto3google/cloud/video/stitcher/v1/stitch_details.proto0google/cloud/video/stitcher/v1/vod_configs.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"© +CreateCdnKeyRequest; +parent ( B+àAúA%#videostitcher.googleapis.com/CdnKey< +cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyBàA + +cdn_key_id ( BàA"š +ListCdnKeysRequest; +parent ( B+àAúA%#videostitcher.googleapis.com/CdnKey + page_size ( + +page_token (  +filter (  +order_by ( "} +ListCdnKeysResponse8 +cdn_keys ( 2&.google.cloud.video.stitcher.v1.CdnKey +next_page_token (  + unreachable ( "M +GetCdnKeyRequest9 +name ( B+àAúA% +#videostitcher.googleapis.com/CdnKey"P +DeleteCdnKeyRequest9 +name ( B+àAúA% +#videostitcher.googleapis.com/CdnKey"‰ +UpdateCdnKeyRequest< +cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"  +CreateVodSessionRequest? +parent ( B/àAúA)\'videostitcher.googleapis.com/VodSessionD + vod_session ( 2*.google.cloud.video.stitcher.v1.VodSessionBàA"U +GetVodSessionRequest= +name ( B/àAúA) +\'videostitcher.googleapis.com/VodSession"Š +ListVodStitchDetailsRequestD +parent ( B4àAúA.,videostitcher.googleapis.com/VodStitchDetail + page_size ( + +page_token ( "„ +ListVodStitchDetailsResponseK +vod_stitch_details ( 2/.google.cloud.video.stitcher.v1.VodStitchDetail +next_page_token ( "_ +GetVodStitchDetailRequestB +name ( B4àAúA. +,videostitcher.googleapis.com/VodStitchDetail"ˆ +ListVodAdTagDetailsRequestC +parent ( B3àAúA-+videostitcher.googleapis.com/VodAdTagDetail + page_size ( + +page_token ( "‚ +ListVodAdTagDetailsResponseJ +vod_ad_tag_details ( 2..google.cloud.video.stitcher.v1.VodAdTagDetail +next_page_token ( "] +GetVodAdTagDetailRequestA +name ( B3àAúA- ++videostitcher.googleapis.com/VodAdTagDetail"Š +ListLiveAdTagDetailsRequestD +parent ( B4àAúA.,videostitcher.googleapis.com/LiveAdTagDetail + page_size ( + +page_token ( "… +ListLiveAdTagDetailsResponseL +live_ad_tag_details ( 2/.google.cloud.video.stitcher.v1.LiveAdTagDetail +next_page_token ( "_ +GetLiveAdTagDetailRequestB +name ( B4àAúA. +,videostitcher.googleapis.com/LiveAdTagDetail"¶ +CreateSlateRequest: +parent ( B*àAúA$"videostitcher.googleapis.com/Slate +slate_id ( BàA9 +slate ( 2%.google.cloud.video.stitcher.v1.SlateBàA + +request_id ( "K +GetSlateRequest8 +name ( B*àAúA$ +"videostitcher.googleapis.com/Slate"˜ +ListSlatesRequest: +parent ( B*àAúA$"videostitcher.googleapis.com/Slate + page_size ( + +page_token (  +filter (  +order_by ( "y +ListSlatesResponse5 +slates ( 2%.google.cloud.video.stitcher.v1.Slate +next_page_token (  + unreachable ( "… +UpdateSlateRequest9 +slate ( 2%.google.cloud.video.stitcher.v1.SlateBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"N +DeleteSlateRequest8 +name ( B*àAúA$ +"videostitcher.googleapis.com/Slate"¤ +CreateLiveSessionRequest@ +parent ( B0àAúA*(videostitcher.googleapis.com/LiveSessionF + live_session ( 2+.google.cloud.video.stitcher.v1.LiveSessionBàA"W +GetLiveSessionRequest> +name ( B0àAúA* +(videostitcher.googleapis.com/LiveSession"Ñ +CreateLiveConfigRequest? +parent ( B/àAúA)\'videostitcher.googleapis.com/LiveConfig +live_config_id ( BàAD + live_config ( 2*.google.cloud.video.stitcher.v1.LiveConfigBàA + +request_id ( "¬ +ListLiveConfigsRequest? +parent ( B/àAúA)\'videostitcher.googleapis.com/LiveConfig + page_size ( + +page_token (  +filter ( BàA +order_by ( BàA"‰ +ListLiveConfigsResponse@ + live_configs ( 2*.google.cloud.video.stitcher.v1.LiveConfig +next_page_token (  + unreachable ( "U +GetLiveConfigRequest= +name ( B/àAúA) +\'videostitcher.googleapis.com/LiveConfig"X +DeleteLiveConfigRequest= +name ( B/àAúA) +\'videostitcher.googleapis.com/LiveConfig"• +UpdateLiveConfigRequestD + live_config ( 2*.google.cloud.video.stitcher.v1.LiveConfigBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"Ñ +CreateVodConfigRequest> +parent ( B.àAúA(&videostitcher.googleapis.com/VodConfig + vod_config_id ( BàAB + +vod_config ( 2).google.cloud.video.stitcher.v1.VodConfigBàA + +request_id ( BàA"´ +ListVodConfigsRequest> +parent ( B.àAúA(&videostitcher.googleapis.com/VodConfig + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"† +ListVodConfigsResponse> + vod_configs ( 2).google.cloud.video.stitcher.v1.VodConfig +next_page_token (  + unreachable ( "S +GetVodConfigRequest< +name ( B.àAúA( +&videostitcher.googleapis.com/VodConfig"V +DeleteVodConfigRequest< +name ( B.àAúA( +&videostitcher.googleapis.com/VodConfig"’ +UpdateVodConfigRequestB + +vod_config ( 2).google.cloud.video.stitcher.v1.VodConfigBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA" +OperationMetadata/ + create_time ( 2.google.protobuf.Timestamp, +end_time ( 2.google.protobuf.Timestamp +target (  +verb ( 2×6 +VideoStitcherService™ + CreateCdnKey3.google.cloud.video.stitcher.v1.CreateCdnKeyRequest.google.longrunning.Operation"´ÊAY +%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadataÚAparent,cdn_key,cdn_key_id‚Óä“6"+/v1/{parent=projects/*/locations/*}/cdnKeys:cdn_key´ + ListCdnKeys2.google.cloud.video.stitcher.v1.ListCdnKeysRequest3.google.cloud.video.stitcher.v1.ListCdnKeysResponse"<ÚAparent‚Óä“-+/v1/{parent=projects/*/locations/*}/cdnKeys¡ + GetCdnKey0.google.cloud.video.stitcher.v1.GetCdnKeyRequest&.google.cloud.video.stitcher.v1.CdnKey":ÚAname‚Óä“-+/v1/{name=projects/*/locations/*/cdnKeys/*}ë + DeleteCdnKey3.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.google.longrunning.Operation"†ÊAI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“-*+/v1/{name=projects/*/locations/*/cdnKeys/*}› + UpdateCdnKey3.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.google.longrunning.Operation"¶ÊAY +%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadataÚAcdn_key,update_mask‚Óä“>23/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}:cdn_keyÒ +CreateVodSession7.google.cloud.video.stitcher.v1.CreateVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession"YÚAparent,vod_session‚Óä“>"//v1/{parent=projects/*/locations/*}/vodSessions: vod_session± + GetVodSession4.google.cloud.video.stitcher.v1.GetVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/vodSessions/*}æ +ListVodStitchDetails;.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest<.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetailsÓ +GetVodStitchDetail9.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest/.google.cloud.video.stitcher.v1.VodStitchDetail"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}â +ListVodAdTagDetails:.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest;.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"RÚAparent‚Óä“CA/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetailsÏ +GetVodAdTagDetail8.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest..google.cloud.video.stitcher.v1.VodAdTagDetail"PÚAname‚Óä“CA/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}ç +ListLiveAdTagDetails;.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest<.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"TÚAparent‚Óä“EC/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetailsÔ +GetLiveAdTagDetail9.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest/.google.cloud.video.stitcher.v1.LiveAdTagDetail"RÚAname‚Óä“EC/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*} + CreateSlate2.google.cloud.video.stitcher.v1.CreateSlateRequest.google.longrunning.Operation"¬ÊAX +$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadataÚAparent,slate,slate_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/slates:slate° + +ListSlates1.google.cloud.video.stitcher.v1.ListSlatesRequest2.google.cloud.video.stitcher.v1.ListSlatesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/slates +GetSlate/.google.cloud.video.stitcher.v1.GetSlateRequest%.google.cloud.video.stitcher.v1.Slate"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/slates/*}‘ + UpdateSlate2.google.cloud.video.stitcher.v1.UpdateSlateRequest.google.longrunning.Operation"®ÊAX +$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadataÚAslate,update_mask‚Óä“920/v1/{slate.name=projects/*/locations/*/slates/*}:slateè + DeleteSlate2.google.cloud.video.stitcher.v1.DeleteSlateRequest.google.longrunning.Operation"…ÊAI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/slates/*}Ø +CreateLiveSession8.google.cloud.video.stitcher.v1.CreateLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"\\ÚAparent,live_session‚Óä“@"0/v1/{parent=projects/*/locations/*}/liveSessions: live_sessionµ +GetLiveSession5.google.cloud.video.stitcher.v1.GetLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/liveSessions/*}µ +CreateLiveConfig7.google.cloud.video.stitcher.v1.CreateLiveConfigRequest.google.longrunning.Operation"ÈÊA] +)google.cloud.video.stitcher.v1.LiveConfig0google.cloud.video.stitcher.v1.OperationMetadataÚA!parent,live_config,live_config_id‚Óä“>"//v1/{parent=projects/*/locations/*}/liveConfigs: live_configÄ +ListLiveConfigs6.google.cloud.video.stitcher.v1.ListLiveConfigsRequest7.google.cloud.video.stitcher.v1.ListLiveConfigsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/liveConfigs± + GetLiveConfig4.google.cloud.video.stitcher.v1.GetLiveConfigRequest*.google.cloud.video.stitcher.v1.LiveConfig">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/liveConfigs/*}÷ +DeleteLiveConfig7.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.google.longrunning.Operation"ŠÊAI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/liveConfigs/*}· +UpdateLiveConfig7.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest.google.longrunning.Operation"ÊÊA] +)google.cloud.video.stitcher.v1.LiveConfig0google.cloud.video.stitcher.v1.OperationMetadataÚAlive_config,update_mask‚Óä“J2;/v1/{live_config.name=projects/*/locations/*/liveConfigs/*}: live_config® +CreateVodConfig6.google.cloud.video.stitcher.v1.CreateVodConfigRequest.google.longrunning.Operation"ÃÊA\\ +(google.cloud.video.stitcher.v1.VodConfig0google.cloud.video.stitcher.v1.OperationMetadataÚAparent,vod_config,vod_config_id‚Óä“<"./v1/{parent=projects/*/locations/*}/vodConfigs: +vod_configÀ +ListVodConfigs5.google.cloud.video.stitcher.v1.ListVodConfigsRequest6.google.cloud.video.stitcher.v1.ListVodConfigsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/vodConfigs­ + GetVodConfig3.google.cloud.video.stitcher.v1.GetVodConfigRequest).google.cloud.video.stitcher.v1.VodConfig"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/vodConfigs/*}ô +DeleteVodConfig6.google.cloud.video.stitcher.v1.DeleteVodConfigRequest.google.longrunning.Operation"‰ÊAI +google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/vodConfigs/*}° +UpdateVodConfig6.google.cloud.video.stitcher.v1.UpdateVodConfigRequest.google.longrunning.Operation"ÅÊA\\ +(google.cloud.video.stitcher.v1.VodConfig0google.cloud.video.stitcher.v1.OperationMetadataÚAvod_config,update_mask‚Óä“G29/v1/{vod_config.name=projects/*/locations/*/vodConfigs/*}: +vod_configPÊAvideostitcher.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB +"com.google.cloud.video.stitcher.v1BVideoStitcherServiceProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VodConfigs.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VodConfigs.php new file mode 100644 index 0000000000000000000000000000000000000000..1d96ab610cfad76628b3764f3729d4f0cca4c538 GIT binary patch literal 1571 zcmb7E?@!Y}7bL1e7%tnM`Rwa&kDRInBf@5AD906dvC+MA>lpTt8(`6X{cb<>Y)+^LWkbueacK|6nDXw9 zPlXJ}a5h+5DkD@en;yr^L#|oFfz61|DQk)l>ebw3j?9;Yc5r;u&@Q+K|VP zvk))74k5!lWZqFUw*;7`C-Vl`%04mc1iMZJ57C%Vrt5Q7bCBCw&vCNOdw1QkC$o;l z>RZ0lHMn_(NZ3~=B$2V~IH_uNVYO1qQ?lL#-Ke;={vz_21Og1{$TK$j38E738J!a3L=c)(^G2 z5Yl$FBimvI@4(}P!5;z?R_-^|qAiLB$VbS^6R_Fomb->^an@-Y)n>hE)HWU{Yha~% zZj`&tv&Ke7Sp|9VNA2TARu*c;dm}33boW=8fS1v7)7{46h_wc)h%POqqMVBG`HXEI zXp`hL)m&google.cloud.video.stitcher.v1.AdRequest + */ +class AdRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ad tag URI processed with integrated macros. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The request metadata used to make the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; + */ + protected $request_metadata = null; + /** + * The response metadata received from the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; + */ + protected $response_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The ad tag URI processed with integrated macros. + * @type \Google\Cloud\Video\Stitcher\V1\RequestMetadata $request_metadata + * The request metadata used to make the ad request. + * @type \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $response_metadata + * The response metadata received from the ad request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The ad tag URI processed with integrated macros. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The ad tag URI processed with integrated macros. + * + * 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; + } + + /** + * The request metadata used to make the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; + * @return \Google\Cloud\Video\Stitcher\V1\RequestMetadata|null + */ + public function getRequestMetadata() + { + return $this->request_metadata; + } + + public function hasRequestMetadata() + { + return isset($this->request_metadata); + } + + public function clearRequestMetadata() + { + unset($this->request_metadata); + } + + /** + * The request metadata used to make the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; + * @param \Google\Cloud\Video\Stitcher\V1\RequestMetadata $var + * @return $this + */ + public function setRequestMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\RequestMetadata::class); + $this->request_metadata = $var; + + return $this; + } + + /** + * The response metadata received from the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; + * @return \Google\Cloud\Video\Stitcher\V1\ResponseMetadata|null + */ + public function getResponseMetadata() + { + return $this->response_metadata; + } + + public function hasResponseMetadata() + { + return isset($this->response_metadata); + } + + public function clearResponseMetadata() + { + unset($this->response_metadata); + } + + /** + * The response metadata received from the ad request. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; + * @param \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $var + * @return $this + */ + public function setResponseMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ResponseMetadata::class); + $this->response_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php new file mode 100644 index 000000000000..33dc179495cb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php @@ -0,0 +1,213 @@ +google.cloud.video.stitcher.v1.AdStitchDetail + */ +class AdStitchDetail extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ad break ID of the processed ad. + * + * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_break_id = ''; + /** + * Required. The ad ID of the processed ad. + * + * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_id = ''; + /** + * Required. The time offset of the processed ad. + * + * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_time_offset = null; + /** + * Optional. Indicates the reason why the ad has been skipped. + * + * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_reason = ''; + /** + * Optional. The metadata of the chosen media file for the ad. + * + * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $media; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ad_break_id + * Required. The ad break ID of the processed ad. + * @type string $ad_id + * Required. The ad ID of the processed ad. + * @type \Google\Protobuf\Duration $ad_time_offset + * Required. The time offset of the processed ad. + * @type string $skip_reason + * Optional. Indicates the reason why the ad has been skipped. + * @type array|\Google\Protobuf\Internal\MapField $media + * Optional. The metadata of the chosen media file for the ad. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ad break ID of the processed ad. + * + * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAdBreakId() + { + return $this->ad_break_id; + } + + /** + * Required. The ad break ID of the processed ad. + * + * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAdBreakId($var) + { + GPBUtil::checkString($var, True); + $this->ad_break_id = $var; + + return $this; + } + + /** + * Required. The ad ID of the processed ad. + * + * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAdId() + { + return $this->ad_id; + } + + /** + * Required. The ad ID of the processed ad. + * + * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAdId($var) + { + GPBUtil::checkString($var, True); + $this->ad_id = $var; + + return $this; + } + + /** + * Required. The time offset of the processed ad. + * + * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getAdTimeOffset() + { + return $this->ad_time_offset; + } + + public function hasAdTimeOffset() + { + return isset($this->ad_time_offset); + } + + public function clearAdTimeOffset() + { + unset($this->ad_time_offset); + } + + /** + * Required. The time offset of the processed ad. + * + * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setAdTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ad_time_offset = $var; + + return $this; + } + + /** + * Optional. Indicates the reason why the ad has been skipped. + * + * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSkipReason() + { + return $this->skip_reason; + } + + /** + * Optional. Indicates the reason why the ad has been skipped. + * + * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSkipReason($var) + { + GPBUtil::checkString($var, True); + $this->skip_reason = $var; + + return $this; + } + + /** + * Optional. The metadata of the chosen media file for the ad. + * + * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMedia() + { + return $this->media; + } + + /** + * Optional. The metadata of the chosen media file for the ad. + * + * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMedia($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->media = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php new file mode 100644 index 000000000000..aa08c7d30db3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php @@ -0,0 +1,63 @@ +google.cloud.video.stitcher.v1.AdTracking + */ +class AdTracking +{ + /** + * The ad tracking policy is not specified. + * + * Generated from protobuf enum AD_TRACKING_UNSPECIFIED = 0; + */ + const AD_TRACKING_UNSPECIFIED = 0; + /** + * Client-side ad tracking is specified. The client player is expected to + * trigger playback and activity events itself. + * + * Generated from protobuf enum CLIENT = 1; + */ + const CLIENT = 1; + /** + * The Video Stitcher API will trigger playback events on behalf of + * the client player. + * + * Generated from protobuf enum SERVER = 2; + */ + const SERVER = 2; + + private static $valueToName = [ + self::AD_TRACKING_UNSPECIFIED => 'AD_TRACKING_UNSPECIFIED', + self::CLIENT => 'CLIENT', + self::SERVER => 'SERVER', + ]; + + 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php new file mode 100644 index 000000000000..910d74fe0864 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.AkamaiCdnKey + */ +class AkamaiCdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Token key for the Akamai CDN edge configuration. + * + * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $token_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token_key + * Input only. Token key for the Akamai CDN edge configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Token key for the Akamai CDN edge configuration. + * + * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getTokenKey() + { + return $this->token_key; + } + + /** + * Input only. Token key for the Akamai CDN edge configuration. + * + * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTokenKey($var) + { + GPBUtil::checkString($var, False); + $this->token_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php new file mode 100644 index 000000000000..c5c9fc8a7033 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php @@ -0,0 +1,219 @@ +google.cloud.video.stitcher.v1.CdnKey + */ +class CdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The hostname this key applies to. + * + * Generated from protobuf field string hostname = 4; + */ + protected $hostname = ''; + protected $cdn_key_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $google_cdn_key + * The configuration for a Google Cloud CDN key. + * @type \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $akamai_cdn_key + * The configuration for an Akamai CDN key. + * @type \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $media_cdn_key + * The configuration for a Media CDN key. + * @type string $name + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * @type string $hostname + * The hostname this key applies to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * The configuration for a Google Cloud CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; + * @return \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey|null + */ + public function getGoogleCdnKey() + { + return $this->readOneof(5); + } + + public function hasGoogleCdnKey() + { + return $this->hasOneof(5); + } + + /** + * The configuration for a Google Cloud CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; + * @param \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $var + * @return $this + */ + public function setGoogleCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The configuration for an Akamai CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; + * @return \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey|null + */ + public function getAkamaiCdnKey() + { + return $this->readOneof(6); + } + + public function hasAkamaiCdnKey() + { + return $this->hasOneof(6); + } + + /** + * The configuration for an Akamai CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; + * @param \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $var + * @return $this + */ + public function setAkamaiCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The configuration for a Media CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; + * @return \Google\Cloud\Video\Stitcher\V1\MediaCdnKey|null + */ + public function getMediaCdnKey() + { + return $this->readOneof(8); + } + + public function hasMediaCdnKey() + { + return $this->hasOneof(8); + } + + /** + * The configuration for a Media CDN key. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; + * @param \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $var + * @return $this + */ + public function setMediaCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the CDN key, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * The name is ignored when creating a CDN key. + * + * 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 hostname this key applies to. + * + * Generated from protobuf field string hostname = 4; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The hostname this key applies to. + * + * Generated from protobuf field string hostname = 4; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * @return string + */ + public function getCdnKeyConfig() + { + return $this->whichOneof("cdn_key_config"); + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php new file mode 100644 index 000000000000..6acf2dce062b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php @@ -0,0 +1,455 @@ +google.cloud.video.stitcher.v1.Companion + */ +class Companion extends \Google\Protobuf\Internal\Message +{ + /** + * The API necessary to communicate with the creative if available. + * + * Generated from protobuf field string api_framework = 1; + */ + protected $api_framework = ''; + /** + * The pixel height of the placement slot for the intended creative. + * + * Generated from protobuf field int32 height_px = 2; + */ + protected $height_px = 0; + /** + * The pixel width of the placement slot for the intended creative. + * + * Generated from protobuf field int32 width_px = 3; + */ + protected $width_px = 0; + /** + * The pixel height of the creative. + * + * Generated from protobuf field int32 asset_height_px = 4; + */ + protected $asset_height_px = 0; + /** + * The maximum pixel height of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_height_px = 5; + */ + protected $expanded_height_px = 0; + /** + * The pixel width of the creative. + * + * Generated from protobuf field int32 asset_width_px = 6; + */ + protected $asset_width_px = 0; + /** + * The maximum pixel width of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_width_px = 7; + */ + protected $expanded_width_px = 0; + /** + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * + * Generated from protobuf field string ad_slot_id = 8; + */ + protected $ad_slot_id = ''; + /** + * The list of tracking events for the companion. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; + */ + private $events; + protected $ad_resource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\IframeAdResource $iframe_ad_resource + * The IFrame ad resource associated with the companion ad. + * @type \Google\Cloud\Video\Stitcher\V1\StaticAdResource $static_ad_resource + * The static ad resource associated with the companion ad. + * @type \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $html_ad_resource + * The HTML ad resource associated with the companion ad. + * @type string $api_framework + * The API necessary to communicate with the creative if available. + * @type int $height_px + * The pixel height of the placement slot for the intended creative. + * @type int $width_px + * The pixel width of the placement slot for the intended creative. + * @type int $asset_height_px + * The pixel height of the creative. + * @type int $expanded_height_px + * The maximum pixel height of the creative in its expanded state. + * @type int $asset_width_px + * The pixel width of the creative. + * @type int $expanded_width_px + * The maximum pixel width of the creative in its expanded state. + * @type string $ad_slot_id + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * The list of tracking events for the companion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * The IFrame ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; + * @return \Google\Cloud\Video\Stitcher\V1\IframeAdResource|null + */ + public function getIframeAdResource() + { + return $this->readOneof(10); + } + + public function hasIframeAdResource() + { + return $this->hasOneof(10); + } + + /** + * The IFrame ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; + * @param \Google\Cloud\Video\Stitcher\V1\IframeAdResource $var + * @return $this + */ + public function setIframeAdResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\IframeAdResource::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The static ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; + * @return \Google\Cloud\Video\Stitcher\V1\StaticAdResource|null + */ + public function getStaticAdResource() + { + return $this->readOneof(11); + } + + public function hasStaticAdResource() + { + return $this->hasOneof(11); + } + + /** + * The static ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; + * @param \Google\Cloud\Video\Stitcher\V1\StaticAdResource $var + * @return $this + */ + public function setStaticAdResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\StaticAdResource::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The HTML ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; + * @return \Google\Cloud\Video\Stitcher\V1\HtmlAdResource|null + */ + public function getHtmlAdResource() + { + return $this->readOneof(12); + } + + public function hasHtmlAdResource() + { + return $this->hasOneof(12); + } + + /** + * The HTML ad resource associated with the companion ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; + * @param \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $var + * @return $this + */ + public function setHtmlAdResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\HtmlAdResource::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * The API necessary to communicate with the creative if available. + * + * Generated from protobuf field string api_framework = 1; + * @return string + */ + public function getApiFramework() + { + return $this->api_framework; + } + + /** + * The API necessary to communicate with the creative if available. + * + * Generated from protobuf field string api_framework = 1; + * @param string $var + * @return $this + */ + public function setApiFramework($var) + { + GPBUtil::checkString($var, True); + $this->api_framework = $var; + + return $this; + } + + /** + * The pixel height of the placement slot for the intended creative. + * + * Generated from protobuf field int32 height_px = 2; + * @return int + */ + public function getHeightPx() + { + return $this->height_px; + } + + /** + * The pixel height of the placement slot for the intended creative. + * + * Generated from protobuf field int32 height_px = 2; + * @param int $var + * @return $this + */ + public function setHeightPx($var) + { + GPBUtil::checkInt32($var); + $this->height_px = $var; + + return $this; + } + + /** + * The pixel width of the placement slot for the intended creative. + * + * Generated from protobuf field int32 width_px = 3; + * @return int + */ + public function getWidthPx() + { + return $this->width_px; + } + + /** + * The pixel width of the placement slot for the intended creative. + * + * Generated from protobuf field int32 width_px = 3; + * @param int $var + * @return $this + */ + public function setWidthPx($var) + { + GPBUtil::checkInt32($var); + $this->width_px = $var; + + return $this; + } + + /** + * The pixel height of the creative. + * + * Generated from protobuf field int32 asset_height_px = 4; + * @return int + */ + public function getAssetHeightPx() + { + return $this->asset_height_px; + } + + /** + * The pixel height of the creative. + * + * Generated from protobuf field int32 asset_height_px = 4; + * @param int $var + * @return $this + */ + public function setAssetHeightPx($var) + { + GPBUtil::checkInt32($var); + $this->asset_height_px = $var; + + return $this; + } + + /** + * The maximum pixel height of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_height_px = 5; + * @return int + */ + public function getExpandedHeightPx() + { + return $this->expanded_height_px; + } + + /** + * The maximum pixel height of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_height_px = 5; + * @param int $var + * @return $this + */ + public function setExpandedHeightPx($var) + { + GPBUtil::checkInt32($var); + $this->expanded_height_px = $var; + + return $this; + } + + /** + * The pixel width of the creative. + * + * Generated from protobuf field int32 asset_width_px = 6; + * @return int + */ + public function getAssetWidthPx() + { + return $this->asset_width_px; + } + + /** + * The pixel width of the creative. + * + * Generated from protobuf field int32 asset_width_px = 6; + * @param int $var + * @return $this + */ + public function setAssetWidthPx($var) + { + GPBUtil::checkInt32($var); + $this->asset_width_px = $var; + + return $this; + } + + /** + * The maximum pixel width of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_width_px = 7; + * @return int + */ + public function getExpandedWidthPx() + { + return $this->expanded_width_px; + } + + /** + * The maximum pixel width of the creative in its expanded state. + * + * Generated from protobuf field int32 expanded_width_px = 7; + * @param int $var + * @return $this + */ + public function setExpandedWidthPx($var) + { + GPBUtil::checkInt32($var); + $this->expanded_width_px = $var; + + return $this; + } + + /** + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * + * Generated from protobuf field string ad_slot_id = 8; + * @return string + */ + public function getAdSlotId() + { + return $this->ad_slot_id; + } + + /** + * The ID used to identify the desired placement on a publisher's page. + * Values to be used should be discussed between publishers and + * advertisers. + * + * Generated from protobuf field string ad_slot_id = 8; + * @param string $var + * @return $this + */ + public function setAdSlotId($var) + { + GPBUtil::checkString($var, True); + $this->ad_slot_id = $var; + + return $this; + } + + /** + * The list of tracking events for the companion. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * The list of tracking events for the companion. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; + * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); + $this->events = $arr; + + return $this; + } + + /** + * @return string + */ + public function getAdResource() + { + return $this->whichOneof("ad_resource"); + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php new file mode 100644 index 000000000000..19875411f716 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.CompanionAds + */ +class CompanionAds extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates how many of the companions should be displayed with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; + */ + protected $display_requirement = 0; + /** + * List of companion ads. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; + */ + private $companions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $display_requirement + * Indicates how many of the companions should be displayed with the ad. + * @type array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $companions + * List of companion ads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * Indicates how many of the companions should be displayed with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; + * @return int + */ + public function getDisplayRequirement() + { + return $this->display_requirement; + } + + /** + * Indicates how many of the companions should be displayed with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; + * @param int $var + * @return $this + */ + public function setDisplayRequirement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds\DisplayRequirement::class); + $this->display_requirement = $var; + + return $this; + } + + /** + * List of companion ads. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCompanions() + { + return $this->companions; + } + + /** + * List of companion ads. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCompanions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Companion::class); + $this->companions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php new file mode 100644 index 000000000000..edcd46145e33 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php @@ -0,0 +1,71 @@ +google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement + */ +class DisplayRequirement +{ + /** + * Required companions are not specified. The default is ALL. + * + * Generated from protobuf enum DISPLAY_REQUIREMENT_UNSPECIFIED = 0; + */ + const DISPLAY_REQUIREMENT_UNSPECIFIED = 0; + /** + * All companions are required to be displayed. + * + * Generated from protobuf enum ALL = 1; + */ + const ALL = 1; + /** + * At least one of companions needs to be displayed. + * + * Generated from protobuf enum ANY = 2; + */ + const ANY = 2; + /** + * All companions are optional for display. + * + * Generated from protobuf enum NONE = 3; + */ + const NONE = 3; + + private static $valueToName = [ + self::DISPLAY_REQUIREMENT_UNSPECIFIED => 'DISPLAY_REQUIREMENT_UNSPECIFIED', + self::ALL => 'ALL', + self::ANY => 'ANY', + self::NONE => 'NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DisplayRequirement::class, \Google\Cloud\Video\Stitcher\V1\CompanionAds_DisplayRequirement::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php new file mode 100644 index 000000000000..86b5b6d68253 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php @@ -0,0 +1,189 @@ +google.cloud.video.stitcher.v1.CreateCdnKeyRequest + */ +class CreateCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The CDN key resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cdn_key = null; + /** + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cdn_key_id = ''; + + /** + * @param string $parent Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource to create. + * @param string $cdnKeyId Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateCdnKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, string $cdnKeyId): self + { + return (new self()) + ->setParent($parent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/locations/{location}`. + * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key + * Required. The CDN key resource to create. + * @type string $cdn_key_id + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/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. The project in which the CDN key should be created, in the form + * of `projects/{project_number}/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; + } + + /** + * Required. The CDN key resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null + */ + public function getCdnKey() + { + return $this->cdn_key; + } + + public function hasCdnKey() + { + return isset($this->cdn_key); + } + + public function clearCdnKey() + { + unset($this->cdn_key); + } + + /** + * Required. The CDN key resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var + * @return $this + */ + public function setCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); + $this->cdn_key = $var; + + return $this; + } + + /** + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCdnKeyId() + { + return $this->cdn_key_id; + } + + /** + * Required. The ID to use for the CDN key, which will become the final + * component of the CDN key's resource name. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCdnKeyId($var) + { + GPBUtil::checkString($var, True); + $this->cdn_key_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php new file mode 100644 index 000000000000..2e55e807afd3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.stitcher.v1.CreateLiveConfigRequest + */ +class CreateLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The unique identifier ID to use for the live config. + * + * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_config_id = ''; + /** + * Required. The live config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_config = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig Required. The live config resource to create. + * @param string $liveConfigId Required. The unique identifier ID to use for the live config. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig, string $liveConfigId): self + { + return (new self()) + ->setParent($parent) + ->setLiveConfig($liveConfig) + ->setLiveConfigId($liveConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * @type string $live_config_id + * Required. The unique identifier ID to use for the live config. + * @type \Google\Cloud\Video\Stitcher\V1\LiveConfig $live_config + * Required. The live config resource to create. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the live config should be created, in + * the form of `projects/{project_number}/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. The project in which the live config should be created, in + * the form of `projects/{project_number}/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; + } + + /** + * Required. The unique identifier ID to use for the live config. + * + * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLiveConfigId() + { + return $this->live_config_id; + } + + /** + * Required. The unique identifier ID to use for the live config. + * + * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLiveConfigId($var) + { + GPBUtil::checkString($var, True); + $this->live_config_id = $var; + + return $this; + } + + /** + * Required. The live config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig|null + */ + public function getLiveConfig() + { + return $this->live_config; + } + + public function hasLiveConfig() + { + return isset($this->live_config); + } + + public function clearLiveConfig() + { + unset($this->live_config); + } + + /** + * Required. The live config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $var + * @return $this + */ + public function setLiveConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); + $this->live_config = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php new file mode 100644 index 000000000000..76a9ea13ef7d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php @@ -0,0 +1,132 @@ +google.cloud.video.stitcher.v1.CreateLiveSessionRequest + */ +class CreateLiveSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating a live session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_session = null; + + /** + * @param string $parent Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession Required. Parameters for creating a live session. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession): self + { + return (new self()) + ->setParent($parent) + ->setLiveSession($liveSession); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @type \Google\Cloud\Video\Stitcher\V1\LiveSession $live_session + * Required. Parameters for creating a live session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/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. The project and location in which the live session should be + * created, in the form of `projects/{project_number}/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; + } + + /** + * Required. Parameters for creating a live session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\LiveSession|null + */ + public function getLiveSession() + { + return $this->live_session; + } + + public function hasLiveSession() + { + return isset($this->live_session); + } + + public function clearLiveSession() + { + unset($this->live_session); + } + + /** + * Required. Parameters for creating a live session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $var + * @return $this + */ + public function setLiveSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession::class); + $this->live_session = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php new file mode 100644 index 000000000000..f1cd04f9e2da --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php @@ -0,0 +1,257 @@ +google.cloud.video.stitcher.v1.CreateSlateRequest + */ +class CreateSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate_id = ''; + /** + * Required. The slate to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The slate to create. + * @param string $slateId Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateSlateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\Slate $slate, string $slateId): self + { + return (new self()) + ->setParent($parent) + ->setSlate($slate) + ->setSlateId($slateId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/locations/{location}`. + * @type string $slate_id + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate + * Required. The slate to create. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the slate should be created, in the form of + * `projects/{project_number}/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. The project in which the slate should be created, in the form of + * `projects/{project_number}/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; + } + + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSlateId() + { + return $this->slate_id; + } + + /** + * Required. The unique identifier for the slate. + * This value should conform to RFC-1034, which restricts to + * lower-case letters, numbers, and hyphen, with the first character a + * letter, the last a letter or a number, and a 63 character maximum. + * + * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSlateId($var) + { + GPBUtil::checkString($var, True); + $this->slate_id = $var; + + return $this; + } + + /** + * Required. The slate to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\Slate|null + */ + public function getSlate() + { + return $this->slate; + } + + public function hasSlate() + { + return isset($this->slate); + } + + public function clearSlate() + { + unset($this->slate); + } + + /** + * Required. The slate to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\Slate $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); + $this->slate = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php new file mode 100644 index 000000000000..208af090748b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php @@ -0,0 +1,242 @@ +google.cloud.video.stitcher.v1.CreateVodConfigRequest + */ +class CreateVodConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the VOD config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The unique identifier ID to use for the VOD config. + * + * Generated from protobuf field string vod_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vod_config_id = ''; + /** + * Required. The VOD config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vod_config = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. The project in which the VOD config should be created, in + * the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig Required. The VOD config resource to create. + * @param string $vodConfigId Required. The unique identifier ID to use for the VOD config. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateVodConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig, string $vodConfigId): self + { + return (new self()) + ->setParent($parent) + ->setVodConfig($vodConfig) + ->setVodConfigId($vodConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the VOD config should be created, in + * the form of `projects/{project_number}/locations/{location}`. + * @type string $vod_config_id + * Required. The unique identifier ID to use for the VOD config. + * @type \Google\Cloud\Video\Stitcher\V1\VodConfig $vod_config + * Required. The VOD config resource to create. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the VOD config should be created, in + * the form of `projects/{project_number}/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. The project in which the VOD config should be created, in + * the form of `projects/{project_number}/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; + } + + /** + * Required. The unique identifier ID to use for the VOD config. + * + * Generated from protobuf field string vod_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVodConfigId() + { + return $this->vod_config_id; + } + + /** + * Required. The unique identifier ID to use for the VOD config. + * + * Generated from protobuf field string vod_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVodConfigId($var) + { + GPBUtil::checkString($var, True); + $this->vod_config_id = $var; + + return $this; + } + + /** + * Required. The VOD config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\VodConfig|null + */ + public function getVodConfig() + { + return $this->vod_config; + } + + public function hasVodConfig() + { + return isset($this->vod_config); + } + + public function clearVodConfig() + { + unset($this->vod_config); + } + + /** + * Required. The VOD config resource to create. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $var + * @return $this + */ + public function setVodConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodConfig::class); + $this->vod_config = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php new file mode 100644 index 000000000000..14e94a02e824 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php @@ -0,0 +1,132 @@ +google.cloud.video.stitcher.v1.CreateVodSessionRequest + */ +class CreateVodSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating a session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vod_session = null; + + /** + * @param string $parent Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession Required. Parameters for creating a session. + * + * @return \Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession): self + { + return (new self()) + ->setParent($parent) + ->setVodSession($vodSession); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/locations/{location}`. + * @type \Google\Cloud\Video\Stitcher\V1\VodSession $vod_session + * Required. Parameters for creating a session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/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. The project and location in which the VOD session should be + * created, in the form of `projects/{project_number}/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; + } + + /** + * Required. Parameters for creating a session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\VodSession|null + */ + public function getVodSession() + { + return $this->vod_session; + } + + public function hasVodSession() + { + return isset($this->vod_session); + } + + public function clearVodSession() + { + unset($this->vod_session); + } + + /** + * Required. Parameters for creating a session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\VodSession $var + * @return $this + */ + public function setVodSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession::class); + $this->vod_session = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php new file mode 100644 index 000000000000..7e1f8d4d0f91 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteCdnKeyRequest + */ +class DeleteCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{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 CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. Please see + * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest + * + * @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 CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{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 CDN key to be deleted, in the form of + * `projects/{project_number}/locations/{location}/cdnKeys/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php new file mode 100644 index 000000000000..c0b9429e5375 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteLiveConfigRequest + */ +class DeleteLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see + * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest + * + * @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 live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/liveConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php new file mode 100644 index 000000000000..6cdc43bb27e4 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteSlateRequest + */ +class DeleteSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{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 slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. Please see + * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest + * + * @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 slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{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 slate to be deleted, in the form of + * `projects/{project_number}/locations/{location}/slates/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php new file mode 100644 index 000000000000..a2432e058c66 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.DeleteVodConfigRequest + */ +class DeleteVodConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the VOD config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/vodConfigs/{id}`. Please see + * {@see VideoStitcherServiceClient::vodConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\DeleteVodConfigRequest + * + * @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 VOD config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/vodConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the VOD config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be deleted, in the form of + * `projects/{project_number}/locations/{location}/vodConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php new file mode 100644 index 000000000000..c9ea208c2db7 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php @@ -0,0 +1,179 @@ +google.cloud.video.stitcher.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Describes the event that occurred. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; + */ + protected $type = 0; + /** + * The URI to trigger for this event. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * The ID of the event. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * The offset in seconds if the event type is `PROGRESS`. + * + * Generated from protobuf field .google.protobuf.Duration offset = 4; + */ + protected $offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Describes the event that occurred. + * @type string $uri + * The URI to trigger for this event. + * @type string $id + * The ID of the event. + * @type \Google\Protobuf\Duration $offset + * The offset in seconds if the event type is `PROGRESS`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); + parent::__construct($data); + } + + /** + * Describes the event that occurred. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Describes the event that occurred. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\Event\EventType::class); + $this->type = $var; + + return $this; + } + + /** + * The URI to trigger for this event. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI to trigger for this event. + * + * 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; + } + + /** + * The ID of the event. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the event. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The offset in seconds if the event type is `PROGRESS`. + * + * Generated from protobuf field .google.protobuf.Duration offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * The offset in seconds if the event type is `PROGRESS`. + * + * Generated from protobuf field .google.protobuf.Duration offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php new file mode 100644 index 000000000000..5d323e3ef361 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php @@ -0,0 +1,218 @@ +google.cloud.video.stitcher.v1.Event.EventType + */ +class EventType +{ + /** + * The event type is unspecified. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * First frame of creative ad viewed. + * + * Generated from protobuf enum CREATIVE_VIEW = 1; + */ + const CREATIVE_VIEW = 1; + /** + * Creative ad started. + * + * Generated from protobuf enum START = 2; + */ + const START = 2; + /** + * Start of an ad break. + * + * Generated from protobuf enum BREAK_START = 3; + */ + const BREAK_START = 3; + /** + * End of an ad break. + * + * Generated from protobuf enum BREAK_END = 4; + */ + const BREAK_END = 4; + /** + * Impression. + * + * Generated from protobuf enum IMPRESSION = 5; + */ + const IMPRESSION = 5; + /** + * First quartile progress. + * + * Generated from protobuf enum FIRST_QUARTILE = 6; + */ + const FIRST_QUARTILE = 6; + /** + * Midpoint progress. + * + * Generated from protobuf enum MIDPOINT = 7; + */ + const MIDPOINT = 7; + /** + * Third quartile progress. + * + * Generated from protobuf enum THIRD_QUARTILE = 8; + */ + const THIRD_QUARTILE = 8; + /** + * Ad progress completed. + * + * Generated from protobuf enum COMPLETE = 9; + */ + const COMPLETE = 9; + /** + * Specific progress event with an offset. + * + * Generated from protobuf enum PROGRESS = 10; + */ + const PROGRESS = 10; + /** + * Player muted. + * + * Generated from protobuf enum MUTE = 11; + */ + const MUTE = 11; + /** + * Player unmuted. + * + * Generated from protobuf enum UNMUTE = 12; + */ + const UNMUTE = 12; + /** + * Player paused. + * + * Generated from protobuf enum PAUSE = 13; + */ + const PAUSE = 13; + /** + * Click event. + * + * Generated from protobuf enum CLICK = 14; + */ + const CLICK = 14; + /** + * Click-through event. + * + * Generated from protobuf enum CLICK_THROUGH = 15; + */ + const CLICK_THROUGH = 15; + /** + * Player rewinding. + * + * Generated from protobuf enum REWIND = 16; + */ + const REWIND = 16; + /** + * Player resumed. + * + * Generated from protobuf enum RESUME = 17; + */ + const RESUME = 17; + /** + * Error event. + * + * Generated from protobuf enum ERROR = 18; + */ + const ERROR = 18; + /** + * Ad expanded to a larger size. + * + * Generated from protobuf enum EXPAND = 21; + */ + const EXPAND = 21; + /** + * Ad collapsed to a smaller size. + * + * Generated from protobuf enum COLLAPSE = 22; + */ + const COLLAPSE = 22; + /** + * Non-linear ad closed. + * + * Generated from protobuf enum CLOSE = 24; + */ + const CLOSE = 24; + /** + * Linear ad closed. + * + * Generated from protobuf enum CLOSE_LINEAR = 25; + */ + const CLOSE_LINEAR = 25; + /** + * Ad skipped. + * + * Generated from protobuf enum SKIP = 26; + */ + const SKIP = 26; + /** + * Accept invitation event. + * + * Generated from protobuf enum ACCEPT_INVITATION = 27; + */ + const ACCEPT_INVITATION = 27; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::CREATIVE_VIEW => 'CREATIVE_VIEW', + self::START => 'START', + self::BREAK_START => 'BREAK_START', + self::BREAK_END => 'BREAK_END', + self::IMPRESSION => 'IMPRESSION', + self::FIRST_QUARTILE => 'FIRST_QUARTILE', + self::MIDPOINT => 'MIDPOINT', + self::THIRD_QUARTILE => 'THIRD_QUARTILE', + self::COMPLETE => 'COMPLETE', + self::PROGRESS => 'PROGRESS', + self::MUTE => 'MUTE', + self::UNMUTE => 'UNMUTE', + self::PAUSE => 'PAUSE', + self::CLICK => 'CLICK', + self::CLICK_THROUGH => 'CLICK_THROUGH', + self::REWIND => 'REWIND', + self::RESUME => 'RESUME', + self::ERROR => 'ERROR', + self::EXPAND => 'EXPAND', + self::COLLAPSE => 'COLLAPSE', + self::CLOSE => 'CLOSE', + self::CLOSE_LINEAR => 'CLOSE_LINEAR', + self::SKIP => 'SKIP', + self::ACCEPT_INVITATION => 'ACCEPT_INVITATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Video\Stitcher\V1\Event_EventType::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php new file mode 100644 index 000000000000..a74531fbba30 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php @@ -0,0 +1,79 @@ +google.cloud.video.stitcher.v1.FetchOptions + */ +class FetchOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Custom headers to pass into fetch request. + * Headers must have a maximum of 3 key value pairs. + * Each key value pair must have a maximum of 256 characters per key and 256 + * characters per value. + * + * Generated from protobuf field map headers = 1; + */ + private $headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $headers + * Custom headers to pass into fetch request. + * Headers must have a maximum of 3 key value pairs. + * Each key value pair must have a maximum of 256 characters per key and 256 + * characters per value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\FetchOptions::initOnce(); + parent::__construct($data); + } + + /** + * Custom headers to pass into fetch request. + * Headers must have a maximum of 3 key value pairs. + * Each key value pair must have a maximum of 256 characters per key and 256 + * characters per value. + * + * Generated from protobuf field map headers = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Custom headers to pass into fetch request. + * Headers must have a maximum of 3 key value pairs. + * Each key value pair must have a maximum of 256 characters per key and 256 + * characters per value. + * + * Generated from protobuf field map headers = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php new file mode 100644 index 000000000000..74a1dd80906a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.GamLiveConfig + */ +class GamLiveConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + /** + * Output only. The asset key identifier generated for the live config. + * + * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_key = ''; + /** + * Output only. The custom asset key identifier generated for the live config. + * + * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_asset_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code to associate with the live config. + * @type string $asset_key + * Output only. The asset key identifier generated for the live config. + * @type string $custom_asset_key + * Output only. The custom asset key identifier generated for the live config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Output only. The asset key identifier generated for the live config. + * + * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetKey() + { + return $this->asset_key; + } + + /** + * Output only. The asset key identifier generated for the live config. + * + * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetKey($var) + { + GPBUtil::checkString($var, True); + $this->asset_key = $var; + + return $this; + } + + /** + * Output only. The custom asset key identifier generated for the live config. + * + * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCustomAssetKey() + { + return $this->custom_asset_key; + } + + /** + * Output only. The custom asset key identifier generated for the live config. + * + * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCustomAssetKey($var) + { + GPBUtil::checkString($var, True); + $this->custom_asset_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php new file mode 100644 index 000000000000..9b252aab9008 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.GamVodConfig + */ +class GamVodConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code to associate with the VOD config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code to associate with the VOD config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VodConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code to associate with the VOD config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code to associate with the VOD config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php new file mode 100644 index 000000000000..60883c4c2bcb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetCdnKeyRequest + */ +class GetCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{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 CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. Please see + * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest + * + * @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 CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{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 CDN key to be retrieved, in the form of + * `projects/{project}/locations/{location}/cdnKeys/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php new file mode 100644 index 000000000000..0bb9510c90d2 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest + */ +class GetLiveAdTagDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * + * 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 in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. Please see + * {@see VideoStitcherServiceClient::liveAdTagDetailName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest + * + * @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 in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * + * 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 in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php new file mode 100644 index 000000000000..903077856948 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.stitcher.v1.GetLiveConfigRequest + */ +class GetLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see + * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest + * + * @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 live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be retrieved, in the form + * of + * `projects/{project_number}/locations/{location}/liveConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php new file mode 100644 index 000000000000..a3ba9f66b9a9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetLiveSessionRequest + */ +class GetLiveSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{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 live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. Please see + * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest + * + * @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 live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{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 live session, in the form of + * `projects/{project_number}/locations/{location}/liveSessions/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php new file mode 100644 index 000000000000..220a34dfa77c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetSlateRequest + */ +class GetSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{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 slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. Please see + * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetSlateRequest + * + * @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 slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{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 slate to be retrieved, of the slate, in the form + * of `projects/{project_number}/locations/{location}/slates/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php new file mode 100644 index 000000000000..b3f841410af0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest + */ +class GetVodAdTagDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * + * 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 ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. Please see + * {@see VideoStitcherServiceClient::vodAdTagDetailName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest + * + * @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 ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * + * 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 ad tag detail for the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php new file mode 100644 index 000000000000..961a43a3606e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetVodConfigRequest + */ +class GetVodConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the VOD config to be retrieved, in the form + * of `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be retrieved, in the form + * of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. Please see + * {@see VideoStitcherServiceClient::vodConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodConfigRequest + * + * @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 VOD config to be retrieved, in the form + * of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the VOD config to be retrieved, in the form + * of `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be retrieved, in the form + * of `projects/{project_number}/locations/{location}/vodConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php new file mode 100644 index 000000000000..523db81a33c9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.stitcher.v1.GetVodSessionRequest + */ +class GetVodSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{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 VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. Please see + * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest + * + * @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 VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{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 VOD session to be retrieved, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php new file mode 100644 index 000000000000..019ccfb7cd94 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.stitcher.v1.GetVodStitchDetailRequest + */ +class GetVodStitchDetailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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 stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. Please see + * {@see VideoStitcherServiceClient::vodStitchDetailName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest + * + * @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 stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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 stitch detail in the specified VOD session, in + * the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php new file mode 100644 index 000000000000..afa7b822bf12 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.GoogleCdnKey + */ +class GoogleCdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Secret for this Google Cloud CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $private_key = ''; + /** + * The public name of the Google Cloud CDN key. + * + * Generated from protobuf field string key_name = 2; + */ + protected $key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_key + * Input only. Secret for this Google Cloud CDN key. + * @type string $key_name + * The public name of the Google Cloud CDN key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Secret for this Google Cloud CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPrivateKey() + { + return $this->private_key; + } + + /** + * Input only. Secret for this Google Cloud CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, False); + $this->private_key = $var; + + return $this; + } + + /** + * The public name of the Google Cloud CDN key. + * + * Generated from protobuf field string key_name = 2; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * The public name of the Google Cloud CDN key. + * + * Generated from protobuf field string key_name = 2; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php new file mode 100644 index 000000000000..3e45e33af960 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.HtmlAdResource + */ +class HtmlAdResource extends \Google\Protobuf\Internal\Message +{ + /** + * The HTML to display for the ad resource. + * + * Generated from protobuf field string html_source = 1; + */ + protected $html_source = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $html_source + * The HTML to display for the ad resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * The HTML to display for the ad resource. + * + * Generated from protobuf field string html_source = 1; + * @return string + */ + public function getHtmlSource() + { + return $this->html_source; + } + + /** + * The HTML to display for the ad resource. + * + * Generated from protobuf field string html_source = 1; + * @param string $var + * @return $this + */ + public function setHtmlSource($var) + { + GPBUtil::checkString($var, True); + $this->html_source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php new file mode 100644 index 000000000000..3251ce7c39b3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php @@ -0,0 +1,67 @@ +google.cloud.video.stitcher.v1.IframeAdResource + */ +class IframeAdResource extends \Google\Protobuf\Internal\Message +{ + /** + * URI source for an IFrame to display for the ad resource. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI source for an IFrame to display for the ad resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * URI source for an IFrame to display for the ad resource. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI source for an IFrame to display for the ad resource. + * + * 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; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php new file mode 100644 index 000000000000..11acfce74a28 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php @@ -0,0 +1,111 @@ +google.cloud.video.stitcher.v1.Interstitials + */ +class Interstitials extends \Google\Protobuf\Internal\Message +{ + /** + * List of ad breaks ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; + */ + private $ad_breaks; + /** + * Information related to the content of the VOD session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; + */ + protected $session_content = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks + * List of ad breaks ordered by time. + * @type \Google\Cloud\Video\Stitcher\V1\VodSessionContent $session_content + * Information related to the content of the VOD session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * List of ad breaks ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdBreaks() + { + return $this->ad_breaks; + } + + /** + * List of ad breaks ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak::class); + $this->ad_breaks = $arr; + + return $this; + } + + /** + * Information related to the content of the VOD session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; + * @return \Google\Cloud\Video\Stitcher\V1\VodSessionContent|null + */ + public function getSessionContent() + { + return $this->session_content; + } + + public function hasSessionContent() + { + return isset($this->session_content); + } + + public function clearSessionContent() + { + unset($this->session_content); + } + + /** + * Information related to the content of the VOD session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; + * @param \Google\Cloud\Video\Stitcher\V1\VodSessionContent $var + * @return $this + */ + public function setSessionContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSessionContent::class); + $this->session_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php new file mode 100644 index 000000000000..18c76416ec3f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php @@ -0,0 +1,226 @@ +google.cloud.video.stitcher.v1.ListCdnKeysRequest + */ +class ListCdnKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * + * 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. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest + * + * @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 project that contains the list of CDN keys, in the form of + * `projects/{project_number}/locations/{location}`. + * @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\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/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. The project that contains the list of CDN keys, in the form of + * `projects/{project_number}/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; + } + + /** + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php new file mode 100644 index 000000000000..fdb7d35e26a0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListCdnKeysResponse + */ +class ListCdnKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of CDN keys. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; + */ + private $cdn_keys; + /** + * 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 array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $cdn_keys + * List of CDN keys. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * List of CDN keys. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCdnKeys() + { + return $this->cdn_keys; + } + + /** + * List of CDN keys. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCdnKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); + $this->cdn_keys = $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php new file mode 100644 index 000000000000..d14bea8f5f75 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php @@ -0,0 +1,154 @@ +google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest + */ +class ListLiveAdTagDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The pagination token returned from a previous List request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. Please see + * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest + * + * @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 parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The pagination token returned from a previous List request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * + * 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 parent in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}`. + * + * 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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The pagination token returned from a previous List request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The pagination token returned from a previous List request. + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php new file mode 100644 index 000000000000..934491dee650 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse + */ +class ListLiveAdTagDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of live session ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; + */ + private $live_ad_tag_details; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $live_ad_tag_details + * A list of live session ad tag details. + * @type string $next_page_token + * The pagination token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * A list of live session ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLiveAdTagDetails() + { + return $this->live_ad_tag_details; + } + + /** + * A list of live session ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLiveAdTagDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail::class); + $this->live_ad_tag_details = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php new file mode 100644 index 000000000000..d45ae42d9d2d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php @@ -0,0 +1,234 @@ +google.cloud.video.stitcher.v1.ListLiveConfigsRequest + */ +class ListLiveConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest + * + * @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 project that contains the list of live configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type string $filter + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @type string $order_by + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that contains the list of live configs, in the + * form of `projects/{project_number}/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. The project that contains the list of live configs, in the + * form of `projects/{project_number}/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; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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; + } + + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * 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; + } + + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php new file mode 100644 index 000000000000..1eae2969f2b1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListLiveConfigsResponse + */ +class ListLiveConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of live configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; + */ + private $live_configs; + /** + * The pagination token. + * + * 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 array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $live_configs + * List of live configs. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * List of live configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLiveConfigs() + { + return $this->live_configs; + } + + /** + * List of live configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLiveConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); + $this->live_configs = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php new file mode 100644 index 000000000000..7c24832d2b8a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php @@ -0,0 +1,226 @@ +google.cloud.video.stitcher.v1.ListSlatesRequest + */ +class ListSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * + * 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. The project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListSlatesRequest + * + * @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 project to list slates, in the form of + * `projects/{project_number}/locations/{location}`. + * @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\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to list slates, in the form of + * `projects/{project_number}/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. The project to list slates, in the form of + * `projects/{project_number}/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; + } + + /** + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php new file mode 100644 index 000000000000..d66e458e1618 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListSlatesResponse + */ +class ListSlatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of slates + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; + */ + private $slates; + /** + * 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 array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $slates + * The list of slates + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * The list of slates + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSlates() + { + return $this->slates; + } + + /** + * The list of slates + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSlates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Slate::class); + $this->slates = $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 \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php new file mode 100644 index 000000000000..a2f4d620fe34 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php @@ -0,0 +1,154 @@ +google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest + */ +class ListVodAdTagDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. Please see + * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest + * + * @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 VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_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 VOD session which the ad tag details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{vod_session_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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php new file mode 100644 index 000000000000..47ccb4edaccb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse + */ +class ListVodAdTagDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A List of ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; + */ + private $vod_ad_tag_details; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $vod_ad_tag_details + * A List of ad tag details. + * @type string $next_page_token + * The pagination token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * A List of ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVodAdTagDetails() + { + return $this->vod_ad_tag_details; + } + + /** + * A List of ad tag details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVodAdTagDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodAdTagDetail::class); + $this->vod_ad_tag_details = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php new file mode 100644 index 000000000000..62a6511ad13d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php @@ -0,0 +1,238 @@ +google.cloud.video.stitcher.v1.ListVodConfigsRequest + */ +class ListVodConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project that contains the list of VOD configs, in the + * form of `projects/{project_number}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project that contains the list of VOD configs, in the + * form of `projects/{project_number}/locations/{location}`. Please see + * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListVodConfigsRequest + * + * @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 project that contains the list of VOD configs, in the + * form of `projects/{project_number}/locations/{location}`. + * @type int $page_size + * Optional. The maximum number of items to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @type string $filter + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * @type string $order_by + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project that contains the list of VOD configs, in the + * form of `projects/{project_number}/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. The project that contains the list of VOD configs, in the + * form of `projects/{project_number}/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 maximum number of items to return. + * + * 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 items to return. + * + * 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. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * 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 to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter to apply to list results (see + * [Filtering](https://google.aip.dev/160)). + * + * 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; + } + + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results following + * [Cloud API + * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). + * + * Generated from protobuf field string order_by = 5 [(.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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php new file mode 100644 index 000000000000..53f656d03a7e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.stitcher.v1.ListVodConfigsResponse + */ +class ListVodConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of VOD configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodConfig vod_configs = 1; + */ + private $vod_configs; + /** + * The pagination token. + * + * 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 array<\Google\Cloud\Video\Stitcher\V1\VodConfig>|\Google\Protobuf\Internal\RepeatedField $vod_configs + * List of VOD configs. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * List of VOD configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodConfig vod_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVodConfigs() + { + return $this->vod_configs; + } + + /** + * List of VOD configs. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodConfig vod_configs = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVodConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodConfig::class); + $this->vod_configs = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php new file mode 100644 index 000000000000..03a33b3b21dc --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php @@ -0,0 +1,154 @@ +google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest + */ +class ListVodStitchDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. Please see + * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest + * + * @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 VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{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 VOD session where the stitch details belong to, in the form + * of `projects/{project}/locations/{location}/vodSessions/{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 items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php new file mode 100644 index 000000000000..202317ab5600 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse + */ +class ListVodStitchDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A List of stitch Details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; + */ + private $vod_stitch_details; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $vod_stitch_details + * A List of stitch Details. + * @type string $next_page_token + * The pagination token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * A List of stitch Details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVodStitchDetails() + { + return $this->vod_stitch_details; + } + + /** + * A List of stitch Details. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVodStitchDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodStitchDetail::class); + $this->vod_stitch_details = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php new file mode 100644 index 000000000000..ec8d74fb88a1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php @@ -0,0 +1,107 @@ +google.cloud.video.stitcher.v1.LiveAdTagDetail + */ +class LiveAdTagDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A list of ad requests. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + */ + private $ad_requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests + * A list of ad requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name in the form of + * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{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; + } + + /** + * A list of ad requests. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdRequests() + { + return $this->ad_requests; + } + + /** + * A list of ad requests. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); + $this->ad_requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php new file mode 100644 index 000000000000..6428b9a34747 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php @@ -0,0 +1,427 @@ +google.cloud.video.stitcher.v1.LiveConfig + */ +class LiveConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Source URI for the live stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_uri = ''; + /** + * The default ad tag associated with this live stream config. + * + * Generated from protobuf field string ad_tag_uri = 3; + */ + protected $ad_tag_uri = ''; + /** + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; + */ + protected $gam_live_config = null; + /** + * Output only. State of the live config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Determines how the ads are tracked. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_tracking = 0; + /** + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * + * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { + */ + protected $default_slate = ''; + /** + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; + */ + protected $stitching_policy = 0; + /** + * The configuration for prefetching ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; + */ + protected $prefetch_config = null; + /** + * Options for fetching source manifests and segments. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 16; + */ + protected $source_fetch_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * @type string $source_uri + * Required. Source URI for the live stream manifest. + * @type string $ad_tag_uri + * The default ad tag associated with this live stream config. + * @type \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $gam_live_config + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * @type int $state + * Output only. State of the live config. + * @type int $ad_tracking + * Required. Determines how the ads are tracked. + * @type string $default_slate + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * @type int $stitching_policy + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * @type \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $prefetch_config + * The configuration for prefetching ads. + * @type \Google\Cloud\Video\Stitcher\V1\FetchOptions $source_fetch_options + * Options for fetching source manifests and segments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * 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 live config, in the form of + * `projects/{project}/locations/{location}/liveConfigs/{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; + } + + /** + * Required. Source URI for the live stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceUri() + { + return $this->source_uri; + } + + /** + * Required. Source URI for the live stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->source_uri = $var; + + return $this; + } + + /** + * The default ad tag associated with this live stream config. + * + * Generated from protobuf field string ad_tag_uri = 3; + * @return string + */ + public function getAdTagUri() + { + return $this->ad_tag_uri; + } + + /** + * The default ad tag associated with this live stream config. + * + * Generated from protobuf field string ad_tag_uri = 3; + * @param string $var + * @return $this + */ + public function setAdTagUri($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_uri = $var; + + return $this; + } + + /** + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; + * @return \Google\Cloud\Video\Stitcher\V1\GamLiveConfig|null + */ + public function getGamLiveConfig() + { + return $this->gam_live_config; + } + + public function hasGamLiveConfig() + { + return isset($this->gam_live_config); + } + + public function clearGamLiveConfig() + { + unset($this->gam_live_config); + } + + /** + * Additional metadata used to register a live stream with Google Ad Manager + * (GAM) + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; + * @param \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $var + * @return $this + */ + public function setGamLiveConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GamLiveConfig::class); + $this->gam_live_config = $var; + + return $this; + } + + /** + * Output only. State of the live config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the live config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Determines how the ads are tracked. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAdTracking() + { + return $this->ad_tracking; + } + + /** + * Required. Determines how the ads are tracked. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAdTracking($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); + $this->ad_tracking = $var; + + return $this; + } + + /** + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * + * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getDefaultSlate() + { + return $this->default_slate; + } + + /** + * This must refer to a slate in the same + * project. If Google Ad Manager (GAM) is used for ads, this string sets the + * value of `slateCreativeId` in + * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId + * + * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDefaultSlate($var) + { + GPBUtil::checkString($var, True); + $this->default_slate = $var; + + return $this; + } + + /** + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; + * @return int + */ + public function getStitchingPolicy() + { + return $this->stitching_policy; + } + + /** + * Defines the stitcher behavior in case an ad does not align exactly with + * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; + * @param int $var + * @return $this + */ + public function setStitchingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\StitchingPolicy::class); + $this->stitching_policy = $var; + + return $this; + } + + /** + * The configuration for prefetching ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; + * @return \Google\Cloud\Video\Stitcher\V1\PrefetchConfig|null + */ + public function getPrefetchConfig() + { + return $this->prefetch_config; + } + + public function hasPrefetchConfig() + { + return isset($this->prefetch_config); + } + + public function clearPrefetchConfig() + { + unset($this->prefetch_config); + } + + /** + * The configuration for prefetching ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; + * @param \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $var + * @return $this + */ + public function setPrefetchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\PrefetchConfig::class); + $this->prefetch_config = $var; + + return $this; + } + + /** + * Options for fetching source manifests and segments. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 16; + * @return \Google\Cloud\Video\Stitcher\V1\FetchOptions|null + */ + public function getSourceFetchOptions() + { + return $this->source_fetch_options; + } + + public function hasSourceFetchOptions() + { + return isset($this->source_fetch_options); + } + + public function clearSourceFetchOptions() + { + unset($this->source_fetch_options); + } + + /** + * Options for fetching source manifests and segments. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 16; + * @param \Google\Cloud\Video\Stitcher\V1\FetchOptions $var + * @return $this + */ + public function setSourceFetchOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\FetchOptions::class); + $this->source_fetch_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php new file mode 100644 index 000000000000..3defb74d973d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php @@ -0,0 +1,71 @@ +google.cloud.video.stitcher.v1.LiveConfig.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Live config is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Live config is ready for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Live config is queued up for deletion. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_State::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php new file mode 100644 index 000000000000..02f98376c110 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php @@ -0,0 +1,66 @@ +google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy + */ +class StitchingPolicy +{ + /** + * Stitching policy is not specified. + * + * Generated from protobuf enum STITCHING_POLICY_UNSPECIFIED = 0; + */ + const STITCHING_POLICY_UNSPECIFIED = 0; + /** + * Cuts an ad short and returns to content in the middle of the ad. + * + * Generated from protobuf enum CUT_CURRENT = 1; + */ + const CUT_CURRENT = 1; + /** + * Finishes stitching the current ad before returning to content. + * + * Generated from protobuf enum COMPLETE_AD = 2; + */ + const COMPLETE_AD = 2; + + private static $valueToName = [ + self::STITCHING_POLICY_UNSPECIFIED => 'STITCHING_POLICY_UNSPECIFIED', + self::CUT_CURRENT => 'CUT_CURRENT', + self::COMPLETE_AD => 'COMPLETE_AD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StitchingPolicy::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_StitchingPolicy::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php new file mode 100644 index 000000000000..4d38c6dd0188 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php @@ -0,0 +1,340 @@ +google.cloud.video.stitcher.v1.LiveSession + */ +class LiveSession extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The URI to play the live session's ad-stitched stream. + * + * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $play_uri = ''; + /** + * Key value pairs for ad tag macro replacement, only available for live + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macros = 6; + */ + private $ad_tag_macros; + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; + */ + protected $manifest_options = null; + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; + */ + protected $gam_settings = null; + /** + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $live_config = ''; + /** + * Determines how the ad should be tracked. This overrides the value set in + * the live config for this session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 17; + */ + protected $ad_tracking = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * @type string $play_uri + * Output only. The URI to play the live session's ad-stitched stream. + * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macros + * Key value pairs for ad tag macro replacement, only available for live + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options + * Additional options that affect the output of the manifest. + * @type \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $gam_settings + * This field should be set with appropriate values if GAM is being used for + * ads. + * @type string $live_config + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * @type int $ad_tracking + * Determines how the ad should be tracked. This overrides the value set in + * the live config for this session. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the live session, in the form of + * `projects/{project}/locations/{location}/liveSessions/{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; + } + + /** + * Output only. The URI to play the live session's ad-stitched stream. + * + * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPlayUri() + { + return $this->play_uri; + } + + /** + * Output only. The URI to play the live session's ad-stitched stream. + * + * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPlayUri($var) + { + GPBUtil::checkString($var, True); + $this->play_uri = $var; + + return $this; + } + + /** + * Key value pairs for ad tag macro replacement, only available for live + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macros = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdTagMacros() + { + return $this->ad_tag_macros; + } + + /** + * Key value pairs for ad tag macro replacement, only available for live + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" + * Ad tag macros: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macros = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdTagMacros($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->ad_tag_macros = $arr; + + return $this; + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; + * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null + */ + public function getManifestOptions() + { + return $this->manifest_options; + } + + public function hasManifestOptions() + { + return isset($this->manifest_options); + } + + public function clearManifestOptions() + { + unset($this->manifest_options); + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; + * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var + * @return $this + */ + public function setManifestOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); + $this->manifest_options = $var; + + return $this; + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; + * @return \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings|null + */ + public function getGamSettings() + { + return $this->gam_settings; + } + + public function hasGamSettings() + { + return isset($this->gam_settings); + } + + public function clearGamSettings() + { + unset($this->gam_settings); + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; + * @param \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $var + * @return $this + */ + public function setGamSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings::class); + $this->gam_settings = $var; + + return $this; + } + + /** + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLiveConfig() + { + return $this->live_config; + } + + /** + * Required. The resource name of the live config for this session, in the + * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. + * + * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLiveConfig($var) + { + GPBUtil::checkString($var, True); + $this->live_config = $var; + + return $this; + } + + /** + * Determines how the ad should be tracked. This overrides the value set in + * the live config for this session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 17; + * @return int + */ + public function getAdTracking() + { + return $this->ad_tracking; + } + + /** + * Determines how the ad should be tracked. This overrides the value set in + * the live config for this session. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 17; + * @param int $var + * @return $this + */ + public function setAdTracking($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); + $this->ad_tracking = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php new file mode 100644 index 000000000000..d9a0ca12220f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php @@ -0,0 +1,120 @@ +google.cloud.video.stitcher.v1.LiveSession.GamSettings + */ +class GamSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The stream ID generated by Ad Manager. This must be set if GAM + * is being used for ads and the session uses client-side ad tracking. + * + * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream_id = ''; + /** + * [Targeting + * parameters](https://support.google.com/admanager/answer/7320899) to send + * to Ad Manager to generate a stream ID. This should only be set if the + * session uses server-side ad tracking. + * + * Generated from protobuf field map targeting_parameters = 4; + */ + private $targeting_parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream_id + * Required. The stream ID generated by Ad Manager. This must be set if GAM + * is being used for ads and the session uses client-side ad tracking. + * @type array|\Google\Protobuf\Internal\MapField $targeting_parameters + * [Targeting + * parameters](https://support.google.com/admanager/answer/7320899) to send + * to Ad Manager to generate a stream ID. This should only be set if the + * session uses server-side ad tracking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. The stream ID generated by Ad Manager. This must be set if GAM + * is being used for ads and the session uses client-side ad tracking. + * + * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Required. The stream ID generated by Ad Manager. This must be set if GAM + * is being used for ads and the session uses client-side ad tracking. + * + * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * [Targeting + * parameters](https://support.google.com/admanager/answer/7320899) to send + * to Ad Manager to generate a stream ID. This should only be set if the + * session uses server-side ad tracking. + * + * Generated from protobuf field map targeting_parameters = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTargetingParameters() + { + return $this->targeting_parameters; + } + + /** + * [Targeting + * parameters](https://support.google.com/admanager/answer/7320899) to send + * to Ad Manager to generate a stream ID. This should only be set if the + * session uses server-side ad tracking. + * + * Generated from protobuf field map targeting_parameters = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTargetingParameters($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->targeting_parameters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\LiveSession_GamSettings::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php new file mode 100644 index 000000000000..27590ff366b0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php @@ -0,0 +1,109 @@ +google.cloud.video.stitcher.v1.ManifestOptions + */ +class ManifestOptions extends \Google\Protobuf\Internal\Message +{ + /** + * If specified, the output manifest will only return renditions matching the + * specified filters. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; + */ + private $include_renditions; + /** + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; + */ + protected $bitrate_order = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $include_renditions + * If specified, the output manifest will only return renditions matching the + * specified filters. + * @type int $bitrate_order + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * If specified, the output manifest will only return renditions matching the + * specified filters. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeRenditions() + { + return $this->include_renditions; + } + + /** + * If specified, the output manifest will only return renditions matching the + * specified filters. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeRenditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\RenditionFilter::class); + $this->include_renditions = $arr; + + return $this; + } + + /** + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; + * @return int + */ + public function getBitrateOrder() + { + return $this->bitrate_order; + } + + /** + * If specified, the output manifest will orders the video and muxed + * renditions by bitrate according to the ordering policy. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; + * @param int $var + * @return $this + */ + public function setBitrateOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions\OrderPolicy::class); + $this->bitrate_order = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php new file mode 100644 index 000000000000..5808fe871d5b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php @@ -0,0 +1,64 @@ +google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy + */ +class OrderPolicy +{ + /** + * Ordering policy is not specified. + * + * Generated from protobuf enum ORDER_POLICY_UNSPECIFIED = 0; + */ + const ORDER_POLICY_UNSPECIFIED = 0; + /** + * Order by ascending. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * Order by descending. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::ORDER_POLICY_UNSPECIFIED => 'ORDER_POLICY_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OrderPolicy::class, \Google\Cloud\Video\Stitcher\V1\ManifestOptions_OrderPolicy::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php new file mode 100644 index 000000000000..314895c575f6 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php @@ -0,0 +1,149 @@ +google.cloud.video.stitcher.v1.MediaCdnKey + */ +class MediaCdnKey extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. 64-byte ed25519 private key for this Media CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $private_key = ''; + /** + * The keyset name of the Media CDN key. + * + * Generated from protobuf field string key_name = 2; + */ + protected $key_name = ''; + /** + * Optional. If set, the URL will be signed using the Media CDN token. + * Otherwise, the URL would be signed using the standard Media CDN signature. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig token_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $token_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_key + * Input only. 64-byte ed25519 private key for this Media CDN key. + * @type string $key_name + * The keyset name of the Media CDN key. + * @type \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig $token_config + * Optional. If set, the URL will be signed using the Media CDN token. + * Otherwise, the URL would be signed using the standard Media CDN signature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Input only. 64-byte ed25519 private key for this Media CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPrivateKey() + { + return $this->private_key; + } + + /** + * Input only. 64-byte ed25519 private key for this Media CDN key. + * + * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, False); + $this->private_key = $var; + + return $this; + } + + /** + * The keyset name of the Media CDN key. + * + * Generated from protobuf field string key_name = 2; + * @return string + */ + public function getKeyName() + { + return $this->key_name; + } + + /** + * The keyset name of the Media CDN key. + * + * Generated from protobuf field string key_name = 2; + * @param string $var + * @return $this + */ + public function setKeyName($var) + { + GPBUtil::checkString($var, True); + $this->key_name = $var; + + return $this; + } + + /** + * Optional. If set, the URL will be signed using the Media CDN token. + * Otherwise, the URL would be signed using the standard Media CDN signature. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig token_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig|null + */ + public function getTokenConfig() + { + return $this->token_config; + } + + public function hasTokenConfig() + { + return isset($this->token_config); + } + + public function clearTokenConfig() + { + unset($this->token_config); + } + + /** + * Optional. If set, the URL will be signed using the Media CDN token. + * Otherwise, the URL would be signed using the standard Media CDN signature. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig token_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig $var + * @return $this + */ + public function setTokenConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig::class); + $this->token_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php new file mode 100644 index 000000000000..1b07d967c120 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php @@ -0,0 +1,90 @@ +google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig + */ +class TokenConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The query parameter in which to find the token. + * The name must be 1-64 characters long and match + * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the + * first character must be a letter, and all following characters + * must be a dash, underscore, letter or digit. + * Defaults to `edge-cache-token`. + * + * Generated from protobuf field string query_parameter = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $query_parameter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query_parameter + * Optional. The query parameter in which to find the token. + * The name must be 1-64 characters long and match + * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the + * first character must be a letter, and all following characters + * must be a dash, underscore, letter or digit. + * Defaults to `edge-cache-token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The query parameter in which to find the token. + * The name must be 1-64 characters long and match + * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the + * first character must be a letter, and all following characters + * must be a dash, underscore, letter or digit. + * Defaults to `edge-cache-token`. + * + * Generated from protobuf field string query_parameter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getQueryParameter() + { + return $this->query_parameter; + } + + /** + * Optional. The query parameter in which to find the token. + * The name must be 1-64 characters long and match + * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the + * first character must be a letter, and all following characters + * must be a dash, underscore, letter or digit. + * Defaults to `edge-cache-token`. + * + * Generated from protobuf field string query_parameter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setQueryParameter($var) + { + GPBUtil::checkString($var, True); + $this->query_parameter = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TokenConfig::class, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey_TokenConfig::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php new file mode 100644 index 000000000000..59afa335e40b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php @@ -0,0 +1,189 @@ +google.cloud.video.stitcher.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * 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 operation finished running. + * + * 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; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php new file mode 100644 index 000000000000..5a3e14be9089 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php @@ -0,0 +1,131 @@ +google.cloud.video.stitcher.v1.PrefetchConfig + */ +class PrefetchConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Indicates whether the option to prefetch ad requests is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $enabled = false; + /** + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * + * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; + */ + protected $initial_ad_request_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Required. Indicates whether the option to prefetch ad requests is enabled. + * @type \Google\Protobuf\Duration $initial_ad_request_duration + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Indicates whether the option to prefetch ad requests is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Required. Indicates whether the option to prefetch ad requests is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * + * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getInitialAdRequestDuration() + { + return $this->initial_ad_request_duration; + } + + public function hasInitialAdRequestDuration() + { + return isset($this->initial_ad_request_duration); + } + + public function clearInitialAdRequestDuration() + { + unset($this->initial_ad_request_duration); + } + + /** + * The duration in seconds of the part of the break to be prefetched. + * This field is only relevant if prefetch is enabled. + * You should set this duration to as long as possible to increase the + * benefits of prefetching, but not longer than the shortest ad break + * expected. For example, for a live event with 30s and 60s ad breaks, the + * initial duration should be set to 30s. + * + * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInitialAdRequestDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->initial_ad_request_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php new file mode 100644 index 000000000000..e1b9852ccb27 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php @@ -0,0 +1,128 @@ +google.cloud.video.stitcher.v1.ProgressEvent + */ +class ProgressEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + */ + protected $time_offset = null; + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; + */ + private $events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $time_offset + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); + parent::__construct($data); + } + + /** + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeOffset() + { + return $this->time_offset; + } + + public function hasTimeOffset() + { + return isset($this->time_offset); + } + + public function clearTimeOffset() + { + unset($this->time_offset); + } + + /** + * The time when the following tracking events occurs. The time is in + * seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->time_offset = $var; + + return $this; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, + * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, + * `COMPLETE`, `PROGRESS`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); + $this->events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php new file mode 100644 index 000000000000..0d12d8ea104e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php @@ -0,0 +1,109 @@ +google.cloud.video.stitcher.v1.RenditionFilter + */ +class RenditionFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * + * Generated from protobuf field int32 bitrate_bps = 1; + */ + protected $bitrate_bps = 0; + /** + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * + * Generated from protobuf field string codecs = 2; + */ + protected $codecs = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $bitrate_bps + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * @type string $codecs + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * + * Generated from protobuf field int32 bitrate_bps = 1; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Bitrate in bits per second for the rendition. If set, only renditions with + * the exact bitrate will match. + * + * Generated from protobuf field int32 bitrate_bps = 1; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * + * Generated from protobuf field string codecs = 2; + * @return string + */ + public function getCodecs() + { + return $this->codecs; + } + + /** + * Codecs for the rendition. If set, only renditions with the exact value + * will match. + * + * Generated from protobuf field string codecs = 2; + * @param string $var + * @return $this + */ + public function setCodecs($var) + { + GPBUtil::checkString($var, True); + $this->codecs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php new file mode 100644 index 000000000000..cf958970e04e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php @@ -0,0 +1,77 @@ +google.cloud.video.stitcher.v1.RequestMetadata + */ +class RequestMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP headers of the ad request. + * + * Generated from protobuf field .google.protobuf.Struct headers = 1; + */ + protected $headers = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $headers + * The HTTP headers of the ad request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP headers of the ad request. + * + * Generated from protobuf field .google.protobuf.Struct headers = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getHeaders() + { + return $this->headers; + } + + public function hasHeaders() + { + return isset($this->headers); + } + + public function clearHeaders() + { + unset($this->headers); + } + + /** + * The HTTP headers of the ad request. + * + * Generated from protobuf field .google.protobuf.Struct headers = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setHeaders($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->headers = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php new file mode 100644 index 000000000000..9996433d98a0 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php @@ -0,0 +1,257 @@ +google.cloud.video.stitcher.v1.ResponseMetadata + */ +class ResponseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Error message received when making the ad request. + * + * Generated from protobuf field string error = 1; + */ + protected $error = ''; + /** + * Headers from the response. + * + * Generated from protobuf field .google.protobuf.Struct headers = 2; + */ + protected $headers = null; + /** + * Status code for the response. + * + * Generated from protobuf field string status_code = 3; + */ + protected $status_code = ''; + /** + * Size in bytes of the response. + * + * Generated from protobuf field int32 size_bytes = 4; + */ + protected $size_bytes = 0; + /** + * Total time elapsed for the response. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + */ + protected $duration = null; + /** + * The body of the response. + * + * Generated from protobuf field string body = 6; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error + * Error message received when making the ad request. + * @type \Google\Protobuf\Struct $headers + * Headers from the response. + * @type string $status_code + * Status code for the response. + * @type int $size_bytes + * Size in bytes of the response. + * @type \Google\Protobuf\Duration $duration + * Total time elapsed for the response. + * @type string $body + * The body of the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * Error message received when making the ad request. + * + * Generated from protobuf field string error = 1; + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Error message received when making the ad request. + * + * Generated from protobuf field string error = 1; + * @param string $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkString($var, True); + $this->error = $var; + + return $this; + } + + /** + * Headers from the response. + * + * Generated from protobuf field .google.protobuf.Struct headers = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getHeaders() + { + return $this->headers; + } + + public function hasHeaders() + { + return isset($this->headers); + } + + public function clearHeaders() + { + unset($this->headers); + } + + /** + * Headers from the response. + * + * Generated from protobuf field .google.protobuf.Struct headers = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setHeaders($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->headers = $var; + + return $this; + } + + /** + * Status code for the response. + * + * Generated from protobuf field string status_code = 3; + * @return string + */ + public function getStatusCode() + { + return $this->status_code; + } + + /** + * Status code for the response. + * + * Generated from protobuf field string status_code = 3; + * @param string $var + * @return $this + */ + public function setStatusCode($var) + { + GPBUtil::checkString($var, True); + $this->status_code = $var; + + return $this; + } + + /** + * Size in bytes of the response. + * + * Generated from protobuf field int32 size_bytes = 4; + * @return int + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Size in bytes of the response. + * + * Generated from protobuf field int32 size_bytes = 4; + * @param int $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt32($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Total time elapsed for the response. + * + * 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); + } + + /** + * Total time elapsed for the response. + * + * 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; + } + + /** + * The body of the response. + * + * Generated from protobuf field string body = 6; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The body of the response. + * + * Generated from protobuf field string body = 6; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php new file mode 100644 index 000000000000..ffa5a67fc3f1 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php @@ -0,0 +1,153 @@ +google.cloud.video.stitcher.v1.Slate + */ +class Slate extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * gam_slate has all the GAM-related attributes of slates. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; + */ + protected $gam_slate = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * @type string $uri + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * @type \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $gam_slate + * gam_slate has all the GAM-related attributes of slates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the slate, in the form of + * `projects/{project_number}/locations/{location}/slates/{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; + } + + /** + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI to fetch the source content for the slate. This URI must return an + * MP4 video with at least one audio track. + * + * 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; + } + + /** + * gam_slate has all the GAM-related attributes of slates. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; + * @return \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate|null + */ + public function getGamSlate() + { + return $this->gam_slate; + } + + public function hasGamSlate() + { + return isset($this->gam_slate); + } + + public function clearGamSlate() + { + unset($this->gam_slate); + } + + /** + * gam_slate has all the GAM-related attributes of slates. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; + * @param \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $var + * @return $this + */ + public function setGamSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate::class); + $this->gam_slate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php new file mode 100644 index 000000000000..e4991ab67127 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.Slate.GamSlate + */ +class GamSlate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + /** + * Output only. The identifier generated for the slate by GAM. + * + * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gam_slate_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code to associate with the live config. + * @type int|string $gam_slate_id + * Output only. The identifier generated for the slate by GAM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code to associate with the live config. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Output only. The identifier generated for the slate by GAM. + * + * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getGamSlateId() + { + return $this->gam_slate_id; + } + + /** + * Output only. The identifier generated for the slate by GAM. + * + * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setGamSlateId($var) + { + GPBUtil::checkInt64($var); + $this->gam_slate_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GamSlate::class, \Google\Cloud\Video\Stitcher\V1\Slate_GamSlate::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php new file mode 100644 index 000000000000..c52ed06d37cf --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php @@ -0,0 +1,101 @@ +google.cloud.video.stitcher.v1.StaticAdResource + */ +class StaticAdResource extends \Google\Protobuf\Internal\Message +{ + /** + * URI to the static file for the ad resource. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Describes the MIME type of the ad resource. + * + * Generated from protobuf field string creative_type = 2; + */ + protected $creative_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI to the static file for the ad resource. + * @type string $creative_type + * Describes the MIME type of the ad resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); + parent::__construct($data); + } + + /** + * URI to the static file for the ad resource. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI to the static file for the ad resource. + * + * 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; + } + + /** + * Describes the MIME type of the ad resource. + * + * Generated from protobuf field string creative_type = 2; + * @return string + */ + public function getCreativeType() + { + return $this->creative_type; + } + + /** + * Describes the MIME type of the ad resource. + * + * Generated from protobuf field string creative_type = 2; + * @param string $var + * @return $this + */ + public function setCreativeType($var) + { + GPBUtil::checkString($var, True); + $this->creative_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php new file mode 100644 index 000000000000..b3f90236908c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php @@ -0,0 +1,146 @@ +google.cloud.video.stitcher.v1.UpdateCdnKeyRequest + */ +class UpdateCdnKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The CDN key resource which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cdn_key = null; + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource which replaces the resource on the server. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * @return \Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key + * Required. The CDN key resource which replaces the resource on the server. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The CDN key resource which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null + */ + public function getCdnKey() + { + return $this->cdn_key; + } + + public function hasCdnKey() + { + return isset($this->cdn_key); + } + + public function clearCdnKey() + { + unset($this->cdn_key); + } + + /** + * Required. The CDN key resource which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var + * @return $this + */ + public function setCdnKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); + $this->cdn_key = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php new file mode 100644 index 000000000000..8ac5eda08787 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php @@ -0,0 +1,151 @@ +google.cloud.video.stitcher.v1.UpdateLiveConfigRequest + */ +class UpdateLiveConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The LiveConfig resource which replaces the resource on the + * server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $live_config = null; + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig Required. The LiveConfig resource which replaces the resource on the + * server. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * @return \Google\Cloud\Video\Stitcher\V1\UpdateLiveConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setLiveConfig($liveConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\LiveConfig $live_config + * Required. The LiveConfig resource which replaces the resource on the + * server. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The LiveConfig resource which replaces the resource on the + * server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig|null + */ + public function getLiveConfig() + { + return $this->live_config; + } + + public function hasLiveConfig() + { + return isset($this->live_config); + } + + public function clearLiveConfig() + { + unset($this->live_config); + } + + /** + * Required. The LiveConfig resource which replaces the resource on the + * server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $var + * @return $this + */ + public function setLiveConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); + $this->live_config = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php new file mode 100644 index 000000000000..6e415aa29b8e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php @@ -0,0 +1,136 @@ +google.cloud.video.stitcher.v1.UpdateSlateRequest + */ +class UpdateSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource with updated fields. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate = null; + /** + * Required. The update mask which specifies fields which should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The resource with updated fields. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask which specifies fields which should be updated. + * + * @return \Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\Stitcher\V1\Slate $slate, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate + * Required. The resource with updated fields. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask which specifies fields which should be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource with updated fields. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\Slate|null + */ + public function getSlate() + { + return $this->slate; + } + + public function hasSlate() + { + return isset($this->slate); + } + + public function clearSlate() + { + unset($this->slate); + } + + /** + * Required. The resource with updated fields. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\Slate $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); + $this->slate = $var; + + return $this; + } + + /** + * Required. The update mask which specifies fields which should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask which specifies fields which should be updated. + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php new file mode 100644 index 000000000000..b85f3bf4d33e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php @@ -0,0 +1,151 @@ +google.cloud.video.stitcher.v1.UpdateVodConfigRequest + */ +class UpdateVodConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The VOD config resource which replaces the resource on the + * server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vod_config = null; + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig Required. The VOD config resource which replaces the resource on the + * server. + * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * @return \Google\Cloud\Video\Stitcher\V1\UpdateVodConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVodConfig($vodConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Stitcher\V1\VodConfig $vod_config + * Required. The VOD config resource which replaces the resource on the + * server. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The VOD config resource which replaces the resource on the + * server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Stitcher\V1\VodConfig|null + */ + public function getVodConfig() + { + return $this->vod_config; + } + + public function hasVodConfig() + { + return isset($this->vod_config); + } + + public function clearVodConfig() + { + unset($this->vod_config); + } + + /** + * Required. The VOD config resource which replaces the resource on the + * server. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $var + * @return $this + */ + public function setVodConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodConfig::class); + $this->vod_config = $var; + + return $this; + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The update mask applies to the resource. + * For the `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * + * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php new file mode 100644 index 000000000000..bbeee022d365 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php @@ -0,0 +1,107 @@ +google.cloud.video.stitcher.v1.VodAdTagDetail + */ +class VodAdTagDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A list of ad requests for one ad tag. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + */ + private $ad_requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests + * A list of ad requests for one ad tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); + parent::__construct($data); + } + + /** + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the ad tag detail for the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{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; + } + + /** + * A list of ad requests for one ad tag. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdRequests() + { + return $this->ad_requests; + } + + /** + * A list of ad requests for one ad tag. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); + $this->ad_requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php new file mode 100644 index 000000000000..d073063a514d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php @@ -0,0 +1,261 @@ +google.cloud.video.stitcher.v1.VodConfig + */ +class VodConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the VOD config, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Source URI for the VOD stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_uri = ''; + /** + * Required. The default ad tag associated with this VOD config. + * + * Generated from protobuf field string ad_tag_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_tag_uri = ''; + /** + * Optional. Google Ad Manager (GAM) metadata. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamVodConfig gam_vod_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gam_vod_config = null; + /** + * Output only. State of the VOD config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Options for fetching source manifests and segments. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 8; + */ + protected $source_fetch_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the VOD config, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * @type string $source_uri + * Required. Source URI for the VOD stream manifest. + * @type string $ad_tag_uri + * Required. The default ad tag associated with this VOD config. + * @type \Google\Cloud\Video\Stitcher\V1\GamVodConfig $gam_vod_config + * Optional. Google Ad Manager (GAM) metadata. + * @type int $state + * Output only. State of the VOD config. + * @type \Google\Cloud\Video\Stitcher\V1\FetchOptions $source_fetch_options + * Options for fetching source manifests and segments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VodConfigs::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the VOD config, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * + * 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 VOD config, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{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; + } + + /** + * Required. Source URI for the VOD stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceUri() + { + return $this->source_uri; + } + + /** + * Required. Source URI for the VOD stream manifest. + * + * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->source_uri = $var; + + return $this; + } + + /** + * Required. The default ad tag associated with this VOD config. + * + * Generated from protobuf field string ad_tag_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAdTagUri() + { + return $this->ad_tag_uri; + } + + /** + * Required. The default ad tag associated with this VOD config. + * + * Generated from protobuf field string ad_tag_uri = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAdTagUri($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_uri = $var; + + return $this; + } + + /** + * Optional. Google Ad Manager (GAM) metadata. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamVodConfig gam_vod_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Video\Stitcher\V1\GamVodConfig|null + */ + public function getGamVodConfig() + { + return $this->gam_vod_config; + } + + public function hasGamVodConfig() + { + return isset($this->gam_vod_config); + } + + public function clearGamVodConfig() + { + unset($this->gam_vod_config); + } + + /** + * Optional. Google Ad Manager (GAM) metadata. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.GamVodConfig gam_vod_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Video\Stitcher\V1\GamVodConfig $var + * @return $this + */ + public function setGamVodConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GamVodConfig::class); + $this->gam_vod_config = $var; + + return $this; + } + + /** + * Output only. State of the VOD config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the VOD config. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\VodConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Options for fetching source manifests and segments. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 8; + * @return \Google\Cloud\Video\Stitcher\V1\FetchOptions|null + */ + public function getSourceFetchOptions() + { + return $this->source_fetch_options; + } + + public function hasSourceFetchOptions() + { + return isset($this->source_fetch_options); + } + + public function clearSourceFetchOptions() + { + unset($this->source_fetch_options); + } + + /** + * Options for fetching source manifests and segments. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 8; + * @param \Google\Cloud\Video\Stitcher\V1\FetchOptions $var + * @return $this + */ + public function setSourceFetchOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\FetchOptions::class); + $this->source_fetch_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php new file mode 100644 index 000000000000..1186f615f327 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php @@ -0,0 +1,71 @@ +google.cloud.video.stitcher.v1.VodConfig.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * VOD config is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * VOD config is ready for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * VOD config is queued up for deletion. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Video\Stitcher\V1\VodConfig_State::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php new file mode 100644 index 000000000000..e409e1409dcf --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php @@ -0,0 +1,497 @@ +google.cloud.video.stitcher.v1.VodSession + */ +class VodSession extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Metadata of what was stitched into the content. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $interstitials = null; + /** + * Output only. The playback URI of the stitched content. + * + * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $play_uri = ''; + /** + * URI of the media to stitch. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * + * Generated from protobuf field string source_uri = 5; + */ + protected $source_uri = ''; + /** + * Ad tag URI. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * + * Generated from protobuf field string ad_tag_uri = 6; + */ + protected $ad_tag_uri = ''; + /** + * Key value pairs for ad tag macro replacement, only available for VOD + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macro_map = 7; + */ + private $ad_tag_macro_map; + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; + */ + protected $manifest_options = null; + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_id = ''; + /** + * Required. Determines how the ad should be tracked. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ad_tracking = 0; + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; + */ + protected $gam_settings = null; + /** + * The resource name of the VOD config for this session, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * + * Generated from protobuf field string vod_config = 14 [(.google.api.resource_reference) = { + */ + protected $vod_config = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * @type \Google\Cloud\Video\Stitcher\V1\Interstitials $interstitials + * Output only. Metadata of what was stitched into the content. + * @type string $play_uri + * Output only. The playback URI of the stitched content. + * @type string $source_uri + * URI of the media to stitch. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * @type string $ad_tag_uri + * Ad tag URI. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macro_map + * Key value pairs for ad tag macro replacement, only available for VOD + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options + * Additional options that affect the output of the manifest. + * @type string $asset_id + * Output only. The generated ID of the VodSession's source media. + * @type int $ad_tracking + * Required. Determines how the ad should be tracked. + * @type \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $gam_settings + * This field should be set with appropriate values if GAM is being used for + * ads. + * @type string $vod_config + * The resource name of the VOD config for this session, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the VOD session, in the form of + * `projects/{project_number}/locations/{location}/vodSessions/{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; + } + + /** + * Output only. Metadata of what was stitched into the content. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Video\Stitcher\V1\Interstitials|null + */ + public function getInterstitials() + { + return $this->interstitials; + } + + public function hasInterstitials() + { + return isset($this->interstitials); + } + + public function clearInterstitials() + { + unset($this->interstitials); + } + + /** + * Output only. Metadata of what was stitched into the content. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Video\Stitcher\V1\Interstitials $var + * @return $this + */ + public function setInterstitials($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Interstitials::class); + $this->interstitials = $var; + + return $this; + } + + /** + * Output only. The playback URI of the stitched content. + * + * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPlayUri() + { + return $this->play_uri; + } + + /** + * Output only. The playback URI of the stitched content. + * + * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPlayUri($var) + { + GPBUtil::checkString($var, True); + $this->play_uri = $var; + + return $this; + } + + /** + * URI of the media to stitch. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * + * Generated from protobuf field string source_uri = 5; + * @return string + */ + public function getSourceUri() + { + return $this->source_uri; + } + + /** + * URI of the media to stitch. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * + * Generated from protobuf field string source_uri = 5; + * @param string $var + * @return $this + */ + public function setSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->source_uri = $var; + + return $this; + } + + /** + * Ad tag URI. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * + * Generated from protobuf field string ad_tag_uri = 6; + * @return string + */ + public function getAdTagUri() + { + return $this->ad_tag_uri; + } + + /** + * Ad tag URI. For most use cases, you should create a + * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information + * rather than setting this field directly. + * + * Generated from protobuf field string ad_tag_uri = 6; + * @param string $var + * @return $this + */ + public function setAdTagUri($var) + { + GPBUtil::checkString($var, True); + $this->ad_tag_uri = $var; + + return $this; + } + + /** + * Key value pairs for ad tag macro replacement, only available for VOD + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macro_map = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdTagMacroMap() + { + return $this->ad_tag_macro_map; + } + + /** + * Key value pairs for ad tag macro replacement, only available for VOD + * sessions that do not implement Google Ad manager ad insertion. If the + * specified ad tag URI has macros, this field provides the mapping to the + * value that will replace the macro in the ad tag URI. + * Macros are designated by square brackets, for example: + * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` + * Ad tag macro map: `{"geoId": "123"}` + * Fully qualified ad tag: + * `"https://doubleclick.google.com/ad/1?geo_id=123"` + * + * Generated from protobuf field map ad_tag_macro_map = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdTagMacroMap($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->ad_tag_macro_map = $arr; + + return $this; + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; + * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null + */ + public function getManifestOptions() + { + return $this->manifest_options; + } + + public function hasManifestOptions() + { + return isset($this->manifest_options); + } + + public function clearManifestOptions() + { + unset($this->manifest_options); + } + + /** + * Additional options that affect the output of the manifest. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; + * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var + * @return $this + */ + public function setManifestOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); + $this->manifest_options = $var; + + return $this; + } + + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAssetId() + { + return $this->asset_id; + } + + /** + * Output only. The generated ID of the VodSession's source media. + * + * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + + /** + * Required. Determines how the ad should be tracked. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAdTracking() + { + return $this->ad_tracking; + } + + /** + * Required. Determines how the ad should be tracked. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAdTracking($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); + $this->ad_tracking = $var; + + return $this; + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; + * @return \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings|null + */ + public function getGamSettings() + { + return $this->gam_settings; + } + + public function hasGamSettings() + { + return isset($this->gam_settings); + } + + public function clearGamSettings() + { + unset($this->gam_settings); + } + + /** + * This field should be set with appropriate values if GAM is being used for + * ads. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; + * @param \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $var + * @return $this + */ + public function setGamSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings::class); + $this->gam_settings = $var; + + return $this; + } + + /** + * The resource name of the VOD config for this session, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * + * Generated from protobuf field string vod_config = 14 [(.google.api.resource_reference) = { + * @return string + */ + public function getVodConfig() + { + return $this->vod_config; + } + + /** + * The resource name of the VOD config for this session, in the form of + * `projects/{project}/locations/{location}/vodConfigs/{id}`. + * + * Generated from protobuf field string vod_config = 14 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVodConfig($var) + { + GPBUtil::checkString($var, True); + $this->vod_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php new file mode 100644 index 000000000000..8063ccb2beea --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php @@ -0,0 +1,105 @@ +google.cloud.video.stitcher.v1.VodSession.GamSettings + */ +class GamSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ad Manager network code. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_code = ''; + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_code + * Required. Ad Manager network code. + * @type string $stream_id + * Required. The stream ID generated by Ad Manager. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ad Manager network code. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkCode() + { + return $this->network_code; + } + + /** + * Required. Ad Manager network code. + * + * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkCode($var) + { + GPBUtil::checkString($var, True); + $this->network_code = $var; + + return $this; + } + + /** + * Required. The stream ID generated by Ad Manager. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Required. The stream ID generated by Ad Manager. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\VodSession_GamSettings::class); + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php new file mode 100644 index 000000000000..d1b8a1b44103 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php @@ -0,0 +1,171 @@ +google.cloud.video.stitcher.v1.VodSessionAd + */ +class VodSessionAd extends \Google\Protobuf\Internal\Message +{ + /** + * Duration in seconds of the ad. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + /** + * Metadata of companion ads associated with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; + */ + protected $companion_ads = null; + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; + */ + private $activity_events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration in seconds of the ad. + * @type \Google\Cloud\Video\Stitcher\V1\CompanionAds $companion_ads + * Metadata of companion ads associated with the ad. + * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $activity_events + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * Duration in seconds of the ad. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @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 in seconds of the ad. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Metadata of companion ads associated with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; + * @return \Google\Cloud\Video\Stitcher\V1\CompanionAds|null + */ + public function getCompanionAds() + { + return $this->companion_ads; + } + + public function hasCompanionAds() + { + return isset($this->companion_ads); + } + + public function clearCompanionAds() + { + unset($this->companion_ads); + } + + /** + * Metadata of companion ads associated with the ad. + * + * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; + * @param \Google\Cloud\Video\Stitcher\V1\CompanionAds $var + * @return $this + */ + public function setCompanionAds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds::class); + $this->companion_ads = $var; + + return $this; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActivityEvents() + { + return $this->activity_events; + } + + /** + * The list of progress tracking events for the ad break. These can be of + * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, + * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, + * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, + * `CLOSE_LINEAR`, `SKIP`. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; + * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActivityEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); + $this->activity_events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php new file mode 100644 index 000000000000..688d8754996b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php @@ -0,0 +1,189 @@ +google.cloud.video.stitcher.v1.VodSessionAdBreak + */ +class VodSessionAdBreak extends \Google\Protobuf\Internal\Message +{ + /** + * List of events that are expected to be triggered, ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; + */ + private $progress_events; + /** + * Ordered list of ads stitched into the ad break. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; + */ + private $ads; + /** + * Ad break end time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + */ + protected $end_time_offset = null; + /** + * Ad break start time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $progress_events + * List of events that are expected to be triggered, ordered by time. + * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $ads + * Ordered list of ads stitched into the ad break. + * @type \Google\Protobuf\Duration $end_time_offset + * Ad break end time in seconds relative to the start of the VOD asset. + * @type \Google\Protobuf\Duration $start_time_offset + * Ad break start time in seconds relative to the start of the VOD asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * List of events that are expected to be triggered, ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProgressEvents() + { + return $this->progress_events; + } + + /** + * List of events that are expected to be triggered, ordered by time. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; + * @param array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProgressEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\ProgressEvent::class); + $this->progress_events = $arr; + + return $this; + } + + /** + * Ordered list of ads stitched into the ad break. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAds() + { + return $this->ads; + } + + /** + * Ordered list of ads stitched into the ad break. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; + * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAd::class); + $this->ads = $arr; + + return $this; + } + + /** + * Ad break end time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * Ad break end time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + + /** + * Ad break start time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Ad break start time in seconds relative to the start of the VOD asset. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php new file mode 100644 index 000000000000..d17cc36f962f --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php @@ -0,0 +1,81 @@ +google.cloud.video.stitcher.v1.VodSessionContent + */ +class VodSessionContent extends \Google\Protobuf\Internal\Message +{ + /** + * The total duration in seconds of the content including the ads stitched + * in. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * The total duration in seconds of the content including the ads stitched + * in. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); + parent::__construct($data); + } + + /** + * The total duration in seconds of the content including the ads stitched + * in. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The total duration in seconds of the content including the ads stitched + * in. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php new file mode 100644 index 000000000000..8d42eb7d99dd --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php @@ -0,0 +1,107 @@ +google.cloud.video.stitcher.v1.VodStitchDetail + */ +class VodStitchDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A list of ad processing details for the fetched ad playlist. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; + */ + private $ad_stitch_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * @type array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $ad_stitch_details + * A list of ad processing details for the fetched ad playlist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); + parent::__construct($data); + } + + /** + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the stitch detail in the specified VOD session, in the form of + * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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; + } + + /** + * A list of ad processing details for the fetched ad playlist. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdStitchDetails() + { + return $this->ad_stitch_details; + } + + /** + * A list of ad processing details for the fetched ad playlist. + * + * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; + * @param array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdStitchDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdStitchDetail::class); + $this->ad_stitch_details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php new file mode 100644 index 000000000000..d40238518105 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createCdnKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CdnKey $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $cdnKeyId = '[CDN_KEY_ID]'; + + create_cdn_key_sample($formattedParent, $cdnKeyId); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php new file mode 100644 index 000000000000..55b2e46020a6 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php @@ -0,0 +1,106 @@ +setSourceUri($liveConfigSourceUri) + ->setAdTracking($liveConfigAdTracking); + $request = (new CreateLiveConfigRequest()) + ->setParent($formattedParent) + ->setLiveConfigId($liveConfigId) + ->setLiveConfig($liveConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createLiveConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LiveConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = '[LIVE_CONFIG_ID]'; + $liveConfigSourceUri = '[SOURCE_URI]'; + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + + create_live_config_sample( + $formattedParent, + $liveConfigId, + $liveConfigSourceUri, + $liveConfigAdTracking + ); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php new file mode 100644 index 000000000000..314ebe4a0f6c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php @@ -0,0 +1,85 @@ +setLiveConfig($formattedLiveSessionLiveConfig); + $request = (new CreateLiveSessionRequest()) + ->setParent($formattedParent) + ->setLiveSession($liveSession); + + // Call the API and handle any network failures. + try { + /** @var LiveSession $response */ + $response = $videoStitcherServiceClient->createLiveSession($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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedLiveSessionLiveConfig = VideoStitcherServiceClient::liveConfigName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_CONFIG]' + ); + + create_live_session_sample($formattedParent, $formattedLiveSessionLiveConfig); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php new file mode 100644 index 000000000000..6a2ad70bf069 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setSlateId($slateId) + ->setSlate($slate); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createSlate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Slate $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $slateId = '[SLATE_ID]'; + + create_slate_sample($formattedParent, $slateId); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php new file mode 100644 index 000000000000..8d040e094024 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php @@ -0,0 +1,100 @@ +setSourceUri($vodConfigSourceUri) + ->setAdTagUri($vodConfigAdTagUri); + $request = (new CreateVodConfigRequest()) + ->setParent($formattedParent) + ->setVodConfigId($vodConfigId) + ->setVodConfig($vodConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->createVodConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VodConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $vodConfigId = '[VOD_CONFIG_ID]'; + $vodConfigSourceUri = '[SOURCE_URI]'; + $vodConfigAdTagUri = '[AD_TAG_URI]'; + + create_vod_config_sample($formattedParent, $vodConfigId, $vodConfigSourceUri, $vodConfigAdTagUri); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php new file mode 100644 index 000000000000..935e199e1f68 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php @@ -0,0 +1,79 @@ +setAdTracking($vodSessionAdTracking); + $request = (new CreateVodSessionRequest()) + ->setParent($formattedParent) + ->setVodSession($vodSession); + + // Call the API and handle any network failures. + try { + /** @var VodSession $response */ + $response = $videoStitcherServiceClient->createVodSession($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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + + create_vod_session_sample($formattedParent, $vodSessionAdTracking); +} +// [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php new file mode 100644 index 000000000000..c79b4d1fac41 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteCdnKey($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 = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + + delete_cdn_key_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php new file mode 100644 index 000000000000..e2440ebbe253 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteLiveConfig($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 = VideoStitcherServiceClient::liveConfigName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_CONFIG]' + ); + + delete_live_config_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php new file mode 100644 index 000000000000..72ceafadff7b --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteSlate($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 = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + + delete_slate_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php new file mode 100644 index 000000000000..daa7531cb39d --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->deleteVodConfig($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 = VideoStitcherServiceClient::vodConfigName( + '[PROJECT]', + '[LOCATION]', + '[VOD_CONFIG]' + ); + + delete_vod_config_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php new file mode 100644 index 000000000000..4ce3c6c62e61 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CdnKey $response */ + $response = $videoStitcherServiceClient->getCdnKey($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 = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + + get_cdn_key_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php new file mode 100644 index 000000000000..d0f7dd893ec7 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LiveAdTagDetail $response */ + $response = $videoStitcherServiceClient->getLiveAdTagDetail($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 = VideoStitcherServiceClient::liveAdTagDetailName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]', + '[LIVE_AD_TAG_DETAIL]' + ); + + get_live_ad_tag_detail_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php new file mode 100644 index 000000000000..f7382b0689b8 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LiveConfig $response */ + $response = $videoStitcherServiceClient->getLiveConfig($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 = VideoStitcherServiceClient::liveConfigName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_CONFIG]' + ); + + get_live_config_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php new file mode 100644 index 000000000000..6bba8e76d34e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LiveSession $response */ + $response = $videoStitcherServiceClient->getLiveSession($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 = VideoStitcherServiceClient::liveSessionName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]' + ); + + get_live_session_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php new file mode 100644 index 000000000000..85ec62872a6c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Slate $response */ + $response = $videoStitcherServiceClient->getSlate($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 = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + + get_slate_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php new file mode 100644 index 000000000000..100e6a83dedf --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodAdTagDetail $response */ + $response = $videoStitcherServiceClient->getVodAdTagDetail($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 = VideoStitcherServiceClient::vodAdTagDetailName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]', + '[VOD_AD_TAG_DETAIL]' + ); + + get_vod_ad_tag_detail_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php new file mode 100644 index 000000000000..bc0f6204365c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodConfig $response */ + $response = $videoStitcherServiceClient->getVodConfig($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 = VideoStitcherServiceClient::vodConfigName( + '[PROJECT]', + '[LOCATION]', + '[VOD_CONFIG]' + ); + + get_vod_config_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php new file mode 100644 index 000000000000..ba90e1e43d50 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodSession $response */ + $response = $videoStitcherServiceClient->getVodSession($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 = VideoStitcherServiceClient::vodSessionName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]' + ); + + get_vod_session_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php new file mode 100644 index 000000000000..41e6cee9bb96 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VodStitchDetail $response */ + $response = $videoStitcherServiceClient->getVodStitchDetail($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 = VideoStitcherServiceClient::vodStitchDetailName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]', + '[VOD_STITCH_DETAIL]' + ); + + get_vod_stitch_detail_sample($formattedName); +} +// [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php new file mode 100644 index 000000000000..7baa8841e2ea --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listCdnKeys($request); + + /** @var CdnKey $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_cdn_keys_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php new file mode 100644 index 000000000000..ff2d434ccf4e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listLiveAdTagDetails($request); + + /** @var LiveAdTagDetail $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 = VideoStitcherServiceClient::liveSessionName( + '[PROJECT]', + '[LOCATION]', + '[LIVE_SESSION]' + ); + + list_live_ad_tag_details_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php new file mode 100644 index 000000000000..35e61ee34561 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listLiveConfigs($request); + + /** @var LiveConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_live_configs_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php new file mode 100644 index 000000000000..50169af4a1ce --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listSlates($request); + + /** @var Slate $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_slates_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php new file mode 100644 index 000000000000..fe57aceefba9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listVodAdTagDetails($request); + + /** @var VodAdTagDetail $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 = VideoStitcherServiceClient::vodSessionName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]' + ); + + list_vod_ad_tag_details_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php new file mode 100644 index 000000000000..a6e5d2e7918c --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listVodConfigs($request); + + /** @var VodConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_vod_configs_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php new file mode 100644 index 000000000000..a6176994b586 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $videoStitcherServiceClient->listVodStitchDetails($request); + + /** @var VodStitchDetail $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 = VideoStitcherServiceClient::vodSessionName( + '[PROJECT]', + '[LOCATION]', + '[VOD_SESSION]' + ); + + list_vod_stitch_details_sample($formattedParent); +} +// [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php new file mode 100644 index 000000000000..4e4eb987519a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php @@ -0,0 +1,75 @@ +setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->updateCdnKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CdnKey $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 videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php new file mode 100644 index 000000000000..550ceb6ddde9 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php @@ -0,0 +1,92 @@ +setSourceUri($liveConfigSourceUri) + ->setAdTracking($liveConfigAdTracking); + $updateMask = new FieldMask(); + $request = (new UpdateLiveConfigRequest()) + ->setLiveConfig($liveConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->updateLiveConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LiveConfig $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 +{ + $liveConfigSourceUri = '[SOURCE_URI]'; + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + + update_live_config_sample($liveConfigSourceUri, $liveConfigAdTracking); +} +// [END videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php new file mode 100644 index 000000000000..f2a1f513cf0a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php @@ -0,0 +1,74 @@ +setSlate($slate) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->updateSlate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Slate $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 videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php new file mode 100644 index 000000000000..60fd6fb83de7 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php @@ -0,0 +1,91 @@ +setSourceUri($vodConfigSourceUri) + ->setAdTagUri($vodConfigAdTagUri); + $updateMask = new FieldMask(); + $request = (new UpdateVodConfigRequest()) + ->setVodConfig($vodConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $videoStitcherServiceClient->updateVodConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VodConfig $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 +{ + $vodConfigSourceUri = '[SOURCE_URI]'; + $vodConfigAdTagUri = '[AD_TAG_URI]'; + + update_vod_config_sample($vodConfigSourceUri, $vodConfigAdTagUri); +} +// [END videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php new file mode 100644 index 000000000000..1da3c06fb85e --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php @@ -0,0 +1,1325 @@ + createCdnKeyAsync(CreateCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLiveConfigAsync(CreateLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLiveSessionAsync(CreateLiveSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSlateAsync(CreateSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVodConfigAsync(CreateVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVodSessionAsync(CreateVodSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCdnKeyAsync(DeleteCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLiveConfigAsync(DeleteLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSlateAsync(DeleteSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVodConfigAsync(DeleteVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCdnKeyAsync(GetCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLiveAdTagDetailAsync(GetLiveAdTagDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLiveConfigAsync(GetLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLiveSessionAsync(GetLiveSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSlateAsync(GetSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodAdTagDetailAsync(GetVodAdTagDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodConfigAsync(GetVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodSessionAsync(GetVodSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodStitchDetailAsync(GetVodStitchDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCdnKeysAsync(ListCdnKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLiveAdTagDetailsAsync(ListLiveAdTagDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLiveConfigsAsync(ListLiveConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSlatesAsync(ListSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVodAdTagDetailsAsync(ListVodAdTagDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVodConfigsAsync(ListVodConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVodStitchDetailsAsync(ListVodStitchDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCdnKeyAsync(UpdateCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLiveConfigAsync(UpdateLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSlateAsync(UpdateSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVodConfigAsync(UpdateVodConfigRequest $request, array $optionalArgs = []) + */ +final class VideoStitcherServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.video.stitcher.v1.VideoStitcherService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'videostitcher.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'videostitcher.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/video_stitcher_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/video_stitcher_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/video_stitcher_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/video_stitcher_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 cdn_key + * resource. + * + * @param string $project + * @param string $location + * @param string $cdnKey + * + * @return string The formatted cdn_key resource. + */ + public static function cdnKeyName(string $project, string $location, string $cdnKey): string + { + return self::getPathTemplate('cdnKey')->render([ + 'project' => $project, + 'location' => $location, + 'cdn_key' => $cdnKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * live_ad_tag_detail resource. + * + * @param string $project + * @param string $location + * @param string $liveSession + * @param string $liveAdTagDetail + * + * @return string The formatted live_ad_tag_detail resource. + */ + public static function liveAdTagDetailName(string $project, string $location, string $liveSession, string $liveAdTagDetail): string + { + return self::getPathTemplate('liveAdTagDetail')->render([ + 'project' => $project, + 'location' => $location, + 'live_session' => $liveSession, + 'live_ad_tag_detail' => $liveAdTagDetail, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a live_config + * resource. + * + * @param string $project + * @param string $location + * @param string $liveConfig + * + * @return string The formatted live_config resource. + */ + public static function liveConfigName(string $project, string $location, string $liveConfig): string + { + return self::getPathTemplate('liveConfig')->render([ + 'project' => $project, + 'location' => $location, + 'live_config' => $liveConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a live_session + * resource. + * + * @param string $project + * @param string $location + * @param string $liveSession + * + * @return string The formatted live_session resource. + */ + public static function liveSessionName(string $project, string $location, string $liveSession): string + { + return self::getPathTemplate('liveSession')->render([ + 'project' => $project, + 'location' => $location, + 'live_session' => $liveSession, + ]); + } + + /** + * 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 slate + * resource. + * + * @param string $project + * @param string $location + * @param string $slate + * + * @return string The formatted slate resource. + */ + public static function slateName(string $project, string $location, string $slate): string + { + return self::getPathTemplate('slate')->render([ + 'project' => $project, + 'location' => $location, + 'slate' => $slate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vod_ad_tag_detail resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * @param string $vodAdTagDetail + * + * @return string The formatted vod_ad_tag_detail resource. + */ + public static function vodAdTagDetailName(string $project, string $location, string $vodSession, string $vodAdTagDetail): string + { + return self::getPathTemplate('vodAdTagDetail')->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + 'vod_ad_tag_detail' => $vodAdTagDetail, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a vod_config + * resource. + * + * @param string $project + * @param string $location + * @param string $vodConfig + * + * @return string The formatted vod_config resource. + */ + public static function vodConfigName(string $project, string $location, string $vodConfig): string + { + return self::getPathTemplate('vodConfig')->render([ + 'project' => $project, + 'location' => $location, + 'vod_config' => $vodConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a vod_session + * resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * + * @return string The formatted vod_session resource. + */ + public static function vodSessionName(string $project, string $location, string $vodSession): string + { + return self::getPathTemplate('vodSession')->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vod_stitch_detail resource. + * + * @param string $project + * @param string $location + * @param string $vodSession + * @param string $vodStitchDetail + * + * @return string The formatted vod_stitch_detail resource. + */ + public static function vodStitchDetailName(string $project, string $location, string $vodSession, string $vodStitchDetail): string + { + return self::getPathTemplate('vodStitchDetail')->render([ + 'project' => $project, + 'location' => $location, + 'vod_session' => $vodSession, + 'vod_stitch_detail' => $vodStitchDetail, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key} + * - liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail} + * - liveConfig: projects/{project}/locations/{location}/liveConfigs/{live_config} + * - liveSession: projects/{project}/locations/{location}/liveSessions/{live_session} + * - location: projects/{project}/locations/{location} + * - slate: projects/{project}/locations/{location}/slates/{slate} + * - vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail} + * - vodConfig: projects/{project}/locations/{location}/vodConfigs/{vod_config} + * - vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session} + * - vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'videostitcher.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new CDN key. + * + * The async variant is {@see VideoStitcherServiceClient::createCdnKeyAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/create_cdn_key.php + * + * @param CreateCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCdnKey(CreateCdnKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCdnKey', $request, $callOptions)->wait(); + } + + /** + * Registers the live config with the provided unique ID in + * the specified region. + * + * The async variant is {@see VideoStitcherServiceClient::createLiveConfigAsync()} + * . + * + * @example samples/V1/VideoStitcherServiceClient/create_live_config.php + * + * @param CreateLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createLiveConfig(CreateLiveConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a new live session. + * + * The async variant is {@see VideoStitcherServiceClient::createLiveSessionAsync()} + * . + * + * @example samples/V1/VideoStitcherServiceClient/create_live_session.php + * + * @param CreateLiveSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function createLiveSession(CreateLiveSessionRequest $request, array $callOptions = []): LiveSession + { + return $this->startApiCall('CreateLiveSession', $request, $callOptions)->wait(); + } + + /** + * Creates a slate. + * + * The async variant is {@see VideoStitcherServiceClient::createSlateAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/create_slate.php + * + * @param CreateSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createSlate(CreateSlateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSlate', $request, $callOptions)->wait(); + } + + /** + * Registers the VOD config with the provided unique ID in + * the specified region. + * + * The async variant is {@see VideoStitcherServiceClient::createVodConfigAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/create_vod_config.php + * + * @param CreateVodConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createVodConfig(CreateVodConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateVodConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a client side playback VOD session and returns the full + * tracking and playback metadata of the session. + * + * The async variant is {@see VideoStitcherServiceClient::createVodSessionAsync()} + * . + * + * @example samples/V1/VideoStitcherServiceClient/create_vod_session.php + * + * @param CreateVodSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVodSession(CreateVodSessionRequest $request, array $callOptions = []): VodSession + { + return $this->startApiCall('CreateVodSession', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified CDN key. + * + * The async variant is {@see VideoStitcherServiceClient::deleteCdnKeyAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/delete_cdn_key.php + * + * @param DeleteCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteCdnKey(DeleteCdnKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCdnKey', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified live config. + * + * The async variant is {@see VideoStitcherServiceClient::deleteLiveConfigAsync()} + * . + * + * @example samples/V1/VideoStitcherServiceClient/delete_live_config.php + * + * @param DeleteLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteLiveConfig(DeleteLiveConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified slate. + * + * The async variant is {@see VideoStitcherServiceClient::deleteSlateAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/delete_slate.php + * + * @param DeleteSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteSlate(DeleteSlateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSlate', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified VOD config. + * + * The async variant is {@see VideoStitcherServiceClient::deleteVodConfigAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/delete_vod_config.php + * + * @param DeleteVodConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteVodConfig(DeleteVodConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteVodConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the specified CDN key. + * + * The async variant is {@see VideoStitcherServiceClient::getCdnKeyAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_cdn_key.php + * + * @param GetCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CdnKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCdnKey(GetCdnKeyRequest $request, array $callOptions = []): CdnKey + { + return $this->startApiCall('GetCdnKey', $request, $callOptions)->wait(); + } + + /** + * Returns the specified ad tag detail for the specified live session. + * + * The async variant is + * {@see VideoStitcherServiceClient::getLiveAdTagDetailAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php + * + * @param GetLiveAdTagDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveAdTagDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLiveAdTagDetail(GetLiveAdTagDetailRequest $request, array $callOptions = []): LiveAdTagDetail + { + return $this->startApiCall('GetLiveAdTagDetail', $request, $callOptions)->wait(); + } + + /** + * Returns the specified live config managed by the Video + * Stitcher service. + * + * The async variant is {@see VideoStitcherServiceClient::getLiveConfigAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_live_config.php + * + * @param GetLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLiveConfig(GetLiveConfigRequest $request, array $callOptions = []): LiveConfig + { + return $this->startApiCall('GetLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the details for the specified live session. + * + * The async variant is {@see VideoStitcherServiceClient::getLiveSessionAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_live_session.php + * + * @param GetLiveSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LiveSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLiveSession(GetLiveSessionRequest $request, array $callOptions = []): LiveSession + { + return $this->startApiCall('GetLiveSession', $request, $callOptions)->wait(); + } + + /** + * Returns the specified slate. + * + * The async variant is {@see VideoStitcherServiceClient::getSlateAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_slate.php + * + * @param GetSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Slate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSlate(GetSlateRequest $request, array $callOptions = []): Slate + { + return $this->startApiCall('GetSlate', $request, $callOptions)->wait(); + } + + /** + * Returns the specified ad tag detail for the specified VOD session. + * + * The async variant is {@see VideoStitcherServiceClient::getVodAdTagDetailAsync()} + * . + * + * @example samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php + * + * @param GetVodAdTagDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodAdTagDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodAdTagDetail(GetVodAdTagDetailRequest $request, array $callOptions = []): VodAdTagDetail + { + return $this->startApiCall('GetVodAdTagDetail', $request, $callOptions)->wait(); + } + + /** + * Returns the specified VOD config managed by the Video + * Stitcher API service. + * + * The async variant is {@see VideoStitcherServiceClient::getVodConfigAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_vod_config.php + * + * @param GetVodConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodConfig(GetVodConfigRequest $request, array $callOptions = []): VodConfig + { + return $this->startApiCall('GetVodConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the full tracking, playback metadata, and relevant ad-ops + * logs for the specified VOD session. + * + * The async variant is {@see VideoStitcherServiceClient::getVodSessionAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_vod_session.php + * + * @param GetVodSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodSession(GetVodSessionRequest $request, array $callOptions = []): VodSession + { + return $this->startApiCall('GetVodSession', $request, $callOptions)->wait(); + } + + /** + * Returns the specified stitching information for the specified VOD session. + * + * The async variant is + * {@see VideoStitcherServiceClient::getVodStitchDetailAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php + * + * @param GetVodStitchDetailRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VodStitchDetail + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVodStitchDetail(GetVodStitchDetailRequest $request, array $callOptions = []): VodStitchDetail + { + return $this->startApiCall('GetVodStitchDetail', $request, $callOptions)->wait(); + } + + /** + * Lists all CDN keys in the specified project and location. + * + * The async variant is {@see VideoStitcherServiceClient::listCdnKeysAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_cdn_keys.php + * + * @param ListCdnKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCdnKeys(ListCdnKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCdnKeys', $request, $callOptions); + } + + /** + * Return the list of ad tag details for the specified live session. + * + * The async variant is + * {@see VideoStitcherServiceClient::listLiveAdTagDetailsAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php + * + * @param ListLiveAdTagDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listLiveAdTagDetails(ListLiveAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLiveAdTagDetails', $request, $callOptions); + } + + /** + * Lists all live configs managed by the Video Stitcher that + * belong to the specified project and region. + * + * The async variant is {@see VideoStitcherServiceClient::listLiveConfigsAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_live_configs.php + * + * @param ListLiveConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listLiveConfigs(ListLiveConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLiveConfigs', $request, $callOptions); + } + + /** + * Lists all slates in the specified project and location. + * + * The async variant is {@see VideoStitcherServiceClient::listSlatesAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_slates.php + * + * @param ListSlatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSlates(ListSlatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSlates', $request, $callOptions); + } + + /** + * Return the list of ad tag details for the specified VOD session. + * + * The async variant is + * {@see VideoStitcherServiceClient::listVodAdTagDetailsAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php + * + * @param ListVodAdTagDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVodAdTagDetails(ListVodAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVodAdTagDetails', $request, $callOptions); + } + + /** + * Lists all VOD configs managed by the Video Stitcher API that + * belong to the specified project and region. + * + * The async variant is {@see VideoStitcherServiceClient::listVodConfigsAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_vod_configs.php + * + * @param ListVodConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVodConfigs(ListVodConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVodConfigs', $request, $callOptions); + } + + /** + * Returns a list of detailed stitching information of the specified VOD + * session. + * + * The async variant is + * {@see VideoStitcherServiceClient::listVodStitchDetailsAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php + * + * @param ListVodStitchDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVodStitchDetails(ListVodStitchDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVodStitchDetails', $request, $callOptions); + } + + /** + * Updates the specified CDN key. Only update fields specified + * in the call method body. + * + * The async variant is {@see VideoStitcherServiceClient::updateCdnKeyAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/update_cdn_key.php + * + * @param UpdateCdnKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateCdnKey(UpdateCdnKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCdnKey', $request, $callOptions)->wait(); + } + + /** + * Updates the specified LiveConfig. Only update fields specified + * in the call method body. + * + * The async variant is {@see VideoStitcherServiceClient::updateLiveConfigAsync()} + * . + * + * @example samples/V1/VideoStitcherServiceClient/update_live_config.php + * + * @param UpdateLiveConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateLiveConfig(UpdateLiveConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateLiveConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the specified slate. + * + * The async variant is {@see VideoStitcherServiceClient::updateSlateAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/update_slate.php + * + * @param UpdateSlateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateSlate(UpdateSlateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSlate', $request, $callOptions)->wait(); + } + + /** + * Updates the specified VOD config. Only update fields specified + * in the call method body. + * + * The async variant is {@see VideoStitcherServiceClient::updateVodConfigAsync()} . + * + * @example samples/V1/VideoStitcherServiceClient/update_vod_config.php + * + * @param UpdateVodConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateVodConfig(UpdateVodConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateVodConfig', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..deb3878deaf3 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json @@ -0,0 +1,168 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.video.stitcher.v1", + "libraryPackage": "Google\\Cloud\\Video\\Stitcher\\V1", + "services": { + "VideoStitcherService": { + "clients": { + "grpc": { + "libraryClient": "VideoStitcherServiceGapicClient", + "rpcs": { + "CreateCdnKey": { + "methods": [ + "createCdnKey" + ] + }, + "CreateLiveConfig": { + "methods": [ + "createLiveConfig" + ] + }, + "CreateLiveSession": { + "methods": [ + "createLiveSession" + ] + }, + "CreateSlate": { + "methods": [ + "createSlate" + ] + }, + "CreateVodConfig": { + "methods": [ + "createVodConfig" + ] + }, + "CreateVodSession": { + "methods": [ + "createVodSession" + ] + }, + "DeleteCdnKey": { + "methods": [ + "deleteCdnKey" + ] + }, + "DeleteLiveConfig": { + "methods": [ + "deleteLiveConfig" + ] + }, + "DeleteSlate": { + "methods": [ + "deleteSlate" + ] + }, + "DeleteVodConfig": { + "methods": [ + "deleteVodConfig" + ] + }, + "GetCdnKey": { + "methods": [ + "getCdnKey" + ] + }, + "GetLiveAdTagDetail": { + "methods": [ + "getLiveAdTagDetail" + ] + }, + "GetLiveConfig": { + "methods": [ + "getLiveConfig" + ] + }, + "GetLiveSession": { + "methods": [ + "getLiveSession" + ] + }, + "GetSlate": { + "methods": [ + "getSlate" + ] + }, + "GetVodAdTagDetail": { + "methods": [ + "getVodAdTagDetail" + ] + }, + "GetVodConfig": { + "methods": [ + "getVodConfig" + ] + }, + "GetVodSession": { + "methods": [ + "getVodSession" + ] + }, + "GetVodStitchDetail": { + "methods": [ + "getVodStitchDetail" + ] + }, + "ListCdnKeys": { + "methods": [ + "listCdnKeys" + ] + }, + "ListLiveAdTagDetails": { + "methods": [ + "listLiveAdTagDetails" + ] + }, + "ListLiveConfigs": { + "methods": [ + "listLiveConfigs" + ] + }, + "ListSlates": { + "methods": [ + "listSlates" + ] + }, + "ListVodAdTagDetails": { + "methods": [ + "listVodAdTagDetails" + ] + }, + "ListVodConfigs": { + "methods": [ + "listVodConfigs" + ] + }, + "ListVodStitchDetails": { + "methods": [ + "listVodStitchDetails" + ] + }, + "UpdateCdnKey": { + "methods": [ + "updateCdnKey" + ] + }, + "UpdateLiveConfig": { + "methods": [ + "updateLiveConfig" + ] + }, + "UpdateSlate": { + "methods": [ + "updateSlate" + ] + }, + "UpdateVodConfig": { + "methods": [ + "updateVodConfig" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json new file mode 100644 index 000000000000..7c6b32e32f55 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json @@ -0,0 +1,194 @@ +{ + "interfaces": { + "google.cloud.video.stitcher.v1.VideoStitcherService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "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_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 + } + }, + "methods": { + "CreateCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateLiveSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateVodConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateVodSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteVodConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLiveAdTagDetail": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLiveSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetVodAdTagDetail": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetVodConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVodSession": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetVodStitchDetail": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListCdnKeys": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLiveAdTagDetails": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLiveConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListSlates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListVodAdTagDetails": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListVodConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVodStitchDetails": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateCdnKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateLiveConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateVodConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php new file mode 100644 index 000000000000..e80d4ba18a1a --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php @@ -0,0 +1,544 @@ + [ + 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ + 'CreateCdnKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLiveConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\LiveConfig', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSlate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVodConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\VodConfig', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCdnKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLiveConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSlate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVodConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCdnKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cdn_key.name', + 'fieldAccessors' => [ + 'getCdnKey', + 'getName', + ], + ], + ], + ], + 'UpdateLiveConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\LiveConfig', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'live_config.name', + 'fieldAccessors' => [ + 'getLiveConfig', + 'getName', + ], + ], + ], + ], + 'UpdateSlate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'slate.name', + 'fieldAccessors' => [ + 'getSlate', + 'getName', + ], + ], + ], + ], + 'UpdateVodConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\VodConfig', + 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'vod_config.name', + 'fieldAccessors' => [ + 'getVodConfig', + 'getName', + ], + ], + ], + ], + 'CreateLiveSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVodSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetCdnKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\CdnKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveAdTagDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSlate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\Slate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodAdTagDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodAdTagDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVodStitchDetail' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodStitchDetail', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCdnKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCdnKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListCdnKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveAdTagDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLiveAdTagDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLiveConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSlates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSlates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodAdTagDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVodAdTagDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVodConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodStitchDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVodStitchDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'cdnKey' => 'projects/{project}/locations/{location}/cdnKeys/{cdn_key}', + 'liveAdTagDetail' => 'projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}', + 'liveConfig' => 'projects/{project}/locations/{location}/liveConfigs/{live_config}', + 'liveSession' => 'projects/{project}/locations/{location}/liveSessions/{live_session}', + 'location' => 'projects/{project}/locations/{location}', + 'slate' => 'projects/{project}/locations/{location}/slates/{slate}', + 'vodAdTagDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}', + 'vodConfig' => 'projects/{project}/locations/{location}/vodConfigs/{vod_config}', + 'vodSession' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}', + 'vodStitchDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php new file mode 100644 index 000000000000..bbeb54d103eb --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php @@ -0,0 +1,444 @@ + [ + 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ + 'CreateCdnKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', + 'body' => 'cdn_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cdn_key_id', + ], + ], + 'CreateLiveConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', + 'body' => 'live_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'live_config_id', + ], + ], + 'CreateLiveSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveSessions', + 'body' => 'live_session', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSlate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', + 'body' => 'slate', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'slate_id', + ], + ], + 'CreateVodConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodConfigs', + 'body' => 'vod_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'vod_config_id', + ], + ], + 'CreateVodSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodSessions', + 'body' => 'vod_session', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCdnKey' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLiveConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSlate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVodConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCdnKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveAdTagDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLiveSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSlate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodAdTagDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVodStitchDetail' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCdnKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveAdTagDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLiveConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSlates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodAdTagDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVodStitchDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCdnKey' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}', + 'body' => 'cdn_key', + 'placeholders' => [ + 'cdn_key.name' => [ + 'getters' => [ + 'getCdnKey', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateLiveConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{live_config.name=projects/*/locations/*/liveConfigs/*}', + 'body' => 'live_config', + 'placeholders' => [ + 'live_config.name' => [ + 'getters' => [ + 'getLiveConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSlate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{slate.name=projects/*/locations/*/slates/*}', + 'body' => 'slate', + 'placeholders' => [ + 'slate.name' => [ + 'getters' => [ + 'getSlate', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateVodConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{vod_config.name=projects/*/locations/*/vodConfigs/*}', + 'body' => 'vod_config', + 'placeholders' => [ + 'vod_config.name' => [ + 'getters' => [ + 'getVodConfig', + '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/*}', + '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/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php new file mode 100644 index 000000000000..e66f9fa175a8 --- /dev/null +++ b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php @@ -0,0 +1,3059 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VideoStitcherServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VideoStitcherServiceClient($options); + } + + /** @test */ + public function createCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $request = (new CreateCdnKeyRequest()) + ->setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + $response = $gapicClient->createCdnKey($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.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKeyId(); + $this->assertProtobufEquals($cdnKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + $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 createCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $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]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $request = (new CreateCdnKeyRequest()) + ->setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + $response = $gapicClient->createCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + 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 createLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $liveConfigId = 'liveConfigId-558267483'; + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $request = (new CreateLiveConfigRequest()) + ->setParent($formattedParent) + ->setLiveConfigId($liveConfigId) + ->setLiveConfig($liveConfig); + $response = $gapicClient->createLiveConfig($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.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLiveConfigId(); + $this->assertProtobufEquals($liveConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getLiveConfig(); + $this->assertProtobufEquals($liveConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); + $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 createLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLiveConfigTest'); + $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]'); + $liveConfigId = 'liveConfigId-558267483'; + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $request = (new CreateLiveConfigRequest()) + ->setParent($formattedParent) + ->setLiveConfigId($liveConfigId) + ->setLiveConfig($liveConfig); + $response = $gapicClient->createLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); + 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 createLiveSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $playUri = 'playUri1879098849'; + $liveConfig = 'liveConfig-1498665483'; + $expectedResponse = new LiveSession(); + $expectedResponse->setName($name); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setLiveConfig($liveConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $liveSession = new LiveSession(); + $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $liveSession->setLiveConfig($liveSessionLiveConfig); + $request = (new CreateLiveSessionRequest()) + ->setParent($formattedParent) + ->setLiveSession($liveSession); + $response = $gapicClient->createLiveSession($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.video.stitcher.v1.VideoStitcherService/CreateLiveSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getLiveSession(); + $this->assertProtobufEquals($liveSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createLiveSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $liveSession = new LiveSession(); + $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $liveSession->setLiveConfig($liveSessionLiveConfig); + $request = (new CreateLiveSessionRequest()) + ->setParent($formattedParent) + ->setLiveSession($liveSession); + try { + $gapicClient->createLiveSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $slateId = 'slateId-1486865023'; + $slate = new Slate(); + $request = (new CreateSlateRequest()) + ->setParent($formattedParent) + ->setSlateId($slateId) + ->setSlate($slate); + $response = $gapicClient->createSlate($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.video.stitcher.v1.VideoStitcherService/CreateSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSlateId(); + $this->assertProtobufEquals($slateId, $actualValue); + $actualValue = $actualApiRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSlateTest'); + $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 createSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSlateTest'); + $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]'); + $slateId = 'slateId-1486865023'; + $slate = new Slate(); + $request = (new CreateSlateRequest()) + ->setParent($formattedParent) + ->setSlateId($slateId) + ->setSlate($slate); + $response = $gapicClient->createSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSlateTest'); + 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 createVodConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVodConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $expectedResponse = new VodConfig(); + $expectedResponse->setName($name); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVodConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vodConfigId = 'vodConfigId-418410300'; + $vodConfig = new VodConfig(); + $vodConfigSourceUri = 'vodConfigSourceUri538718692'; + $vodConfig->setSourceUri($vodConfigSourceUri); + $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; + $vodConfig->setAdTagUri($vodConfigAdTagUri); + $request = (new CreateVodConfigRequest()) + ->setParent($formattedParent) + ->setVodConfigId($vodConfigId) + ->setVodConfig($vodConfig); + $response = $gapicClient->createVodConfig($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.video.stitcher.v1.VideoStitcherService/CreateVodConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVodConfigId(); + $this->assertProtobufEquals($vodConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getVodConfig(); + $this->assertProtobufEquals($vodConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVodConfigTest'); + $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 createVodConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVodConfigTest'); + $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]'); + $vodConfigId = 'vodConfigId-418410300'; + $vodConfig = new VodConfig(); + $vodConfigSourceUri = 'vodConfigSourceUri538718692'; + $vodConfig->setSourceUri($vodConfigSourceUri); + $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; + $vodConfig->setAdTagUri($vodConfigAdTagUri); + $request = (new CreateVodConfigRequest()) + ->setParent($formattedParent) + ->setVodConfigId($vodConfigId) + ->setVodConfig($vodConfig); + $response = $gapicClient->createVodConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVodConfigTest'); + 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 createVodSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $playUri = 'playUri1879098849'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $assetId = 'assetId-373202742'; + $vodConfig = 'vodConfig-936686282'; + $expectedResponse = new VodSession(); + $expectedResponse->setName($name); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setAssetId($assetId); + $expectedResponse->setVodConfig($vodConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vodSession = new VodSession(); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $vodSession->setAdTracking($vodSessionAdTracking); + $request = (new CreateVodSessionRequest()) + ->setParent($formattedParent) + ->setVodSession($vodSession); + $response = $gapicClient->createVodSession($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.video.stitcher.v1.VideoStitcherService/CreateVodSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getVodSession(); + $this->assertProtobufEquals($vodSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createVodSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $vodSession = new VodSession(); + $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $vodSession->setAdTracking($vodSessionAdTracking); + $request = (new CreateVodSessionRequest()) + ->setParent($formattedParent) + ->setVodSession($vodSession); + try { + $gapicClient->createVodSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new DeleteCdnKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCdnKey($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.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); + $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 deleteCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCdnKeyTest'); + $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->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new DeleteCdnKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); + 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 deleteLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new DeleteLiveConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLiveConfig($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.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); + $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 deleteLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLiveConfigTest'); + $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->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new DeleteLiveConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); + 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 deleteSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new DeleteSlateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSlate($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.video.stitcher.v1.VideoStitcherService/DeleteSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); + $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 deleteSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSlateTest'); + $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->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new DeleteSlateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); + 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 deleteVodConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVodConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteVodConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); + $request = (new DeleteVodConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVodConfig($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.video.stitcher.v1.VideoStitcherService/DeleteVodConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVodConfigTest'); + $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 deleteVodConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVodConfigTest'); + $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->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); + $request = (new DeleteVodConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVodConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVodConfigTest'); + 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 getCdnKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name2); + $expectedResponse->setHostname($hostname); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new GetCdnKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getCdnKey($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.video.stitcher.v1.VideoStitcherService/GetCdnKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCdnKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); + $request = (new GetCdnKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getCdnKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveAdTagDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new LiveAdTagDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + $request = (new GetLiveAdTagDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getLiveAdTagDetail($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.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveAdTagDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); + $request = (new GetLiveAdTagDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getLiveAdTagDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new GetLiveConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getLiveConfig($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.video.stitcher.v1.VideoStitcherService/GetLiveConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); + $request = (new GetLiveConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getLiveConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $playUri = 'playUri1879098849'; + $liveConfig = 'liveConfig-1498665483'; + $expectedResponse = new LiveSession(); + $expectedResponse->setName($name2); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setLiveConfig($liveConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new GetLiveSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->getLiveSession($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.video.stitcher.v1.VideoStitcherService/GetLiveSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLiveSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new GetLiveSessionRequest()) + ->setName($formattedName); + try { + $gapicClient->getLiveSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new GetSlateRequest()) + ->setName($formattedName); + $response = $gapicClient->getSlate($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.video.stitcher.v1.VideoStitcherService/GetSlate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); + $request = (new GetSlateRequest()) + ->setName($formattedName); + try { + $gapicClient->getSlate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodAdTagDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VodAdTagDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + $request = (new GetVodAdTagDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodAdTagDetail($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.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodAdTagDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); + $request = (new GetVodAdTagDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodAdTagDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $expectedResponse = new VodConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); + $request = (new GetVodConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodConfig($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.video.stitcher.v1.VideoStitcherService/GetVodConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); + $request = (new GetVodConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $playUri = 'playUri1879098849'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $assetId = 'assetId-373202742'; + $vodConfig = 'vodConfig-936686282'; + $expectedResponse = new VodSession(); + $expectedResponse->setName($name2); + $expectedResponse->setPlayUri($playUri); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setAssetId($assetId); + $expectedResponse->setVodConfig($vodConfig); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new GetVodSessionRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodSession($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.video.stitcher.v1.VideoStitcherService/GetVodSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new GetVodSessionRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodStitchDetailTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VodStitchDetail(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + $request = (new GetVodStitchDetailRequest()) + ->setName($formattedName); + $response = $gapicClient->getVodStitchDetail($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.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVodStitchDetailExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); + $request = (new GetVodStitchDetailRequest()) + ->setName($formattedName); + try { + $gapicClient->getVodStitchDetail($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCdnKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cdnKeysElement = new CdnKey(); + $cdnKeys = [ + $cdnKeysElement, + ]; + $expectedResponse = new ListCdnKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCdnKeys($cdnKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCdnKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCdnKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCdnKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCdnKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListCdnKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCdnKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveAdTagDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $liveAdTagDetailsElement = new LiveAdTagDetail(); + $liveAdTagDetails = [ + $liveAdTagDetailsElement, + ]; + $expectedResponse = new ListLiveAdTagDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLiveAdTagDetails($liveAdTagDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new ListLiveAdTagDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLiveAdTagDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLiveAdTagDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveAdTagDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); + $request = (new ListLiveAdTagDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLiveAdTagDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $liveConfigsElement = new LiveConfig(); + $liveConfigs = [ + $liveConfigsElement, + ]; + $expectedResponse = new ListLiveConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLiveConfigs($liveConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLiveConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLiveConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLiveConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLiveConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListLiveConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLiveConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $slatesElement = new Slate(); + $slates = [ + $slatesElement, + ]; + $expectedResponse = new ListSlatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSlates($slates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSlatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSlates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSlates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListSlatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSlates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodAdTagDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodAdTagDetailsElement = new VodAdTagDetail(); + $vodAdTagDetails = [ + $vodAdTagDetailsElement, + ]; + $expectedResponse = new ListVodAdTagDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodAdTagDetails($vodAdTagDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodAdTagDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVodAdTagDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodAdTagDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodAdTagDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodAdTagDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVodAdTagDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodConfigsElement = new VodConfig(); + $vodConfigs = [ + $vodConfigsElement, + ]; + $expectedResponse = new ListVodConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodConfigs($vodConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVodConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVodConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListVodConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVodConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodStitchDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vodStitchDetailsElement = new VodStitchDetail(); + $vodStitchDetails = [ + $vodStitchDetailsElement, + ]; + $expectedResponse = new ListVodStitchDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVodStitchDetails($vodStitchDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodStitchDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVodStitchDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVodStitchDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVodStitchDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); + $request = (new ListVodStitchDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVodStitchDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCdnKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $cdnKey = new CdnKey(); + $updateMask = new FieldMask(); + $request = (new UpdateCdnKeyRequest()) + ->setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCdnKey($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.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); + $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 updateCdnKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateCdnKeyTest'); + $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 + $cdnKey = new CdnKey(); + $updateMask = new FieldMask(); + $request = (new UpdateCdnKeyRequest()) + ->setCdnKey($cdnKey) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateCdnKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); + 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 updateLiveConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLiveConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $defaultSlate = 'defaultSlate1316218395'; + $expectedResponse = new LiveConfig(); + $expectedResponse->setName($name); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $expectedResponse->setDefaultSlate($defaultSlate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateLiveConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $updateMask = new FieldMask(); + $request = (new UpdateLiveConfigRequest()) + ->setLiveConfig($liveConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateLiveConfig($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.video.stitcher.v1.VideoStitcherService/UpdateLiveConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getLiveConfig(); + $this->assertProtobufEquals($liveConfig, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLiveConfigTest'); + $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 updateLiveConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLiveConfigTest'); + $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 + $liveConfig = new LiveConfig(); + $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; + $liveConfig->setSourceUri($liveConfigSourceUri); + $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; + $liveConfig->setAdTracking($liveConfigAdTracking); + $updateMask = new FieldMask(); + $request = (new UpdateLiveConfigRequest()) + ->setLiveConfig($liveConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateLiveConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLiveConfigTest'); + 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 updateSlateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSlateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSlateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $slate = new Slate(); + $updateMask = new FieldMask(); + $request = (new UpdateSlateRequest()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSlate($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.video.stitcher.v1.VideoStitcherService/UpdateSlate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSlateTest'); + $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 updateSlateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSlateTest'); + $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 + $slate = new Slate(); + $updateMask = new FieldMask(); + $request = (new UpdateSlateRequest()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSlate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSlateTest'); + 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 updateVodConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVodConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceUri = 'sourceUri-1111107768'; + $adTagUri = 'adTagUri-1429194965'; + $expectedResponse = new VodConfig(); + $expectedResponse->setName($name); + $expectedResponse->setSourceUri($sourceUri); + $expectedResponse->setAdTagUri($adTagUri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVodConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $vodConfig = new VodConfig(); + $vodConfigSourceUri = 'vodConfigSourceUri538718692'; + $vodConfig->setSourceUri($vodConfigSourceUri); + $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; + $vodConfig->setAdTagUri($vodConfigAdTagUri); + $updateMask = new FieldMask(); + $request = (new UpdateVodConfigRequest()) + ->setVodConfig($vodConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVodConfig($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.video.stitcher.v1.VideoStitcherService/UpdateVodConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVodConfig(); + $this->assertProtobufEquals($vodConfig, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVodConfigTest'); + $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 updateVodConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVodConfigTest'); + $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 + $vodConfig = new VodConfig(); + $vodConfigSourceUri = 'vodConfigSourceUri538718692'; + $vodConfig->setSourceUri($vodConfigSourceUri); + $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; + $vodConfig->setAdTagUri($vodConfigAdTagUri); + $updateMask = new FieldMask(); + $request = (new UpdateVodConfigRequest()) + ->setVodConfig($vodConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVodConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVodConfigTest'); + 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 createCdnKeyAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCdnKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $expectedResponse = new CdnKey(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCdnKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cdnKey = new CdnKey(); + $cdnKeyId = 'cdnKeyId1672586061'; + $request = (new CreateCdnKeyRequest()) + ->setParent($formattedParent) + ->setCdnKey($cdnKey) + ->setCdnKeyId($cdnKeyId); + $response = $gapicClient->createCdnKeyAsync($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.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKey(); + $this->assertProtobufEquals($cdnKey, $actualValue); + $actualValue = $actualApiRequestObject->getCdnKeyId(); + $this->assertProtobufEquals($cdnKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); + $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/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..ad3639321aeeb3e3639d14c9bae7397c210b8c6c GIT binary patch literal 11097 zcmeHNOLN=S6%Hj)A`kV1Wt*m(gl3#ZZepsY^RVSO31714SQ0Bz?j+F^0}_`a5)eQD zP_~k~+bp`ubUM>+I+L0Hg8qPR`bRqLE?s2NRTrJk)wUdcXS7IQV9>Dks{*6*^cDEWFwqA-AGq?5!Kj)Jv?Z9T>K|wifLw0y&8^5bF3;p*Sjiv>=q? zbC5O-v;<%4IpfprIPJX#s=Duurr}z<`JN$lRMhoQCF^L&E1?icq_4qOb@=IdEm)B@ zpXWB8=Qf{@Y(9T*D|1C+YK{@wzcByIOY#wS1~jKtUCK{Be|h-19|%dla9O_KI_*_5 zsJ?Wp-0zbx`Ot1DvoJ+2mX2j(D@o-NBn`{y`)c1c(i3#6H2K%!lyVus?)$-m$>>1_ zQa(W*$4 z`A3|lYWeP=@?(fI*R|dB66Z<@5YRI6B&xnAc3pz09!BHzGQKuncr$qI^o1g+Zz8R7 z6)v{Np)O|Fou7azR35o3$wO^dN97=ksy7EFSIt^LfZqB4Rj-)?H>}~vCK_K z4Q@9Dlb^9eY1VTPKhVrR6DGYjaVM7R!a~F}Hx(rdKdSF+m#d9NZR>&BXcn7Qb$6># zua;};wQ6PY1tkSD_3BmyA1}t}$IkB77X6q|<{;VFEtjj+3cfh008FnJYme}HD%XSg zXeBP5m*MKbLYv!_;dMs5P}^!&cZ%g^?Qs>?z5*AA5lY2od1G-R_X#YI5|Z*NT-&ZU zYn!!?i_O~h7Vd8cH~8SAp)Jk>6nC4*QnOla;!3lSsMH$8676MT?eVw82D~^BzJy0( zt(tb5D;w_xm(Nx|wOjZb|9@7R1;D>({1h&7f0=+3 zA~j`T8H!Q&!mvUC>U?1ZgG%5?liZQ+j%9WMCxZ@kPJ>&szb%^Z>Zzg&mQl**5Me+h zM5+2xXwPzgk3$lrDB`K|4ovgN?x9Oi1lfD-?48#r6<`=oGTrc1)9`$BAR_+B*|b$8 zDf)I#*#d=`tj8=2rH88LV;t^zX(9c>7&sv6tO4^j(<%3XwMsaClbub^^Y#~=~f{t=euLk}b;N-70d2r32D z?sPonONOol`$vv>6Oj+9W-MfuqLL(_qM|ERIGHN7%FAh9J1ck#Q<|?C*f?|LCY8*{a7a-sseA~F z9^0o-siHNYpYBt9BHfHp?==KvLlP<%VJ>nls?BE*DVh6v3KC%`JHoQ)03O1Wf9Qxx zX}<7IV2US~e*suNxM(6dm1Gl2`e>-8n9uu(3DonHu6bSFFO21Z0eHTGWWobCUdVhG z1Bh-Y7Ni6DxeNyqxPOdo?Ji~?ZjkeZN9Wj21e}+$-3dS&95eShTpImES%K?~>VwVd zR#V-nu2*-eTji?SC~s6ZhfBRhm<`^1RBKShbrmiLcbe7B`Xeesw{|y6)g7$vK7iRk z6eMTmMYytA+^Vft8%?$OQGFPF1|~NiH4robQ%-C#Ec9e53+k;LEFI4dSTp;! zW3)vHo%=V|WP@QJqglsxdzvqvldie-W1#IAPov&(0?XZ{jMLpLZL;zvJA60XzKSY&l9lWzA6%zWO*@e{U3DMBb+gbNsjT#XN# zD1z}GC->_l%mi8UJ%}4UZC@C5s<3*tQA^5vjmVS-0B8ZIJDzk!NjF9X5r7l}+RPiU zyhTR9r)Oo`c6BOCn39CpQ*IYAx;*685X<}$Gc{j-Q6y&`aD)Zy0MO*m>=R4;^;F@# z@wYXS2{d5Mbh;Y1v{>dhF<1yWr-sjHD-U7fspt{E|8gTUtH@s`8&T%#378AHTGz05 zeu!xV|EfF+lZfUEW0c8(ZU`a@z+!)biSH}Uk^2*w_2m7Ha;&q;l}rU@Ly=T1eY8uT zRkLJ%Hv!2IM%jf$EihYjD$+hT&{W~>_+}Qu3G+ek{Ta+hu%tF=yJO_dKw}{&sSY8x zVJ?Ei0#O!)Z$Af{D7=jqN{fR$l2u_6Nd$I6lZ5pm4j@J(4;*mtN3|_62jD-pcbk}o z{t0klL{W^!8^Lnfh~duKB}0wrH22y7f@bY|Ix7YOzK^PyD)h`?*%_~A1t(&xtG zAhcIrtI8tgIrqv7S7igH+OF-$YHy5L*hsMij;71jbPU@b1yt8`Gr0t<(_GLqkb znLwvVfEkim`+iqK;5^&!TXNEe2?}2o>N@@^re0=gEtBcoYZIAwAuiN`AZEWqqY}wO z7gZLq+qSXw;a66%b?6BFiCp(?|}bt5>k~&-O4W@eyHh2NBZ&R_tty)oV}x=W6LFMLBaag z(fHJwl#*0lf=dJbplYV6c3e7}C-alJQ1H}0aq%7lnz8$oTJoymdTT(6O2YhQ7a1$mEoVzmM zj!}XPGWgiJI|P^c*CZ?*vg4tiJc*fei6E$n@?G2HXB|B5CVAiQc2tucFq4PQIG(J{qs?H*upMTp`xxt~ z!AKy=0{#%TG}KAlf?0YL9QlpYO3o__v-s9ps&j~@k0S*-oZ{H6BO6%c02te} z&-n<3hi5u=ic!0RQ!VNg(+bB6;`IgoiyQ?T0UU+V@l&z{kRTC|^Je}gbbr*u{;zwH zK+$)9K;2_@i3d)Til>oShT|JNF(hd=GZ@); z927AR!$P~OSr!YX7@`8fU=`fPxjvqDV3HF9%9)<#IFu#Dxycxn>HuGPe!VFWDE4^x zH3w#49!9&&^}pcplgA!Yv-bNqtl+^%%r40eFmdC@28UwEN&-%1zKLPKNaNoC_#z}U zs?+KQQy?{XNLfKXMD^|C z&{x%4d_%F^KX6bP4VQ=YgIYMcT~Q^}Ae6Q^F1vGff{zx-(`6u%Vaf5KeFkg%!Iyq0 zxzXAB@HF~%G};dH8Kvpd{D3BhhNT+^hK>_5w01rk7hOPt>n``*3_x@igl;o|S&0UL za?V_b8I5`Bt-_u0d%g%SUt}JVMmNwiA5+`Htrmf0>-WLgdWkUd4Ni{G(LIiv>^W>- zZ8NJa+rTlptq3B&iPUAg*R!qYCgL)<;xYXA#aD6ai~i)2Td3kAJK5EplYNf1DZm>1 zyS|MW4nk78+f%(m4-cR{UfZO`IX#GY%~#xBLy&XbW)xT)mVX9^qa(zZc^#HVZ6DjK zX*vFn{5?}ZjN^O2vHQFf6rN3bG=}8eg5U+~ke}mMh6i|%lfmnC&2T9UWm1r=<6k_V z)eq@G*<_lF0?zzt0#7Ew4dKK!ffXvJm&N)Rr;Y=%2^J@yj$B+8>E{CqIL8kmlC%TP zx%7=OMoa@Nh5II++H&90AinternalAddGeneratedFile( + ' +ö +/google/cloud/video/transcoder/v1/services.proto google.cloud.video.transcoder.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/video/transcoder/v1/resources.protogoogle/protobuf/empty.proto"† +CreateJobRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location7 +job ( 2%.google.cloud.video.transcoder.v1.JobBàA"• +ListJobsRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token (  +filter (  +order_by ( "D + GetJobRequest3 +name ( B%àAúA +transcoder.googleapis.com/Job"^ +DeleteJobRequest3 +name ( B%àAúA +transcoder.googleapis.com/Job + allow_missing ("u +ListJobsResponse3 +jobs ( 2%.google.cloud.video.transcoder.v1.Job +next_page_token (  + unreachable ( "½ +CreateJobTemplateRequest9 +parent ( B)àAúA# +!locations.googleapis.com/LocationH + job_template ( 2-.google.cloud.video.transcoder.v1.JobTemplateBàA +job_template_id ( BàA" +ListJobTemplatesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token (  +filter (  +order_by ( "T +GetJobTemplateRequest; +name ( B-àAúA\' +%transcoder.googleapis.com/JobTemplate"n +DeleteJobTemplateRequest; +name ( B-àAúA\' +%transcoder.googleapis.com/JobTemplate + allow_missing ("Ž +ListJobTemplatesResponseD + job_templates ( 2-.google.cloud.video.transcoder.v1.JobTemplate +next_page_token (  + unreachable ( 2’ +TranscoderServiceª + CreateJob2.google.cloud.video.transcoder.v1.CreateJobRequest%.google.cloud.video.transcoder.v1.Job"BÚA +parent,job‚Óä“/"(/v1/{parent=projects/*/locations/*}/jobs:job¬ +ListJobs1.google.cloud.video.transcoder.v1.ListJobsRequest2.google.cloud.video.transcoder.v1.ListJobsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*/locations/*}/jobs™ +GetJob/.google.cloud.video.transcoder.v1.GetJobRequest%.google.cloud.video.transcoder.v1.Job"7ÚAname‚Óä“*(/v1/{name=projects/*/locations/*/jobs/*} + DeleteJob2.google.cloud.video.transcoder.v1.DeleteJobRequest.google.protobuf.Empty"7ÚAname‚Óä“**(/v1/{name=projects/*/locations/*/jobs/*}ì +CreateJobTemplate:.google.cloud.video.transcoder.v1.CreateJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"lÚA#parent,job_template,job_template_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/jobTemplates: job_templateÌ +ListJobTemplates9.google.cloud.video.transcoder.v1.ListJobTemplatesRequest:.google.cloud.video.transcoder.v1.ListJobTemplatesResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/jobTemplates¹ +GetJobTemplate7.google.cloud.video.transcoder.v1.GetJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/jobTemplates/*}¨ +DeleteJobTemplate:.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.google.protobuf.Empty"?ÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/jobTemplates/*}MÊAtranscoder.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBê +$com.google.cloud.video.transcoder.v1B ServicesProtoPZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpbª Google.Cloud.Video.Transcoder.V1Ê Google\\Cloud\\Video\\Transcoder\\V1ê$Google::Cloud::Video::Transcoder::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php new file mode 100644 index 000000000000..9cadeb444fd8 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php @@ -0,0 +1,81 @@ +google.cloud.video.transcoder.v1.AdBreak + */ +class AdBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_time_offset + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Start time in seconds for the ad break, relative to the output file + * timeline. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php new file mode 100644 index 000000000000..7cf6be6554b6 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php @@ -0,0 +1,389 @@ +google.cloud.video.transcoder.v1.AudioStream + */ +class AudioStream extends \Google\Protobuf\Internal\Message +{ + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + */ + protected $channel_count = 0; + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + */ + private $channel_layout; + /** + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; + */ + private $mapping; + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + */ + protected $sample_rate_hertz = 0; + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 7; + */ + protected $language_code = ''; + /** + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 8; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * @type int $bitrate_bps + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * @type int $channel_count + * Number of audio channels. Must be between 1 and 6. The default is 2. + * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * @type array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * @type int $sample_rate_hertz + * The audio sample rate in Hertz. The default is 48000 Hertz. + * @type string $language_code + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * @type string $display_name + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * The codec for this audio stream. The default is `aac`. + * Supported audio codecs: + * - `aac` + * - `aac-he` + * - `aac-he-v2` + * - `mp3` + * - `ac3` + * - `eac3` + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. Audio bitrate in bits per second. Must be between 1 and + * 10,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @return int + */ + public function getChannelCount() + { + return $this->channel_count; + } + + /** + * Number of audio channels. Must be between 1 and 6. The default is 2. + * + * Generated from protobuf field int32 channel_count = 3; + * @param int $var + * @return $this + */ + public function setChannelCount($var) + { + GPBUtil::checkInt32($var); + $this->channel_count = $var; + + return $this; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelLayout() + { + return $this->channel_layout; + } + + /** + * A list of channel names specifying layout of the audio channels. + * This only affects the metadata embedded in the container headers, if + * supported by the specified format. The default is `["fl", "fr"]`. + * Supported channel names: + * - `fl` - Front left channel + * - `fr` - Front right channel + * - `sl` - Side left channel + * - `sr` - Side right channel + * - `fc` - Front center channel + * - `lfe` - Low frequency + * + * Generated from protobuf field repeated string channel_layout = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelLayout($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->channel_layout = $arr; + + return $this; + } + + /** + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; + * @param array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping::class); + $this->mapping = $arr; + + return $this; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * The audio sample rate in Hertz. The default is 48000 Hertz. + * + * Generated from protobuf field int32 sample_rate_hertz = 6; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 7; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 7; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 8; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name for this particular audio stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 8; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php new file mode 100644 index 000000000000..ee7b36b6e3d4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php @@ -0,0 +1,248 @@ +google.cloud.video.transcoder.v1.AudioStream.AudioMapping + */ +class AudioMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $atom_key = ''; + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_key = ''; + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_track = 0; + /** + * Required. The zero-based index of the channel in the input audio stream. + * + * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_channel = 0; + /** + * Required. The zero-based index of the channel in the output audio stream. + * + * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_channel = 0; + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 6; + */ + protected $gain_db = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $atom_key + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * @type string $input_key + * Required. The `Input.key` that identifies the input file. + * @type int $input_track + * Required. The zero-based index of the track in the input file. + * @type int $input_channel + * Required. The zero-based index of the channel in the input audio stream. + * @type int $output_channel + * Required. The zero-based index of the channel in the output audio stream. + * @type float $gain_db + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAtomKey() + { + return $this->atom_key; + } + + /** + * Required. The `EditAtom.key` that references the atom with audio inputs + * in the `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAtomKey($var) + { + GPBUtil::checkString($var, True); + $this->atom_key = $var; + + return $this; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputTrack() + { + return $this->input_track; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputTrack($var) + { + GPBUtil::checkInt32($var); + $this->input_track = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the input audio stream. + * + * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputChannel() + { + return $this->input_channel; + } + + /** + * Required. The zero-based index of the channel in the input audio stream. + * + * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputChannel($var) + { + GPBUtil::checkInt32($var); + $this->input_channel = $var; + + return $this; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * + * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getOutputChannel() + { + return $this->output_channel; + } + + /** + * Required. The zero-based index of the channel in the output audio stream. + * + * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setOutputChannel($var) + { + GPBUtil::checkInt32($var); + $this->output_channel = $var; + + return $this; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 6; + * @return float + */ + public function getGainDb() + { + return $this->gain_db; + } + + /** + * Audio volume control in dB. Negative values decrease volume, + * positive values increase. The default is 0. + * + * Generated from protobuf field double gain_db = 6; + * @param float $var + * @return $this + */ + public function setGainDb($var) + { + GPBUtil::checkDouble($var); + $this->gain_db = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AudioMapping::class, \Google\Cloud\Video\Transcoder\V1\AudioStream_AudioMapping::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php new file mode 100644 index 000000000000..e6d90c39b24b --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php @@ -0,0 +1,132 @@ +google.cloud.video.transcoder.v1.CreateJobRequest + */ +class CreateJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating transcoding job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job = null; + + /** + * @param string $parent Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Transcoder\V1\Job $job Required. Parameters for creating transcoding job. + * + * @return \Google\Cloud\Video\Transcoder\V1\CreateJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\Job $job): self + { + return (new self()) + ->setParent($parent) + ->setJob($job); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location to create and process this job. + * Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\Video\Transcoder\V1\Job $job + * Required. Parameters for creating transcoding job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location to create and process this job. + * 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. The parent location to create and process this job. + * 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; + } + + /** + * Required. Parameters for creating transcoding job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Transcoder\V1\Job|null + */ + public function getJob() + { + return $this->job; + } + + public function hasJob() + { + return isset($this->job); + } + + public function clearJob() + { + unset($this->job); + } + + /** + * Required. Parameters for creating transcoding job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Transcoder\V1\Job $var + * @return $this + */ + public function setJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Job::class); + $this->job = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php new file mode 100644 index 000000000000..2259a64b8917 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php @@ -0,0 +1,184 @@ +google.cloud.video.transcoder.v1.CreateJobTemplateRequest + */ +class CreateJobTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Parameters for creating job template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_template = null; + /** + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $job_template_id = ''; + + /** + * @param string $parent Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate Required. Parameters for creating job template. + * @param string $jobTemplateId Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * @return \Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate, string $jobTemplateId): self + { + return (new self()) + ->setParent($parent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location to create this job template. + * Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\Video\Transcoder\V1\JobTemplate $job_template + * Required. Parameters for creating job template. + * @type string $job_template_id + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location to create this job template. + * 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. The parent location to create this job template. + * 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; + } + + /** + * Required. Parameters for creating job template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate|null + */ + public function getJobTemplate() + { + return $this->job_template; + } + + public function hasJobTemplate() + { + return isset($this->job_template); + } + + public function clearJobTemplate() + { + unset($this->job_template); + } + + /** + * Required. Parameters for creating job template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $var + * @return $this + */ + public function setJobTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); + $this->job_template = $var; + + return $this; + } + + /** + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJobTemplateId() + { + return $this->job_template_id; + } + + /** + * Required. The ID to use for the job template, which will become the final + * component of the job template's resource name. + * This value should be 4-63 characters, and valid characters must match the + * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. + * + * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJobTemplateId($var) + { + GPBUtil::checkString($var, True); + $this->job_template_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php new file mode 100644 index 000000000000..56bf79ae59c4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php @@ -0,0 +1,124 @@ +google.cloud.video.transcoder.v1.DeleteJobRequest + */ +class DeleteJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobRequest + * + * @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 job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * @type bool $allow_missing + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * 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 job to delete. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * 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 to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the job is not found, the request will succeed but no + * action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php new file mode 100644 index 000000000000..a7db529776b4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php @@ -0,0 +1,124 @@ +google.cloud.video.transcoder.v1.DeleteJobTemplateRequest + */ +class DeleteJobTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest + * + * @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 job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * @type bool $allow_missing + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * 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 job template to delete. + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * 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 to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If set to true, and the job template is not found, the request will succeed + * but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php new file mode 100644 index 000000000000..42921c0de759 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php @@ -0,0 +1,209 @@ +google.cloud.video.transcoder.v1.EditAtom + */ +class EditAtom extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this atom. Must be specified when using advanced + * mapping. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * + * Generated from protobuf field repeated string inputs = 2; + */ + private $inputs; + /** + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + */ + protected $end_time_offset = null; + /** + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this atom. Must be specified when using advanced + * mapping. + * @type array|\Google\Protobuf\Internal\RepeatedField $inputs + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * @type \Google\Protobuf\Duration $end_time_offset + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * @type \Google\Protobuf\Duration $start_time_offset + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this atom. Must be specified when using advanced + * mapping. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this atom. Must be specified when using advanced + * mapping. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * + * Generated from protobuf field repeated string inputs = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * List of `Input.key`s identifying files that should be used in this atom. + * The listed `inputs` must have the same timeline. + * + * Generated from protobuf field repeated string inputs = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->inputs = $arr; + + return $this; + } + + /** + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * End time in seconds for the atom, relative to the input file timeline. + * When `end_time_offset` is not specified, the `inputs` are used until + * the end of the atom. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + + /** + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Start time in seconds for the atom, relative to the input file timeline. + * The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php new file mode 100644 index 000000000000..6660485d8e24 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php @@ -0,0 +1,177 @@ +google.cloud.video.transcoder.v1.ElementaryStream + */ +class ElementaryStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + */ + protected $key = ''; + protected $elementary_stream; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this elementary stream. + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream $video_stream + * Encoding of a video stream. + * @type \Google\Cloud\Video\Transcoder\V1\AudioStream $audio_stream + * Encoding of an audio stream. + * @type \Google\Cloud\Video\Transcoder\V1\TextStream $text_stream + * Encoding of a text stream. For example, closed captions or subtitles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this elementary stream. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream|null + */ + public function getVideoStream() + { + return $this->readOneof(1); + } + + public function hasVideoStream() + { + return $this->hasOneof(1); + } + + /** + * Encoding of a video stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream $var + * @return $this + */ + public function setVideoStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; + * @return \Google\Cloud\Video\Transcoder\V1\AudioStream|null + */ + public function getAudioStream() + { + return $this->readOneof(2); + } + + public function hasAudioStream() + { + return $this->hasOneof(2); + } + + /** + * Encoding of an audio stream. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; + * @param \Google\Cloud\Video\Transcoder\V1\AudioStream $var + * @return $this + */ + public function setAudioStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\AudioStream::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; + * @return \Google\Cloud\Video\Transcoder\V1\TextStream|null + */ + public function getTextStream() + { + return $this->readOneof(3); + } + + public function hasTextStream() + { + return $this->hasOneof(3); + } + + /** + * Encoding of a text stream. For example, closed captions or subtitles. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; + * @param \Google\Cloud\Video\Transcoder\V1\TextStream $var + * @return $this + */ + public function setTextStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\TextStream::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getElementaryStream() + { + return $this->whichOneof("elementary_stream"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php new file mode 100644 index 000000000000..a9d3c1ca80e5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php @@ -0,0 +1,265 @@ +google.cloud.video.transcoder.v1.Encryption + */ +class Encryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier for this set of encryption options. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Required. DRM system(s) to use; at least one must be specified. If a + * DRM system is omitted, it is considered disabled. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.DrmSystems drm_systems = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $drm_systems = null; + protected $encryption_mode; + protected $secret_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. Identifier for this set of encryption options. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption $aes_128 + * Configuration for AES-128 encryption. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption $sample_aes + * Configuration for SAMPLE-AES encryption. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption $mpeg_cenc + * Configuration for MPEG Common Encryption (MPEG-CENC). + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource $secret_manager_key_source + * Keys are stored in Google Secret Manager. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems $drm_systems + * Required. DRM system(s) to use; at least one must be specified. If a + * DRM system is omitted, it is considered disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier for this set of encryption options. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. Identifier for this set of encryption options. + * + * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Configuration for AES-128 encryption. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Aes128Encryption aes_128 = 3; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption|null + */ + public function getAes128() + { + return $this->readOneof(3); + } + + public function hasAes128() + { + return $this->hasOneof(3); + } + + /** + * Configuration for AES-128 encryption. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Aes128Encryption aes_128 = 3; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption $var + * @return $this + */ + public function setAes128($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Configuration for SAMPLE-AES encryption. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption sample_aes = 4; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption|null + */ + public function getSampleAes() + { + return $this->readOneof(4); + } + + public function hasSampleAes() + { + return $this->hasOneof(4); + } + + /** + * Configuration for SAMPLE-AES encryption. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption sample_aes = 4; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption $var + * @return $this + */ + public function setSampleAes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Configuration for MPEG Common Encryption (MPEG-CENC). + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption mpeg_cenc = 5; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption|null + */ + public function getMpegCenc() + { + return $this->readOneof(5); + } + + public function hasMpegCenc() + { + return $this->hasOneof(5); + } + + /** + * Configuration for MPEG Common Encryption (MPEG-CENC). + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption mpeg_cenc = 5; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption $var + * @return $this + */ + public function setMpegCenc($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Keys are stored in Google Secret Manager. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource|null + */ + public function getSecretManagerKeySource() + { + return $this->readOneof(7); + } + + public function hasSecretManagerKeySource() + { + return $this->hasOneof(7); + } + + /** + * Keys are stored in Google Secret Manager. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource $var + * @return $this + */ + public function setSecretManagerKeySource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Required. DRM system(s) to use; at least one must be specified. If a + * DRM system is omitted, it is considered disabled. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.DrmSystems drm_systems = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems|null + */ + public function getDrmSystems() + { + return $this->drm_systems; + } + + public function hasDrmSystems() + { + return isset($this->drm_systems); + } + + public function clearDrmSystems() + { + unset($this->drm_systems); + } + + /** + * Required. DRM system(s) to use; at least one must be specified. If a + * DRM system is omitted, it is considered disabled. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.DrmSystems drm_systems = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems $var + * @return $this + */ + public function setDrmSystems($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems::class); + $this->drm_systems = $var; + + return $this; + } + + /** + * @return string + */ + public function getEncryptionMode() + { + return $this->whichOneof("encryption_mode"); + } + + /** + * @return string + */ + public function getSecretSource() + { + return $this->whichOneof("secret_source"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php new file mode 100644 index 000000000000..87e9b575234a --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php @@ -0,0 +1,36 @@ +google.cloud.video.transcoder.v1.Encryption.Aes128Encryption + */ +class Aes128Encryption extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aes128Encryption::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Aes128Encryption::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php new file mode 100644 index 000000000000..d201d844ac9f --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php @@ -0,0 +1,36 @@ +google.cloud.video.transcoder.v1.Encryption.Clearkey + */ +class Clearkey extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Clearkey::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Clearkey::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php new file mode 100644 index 000000000000..715c3f2c0fbd --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php @@ -0,0 +1,212 @@ +google.cloud.video.transcoder.v1.Encryption.DrmSystems + */ +class DrmSystems extends \Google\Protobuf\Internal\Message +{ + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Widevine widevine = 1; + */ + protected $widevine = null; + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Fairplay fairplay = 2; + */ + protected $fairplay = null; + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Playready playready = 3; + */ + protected $playready = null; + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Clearkey clearkey = 4; + */ + protected $clearkey = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine $widevine + * Widevine configuration. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay $fairplay + * Fairplay configuration. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Playready $playready + * Playready configuration. + * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey $clearkey + * Clearkey configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Widevine widevine = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine|null + */ + public function getWidevine() + { + return $this->widevine; + } + + public function hasWidevine() + { + return isset($this->widevine); + } + + public function clearWidevine() + { + unset($this->widevine); + } + + /** + * Widevine configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Widevine widevine = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine $var + * @return $this + */ + public function setWidevine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine::class); + $this->widevine = $var; + + return $this; + } + + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Fairplay fairplay = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay|null + */ + public function getFairplay() + { + return $this->fairplay; + } + + public function hasFairplay() + { + return isset($this->fairplay); + } + + public function clearFairplay() + { + unset($this->fairplay); + } + + /** + * Fairplay configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Fairplay fairplay = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay $var + * @return $this + */ + public function setFairplay($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay::class); + $this->fairplay = $var; + + return $this; + } + + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Playready playready = 3; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Playready|null + */ + public function getPlayready() + { + return $this->playready; + } + + public function hasPlayready() + { + return isset($this->playready); + } + + public function clearPlayready() + { + unset($this->playready); + } + + /** + * Playready configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Playready playready = 3; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Playready $var + * @return $this + */ + public function setPlayready($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Playready::class); + $this->playready = $var; + + return $this; + } + + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Clearkey clearkey = 4; + * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey|null + */ + public function getClearkey() + { + return $this->clearkey; + } + + public function hasClearkey() + { + return isset($this->clearkey); + } + + public function clearClearkey() + { + unset($this->clearkey); + } + + /** + * Clearkey configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Clearkey clearkey = 4; + * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey $var + * @return $this + */ + public function setClearkey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey::class); + $this->clearkey = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DrmSystems::class, \Google\Cloud\Video\Transcoder\V1\Encryption_DrmSystems::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php new file mode 100644 index 000000000000..adf6d5cfd6d0 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php @@ -0,0 +1,36 @@ +google.cloud.video.transcoder.v1.Encryption.Fairplay + */ +class Fairplay extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Fairplay::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Fairplay::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php new file mode 100644 index 000000000000..5c7b5bc1f8e1 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php @@ -0,0 +1,82 @@ +google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption + */ +class MpegCommonEncryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specify the encryption scheme. + * Supported encryption schemes: + * - `cenc` + * - `cbcs` + * + * Generated from protobuf field string scheme = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scheme = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $scheme + * Required. Specify the encryption scheme. + * Supported encryption schemes: + * - `cenc` + * - `cbcs` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specify the encryption scheme. + * Supported encryption schemes: + * - `cenc` + * - `cbcs` + * + * Generated from protobuf field string scheme = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScheme() + { + return $this->scheme; + } + + /** + * Required. Specify the encryption scheme. + * Supported encryption schemes: + * - `cenc` + * - `cbcs` + * + * Generated from protobuf field string scheme = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScheme($var) + { + GPBUtil::checkString($var, True); + $this->scheme = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MpegCommonEncryption::class, \Google\Cloud\Video\Transcoder\V1\Encryption_MpegCommonEncryption::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php new file mode 100644 index 000000000000..9d8b238fee1b --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php @@ -0,0 +1,36 @@ +google.cloud.video.transcoder.v1.Encryption.Playready + */ +class Playready extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Playready::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Playready::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php new file mode 100644 index 000000000000..1556a0bebecd --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php @@ -0,0 +1,36 @@ +google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption + */ +class SampleAesEncryption extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SampleAesEncryption::class, \Google\Cloud\Video\Transcoder\V1\Encryption_SampleAesEncryption::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php new file mode 100644 index 000000000000..9d166b65d382 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php @@ -0,0 +1,86 @@ +google.cloud.video.transcoder.v1.Encryption.SecretManagerSource + */ +class SecretManagerSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Secret Version containing the encryption key in + * the following format: + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * Note that only numbered versions are supported. Aliases like "latest" are + * not supported. + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $secret_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $secret_version + * Required. The name of the Secret Version containing the encryption key in + * the following format: + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * Note that only numbered versions are supported. Aliases like "latest" are + * not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Secret Version containing the encryption key in + * the following format: + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * Note that only numbered versions are supported. Aliases like "latest" are + * not supported. + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSecretVersion() + { + return $this->secret_version; + } + + /** + * Required. The name of the Secret Version containing the encryption key in + * the following format: + * `projects/{project}/secrets/{secret_id}/versions/{version_number}` + * Note that only numbered versions are supported. Aliases like "latest" are + * not supported. + * + * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSecretVersion($var) + { + GPBUtil::checkString($var, True); + $this->secret_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecretManagerSource::class, \Google\Cloud\Video\Transcoder\V1\Encryption_SecretManagerSource::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php new file mode 100644 index 000000000000..86155a0cd357 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php @@ -0,0 +1,36 @@ +google.cloud.video.transcoder.v1.Encryption.Widevine + */ +class Widevine extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Widevine::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Widevine::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php new file mode 100644 index 000000000000..d84bf513d425 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php @@ -0,0 +1,86 @@ +google.cloud.video.transcoder.v1.GetJobRequest + */ +class GetJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * 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 job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\GetJobRequest + * + * @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 job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * 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 job to retrieve. + * Format: `projects/{project}/locations/{location}/jobs/{job}` + * + * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php new file mode 100644 index 000000000000..e9a034eaf217 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php @@ -0,0 +1,91 @@ +google.cloud.video.transcoder.v1.GetJobTemplateRequest + */ +class GetJobTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * 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 job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest + * + * @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 job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * 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 job template to retrieve. + * Format: + * `projects/{project}/locations/{location}/jobTemplates/{job_template}` + * + * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php new file mode 100644 index 000000000000..3c19c7ccc6a5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php @@ -0,0 +1,165 @@ +google.cloud.video.transcoder.v1.Input + */ +class Input extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; + */ + protected $preprocessing_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * @type string $uri + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $preprocessing_config + * Preprocessing configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this input. Must be specified when using advanced + * mapping and edit lists. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of the media. Input files must be at least 5 seconds in duration and + * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). + * If empty, the value is populated from `Job.input_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * 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; + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig|null + */ + public function getPreprocessingConfig() + { + return $this->preprocessing_config; + } + + public function hasPreprocessingConfig() + { + return isset($this->preprocessing_config); + } + + public function clearPreprocessingConfig() + { + unset($this->preprocessing_config); + } + + /** + * Preprocessing configurations. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $var + * @return $this + */ + public function setPreprocessingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig::class); + $this->preprocessing_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php new file mode 100644 index 000000000000..b4d69eee8832 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php @@ -0,0 +1,672 @@ +google.cloud.video.transcoder.v1.Job + */ +class Job extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $input_uri = ''; + /** + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $output_uri = ''; + /** + * Output only. The current state of the job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the transcoding started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the transcoding finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * + * Generated from protobuf field int32 ttl_after_completion_days = 15; + */ + protected $ttl_after_completion_days = 0; + /** + * The labels associated with this job. You can use these to organize and + * group your jobs. + * + * Generated from protobuf field map labels = 16; + */ + private $labels; + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; + */ + protected $mode = 0; + /** + * The processing priority of a batch job. + * This field can only be set for batch mode jobs. The default value is 0. + * This value cannot be negative. Higher values correspond to higher + * priorities for the job. + * + * Generated from protobuf field int32 batch_mode_priority = 21; + */ + protected $batch_mode_priority = 0; + /** + * Optional. The optimization strategy of the job. The default is + * `AUTODETECT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $optimization = 0; + protected $job_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * @type string $input_uri + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * @type string $output_uri + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * @type string $template_id + * Input only. Specify the `template_id` to use for populating `Job.config`. + * The default is `preset/web-hd`, which is the only supported preset. + * User defined JobTemplate: `{job_template_id}` + * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config + * The configuration for this job. + * @type int $state + * Output only. The current state of the job. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the job was created. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the transcoding started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the transcoding finished. + * @type int $ttl_after_completion_days + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this job. You can use these to organize and + * group your jobs. + * @type \Google\Rpc\Status $error + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * @type int $mode + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * @type int $batch_mode_priority + * The processing priority of a batch job. + * This field can only be set for batch mode jobs. The default value is 0. + * This value cannot be negative. Higher values correspond to higher + * priorities for the job. + * @type int $optimization + * Optional. The optimization strategy of the job. The default is + * `AUTODETECT`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the job. + * Format: `projects/{project_number}/locations/{location}/jobs/{job}` + * + * 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; + } + + /** + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getInputUri() + { + return $this->input_uri; + } + + /** + * Input only. Specify the `input_uri` to populate empty `uri` fields in each + * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using + * template. URI of the media. Input files must be at least 5 seconds in + * duration and stored in Cloud Storage (for example, + * `gs://bucket/inputs/file.mp4`). See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInputUri($var) + { + GPBUtil::checkString($var, True); + $this->input_uri = $var; + + return $this; + } + + /** + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getOutputUri() + { + return $this->output_uri; + } + + /** + * Input only. Specify the `output_uri` to populate an empty + * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using + * template. URI for the output file(s). For example, + * `gs://my-bucket/outputs/`. See [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOutputUri($var) + { + GPBUtil::checkString($var, True); + $this->output_uri = $var; + + return $this; + } + + /** + * Input only. Specify the `template_id` to use for populating `Job.config`. + * The default is `preset/web-hd`, which is the only supported preset. + * User defined JobTemplate: `{job_template_id}` + * + * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getTemplateId() + { + return $this->readOneof(4); + } + + public function hasTemplateId() + { + return $this->hasOneof(4); + } + + /** + * Input only. Specify the `template_id` to use for populating `Job.config`. + * The default is `preset/web-hd`, which is the only supported preset. + * User defined JobTemplate: `{job_template_id}` + * + * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTemplateId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The configuration for this job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; + * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null + */ + public function getConfig() + { + return $this->readOneof(5); + } + + public function hasConfig() + { + return $this->hasOneof(5); + } + + /** + * The configuration for this job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; + * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. The current state of the job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the job. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.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 job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.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 transcoding started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time the transcoding started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time the transcoding finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.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 transcoding finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.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; + } + + /** + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * + * Generated from protobuf field int32 ttl_after_completion_days = 15; + * @return int + */ + public function getTtlAfterCompletionDays() + { + return $this->ttl_after_completion_days; + } + + /** + * Job time to live value in days, which will be effective after job + * completion. Job should be deleted automatically after the given TTL. Enter + * a value between 1 and 90. The default is 30. + * + * Generated from protobuf field int32 ttl_after_completion_days = 15; + * @param int $var + * @return $this + */ + public function setTtlAfterCompletionDays($var) + { + GPBUtil::checkInt32($var); + $this->ttl_after_completion_days = $var; + + return $this; + } + + /** + * The labels associated with this job. You can use these to organize and + * group your jobs. + * + * Generated from protobuf field map labels = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this job. You can use these to organize and + * group your jobs. + * + * Generated from protobuf field map labels = 16; + * @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. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. An error object that describes the reason for the failure. + * This property is always present when `state` is `FAILED`. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * The processing mode of the job. + * The default is `PROCESSING_MODE_INTERACTIVE`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingMode::class); + $this->mode = $var; + + return $this; + } + + /** + * The processing priority of a batch job. + * This field can only be set for batch mode jobs. The default value is 0. + * This value cannot be negative. Higher values correspond to higher + * priorities for the job. + * + * Generated from protobuf field int32 batch_mode_priority = 21; + * @return int + */ + public function getBatchModePriority() + { + return $this->batch_mode_priority; + } + + /** + * The processing priority of a batch job. + * This field can only be set for batch mode jobs. The default value is 0. + * This value cannot be negative. Higher values correspond to higher + * priorities for the job. + * + * Generated from protobuf field int32 batch_mode_priority = 21; + * @param int $var + * @return $this + */ + public function setBatchModePriority($var) + { + GPBUtil::checkInt32($var); + $this->batch_mode_priority = $var; + + return $this; + } + + /** + * Optional. The optimization strategy of the job. The default is + * `AUTODETECT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOptimization() + { + return $this->optimization; + } + + /** + * Optional. The optimization strategy of the job. The default is + * `AUTODETECT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOptimization($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\OptimizationStrategy::class); + $this->optimization = $var; + + return $this; + } + + /** + * @return string + */ + public function getJobConfig() + { + return $this->whichOneof("job_config"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php new file mode 100644 index 000000000000..6a0e492447cd --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php @@ -0,0 +1,64 @@ +google.cloud.video.transcoder.v1.Job.OptimizationStrategy + */ +class OptimizationStrategy +{ + /** + * The optimization strategy is not specified. + * + * Generated from protobuf enum OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + */ + const OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + /** + * Prioritize job processing speed. + * + * Generated from protobuf enum AUTODETECT = 1; + */ + const AUTODETECT = 1; + /** + * Disable all optimizations. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::OPTIMIZATION_STRATEGY_UNSPECIFIED => 'OPTIMIZATION_STRATEGY_UNSPECIFIED', + self::AUTODETECT => 'AUTODETECT', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OptimizationStrategy::class, \Google\Cloud\Video\Transcoder\V1\Job_OptimizationStrategy::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php new file mode 100644 index 000000000000..4ada220e2b33 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php @@ -0,0 +1,67 @@ +google.cloud.video.transcoder.v1.Job.ProcessingMode + */ +class ProcessingMode +{ + /** + * The job processing mode is not specified. + * + * Generated from protobuf enum PROCESSING_MODE_UNSPECIFIED = 0; + */ + const PROCESSING_MODE_UNSPECIFIED = 0; + /** + * The job processing mode is interactive mode. + * Interactive job will either be ran or rejected if quota does not allow + * for it. + * + * Generated from protobuf enum PROCESSING_MODE_INTERACTIVE = 1; + */ + const PROCESSING_MODE_INTERACTIVE = 1; + /** + * The job processing mode is batch mode. + * Batch mode allows queuing of jobs. + * + * Generated from protobuf enum PROCESSING_MODE_BATCH = 2; + */ + const PROCESSING_MODE_BATCH = 2; + + private static $valueToName = [ + self::PROCESSING_MODE_UNSPECIFIED => 'PROCESSING_MODE_UNSPECIFIED', + self::PROCESSING_MODE_INTERACTIVE => 'PROCESSING_MODE_INTERACTIVE', + self::PROCESSING_MODE_BATCH => 'PROCESSING_MODE_BATCH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProcessingMode::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingMode::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php new file mode 100644 index 000000000000..28e9b85c5afc --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php @@ -0,0 +1,79 @@ +google.cloud.video.transcoder.v1.Job.ProcessingState + */ +class ProcessingState +{ + /** + * The processing state is not specified. + * + * Generated from protobuf enum PROCESSING_STATE_UNSPECIFIED = 0; + */ + const PROCESSING_STATE_UNSPECIFIED = 0; + /** + * The job is enqueued and will be picked up for processing soon. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The job is being processed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The job has been completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The job has failed. For additional information, see `failure_reason` and + * `failure_details` + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::PROCESSING_STATE_UNSPECIFIED => 'PROCESSING_STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProcessingState::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingState::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php new file mode 100644 index 000000000000..70d6c9f15aa5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php @@ -0,0 +1,451 @@ +google.cloud.video.transcoder.v1.JobConfig + */ +class JobConfig extends \Google\Protobuf\Internal\Message +{ + /** + * List of input assets stored in Cloud Storage. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; + */ + private $inputs; + /** + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; + */ + private $edit_list; + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; + */ + private $elementary_streams; + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; + */ + private $mux_streams; + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; + */ + private $manifests; + /** + * Output configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; + */ + protected $output = null; + /** + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; + */ + private $ad_breaks; + /** + * Destination on Pub/Sub. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; + */ + protected $pubsub_destination = null; + /** + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; + */ + private $sprite_sheets; + /** + * List of overlays on the output video, in descending Z-order. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; + */ + private $overlays; + /** + * List of encryption configurations for the content. + * Each configuration has an ID. Specify this ID in the + * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] + * field to indicate the configuration to use for that `MuxStream` output. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Encryption encryptions = 11; + */ + private $encryptions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs + * List of input assets stored in Cloud Storage. + * @type array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $edit_list + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * @type array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of elementary streams. + * @type array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams + * List of multiplexing settings for output streams. + * @type array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests + * List of output manifests. + * @type \Google\Cloud\Video\Transcoder\V1\Output $output + * Output configuration. + * @type array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * @type \Google\Cloud\Video\Transcoder\V1\PubsubDestination $pubsub_destination + * Destination on Pub/Sub. + * @type array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $overlays + * List of overlays on the output video, in descending Z-order. + * @type array<\Google\Cloud\Video\Transcoder\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $encryptions + * List of encryption configurations for the content. + * Each configuration has an ID. Specify this ID in the + * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] + * field to indicate the configuration to use for that `MuxStream` output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * List of input assets stored in Cloud Storage. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * List of input assets stored in Cloud Storage. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; + * @param array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Input::class); + $this->inputs = $arr; + + return $this; + } + + /** + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEditList() + { + return $this->edit_list; + } + + /** + * List of `Edit atom`s. Defines the ultimate timeline of the resulting + * file or manifest. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; + * @param array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEditList($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\EditAtom::class); + $this->edit_list = $arr; + + return $this; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of elementary streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; + * @param array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\ElementaryStream::class); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * List of multiplexing settings for output streams. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; + * @param array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\MuxStream::class); + $this->mux_streams = $arr; + + return $this; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManifests() + { + return $this->manifests; + } + + /** + * List of output manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; + * @param array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManifests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Manifest::class); + $this->manifests = $arr; + + return $this; + } + + /** + * Output configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; + * @return \Google\Cloud\Video\Transcoder\V1\Output|null + */ + public function getOutput() + { + return $this->output; + } + + public function hasOutput() + { + return isset($this->output); + } + + public function clearOutput() + { + unset($this->output); + } + + /** + * Output configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; + * @param \Google\Cloud\Video\Transcoder\V1\Output $var + * @return $this + */ + public function setOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Output::class); + $this->output = $var; + + return $this; + } + + /** + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdBreaks() + { + return $this->ad_breaks; + } + + /** + * List of ad breaks. Specifies where to insert ad break tags in the output + * manifests. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; + * @param array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AdBreak::class); + $this->ad_breaks = $arr; + + return $this; + } + + /** + * Destination on Pub/Sub. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; + * @return \Google\Cloud\Video\Transcoder\V1\PubsubDestination|null + */ + public function getPubsubDestination() + { + return $this->pubsub_destination; + } + + public function hasPubsubDestination() + { + return isset($this->pubsub_destination); + } + + public function clearPubsubDestination() + { + unset($this->pubsub_destination); + } + + /** + * Destination on Pub/Sub. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; + * @param \Google\Cloud\Video\Transcoder\V1\PubsubDestination $var + * @return $this + */ + public function setPubsubDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PubsubDestination::class); + $this->pubsub_destination = $var; + + return $this; + } + + /** + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpriteSheets() + { + return $this->sprite_sheets; + } + + /** + * List of output sprite sheets. + * Spritesheets require at least one VideoStream in the Jobconfig. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; + * @param array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpriteSheets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\SpriteSheet::class); + $this->sprite_sheets = $arr; + + return $this; + } + + /** + * List of overlays on the output video, in descending Z-order. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOverlays() + { + return $this->overlays; + } + + /** + * List of overlays on the output video, in descending Z-order. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; + * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOverlays($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay::class); + $this->overlays = $arr; + + return $this; + } + + /** + * List of encryption configurations for the content. + * Each configuration has an ID. Specify this ID in the + * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] + * field to indicate the configuration to use for that `MuxStream` output. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Encryption encryptions = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEncryptions() + { + return $this->encryptions; + } + + /** + * List of encryption configurations for the content. + * Each configuration has an ID. Specify this ID in the + * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] + * field to indicate the configuration to use for that `MuxStream` output. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Encryption encryptions = 11; + * @param array<\Google\Cloud\Video\Transcoder\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEncryptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Encryption::class); + $this->encryptions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php new file mode 100644 index 000000000000..1cf56319089e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php @@ -0,0 +1,157 @@ +google.cloud.video.transcoder.v1.JobTemplate + */ +class JobTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The configuration for this template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; + */ + protected $config = null; + /** + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config + * The configuration for this template. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the job template. + * Format: + * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` + * + * 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 configuration for this template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; + * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * The configuration for this template. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; + * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); + $this->config = $var; + + return $this; + } + + /** + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels associated with this job template. You can use these to organize + * and group your job templates. + * + * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php new file mode 100644 index 000000000000..9a3f102490be --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php @@ -0,0 +1,234 @@ +google.cloud.video.transcoder.v1.ListJobTemplatesRequest + */ +class ListJobTemplatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest + * + * @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 location from which to retrieve the collection of job + * templates. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The `next_page_token` value returned from a previous List request, if + * any. + * @type string $filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $order_by + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location from which to retrieve the collection of job + * templates. 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. The parent location from which to retrieve the collection of job + * templates. 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; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * 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 expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * 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; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php new file mode 100644 index 000000000000..3162f2362bd5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.transcoder.v1.ListJobTemplatesResponse + */ +class ListJobTemplatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of job templates in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; + */ + private $job_templates; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of regions 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 array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $job_templates + * List of job templates in the specified region. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of regions that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * List of job templates in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobTemplates() + { + return $this->job_templates; + } + + /** + * List of job templates in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; + * @param array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); + $this->job_templates = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php new file mode 100644 index 000000000000..62bf0d1d56a7 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php @@ -0,0 +1,230 @@ +google.cloud.video.transcoder.v1.ListJobsRequest + */ +class ListJobsRequest 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 = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Format: `projects/{project}/locations/{location}` + * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Video\Transcoder\V1\ListJobsRequest + * + * @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 + * The maximum number of items to return. + * @type string $page_token + * The `next_page_token` value returned from a previous List request, if + * any. + * @type string $filter + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * @type string $order_by + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::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; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items 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; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous List request, if + * any. + * + * 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 expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter expression, following the syntax outlined in + * https://google.aip.dev/160. + * + * 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; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * + * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php new file mode 100644 index 000000000000..0049a9825e28 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php @@ -0,0 +1,135 @@ +google.cloud.video.transcoder.v1.ListJobsResponse + */ +class ListJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of jobs in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; + */ + private $jobs; + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * List of regions 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 array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs + * List of jobs in the specified region. + * @type string $next_page_token + * The pagination token. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * List of regions that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); + parent::__construct($data); + } + + /** + * List of jobs in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobs() + { + return $this->jobs; + } + + /** + * List of jobs in the specified region. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; + * @param array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Job::class); + $this->jobs = $arr; + + return $this; + } + + /** + * The pagination token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination 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; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of regions that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php new file mode 100644 index 000000000000..875edbe8fd45 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php @@ -0,0 +1,197 @@ +google.cloud.video.transcoder.v1.Manifest + */ +class Manifest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * + * Generated from protobuf field string file_name = 1; + */ + protected $file_name = ''; + /** + * Required. Type of the manifest. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $mux_streams; + protected $manifest_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_name + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * @type int $type + * Required. Type of the manifest. + * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * @type \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig $dash + * `DASH` manifest configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * + * Generated from protobuf field string file_name = 1; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the generated file. The default is `manifest` with the + * extension suffix corresponding to the `Manifest.type`. + * + * Generated from protobuf field string file_name = 1; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * Required. Type of the manifest. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of the manifest. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Manifest\ManifestType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMuxStreams() + { + return $this->mux_streams; + } + + /** + * Required. List of user given `MuxStream.key`s that should appear in this + * manifest. + * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` + * and `.m3u8` extension is generated for each element of the + * `Manifest.mux_streams`. + * + * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMuxStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mux_streams = $arr; + + return $this; + } + + /** + * `DASH` manifest configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig dash = 4; + * @return \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig|null + */ + public function getDash() + { + return $this->readOneof(4); + } + + public function hasDash() + { + return $this->hasOneof(4); + } + + /** + * `DASH` manifest configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig dash = 4; + * @param \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig $var + * @return $this + */ + public function setDash($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getManifestConfig() + { + return $this->whichOneof("manifest_config"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php new file mode 100644 index 000000000000..6feafae25d7d --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php @@ -0,0 +1,74 @@ +google.cloud.video.transcoder.v1.Manifest.DashConfig + */ +class DashConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The segment reference scheme for a `DASH` manifest. The default is + * `SEGMENT_LIST`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme segment_reference_scheme = 1; + */ + protected $segment_reference_scheme = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $segment_reference_scheme + * The segment reference scheme for a `DASH` manifest. The default is + * `SEGMENT_LIST`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The segment reference scheme for a `DASH` manifest. The default is + * `SEGMENT_LIST`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme segment_reference_scheme = 1; + * @return int + */ + public function getSegmentReferenceScheme() + { + return $this->segment_reference_scheme; + } + + /** + * The segment reference scheme for a `DASH` manifest. The default is + * `SEGMENT_LIST`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme segment_reference_scheme = 1; + * @param int $var + * @return $this + */ + public function setSegmentReferenceScheme($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig\SegmentReferenceScheme::class); + $this->segment_reference_scheme = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DashConfig::class, \Google\Cloud\Video\Transcoder\V1\Manifest_DashConfig::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php new file mode 100644 index 000000000000..2f5d2d255be0 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php @@ -0,0 +1,64 @@ +google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme + */ +class SegmentReferenceScheme +{ + /** + * The segment reference scheme is not specified. + * + * Generated from protobuf enum SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0; + */ + const SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0; + /** + * Lists the URLs of media files for each segment. + * + * Generated from protobuf enum SEGMENT_LIST = 1; + */ + const SEGMENT_LIST = 1; + /** + * Lists each segment from a template with $Number$ variable. + * + * Generated from protobuf enum SEGMENT_TEMPLATE_NUMBER = 2; + */ + const SEGMENT_TEMPLATE_NUMBER = 2; + + private static $valueToName = [ + self::SEGMENT_REFERENCE_SCHEME_UNSPECIFIED => 'SEGMENT_REFERENCE_SCHEME_UNSPECIFIED', + self::SEGMENT_LIST => 'SEGMENT_LIST', + self::SEGMENT_TEMPLATE_NUMBER => 'SEGMENT_TEMPLATE_NUMBER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SegmentReferenceScheme::class, \Google\Cloud\Video\Transcoder\V1\Manifest_DashConfig_SegmentReferenceScheme::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php new file mode 100644 index 000000000000..6b4b08cef48b --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php @@ -0,0 +1,64 @@ +google.cloud.video.transcoder.v1.Manifest.ManifestType + */ +class ManifestType +{ + /** + * The manifest type is not specified. + * + * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; + */ + const MANIFEST_TYPE_UNSPECIFIED = 0; + /** + * Create an HLS manifest. The corresponding file extension is `.m3u8`. + * + * Generated from protobuf enum HLS = 1; + */ + const HLS = 1; + /** + * Create an MPEG-DASH manifest. The corresponding file extension is `.mpd`. + * + * Generated from protobuf enum DASH = 2; + */ + const DASH = 2; + + private static $valueToName = [ + self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', + self::HLS => 'HLS', + self::DASH => 'DASH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManifestType::class, \Google\Cloud\Video\Transcoder\V1\Manifest_ManifestType::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php new file mode 100644 index 000000000000..fbd5e7f4e19d --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php @@ -0,0 +1,299 @@ +google.cloud.video.transcoder.v1.MuxStream + */ +class MuxStream extends \Google\Protobuf\Internal\Message +{ + /** + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * + * Generated from protobuf field string file_name = 2; + */ + protected $file_name = ''; + /** + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * + * Generated from protobuf field string container = 3; + */ + protected $container = ''; + /** + * List of `ElementaryStream.key`s multiplexed in this stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + */ + private $elementary_streams; + /** + * Segment settings for `ts`, `fmp4` and `vtt`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; + */ + protected $segment_settings = null; + /** + * Identifier of the encryption configuration to use. If omitted, output will + * be unencrypted. + * + * Generated from protobuf field string encryption_id = 7; + */ + protected $encryption_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * @type string $file_name + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * @type string $container + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams + * List of `ElementaryStream.key`s multiplexed in this stream. + * @type \Google\Cloud\Video\Transcoder\V1\SegmentSettings $segment_settings + * Segment settings for `ts`, `fmp4` and `vtt`. + * @type string $encryption_id + * Identifier of the encryption configuration to use. If omitted, output will + * be unencrypted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * A unique key for this multiplexed stream. HLS media manifests will be + * named `MuxStream.key` with the `.m3u8` extension suffix. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * + * Generated from protobuf field string file_name = 2; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the generated file. The default is `MuxStream.key` with the + * extension suffix corresponding to the `MuxStream.container`. + * Individual segments also have an incremental 10-digit zero-padded suffix + * starting from 0 before the extension, such as `mux_stream0000000123.ts`. + * + * Generated from protobuf field string file_name = 2; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * + * Generated from protobuf field string container = 3; + * @return string + */ + public function getContainer() + { + return $this->container; + } + + /** + * The container format. The default is `mp4` + * Supported container formats: + * - `ts` + * - `fmp4`- the corresponding file extension is `.m4s` + * - `mp4` + * - `vtt` + * See also: + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) + * + * Generated from protobuf field string container = 3; + * @param string $var + * @return $this + */ + public function setContainer($var) + { + GPBUtil::checkString($var, True); + $this->container = $var; + + return $this; + } + + /** + * List of `ElementaryStream.key`s multiplexed in this stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getElementaryStreams() + { + return $this->elementary_streams; + } + + /** + * List of `ElementaryStream.key`s multiplexed in this stream. + * + * Generated from protobuf field repeated string elementary_streams = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setElementaryStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->elementary_streams = $arr; + + return $this; + } + + /** + * Segment settings for `ts`, `fmp4` and `vtt`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; + * @return \Google\Cloud\Video\Transcoder\V1\SegmentSettings|null + */ + public function getSegmentSettings() + { + return $this->segment_settings; + } + + public function hasSegmentSettings() + { + return isset($this->segment_settings); + } + + public function clearSegmentSettings() + { + unset($this->segment_settings); + } + + /** + * Segment settings for `ts`, `fmp4` and `vtt`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; + * @param \Google\Cloud\Video\Transcoder\V1\SegmentSettings $var + * @return $this + */ + public function setSegmentSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\SegmentSettings::class); + $this->segment_settings = $var; + + return $this; + } + + /** + * Identifier of the encryption configuration to use. If omitted, output will + * be unencrypted. + * + * Generated from protobuf field string encryption_id = 7; + * @return string + */ + public function getEncryptionId() + { + return $this->encryption_id; + } + + /** + * Identifier of the encryption configuration to use. If omitted, output will + * be unencrypted. + * + * Generated from protobuf field string encryption_id = 7; + * @param string $var + * @return $this + */ + public function setEncryptionId($var) + { + GPBUtil::checkString($var, True); + $this->encryption_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php new file mode 100644 index 000000000000..e3203d1eb0bf --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php @@ -0,0 +1,79 @@ +google.cloud.video.transcoder.v1.Output + */ +class Output extends \Google\Protobuf\Internal\Message +{ + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the output file(s). For example, `gs://my-bucket/outputs/`. + * If empty, the value is populated from `Job.output_uri`. See + * [Supported input and output + * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). + * + * 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; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php new file mode 100644 index 000000000000..fa19100a1a1e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php @@ -0,0 +1,115 @@ +google.cloud.video.transcoder.v1.Overlay + */ +class Overlay extends \Google\Protobuf\Internal\Message +{ + /** + * Image overlay. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; + */ + protected $image = null; + /** + * List of Animations. The list should be chronological, without any time + * overlap. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; + */ + private $animations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\Image $image + * Image overlay. + * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $animations + * List of Animations. The list should be chronological, without any time + * overlap. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Image overlay. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * Image overlay. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\Image::class); + $this->image = $var; + + return $this; + } + + /** + * List of Animations. The list should be chronological, without any time + * overlap. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnimations() + { + return $this->animations; + } + + /** + * List of Animations. The list should be chronological, without any time + * overlap. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; + * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnimations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay\Animation::class); + $this->animations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php new file mode 100644 index 000000000000..721b5ff9f161 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php @@ -0,0 +1,144 @@ +google.cloud.video.transcoder.v1.Overlay.Animation + */ +class Animation extends \Google\Protobuf\Internal\Message +{ + protected $animation_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $animation_static + * Display static overlay object. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $animation_fade + * Display overlay object with fade animation. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $animation_end + * End previous animation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Display static overlay object. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic|null + */ + public function getAnimationStatic() + { + return $this->readOneof(1); + } + + public function hasAnimationStatic() + { + return $this->hasOneof(1); + } + + /** + * Display static overlay object. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $var + * @return $this + */ + public function setAnimationStatic($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Display overlay object with fade animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade|null + */ + public function getAnimationFade() + { + return $this->readOneof(2); + } + + public function hasAnimationFade() + { + return $this->hasOneof(2); + } + + /** + * Display overlay object with fade animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $var + * @return $this + */ + public function setAnimationFade($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * End previous animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd|null + */ + public function getAnimationEnd() + { + return $this->readOneof(3); + } + + public function hasAnimationEnd() + { + return $this->hasOneof(3); + } + + /** + * End previous animation. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $var + * @return $this + */ + public function setAnimationEnd($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAnimationType() + { + return $this->whichOneof("animation_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Animation::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Animation::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php new file mode 100644 index 000000000000..38f7c28a1751 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php @@ -0,0 +1,82 @@ +google.cloud.video.transcoder.v1.Overlay.AnimationEnd + */ +class AnimationEnd extends \Google\Protobuf\Internal\Message +{ + /** + * The time to end overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_time_offset + * The time to end overlay object, in seconds. Default: 0 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The time to end overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * The time to end overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnimationEnd::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationEnd::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php new file mode 100644 index 000000000000..f6a10418cbdb --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php @@ -0,0 +1,222 @@ +google.cloud.video.transcoder.v1.Overlay.AnimationFade + */ +class AnimationFade extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $fade_type = 0; + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; + */ + protected $xy = null; + /** + * The time to start the fade animation, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; + */ + protected $start_time_offset = null; + /** + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; + */ + protected $end_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $fade_type + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * @type \Google\Protobuf\Duration $start_time_offset + * The time to start the fade animation, in seconds. Default: 0 + * @type \Google\Protobuf\Duration $end_time_offset + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFadeType() + { + return $this->fade_type; + } + + /** + * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFadeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Overlay\FadeType::class); + $this->fade_type = $var; + + return $this; + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null + */ + public function getXy() + { + return $this->xy; + } + + public function hasXy() + { + return isset($this->xy); + } + + public function clearXy() + { + unset($this->xy); + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var + * @return $this + */ + public function setXy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); + $this->xy = $var; + + return $this; + } + + /** + * The time to start the fade animation, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * The time to start the fade animation, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + + /** + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * The time to end the fade animation, in seconds. Default: + * `start_time_offset` + 1s + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnimationFade::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationFade::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php new file mode 100644 index 000000000000..8829a32fef8d --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php @@ -0,0 +1,140 @@ +google.cloud.video.transcoder.v1.Overlay.AnimationStatic + */ +class AnimationStatic extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; + */ + protected $xy = null; + /** + * The time to start displaying the overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; + */ + protected $start_time_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * @type \Google\Protobuf\Duration $start_time_offset + * The time to start displaying the overlay object, in seconds. Default: 0 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null + */ + public function getXy() + { + return $this->xy; + } + + public function hasXy() + { + return isset($this->xy); + } + + public function clearXy() + { + unset($this->xy); + } + + /** + * Normalized coordinates based on output video resolution. Valid + * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay + * object. For example, use the x and y coordinates {0,0} to position the + * top-left corner of the overlay animation in the top-left corner of the + * output video. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var + * @return $this + */ + public function setXy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); + $this->xy = $var; + + return $this; + } + + /** + * The time to start displaying the overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * The time to start displaying the overlay object, in seconds. Default: 0 + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AnimationStatic::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationStatic::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php new file mode 100644 index 000000000000..00d84b08ab33 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php @@ -0,0 +1,64 @@ +google.cloud.video.transcoder.v1.Overlay.FadeType + */ +class FadeType +{ + /** + * The fade type is not specified. + * + * Generated from protobuf enum FADE_TYPE_UNSPECIFIED = 0; + */ + const FADE_TYPE_UNSPECIFIED = 0; + /** + * Fade the overlay object into view. + * + * Generated from protobuf enum FADE_IN = 1; + */ + const FADE_IN = 1; + /** + * Fade the overlay object out of view. + * + * Generated from protobuf enum FADE_OUT = 2; + */ + const FADE_OUT = 2; + + private static $valueToName = [ + self::FADE_TYPE_UNSPECIFIED => 'FADE_TYPE_UNSPECIFIED', + self::FADE_IN => 'FADE_IN', + self::FADE_OUT => 'FADE_OUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FadeType::class, \Google\Cloud\Video\Transcoder\V1\Overlay_FadeType::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php new file mode 100644 index 000000000000..88bcf10bc53f --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php @@ -0,0 +1,168 @@ +google.cloud.video.transcoder.v1.Overlay.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; + */ + protected $resolution = null; + /** + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * + * Generated from protobuf field double alpha = 3; + */ + protected $alpha = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $resolution + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * @type float $alpha + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI of the image in Cloud Storage. For example, + * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; + * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null + */ + public function getResolution() + { + return $this->resolution; + } + + public function hasResolution() + { + return isset($this->resolution); + } + + public function clearResolution() + { + unset($this->resolution); + } + + /** + * Normalized image resolution, based on output video resolution. Valid + * values: `0.0`–`1.0`. To respect the original image aspect ratio, set + * either `x` or `y` to `0.0`. To use the original image resolution, set + * both `x` and `y` to `0.0`. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; + * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var + * @return $this + */ + public function setResolution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); + $this->resolution = $var; + + return $this; + } + + /** + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * + * Generated from protobuf field double alpha = 3; + * @return float + */ + public function getAlpha() + { + return $this->alpha; + } + + /** + * Target image opacity. Valid values are from `1.0` (solid, default) to + * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. + * + * Generated from protobuf field double alpha = 3; + * @param float $var + * @return $this + */ + public function setAlpha($var) + { + GPBUtil::checkDouble($var); + $this->alpha = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Image::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Image::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php new file mode 100644 index 000000000000..6212da72fc3e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php @@ -0,0 +1,104 @@ +google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate + */ +class NormalizedCoordinate extends \Google\Protobuf\Internal\Message +{ + /** + * Normalized x coordinate. + * + * Generated from protobuf field double x = 1; + */ + protected $x = 0.0; + /** + * Normalized y coordinate. + * + * Generated from protobuf field double y = 2; + */ + protected $y = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * Normalized x coordinate. + * @type float $y + * Normalized y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Normalized x coordinate. + * + * Generated from protobuf field double x = 1; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * Normalized x coordinate. + * + * Generated from protobuf field double x = 1; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkDouble($var); + $this->x = $var; + + return $this; + } + + /** + * Normalized y coordinate. + * + * Generated from protobuf field double y = 2; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Normalized y coordinate. + * + * Generated from protobuf field double y = 2; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkDouble($var); + $this->y = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NormalizedCoordinate::class, \Google\Cloud\Video\Transcoder\V1\Overlay_NormalizedCoordinate::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php new file mode 100644 index 000000000000..a89acfa1847b --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php @@ -0,0 +1,341 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig + */ +class PreprocessingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Color preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; + */ + protected $color = null; + /** + * Denoise preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; + */ + protected $denoise = null; + /** + * Deblock preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; + */ + protected $deblock = null; + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; + */ + protected $audio = null; + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; + */ + protected $crop = null; + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; + */ + protected $pad = null; + /** + * Specify the video deinterlace configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; + */ + protected $deinterlace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $color + * Color preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $denoise + * Denoise preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $deblock + * Deblock preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $audio + * Audio preprocessing configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $crop + * Specify the video cropping configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $pad + * Specify the video pad filter configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $deinterlace + * Specify the video deinterlace configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Color preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * Color preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Denoise preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise|null + */ + public function getDenoise() + { + return $this->denoise; + } + + public function hasDenoise() + { + return isset($this->denoise); + } + + public function clearDenoise() + { + unset($this->denoise); + } + + /** + * Denoise preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $var + * @return $this + */ + public function setDenoise($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise::class); + $this->denoise = $var; + + return $this; + } + + /** + * Deblock preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock|null + */ + public function getDeblock() + { + return $this->deblock; + } + + public function hasDeblock() + { + return isset($this->deblock); + } + + public function clearDeblock() + { + unset($this->deblock); + } + + /** + * Deblock preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $var + * @return $this + */ + public function setDeblock($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock::class); + $this->deblock = $var; + + return $this; + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio|null + */ + public function getAudio() + { + return $this->audio; + } + + public function hasAudio() + { + return isset($this->audio); + } + + public function clearAudio() + { + unset($this->audio); + } + + /** + * Audio preprocessing configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $var + * @return $this + */ + public function setAudio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio::class); + $this->audio = $var; + + return $this; + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop|null + */ + public function getCrop() + { + return $this->crop; + } + + public function hasCrop() + { + return isset($this->crop); + } + + public function clearCrop() + { + unset($this->crop); + } + + /** + * Specify the video cropping configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $var + * @return $this + */ + public function setCrop($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop::class); + $this->crop = $var; + + return $this; + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad|null + */ + public function getPad() + { + return $this->pad; + } + + public function hasPad() + { + return isset($this->pad); + } + + public function clearPad() + { + unset($this->pad); + } + + /** + * Specify the video pad filter configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $var + * @return $this + */ + public function setPad($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad::class); + $this->pad = $var; + + return $this; + } + + /** + * Specify the video deinterlace configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace|null + */ + public function getDeinterlace() + { + return $this->deinterlace; + } + + public function hasDeinterlace() + { + return isset($this->deinterlace); + } + + public function clearDeinterlace() + { + unset($this->deinterlace); + } + + /** + * Specify the video deinterlace configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $var + * @return $this + */ + public function setDeinterlace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace::class); + $this->deinterlace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php new file mode 100644 index 000000000000..5527aa011f49 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php @@ -0,0 +1,182 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Audio + */ +class Audio extends \Google\Protobuf\Internal\Message +{ + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * + * Generated from protobuf field double lufs = 1; + */ + protected $lufs = 0.0; + /** + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool high_boost = 2; + */ + protected $high_boost = false; + /** + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool low_boost = 3; + */ + protected $low_boost = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $lufs + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * @type bool $high_boost + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * @type bool $low_boost + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * + * Generated from protobuf field double lufs = 1; + * @return float + */ + public function getLufs() + { + return $this->lufs; + } + + /** + * Specify audio loudness normalization in loudness units relative to full + * scale (LUFS). Enter a value between -24 and 0 (the default), where: + * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard + * * -23 is the EU R128 broadcast standard + * * -19 is the prior standard for online mono audio + * * -18 is the ReplayGain standard + * * -16 is the prior standard for stereo audio + * * -14 is the new online audio standard recommended by Spotify, as well + * as Amazon Echo + * * 0 disables normalization + * + * Generated from protobuf field double lufs = 1; + * @param float $var + * @return $this + */ + public function setLufs($var) + { + GPBUtil::checkDouble($var); + $this->lufs = $var; + + return $this; + } + + /** + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool high_boost = 2; + * @return bool + */ + public function getHighBoost() + { + return $this->high_boost; + } + + /** + * Enable boosting high frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool high_boost = 2; + * @param bool $var + * @return $this + */ + public function setHighBoost($var) + { + GPBUtil::checkBool($var); + $this->high_boost = $var; + + return $this; + } + + /** + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool low_boost = 3; + * @return bool + */ + public function getLowBoost() + { + return $this->low_boost; + } + + /** + * Enable boosting low frequency components. The default is `false`. + * **Note:** This field is not supported. + * + * Generated from protobuf field bool low_boost = 3; + * @param bool $var + * @return $this + */ + public function setLowBoost($var) + { + GPBUtil::checkBool($var); + $this->low_boost = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Audio::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Audio::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php new file mode 100644 index 000000000000..7fcb9b376823 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php @@ -0,0 +1,163 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Color + */ +class Color extends \Google\Protobuf\Internal\Message +{ + /** + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double saturation = 1; + */ + protected $saturation = 0.0; + /** + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double contrast = 2; + */ + protected $contrast = 0.0; + /** + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * + * Generated from protobuf field double brightness = 3; + */ + protected $brightness = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $saturation + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * @type float $contrast + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * @type float $brightness + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double saturation = 1; + * @return float + */ + public function getSaturation() + { + return $this->saturation; + } + + /** + * Control color saturation of the video. Enter a value between -1 and 1, + * where -1 is fully desaturated and 1 is maximum saturation. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double saturation = 1; + * @param float $var + * @return $this + */ + public function setSaturation($var) + { + GPBUtil::checkDouble($var); + $this->saturation = $var; + + return $this; + } + + /** + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double contrast = 2; + * @return float + */ + public function getContrast() + { + return $this->contrast; + } + + /** + * Control black and white contrast of the video. Enter a value between -1 + * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no + * change. The default is 0. + * + * Generated from protobuf field double contrast = 2; + * @param float $var + * @return $this + */ + public function setContrast($var) + { + GPBUtil::checkDouble($var); + $this->contrast = $var; + + return $this; + } + + /** + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * + * Generated from protobuf field double brightness = 3; + * @return float + */ + public function getBrightness() + { + return $this->brightness; + } + + /** + * Control brightness of the video. Enter a value between -1 and 1, where -1 + * is minimum brightness and 1 is maximum brightness. 0 is no change. The + * default is 0. + * + * Generated from protobuf field double brightness = 3; + * @param float $var + * @return $this + */ + public function setBrightness($var) + { + GPBUtil::checkDouble($var); + $this->brightness = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Color::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Color::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php new file mode 100644 index 000000000000..a4a924ad4860 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php @@ -0,0 +1,173 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Crop + */ +class Crop extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to crop from the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to crop from the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to crop from the left. The default is 0. + * @type int $right_pixels + * The number of pixels to crop from the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to crop from the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to crop from the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to crop from the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to crop from the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Crop::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Crop::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php new file mode 100644 index 000000000000..a1c2d7c6a2a5 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php @@ -0,0 +1,113 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock + */ +class Deblock extends \Google\Protobuf\Internal\Message +{ + /** + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * + * Generated from protobuf field double strength = 1; + */ + protected $strength = 0.0; + /** + * Enable deblocker. The default is `false`. + * + * Generated from protobuf field bool enabled = 2; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $strength + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * @type bool $enabled + * Enable deblocker. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * + * Generated from protobuf field double strength = 1; + * @return float + */ + public function getStrength() + { + return $this->strength; + } + + /** + * Set strength of the deblocker. Enter a value between 0 and 1. The higher + * the value, the stronger the block removal. 0 is no deblocking. The + * default is 0. + * + * Generated from protobuf field double strength = 1; + * @param float $var + * @return $this + */ + public function setStrength($var) + { + GPBUtil::checkDouble($var); + $this->strength = $var; + + return $this; + } + + /** + * Enable deblocker. The default is `false`. + * + * Generated from protobuf field bool enabled = 2; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enable deblocker. The default is `false`. + * + * Generated from protobuf field bool enabled = 2; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Deblock::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deblock::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php new file mode 100644 index 000000000000..b770eda51e32 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php @@ -0,0 +1,111 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace + */ +class Deinterlace extends \Google\Protobuf\Internal\Message +{ + protected $deinterlacing_filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $yadif + * Specifies the Yet Another Deinterlacing Filter Configuration. + * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $bwdif + * Specifies the Bob Weaver Deinterlacing Filter Configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the Yet Another Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig|null + */ + public function getYadif() + { + return $this->readOneof(1); + } + + public function hasYadif() + { + return $this->hasOneof(1); + } + + /** + * Specifies the Yet Another Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $var + * @return $this + */ + public function setYadif($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Specifies the Bob Weaver Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; + * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig|null + */ + public function getBwdif() + { + return $this->readOneof(2); + } + + public function hasBwdif() + { + return $this->hasOneof(2); + } + + /** + * Specifies the Bob Weaver Deinterlacing Filter Configuration. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; + * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $var + * @return $this + */ + public function setBwdif($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDeinterlacingFilter() + { + return $this->whichOneof("deinterlacing_filter"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Deinterlace::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php new file mode 100644 index 000000000000..ac4676c464e6 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php @@ -0,0 +1,178 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig + */ +class BwdifConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + */ + protected $mode = ''; + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 2; + */ + protected $parity = ''; + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 3; + */ + protected $deinterlace_all_frames = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mode + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * @type string $parity + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * @type bool $deinterlace_all_frames + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 2; + * @return string + */ + public function getParity() + { + return $this->parity; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 2; + * @param string $var + * @return $this + */ + public function setParity($var) + { + GPBUtil::checkString($var, True); + $this->parity = $var; + + return $this; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 3; + * @return bool + */ + public function getDeinterlaceAllFrames() + { + return $this->deinterlace_all_frames; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 3; + * @param bool $var + * @return $this + */ + public function setDeinterlaceAllFrames($var) + { + GPBUtil::checkBool($var); + $this->deinterlace_all_frames = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BwdifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_BwdifConfig::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php new file mode 100644 index 000000000000..48e8862bebbb --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php @@ -0,0 +1,216 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig + */ +class YadifConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + */ + protected $mode = ''; + /** + * Disable spacial interlacing. + * The default is `false`. + * + * Generated from protobuf field bool disable_spatial_interlacing = 2; + */ + protected $disable_spatial_interlacing = false; + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 3; + */ + protected $parity = ''; + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 4; + */ + protected $deinterlace_all_frames = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mode + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * @type bool $disable_spatial_interlacing + * Disable spacial interlacing. + * The default is `false`. + * @type string $parity + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * @type bool $deinterlace_all_frames + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Specifies the deinterlacing mode to adopt. + * The default is `send_frame`. + * Supported values: + * - `send_frame`: Output one frame for each frame + * - `send_field`: Output one frame for each field + * + * Generated from protobuf field string mode = 1; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Disable spacial interlacing. + * The default is `false`. + * + * Generated from protobuf field bool disable_spatial_interlacing = 2; + * @return bool + */ + public function getDisableSpatialInterlacing() + { + return $this->disable_spatial_interlacing; + } + + /** + * Disable spacial interlacing. + * The default is `false`. + * + * Generated from protobuf field bool disable_spatial_interlacing = 2; + * @param bool $var + * @return $this + */ + public function setDisableSpatialInterlacing($var) + { + GPBUtil::checkBool($var); + $this->disable_spatial_interlacing = $var; + + return $this; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 3; + * @return string + */ + public function getParity() + { + return $this->parity; + } + + /** + * The picture field parity assumed for the input interlaced video. + * The default is `auto`. + * Supported values: + * - `tff`: Assume the top field is first + * - `bff`: Assume the bottom field is first + * - `auto`: Enable automatic detection of field parity + * + * Generated from protobuf field string parity = 3; + * @param string $var + * @return $this + */ + public function setParity($var) + { + GPBUtil::checkString($var, True); + $this->parity = $var; + + return $this; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 4; + * @return bool + */ + public function getDeinterlaceAllFrames() + { + return $this->deinterlace_all_frames; + } + + /** + * Deinterlace all frames rather than just the frames identified as + * interlaced. The default is `false`. + * + * Generated from protobuf field bool deinterlace_all_frames = 4; + * @param bool $var + * @return $this + */ + public function setDeinterlaceAllFrames($var) + { + GPBUtil::checkBool($var); + $this->deinterlace_all_frames = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(YadifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_YadifConfig::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php new file mode 100644 index 000000000000..8b261dd4c493 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php @@ -0,0 +1,121 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise + */ +class Denoise extends \Google\Protobuf\Internal\Message +{ + /** + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * + * Generated from protobuf field double strength = 1; + */ + protected $strength = 0.0; + /** + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * + * Generated from protobuf field string tune = 2; + */ + protected $tune = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $strength + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * @type string $tune + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * + * Generated from protobuf field double strength = 1; + * @return float + */ + public function getStrength() + { + return $this->strength; + } + + /** + * Set strength of the denoise. Enter a value between 0 and 1. The higher + * the value, the smoother the image. 0 is no denoising. The default is 0. + * + * Generated from protobuf field double strength = 1; + * @param float $var + * @return $this + */ + public function setStrength($var) + { + GPBUtil::checkDouble($var); + $this->strength = $var; + + return $this; + } + + /** + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * + * Generated from protobuf field string tune = 2; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Set the denoiser mode. The default is `standard`. + * Supported denoiser modes: + * - `standard` + * - `grain` + * + * Generated from protobuf field string tune = 2; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Denoise::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Denoise::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php new file mode 100644 index 000000000000..04d702ce9f94 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php @@ -0,0 +1,173 @@ +google.cloud.video.transcoder.v1.PreprocessingConfig.Pad + */ +class Pad extends \Google\Protobuf\Internal\Message +{ + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + */ + protected $top_pixels = 0; + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + */ + protected $bottom_pixels = 0; + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + */ + protected $left_pixels = 0; + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + */ + protected $right_pixels = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_pixels + * The number of pixels to add to the top. The default is 0. + * @type int $bottom_pixels + * The number of pixels to add to the bottom. The default is 0. + * @type int $left_pixels + * The number of pixels to add to the left. The default is 0. + * @type int $right_pixels + * The number of pixels to add to the right. The default is 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @return int + */ + public function getTopPixels() + { + return $this->top_pixels; + } + + /** + * The number of pixels to add to the top. The default is 0. + * + * Generated from protobuf field int32 top_pixels = 1; + * @param int $var + * @return $this + */ + public function setTopPixels($var) + { + GPBUtil::checkInt32($var); + $this->top_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @return int + */ + public function getBottomPixels() + { + return $this->bottom_pixels; + } + + /** + * The number of pixels to add to the bottom. The default is 0. + * + * Generated from protobuf field int32 bottom_pixels = 2; + * @param int $var + * @return $this + */ + public function setBottomPixels($var) + { + GPBUtil::checkInt32($var); + $this->bottom_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @return int + */ + public function getLeftPixels() + { + return $this->left_pixels; + } + + /** + * The number of pixels to add to the left. The default is 0. + * + * Generated from protobuf field int32 left_pixels = 3; + * @param int $var + * @return $this + */ + public function setLeftPixels($var) + { + GPBUtil::checkInt32($var); + $this->left_pixels = $var; + + return $this; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @return int + */ + public function getRightPixels() + { + return $this->right_pixels; + } + + /** + * The number of pixels to add to the right. The default is 0. + * + * Generated from protobuf field int32 right_pixels = 4; + * @param int $var + * @return $this + */ + public function setRightPixels($var) + { + GPBUtil::checkInt32($var); + $this->right_pixels = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Pad::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Pad::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php new file mode 100644 index 000000000000..554c0dbf0125 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php @@ -0,0 +1,71 @@ +google.cloud.video.transcoder.v1.PubsubDestination + */ +class PubsubDestination extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * + * Generated from protobuf field string topic = 1; + */ + protected $topic = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $topic + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * + * Generated from protobuf field string topic = 1; + * @return string + */ + public function getTopic() + { + return $this->topic; + } + + /** + * The name of the Pub/Sub topic to publish job completion notification + * to. For example: `projects/{project}/topics/{topic}`. + * + * Generated from protobuf field string topic = 1; + * @param string $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkString($var, True); + $this->topic = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php new file mode 100644 index 000000000000..9b21c31ca421 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php @@ -0,0 +1,123 @@ +google.cloud.video.transcoder.v1.SegmentSettings + */ +class SegmentSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + */ + protected $segment_duration = null; + /** + * Required. Create an individual segment file. The default is `false`. + * + * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $individual_segments = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $segment_duration + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * @type bool $individual_segments + * Required. Create an individual segment file. The default is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getSegmentDuration() + { + return $this->segment_duration; + } + + public function hasSegmentDuration() + { + return isset($this->segment_duration); + } + + public function clearSegmentDuration() + { + unset($this->segment_duration); + } + + /** + * Duration of the segments in seconds. The default is `6.0s`. Note that + * `segmentDuration` must be greater than or equal to + * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by + * [`gopDuration`](#videostream). + * + * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSegmentDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->segment_duration = $var; + + return $this; + } + + /** + * Required. Create an individual segment file. The default is `false`. + * + * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getIndividualSegments() + { + return $this->individual_segments; + } + + /** + * Required. Create an individual segment file. The default is `false`. + * + * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setIndividualSegments($var) + { + GPBUtil::checkBool($var); + $this->individual_segments = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php new file mode 100644 index 000000000000..b0b6c8cfeeca --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php @@ -0,0 +1,575 @@ +google.cloud.video.transcoder.v1.SpriteSheet + */ +class SpriteSheet extends \Google\Protobuf\Internal\Message +{ + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + */ + protected $format = ''; + /** + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $file_prefix = ''; + /** + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_width_pixels = 0; + /** + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sprite_height_pixels = 0; + /** + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * + * Generated from protobuf field int32 column_count = 5; + */ + protected $column_count = 0; + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * + * Generated from protobuf field int32 row_count = 6; + */ + protected $row_count = 0; + /** + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; + */ + protected $start_time_offset = null; + /** + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; + */ + protected $end_time_offset = null; + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 11; + */ + protected $quality = 0; + protected $extraction_strategy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $format + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * @type string $file_prefix + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * @type int $sprite_width_pixels + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $sprite_height_pixels + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $column_count + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * @type int $row_count + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * @type \Google\Protobuf\Duration $start_time_offset + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * @type \Google\Protobuf\Duration $end_time_offset + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * @type int $total_count + * Total number of sprites. Create the specified number of sprites + * distributed evenly across the timeline of the output media. The default + * is 100. + * @type \Google\Protobuf\Duration $interval + * Starting from `0s`, create sprites at regular intervals. Specify the + * interval value in seconds. + * @type int $quality + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * Generated from protobuf field string format = 1; + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Format type. The default is `jpeg`. + * Supported formats: + * - `jpeg` + * + * 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; + } + + /** + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilePrefix() + { + return $this->file_prefix; + } + + /** + * Required. File name prefix for the generated sprite sheets. + * Each sprite sheet has an incremental 10-digit zero-padded suffix starting + * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. + * + * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilePrefix($var) + { + GPBUtil::checkString($var, True); + $this->file_prefix = $var; + + return $this; + } + + /** + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteWidthPixels() + { + return $this->sprite_width_pixels; + } + + /** + * Required. The width of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field or the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_width_pixels = $var; + + return $this; + } + + /** + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSpriteHeightPixels() + { + return $this->sprite_height_pixels; + } + + /** + * Required. The height of sprite in pixels. Must be an even integer. To + * preserve the source aspect ratio, set the + * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] + * field or the + * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] + * field, but not both (the API will automatically calculate the missing + * field). + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSpriteHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->sprite_height_pixels = $var; + + return $this; + } + + /** + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * + * Generated from protobuf field int32 column_count = 5; + * @return int + */ + public function getColumnCount() + { + return $this->column_count; + } + + /** + * The maximum number of sprites per row in a sprite sheet. The default is 0, + * which indicates no maximum limit. + * + * Generated from protobuf field int32 column_count = 5; + * @param int $var + * @return $this + */ + public function setColumnCount($var) + { + GPBUtil::checkInt32($var); + $this->column_count = $var; + + return $this; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * + * Generated from protobuf field int32 row_count = 6; + * @return int + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The maximum number of rows per sprite sheet. When the sprite sheet is full, + * a new sprite sheet is created. The default is 0, which indicates no maximum + * limit. + * + * Generated from protobuf field int32 row_count = 6; + * @param int $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt32($var); + $this->row_count = $var; + + return $this; + } + + /** + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getStartTimeOffset() + { + return $this->start_time_offset; + } + + public function hasStartTimeOffset() + { + return isset($this->start_time_offset); + } + + public function clearStartTimeOffset() + { + unset($this->start_time_offset); + } + + /** + * Start time in seconds, relative to the output file timeline. Determines the + * first sprite to pick. The default is `0s`. + * + * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_time_offset = $var; + + return $this; + } + + /** + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getEndTimeOffset() + { + return $this->end_time_offset; + } + + public function hasEndTimeOffset() + { + return isset($this->end_time_offset); + } + + public function clearEndTimeOffset() + { + unset($this->end_time_offset); + } + + /** + * End time in seconds, relative to the output file timeline. When + * `end_time_offset` is not specified, the sprites are generated until the end + * of the output file. + * + * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndTimeOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_time_offset = $var; + + return $this; + } + + /** + * Total number of sprites. Create the specified number of sprites + * distributed evenly across the timeline of the output media. The default + * is 100. + * + * Generated from protobuf field int32 total_count = 9; + * @return int + */ + public function getTotalCount() + { + return $this->readOneof(9); + } + + public function hasTotalCount() + { + return $this->hasOneof(9); + } + + /** + * Total number of sprites. Create the specified number of sprites + * distributed evenly across the timeline of the output media. The default + * is 100. + * + * Generated from protobuf field int32 total_count = 9; + * @param int $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Starting from `0s`, create sprites at regular intervals. Specify the + * interval value in seconds. + * + * Generated from protobuf field .google.protobuf.Duration interval = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getInterval() + { + return $this->readOneof(10); + } + + public function hasInterval() + { + return $this->hasOneof(10); + } + + /** + * Starting from `0s`, create sprites at regular intervals. Specify the + * interval value in seconds. + * + * Generated from protobuf field .google.protobuf.Duration interval = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 11; + * @return int + */ + public function getQuality() + { + return $this->quality; + } + + /** + * The quality of the generated sprite sheet. Enter a value between 1 + * and 100, where 1 is the lowest quality and 100 is the highest quality. + * The default is 100. A high quality value corresponds to a low image data + * compression ratio. + * + * Generated from protobuf field int32 quality = 11; + * @param int $var + * @return $this + */ + public function setQuality($var) + { + GPBUtil::checkInt32($var); + $this->quality = $var; + + return $this; + } + + /** + * @return string + */ + public function getExtractionStrategy() + { + return $this->whichOneof("extraction_strategy"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php new file mode 100644 index 000000000000..e7f56aa9a086 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php @@ -0,0 +1,209 @@ +google.cloud.video.transcoder.v1.TextStream + */ +class TextStream extends \Google\Protobuf\Internal\Message +{ + /** + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * + * Generated from protobuf field string codec = 1; + */ + protected $codec = ''; + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; + */ + private $mapping; + /** + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $codec + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * @type string $language_code + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * @type array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $mapping + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * @type string $display_name + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * + * Generated from protobuf field string codec = 1; + * @return string + */ + public function getCodec() + { + return $this->codec; + } + + /** + * The codec for this text stream. The default is `webvtt`. + * Supported text codecs: + * - `srt` + * - `ttml` + * - `cea608` + * - `cea708` + * - `webvtt` + * + * Generated from protobuf field string codec = 1; + * @param string $var + * @return $this + */ + public function setCodec($var) + { + GPBUtil::checkString($var, True); + $this->codec = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more + * information, see + * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not + * supported in MP4 files. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMapping() + { + return $this->mapping; + } + + /** + * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. + * + * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; + * @param array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMapping($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping::class); + $this->mapping = $arr; + + return $this; + } + + /** + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name for this particular text stream that + * will be added to the HLS/DASH manifest. Not supported in MP4 files. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php new file mode 100644 index 000000000000..c8404457843c --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php @@ -0,0 +1,142 @@ +google.cloud.video.transcoder.v1.TextStream.TextMapping + */ +class TextMapping extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $atom_key = ''; + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_key = ''; + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_track = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $atom_key + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * @type string $input_key + * Required. The `Input.key` that identifies the input file. + * @type int $input_track + * Required. The zero-based index of the track in the input file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAtomKey() + { + return $this->atom_key; + } + + /** + * Required. The `EditAtom.key` that references atom with text inputs in the + * `Job.edit_list`. + * + * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAtomKey($var) + { + GPBUtil::checkString($var, True); + $this->atom_key = $var; + + return $this; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputKey() + { + return $this->input_key; + } + + /** + * Required. The `Input.key` that identifies the input file. + * + * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputKey($var) + { + GPBUtil::checkString($var, True); + $this->input_key = $var; + + return $this; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInputTrack() + { + return $this->input_track; + } + + /** + * Required. The zero-based index of the track in the input file. + * + * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInputTrack($var) + { + GPBUtil::checkInt32($var); + $this->input_track = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextMapping::class, \Google\Cloud\Video\Transcoder\V1\TextStream_TextMapping::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php new file mode 100644 index 000000000000..d3374d958e63 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php @@ -0,0 +1,141 @@ +google.cloud.video.transcoder.v1.VideoStream + */ +class VideoStream extends \Google\Protobuf\Internal\Message +{ + protected $codec_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $h264 + * H264 codec settings. + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $h265 + * H265 codec settings. + * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $vp9 + * VP9 codec settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings|null + */ + public function getH264() + { + return $this->readOneof(1); + } + + public function hasH264() + { + return $this->hasOneof(1); + } + + /** + * H264 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $var + * @return $this + */ + public function setH264($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * H265 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings|null + */ + public function getH265() + { + return $this->readOneof(2); + } + + public function hasH265() + { + return $this->hasOneof(2); + } + + /** + * H265 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $var + * @return $this + */ + public function setH265($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * VP9 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; + * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings|null + */ + public function getVp9() + { + return $this->readOneof(3); + } + + public function hasVp9() + { + return $this->hasOneof(3); + } + + /** + * VP9 codec settings. + * + * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; + * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $var + * @return $this + */ + public function setVp9($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getCodecSettings() + { + return $this->whichOneof("codec_settings"); + } + +} + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php new file mode 100644 index 000000000000..0474d647aed6 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php @@ -0,0 +1,994 @@ +google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings + */ +class H264CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + */ + protected $pixel_format = ''; + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + */ + protected $rate_control_mode = ''; + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + */ + protected $crf_level = 0; + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + */ + protected $allow_open_gop = false; + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + */ + protected $enable_two_pass = false; + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + */ + protected $vbv_size_bits = 0; + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + */ + protected $vbv_fullness_bits = 0; + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 14; + */ + protected $entropy_coder = ''; + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 15; + */ + protected $b_pyramid = false; + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 16; + */ + protected $b_frame_count = 0; + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 17; + */ + protected $aq_strength = 0.0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string profile = 18; + */ + protected $profile = ''; + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string tune = 19; + */ + protected $tune = ''; + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string preset = 20; + */ + protected $preset = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $height_pixels + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * @type string $pixel_format + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * @type string $rate_control_mode + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * @type int $crf_level + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * @type bool $allow_open_gop + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * @type bool $enable_two_pass + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * @type int $vbv_size_bits + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * @type int $vbv_fullness_bits + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * @type string $entropy_coder + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * @type bool $b_pyramid + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * @type int $b_frame_count + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * @type float $aq_strength + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * @type string $tune + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * @type string $preset + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @return string + */ + public function getPixelFormat() + { + return $this->pixel_format; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @param string $var + * @return $this + */ + public function setPixelFormat($var) + { + GPBUtil::checkString($var, True); + $this->pixel_format = $var; + + return $this; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @return string + */ + public function getRateControlMode() + { + return $this->rate_control_mode; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @param string $var + * @return $this + */ + public function setRateControlMode($var) + { + GPBUtil::checkString($var, True); + $this->rate_control_mode = $var; + + return $this; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @return int + */ + public function getCrfLevel() + { + return $this->crf_level; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @param int $var + * @return $this + */ + public function setCrfLevel($var) + { + GPBUtil::checkInt32($var); + $this->crf_level = $var; + + return $this; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @return bool + */ + public function getAllowOpenGop() + { + return $this->allow_open_gop; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @param bool $var + * @return $this + */ + public function setAllowOpenGop($var) + { + GPBUtil::checkBool($var); + $this->allow_open_gop = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(9); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(9); + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(10); + } + + public function hasGopDuration() + { + return $this->hasOneof(10); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @return bool + */ + public function getEnableTwoPass() + { + return $this->enable_two_pass; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @param bool $var + * @return $this + */ + public function setEnableTwoPass($var) + { + GPBUtil::checkBool($var); + $this->enable_two_pass = $var; + + return $this; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @return int + */ + public function getVbvSizeBits() + { + return $this->vbv_size_bits; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @param int $var + * @return $this + */ + public function setVbvSizeBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_size_bits = $var; + + return $this; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @return int + */ + public function getVbvFullnessBits() + { + return $this->vbv_fullness_bits; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @param int $var + * @return $this + */ + public function setVbvFullnessBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_fullness_bits = $var; + + return $this; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 14; + * @return string + */ + public function getEntropyCoder() + { + return $this->entropy_coder; + } + + /** + * The entropy coder to use. The default is `cabac`. + * Supported entropy coders: + * - `cavlc` + * - `cabac` + * + * Generated from protobuf field string entropy_coder = 14; + * @param string $var + * @return $this + */ + public function setEntropyCoder($var) + { + GPBUtil::checkString($var, True); + $this->entropy_coder = $var; + + return $this; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 15; + * @return bool + */ + public function getBPyramid() + { + return $this->b_pyramid; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 15; + * @param bool $var + * @return $this + */ + public function setBPyramid($var) + { + GPBUtil::checkBool($var); + $this->b_pyramid = $var; + + return $this; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 16; + * @return int + */ + public function getBFrameCount() + { + return $this->b_frame_count; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 16; + * @param int $var + * @return $this + */ + public function setBFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->b_frame_count = $var; + + return $this; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 17; + * @return float + */ + public function getAqStrength() + { + return $this->aq_strength; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 17; + * @param float $var + * @return $this + */ + public function setAqStrength($var) + { + GPBUtil::checkDouble($var); + $this->aq_strength = $var; + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string profile = 18; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `baseline` + * * `main` + * * `high` (default) + * The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string profile = 18; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string tune = 19; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string tune = 19; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string preset = 20; + * @return string + */ + public function getPreset() + { + return $this->preset; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H264CodecSettings` + * message. + * + * Generated from protobuf field string preset = 20; + * @param string $var + * @return $this + */ + public function setPreset($var) + { + GPBUtil::checkString($var, True); + $this->preset = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(H264CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H264CodecSettings::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php new file mode 100644 index 000000000000..e19c5340e52e --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php @@ -0,0 +1,1008 @@ +google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings + */ +class H265CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + */ + protected $pixel_format = ''; + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + */ + protected $rate_control_mode = ''; + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + */ + protected $crf_level = 0; + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + */ + protected $allow_open_gop = false; + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + */ + protected $enable_two_pass = false; + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + */ + protected $vbv_size_bits = 0; + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + */ + protected $vbv_fullness_bits = 0; + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 14; + */ + protected $b_pyramid = false; + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 15; + */ + protected $b_frame_count = 0; + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 16; + */ + protected $aq_strength = 0.0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string profile = 17; + */ + protected $profile = ''; + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string tune = 18; + */ + protected $tune = ''; + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string preset = 19; + */ + protected $preset = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $height_pixels + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * @type string $pixel_format + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * @type string $rate_control_mode + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * @type int $crf_level + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * @type bool $allow_open_gop + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * @type bool $enable_two_pass + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * @type int $vbv_size_bits + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * @type int $vbv_fullness_bits + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * @type bool $b_pyramid + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * @type int $b_frame_count + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * @type float $aq_strength + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * @type string $tune + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * @type string $preset + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 800,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @return string + */ + public function getPixelFormat() + { + return $this->pixel_format; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @param string $var + * @return $this + */ + public function setPixelFormat($var) + { + GPBUtil::checkString($var, True); + $this->pixel_format = $var; + + return $this; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @return string + */ + public function getRateControlMode() + { + return $this->rate_control_mode; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * - `crf` - constant rate factor + * + * Generated from protobuf field string rate_control_mode = 6; + * @param string $var + * @return $this + */ + public function setRateControlMode($var) + { + GPBUtil::checkString($var, True); + $this->rate_control_mode = $var; + + return $this; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @return int + */ + public function getCrfLevel() + { + return $this->crf_level; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * + * Generated from protobuf field int32 crf_level = 7; + * @param int $var + * @return $this + */ + public function setCrfLevel($var) + { + GPBUtil::checkInt32($var); + $this->crf_level = $var; + + return $this; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @return bool + */ + public function getAllowOpenGop() + { + return $this->allow_open_gop; + } + + /** + * Specifies whether an open Group of Pictures (GOP) structure should be + * allowed or not. The default is `false`. + * + * Generated from protobuf field bool allow_open_gop = 8; + * @param bool $var + * @return $this + */ + public function setAllowOpenGop($var) + { + GPBUtil::checkBool($var); + $this->allow_open_gop = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(9); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(9); + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 9; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(10); + } + + public function hasGopDuration() + { + return $this->hasOneof(10); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @return bool + */ + public function getEnableTwoPass() + { + return $this->enable_two_pass; + } + + /** + * Use two-pass encoding strategy to achieve better video quality. + * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. + * + * Generated from protobuf field bool enable_two_pass = 11; + * @param bool $var + * @return $this + */ + public function setEnableTwoPass($var) + { + GPBUtil::checkBool($var); + $this->enable_two_pass = $var; + + return $this; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @return int + */ + public function getVbvSizeBits() + { + return $this->vbv_size_bits; + } + + /** + * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be + * greater than zero. The default is equal to `VideoStream.bitrate_bps`. + * + * Generated from protobuf field int32 vbv_size_bits = 12; + * @param int $var + * @return $this + */ + public function setVbvSizeBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_size_bits = $var; + + return $this; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @return int + */ + public function getVbvFullnessBits() + { + return $this->vbv_fullness_bits; + } + + /** + * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. + * Must be greater than zero. The default is equal to 90% of + * `VideoStream.vbv_size_bits`. + * + * Generated from protobuf field int32 vbv_fullness_bits = 13; + * @param int $var + * @return $this + */ + public function setVbvFullnessBits($var) + { + GPBUtil::checkInt32($var); + $this->vbv_fullness_bits = $var; + + return $this; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 14; + * @return bool + */ + public function getBPyramid() + { + return $this->b_pyramid; + } + + /** + * Allow B-pyramid for reference frame selection. This may not be supported + * on all decoders. The default is `false`. + * + * Generated from protobuf field bool b_pyramid = 14; + * @param bool $var + * @return $this + */ + public function setBPyramid($var) + { + GPBUtil::checkBool($var); + $this->b_pyramid = $var; + + return $this; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 15; + * @return int + */ + public function getBFrameCount() + { + return $this->b_frame_count; + } + + /** + * The number of consecutive B-frames. Must be greater than or equal to + * zero. Must be less than `VideoStream.gop_frame_count` if set. The default + * is 0. + * + * Generated from protobuf field int32 b_frame_count = 15; + * @param int $var + * @return $this + */ + public function setBFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->b_frame_count = $var; + + return $this; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 16; + * @return float + */ + public function getAqStrength() + { + return $this->aq_strength; + } + + /** + * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 + * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A + * higher value equals a lower bitrate but smoother image. The default is 0. + * + * Generated from protobuf field double aq_strength = 16; + * @param float $var + * @return $this + */ + public function setAqStrength($var) + { + GPBUtil::checkDouble($var); + $this->aq_strength = $var; + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string profile = 17; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * 8-bit profiles + * * `main` (default) + * * `main-intra` + * * `mainstillpicture` + * * 10-bit profiles + * * `main10` (default) + * * `main10-intra` + * * `main422-10` + * * `main422-10-intra` + * * `main444-10` + * * `main444-10-intra` + * * 12-bit profiles + * * `main12` (default) + * * `main12-intra` + * * `main422-12` + * * `main422-12-intra` + * * `main444-12` + * * `main444-12-intra` + * The available options are + * [FFmpeg-compatible](https://x265.readthedocs.io/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string profile = 17; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string tune = 18; + * @return string + */ + public function getTune() + { + return $this->tune; + } + + /** + * Enforces the specified codec tune. The available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string tune = 18; + * @param string $var + * @return $this + */ + public function setTune($var) + { + GPBUtil::checkString($var, True); + $this->tune = $var; + + return $this; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string preset = 19; + * @return string + */ + public function getPreset() + { + return $this->preset; + } + + /** + * Enforces the specified codec preset. The default is `veryfast`. The + * available options are + * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `H265CodecSettings` + * message. + * + * Generated from protobuf field string preset = 19; + * @param string $var + * @return $this + */ + public function setPreset($var) + { + GPBUtil::checkString($var, True); + $this->preset = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(H265CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H265CodecSettings::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php new file mode 100644 index 000000000000..f062f31d7643 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php @@ -0,0 +1,570 @@ +google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings + */ +class Vp9CodecSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + */ + protected $width_pixels = 0; + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + */ + protected $height_pixels = 0; + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frame_rate = 0.0; + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bitrate_bps = 0; + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + */ + protected $pixel_format = ''; + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * + * Generated from protobuf field string rate_control_mode = 6; + */ + protected $rate_control_mode = ''; + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * + * Generated from protobuf field int32 crf_level = 7; + */ + protected $crf_level = 0; + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * + * Generated from protobuf field string profile = 10; + */ + protected $profile = ''; + protected $gop_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $width_pixels + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type int $height_pixels + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * @type float $frame_rate + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * @type int $bitrate_bps + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * @type string $pixel_format + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * @type string $rate_control_mode + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * @type int $crf_level + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * @type int $gop_frame_count + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * @type \Google\Protobuf\Duration $gop_duration + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * @type string $profile + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @return int + */ + public function getWidthPixels() + { + return $this->width_pixels; + } + + /** + * The width of the video in pixels. Must be an even integer. + * When not specified, the width is adjusted to match the specified height + * and input aspect ratio. If both are omitted, the input width is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the width, in pixels, per the horizontal ASR. The API calculates + * the height per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 width_pixels = 1; + * @param int $var + * @return $this + */ + public function setWidthPixels($var) + { + GPBUtil::checkInt32($var); + $this->width_pixels = $var; + + return $this; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @return int + */ + public function getHeightPixels() + { + return $this->height_pixels; + } + + /** + * The height of the video in pixels. Must be an even integer. + * When not specified, the height is adjusted to match the specified width + * and input aspect ratio. If both are omitted, the input height is used. + * For portrait videos that contain horizontal ASR and rotation metadata, + * provide the height, in pixels, per the horizontal ASR. The API calculates + * the width per the horizontal ASR. The API detects any rotation metadata + * and swaps the requested height and width for the output. + * + * Generated from protobuf field int32 height_pixels = 2; + * @param int $var + * @return $this + */ + public function setHeightPixels($var) + { + GPBUtil::checkInt32($var); + $this->height_pixels = $var; + + return $this; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getFrameRate() + { + return $this->frame_rate; + } + + /** + * Required. The target video frame rate in frames per second (FPS). Must be + * less than or equal to 120. Will default to the input frame rate if larger + * than the input frame rate. The API will generate an output FPS that is + * divisible by the input FPS, and smaller or equal to the target FPS. See + * [Calculating frame + * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for + * more information. + * + * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setFrameRate($var) + { + GPBUtil::checkDouble($var); + $this->frame_rate = $var; + + return $this; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getBitrateBps() + { + return $this->bitrate_bps; + } + + /** + * Required. The video bitrate in bits per second. The minimum value is + * 1,000. The maximum value is 480,000,000. + * + * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setBitrateBps($var) + { + GPBUtil::checkInt32($var); + $this->bitrate_bps = $var; + + return $this; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @return string + */ + public function getPixelFormat() + { + return $this->pixel_format; + } + + /** + * Pixel format to use. The default is `yuv420p`. + * Supported pixel formats: + * - `yuv420p` pixel format + * - `yuv422p` pixel format + * - `yuv444p` pixel format + * - `yuv420p10` 10-bit HDR pixel format + * - `yuv422p10` 10-bit HDR pixel format + * - `yuv444p10` 10-bit HDR pixel format + * - `yuv420p12` 12-bit HDR pixel format + * - `yuv422p12` 12-bit HDR pixel format + * - `yuv444p12` 12-bit HDR pixel format + * + * Generated from protobuf field string pixel_format = 5; + * @param string $var + * @return $this + */ + public function setPixelFormat($var) + { + GPBUtil::checkString($var, True); + $this->pixel_format = $var; + + return $this; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * + * Generated from protobuf field string rate_control_mode = 6; + * @return string + */ + public function getRateControlMode() + { + return $this->rate_control_mode; + } + + /** + * Specify the `rate_control_mode`. The default is `vbr`. + * Supported rate control modes: + * - `vbr` - variable bitrate + * + * Generated from protobuf field string rate_control_mode = 6; + * @param string $var + * @return $this + */ + public function setRateControlMode($var) + { + GPBUtil::checkString($var, True); + $this->rate_control_mode = $var; + + return $this; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * + * Generated from protobuf field int32 crf_level = 7; + * @return int + */ + public function getCrfLevel() + { + return $this->crf_level; + } + + /** + * Target CRF level. Must be between 10 and 36, where 10 is the highest + * quality and 36 is the most efficient compression. The default is 21. + * **Note:** This field is not supported. + * + * Generated from protobuf field int32 crf_level = 7; + * @param int $var + * @return $this + */ + public function setCrfLevel($var) + { + GPBUtil::checkInt32($var); + $this->crf_level = $var; + + return $this; + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 8; + * @return int + */ + public function getGopFrameCount() + { + return $this->readOneof(8); + } + + public function hasGopFrameCount() + { + return $this->hasOneof(8); + } + + /** + * Select the GOP size based on the specified frame count. Must be greater + * than zero. + * + * Generated from protobuf field int32 gop_frame_count = 8; + * @param int $var + * @return $this + */ + public function setGopFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getGopDuration() + { + return $this->readOneof(9); + } + + public function hasGopDuration() + { + return $this->hasOneof(9); + } + + /** + * Select the GOP size based on the specified duration. The default is + * `3s`. Note that `gopDuration` must be less than or equal to + * [`segmentDuration`](#SegmentSettings), and + * [`segmentDuration`](#SegmentSettings) must be divisible by + * `gopDuration`. + * + * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGopDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * + * Generated from protobuf field string profile = 10; + * @return string + */ + public function getProfile() + { + return $this->profile; + } + + /** + * Enforces the specified codec profile. The following profiles are + * supported: + * * `profile0` (default) + * * `profile1` + * * `profile2` + * * `profile3` + * The available options are + * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). + * Note that certain values for this field may cause the + * transcoder to override other fields you set in the `Vp9CodecSettings` + * message. + * + * Generated from protobuf field string profile = 10; + * @param string $var + * @return $this + */ + public function setProfile($var) + { + GPBUtil::checkString($var, True); + $this->profile = $var; + + return $this; + } + + /** + * @return string + */ + public function getGopMode() + { + return $this->whichOneof("gop_mode"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Vp9CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_Vp9CodecSettings::class); + diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php new file mode 100644 index 000000000000..76ef88e0d8ae --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setJob($job); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $transcoderServiceClient->createJob($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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_job_sample($formattedParent); +} +// [END transcoder_v1_generated_TranscoderService_CreateJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php new file mode 100644 index 000000000000..5e799c73eee4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + + // Call the API and handle any network failures. + try { + /** @var JobTemplate $response */ + $response = $transcoderServiceClient->createJobTemplate($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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $jobTemplateId = '[JOB_TEMPLATE_ID]'; + + create_job_template_sample($formattedParent, $jobTemplateId); +} +// [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php new file mode 100644 index 000000000000..0c39038a6a0d --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $transcoderServiceClient->deleteJob($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 = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + delete_job_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_DeleteJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php new file mode 100644 index 000000000000..36d0c221fbae --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $transcoderServiceClient->deleteJobTemplate($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 = TranscoderServiceClient::jobTemplateName( + '[PROJECT]', + '[LOCATION]', + '[JOB_TEMPLATE]' + ); + + delete_job_template_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php new file mode 100644 index 000000000000..440b93574b40 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Job $response */ + $response = $transcoderServiceClient->getJob($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 = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + + get_job_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_GetJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php new file mode 100644 index 000000000000..713e96f0a4d4 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var JobTemplate $response */ + $response = $transcoderServiceClient->getJobTemplate($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 = TranscoderServiceClient::jobTemplateName( + '[PROJECT]', + '[LOCATION]', + '[JOB_TEMPLATE]' + ); + + get_job_template_sample($formattedName); +} +// [END transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php new file mode 100644 index 000000000000..b031446bb98c --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $transcoderServiceClient->listJobTemplates($request); + + /** @var JobTemplate $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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_job_templates_sample($formattedParent); +} +// [END transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php new file mode 100644 index 000000000000..ff6f16808a03 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $transcoderServiceClient->listJobs($request); + + /** @var Job $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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_jobs_sample($formattedParent); +} +// [END transcoder_v1_generated_TranscoderService_ListJobs_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php new file mode 100644 index 000000000000..78714f57b6b7 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php @@ -0,0 +1,476 @@ + createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createJobTemplateAsync(CreateJobTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobTemplateAsync(DeleteJobTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobTemplateAsync(GetJobTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobTemplatesAsync(ListJobTemplatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + */ +final class TranscoderServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.video.transcoder.v1.TranscoderService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'transcoder.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'transcoder.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/transcoder_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/transcoder_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/transcoder_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/transcoder_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a job + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted job resource. + */ + public static function jobName(string $project, string $location, string $job): string + { + return self::getPathTemplate('job')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a job_template + * resource. + * + * @param string $project + * @param string $location + * @param string $jobTemplate + * + * @return string The formatted job_template resource. + */ + public static function jobTemplateName(string $project, string $location, string $jobTemplate): string + { + return self::getPathTemplate('jobTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'job_template' => $jobTemplate, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - job: projects/{project}/locations/{location}/jobs/{job} + * - jobTemplate: projects/{project}/locations/{location}/jobTemplates/{job_template} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'transcoder.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a job in the specified region. + * + * The async variant is {@see TranscoderServiceClient::createJobAsync()} . + * + * @example samples/V1/TranscoderServiceClient/create_job.php + * + * @param CreateJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJob(CreateJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); + } + + /** + * Creates a job template in the specified region. + * + * The async variant is {@see TranscoderServiceClient::createJobTemplateAsync()} . + * + * @example samples/V1/TranscoderServiceClient/create_job_template.php + * + * @param CreateJobTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return JobTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function createJobTemplate(CreateJobTemplateRequest $request, array $callOptions = []): JobTemplate + { + return $this->startApiCall('CreateJobTemplate', $request, $callOptions)->wait(); + } + + /** + * Deletes a job. + * + * The async variant is {@see TranscoderServiceClient::deleteJobAsync()} . + * + * @example samples/V1/TranscoderServiceClient/delete_job.php + * + * @param DeleteJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteJob(DeleteJobRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); + } + + /** + * Deletes a job template. + * + * The async variant is {@see TranscoderServiceClient::deleteJobTemplateAsync()} . + * + * @example samples/V1/TranscoderServiceClient/delete_job_template.php + * + * @param DeleteJobTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteJobTemplate(DeleteJobTemplateRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteJobTemplate', $request, $callOptions)->wait(); + } + + /** + * Returns the job data. + * + * The async variant is {@see TranscoderServiceClient::getJobAsync()} . + * + * @example samples/V1/TranscoderServiceClient/get_job.php + * + * @param GetJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Job + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJob(GetJobRequest $request, array $callOptions = []): Job + { + return $this->startApiCall('GetJob', $request, $callOptions)->wait(); + } + + /** + * Returns the job template data. + * + * The async variant is {@see TranscoderServiceClient::getJobTemplateAsync()} . + * + * @example samples/V1/TranscoderServiceClient/get_job_template.php + * + * @param GetJobTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return JobTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getJobTemplate(GetJobTemplateRequest $request, array $callOptions = []): JobTemplate + { + return $this->startApiCall('GetJobTemplate', $request, $callOptions)->wait(); + } + + /** + * Lists job templates in the specified region. + * + * The async variant is {@see TranscoderServiceClient::listJobTemplatesAsync()} . + * + * @example samples/V1/TranscoderServiceClient/list_job_templates.php + * + * @param ListJobTemplatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listJobTemplates(ListJobTemplatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobTemplates', $request, $callOptions); + } + + /** + * Lists jobs in the specified region. + * + * The async variant is {@see TranscoderServiceClient::listJobsAsync()} . + * + * @example samples/V1/TranscoderServiceClient/list_jobs.php + * + * @param ListJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListJobs', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..83f2166d6b21 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.video.transcoder.v1", + "libraryPackage": "Google\\Cloud\\Video\\Transcoder\\V1", + "services": { + "TranscoderService": { + "clients": { + "grpc": { + "libraryClient": "TranscoderServiceGapicClient", + "rpcs": { + "CreateJob": { + "methods": [ + "createJob" + ] + }, + "CreateJobTemplate": { + "methods": [ + "createJobTemplate" + ] + }, + "DeleteJob": { + "methods": [ + "deleteJob" + ] + }, + "DeleteJobTemplate": { + "methods": [ + "deleteJobTemplate" + ] + }, + "GetJob": { + "methods": [ + "getJob" + ] + }, + "GetJobTemplate": { + "methods": [ + "getJobTemplate" + ] + }, + "ListJobTemplates": { + "methods": [ + "listJobTemplates" + ] + }, + "ListJobs": { + "methods": [ + "listJobs" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json new file mode 100644 index 000000000000..8059fa638283 --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.video.transcoder.v1.TranscoderService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "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_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 + } + }, + "methods": { + "CreateJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetJobTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListJobTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php new file mode 100644 index 000000000000..885afad568dc --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php @@ -0,0 +1,145 @@ + [ + 'google.cloud.video.transcoder.v1.TranscoderService' => [ + 'CreateJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateJobTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteJobTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetJobTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListJobTemplates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobTemplates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobTemplatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'job' => 'projects/{project}/locations/{location}/jobs/{job}', + 'jobTemplate' => 'projects/{project}/locations/{location}/jobTemplates/{job_template}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php new file mode 100644 index 000000000000..a437550fcccb --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php @@ -0,0 +1,122 @@ + [ + 'google.cloud.video.transcoder.v1.TranscoderService' => [ + 'CreateJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'body' => 'job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateJobTemplate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', + 'body' => 'job_template', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'job_template_id', + ], + ], + 'DeleteJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteJobTemplate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetJobTemplate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListJobTemplates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php new file mode 100644 index 000000000000..b5a2c2b81a2a --- /dev/null +++ b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php @@ -0,0 +1,676 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TranscoderServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TranscoderServiceClient($options); + } + + /** @test */ + public function createJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $batchModePriority = 2137003131; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $expectedResponse->setBatchModePriority($batchModePriority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJob($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.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $job = new Job(); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + try { + $gapicClient->createJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new JobTemplate(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $jobTemplate = new JobTemplate(); + $jobTemplateId = 'jobTemplateId-1231822466'; + $request = (new CreateJobTemplateRequest()) + ->setParent($formattedParent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + $response = $gapicClient->createJobTemplate($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.video.transcoder.v1.TranscoderService/CreateJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJobTemplate(); + $this->assertProtobufEquals($jobTemplate, $actualValue); + $actualValue = $actualRequestObject->getJobTemplateId(); + $this->assertProtobufEquals($jobTemplateId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $jobTemplate = new JobTemplate(); + $jobTemplateId = 'jobTemplateId-1231822466'; + $request = (new CreateJobTemplateRequest()) + ->setParent($formattedParent) + ->setJobTemplate($jobTemplate) + ->setJobTemplateId($jobTemplateId); + try { + $gapicClient->createJobTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + $gapicClient->deleteJob($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteJobRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new DeleteJobTemplateRequest()) + ->setName($formattedName); + $gapicClient->deleteJobTemplate($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new DeleteJobTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteJobTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $batchModePriority = 2137003131; + $expectedResponse = new Job(); + $expectedResponse->setName($name2); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $expectedResponse->setBatchModePriority($batchModePriority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getJob($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.video.transcoder.v1.TranscoderService/GetJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new JobTemplate(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new GetJobTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->getJobTemplate($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.video.transcoder.v1.TranscoderService/GetJobTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getJobTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); + $request = (new GetJobTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->getJobTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobTemplatesElement = new JobTemplate(); + $jobTemplates = [ + $jobTemplatesElement, + ]; + $expectedResponse = new ListJobTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobTemplates($jobTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobTemplatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listJobTemplates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobTemplates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListJobTemplatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listJobTemplates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $jobsElement = new Job(); + $jobs = [ + $jobsElement, + ]; + $expectedResponse = new ListJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setJobs($jobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $inputUri = 'inputUri1707300727'; + $outputUri = 'outputUri-1273518802'; + $templateId = 'templateId1769642752'; + $ttlAfterCompletionDays = 107576420; + $batchModePriority = 2137003131; + $expectedResponse = new Job(); + $expectedResponse->setName($name); + $expectedResponse->setInputUri($inputUri); + $expectedResponse->setOutputUri($outputUri); + $expectedResponse->setTemplateId($templateId); + $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); + $expectedResponse->setBatchModePriority($batchModePriority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $job = new Job(); + $request = (new CreateJobRequest()) + ->setParent($formattedParent) + ->setJob($job); + $response = $gapicClient->createJobAsync($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.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getJob(); + $this->assertProtobufEquals($job, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php new file mode 100644 index 000000000000..e1e496589232 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' +¸ +%google/cloud/vision/v1/geometry.protogoogle.cloud.vision.v1" +Vertex +x ( +y ("( +NormalizedVertex +x ( +y ("‡ + BoundingPoly0 +vertices ( 2.google.cloud.vision.v1.VertexE +normalized_vertices ( 2(.google.cloud.vision.v1.NormalizedVertex"+ +Position +x ( +y ( +z (Bn +com.google.cloud.vision.v1B GeometryProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpbø¢GCVNbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php new file mode 100644 index 0000000000000000000000000000000000000000..bfad39b3938cb323add4470c3d1e165ed22f2cdb GIT binary patch literal 11700 zcmcf{OK%&;xuo7hJ?NDz)3P1YYd2OLTa0BpPUScbA1jG5MKTm+#jc9Qid;&YEO*)6 zrEN7Z(Du?CiXNI%P@sqQSoGFE&}(`q&>jlpRG>K&=&eA49{YVWv&&s_*QVkizF3_7 zUh~cOo_YIT=deRArZ-eWwG>BfruUE1&Y_y_Sf*n(Og+8dZM9S@-7wo7O;@dzbh=PU zmn-$OR4CRj0IF?vt%kamJ}}J#UClIfv)jx()@;o*GLNrkw6=1f%8Fr_j^dcs3MEX4 zp|n-Iqcqg?Mm4vkI!aS*TjtSep zn|6h&qDDX)dqu-hEkn`w3aZ_(v<~d53ZQFi2dd-g5m%O9<7|FEL}l5Iw#PLCJF?f-dVA`Th(gTknrb-5!&%o*;XCv=$li3b7^)P&bF#pjl*wFrmjA9dJ6pJbavJKg6gQ$u!g5n zGK~YPYZ#hwuvh7zD<1C@J>#rv;8%{)?hMbn)@kf*gZFfgVKw!mj=GmO_2V2p#VIL{ zZXARQM?LP^I~w<|Y_sXP(>lbSWzPZ79WIkUzE7?mC+G-^40?rzs1+8XRvuqpI>o6d z9Sy=4x&n(*OXqzbT4?X`J~wy{@cjt>2i&ST*y|Bs5DU?CWt-YA2aej40|x5GQ7{e; zeIBK~58OsuOw!%~G+GKv7HSUR>myLxGbA@v{D3I|_7YZB&3qOClY zE!FPoj-84F>X>(U2x-`bdP zhMX!?@;h5nxi0s8ObDmR$?fdAByUUET7J`qH!gtK#jWgyBv)&ds#L2NrS0T|FiS`t ze#@K1a(z2FC7d8LyHd`FNKgnsDeUCyoNRJhI7Q|wx%XhBa;cKfmWq$Ebj$PNZIYnb zb(>~$;Ut+kXh0^V$-8T5^i+_`RBs8jJtc0DF^VY6k%@*0u4_0Hcv`qY##wDZ&n2;X zG3rQtjK!~K;5?u#=!Ih84w>0EyG9dYquep|BT7CIZ6P@hTm@L+9g=K;+XnDa@L}FDDK zHcr>hk_FF;Wl(QRYpPJFq$cRsSID9(94g26eUg4(BeNfxN3yPcr0UwCX*N?+us*vg zM(v>FK?--t3EQ+R^NAmw42}LaNy0u<%a5HH8v7oZx4Txy(rndFV0vf*1(E`b0ru+C zj%lk+Kb4uGsk}pkeZ6a0LHyaF@nIW>s?vM{;oUF5+^__e{yjk^Ju}Mj0EuC3cJ*e| z8Aezk3z(~967&J(v1w34OsuA(=u|nJ_^rDAt&;L>4`);J0x^+bR~S z6^Mv(PO9%pQW=H9XbCcwE8CJ>FIJP2DC15QLaAJWpHuj=RN3V}2}ahf%1(Wg3Y<(p zTuZRulpn;KKnVQg!AN#D=8kP%#Of4vE*qXP0o6_VGv8GP(~tKlk2tY24?Fs zsC|y-TRuyZHMdK-x>GHdlIJj4do1|kD~P{dsY#nswjgiNTwcm1&tpc-Lw1!n%GvrR za!MnAxSh|IY(gRqu5pRR1H4`W&*EfZTWP7R4fct3os20>sE+A*4ww1?#fITWiwZp)$_+BnR-1UV)Fg&Ox=AKs zc%ajQ2CJgsu-+h}meM#HzLXIal0bKXuBQe^CM-kKpc(Ruy^BIZd*MQ|x-rxbcgPg& zhNm-iyPW+h0yl4fK=L6-PwIY6K}oy0gOHpo0qo4hd* z$6Fz5S?94S zd+G>l7?L2NfE$2J4Hgid)0O#M2JF)dXH1!KWFq9qiJpSx4pkPfEB7u(*-yW6-y z82bhxE+H2GUXP*!M%)|xaUE`wg}~&)C57EoV)aTCsgP3ysrrtAZx5T0#A>8eAtx*T zDMl8!=c@EfYU+=>Fs2i(k}(ZiZ0>UBqU57U!gVs)V#5*~b)e6mk3w*VDv(ns1MCfP zJ2W~!C#O(G++xHvvPggTf{trTP$Kk(0#FikFwYs?_P%P-q%kIbIYCbLZ5eWkVXMNs z(2+xf?;B;guK8-@Zh`}Wb+X{Ly#XprC(BV(1`3@VN$Tc-8KA*h{NZWj$q8NAhsdq4 zYY80Nf(PK?3{Pa2oTWt;-dM;cEi3}`7Ad{!Q5%b{NnnT6i2cHi9aFdhS!i`(deKKH z#rz=h%+L>dh9i{7q7CHeZ;tg%&j>a)z08uZr`N#OX(3H97)OtM=tU z@O57p>nRID>2rPEi)6lyg2x3SP-=$Kh^$Nfp$E0p7Yg0cCJr5*qoqJBtg&&Z0Ck88 z6C8_{N{Lmk4uQ$-3LE$f_xR8bBEw0_VI}Gu!XttBRg5g<6sK{>Rlwq#?FP6!nY37} zbDcc$paTRres1KS**J9M;}Cmsu!vRSl&}pw3HqF!Vz&HFl+4kBLH~pVAS75v$RxIO z4U0r?O@IjZk;+DmI3e)&Qfu+IVxmmWgi`l{+!UM~4S4RxuSH4Ow{eCg{xwGC-7k3i z;cD~;WLh&iU58Ek+~)9N6!9X$LfCF;2j6x6K(%3FVDWHF{EIIOvK?_{y~LK@B|bf~ z_V`EqQjI8?gJxf+6IP`^}!Ui?u$p zzZ-Stkz&2H)&Ho^+4-LNIo|Uh25U-Q==*E*m3$Cpr@>fL7>qTM^>K(2*hz_paO>$ykhciITTgy#$y_UPtg_Lt`DLl^<`X0J zG+yqt;nrNH_t|LsQ_%BI`@I|ruQ_A|vs4GhJ9Om3_(c}fzz-fAxzIRF-N(91wxMg_ zO;?Ic^`!FmXyQ3C+lL?c{7Iag@SdHxud(3nbPO-}-7ERXd(Qz(T3xC_h9nvmG_0Tq z&;}H1m`j&jn}R}@J}_AEo~$53w*wEsI09?hpMxO2PsXs2RdLw9UC-A0FZUBh9s*6cSn__w@mIC7yGERiRPH7+zBE5YO)>X=I ziVVaV@mB*nc_s=deGALIfJSbMtKr)UYGe@cb@A13#AkzCg#WlTQedAfi3_)*j(sqr z1k(PJH+k~C4O;R1TKqcpdG^*2nQt(Ne34zWcmsGfP!m!6`fW@+hg;Wh2nO23+Apv# zw6vUfH(WhIy*`)5o8t9w8a<1PFnPEHN#j#=QF!z-KH6dn4#NY`J2u5Z3L0fwnM z=)Av)iDz-s+~C6Y_b4mA9j=$4Zl6cumiR_E3D0`NI4?c^JbRKq!DBDI;Psuo0?&;9 zmi^(O<8Ai7Y&46^EXU3qjf5-jff3eu_;-ee+2j%^7n(b~}_MR|a aWiNhx4}>w*YK@S`!4#4`;(bP*5%PcFh>Pa{ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php new file mode 100644 index 000000000000..802d4d50d763 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php @@ -0,0 +1,55 @@ +internalAddGeneratedFile( + ' +‡ ++google/cloud/vision/v1/product_search.protogoogle.cloud.vision.v1%google/cloud/vision/v1/geometry.proto3google/cloud/vision/v1/product_search_service.protogoogle/protobuf/timestamp.proto"º +ProductSearchParams; + bounding_poly ( 2$.google.cloud.vision.v1.BoundingPoly: + product_set ( B%úA" + vision.googleapis.com/ProductSet +product_categories (  +filter ( "ˆ +ProductSearchResults. + +index_time ( 2.google.protobuf.TimestampD +results ( 23.google.cloud.vision.v1.ProductSearchResults.Result[ +product_grouped_results ( 2:.google.cloud.vision.v1.ProductSearchResults.GroupedResultX +Result0 +product ( 2.google.cloud.vision.v1.Product +score ( +image ( S +ObjectAnnotation +mid (  + language_code (  +name (  +score (í + GroupedResult; + bounding_poly ( 2$.google.cloud.vision.v1.BoundingPolyD +results ( 23.google.cloud.vision.v1.ProductSearchResults.ResultY +object_annotations ( 2=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs +com.google.cloud.vision.v1BProductSearchProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpbø¢GCVNbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php new file mode 100644 index 0000000000000000000000000000000000000000..a2052af7103dc35ac3fb825fb164097d7ea0c35b GIT binary patch literal 9855 zcmc&)&2QXV6|a+~FTF|I^fpb>l&Y@V*O!KLhE85Tn7n>ClaGd%CTWruJvw6K%-l@; zIbeA2Emh9WCIIUUB3k&@p0~#$M%dHPg)?G zc5)=iGaa{oZY7!$IfOSz-~_@JU5o+gAMzqB^ea+hx0^uGQDqiK~|FO~0Xki|WGSsyaP2w|WkSdUo9{le}8B?P`r=%Qd@R$!?jRX$$P{%Du!~67B^L?8mQpgV4C8bEZFdPo^Z6?A1EbPABbUUo zbUJfg9pO6W^G!WPO)$Ob1Utc1v4!Du$1LiWWm7BImY2^rFg2z~ z8d#{A#PZu4Gh>okWs+%kK!q*DhMOQ&I_?xgB4jjV1*DmErc8q_*p{zE*{F<7d+&e zZi07(goF`D_|kK=cf{k#Lc1&*gV6!)ToG+_=YsxopI_oLp5={YrH zyTtBxu)8NvPer66AoWluyLkrn!OAQTmm$knZFhUd6gD;Gh7@^O+#zsKq+*80z7Ji0j%evt>^X%TeIO3=cLYo!@w=6QsTp zHPu#c6F7`%V27O*@c&CeN0$j~*aUX4xlN-=Vx;Lqopsmb-k{2LU>zM@v+Gs`l3~fQ zYug^!fI9zzL=%hE%%qTB0%1CZlK)6~sefHT7g{5X=~FDW3A2H5C+kMA!IR)d$)sp^ zv>z&{zu*#Jx!}Pv`BELSCH^cr90(_Zub^(Bqz8tfj^7I$9z@41^3*Sd)?m@C-9^V|iNq$Mjfa!g8fjX8UtoTw zpuq?wA#kO2UW1kIp&m&uh~D20@>pfe=qX{C~*N8X9a`ThR0d z>J5RFR84_4nXL<`zrj`jDqV6dLf8>TSZ(k0t$hS;j*vDqXUtceyD7BaCw=du!3cdr zn(PWk?unVk|oZlOqv^vq6y+Cwx1gpV3Rx-TCg{TL(t#dJHm_5nK0 z+4knA{+5EyKrJG+%T-%kygr}twdkIHIPK2#T?J{&WYgY~ThokdZ~p()`ig?ihH|Gj zXT3R{T5zn@3By8avIhT!(?$*r&uu!kD-Rq%3U9XTt+0L+t&YmxR%soI*AhMPvYJVA z(Wjcm%vny|FWA<)S;cn|s+PSHZ%ME*J-J*`CTf}~SpDvS$!>Ir&!YWAK|@WVGVWeu z|6fGCCRM#uX1a^K`EF`$L%3NM)xM^nQ!NyIW4Y=A>gJ^_@jzL6)ND~PY2WWa1Cxed z-UvD~vM-1WsEba(3*e)A0n3X)F9Wm%a(oyuUFT>T8S!{S2DN^5LUB{-uJBg;FaOz?mdSF+qta(F9HMJl?fC zySgZt8HOvkT@3g~3OW)wVdJqRr6Xceh~5so^kR|*EO zkoyg|KN3jE?vIG2*6z`+enLdrSUk#Z=iUuRS(*r=N;e4bZO}dvFv;3S#H98~K@~OW zD0g*Qlm0zudPYkyJf7rq9#~Onsbb376V8jf`Xv!(u58TmKI~ZRx7-QuYq$1}JDH=Y z;o}|Oe7s$Ne*xIJrK4z)vA2?z*pu9IFU;;ywJyARm&$7*mU1yugJ#2jRi)~3GLe6i91@tn5;P? z{COl&hbHft5wVnTpT5wcG#0O_qi0o|h%{W=T-S1Kfb;UKUIt*pTQBsJEnj;6QGc}I z`;M2-W}iHHBD@v6STySX2LDj%GQ7U`p|sr`ODE13n|y|b;f=W@LG0u?d1{H55Rnh0 z;GSnMbVIXhcI|vuWUZG}H)bbxEh&Cwl9oe;-pLHVbW9BV)$K9m#WH*%R@xj3kB`kD_--)G$9xTHy70N)W*afW(+0b}wK^|A-_-8A1_MV{qbg8v3R;Xwk?H-GH;uz|dN4O!-nru~L4p z*jB)~BT|lQtkvEq@`&(oMz8NqNJ#lC^bcj-0^oA_H28PP2FH|5DG%qh+7-DgEXnQB zQ+L6n?l{ZBzrrq;ms^RA_u;n!JiJYN)equmO`1WA&7fTzlzvP@VYP|sr;rKEF^zT< zvQf@gKh)lysu>uhZb4f3X(vULa&GqsiY>~ijkax@{&*%L-iK{(@jSGdLlG83RTVA7 z{E_QWY_m*H?f$92c9P!+srgcEBm6vwa|+d`>q=Q=psiqN5~+_U>bsCbGX^0Yxv%Ax znEdiw-rC$_C%MR}G5ck-la{XgXx$zS5p}~o8H7lc{z^e6e)~U_T!Sr(&3wo8$3u(7j>%W|)>gKN zHJCS7p8y1AXpTcOm_*1?d`b7$Wg1DOipP_bVJKanMqY*LV1HenWUI;l(%-A!RIEx5 z4K5^;0V@XIgmhp3rjPzctM}`Twq8uB7-5_=`{?%KhFI^Nwe=oa8rK{3UbEZMi<#0N z3goV8z5{CGk@bp&P9pT$BkKhQ-SCdkI92)`-7a6=0WuZ17tN;@^Ab8Auj~J*40|h~ zpB2b1Uf%&q$&?V^`pu(XHlV>_7cVqxh&J9^J>ccwHinternalAddGeneratedFile( + ' +— +*google/cloud/vision/v1/web_detection.protogoogle.cloud.vision.v1"Ô + WebDetectionD + web_entities ( 2..google.cloud.vision.v1.WebDetection.WebEntityK +full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN +partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageP +pages_with_matching_images ( 2,.google.cloud.vision.v1.WebDetection.WebPageN +visually_similar_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageH +best_guess_labels ( 2-.google.cloud.vision.v1.WebDetection.WebLabelB + WebEntity + entity_id (  +score ( + description ( & +WebImage +url (  +score (Ö +WebPage +url (  +score ( + +page_title ( K +full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN +partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImage0 +WebLabel +label (  + language_code ( Br +com.google.cloud.vision.v1BWebDetectionProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpbø¢GCVNbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php new file mode 100644 index 000000000000..576f4d539fe8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php @@ -0,0 +1,140 @@ +google.cloud.vision.v1.AddProductToProductSetRequest + */ +class AddProductToProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $product = ''; + + /** + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * @param string $product Required. The resource name for the Product to be added to this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\AddProductToProductSetRequest + * + * @experimental + */ + public static function build(string $name, string $product): self + { + return (new self()) + ->setName($name) + ->setProduct($product); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @type string $product + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProduct() + { + return $this->product; + } + + /** + * Required. The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkString($var, True); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php new file mode 100644 index 000000000000..99467c0d102c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php @@ -0,0 +1,225 @@ +google.cloud.vision.v1.AnnotateFileRequest + */ +class AnnotateFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + */ + protected $input_config = null; + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + */ + private $features; + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + */ + protected $image_context = null; + /** + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * + * Generated from protobuf field repeated int32 pages = 4; + */ + private $pages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\InputConfig $input_config + * Required. Information about the input file. + * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Required. Requested features. + * @type \Google\Cloud\Vision\V1\ImageContext $image_context + * Additional context that may accompany the image(s) in the file. + * @type array|\Google\Protobuf\Internal\RepeatedField $pages + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @return \Google\Cloud\Vision\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @param \Google\Cloud\Vision\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @return \Google\Cloud\Vision\V1\ImageContext|null + */ + public function getImageContext() + { + return $this->image_context; + } + + public function hasImageContext() + { + return isset($this->image_context); + } + + public function clearImageContext() + { + unset($this->image_context); + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @param \Google\Cloud\Vision\V1\ImageContext $var + * @return $this + */ + public function setImageContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); + $this->image_context = $var; + + return $this; + } + + /** + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * + * Generated from protobuf field repeated int32 pages = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPages() + { + return $this->pages; + } + + /** + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + * + * Generated from protobuf field repeated int32 pages = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->pages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php new file mode 100644 index 000000000000..92682231fc13 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php @@ -0,0 +1,198 @@ +google.cloud.vision.v1.AnnotateFileResponse + */ +class AnnotateFileResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the file for which this response is generated. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + */ + protected $input_config = null; + /** + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + */ + private $responses; + /** + * This field gives the total number of pages in the file. + * + * Generated from protobuf field int32 total_pages = 3; + */ + protected $total_pages = 0; + /** + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * Generated from protobuf field .google.rpc.Status error = 4; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\InputConfig $input_config + * Information about the file for which this response is generated. + * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * @type int $total_pages + * This field gives the total number of pages in the file. + * @type \Google\Rpc\Status $error + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Information about the file for which this response is generated. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @return \Google\Cloud\Vision\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Information about the file for which this response is generated. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @param \Google\Cloud\Vision\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Individual responses to images found within the file. This field will be + * empty if the `error` field is set. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); + $this->responses = $arr; + + return $this; + } + + /** + * This field gives the total number of pages in the file. + * + * Generated from protobuf field int32 total_pages = 3; + * @return int + */ + public function getTotalPages() + { + return $this->total_pages; + } + + /** + * This field gives the total number of pages in the file. + * + * Generated from protobuf field int32 total_pages = 3; + * @param int $var + * @return $this + */ + public function setTotalPages($var) + { + GPBUtil::checkInt32($var); + $this->total_pages = $var; + + return $this; + } + + /** + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If set, represents the error message for the failed request. The + * `responses` field will not be set in this case. + * + * 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->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php new file mode 100644 index 000000000000..87da32a59c91 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php @@ -0,0 +1,156 @@ +google.cloud.vision.v1.AnnotateImageRequest + */ +class AnnotateImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The image to be processed. + * + * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; + */ + protected $image = null; + /** + * Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + */ + private $features; + /** + * Additional context that may accompany the image. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + */ + protected $image_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\Image $image + * The image to be processed. + * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Requested features. + * @type \Google\Cloud\Vision\V1\ImageContext $image_context + * Additional context that may accompany the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The image to be processed. + * + * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; + * @return \Google\Cloud\Vision\V1\Image|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * The image to be processed. + * + * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; + * @param \Google\Cloud\Vision\V1\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Image::class); + $this->image = $var; + + return $this; + } + + /** + * Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional context that may accompany the image. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @return \Google\Cloud\Vision\V1\ImageContext|null + */ + public function getImageContext() + { + return $this->image_context; + } + + public function hasImageContext() + { + return isset($this->image_context); + } + + public function clearImageContext() + { + unset($this->image_context); + } + + /** + * Additional context that may accompany the image. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @param \Google\Cloud\Vision\V1\ImageContext $var + * @return $this + */ + public function setImageContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); + $this->image_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php new file mode 100644 index 000000000000..5da367298068 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php @@ -0,0 +1,617 @@ +google.cloud.vision.v1.AnnotateImageResponse + */ +class AnnotateImageResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If present, face detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + */ + private $face_annotations; + /** + * If present, landmark detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + */ + private $landmark_annotations; + /** + * If present, logo detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + */ + private $logo_annotations; + /** + * If present, label detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + */ + private $label_annotations; + /** + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + */ + private $localized_object_annotations; + /** + * If present, text (OCR) detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + */ + private $text_annotations; + /** + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + */ + protected $full_text_annotation = null; + /** + * If present, safe-search annotation has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + */ + protected $safe_search_annotation = null; + /** + * If present, image properties were extracted successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + */ + protected $image_properties_annotation = null; + /** + * If present, crop hints have completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + */ + protected $crop_hints_annotation = null; + /** + * If present, web detection has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; + */ + protected $web_detection = null; + /** + * If present, product search has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + */ + protected $product_search_results = null; + /** + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * + * Generated from protobuf field .google.rpc.Status error = 9; + */ + protected $error = null; + /** + * If present, contextual information is needed to understand where this image + * comes from. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_annotations + * If present, face detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $landmark_annotations + * If present, landmark detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $logo_annotations + * If present, logo detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $label_annotations + * If present, label detection has completed successfully. + * @type array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $localized_object_annotations + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $text_annotations + * If present, text (OCR) detection has completed successfully. + * @type \Google\Cloud\Vision\V1\TextAnnotation $full_text_annotation + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * @type \Google\Cloud\Vision\V1\SafeSearchAnnotation $safe_search_annotation + * If present, safe-search annotation has completed successfully. + * @type \Google\Cloud\Vision\V1\ImageProperties $image_properties_annotation + * If present, image properties were extracted successfully. + * @type \Google\Cloud\Vision\V1\CropHintsAnnotation $crop_hints_annotation + * If present, crop hints have completed successfully. + * @type \Google\Cloud\Vision\V1\WebDetection $web_detection + * If present, web detection has completed successfully. + * @type \Google\Cloud\Vision\V1\ProductSearchResults $product_search_results + * If present, product search has completed successfully. + * @type \Google\Rpc\Status $error + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * @type \Google\Cloud\Vision\V1\ImageAnnotationContext $context + * If present, contextual information is needed to understand where this image + * comes from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * If present, face detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFaceAnnotations() + { + return $this->face_annotations; + } + + /** + * If present, face detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; + * @param array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFaceAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation::class); + $this->face_annotations = $arr; + + return $this; + } + + /** + * If present, landmark detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLandmarkAnnotations() + { + return $this->landmark_annotations; + } + + /** + * If present, landmark detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLandmarkAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->landmark_annotations = $arr; + + return $this; + } + + /** + * If present, logo detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLogoAnnotations() + { + return $this->logo_annotations; + } + + /** + * If present, logo detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLogoAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->logo_annotations = $arr; + + return $this; + } + + /** + * If present, label detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabelAnnotations() + { + return $this->label_annotations; + } + + /** + * If present, label detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabelAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->label_annotations = $arr; + + return $this; + } + + /** + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocalizedObjectAnnotations() + { + return $this->localized_object_annotations; + } + + /** + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; + * @param array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocalizedObjectAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocalizedObjectAnnotation::class); + $this->localized_object_annotations = $arr; + + return $this; + } + + /** + * If present, text (OCR) detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTextAnnotations() + { + return $this->text_annotations; + } + + /** + * If present, text (OCR) detection has completed successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; + * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTextAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); + $this->text_annotations = $arr; + + return $this; + } + + /** + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @return \Google\Cloud\Vision\V1\TextAnnotation|null + */ + public function getFullTextAnnotation() + { + return $this->full_text_annotation; + } + + public function hasFullTextAnnotation() + { + return isset($this->full_text_annotation); + } + + public function clearFullTextAnnotation() + { + unset($this->full_text_annotation); + } + + /** + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; + * @param \Google\Cloud\Vision\V1\TextAnnotation $var + * @return $this + */ + public function setFullTextAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation::class); + $this->full_text_annotation = $var; + + return $this; + } + + /** + * If present, safe-search annotation has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @return \Google\Cloud\Vision\V1\SafeSearchAnnotation|null + */ + public function getSafeSearchAnnotation() + { + return $this->safe_search_annotation; + } + + public function hasSafeSearchAnnotation() + { + return isset($this->safe_search_annotation); + } + + public function clearSafeSearchAnnotation() + { + unset($this->safe_search_annotation); + } + + /** + * If present, safe-search annotation has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; + * @param \Google\Cloud\Vision\V1\SafeSearchAnnotation $var + * @return $this + */ + public function setSafeSearchAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\SafeSearchAnnotation::class); + $this->safe_search_annotation = $var; + + return $this; + } + + /** + * If present, image properties were extracted successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @return \Google\Cloud\Vision\V1\ImageProperties|null + */ + public function getImagePropertiesAnnotation() + { + return $this->image_properties_annotation; + } + + public function hasImagePropertiesAnnotation() + { + return isset($this->image_properties_annotation); + } + + public function clearImagePropertiesAnnotation() + { + unset($this->image_properties_annotation); + } + + /** + * If present, image properties were extracted successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; + * @param \Google\Cloud\Vision\V1\ImageProperties $var + * @return $this + */ + public function setImagePropertiesAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageProperties::class); + $this->image_properties_annotation = $var; + + return $this; + } + + /** + * If present, crop hints have completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @return \Google\Cloud\Vision\V1\CropHintsAnnotation|null + */ + public function getCropHintsAnnotation() + { + return $this->crop_hints_annotation; + } + + public function hasCropHintsAnnotation() + { + return isset($this->crop_hints_annotation); + } + + public function clearCropHintsAnnotation() + { + unset($this->crop_hints_annotation); + } + + /** + * If present, crop hints have completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; + * @param \Google\Cloud\Vision\V1\CropHintsAnnotation $var + * @return $this + */ + public function setCropHintsAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsAnnotation::class); + $this->crop_hints_annotation = $var; + + return $this; + } + + /** + * If present, web detection has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; + * @return \Google\Cloud\Vision\V1\WebDetection|null + */ + public function getWebDetection() + { + return $this->web_detection; + } + + public function hasWebDetection() + { + return isset($this->web_detection); + } + + public function clearWebDetection() + { + unset($this->web_detection); + } + + /** + * If present, web detection has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; + * @param \Google\Cloud\Vision\V1\WebDetection $var + * @return $this + */ + public function setWebDetection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetection::class); + $this->web_detection = $var; + + return $this; + } + + /** + * If present, product search has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @return \Google\Cloud\Vision\V1\ProductSearchResults|null + */ + public function getProductSearchResults() + { + return $this->product_search_results; + } + + public function hasProductSearchResults() + { + return isset($this->product_search_results); + } + + public function clearProductSearchResults() + { + unset($this->product_search_results); + } + + /** + * If present, product search has completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; + * @param \Google\Cloud\Vision\V1\ProductSearchResults $var + * @return $this + */ + public function setProductSearchResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchResults::class); + $this->product_search_results = $var; + + return $this; + } + + /** + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * + * Generated from protobuf field .google.rpc.Status error = 9; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + * + * Generated from protobuf field .google.rpc.Status error = 9; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * If present, contextual information is needed to understand where this image + * comes from. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @return \Google\Cloud\Vision\V1\ImageAnnotationContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * If present, contextual information is needed to understand where this image + * comes from. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; + * @param \Google\Cloud\Vision\V1\ImageAnnotationContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageAnnotationContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php new file mode 100644 index 000000000000..c1ebfd6cc6dc --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php @@ -0,0 +1,199 @@ +google.cloud.vision.v1.AsyncAnnotateFileRequest + */ +class AsyncAnnotateFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + */ + protected $input_config = null; + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + */ + private $features; + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + */ + protected $image_context = null; + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\InputConfig $input_config + * Required. Information about the input file. + * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features + * Required. Requested features. + * @type \Google\Cloud\Vision\V1\ImageContext $image_context + * Additional context that may accompany the image(s) in the file. + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * Required. The desired output location and metadata (e.g. format). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @return \Google\Cloud\Vision\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input file. + * + * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; + * @param \Google\Cloud\Vision\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFeatures() + { + return $this->features; + } + + /** + * Required. Requested features. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; + * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); + $this->features = $arr; + + return $this; + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @return \Google\Cloud\Vision\V1\ImageContext|null + */ + public function getImageContext() + { + return $this->image_context; + } + + public function hasImageContext() + { + return isset($this->image_context); + } + + public function clearImageContext() + { + unset($this->image_context); + } + + /** + * Additional context that may accompany the image(s) in the file. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; + * @param \Google\Cloud\Vision\V1\ImageContext $var + * @return $this + */ + public function setImageContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); + $this->image_context = $var; + + return $this; + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php new file mode 100644 index 000000000000..1dbad5e843de --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.AsyncAnnotateFileResponse + */ +class AsyncAnnotateFileResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The output location and metadata from AsyncAnnotateFileRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * The output location and metadata from AsyncAnnotateFileRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The output location and metadata from AsyncAnnotateFileRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * The output location and metadata from AsyncAnnotateFileRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php new file mode 100644 index 000000000000..c67b7e2781f6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php @@ -0,0 +1,193 @@ +google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest + */ +class AsyncBatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Individual async file annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * @param \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. + * + * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. Individual async file annotation requests for this batch. + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Individual async file annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Individual async file annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.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; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php new file mode 100644 index 000000000000..475b70528eef --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php @@ -0,0 +1,71 @@ +google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse + */ +class AsyncBatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; + * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php new file mode 100644 index 000000000000..e94ee1855b9d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php @@ -0,0 +1,238 @@ +google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest + */ +class AsyncBatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param \Google\Cloud\Vision\V1\OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). + * + * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest + * + * @experimental + */ + public static function build(array $requests, \Google\Cloud\Vision\V1\OutputConfig $outputConfig): self + { + return (new self()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. Individual image annotation requests for this batch. + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * Required. The desired output location and metadata (e.g. format). + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location and metadata (e.g. format). + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.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; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php new file mode 100644 index 000000000000..6a424d1a37ce --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse + */ +class AsyncBatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\OutputConfig $output_config + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @return \Google\Cloud\Vision\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * The output location and metadata from AsyncBatchAnnotateImagesRequest. + * + * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; + * @param \Google\Cloud\Vision\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php new file mode 100644 index 000000000000..320d89e0dcab --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php @@ -0,0 +1,197 @@ +google.cloud.vision.v1.BatchAnnotateFilesRequest + */ +class BatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The list of file annotation requests. Right now we support only + * one AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 3; + */ + protected $parent = ''; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * @param \Google\Cloud\Vision\V1\AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only + * one AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The list of file annotation requests. Right now we support only + * one AnnotateFileRequest in BatchAnnotateFilesRequest. + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. The list of file annotation requests. Right now we support only + * one AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The list of file annotation requests. Right now we support only + * one AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 3; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 3; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.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; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php new file mode 100644 index 000000000000..2a6384a5d6a3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php @@ -0,0 +1,71 @@ +google.cloud.vision.v1.BatchAnnotateFilesResponse + */ +class BatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * The list of file annotation responses, each response corresponding to each + * AnnotateFileRequest in BatchAnnotateFilesRequest. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; + * @param array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php new file mode 100644 index 000000000000..33b0dd8968cc --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php @@ -0,0 +1,192 @@ +google.cloud.vision.v1.BatchAnnotateImagesRequest + */ +class BatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesRequest + * + * @experimental + */ + public static function build(array $requests): self + { + return (new self()) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. Individual image annotation requests for this batch. + * @type string $parent + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. Individual image annotation requests for this batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Optional. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no parent is specified, a region will be chosen automatically. + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * Example: `projects/project-A/locations/eu`. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * + * Generated from protobuf field map labels = 5 [(.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; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php new file mode 100644 index 000000000000..94a35240ca6f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.BatchAnnotateImagesResponse + */ +class BatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Individual responses to image annotation requests within the batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + */ + private $responses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses + * Individual responses to image annotation requests within the batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Individual responses to image annotation requests within the batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResponses() + { + return $this->responses; + } + + /** + * Individual responses to image annotation requests within the batch. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; + * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResponses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); + $this->responses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php new file mode 100644 index 000000000000..e9dd818df673 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php @@ -0,0 +1,165 @@ +google.cloud.vision.v1.BatchOperationMetadata + */ +class BatchOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * The time when the batch request was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + */ + protected $submit_time = null; + /** + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * 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 $state + * The current state of the batch operation. + * @type \Google\Protobuf\Timestamp $submit_time + * The time when the batch request was submitted to the server. + * @type \Google\Protobuf\Timestamp $end_time + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\BatchOperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the batch request was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSubmitTime() + { + return $this->submit_time; + } + + public function hasSubmitTime() + { + return isset($this->submit_time); + } + + public function clearSubmitTime() + { + unset($this->submit_time); + } + + /** + * The time when the batch request was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSubmitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->submit_time = $var; + + return $this; + } + + /** + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time when the batch request is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php new file mode 100644 index 000000000000..cba5eccd4849 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php @@ -0,0 +1,81 @@ +google.cloud.vision.v1.BatchOperationMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is actively being processed. + * + * Generated from protobuf enum PROCESSING = 1; + */ + const PROCESSING = 1; + /** + * The request is done and at least one item has been successfully + * processed. + * + * Generated from protobuf enum SUCCESSFUL = 2; + */ + const SUCCESSFUL = 2; + /** + * The request is done and no item has been successfully processed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The request is done after the longrunning.Operations.CancelOperation has + * been called by the user. Any records that were processed before the + * cancel command are output as specified in the request. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROCESSING => 'PROCESSING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Vision\V1\BatchOperationMetadata_State::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php new file mode 100644 index 000000000000..d53227721f64 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php @@ -0,0 +1,279 @@ +google.cloud.vision.v1.Block + */ +class Block extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the block. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * List of paragraphs in this block (if this blocks is of type text). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + */ + private $paragraphs; + /** + * Detected block type (text, image etc) for this block. + * + * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; + */ + protected $block_type = 0; + /** + * Confidence of the OCR results on the block. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the block. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $paragraphs + * List of paragraphs in this block (if this blocks is of type text). + * @type int $block_type + * Detected block type (text, image etc) for this block. + * @type float $confidence + * Confidence of the OCR results on the block. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the block. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the block. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the block. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * List of paragraphs in this block (if this blocks is of type text). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParagraphs() + { + return $this->paragraphs; + } + + /** + * List of paragraphs in this block (if this blocks is of type text). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; + * @param array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParagraphs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Paragraph::class); + $this->paragraphs = $arr; + + return $this; + } + + /** + * Detected block type (text, image etc) for this block. + * + * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @return int + */ + public function getBlockType() + { + return $this->block_type; + } + + /** + * Detected block type (text, image etc) for this block. + * + * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; + * @param int $var + * @return $this + */ + public function setBlockType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Block\BlockType::class); + $this->block_type = $var; + + return $this; + } + + /** + * Confidence of the OCR results on the block. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results on the block. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php new file mode 100644 index 000000000000..eefde91942e3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php @@ -0,0 +1,85 @@ +google.cloud.vision.v1.Block.BlockType + */ +class BlockType +{ + /** + * Unknown block type. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Regular text block. + * + * Generated from protobuf enum TEXT = 1; + */ + const TEXT = 1; + /** + * Table block. + * + * Generated from protobuf enum TABLE = 2; + */ + const TABLE = 2; + /** + * Image block. + * + * Generated from protobuf enum PICTURE = 3; + */ + const PICTURE = 3; + /** + * Horizontal/vertical line box. + * + * Generated from protobuf enum RULER = 4; + */ + const RULER = 4; + /** + * Barcode block. + * + * Generated from protobuf enum BARCODE = 5; + */ + const BARCODE = 5; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::TEXT => 'TEXT', + self::TABLE => 'TABLE', + self::PICTURE => 'PICTURE', + self::RULER => 'RULER', + self::BARCODE => 'BARCODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BlockType::class, \Google\Cloud\Vision\V1\Block_BlockType::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php new file mode 100644 index 000000000000..7bc296abfa82 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php @@ -0,0 +1,101 @@ +google.cloud.vision.v1.BoundingPoly + */ +class BoundingPoly extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; + */ + private $vertices; + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + */ + private $normalized_vertices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $vertices + * The bounding polygon vertices. + * @type array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $normalized_vertices + * The bounding polygon normalized vertices. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVertices() + { + return $this->vertices; + } + + /** + * The bounding polygon vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; + * @param array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Vertex::class); + $this->vertices = $arr; + + return $this; + } + + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNormalizedVertices() + { + return $this->normalized_vertices; + } + + /** + * The bounding polygon normalized vertices. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; + * @param array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNormalizedVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\NormalizedVertex::class); + $this->normalized_vertices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php new file mode 100644 index 000000000000..545a5de76ace --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php @@ -0,0 +1,150 @@ +google.cloud.vision.v1.ColorInfo + */ +class ColorInfo extends \Google\Protobuf\Internal\Message +{ + /** + * RGB components of the color. + * + * Generated from protobuf field .google.type.Color color = 1; + */ + protected $color = null; + /** + * Image-specific score for this color. Value in range [0, 1]. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * + * Generated from protobuf field float pixel_fraction = 3; + */ + protected $pixel_fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Color $color + * RGB components of the color. + * @type float $score + * Image-specific score for this color. Value in range [0, 1]. + * @type float $pixel_fraction + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * RGB components of the color. + * + * Generated from protobuf field .google.type.Color color = 1; + * @return \Google\Type\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * RGB components of the color. + * + * Generated from protobuf field .google.type.Color color = 1; + * @param \Google\Type\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Image-specific score for this color. Value in range [0, 1]. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Image-specific score for this color. Value in range [0, 1]. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * + * Generated from protobuf field float pixel_fraction = 3; + * @return float + */ + public function getPixelFraction() + { + return $this->pixel_fraction; + } + + /** + * The fraction of pixels the color occupies in the image. + * Value in range [0, 1]. + * + * Generated from protobuf field float pixel_fraction = 3; + * @param float $var + * @return $this + */ + public function setPixelFraction($var) + { + GPBUtil::checkFloat($var); + $this->pixel_fraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php new file mode 100644 index 000000000000..fbb905a23ca3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php @@ -0,0 +1,189 @@ +google.cloud.vision.v1.CreateProductRequest + */ +class CreateProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The product to create. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product = null; + /** + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_id = 3; + */ + protected $product_id = ''; + + /** + * @param string $parent Required. The project in which the Product should be created. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\Product $product Required. The product to create. + * @param string $productId A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateProductRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\Product $product, string $productId): self + { + return (new self()) + ->setParent($parent) + ->setProduct($product) + ->setProductId($productId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * @type \Google\Cloud\Vision\V1\Product $product + * Required. The product to create. + * @type string $product_id + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_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 in which the Product should be created. + * Format is + * `projects/PROJECT_ID/locations/LOC_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 product to create. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Required. The product to create. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_id = 3; + * @return string + */ + public function getProductId() + { + return $this->product_id; + } + + /** + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_id = 3; + * @param string $var + * @return $this + */ + public function setProductId($var) + { + GPBUtil::checkString($var, True); + $this->product_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php new file mode 100644 index 000000000000..06f5ef2cf0cb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php @@ -0,0 +1,184 @@ +google.cloud.vision.v1.CreateProductSetRequest + */ +class CreateProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ProductSet to create. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product_set = null; + /** + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_set_id = 3; + */ + protected $product_set_id = ''; + + /** + * @param string $parent Required. The project in which the ProductSet should be created. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet to create. + * @param string $productSetId A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateProductSetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ProductSet $productSet, string $productSetId): self + { + return (new self()) + ->setParent($parent) + ->setProductSet($productSet) + ->setProductSetId($productSetId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type \Google\Cloud\Vision\V1\ProductSet $product_set + * Required. The ProductSet to create. + * @type string $product_set_id + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_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 in which the ProductSet should be created. + * Format is `projects/PROJECT_ID/locations/LOC_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 ProductSet to create. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ProductSet|null + */ + public function getProductSet() + { + return $this->product_set; + } + + public function hasProductSet() + { + return isset($this->product_set); + } + + public function clearProductSet() + { + unset($this->product_set); + } + + /** + * Required. The ProductSet to create. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ProductSet $var + * @return $this + */ + public function setProductSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); + $this->product_set = $var; + + return $this; + } + + /** + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_set_id = 3; + * @return string + */ + public function getProductSetId() + { + return $this->product_set_id; + } + + /** + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * + * Generated from protobuf field string product_set_id = 3; + * @param string $var + * @return $this + */ + public function setProductSetId($var) + { + GPBUtil::checkString($var, True); + $this->product_set_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php new file mode 100644 index 000000000000..ccc3b85c92ac --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php @@ -0,0 +1,199 @@ +google.cloud.vision.v1.CreateReferenceImageRequest + */ +class CreateReferenceImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the product in which to create the reference + * image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * + * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference_image = null; + /** + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * Generated from protobuf field string reference_image_id = 3; + */ + protected $reference_image_id = ''; + + /** + * @param string $parent Required. Resource name of the product in which to create the reference + * image. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see + * {@see ProductSearchClient::productName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ReferenceImage $referenceImage Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @param string $referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * @return \Google\Cloud\Vision\V1\CreateReferenceImageRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ReferenceImage $referenceImage, string $referenceImageId): self + { + return (new self()) + ->setParent($parent) + ->setReferenceImage($referenceImage) + ->setReferenceImageId($referenceImageId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the product in which to create the reference + * image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @type \Google\Cloud\Vision\V1\ReferenceImage $reference_image + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @type string $reference_image_id + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the product in which to create the reference + * image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of the product in which to create the reference + * image. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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 reference image to create. + * If an image ID is specified, it is ignored. + * + * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ReferenceImage|null + */ + public function getReferenceImage() + { + return $this->reference_image; + } + + public function hasReferenceImage() + { + return isset($this->reference_image); + } + + public function clearReferenceImage() + { + unset($this->reference_image); + } + + /** + * Required. The reference image to create. + * If an image ID is specified, it is ignored. + * + * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ReferenceImage $var + * @return $this + */ + public function setReferenceImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ReferenceImage::class); + $this->reference_image = $var; + + return $this; + } + + /** + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * Generated from protobuf field string reference_image_id = 3; + * @return string + */ + public function getReferenceImageId() + { + return $this->reference_image_id; + } + + /** + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * + * Generated from protobuf field string reference_image_id = 3; + * @param string $var + * @return $this + */ + public function setReferenceImageId($var) + { + GPBUtil::checkString($var, True); + $this->reference_image_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php new file mode 100644 index 000000000000..34593cd6e194 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php @@ -0,0 +1,153 @@ +google.cloud.vision.v1.CropHint + */ +class CropHint extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + protected $bounding_poly = null; + /** + * Confidence of this being a salient region. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + /** + * Fraction of importance of this salient region with respect to the original + * image. + * + * Generated from protobuf field float importance_fraction = 3; + */ + protected $importance_fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * @type float $confidence + * Confidence of this being a salient region. Range [0, 1]. + * @type float $importance_fraction + * Fraction of importance of this salient region with respect to the original + * image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon for the crop region. The coordinates of the bounding + * box are in the original image's scale. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * Confidence of this being a salient region. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of this being a salient region. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * Fraction of importance of this salient region with respect to the original + * image. + * + * Generated from protobuf field float importance_fraction = 3; + * @return float + */ + public function getImportanceFraction() + { + return $this->importance_fraction; + } + + /** + * Fraction of importance of this salient region with respect to the original + * image. + * + * Generated from protobuf field float importance_fraction = 3; + * @param float $var + * @return $this + */ + public function setImportanceFraction($var) + { + GPBUtil::checkFloat($var); + $this->importance_fraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php new file mode 100644 index 000000000000..7edebe86ec09 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.CropHintsAnnotation + */ +class CropHintsAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Crop hint results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + */ + private $crop_hints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $crop_hints + * Crop hint results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Crop hint results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCropHints() + { + return $this->crop_hints; + } + + /** + * Crop hint results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; + * @param array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCropHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\CropHint::class); + $this->crop_hints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php new file mode 100644 index 000000000000..a1cc403bdb2e --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php @@ -0,0 +1,87 @@ +google.cloud.vision.v1.CropHintsParams + */ +class CropHintsParams extends \Google\Protobuf\Internal\Message +{ + /** + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * + * Generated from protobuf field repeated float aspect_ratios = 1; + */ + private $aspect_ratios; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_ratios + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * + * Generated from protobuf field repeated float aspect_ratios = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAspectRatios() + { + return $this->aspect_ratios; + } + + /** + * Aspect ratios in floats, representing the ratio of the width to the height + * of the image. For example, if the desired aspect ratio is 4/3, the + * corresponding float value should be 1.33333. If not specified, the + * best possible crop is returned. The number of provided aspect ratios is + * limited to a maximum of 16; any aspect ratios provided after the 16th are + * ignored. + * + * Generated from protobuf field repeated float aspect_ratios = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAspectRatios($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->aspect_ratios = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php new file mode 100644 index 000000000000..744dae5b2622 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.DeleteProductRequest + */ +class DeleteProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of product to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteProductRequest + * + * @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. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of product to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php new file mode 100644 index 000000000000..aa0ce3fb5abb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.DeleteProductSetRequest + */ +class DeleteProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the ProductSet to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteProductSetRequest + * + * @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. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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. Resource name of the ProductSet to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php new file mode 100644 index 000000000000..f40ed15cd650 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.DeleteReferenceImageRequest + */ +class DeleteReferenceImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 reference image to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * Please see {@see ProductSearchClient::referenceImageName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\DeleteReferenceImageRequest + * + * @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 reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 reference image to delete. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php new file mode 100644 index 000000000000..ed9d31ab00c2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php @@ -0,0 +1,67 @@ +google.cloud.vision.v1.DominantColorsAnnotation + */ +class DominantColorsAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * RGB color values with their score and pixel fraction. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; + */ + private $colors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $colors + * RGB color values with their score and pixel fraction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * RGB color values with their score and pixel fraction. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColors() + { + return $this->colors; + } + + /** + * RGB color values with their score and pixel fraction. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; + * @param array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ColorInfo::class); + $this->colors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php new file mode 100644 index 000000000000..4ea1b12e776c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php @@ -0,0 +1,422 @@ +google.cloud.vision.v1.EntityAnnotation + */ +class EntityAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string mid = 1; + */ + protected $mid = ''; + /** + * The language code for the locale in which the entity textual + * `description` is expressed. + * + * Generated from protobuf field string locale = 2; + */ + protected $locale = ''; + /** + * Entity textual description, expressed in its `locale` language. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Overall score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + /** + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5 [deprecated = true]; + * @deprecated + */ + protected $confidence = 0.0; + /** + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * + * Generated from protobuf field float topicality = 6; + */ + protected $topicality = 0.0; + /** + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + */ + protected $bounding_poly = null; + /** + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; + */ + private $locations; + /** + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; + */ + private $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mid + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * @type string $locale + * The language code for the locale in which the entity textual + * `description` is expressed. + * @type string $description + * Entity textual description, expressed in its `locale` language. + * @type float $score + * Overall score of the result. Range [0, 1]. + * @type float $confidence + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * @type float $topicality + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * @type array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $locations + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * @type array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $properties + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string mid = 1; + * @return string + */ + public function getMid() + { + return $this->mid; + } + + /** + * Opaque entity ID. Some IDs may be available in + * [Google Knowledge Graph Search + * API](https://developers.google.com/knowledge-graph/). + * + * Generated from protobuf field string mid = 1; + * @param string $var + * @return $this + */ + public function setMid($var) + { + GPBUtil::checkString($var, True); + $this->mid = $var; + + return $this; + } + + /** + * The language code for the locale in which the entity textual + * `description` is expressed. + * + * Generated from protobuf field string locale = 2; + * @return string + */ + public function getLocale() + { + return $this->locale; + } + + /** + * The language code for the locale in which the entity textual + * `description` is expressed. + * + * Generated from protobuf field string locale = 2; + * @param string $var + * @return $this + */ + public function setLocale($var) + { + GPBUtil::checkString($var, True); + $this->locale = $var; + + return $this; + } + + /** + * Entity textual description, expressed in its `locale` language. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Entity textual description, expressed in its `locale` language. + * + * 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; + } + + /** + * Overall score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Overall score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5 [deprecated = true]; + * @return float + * @deprecated + */ + public function getConfidence() + { + @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); + return $this->confidence; + } + + /** + * **Deprecated. Use `score` instead.** + * The accuracy of the entity detection in an image. + * For example, for an image in which the "Eiffel Tower" entity is detected, + * this field represents the confidence that there is a tower in the query + * image. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5 [deprecated = true]; + * @param float $var + * @return $this + * @deprecated + */ + public function setConfidence($var) + { + @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * + * Generated from protobuf field float topicality = 6; + * @return float + */ + public function getTopicality() + { + return $this->topicality; + } + + /** + * The relevancy of the ICA (Image Content Annotation) label to the + * image. For example, the relevancy of "tower" is likely higher to an image + * containing the detected "Eiffel Tower" than to an image containing a + * detected distant towering building, even though the confidence that + * there is a tower in each image may be the same. Range [0, 1]. + * + * Generated from protobuf field float topicality = 6; + * @param float $var + * @return $this + */ + public function setTopicality($var) + { + GPBUtil::checkFloat($var); + $this->topicality = $var; + + return $this; + } + + /** + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * Image region to which this entity belongs. Not produced + * for `LABEL_DETECTION` features. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocations() + { + return $this->locations; + } + + /** + * The location information for the detected entity. Multiple + * `LocationInfo` elements can be present because one location may + * indicate the location of the scene in the image, and another location + * may indicate the location of the place where the image was taken. + * Location information is usually present for landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; + * @param array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocationInfo::class); + $this->locations = $arr; + + return $this; + } + + /** + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Some entities may have optional user-supplied `Property` (name/value) + * fields, such a score or string that qualifies the entity. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; + * @param array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Property::class); + $this->properties = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php new file mode 100644 index 000000000000..b9af007fead8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php @@ -0,0 +1,627 @@ +google.cloud.vision.v1.FaceAnnotation + */ +class FaceAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + protected $bounding_poly = null; + /** + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + */ + protected $fd_bounding_poly = null; + /** + * Detected face landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + */ + private $landmarks; + /** + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * + * Generated from protobuf field float roll_angle = 4; + */ + protected $roll_angle = 0.0; + /** + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * + * Generated from protobuf field float pan_angle = 5; + */ + protected $pan_angle = 0.0; + /** + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * + * Generated from protobuf field float tilt_angle = 6; + */ + protected $tilt_angle = 0.0; + /** + * Detection confidence. Range [0, 1]. + * + * Generated from protobuf field float detection_confidence = 7; + */ + protected $detection_confidence = 0.0; + /** + * Face landmarking confidence. Range [0, 1]. + * + * Generated from protobuf field float landmarking_confidence = 8; + */ + protected $landmarking_confidence = 0.0; + /** + * Joy likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + */ + protected $joy_likelihood = 0; + /** + * Sorrow likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + */ + protected $sorrow_likelihood = 0; + /** + * Anger likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + */ + protected $anger_likelihood = 0; + /** + * Surprise likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + */ + protected $surprise_likelihood = 0; + /** + * Under-exposed likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + */ + protected $under_exposed_likelihood = 0; + /** + * Blurred likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + */ + protected $blurred_likelihood = 0; + /** + * Headwear likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + */ + protected $headwear_likelihood = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * @type \Google\Cloud\Vision\V1\BoundingPoly $fd_bounding_poly + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * @type array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $landmarks + * Detected face landmarks. + * @type float $roll_angle + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * @type float $pan_angle + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * @type float $tilt_angle + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * @type float $detection_confidence + * Detection confidence. Range [0, 1]. + * @type float $landmarking_confidence + * Face landmarking confidence. Range [0, 1]. + * @type int $joy_likelihood + * Joy likelihood. + * @type int $sorrow_likelihood + * Sorrow likelihood. + * @type int $anger_likelihood + * Anger likelihood. + * @type int $surprise_likelihood + * Surprise likelihood. + * @type int $under_exposed_likelihood + * Under-exposed likelihood. + * @type int $blurred_likelihood + * Blurred likelihood. + * @type int $headwear_likelihood + * Headwear likelihood. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon around the face. The coordinates of the bounding box + * are in the original image's scale. + * The bounding box is computed to "frame" the face in accordance with human + * expectations. It is based on the landmarker results. + * Note that one or more x and/or y coordinates may not be generated in the + * `BoundingPoly` (the polygon will be unbounded) if only a partial face + * appears in the image to be annotated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getFdBoundingPoly() + { + return $this->fd_bounding_poly; + } + + public function hasFdBoundingPoly() + { + return isset($this->fd_bounding_poly); + } + + public function clearFdBoundingPoly() + { + unset($this->fd_bounding_poly); + } + + /** + * The `fd_bounding_poly` bounding polygon is tighter than the + * `boundingPoly`, and encloses only the skin part of the face. Typically, it + * is used to eliminate the face from any image analysis that detects the + * "amount of skin" visible in an image. It is not based on the + * landmarker results, only on the initial face detection, hence + * the fd (face detection) prefix. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setFdBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->fd_bounding_poly = $var; + + return $this; + } + + /** + * Detected face landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLandmarks() + { + return $this->landmarks; + } + + /** + * Detected face landmarks. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; + * @param array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLandmarks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark::class); + $this->landmarks = $arr; + + return $this; + } + + /** + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * + * Generated from protobuf field float roll_angle = 4; + * @return float + */ + public function getRollAngle() + { + return $this->roll_angle; + } + + /** + * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + * of the face relative to the image vertical about the axis perpendicular to + * the face. Range [-180,180]. + * + * Generated from protobuf field float roll_angle = 4; + * @param float $var + * @return $this + */ + public function setRollAngle($var) + { + GPBUtil::checkFloat($var); + $this->roll_angle = $var; + + return $this; + } + + /** + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * + * Generated from protobuf field float pan_angle = 5; + * @return float + */ + public function getPanAngle() + { + return $this->pan_angle; + } + + /** + * Yaw angle, which indicates the leftward/rightward angle that the face is + * pointing relative to the vertical plane perpendicular to the image. Range + * [-180,180]. + * + * Generated from protobuf field float pan_angle = 5; + * @param float $var + * @return $this + */ + public function setPanAngle($var) + { + GPBUtil::checkFloat($var); + $this->pan_angle = $var; + + return $this; + } + + /** + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * + * Generated from protobuf field float tilt_angle = 6; + * @return float + */ + public function getTiltAngle() + { + return $this->tilt_angle; + } + + /** + * Pitch angle, which indicates the upwards/downwards angle that the face is + * pointing relative to the image's horizontal plane. Range [-180,180]. + * + * Generated from protobuf field float tilt_angle = 6; + * @param float $var + * @return $this + */ + public function setTiltAngle($var) + { + GPBUtil::checkFloat($var); + $this->tilt_angle = $var; + + return $this; + } + + /** + * Detection confidence. Range [0, 1]. + * + * Generated from protobuf field float detection_confidence = 7; + * @return float + */ + public function getDetectionConfidence() + { + return $this->detection_confidence; + } + + /** + * Detection confidence. Range [0, 1]. + * + * Generated from protobuf field float detection_confidence = 7; + * @param float $var + * @return $this + */ + public function setDetectionConfidence($var) + { + GPBUtil::checkFloat($var); + $this->detection_confidence = $var; + + return $this; + } + + /** + * Face landmarking confidence. Range [0, 1]. + * + * Generated from protobuf field float landmarking_confidence = 8; + * @return float + */ + public function getLandmarkingConfidence() + { + return $this->landmarking_confidence; + } + + /** + * Face landmarking confidence. Range [0, 1]. + * + * Generated from protobuf field float landmarking_confidence = 8; + * @param float $var + * @return $this + */ + public function setLandmarkingConfidence($var) + { + GPBUtil::checkFloat($var); + $this->landmarking_confidence = $var; + + return $this; + } + + /** + * Joy likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @return int + */ + public function getJoyLikelihood() + { + return $this->joy_likelihood; + } + + /** + * Joy likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; + * @param int $var + * @return $this + */ + public function setJoyLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->joy_likelihood = $var; + + return $this; + } + + /** + * Sorrow likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @return int + */ + public function getSorrowLikelihood() + { + return $this->sorrow_likelihood; + } + + /** + * Sorrow likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; + * @param int $var + * @return $this + */ + public function setSorrowLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->sorrow_likelihood = $var; + + return $this; + } + + /** + * Anger likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @return int + */ + public function getAngerLikelihood() + { + return $this->anger_likelihood; + } + + /** + * Anger likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; + * @param int $var + * @return $this + */ + public function setAngerLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->anger_likelihood = $var; + + return $this; + } + + /** + * Surprise likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @return int + */ + public function getSurpriseLikelihood() + { + return $this->surprise_likelihood; + } + + /** + * Surprise likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; + * @param int $var + * @return $this + */ + public function setSurpriseLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->surprise_likelihood = $var; + + return $this; + } + + /** + * Under-exposed likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @return int + */ + public function getUnderExposedLikelihood() + { + return $this->under_exposed_likelihood; + } + + /** + * Under-exposed likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; + * @param int $var + * @return $this + */ + public function setUnderExposedLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->under_exposed_likelihood = $var; + + return $this; + } + + /** + * Blurred likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @return int + */ + public function getBlurredLikelihood() + { + return $this->blurred_likelihood; + } + + /** + * Blurred likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; + * @param int $var + * @return $this + */ + public function setBlurredLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->blurred_likelihood = $var; + + return $this; + } + + /** + * Headwear likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @return int + */ + public function getHeadwearLikelihood() + { + return $this->headwear_likelihood; + } + + /** + * Headwear likelihood. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; + * @param int $var + * @return $this + */ + public function setHeadwearLikelihood($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->headwear_likelihood = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php new file mode 100644 index 000000000000..060f8f4295d4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php @@ -0,0 +1,114 @@ +google.cloud.vision.v1.FaceAnnotation.Landmark + */ +class Landmark extends \Google\Protobuf\Internal\Message +{ + /** + * Face landmark type. + * + * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + */ + protected $type = 0; + /** + * Face landmark position. + * + * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; + */ + protected $position = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Face landmark type. + * @type \Google\Cloud\Vision\V1\Position $position + * Face landmark position. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Face landmark type. + * + * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Face landmark type. + * + * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Face landmark position. + * + * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; + * @return \Google\Cloud\Vision\V1\Position|null + */ + public function getPosition() + { + return $this->position; + } + + public function hasPosition() + { + return isset($this->position); + } + + public function clearPosition() + { + unset($this->position); + } + + /** + * Face landmark position. + * + * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; + * @param \Google\Cloud\Vision\V1\Position $var + * @return $this + */ + public function setPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Position::class); + $this->position = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Landmark::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php new file mode 100644 index 000000000000..7aabc19d2a6d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php @@ -0,0 +1,305 @@ +google.cloud.vision.v1.FaceAnnotation.Landmark.Type + */ +class Type +{ + /** + * Unknown face landmark detected. Should not be filled. + * + * Generated from protobuf enum UNKNOWN_LANDMARK = 0; + */ + const UNKNOWN_LANDMARK = 0; + /** + * Left eye. + * + * Generated from protobuf enum LEFT_EYE = 1; + */ + const LEFT_EYE = 1; + /** + * Right eye. + * + * Generated from protobuf enum RIGHT_EYE = 2; + */ + const RIGHT_EYE = 2; + /** + * Left of left eyebrow. + * + * Generated from protobuf enum LEFT_OF_LEFT_EYEBROW = 3; + */ + const LEFT_OF_LEFT_EYEBROW = 3; + /** + * Right of left eyebrow. + * + * Generated from protobuf enum RIGHT_OF_LEFT_EYEBROW = 4; + */ + const RIGHT_OF_LEFT_EYEBROW = 4; + /** + * Left of right eyebrow. + * + * Generated from protobuf enum LEFT_OF_RIGHT_EYEBROW = 5; + */ + const LEFT_OF_RIGHT_EYEBROW = 5; + /** + * Right of right eyebrow. + * + * Generated from protobuf enum RIGHT_OF_RIGHT_EYEBROW = 6; + */ + const RIGHT_OF_RIGHT_EYEBROW = 6; + /** + * Midpoint between eyes. + * + * Generated from protobuf enum MIDPOINT_BETWEEN_EYES = 7; + */ + const MIDPOINT_BETWEEN_EYES = 7; + /** + * Nose tip. + * + * Generated from protobuf enum NOSE_TIP = 8; + */ + const NOSE_TIP = 8; + /** + * Upper lip. + * + * Generated from protobuf enum UPPER_LIP = 9; + */ + const UPPER_LIP = 9; + /** + * Lower lip. + * + * Generated from protobuf enum LOWER_LIP = 10; + */ + const LOWER_LIP = 10; + /** + * Mouth left. + * + * Generated from protobuf enum MOUTH_LEFT = 11; + */ + const MOUTH_LEFT = 11; + /** + * Mouth right. + * + * Generated from protobuf enum MOUTH_RIGHT = 12; + */ + const MOUTH_RIGHT = 12; + /** + * Mouth center. + * + * Generated from protobuf enum MOUTH_CENTER = 13; + */ + const MOUTH_CENTER = 13; + /** + * Nose, bottom right. + * + * Generated from protobuf enum NOSE_BOTTOM_RIGHT = 14; + */ + const NOSE_BOTTOM_RIGHT = 14; + /** + * Nose, bottom left. + * + * Generated from protobuf enum NOSE_BOTTOM_LEFT = 15; + */ + const NOSE_BOTTOM_LEFT = 15; + /** + * Nose, bottom center. + * + * Generated from protobuf enum NOSE_BOTTOM_CENTER = 16; + */ + const NOSE_BOTTOM_CENTER = 16; + /** + * Left eye, top boundary. + * + * Generated from protobuf enum LEFT_EYE_TOP_BOUNDARY = 17; + */ + const LEFT_EYE_TOP_BOUNDARY = 17; + /** + * Left eye, right corner. + * + * Generated from protobuf enum LEFT_EYE_RIGHT_CORNER = 18; + */ + const LEFT_EYE_RIGHT_CORNER = 18; + /** + * Left eye, bottom boundary. + * + * Generated from protobuf enum LEFT_EYE_BOTTOM_BOUNDARY = 19; + */ + const LEFT_EYE_BOTTOM_BOUNDARY = 19; + /** + * Left eye, left corner. + * + * Generated from protobuf enum LEFT_EYE_LEFT_CORNER = 20; + */ + const LEFT_EYE_LEFT_CORNER = 20; + /** + * Right eye, top boundary. + * + * Generated from protobuf enum RIGHT_EYE_TOP_BOUNDARY = 21; + */ + const RIGHT_EYE_TOP_BOUNDARY = 21; + /** + * Right eye, right corner. + * + * Generated from protobuf enum RIGHT_EYE_RIGHT_CORNER = 22; + */ + const RIGHT_EYE_RIGHT_CORNER = 22; + /** + * Right eye, bottom boundary. + * + * Generated from protobuf enum RIGHT_EYE_BOTTOM_BOUNDARY = 23; + */ + const RIGHT_EYE_BOTTOM_BOUNDARY = 23; + /** + * Right eye, left corner. + * + * Generated from protobuf enum RIGHT_EYE_LEFT_CORNER = 24; + */ + const RIGHT_EYE_LEFT_CORNER = 24; + /** + * Left eyebrow, upper midpoint. + * + * Generated from protobuf enum LEFT_EYEBROW_UPPER_MIDPOINT = 25; + */ + const LEFT_EYEBROW_UPPER_MIDPOINT = 25; + /** + * Right eyebrow, upper midpoint. + * + * Generated from protobuf enum RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + */ + const RIGHT_EYEBROW_UPPER_MIDPOINT = 26; + /** + * Left ear tragion. + * + * Generated from protobuf enum LEFT_EAR_TRAGION = 27; + */ + const LEFT_EAR_TRAGION = 27; + /** + * Right ear tragion. + * + * Generated from protobuf enum RIGHT_EAR_TRAGION = 28; + */ + const RIGHT_EAR_TRAGION = 28; + /** + * Left eye pupil. + * + * Generated from protobuf enum LEFT_EYE_PUPIL = 29; + */ + const LEFT_EYE_PUPIL = 29; + /** + * Right eye pupil. + * + * Generated from protobuf enum RIGHT_EYE_PUPIL = 30; + */ + const RIGHT_EYE_PUPIL = 30; + /** + * Forehead glabella. + * + * Generated from protobuf enum FOREHEAD_GLABELLA = 31; + */ + const FOREHEAD_GLABELLA = 31; + /** + * Chin gnathion. + * + * Generated from protobuf enum CHIN_GNATHION = 32; + */ + const CHIN_GNATHION = 32; + /** + * Chin left gonion. + * + * Generated from protobuf enum CHIN_LEFT_GONION = 33; + */ + const CHIN_LEFT_GONION = 33; + /** + * Chin right gonion. + * + * Generated from protobuf enum CHIN_RIGHT_GONION = 34; + */ + const CHIN_RIGHT_GONION = 34; + /** + * Left cheek center. + * + * Generated from protobuf enum LEFT_CHEEK_CENTER = 35; + */ + const LEFT_CHEEK_CENTER = 35; + /** + * Right cheek center. + * + * Generated from protobuf enum RIGHT_CHEEK_CENTER = 36; + */ + const RIGHT_CHEEK_CENTER = 36; + + private static $valueToName = [ + self::UNKNOWN_LANDMARK => 'UNKNOWN_LANDMARK', + self::LEFT_EYE => 'LEFT_EYE', + self::RIGHT_EYE => 'RIGHT_EYE', + self::LEFT_OF_LEFT_EYEBROW => 'LEFT_OF_LEFT_EYEBROW', + self::RIGHT_OF_LEFT_EYEBROW => 'RIGHT_OF_LEFT_EYEBROW', + self::LEFT_OF_RIGHT_EYEBROW => 'LEFT_OF_RIGHT_EYEBROW', + self::RIGHT_OF_RIGHT_EYEBROW => 'RIGHT_OF_RIGHT_EYEBROW', + self::MIDPOINT_BETWEEN_EYES => 'MIDPOINT_BETWEEN_EYES', + self::NOSE_TIP => 'NOSE_TIP', + self::UPPER_LIP => 'UPPER_LIP', + self::LOWER_LIP => 'LOWER_LIP', + self::MOUTH_LEFT => 'MOUTH_LEFT', + self::MOUTH_RIGHT => 'MOUTH_RIGHT', + self::MOUTH_CENTER => 'MOUTH_CENTER', + self::NOSE_BOTTOM_RIGHT => 'NOSE_BOTTOM_RIGHT', + self::NOSE_BOTTOM_LEFT => 'NOSE_BOTTOM_LEFT', + self::NOSE_BOTTOM_CENTER => 'NOSE_BOTTOM_CENTER', + self::LEFT_EYE_TOP_BOUNDARY => 'LEFT_EYE_TOP_BOUNDARY', + self::LEFT_EYE_RIGHT_CORNER => 'LEFT_EYE_RIGHT_CORNER', + self::LEFT_EYE_BOTTOM_BOUNDARY => 'LEFT_EYE_BOTTOM_BOUNDARY', + self::LEFT_EYE_LEFT_CORNER => 'LEFT_EYE_LEFT_CORNER', + self::RIGHT_EYE_TOP_BOUNDARY => 'RIGHT_EYE_TOP_BOUNDARY', + self::RIGHT_EYE_RIGHT_CORNER => 'RIGHT_EYE_RIGHT_CORNER', + self::RIGHT_EYE_BOTTOM_BOUNDARY => 'RIGHT_EYE_BOTTOM_BOUNDARY', + self::RIGHT_EYE_LEFT_CORNER => 'RIGHT_EYE_LEFT_CORNER', + self::LEFT_EYEBROW_UPPER_MIDPOINT => 'LEFT_EYEBROW_UPPER_MIDPOINT', + self::RIGHT_EYEBROW_UPPER_MIDPOINT => 'RIGHT_EYEBROW_UPPER_MIDPOINT', + self::LEFT_EAR_TRAGION => 'LEFT_EAR_TRAGION', + self::RIGHT_EAR_TRAGION => 'RIGHT_EAR_TRAGION', + self::LEFT_EYE_PUPIL => 'LEFT_EYE_PUPIL', + self::RIGHT_EYE_PUPIL => 'RIGHT_EYE_PUPIL', + self::FOREHEAD_GLABELLA => 'FOREHEAD_GLABELLA', + self::CHIN_GNATHION => 'CHIN_GNATHION', + self::CHIN_LEFT_GONION => 'CHIN_LEFT_GONION', + self::CHIN_RIGHT_GONION => 'CHIN_RIGHT_GONION', + self::LEFT_CHEEK_CENTER => 'LEFT_CHEEK_CENTER', + self::RIGHT_CHEEK_CENTER => 'RIGHT_CHEEK_CENTER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark_Type::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php new file mode 100644 index 000000000000..ac1b22a40aa9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php @@ -0,0 +1,153 @@ +google.cloud.vision.v1.Feature + */ +class Feature extends \Google\Protobuf\Internal\Message +{ + /** + * The feature type. + * + * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; + */ + protected $type = 0; + /** + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * + * Generated from protobuf field int32 max_results = 2; + */ + protected $max_results = 0; + /** + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * + * Generated from protobuf field string model = 3; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The feature type. + * @type int $max_results + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * @type string $model + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The feature type. + * + * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The feature type. + * + * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Feature\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * + * Generated from protobuf field int32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of results of this type. Does not apply to + * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. + * + * Generated from protobuf field int32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkInt32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * + * Generated from protobuf field string model = 3; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Model to use for the feature. + * Supported values: "builtin/stable" (the default if unset) and + * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also + * support "builtin/weekly" for the bleeding edge release updated weekly. + * + * Generated from protobuf field string model = 3; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php new file mode 100644 index 000000000000..d905c7320a41 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php @@ -0,0 +1,139 @@ +google.cloud.vision.v1.Feature.Type + */ +class Type +{ + /** + * Unspecified feature type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Run face detection. + * + * Generated from protobuf enum FACE_DETECTION = 1; + */ + const FACE_DETECTION = 1; + /** + * Run landmark detection. + * + * Generated from protobuf enum LANDMARK_DETECTION = 2; + */ + const LANDMARK_DETECTION = 2; + /** + * Run logo detection. + * + * Generated from protobuf enum LOGO_DETECTION = 3; + */ + const LOGO_DETECTION = 3; + /** + * Run label detection. + * + * Generated from protobuf enum LABEL_DETECTION = 4; + */ + const LABEL_DETECTION = 4; + /** + * Run text detection / optical character recognition (OCR). Text detection + * is optimized for areas of text within a larger image; if the image is + * a document, use `DOCUMENT_TEXT_DETECTION` instead. + * + * Generated from protobuf enum TEXT_DETECTION = 5; + */ + const TEXT_DETECTION = 5; + /** + * Run dense text document OCR. Takes precedence when both + * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. + * + * Generated from protobuf enum DOCUMENT_TEXT_DETECTION = 11; + */ + const DOCUMENT_TEXT_DETECTION = 11; + /** + * Run Safe Search to detect potentially unsafe + * or undesirable content. + * + * Generated from protobuf enum SAFE_SEARCH_DETECTION = 6; + */ + const SAFE_SEARCH_DETECTION = 6; + /** + * Compute a set of image properties, such as the + * image's dominant colors. + * + * Generated from protobuf enum IMAGE_PROPERTIES = 7; + */ + const IMAGE_PROPERTIES = 7; + /** + * Run crop hints. + * + * Generated from protobuf enum CROP_HINTS = 9; + */ + const CROP_HINTS = 9; + /** + * Run web detection. + * + * Generated from protobuf enum WEB_DETECTION = 10; + */ + const WEB_DETECTION = 10; + /** + * Run Product Search. + * + * Generated from protobuf enum PRODUCT_SEARCH = 12; + */ + const PRODUCT_SEARCH = 12; + /** + * Run localizer for object detection. + * + * Generated from protobuf enum OBJECT_LOCALIZATION = 19; + */ + const OBJECT_LOCALIZATION = 19; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::FACE_DETECTION => 'FACE_DETECTION', + self::LANDMARK_DETECTION => 'LANDMARK_DETECTION', + self::LOGO_DETECTION => 'LOGO_DETECTION', + self::LABEL_DETECTION => 'LABEL_DETECTION', + self::TEXT_DETECTION => 'TEXT_DETECTION', + self::DOCUMENT_TEXT_DETECTION => 'DOCUMENT_TEXT_DETECTION', + self::SAFE_SEARCH_DETECTION => 'SAFE_SEARCH_DETECTION', + self::IMAGE_PROPERTIES => 'IMAGE_PROPERTIES', + self::CROP_HINTS => 'CROP_HINTS', + self::WEB_DETECTION => 'WEB_DETECTION', + self::PRODUCT_SEARCH => 'PRODUCT_SEARCH', + self::OBJECT_LOCALIZATION => 'OBJECT_LOCALIZATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Vision\V1\Feature_Type::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php new file mode 100644 index 000000000000..5e5f3f520ee1 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Google Cloud Storage URI prefix where the results will be stored. Results + * will be in JSON format and preceded by its corresponding input URI prefix. + * This field can either represent a gcs file prefix or gcs directory. In + * either case, the uri should be unique because in order to get all of the + * output files, you will need to do a wildcard gcs search on the uri prefix + * you provide. + * Examples: + * * File Prefix: gs://bucket-name/here/filenameprefix The output files + * will be created in gs://bucket-name/here/ and the names of the + * output files will begin with "filenameprefix". + * * Directory Prefix: gs://bucket-name/some/location/ The output files + * will be created in gs://bucket-name/some/location/ and the names of the + * output files could be anything because there was no filename prefix + * specified. + * If multiple outputs, each response is still AnnotateFileResponse, each of + * which contains some subset of the full list of AnnotateImageResponse. + * Multiple outputs can happen if, for example, the output JSON is too large + * and overflows into multiple sharded files. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php new file mode 100644 index 000000000000..e7c46ae00ad3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php @@ -0,0 +1,71 @@ +google.cloud.vision.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Google Cloud Storage URI for the input file. This must only be a + * Google Cloud Storage object. Wildcards are not currently supported. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php new file mode 100644 index 000000000000..8716aa759f18 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.GetProductRequest + */ +class GetProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the Product to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetProductRequest + * + * @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. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of the Product to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php new file mode 100644 index 000000000000..f133d964a1f9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.GetProductSetRequest + */ +class GetProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the ProductSet to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetProductSetRequest + * + * @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. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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. Resource name of the ProductSet to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php new file mode 100644 index 000000000000..87a13da256c2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php @@ -0,0 +1,92 @@ +google.cloud.vision.v1.GetReferenceImageRequest + */ +class GetReferenceImageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 ReferenceImage to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. Please see + * {@see ProductSearchClient::referenceImageName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\GetReferenceImageRequest + * + * @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 ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 ReferenceImage to get. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php new file mode 100644 index 000000000000..a829768dbbe8 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * + * Generated from protobuf field bytes content = 1; + */ + protected $content = ''; + /** + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; + */ + protected $source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * @type \Google\Cloud\Vision\V1\ImageSource $source + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * + * Generated from protobuf field bytes content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Image content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateImages requests. It does + * not work for AsyncBatchAnnotateImages requests. + * + * Generated from protobuf field bytes content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; + * @return \Google\Cloud\Vision\V1\ImageSource|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Google Cloud Storage image location, or publicly-accessible image + * URL. If both `content` and `source` are provided for an image, `content` + * takes precedence and is used to perform the image annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; + * @param \Google\Cloud\Vision\V1\ImageSource $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageSource::class); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php new file mode 100644 index 000000000000..04aba2e4a1dc --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php @@ -0,0 +1,106 @@ +google.cloud.vision.v1.ImageAnnotationContext + */ +class ImageAnnotationContext extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the file used to produce the image. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * + * Generated from protobuf field int32 page_number = 2; + */ + protected $page_number = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the file used to produce the image. + * @type int $page_number + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the file used to produce the image. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the file used to produce the image. + * + * 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; + } + + /** + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * + * Generated from protobuf field int32 page_number = 2; + * @return int + */ + public function getPageNumber() + { + return $this->page_number; + } + + /** + * If the file was a PDF or TIFF, this field gives the page number within + * the file used to produce the image. + * + * Generated from protobuf field int32 page_number = 2; + * @param int $var + * @return $this + */ + public function setPageNumber($var) + { + GPBUtil::checkInt32($var); + $this->page_number = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php new file mode 100644 index 000000000000..25a6e9b648ce --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php @@ -0,0 +1,315 @@ +google.cloud.vision.v1.ImageContext + */ +class ImageContext extends \Google\Protobuf\Internal\Message +{ + /** + * Not used. + * + * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + */ + protected $lat_long_rect = null; + /** + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * + * Generated from protobuf field repeated string language_hints = 2; + */ + private $language_hints; + /** + * Parameters for crop hints annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + */ + protected $crop_hints_params = null; + /** + * Parameters for product search. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + */ + protected $product_search_params = null; + /** + * Parameters for web detection. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + */ + protected $web_detection_params = null; + /** + * Parameters for text detection and document text detection. + * + * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + */ + protected $text_detection_params = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\LatLongRect $lat_long_rect + * Not used. + * @type array|\Google\Protobuf\Internal\RepeatedField $language_hints + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * @type \Google\Cloud\Vision\V1\CropHintsParams $crop_hints_params + * Parameters for crop hints annotation request. + * @type \Google\Cloud\Vision\V1\ProductSearchParams $product_search_params + * Parameters for product search. + * @type \Google\Cloud\Vision\V1\WebDetectionParams $web_detection_params + * Parameters for web detection. + * @type \Google\Cloud\Vision\V1\TextDetectionParams $text_detection_params + * Parameters for text detection and document text detection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Not used. + * + * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @return \Google\Cloud\Vision\V1\LatLongRect|null + */ + public function getLatLongRect() + { + return $this->lat_long_rect; + } + + public function hasLatLongRect() + { + return isset($this->lat_long_rect); + } + + public function clearLatLongRect() + { + unset($this->lat_long_rect); + } + + /** + * Not used. + * + * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; + * @param \Google\Cloud\Vision\V1\LatLongRect $var + * @return $this + */ + public function setLatLongRect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\LatLongRect::class); + $this->lat_long_rect = $var; + + return $this; + } + + /** + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * + * Generated from protobuf field repeated string language_hints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLanguageHints() + { + return $this->language_hints; + } + + /** + * List of languages to use for TEXT_DETECTION. In most cases, an empty value + * yields the best results since it enables automatic language detection. For + * languages based on the Latin alphabet, setting `language_hints` is not + * needed. In rare cases, when the language of the text in the image is known, + * setting a hint will help get better results (although it will be a + * significant hindrance if the hint is wrong). Text detection returns an + * error if one or more of the specified languages is not one of the + * [supported languages](https://cloud.google.com/vision/docs/languages). + * + * Generated from protobuf field repeated string language_hints = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLanguageHints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->language_hints = $arr; + + return $this; + } + + /** + * Parameters for crop hints annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @return \Google\Cloud\Vision\V1\CropHintsParams|null + */ + public function getCropHintsParams() + { + return $this->crop_hints_params; + } + + public function hasCropHintsParams() + { + return isset($this->crop_hints_params); + } + + public function clearCropHintsParams() + { + unset($this->crop_hints_params); + } + + /** + * Parameters for crop hints annotation request. + * + * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; + * @param \Google\Cloud\Vision\V1\CropHintsParams $var + * @return $this + */ + public function setCropHintsParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsParams::class); + $this->crop_hints_params = $var; + + return $this; + } + + /** + * Parameters for product search. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @return \Google\Cloud\Vision\V1\ProductSearchParams|null + */ + public function getProductSearchParams() + { + return $this->product_search_params; + } + + public function hasProductSearchParams() + { + return isset($this->product_search_params); + } + + public function clearProductSearchParams() + { + unset($this->product_search_params); + } + + /** + * Parameters for product search. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; + * @param \Google\Cloud\Vision\V1\ProductSearchParams $var + * @return $this + */ + public function setProductSearchParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchParams::class); + $this->product_search_params = $var; + + return $this; + } + + /** + * Parameters for web detection. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @return \Google\Cloud\Vision\V1\WebDetectionParams|null + */ + public function getWebDetectionParams() + { + return $this->web_detection_params; + } + + public function hasWebDetectionParams() + { + return isset($this->web_detection_params); + } + + public function clearWebDetectionParams() + { + unset($this->web_detection_params); + } + + /** + * Parameters for web detection. + * + * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; + * @param \Google\Cloud\Vision\V1\WebDetectionParams $var + * @return $this + */ + public function setWebDetectionParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetectionParams::class); + $this->web_detection_params = $var; + + return $this; + } + + /** + * Parameters for text detection and document text detection. + * + * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @return \Google\Cloud\Vision\V1\TextDetectionParams|null + */ + public function getTextDetectionParams() + { + return $this->text_detection_params; + } + + public function hasTextDetectionParams() + { + return isset($this->text_detection_params); + } + + public function clearTextDetectionParams() + { + unset($this->text_detection_params); + } + + /** + * Parameters for text detection and document text detection. + * + * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; + * @param \Google\Cloud\Vision\V1\TextDetectionParams $var + * @return $this + */ + public function setTextDetectionParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextDetectionParams::class); + $this->text_detection_params = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php new file mode 100644 index 000000000000..05d082b53f75 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.ImageProperties + */ +class ImageProperties extends \Google\Protobuf\Internal\Message +{ + /** + * If present, dominant colors completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + */ + protected $dominant_colors = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\DominantColorsAnnotation $dominant_colors + * If present, dominant colors completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * If present, dominant colors completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @return \Google\Cloud\Vision\V1\DominantColorsAnnotation|null + */ + public function getDominantColors() + { + return $this->dominant_colors; + } + + public function hasDominantColors() + { + return isset($this->dominant_colors); + } + + public function clearDominantColors() + { + unset($this->dominant_colors); + } + + /** + * If present, dominant colors completed successfully. + * + * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; + * @param \Google\Cloud\Vision\V1\DominantColorsAnnotation $var + * @return $this + */ + public function setDominantColors($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\DominantColorsAnnotation::class); + $this->dominant_colors = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php new file mode 100644 index 000000000000..977a6a7406c4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php @@ -0,0 +1,169 @@ +google.cloud.vision.v1.ImageSource + */ +class ImageSource extends \Google\Protobuf\Internal\Message +{ + /** + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * + * Generated from protobuf field string gcs_image_uri = 1; + */ + protected $gcs_image_uri = ''; + /** + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * + * Generated from protobuf field string image_uri = 2; + */ + protected $image_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_image_uri + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * @type string $image_uri + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * + * Generated from protobuf field string gcs_image_uri = 1; + * @return string + */ + public function getGcsImageUri() + { + return $this->gcs_image_uri; + } + + /** + * **Use `image_uri` instead.** + * The Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. + * + * Generated from protobuf field string gcs_image_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsImageUri($var) + { + GPBUtil::checkString($var, True); + $this->gcs_image_uri = $var; + + return $this; + } + + /** + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * + * Generated from protobuf field string image_uri = 2; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * The URI of the source image. Can be either: + * 1. A Google Cloud Storage URI of the form + * `gs://bucket_name/object_name`. Object versioning is not supported. See + * [Google Cloud Storage Request + * URIs](https://cloud.google.com/storage/docs/reference-uris) for more + * info. + * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from + * HTTP/HTTPS URLs, Google cannot guarantee that the request will be + * completed. Your request may fail if the specified host denies the + * request (e.g. due to request throttling or DOS prevention), or if Google + * throttles requests to the site for abuse prevention. You should not + * depend on externally-hosted images for production applications. + * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + * precedence. + * + * Generated from protobuf field string image_uri = 2; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php new file mode 100644 index 000000000000..b6e1d5818b47 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php @@ -0,0 +1,260 @@ +google.cloud.vision.v1.ImportProductSetsGcsSource + */ +class ImportProductSetsGcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and + * the `labels` column refers to + * [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field + * for the product to a space (" "). You can update the `display_name` later + * by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * + * Generated from protobuf field string csv_file_uri = 1; + */ + protected $csv_file_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $csv_file_uri + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and + * the `labels` column refers to + * [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field + * for the product to a space (" "). You can update the `display_name` later + * by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and + * the `labels` column refers to + * [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field + * for the product to a space (" "). You can update the `display_name` later + * by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * + * Generated from protobuf field string csv_file_uri = 1; + * @return string + */ + public function getCsvFileUri() + { + return $this->csv_file_uri; + } + + /** + * The Google Cloud Storage URI of the input csv file. + * The URI must start with `gs://`. + * The format of the input csv file should be one image per line. + * In each line, there are 8 columns. + * 1. image-uri + * 2. image-id + * 3. product-set-id + * 4. product-id + * 5. product-category + * 6. product-display-name + * 7. labels + * 8. bounding-poly + * The `image-uri`, `product-set-id`, `product-id`, and `product-category` + * columns are required. All other columns are optional. + * If the `ProductSet` or `Product` specified by the `product-set-id` and + * `product-id` values does not exist, then the system will create a new + * `ProductSet` or `Product` for the image. In this case, the + * `product-display-name` column refers to + * [display_name][google.cloud.vision.v1.Product.display_name], the + * `product-category` column refers to + * [product_category][google.cloud.vision.v1.Product.product_category], and + * the `labels` column refers to + * [product_labels][google.cloud.vision.v1.Product.product_labels]. + * The `image-id` column is optional but must be unique if provided. If it is + * empty, the system will automatically assign a unique id to the image. + * The `product-display-name` column is optional. If it is empty, the system + * sets the [display_name][google.cloud.vision.v1.Product.display_name] field + * for the product to a space (" "). You can update the `display_name` later + * by using the API. + * If a `Product` with the specified `product-id` already exists, then the + * system ignores the `product-display-name`, `product-category`, and `labels` + * columns. + * The `labels` column (optional) is a line containing a list of + * comma-separated key-value pairs, in the following format: + * "key_1=value_1,key_2=value_2,...,key_n=value_n" + * The `bounding-poly` column (optional) identifies one region of + * interest from the image in the same manner as `CreateReferenceImage`. If + * you do not specify the `bounding-poly` column, then the system will try to + * detect regions of interest automatically. + * At most one `bounding-poly` column is allowed per line. If the image + * contains multiple regions of interest, add a line to the CSV file that + * includes the same product information, and the `bounding-poly` values for + * each region of interest. + * The `bounding-poly` column must contain an even number of comma-separated + * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use + * non-negative integers for absolute bounding polygons, and float values + * in [0, 1] for normalized bounding polygons. + * The system will resize the image if the image resolution is too + * large to process (larger than 20MP). + * + * Generated from protobuf field string csv_file_uri = 1; + * @param string $var + * @return $this + */ + public function setCsvFileUri($var) + { + GPBUtil::checkString($var, True); + $this->csv_file_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php new file mode 100644 index 000000000000..181836273298 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php @@ -0,0 +1,78 @@ +google.cloud.vision.v1.ImportProductSetsInputConfig + */ +class ImportProductSetsInputConfig extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $gcs_source + * The Google Cloud Storage location for a csv file which preserves a list + * of ImportProductSetRequests in each line. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location for a csv file which preserves a list + * of ImportProductSetRequests in each line. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @return \Google\Cloud\Vision\V1\ImportProductSetsGcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * The Google Cloud Storage location for a csv file which preserves a list + * of ImportProductSetRequests in each line. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; + * @param \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsGcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php new file mode 100644 index 000000000000..24ecfc858acb --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php @@ -0,0 +1,133 @@ +google.cloud.vision.v1.ImportProductSetsRequest + */ +class ImportProductSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The input content for the list of requests. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + + /** + * @param string $parent Required. The project in which the ProductSets should be imported. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. + * + * @return \Google\Cloud\Vision\V1\ImportProductSetsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig): self + { + return (new self()) + ->setParent($parent) + ->setInputConfig($inputConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $input_config + * Required. The input content for the list of requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_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 in which the ProductSets should be imported. + * Format is `projects/PROJECT_ID/locations/LOC_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 input content for the list of requests. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ImportProductSetsInputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. The input content for the list of requests. + * + * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig::class); + $this->input_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php new file mode 100644 index 000000000000..79c3e8bda872 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php @@ -0,0 +1,122 @@ +google.cloud.vision.v1.ImportProductSetsResponse + */ +class ImportProductSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of reference_images that are imported successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + private $reference_images; + /** + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * + * Generated from protobuf field repeated .google.rpc.Status statuses = 2; + */ + private $statuses; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images + * The list of reference_images that are imported successfully. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $statuses + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of reference_images that are imported successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferenceImages() + { + return $this->reference_images; + } + + /** + * The list of reference_images that are imported successfully. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferenceImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); + $this->reference_images = $arr; + + return $this; + } + + /** + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * + * Generated from protobuf field repeated .google.rpc.Status statuses = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStatuses() + { + return $this->statuses; + } + + /** + * The rpc status for each ImportProductSet request, including both successes + * and errors. + * The number of statuses here matches the number of lines in the csv file, + * and statuses[i] stores the success or failure status of processing the i-th + * line of the csv, starting from line 0. + * + * Generated from protobuf field repeated .google.rpc.Status statuses = 2; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStatuses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->statuses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php new file mode 100644 index 000000000000..7fc7ef2d630c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php @@ -0,0 +1,165 @@ +google.cloud.vision.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage location to read the input from. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; + */ + protected $gcs_source = null; + /** + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * + * Generated from protobuf field bytes content = 3; + */ + protected $content = ''; + /** + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\GcsSource $gcs_source + * The Google Cloud Storage location to read the input from. + * @type string $content + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * @type string $mime_type + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to read the input from. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @return \Google\Cloud\Vision\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->gcs_source; + } + + public function hasGcsSource() + { + return isset($this->gcs_source); + } + + public function clearGcsSource() + { + unset($this->gcs_source); + } + + /** + * The Google Cloud Storage location to read the input from. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; + * @param \Google\Cloud\Vision\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsSource::class); + $this->gcs_source = $var; + + return $this; + } + + /** + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * + * Generated from protobuf field bytes content = 3; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * File content, represented as a stream of bytes. + * Note: As with all `bytes` fields, protobuffers use a pure binary + * representation, whereas JSON representations use base64. + * Currently, this field only works for BatchAnnotateFiles requests. It does + * not work for AsyncBatchAnnotateFiles requests. + * + * Generated from protobuf field bytes content = 3; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, False); + $this->content = $var; + + return $this; + } + + /** + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The type of the file. Currently only "application/pdf", "image/tiff" and + * "image/gif" are supported. Wildcards are not supported. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php new file mode 100644 index 000000000000..c582fe6217f4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php @@ -0,0 +1,121 @@ +google.cloud.vision.v1.LatLongRect + */ +class LatLongRect extends \Google\Protobuf\Internal\Message +{ + /** + * Min lat/long pair. + * + * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; + */ + protected $min_lat_lng = null; + /** + * Max lat/long pair. + * + * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; + */ + protected $max_lat_lng = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $min_lat_lng + * Min lat/long pair. + * @type \Google\Type\LatLng $max_lat_lng + * Max lat/long pair. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Min lat/long pair. + * + * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getMinLatLng() + { + return $this->min_lat_lng; + } + + public function hasMinLatLng() + { + return isset($this->min_lat_lng); + } + + public function clearMinLatLng() + { + unset($this->min_lat_lng); + } + + /** + * Min lat/long pair. + * + * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setMinLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->min_lat_lng = $var; + + return $this; + } + + /** + * Max lat/long pair. + * + * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; + * @return \Google\Type\LatLng|null + */ + public function getMaxLatLng() + { + return $this->max_lat_lng; + } + + public function hasMaxLatLng() + { + return isset($this->max_lat_lng); + } + + public function clearMaxLatLng() + { + unset($this->max_lat_lng); + } + + /** + * Max lat/long pair. + * + * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setMaxLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->max_lat_lng = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php new file mode 100644 index 000000000000..a38e9ab08c22 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php @@ -0,0 +1,83 @@ +google.cloud.vision.v1.Likelihood + */ +class Likelihood +{ + /** + * Unknown likelihood. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * It is very unlikely. + * + * Generated from protobuf enum VERY_UNLIKELY = 1; + */ + const VERY_UNLIKELY = 1; + /** + * It is unlikely. + * + * Generated from protobuf enum UNLIKELY = 2; + */ + const UNLIKELY = 2; + /** + * It is possible. + * + * Generated from protobuf enum POSSIBLE = 3; + */ + const POSSIBLE = 3; + /** + * It is likely. + * + * Generated from protobuf enum LIKELY = 4; + */ + const LIKELY = 4; + /** + * It is very likely. + * + * Generated from protobuf enum VERY_LIKELY = 5; + */ + const VERY_LIKELY = 5; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::VERY_UNLIKELY => 'VERY_UNLIKELY', + self::UNLIKELY => 'UNLIKELY', + self::POSSIBLE => 'POSSIBLE', + self::LIKELY => 'LIKELY', + self::VERY_LIKELY => 'VERY_LIKELY', + ]; + + 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php new file mode 100644 index 000000000000..c2ca9f793d5a --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php @@ -0,0 +1,155 @@ +google.cloud.vision.v1.ListProductSetsRequest + */ +class ListProductSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project from which ProductSets should be listed. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductSetsRequest + * + * @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 project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_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 from which ProductSets should be listed. + * Format is `projects/PROJECT_ID/locations/LOC_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 items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * 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 next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php new file mode 100644 index 000000000000..6fb58f3ea6d7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php @@ -0,0 +1,105 @@ +google.cloud.vision.v1.ListProductSetsResponse + */ +class ListProductSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ProductSets. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + */ + private $product_sets; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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 array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $product_sets + * List of ProductSets. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * List of ProductSets. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductSets() + { + return $this->product_sets; + } + + /** + * List of ProductSets. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; + * @param array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSet::class); + $this->product_sets = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php new file mode 100644 index 000000000000..70a71c26a951 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php @@ -0,0 +1,160 @@ +google.cloud.vision.v1.ListProductsInProductSetRequest + */ +class ListProductsInProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The ProductSet resource for which to retrieve Products. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductsInProductSetRequest + * + * @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 ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 ProductSet resource for which to retrieve Products. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * 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 next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php new file mode 100644 index 000000000000..550e51fc19f7 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php @@ -0,0 +1,105 @@ +google.cloud.vision.v1.ListProductsInProductSetResponse + */ +class ListProductsInProductSetResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + */ + private $products; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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 array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products + * The list of Products. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducts() + { + return $this->products; + } + + /** + * The list of Products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); + $this->products = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php new file mode 100644 index 000000000000..e6efb131265a --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php @@ -0,0 +1,160 @@ +google.cloud.vision.v1.ListProductsRequest + */ +class ListProductsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project OR ProductSet from which Products should be listed. + * + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * Please see {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListProductsRequest + * + * @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 project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_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 OR ProductSet from which Products should be listed. + * Format: + * `projects/PROJECT_ID/locations/LOC_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 items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * 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 next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php new file mode 100644 index 000000000000..192d6f3a9a11 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php @@ -0,0 +1,105 @@ +google.cloud.vision.v1.ListProductsResponse + */ +class ListProductsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + */ + private $products; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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 array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products + * List of products. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * List of products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducts() + { + return $this->products; + } + + /** + * List of products. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; + * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); + $this->products = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php new file mode 100644 index 000000000000..fb833ada7722 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php @@ -0,0 +1,168 @@ +google.cloud.vision.v1.ListReferenceImagesRequest + */ +class ListReferenceImagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Resource name of the product containing the reference images. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see + * {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\ListReferenceImagesRequest + * + * @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. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $page_token + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of the product containing the reference images. + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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 items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * 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 to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results to be returned. This is the value + * of `nextPageToken` returned in a previous reference image list request. + * Defaults to the first page if not specified. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php new file mode 100644 index 000000000000..bf552bad802f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.ListReferenceImagesResponse + */ +class ListReferenceImagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of reference images. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + */ + private $reference_images; + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images + * The list of reference images. + * @type int $page_size + * The maximum number of items to return. Default 10, maximum 100. + * @type string $next_page_token + * The next_page_token returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of reference images. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferenceImages() + { + return $this->reference_images; + } + + /** + * The list of reference images. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; + * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferenceImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); + $this->reference_images = $arr; + + return $this; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. Default 10, maximum 100. + * + * 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 next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next_page_token returned from a previous List request, if any. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php new file mode 100644 index 000000000000..6e85feb7fede --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php @@ -0,0 +1,221 @@ +google.cloud.vision.v1.LocalizedObjectAnnotation + */ +class LocalizedObjectAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + */ + protected $mid = ''; + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + /** + * Image region to which this object belongs. This must be populated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + */ + protected $bounding_poly = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mid + * Object ID that should align with EntityAnnotation mid. + * @type string $language_code + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * @type string $name + * Object name, expressed in its `language_code` language. + * @type float $score + * Score of the result. Range [0, 1]. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * Image region to which this object belongs. This must be populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @return string + */ + public function getMid() + { + return $this->mid; + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @param string $var + * @return $this + */ + public function setMid($var) + { + GPBUtil::checkString($var, True); + $this->mid = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Object name, expressed in its `language_code` language. + * + * 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; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Image region to which this object belongs. This must be populated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * Image region to which this object belongs. This must be populated. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php new file mode 100644 index 000000000000..02c79371bf4d --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php @@ -0,0 +1,77 @@ +google.cloud.vision.v1.LocationInfo + */ +class LocationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * lat/long location coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + */ + protected $lat_lng = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $lat_lng + * lat/long location coordinates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * lat/long location coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * lat/long location coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php new file mode 100644 index 000000000000..20d663aa3bd5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php @@ -0,0 +1,103 @@ +google.cloud.vision.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\Vision\V1\Geometry::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/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php new file mode 100644 index 000000000000..ae546b7644c5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php @@ -0,0 +1,155 @@ +google.cloud.vision.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * The time when the batch request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * The time when the operation result was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Current state of the batch operation. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the batch request was received. + * @type \Google\Protobuf\Timestamp $update_time + * The time when the operation result was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Current state of the batch operation. + * + * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\OperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time when the batch request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @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 time when the batch request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time when the operation result was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + * @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 time when the operation result was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + * @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/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php new file mode 100644 index 000000000000..345f7bb0a591 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php @@ -0,0 +1,78 @@ +google.cloud.vision.v1.OperationMetadata.State + */ +class State +{ + /** + * Invalid. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is received. + * + * Generated from protobuf enum CREATED = 1; + */ + const CREATED = 1; + /** + * Request is actively being processed. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The batch processing is done. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + /** + * The batch processing was cancelled. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATED => 'CREATED', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Vision\V1\OperationMetadata_State::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php new file mode 100644 index 000000000000..4273ce192966 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php @@ -0,0 +1,143 @@ +google.cloud.vision.v1.OutputConfig + */ +class OutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Google Cloud Storage location to write the output(s) to. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + */ + protected $gcs_destination = null; + /** + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * + * Generated from protobuf field int32 batch_size = 2; + */ + protected $batch_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\GcsDestination $gcs_destination + * The Google Cloud Storage location to write the output(s) to. + * @type int $batch_size + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to write the output(s) to. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @return \Google\Cloud\Vision\V1\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->gcs_destination; + } + + public function hasGcsDestination() + { + return isset($this->gcs_destination); + } + + public function clearGcsDestination() + { + unset($this->gcs_destination); + } + + /** + * The Google Cloud Storage location to write the output(s) to. + * + * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; + * @param \Google\Cloud\Vision\V1\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsDestination::class); + $this->gcs_destination = $var; + + return $this; + } + + /** + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * + * Generated from protobuf field int32 batch_size = 2; + * @return int + */ + public function getBatchSize() + { + return $this->batch_size; + } + + /** + * The max number of response protos to put into each output JSON file on + * Google Cloud Storage. + * The valid range is [1, 100]. If not specified, the default value is 20. + * For example, for one pdf file with 100 pages, 100 response protos will + * be generated. If `batch_size` = 20, then 5 json files each + * containing 20 response protos will be written under the prefix + * `gcs_destination`.`uri`. + * Currently, batch_size only applies to GcsDestination, with potential future + * support for other output configurations. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php new file mode 100644 index 000000000000..26020d0280b5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php @@ -0,0 +1,221 @@ +google.cloud.vision.v1.Page + */ +class Page extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected on the page. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 width = 2; + */ + protected $width = 0; + /** + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 height = 3; + */ + protected $height = 0; + /** + * List of blocks of text, images etc on this page. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; + */ + private $blocks; + /** + * Confidence of the OCR results on the page. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected on the page. + * @type int $width + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * @type int $height + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * @type array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $blocks + * List of blocks of text, images etc on this page. + * @type float $confidence + * Confidence of the OCR results on the page. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected on the page. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected on the page. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 width = 2; + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * Page width. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 width = 2; + * @param int $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkInt32($var); + $this->width = $var; + + return $this; + } + + /** + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 height = 3; + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * Page height. For PDFs the unit is points. For images (including + * TIFFs) the unit is pixels. + * + * Generated from protobuf field int32 height = 3; + * @param int $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkInt32($var); + $this->height = $var; + + return $this; + } + + /** + * List of blocks of text, images etc on this page. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBlocks() + { + return $this->blocks; + } + + /** + * List of blocks of text, images etc on this page. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; + * @param array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Block::class); + $this->blocks = $arr; + + return $this; + } + + /** + * Confidence of the OCR results on the page. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results on the page. Range [0, 1]. + * + * Generated from protobuf field float confidence = 5; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php new file mode 100644 index 000000000000..0dbbb5b4367f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php @@ -0,0 +1,245 @@ +google.cloud.vision.v1.Paragraph + */ +class Paragraph extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the paragraph. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * List of all words in this paragraph. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; + */ + private $words; + /** + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the paragraph. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $words + * List of all words in this paragraph. + * @type float $confidence + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the paragraph. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the paragraph. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the paragraph. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * List of all words in this paragraph. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWords() + { + return $this->words; + } + + /** + * List of all words in this paragraph. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; + * @param array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Word::class); + $this->words = $arr; + + return $this; + } + + /** + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results for the paragraph. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php new file mode 100644 index 000000000000..198ed9067d2e --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php @@ -0,0 +1,137 @@ +google.cloud.vision.v1.Position + */ +class Position 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; + /** + * Z coordinate (or depth). + * + * Generated from protobuf field float z = 3; + */ + protected $z = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * X coordinate. + * @type float $y + * Y coordinate. + * @type float $z + * Z coordinate (or depth). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::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; + } + + /** + * Z coordinate (or depth). + * + * Generated from protobuf field float z = 3; + * @return float + */ + public function getZ() + { + return $this->z; + } + + /** + * Z coordinate (or depth). + * + * Generated from protobuf field float z = 3; + * @param float $var + * @return $this + */ + public function setZ($var) + { + GPBUtil::checkFloat($var); + $this->z = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php new file mode 100644 index 000000000000..56502e7cfe56 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php @@ -0,0 +1,275 @@ +google.cloud.vision.v1.Product + */ +class Product extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Immutable. The category for the product identified by the reference image. + * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", + * "apparel", and "toys" are still supported, but these should not be used for + * new products. + * + * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $product_category = ''; + /** + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + */ + private $product_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * @type string $display_name + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * @type string $description + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * @type string $product_category + * Immutable. The category for the product identified by the reference image. + * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", + * "apparel", and "toys" are still supported, but these should not be used for + * new products. + * @type array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $product_labels + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the product. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * This field is ignored when creating a product. + * + * 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 user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-provided name for this Product. Must not be empty. Must be at most + * 4096 characters long. + * + * 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; + } + + /** + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided metadata to be stored with this product. Must be at most 4096 + * characters long. + * + * 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; + } + + /** + * Immutable. The category for the product identified by the reference image. + * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", + * "apparel", and "toys" are still supported, but these should not be used for + * new products. + * + * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getProductCategory() + { + return $this->product_category; + } + + /** + * Immutable. The category for the product identified by the reference image. + * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", + * "apparel", and "toys" are still supported, but these should not be used for + * new products. + * + * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setProductCategory($var) + { + GPBUtil::checkString($var, True); + $this->product_category = $var; + + return $this; + } + + /** + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductLabels() + { + return $this->product_labels; + } + + /** + * Key-value pairs that can be attached to a product. At query time, + * constraints can be specified based on the product_labels. + * Note that integer values can be provided as strings, e.g. "1199". Only + * strings with integer values can match a range-based restriction which is + * to be supported soon. + * Multiple values can be assigned to the same key. One product may have up to + * 500 product_labels. + * Notice that the total number of distinct product_labels over all products + * in one ProductSet cannot exceed 1M, otherwise the product search pipeline + * will refuse to work for that ProductSet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; + * @param array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product\KeyValue::class); + $this->product_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php new file mode 100644 index 000000000000..6f977cac6d14 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php @@ -0,0 +1,112 @@ +google.cloud.vision.v1.Product.KeyValue + */ +class KeyValue extends \Google\Protobuf\Internal\Message +{ + /** + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * @type string $value + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The key of the label attached to the product. Cannot be empty and cannot + * exceed 128 bytes. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the label attached to the product. Cannot be empty and + * cannot exceed 128 bytes. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KeyValue::class, \Google\Cloud\Vision\V1\Product_KeyValue::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php new file mode 100644 index 000000000000..315a68ba9bc9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php @@ -0,0 +1,243 @@ +google.cloud.vision.v1.ProductSearchParams + */ +class ProductSearchParams extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + */ + protected $bounding_poly = null; + /** + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to + * be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * + * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { + */ + protected $product_set = ''; + /** + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * + * Generated from protobuf field repeated string product_categories = 7; + */ + private $product_categories; + /** + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * + * Generated from protobuf field string filter = 8; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * @type string $product_set + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to + * be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * @type array|\Google\Protobuf\Internal\RepeatedField $product_categories + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * @type string $filter + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon around the area of interest in the image. + * If it is not specified, system discretion will be applied. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to + * be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * + * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getProductSet() + { + return $this->product_set; + } + + /** + * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to + * be searched for similar images. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * + * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProductSet($var) + { + GPBUtil::checkString($var, True); + $this->product_set = $var; + + return $this; + } + + /** + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * + * Generated from protobuf field repeated string product_categories = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductCategories() + { + return $this->product_categories; + } + + /** + * The list of product categories to search in. Currently, we only consider + * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", + * "packagedgoods-v1", or "general-v1" should be specified. The legacy + * categories "homegoods", "apparel", and "toys" are still supported but will + * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", + * or "toys-v2" for better product search accuracy. It is recommended to + * migrate existing products to these categories as well. + * + * Generated from protobuf field repeated string product_categories = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->product_categories = $arr; + + return $this; + } + + /** + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * + * Generated from protobuf field string filter = 8; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filtering expression. This can be used to restrict search results based + * on Product labels. We currently support an AND of OR of key-value + * expressions, where each expression within an OR must have the same key. An + * '=' should be used to connect the key and value. + * For example, "(color = red OR color = blue) AND brand = Google" is + * acceptable, but "(color = red OR brand = Google)" is not acceptable. + * "color: red" is not acceptable because it uses a ':' instead of an '='. + * + * Generated from protobuf field string filter = 8; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php new file mode 100644 index 000000000000..44d025f0d729 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php @@ -0,0 +1,165 @@ +google.cloud.vision.v1.ProductSearchResults + */ +class ProductSearchResults extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; + */ + protected $index_time = null; + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + */ + private $results; + /** + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + */ + private $product_grouped_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $index_time + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results + * List of results, one for each product match. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $product_grouped_results + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIndexTime() + { + return $this->index_time; + } + + public function hasIndexTime() + { + return isset($this->index_time); + } + + public function clearIndexTime() + { + unset($this->index_time); + } + + /** + * Timestamp of the index which provided these results. Products added to the + * product set and products removed from the product set after this time are + * not reflected in the current results. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIndexTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->index_time = $var; + + return $this; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); + $this->results = $arr; + + return $this; + } + + /** + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProductGroupedResults() + { + return $this->product_grouped_results; + } + + /** + * List of results grouped by products detected in the query image. Each entry + * corresponds to one bounding polygon in the query image, and contains the + * matching products specific to that region. There may be duplicate product + * matches in the union of all the per-product results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProductGroupedResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult::class); + $this->product_grouped_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php new file mode 100644 index 000000000000..9066aef0cfdf --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php @@ -0,0 +1,149 @@ +google.cloud.vision.v1.ProductSearchResults.GroupedResult + */ +class GroupedResult extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon around the product detected in the query image. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + */ + protected $bounding_poly = null; + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + */ + private $results; + /** + * List of generic predictions for the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + */ + private $object_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly + * The bounding polygon around the product detected in the query image. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results + * List of results, one for each product match. + * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $object_annotations + * List of generic predictions for the object in the bounding box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon around the product detected in the query image. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingPoly() + { + return $this->bounding_poly; + } + + public function hasBoundingPoly() + { + return isset($this->bounding_poly); + } + + public function clearBoundingPoly() + { + unset($this->bounding_poly); + } + + /** + * The bounding polygon around the product detected in the query image. + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingPoly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_poly = $var; + + return $this; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * List of results, one for each product match. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); + $this->results = $arr; + + return $this; + } + + /** + * List of generic predictions for the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getObjectAnnotations() + { + return $this->object_annotations; + } + + /** + * List of generic predictions for the object in the bounding box. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; + * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setObjectAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation::class); + $this->object_annotations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupedResult::class, \Google\Cloud\Vision\V1\ProductSearchResults_GroupedResult::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php new file mode 100644 index 000000000000..a8005c3f6b30 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php @@ -0,0 +1,180 @@ +google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation + */ +class ObjectAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + */ + protected $mid = ''; + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mid + * Object ID that should align with EntityAnnotation mid. + * @type string $language_code + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * @type string $name + * Object name, expressed in its `language_code` language. + * @type float $score + * Score of the result. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @return string + */ + public function getMid() + { + return $this->mid; + } + + /** + * Object ID that should align with EntityAnnotation mid. + * + * Generated from protobuf field string mid = 1; + * @param string $var + * @return $this + */ + public function setMid($var) + { + GPBUtil::checkString($var, True); + $this->mid = $var; + + return $this; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Object name, expressed in its `language_code` language. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Object name, expressed in its `language_code` language. + * + * 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; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Score of the result. Range [0, 1]. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ObjectAnnotation::class, \Google\Cloud\Vision\V1\ProductSearchResults_ObjectAnnotation::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php new file mode 100644 index 000000000000..4fa9d2e05b69 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php @@ -0,0 +1,156 @@ +google.cloud.vision.v1.ProductSearchResults.Result + */ +class Result extends \Google\Protobuf\Internal\Message +{ + /** + * The Product. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; + */ + protected $product = null; + /** + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * The resource name of the image from the product that is the closest match + * to the query. + * + * Generated from protobuf field string image = 3; + */ + protected $image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\Product $product + * The Product. + * @type float $score + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * @type string $image + * The resource name of the image from the product that is the closest match + * to the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); + parent::__construct($data); + } + + /** + * The Product. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; + * @return \Google\Cloud\Vision\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * The Product. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; + * @param \Google\Cloud\Vision\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * A confidence level on the match, ranging from 0 (no confidence) to + * 1 (full confidence). + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * The resource name of the image from the product that is the closest match + * to the query. + * + * Generated from protobuf field string image = 3; + * @return string + */ + public function getImage() + { + return $this->image; + } + + /** + * The resource name of the image from the product that is the closest match + * to the query. + * + * Generated from protobuf field string image = 3; + * @param string $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkString($var, True); + $this->image = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\Vision\V1\ProductSearchResults_Result::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php new file mode 100644 index 000000000000..fae1466b47f3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php @@ -0,0 +1,231 @@ +google.cloud.vision.v1.ProductSet + */ +class ProductSet extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_time = null; + /** + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * @type string $display_name + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * @type \Google\Protobuf\Timestamp $index_time + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * @type \Google\Rpc\Status $index_error + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. + * This field is ignored when creating a ProductSet. + * + * 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 user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-provided name for this ProductSet. Must not be empty. Must be at + * most 4096 characters long. + * + * 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; + } + + /** + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIndexTime() + { + return $this->index_time; + } + + public function hasIndexTime() + { + return isset($this->index_time); + } + + public function clearIndexTime() + { + unset($this->index_time); + } + + /** + * Output only. The time at which this ProductSet was last indexed. Query + * results will reflect all updates before this time. If this ProductSet has + * never been indexed, this timestamp is the default value + * "1970-01-01T00:00:00Z". + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIndexTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->index_time = $var; + + return $this; + } + + /** + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getIndexError() + { + return $this->index_error; + } + + public function hasIndexError() + { + return isset($this->index_error); + } + + public function clearIndexError() + { + unset($this->index_error); + } + + /** + * Output only. If there was an error with indexing the product set, the field + * is populated. + * This field is ignored when creating a ProductSet. + * + * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setIndexError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->index_error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php new file mode 100644 index 000000000000..b433c625acb4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php @@ -0,0 +1,75 @@ +google.cloud.vision.v1.ProductSetPurgeConfig + */ +class ProductSetPurgeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * + * Generated from protobuf field string product_set_id = 1; + */ + protected $product_set_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $product_set_id + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * + * Generated from protobuf field string product_set_id = 1; + * @return string + */ + public function getProductSetId() + { + return $this->product_set_id; + } + + /** + * The ProductSet that contains the Products to delete. If a Product is a + * member of product_set_id in addition to other ProductSets, the Product will + * still be deleted. + * + * Generated from protobuf field string product_set_id = 1; + * @param string $var + * @return $this + */ + public function setProductSetId($var) + { + GPBUtil::checkString($var, True); + $this->product_set_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php new file mode 100644 index 000000000000..3fb9058b77b0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php @@ -0,0 +1,135 @@ +google.cloud.vision.v1.Property + */ +class Property extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the property. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Value of the property. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + /** + * Value of numeric properties. + * + * Generated from protobuf field uint64 uint64_value = 3; + */ + protected $uint64_value = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the property. + * @type string $value + * Value of the property. + * @type int|string $uint64_value + * Value of numeric properties. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Name of the property. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the property. + * + * 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; + } + + /** + * Value of the property. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Value of the property. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Value of numeric properties. + * + * Generated from protobuf field uint64 uint64_value = 3; + * @return int|string + */ + public function getUint64Value() + { + return $this->uint64_value; + } + + /** + * Value of numeric properties. + * + * Generated from protobuf field uint64 uint64_value = 3; + * @param int|string $var + * @return $this + */ + public function setUint64Value($var) + { + GPBUtil::checkUint64($var); + $this->uint64_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php new file mode 100644 index 000000000000..9633606d6678 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php @@ -0,0 +1,203 @@ +google.cloud.vision.v1.PurgeProductsRequest + */ +class PurgeProductsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The default value is false. Override this value to true to actually perform + * the purge. + * + * Generated from protobuf field bool force = 4; + */ + protected $force = false; + protected $target; + + /** + * @param string $parent Required. The project and location in which the Products should be deleted. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see + * {@see ProductSearchClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\PurgeProductsRequest + * + * @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 \Google\Cloud\Vision\V1\ProductSetPurgeConfig $product_set_purge_config + * Specify which ProductSet contains the Products to be deleted. + * @type bool $delete_orphan_products + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * @type string $parent + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @type bool $force + * The default value is false. Override this value to true to actually perform + * the purge. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Specify which ProductSet contains the Products to be deleted. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @return \Google\Cloud\Vision\V1\ProductSetPurgeConfig|null + */ + public function getProductSetPurgeConfig() + { + return $this->readOneof(2); + } + + public function hasProductSetPurgeConfig() + { + return $this->hasOneof(2); + } + + /** + * Specify which ProductSet contains the Products to be deleted. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; + * @param \Google\Cloud\Vision\V1\ProductSetPurgeConfig $var + * @return $this + */ + public function setProductSetPurgeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSetPurgeConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * + * Generated from protobuf field bool delete_orphan_products = 3; + * @return bool + */ + public function getDeleteOrphanProducts() + { + return $this->readOneof(3); + } + + public function hasDeleteOrphanProducts() + { + return $this->hasOneof(3); + } + + /** + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * + * Generated from protobuf field bool delete_orphan_products = 3; + * @param bool $var + * @return $this + */ + public function setDeleteOrphanProducts($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. The project and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_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 and location in which the Products should be deleted. + * Format is `projects/PROJECT_ID/locations/LOC_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 default value is false. Override this value to true to actually perform + * the purge. + * + * Generated from protobuf field bool force = 4; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * The default value is false. Override this value to true to actually perform + * the purge. + * + * Generated from protobuf field bool force = 4; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php new file mode 100644 index 000000000000..a4371a4149d9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php @@ -0,0 +1,176 @@ +google.cloud.vision.v1.ReferenceImage + */ +class ReferenceImage extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Optional. Bounding polygons around the areas of interest in the reference + * image. If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $bounding_polys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * @type string $uri + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * @type array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $bounding_polys + * Optional. Bounding polygons around the areas of interest in the reference + * image. If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the reference image. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * This field is ignored when creating a reference image. + * + * 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 Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The Google Cloud Storage URI of the reference image. + * The URI must start with `gs://`. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Optional. Bounding polygons around the areas of interest in the reference + * image. If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBoundingPolys() + { + return $this->bounding_polys; + } + + /** + * Optional. Bounding polygons around the areas of interest in the reference + * image. If this field is empty, the system will try to detect regions of + * interest. At most 10 bounding polygons will be used. + * The provided shape is converted into a non-rotated rectangle. Once + * converted, the small edge of the rectangle must be greater than or equal + * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 + * is not). + * + * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBoundingPolys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_polys = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php new file mode 100644 index 000000000000..344af637ba5f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php @@ -0,0 +1,145 @@ +google.cloud.vision.v1.RemoveProductFromProductSetRequest + */ +class RemoveProductFromProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The resource name for the Product to be removed from this + * ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $product = ''; + + /** + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. + * @param string $product Required. The resource name for the Product to be removed from this + * ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * Please see {@see ProductSearchClient::productName()} for help formatting this field. + * + * @return \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest + * + * @experimental + */ + public static function build(string $name, string $product): self + { + return (new self()) + ->setName($name) + ->setProduct($product); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @type string $product + * Required. The resource name for the Product to be removed from this + * ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 resource name for the Product to be removed from this + * ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProduct() + { + return $this->product; + } + + /** + * Required. The resource name for the Product to be removed from this + * ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * + * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkString($var, True); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php new file mode 100644 index 000000000000..58c2b95955e4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php @@ -0,0 +1,241 @@ +google.cloud.vision.v1.SafeSearchAnnotation + */ +class SafeSearchAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; + */ + protected $adult = 0; + /** + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; + */ + protected $spoof = 0; + /** + * Likelihood that this is a medical image. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; + */ + protected $medical = 0; + /** + * Likelihood that this image contains violent content. Violent content may + * include death, serious harm, or injury to individuals or groups of + * individuals. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; + */ + protected $violence = 0; + /** + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; + */ + protected $racy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $adult + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * @type int $spoof + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * @type int $medical + * Likelihood that this is a medical image. + * @type int $violence + * Likelihood that this image contains violent content. Violent content may + * include death, serious harm, or injury to individuals or groups of + * individuals. + * @type int $racy + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; + * @return int + */ + public function getAdult() + { + return $this->adult; + } + + /** + * Represents the adult content likelihood for the image. Adult content may + * contain elements such as nudity, pornographic images or cartoons, or + * sexual activities. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; + * @param int $var + * @return $this + */ + public function setAdult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->adult = $var; + + return $this; + } + + /** + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; + * @return int + */ + public function getSpoof() + { + return $this->spoof; + } + + /** + * Spoof likelihood. The likelihood that an modification + * was made to the image's canonical version to make it appear + * funny or offensive. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; + * @param int $var + * @return $this + */ + public function setSpoof($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->spoof = $var; + + return $this; + } + + /** + * Likelihood that this is a medical image. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; + * @return int + */ + public function getMedical() + { + return $this->medical; + } + + /** + * Likelihood that this is a medical image. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; + * @param int $var + * @return $this + */ + public function setMedical($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->medical = $var; + + return $this; + } + + /** + * Likelihood that this image contains violent content. Violent content may + * include death, serious harm, or injury to individuals or groups of + * individuals. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; + * @return int + */ + public function getViolence() + { + return $this->violence; + } + + /** + * Likelihood that this image contains violent content. Violent content may + * include death, serious harm, or injury to individuals or groups of + * individuals. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; + * @param int $var + * @return $this + */ + public function setViolence($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->violence = $var; + + return $this; + } + + /** + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; + * @return int + */ + public function getRacy() + { + return $this->racy; + } + + /** + * Likelihood that the request image contains racy content. Racy content may + * include (but is not limited to) skimpy or sheer clothing, strategically + * covered nudity, lewd or provocative poses, or close-ups of sensitive + * body areas. + * + * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; + * @param int $var + * @return $this + */ + public function setRacy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); + $this->racy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php new file mode 100644 index 000000000000..4fe27114775f --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php @@ -0,0 +1,245 @@ +google.cloud.vision.v1.Symbol + */ +class Symbol extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the symbol. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * The actual UTF-8 representation of the symbol. + * + * Generated from protobuf field string text = 3; + */ + protected $text = ''; + /** + * Confidence of the OCR results for the symbol. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the symbol. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type string $text + * The actual UTF-8 representation of the symbol. + * @type float $confidence + * Confidence of the OCR results for the symbol. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the symbol. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the symbol. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the symbol. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * The actual UTF-8 representation of the symbol. + * + * Generated from protobuf field string text = 3; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The actual UTF-8 representation of the symbol. + * + * Generated from protobuf field string text = 3; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Confidence of the OCR results for the symbol. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results for the symbol. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php new file mode 100644 index 000000000000..e736837aaee1 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php @@ -0,0 +1,108 @@ + Page -> Block -> Paragraph -> Word -> Symbol + * Each structural component, starting from Page, may further have their own + * properties. Properties describe detected languages, breaks etc.. Please refer + * to the + * [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] + * message definition below for more detail. + * + * Generated from protobuf message google.cloud.vision.v1.TextAnnotation + */ +class TextAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * List of pages detected by OCR. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; + */ + private $pages; + /** + * UTF-8 text detected on the pages. + * + * Generated from protobuf field string text = 2; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $pages + * List of pages detected by OCR. + * @type string $text + * UTF-8 text detected on the pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * List of pages detected by OCR. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPages() + { + return $this->pages; + } + + /** + * List of pages detected by OCR. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; + * @param array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Page::class); + $this->pages = $arr; + + return $this; + } + + /** + * UTF-8 text detected on the pages. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * UTF-8 text detected on the pages. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php new file mode 100644 index 000000000000..7844b2387083 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php @@ -0,0 +1,104 @@ +google.cloud.vision.v1.TextAnnotation.DetectedBreak + */ +class DetectedBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + */ + protected $type = 0; + /** + * True if break prepends the element. + * + * Generated from protobuf field bool is_prefix = 2; + */ + protected $is_prefix = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Detected break type. + * @type bool $is_prefix + * True if break prepends the element. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Detected break type. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak\BreakType::class); + $this->type = $var; + + return $this; + } + + /** + * True if break prepends the element. + * + * Generated from protobuf field bool is_prefix = 2; + * @return bool + */ + public function getIsPrefix() + { + return $this->is_prefix; + } + + /** + * True if break prepends the element. + * + * Generated from protobuf field bool is_prefix = 2; + * @param bool $var + * @return $this + */ + public function setIsPrefix($var) + { + GPBUtil::checkBool($var); + $this->is_prefix = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DetectedBreak::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php new file mode 100644 index 000000000000..455626c48545 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php @@ -0,0 +1,86 @@ +google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType + */ +class BreakType +{ + /** + * Unknown break label type. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Regular space. + * + * Generated from protobuf enum SPACE = 1; + */ + const SPACE = 1; + /** + * Sure space (very wide). + * + * Generated from protobuf enum SURE_SPACE = 2; + */ + const SURE_SPACE = 2; + /** + * Line-wrapping break. + * + * Generated from protobuf enum EOL_SURE_SPACE = 3; + */ + const EOL_SURE_SPACE = 3; + /** + * End-line hyphen that is not present in text; does not co-occur with + * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. + * + * Generated from protobuf enum HYPHEN = 4; + */ + const HYPHEN = 4; + /** + * Line break that ends a paragraph. + * + * Generated from protobuf enum LINE_BREAK = 5; + */ + const LINE_BREAK = 5; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::SPACE => 'SPACE', + self::SURE_SPACE => 'SURE_SPACE', + self::EOL_SURE_SPACE => 'EOL_SURE_SPACE', + self::HYPHEN => 'HYPHEN', + self::LINE_BREAK => 'LINE_BREAK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakType::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak_BreakType::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php new file mode 100644 index 000000000000..d2c4a7623404 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php @@ -0,0 +1,112 @@ +google.cloud.vision.v1.TextAnnotation.DetectedLanguage + */ +class DetectedLanguage extends \Google\Protobuf\Internal\Message +{ + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * Confidence of detected language. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * @type float $confidence + * Confidence of detected language. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as "en-US" or "sr-Latn". For more + * information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Confidence of detected language. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of detected language. Range [0, 1]. + * + * Generated from protobuf field float confidence = 2; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DetectedLanguage::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedLanguage::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php new file mode 100644 index 000000000000..3dbed38cafb6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php @@ -0,0 +1,114 @@ +google.cloud.vision.v1.TextAnnotation.TextProperty + */ +class TextProperty extends \Google\Protobuf\Internal\Message +{ + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + */ + private $detected_languages; + /** + * Detected start or end of a text segment. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + */ + protected $detected_break = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages + * A list of detected languages together with confidence. + * @type \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $detected_break + * Detected start or end of a text segment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetectedLanguages() + { + return $this->detected_languages; + } + + /** + * A list of detected languages together with confidence. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; + * @param array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetectedLanguages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage::class); + $this->detected_languages = $arr; + + return $this; + } + + /** + * Detected start or end of a text segment. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @return \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak|null + */ + public function getDetectedBreak() + { + return $this->detected_break; + } + + public function hasDetectedBreak() + { + return isset($this->detected_break); + } + + public function clearDetectedBreak() + { + unset($this->detected_break); + } + + /** + * Detected start or end of a text segment. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; + * @param \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $var + * @return $this + */ + public function setDetectedBreak($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak::class); + $this->detected_break = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextProperty::class, \Google\Cloud\Vision\V1\TextAnnotation_TextProperty::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php new file mode 100644 index 000000000000..b61fb377a093 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php @@ -0,0 +1,130 @@ +google.cloud.vision.v1.TextDetectionParams + */ +class TextDetectionParams extends \Google\Protobuf\Internal\Message +{ + /** + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * + * Generated from protobuf field bool enable_text_detection_confidence_score = 9; + */ + protected $enable_text_detection_confidence_score = false; + /** + * A list of advanced OCR options to further fine-tune OCR behavior. + * Current valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * + * Generated from protobuf field repeated string advanced_ocr_options = 11; + */ + private $advanced_ocr_options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_text_detection_confidence_score + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * @type array|\Google\Protobuf\Internal\RepeatedField $advanced_ocr_options + * A list of advanced OCR options to further fine-tune OCR behavior. + * Current valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * + * Generated from protobuf field bool enable_text_detection_confidence_score = 9; + * @return bool + */ + public function getEnableTextDetectionConfidenceScore() + { + return $this->enable_text_detection_confidence_score; + } + + /** + * By default, Cloud Vision API only includes confidence score for + * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence + * score for TEXT_DETECTION as well. + * + * Generated from protobuf field bool enable_text_detection_confidence_score = 9; + * @param bool $var + * @return $this + */ + public function setEnableTextDetectionConfidenceScore($var) + { + GPBUtil::checkBool($var); + $this->enable_text_detection_confidence_score = $var; + + return $this; + } + + /** + * A list of advanced OCR options to further fine-tune OCR behavior. + * Current valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * + * Generated from protobuf field repeated string advanced_ocr_options = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdvancedOcrOptions() + { + return $this->advanced_ocr_options; + } + + /** + * A list of advanced OCR options to further fine-tune OCR behavior. + * Current valid values are: + * - `legacy_layout`: a heuristics layout detection algorithm, which serves as + * an alternative to the current ML-based layout detection algorithm. + * Customers can choose the best suitable layout algorithm based on their + * situation. + * + * Generated from protobuf field repeated string advanced_ocr_options = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdvancedOcrOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->advanced_ocr_options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php new file mode 100644 index 000000000000..91ab72f3f77e --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php @@ -0,0 +1,161 @@ +google.cloud.vision.v1.UpdateProductRequest + */ +class UpdateProductRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product = null; + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Vision\V1\Product $product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * @return \Google\Cloud\Vision\V1\UpdateProductRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Vision\V1\Product $product, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProduct($product) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\Product $product + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @type \Google\Protobuf\FieldMask $update_mask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * + * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); + $this->product = $var; + + return $this; + } + + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * 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 [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php new file mode 100644 index 000000000000..f3efd0e6405a --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php @@ -0,0 +1,151 @@ +google.cloud.vision.v1.UpdateProductSetRequest + */ +class UpdateProductSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ProductSet resource which replaces the one on the server. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $product_set = null; + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. + * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * @return \Google\Cloud\Vision\V1\UpdateProductSetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Vision\V1\ProductSet $productSet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProductSet($productSet) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\ProductSet $product_set + * Required. The ProductSet resource which replaces the one on the server. + * @type \Google\Protobuf\FieldMask $update_mask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ProductSet resource which replaces the one on the server. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Vision\V1\ProductSet|null + */ + public function getProductSet() + { + return $this->product_set; + } + + public function hasProductSet() + { + return isset($this->product_set); + } + + public function clearProductSet() + { + unset($this->product_set); + } + + /** + * Required. The ProductSet resource which replaces the one on the server. + * + * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Vision\V1\ProductSet $var + * @return $this + */ + public function setProductSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); + $this->product_set = $var; + + return $this; + } + + /** + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * 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 [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * + * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php new file mode 100644 index 000000000000..2944b434c7a6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php @@ -0,0 +1,102 @@ +google.cloud.vision.v1.Vertex + */ +class Vertex extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + */ + protected $x = 0; + /** + * Y coordinate. + * + * Generated from protobuf field int32 y = 2; + */ + protected $y = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $x + * X coordinate. + * @type int $y + * Y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + * @return int + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field int32 x = 1; + * @param int $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkInt32($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate. + * + * Generated from protobuf field int32 y = 2; + * @return int + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate. + * + * Generated from protobuf field int32 y = 2; + * @param int $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkInt32($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php new file mode 100644 index 000000000000..7210409bd479 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php @@ -0,0 +1,253 @@ +google.cloud.vision.v1.WebDetection + */ +class WebDetection extends \Google\Protobuf\Internal\Message +{ + /** + * Deduced entities from similar images on the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + */ + private $web_entities; + /** + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + */ + private $full_matching_images; + /** + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + */ + private $partial_matching_images; + /** + * Web pages containing the matching images from the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + */ + private $pages_with_matching_images; + /** + * The visually similar image results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + */ + private $visually_similar_images; + /** + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + */ + private $best_guess_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $web_entities + * Deduced entities from similar images on the Internet. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $pages_with_matching_images + * Web pages containing the matching images from the Internet. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $visually_similar_images + * The visually similar image results. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $best_guess_labels + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * Deduced entities from similar images on the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWebEntities() + { + return $this->web_entities; + } + + /** + * Deduced entities from similar images on the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWebEntities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebEntity::class); + $this->web_entities = $arr; + + return $this; + } + + /** + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFullMatchingImages() + { + return $this->full_matching_images; + } + + /** + * Fully matching images from the Internet. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFullMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->full_matching_images = $arr; + + return $this; + } + + /** + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialMatchingImages() + { + return $this->partial_matching_images; + } + + /** + * Partial matching images from the Internet. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartialMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->partial_matching_images = $arr; + + return $this; + } + + /** + * Web pages containing the matching images from the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPagesWithMatchingImages() + { + return $this->pages_with_matching_images; + } + + /** + * Web pages containing the matching images from the Internet. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPagesWithMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebPage::class); + $this->pages_with_matching_images = $arr; + + return $this; + } + + /** + * The visually similar image results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisuallySimilarImages() + { + return $this->visually_similar_images; + } + + /** + * The visually similar image results. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisuallySimilarImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->visually_similar_images = $arr; + + return $this; + } + + /** + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBestGuessLabels() + { + return $this->best_guess_labels; + } + + /** + * The service's best guess as to the topic of the request image. + * Inferred from similar images on the open web. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBestGuessLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebLabel::class); + $this->best_guess_labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php new file mode 100644 index 000000000000..7ed5190c9507 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php @@ -0,0 +1,142 @@ +google.cloud.vision.v1.WebDetection.WebEntity + */ +class WebEntity extends \Google\Protobuf\Internal\Message +{ + /** + * Opaque entity ID. + * + * Generated from protobuf field string entity_id = 1; + */ + protected $entity_id = ''; + /** + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * Canonical description of the entity, in English. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity_id + * Opaque entity ID. + * @type float $score + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * @type string $description + * Canonical description of the entity, in English. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * Opaque entity ID. + * + * Generated from protobuf field string entity_id = 1; + * @return string + */ + public function getEntityId() + { + return $this->entity_id; + } + + /** + * Opaque entity ID. + * + * Generated from protobuf field string entity_id = 1; + * @param string $var + * @return $this + */ + public function setEntityId($var) + { + GPBUtil::checkString($var, True); + $this->entity_id = $var; + + return $this; + } + + /** + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Overall relevancy score for the entity. + * Not normalized and not comparable across different image queries. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Canonical description of the entity, in English. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Canonical description of the entity, in English. + * + * 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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebEntity::class, \Google\Cloud\Vision\V1\WebDetection_WebEntity::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php new file mode 100644 index 000000000000..0a74c6f6392c --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php @@ -0,0 +1,104 @@ +google.cloud.vision.v1.WebDetection.WebImage + */ +class WebImage extends \Google\Protobuf\Internal\Message +{ + /** + * The result image URL. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * (Deprecated) Overall relevancy score for the image. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The result image URL. + * @type float $score + * (Deprecated) Overall relevancy score for the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * The result image URL. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The result image URL. + * + * 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; + } + + /** + * (Deprecated) Overall relevancy score for the image. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * (Deprecated) Overall relevancy score for the image. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebImage::class, \Google\Cloud\Vision\V1\WebDetection_WebImage::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php new file mode 100644 index 000000000000..455b38bf8f91 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php @@ -0,0 +1,112 @@ +google.cloud.vision.v1.WebDetection.WebLabel + */ +class WebLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Label for extra metadata. + * + * Generated from protobuf field string label = 1; + */ + protected $label = ''; + /** + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + */ + protected $language_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * Label for extra metadata. + * @type string $language_code + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * Label for extra metadata. + * + * Generated from protobuf field string label = 1; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label for extra metadata. + * + * Generated from protobuf field string label = 1; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + * For more information, see + * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + * + * Generated from protobuf field string language_code = 2; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebLabel::class, \Google\Cloud\Vision\V1\WebDetection_WebLabel::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php new file mode 100644 index 000000000000..a7ebc3422453 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php @@ -0,0 +1,222 @@ +google.cloud.vision.v1.WebDetection.WebPage + */ +class WebPage extends \Google\Protobuf\Internal\Message +{ + /** + * The result web page URL. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * (Deprecated) Overall relevancy score for the web page. + * + * Generated from protobuf field float score = 2; + */ + protected $score = 0.0; + /** + * Title for the web page, may contain HTML markups. + * + * Generated from protobuf field string page_title = 3; + */ + protected $page_title = ''; + /** + * Fully matching images on the page. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + */ + private $full_matching_images; + /** + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + */ + private $partial_matching_images; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The result web page URL. + * @type float $score + * (Deprecated) Overall relevancy score for the web page. + * @type string $page_title + * Title for the web page, may contain HTML markups. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images + * Fully matching images on the page. + * Can include resized copies of the query image. + * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); + parent::__construct($data); + } + + /** + * The result web page URL. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The result web page URL. + * + * 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; + } + + /** + * (Deprecated) Overall relevancy score for the web page. + * + * Generated from protobuf field float score = 2; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * (Deprecated) Overall relevancy score for the web page. + * + * Generated from protobuf field float score = 2; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Title for the web page, may contain HTML markups. + * + * Generated from protobuf field string page_title = 3; + * @return string + */ + public function getPageTitle() + { + return $this->page_title; + } + + /** + * Title for the web page, may contain HTML markups. + * + * Generated from protobuf field string page_title = 3; + * @param string $var + * @return $this + */ + public function setPageTitle($var) + { + GPBUtil::checkString($var, True); + $this->page_title = $var; + + return $this; + } + + /** + * Fully matching images on the page. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFullMatchingImages() + { + return $this->full_matching_images; + } + + /** + * Fully matching images on the page. + * Can include resized copies of the query image. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFullMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->full_matching_images = $arr; + + return $this; + } + + /** + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialMatchingImages() + { + return $this->partial_matching_images; + } + + /** + * Partial matching images on the page. + * Those images are similar enough to share some key-point features. For + * example an original image will likely have partial matching for its + * crops. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; + * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartialMatchingImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); + $this->partial_matching_images = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebPage::class, \Google\Cloud\Vision\V1\WebDetection_WebPage::class); + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php new file mode 100644 index 000000000000..2a5e2e544fa9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php @@ -0,0 +1,72 @@ +google.cloud.vision.v1.WebDetectionParams + */ +class WebDetectionParams extends \Google\Protobuf\Internal\Message +{ + /** + * This field has no effect on results. + * + * Generated from protobuf field bool include_geo_results = 2 [deprecated = true]; + * @deprecated + */ + protected $include_geo_results = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $include_geo_results + * This field has no effect on results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); + parent::__construct($data); + } + + /** + * This field has no effect on results. + * + * Generated from protobuf field bool include_geo_results = 2 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getIncludeGeoResults() + { + @trigger_error('include_geo_results is deprecated.', E_USER_DEPRECATED); + return $this->include_geo_results; + } + + /** + * This field has no effect on results. + * + * Generated from protobuf field bool include_geo_results = 2 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setIncludeGeoResults($var) + { + @trigger_error('include_geo_results is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->include_geo_results = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php new file mode 100644 index 000000000000..e753e3772569 --- /dev/null +++ b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php @@ -0,0 +1,249 @@ +google.cloud.vision.v1.Word + */ +class Word extends \Google\Protobuf\Internal\Message +{ + /** + * Additional information detected for the word. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + */ + protected $property = null; + /** + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + */ + protected $bounding_box = null; + /** + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; + */ + private $symbols; + /** + * Confidence of the OCR results for the word. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property + * Additional information detected for the word. + * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * @type array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $symbols + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * @type float $confidence + * Confidence of the OCR results for the word. Range [0, 1]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); + parent::__construct($data); + } + + /** + * Additional information detected for the word. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null + */ + public function getProperty() + { + return $this->property; + } + + public function hasProperty() + { + return isset($this->property); + } + + public function clearProperty() + { + unset($this->property); + } + + /** + * Additional information detected for the word. + * + * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; + * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); + $this->property = $var; + + return $this; + } + + /** + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @return \Google\Cloud\Vision\V1\BoundingPoly|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * The bounding box for the word. + * The vertices are in the order of top-left, top-right, bottom-right, + * bottom-left. When a rotation of the bounding box is detected the rotation + * is represented as around the top-left corner as defined when the text is + * read in the 'natural' orientation. + * For example: + * * when the text is horizontal it might look like: + * 0----1 + * | | + * 3----2 + * * when it's rotated 180 degrees around the top-left corner it becomes: + * 2----3 + * | | + * 1----0 + * and the vertex order will still be (0, 1, 2, 3). + * + * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; + * @param \Google\Cloud\Vision\V1\BoundingPoly $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSymbols() + { + return $this->symbols; + } + + /** + * List of symbols in the word. + * The order of the symbols follows the natural reading order. + * + * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; + * @param array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSymbols($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Symbol::class); + $this->symbols = $arr; + + return $this; + } + + /** + * Confidence of the OCR results for the word. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * Confidence of the OCR results for the word. Range [0, 1]. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php new file mode 100644 index 000000000000..cc350ef5096b --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php @@ -0,0 +1,77 @@ +setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $imageAnnotatorClient->asyncBatchAnnotateFiles($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AsyncBatchAnnotateFilesResponse $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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php new file mode 100644 index 000000000000..795d3b5d4c71 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php @@ -0,0 +1,83 @@ +setRequests($requests) + ->setOutputConfig($outputConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $imageAnnotatorClient->asyncBatchAnnotateImages($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AsyncBatchAnnotateImagesResponse $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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php new file mode 100644 index 000000000000..255a714c1c06 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php @@ -0,0 +1,66 @@ +setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchAnnotateFilesResponse $response */ + $response = $imageAnnotatorClient->batchAnnotateFiles($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php new file mode 100644 index 000000000000..8dea45dcd8f5 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php @@ -0,0 +1,60 @@ +setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchAnnotateImagesResponse $response */ + $response = $imageAnnotatorClient->batchAnnotateImages($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php new file mode 100644 index 000000000000..3cadb7c9f92c --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php @@ -0,0 +1,86 @@ +setName($formattedName) + ->setProduct($formattedProduct); + + // Call the API and handle any network failures. + try { + $productSearchClient->addProductToProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + add_product_to_product_set_sample($formattedName, $formattedProduct); +} +// [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php new file mode 100644 index 000000000000..c169d9bae9f6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setProduct($product); + + // Call the API and handle any network failures. + try { + /** @var Product $response */ + $response = $productSearchClient->createProduct($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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + create_product_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php new file mode 100644 index 000000000000..640ec3e9e39e --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setProductSet($productSet); + + // Call the API and handle any network failures. + try { + /** @var ProductSet $response */ + $response = $productSearchClient->createProductSet($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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + create_product_set_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php new file mode 100644 index 000000000000..a000c147b7d6 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php @@ -0,0 +1,100 @@ +setUri($referenceImageUri); + $request = (new CreateReferenceImageRequest()) + ->setParent($formattedParent) + ->setReferenceImage($referenceImage); + + // Call the API and handle any network failures. + try { + /** @var ReferenceImage $response */ + $response = $productSearchClient->createReferenceImage($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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImageUri = '[URI]'; + + create_reference_image_sample($formattedParent, $referenceImageUri); +} +// [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php new file mode 100644 index 000000000000..4db20989da50 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $productSearchClient->deleteProduct($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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + delete_product_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php new file mode 100644 index 000000000000..915bf3a2a3df --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $productSearchClient->deleteProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + + delete_product_set_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php new file mode 100644 index 000000000000..84323a70e329 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $productSearchClient->deleteReferenceImage($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 = ProductSearchClient::referenceImageName( + '[PROJECT]', + '[LOCATION]', + '[PRODUCT]', + '[REFERENCE_IMAGE]' + ); + + delete_reference_image_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php new file mode 100644 index 000000000000..d2c9ed4c5bb4 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Product $response */ + $response = $productSearchClient->getProduct($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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + get_product_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php new file mode 100644 index 000000000000..67fc8cd72f32 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ProductSet $response */ + $response = $productSearchClient->getProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + + get_product_set_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php new file mode 100644 index 000000000000..74864ce18356 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReferenceImage $response */ + $response = $productSearchClient->getReferenceImage($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 = ProductSearchClient::referenceImageName( + '[PROJECT]', + '[LOCATION]', + '[PRODUCT]', + '[REFERENCE_IMAGE]' + ); + + get_reference_image_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php new file mode 100644 index 000000000000..d1d8d3a970e2 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setInputConfig($inputConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $productSearchClient->importProductSets($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportProductSetsResponse $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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + import_product_sets_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php new file mode 100644 index 000000000000..b1b5b0c77e4a --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $productSearchClient->listProductSets($request); + + /** @var ProductSet $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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + list_product_sets_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php new file mode 100644 index 000000000000..1591a71fb9c9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $productSearchClient->listProducts($request); + + /** @var Product $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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + list_products_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php new file mode 100644 index 000000000000..47fd49c66d4d --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $productSearchClient->listProductsInProductSet($request); + + /** @var Product $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 +{ + $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + + list_products_in_product_set_sample($formattedName); +} +// [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php new file mode 100644 index 000000000000..4208bed59fef --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $productSearchClient->listReferenceImages($request); + + /** @var ReferenceImage $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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + list_reference_images_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php new file mode 100644 index 000000000000..5fe86aa12541 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php @@ -0,0 +1,105 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $productSearchClient->purgeProducts($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 +{ + $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); + + purge_products_sample($formattedParent); +} +// [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php new file mode 100644 index 000000000000..f3e8cf70136c --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php @@ -0,0 +1,82 @@ +setName($formattedName) + ->setProduct($formattedProduct); + + // Call the API and handle any network failures. + try { + $productSearchClient->removeProductFromProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + + remove_product_from_product_set_sample($formattedName, $formattedProduct); +} +// [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php new file mode 100644 index 000000000000..7e599bb3ff36 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php @@ -0,0 +1,73 @@ +setProduct($product); + + // Call the API and handle any network failures. + try { + /** @var Product $response */ + $response = $productSearchClient->updateProduct($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php new file mode 100644 index 000000000000..9b97120e8587 --- /dev/null +++ b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php @@ -0,0 +1,66 @@ +setProductSet($productSet); + + // Call the API and handle any network failures. + try { + /** @var ProductSet $response */ + $response = $productSearchClient->updateProductSet($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php new file mode 100644 index 000000000000..5a08f037e90d --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php @@ -0,0 +1,387 @@ + asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchAnnotateFilesAsync(BatchAnnotateFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchAnnotateImagesAsync(BatchAnnotateImagesRequest $request, array $optionalArgs = []) + */ +final class ImageAnnotatorClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vision.v1.ImageAnnotator'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vision.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vision.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-vision', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/image_annotator_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/image_annotator_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/image_annotator_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/image_annotator_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName(string $project, string $location, string $productSet): string + { + return self::getPathTemplate('productSet')->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + * + * The async variant is {@see ImageAnnotatorClient::asyncBatchAnnotateFilesAsync()} + * . + * + * @example samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php + * + * @param AsyncBatchAnnotateFilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 asyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AsyncBatchAnnotateFiles', $request, $callOptions)->wait(); + } + + /** + * Run asynchronous image detection and annotation for a list of images. + * + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + * + * The async variant is + * {@see ImageAnnotatorClient::asyncBatchAnnotateImagesAsync()} . + * + * @example samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php + * + * @param AsyncBatchAnnotateImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 asyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AsyncBatchAnnotateImages', $request, $callOptions)->wait(); + } + + /** + * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * + * This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + * file provided and perform detection and annotation for each image + * extracted. + * + * The async variant is {@see ImageAnnotatorClient::batchAnnotateFilesAsync()} . + * + * @example samples/V1/ImageAnnotatorClient/batch_annotate_files.php + * + * @param BatchAnnotateFilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchAnnotateFilesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchAnnotateFiles(BatchAnnotateFilesRequest $request, array $callOptions = []): BatchAnnotateFilesResponse + { + return $this->startApiCall('BatchAnnotateFiles', $request, $callOptions)->wait(); + } + + /** + * Run image detection and annotation for a batch of images. + * + * The async variant is {@see ImageAnnotatorClient::batchAnnotateImagesAsync()} . + * + * @example samples/V1/ImageAnnotatorClient/batch_annotate_images.php + * + * @param BatchAnnotateImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchAnnotateImagesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchAnnotateImages(BatchAnnotateImagesRequest $request, array $callOptions = []): BatchAnnotateImagesResponse + { + return $this->startApiCall('BatchAnnotateImages', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php new file mode 100644 index 000000000000..3c546ee28bed --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php @@ -0,0 +1,988 @@ + addProductToProductSetAsync(AddProductToProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProductAsync(CreateProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProductSetAsync(CreateProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReferenceImageAsync(CreateReferenceImageRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProductAsync(DeleteProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProductSetAsync(DeleteProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReferenceImageAsync(DeleteReferenceImageRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProductAsync(GetProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProductSetAsync(GetProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReferenceImageAsync(GetReferenceImageRequest $request, array $optionalArgs = []) + * @method PromiseInterface importProductSetsAsync(ImportProductSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProductSetsAsync(ListProductSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProductsAsync(ListProductsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProductsInProductSetAsync(ListProductsInProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReferenceImagesAsync(ListReferenceImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface purgeProductsAsync(PurgeProductsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeProductFromProductSetAsync(RemoveProductFromProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProductAsync(UpdateProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProductSetAsync(UpdateProductSetRequest $request, array $optionalArgs = []) + */ +final class ProductSearchClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vision.v1.ProductSearch'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vision.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vision.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-vision', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/product_search_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/product_search_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/product_search_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/product_search_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a 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 product + * resource. + * + * @param string $project + * @param string $location + * @param string $product + * + * @return string The formatted product resource. + */ + public static function productName(string $project, string $location, string $product): string + { + return self::getPathTemplate('product')->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName(string $project, string $location, string $productSet): string + { + return self::getPathTemplate('productSet')->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reference_image resource. + * + * @param string $project + * @param string $location + * @param string $product + * @param string $referenceImage + * + * @return string The formatted reference_image resource. + */ + public static function referenceImageName(string $project, string $location, string $product, string $referenceImage): string + { + return self::getPathTemplate('referenceImage')->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + 'reference_image' => $referenceImage, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - product: projects/{project}/locations/{location}/products/{product} + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * + * One Product can be added to at most 100 ProductSets. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + * + * The async variant is {@see ProductSearchClient::addProductToProductSetAsync()} . + * + * @example samples/V1/ProductSearchClient/add_product_to_product_set.php + * + * @param AddProductToProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 addProductToProductSet(AddProductToProductSetRequest $request, array $callOptions = []): void + { + $this->startApiCall('AddProductToProductSet', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new product resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + * + * The async variant is {@see ProductSearchClient::createProductAsync()} . + * + * @example samples/V1/ProductSearchClient/create_product.php + * + * @param CreateProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Product + * + * @throws ApiException Thrown if the API call fails. + */ + public function createProduct(CreateProductRequest $request, array $callOptions = []): Product + { + return $this->startApiCall('CreateProduct', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new ProductSet resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + * + * The async variant is {@see ProductSearchClient::createProductSetAsync()} . + * + * @example samples/V1/ProductSearchClient/create_product_set.php + * + * @param CreateProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProductSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function createProductSet(CreateProductSetRequest $request, array $callOptions = []): ProductSet + { + return $this->startApiCall('CreateProductSet', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new ReferenceImage resource. + * + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + * + * The async variant is {@see ProductSearchClient::createReferenceImageAsync()} . + * + * @example samples/V1/ProductSearchClient/create_reference_image.php + * + * @param CreateReferenceImageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReferenceImage + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReferenceImage(CreateReferenceImageRequest $request, array $callOptions = []): ReferenceImage + { + return $this->startApiCall('CreateReferenceImage', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a product and its reference images. + * + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * + * The async variant is {@see ProductSearchClient::deleteProductAsync()} . + * + * @example samples/V1/ProductSearchClient/delete_product.php + * + * @param DeleteProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteProduct(DeleteProductRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteProduct', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * The async variant is {@see ProductSearchClient::deleteProductSetAsync()} . + * + * @example samples/V1/ProductSearchClient/delete_product_set.php + * + * @param DeleteProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteProductSet(DeleteProductSetRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteProductSet', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes a reference image. + * + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * The async variant is {@see ProductSearchClient::deleteReferenceImageAsync()} . + * + * @example samples/V1/ProductSearchClient/delete_reference_image.php + * + * @param DeleteReferenceImageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteReferenceImage(DeleteReferenceImageRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReferenceImage', $request, $callOptions)->wait(); + } + + /** + * Gets information associated with a Product. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * + * The async variant is {@see ProductSearchClient::getProductAsync()} . + * + * @example samples/V1/ProductSearchClient/get_product.php + * + * @param GetProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Product + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProduct(GetProductRequest $request, array $callOptions = []): Product + { + return $this->startApiCall('GetProduct', $request, $callOptions)->wait(); + } + + /** + * Gets information associated with a ProductSet. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * + * The async variant is {@see ProductSearchClient::getProductSetAsync()} . + * + * @example samples/V1/ProductSearchClient/get_product_set.php + * + * @param GetProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProductSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProductSet(GetProductSetRequest $request, array $callOptions = []): ProductSet + { + return $this->startApiCall('GetProductSet', $request, $callOptions)->wait(); + } + + /** + * Gets information associated with a ReferenceImage. + * + * Possible errors: + * + * * Returns NOT_FOUND if the specified image does not exist. + * + * The async variant is {@see ProductSearchClient::getReferenceImageAsync()} . + * + * @example samples/V1/ProductSearchClient/get_reference_image.php + * + * @param GetReferenceImageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReferenceImage + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReferenceImage(GetReferenceImageRequest $request, array $callOptions = []): ReferenceImage + { + return $this->startApiCall('GetReferenceImage', $request, $callOptions)->wait(); + } + + /** + * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be + * used to keep track of the progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + * The async variant is {@see ProductSearchClient::importProductSetsAsync()} . + * + * @example samples/V1/ProductSearchClient/import_product_sets.php + * + * @param ImportProductSetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 importProductSets(ImportProductSetsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportProductSets', $request, $callOptions)->wait(); + } + + /** + * Lists ProductSets in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + * + * The async variant is {@see ProductSearchClient::listProductSetsAsync()} . + * + * @example samples/V1/ProductSearchClient/list_product_sets.php + * + * @param ListProductSetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listProductSets(ListProductSetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProductSets', $request, $callOptions); + } + + /** + * Lists products in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * The async variant is {@see ProductSearchClient::listProductsAsync()} . + * + * @example samples/V1/ProductSearchClient/list_products.php + * + * @param ListProductsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listProducts(ListProductsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProducts', $request, $callOptions); + } + + /** + * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * The async variant is {@see ProductSearchClient::listProductsInProductSetAsync()} + * . + * + * @example samples/V1/ProductSearchClient/list_products_in_product_set.php + * + * @param ListProductsInProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listProductsInProductSet(ListProductsInProductSetRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProductsInProductSet', $request, $callOptions); + } + + /** + * Lists reference images. + * + * Possible errors: + * + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + * + * The async variant is {@see ProductSearchClient::listReferenceImagesAsync()} . + * + * @example samples/V1/ProductSearchClient/list_reference_images.php + * + * @param ListReferenceImagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReferenceImages(ListReferenceImagesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReferenceImages', $request, $callOptions); + } + + /** + * Asynchronous API to delete all Products in a ProductSet or all Products + * that are in no ProductSet. + * + * If a Product is a member of the specified ProductSet in addition to other + * ProductSets, the Product will still be deleted. + * + * It is recommended to not delete the specified ProductSet until after this + * operation has completed. It is also recommended to not add any of the + * Products involved in the batch delete to a new ProductSet while this + * operation is running because those Products may still end up deleted. + * + * It's not possible to undo the PurgeProducts operation. Therefore, it is + * recommended to keep the csv files used in ImportProductSets (if that was + * how you originally built the Product Set) before starting PurgeProducts, in + * case you need to re-import the data after deletion. + * + * If the plan is to purge all of the Products from a ProductSet and then + * re-use the empty ProductSet to re-import new Products into the empty + * ProductSet, you must wait until the PurgeProducts operation has finished + * for that ProductSet. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be + * used to keep track of the progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * + * The async variant is {@see ProductSearchClient::purgeProductsAsync()} . + * + * @example samples/V1/ProductSearchClient/purge_products.php + * + * @param PurgeProductsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 purgeProducts(PurgeProductsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PurgeProducts', $request, $callOptions)->wait(); + } + + /** + * Removes a Product from the specified ProductSet. + * + * The async variant is + * {@see ProductSearchClient::removeProductFromProductSetAsync()} . + * + * @example samples/V1/ProductSearchClient/remove_product_from_product_set.php + * + * @param RemoveProductFromProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 removeProductFromProductSet(RemoveProductFromProductSetRequest $request, array $callOptions = []): void + { + $this->startApiCall('RemoveProductFromProductSet', $request, $callOptions)->wait(); + } + + /** + * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + * + * The async variant is {@see ProductSearchClient::updateProductAsync()} . + * + * @example samples/V1/ProductSearchClient/update_product.php + * + * @param UpdateProductRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Product + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProduct(UpdateProductRequest $request, array $callOptions = []): Product + { + return $this->startApiCall('UpdateProduct', $request, $callOptions)->wait(); + } + + /** + * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + * + * The async variant is {@see ProductSearchClient::updateProductSetAsync()} . + * + * @example samples/V1/ProductSearchClient/update_product_set.php + * + * @param UpdateProductSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ProductSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProductSet(UpdateProductSetRequest $request, array $callOptions = []): ProductSet + { + return $this->startApiCall('UpdateProductSet', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php new file mode 100644 index 000000000000..a7548152ba13 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php @@ -0,0 +1,667 @@ +asyncBatchAnnotateFiles($requests); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Vision\V1\Client\ImageAnnotatorClient}. + */ +class ImageAnnotatorGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vision.v1.ImageAnnotator'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'vision.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vision.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-vision', + ]; + + private static $productSetNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/image_annotator_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/image_annotator_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/image_annotator_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/image_annotator_rest_client_config.php', + ], + ], + ]; + } + + private static function getProductSetNameTemplate() + { + if (self::$productSetNameTemplate == null) { + self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); + } + + return self::$productSetNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'productSet' => self::getProductSetNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName($project, $location, $productSet) + { + return self::getProductSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function asyncBatchAnnotateFiles($requests, array $optionalArgs = []) + { + $request = new AsyncBatchAnnotateFilesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('AsyncBatchAnnotateFiles', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Run asynchronous image detection and annotation for a list of images. + * + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $outputConfig = new OutputConfig(); + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateImages'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function asyncBatchAnnotateImages($requests, $outputConfig, array $optionalArgs = []) + { + $request = new AsyncBatchAnnotateImagesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + $request->setOutputConfig($outputConfig); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('AsyncBatchAnnotateImages', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * + * This service will extract at most 5 (customers can specify which 5 in + * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + * file provided and perform detection and annotation for each image + * extracted. + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $response = $imageAnnotatorClient->batchAnnotateFiles($requests); + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only + * one AnnotateFileRequest in BatchAnnotateFilesRequest. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesResponse + * + * @throws ApiException if the remote call fails + */ + public function batchAnnotateFiles($requests, array $optionalArgs = []) + { + $request = new BatchAnnotateFilesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchAnnotateFiles', BatchAnnotateFilesResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Run image detection and annotation for a batch of images. + * + * Sample code: + * ``` + * $imageAnnotatorClient = new ImageAnnotatorClient(); + * try { + * $requests = []; + * $response = $imageAnnotatorClient->batchAnnotateImages($requests); + * } finally { + * $imageAnnotatorClient->close(); + * } + * ``` + * + * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. + * @param array $optionalArgs { + * Optional. + * + * @type string $parent + * Optional. Target project and location to make a call. + * + * Format: `projects/{project-id}/locations/{location-id}`. + * + * If no parent is specified, a region will be chosen automatically. + * + * Supported location-ids: + * `us`: USA country only, + * `asia`: East asia areas, like Japan, Taiwan, + * `eu`: The European Union. + * + * Example: `projects/project-A/locations/eu`. + * @type array $labels + * Optional. The labels with user-defined metadata for the request. + * + * Label keys and values can be no longer than 63 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * Label values are optional. Label keys must start with a letter. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesResponse + * + * @throws ApiException if the remote call fails + */ + public function batchAnnotateImages($requests, array $optionalArgs = []) + { + $request = new BatchAnnotateImagesRequest(); + $requestParamHeaders = []; + $request->setRequests($requests); + if (isset($optionalArgs['parent'])) { + $request->setParent($optionalArgs['parent']); + $requestParamHeaders['parent'] = $optionalArgs['parent']; + } + + if (isset($optionalArgs['labels'])) { + $request->setLabels($optionalArgs['labels']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('BatchAnnotateImages', BatchAnnotateImagesResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php new file mode 100644 index 000000000000..072026432456 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php @@ -0,0 +1,1603 @@ +productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Vision\V1\Client\ProductSearchClient}. + */ +class ProductSearchGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.vision.v1.ProductSearch'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'vision.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vision.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-vision', + ]; + + private static $locationNameTemplate; + + private static $productNameTemplate; + + private static $productSetNameTemplate; + + private static $referenceImageNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/product_search_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/product_search_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/product_search_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/product_search_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + + private static function getProductNameTemplate() + { + if (self::$productNameTemplate == null) { + self::$productNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}'); + } + + return self::$productNameTemplate; + } + + private static function getProductSetNameTemplate() + { + if (self::$productSetNameTemplate == null) { + self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); + } + + return self::$productSetNameTemplate; + } + + private static function getReferenceImageNameTemplate() + { + if (self::$referenceImageNameTemplate == null) { + self::$referenceImageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}'); + } + + return self::$referenceImageNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'product' => self::getProductNameTemplate(), + 'productSet' => self::getProductSetNameTemplate(), + 'referenceImage' => self::getReferenceImageNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product + * resource. + * + * @param string $project + * @param string $location + * @param string $product + * + * @return string The formatted product resource. + */ + public static function productName($project, $location, $product) + { + return self::getProductNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a product_set + * resource. + * + * @param string $project + * @param string $location + * @param string $productSet + * + * @return string The formatted product_set resource. + */ + public static function productSetName($project, $location, $productSet) + { + return self::getProductSetNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product_set' => $productSet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * reference_image resource. + * + * @param string $project + * @param string $location + * @param string $product + * @param string $referenceImage + * + * @return string The formatted reference_image resource. + */ + public static function referenceImageName($project, $location, $product, $referenceImage) + { + return self::getReferenceImageNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'product' => $product, + 'reference_image' => $referenceImage, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - product: projects/{project}/locations/{location}/products/{product} + * - productSet: projects/{project}/locations/{location}/productSets/{product_set} + * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vision.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * + * One Product can be added to at most 100 ProductSets. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param string $product Required. The resource name for the Product to be added to this ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function addProductToProductSet($name, $product, array $optionalArgs = []) + { + $request = new AddProductToProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setProduct($product); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AddProductToProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates and returns a new product resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $product = new Product(); + * $response = $productSearchClient->createProduct($formattedParent, $product); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the Product should be created. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID`. + * @param Product $product Required. The product to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $productId + * A user-supplied resource id for this Product. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\Product + * + * @throws ApiException if the remote call fails + */ + public function createProduct($parent, $product, array $optionalArgs = []) + { + $request = new CreateProductRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setProduct($product); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['productId'])) { + $request->setProductId($optionalArgs['productId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateProduct', Product::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates and returns a new ProductSet resource. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $productSet = new ProductSet(); + * $response = $productSearchClient->createProductSet($formattedParent, $productSet); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the ProductSet should be created. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param ProductSet $productSet Required. The ProductSet to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $productSetId + * A user-supplied resource id for this ProductSet. If set, the server will + * attempt to use this value as the resource id. If it is already in use, an + * error is returned with code ALREADY_EXISTS. Must be at most 128 characters + * long. It cannot contain the character `/`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ProductSet + * + * @throws ApiException if the remote call fails + */ + public function createProductSet($parent, $productSet, array $optionalArgs = []) + { + $request = new CreateProductSetRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setProductSet($productSet); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['productSetId'])) { + $request->setProductSetId($optionalArgs['productSetId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates and returns a new ReferenceImage resource. + * + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $referenceImage = new ReferenceImage(); + * $response = $productSearchClient->createReferenceImage($formattedParent, $referenceImage); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the product in which to create the reference + * image. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param ReferenceImage $referenceImage Required. The reference image to create. + * If an image ID is specified, it is ignored. + * @param array $optionalArgs { + * Optional. + * + * @type string $referenceImageId + * A user-supplied resource id for the ReferenceImage to be added. If set, + * the server will attempt to use this value as the resource id. If it is + * already in use, an error is returned with code ALREADY_EXISTS. Must be at + * most 128 characters long. It cannot contain the character `/`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ReferenceImage + * + * @throws ApiException if the remote call fails + */ + public function createReferenceImage($parent, $referenceImage, array $optionalArgs = []) + { + $request = new CreateReferenceImageRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setReferenceImage($referenceImage); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['referenceImageId'])) { + $request->setReferenceImageId($optionalArgs['referenceImageId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); + } + + /** + * Permanently deletes a product and its reference images. + * + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->deleteProduct($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of product to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteProduct($name, array $optionalArgs = []) + { + $request = new DeleteProductRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteProduct', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $productSearchClient->deleteProductSet($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the ProductSet to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteProductSet($name, array $optionalArgs = []) + { + $request = new DeleteProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Permanently deletes a reference image. + * + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * + * The actual image files are not deleted from Google Cloud Storage. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + * $productSearchClient->deleteReferenceImage($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the reference image to delete. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteReferenceImage($name, array $optionalArgs = []) + { + $request = new DeleteReferenceImageRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteReferenceImage', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information associated with a Product. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $response = $productSearchClient->getProduct($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the Product to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\Product + * + * @throws ApiException if the remote call fails + */ + public function getProduct($name, array $optionalArgs = []) + { + $request = new GetProductRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetProduct', Product::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information associated with a ProductSet. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $response = $productSearchClient->getProductSet($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the ProductSet to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ProductSet + * + * @throws ApiException if the remote call fails + */ + public function getProductSet($name, array $optionalArgs = []) + { + $request = new GetProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetProductSet', ProductSet::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets information associated with a ReferenceImage. + * + * Possible errors: + * + * * Returns NOT_FOUND if the specified image does not exist. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + * $response = $productSearchClient->getReferenceImage($formattedName); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name of the ReferenceImage to get. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ReferenceImage + * + * @throws ApiException if the remote call fails + */ + public function getReferenceImage($name, array $optionalArgs = []) + { + $request = new GetReferenceImageRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); + } + + /** + * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be + * used to keep track of the progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $inputConfig = new ImportProductSetsInputConfig(); + * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'importProductSets'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project in which the ProductSets should be imported. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function importProductSets($parent, $inputConfig, array $optionalArgs = []) + { + $request = new ImportProductSetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setInputConfig($inputConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('ImportProductSets', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Lists ProductSets in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listProductSets($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listProductSets($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project from which ProductSets should be listed. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listProductSets($parent, array $optionalArgs = []) + { + $request = new ListProductSetsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProductSets', $optionalArgs, ListProductSetsResponse::class, $request); + } + + /** + * Lists products in an unspecified order. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listProducts($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listProducts($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project OR ProductSet from which Products should be listed. + * + * Format: + * `projects/PROJECT_ID/locations/LOC_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listProducts($parent, array $optionalArgs = []) + { + $request = new ListProductsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProducts', $optionalArgs, ListProductsResponse::class, $request); + } + + /** + * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * + * Possible errors: + * + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The ProductSet resource for which to retrieve Products. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listProductsInProductSet($name, array $optionalArgs = []) + { + $request = new ListProductsInProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListProductsInProductSet', $optionalArgs, ListProductsInProductSetResponse::class, $request); + } + + /** + * Lists reference images. + * + * Possible errors: + * + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * // Iterate over pages of elements + * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the product containing the reference images. + * + * Format is + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listReferenceImages($parent, array $optionalArgs = []) + { + $request = new ListReferenceImagesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListReferenceImages', $optionalArgs, ListReferenceImagesResponse::class, $request); + } + + /** + * Asynchronous API to delete all Products in a ProductSet or all Products + * that are in no ProductSet. + * + * If a Product is a member of the specified ProductSet in addition to other + * ProductSets, the Product will still be deleted. + * + * It is recommended to not delete the specified ProductSet until after this + * operation has completed. It is also recommended to not add any of the + * Products involved in the batch delete to a new ProductSet while this + * operation is running because those Products may still end up deleted. + * + * It's not possible to undo the PurgeProducts operation. Therefore, it is + * recommended to keep the csv files used in ImportProductSets (if that was + * how you originally built the Product Set) before starting PurgeProducts, in + * case you need to re-import the data after deletion. + * + * If the plan is to purge all of the Products from a ProductSet and then + * re-use the empty ProductSet to re-import new Products into the empty + * ProductSet, you must wait until the PurgeProducts operation has finished + * for that ProductSet. + * + * The [google.longrunning.Operation][google.longrunning.Operation] API can be + * used to keep track of the progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); + * $operationResponse = $productSearchClient->purgeProducts($formattedParent); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $productSearchClient->purgeProducts($formattedParent); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'purgeProducts'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $parent Required. The project and location in which the Products should be deleted. + * + * Format is `projects/PROJECT_ID/locations/LOC_ID`. + * @param array $optionalArgs { + * Optional. + * + * @type ProductSetPurgeConfig $productSetPurgeConfig + * Specify which ProductSet contains the Products to be deleted. + * @type bool $deleteOrphanProducts + * If delete_orphan_products is true, all Products that are not in any + * ProductSet will be deleted. + * @type bool $force + * The default value is false. Override this value to true to actually perform + * the purge. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function purgeProducts($parent, array $optionalArgs = []) + { + $request = new PurgeProductsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['productSetPurgeConfig'])) { + $request->setProductSetPurgeConfig($optionalArgs['productSetPurgeConfig']); + } + + if (isset($optionalArgs['deleteOrphanProducts'])) { + $request->setDeleteOrphanProducts($optionalArgs['deleteOrphanProducts']); + } + + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('PurgeProducts', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + + /** + * Removes a Product from the specified ProductSet. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + * $productSearchClient->removeProductFromProductSet($formattedName, $formattedProduct); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param string $name Required. The resource name for the ProductSet to modify. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + * @param string $product Required. The resource name for the Product to be removed from this + * ProductSet. + * + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function removeProductFromProductSet($name, $product, array $optionalArgs = []) + { + $request = new RemoveProductFromProductSetRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setProduct($product); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RemoveProductFromProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * + * Possible errors: + * + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $product = new Product(); + * $response = $productSearchClient->updateProduct($product); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param Product $product Required. The Product resource which replaces the one on the server. + * product.name is immutable. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields + * to update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask paths include `product_labels`, `display_name`, and + * `description`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\Product + * + * @throws ApiException if the remote call fails + */ + public function updateProduct($product, array $optionalArgs = []) + { + $request = new UpdateProductRequest(); + $requestParamHeaders = []; + $request->setProduct($product); + $requestParamHeaders['product.name'] = $product->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateProduct', Product::class, $optionalArgs, $request)->wait(); + } + + /** + * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * + * Possible errors: + * + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + * + * Sample code: + * ``` + * $productSearchClient = new ProductSearchClient(); + * try { + * $productSet = new ProductSet(); + * $response = $productSearchClient->updateProductSet($productSet); + * } finally { + * $productSearchClient->close(); + * } + * ``` + * + * @param ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to + * update. + * If update_mask isn't specified, all mutable fields are to be updated. + * Valid mask path is `display_name`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Vision\V1\ProductSet + * + * @throws ApiException if the remote call fails + */ + public function updateProductSet($productSet, array $optionalArgs = []) + { + $request = new UpdateProductSetRequest(); + $requestParamHeaders = []; + $request->setProductSet($productSet); + $requestParamHeaders['product_set.name'] = $productSet->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php new file mode 100644 index 000000000000..87ab4820cfc0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php @@ -0,0 +1,34 @@ + [ + 'google.cloud.vision.v1.ImageAnnotator' => [ + 'AsyncBatchAnnotateFiles' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesResponse', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'AsyncBatchAnnotateImages' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesResponse', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateFiles' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateImages' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php new file mode 100644 index 000000000000..6c50e29a0d1a --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php @@ -0,0 +1,152 @@ + [ + 'google.cloud.vision.v1.ImageAnnotator' => [ + 'AsyncBatchAnnotateFiles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/files:asyncBatchAnnotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/files:asyncBatchAnnotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'AsyncBatchAnnotateImages' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/images:asyncBatchAnnotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/images:asyncBatchAnnotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateFiles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/files:annotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:annotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/files:annotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchAnnotateImages' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/images:annotate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:annotate', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/images:annotate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json new file mode 100644 index 000000000000..393b5b951284 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json @@ -0,0 +1,140 @@ +{ + "interfaces": { + "google.cloud.vision.v1.ProductSearch": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 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 + }, + "retry_policy_3_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": { + "AddProductToProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "CreateProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateReferenceImage": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "DeleteProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteReferenceImage": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetReferenceImage": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ImportProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "ListProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListProducts": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListProductsInProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListReferenceImages": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "PurgeProducts": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "RemoveProductFromProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateProduct": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateProductSet": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php new file mode 100644 index 000000000000..1de23804b2b9 --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php @@ -0,0 +1,310 @@ + [ + 'google.cloud.vision.v1.ProductSearch' => [ + 'ImportProductSets' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Vision\V1\ImportProductSetsResponse', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeProducts' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'AddProductToProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReferenceImage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListProductSets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProductSets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductSetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProducts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProducts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProductsInProductSet' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProducts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListProductsInProductSetResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListReferenceImages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReferenceImages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ListReferenceImagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveProductFromProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProduct' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\Product', + 'headerParams' => [ + [ + 'keyName' => 'product.name', + 'fieldAccessors' => [ + 'getProduct', + 'getName', + ], + ], + ], + ], + 'UpdateProductSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', + 'headerParams' => [ + [ + 'keyName' => 'product_set.name', + 'fieldAccessors' => [ + 'getProductSet', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'product' => 'projects/{project}/locations/{location}/products/{product}', + 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', + 'referenceImage' => 'projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php new file mode 100644 index 000000000000..374f29f1dade --- /dev/null +++ b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php @@ -0,0 +1,276 @@ + [ + 'google.cloud.vision.v1.ProductSearch' => [ + 'AddProductToProductSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:addProduct', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateProduct' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', + 'body' => 'product', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProductSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', + 'body' => 'product_set', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReferenceImage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', + 'body' => 'reference_image', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteProduct' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProductSet' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReferenceImage' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProduct' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProductSet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReferenceImage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportProductSets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProductSets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProducts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProductsInProductSet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}/products', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListReferenceImages' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PurgeProducts' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products:purge', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveProductFromProductSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:removeProduct', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateProduct' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{product.name=projects/*/locations/*/products/*}', + 'body' => 'product', + 'placeholders' => [ + 'product.name' => [ + 'getters' => [ + 'getProduct', + 'getName', + ], + ], + ], + ], + 'UpdateProductSet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{product_set.name=projects/*/locations/*/productSets/*}', + 'body' => 'product_set', + 'placeholders' => [ + 'product_set.name' => [ + 'getters' => [ + 'getProductSet', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php new file mode 100644 index 000000000000..69e2a69ecfbe --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php @@ -0,0 +1,509 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ImageAnnotatorClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ImageAnnotatorClient($options); + } + + /** @test */ + public function asyncBatchAnnotateFilesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateFilesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $request = (new AsyncBatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->asyncBatchAnnotateFiles($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.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + $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 asyncBatchAnnotateFilesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $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 + $requests = []; + $request = (new AsyncBatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->asyncBatchAnnotateFiles($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + 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 asyncBatchAnnotateImagesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateImagesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $outputConfig = new OutputConfig(); + $request = (new AsyncBatchAnnotateImagesRequest()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + $response = $gapicClient->asyncBatchAnnotateImages($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.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + $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 asyncBatchAnnotateImagesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $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 + $requests = []; + $outputConfig = new OutputConfig(); + $request = (new AsyncBatchAnnotateImagesRequest()) + ->setRequests($requests) + ->setOutputConfig($outputConfig); + $response = $gapicClient->asyncBatchAnnotateImages($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + 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 batchAnnotateFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateFilesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $request = (new BatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->batchAnnotateFiles($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.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + $request = (new BatchAnnotateFilesRequest()) + ->setRequests($requests); + try { + $gapicClient->batchAnnotateFiles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateImagesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $request = (new BatchAnnotateImagesRequest()) + ->setRequests($requests); + $response = $gapicClient->batchAnnotateImages($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.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + $request = (new BatchAnnotateImagesRequest()) + ->setRequests($requests); + try { + $gapicClient->batchAnnotateImages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function asyncBatchAnnotateFilesAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateFilesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $request = (new AsyncBatchAnnotateFilesRequest()) + ->setRequests($requests); + $response = $gapicClient->asyncBatchAnnotateFilesAsync($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.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + $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/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php new file mode 100644 index 000000000000..e5e0383ed735 --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php @@ -0,0 +1,1540 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ProductSearchClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ProductSearchClient($options); + } + + /** @test */ + public function addProductToProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new AddProductToProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + $gapicClient->addProductToProductSet($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addProductToProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new AddProductToProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + try { + $gapicClient->addProductToProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $product = new Product(); + $request = (new CreateProductRequest()) + ->setParent($formattedParent) + ->setProduct($product); + $response = $gapicClient->createProduct($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.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $product = new Product(); + $request = (new CreateProductRequest()) + ->setParent($formattedParent) + ->setProduct($product); + try { + $gapicClient->createProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $productSet = new ProductSet(); + $request = (new CreateProductSetRequest()) + ->setParent($formattedParent) + ->setProductSet($productSet); + $response = $gapicClient->createProductSet($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.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $productSet = new ProductSet(); + $request = (new CreateProductSetRequest()) + ->setParent($formattedParent) + ->setProductSet($productSet); + try { + $gapicClient->createProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + $request = (new CreateReferenceImageRequest()) + ->setParent($formattedParent) + ->setReferenceImage($referenceImage); + $response = $gapicClient->createReferenceImage($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.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReferenceImage(); + $this->assertProtobufEquals($referenceImage, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + $request = (new CreateReferenceImageRequest()) + ->setParent($formattedParent) + ->setReferenceImage($referenceImage); + try { + $gapicClient->createReferenceImage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new DeleteProductRequest()) + ->setName($formattedName); + $gapicClient->deleteProduct($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new DeleteProductRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new DeleteProductSetRequest()) + ->setName($formattedName); + $gapicClient->deleteProductSet($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new DeleteProductSetRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new DeleteReferenceImageRequest()) + ->setName($formattedName); + $gapicClient->deleteReferenceImage($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new DeleteReferenceImageRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteReferenceImage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new GetProductRequest()) + ->setName($formattedName); + $response = $gapicClient->getProduct($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.vision.v1.ProductSearch/GetProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new GetProductRequest()) + ->setName($formattedName); + try { + $gapicClient->getProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new GetProductSetRequest()) + ->setName($formattedName); + $response = $gapicClient->getProductSet($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.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new GetProductSetRequest()) + ->setName($formattedName); + try { + $gapicClient->getProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new GetReferenceImageRequest()) + ->setName($formattedName); + $response = $gapicClient->getReferenceImage($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.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $request = (new GetReferenceImageRequest()) + ->setName($formattedName); + try { + $gapicClient->getReferenceImage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importProductSetsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportProductSetsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importProductSetsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $inputConfig = new ImportProductSetsInputConfig(); + $request = (new ImportProductSetsRequest()) + ->setParent($formattedParent) + ->setInputConfig($inputConfig); + $response = $gapicClient->importProductSets($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.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + $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 importProductSetsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $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]'); + $inputConfig = new ImportProductSetsInputConfig(); + $request = (new ImportProductSetsRequest()) + ->setParent($formattedParent) + ->setInputConfig($inputConfig); + $response = $gapicClient->importProductSets($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + 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 listProductSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productSetsElement = new ProductSet(); + $productSets = [ + $productSetsElement, + ]; + $expectedResponse = new ListProductSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProductSets($productSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProductSetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProductSets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductSetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListProductSetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProductSets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProductsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProducts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListProductsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProducts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsInProductSetResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new ListProductsInProductSetRequest()) + ->setName($formattedName); + $response = $gapicClient->listProductsInProductSet($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $request = (new ListProductsInProductSetRequest()) + ->setName($formattedName); + try { + $gapicClient->listProductsInProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $pageSize2 = 1024500956; + $nextPageToken = ''; + $referenceImagesElement = new ReferenceImage(); + $referenceImages = [ + $referenceImagesElement, + ]; + $expectedResponse = new ListReferenceImagesResponse(); + $expectedResponse->setPageSize($pageSize2); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReferenceImages($referenceImages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new ListReferenceImagesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReferenceImages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new ListReferenceImagesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReferenceImages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeProductsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/purgeProductsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new PurgeProductsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->purgeProducts($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.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + $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 purgeProductsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $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]'); + $request = (new PurgeProductsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->purgeProducts($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + 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 removeProductFromProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new RemoveProductFromProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + $gapicClient->removeProductFromProductSet($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeProductFromProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new RemoveProductFromProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + try { + $gapicClient->removeProductFromProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $product = new Product(); + $request = (new UpdateProductRequest()) + ->setProduct($product); + $response = $gapicClient->updateProduct($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.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $product = new Product(); + $request = (new UpdateProductRequest()) + ->setProduct($product); + try { + $gapicClient->updateProduct($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $productSet = new ProductSet(); + $request = (new UpdateProductSetRequest()) + ->setProductSet($productSet); + $response = $gapicClient->updateProductSet($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.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $productSet = new ProductSet(); + $request = (new UpdateProductSetRequest()) + ->setProductSet($productSet); + try { + $gapicClient->updateProductSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addProductToProductSetAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $request = (new AddProductToProductSetRequest()) + ->setName($formattedName) + ->setProduct($formattedProduct); + $gapicClient->addProductToProductSetAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php new file mode 100644 index 000000000000..9df52eda46b3 --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php @@ -0,0 +1,423 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ImageAnnotatorClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ImageAnnotatorClient($options); + } + + /** @test */ + public function asyncBatchAnnotateFilesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateFilesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $response = $gapicClient->asyncBatchAnnotateFiles($requests); + $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.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + $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 asyncBatchAnnotateFilesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); + $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 + $requests = []; + $response = $gapicClient->asyncBatchAnnotateFiles($requests); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); + 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 asyncBatchAnnotateImagesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AsyncBatchAnnotateImagesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $requests = []; + $outputConfig = new OutputConfig(); + $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); + $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.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $actualValue = $actualApiRequestObject->getOutputConfig(); + $this->assertProtobufEquals($outputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + $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 asyncBatchAnnotateImagesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); + $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 + $requests = []; + $outputConfig = new OutputConfig(); + $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); + 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 batchAnnotateFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateFilesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $response = $gapicClient->batchAnnotateFiles($requests); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + try { + $gapicClient->batchAnnotateFiles($requests); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchAnnotateImagesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $requests = []; + $response = $gapicClient->batchAnnotateImages($requests); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchAnnotateImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $requests = []; + try { + $gapicClient->batchAnnotateImages($requests); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php new file mode 100644 index 000000000000..a95111b861b0 --- /dev/null +++ b/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php @@ -0,0 +1,1403 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ProductSearchClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ProductSearchClient($options); + } + + /** @test */ + public function addProductToProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $gapicClient->addProductToProductSet($formattedName, $formattedProduct); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addProductToProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->addProductToProductSet($formattedName, $formattedProduct); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $product = new Product(); + $response = $gapicClient->createProduct($formattedParent, $product); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $product = new Product(); + try { + $gapicClient->createProduct($formattedParent, $product); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $productSet = new ProductSet(); + $response = $gapicClient->createProductSet($formattedParent, $productSet); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $productSet = new ProductSet(); + try { + $gapicClient->createProductSet($formattedParent, $productSet); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + $response = $gapicClient->createReferenceImage($formattedParent, $referenceImage); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReferenceImage(); + $this->assertProtobufEquals($referenceImage, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $referenceImage = new ReferenceImage(); + $referenceImageUri = 'referenceImageUri-707360132'; + $referenceImage->setUri($referenceImageUri); + try { + $gapicClient->createReferenceImage($formattedParent, $referenceImage); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $gapicClient->deleteProduct($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->deleteProduct($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $gapicClient->deleteProductSet($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + try { + $gapicClient->deleteProductSet($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $gapicClient->deleteReferenceImage($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + try { + $gapicClient->deleteReferenceImage($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $response = $gapicClient->getProduct($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->getProduct($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $response = $gapicClient->getProductSet($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + try { + $gapicClient->getProductSet($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uri = 'uri116076'; + $expectedResponse = new ReferenceImage(); + $expectedResponse->setName($name2); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + $response = $gapicClient->getReferenceImage($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReferenceImageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); + try { + $gapicClient->getReferenceImage($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importProductSetsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportProductSetsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importProductSetsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $inputConfig = new ImportProductSetsInputConfig(); + $response = $gapicClient->importProductSets($formattedParent, $inputConfig); + $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.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInputConfig(); + $this->assertProtobufEquals($inputConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + $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 importProductSetsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importProductSetsTest'); + $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]'); + $inputConfig = new ImportProductSetsInputConfig(); + $response = $gapicClient->importProductSets($formattedParent, $inputConfig); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); + 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 listProductSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productSetsElement = new ProductSet(); + $productSets = [ + $productSetsElement, + ]; + $expectedResponse = new ListProductSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProductSets($productSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listProductSets($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductSetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listProductSets($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listProducts($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + try { + $gapicClient->listProducts($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $productsElement = new Product(); + $products = [ + $productsElement, + ]; + $expectedResponse = new ListProductsInProductSetResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProducts($products); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $response = $gapicClient->listProductsInProductSet($formattedName); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProductsInProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + try { + $gapicClient->listProductsInProductSet($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $pageSize2 = 1024500956; + $nextPageToken = ''; + $referenceImagesElement = new ReferenceImage(); + $referenceImages = [ + $referenceImagesElement, + ]; + $expectedResponse = new ListReferenceImagesResponse(); + $expectedResponse->setPageSize($pageSize2); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReferenceImages($referenceImages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $response = $gapicClient->listReferenceImages($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReferenceImagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->listReferenceImages($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function purgeProductsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/purgeProductsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->purgeProducts($formattedParent); + $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.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + $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 purgeProductsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/purgeProductsTest'); + $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]'); + $response = $gapicClient->purgeProducts($formattedParent); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); + 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 removeProductFromProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($formattedProduct, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeProductFromProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); + $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); + try { + $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $productCategory = 'productCategory-1607451058'; + $expectedResponse = new Product(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setProductCategory($productCategory); + $transport->addResponse($expectedResponse); + // Mock request + $product = new Product(); + $response = $gapicClient->updateProduct($product); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); + $actualValue = $actualRequestObject->getProduct(); + $this->assertProtobufEquals($product, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $product = new Product(); + try { + $gapicClient->updateProduct($product); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ProductSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $productSet = new ProductSet(); + $response = $gapicClient->updateProductSet($productSet); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); + $actualValue = $actualRequestObject->getProductSet(); + $this->assertProtobufEquals($productSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProductSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $productSet = new ProductSet(); + try { + $gapicClient->updateProductSet($productSet); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php b/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php new file mode 100644 index 0000000000000000000000000000000000000000..19f7cd9db63df44fe135d4697afdfabad9ec3e10 GIT binary patch literal 37746 zcmeHwYit}>mfkjBA}=M1D!p2iWw%QnTc#<}qCK+Rl04HSn^M~(o5PnZhn}8hvq<)s z?Cx}RQ>&TfVt0bY?k1UiU|+MDWD_6@B-w0UK#)O#4R#YGL0}{Z@6{}usSlg+s zC#lAsm8#XNjcTd7pW15f>{#_wsd`W=?_2fBRBA4tTFS4bvU9n$7tz(OHtQuTo!YHd zclWKS(tfqMJ#~0+P~OFW@Rs|}Njb6*mEwVA*NP=8b$@wg(P|X8i;d#ueL2YH zEDf@`(HdlP5N>6K~y+CQ)`G$9cTB;R;AHhpZT)2zdd8^6%WhRdUst{EG0Iv zC%I6q?ADu=O1ZMTnXi$sc1NVMc5_Yc8-K!1S4r?<(f;@teb>s6_eSxc7QgRGt+bh~ z*Q@n8s7HCfixs7wtB`|chdxrUZ@ybrVw~CDcBFP5T7JWkGm^Sj#DD)YJ>q6p`fXh0 z=93Z*CS7nad3bB=vKp&cD+4b`@E8@wUU0qGA?Ye?De+PbuDBZ1l?z?|2tkvlwv{xf_Zr2V_dJUOths8Tr|7h3=!NxtqFyUaS+shEZC*b0UK3C6 z2@RSyzc9buFGg3a8jwuN_Ux0=zGa*ieT0)ELU82W@O7mdLswV}W_8XHz zV4!-VKvPL3@N9T`Y?3MEu|esiBY?()7_=(e+q|?yrTe1^Lx_Rp%=#)`^w7WOGr0x)yVp1)hE~^SXS3Nk z{MncOD~ZoCe<>keb1MTc67;~H#11>f$LF0irA6){T?yYV*KW&NIJVJK)B%Qk?fU> zd|NXza1C>MOGalGowTYCe#n>=!_I(}-DIB}a3XX-XOPOS8st53wpO(p1+c0Fsl$h) zzzt7Ng$}fgKFdxQHP%U#sz=T~LRn2wzNy%UK_p#(6Q!`ndI^VcAmM zdyS+R)$FqXn(__JqSv@3UWL^JYUg!U|XeXWm~Reukogs z;4XXRdgDoSFIuc#^MWwi8EIx+1XL@lPbwv2T8zlyZTt}vvdmu}7Q>5dQIbR(TjF`L zNI^}(s_d34RsjGA;|o~3Q*7=x?BtkSgK&|Yp zc=DPYI$WkQkL^`y7;hY?-Fv3@`d5qDD77xJVf^PY z-jJK7p8lnH(_a+lO3iv5J6S(yp0c^01^ znz;eKex5OnRLBl-pV}L9Vqm|xW$oL^QMr4*8TxTI2Nq=>6DwBC&7?+iw41aldJ?8l`*QPMF_IMDORz*`+z&&xb_+N;Wh12;2FH z5c9c})wROvqorAF>Db;gvunAH>}a1cDo)R?udSg^A-|Db89hZ-0iMV|2D$4}W`Vm7 zxvT`?yvuz^UmPY&VLpepxes9}oHj6l?8-`hW%Nw?$6+-5sCYRvb&Tj;It3FBJE$6 z##=5UIHvY%g)6$DD6PVxg9Etr1cj&HqI9vSuP2m0^UmY7H2ng{rMALXd+iL-#0E%ez^J@ps*!Jv*XJg_FRueWG zLTNS}7#aUiNPJgg9UCw=Le)c&b^^3hPJWNq$(KHV3*q{F2-okj9|F+syFj~NNr*3m zp? zWGBX(e?K8E&Ptb4@7^ocA8jH$E*;q-`B!Yq&%E~iOwZ?;FBq{bfGdcO(*8^GTF`DZ zAxw{PPYgM)lo-Z$ae55sZJlRG<5Ik12qD6YvqfZ#_Wd-x<8km61+i=xGbt|l$Fyt6 zE*EQEaCsD5mz7z6Y1ycpOi?<4ue zOrVDe*0aF*CS76EK8b!w?gF-tT+>LZfzU0It z`s9L!$H$oTNw*X4i);~q4t441r@!`D<|FZ9$Ofub>+R!io-?pMZ5i0p;XrdooDWz| zga-zZFF}@AEBR*^RokD z)W7V;SH)t9K89B=P))N5pHfDqDxebv75?cFWx0}i2V1Rmkr zY}?n@io3?k;`!Ea2!A*0WyHE=I8KIJZ6vq=97aQ2V`ZN;6pO zj@#^sU`U+^x7RTs=4EGPXpVqc7B!GakX6i9?%1NZ5VTMbturn$z#b(*z<3@p8Vf?v zD74-jFNOK$t*OU)GYJ! z0dal~Wh1OTv(-uksj_PQm=PggL^~!}YSeWFg|I!5zSs>eG$50K!b5Ti`=L>1vDAm< zl0}PBZK|y35TYNa5EQjZ&m{IC(=)KuEPZT|lxqnv-qU(VhTzEb?NGT3U`}UWj#CGb zIPd5yWne?}^`=M_YshAkjf8rfojS5m^=1hbEmlF(DYM!P1Dmgiu~vJ#y3?S|)M-h+ zxAOFsgi$<1Jp}FU`n@ef=uuJljPABBGZ!|0`Mwxw)=;dp4LeBY;}KLR%Em)kyUtw* z$eKKmx!jGMBUYTBpI^u=Wqn!WRw%76{iom&{>i>L+|D(Mgam93zUl`~9ES)orAi$a zRm&l5JwxVv^!j;{{vBcf=3h==qxOlKkr&B|^%zD&ZNK_NimoH=609R-SL@OSV}vm; z&Xy|$qz9p1oQadj-t9Q%N0_XCY!?*qLIUEkLGso?mJN#DP-<7)m*&c#afLET`&JS4 zA*eq?hM5|(oAjFrVUQQVhL_{Eyn~FT+tGVfI(pZQ7`EFpby|KZA&U-vV8*><~Qj4tTP4V3zoN?YG4M zKUa=+TuueM*}sU1GhBNoKIP<}sW?liP`lncC3{9|TD-F#cUp3zH+NxqK;r%EJns6C zo$ZP+&~9!JgfLNxLWYdeHn%pE%2& zj8n8Alc@)^z>EXv>DmnNSk4r7<|WtT_WA@=u{E1$Eg^x*9Xy2%5`B#YFD%r&xvhK#R>;jL=5QK%y6gNJ0> zbW6Yt`sZbL2_0rm2p3IP#pUJv!|X~Ss3L7Z^yHUNjCM-&!mfZ#A*;_&v$jOlXT9cK zAzGsw7-}Y;Un}I1Y|AhCirX+mc0Px(21VaYF26e3WB%@-I1M+dqg?oxl*IxZZy|)# z8)Hlu>XDm)EEh{&3E&(>cxi)sPOjx=;PuD=nbbZRV6pJZ02#rZWq>54*SI7`sx_jl$2Z@b|8>W7&xqzNFAl+Og4bmb+wZt(jAQs9x0EP z>q#=APx`WFW#{msN)O9h9xGJ*8wlx1+j+?NBjWraipQE%f-kFCnF`8Rk4(QCx^;TS z-#FOt46_Da7)#=Gv0mCMH{k8Tn@Cb&)W~#rNZdDS#?^o9H8IqpBg&cGcxoz1M)iQ^Z;6qO z12?;j7sOSJnOT{AkXy^nuC1^52Lo*6-gx^qSH^zu_U*#$H-SeeYRRlD;-9^g730T+ z#mwwzpE<#SEssbF(c|nox(HgLiun~Ws)65D(NDzpPpJ|VWuApsmFfPfyZOF2BL&16 zFYO=i)z~s?{)dFPLCo> zj}_*a8AdI$s%Ny#KRqDMtvAYAw^7_ytv5OpHhOk?-WDF{5C%;@3L)FR(>Z_<>HG1v z-~=!t0*=1mIVbemElj7bo=0CmRlH73AG`wzdQEGa8ns_2oTKs`=)R}= z-BT3=M|-G6;+VL!mRrmg=2tTKueZz|Nb)e7eIKI%Jr?szYYzYP3v`is!W+L^h$gVXtvrT&-BBfUkdCXzZbac6Se@`kuvcAK zUJ{wWEU&b|sY4G1o>i7tx@J6zJIgEM)AF(T8wv4zCtj#sZ&{po$){2io%am~p*E`M zqsLDG|HXv3ikM2haZ1Lq*y3JNPj9^_SG1%tMkVa;<8GMI5B#?wrd?&z|p{C zu65unP|DRl304U6A0@;KowbIGx}KJ3c=j=3P~bl1LYdY+=4@^qtCjxnl(-sl9!%!8 z4)`DzheESrMAd*RgOX#RGdDlajEfr~CMh2@TjqnEbih}}P1ux!4RwIRC3&C?p$?qO ztCw-ePfnlWrtX(qYei2TtA*+j24vYnP8j;BJmtNEG!d6HM0uP`Y$)ZZAccAbC9KH_ z8N&IYA!&HY02SGQQ8tQ)zjFw@%5ct_Q#izK$y}(N;~9flsn6_rs)^ngr*R<8LhT%f zo;Vs8UMcDsdx3k)DdxmknXN-aSPiO*v?2=nDX(U2tC1M%-xEejom{l}93G1M)fuwz z?N-fBo!&z)ItnVoe>lmBz%fF9i5r86j(Nh+WZOph*dDrDQAnQf2V(F*UC*ITo6R44 zf%H8eT;u{_FK%xmkyxb?T*X*Efi^@*#=WZDXq|lQvJ`A=N}Tb2E-JG3Tc^aBhZ9=5 zz|qxt_|l~Mk!&n2=d&vq{CZh=F87r|bm2d(jHXgR=Z}zyW z;?<`gF!e2p(YCD%DynutmA{1FVK=w*GY&@rMdcPrAmkKa;vp)GJk20%A;yXrstM3kM46w zZ01pZ0cpP9M)0|{Lo8Ldt;`ONIH0!CTjjTenr(SGO0}-S3wJ}MB6!S6zKI7Vca)i; zL$?%@M%kqKwitBYCB=pOa&{%NmS6G3_mH&AQPL7MPq=r$NZ`oQB>+12wq3Fa~s8c&fPMkO~cb6cgs*3`Qvg8 zCo2o`l%>ouN* zMVu47G{1w@Y^Pj>W9CRL$BV+;ZUG#RS=`@eHaL@8s;oVIePxzL-1CNqFBY^QKD<1jpHtMjYcUE0DUbH?8)` z^0sxt$@0e46l1(`1g~zC<6hI*Z{^U06|(QIr1av+T!w>{9W_!Yfw=HCEG3`(Bij=un? zGLX#hVb5)SQyNQXOcn)04K5Ti7-~Fo?iym8IkB!Cb54vXmM|DmJX1R6s&qyWcq~b} z?3XT)YqQmy+vwPCiY)|2#%EL$KZa&r`#f_auFGS>!V8#}vhaQtRU0d)+&{E_@FxDe zcrJKqYVQ98jyo$z>pC5+boYEPbyLFB<|{_b8(^-A5!VeZK8?xXR>#)$Eo!Uo>XyA= z?b!f5eC>sEQ;eqPjt4|EH8JnAF_C3%A6RkmZz8HmFyG>#gY_q6;xk43Us7Qk&%71v z&)~L_)&gmBva1z3e&_=A6W9V;(|S5f_+veYN6M%&QhGXBaLm)#?)&*-8Z$`uvwF9Wo}d|c&X080wjA&QquQ1x=10cK^_5DjNr~@ zefU^b`SRz?-|iD54zkM2+u=I&l@Pa8vFh*)w72V|9AFlm`Ll0}Gkl}CzW<6D^PDyq z=mP77Dvo8+?;b4j9a-G-HYO~8=%9d86FM##qaSW`+q3p-NKjPd&2tpMzUcnk1H7GF zz+3(fZdK(OQVq1aP$|lsH2(xH&T}Zm3872!^2@?(e$F4YK8F*>OYbk`A1)R6g3JV+ zWLnLyuOPs^ffEjMe8PcW_TVg6QoUTsE-&O}-ET>Gk_c+w&#obC?SI>cP4s+zwIJ^! zba(5gBNDR<$iS#6450A+jJozyJvv20udn5t6BigikLWp1YmnxgS;iMRF29VpJ1FIs zL*zvpsM*)m_WFdwdtz{>T<05RXoHS%;Ket@n1Jv%Wp=4Y}vtG`hMK{h4C+Ur2CqZvY7j zxp4sjO1(9Ge7Bj#@9=|H{xMl;jvEmuh%tb;e@qSKIMd~d<|saQb^H7{ZoqD<#iYnQ zl}cX^knfFL_MtD&gu4Bi%xZ3y)0Ok<3k#z?;|Job0y;{~$Pr%@*Ej)1*Xhb5OKn3z zYucOW!GRj>FV*MZq+IkAb~vR+H^fV``NidR-0z=Vx{tdU3Uj&D_k*%rUl1>LY>Cv^ z(p+X`4m763bDf*5(hmfL4K$NkAV|P*&2e0wmGsPc!Bvh#?Du^J;Feul&GOXevh$hs zg*E(6!Aq#z^b+W4DAUJ@s8%wy+%x_&WXig4<84(68ROz*-*-A6FEvrv?46UlEuTC^ z4l|?;A4;A6=~Xejao}v3#$Qd~R%n0^CX(Fu9ZQ*2y94AA>LsA}E0hUoUsln1t6103S(HrNribs+G zQbxQ-D2?#bFW$zQobZFp{ys{j7opO;0CG*Z_ zxD2tm?J1N$yal5= zwr$S!r&rs=*Hspi4Gm7=eD6@AW_=}ytNowH8P<$AX9?|^8~ z+kg*8AX;!IO=`q$)jkswFxJ{(G;Q$~GKerz`M=vEuCVe3kr%!i9s6ktBh>!yLG5n@ zUuYP#xxS$kzeP&xJlaIiL#_NDnomIr(t+o%3>+1^!m8Xo|2p=I$-f^xHVDj(Ge=G) zJ3rMUM*ZicjPUDU{LN!h`fHGso1G731=wQJl-V;&QvHL3Bhs)5z8Y}+DBa|X5S{aB z>BPA469@#eI=K9NBRurk);=aPeih6}d4C-&NL{Wgbvba=3r@KI(CYD?neGlGok8$R zdudPor-AIxC_%i73wDG^_?v4kgfp+bm)Zf|_wE39jS~=O{B4-!0C5*J5oWo!u_h&U zd8V0jBfOq_JS}yv3L*PXLL}Ljb5B25|lU0ue2?5G#EQV0nCAPr;*QcRl5=d|4;eTk)DcBBitWutM8O0vttpm z{wKkMiH^mg0ZfooKQvdK0@ZbI#Ve8h->~rB64{7__co5X@PC{a-rtuow-e1zXQgYN z@?s(x>9ccf<*^Z)ZCm@8g#TF(J{eMt8$f%I&_6QQp2G6)_^XbI8>IPcO6Z@;h!6m8 zxjja74A@_}1+t@f>7Crh_}-h`a+5$~^vL~(%Y zIp`NT@B@o6Iq+>(0q=(ZA$(6p5I9z|kuC(0p(*m2`-;)9wl^ zZQGGUBI>)p}RE|sp@27V@Q5R8;V8sXRH>1KMO zG3s>9cic?YGYexfPm9?2Pl4KuV?4QVzPMWI`9*+T<&(^qa||FLA8=8@oSe~w{I7<# zH_R?roaUdVrhRpo{opwCxLU@frxroaIVPm(OO?Je{kjwv`8L!omMtV2DT@9fC}Mv$ z4n?k(F)7+Pw$D2;&I=Sz(*6tl__m_y2)nxdL%P?wlg|0Jls6<**S=w(f)}# zI^sESWE#x6SLH6NGl|CcU zcqcMP-PT9b7+nDq&{aWE!3#yp#!|HX*eYW2$H=GZt%_c*ST_DWRus77pFzZm2K3O> zh8Otxzhi#n#w$%;*rIXO5=*Rcto)C=k=!zKH{$4g8qQ!OXwLO^|pOCJZyUxL@TQsud_xqq>~Xd6@Q}`-sDqT-%TX#Hv{YKB#`_=01zBP$h2@0t;7M+hwZru7rzunxFuQxYc@A1d2 z&w8Hc?&-8_kWRZA;E!8d12vlK8?T6z`rkwfKV@gVdPg`<=s-!iluo}?w((kBXK0e{{d1&?iv69 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php new file mode 100644 index 000000000000..6fc60a510df5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.AdaptingOSStep + */ +class AdaptingOSStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php new file mode 100644 index 000000000000..d4a9f9a19d65 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.AddGroupMigrationRequest + */ +class AddGroupMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full path name of the Group to add to. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * The full path name of the MigratingVm to add. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $group Required. The full path name of the Group to add to. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\AddGroupMigrationRequest + * + * @experimental + */ + public static function build(string $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The full path name of the Group to add to. + * @type string $migrating_vm + * The full path name of the MigratingVm to add. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full path name of the Group to add to. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The full path name of the Group to add to. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * The full path name of the MigratingVm to add. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * The full path name of the MigratingVm to add. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php new file mode 100644 index 000000000000..d1f198d54029 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.AddGroupMigrationResponse + */ +class AddGroupMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php new file mode 100644 index 000000000000..da08b27da901 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php @@ -0,0 +1,169 @@ +google.cloud.vmmigration.v1.ApplianceVersion + */ +class ApplianceVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The appliance version. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * A link for downloading the version. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Determine whether it's critical to upgrade the appliance to this version. + * + * Generated from protobuf field bool critical = 3; + */ + protected $critical = false; + /** + * Link to a page that contains the version release notes. + * + * Generated from protobuf field string release_notes_uri = 4; + */ + protected $release_notes_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The appliance version. + * @type string $uri + * A link for downloading the version. + * @type bool $critical + * Determine whether it's critical to upgrade the appliance to this version. + * @type string $release_notes_uri + * Link to a page that contains the version release notes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The appliance version. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The appliance version. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * A link for downloading the version. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * A link for downloading the version. + * + * 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; + } + + /** + * Determine whether it's critical to upgrade the appliance to this version. + * + * Generated from protobuf field bool critical = 3; + * @return bool + */ + public function getCritical() + { + return $this->critical; + } + + /** + * Determine whether it's critical to upgrade the appliance to this version. + * + * Generated from protobuf field bool critical = 3; + * @param bool $var + * @return $this + */ + public function setCritical($var) + { + GPBUtil::checkBool($var); + $this->critical = $var; + + return $this; + } + + /** + * Link to a page that contains the version release notes. + * + * Generated from protobuf field string release_notes_uri = 4; + * @return string + */ + public function getReleaseNotesUri() + { + return $this->release_notes_uri; + } + + /** + * Link to a page that contains the version release notes. + * + * Generated from protobuf field string release_notes_uri = 4; + * @param string $var + * @return $this + */ + public function setReleaseNotesUri($var) + { + GPBUtil::checkString($var, True); + $this->release_notes_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php new file mode 100644 index 000000000000..c015b9cf1649 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.AppliedLicense + */ +class AppliedLicense extends \Google\Protobuf\Internal\Message +{ + /** + * The license type that was used in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; + */ + protected $type = 0; + /** + * The OS license returned from the adaptation module's report. + * + * Generated from protobuf field string os_license = 2; + */ + protected $os_license = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The license type that was used in OS adaptation. + * @type string $os_license + * The OS license returned from the adaptation module's report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The license type that was used in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The license type that was used in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AppliedLicense\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The OS license returned from the adaptation module's report. + * + * Generated from protobuf field string os_license = 2; + * @return string + */ + public function getOsLicense() + { + return $this->os_license; + } + + /** + * The OS license returned from the adaptation module's report. + * + * Generated from protobuf field string os_license = 2; + * @param string $var + * @return $this + */ + public function setOsLicense($var) + { + GPBUtil::checkString($var, True); + $this->os_license = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php new file mode 100644 index 000000000000..27008d8cc57e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.AppliedLicense.Type + */ +class Type +{ + /** + * Unspecified license for the OS. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * No license available for the OS. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The license type is Pay As You Go license type. + * + * Generated from protobuf enum PAYG = 2; + */ + const PAYG = 2; + /** + * The license type is Bring Your Own License type. + * + * Generated from protobuf enum BYOL = 3; + */ + const BYOL = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::NONE => 'NONE', + self::PAYG => 'PAYG', + self::BYOL => 'BYOL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VMMigration\V1\AppliedLicense_Type::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php new file mode 100644 index 000000000000..a32202170f8c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php @@ -0,0 +1,137 @@ +google.cloud.vmmigration.v1.AvailableUpdates + */ +class AvailableUpdates extends \Google\Protobuf\Internal\Message +{ + /** + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; + */ + protected $new_deployable_appliance = null; + /** + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; + */ + protected $in_place_update = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $new_deployable_appliance + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $in_place_update + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; + * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null + */ + public function getNewDeployableAppliance() + { + return $this->new_deployable_appliance; + } + + public function hasNewDeployableAppliance() + { + return isset($this->new_deployable_appliance); + } + + public function clearNewDeployableAppliance() + { + unset($this->new_deployable_appliance); + } + + /** + * The newest deployable version of the appliance. + * The current appliance can't be updated into this version, and the owner + * must manually deploy this OVA to a new appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; + * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var + * @return $this + */ + public function setNewDeployableAppliance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); + $this->new_deployable_appliance = $var; + + return $this; + } + + /** + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; + * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null + */ + public function getInPlaceUpdate() + { + return $this->in_place_update; + } + + public function hasInPlaceUpdate() + { + return isset($this->in_place_update); + } + + public function clearInPlaceUpdate() + { + unset($this->in_place_update); + } + + /** + * The latest version for in place update. + * The current appliance can be updated to this version using the API or m4c + * CLI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; + * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var + * @return $this + */ + public function setInPlaceUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); + $this->in_place_update = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php new file mode 100644 index 000000000000..ee8d6768c507 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.AwsSecurityGroup + */ +class AwsSecurityGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The AWS security group id. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The AWS security group name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The AWS security group id. + * @type string $name + * The AWS security group name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The AWS security group id. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The AWS security group 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 AWS security group name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The AWS security group name. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php new file mode 100644 index 000000000000..31c465db770b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php @@ -0,0 +1,348 @@ +google.cloud.vmmigration.v1.AwsSourceDetails + */ +class AwsSourceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The AWS region that the source VMs will be migrated from. + * + * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $aws_region = ''; + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Provides details on the state of the Source in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * AWS resource tags to limit the scope of the source inventory. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; + */ + private $inventory_tag_list; + /** + * AWS security group names to limit the scope of the source + * inventory. + * + * Generated from protobuf field repeated string inventory_security_group_names = 7; + */ + private $inventory_security_group_names; + /** + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + */ + private $migration_resources_user_tags; + /** + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * + * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $public_ip = ''; + protected $credentials_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $access_key_creds + * AWS Credentials using access key id and secret. + * @type string $aws_region + * Immutable. The AWS region that the source VMs will be migrated from. + * @type int $state + * Output only. State of the source as determined by the health check. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the Source in case of an + * error. + * @type array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $inventory_tag_list + * AWS resource tags to limit the scope of the source inventory. + * @type array|\Google\Protobuf\Internal\RepeatedField $inventory_security_group_names + * AWS security group names to limit the scope of the source + * inventory. + * @type array|\Google\Protobuf\Internal\MapField $migration_resources_user_tags + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * @type string $public_ip + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * AWS Credentials using access key id and secret. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; + * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials|null + */ + public function getAccessKeyCreds() + { + return $this->readOneof(11); + } + + public function hasAccessKeyCreds() + { + return $this->hasOneof(11); + } + + /** + * AWS Credentials using access key id and secret. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; + * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $var + * @return $this + */ + public function setAccessKeyCreds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Immutable. The AWS region that the source VMs will be migrated from. + * + * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAwsRegion() + { + return $this->aws_region; + } + + /** + * Immutable. The AWS region that the source VMs will be migrated from. + * + * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAwsRegion($var) + { + GPBUtil::checkString($var, True); + $this->aws_region = $var; + + return $this; + } + + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Provides details on the state of the Source in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the Source in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * AWS resource tags to limit the scope of the source inventory. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventoryTagList() + { + return $this->inventory_tag_list; + } + + /** + * AWS resource tags to limit the scope of the source inventory. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; + * @param array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventoryTagList($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag::class); + $this->inventory_tag_list = $arr; + + return $this; + } + + /** + * AWS security group names to limit the scope of the source + * inventory. + * + * Generated from protobuf field repeated string inventory_security_group_names = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventorySecurityGroupNames() + { + return $this->inventory_security_group_names; + } + + /** + * AWS security group names to limit the scope of the source + * inventory. + * + * Generated from protobuf field repeated string inventory_security_group_names = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventorySecurityGroupNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->inventory_security_group_names = $arr; + + return $this; + } + + /** + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMigrationResourcesUserTags() + { + return $this->migration_resources_user_tags; + } + + /** + * User specified tags to add to every M2VM generated resource in AWS. + * These tags will be set in addition to the default tags that are set as part + * of the migration process. The tags must not begin with the reserved prefix + * `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMigrationResourcesUserTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->migration_resources_user_tags = $arr; + + return $this; + } + + /** + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * + * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPublicIp() + { + return $this->public_ip; + } + + /** + * Output only. The source's public IP. All communication initiated by this + * source will originate from this IP. + * + * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPublicIp($var) + { + GPBUtil::checkString($var, True); + $this->public_ip = $var; + + return $this; + } + + /** + * @return string + */ + public function getCredentialsType() + { + return $this->whichOneof("credentials_type"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php new file mode 100644 index 000000000000..42e4c86fab4a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php @@ -0,0 +1,104 @@ +google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials + */ +class AccessKeyCredentials extends \Google\Protobuf\Internal\Message +{ + /** + * AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1; + */ + protected $access_key_id = ''; + /** + * Input only. AWS secret access key. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $secret_access_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_key_id + * AWS access key ID. + * @type string $secret_access_key + * Input only. AWS secret access key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1; + * @return string + */ + public function getAccessKeyId() + { + return $this->access_key_id; + } + + /** + * AWS access key ID. + * + * Generated from protobuf field string access_key_id = 1; + * @param string $var + * @return $this + */ + public function setAccessKeyId($var) + { + GPBUtil::checkString($var, True); + $this->access_key_id = $var; + + return $this; + } + + /** + * Input only. AWS secret access key. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getSecretAccessKey() + { + return $this->secret_access_key; + } + + /** + * Input only. AWS secret access key. + * + * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSecretAccessKey($var) + { + GPBUtil::checkString($var, True); + $this->secret_access_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessKeyCredentials::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_AccessKeyCredentials::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php new file mode 100644 index 000000000000..64b61a6c73a5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php @@ -0,0 +1,74 @@ +google.cloud.vmmigration.v1.AwsSourceDetails.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The source is available but might not be usable yet due to invalid + * credentials or another reason. + * The error message will contain further details. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The source exists and its credentials were verified. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::FAILED => 'FAILED', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php new file mode 100644 index 000000000000..7604d5c11845 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php @@ -0,0 +1,104 @@ +google.cloud.vmmigration.v1.AwsSourceDetails.Tag + */ +class Tag extends \Google\Protobuf\Internal\Message +{ + /** + * Key of tag. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * Value of tag. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Key of tag. + * @type string $value + * Value of tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Key of tag. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Key of tag. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Value of tag. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Value of tag. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Tag::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_Tag::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php new file mode 100644 index 000000000000..b8365eebfd4d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.AwsSourceVmDetails + */ +class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + */ + protected $firmware = 0; + /** + * The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2; + */ + protected $committed_storage_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $firmware + * The firmware type of the source VM. + * @type int|string $committed_storage_bytes + * The total size of the disks being migrated in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * @return int + */ + public function getFirmware() + { + return $this->firmware; + } + + /** + * The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * @param int $var + * @return $this + */ + public function setFirmware($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\Firmware::class); + $this->firmware = $var; + + return $this; + } + + /** + * The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2; + * @return int|string + */ + public function getCommittedStorageBytes() + { + return $this->committed_storage_bytes; + } + + /** + * The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php new file mode 100644 index 000000000000..5a55b923fe10 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware + */ +class Firmware +{ + /** + * The firmware is unknown. + * + * Generated from protobuf enum FIRMWARE_UNSPECIFIED = 0; + */ + const FIRMWARE_UNSPECIFIED = 0; + /** + * The firmware is EFI. + * + * Generated from protobuf enum EFI = 1; + */ + const EFI = 1; + /** + * The firmware is BIOS. + * + * Generated from protobuf enum BIOS = 2; + */ + const BIOS = 2; + + private static $valueToName = [ + self::FIRMWARE_UNSPECIFIED => 'FIRMWARE_UNSPECIFIED', + self::EFI => 'EFI', + self::BIOS => 'BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Firmware::class, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails_Firmware::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php new file mode 100644 index 000000000000..7535504cdd78 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php @@ -0,0 +1,645 @@ +google.cloud.vmmigration.v1.AwsVmDetails + */ +class AwsVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The VM ID in AWS. + * + * Generated from protobuf field string vm_id = 1; + */ + protected $vm_id = ''; + /** + * The display name of the VM. Note that this value is not necessarily unique. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The id of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_id = 3; + */ + protected $source_id = ''; + /** + * The descriptive name of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_description = 4; + */ + protected $source_description = ''; + /** + * Output only. The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $power_state = 0; + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + */ + protected $cpu_count = 0; + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 7; + */ + protected $memory_mb = 0; + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 8; + */ + protected $disk_count = 0; + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 9; + */ + protected $committed_storage_mb = 0; + /** + * The VM's OS. + * + * Generated from protobuf field string os_description = 10; + */ + protected $os_description = ''; + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; + */ + protected $boot_option = 0; + /** + * The instance type of the VM. + * + * Generated from protobuf field string instance_type = 12; + */ + protected $instance_type = ''; + /** + * The VPC ID the VM belongs to. + * + * Generated from protobuf field string vpc_id = 13; + */ + protected $vpc_id = ''; + /** + * The security groups the VM belongs to. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; + */ + private $security_groups; + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 15; + */ + private $tags; + /** + * The AWS zone of the VM. + * + * Generated from protobuf field string zone = 16; + */ + protected $zone = ''; + /** + * The virtualization type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; + */ + protected $virtualization_type = 0; + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; + */ + protected $architecture = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_id + * The VM ID in AWS. + * @type string $display_name + * The display name of the VM. Note that this value is not necessarily unique. + * @type string $source_id + * The id of the AWS's source this VM is connected to. + * @type string $source_description + * The descriptive name of the AWS's source this VM is connected to. + * @type int $power_state + * Output only. The power state of the VM at the moment list was taken. + * @type int $cpu_count + * The number of cpus the VM has. + * @type int $memory_mb + * The memory size of the VM in MB. + * @type int $disk_count + * The number of disks the VM has. + * @type int|string $committed_storage_mb + * The total size of the storage allocated to the VM in MB. + * @type string $os_description + * The VM's OS. + * @type int $boot_option + * The VM Boot Option. + * @type string $instance_type + * The instance type of the VM. + * @type string $vpc_id + * The VPC ID the VM belongs to. + * @type array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $security_groups + * The security groups the VM belongs to. + * @type array|\Google\Protobuf\Internal\MapField $tags + * The tags of the VM. + * @type string $zone + * The AWS zone of the VM. + * @type int $virtualization_type + * The virtualization type. + * @type int $architecture + * The CPU architecture. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The VM ID in AWS. + * + * Generated from protobuf field string vm_id = 1; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM ID in AWS. + * + * Generated from protobuf field string vm_id = 1; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * The display name of the VM. Note that this value is not necessarily unique. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the VM. Note that this value is not necessarily unique. + * + * 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 id of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_id = 3; + * @return string + */ + public function getSourceId() + { + return $this->source_id; + } + + /** + * The id of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_id = 3; + * @param string $var + * @return $this + */ + public function setSourceId($var) + { + GPBUtil::checkString($var, True); + $this->source_id = $var; + + return $this; + } + + /** + * The descriptive name of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_description = 4; + * @return string + */ + public function getSourceDescription() + { + return $this->source_description; + } + + /** + * The descriptive name of the AWS's source this VM is connected to. + * + * Generated from protobuf field string source_description = 4; + * @param string $var + * @return $this + */ + public function setSourceDescription($var) + { + GPBUtil::checkString($var, True); + $this->source_description = $var; + + return $this; + } + + /** + * Output only. The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPowerState() + { + return $this->power_state; + } + + /** + * Output only. The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPowerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\PowerState::class); + $this->power_state = $var; + + return $this; + } + + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + * @param int $var + * @return $this + */ + public function setCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_count = $var; + + return $this; + } + + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 7; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 7; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 8; + * @return int + */ + public function getDiskCount() + { + return $this->disk_count; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 8; + * @param int $var + * @return $this + */ + public function setDiskCount($var) + { + GPBUtil::checkInt32($var); + $this->disk_count = $var; + + return $this; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 9; + * @return int|string + */ + public function getCommittedStorageMb() + { + return $this->committed_storage_mb; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 9; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageMb($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_mb = $var; + + return $this; + } + + /** + * The VM's OS. + * + * Generated from protobuf field string os_description = 10; + * @return string + */ + public function getOsDescription() + { + return $this->os_description; + } + + /** + * The VM's OS. + * + * Generated from protobuf field string os_description = 10; + * @param string $var + * @return $this + */ + public function setOsDescription($var) + { + GPBUtil::checkString($var, True); + $this->os_description = $var; + + return $this; + } + + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\BootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The instance type of the VM. + * + * Generated from protobuf field string instance_type = 12; + * @return string + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * The instance type of the VM. + * + * Generated from protobuf field string instance_type = 12; + * @param string $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkString($var, True); + $this->instance_type = $var; + + return $this; + } + + /** + * The VPC ID the VM belongs to. + * + * Generated from protobuf field string vpc_id = 13; + * @return string + */ + public function getVpcId() + { + return $this->vpc_id; + } + + /** + * The VPC ID the VM belongs to. + * + * Generated from protobuf field string vpc_id = 13; + * @param string $var + * @return $this + */ + public function setVpcId($var) + { + GPBUtil::checkString($var, True); + $this->vpc_id = $var; + + return $this; + } + + /** + * The security groups the VM belongs to. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityGroups() + { + return $this->security_groups; + } + + /** + * The security groups the VM belongs to. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; + * @param array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSecurityGroup::class); + $this->security_groups = $arr; + + return $this; + } + + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 15; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 15; + * @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; + } + + /** + * The AWS zone of the VM. + * + * Generated from protobuf field string zone = 16; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The AWS zone of the VM. + * + * Generated from protobuf field string zone = 16; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The virtualization type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; + * @return int + */ + public function getVirtualizationType() + { + return $this->virtualization_type; + } + + /** + * The virtualization type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; + * @param int $var + * @return $this + */ + public function setVirtualizationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmVirtualizationType::class); + $this->virtualization_type = $var; + + return $this; + } + + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php new file mode 100644 index 000000000000..208852fafad7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AwsVmDetails.BootOption + */ +class BootOption +{ + /** + * The boot option is unknown. + * + * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; + */ + const BOOT_OPTION_UNSPECIFIED = 0; + /** + * The boot option is UEFI. + * + * Generated from protobuf enum EFI = 1; + */ + const EFI = 1; + /** + * The boot option is LEGACY-BIOS. + * + * Generated from protobuf enum BIOS = 2; + */ + const BIOS = 2; + + private static $valueToName = [ + self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', + self::EFI => 'EFI', + self::BIOS => 'BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_BootOption::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php new file mode 100644 index 000000000000..5d90c29f7821 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php @@ -0,0 +1,79 @@ +google.cloud.vmmigration.v1.AwsVmDetails.PowerState + */ +class PowerState +{ + /** + * Power state is not specified. + * + * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; + */ + const POWER_STATE_UNSPECIFIED = 0; + /** + * The VM is turned on. + * + * Generated from protobuf enum ON = 1; + */ + const ON = 1; + /** + * The VM is turned off. + * + * Generated from protobuf enum OFF = 2; + */ + const OFF = 2; + /** + * The VM is suspended. This is similar to hibernation or sleep + * mode. + * + * Generated from protobuf enum SUSPENDED = 3; + */ + const SUSPENDED = 3; + /** + * The VM is starting. + * + * Generated from protobuf enum PENDING = 4; + */ + const PENDING = 4; + + private static $valueToName = [ + self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', + self::ON => 'ON', + self::OFF => 'OFF', + self::SUSPENDED => 'SUSPENDED', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_PowerState::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php new file mode 100644 index 000000000000..7f6c05454f56 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php @@ -0,0 +1,78 @@ +google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture + */ +class VmArchitecture +{ + /** + * The architecture is unknown. + * + * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; + */ + const VM_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The architecture is I386. + * + * Generated from protobuf enum I386 = 1; + */ + const I386 = 1; + /** + * The architecture is X86_64. + * + * Generated from protobuf enum X86_64 = 2; + */ + const X86_64 = 2; + /** + * The architecture is ARM64. + * + * Generated from protobuf enum ARM64 = 3; + */ + const ARM64 = 3; + /** + * The architecture is X86_64_MAC. + * + * Generated from protobuf enum X86_64_MAC = 4; + */ + const X86_64_MAC = 4; + + private static $valueToName = [ + self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', + self::I386 => 'I386', + self::X86_64 => 'X86_64', + self::ARM64 => 'ARM64', + self::X86_64_MAC => 'X86_64_MAC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmArchitecture::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmArchitecture::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php new file mode 100644 index 000000000000..ce8c03686351 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType + */ +class VmVirtualizationType +{ + /** + * The virtualization type is unknown. + * + * Generated from protobuf enum VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; + */ + const VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; + /** + * The virtualziation type is HVM. + * + * Generated from protobuf enum HVM = 1; + */ + const HVM = 1; + /** + * The virtualziation type is PARAVIRTUAL. + * + * Generated from protobuf enum PARAVIRTUAL = 2; + */ + const PARAVIRTUAL = 2; + + private static $valueToName = [ + self::VM_VIRTUALIZATION_TYPE_UNSPECIFIED => 'VM_VIRTUALIZATION_TYPE_UNSPECIFIED', + self::HVM => 'HVM', + self::PARAVIRTUAL => 'PARAVIRTUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmVirtualizationType::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmVirtualizationType::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php new file mode 100644 index 000000000000..c5027ecbc764 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.AwsVmsDetails + */ +class AwsVmsDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The details of the AWS VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $details + * The details of the AWS VMs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The details of the AWS VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * The details of the AWS VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; + * @param array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsVmDetails::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php new file mode 100644 index 000000000000..77cdadd56226 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.CancelCloneJobRequest + */ +class CancelCloneJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The clone job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The clone job id + * Please see {@see VmMigrationClient::cloneJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\CancelCloneJobRequest + * + * @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 clone job id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The clone job 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 clone job 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php new file mode 100644 index 000000000000..cd231e22cc6d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CancelCloneJobResponse + */ +class CancelCloneJobResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php new file mode 100644 index 000000000000..71738014938e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.CancelCutoverJobRequest + */ +class CancelCutoverJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The cutover job id + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The cutover job id + * Please see {@see VmMigrationClient::cutoverJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\CancelCutoverJobRequest + * + * @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 cutover job id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The cutover job 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 cutover job 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php new file mode 100644 index 000000000000..9c3a234caabd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CancelCutoverJobResponse + */ +class CancelCutoverJobResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php new file mode 100644 index 000000000000..dd34db7de2c9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php @@ -0,0 +1,370 @@ +google.cloud.vmmigration.v1.CloneJob + */ +class CloneJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * + * 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 clone job was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The name of the clone. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. State of the clone job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The clone steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $steps; + protected $target_vm_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details + * Output only. Details of the target VM in Compute Engine. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the clone job was ended. + * @type string $name + * Output only. The name of the clone. + * @type int $state + * Output only. State of the clone job. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last updated. + * @type \Google\Rpc\Status $error + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * @type array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $steps + * Output only. The clone steps list representing its progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null + */ + public function getComputeEngineTargetDetails() + { + return $this->readOneof(20); + } + + public function hasComputeEngineTargetDetails() + { + return $this->hasOneof(20); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var + * @return $this + */ + public function setComputeEngineTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Output only. The time the clone job was created (as an API call, not when + * it was actually created in the target). + * + * 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 clone job was created (as an API call, not when + * it was actually created in the target). + * + * 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 clone job was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.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 clone job was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.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. The name of the clone. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the clone. + * + * Generated from protobuf field string name = 3 [(.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. State of the clone job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the clone job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CloneJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details for the errors that led to the Clone Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The clone steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Output only. The clone steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetVmDetails() + { + return $this->whichOneof("target_vm_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php new file mode 100644 index 000000000000..a60e309260f0 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php @@ -0,0 +1,100 @@ +google.cloud.vmmigration.v1.CloneJob.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The clone job has not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The clone job is active and running. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The clone job finished with errors. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The clone job finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The clone job was cancelled. + * + * Generated from protobuf enum CANCELLED = 5; + */ + const CANCELLED = 5; + /** + * The clone job is being cancelled. + * + * Generated from protobuf enum CANCELLING = 6; + */ + const CANCELLING = 6; + /** + * OS adaptation is running as part of the clone job to generate license. + * + * Generated from protobuf enum ADAPTING_OS = 7; + */ + const ADAPTING_OS = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLED => 'CANCELLED', + self::CANCELLING => 'CANCELLING', + self::ADAPTING_OS => 'ADAPTING_OS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\CloneJob_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php new file mode 100644 index 000000000000..38ffc545d9b1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php @@ -0,0 +1,229 @@ +google.cloud.vmmigration.v1.CloneStep + */ +class CloneStep extends \Google\Protobuf\Internal\Message +{ + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AdaptingOSStep $adapting_os + * Adapting OS step. + * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks + * Preparing VM disks step. + * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm + * Instantiating migrated VM step. + * @type \Google\Protobuf\Timestamp $start_time + * The time the step has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Adapting OS step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; + * @return \Google\Cloud\VMMigration\V1\AdaptingOSStep|null + */ + public function getAdaptingOs() + { + return $this->readOneof(3); + } + + public function hasAdaptingOs() + { + return $this->hasOneof(3); + } + + /** + * Adapting OS step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; + * @param \Google\Cloud\VMMigration\V1\AdaptingOSStep $var + * @return $this + */ + public function setAdaptingOs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AdaptingOSStep::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; + * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null + */ + public function getPreparingVmDisks() + { + return $this->readOneof(4); + } + + public function hasPreparingVmDisks() + { + return $this->hasOneof(4); + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; + * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var + * @return $this + */ + public function setPreparingVmDisks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; + * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null + */ + public function getInstantiatingMigratedVm() + { + return $this->readOneof(5); + } + + public function hasInstantiatingMigratedVm() + { + return $this->hasOneof(5); + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; + * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var + * @return $this + */ + public function setInstantiatingMigratedVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The time the step has 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 step has 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 step has ended. + * + * 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 step has ended. + * + * 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; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php new file mode 100644 index 000000000000..efcc0ffce13f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php @@ -0,0 +1,61 @@ +google.cloud.vmmigration.v1.ComputeEngineBootOption + */ +class ComputeEngineBootOption +{ + /** + * The boot option is unknown. + * + * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; + */ + const COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; + /** + * The boot option is EFI. + * + * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; + */ + const COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; + /** + * The boot option is BIOS. + * + * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; + */ + const COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; + + private static $valueToName = [ + self::COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED => 'COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED', + self::COMPUTE_ENGINE_BOOT_OPTION_EFI => 'COMPUTE_ENGINE_BOOT_OPTION_EFI', + self::COMPUTE_ENGINE_BOOT_OPTION_BIOS => 'COMPUTE_ENGINE_BOOT_OPTION_BIOS', + ]; + + 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php new file mode 100644 index 000000000000..6dd7104b8f4d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php @@ -0,0 +1,69 @@ +google.cloud.vmmigration.v1.ComputeEngineDiskType + */ +class ComputeEngineDiskType +{ + /** + * An unspecified disk type. Will be used as STANDARD. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; + */ + const COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; + /** + * A Standard disk type. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; + */ + const COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; + /** + * SSD hard disk type. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_SSD = 2; + */ + const COMPUTE_ENGINE_DISK_TYPE_SSD = 2; + /** + * An alternative to SSD persistent disks that balance performance and + * cost. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; + */ + const COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; + + private static $valueToName = [ + self::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED => 'COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED', + self::COMPUTE_ENGINE_DISK_TYPE_STANDARD => 'COMPUTE_ENGINE_DISK_TYPE_STANDARD', + self::COMPUTE_ENGINE_DISK_TYPE_SSD => 'COMPUTE_ENGINE_DISK_TYPE_SSD', + self::COMPUTE_ENGINE_DISK_TYPE_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_BALANCED', + ]; + + 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php new file mode 100644 index 000000000000..427ea82b29bf --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php @@ -0,0 +1,61 @@ +google.cloud.vmmigration.v1.ComputeEngineLicenseType + */ +class ComputeEngineLicenseType +{ + /** + * The license type is the default for the OS. + * + * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; + */ + const COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; + /** + * The license type is Pay As You Go license type. + * + * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; + */ + const COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; + /** + * The license type is Bring Your Own License type. + * + * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; + */ + const COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; + + private static $valueToName = [ + self::COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT => 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT', + self::COMPUTE_ENGINE_LICENSE_TYPE_PAYG => 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG', + self::COMPUTE_ENGINE_LICENSE_TYPE_BYOL => 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL', + ]; + + 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php new file mode 100644 index 000000000000..2745c0b602a8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php @@ -0,0 +1,674 @@ +google.cloud.vmmigration.v1.ComputeEngineTargetDefaults + */ +class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + */ + protected $vm_name = ''; + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * + * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { + */ + protected $target_project = ''; + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + */ + protected $zone = ''; + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + */ + protected $machine_type_series = ''; + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + */ + protected $machine_type = ''; + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + */ + private $network_tags; + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + */ + private $network_interfaces; + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + */ + protected $service_account = ''; + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + */ + protected $disk_type = 0; + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + */ + protected $license_type = 0; + /** + * Output only. The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $applied_license = null; + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + */ + protected $compute_scheduling = null; + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + */ + protected $secure_boot = false; + /** + * Output only. The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boot_option = 0; + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + */ + private $metadata; + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + */ + private $additional_licenses; + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + */ + protected $hostname = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_name + * The name of the VM to create. + * @type string $target_project + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * @type string $zone + * The zone in which to create the VM. + * @type string $machine_type_series + * The machine type series to create the VM with. + * @type string $machine_type + * The machine type to create the VM with. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * A map of network tags to associate with the VM. + * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * List of NICs connected to this VM. + * @type string $service_account + * The service account to associate the VM with. + * @type int $disk_type + * The disk type to use in the VM. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A map of labels to associate with the VM. + * @type int $license_type + * The license type to use in OS adaptation. + * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license + * Output only. The OS license returned from the adaptation module report. + * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling + * Compute instance scheduling information (if empty default is used). + * @type bool $secure_boot + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * @type int $boot_option + * Output only. The VM Boot Option, as set in the source vm. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * The metadata key/value pairs to assign to the VM. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Additional licenses to assign to the VM. + * @type string $hostname + * The hostname to assign to the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @return string + */ + public function getVmName() + { + return $this->vm_name; + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @param string $var + * @return $this + */ + public function setVmName($var) + { + GPBUtil::checkString($var, True); + $this->vm_name = $var; + + return $this; + } + + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * + * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create this VM. + * + * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @return string + */ + public function getMachineTypeSeries() + { + return $this->machine_type_series; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @param string $var + * @return $this + */ + public function setMachineTypeSeries($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_series = $var; + + return $this; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @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 license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * Output only. The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null + */ + public function getAppliedLicense() + { + return $this->applied_license; + } + + public function hasAppliedLicense() + { + return isset($this->applied_license); + } + + public function clearAppliedLicense() + { + unset($this->applied_license); + } + + /** + * Output only. The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var + * @return $this + */ + public function setAppliedLicense($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); + $this->applied_license = $var; + + return $this; + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null + */ + public function getComputeScheduling() + { + return $this->compute_scheduling; + } + + public function hasComputeScheduling() + { + return isset($this->compute_scheduling); + } + + public function clearComputeScheduling() + { + unset($this->compute_scheduling); + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var + * @return $this + */ + public function setComputeScheduling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); + $this->compute_scheduling = $var; + + return $this; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @return bool + */ + public function getSecureBoot() + { + return $this->secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @param bool $var + * @return $this + */ + public function setSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->secure_boot = $var; + + return $this; + } + + /** + * Output only. The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * Output only. The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalLicenses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_licenses = $arr; + + return $this; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php new file mode 100644 index 000000000000..aaca78c78818 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php @@ -0,0 +1,670 @@ +google.cloud.vmmigration.v1.ComputeEngineTargetDetails + */ +class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + */ + protected $vm_name = ''; + /** + * The Google Cloud target project ID or project name. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + */ + protected $zone = ''; + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + */ + protected $machine_type_series = ''; + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + */ + protected $machine_type = ''; + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + */ + private $network_tags; + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + */ + private $network_interfaces; + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + */ + protected $service_account = ''; + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + */ + protected $disk_type = 0; + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + */ + private $labels; + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + */ + protected $license_type = 0; + /** + * The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; + */ + protected $applied_license = null; + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + */ + protected $compute_scheduling = null; + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + */ + protected $secure_boot = false; + /** + * The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; + */ + protected $boot_option = 0; + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + */ + private $metadata; + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + */ + private $additional_licenses; + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + */ + protected $hostname = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_name + * The name of the VM to create. + * @type string $project + * The Google Cloud target project ID or project name. + * @type string $zone + * The zone in which to create the VM. + * @type string $machine_type_series + * The machine type series to create the VM with. + * @type string $machine_type + * The machine type to create the VM with. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * A map of network tags to associate with the VM. + * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * List of NICs connected to this VM. + * @type string $service_account + * The service account to associate the VM with. + * @type int $disk_type + * The disk type to use in the VM. + * @type array|\Google\Protobuf\Internal\MapField $labels + * A map of labels to associate with the VM. + * @type int $license_type + * The license type to use in OS adaptation. + * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license + * The OS license returned from the adaptation module report. + * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling + * Compute instance scheduling information (if empty default is used). + * @type bool $secure_boot + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * @type int $boot_option + * The VM Boot Option, as set in the source vm. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * The metadata key/value pairs to assign to the VM. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Additional licenses to assign to the VM. + * @type string $hostname + * The hostname to assign to the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @return string + */ + public function getVmName() + { + return $this->vm_name; + } + + /** + * The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1; + * @param string $var + * @return $this + */ + public function setVmName($var) + { + GPBUtil::checkString($var, True); + $this->vm_name = $var; + + return $this; + } + + /** + * The Google Cloud target project ID or project name. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The Google Cloud target project ID or project name. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The zone in which to create the VM. + * + * Generated from protobuf field string zone = 3; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @return string + */ + public function getMachineTypeSeries() + { + return $this->machine_type_series; + } + + /** + * The machine type series to create the VM with. + * + * Generated from protobuf field string machine_type_series = 4; + * @param string $var + * @return $this + */ + public function setMachineTypeSeries($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_series = $var; + + return $this; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 5; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * A map of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * List of NICs connected to this VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; + * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * The disk type to use in the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 10; + * @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 license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * The license type to use in OS adaptation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; + * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null + */ + public function getAppliedLicense() + { + return $this->applied_license; + } + + public function hasAppliedLicense() + { + return isset($this->applied_license); + } + + public function clearAppliedLicense() + { + unset($this->applied_license); + } + + /** + * The OS license returned from the adaptation module report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; + * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var + * @return $this + */ + public function setAppliedLicense($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); + $this->applied_license = $var; + + return $this; + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null + */ + public function getComputeScheduling() + { + return $this->compute_scheduling; + } + + public function hasComputeScheduling() + { + return isset($this->compute_scheduling); + } + + public function clearComputeScheduling() + { + unset($this->compute_scheduling); + } + + /** + * Compute instance scheduling information (if empty default is used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; + * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var + * @return $this + */ + public function setComputeScheduling($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); + $this->compute_scheduling = $var; + + return $this; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @return bool + */ + public function getSecureBoot() + { + return $this->secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the vm boot option is EFI. + * + * Generated from protobuf field bool secure_boot = 14; + * @param bool $var + * @return $this + */ + public function setSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->secure_boot = $var; + + return $this; + } + + /** + * The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * The VM Boot Option, as set in the source vm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 17; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalLicenses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_licenses = $arr; + + return $this; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 18; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php new file mode 100644 index 000000000000..bc30aaa06e34 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php @@ -0,0 +1,206 @@ +google.cloud.vmmigration.v1.ComputeScheduling + */ +class ComputeScheduling extends \Google\Protobuf\Internal\Message +{ + /** + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; + */ + protected $on_host_maintenance = 0; + /** + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; + */ + protected $restart_type = 0; + /** + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; + */ + private $node_affinities; + /** + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * + * Generated from protobuf field int32 min_node_cpus = 4; + */ + protected $min_node_cpus = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $on_host_maintenance + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * @type int $restart_type + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * @type array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $node_affinities + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * @type int $min_node_cpus + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; + * @return int + */ + public function getOnHostMaintenance() + { + return $this->on_host_maintenance; + } + + /** + * How the instance should behave when the host machine undergoes + * maintenance that may temporarily impact instance performance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; + * @param int $var + * @return $this + */ + public function setOnHostMaintenance($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\OnHostMaintenance::class); + $this->on_host_maintenance = $var; + + return $this; + } + + /** + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; + * @return int + */ + public function getRestartType() + { + return $this->restart_type; + } + + /** + * Whether the Instance should be automatically restarted whenever it is + * terminated by Compute Engine (not terminated by user). + * This configuration is identical to `automaticRestart` field in Compute + * Engine create instance under scheduling. + * It was changed to an enum (instead of a boolean) to match the default + * value in Compute Engine which is automatic restart. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; + * @param int $var + * @return $this + */ + public function setRestartType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\RestartType::class); + $this->restart_type = $var; + + return $this; + } + + /** + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeAffinities() + { + return $this->node_affinities; + } + + /** + * A set of node affinity and anti-affinity configurations for sole tenant + * nodes. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; + * @param array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeAffinities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity::class); + $this->node_affinities = $arr; + + return $this; + } + + /** + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * + * Generated from protobuf field int32 min_node_cpus = 4; + * @return int + */ + public function getMinNodeCpus() + { + return $this->min_node_cpus; + } + + /** + * The minimum number of virtual CPUs this instance will consume when + * running on a sole-tenant node. Ignored if no node_affinites are + * configured. + * + * Generated from protobuf field int32 min_node_cpus = 4; + * @param int $var + * @return $this + */ + public function setMinNodeCpus($var) + { + GPBUtil::checkInt32($var); + $this->min_node_cpus = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php new file mode 100644 index 000000000000..2289facddca5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php @@ -0,0 +1,62 @@ +google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance + */ +class OnHostMaintenance +{ + /** + * An unknown, unexpected behavior. + * + * Generated from protobuf enum ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + */ + const ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + /** + * Terminate the instance when the host machine undergoes maintenance. + * + * Generated from protobuf enum TERMINATE = 1; + */ + const TERMINATE = 1; + /** + * Migrate the instance when the host machine undergoes maintenance. + * + * Generated from protobuf enum MIGRATE = 2; + */ + const MIGRATE = 2; + + private static $valueToName = [ + self::ON_HOST_MAINTENANCE_UNSPECIFIED => 'ON_HOST_MAINTENANCE_UNSPECIFIED', + self::TERMINATE => 'TERMINATE', + self::MIGRATE => 'MIGRATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OnHostMaintenance::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_OnHostMaintenance::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php new file mode 100644 index 000000000000..f84ad38270f2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.ComputeScheduling.RestartType + */ +class RestartType +{ + /** + * Unspecified behavior. This will use the default. + * + * Generated from protobuf enum RESTART_TYPE_UNSPECIFIED = 0; + */ + const RESTART_TYPE_UNSPECIFIED = 0; + /** + * The Instance should be automatically restarted whenever it is + * terminated by Compute Engine. + * + * Generated from protobuf enum AUTOMATIC_RESTART = 1; + */ + const AUTOMATIC_RESTART = 1; + /** + * The Instance isn't automatically restarted whenever it is + * terminated by Compute Engine. + * + * Generated from protobuf enum NO_AUTOMATIC_RESTART = 2; + */ + const NO_AUTOMATIC_RESTART = 2; + + private static $valueToName = [ + self::RESTART_TYPE_UNSPECIFIED => 'RESTART_TYPE_UNSPECIFIED', + self::AUTOMATIC_RESTART => 'AUTOMATIC_RESTART', + self::NO_AUTOMATIC_RESTART => 'NO_AUTOMATIC_RESTART', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RestartType::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_RestartType::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php new file mode 100644 index 000000000000..41851b8961e2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateCloneJobRequest + */ +class CreateCloneJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Clone's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The clone job identifier. + * + * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $clone_job_id = ''; + /** + * Required. The clone request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $clone_job = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Clone's parent. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\CloneJob $cloneJob Required. The clone request body. + * @param string $cloneJobId Required. The clone job identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateCloneJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\CloneJob $cloneJob, string $cloneJobId): self + { + return (new self()) + ->setParent($parent) + ->setCloneJob($cloneJob) + ->setCloneJobId($cloneJobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Clone's parent. + * @type string $clone_job_id + * Required. The clone job identifier. + * @type \Google\Cloud\VMMigration\V1\CloneJob $clone_job + * Required. The clone request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Clone's 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. The Clone's 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. The clone job identifier. + * + * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCloneJobId() + { + return $this->clone_job_id; + } + + /** + * Required. The clone job identifier. + * + * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCloneJobId($var) + { + GPBUtil::checkString($var, True); + $this->clone_job_id = $var; + + return $this; + } + + /** + * Required. The clone request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\CloneJob|null + */ + public function getCloneJob() + { + return $this->clone_job; + } + + public function hasCloneJob() + { + return isset($this->clone_job); + } + + public function clearCloneJob() + { + unset($this->clone_job); + } + + /** + * Required. The clone request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\CloneJob $var + * @return $this + */ + public function setCloneJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CloneJob::class); + $this->clone_job = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php new file mode 100644 index 000000000000..ca9cc7598345 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateCutoverJobRequest + */ +class CreateCutoverJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cutover's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The cutover job identifier. + * + * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cutover_job_id = ''; + /** + * Required. The cutover request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cutover_job = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Cutover's parent. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob Required. The cutover request body. + * @param string $cutoverJobId Required. The cutover job identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateCutoverJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob, string $cutoverJobId): self + { + return (new self()) + ->setParent($parent) + ->setCutoverJob($cutoverJob) + ->setCutoverJobId($cutoverJobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Cutover's parent. + * @type string $cutover_job_id + * Required. The cutover job identifier. + * @type \Google\Cloud\VMMigration\V1\CutoverJob $cutover_job + * Required. The cutover request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cutover's 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. The Cutover's 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. The cutover job identifier. + * + * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCutoverJobId() + { + return $this->cutover_job_id; + } + + /** + * Required. The cutover job identifier. + * + * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCutoverJobId($var) + { + GPBUtil::checkString($var, True); + $this->cutover_job_id = $var; + + return $this; + } + + /** + * Required. The cutover request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\CutoverJob|null + */ + public function getCutoverJob() + { + return $this->cutover_job; + } + + public function hasCutoverJob() + { + return isset($this->cutover_job); + } + + public function clearCutoverJob() + { + unset($this->cutover_job); + } + + /** + * Required. The cutover request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\CutoverJob $var + * @return $this + */ + public function setCutoverJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverJob::class); + $this->cutover_job = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php new file mode 100644 index 000000000000..ec4aaf84d99f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php @@ -0,0 +1,252 @@ +google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest + */ +class CreateDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The datacenterConnector identifier. + * + * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $datacenter_connector_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $datacenter_connector = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * Please see {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector Required. The create request body. + * @param string $datacenterConnectorId Required. The datacenterConnector identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector, string $datacenterConnectorId): self + { + return (new self()) + ->setParent($parent) + ->setDatacenterConnector($datacenterConnector) + ->setDatacenterConnectorId($datacenterConnectorId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * @type string $datacenter_connector_id + * Required. The datacenterConnector identifier. + * @type \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenter_connector + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * + * 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 DatacenterConnector's parent. + * Required. The Source in where the new DatacenterConnector will be created. + * For example: + * `projects/my-project/locations/us-central1/sources/my-source` + * + * 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 datacenterConnector identifier. + * + * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatacenterConnectorId() + { + return $this->datacenter_connector_id; + } + + /** + * Required. The datacenterConnector identifier. + * + * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatacenterConnectorId($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_connector_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\DatacenterConnector|null + */ + public function getDatacenterConnector() + { + return $this->datacenter_connector; + } + + public function hasDatacenterConnector() + { + return isset($this->datacenter_connector); + } + + public function clearDatacenterConnector() + { + unset($this->datacenter_connector); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $var + * @return $this + */ + public function setDatacenterConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); + $this->datacenter_connector = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php new file mode 100644 index 000000000000..de9bfaea8932 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateGroupRequest + */ +class CreateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Group's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The group identifier. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Group's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\Group $group Required. The create request body. + * @param string $groupId Required. The group identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\Group $group, string $groupId): self + { + return (new self()) + ->setParent($parent) + ->setGroup($group) + ->setGroupId($groupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Group's parent. + * @type string $group_id + * Required. The group identifier. + * @type \Google\Cloud\VMMigration\V1\Group $group + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Group's 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. The Group's 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. The group identifier. + * + * 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 identifier. + * + * 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; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php new file mode 100644 index 000000000000..c12c649f5023 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateMigratingVmRequest + */ +class CreateMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MigratingVm's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The migratingVm identifier. + * + * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migrating_vm_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migrating_vm = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The MigratingVm's parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The create request body. + * @param string $migratingVmId Required. The migratingVm identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateMigratingVmRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, string $migratingVmId): self + { + return (new self()) + ->setParent($parent) + ->setMigratingVm($migratingVm) + ->setMigratingVmId($migratingVmId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The MigratingVm's parent. + * @type string $migrating_vm_id + * Required. The migratingVm identifier. + * @type \Google\Cloud\VMMigration\V1\MigratingVm $migrating_vm + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MigratingVm's 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. The MigratingVm's 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. The migratingVm identifier. + * + * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMigratingVmId() + { + return $this->migrating_vm_id; + } + + /** + * Required. The migratingVm identifier. + * + * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMigratingVmId($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\MigratingVm|null + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + public function hasMigratingVm() + { + return isset($this->migrating_vm); + } + + public function clearMigratingVm() + { + unset($this->migrating_vm); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\MigratingVm $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); + $this->migrating_vm = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php new file mode 100644 index 000000000000..525bb5819b4a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateSourceRequest + */ +class CreateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Source's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The source identifier. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Source's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\Source $source Required. The create request body. + * @param string $sourceId Required. The source identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateSourceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\Source $source, string $sourceId): self + { + return (new self()) + ->setParent($parent) + ->setSource($source) + ->setSourceId($sourceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Source's parent. + * @type string $source_id + * Required. The source identifier. + * @type \Google\Cloud\VMMigration\V1\Source $source + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Source's 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. The Source's 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. The source identifier. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceId() + { + return $this->source_id; + } + + /** + * Required. The source identifier. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceId($var) + { + GPBUtil::checkString($var, True); + $this->source_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php new file mode 100644 index 000000000000..fa7e25ef6158 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php @@ -0,0 +1,237 @@ +google.cloud.vmmigration.v1.CreateTargetProjectRequest + */ +class CreateTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The TargetProject's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The target_project identifier. + * + * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_project_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_project = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The TargetProject's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The create request body. + * @param string $targetProjectId Required. The target_project identifier. + * + * @return \Google\Cloud\VMMigration\V1\CreateTargetProjectRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\TargetProject $targetProject, string $targetProjectId): self + { + return (new self()) + ->setParent($parent) + ->setTargetProject($targetProject) + ->setTargetProjectId($targetProjectId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The TargetProject's parent. + * @type string $target_project_id + * Required. The target_project identifier. + * @type \Google\Cloud\VMMigration\V1\TargetProject $target_project + * Required. The create request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The TargetProject's 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. The TargetProject's 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. The target_project identifier. + * + * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetProjectId() + { + return $this->target_project_id; + } + + /** + * Required. The target_project identifier. + * + * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetProjectId($var) + { + GPBUtil::checkString($var, True); + $this->target_project_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\TargetProject|null + */ + public function getTargetProject() + { + return $this->target_project; + } + + public function hasTargetProject() + { + return isset($this->target_project); + } + + public function clearTargetProject() + { + unset($this->target_project); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\TargetProject $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); + $this->target_project = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php new file mode 100644 index 000000000000..80a507c49703 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php @@ -0,0 +1,258 @@ +google.cloud.vmmigration.v1.CreateUtilizationReportRequest + */ +class CreateUtilizationReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Report's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The report to create. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $utilization_report = null; + /** + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $utilization_report_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The Utilization Report's parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport Required. The report to create. + * @param string $utilizationReportId Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * @return \Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport, string $utilizationReportId): self + { + return (new self()) + ->setParent($parent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Utilization Report's parent. + * @type \Google\Cloud\VMMigration\V1\UtilizationReport $utilization_report + * Required. The report to create. + * @type string $utilization_report_id + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Report's 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. The Utilization Report's 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. The report to create. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\UtilizationReport|null + */ + public function getUtilizationReport() + { + return $this->utilization_report; + } + + public function hasUtilizationReport() + { + return isset($this->utilization_report); + } + + public function clearUtilizationReport() + { + unset($this->utilization_report); + } + + /** + * Required. The report to create. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\UtilizationReport $var + * @return $this + */ + public function setUtilizationReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UtilizationReport::class); + $this->utilization_report = $var; + + return $this; + } + + /** + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUtilizationReportId() + { + return $this->utilization_report_id; + } + + /** + * Required. The ID to use for the report, which will become the final + * component of the reports's resource name. + * This value maximum length is 63 characters, and valid characters + * are /[a-z][0-9]-/. It must start with an english letter and must not + * end with a hyphen. + * + * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUtilizationReportId($var) + { + GPBUtil::checkString($var, True); + $this->utilization_report_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php new file mode 100644 index 000000000000..3fafe9c8c7e7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php @@ -0,0 +1,435 @@ +google.cloud.vmmigration.v1.CutoverJob + */ +class CutoverJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * + * 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 cutover job had finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The name of the cutover job. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. State of the cutover job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. The current progress in percentage of the cutover job. + * + * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $progress_percent = 0; + /** + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. A message providing possible extra details about the current + * state. + * + * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_message = ''; + /** + * Output only. The cutover steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $steps; + protected $target_vm_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details + * Output only. Details of the target VM in Compute Engine. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the cutover job had finished. + * @type string $name + * Output only. The name of the cutover job. + * @type int $state + * Output only. State of the cutover job. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last updated. + * @type int $progress_percent + * Output only. The current progress in percentage of the cutover job. + * @type \Google\Rpc\Status $error + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * @type string $state_message + * Output only. A message providing possible extra details about the current + * state. + * @type array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $steps + * Output only. The cutover steps list representing its progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null + */ + public function getComputeEngineTargetDetails() + { + return $this->readOneof(14); + } + + public function hasComputeEngineTargetDetails() + { + return $this->hasOneof(14); + } + + /** + * Output only. Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var + * @return $this + */ + public function setComputeEngineTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Output only. The time the cutover job was created (as an API call, not when + * it was actually created in the target). + * + * 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 cutover job was created (as an API call, not when + * it was actually created in the target). + * + * 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 cutover job had finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.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 cutover job had finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.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. The name of the cutover job. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the cutover job. + * + * Generated from protobuf field string name = 3 [(.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. State of the cutover job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the cutover job. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CutoverJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. The current progress in percentage of the cutover job. + * + * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Output only. The current progress in percentage of the cutover job. + * + * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details for the errors that led to the Cutover Job's + * state. + * + * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. A message providing possible extra details about the current + * state. + * + * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * Output only. A message providing possible extra details about the current + * state. + * + * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * Output only. The cutover steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Output only. The cutover steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetVmDetails() + { + return $this->whichOneof("target_vm_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php new file mode 100644 index 000000000000..b1810e6a5d30 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php @@ -0,0 +1,100 @@ +google.cloud.vmmigration.v1.CutoverJob.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The cutover job has not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The cutover job finished with errors. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The cutover job finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The cutover job was cancelled. + * + * Generated from protobuf enum CANCELLED = 4; + */ + const CANCELLED = 4; + /** + * The cutover job is being cancelled. + * + * Generated from protobuf enum CANCELLING = 5; + */ + const CANCELLING = 5; + /** + * The cutover job is active and running. + * + * Generated from protobuf enum ACTIVE = 6; + */ + const ACTIVE = 6; + /** + * OS adaptation is running as part of the cutover job to generate license. + * + * Generated from protobuf enum ADAPTING_OS = 7; + */ + const ADAPTING_OS = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLED => 'CANCELLED', + self::CANCELLING => 'CANCELLING', + self::ACTIVE => 'ACTIVE', + self::ADAPTING_OS => 'ADAPTING_OS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\CutoverJob_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php new file mode 100644 index 000000000000..68550eca3b97 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php @@ -0,0 +1,295 @@ +google.cloud.vmmigration.v1.CutoverStep + */ +class CutoverStep extends \Google\Protobuf\Internal\Message +{ + /** + * The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $previous_replication_cycle + * A replication cycle prior cutover step. + * @type \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $shutting_down_source_vm + * Shutting down VM step. + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $final_sync + * Final sync step. + * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks + * Preparing VM disks step. + * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm + * Instantiating migrated VM step. + * @type \Google\Protobuf\Timestamp $start_time + * The time the step has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * A replication cycle prior cutover step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getPreviousReplicationCycle() + { + return $this->readOneof(3); + } + + public function hasPreviousReplicationCycle() + { + return $this->hasOneof(3); + } + + /** + * A replication cycle prior cutover step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setPreviousReplicationCycle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Shutting down VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; + * @return \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep|null + */ + public function getShuttingDownSourceVm() + { + return $this->readOneof(4); + } + + public function hasShuttingDownSourceVm() + { + return $this->hasOneof(4); + } + + /** + * Shutting down VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; + * @param \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $var + * @return $this + */ + public function setShuttingDownSourceVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Final sync step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getFinalSync() + { + return $this->readOneof(5); + } + + public function hasFinalSync() + { + return $this->hasOneof(5); + } + + /** + * Final sync step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setFinalSync($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; + * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null + */ + public function getPreparingVmDisks() + { + return $this->readOneof(6); + } + + public function hasPreparingVmDisks() + { + return $this->hasOneof(6); + } + + /** + * Preparing VM disks step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; + * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var + * @return $this + */ + public function setPreparingVmDisks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; + * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null + */ + public function getInstantiatingMigratedVm() + { + return $this->readOneof(7); + } + + public function hasInstantiatingMigratedVm() + { + return $this->hasOneof(7); + } + + /** + * Instantiating migrated VM step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; + * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var + * @return $this + */ + public function setInstantiatingMigratedVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The time the step has 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 step has 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 step has ended. + * + * 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 step has ended. + * + * 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; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php new file mode 100644 index 000000000000..a081411451d2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php @@ -0,0 +1,229 @@ +google.cloud.vmmigration.v1.CycleStep + */ +class CycleStep extends \Google\Protobuf\Internal\Message +{ + /** + * The time the cycle step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the cycle step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\InitializingReplicationStep $initializing_replication + * Initializing replication step. + * @type \Google\Cloud\VMMigration\V1\ReplicatingStep $replicating + * Replicating step. + * @type \Google\Cloud\VMMigration\V1\PostProcessingStep $post_processing + * Post processing step. + * @type \Google\Protobuf\Timestamp $start_time + * The time the cycle step has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the cycle step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Initializing replication step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; + * @return \Google\Cloud\VMMigration\V1\InitializingReplicationStep|null + */ + public function getInitializingReplication() + { + return $this->readOneof(3); + } + + public function hasInitializingReplication() + { + return $this->hasOneof(3); + } + + /** + * Initializing replication step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; + * @param \Google\Cloud\VMMigration\V1\InitializingReplicationStep $var + * @return $this + */ + public function setInitializingReplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InitializingReplicationStep::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Replicating step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; + * @return \Google\Cloud\VMMigration\V1\ReplicatingStep|null + */ + public function getReplicating() + { + return $this->readOneof(4); + } + + public function hasReplicating() + { + return $this->hasOneof(4); + } + + /** + * Replicating step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; + * @param \Google\Cloud\VMMigration\V1\ReplicatingStep $var + * @return $this + */ + public function setReplicating($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicatingStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Post processing step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; + * @return \Google\Cloud\VMMigration\V1\PostProcessingStep|null + */ + public function getPostProcessing() + { + return $this->readOneof(5); + } + + public function hasPostProcessing() + { + return $this->hasOneof(5); + } + + /** + * Post processing step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; + * @param \Google\Cloud\VMMigration\V1\PostProcessingStep $var + * @return $this + */ + public function setPostProcessing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PostProcessingStep::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The time the cycle step has 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 cycle step has 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 cycle step has ended. + * + * 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 cycle step has ended. + * + * 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; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php new file mode 100644 index 000000000000..20244d65ed0b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php @@ -0,0 +1,620 @@ +google.cloud.vmmigration.v1.DatacenterConnector + */ +class DatacenterConnector extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the connector was updated with an API call. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The connector's name. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * + * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $registration_id = ''; + /** + * The service account to use in the connector when communicating with the + * cloud. + * + * Generated from protobuf field string service_account = 5; + */ + protected $service_account = ''; + /** + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * + * Generated from protobuf field string version = 6; + */ + protected $version = ''; + /** + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * + * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $bucket = ''; + /** + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * + * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $appliance_infrastructure_version = ''; + /** + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * + * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $appliance_software_version = ''; + /** + * Output only. The available versions for updating this appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $available_versions = null; + /** + * Output only. The status of the current / last upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $upgrade_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the connector was updated with an API call. + * @type string $name + * Output only. The connector's name. + * @type string $registration_id + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * @type string $service_account + * The service account to use in the connector when communicating with the + * cloud. + * @type string $version + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * @type string $bucket + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * @type int $state + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last set. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * @type string $appliance_infrastructure_version + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * @type string $appliance_software_version + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * @type \Google\Cloud\VMMigration\V1\AvailableUpdates $available_versions + * Output only. The available versions for updating this appliance. + * @type \Google\Cloud\VMMigration\V1\UpgradeStatus $upgrade_status + * Output only. The status of the current / last upgradeAppliance operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the connector was created (as an API call, not when + * it was actually installed). + * + * 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 connector was created (as an API call, not when + * it was actually installed). + * + * 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 last time the connector was updated with an API call. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 time the connector was updated with an API call. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 connector's name. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The connector's name. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * + * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getRegistrationId() + { + return $this->registration_id; + } + + /** + * Immutable. A unique key for this connector. This key is internal to the OVA + * connector and is supplied with its creation during the registration process + * and can not be modified. + * + * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setRegistrationId($var) + { + GPBUtil::checkString($var, True); + $this->registration_id = $var; + + return $this; + } + + /** + * The service account to use in the connector when communicating with the + * cloud. + * + * Generated from protobuf field string service_account = 5; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account to use in the connector when communicating with the + * cloud. + * + * Generated from protobuf field string service_account = 5; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * + * Generated from protobuf field string version = 6; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version running in the DatacenterConnector. This is supplied by the OVA + * connector during the registration process and can not be modified. + * + * Generated from protobuf field string version = 6; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * + * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Output only. The communication channel between the datacenter connector and + * Google Cloud. + * + * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the DatacenterConnector, as determined by the health + * checks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\DatacenterConnector\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the Datacenter Connector in + * case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * + * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApplianceInfrastructureVersion() + { + return $this->appliance_infrastructure_version; + } + + /** + * Output only. Appliance OVA version. + * This is the OVA which is manually installed by the user and contains the + * infrastructure for the automatically updatable components on the appliance. + * + * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApplianceInfrastructureVersion($var) + { + GPBUtil::checkString($var, True); + $this->appliance_infrastructure_version = $var; + + return $this; + } + + /** + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * + * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApplianceSoftwareVersion() + { + return $this->appliance_software_version; + } + + /** + * Output only. Appliance last installed update bundle version. + * This is the version of the automatically updatable components on the + * appliance. + * + * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApplianceSoftwareVersion($var) + { + GPBUtil::checkString($var, True); + $this->appliance_software_version = $var; + + return $this; + } + + /** + * Output only. The available versions for updating this appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AvailableUpdates|null + */ + public function getAvailableVersions() + { + return $this->available_versions; + } + + public function hasAvailableVersions() + { + return isset($this->available_versions); + } + + public function clearAvailableVersions() + { + unset($this->available_versions); + } + + /** + * Output only. The available versions for updating this appliance. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AvailableUpdates $var + * @return $this + */ + public function setAvailableVersions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AvailableUpdates::class); + $this->available_versions = $var; + + return $this; + } + + /** + * Output only. The status of the current / last upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\UpgradeStatus|null + */ + public function getUpgradeStatus() + { + return $this->upgrade_status; + } + + public function hasUpgradeStatus() + { + return isset($this->upgrade_status); + } + + public function clearUpgradeStatus() + { + unset($this->upgrade_status); + } + + /** + * Output only. The status of the current / last upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\UpgradeStatus $var + * @return $this + */ + public function setUpgradeStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UpgradeStatus::class); + $this->upgrade_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php new file mode 100644 index 000000000000..836a87465021 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.DatacenterConnector.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The source was sampled by health checks and is not available. + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + /** + * The source is available but might not be usable yet due to unvalidated + * credentials or another reason. The credentials referred to are the ones + * to the Source. The error message will contain further details. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The source exists and its credentials were verified. + * + * Generated from protobuf enum ACTIVE = 4; + */ + const ACTIVE = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::OFFLINE => 'OFFLINE', + self::FAILED => 'FAILED', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\DatacenterConnector_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php new file mode 100644 index 000000000000..3a18f26d864c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest + */ +class DeleteDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The DatacenterConnector name. Please see + * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest + * + * @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 DatacenterConnector name. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DatacenterConnector name. + * + * 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 DatacenterConnector name. + * + * 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; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php new file mode 100644 index 000000000000..58ed1909db6e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteGroupRequest + */ +class DeleteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 Group name. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteGroupRequest + * + * @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 Group name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Group name. + * + * 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 Group name. + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php new file mode 100644 index 000000000000..d92845c4cd69 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.DeleteMigratingVmRequest + */ +class DeleteMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * 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 MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest + * + * @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 MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * 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 MigratingVm. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php new file mode 100644 index 000000000000..73363cfd5bc7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteSourceRequest + */ +class DeleteSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 Source name. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteSourceRequest + * + * @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 Source name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Source name. + * + * 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 Source name. + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php new file mode 100644 index 000000000000..d1c390849152 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteTargetProjectRequest + */ +class DeleteTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 TargetProject name. Please see + * {@see VmMigrationClient::targetProjectName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest + * + * @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 TargetProject name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The TargetProject name. + * + * 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 TargetProject name. + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php new file mode 100644 index 000000000000..8341c1a7702f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteUtilizationReportRequest + */ +class DeleteUtilizationReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 Utilization Report name. Please see + * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest + * + * @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 Utilization Report name. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Report name. + * + * 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 Utilization Report name. + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php new file mode 100644 index 000000000000..3ccec18360e1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php @@ -0,0 +1,120 @@ +google.cloud.vmmigration.v1.FetchInventoryRequest + */ +class FetchInventoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Source. + * + * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source = ''; + /** + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * + * Generated from protobuf field bool force_refresh = 2; + */ + protected $force_refresh = false; + + /** + * @param string $source Required. The name of the Source. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\FetchInventoryRequest + * + * @experimental + */ + public static function build(string $source): self + { + return (new self()) + ->setSource($source); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * Required. The name of the Source. + * @type bool $force_refresh + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Source. + * + * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Required. The name of the Source. + * + * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * + * Generated from protobuf field bool force_refresh = 2; + * @return bool + */ + public function getForceRefresh() + { + return $this->force_refresh; + } + + /** + * If this flag is set to true, the source will be queried instead of using + * cached results. Using this flag will make the call slower. + * + * Generated from protobuf field bool force_refresh = 2; + * @param bool $var + * @return $this + */ + public function setForceRefresh($var) + { + GPBUtil::checkBool($var); + $this->force_refresh = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php new file mode 100644 index 000000000000..ce1bdac4c8c1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php @@ -0,0 +1,157 @@ +google.cloud.vmmigration.v1.FetchInventoryResponse + */ +class FetchInventoryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $SourceVms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\VmwareVmsDetails $vmware_vms + * The description of the VMs in a Source of type Vmware. + * @type \Google\Cloud\VMMigration\V1\AwsVmsDetails $aws_vms + * The description of the VMs in a Source of type AWS. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The description of the VMs in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; + * @return \Google\Cloud\VMMigration\V1\VmwareVmsDetails|null + */ + public function getVmwareVms() + { + return $this->readOneof(1); + } + + public function hasVmwareVms() + { + return $this->hasOneof(1); + } + + /** + * The description of the VMs in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; + * @param \Google\Cloud\VMMigration\V1\VmwareVmsDetails $var + * @return $this + */ + public function setVmwareVms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmsDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The description of the VMs in a Source of type AWS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; + * @return \Google\Cloud\VMMigration\V1\AwsVmsDetails|null + */ + public function getAwsVms() + { + return $this->readOneof(3); + } + + public function hasAwsVms() + { + return $this->hasOneof(3); + } + + /** + * The description of the VMs in a Source of type AWS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; + * @param \Google\Cloud\VMMigration\V1\AwsVmsDetails $var + * @return $this + */ + public function setAwsVms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsVmsDetails::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 when the source was last queried (if the result + * is from the cache). + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 getSourceVms() + { + return $this->whichOneof("SourceVms"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php new file mode 100644 index 000000000000..d71b82ccb9b5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.FinalizeMigrationRequest + */ +class FinalizeMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $migratingVm Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\FinalizeMigrationRequest + * + * @experimental + */ + public static function build(string $migratingVm): self + { + return (new self()) + ->setMigratingVm($migratingVm); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php new file mode 100644 index 000000000000..bdfdb9430da7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.FinalizeMigrationResponse + */ +class FinalizeMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php new file mode 100644 index 000000000000..48dce1bf1c80 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetCloneJobRequest + */ +class GetCloneJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CloneJob. + * + * 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 CloneJob. Please see + * {@see VmMigrationClient::cloneJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetCloneJobRequest + * + * @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 CloneJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CloneJob. + * + * 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 CloneJob. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php new file mode 100644 index 000000000000..9d30019287a5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetCutoverJobRequest + */ +class GetCutoverJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the CutoverJob. + * + * 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 CutoverJob. Please see + * {@see VmMigrationClient::cutoverJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetCutoverJobRequest + * + * @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 CutoverJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the CutoverJob. + * + * 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 CutoverJob. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php new file mode 100644 index 000000000000..7aa5823e702a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetDatacenterConnectorRequest + */ +class GetDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DatacenterConnector. + * + * 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 DatacenterConnector. Please see + * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest + * + * @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 DatacenterConnector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DatacenterConnector. + * + * 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 DatacenterConnector. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php new file mode 100644 index 000000000000..fbf5c771c2d6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The group name. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetGroupRequest + * + * @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 group name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group name. + * + * 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 group name. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php new file mode 100644 index 000000000000..3e59f540c798 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.GetMigratingVmRequest + */ +class GetMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The level of details of the migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetMigratingVmRequest + * + * @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 MigratingVm. + * @type int $view + * Optional. The level of details of the migrating VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * 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 MigratingVm. + * + * 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 level of details of the migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of the migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php new file mode 100644 index 000000000000..c86a34b32a7b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetReplicationCycleRequest + */ +class GetReplicationCycleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the ReplicationCycle. + * + * 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 ReplicationCycle. Please see + * {@see VmMigrationClient::replicationCycleName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetReplicationCycleRequest + * + * @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 ReplicationCycle. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the ReplicationCycle. + * + * 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 ReplicationCycle. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php new file mode 100644 index 000000000000..28346a94ac29 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetSourceRequest + */ +class GetSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Source name. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetSourceRequest + * + * @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 Source name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Source name. + * + * 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 Source name. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php new file mode 100644 index 000000000000..244edd28be21 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetTargetProjectRequest + */ +class GetTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The TargetProject name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The TargetProject name. Please see + * {@see VmMigrationClient::targetProjectName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetTargetProjectRequest + * + * @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 TargetProject name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The TargetProject name. + * + * 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 TargetProject name. + * + * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php new file mode 100644 index 000000000000..eb7bac23ec7d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php @@ -0,0 +1,119 @@ +google.cloud.vmmigration.v1.GetUtilizationReportRequest + */ +class GetUtilizationReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Report name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The level of details of the report. + * Defaults to FULL + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The Utilization Report name. Please see + * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetUtilizationReportRequest + * + * @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 Utilization Report name. + * @type int $view + * Optional. The level of details of the report. + * Defaults to FULL + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Report name. + * + * 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 Utilization Report name. + * + * 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 level of details of the report. + * Defaults to FULL + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of the report. + * Defaults to FULL + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php new file mode 100644 index 000000000000..ea661a9c1fef --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php @@ -0,0 +1,224 @@ +google.cloud.vmmigration.v1.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time 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 time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-provided description of the group. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Display name is a user defined name for this group which can be updated. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The Group name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time timestamp. + * @type string $description + * User-provided description of the group. + * @type string $display_name + * Display name is a user defined name for this group which can be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Group name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The Group name. + * + * 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 time 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 time 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 time 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 time 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; + } + + /** + * User-provided description of the group. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the group. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Display name is a user defined name for this group which can be updated. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name is a user defined name for this group which can be updated. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php new file mode 100644 index 000000000000..d25d4156a11d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.InitializingReplicationStep + */ +class InitializingReplicationStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php new file mode 100644 index 000000000000..d4b0ac54435f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.InstantiatingMigratedVMStep + */ +class InstantiatingMigratedVMStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php new file mode 100644 index 000000000000..3d8d4efa2f3e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListCloneJobsRequest + */ +class ListCloneJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of source VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. 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; + /** + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of source VMs. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListCloneJobsRequest + * + * @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 source VMs. + * @type int $page_size + * Optional. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of source VMs. + * + * 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 source VMs. + * + * 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 maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. 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. The maximum number of clone jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 clone jobs will + * be returned. 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; + } + + /** + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListCloneJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCloneJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php new file mode 100644 index 000000000000..5c89b1f50d7c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListCloneJobsResponse + */ +class ListCloneJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of clone jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $clone_jobs; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $clone_jobs + * Output only. The list of clone jobs response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of clone jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCloneJobs() + { + return $this->clone_jobs; + } + + /** + * Output only. The list of clone jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCloneJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); + $this->clone_jobs = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php new file mode 100644 index 000000000000..07b28f2c7d31 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListCutoverJobsRequest + */ +class ListCutoverJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of migrating VMs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. 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; + /** + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of migrating VMs. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListCutoverJobsRequest + * + * @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 migrating VMs. + * @type int $page_size + * Optional. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. The maximum value is 1000; values above 1000 will be coerced + * to 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of migrating VMs. + * + * 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 migrating VMs. + * + * 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 maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. 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. The maximum number of cutover jobs to return. The service may + * return fewer than this value. If unspecified, at most 500 cutover jobs will + * be returned. 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; + } + + /** + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListCutoverJobs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCutoverJobs` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php new file mode 100644 index 000000000000..0eb0adebbb36 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListCutoverJobsResponse + */ +class ListCutoverJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of cutover jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cutover_jobs; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $cutover_jobs + * Output only. The list of cutover jobs response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of cutover jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCutoverJobs() + { + return $this->cutover_jobs; + } + + /** + * Output only. The list of cutover jobs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCutoverJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); + $this->cutover_jobs = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php new file mode 100644 index 000000000000..ec0686fe621f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php @@ -0,0 +1,245 @@ +google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest + */ +class ListDatacenterConnectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of connectors. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. 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; + /** + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of connectors. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest + * + * @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 connectors. + * @type int $page_size + * Optional. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of connectors. + * + * 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 connectors. + * + * 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 maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. 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. The maximum number of connectors to return. The service may + * return fewer than this value. If unspecified, at most 500 sources will be + * returned. 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; + } + + /** + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListDatacenterConnectors` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDatacenterConnectors` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php new file mode 100644 index 000000000000..8aa1c27e3113 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListDatacenterConnectorsResponse + */ +class ListDatacenterConnectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $datacenter_connectors; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $datacenter_connectors + * Output only. The list of sources response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatacenterConnectors() + { + return $this->datacenter_connectors; + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatacenterConnectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); + $this->datacenter_connectors = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php new file mode 100644 index 000000000000..11b8be3b9a9b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListGroupsRequest + */ +class ListGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of groups. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. 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; + /** + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of groups. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListGroupsRequest + * + * @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 groups. + * @type int $page_size + * Optional. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of groups. + * + * 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 groups. + * + * 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 maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. 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. The maximum number of groups to return. The service may return + * fewer than this value. If unspecified, at most 500 groups will be + * returned. 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; + } + + /** + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php new file mode 100644 index 000000000000..3296fe31b740 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListGroupsResponse + */ +class ListGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of groups response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $groups; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups + * Output only. The list of groups response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of groups response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroups() + { + return $this->groups; + } + + /** + * Output only. The list of groups response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Group::class); + $this->groups = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php new file mode 100644 index 000000000000..51052e3a9534 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php @@ -0,0 +1,275 @@ +google.cloud.vmmigration.v1.ListMigratingVmsRequest + */ +class ListMigratingVmsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of MigratingVms. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. 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; + /** + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The level of details of each migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. The parent, which owns this collection of MigratingVms. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListMigratingVmsRequest + * + * @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 MigratingVms. + * @type int $page_size + * Optional. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * @type int $view + * Optional. The level of details of each migrating VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of MigratingVms. + * + * 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 MigratingVms. + * + * 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 maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. 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. The maximum number of migrating VMs to return. The service may + * return fewer than this value. If unspecified, at most 500 migrating VMs + * will be returned. 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; + } + + /** + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListMigratingVms` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigratingVms` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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 level of details of each migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of each migrating VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php new file mode 100644 index 000000000000..3f42ab8737dc --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListMigratingVmsResponse + */ +class ListMigratingVmsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of Migrating VMs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $migrating_vms; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $migrating_vms + * Output only. The list of Migrating VMs response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of Migrating VMs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMigratingVms() + { + return $this->migrating_vms; + } + + /** + * Output only. The list of Migrating VMs response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMigratingVms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigratingVm::class); + $this->migrating_vms = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php new file mode 100644 index 000000000000..816d448a57c1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListReplicationCyclesRequest + */ +class ListReplicationCyclesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of ReplicationCycles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of ReplicationCycles. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest + * + * @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 ReplicationCycles. + * @type int $page_size + * Optional. The maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * @type string $page_token + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of ReplicationCycles. + * + * 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 ReplicationCycles. + * + * 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 maximum number of replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * + * 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 replication cycles to return. The service + * may return fewer than this value. If unspecified, at most 100 migrating VMs + * will be returned. The maximum value is 100; values above 100 will be + * coerced to 100. + * + * 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; + } + + /** + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListReplicationCycles` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListReplicationCycles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php new file mode 100644 index 000000000000..2e8b8b96042f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListReplicationCyclesResponse + */ +class ListReplicationCyclesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of replication cycles response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $replication_cycles; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $replication_cycles + * Output only. The list of replication cycles response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of replication cycles response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicationCycles() + { + return $this->replication_cycles; + } + + /** + * Output only. The list of replication cycles response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicationCycles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->replication_cycles = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php new file mode 100644 index 000000000000..8286f34c3e6c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListSourcesRequest + */ +class ListSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of sources. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. 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; + /** + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of sources. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListSourcesRequest + * + * @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 sources. + * @type int $page_size + * Optional. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of sources. + * + * 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 sources. + * + * 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 maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. 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. The maximum number of sources to return. The service may return + * fewer than this value. If unspecified, at most 500 sources will be + * returned. 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; + } + + /** + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListSources` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSources` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php new file mode 100644 index 000000000000..413cd7b0d15d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListSourcesResponse + */ +class ListSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sources; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources + * Output only. The list of sources response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Output only. The list of sources response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php new file mode 100644 index 000000000000..82fa22a9be68 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.ListTargetProjectsRequest + */ +class ListTargetProjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of targets. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. 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; + /** + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of targets. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListTargetProjectsRequest + * + * @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 targets. + * @type int $page_size + * Optional. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of targets. + * + * 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 targets. + * + * 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 maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. 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. The maximum number of targets to return. The service may return + * fewer than this value. If unspecified, at most 500 targets will be + * returned. 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; + } + + /** + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListTargets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTargets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php new file mode 100644 index 000000000000..a51c7c607f95 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListTargetProjectsResponse + */ +class ListTargetProjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $target_projects; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $target_projects + * Output only. The list of target response. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetProjects() + { + return $this->target_projects; + } + + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\TargetProject::class); + $this->target_projects = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php new file mode 100644 index 000000000000..a1b2d9ef827f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php @@ -0,0 +1,279 @@ +google.cloud.vmmigration.v1.ListUtilizationReportsRequest + */ +class ListUtilizationReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Utilization Reports parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The level of details of each report. + * Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + /** + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $page_token = ''; + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. the order by fields for the result. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The Utilization Reports parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest + * + * @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 Utilization Reports parent. + * @type int $view + * Optional. The level of details of each report. + * Defaults to BASIC. + * @type int $page_size + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request. + * @type string $order_by + * Optional. the order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Utilization Reports 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. The Utilization Reports 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; + } + + /** + * Optional. The level of details of each report. + * Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of each report. + * Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); + $this->view = $var; + + return $this; + } + + /** + * Optional. The maximum number of reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * 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 reports to return. The service may return + * fewer than this value. If unspecified, at most 500 reports will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * 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; + } + + /** + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Required. A page token, received from a previous `ListUtilizationReports` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUtilizationReports` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter request. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request. + * + * 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. the order by fields for the result. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. the order by fields for the result. + * + * 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; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php new file mode 100644 index 000000000000..a82c22f473b4 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListUtilizationReportsResponse + */ +class ListUtilizationReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of reports. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $utilization_reports; + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $utilization_reports + * Output only. The list of reports. + * @type string $next_page_token + * Output only. A token, which can be sent as `page_token` to retrieve the + * next page. If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Output only. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of reports. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUtilizationReports() + { + return $this->utilization_reports; + } + + /** + * Output only. The list of reports. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUtilizationReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\UtilizationReport::class); + $this->utilization_reports = $arr; + + return $this; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php new file mode 100644 index 000000000000..a86771ba3c43 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php @@ -0,0 +1,796 @@ +google.cloud.vmmigration.v1.MigratingVm + */ +class MigratingVm extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The identifier of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * + * Generated from protobuf field string source_vm_id = 2; + */ + protected $source_vm_id = ''; + /** + * The display name attached to the MigratingVm by the user. + * + * Generated from protobuf field string display_name = 18; + */ + protected $display_name = ''; + /** + * The description attached to the migrating VM by the user. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The replication schedule policy. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; + */ + protected $policy = null; + /** + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the migrating VM resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The most updated snapshot created time in the source that + * finished replication. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_sync = null; + /** + * Output only. State of the MigratingVm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The last time the migrating VM state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. The percentage progress of the current running replication + * cycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $current_sync_info = null; + /** + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * + * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * The labels of the migrating VM. + * + * Generated from protobuf field map labels = 16; + */ + private $labels; + /** + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recent_clone_jobs; + /** + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * + * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recent_cutover_jobs; + protected $target_vm_defaults; + protected $source_vm_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $compute_engine_target_defaults + * Details of the target VM in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details + * Output only. Details of the VM from an AWS source. + * @type string $name + * Output only. The identifier of the MigratingVm. + * @type string $source_vm_id + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * @type string $display_name + * The display name attached to the MigratingVm by the user. + * @type string $description + * The description attached to the migrating VM by the user. + * @type \Google\Cloud\VMMigration\V1\SchedulePolicy $policy + * The replication schedule policy. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the migrating VM resource was updated. + * @type \Google\Cloud\VMMigration\V1\ReplicationSync $last_sync + * Output only. The most updated snapshot created time in the source that + * finished replication. + * @type int $state + * Output only. State of the MigratingVm. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The last time the migrating VM state was updated. + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $current_sync_info + * Output only. The percentage progress of the current running replication + * cycle. + * @type string $group + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels of the migrating VM. + * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $recent_clone_jobs + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $recent_cutover_jobs + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults|null + */ + public function getComputeEngineTargetDefaults() + { + return $this->readOneof(26); + } + + public function hasComputeEngineTargetDefaults() + { + return $this->hasOneof(26); + } + + /** + * Details of the target VM in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $var + * @return $this + */ + public function setComputeEngineTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Output only. Details of the VM from an AWS source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AwsSourceVmDetails|null + */ + public function getAwsSourceVmDetails() + { + return $this->readOneof(29); + } + + public function hasAwsSourceVmDetails() + { + return $this->hasOneof(29); + } + + /** + * Output only. Details of the VM from an AWS source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $var + * @return $this + */ + public function setAwsSourceVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Output only. The identifier of the MigratingVm. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The identifier of the MigratingVm. + * + * 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 unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * + * Generated from protobuf field string source_vm_id = 2; + * @return string + */ + public function getSourceVmId() + { + return $this->source_vm_id; + } + + /** + * The unique ID of the VM in the source. + * The VM's name in vSphere can be changed, so this is not the VM's name but + * rather its moRef id. This id is of the form vm-. + * + * Generated from protobuf field string source_vm_id = 2; + * @param string $var + * @return $this + */ + public function setSourceVmId($var) + { + GPBUtil::checkString($var, True); + $this->source_vm_id = $var; + + return $this; + } + + /** + * The display name attached to the MigratingVm by the user. + * + * Generated from protobuf field string display_name = 18; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name attached to the MigratingVm by the user. + * + * Generated from protobuf field string display_name = 18; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The description attached to the migrating VM by the user. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description attached to the migrating VM by the user. + * + * 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; + } + + /** + * The replication schedule policy. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; + * @return \Google\Cloud\VMMigration\V1\SchedulePolicy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * The replication schedule policy. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; + * @param \Google\Cloud\VMMigration\V1\SchedulePolicy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\SchedulePolicy::class); + $this->policy = $var; + + return $this; + } + + /** + * Output only. The time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * + * 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 time the migrating VM was created (this refers to this + * resource and not to the time it was installed in the source). + * + * 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 time the migrating VM resource was updated. + * + * 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 time the migrating VM resource was updated. + * + * 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; + } + + /** + * Output only. The most updated snapshot created time in the source that + * finished replication. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ReplicationSync|null + */ + public function getLastSync() + { + return $this->last_sync; + } + + public function hasLastSync() + { + return isset($this->last_sync); + } + + public function clearLastSync() + { + unset($this->last_sync); + } + + /** + * Output only. The most updated snapshot created time in the source that + * finished replication. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ReplicationSync $var + * @return $this + */ + public function setLastSync($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationSync::class); + $this->last_sync = $var; + + return $this; + } + + /** + * Output only. State of the MigratingVm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the MigratingVm. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVm\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The last time the migrating VM state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The last time the migrating VM state was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. The percentage progress of the current running replication + * cycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getCurrentSyncInfo() + { + return $this->current_sync_info; + } + + public function hasCurrentSyncInfo() + { + return isset($this->current_sync_info); + } + + public function clearCurrentSyncInfo() + { + unset($this->current_sync_info); + } + + /** + * Output only. The percentage progress of the current running replication + * cycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setCurrentSyncInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->current_sync_info = $var; + + return $this; + } + + /** + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * + * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Output only. The group this migrating vm is included in, if any. The group + * is represented by the full path of the appropriate + * [Group][google.cloud.vmmigration.v1.Group] resource. + * + * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * The labels of the migrating VM. + * + * Generated from protobuf field map labels = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels of the migrating VM. + * + * Generated from protobuf field map labels = 16; + * @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. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentCloneJobs() + { + return $this->recent_clone_jobs; + } + + /** + * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] + * performed on the migrating VM. This field holds the vm's last completed + * clone job and the vm's running clone job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentCloneJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); + $this->recent_clone_jobs = $arr; + + return $this; + } + + /** + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * + * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the Migrating VM in case of + * an error in replication. + * + * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentCutoverJobs() + { + return $this->recent_cutover_jobs; + } + + /** + * Output only. The recent cutover jobs performed on the migrating VM. + * This field holds the vm's last completed cutover job and the vm's + * running cutover job, if one exists. + * Note: To have this field populated you need to explicitly request it via + * the "view" parameter of the Get/List request. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentCutoverJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); + $this->recent_cutover_jobs = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetVmDefaults() + { + return $this->whichOneof("target_vm_defaults"); + } + + /** + * @return string + */ + public function getSourceVmDetails() + { + return $this->whichOneof("source_vm_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php new file mode 100644 index 000000000000..1677e69889d1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php @@ -0,0 +1,133 @@ +google.cloud.vmmigration.v1.MigratingVm.State + */ +class State +{ + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The VM in the source is being verified. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The source VM was verified, and it's ready to start replication. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Migration is going through the first sync cycle. + * + * Generated from protobuf enum FIRST_SYNC = 3; + */ + const FIRST_SYNC = 3; + /** + * The replication is active, and it's running or scheduled to run. + * + * Generated from protobuf enum ACTIVE = 4; + */ + const ACTIVE = 4; + /** + * The source VM is being turned off, and a final replication is currently + * running. + * + * Generated from protobuf enum CUTTING_OVER = 7; + */ + const CUTTING_OVER = 7; + /** + * The source VM was stopped and replicated. The replication is currently + * paused. + * + * Generated from protobuf enum CUTOVER = 8; + */ + const CUTOVER = 8; + /** + * A cutover job is active and replication cycle is running the final sync. + * + * Generated from protobuf enum FINAL_SYNC = 9; + */ + const FINAL_SYNC = 9; + /** + * The replication was paused by the user and no cycles are scheduled to + * run. + * + * Generated from protobuf enum PAUSED = 10; + */ + const PAUSED = 10; + /** + * The migrating VM is being finalized and migration resources are being + * removed. + * + * Generated from protobuf enum FINALIZING = 11; + */ + const FINALIZING = 11; + /** + * The replication process is done. The migrating VM is finalized and no + * longer consumes billable resources. + * + * Generated from protobuf enum FINALIZED = 12; + */ + const FINALIZED = 12; + /** + * The replication process encountered an unrecoverable error and was + * aborted. + * + * Generated from protobuf enum ERROR = 13; + */ + const ERROR = 13; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::READY => 'READY', + self::FIRST_SYNC => 'FIRST_SYNC', + self::ACTIVE => 'ACTIVE', + self::CUTTING_OVER => 'CUTTING_OVER', + self::CUTOVER => 'CUTOVER', + self::FINAL_SYNC => 'FINAL_SYNC', + self::PAUSED => 'PAUSED', + self::FINALIZING => 'FINALIZING', + self::FINALIZED => 'FINALIZED', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\MigratingVm_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php new file mode 100644 index 000000000000..b856588e1ba6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php @@ -0,0 +1,63 @@ +google.cloud.vmmigration.v1.MigratingVmView + */ +class MigratingVmView +{ + /** + * View is unspecified. The API will fallback to the default value. + * + * Generated from protobuf enum MIGRATING_VM_VIEW_UNSPECIFIED = 0; + */ + const MIGRATING_VM_VIEW_UNSPECIFIED = 0; + /** + * Get the migrating VM basic details. + * The basic details do not include the recent clone jobs and recent cutover + * jobs lists. + * + * Generated from protobuf enum MIGRATING_VM_VIEW_BASIC = 1; + */ + const MIGRATING_VM_VIEW_BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum MIGRATING_VM_VIEW_FULL = 2; + */ + const MIGRATING_VM_VIEW_FULL = 2; + + private static $valueToName = [ + self::MIGRATING_VM_VIEW_UNSPECIFIED => 'MIGRATING_VM_VIEW_UNSPECIFIED', + self::MIGRATING_VM_VIEW_BASIC => 'MIGRATING_VM_VIEW_BASIC', + self::MIGRATING_VM_VIEW_FULL => 'MIGRATING_VM_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php new file mode 100644 index 000000000000..55181c0327d9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php @@ -0,0 +1,239 @@ +google.cloud.vmmigration.v1.MigrationError + */ +class MigrationError extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The error code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + /** + * Output only. The localized error message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_message = null; + /** + * Output only. Suggested action for solving the error. + * + * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $action_item = null; + /** + * Output only. URL(s) pointing to additional information on handling the + * current error. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $help_links; + /** + * Output only. The time the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. The error code. + * @type \Google\Rpc\LocalizedMessage $error_message + * Output only. The localized error message. + * @type \Google\Rpc\LocalizedMessage $action_item + * Output only. Suggested action for solving the error. + * @type array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $help_links + * Output only. URL(s) pointing to additional information on handling the + * current error. + * @type \Google\Protobuf\Timestamp $error_time + * Output only. The time the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The error code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. The error code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigrationError\ErrorCode::class); + $this->code = $var; + + return $this; + } + + /** + * Output only. The localized error message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\LocalizedMessage|null + */ + public function getErrorMessage() + { + return $this->error_message; + } + + public function hasErrorMessage() + { + return isset($this->error_message); + } + + public function clearErrorMessage() + { + unset($this->error_message); + } + + /** + * Output only. The localized error message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\LocalizedMessage $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); + $this->error_message = $var; + + return $this; + } + + /** + * Output only. Suggested action for solving the error. + * + * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\LocalizedMessage|null + */ + public function getActionItem() + { + return $this->action_item; + } + + public function hasActionItem() + { + return isset($this->action_item); + } + + public function clearActionItem() + { + unset($this->action_item); + } + + /** + * Output only. Suggested action for solving the error. + * + * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\LocalizedMessage $var + * @return $this + */ + public function setActionItem($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); + $this->action_item = $var; + + return $this; + } + + /** + * Output only. URL(s) pointing to additional information on handling the + * current error. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHelpLinks() + { + return $this->help_links; + } + + /** + * Output only. URL(s) pointing to additional information on handling the + * current error. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHelpLinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Help\Link::class); + $this->help_links = $arr; + + return $this; + } + + /** + * Output only. The time the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getErrorTime() + { + return $this->error_time; + } + + public function hasErrorTime() + { + return isset($this->error_time); + } + + public function clearErrorTime() + { + unset($this->error_time); + } + + /** + * Output only. The time the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setErrorTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->error_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php new file mode 100644 index 000000000000..b7f0736328fd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.MigrationError.ErrorCode + */ +class ErrorCode +{ + /** + * Default value. This value is not used. + * + * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; + */ + const ERROR_CODE_UNSPECIFIED = 0; + /** + * Migrate for Compute encountered an unknown error. + * + * Generated from protobuf enum UNKNOWN_ERROR = 1; + */ + const UNKNOWN_ERROR = 1; + /** + * Migrate for Compute encountered an error while validating replication + * source health. + * + * Generated from protobuf enum SOURCE_VALIDATION_ERROR = 2; + */ + const SOURCE_VALIDATION_ERROR = 2; + /** + * Migrate for Compute encountered an error during source data operation. + * + * Generated from protobuf enum SOURCE_REPLICATION_ERROR = 3; + */ + const SOURCE_REPLICATION_ERROR = 3; + /** + * Migrate for Compute encountered an error during target data operation. + * + * Generated from protobuf enum TARGET_REPLICATION_ERROR = 4; + */ + const TARGET_REPLICATION_ERROR = 4; + /** + * Migrate for Compute encountered an error during OS adaptation. + * + * Generated from protobuf enum OS_ADAPTATION_ERROR = 5; + */ + const OS_ADAPTATION_ERROR = 5; + /** + * Migrate for Compute encountered an error in clone operation. + * + * Generated from protobuf enum CLONE_ERROR = 6; + */ + const CLONE_ERROR = 6; + /** + * Migrate for Compute encountered an error in cutover operation. + * + * Generated from protobuf enum CUTOVER_ERROR = 7; + */ + const CUTOVER_ERROR = 7; + /** + * Migrate for Compute encountered an error during utilization report + * creation. + * + * Generated from protobuf enum UTILIZATION_REPORT_ERROR = 8; + */ + const UTILIZATION_REPORT_ERROR = 8; + /** + * Migrate for Compute encountered an error during appliance upgrade. + * + * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; + */ + const APPLIANCE_UPGRADE_ERROR = 9; + + private static $valueToName = [ + self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', + self::UNKNOWN_ERROR => 'UNKNOWN_ERROR', + self::SOURCE_VALIDATION_ERROR => 'SOURCE_VALIDATION_ERROR', + self::SOURCE_REPLICATION_ERROR => 'SOURCE_REPLICATION_ERROR', + self::TARGET_REPLICATION_ERROR => 'TARGET_REPLICATION_ERROR', + self::OS_ADAPTATION_ERROR => 'OS_ADAPTATION_ERROR', + self::CLONE_ERROR => 'CLONE_ERROR', + self::CUTOVER_ERROR => 'CUTOVER_ERROR', + self::UTILIZATION_REPORT_ERROR => 'UTILIZATION_REPORT_ERROR', + self::APPLIANCE_UPGRADE_ERROR => 'APPLIANCE_UPGRADE_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ErrorCode::class, \Google\Cloud\VMMigration\V1\MigrationError_ErrorCode::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php new file mode 100644 index 000000000000..e70ad652db3a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php @@ -0,0 +1,177 @@ +google.cloud.vmmigration.v1.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * The network to connect the NIC to. + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2; + */ + protected $subnetwork = ''; + /** + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * + * Generated from protobuf field string internal_ip = 3; + */ + protected $internal_ip = ''; + /** + * The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4; + */ + protected $external_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The network to connect the NIC to. + * @type string $subnetwork + * The subnetwork to connect the NIC to. + * @type string $internal_ip + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * @type string $external_ip + * The external IP to define in the NIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The network to connect the NIC to. + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The network to connect the NIC to. + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * + * Generated from protobuf field string internal_ip = 3; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * The internal IP to define in the NIC. + * The formats accepted are: `ephemeral` \ ipv4 address \ a named address + * resource full path. + * + * Generated from protobuf field string internal_ip = 3; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php new file mode 100644 index 000000000000..3174fc524175 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.vmmigration.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\Vmmigration\V1\Vmmigration::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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php new file mode 100644 index 000000000000..bd578e77b383 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.PauseMigrationRequest + */ +class PauseMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php new file mode 100644 index 000000000000..943c6192f115 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.PauseMigrationResponse + */ +class PauseMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php new file mode 100644 index 000000000000..6fea26e74280 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.PostProcessingStep + */ +class PostProcessingStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php new file mode 100644 index 000000000000..1fd2f8bc8cae --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.PreparingVMDisksStep + */ +class PreparingVMDisksStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php new file mode 100644 index 000000000000..5aa1a199ff07 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php @@ -0,0 +1,115 @@ +google.cloud.vmmigration.v1.RemoveGroupMigrationRequest + */ +class RemoveGroupMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * The MigratingVm to remove. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $group Required. The name of the Group. Please see + * {@see VmMigrationClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest + * + * @experimental + */ + public static function build(string $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. The name of the Group. + * @type string $migrating_vm + * The MigratingVm to remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. The name of the Group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * The MigratingVm to remove. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * The MigratingVm to remove. + * + * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php new file mode 100644 index 000000000000..76fe02aad40a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.RemoveGroupMigrationResponse + */ +class RemoveGroupMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php new file mode 100644 index 000000000000..c0191fc596f3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php @@ -0,0 +1,177 @@ +google.cloud.vmmigration.v1.ReplicatingStep + */ +class ReplicatingStep extends \Google\Protobuf\Internal\Message +{ + /** + * Total bytes to be handled in the step. + * + * Generated from protobuf field int64 total_bytes = 1; + */ + protected $total_bytes = 0; + /** + * Replicated bytes in the step. + * + * Generated from protobuf field int64 replicated_bytes = 2; + */ + protected $replicated_bytes = 0; + /** + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; + */ + protected $last_two_minutes_average_bytes_per_second = 0; + /** + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; + */ + protected $last_thirty_minutes_average_bytes_per_second = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $total_bytes + * Total bytes to be handled in the step. + * @type int|string $replicated_bytes + * Replicated bytes in the step. + * @type int|string $last_two_minutes_average_bytes_per_second + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * @type int|string $last_thirty_minutes_average_bytes_per_second + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Total bytes to be handled in the step. + * + * Generated from protobuf field int64 total_bytes = 1; + * @return int|string + */ + public function getTotalBytes() + { + return $this->total_bytes; + } + + /** + * Total bytes to be handled in the step. + * + * Generated from protobuf field int64 total_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setTotalBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_bytes = $var; + + return $this; + } + + /** + * Replicated bytes in the step. + * + * Generated from protobuf field int64 replicated_bytes = 2; + * @return int|string + */ + public function getReplicatedBytes() + { + return $this->replicated_bytes; + } + + /** + * Replicated bytes in the step. + * + * Generated from protobuf field int64 replicated_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setReplicatedBytes($var) + { + GPBUtil::checkInt64($var); + $this->replicated_bytes = $var; + + return $this; + } + + /** + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; + * @return int|string + */ + public function getLastTwoMinutesAverageBytesPerSecond() + { + return $this->last_two_minutes_average_bytes_per_second; + } + + /** + * The source disks replication rate for the last 2 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; + * @param int|string $var + * @return $this + */ + public function setLastTwoMinutesAverageBytesPerSecond($var) + { + GPBUtil::checkInt64($var); + $this->last_two_minutes_average_bytes_per_second = $var; + + return $this; + } + + /** + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; + * @return int|string + */ + public function getLastThirtyMinutesAverageBytesPerSecond() + { + return $this->last_thirty_minutes_average_bytes_per_second; + } + + /** + * The source disks replication rate for the last 30 minutes in bytes per + * second. + * + * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; + * @param int|string $var + * @return $this + */ + public function setLastThirtyMinutesAverageBytesPerSecond($var) + { + GPBUtil::checkInt64($var); + $this->last_thirty_minutes_average_bytes_per_second = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php new file mode 100644 index 000000000000..54c3bf4c6ee3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php @@ -0,0 +1,393 @@ +google.cloud.vmmigration.v1.ReplicationCycle + */ +class ReplicationCycle extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the ReplicationCycle. + * + * Generated from protobuf field string name = 13; + */ + protected $name = ''; + /** + * The cycle's ordinal number. + * + * Generated from protobuf field int32 cycle_number = 10; + */ + protected $cycle_number = 0; + /** + * The time the replication cycle has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the replication cycle has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + /** + * The accumulated duration the replication cycle was paused. + * + * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; + */ + protected $total_pause_duration = null; + /** + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * + * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; + * @deprecated + */ + protected $progress_percent = 0; + /** + * The cycle's steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; + */ + private $steps; + /** + * State of the ReplicationCycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; + */ + protected $state = 0; + /** + * Provides details on the state of the cycle in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 12; + */ + protected $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The identifier of the ReplicationCycle. + * @type int $cycle_number + * The cycle's ordinal number. + * @type \Google\Protobuf\Timestamp $start_time + * The time the replication cycle has started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the replication cycle has ended. + * @type \Google\Protobuf\Duration $total_pause_duration + * The accumulated duration the replication cycle was paused. + * @type int $progress_percent + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * @type array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $steps + * The cycle's steps list representing its progress. + * @type int $state + * State of the ReplicationCycle. + * @type \Google\Rpc\Status $error + * Provides details on the state of the cycle in case of an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the ReplicationCycle. + * + * Generated from protobuf field string name = 13; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The identifier of the ReplicationCycle. + * + * Generated from protobuf field string name = 13; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The cycle's ordinal number. + * + * Generated from protobuf field int32 cycle_number = 10; + * @return int + */ + public function getCycleNumber() + { + return $this->cycle_number; + } + + /** + * The cycle's ordinal number. + * + * Generated from protobuf field int32 cycle_number = 10; + * @param int $var + * @return $this + */ + public function setCycleNumber($var) + { + GPBUtil::checkInt32($var); + $this->cycle_number = $var; + + return $this; + } + + /** + * The time the replication cycle has 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 replication cycle has 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 replication cycle has ended. + * + * 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); + } + + /** + * The time the replication cycle has ended. + * + * 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; + } + + /** + * The accumulated duration the replication cycle was paused. + * + * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalPauseDuration() + { + return $this->total_pause_duration; + } + + public function hasTotalPauseDuration() + { + return isset($this->total_pause_duration); + } + + public function clearTotalPauseDuration() + { + unset($this->total_pause_duration); + } + + /** + * The accumulated duration the replication cycle was paused. + * + * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalPauseDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_pause_duration = $var; + + return $this; + } + + /** + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * + * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; + * @return int + * @deprecated + */ + public function getProgressPercent() + { + @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); + return $this->progress_percent; + } + + /** + * The current progress in percentage of this cycle. + * Was replaced by 'steps' field, which breaks down the cycle progression more + * accurately. + * + * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setProgressPercent($var) + { + @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + + /** + * The cycle's steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * The cycle's steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; + * @param array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CycleStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * State of the ReplicationCycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of the ReplicationCycle. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ReplicationCycle\State::class); + $this->state = $var; + + return $this; + } + + /** + * Provides details on the state of the cycle in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 12; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Provides details on the state of the cycle in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 12; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php new file mode 100644 index 000000000000..b4eb3dbe09e8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php @@ -0,0 +1,79 @@ +google.cloud.vmmigration.v1.ReplicationCycle.State + */ +class State +{ + /** + * The state is unknown. This is used for API compatibility only and is not + * used by the system. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The replication cycle is running. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The replication cycle is paused. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * The replication cycle finished with errors. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The replication cycle finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\ReplicationCycle_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php new file mode 100644 index 000000000000..5723d6e67f45 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.ReplicationSync + */ +class ReplicationSync extends \Google\Protobuf\Internal\Message +{ + /** + * The most updated snapshot created time in the source that finished + * replication. + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; + */ + protected $last_sync_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $last_sync_time + * The most updated snapshot created time in the source that finished + * replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The most updated snapshot created time in the source that finished + * replication. + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastSyncTime() + { + return $this->last_sync_time; + } + + public function hasLastSyncTime() + { + return isset($this->last_sync_time); + } + + public function clearLastSyncTime() + { + unset($this->last_sync_time); + } + + /** + * The most updated snapshot created time in the source that finished + * replication. + * + * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastSyncTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_sync_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php new file mode 100644 index 000000000000..b907eb8348b4 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.ResumeMigrationRequest + */ +class ResumeMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php new file mode 100644 index 000000000000..7f8969564462 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.ResumeMigrationResponse + */ +class ResumeMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php new file mode 100644 index 000000000000..0ef6fde8d9da --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php @@ -0,0 +1,119 @@ +google.cloud.vmmigration.v1.SchedulePolicy + */ +class SchedulePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The idle duration between replication stages. + * + * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; + */ + protected $idle_duration = null; + /** + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * + * Generated from protobuf field bool skip_os_adaptation = 2; + */ + protected $skip_os_adaptation = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $idle_duration + * The idle duration between replication stages. + * @type bool $skip_os_adaptation + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The idle duration between replication stages. + * + * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getIdleDuration() + { + return $this->idle_duration; + } + + public function hasIdleDuration() + { + return isset($this->idle_duration); + } + + public function clearIdleDuration() + { + unset($this->idle_duration); + } + + /** + * The idle duration between replication stages. + * + * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setIdleDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->idle_duration = $var; + + return $this; + } + + /** + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * + * Generated from protobuf field bool skip_os_adaptation = 2; + * @return bool + */ + public function getSkipOsAdaptation() + { + return $this->skip_os_adaptation; + } + + /** + * A flag to indicate whether to skip OS adaptation during the replication + * sync. OS adaptation is a process where the VM's operating system undergoes + * changes and adaptations to fully function on Compute Engine. + * + * Generated from protobuf field bool skip_os_adaptation = 2; + * @param bool $var + * @return $this + */ + public function setSkipOsAdaptation($var) + { + GPBUtil::checkBool($var); + $this->skip_os_adaptation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php new file mode 100644 index 000000000000..d66ecb3f057e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php @@ -0,0 +1,141 @@ +google.cloud.vmmigration.v1.SchedulingNodeAffinity + */ +class SchedulingNodeAffinity extends \Google\Protobuf\Internal\Message +{ + /** + * The label key of Node resource to reference. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The operator to use for the node resources specified in the `values` + * parameter. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; + */ + protected $operator = 0; + /** + * Corresponds to the label values of Node resource. + * + * Generated from protobuf field repeated string values = 3; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The label key of Node resource to reference. + * @type int $operator + * The operator to use for the node resources specified in the `values` + * parameter. + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * Corresponds to the label values of Node resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The label key of Node resource to reference. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The label key of Node resource to reference. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The operator to use for the node resources specified in the `values` + * parameter. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; + * @return int + */ + public function getOperator() + { + return $this->operator; + } + + /** + * The operator to use for the node resources specified in the `values` + * parameter. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; + * @param int $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity\Operator::class); + $this->operator = $var; + + return $this; + } + + /** + * Corresponds to the label values of Node resource. + * + * Generated from protobuf field repeated string values = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Corresponds to the label values of Node resource. + * + * Generated from protobuf field repeated string values = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php new file mode 100644 index 000000000000..ac3acae966da --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php @@ -0,0 +1,65 @@ +google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator + */ +class Operator +{ + /** + * An unknown, unexpected behavior. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The node resource group should be in these resources affinity. + * + * Generated from protobuf enum IN = 1; + */ + const IN = 1; + /** + * The node resource group should not be in these resources affinity. + * + * Generated from protobuf enum NOT_IN = 2; + */ + const NOT_IN = 2; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::IN => 'IN', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Operator::class, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity_Operator::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php new file mode 100644 index 000000000000..64c6ddafe8b3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.ShuttingDownSourceVMStep + */ +class ShuttingDownSourceVMStep extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php new file mode 100644 index 000000000000..ae1ab78c28ca --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php @@ -0,0 +1,299 @@ +google.cloud.vmmigration.v1.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time 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 time timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The labels of the source. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * User-provided description of the source. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + protected $source_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\VmwareSourceDetails $vmware + * Vmware type source details. + * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails $aws + * AWS type source details. + * @type string $name + * Output only. The Source name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels of the source. + * @type string $description + * User-provided description of the source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Vmware type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; + * @return \Google\Cloud\VMMigration\V1\VmwareSourceDetails|null + */ + public function getVmware() + { + return $this->readOneof(10); + } + + public function hasVmware() + { + return $this->hasOneof(10); + } + + /** + * Vmware type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; + * @param \Google\Cloud\VMMigration\V1\VmwareSourceDetails $var + * @return $this + */ + public function setVmware($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceDetails::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * AWS type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; + * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails|null + */ + public function getAws() + { + return $this->readOneof(12); + } + + public function hasAws() + { + return $this->hasOneof(12); + } + + /** + * AWS type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; + * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails $var + * @return $this + */ + public function setAws($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Output only. The Source name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The Source name. + * + * 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 time 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 time 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 time 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 time 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; + } + + /** + * The labels of the source. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels of the source. + * + * 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; + } + + /** + * User-provided description of the source. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description of the source. + * + * 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; + } + + /** + * @return string + */ + public function getSourceDetails() + { + return $this->whichOneof("source_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php new file mode 100644 index 000000000000..4e456d7c4f89 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.StartMigrationRequest + */ +class StartMigrationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $migrating_vm = ''; + + /** + * @param string $migratingVm Required. The name of the MigratingVm. Please see + * {@see VmMigrationClient::migratingVmName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\StartMigrationRequest + * + * @experimental + */ + public static function build(string $migratingVm): self + { + return (new self()) + ->setMigratingVm($migratingVm); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $migrating_vm + * Required. The name of the MigratingVm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + /** + * Required. The name of the MigratingVm. + * + * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkString($var, True); + $this->migrating_vm = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php new file mode 100644 index 000000000000..80c1997ca0cd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.StartMigrationResponse + */ +class StartMigrationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php new file mode 100644 index 000000000000..d19fb184997d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php @@ -0,0 +1,228 @@ +google.cloud.vmmigration.v1.TargetProject + */ +class TargetProject extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the target project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * The target project's description. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last time the target project resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the target project. + * @type string $project + * The target project ID (number) or project name. + * @type string $description + * The target project's description. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the target project resource was updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the target project. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the target project. + * + * 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 target project ID (number) or project name. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The target project's description. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The target project's description. + * + * 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 time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time this target project resource was created (not related + * to when the Compute Engine project it points to was created). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last time the target project resource was updated. + * + * 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 time the target project resource was updated. + * + * 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; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php new file mode 100644 index 000000000000..c3566d1bd515 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * Group 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; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\Group $group Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Group 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\VMMigration\V1\UpdateGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGroup($group) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Group 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\VMMigration\V1\Group $group + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Group 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; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Group 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; + * @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 update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php new file mode 100644 index 000000000000..4dc83e8dfef2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateMigratingVmRequest + */ +class UpdateMigratingVmRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm 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; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $migrating_vm = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * MigratingVm 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\VMMigration\V1\UpdateMigratingVmRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMigratingVm($migratingVm) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm 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\VMMigration\V1\MigratingVm $migrating_vm + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm 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; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * MigratingVm 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; + * @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 update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\MigratingVm|null + */ + public function getMigratingVm() + { + return $this->migrating_vm; + } + + public function hasMigratingVm() + { + return isset($this->migrating_vm); + } + + public function clearMigratingVm() + { + unset($this->migrating_vm); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\MigratingVm $var + * @return $this + */ + public function setMigratingVm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); + $this->migrating_vm = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php new file mode 100644 index 000000000000..6fedf6b84370 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateSourceRequest + */ +class UpdateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * Source 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; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\Source $source Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * Source 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\VMMigration\V1\UpdateSourceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\Source $source, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSource($source) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * Source 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\VMMigration\V1\Source $source + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Source 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; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * Source 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; + * @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 update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php new file mode 100644 index 000000000000..64f7eaec9709 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php @@ -0,0 +1,230 @@ +google.cloud.vmmigration.v1.UpdateTargetProjectRequest + */ +class UpdateTargetProjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Field mask is used to specify the fields to be overwritten in the + * TargetProject 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; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_project = null; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the + * TargetProject 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\VMMigration\V1\UpdateTargetProjectRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\TargetProject $targetProject, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTargetProject($targetProject) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask is used to specify the fields to be overwritten in the + * TargetProject 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\VMMigration\V1\TargetProject $target_project + * Required. The update request body. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * TargetProject 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; + * @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); + } + + /** + * Field mask is used to specify the fields to be overwritten in the + * TargetProject 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; + * @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 update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\TargetProject|null + */ + public function getTargetProject() + { + return $this->target_project; + } + + public function hasTargetProject() + { + return isset($this->target_project); + } + + public function clearTargetProject() + { + unset($this->target_project); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\TargetProject $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); + $this->target_project = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php new file mode 100644 index 000000000000..ceb9df3af2cf --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php @@ -0,0 +1,141 @@ +google.cloud.vmmigration.v1.UpgradeApplianceRequest + */ +class UpgradeApplianceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $datacenter_connector = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $datacenter_connector + * Required. The DatacenterConnector name. + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDatacenterConnector() + { + return $this->datacenter_connector; + } + + /** + * Required. The DatacenterConnector name. + * + * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatacenterConnector($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_connector = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, 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 t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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; + * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php new file mode 100644 index 000000000000..caff9fe4988f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.UpgradeApplianceResponse + */ +class UpgradeApplianceResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php new file mode 100644 index 000000000000..ed6bf097167b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php @@ -0,0 +1,223 @@ +google.cloud.vmmigration.v1.UpgradeStatus + */ +class UpgradeStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The version to upgrade to. + * + * Generated from protobuf field string version = 1; + */ + protected $version = ''; + /** + * The state of the upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; + */ + protected $state = 0; + /** + * Provides details on the state of the upgrade operation in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3; + */ + protected $error = null; + /** + * The time the operation was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * The version from which we upgraded. + * + * Generated from protobuf field string previous_version = 5; + */ + protected $previous_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $version + * The version to upgrade to. + * @type int $state + * The state of the upgradeAppliance operation. + * @type \Google\Rpc\Status $error + * Provides details on the state of the upgrade operation in case of an error. + * @type \Google\Protobuf\Timestamp $start_time + * The time the operation was started. + * @type string $previous_version + * The version from which we upgraded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The version to upgrade to. + * + * Generated from protobuf field string version = 1; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version to upgrade to. + * + * Generated from protobuf field string version = 1; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The state of the upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the upgradeAppliance operation. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UpgradeStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Provides details on the state of the upgrade operation in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Provides details on the state of the upgrade operation in case of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * The time the operation was started. + * + * 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); + } + + /** + * The time the operation was started. + * + * 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; + } + + /** + * The version from which we upgraded. + * + * Generated from protobuf field string previous_version = 5; + * @return string + */ + public function getPreviousVersion() + { + return $this->previous_version; + } + + /** + * The version from which we upgraded. + * + * Generated from protobuf field string previous_version = 5; + * @param string $var + * @return $this + */ + public function setPreviousVersion($var) + { + GPBUtil::checkString($var, True); + $this->previous_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php new file mode 100644 index 000000000000..d35e49d9ae63 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.UpgradeStatus.State + */ +class State +{ + /** + * The state was not sampled by the health checks yet. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The upgrade has started. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The upgrade failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The upgrade finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\UpgradeStatus_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php new file mode 100644 index 000000000000..322d7e9820a8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php @@ -0,0 +1,446 @@ +google.cloud.vmmigration.v1.UtilizationReport + */ +class UtilizationReport extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The report unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The report display name, as assigned by the user. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. Current state of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_time = null; + /** + * Output only. Provides details on the state of the report in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Time frame of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; + */ + protected $time_frame = 0; + /** + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * + * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $frame_end_time = null; + /** + * Output only. Total number of VMs included in the report. + * + * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_count = 0; + /** + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; + */ + private $vms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The report unique name. + * @type string $display_name + * The report display name, as assigned by the user. + * @type int $state + * Output only. Current state of the report. + * @type \Google\Protobuf\Timestamp $state_time + * Output only. The time the state was last set. + * @type \Google\Rpc\Status $error + * Output only. Provides details on the state of the report in case of an + * error. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * @type int $time_frame + * Time frame of the report. + * @type \Google\Protobuf\Timestamp $frame_end_time + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * @type int $vm_count + * Output only. Total number of VMs included in the report. + * @type array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $vms + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The report unique name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The report unique name. + * + * 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 report display name, as assigned by the user. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The report display name, as assigned by the user. + * + * 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; + } + + /** + * Output only. Current state of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStateTime() + { + return $this->state_time; + } + + public function hasStateTime() + { + return isset($this->state_time); + } + + public function clearStateTime() + { + unset($this->state_time); + } + + /** + * Output only. The time the state was last set. + * + * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->state_time = $var; + + return $this; + } + + /** + * Output only. Provides details on the state of the report in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Provides details on the state of the report in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The time the report was created (this refers to the time of + * the request, not the time the report creation completed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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 report was created (this refers to the time of + * the request, not the time the report creation completed). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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; + } + + /** + * Time frame of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; + * @return int + */ + public function getTimeFrame() + { + return $this->time_frame; + } + + /** + * Time frame of the report. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; + * @param int $var + * @return $this + */ + public function setTimeFrame($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\TimeFrame::class); + $this->time_frame = $var; + + return $this; + } + + /** + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * + * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFrameEndTime() + { + return $this->frame_end_time; + } + + public function hasFrameEndTime() + { + return isset($this->frame_end_time); + } + + public function clearFrameEndTime() + { + unset($this->frame_end_time); + } + + /** + * Output only. The point in time when the time frame ends. Notice that the + * time frame is counted backwards. For instance if the "frame_end_time" value + * is 2021/01/20 and the time frame is WEEK then the report covers the week + * between 2021/01/20 and 2021/01/14. + * + * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFrameEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->frame_end_time = $var; + + return $this; + } + + /** + * Output only. Total number of VMs included in the report. + * + * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVmCount() + { + return $this->vm_count; + } + + /** + * Output only. Total number of VMs included in the report. + * + * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVmCount($var) + { + GPBUtil::checkInt32($var); + $this->vm_count = $var; + + return $this; + } + + /** + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVms() + { + return $this->vms; + } + + /** + * List of utilization information per VM. + * When sent as part of the request, the "vm_id" field is used in order to + * specify which VMs to include in the report. In that case all other fields + * are ignored. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; + * @param array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmUtilizationInfo::class); + $this->vms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php new file mode 100644 index 000000000000..2e6f82fb524c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.UtilizationReport.State + */ +class State +{ + /** + * The state is unknown. This value is not in use. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The report is in the making. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Report creation completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Report creation failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VMMigration\V1\UtilizationReport_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php new file mode 100644 index 000000000000..6f7489bf7c3c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.UtilizationReport.TimeFrame + */ +class TimeFrame +{ + /** + * The time frame was not specified and will default to WEEK. + * + * Generated from protobuf enum TIME_FRAME_UNSPECIFIED = 0; + */ + const TIME_FRAME_UNSPECIFIED = 0; + /** + * One week. + * + * Generated from protobuf enum WEEK = 1; + */ + const WEEK = 1; + /** + * One month. + * + * Generated from protobuf enum MONTH = 2; + */ + const MONTH = 2; + /** + * One year. + * + * Generated from protobuf enum YEAR = 3; + */ + const YEAR = 3; + + private static $valueToName = [ + self::TIME_FRAME_UNSPECIFIED => 'TIME_FRAME_UNSPECIFIED', + self::WEEK => 'WEEK', + self::MONTH => 'MONTH', + self::YEAR => 'YEAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeFrame::class, \Google\Cloud\VMMigration\V1\UtilizationReport_TimeFrame::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php new file mode 100644 index 000000000000..bb5048154cd8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.UtilizationReportView + */ +class UtilizationReportView +{ + /** + * The default / unset value. + * The API will default to FULL on single report request and BASIC for + * multiple reports request. + * + * Generated from protobuf enum UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; + */ + const UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; + /** + * Get the report metadata, without the list of VMs and their utilization + * info. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::UTILIZATION_REPORT_VIEW_UNSPECIFIED => 'UTILIZATION_REPORT_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php new file mode 100644 index 000000000000..8ba1b02d4c1d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php @@ -0,0 +1,153 @@ +google.cloud.vmmigration.v1.VmUtilizationInfo + */ +class VmUtilizationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The VM's ID in the source. + * + * Generated from protobuf field string vm_id = 3; + */ + protected $vm_id = ''; + /** + * Utilization metrics for this VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; + */ + protected $utilization = null; + protected $VmDetails; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\VmwareVmDetails $vmware_vm_details + * The description of the VM in a Source of type Vmware. + * @type string $vm_id + * The VM's ID in the source. + * @type \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $utilization + * Utilization metrics for this VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The description of the VM in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; + * @return \Google\Cloud\VMMigration\V1\VmwareVmDetails|null + */ + public function getVmwareVmDetails() + { + return $this->readOneof(1); + } + + public function hasVmwareVmDetails() + { + return $this->hasOneof(1); + } + + /** + * The description of the VM in a Source of type Vmware. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; + * @param \Google\Cloud\VMMigration\V1\VmwareVmDetails $var + * @return $this + */ + public function setVmwareVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The VM's ID in the source. + * + * Generated from protobuf field string vm_id = 3; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM's ID in the source. + * + * Generated from protobuf field string vm_id = 3; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * Utilization metrics for this VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; + * @return \Google\Cloud\VMMigration\V1\VmUtilizationMetrics|null + */ + public function getUtilization() + { + return $this->utilization; + } + + public function hasUtilization() + { + return isset($this->utilization); + } + + public function clearUtilization() + { + unset($this->utilization); + } + + /** + * Utilization metrics for this VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; + * @param \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $var + * @return $this + */ + public function setUtilization($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmUtilizationMetrics::class); + $this->utilization = $var; + + return $this; + } + + /** + * @return string + */ + public function getVmDetails() + { + return $this->whichOneof("VmDetails"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php new file mode 100644 index 000000000000..e81a156532d9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php @@ -0,0 +1,313 @@ +google.cloud.vmmigration.v1.VmUtilizationMetrics + */ +class VmUtilizationMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Max CPU usage, percent. + * + * Generated from protobuf field int32 cpu_max_percent = 9; + */ + protected $cpu_max_percent = 0; + /** + * Average CPU usage, percent. + * + * Generated from protobuf field int32 cpu_average_percent = 10; + */ + protected $cpu_average_percent = 0; + /** + * Max memory usage, percent. + * + * Generated from protobuf field int32 memory_max_percent = 11; + */ + protected $memory_max_percent = 0; + /** + * Average memory usage, percent. + * + * Generated from protobuf field int32 memory_average_percent = 12; + */ + protected $memory_average_percent = 0; + /** + * Max disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; + */ + protected $disk_io_rate_max_kbps = 0; + /** + * Average disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; + */ + protected $disk_io_rate_average_kbps = 0; + /** + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_max_kbps = 15; + */ + protected $network_throughput_max_kbps = 0; + /** + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_average_kbps = 16; + */ + protected $network_throughput_average_kbps = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cpu_max_percent + * Max CPU usage, percent. + * @type int $cpu_average_percent + * Average CPU usage, percent. + * @type int $memory_max_percent + * Max memory usage, percent. + * @type int $memory_average_percent + * Average memory usage, percent. + * @type int|string $disk_io_rate_max_kbps + * Max disk IO rate, in kilobytes per second. + * @type int|string $disk_io_rate_average_kbps + * Average disk IO rate, in kilobytes per second. + * @type int|string $network_throughput_max_kbps + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * @type int|string $network_throughput_average_kbps + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Max CPU usage, percent. + * + * Generated from protobuf field int32 cpu_max_percent = 9; + * @return int + */ + public function getCpuMaxPercent() + { + return $this->cpu_max_percent; + } + + /** + * Max CPU usage, percent. + * + * Generated from protobuf field int32 cpu_max_percent = 9; + * @param int $var + * @return $this + */ + public function setCpuMaxPercent($var) + { + GPBUtil::checkInt32($var); + $this->cpu_max_percent = $var; + + return $this; + } + + /** + * Average CPU usage, percent. + * + * Generated from protobuf field int32 cpu_average_percent = 10; + * @return int + */ + public function getCpuAveragePercent() + { + return $this->cpu_average_percent; + } + + /** + * Average CPU usage, percent. + * + * Generated from protobuf field int32 cpu_average_percent = 10; + * @param int $var + * @return $this + */ + public function setCpuAveragePercent($var) + { + GPBUtil::checkInt32($var); + $this->cpu_average_percent = $var; + + return $this; + } + + /** + * Max memory usage, percent. + * + * Generated from protobuf field int32 memory_max_percent = 11; + * @return int + */ + public function getMemoryMaxPercent() + { + return $this->memory_max_percent; + } + + /** + * Max memory usage, percent. + * + * Generated from protobuf field int32 memory_max_percent = 11; + * @param int $var + * @return $this + */ + public function setMemoryMaxPercent($var) + { + GPBUtil::checkInt32($var); + $this->memory_max_percent = $var; + + return $this; + } + + /** + * Average memory usage, percent. + * + * Generated from protobuf field int32 memory_average_percent = 12; + * @return int + */ + public function getMemoryAveragePercent() + { + return $this->memory_average_percent; + } + + /** + * Average memory usage, percent. + * + * Generated from protobuf field int32 memory_average_percent = 12; + * @param int $var + * @return $this + */ + public function setMemoryAveragePercent($var) + { + GPBUtil::checkInt32($var); + $this->memory_average_percent = $var; + + return $this; + } + + /** + * Max disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; + * @return int|string + */ + public function getDiskIoRateMaxKbps() + { + return $this->disk_io_rate_max_kbps; + } + + /** + * Max disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; + * @param int|string $var + * @return $this + */ + public function setDiskIoRateMaxKbps($var) + { + GPBUtil::checkInt64($var); + $this->disk_io_rate_max_kbps = $var; + + return $this; + } + + /** + * Average disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; + * @return int|string + */ + public function getDiskIoRateAverageKbps() + { + return $this->disk_io_rate_average_kbps; + } + + /** + * Average disk IO rate, in kilobytes per second. + * + * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; + * @param int|string $var + * @return $this + */ + public function setDiskIoRateAverageKbps($var) + { + GPBUtil::checkInt64($var); + $this->disk_io_rate_average_kbps = $var; + + return $this; + } + + /** + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_max_kbps = 15; + * @return int|string + */ + public function getNetworkThroughputMaxKbps() + { + return $this->network_throughput_max_kbps; + } + + /** + * Max network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_max_kbps = 15; + * @param int|string $var + * @return $this + */ + public function setNetworkThroughputMaxKbps($var) + { + GPBUtil::checkInt64($var); + $this->network_throughput_max_kbps = $var; + + return $this; + } + + /** + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_average_kbps = 16; + * @return int|string + */ + public function getNetworkThroughputAverageKbps() + { + return $this->network_throughput_average_kbps; + } + + /** + * Average network throughput (combined transmit-rates and receive-rates), in + * kilobytes per second. + * + * Generated from protobuf field int64 network_throughput_average_kbps = 16; + * @param int|string $var + * @return $this + */ + public function setNetworkThroughputAverageKbps($var) + { + GPBUtil::checkInt64($var); + $this->network_throughput_average_kbps = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php new file mode 100644 index 000000000000..751c4aebdc1a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php @@ -0,0 +1,174 @@ +google.cloud.vmmigration.v1.VmwareSourceDetails + */ +class VmwareSourceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The credentials username. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $password = ''; + /** + * The ip address of the vcenter this Source represents. + * + * Generated from protobuf field string vcenter_ip = 3; + */ + protected $vcenter_ip = ''; + /** + * The thumbprint representing the certificate for the vcenter. + * + * Generated from protobuf field string thumbprint = 4; + */ + protected $thumbprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * The credentials username. + * @type string $password + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * @type string $vcenter_ip + * The ip address of the vcenter this Source represents. + * @type string $thumbprint + * The thumbprint representing the certificate for the vcenter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The credentials username. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The credentials username. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Input only. The credentials password. This is write only and can not be + * read in a GET operation. + * + * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * The ip address of the vcenter this Source represents. + * + * Generated from protobuf field string vcenter_ip = 3; + * @return string + */ + public function getVcenterIp() + { + return $this->vcenter_ip; + } + + /** + * The ip address of the vcenter this Source represents. + * + * Generated from protobuf field string vcenter_ip = 3; + * @param string $var + * @return $this + */ + public function setVcenterIp($var) + { + GPBUtil::checkString($var, True); + $this->vcenter_ip = $var; + + return $this; + } + + /** + * The thumbprint representing the certificate for the vcenter. + * + * Generated from protobuf field string thumbprint = 4; + * @return string + */ + public function getThumbprint() + { + return $this->thumbprint; + } + + /** + * The thumbprint representing the certificate for the vcenter. + * + * Generated from protobuf field string thumbprint = 4; + * @param string $var + * @return $this + */ + public function setThumbprint($var) + { + GPBUtil::checkString($var, True); + $this->thumbprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php new file mode 100644 index 000000000000..d35cf1bfd3eb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php @@ -0,0 +1,453 @@ +google.cloud.vmmigration.v1.VmwareVmDetails + */ +class VmwareVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * + * Generated from protobuf field string vm_id = 1; + */ + protected $vm_id = ''; + /** + * The id of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_id = 2; + */ + protected $datacenter_id = ''; + /** + * The descriptive name of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_description = 3; + */ + protected $datacenter_description = ''; + /** + * The unique identifier of the VM in vCenter. + * + * Generated from protobuf field string uuid = 4; + */ + protected $uuid = ''; + /** + * The display name of the VM. Note that this is not necessarily unique. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; + */ + protected $power_state = 0; + /** + * The number of cpus in the VM. + * + * Generated from protobuf field int32 cpu_count = 7; + */ + protected $cpu_count = 0; + /** + * The size of the memory of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 8; + */ + protected $memory_mb = 0; + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 9; + */ + protected $disk_count = 0; + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 12; + */ + protected $committed_storage_mb = 0; + /** + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * + * Generated from protobuf field string guest_description = 11; + */ + protected $guest_description = ''; + /** + * Output only. The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boot_option = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_id + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * @type string $datacenter_id + * The id of the vCenter's datacenter this VM is contained in. + * @type string $datacenter_description + * The descriptive name of the vCenter's datacenter this VM is contained in. + * @type string $uuid + * The unique identifier of the VM in vCenter. + * @type string $display_name + * The display name of the VM. Note that this is not necessarily unique. + * @type int $power_state + * The power state of the VM at the moment list was taken. + * @type int $cpu_count + * The number of cpus in the VM. + * @type int $memory_mb + * The size of the memory of the VM in MB. + * @type int $disk_count + * The number of disks the VM has. + * @type int|string $committed_storage_mb + * The total size of the storage allocated to the VM in MB. + * @type string $guest_description + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * @type int $boot_option + * Output only. The VM Boot Option. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * + * Generated from protobuf field string vm_id = 1; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM's id in the source (note that this is not the MigratingVm's id). + * This is the moref id of the VM. + * + * Generated from protobuf field string vm_id = 1; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * The id of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_id = 2; + * @return string + */ + public function getDatacenterId() + { + return $this->datacenter_id; + } + + /** + * The id of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_id = 2; + * @param string $var + * @return $this + */ + public function setDatacenterId($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_id = $var; + + return $this; + } + + /** + * The descriptive name of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_description = 3; + * @return string + */ + public function getDatacenterDescription() + { + return $this->datacenter_description; + } + + /** + * The descriptive name of the vCenter's datacenter this VM is contained in. + * + * Generated from protobuf field string datacenter_description = 3; + * @param string $var + * @return $this + */ + public function setDatacenterDescription($var) + { + GPBUtil::checkString($var, True); + $this->datacenter_description = $var; + + return $this; + } + + /** + * The unique identifier of the VM in vCenter. + * + * Generated from protobuf field string uuid = 4; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * The unique identifier of the VM in vCenter. + * + * Generated from protobuf field string uuid = 4; + * @param string $var + * @return $this + */ + public function setUuid($var) + { + GPBUtil::checkString($var, True); + $this->uuid = $var; + + return $this; + } + + /** + * The display name of the VM. Note that this is not necessarily unique. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the VM. Note that this is not necessarily unique. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; + * @return int + */ + public function getPowerState() + { + return $this->power_state; + } + + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; + * @param int $var + * @return $this + */ + public function setPowerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\PowerState::class); + $this->power_state = $var; + + return $this; + } + + /** + * The number of cpus in the VM. + * + * Generated from protobuf field int32 cpu_count = 7; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * The number of cpus in the VM. + * + * Generated from protobuf field int32 cpu_count = 7; + * @param int $var + * @return $this + */ + public function setCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_count = $var; + + return $this; + } + + /** + * The size of the memory of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 8; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * The size of the memory of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 8; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 9; + * @return int + */ + public function getDiskCount() + { + return $this->disk_count; + } + + /** + * The number of disks the VM has. + * + * Generated from protobuf field int32 disk_count = 9; + * @param int $var + * @return $this + */ + public function setDiskCount($var) + { + GPBUtil::checkInt32($var); + $this->disk_count = $var; + + return $this; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 12; + * @return int|string + */ + public function getCommittedStorageMb() + { + return $this->committed_storage_mb; + } + + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 12; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageMb($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_mb = $var; + + return $this; + } + + /** + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * + * Generated from protobuf field string guest_description = 11; + * @return string + */ + public function getGuestDescription() + { + return $this->guest_description; + } + + /** + * The VM's OS. See for example + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html + * for types of strings this might hold. + * + * Generated from protobuf field string guest_description = 11; + * @param string $var + * @return $this + */ + public function setGuestDescription($var) + { + GPBUtil::checkString($var, True); + $this->guest_description = $var; + + return $this; + } + + /** + * Output only. The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBootOption() + { + return $this->boot_option; + } + + /** + * Output only. The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\BootOption::class); + $this->boot_option = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php new file mode 100644 index 000000000000..a83392180524 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.VmwareVmDetails.BootOption + */ +class BootOption +{ + /** + * The boot option is unknown. + * + * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; + */ + const BOOT_OPTION_UNSPECIFIED = 0; + /** + * The boot option is EFI. + * + * Generated from protobuf enum EFI = 1; + */ + const EFI = 1; + /** + * The boot option is BIOS. + * + * Generated from protobuf enum BIOS = 2; + */ + const BIOS = 2; + + private static $valueToName = [ + self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', + self::EFI => 'EFI', + self::BIOS => 'BIOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_BootOption::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php new file mode 100644 index 000000000000..925c1f5a6f43 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.VmwareVmDetails.PowerState + */ +class PowerState +{ + /** + * Power state is not specified. + * + * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; + */ + const POWER_STATE_UNSPECIFIED = 0; + /** + * The VM is turned ON. + * + * Generated from protobuf enum ON = 1; + */ + const ON = 1; + /** + * The VM is turned OFF. + * + * Generated from protobuf enum OFF = 2; + */ + const OFF = 2; + /** + * The VM is suspended. This is similar to hibernation or sleep mode. + * + * Generated from protobuf enum SUSPENDED = 3; + */ + const SUSPENDED = 3; + + private static $valueToName = [ + self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', + self::ON => 'ON', + self::OFF => 'OFF', + self::SUSPENDED => 'SUSPENDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_PowerState::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php new file mode 100644 index 000000000000..96796ec1c12c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.VmwareVmsDetails + */ +class VmwareVmsDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The details of the vmware VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $details + * The details of the vmware VMs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The details of the vmware VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * The details of the vmware VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; + * @param array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php new file mode 100644 index 000000000000..c1149ffb2ce3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php @@ -0,0 +1,83 @@ +setGroup($formattedGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->addGroupMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddGroupMigrationResponse $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 +{ + $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + add_group_migration_sample($formattedGroup); +} +// [END vmmigration_v1_generated_VmMigration_AddGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php new file mode 100644 index 000000000000..7f0c1864eb40 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->cancelCloneJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CancelCloneJobResponse $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 = VmMigrationClient::cloneJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CLONE_JOB]' + ); + + cancel_clone_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_CancelCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php new file mode 100644 index 000000000000..54e25699d4ac --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->cancelCutoverJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CancelCutoverJobResponse $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 = VmMigrationClient::cutoverJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CUTOVER_JOB]' + ); + + cancel_cutover_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_CancelCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php new file mode 100644 index 000000000000..583a8c712601 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setCloneJobId($cloneJobId) + ->setCloneJob($cloneJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createCloneJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CloneJob $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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $cloneJobId = '[CLONE_JOB_ID]'; + + create_clone_job_sample($formattedParent, $cloneJobId); +} +// [END vmmigration_v1_generated_VmMigration_CreateCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php new file mode 100644 index 000000000000..9c09806ea5b1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setCutoverJobId($cutoverJobId) + ->setCutoverJob($cutoverJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createCutoverJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CutoverJob $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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $cutoverJobId = '[CUTOVER_JOB_ID]'; + + create_cutover_job_sample($formattedParent, $cutoverJobId); +} +// [END vmmigration_v1_generated_VmMigration_CreateCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php new file mode 100644 index 000000000000..5a6d0b79ede1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setDatacenterConnectorId($datacenterConnectorId) + ->setDatacenterConnector($datacenterConnector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createDatacenterConnector($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DatacenterConnector $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = '[DATACENTER_CONNECTOR_ID]'; + + create_datacenter_connector_sample($formattedParent, $datacenterConnectorId); +} +// [END vmmigration_v1_generated_VmMigration_CreateDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php new file mode 100644 index 000000000000..6c8db44dcbe8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $groupId = '[GROUP_ID]'; + + create_group_sample($formattedParent, $groupId); +} +// [END vmmigration_v1_generated_VmMigration_CreateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php new file mode 100644 index 000000000000..9bb800079331 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setMigratingVmId($migratingVmId) + ->setMigratingVm($migratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createMigratingVm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MigratingVm $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = '[MIGRATING_VM_ID]'; + + create_migrating_vm_sample($formattedParent, $migratingVmId); +} +// [END vmmigration_v1_generated_VmMigration_CreateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php new file mode 100644 index 000000000000..a58e3ff32372 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Source $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $sourceId = '[SOURCE_ID]'; + + create_source_sample($formattedParent, $sourceId); +} +// [END vmmigration_v1_generated_VmMigration_CreateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php new file mode 100644 index 000000000000..6a4a065f7cb2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setTargetProjectId($targetProjectId) + ->setTargetProject($targetProject); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createTargetProject($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TargetProject $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = '[TARGET_PROJECT_ID]'; + + create_target_project_sample($formattedParent, $targetProjectId); +} +// [END vmmigration_v1_generated_VmMigration_CreateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php new file mode 100644 index 000000000000..006b3b0f2603 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createUtilizationReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UtilizationReport $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReportId = '[UTILIZATION_REPORT_ID]'; + + create_utilization_report_sample($formattedParent, $utilizationReportId); +} +// [END vmmigration_v1_generated_VmMigration_CreateUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php new file mode 100644 index 000000000000..993b71b4385e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteDatacenterConnector($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 = VmMigrationClient::datacenterConnectorName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DATACENTER_CONNECTOR]' + ); + + delete_datacenter_connector_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php new file mode 100644 index 000000000000..e970916f7c25 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteGroup($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 = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + delete_group_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php new file mode 100644 index 000000000000..262f5b572305 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteMigratingVm($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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + delete_migrating_vm_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php new file mode 100644 index 000000000000..6f5da2d0372f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteSource($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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + delete_source_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php new file mode 100644 index 000000000000..70ea146c9bb2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteTargetProject($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 = VmMigrationClient::targetProjectName( + '[PROJECT]', + '[LOCATION]', + '[TARGET_PROJECT]' + ); + + delete_target_project_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php new file mode 100644 index 000000000000..291a7ee83c89 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteUtilizationReport($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 = VmMigrationClient::utilizationReportName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[UTILIZATION_REPORT]' + ); + + delete_utilization_report_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php new file mode 100644 index 000000000000..8550ce328933 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php @@ -0,0 +1,75 @@ +setSource($formattedSource); + + // Call the API and handle any network failures. + try { + /** @var FetchInventoryResponse $response */ + $response = $vmMigrationClient->fetchInventory($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 +{ + $formattedSource = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + fetch_inventory_sample($formattedSource); +} +// [END vmmigration_v1_generated_VmMigration_FetchInventory_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php new file mode 100644 index 000000000000..1efd40ebfff0 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php @@ -0,0 +1,89 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->finalizeMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var FinalizeMigrationResponse $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 +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + finalize_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_FinalizeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php new file mode 100644 index 000000000000..1acd3193f371 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CloneJob $response */ + $response = $vmMigrationClient->getCloneJob($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 = VmMigrationClient::cloneJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CLONE_JOB]' + ); + + get_clone_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php new file mode 100644 index 000000000000..b56ebfd889d8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CutoverJob $response */ + $response = $vmMigrationClient->getCutoverJob($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 = VmMigrationClient::cutoverJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[CUTOVER_JOB]' + ); + + get_cutover_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php new file mode 100644 index 000000000000..f10424c13d5a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DatacenterConnector $response */ + $response = $vmMigrationClient->getDatacenterConnector($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 = VmMigrationClient::datacenterConnectorName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DATACENTER_CONNECTOR]' + ); + + get_datacenter_connector_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php new file mode 100644 index 000000000000..68e2412fcb94 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $vmMigrationClient->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 +{ + $formattedName = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + get_group_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php new file mode 100644 index 000000000000..8dc72c4f1e99 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/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 vmmigration_v1_generated_VmMigration_GetLocation_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php new file mode 100644 index 000000000000..e10be327fb93 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MigratingVm $response */ + $response = $vmMigrationClient->getMigratingVm($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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + get_migrating_vm_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php new file mode 100644 index 000000000000..588a87cf36cd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReplicationCycle $response */ + $response = $vmMigrationClient->getReplicationCycle($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 = VmMigrationClient::replicationCycleName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]', + '[REPLICATION_CYCLE]' + ); + + get_replication_cycle_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetReplicationCycle_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php new file mode 100644 index 000000000000..632be52c6f96 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Source $response */ + $response = $vmMigrationClient->getSource($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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + get_source_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php new file mode 100644 index 000000000000..4509ae4b4f12 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TargetProject $response */ + $response = $vmMigrationClient->getTargetProject($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 = VmMigrationClient::targetProjectName( + '[PROJECT]', + '[LOCATION]', + '[TARGET_PROJECT]' + ); + + get_target_project_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php new file mode 100644 index 000000000000..8c7a7169c434 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UtilizationReport $response */ + $response = $vmMigrationClient->getUtilizationReport($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 = VmMigrationClient::utilizationReportName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[UTILIZATION_REPORT]' + ); + + get_utilization_report_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php new file mode 100644 index 000000000000..63a58c1987aa --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listCloneJobs($request); + + /** @var CloneJob $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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $pageToken = '[PAGE_TOKEN]'; + + list_clone_jobs_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListCloneJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php new file mode 100644 index 000000000000..6b869a4b8891 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listCutoverJobs($request); + + /** @var CutoverJob $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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $pageToken = '[PAGE_TOKEN]'; + + list_cutover_jobs_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListCutoverJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php new file mode 100644 index 000000000000..398c35b6f753 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listDatacenterConnectors($request); + + /** @var DatacenterConnector $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = '[PAGE_TOKEN]'; + + list_datacenter_connectors_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListDatacenterConnectors_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php new file mode 100644 index 000000000000..7b405b9f8eed --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listGroups($request); + + /** @var Group $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $pageToken = '[PAGE_TOKEN]'; + + list_groups_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListGroups_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php new file mode 100644 index 000000000000..f765b432d732 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/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 vmmigration_v1_generated_VmMigration_ListLocations_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php new file mode 100644 index 000000000000..314d02fc2996 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listMigratingVms($request); + + /** @var MigratingVm $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = '[PAGE_TOKEN]'; + + list_migrating_vms_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListMigratingVms_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php new file mode 100644 index 000000000000..91543c4635f6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listReplicationCycles($request); + + /** @var ReplicationCycle $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 = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + $pageToken = '[PAGE_TOKEN]'; + + list_replication_cycles_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListReplicationCycles_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php new file mode 100644 index 000000000000..084038f7e532 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listSources($request); + + /** @var Source $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $pageToken = '[PAGE_TOKEN]'; + + list_sources_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListSources_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php new file mode 100644 index 000000000000..7605687b9a05 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listTargetProjects($request); + + /** @var TargetProject $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); + $pageToken = '[PAGE_TOKEN]'; + + list_target_projects_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListTargetProjects_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php new file mode 100644 index 000000000000..8d5cd0d4e91b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setPageToken($pageToken); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listUtilizationReports($request); + + /** @var UtilizationReport $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = '[PAGE_TOKEN]'; + + list_utilization_reports_sample($formattedParent, $pageToken); +} +// [END vmmigration_v1_generated_VmMigration_ListUtilizationReports_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php new file mode 100644 index 000000000000..c5b34d9bcefb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php @@ -0,0 +1,90 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->pauseMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PauseMigrationResponse $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 +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + pause_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_PauseMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php new file mode 100644 index 000000000000..6daf0dfa6740 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php @@ -0,0 +1,83 @@ +setGroup($formattedGroup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->removeGroupMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RemoveGroupMigrationResponse $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 +{ + $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + remove_group_migration_sample($formattedGroup); +} +// [END vmmigration_v1_generated_VmMigration_RemoveGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php new file mode 100644 index 000000000000..63a188540ee2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php @@ -0,0 +1,91 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->resumeMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ResumeMigrationResponse $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 +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + resume_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_ResumeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php new file mode 100644 index 000000000000..3a7702e45a1e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php @@ -0,0 +1,89 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->startMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StartMigrationResponse $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 +{ + $formattedMigratingVm = VmMigrationClient::migratingVmName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[MIGRATING_VM]' + ); + + start_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_StartMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php new file mode 100644 index 000000000000..e3468de71b92 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php @@ -0,0 +1,71 @@ +setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $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 vmmigration_v1_generated_VmMigration_UpdateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php new file mode 100644 index 000000000000..dc1fc7086dea --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php @@ -0,0 +1,71 @@ +setMigratingVm($migratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateMigratingVm($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var MigratingVm $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 vmmigration_v1_generated_VmMigration_UpdateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php new file mode 100644 index 000000000000..14f89e98f59d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php @@ -0,0 +1,71 @@ +setSource($source); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Source $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 vmmigration_v1_generated_VmMigration_UpdateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php new file mode 100644 index 000000000000..a8c541b7cbcd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php @@ -0,0 +1,74 @@ +setTargetProject($targetProject); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateTargetProject($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TargetProject $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 vmmigration_v1_generated_VmMigration_UpdateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php new file mode 100644 index 000000000000..39731268643d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php @@ -0,0 +1,89 @@ +setDatacenterConnector($formattedDatacenterConnector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->upgradeAppliance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UpgradeApplianceResponse $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 +{ + $formattedDatacenterConnector = VmMigrationClient::datacenterConnectorName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DATACENTER_CONNECTOR]' + ); + + upgrade_appliance_sample($formattedDatacenterConnector); +} +// [END vmmigration_v1_generated_VmMigration_UpgradeAppliance_sync] diff --git a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php new file mode 100644 index 000000000000..073f134e367c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php @@ -0,0 +1,1847 @@ + addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCloneJobAsync(CreateCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCutoverJobAsync(CreateCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatacenterConnectorAsync(CreateDatacenterConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMigratingVmAsync(CreateMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSourceAsync(CreateSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTargetProjectAsync(CreateTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUtilizationReportAsync(CreateUtilizationReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMigratingVmAsync(DeleteMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSourceAsync(DeleteSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTargetProjectAsync(DeleteTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUtilizationReportAsync(DeleteUtilizationReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface finalizeMigrationAsync(FinalizeMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCloneJobAsync(GetCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCutoverJobAsync(GetCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatacenterConnectorAsync(GetDatacenterConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMigratingVmAsync(GetMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReplicationCycleAsync(GetReplicationCycleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTargetProjectAsync(GetTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUtilizationReportAsync(GetUtilizationReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCloneJobsAsync(ListCloneJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCutoverJobsAsync(ListCutoverJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatacenterConnectorsAsync(ListDatacenterConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMigratingVmsAsync(ListMigratingVmsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReplicationCyclesAsync(ListReplicationCyclesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTargetProjectsAsync(ListTargetProjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUtilizationReportsAsync(ListUtilizationReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseMigrationAsync(PauseMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeGroupMigrationAsync(RemoveGroupMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeMigrationAsync(ResumeMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMigratingVmAsync(UpdateMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTargetProjectAsync(UpdateTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface upgradeApplianceAsync(UpgradeApplianceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class VmMigrationClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vmmigration.v1.VmMigration'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vmmigration.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vmmigration.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/vm_migration_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vm_migration_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vm_migration_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vm_migration_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 clone_job + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $cloneJob + * + * @return string The formatted clone_job resource. + */ + public static function cloneJobName(string $project, string $location, string $source, string $migratingVm, string $cloneJob): string + { + return self::getPathTemplate('cloneJob')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'clone_job' => $cloneJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cutover_job + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $cutoverJob + * + * @return string The formatted cutover_job resource. + */ + public static function cutoverJobName(string $project, string $location, string $source, string $migratingVm, string $cutoverJob): string + { + return self::getPathTemplate('cutoverJob')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'cutover_job' => $cutoverJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * datacenter_connector resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $datacenterConnector + * + * @return string The formatted datacenter_connector resource. + */ + public static function datacenterConnectorName(string $project, string $location, string $source, string $datacenterConnector): string + { + return self::getPathTemplate('datacenterConnector')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'datacenter_connector' => $datacenterConnector, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $location + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName(string $project, string $location, string $group): string + { + return self::getPathTemplate('group')->render([ + 'project' => $project, + 'location' => $location, + 'group' => $group, + ]); + } + + /** + * 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 migrating_vm + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * + * @return string The formatted migrating_vm resource. + */ + public static function migratingVmName(string $project, string $location, string $source, string $migratingVm): string + { + return self::getPathTemplate('migratingVm')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * replication_cycle resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $migratingVm + * @param string $replicationCycle + * + * @return string The formatted replication_cycle resource. + */ + public static function replicationCycleName(string $project, string $location, string $source, string $migratingVm, string $replicationCycle): string + { + return self::getPathTemplate('replicationCycle')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'migrating_vm' => $migratingVm, + 'replication_cycle' => $replicationCycle, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a source + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * + * @return string The formatted source resource. + */ + public static function sourceName(string $project, string $location, string $source): string + { + return self::getPathTemplate('source')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * target_project resource. + * + * @param string $project + * @param string $location + * @param string $targetProject + * + * @return string The formatted target_project resource. + */ + public static function targetProjectName(string $project, string $location, string $targetProject): string + { + return self::getPathTemplate('targetProject')->render([ + 'project' => $project, + 'location' => $location, + 'target_project' => $targetProject, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * utilization_report resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $utilizationReport + * + * @return string The formatted utilization_report resource. + */ + public static function utilizationReportName(string $project, string $location, string $source, string $utilizationReport): string + { + return self::getPathTemplate('utilizationReport')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'utilization_report' => $utilizationReport, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} + * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} + * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} + * - group: projects/{project}/locations/{location}/groups/{group} + * - location: projects/{project}/locations/{location} + * - migratingVm: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm} + * - replicationCycle: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle} + * - source: projects/{project}/locations/{location}/sources/{source} + * - targetProject: projects/{project}/locations/{location}/targetProjects/{target_project} + * - utilizationReport: projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vmmigration.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds a MigratingVm to a Group. + * + * The async variant is {@see VmMigrationClient::addGroupMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/add_group_migration.php + * + * @param AddGroupMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 addGroupMigration(AddGroupMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AddGroupMigration', $request, $callOptions)->wait(); + } + + /** + * Initiates the cancellation of a running clone job. + * + * The async variant is {@see VmMigrationClient::cancelCloneJobAsync()} . + * + * @example samples/V1/VmMigrationClient/cancel_clone_job.php + * + * @param CancelCloneJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 cancelCloneJob(CancelCloneJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelCloneJob', $request, $callOptions)->wait(); + } + + /** + * Initiates the cancellation of a running cutover job. + * + * The async variant is {@see VmMigrationClient::cancelCutoverJobAsync()} . + * + * @example samples/V1/VmMigrationClient/cancel_cutover_job.php + * + * @param CancelCutoverJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 cancelCutoverJob(CancelCutoverJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelCutoverJob', $request, $callOptions)->wait(); + } + + /** + * Initiates a Clone of a specific migrating VM. + * + * The async variant is {@see VmMigrationClient::createCloneJobAsync()} . + * + * @example samples/V1/VmMigrationClient/create_clone_job.php + * + * @param CreateCloneJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCloneJob(CreateCloneJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCloneJob', $request, $callOptions)->wait(); + } + + /** + * Initiates a Cutover of a specific migrating VM. + * The returned LRO is completed when the cutover job resource is created + * and the job is initiated. + * + * The async variant is {@see VmMigrationClient::createCutoverJobAsync()} . + * + * @example samples/V1/VmMigrationClient/create_cutover_job.php + * + * @param CreateCutoverJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createCutoverJob(CreateCutoverJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCutoverJob', $request, $callOptions)->wait(); + } + + /** + * Creates a new DatacenterConnector in a given Source. + * + * The async variant is {@see VmMigrationClient::createDatacenterConnectorAsync()} + * . + * + * @example samples/V1/VmMigrationClient/create_datacenter_connector.php + * + * @param CreateDatacenterConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createDatacenterConnector(CreateDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDatacenterConnector', $request, $callOptions)->wait(); + } + + /** + * Creates a new Group in a given project and location. + * + * The async variant is {@see VmMigrationClient::createGroupAsync()} . + * + * @example samples/V1/VmMigrationClient/create_group.php + * + * @param CreateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createGroup(CreateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); + } + + /** + * Creates a new MigratingVm in a given Source. + * + * The async variant is {@see VmMigrationClient::createMigratingVmAsync()} . + * + * @example samples/V1/VmMigrationClient/create_migrating_vm.php + * + * @param CreateMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createMigratingVm(CreateMigratingVmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Creates a new Source in a given project and location. + * + * The async variant is {@see VmMigrationClient::createSourceAsync()} . + * + * @example samples/V1/VmMigrationClient/create_source.php + * + * @param CreateSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createSource(CreateSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSource', $request, $callOptions)->wait(); + } + + /** + * Creates a new TargetProject in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see VmMigrationClient::createTargetProjectAsync()} . + * + * @example samples/V1/VmMigrationClient/create_target_project.php + * + * @param CreateTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createTargetProject(CreateTargetProjectRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTargetProject', $request, $callOptions)->wait(); + } + + /** + * Creates a new UtilizationReport. + * + * The async variant is {@see VmMigrationClient::createUtilizationReportAsync()} . + * + * @example samples/V1/VmMigrationClient/create_utilization_report.php + * + * @param CreateUtilizationReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createUtilizationReport(CreateUtilizationReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateUtilizationReport', $request, $callOptions)->wait(); + } + + /** + * Deletes a single DatacenterConnector. + * + * The async variant is {@see VmMigrationClient::deleteDatacenterConnectorAsync()} + * . + * + * @example samples/V1/VmMigrationClient/delete_datacenter_connector.php + * + * @param DeleteDatacenterConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteDatacenterConnector(DeleteDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDatacenterConnector', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Group. + * + * The async variant is {@see VmMigrationClient::deleteGroupAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_group.php + * + * @param DeleteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteGroup(DeleteGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes a single MigratingVm. + * + * The async variant is {@see VmMigrationClient::deleteMigratingVmAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_migrating_vm.php + * + * @param DeleteMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteMigratingVm(DeleteMigratingVmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Source. + * + * The async variant is {@see VmMigrationClient::deleteSourceAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_source.php + * + * @param DeleteSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteSource(DeleteSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSource', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see VmMigrationClient::deleteTargetProjectAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_target_project.php + * + * @param DeleteTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteTargetProject(DeleteTargetProjectRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTargetProject', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Utilization Report. + * + * The async variant is {@see VmMigrationClient::deleteUtilizationReportAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_utilization_report.php + * + * @param DeleteUtilizationReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteUtilizationReport(DeleteUtilizationReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteUtilizationReport', $request, $callOptions)->wait(); + } + + /** + * List remote source's inventory of VMs. + * The remote source is the onprem vCenter (remote in the sense it's not in + * Compute Engine). The inventory describes the list of existing VMs in that + * source. Note that this operation lists the VMs on the remote source, as + * opposed to listing the MigratingVms resources in the vmmigration service. + * + * The async variant is {@see VmMigrationClient::fetchInventoryAsync()} . + * + * @example samples/V1/VmMigrationClient/fetch_inventory.php + * + * @param FetchInventoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FetchInventoryResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchInventory(FetchInventoryRequest $request, array $callOptions = []): FetchInventoryResponse + { + return $this->startApiCall('FetchInventory', $request, $callOptions)->wait(); + } + + /** + * Marks a migration as completed, deleting migration resources that are no + * longer being used. Only applicable after cutover is done. + * + * The async variant is {@see VmMigrationClient::finalizeMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/finalize_migration.php + * + * @param FinalizeMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 finalizeMigration(FinalizeMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('FinalizeMigration', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CloneJob. + * + * The async variant is {@see VmMigrationClient::getCloneJobAsync()} . + * + * @example samples/V1/VmMigrationClient/get_clone_job.php + * + * @param GetCloneJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CloneJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCloneJob(GetCloneJobRequest $request, array $callOptions = []): CloneJob + { + return $this->startApiCall('GetCloneJob', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single CutoverJob. + * + * The async variant is {@see VmMigrationClient::getCutoverJobAsync()} . + * + * @example samples/V1/VmMigrationClient/get_cutover_job.php + * + * @param GetCutoverJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CutoverJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCutoverJob(GetCutoverJobRequest $request, array $callOptions = []): CutoverJob + { + return $this->startApiCall('GetCutoverJob', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single DatacenterConnector. + * + * The async variant is {@see VmMigrationClient::getDatacenterConnectorAsync()} . + * + * @example samples/V1/VmMigrationClient/get_datacenter_connector.php + * + * @param GetDatacenterConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DatacenterConnector + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDatacenterConnector(GetDatacenterConnectorRequest $request, array $callOptions = []): DatacenterConnector + { + return $this->startApiCall('GetDatacenterConnector', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Group. + * + * The async variant is {@see VmMigrationClient::getGroupAsync()} . + * + * @example samples/V1/VmMigrationClient/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 Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGroup(GetGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single MigratingVm. + * + * The async variant is {@see VmMigrationClient::getMigratingVmAsync()} . + * + * @example samples/V1/VmMigrationClient/get_migrating_vm.php + * + * @param GetMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MigratingVm + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMigratingVm(GetMigratingVmRequest $request, array $callOptions = []): MigratingVm + { + return $this->startApiCall('GetMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ReplicationCycle. + * + * The async variant is {@see VmMigrationClient::getReplicationCycleAsync()} . + * + * @example samples/V1/VmMigrationClient/get_replication_cycle.php + * + * @param GetReplicationCycleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReplicationCycle + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReplicationCycle(GetReplicationCycleRequest $request, array $callOptions = []): ReplicationCycle + { + return $this->startApiCall('GetReplicationCycle', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Source. + * + * The async variant is {@see VmMigrationClient::getSourceAsync()} . + * + * @example samples/V1/VmMigrationClient/get_source.php + * + * @param GetSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Source + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSource(GetSourceRequest $request, array $callOptions = []): Source + { + return $this->startApiCall('GetSource', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see VmMigrationClient::getTargetProjectAsync()} . + * + * @example samples/V1/VmMigrationClient/get_target_project.php + * + * @param GetTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TargetProject + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTargetProject(GetTargetProjectRequest $request, array $callOptions = []): TargetProject + { + return $this->startApiCall('GetTargetProject', $request, $callOptions)->wait(); + } + + /** + * Gets a single Utilization Report. + * + * The async variant is {@see VmMigrationClient::getUtilizationReportAsync()} . + * + * @example samples/V1/VmMigrationClient/get_utilization_report.php + * + * @param GetUtilizationReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UtilizationReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUtilizationReport(GetUtilizationReportRequest $request, array $callOptions = []): UtilizationReport + { + return $this->startApiCall('GetUtilizationReport', $request, $callOptions)->wait(); + } + + /** + * Lists CloneJobs of a given migrating VM. + * + * The async variant is {@see VmMigrationClient::listCloneJobsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_clone_jobs.php + * + * @param ListCloneJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCloneJobs(ListCloneJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCloneJobs', $request, $callOptions); + } + + /** + * Lists CutoverJobs of a given migrating VM. + * + * The async variant is {@see VmMigrationClient::listCutoverJobsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_cutover_jobs.php + * + * @param ListCutoverJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCutoverJobs(ListCutoverJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCutoverJobs', $request, $callOptions); + } + + /** + * Lists DatacenterConnectors in a given Source. + * + * The async variant is {@see VmMigrationClient::listDatacenterConnectorsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_datacenter_connectors.php + * + * @param ListDatacenterConnectorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listDatacenterConnectors(ListDatacenterConnectorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDatacenterConnectors', $request, $callOptions); + } + + /** + * Lists Groups in a given project and location. + * + * The async variant is {@see VmMigrationClient::listGroupsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_groups.php + * + * @param ListGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroups', $request, $callOptions); + } + + /** + * Lists MigratingVms in a given Source. + * + * The async variant is {@see VmMigrationClient::listMigratingVmsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_migrating_vms.php + * + * @param ListMigratingVmsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMigratingVms(ListMigratingVmsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMigratingVms', $request, $callOptions); + } + + /** + * Lists ReplicationCycles in a given MigratingVM. + * + * The async variant is {@see VmMigrationClient::listReplicationCyclesAsync()} . + * + * @example samples/V1/VmMigrationClient/list_replication_cycles.php + * + * @param ListReplicationCyclesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReplicationCycles(ListReplicationCyclesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReplicationCycles', $request, $callOptions); + } + + /** + * Lists Sources in a given project and location. + * + * The async variant is {@see VmMigrationClient::listSourcesAsync()} . + * + * @example samples/V1/VmMigrationClient/list_sources.php + * + * @param ListSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSources(ListSourcesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSources', $request, $callOptions); + } + + /** + * Lists TargetProjects in a given project. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see VmMigrationClient::listTargetProjectsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_target_projects.php + * + * @param ListTargetProjectsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTargetProjects(ListTargetProjectsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTargetProjects', $request, $callOptions); + } + + /** + * Lists Utilization Reports of the given Source. + * + * The async variant is {@see VmMigrationClient::listUtilizationReportsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_utilization_reports.php + * + * @param ListUtilizationReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listUtilizationReports(ListUtilizationReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUtilizationReports', $request, $callOptions); + } + + /** + * Pauses a migration for a VM. If cycle tasks are running they will be + * cancelled, preserving source task data. Further replication cycles will not + * be triggered while the VM is paused. + * + * The async variant is {@see VmMigrationClient::pauseMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/pause_migration.php + * + * @param PauseMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 pauseMigration(PauseMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PauseMigration', $request, $callOptions)->wait(); + } + + /** + * Removes a MigratingVm from a Group. + * + * The async variant is {@see VmMigrationClient::removeGroupMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/remove_group_migration.php + * + * @param RemoveGroupMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 removeGroupMigration(RemoveGroupMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveGroupMigration', $request, $callOptions)->wait(); + } + + /** + * Resumes a migration for a VM. When called on a paused migration, will start + * the process of uploading data and creating snapshots; when called on a + * completed cut-over migration, will update the migration to active state and + * start the process of uploading data and creating snapshots. + * + * The async variant is {@see VmMigrationClient::resumeMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/resume_migration.php + * + * @param ResumeMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resumeMigration(ResumeMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResumeMigration', $request, $callOptions)->wait(); + } + + /** + * Starts migration for a VM. Starts the process of uploading + * data and creating snapshots, in replication cycles scheduled by the policy. + * + * The async variant is {@see VmMigrationClient::startMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/start_migration.php + * + * @param StartMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 startMigration(StartMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartMigration', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Group. + * + * The async variant is {@see VmMigrationClient::updateGroupAsync()} . + * + * @example samples/V1/VmMigrationClient/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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single MigratingVm. + * + * The async variant is {@see VmMigrationClient::updateMigratingVmAsync()} . + * + * @example samples/V1/VmMigrationClient/update_migrating_vm.php + * + * @param UpdateMigratingVmRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateMigratingVm(UpdateMigratingVmRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMigratingVm', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Source. + * + * The async variant is {@see VmMigrationClient::updateSourceAsync()} . + * + * @example samples/V1/VmMigrationClient/update_source.php + * + * @param UpdateSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateSource(UpdateSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSource', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single TargetProject. + * + * NOTE: TargetProject is a global resource; hence the only supported value + * for location is `global`. + * + * The async variant is {@see VmMigrationClient::updateTargetProjectAsync()} . + * + * @example samples/V1/VmMigrationClient/update_target_project.php + * + * @param UpdateTargetProjectRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateTargetProject(UpdateTargetProjectRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTargetProject', $request, $callOptions)->wait(); + } + + /** + * Upgrades the appliance relate to this DatacenterConnector to the in-place + * updateable version. + * + * The async variant is {@see VmMigrationClient::upgradeApplianceAsync()} . + * + * @example samples/V1/VmMigrationClient/upgrade_appliance.php + * + * @param UpgradeApplianceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 upgradeAppliance(UpgradeApplianceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeAppliance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see VmMigrationClient::getLocationAsync()} . + * + * @example samples/V1/VmMigrationClient/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 VmMigrationClient::listLocationsAsync()} . + * + * @example samples/V1/VmMigrationClient/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/VmMigration/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..6a432b19446a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json @@ -0,0 +1,258 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.vmmigration.v1", + "libraryPackage": "Google\\Cloud\\VMMigration\\V1", + "services": { + "VmMigration": { + "clients": { + "grpc": { + "libraryClient": "VmMigrationGapicClient", + "rpcs": { + "AddGroupMigration": { + "methods": [ + "addGroupMigration" + ] + }, + "CancelCloneJob": { + "methods": [ + "cancelCloneJob" + ] + }, + "CancelCutoverJob": { + "methods": [ + "cancelCutoverJob" + ] + }, + "CreateCloneJob": { + "methods": [ + "createCloneJob" + ] + }, + "CreateCutoverJob": { + "methods": [ + "createCutoverJob" + ] + }, + "CreateDatacenterConnector": { + "methods": [ + "createDatacenterConnector" + ] + }, + "CreateGroup": { + "methods": [ + "createGroup" + ] + }, + "CreateMigratingVm": { + "methods": [ + "createMigratingVm" + ] + }, + "CreateSource": { + "methods": [ + "createSource" + ] + }, + "CreateTargetProject": { + "methods": [ + "createTargetProject" + ] + }, + "CreateUtilizationReport": { + "methods": [ + "createUtilizationReport" + ] + }, + "DeleteDatacenterConnector": { + "methods": [ + "deleteDatacenterConnector" + ] + }, + "DeleteGroup": { + "methods": [ + "deleteGroup" + ] + }, + "DeleteMigratingVm": { + "methods": [ + "deleteMigratingVm" + ] + }, + "DeleteSource": { + "methods": [ + "deleteSource" + ] + }, + "DeleteTargetProject": { + "methods": [ + "deleteTargetProject" + ] + }, + "DeleteUtilizationReport": { + "methods": [ + "deleteUtilizationReport" + ] + }, + "FetchInventory": { + "methods": [ + "fetchInventory" + ] + }, + "FinalizeMigration": { + "methods": [ + "finalizeMigration" + ] + }, + "GetCloneJob": { + "methods": [ + "getCloneJob" + ] + }, + "GetCutoverJob": { + "methods": [ + "getCutoverJob" + ] + }, + "GetDatacenterConnector": { + "methods": [ + "getDatacenterConnector" + ] + }, + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "GetMigratingVm": { + "methods": [ + "getMigratingVm" + ] + }, + "GetReplicationCycle": { + "methods": [ + "getReplicationCycle" + ] + }, + "GetSource": { + "methods": [ + "getSource" + ] + }, + "GetTargetProject": { + "methods": [ + "getTargetProject" + ] + }, + "GetUtilizationReport": { + "methods": [ + "getUtilizationReport" + ] + }, + "ListCloneJobs": { + "methods": [ + "listCloneJobs" + ] + }, + "ListCutoverJobs": { + "methods": [ + "listCutoverJobs" + ] + }, + "ListDatacenterConnectors": { + "methods": [ + "listDatacenterConnectors" + ] + }, + "ListGroups": { + "methods": [ + "listGroups" + ] + }, + "ListMigratingVms": { + "methods": [ + "listMigratingVms" + ] + }, + "ListReplicationCycles": { + "methods": [ + "listReplicationCycles" + ] + }, + "ListSources": { + "methods": [ + "listSources" + ] + }, + "ListTargetProjects": { + "methods": [ + "listTargetProjects" + ] + }, + "ListUtilizationReports": { + "methods": [ + "listUtilizationReports" + ] + }, + "PauseMigration": { + "methods": [ + "pauseMigration" + ] + }, + "RemoveGroupMigration": { + "methods": [ + "removeGroupMigration" + ] + }, + "ResumeMigration": { + "methods": [ + "resumeMigration" + ] + }, + "StartMigration": { + "methods": [ + "startMigration" + ] + }, + "UpdateGroup": { + "methods": [ + "updateGroup" + ] + }, + "UpdateMigratingVm": { + "methods": [ + "updateMigratingVm" + ] + }, + "UpdateSource": { + "methods": [ + "updateSource" + ] + }, + "UpdateTargetProject": { + "methods": [ + "updateTargetProject" + ] + }, + "UpgradeAppliance": { + "methods": [ + "upgradeAppliance" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json new file mode 100644 index 000000000000..51f53c73dcb5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json @@ -0,0 +1,292 @@ +{ + "interfaces": { + "google.cloud.vmmigration.v1.VmMigration": { + "retry_codes": { + "no_retry_codes": [], + "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 + }, + "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": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 900000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 900000, + "total_timeout_millis": 900000 + } + }, + "methods": { + "AddGroupMigration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CancelCloneJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CancelCutoverJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCloneJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCutoverJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateDatacenterConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateMigratingVm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSource": { + "timeout_millis": 900000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "CreateTargetProject": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUtilizationReport": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteDatacenterConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteMigratingVm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTargetProject": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteUtilizationReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "FetchInventory": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "FinalizeMigration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCloneJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCutoverJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDatacenterConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetMigratingVm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetReplicationCycle": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetTargetProject": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetUtilizationReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListCloneJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListCutoverJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListDatacenterConnectors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListMigratingVms": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListReplicationCycles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListSources": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListTargetProjects": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListUtilizationReports": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PauseMigration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RemoveGroupMigration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResumeMigration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartMigration": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateMigratingVm": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTargetProject": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpgradeAppliance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php new file mode 100644 index 000000000000..7a4fee565d72 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php @@ -0,0 +1,891 @@ + [ + 'google.cloud.vmmigration.v1.VmMigration' => [ + 'AddGroupMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\AddGroupMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group', + 'fieldAccessors' => [ + 'getGroup', + ], + ], + ], + ], + 'CancelCloneJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCloneJobResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CancelCutoverJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCutoverJobResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCloneJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CloneJob', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCutoverJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CutoverJob', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDatacenterConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DatacenterConnector', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMigratingVm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTargetProject' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUtilizationReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UtilizationReport', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDatacenterConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMigratingVm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTargetProject' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUtilizationReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FinalizeMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\FinalizeMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'PauseMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\PauseMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'RemoveGroupMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RemoveGroupMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group', + 'fieldAccessors' => [ + 'getGroup', + ], + ], + ], + ], + 'ResumeMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ResumeMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'StartMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\StartMigrationResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm', + 'fieldAccessors' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group.name', + 'fieldAccessors' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMigratingVm' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'migrating_vm.name', + 'fieldAccessors' => [ + 'getMigratingVm', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'source.name', + 'fieldAccessors' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + 'UpdateTargetProject' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'target_project.name', + 'fieldAccessors' => [ + 'getTargetProject', + 'getName', + ], + ], + ], + ], + 'UpgradeAppliance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UpgradeApplianceResponse', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'datacenter_connector', + 'fieldAccessors' => [ + 'getDatacenterConnector', + ], + ], + ], + ], + 'FetchInventory' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\FetchInventoryResponse', + 'headerParams' => [ + [ + 'keyName' => 'source', + 'fieldAccessors' => [ + 'getSource', + ], + ], + ], + ], + 'GetCloneJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\CloneJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCutoverJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\CutoverJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDatacenterConnector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\DatacenterConnector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMigratingVm' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\MigratingVm', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReplicationCycle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ReplicationCycle', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\Source', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTargetProject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\TargetProject', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUtilizationReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\UtilizationReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCloneJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCloneJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListCloneJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCutoverJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCutoverJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListCutoverJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatacenterConnectors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDatacenterConnectors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMigratingVms' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMigratingVms', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListMigratingVmsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReplicationCycles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReplicationCycles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListReplicationCyclesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListSourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTargetProjects' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTargetProjects', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListTargetProjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUtilizationReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUtilizationReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListUtilizationReportsResponse', + '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' => [ + 'cloneJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}', + 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', + 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', + 'group' => 'projects/{project}/locations/{location}/groups/{group}', + 'location' => 'projects/{project}/locations/{location}', + 'migratingVm' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}', + 'replicationCycle' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}', + 'source' => 'projects/{project}/locations/{location}/sources/{source}', + 'targetProject' => 'projects/{project}/locations/{location}/targetProjects/{target_project}', + 'utilizationReport' => 'projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php new file mode 100644 index 000000000000..a548189e98dc --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php @@ -0,0 +1,682 @@ + [ + '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.vmmigration.v1.VmMigration' => [ + 'AddGroupMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:addGroupMigration', + 'body' => '*', + 'placeholders' => [ + 'group' => [ + 'getters' => [ + 'getGroup', + ], + ], + ], + ], + 'CancelCloneJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CancelCutoverJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCloneJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', + 'body' => 'clone_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'clone_job_id', + ], + ], + 'CreateCutoverJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', + 'body' => 'cutover_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cutover_job_id', + ], + ], + 'CreateDatacenterConnector' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', + 'body' => 'datacenter_connector', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'datacenter_connector_id', + ], + ], + 'CreateGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'body' => 'group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'CreateMigratingVm' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', + 'body' => 'migrating_vm', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'migrating_vm_id', + ], + ], + 'CreateSource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', + 'body' => 'source', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'source_id', + ], + ], + 'CreateTargetProject' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', + 'body' => 'target_project', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'target_project_id', + ], + ], + 'CreateUtilizationReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', + 'body' => 'utilization_report', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'utilization_report_id', + ], + ], + 'DeleteDatacenterConnector' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMigratingVm' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSource' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTargetProject' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUtilizationReport' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FetchInventory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', + 'placeholders' => [ + 'source' => [ + 'getters' => [ + 'getSource', + ], + ], + ], + ], + 'FinalizeMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:finalizeMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'GetCloneJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCutoverJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDatacenterConnector' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMigratingVm' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReplicationCycle' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/replicationCycles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTargetProject' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUtilizationReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCloneJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListCutoverJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListDatacenterConnectors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListMigratingVms' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListReplicationCycles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/replicationCycles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListSources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListTargetProjects' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListUtilizationReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'PauseMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:pauseMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'RemoveGroupMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:removeGroupMigration', + 'body' => '*', + 'placeholders' => [ + 'group' => [ + 'getters' => [ + 'getGroup', + ], + ], + ], + ], + 'ResumeMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:resumeMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'StartMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateMigratingVm' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{migrating_vm.name=projects/*/locations/*/sources/*/migratingVms/*}', + 'body' => 'migrating_vm', + 'placeholders' => [ + 'migrating_vm.name' => [ + 'getters' => [ + 'getMigratingVm', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{source.name=projects/*/locations/*/sources/*}', + 'body' => 'source', + 'placeholders' => [ + 'source.name' => [ + 'getters' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + 'UpdateTargetProject' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{target_project.name=projects/*/locations/*/targetProjects/*}', + 'body' => 'target_project', + 'placeholders' => [ + 'target_project.name' => [ + 'getters' => [ + 'getTargetProject', + 'getName', + ], + ], + ], + ], + 'UpgradeAppliance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{datacenter_connector=projects/*/locations/*/sources/*/datacenterConnectors/*}:upgradeAppliance', + 'body' => '*', + 'placeholders' => [ + 'datacenter_connector' => [ + 'getters' => [ + 'getDatacenterConnector', + ], + ], + ], + ], + ], + '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/*}', + '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/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php new file mode 100644 index 000000000000..880e93315bcb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php @@ -0,0 +1,5156 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VmMigrationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VmMigrationClient($options); + } + + /** @test */ + public function addGroupMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new AddGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->addGroupMigration($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.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + $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 addGroupMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $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 + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new AddGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->addGroupMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + 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 cancelCloneJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelCloneJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelCloneJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new CancelCloneJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCloneJob($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.vmmigration.v1.VmMigration/CancelCloneJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); + $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 cancelCloneJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCloneJobTest'); + $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->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new CancelCloneJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCloneJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); + 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 cancelCutoverJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelCutoverJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelCutoverJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new CancelCutoverJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCutoverJob($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.vmmigration.v1.VmMigration/CancelCutoverJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); + $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 cancelCutoverJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelCutoverJobTest'); + $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->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new CancelCutoverJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelCutoverJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); + 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 createCloneJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloneJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new CloneJob(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCloneJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cloneJobId = 'cloneJobId-1008685569'; + $cloneJob = new CloneJob(); + $request = (new CreateCloneJobRequest()) + ->setParent($formattedParent) + ->setCloneJobId($cloneJobId) + ->setCloneJob($cloneJob); + $response = $gapicClient->createCloneJob($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.vmmigration.v1.VmMigration/CreateCloneJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCloneJobId(); + $this->assertProtobufEquals($cloneJobId, $actualValue); + $actualValue = $actualApiRequestObject->getCloneJob(); + $this->assertProtobufEquals($cloneJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); + $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 createCloneJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloneJobTest'); + $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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cloneJobId = 'cloneJobId-1008685569'; + $cloneJob = new CloneJob(); + $request = (new CreateCloneJobRequest()) + ->setParent($formattedParent) + ->setCloneJobId($cloneJobId) + ->setCloneJob($cloneJob); + $response = $gapicClient->createCloneJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); + 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 createCutoverJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCutoverJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $progressPercent = 2137894861; + $stateMessage = 'stateMessage29641305'; + $expectedResponse = new CutoverJob(); + $expectedResponse->setName($name); + $expectedResponse->setProgressPercent($progressPercent); + $expectedResponse->setStateMessage($stateMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCutoverJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cutoverJobId = 'cutoverJobId504048422'; + $cutoverJob = new CutoverJob(); + $request = (new CreateCutoverJobRequest()) + ->setParent($formattedParent) + ->setCutoverJobId($cutoverJobId) + ->setCutoverJob($cutoverJob); + $response = $gapicClient->createCutoverJob($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.vmmigration.v1.VmMigration/CreateCutoverJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCutoverJobId(); + $this->assertProtobufEquals($cutoverJobId, $actualValue); + $actualValue = $actualApiRequestObject->getCutoverJob(); + $this->assertProtobufEquals($cutoverJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); + $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 createCutoverJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCutoverJobTest'); + $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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $cutoverJobId = 'cutoverJobId504048422'; + $cutoverJob = new CutoverJob(); + $request = (new CreateCutoverJobRequest()) + ->setParent($formattedParent) + ->setCutoverJobId($cutoverJobId) + ->setCutoverJob($cutoverJob); + $response = $gapicClient->createCutoverJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); + 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 createDatacenterConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $registrationId = 'registrationId-412573087'; + $serviceAccount = 'serviceAccount-1948028253'; + $version = 'version351608024'; + $bucket = 'bucket-1378203158'; + $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; + $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; + $expectedResponse = new DatacenterConnector(); + $expectedResponse->setName($name); + $expectedResponse->setRegistrationId($registrationId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setVersion($version); + $expectedResponse->setBucket($bucket); + $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); + $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatacenterConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = 'datacenterConnectorId1629428237'; + $datacenterConnector = new DatacenterConnector(); + $request = (new CreateDatacenterConnectorRequest()) + ->setParent($formattedParent) + ->setDatacenterConnectorId($datacenterConnectorId) + ->setDatacenterConnector($datacenterConnector); + $response = $gapicClient->createDatacenterConnector($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.vmmigration.v1.VmMigration/CreateDatacenterConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatacenterConnectorId(); + $this->assertProtobufEquals($datacenterConnectorId, $actualValue); + $actualValue = $actualApiRequestObject->getDatacenterConnector(); + $this->assertProtobufEquals($datacenterConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); + $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 createDatacenterConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatacenterConnectorTest'); + $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $datacenterConnectorId = 'datacenterConnectorId1629428237'; + $datacenterConnector = new DatacenterConnector(); + $request = (new CreateDatacenterConnectorRequest()) + ->setParent($formattedParent) + ->setDatacenterConnectorId($datacenterConnectorId) + ->setDatacenterConnector($datacenterConnector); + $response = $gapicClient->createDatacenterConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); + 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 createGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + $response = $gapicClient->createGroup($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.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + $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 createGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $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]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + $response = $gapicClient->createGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + 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 createMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = 'migratingVmId-899085236'; + $migratingVm = new MigratingVm(); + $request = (new CreateMigratingVmRequest()) + ->setParent($formattedParent) + ->setMigratingVmId($migratingVmId) + ->setMigratingVm($migratingVm); + $response = $gapicClient->createMigratingVm($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.vmmigration.v1.VmMigration/CreateMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMigratingVmId(); + $this->assertProtobufEquals($migratingVmId, $actualValue); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($migratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); + $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 createMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMigratingVmTest'); + $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $migratingVmId = 'migratingVmId-899085236'; + $migratingVm = new MigratingVm(); + $request = (new CreateMigratingVmRequest()) + ->setParent($formattedParent) + ->setMigratingVmId($migratingVmId) + ->setMigratingVm($migratingVm); + $response = $gapicClient->createMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); + 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 createSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $request = (new CreateSourceRequest()) + ->setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + $response = $gapicClient->createSource($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.vmmigration.v1.VmMigration/CreateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceId(); + $this->assertProtobufEquals($sourceId, $actualValue); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + $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 createSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $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]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $request = (new CreateSourceRequest()) + ->setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + $response = $gapicClient->createSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + 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 createTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetProjectId = 'targetProjectId1255314287'; + $targetProject = new TargetProject(); + $request = (new CreateTargetProjectRequest()) + ->setParent($formattedParent) + ->setTargetProjectId($targetProjectId) + ->setTargetProject($targetProject); + $response = $gapicClient->createTargetProject($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.vmmigration.v1.VmMigration/CreateTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTargetProjectId(); + $this->assertProtobufEquals($targetProjectId, $actualValue); + $actualValue = $actualApiRequestObject->getTargetProject(); + $this->assertProtobufEquals($targetProject, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); + $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 createTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTargetProjectTest'); + $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]'); + $targetProjectId = 'targetProjectId1255314287'; + $targetProject = new TargetProject(); + $request = (new CreateTargetProjectRequest()) + ->setParent($formattedParent) + ->setTargetProjectId($targetProjectId) + ->setTargetProject($targetProject); + $response = $gapicClient->createTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); + 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 createUtilizationReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $vmCount = 261463431; + $expectedResponse = new UtilizationReport(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVmCount($vmCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createUtilizationReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReport = new UtilizationReport(); + $utilizationReportId = 'utilizationReportId-1346894295'; + $request = (new CreateUtilizationReportRequest()) + ->setParent($formattedParent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + $response = $gapicClient->createUtilizationReport($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.vmmigration.v1.VmMigration/CreateUtilizationReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getUtilizationReport(); + $this->assertProtobufEquals($utilizationReport, $actualValue); + $actualValue = $actualApiRequestObject->getUtilizationReportId(); + $this->assertProtobufEquals($utilizationReportId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); + $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 createUtilizationReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createUtilizationReportTest'); + $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $utilizationReport = new UtilizationReport(); + $utilizationReportId = 'utilizationReportId-1346894295'; + $request = (new CreateUtilizationReportRequest()) + ->setParent($formattedParent) + ->setUtilizationReport($utilizationReport) + ->setUtilizationReportId($utilizationReportId); + $response = $gapicClient->createUtilizationReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); + 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 deleteDatacenterConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatacenterConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new DeleteDatacenterConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatacenterConnector($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.vmmigration.v1.VmMigration/DeleteDatacenterConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); + $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 deleteDatacenterConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); + $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->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new DeleteDatacenterConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatacenterConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); + 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 deleteGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGroup($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.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + $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 deleteGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $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->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + 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 deleteMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new DeleteMigratingVmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMigratingVm($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.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + $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 deleteMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new DeleteMigratingVmRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + 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 deleteSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new DeleteSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSource($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.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + $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 deleteSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new DeleteSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + 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 deleteTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new DeleteTargetProjectRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTargetProject($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.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + $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 deleteTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $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->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new DeleteTargetProjectRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + 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 deleteUtilizationReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteUtilizationReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new DeleteUtilizationReportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteUtilizationReport($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.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + $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 deleteUtilizationReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $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->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new DeleteUtilizationReportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteUtilizationReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + 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 fetchInventoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new FetchInventoryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new FetchInventoryRequest()) + ->setSource($formattedSource); + $response = $gapicClient->fetchInventory($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.vmmigration.v1.VmMigration/FetchInventory', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($formattedSource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchInventoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new FetchInventoryRequest()) + ->setSource($formattedSource); + try { + $gapicClient->fetchInventory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new FinalizeMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/finalizeMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new FinalizeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->finalizeMigration($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.vmmigration.v1.VmMigration/FinalizeMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + $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 finalizeMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/finalizeMigrationTest'); + $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 + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new FinalizeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->finalizeMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + 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 getCloneJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new CloneJob(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new GetCloneJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getCloneJob($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.vmmigration.v1.VmMigration/GetCloneJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloneJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); + $request = (new GetCloneJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getCloneJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCutoverJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $progressPercent = 2137894861; + $stateMessage = 'stateMessage29641305'; + $expectedResponse = new CutoverJob(); + $expectedResponse->setName($name2); + $expectedResponse->setProgressPercent($progressPercent); + $expectedResponse->setStateMessage($stateMessage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new GetCutoverJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getCutoverJob($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.vmmigration.v1.VmMigration/GetCutoverJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCutoverJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); + $request = (new GetCutoverJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getCutoverJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatacenterConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $registrationId = 'registrationId-412573087'; + $serviceAccount = 'serviceAccount-1948028253'; + $version = 'version351608024'; + $bucket = 'bucket-1378203158'; + $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; + $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; + $expectedResponse = new DatacenterConnector(); + $expectedResponse->setName($name2); + $expectedResponse->setRegistrationId($registrationId); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setVersion($version); + $expectedResponse->setBucket($bucket); + $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); + $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new GetDatacenterConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->getDatacenterConnector($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.vmmigration.v1.VmMigration/GetDatacenterConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatacenterConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new GetDatacenterConnectorRequest()) + ->setName($formattedName); + try { + $gapicClient->getDatacenterConnector($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + $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.cloud.vmmigration.v1.VmMigration/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $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 + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + 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 getMigratingVmTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name2); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new GetMigratingVmRequest()) + ->setName($formattedName); + $response = $gapicClient->getMigratingVm($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.vmmigration.v1.VmMigration/GetMigratingVm', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMigratingVmExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new GetMigratingVmRequest()) + ->setName($formattedName); + try { + $gapicClient->getMigratingVm($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationCycleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cycleNumber = 1095724862; + $progressPercent = 2137894861; + $expectedResponse = new ReplicationCycle(); + $expectedResponse->setName($name2); + $expectedResponse->setCycleNumber($cycleNumber); + $expectedResponse->setProgressPercent($progressPercent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + $request = (new GetReplicationCycleRequest()) + ->setName($formattedName); + $response = $gapicClient->getReplicationCycle($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.vmmigration.v1.VmMigration/GetReplicationCycle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationCycleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); + $request = (new GetReplicationCycleRequest()) + ->setName($formattedName); + try { + $gapicClient->getReplicationCycle($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new GetSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->getSource($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.vmmigration.v1.VmMigration/GetSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new GetSourceRequest()) + ->setName($formattedName); + try { + $gapicClient->getSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTargetProjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name2); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new GetTargetProjectRequest()) + ->setName($formattedName); + $response = $gapicClient->getTargetProject($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.vmmigration.v1.VmMigration/GetTargetProject', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTargetProjectExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $request = (new GetTargetProjectRequest()) + ->setName($formattedName); + try { + $gapicClient->getTargetProject($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUtilizationReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $vmCount = 261463431; + $expectedResponse = new UtilizationReport(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVmCount($vmCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new GetUtilizationReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getUtilizationReport($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.vmmigration.v1.VmMigration/GetUtilizationReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUtilizationReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); + $request = (new GetUtilizationReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getUtilizationReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloneJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cloneJobsElement = new CloneJob(); + $cloneJobs = [ + $cloneJobsElement, + ]; + $expectedResponse = new ListCloneJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCloneJobs($cloneJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCloneJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listCloneJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCloneJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloneJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCloneJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listCloneJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCutoverJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cutoverJobsElement = new CutoverJob(); + $cutoverJobs = [ + $cutoverJobsElement, + ]; + $expectedResponse = new ListCutoverJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCutoverJobs($cutoverJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCutoverJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listCutoverJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCutoverJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCutoverJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListCutoverJobsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listCutoverJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatacenterConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $datacenterConnectorsElement = new DatacenterConnector(); + $datacenterConnectors = [ + $datacenterConnectorsElement, + ]; + $expectedResponse = new ListDatacenterConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDatacenterConnectors($datacenterConnectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListDatacenterConnectorsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listDatacenterConnectors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDatacenterConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatacenterConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListDatacenterConnectorsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listDatacenterConnectors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupsElement = new Group(); + $groups = [ + $groupsElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroups($groups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListGroupsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListGroupsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigratingVmsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $migratingVmsElement = new MigratingVm(); + $migratingVms = [ + $migratingVmsElement, + ]; + $expectedResponse = new ListMigratingVmsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMigratingVms($migratingVms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListMigratingVmsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listMigratingVms($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMigratingVms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMigratingVmsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListMigratingVmsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listMigratingVms($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationCyclesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $replicationCyclesElement = new ReplicationCycle(); + $replicationCycles = [ + $replicationCyclesElement, + ]; + $expectedResponse = new ListReplicationCyclesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReplicationCycles($replicationCycles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListReplicationCyclesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listReplicationCycles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReplicationCycles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationCyclesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListReplicationCyclesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listReplicationCycles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sourcesElement = new Source(); + $sources = [ + $sourcesElement, + ]; + $expectedResponse = new ListSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSources($sources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListSourcesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listSources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListSourcesRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTargetProjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $targetProjectsElement = new TargetProject(); + $targetProjects = [ + $targetProjectsElement, + ]; + $expectedResponse = new ListTargetProjectsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTargetProjects($targetProjects); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListTargetProjectsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listTargetProjects($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTargetProjects()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTargetProjectsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListTargetProjectsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listTargetProjects($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUtilizationReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $utilizationReportsElement = new UtilizationReport(); + $utilizationReports = [ + $utilizationReportsElement, + ]; + $expectedResponse = new ListUtilizationReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUtilizationReports($utilizationReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListUtilizationReportsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + $response = $gapicClient->listUtilizationReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUtilizationReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPageToken(); + $this->assertProtobufEquals($pageToken, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUtilizationReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $pageToken = 'pageToken1630607433'; + $request = (new ListUtilizationReportsRequest()) + ->setParent($formattedParent) + ->setPageToken($pageToken); + try { + $gapicClient->listUtilizationReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/pauseMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new PauseMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/pauseMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new PauseMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->pauseMigration($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.vmmigration.v1.VmMigration/PauseMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); + $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 pauseMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/pauseMigrationTest'); + $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 + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new PauseMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->pauseMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); + 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 removeGroupMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RemoveGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new RemoveGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->removeGroupMigration($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.vmmigration.v1.VmMigration/RemoveGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); + $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 removeGroupMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeGroupMigrationTest'); + $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 + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new RemoveGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->removeGroupMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); + 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 resumeMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ResumeMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resumeMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new ResumeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->resumeMigration($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.vmmigration.v1.VmMigration/ResumeMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); + $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 resumeMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeMigrationTest'); + $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 + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new ResumeMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->resumeMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); + 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 startMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StartMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new StartMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->startMigration($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.vmmigration.v1.VmMigration/StartMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startMigrationTest'); + $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 startMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startMigrationTest'); + $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 + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new StartMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->startMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startMigrationTest'); + 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 updateGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($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.vmmigration.v1.VmMigration/UpdateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + $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 updateGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $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 + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + 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 updateMigratingVmTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMigratingVmTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $sourceVmId = 'sourceVmId1673059967'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $group = 'group98629247'; + $expectedResponse = new MigratingVm(); + $expectedResponse->setName($name); + $expectedResponse->setSourceVmId($sourceVmId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setGroup($group); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMigratingVmTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $migratingVm = new MigratingVm(); + $request = (new UpdateMigratingVmRequest()) + ->setMigratingVm($migratingVm); + $response = $gapicClient->updateMigratingVm($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.vmmigration.v1.VmMigration/UpdateMigratingVm', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($migratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); + $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 updateMigratingVmExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMigratingVmTest'); + $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 + $migratingVm = new MigratingVm(); + $request = (new UpdateMigratingVmRequest()) + ->setMigratingVm($migratingVm); + $response = $gapicClient->updateMigratingVm($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); + 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 updateSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $source = new Source(); + $request = (new UpdateSourceRequest()) + ->setSource($source); + $response = $gapicClient->updateSource($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.vmmigration.v1.VmMigration/UpdateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + $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 updateSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $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 + $source = new Source(); + $request = (new UpdateSourceRequest()) + ->setSource($source); + $response = $gapicClient->updateSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + 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 updateTargetProjectTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTargetProjectTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $project = 'project-309310695'; + $description = 'description-1724546052'; + $expectedResponse = new TargetProject(); + $expectedResponse->setName($name); + $expectedResponse->setProject($project); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTargetProjectTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $targetProject = new TargetProject(); + $request = (new UpdateTargetProjectRequest()) + ->setTargetProject($targetProject); + $response = $gapicClient->updateTargetProject($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.vmmigration.v1.VmMigration/UpdateTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTargetProject(); + $this->assertProtobufEquals($targetProject, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); + $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 updateTargetProjectExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTargetProjectTest'); + $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 + $targetProject = new TargetProject(); + $request = (new UpdateTargetProjectRequest()) + ->setTargetProject($targetProject); + $response = $gapicClient->updateTargetProject($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); + 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 upgradeApplianceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeApplianceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpgradeApplianceResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeApplianceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new UpgradeApplianceRequest()) + ->setDatacenterConnector($formattedDatacenterConnector); + $response = $gapicClient->upgradeAppliance($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.vmmigration.v1.VmMigration/UpgradeAppliance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDatacenterConnector(); + $this->assertProtobufEquals($formattedDatacenterConnector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); + $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 upgradeApplianceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeApplianceTest'); + $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 + $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); + $request = (new UpgradeApplianceRequest()) + ->setDatacenterConnector($formattedDatacenterConnector); + $response = $gapicClient->upgradeAppliance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); + 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 addGroupMigrationAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addGroupMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddGroupMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addGroupMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new AddGroupMigrationRequest()) + ->setGroup($formattedGroup); + $response = $gapicClient->addGroupMigrationAsync($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.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); + $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/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php b/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php new file mode 100644 index 0000000000000000000000000000000000000000..dc42348b2eabf2bd60e9c11feff4ac468ed8c0a7 GIT binary patch literal 34481 zcmdU2X^b4lbl$YLX(kT<&O>B1H~GQoG#clH#=@DcV*B8qLo1?v6Cu zJ(-?ak`h+F;)Hghz>1t878Juk5JQUNIB^aqcJ4Tb^(%1@ARvsKMi47-VmKF&A3(15eT)F19D!Ijl zTcw6=J9AaX&Ml5eKM&Ks5pqfkwpTBe?d;U__+`6Us+5|g!W8YMaF%paxEbiCaC77& zLgiY?^RmI;qnA+@{;RiUYSnVqYnGbu&)%w6tUA?ZwN$IV1X7*K&X#JP4IPBr&bFL# zv+6ooLU7e7+XoJ2S)Zis-nt7~IF%KQO%ug{QVJKGrrmH#wZeq$l^fN1(``&c(|mr; zZu;sZzd3M_4@ztuk)UmlmsTqXW_l&a9h`?3&FjF0pJ{Tas)` z^qE3omt1GA(Q=%sGgr7;C(e^j;l3TgEKV-en|G3H!6&84zg+TO?11)06}+!mTBz%3 zso5VsUFAkTR;l%ZGnIWtwC_PTPhm+RYR*`dk zt5Eo&_y-V@v&p>kj{-mak4&@$m|fmN$nCdiiYa6btj}an|D~$eoNiPX0n4e`d)MqA zYQaR~6KF*pAlYg5XR?_CtH%%i-B{oMjO{@W*W5C*-C-sJ=-V3xxX)eUAMi%Bx?Y;I ziylB}e;-gU#~2~{tET&+?es4rJ>qp}#cZ_(pxFNa{doggwS$^=bxf z*D&bS0jg{~j@H!~=S4aL9&ozsz?#uP&Y0d#hJ(`LZD_q?-)oHty8w7E}^Z{=m8R*xUL?hx*9|WBpX%K739PE9!Po?hHKivUyI(m zn2TL#gQTQlwL+(4_4qPi5}!kBrO$L~QmK&jvkjpJGaNDiolo*1g9p&sMTn^os_mld z)Y#0fqTj49fzZ#?$tRuAA=Zc;cEH+WFq3qUBJm9>{F>1LVI#shhJ9?*2}BK+G5uv= zdcv;RdZxRy1F*-S9;qoZJz}(c)`h%@P7u={-i6jw>{{tgaUN1Ck7|86ZGHX+?q)LM z>(GP6z;|mA?Rdt4U%bbxTc6FKO~i}O)>YkCJXOK7vqA%~d9(W)}% znuE(eVK~|#G|Xj8i7QvoM!*$L+jjaOq#UAhm#h9uLJ&f5~g$M1ra3_cVo6_01QVf6Tb0L1UsjCL+S8!p25M}*_}_X66? zkVN7CgcMBD%zPw%fb(x47JkL8*uDdvR2(qXNXde{RYV&D<8rqeLCYP&2=^%~-lqu9 zkq%{@N9(|MNE_ie$0YR~ppIjqY@Fi|a_j93+DUkwyv-JBki$aS=C$?Jz4s(jT7t~z zXEJD41g~7j7Z8TThORh^B_Rn{_~CekD+-9zy*^2Tta9+2-7L>vv75Kt#*5P~th4VZ zeYTZ)0j+ab!(yGbtk*K=P$CB3J55^8q3vMBijssuk4Xl7 zgevARIuxfEr6=p#VB0JrC||@F-P`shw82&kjwf5`%#B5aEZU^@MgoqHtbGd9wPS|$ zRgjg%g$P+Yix0h(PfqlFu`7hKTLFQ8p&V} zM5lS8KRoxpqiChaIO6cNHy*wieM;1V*#!q=q{1hTOMW*<{cbO^;{1+vVEqWByvzjU z9y_x|Eyam)8A95%R;>-dV@eiq-+(tkSc9d)Ly_!qbGVAO zw2^^|Q*0169bh}3>J!e}NWqd7*6=20Z?Rw+9HVV=-!LA={i;58+L>m%8r5c#~`(W+##tubD{epXe5Sz2;@*e zJS0a?>?9h>KgYMuF1d4XrZRWkZY+L(F1Q*+>h44X+e=75gdN? zuY@mjA9|T}7xr=p3Xp~PjXU*rcGAVxce1Qg%}T5fXV4af6^=!DID-cMicP{GhoMK} zVMxf65`m@>1_Tns0vz%Z_zcn1;t{krE*}+LSQWJW`n-GVigz2(rvk@1aMJB(_*3dB z06X$Yy&-FT5bYwP+$_TYcH=&dgtwqoEeHto&?T^fc?Au?*(|8;zRDTx%AbaOn=!QDLK(7b)q3O80SQC zN6`RWD4>24I{C)1tkHEX+%o~Q)=3R!?!1X6ReD-;WD>k z7BrT?j>%cnA!K7(y2dZ;ugCiTUh*GI|PZ^_rO5B&>R^_&u?L;+V>Qh;D z>ZvEW^=j)jza=BH#bY|TCBr@x8;X*hUJ-mukmHw=Z1xKj|;hh}>N2#AcaFl*8`iJ1?2p6KP zCku{JU-uBD zpxwp3LC>P~&%r#AXszdy2kNKM)J8JzzM_GuY9h^yzW^iXbz3y8)}bq+cTqmlV6k3am-Ej653Q3)h7Nt3VTgENhz)M4}d)e z;~@sc#OY0lA$VHumKh%Kqp#e_~i*BkBmQWu`$2{Lwyy z<-CNlZqQ|zLU6xJ$Q&p%9ro{Np}^-xJ>3;`1#WOJQHMhyGAn{{=F_=K=keQBMJCZS;Uw1Svtx5PuD@l^`6i?DDW-MH6f*gc^<4hfKn;^RkScr|}bJ>a`Tpe$S_yzagusSFdEQJ&kf0pY zx*kLf!E$E`XZ#Z6_-B6e)33)6Ws^8>hT;&B5a(n^w0v@I%9AsNCp*D&QI6qPwBon> z(4GV}kobH&^9i~TYPisYp14vL?u{vD*EIjSiEpr=Egfq|rQUplo>r&Al?9mp{4A+j z4b3AaSs0k8@&Oxi@-T(aM7nZF>qgMjg#n~7_0a4STL%N!!UCTvm%-MxL_#z})ciGw zB74z#bwpkCJjA1?U|!TP52?Qp@$>^$Z(JiEs$#{T2VJqCsd8@6m6j->u6`rAu6C+A z8B#;=3!^uwYp4xV#bQD1qX_Ytu(n`peG3b?DYc~~N~o<5gSI*h*HeScaJqJ>-_M{m zB)qbcPY)Z)=K@WIkO>wEymN77+qxtNh*S7vCjo+$mwNaMka_@cu|Z6!hu=`JpQtX? zdMb!#g5NaC=gjhm{UCEP&ay#+!M1{H17>{;ENcf^!TZ-i6=n>DobJ--IGqdjIhCt1 z5*n0v=`a3X25loI<2#jKQRv|(;$v$BnNYx~4yk!Gepa@?i}*qU3k*l!oDVMn!TuJo zBp68jPo|7aOC$s~IA&PG*877tDzXn=Vf^A|gM$skI;@8t@F)Pd* zs%%IpK2u*y*-Bg-eNKtj?Z&Y{lGN@Z^az!R{Yn^4tj8$2gnA@6+hGL1ILHjFCk_dl z3-l2TsRq**kb3R&W2Oghk^r#(SI2zI{Fhc+<`l!n3vm1{_ZLiJiAqJ=?LD)nec5~}Bwj`3|`kl9Cf-U8)7YY9w=l3))T_KBs& zLdYZWP@&LpBs(o58Qh^Vr-(~*Uyjy-W4Qaa20%z~ZdzFdnhLfPmT6m01W`)x8K-x$ z*-4osfCT9(4p&*5Vn>)laD6ad*#KmslH0QHjmd|obW7|izRWZoJd%vs5mS6Zv-Aw5pZ#I%b$59nq$eG+eQb{}(VqQ%-IQFd7mery;<+3J{v) zJYF-^*R3mEOm!n%G*6B(KhcM_QE4>FF)TVG$Py~zwayjsKI>YyiU>r_WhHDvGN*?zoGnR!iT^M0`zDy$~#$d3Y0fXIx*2%P5i#^B_ea^I~sUK2)7ODO@ zi_K~}739||-C=k}ioYGK@MxGVmcGg~33cLjoWC9&?8uZ~hk0k1BlByTcO6Ya89$qN z-ghW75`wCmqi31_iqlBuq_J4V`{Xy0>Gp4E=I@D1n!#(!CV(PNs=Mc$=#pk|Ac*Sp zk1vo@$>8S1Bxcga+O_K0fLA$Qn|_U!rsFU5p{>kq)t6CB>7|}3;k17hrhOmU5E@gr zw9j#e4?l)76#kWP`ycG=a1uI{U+T$g9(D1rEvW2!rcH8U6(J&_GDA8aLCdY9H`f+I z;^V)9=mx=7W!e484`{+ScWW*rh^}U zXVDRHg$~osH|UQ7cP7)N8(jRna=Qk<>Ms~%1`};1N+b!@@n%wW3@B=7DF-Px_!+F+ zEKv~V$^Z)w=>zt8_}-x;oXI@o|5ebYel!h>&?wTE=Q+|+H zQ5-r&XafHQoHauBq+#2%8KkEY!W!;~YR0psf{9ihcP`Vn_!E+vK|Fja9y>@%t)mli z85}5@oF~#3R1-Lo4l^9uQ0MF#FdMY80;h;H+m|HctZg8Voh-a|su!Q(6uxS>A zLIRp>I)Y3HXt3!orm^YWob#YDt3j(c$}i-KTOq!Y#zw5LPDs4cSv5RxzKzA4)T)Xg zOQ@%b z>jQG{OZhn>DZd~>z&y-=8O%d8LSzG&hv?Gp=!Yf3{|)|o&DOr4V}iN}G9iv(20z&4 z3?_NEAuKN}?ue`~g#%Zi*k_S0mTdZ7BzIczzS}p(hUc5jx|h%8Zr!@2e9VVu~!)xfOM#QQZ9F4!)^D_UxrQBT2ohjACnXs38neWjr&8&bn zP4~!tl;!^oWt)wbeefjme?$HdQMH`U@2z^ps#7I@&8GU2UCExJEl<*ROK1t9{{wV( BhgSdq literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php b/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php new file mode 100644 index 0000000000000000000000000000000000000000..bd32522cabe183d922ba74c55bf779420c9282b4 GIT binary patch literal 16539 zcmd5@-ESLLb`ME?9!WGc{-Tv^%#7W{-c6{rl57$>PBQ$k%$Oosl9J<8#e^b9(!|sZ z!x_p}QX$2nKwA`jSzs3^+5!cNEzo^h6zKNjX;Bm?(8umWUxOBC0sjdBitRb~-Wkq} z#w4Z4@#Y~GXXc*!alU`&+;`va?snlyYE?6|UengvsjY*Qy{o0VJ<~Q@W+%1P-`>`G zsg}9d)jL`*ol4~^sdA-}D&&iemvE?M_IoWYliD%OosPEL>X`lZ^8Vh#W>3?M9o^8D z_iy-qt38d6vC?c70He95S>0w!ORZM3Ynt6`H|^%;DkHd=BZ8Y79)g=2H*Ny7I!((; zd7sxDy6^?0@V{<V|IX&5r&#ZuC}ayVw=@HxW2=|Jn>WKc%a0-qy8FJFD$B z_jR+E$qaTiATo4l(bzVRH_YM1_@mrY%=b|e@$gSDw4tLQ+0DIf_*llc*WS|wo0N9j z<;rao?rZKj(y6`zKmQ!wIk8krFYuvhrVwebLZtU^EIls>H@o`sHgN}KbKB$!v2@Av z(oq)i>P7L2X%5QVa$B61cz-$g-gb_Je<1%N3JYb;erWa{t`#=cUb(gvL8Ygf58s|FvOoMhj;^_3F&TDbu}4Nvn$;NGk>8jfYI zqy=UT#N5&+a5_ju%fUBN;>0PziZsTcMYNvT%_HA`v>scsf z$r+qxk~SNYmSCZ6SgNJ<@TIDEle5l2#N;Bx%Vt|^9CS5ta2L^X;S;rG_6<83amYla z7h$p0w`_9{U-g{#QRjU`{+kF~sN1N)@waPtYuY)a_|#aeG=@?U*g535@n^ z_B!(8Yvl^OLEz@W>dj|tDw1nf3k^c{1zS`6G(K9eJEG@zW8Edg1 zc4lwDT&t(y7b=NblIECOSrRMbLWgpic2$#~G>+ix1%(aE%BE6VH(zDX*5Zi4%N-nZ_ zUK&2noz^41YaC=)kCM_jgUXf|bQ7lcTWEr`Uh*s(_*=tg+u$Gb850oe>+R$@S~Gu= zg$WyVHF*Ia#aEVx)AF4VsW{PyEd5s$7LS~lgnBQIU&Sd&?}e@W3>KL|pm_zmt>knn zhT`_y$C&@fjA_5&u?mLWJD?RtrQd<1Wx8Ypa%+egh z9%u)A=h97>+;4XJj^@8Qd^$h9O!V!D+<{4^Fw%KgtT&WKL0vD`tA$+gcCnC8JSPE6 zDY-^*qmYP5^DvXE6_iG?yqbv8uk~u4|BBIfx0PZE$4uf1r}KqUp@Bc9=tp(Ewn}5B zrJoUx&-C)n5L>`SWnO>#?rvV`glTlNj_K%D%73!Aw>rnpZ7)%f=!&C|bobAur1`A_^BT2%XlQB?8 zNTG^&a|z}R3ILhCM_1s6%`xd5Ix`Vp@<5rzN}+)vDO8NB!n=-=k$S{et_>GU+Ji^K z_xIvB*8o|kp z6N`o4zxotA^Oqz&+NDoVM?{=+73?S3a2`21-l6>0F_^0Nw=nn)6OZ$- zfC(Yxx@xa!>}Z@n62=fa7`i`f9uUunKeIHN^qYsnTut9|IJm$#_}$?gzj(gd3;BIg2p_`NjW0 zZJq(im6BEqmATgMgc{~=S)sj&5HsMYZ8I3GnLXV;V93Ozv)z zGp(@Uq_!xHc*G2H6>?XD1cymc6uFREm^)G~@%FLjDRyfl<>-~>1@gDwU(c&3~ChSObwMK57K=RBM9L%$0B;MiO8*VV0y4;7+^mTvH%$kE)3vyv`grM-J64JvlgB zb`Du_72jvc*;BQL_TW(d@gyvi%pEKz?9>@J7iQGIO%rh*W_C@>W?+~b;6-UwB<0K? zFtZ+&?vmXQn$2^k5vhQ0p9n1RvE+H8QWfTe0yCdP=udoQg!1_5)mgcQQeaL|C=c^> z%)7}om~ke>DCS(XR%ujnl~O=Zry;hUucDaZAB|iUvvK;PR8Pd{k9xg?!9PlHtx&2a zCgocIgNdc*;bOhAUdt8K#{FtA-N!+N`bR~s02{fwg4y>^P*i^uf$PIOm2aEUDMh0l zugsxzir)euK9qkw0W%c+(s_o7WH3YE2rSD5@Ksy4x(G(AOo}{t1*Qr6de81RJ8G-j z7x*$I7d%psz5@x{wCU{tUM3+FuP?ytp0;Nq^1HJ&ki?k8XMCVqSpT9|#B(v^I=s-_ zZ|a@qRtJ%*Aa-qG@Dp=BeGeuc=tes^&tz{Djw#M2eHVxD;0ZNnySb-#&?F=m$QSU( zC75qDyUi_pVbiNPzKXAm$o`$9Pv@MW3>J&Y@4^Jlhz>7tw^+^xWY>%RL-9#VR!>ASyN?wOt_~AdXX(^kDBpm&9M%dDH^suHMNvv0%NGNXp2aO#DaC?Mn`gE1zr-McP%U{P zMD`Kty{jFB3Gd15=^e+jlR(Eu!H>apc*Er9Ax`lXU!zKhqbI=@cFVQBRG=A-BVuB! zY#>0WWJ?Z|SSi=n*9hP90gJKBU!lGEiwL|rjDf+GOPz5UITZ6--VJaD*^Q4>|4AIm zzl=Z(m%w62QO~5Dg&7zO`d##a9T|bNyqH1f6<^tWWq7=WguRTI7oZ5sY-MEd3Gv!E z07G&GVk`d~_ki&K)7b+Oe)1mPKItChf5gyIR364$w~L(evmaqG1?{J?^go}5vmtn? zwC4w4S$IY!ID#g4Zso(_q7p(d?Rn-zf1Z-X6}Ygc8*Z_J*)m>2CE;ZbDI(EF%|~G$ zky#NRy$y*Lc2lTr^P!=3HO$U91~<2I$yqe&B}c2Qv@Ho8 zCZW%oie+JzAu#$;EJ)1o=Q;-j`QxSkh{0lTiwERgU9%jh3!x!%=`-)k)KpAzAL8WX zZFe~gX_#9XQPcA*zyZF~gDtULN^Q8bgYX8n^{65s@XSK~`&4GpUNZ+b=&M=>r@*Pozrv4=*Uk{Y`+hQZFey&53|q#lSvp+F7fRmJ=hRIJ0zIVr4JzP ze~hMds%`EyQPDj0R8lGIHW1Oag<2!R#c1Xa&_nXCu4yk@R?iu?-21}R!6|gIW zr?piL4bZda8lG7fR}yH`Vaemma1Q$*Fg{#IOk(cH0SdI6S*DTtofr^ZH%v24X>z+Qybdy+fsZ7sN-`z>ay(?qjOrdZf)w zSo9u03(^_L8y{uR1M47h5|54~>r_z`Y10$ivv?;2wr63>&WxKpg<)v8j%? zCi^aocHlet7crP8_M-ut*t;a($?Wj?VIvx!KAJttG zk#%i{nw>o83#qmP^i%dEYP0y5??h{}-bZF}Vh9$`wz0L0*8#@D_q_W|=bf<(1(6?! z?i9o=LZC5}@BIC;vR2Hgq!?JwQEQd;24%A-!qhu+lSD?wd;*KN-MW?BD55s3eT5w9C`(W7Z#H}4M%;j< zC!fh?jEvKw%iC*k?i01>F8y1?4WFE&M(9E_2!`aHbu$u{uQ_zVHU5L~ym=TKJ-%Ho zj{pD`VPUQ5f-SVMm>#bvCN~#N`E*$?GrHR&T$R4F(p>|1|QfBPAx2ydJudP1^7e_f4^$)AjnxIv^eyv@-UH+ic0lbL_QoapZ( z@W!zC;z?&L9gZuI!_mt@i=ST-F(MhfQZb2AKSwcDx44`hX5%nVe>*&se~DPt2D|g) zzc%oU8_)yd$Ixf2pU->5kNgcK$s_QakjSlp)h^C9c)B@K^R2_)N*1) z(Z|A7aYW59jFuBWxz1@I+!)MHV2-rI+R4-a$iATzo|tZotE49?g{^i)K`H?YOB zH6j*3b8vjKfvOdVStmW=!IX?}DZlyp3Jom(wcvPy~DxmsZrBXRr{mC@mP&lLM1E;;#d*aZ>^ z;?8Rqm%=k}p1Ek1iz>gyEgHY@7z`bc@K>sgYd*U{Yly~EJfrJE!bBd*KZ`)Zxyt8U zhej_t?`x2t>Rf!~o#BcTq>>)=HE_V;8@D>h{~3WrjP)qvsA|1E-J(mCVP+nu!p#~j zy^DeD&8T$JWB^5{CfapT{e*PG(Ty|{AEKiI@O z_m88OIe|=uQOIPxB=FabttmWf+kE{M_agPH{QA1*wmVr;y%loPoqfsgqaVT{!2bg~ CTSx~0 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php new file mode 100644 index 000000000000..dfb01afca794 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php @@ -0,0 +1,240 @@ +google.cloud.vmwareengine.v1.AutoscalingSettings + */ +class AutoscalingSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The map with autoscaling policies applied to the cluster. + * The key is the identifier of the policy. + * It must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * Currently there map must contain only one element + * that describes the autoscaling policy for compute nodes. + * + * Generated from protobuf field map autoscaling_policies = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $autoscaling_policies; + /** + * Optional. Minimum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * + * Generated from protobuf field int32 min_cluster_node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_cluster_node_count = 0; + /** + * Optional. Maximum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * + * Generated from protobuf field int32 max_cluster_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_cluster_node_count = 0; + /** + * Optional. The minimum duration between consecutive autoscale operations. + * It starts once addition or removal of nodes is fully completed. + * Defaults to 30 minutes if not specified. Cool down period must be in whole + * minutes (for example, 30, 31, 50, 180 minutes). + * + * Generated from protobuf field .google.protobuf.Duration cool_down_period = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cool_down_period = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $autoscaling_policies + * Required. The map with autoscaling policies applied to the cluster. + * The key is the identifier of the policy. + * It must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * Currently there map must contain only one element + * that describes the autoscaling policy for compute nodes. + * @type int $min_cluster_node_count + * Optional. Minimum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * @type int $max_cluster_node_count + * Optional. Maximum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * @type \Google\Protobuf\Duration $cool_down_period + * Optional. The minimum duration between consecutive autoscale operations. + * It starts once addition or removal of nodes is fully completed. + * Defaults to 30 minutes if not specified. Cool down period must be in whole + * minutes (for example, 30, 31, 50, 180 minutes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The map with autoscaling policies applied to the cluster. + * The key is the identifier of the policy. + * It must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * Currently there map must contain only one element + * that describes the autoscaling policy for compute nodes. + * + * Generated from protobuf field map autoscaling_policies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAutoscalingPolicies() + { + return $this->autoscaling_policies; + } + + /** + * Required. The map with autoscaling policies applied to the cluster. + * The key is the identifier of the policy. + * It must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * Currently there map must contain only one element + * that describes the autoscaling policy for compute nodes. + * + * Generated from protobuf field map autoscaling_policies = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAutoscalingPolicies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\AutoscalingPolicy::class); + $this->autoscaling_policies = $arr; + + return $this; + } + + /** + * Optional. Minimum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * + * Generated from protobuf field int32 min_cluster_node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinClusterNodeCount() + { + return $this->min_cluster_node_count; + } + + /** + * Optional. Minimum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * + * Generated from protobuf field int32 min_cluster_node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinClusterNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->min_cluster_node_count = $var; + + return $this; + } + + /** + * Optional. Maximum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * + * Generated from protobuf field int32 max_cluster_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxClusterNodeCount() + { + return $this->max_cluster_node_count; + } + + /** + * Optional. Maximum number of nodes of any type in a cluster. + * If not specified the default limits apply. + * + * Generated from protobuf field int32 max_cluster_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxClusterNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->max_cluster_node_count = $var; + + return $this; + } + + /** + * Optional. The minimum duration between consecutive autoscale operations. + * It starts once addition or removal of nodes is fully completed. + * Defaults to 30 minutes if not specified. Cool down period must be in whole + * minutes (for example, 30, 31, 50, 180 minutes). + * + * Generated from protobuf field .google.protobuf.Duration cool_down_period = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getCoolDownPeriod() + { + return $this->cool_down_period; + } + + public function hasCoolDownPeriod() + { + return isset($this->cool_down_period); + } + + public function clearCoolDownPeriod() + { + unset($this->cool_down_period); + } + + /** + * Optional. The minimum duration between consecutive autoscale operations. + * It starts once addition or removal of nodes is fully completed. + * Defaults to 30 minutes if not specified. Cool down period must be in whole + * minutes (for example, 30, 31, 50, 180 minutes). + * + * Generated from protobuf field .google.protobuf.Duration cool_down_period = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setCoolDownPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->cool_down_period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php new file mode 100644 index 000000000000..3a898fccb275 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php @@ -0,0 +1,305 @@ +google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy + */ +class AutoscalingPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The canonical identifier of the node type to add or remove. + * Corresponds to the `NodeType`. + * + * Generated from protobuf field string node_type_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node_type_id = ''; + /** + * Required. Number of nodes to add to a cluster during a scale-out + * operation. Must be divisible by 2 for stretched clusters. During a + * scale-in operation only one node (or 2 for stretched clusters) are + * removed in a single iteration. + * + * Generated from protobuf field int32 scale_out_size = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scale_out_size = 0; + /** + * Optional. Utilization thresholds pertaining to CPU utilization. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds cpu_thresholds = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu_thresholds = null; + /** + * Optional. Utilization thresholds pertaining to amount of granted memory. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds granted_memory_thresholds = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $granted_memory_thresholds = null; + /** + * Optional. Utilization thresholds pertaining to amount of consumed memory. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds consumed_memory_thresholds = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $consumed_memory_thresholds = null; + /** + * Optional. Utilization thresholds pertaining to amount of consumed + * storage. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds storage_thresholds = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_thresholds = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $node_type_id + * Required. The canonical identifier of the node type to add or remove. + * Corresponds to the `NodeType`. + * @type int $scale_out_size + * Required. Number of nodes to add to a cluster during a scale-out + * operation. Must be divisible by 2 for stretched clusters. During a + * scale-in operation only one node (or 2 for stretched clusters) are + * removed in a single iteration. + * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $cpu_thresholds + * Optional. Utilization thresholds pertaining to CPU utilization. + * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $granted_memory_thresholds + * Optional. Utilization thresholds pertaining to amount of granted memory. + * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $consumed_memory_thresholds + * Optional. Utilization thresholds pertaining to amount of consumed memory. + * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $storage_thresholds + * Optional. Utilization thresholds pertaining to amount of consumed + * storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The canonical identifier of the node type to add or remove. + * Corresponds to the `NodeType`. + * + * Generated from protobuf field string node_type_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNodeTypeId() + { + return $this->node_type_id; + } + + /** + * Required. The canonical identifier of the node type to add or remove. + * Corresponds to the `NodeType`. + * + * Generated from protobuf field string node_type_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNodeTypeId($var) + { + GPBUtil::checkString($var, True); + $this->node_type_id = $var; + + return $this; + } + + /** + * Required. Number of nodes to add to a cluster during a scale-out + * operation. Must be divisible by 2 for stretched clusters. During a + * scale-in operation only one node (or 2 for stretched clusters) are + * removed in a single iteration. + * + * Generated from protobuf field int32 scale_out_size = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getScaleOutSize() + { + return $this->scale_out_size; + } + + /** + * Required. Number of nodes to add to a cluster during a scale-out + * operation. Must be divisible by 2 for stretched clusters. During a + * scale-in operation only one node (or 2 for stretched clusters) are + * removed in a single iteration. + * + * Generated from protobuf field int32 scale_out_size = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setScaleOutSize($var) + { + GPBUtil::checkInt32($var); + $this->scale_out_size = $var; + + return $this; + } + + /** + * Optional. Utilization thresholds pertaining to CPU utilization. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds cpu_thresholds = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null + */ + public function getCpuThresholds() + { + return $this->cpu_thresholds; + } + + public function hasCpuThresholds() + { + return isset($this->cpu_thresholds); + } + + public function clearCpuThresholds() + { + unset($this->cpu_thresholds); + } + + /** + * Optional. Utilization thresholds pertaining to CPU utilization. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds cpu_thresholds = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var + * @return $this + */ + public function setCpuThresholds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); + $this->cpu_thresholds = $var; + + return $this; + } + + /** + * Optional. Utilization thresholds pertaining to amount of granted memory. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds granted_memory_thresholds = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null + */ + public function getGrantedMemoryThresholds() + { + return $this->granted_memory_thresholds; + } + + public function hasGrantedMemoryThresholds() + { + return isset($this->granted_memory_thresholds); + } + + public function clearGrantedMemoryThresholds() + { + unset($this->granted_memory_thresholds); + } + + /** + * Optional. Utilization thresholds pertaining to amount of granted memory. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds granted_memory_thresholds = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var + * @return $this + */ + public function setGrantedMemoryThresholds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); + $this->granted_memory_thresholds = $var; + + return $this; + } + + /** + * Optional. Utilization thresholds pertaining to amount of consumed memory. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds consumed_memory_thresholds = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null + */ + public function getConsumedMemoryThresholds() + { + return $this->consumed_memory_thresholds; + } + + public function hasConsumedMemoryThresholds() + { + return isset($this->consumed_memory_thresholds); + } + + public function clearConsumedMemoryThresholds() + { + unset($this->consumed_memory_thresholds); + } + + /** + * Optional. Utilization thresholds pertaining to amount of consumed memory. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds consumed_memory_thresholds = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var + * @return $this + */ + public function setConsumedMemoryThresholds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); + $this->consumed_memory_thresholds = $var; + + return $this; + } + + /** + * Optional. Utilization thresholds pertaining to amount of consumed + * storage. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds storage_thresholds = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null + */ + public function getStorageThresholds() + { + return $this->storage_thresholds; + } + + public function hasStorageThresholds() + { + return isset($this->storage_thresholds); + } + + public function clearStorageThresholds() + { + unset($this->storage_thresholds); + } + + /** + * Optional. Utilization thresholds pertaining to amount of consumed + * storage. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds storage_thresholds = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var + * @return $this + */ + public function setStorageThresholds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); + $this->storage_thresholds = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AutoscalingPolicy::class, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings_AutoscalingPolicy::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php new file mode 100644 index 000000000000..fe2d594d86a2 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php @@ -0,0 +1,105 @@ +google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds + */ +class Thresholds extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The utilization triggering the scale-out operation in percent. + * + * Generated from protobuf field int32 scale_out = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scale_out = 0; + /** + * Required. The utilization triggering the scale-in operation in percent. + * + * Generated from protobuf field int32 scale_in = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scale_in = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $scale_out + * Required. The utilization triggering the scale-out operation in percent. + * @type int $scale_in + * Required. The utilization triggering the scale-in operation in percent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The utilization triggering the scale-out operation in percent. + * + * Generated from protobuf field int32 scale_out = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getScaleOut() + { + return $this->scale_out; + } + + /** + * Required. The utilization triggering the scale-out operation in percent. + * + * Generated from protobuf field int32 scale_out = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setScaleOut($var) + { + GPBUtil::checkInt32($var); + $this->scale_out = $var; + + return $this; + } + + /** + * Required. The utilization triggering the scale-in operation in percent. + * + * Generated from protobuf field int32 scale_in = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getScaleIn() + { + return $this->scale_in; + } + + /** + * Required. The utilization triggering the scale-in operation in percent. + * + * Generated from protobuf field int32 scale_in = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setScaleIn($var) + { + GPBUtil::checkInt32($var); + $this->scale_in = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Thresholds::class, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings_Thresholds::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php new file mode 100644 index 000000000000..c00a5b6ae2e1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php @@ -0,0 +1,411 @@ +google.cloud.vmwareengine.v1.Cluster + */ +class Cluster extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. State of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * + * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $management = false; + /** + * Optional. Configuration of the autoscaling applied to this cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings autoscaling_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $autoscaling_settings = null; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + private $node_type_configs; + /** + * Optional. Configuration of a stretched cluster. Required for clusters that + * belong to a STRETCHED private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stretched_cluster_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type int $state + * Output only. State of the resource. + * @type bool $management + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings $autoscaling_settings + * Optional. Configuration of the autoscaling applied to this cluster. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type array|\Google\Protobuf\Internal\MapField $node_type_configs + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * @type \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $stretched_cluster_config + * Optional. Configuration of a stretched cluster. Required for clusters that + * belong to a STRETCHED private cloud. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * 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 this cluster. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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. State of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Cluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * + * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getManagement() + { + return $this->management; + } + + /** + * Output only. True if the cluster is a management cluster; false otherwise. + * There can only be one management cluster in a private cloud + * and it has to be the first one. + * + * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setManagement($var) + { + GPBUtil::checkBool($var); + $this->management = $var; + + return $this; + } + + /** + * Optional. Configuration of the autoscaling applied to this cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings autoscaling_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings|null + */ + public function getAutoscalingSettings() + { + return $this->autoscaling_settings; + } + + public function hasAutoscalingSettings() + { + return isset($this->autoscaling_settings); + } + + public function clearAutoscalingSettings() + { + unset($this->autoscaling_settings); + } + + /** + * Optional. Configuration of the autoscaling applied to this cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings autoscaling_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings $var + * @return $this + */ + public function setAutoscalingSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings::class); + $this->autoscaling_settings = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNodeTypeConfigs() + { + return $this->node_type_configs; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNodeTypeConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); + $this->node_type_configs = $arr; + + return $this; + } + + /** + * Optional. Configuration of a stretched cluster. Required for clusters that + * belong to a STRETCHED private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig|null + */ + public function getStretchedClusterConfig() + { + return $this->stretched_cluster_config; + } + + public function hasStretchedClusterConfig() + { + return isset($this->stretched_cluster_config); + } + + public function clearStretchedClusterConfig() + { + unset($this->stretched_cluster_config); + } + + /** + * Optional. Configuration of a stretched cluster. Required for clusters that + * belong to a STRETCHED private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $var + * @return $this + */ + public function setStretchedClusterConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig::class); + $this->stretched_cluster_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php new file mode 100644 index 000000000000..d4cfba915406 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php @@ -0,0 +1,87 @@ +google.cloud.vmwareengine.v1.Cluster.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Cluster is operational and can be used by the user. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The Cluster is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Adding or removing of a node to the cluster, any other cluster specific + * updates. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The Cluster is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The Cluster is undergoing maintenance, for example: a failed node is + * getting replaced. + * + * Generated from protobuf enum REPAIRING = 5; + */ + const REPAIRING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::REPAIRING => 'REPAIRING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Cluster_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php new file mode 100644 index 000000000000..9194b7c095aa --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php @@ -0,0 +1,306 @@ +google.cloud.vmwareengine.v1.CreateClusterRequest + */ +class CreateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The initial description of the new cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. 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 = ''; + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The initial description of the new cluster. + * @param string $clusterId Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\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. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $cluster_id + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\Cluster $cluster + * Required. The initial description of the new cluster. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to create a new cluster + * in. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * This identifier must be unique among clusters within the parent and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * 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 initial description of the new cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The initial description of the new cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. 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. 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; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php new file mode 100644 index 000000000000..ca58f7c39894 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php @@ -0,0 +1,313 @@ +google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest + */ +class CreateExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy + * to create a new external access firewall rule in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The initial description of a new external access rule. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_access_rule = null; + /** + * Required. The user-provided identifier of the `ExternalAccessRule` to be + * created. This identifier must be unique among `ExternalAccessRule` + * resources within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string external_access_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_access_rule_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the network policy + * to create a new external access firewall rule in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $externalAccessRule Required. The initial description of a new external access rule. + * @param string $externalAccessRuleId Required. The user-provided identifier of the `ExternalAccessRule` to be + * created. This identifier must be unique among `ExternalAccessRule` + * resources within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateExternalAccessRuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $externalAccessRule, string $externalAccessRuleId): self + { + return (new self()) + ->setParent($parent) + ->setExternalAccessRule($externalAccessRule) + ->setExternalAccessRuleId($externalAccessRuleId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the network policy + * to create a new external access firewall rule in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @type \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $external_access_rule + * Required. The initial description of a new external access rule. + * @type string $external_access_rule_id + * Required. The user-provided identifier of the `ExternalAccessRule` to be + * created. This identifier must be unique among `ExternalAccessRule` + * resources within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy + * to create a new external access firewall rule in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * 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 network policy + * to create a new external access firewall rule in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * 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 initial description of a new external access rule. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\ExternalAccessRule|null + */ + public function getExternalAccessRule() + { + return $this->external_access_rule; + } + + public function hasExternalAccessRule() + { + return isset($this->external_access_rule); + } + + public function clearExternalAccessRule() + { + unset($this->external_access_rule); + } + + /** + * Required. The initial description of a new external access rule. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $var + * @return $this + */ + public function setExternalAccessRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule::class); + $this->external_access_rule = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the `ExternalAccessRule` to be + * created. This identifier must be unique among `ExternalAccessRule` + * resources within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string external_access_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getExternalAccessRuleId() + { + return $this->external_access_rule_id; + } + + /** + * Required. The user-provided identifier of the `ExternalAccessRule` to be + * created. This identifier must be unique among `ExternalAccessRule` + * resources within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string external_access_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setExternalAccessRuleId($var) + { + GPBUtil::checkString($var, True); + $this->external_access_rule_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php new file mode 100644 index 000000000000..a21a6b76744f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php @@ -0,0 +1,313 @@ +google.cloud.vmwareengine.v1.CreateExternalAddressRequest + */ +class CreateExternalAddressRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to create a new external IP address in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The initial description of a new external IP address. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_address = null; + /** + * Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string external_address_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_address_id = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. The resource name of the private cloud + * to create a new external IP address in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\ExternalAddress $externalAddress Required. The initial description of a new external IP address. + * @param string $externalAddressId Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateExternalAddressRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\ExternalAddress $externalAddress, string $externalAddressId): self + { + return (new self()) + ->setParent($parent) + ->setExternalAddress($externalAddress) + ->setExternalAddressId($externalAddressId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud + * to create a new external IP address in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type \Google\Cloud\VmwareEngine\V1\ExternalAddress $external_address + * Required. The initial description of a new external IP address. + * @type string $external_address_id + * Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to create a new external IP address in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud + * to create a new external IP address in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 initial description of a new external IP address. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\ExternalAddress|null + */ + public function getExternalAddress() + { + return $this->external_address; + } + + public function hasExternalAddress() + { + return isset($this->external_address); + } + + public function clearExternalAddress() + { + unset($this->external_address); + } + + /** + * Required. The initial description of a new external IP address. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\ExternalAddress $var + * @return $this + */ + public function setExternalAddress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); + $this->external_address = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string external_address_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getExternalAddressId() + { + return $this->external_address_id; + } + + /** + * Required. The user-provided identifier of the `ExternalAddress` to be + * created. This identifier must be unique among `ExternalAddress` resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string external_address_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setExternalAddressId($var) + { + GPBUtil::checkString($var, True); + $this->external_address_id = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php new file mode 100644 index 000000000000..7e2526646b8d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php @@ -0,0 +1,313 @@ +google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest + */ +class CreateHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hcx_activation_key = null; + /** + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hcx_activation_key_id = ''; + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @param string $hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey, string $hcxActivationKeyId): self + { + return (new self()) + ->setParent($parent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * @type \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcx_activation_key + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * @type string $hcx_activation_key_id + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type string $request_id + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * 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 private cloud to create the key for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * 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 initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\HcxActivationKey|null + */ + public function getHcxActivationKey() + { + return $this->hcx_activation_key; + } + + public function hasHcxActivationKey() + { + return isset($this->hcx_activation_key); + } + + public function clearHcxActivationKey() + { + unset($this->hcx_activation_key); + } + + /** + * Required. The initial description of a new HCX activation key. When + * creating a new key, this field must be an empty object. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $var + * @return $this + */ + public function setHcxActivationKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); + $this->hcx_activation_key = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHcxActivationKeyId() + { + return $this->hcx_activation_key_id; + } + + /** + * Required. The user-provided identifier of the `HcxActivationKey` to be + * created. This identifier must be unique among `HcxActivationKey` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHcxActivationKeyId($var) + { + GPBUtil::checkString($var, True); + $this->hcx_activation_key_id = $var; + + return $this; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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; + * @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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php new file mode 100644 index 000000000000..c3b6ecf53119 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php @@ -0,0 +1,313 @@ +google.cloud.vmwareengine.v1.CreateLoggingServerRequest + */ +class CreateLoggingServerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to create a new Logging Server in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The initial description of a new logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $logging_server = null; + /** + * Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $logging_server_id = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. The resource name of the private cloud + * to create a new Logging Server in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\LoggingServer $loggingServer Required. The initial description of a new logging server. + * @param string $loggingServerId Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateLoggingServerRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\LoggingServer $loggingServer, string $loggingServerId): self + { + return (new self()) + ->setParent($parent) + ->setLoggingServer($loggingServer) + ->setLoggingServerId($loggingServerId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud + * to create a new Logging Server in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type \Google\Cloud\VmwareEngine\V1\LoggingServer $logging_server + * Required. The initial description of a new logging server. + * @type string $logging_server_id + * Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to create a new Logging Server in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud + * to create a new Logging Server in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 initial description of a new logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\LoggingServer|null + */ + public function getLoggingServer() + { + return $this->logging_server; + } + + public function hasLoggingServer() + { + return isset($this->logging_server); + } + + public function clearLoggingServer() + { + unset($this->logging_server); + } + + /** + * Required. The initial description of a new logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\LoggingServer $var + * @return $this + */ + public function setLoggingServer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\LoggingServer::class); + $this->logging_server = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLoggingServerId() + { + return $this->logging_server_id; + } + + /** + * Required. The user-provided identifier of the `LoggingServer` to be + * created. This identifier must be unique among `LoggingServer` resources + * within the parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLoggingServerId($var) + { + GPBUtil::checkString($var, True); + $this->logging_server_id = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php new file mode 100644 index 000000000000..aa2ffc5ad336 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php @@ -0,0 +1,317 @@ +google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest + */ +class CreateManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to create a new management DNS zone binding for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The initial values for a new management DNS zone binding. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $management_dns_zone_binding = null; + /** + * Required. The user-provided identifier of the `ManagementDnsZoneBinding` + * resource to be created. This identifier must be unique among + * `ManagementDnsZoneBinding` resources within the parent and becomes the + * final token in the name URI. The identifier must meet the following + * requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string management_dns_zone_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $management_dns_zone_binding_id = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. The resource name of the private cloud + * to create a new management DNS zone binding for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding Required. The initial values for a new management DNS zone binding. + * @param string $managementDnsZoneBindingId Required. The user-provided identifier of the `ManagementDnsZoneBinding` + * resource to be created. This identifier must be unique among + * `ManagementDnsZoneBinding` resources within the parent and becomes the + * final token in the name URI. The identifier must meet the following + * requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateManagementDnsZoneBindingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding, string $managementDnsZoneBindingId): self + { + return (new self()) + ->setParent($parent) + ->setManagementDnsZoneBinding($managementDnsZoneBinding) + ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the private cloud + * to create a new management DNS zone binding for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $management_dns_zone_binding + * Required. The initial values for a new management DNS zone binding. + * @type string $management_dns_zone_binding_id + * Required. The user-provided identifier of the `ManagementDnsZoneBinding` + * resource to be created. This identifier must be unique among + * `ManagementDnsZoneBinding` resources within the parent and becomes the + * final token in the name URI. The identifier must meet the following + * requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to create a new management DNS zone binding for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud + * to create a new management DNS zone binding for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 initial values for a new management DNS zone binding. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding|null + */ + public function getManagementDnsZoneBinding() + { + return $this->management_dns_zone_binding; + } + + public function hasManagementDnsZoneBinding() + { + return isset($this->management_dns_zone_binding); + } + + public function clearManagementDnsZoneBinding() + { + unset($this->management_dns_zone_binding); + } + + /** + * Required. The initial values for a new management DNS zone binding. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $var + * @return $this + */ + public function setManagementDnsZoneBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding::class); + $this->management_dns_zone_binding = $var; + + return $this; + } + + /** + * Required. The user-provided identifier of the `ManagementDnsZoneBinding` + * resource to be created. This identifier must be unique among + * `ManagementDnsZoneBinding` resources within the parent and becomes the + * final token in the name URI. The identifier must meet the following + * requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string management_dns_zone_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManagementDnsZoneBindingId() + { + return $this->management_dns_zone_binding_id; + } + + /** + * Required. The user-provided identifier of the `ManagementDnsZoneBinding` + * resource to be created. This identifier must be unique among + * `ManagementDnsZoneBinding` resources within the parent and becomes the + * final token in the name URI. The identifier must meet the following + * requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string management_dns_zone_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManagementDnsZoneBindingId($var) + { + GPBUtil::checkString($var, True); + $this->management_dns_zone_binding_id = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php new file mode 100644 index 000000000000..f7c7bb305194 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php @@ -0,0 +1,308 @@ +google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest + */ +class CreateNetworkPeeringRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to create the new network + * peering in. This value is always `global`, because `NetworkPeering` is a + * global resource. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new `NetworkPeering`. + * This identifier must be unique among `NetworkPeering` resources within the + * parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_peering_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_peering_id = ''; + /** + * Required. The initial description of the new network peering. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_peering = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. The resource name of the location to create the new network + * peering in. This value is always `global`, because `NetworkPeering` is a + * global resource. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\NetworkPeering $networkPeering Required. The initial description of the new network peering. + * @param string $networkPeeringId Required. The user-provided identifier of the new `NetworkPeering`. + * This identifier must be unique among `NetworkPeering` resources within the + * parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateNetworkPeeringRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\NetworkPeering $networkPeering, string $networkPeeringId): self + { + return (new self()) + ->setParent($parent) + ->setNetworkPeering($networkPeering) + ->setNetworkPeeringId($networkPeeringId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to create the new network + * peering in. This value is always `global`, because `NetworkPeering` is a + * global resource. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * @type string $network_peering_id + * Required. The user-provided identifier of the new `NetworkPeering`. + * This identifier must be unique among `NetworkPeering` resources within the + * parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\NetworkPeering $network_peering + * Required. The initial description of the new network peering. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to create the new network + * peering in. This value is always `global`, because `NetworkPeering` is a + * global resource. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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 name of the location to create the new network + * peering in. This value is always `global`, because `NetworkPeering` is a + * global resource. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new `NetworkPeering`. + * This identifier must be unique among `NetworkPeering` resources within the + * parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_peering_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkPeeringId() + { + return $this->network_peering_id; + } + + /** + * Required. The user-provided identifier of the new `NetworkPeering`. + * This identifier must be unique among `NetworkPeering` resources within the + * parent and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_peering_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkPeeringId($var) + { + GPBUtil::checkString($var, True); + $this->network_peering_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new network peering. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPeering|null + */ + public function getNetworkPeering() + { + return $this->network_peering; + } + + public function hasNetworkPeering() + { + return isset($this->network_peering); + } + + public function clearNetworkPeering() + { + unset($this->network_peering); + } + + /** + * Required. The initial description of the new network peering. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPeering $var + * @return $this + */ + public function setNetworkPeering($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering::class); + $this->network_peering = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php new file mode 100644 index 000000000000..de757cee24d1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php @@ -0,0 +1,318 @@ +google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest + */ +class CreateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_policy_id = ''; + /** + * Required. The network policy configuration to use in the request. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_policy = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. The network policy configuration to use in the request. + * @param string $networkPolicyId Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, string $networkPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setNetworkPolicy($networkPolicy) + ->setNetworkPolicyId($networkPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * @type string $network_policy_id + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy + * Required. The network policy configuration to use in the request. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * + * 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 location (region) + * to create the new network policy in. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1` + * + * 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-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetworkPolicyId() + { + return $this->network_policy_id; + } + + /** + * Required. The user-provided identifier of the network policy to be created. + * This identifier must be unique within parent + * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes + * the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetworkPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->network_policy_id = $var; + + return $this; + } + + /** + * Required. The network policy configuration to use in the request. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null + */ + public function getNetworkPolicy() + { + return $this->network_policy; + } + + public function hasNetworkPolicy() + { + return isset($this->network_policy); + } + + public function clearNetworkPolicy() + { + unset($this->network_policy); + } + + /** + * Required. The network policy configuration to use in the request. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var + * @return $this + */ + public function setNetworkPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); + $this->network_policy = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php new file mode 100644 index 000000000000..4b306cdb6911 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php @@ -0,0 +1,306 @@ +google.cloud.vmwareengine.v1.CreatePrivateCloudRequest + */ +class CreatePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_cloud_id = ''; + /** + * Required. The initial description of the new private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_cloud = null; + /** + * Optional. 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 = ''; + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param string $parent Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud Required. The initial description of the new private cloud. + * @param string $privateCloudId Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, string $privateCloudId): self + { + return (new self()) + ->setParent($parent) + ->setPrivateCloud($privateCloud) + ->setPrivateCloudId($privateCloudId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @type string $private_cloud_id + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud + * Required. The initial description of the new private cloud. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that zero + * UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * 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 location to create the new + * private cloud in. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * 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-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrivateCloudId() + { + return $this->private_cloud_id; + } + + /** + * Required. The user-provided identifier of the private cloud to be created. + * This identifier must be unique among each `PrivateCloud` within the parent + * and becomes the final token in the name URI. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrivateCloudId($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + public function hasPrivateCloud() + { + return isset($this->private_cloud); + } + + public function clearPrivateCloud() + { + unset($this->private_cloud); + } + + /** + * Required. The initial description of the new private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. 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. 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; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php new file mode 100644 index 000000000000..a86804b320b0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php @@ -0,0 +1,308 @@ +google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest + */ +class CreatePrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to create the new private + * connection in. Private connection is a regional resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user-provided identifier of the new private connection. + * This identifier must be unique among private connection resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_connection_id = ''; + /** + * Required. The initial description of the new private connection. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_connection = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. The resource name of the location to create the new private + * connection in. Private connection is a regional resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\PrivateConnection $privateConnection Required. The initial description of the new private connection. + * @param string $privateConnectionId Required. The user-provided identifier of the new private connection. + * This identifier must be unique among private connection resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreatePrivateConnectionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\PrivateConnection $privateConnection, string $privateConnectionId): self + { + return (new self()) + ->setParent($parent) + ->setPrivateConnection($privateConnection) + ->setPrivateConnectionId($privateConnectionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to create the new private + * connection in. Private connection is a regional resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1` + * @type string $private_connection_id + * Required. The user-provided identifier of the new private connection. + * This identifier must be unique among private connection resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\PrivateConnection $private_connection + * Required. The initial description of the new private connection. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to create the new private + * connection in. Private connection is a regional resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1` + * + * 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 location to create the new private + * connection in. Private connection is a regional resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-central1` + * + * 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-provided identifier of the new private connection. + * This identifier must be unique among private connection resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrivateConnectionId() + { + return $this->private_connection_id; + } + + /** + * Required. The user-provided identifier of the new private connection. + * This identifier must be unique among private connection resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrivateConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->private_connection_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new private connection. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateConnection|null + */ + public function getPrivateConnection() + { + return $this->private_connection; + } + + public function hasPrivateConnection() + { + return isset($this->private_connection); + } + + public function clearPrivateConnection() + { + unset($this->private_connection); + } + + /** + * Required. The initial description of the new private connection. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateConnection $var + * @return $this + */ + public function setPrivateConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection::class); + $this->private_connection = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..ba26cffddd41 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php @@ -0,0 +1,333 @@ +google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest + */ +class CreateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vmware_engine_network_id = ''; + /** + * Required. The initial description of the new VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vmware_engine_network = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. The initial description of the new VMware Engine network. + * @param string $vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * @return \Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, string $vmwareEngineNetworkId): self + { + return (new self()) + ->setParent($parent) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global` + * @type string $vmware_engine_network_id + * Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network + * Required. The initial description of the new VMware Engine network. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. 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 name of the location to create the new VMware Engine + * network in. A VMware Engine network of type + * `LEGACY` is a regional resource, and a VMware + * Engine network of type `STANDARD` is a global resource. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmwareEngineNetworkId() + { + return $this->vmware_engine_network_id; + } + + /** + * Required. The user-provided identifier of the new VMware Engine network. + * This identifier must be unique among VMware Engine network resources + * within the parent and becomes the final token in the name URI. The + * identifier must meet the following requirements: + * * For networks of type LEGACY, adheres to the format: + * `{region-id}-default`. Replace `{region-id}` with the region where you want + * to create the VMware Engine network. For example, "us-central1-default". + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) + * (section 3.5) + * + * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkId($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_id = $var; + + return $this; + } + + /** + * Required. The initial description of the new VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + public function hasVmwareEngineNetwork() + { + return isset($this->vmware_engine_network); + } + + public function clearVmwareEngineNetwork() + { + unset($this->vmware_engine_network); + } + + /** + * Required. The initial description of the new VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php new file mode 100644 index 000000000000..262d839c299f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php @@ -0,0 +1,101 @@ +google.cloud.vmwareengine.v1.Credentials + */ +class Credentials extends \Google\Protobuf\Internal\Message +{ + /** + * Initial username. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * Initial password. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * Initial username. + * @type string $password + * Initial password. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Initial username. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Initial username. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Initial password. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Initial password. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php new file mode 100644 index 000000000000..9338e958e48b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.DeleteClusterRequest + */ +class DeleteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. 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 resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\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. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @type string $request_id + * Optional. 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the cluster to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. 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. 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php new file mode 100644 index 000000000000..0b810d04d2e5 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest + */ +class DeleteExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * Please see {@see VmwareEngineClient::externalAccessRuleName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteExternalAccessRuleRequest + * + * @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 external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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 external access firewall rule to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php new file mode 100644 index 000000000000..1c37bf2f2a3d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteExternalAddressRequest + */ +class DeleteExternalAddressRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the external IP address to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the external IP address to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * Please see {@see VmwareEngineClient::externalAddressName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteExternalAddressRequest + * + * @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 external IP address to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the external IP address to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * + * 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 external IP address to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php new file mode 100644 index 000000000000..ed81af1f5072 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteLoggingServerRequest + */ +class DeleteLoggingServerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the logging server to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the logging server to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * Please see {@see VmwareEngineClient::loggingServerName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteLoggingServerRequest + * + * @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 logging server to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the logging server to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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 logging server to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php new file mode 100644 index 000000000000..492d3b27efff --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest + */ +class DeleteManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the management DNS zone binding to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the management DNS zone binding to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteManagementDnsZoneBindingRequest + * + * @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 management DNS zone binding to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the management DNS zone binding to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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 management DNS zone binding to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if the original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php new file mode 100644 index 000000000000..1e47b474ef77 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest + */ +class DeleteNetworkPeeringRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network peering to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the network peering to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteNetworkPeeringRequest + * + * @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 network peering to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network peering to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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 network peering to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php new file mode 100644 index 000000000000..557ee72de847 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest + */ +class DeleteNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest + * + * @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 network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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 network policy to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php new file mode 100644 index 000000000000..4421609c05c7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php @@ -0,0 +1,262 @@ +google.cloud.vmwareengine.v1.DeletePrivateCloudRequest + */ +class DeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. 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, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + /** + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * + * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delay_hours = null; + + /** + * @param string $name Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest + * + * @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 private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. 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, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * @type int $delay_hours + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to delete. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 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. 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, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * + * 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, cascade delete is enabled and all children of + * this private cloud resource are also deleted. When this flag is set to + * false, the private cloud will not be deleted if there are any children + * other than the management cluster. The management cluster is always + * deleted. + * + * 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; + } + + /** + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * + * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDelayHours() + { + return isset($this->delay_hours) ? $this->delay_hours : 0; + } + + public function hasDelayHours() + { + return isset($this->delay_hours); + } + + public function clearDelayHours() + { + unset($this->delay_hours); + } + + /** + * Optional. Time delay of the deletion specified in hours. The default value + * is `3`. Specifying a non-zero value for this field changes the value of + * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned + * deletion time. Deletion can be cancelled before `expire_time` elapses using + * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. + * Specifying a value of `0` for this field instead begins the deletion + * process and ceases billing immediately. During the final deletion process, + * the value of `PrivateCloud.state` becomes `PURGING`. + * + * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDelayHours($var) + { + GPBUtil::checkInt32($var); + $this->delay_hours = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php new file mode 100644 index 000000000000..58bb810feba2 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php @@ -0,0 +1,180 @@ +google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest + */ +class DeletePrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private connection to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource name of the private connection to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeletePrivateConnectionRequest + * + * @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 private connection to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private connection to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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 private connection to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..27b7a9e393f0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php @@ -0,0 +1,226 @@ +google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest + */ +class DeleteVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest + * + * @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 VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 string $etag + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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 VMware Engine network to be deleted. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. Checksum used to ensure that the user-provided value is up to + * date before the server processes the request. The server compares provided + * checksum with the current checksum of the resource. If the user-provided + * value is out of date, this request returns an `ABORTED` error. + * + * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php new file mode 100644 index 000000000000..64797809c801 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php @@ -0,0 +1,130 @@ +google.cloud.vmwareengine.v1.DnsBindPermission + */ +class DnsBindPermission extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output only. The name of the resource which stores the + * users/service accounts having the permission to bind to the corresponding + * intranet VPC of the consumer project. DnsBindPermission is a global + * resource and location can only be global. Resource names are schemeless + * URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Users/Service accounts which have access for binding on the + * intranet VPC project corresponding to the consumer project. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Principal principals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $principals; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Output only. The name of the resource which stores the + * users/service accounts having the permission to bind to the corresponding + * intranet VPC of the consumer project. DnsBindPermission is a global + * resource and location can only be global. Resource names are schemeless + * URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * @type array<\Google\Cloud\VmwareEngine\V1\Principal>|\Google\Protobuf\Internal\RepeatedField $principals + * Output only. Users/Service accounts which have access for binding on the + * intranet VPC project corresponding to the consumer project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output only. The name of the resource which stores the + * users/service accounts having the permission to bind to the corresponding + * intranet VPC of the consumer project. DnsBindPermission is a global + * resource and location can only be global. Resource names are schemeless + * URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Output only. The name of the resource which stores the + * users/service accounts having the permission to bind to the corresponding + * intranet VPC of the consumer project. DnsBindPermission is a global + * resource and location can only be global. Resource names are schemeless + * URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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. Users/Service accounts which have access for binding on the + * intranet VPC project corresponding to the consumer project. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Principal principals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrincipals() + { + return $this->principals; + } + + /** + * Output only. Users/Service accounts which have access for binding on the + * intranet VPC project corresponding to the consumer project. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Principal principals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VmwareEngine\V1\Principal>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrincipals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Principal::class); + $this->principals = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php new file mode 100644 index 000000000000..d21001a105d9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php @@ -0,0 +1,207 @@ +google.cloud.vmwareengine.v1.DnsForwarding + */ +class DnsForwarding extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this DNS profile. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. List of domain mappings to configure + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule forwarding_rules = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $forwarding_rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this DNS profile. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type array<\Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule>|\Google\Protobuf\Internal\RepeatedField $forwarding_rules + * Required. List of domain mappings to configure + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this DNS profile. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * + * 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 this DNS profile. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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. List of domain mappings to configure + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule forwarding_rules = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getForwardingRules() + { + return $this->forwarding_rules; + } + + /** + * Required. List of domain mappings to configure + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule forwarding_rules = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setForwardingRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule::class); + $this->forwarding_rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php new file mode 100644 index 000000000000..efb832d58e91 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php @@ -0,0 +1,107 @@ +google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule + */ +class ForwardingRule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Domain used to resolve a `name_servers` list. + * + * Generated from protobuf field string domain = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain = ''; + /** + * Required. List of DNS servers to use for domain resolution + * + * Generated from protobuf field repeated string name_servers = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $name_servers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $domain + * Required. Domain used to resolve a `name_servers` list. + * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers + * Required. List of DNS servers to use for domain resolution + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Domain used to resolve a `name_servers` list. + * + * Generated from protobuf field string domain = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Required. Domain used to resolve a `name_servers` list. + * + * Generated from protobuf field string domain = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * Required. List of DNS servers to use for domain resolution + * + * Generated from protobuf field repeated string name_servers = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNameServers() + { + return $this->name_servers; + } + + /** + * Required. List of DNS servers to use for domain resolution + * + * Generated from protobuf field repeated string name_servers = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNameServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->name_servers = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ForwardingRule::class, \Google\Cloud\VmwareEngine\V1\DnsForwarding_ForwardingRule::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php new file mode 100644 index 000000000000..3df395f4ba3b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php @@ -0,0 +1,620 @@ +google.cloud.vmwareengine.v1.ExternalAccessRule + */ +class ExternalAccessRule extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this external access rule. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-provided description for this external access rule. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * External access rule priority, which determines the external access rule to + * use when multiple rules apply. If multiple rules have the same priority, + * their ordering is non-deterministic. If specific ordering is required, + * assign unique priorities to enforce such ordering. The external access rule + * priority is an integer from 100 to 4096, both inclusive. Lower integers + * indicate higher precedence. For example, a rule with priority `100` has + * higher precedence than a rule with priority `101`. + * + * Generated from protobuf field int32 priority = 6; + */ + protected $priority = 0; + /** + * The action that the external access rule performs. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.Action action = 7; + */ + protected $action = 0; + /** + * The IP protocol to which the external access rule applies. This value can + * be one of the following three protocol strings (not case-sensitive): + * `tcp`, `udp`, or `icmp`. + * + * Generated from protobuf field string ip_protocol = 8; + */ + protected $ip_protocol = ''; + /** + * If source ranges are specified, the external access rule applies only to + * traffic that has a source IP address in these ranges. These ranges can + * either be expressed in the CIDR format or as an IP address. As only inbound + * rules are supported, `ExternalAddress` resources cannot be the source IP + * addresses of an external access rule. To match all source addresses, + * specify `0.0.0.0/0`. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange source_ip_ranges = 9; + */ + private $source_ip_ranges; + /** + * A list of source ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify + * `["0-65535"]`. + * + * Generated from protobuf field repeated string source_ports = 10; + */ + private $source_ports; + /** + * If destination ranges are specified, the external access rule applies only + * to the traffic that has a destination IP address in these ranges. The + * specified IP addresses must have reserved external IP addresses in the + * scope of the parent network policy. To match all external IP addresses in + * the scope of the parent network policy, specify `0.0.0.0/0`. To match a + * specific external IP address, specify it using the + * `IpRange.external_address` property. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange destination_ip_ranges = 11; + */ + private $destination_ip_ranges; + /** + * A list of destination ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, + * specify `["0-65535"]`. + * + * Generated from protobuf field repeated string destination_ports = 12; + */ + private $destination_ports; + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this external access rule. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $description + * User-provided description for this external access rule. + * @type int $priority + * External access rule priority, which determines the external access rule to + * use when multiple rules apply. If multiple rules have the same priority, + * their ordering is non-deterministic. If specific ordering is required, + * assign unique priorities to enforce such ordering. The external access rule + * priority is an integer from 100 to 4096, both inclusive. Lower integers + * indicate higher precedence. For example, a rule with priority `100` has + * higher precedence than a rule with priority `101`. + * @type int $action + * The action that the external access rule performs. + * @type string $ip_protocol + * The IP protocol to which the external access rule applies. This value can + * be one of the following three protocol strings (not case-sensitive): + * `tcp`, `udp`, or `icmp`. + * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $source_ip_ranges + * If source ranges are specified, the external access rule applies only to + * traffic that has a source IP address in these ranges. These ranges can + * either be expressed in the CIDR format or as an IP address. As only inbound + * rules are supported, `ExternalAddress` resources cannot be the source IP + * addresses of an external access rule. To match all source addresses, + * specify `0.0.0.0/0`. + * @type array|\Google\Protobuf\Internal\RepeatedField $source_ports + * A list of source ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify + * `["0-65535"]`. + * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $destination_ip_ranges + * If destination ranges are specified, the external access rule applies only + * to the traffic that has a destination IP address in these ranges. The + * specified IP addresses must have reserved external IP addresses in the + * scope of the parent network policy. To match all external IP addresses in + * the scope of the parent network policy, specify `0.0.0.0/0`. To match a + * specific external IP address, specify it using the + * `IpRange.external_address` property. + * @type array|\Google\Protobuf\Internal\RepeatedField $destination_ports + * A list of destination ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, + * specify `["0-65535"]`. + * @type int $state + * Output only. The state of the resource. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this external access rule. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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 this external access rule. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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; + } + + /** + * User-provided description for this external access rule. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this external access rule. + * + * 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; + } + + /** + * External access rule priority, which determines the external access rule to + * use when multiple rules apply. If multiple rules have the same priority, + * their ordering is non-deterministic. If specific ordering is required, + * assign unique priorities to enforce such ordering. The external access rule + * priority is an integer from 100 to 4096, both inclusive. Lower integers + * indicate higher precedence. For example, a rule with priority `100` has + * higher precedence than a rule with priority `101`. + * + * Generated from protobuf field int32 priority = 6; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * External access rule priority, which determines the external access rule to + * use when multiple rules apply. If multiple rules have the same priority, + * their ordering is non-deterministic. If specific ordering is required, + * assign unique priorities to enforce such ordering. The external access rule + * priority is an integer from 100 to 4096, both inclusive. Lower integers + * indicate higher precedence. For example, a rule with priority `100` has + * higher precedence than a rule with priority `101`. + * + * Generated from protobuf field int32 priority = 6; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * The action that the external access rule performs. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.Action action = 7; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * The action that the external access rule performs. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.Action action = 7; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\Action::class); + $this->action = $var; + + return $this; + } + + /** + * The IP protocol to which the external access rule applies. This value can + * be one of the following three protocol strings (not case-sensitive): + * `tcp`, `udp`, or `icmp`. + * + * Generated from protobuf field string ip_protocol = 8; + * @return string + */ + public function getIpProtocol() + { + return $this->ip_protocol; + } + + /** + * The IP protocol to which the external access rule applies. This value can + * be one of the following three protocol strings (not case-sensitive): + * `tcp`, `udp`, or `icmp`. + * + * Generated from protobuf field string ip_protocol = 8; + * @param string $var + * @return $this + */ + public function setIpProtocol($var) + { + GPBUtil::checkString($var, True); + $this->ip_protocol = $var; + + return $this; + } + + /** + * If source ranges are specified, the external access rule applies only to + * traffic that has a source IP address in these ranges. These ranges can + * either be expressed in the CIDR format or as an IP address. As only inbound + * rules are supported, `ExternalAddress` resources cannot be the source IP + * addresses of an external access rule. To match all source addresses, + * specify `0.0.0.0/0`. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange source_ip_ranges = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSourceIpRanges() + { + return $this->source_ip_ranges; + } + + /** + * If source ranges are specified, the external access rule applies only to + * traffic that has a source IP address in these ranges. These ranges can + * either be expressed in the CIDR format or as an IP address. As only inbound + * rules are supported, `ExternalAddress` resources cannot be the source IP + * addresses of an external access rule. To match all source addresses, + * specify `0.0.0.0/0`. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange source_ip_ranges = 9; + * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSourceIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange::class); + $this->source_ip_ranges = $arr; + + return $this; + } + + /** + * A list of source ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify + * `["0-65535"]`. + * + * Generated from protobuf field repeated string source_ports = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSourcePorts() + { + return $this->source_ports; + } + + /** + * A list of source ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify + * `["0-65535"]`. + * + * Generated from protobuf field repeated string source_ports = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSourcePorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->source_ports = $arr; + + return $this; + } + + /** + * If destination ranges are specified, the external access rule applies only + * to the traffic that has a destination IP address in these ranges. The + * specified IP addresses must have reserved external IP addresses in the + * scope of the parent network policy. To match all external IP addresses in + * the scope of the parent network policy, specify `0.0.0.0/0`. To match a + * specific external IP address, specify it using the + * `IpRange.external_address` property. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange destination_ip_ranges = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinationIpRanges() + { + return $this->destination_ip_ranges; + } + + /** + * If destination ranges are specified, the external access rule applies only + * to the traffic that has a destination IP address in these ranges. The + * specified IP addresses must have reserved external IP addresses in the + * scope of the parent network policy. To match all external IP addresses in + * the scope of the parent network policy, specify `0.0.0.0/0`. To match a + * specific external IP address, specify it using the + * `IpRange.external_address` property. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange destination_ip_ranges = 11; + * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinationIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange::class); + $this->destination_ip_ranges = $arr; + + return $this; + } + + /** + * A list of destination ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, + * specify `["0-65535"]`. + * + * Generated from protobuf field repeated string destination_ports = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinationPorts() + { + return $this->destination_ports; + } + + /** + * A list of destination ports to which the external access rule applies. This + * field is only applicable for the UDP or TCP protocol. + * Each entry must be either an integer or a range. For example: `["22"]`, + * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, + * specify `["0-65535"]`. + * + * Generated from protobuf field repeated string destination_ports = 12; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinationPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->destination_ports = $arr; + + return $this; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php new file mode 100644 index 000000000000..550c0dc3422f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php @@ -0,0 +1,65 @@ +google.cloud.vmwareengine.v1.ExternalAccessRule.Action + */ +class Action +{ + /** + * Defaults to allow. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Allows connections that match the other specified components. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Blocks connections that match the other specified components. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Action::class, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule_Action::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php new file mode 100644 index 000000000000..efa4769037ad --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php @@ -0,0 +1,159 @@ +google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange + */ +class IpRange extends \Google\Protobuf\Internal\Message +{ + protected $ip_range; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * A single IP address. For example: `10.0.0.5`. + * @type string $ip_address_range + * An IP address range in the CIDR format. For example: `10.0.0.0/24`. + * @type string $external_address + * The name of an `ExternalAddress` resource. The external address must + * have been reserved in the scope of this external access rule's parent + * network policy. Provide the external address name in the form of + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * A single IP address. For example: `10.0.0.5`. + * + * Generated from protobuf field string ip_address = 1; + * @return string + */ + public function getIpAddress() + { + return $this->readOneof(1); + } + + public function hasIpAddress() + { + return $this->hasOneof(1); + } + + /** + * A single IP address. For example: `10.0.0.5`. + * + * Generated from protobuf field string ip_address = 1; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An IP address range in the CIDR format. For example: `10.0.0.0/24`. + * + * Generated from protobuf field string ip_address_range = 2; + * @return string + */ + public function getIpAddressRange() + { + return $this->readOneof(2); + } + + public function hasIpAddressRange() + { + return $this->hasOneof(2); + } + + /** + * An IP address range in the CIDR format. For example: `10.0.0.0/24`. + * + * Generated from protobuf field string ip_address_range = 2; + * @param string $var + * @return $this + */ + public function setIpAddressRange($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The name of an `ExternalAddress` resource. The external address must + * have been reserved in the scope of this external access rule's parent + * network policy. Provide the external address name in the form of + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`. + * + * Generated from protobuf field string external_address = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getExternalAddress() + { + return $this->readOneof(3); + } + + public function hasExternalAddress() + { + return $this->hasOneof(3); + } + + /** + * The name of an `ExternalAddress` resource. The external address must + * have been reserved in the scope of this external access rule's parent + * network policy. Provide the external address name in the form of + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`. + * + * Generated from protobuf field string external_address = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setExternalAddress($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getIpRange() + { + return $this->whichOneof("ip_range"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IpRange::class, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule_IpRange::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php new file mode 100644 index 000000000000..1b9722eda691 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.ExternalAccessRule.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; + /** + * The rule is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The rule is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The rule is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The rule is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php new file mode 100644 index 000000000000..8d15877850b6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php @@ -0,0 +1,342 @@ +google.cloud.vmwareengine.v1.ExternalAddress + */ +class ExternalAddress extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this external IP address. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The internal IP address of a workload VM. + * + * Generated from protobuf field string internal_ip = 6; + */ + protected $internal_ip = ''; + /** + * Output only. The external IP address of a workload VM. + * + * Generated from protobuf field string external_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $external_ip = ''; + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * User-provided description for this resource. + * + * Generated from protobuf field string description = 11; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this external IP address. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $internal_ip + * The internal IP address of a workload VM. + * @type string $external_ip + * Output only. The external IP address of a workload VM. + * @type int $state + * Output only. The state of the resource. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $description + * User-provided description for this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this external IP address. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` + * + * 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 this external IP address. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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; + } + + /** + * The internal IP address of a workload VM. + * + * Generated from protobuf field string internal_ip = 6; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * The internal IP address of a workload VM. + * + * Generated from protobuf field string internal_ip = 6; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Output only. The external IP address of a workload VM. + * + * Generated from protobuf field string external_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * Output only. The external IP address of a workload VM. + * + * Generated from protobuf field string external_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ExternalAddress\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * User-provided description for this resource. + * + * Generated from protobuf field string description = 11; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this resource. + * + * Generated from protobuf field string description = 11; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php new file mode 100644 index 000000000000..97dea9cbf984 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.ExternalAddress.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The address is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The address is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The address is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The address is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\ExternalAddress_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php new file mode 100644 index 000000000000..33a7dc9f663b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php @@ -0,0 +1,202 @@ +google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest + */ +class FetchNetworkPolicyExternalAddressesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * Generated from protobuf field string network_policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network_policy = ''; + /** + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous + * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the + * subsequent page. + * When paginating, all parameters provided to + * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and + * `page_token`, must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $networkPolicy Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\FetchNetworkPolicyExternalAddressesRequest + * + * @experimental + */ + public static function build(string $networkPolicy): self + { + return (new self()) + ->setNetworkPolicy($networkPolicy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network_policy + * Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @type int $page_size + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous + * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the + * subsequent page. + * When paginating, all parameters provided to + * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and + * `page_token`, must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * Generated from protobuf field string network_policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetworkPolicy() + { + return $this->network_policy; + } + + /** + * Required. The resource name of the network policy to query for assigned + * external IP addresses. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * Generated from protobuf field string network_policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetworkPolicy($var) + { + GPBUtil::checkString($var, True); + $this->network_policy = $var; + + return $this; + } + + /** + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 + * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the + * subsequent page. + * When paginating, all parameters provided to + * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and + * `page_token`, 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 + * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the + * subsequent page. + * When paginating, all parameters provided to + * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and + * `page_token`, 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php new file mode 100644 index 000000000000..46faea61006d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php @@ -0,0 +1,110 @@ +google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse + */ +class FetchNetworkPolicyExternalAddressesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of external IP addresses assigned to VMware workload VMs within the + * scope of the given network policy. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; + */ + private $external_addresses; + /** + * 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 array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $external_addresses + * A list of external IP addresses assigned to VMware workload VMs within the + * scope of the given network policy. + * @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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of external IP addresses assigned to VMware workload VMs within the + * scope of the given network policy. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExternalAddresses() + { + return $this->external_addresses; + } + + /** + * A list of external IP addresses assigned to VMware workload VMs within the + * scope of the given network policy. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExternalAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); + $this->external_addresses = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php new file mode 100644 index 000000000000..765ce8ca31d1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetClusterRequest + */ +class GetClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\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. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The cluster resource name to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php new file mode 100644 index 000000000000..b198700ee8da --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php @@ -0,0 +1,107 @@ +google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest + */ +class GetDnsBindPermissionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetDnsBindPermissionRequest + * + * @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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php new file mode 100644 index 000000000000..6b6e94423647 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetDnsForwardingRequest + */ +class GetDnsForwardingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of a `DnsForwarding` to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * + * 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 a `DnsForwarding` to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * Please see {@see VmwareEngineClient::dnsForwardingName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetDnsForwardingRequest + * + * @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 a `DnsForwarding` to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of a `DnsForwarding` to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * + * 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 a `DnsForwarding` to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php new file mode 100644 index 000000000000..4d0397c9063e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest + */ +class GetExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the external access firewall rule to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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 external access firewall rule to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * Please see {@see VmwareEngineClient::externalAccessRuleName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetExternalAccessRuleRequest + * + * @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 external access firewall rule to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the external access firewall rule to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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 external access firewall rule to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php new file mode 100644 index 000000000000..d75f2f69ca54 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetExternalAddressRequest + */ +class GetExternalAddressRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the external IP address to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * + * 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 external IP address to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * Please see {@see VmwareEngineClient::externalAddressName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetExternalAddressRequest + * + * @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 external IP address to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the external IP address to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * + * 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 external IP address to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php new file mode 100644 index 000000000000..d561638f4a50 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php @@ -0,0 +1,101 @@ +google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest + */ +class GetHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * 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 HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * Please see {@see VmwareEngineClient::hcxActivationKeyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest + * + * @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 HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * 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 HCX activation key to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php new file mode 100644 index 000000000000..ad4278ca8c84 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetLoggingServerRequest + */ +class GetLoggingServerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Logging Server to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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 Logging Server to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * Please see {@see VmwareEngineClient::loggingServerName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetLoggingServerRequest + * + * @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 Logging Server to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Logging Server to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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 Logging Server to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php new file mode 100644 index 000000000000..f9dbac4170c3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest + */ +class GetManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the management DNS zone binding to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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 management DNS zone binding to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetManagementDnsZoneBindingRequest + * + * @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 management DNS zone binding to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the management DNS zone binding to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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 management DNS zone binding to + * retrieve. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php new file mode 100644 index 000000000000..51572fd7732f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetNetworkPeeringRequest + */ +class GetNetworkPeeringRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network peering to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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 network peering to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetNetworkPeeringRequest + * + * @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 network peering to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network peering to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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 network peering to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php new file mode 100644 index 000000000000..ca390af59e74 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetNetworkPolicyRequest + */ +class GetNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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 network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest + * + * @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 network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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 network policy to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php new file mode 100644 index 000000000000..823d63726078 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php @@ -0,0 +1,92 @@ +google.cloud.vmwareengine.v1.GetNodeRequest + */ +class GetNodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the node to retrieve. + * For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * + * 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 node to retrieve. + * For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * Please see {@see VmwareEngineClient::nodeName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetNodeRequest + * + * @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 node to retrieve. + * For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the node to retrieve. + * For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * + * 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 node to retrieve. + * For example: + * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php new file mode 100644 index 000000000000..a117aa736a7c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetNodeTypeRequest + */ +class GetNodeTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * 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 node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * Please see {@see VmwareEngineClient::nodeTypeName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest + * + * @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 node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * 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 node type to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php new file mode 100644 index 000000000000..16b916600d36 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetPrivateCloudRequest + */ +class GetPrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest + * + * @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 private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php new file mode 100644 index 000000000000..2ca419dbafd6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetPrivateConnectionRequest + */ +class GetPrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private connection to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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 private connection to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetPrivateConnectionRequest + * + * @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 private connection to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private connection to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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 private connection to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php new file mode 100644 index 000000000000..657585bb0c76 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetSubnetRequest + */ +class GetSubnetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the subnet to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * 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 subnet to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * Please see {@see VmwareEngineClient::subnetName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetSubnetRequest + * + * @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 subnet to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the subnet to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * 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 subnet to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..d9f69bd5c370 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php @@ -0,0 +1,102 @@ +google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest + */ +class GetVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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 VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest + * + * @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 VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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 VMware Engine network to retrieve. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php new file mode 100644 index 000000000000..b3fa012f224f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest + */ +class GrantDnsBindPermissionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $principal = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\Principal $principal Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * @return \Google\Cloud\VmwareEngine\V1\GrantDnsBindPermissionRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\VmwareEngine\V1\Principal $principal): self + { + return (new self()) + ->setName($name) + ->setPrincipal($principal); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * @type \Google\Cloud\VmwareEngine\V1\Principal $principal + * Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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 consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Principal|null + */ + public function getPrincipal() + { + return $this->principal; + } + + public function hasPrincipal() + { + return isset($this->principal); + } + + public function clearPrincipal() + { + unset($this->principal); + } + + /** + * Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Principal $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Principal::class); + $this->principal = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php new file mode 100644 index 000000000000..2beef5b8868d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php @@ -0,0 +1,169 @@ +google.cloud.vmwareengine.v1.Hcx + */ +class Hcx extends \Google\Protobuf\Internal\Message +{ + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + */ + protected $internal_ip = ''; + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + */ + protected $fqdn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $internal_ip + * Internal IP address of the appliance. + * @type string $version + * Version of the appliance. + * @type int $state + * Output only. The state of the appliance. + * @type string $fqdn + * Fully qualified domain name of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Hcx\State::class); + $this->state = $var; + + return $this; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php new file mode 100644 index 000000000000..730a4fbc1b9c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php @@ -0,0 +1,71 @@ +google.cloud.vmwareengine.v1.Hcx.State + */ +class State +{ + /** + * Unspecified appliance state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The appliance is operational and can be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The appliance is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The appliance is being activated. + * + * Generated from protobuf enum ACTIVATING = 3; + */ + const ACTIVATING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::ACTIVATING => 'ACTIVATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Hcx_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php new file mode 100644 index 000000000000..2ac89929e489 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php @@ -0,0 +1,236 @@ +google.cloud.vmwareengine.v1.HcxActivationKey + */ +class HcxActivationKey extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of HCX activation key. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. State of HCX activation key. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. HCX activation key. + * + * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $activation_key = ''; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of HCX activation key. + * @type int $state + * Output only. State of HCX activation key. + * @type string $activation_key + * Output only. HCX activation key. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * 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 this HcxActivationKey. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` + * + * 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. Creation time of HCX activation key. + * + * 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. Creation time of HCX activation key. + * + * 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. State of HCX activation key. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of HCX activation key. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. HCX activation key. + * + * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getActivationKey() + { + return $this->activation_key; + } + + /** + * Output only. HCX activation key. + * + * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setActivationKey($var) + { + GPBUtil::checkString($var, True); + $this->activation_key = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php new file mode 100644 index 000000000000..403d108006b2 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php @@ -0,0 +1,71 @@ +google.cloud.vmwareengine.v1.HcxActivationKey.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State of a newly generated activation key. + * + * Generated from protobuf enum AVAILABLE = 1; + */ + const AVAILABLE = 1; + /** + * State of key when it has been used to activate HCX appliance. + * + * Generated from protobuf enum CONSUMED = 2; + */ + const CONSUMED = 2; + /** + * State of key when it is being created. + * + * Generated from protobuf enum CREATING = 3; + */ + const CREATING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::AVAILABLE => 'AVAILABLE', + self::CONSUMED => 'CONSUMED', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\HcxActivationKey_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php new file mode 100644 index 000000000000..e5a2087e9eba --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php @@ -0,0 +1,322 @@ +google.cloud.vmwareengine.v1.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\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. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * must match the call that provided the page token. + * @type string $filter + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to query for clusters. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of clusters to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * 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 `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` + * 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; + } + + /** + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-cluster") + * (nodeCount = "3") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "example-cluster-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-cluster-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php new file mode 100644 index 000000000000..1db7f0ab9272 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of private cloud clusters. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; + */ + private $clusters; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters + * A list of private cloud clusters. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of private cloud clusters. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * A list of private cloud clusters. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Cluster::class); + $this->clusters = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php new file mode 100644 index 000000000000..c4d4fa886150 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php @@ -0,0 +1,366 @@ +google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest + */ +class ListExternalAccessRulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network policy to query for external + * access firewall rules. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of external access rules to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListExternalAccessRulesRequest` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAccessRulesRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of external access rules, you can + * exclude the ones named `example-rule` by specifying + * `name != "example-rule"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-rule") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-rule-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-rule-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the network policy to query for external + * access firewall rules. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListExternalAccessRulesRequest + * + * @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 network policy to query for external + * access firewall rules. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * @type int $page_size + * The maximum number of external access rules to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListExternalAccessRulesRequest` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAccessRulesRequest` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of external access rules, you can + * exclude the ones named `example-rule` by specifying + * `name != "example-rule"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-rule") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-rule-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-rule-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network policy to query for external + * access firewall rules. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * 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 network policy to query for external + * access firewall rules. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: + * `projects/my-project/locations/us-central1/networkPolicies/my-policy` + * + * 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 external access rules to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of external access rules to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListExternalAccessRulesRequest` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAccessRulesRequest` 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 `ListExternalAccessRulesRequest` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAccessRulesRequest` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of external access rules, you can + * exclude the ones named `example-rule` by specifying + * `name != "example-rule"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-rule") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-rule-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-rule-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of external access rules, you can + * exclude the ones named `example-rule` by specifying + * `name != "example-rule"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-rule") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-rule-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-rule-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php new file mode 100644 index 000000000000..a20836638504 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse + */ +class ListExternalAccessRulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of external access firewall rules. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rules = 1; + */ + private $external_access_rules; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule>|\Google\Protobuf\Internal\RepeatedField $external_access_rules + * A list of external access firewall rules. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of external access firewall rules. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExternalAccessRules() + { + return $this->external_access_rules; + } + + /** + * A list of external access firewall rules. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rules = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExternalAccessRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule::class); + $this->external_access_rules = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php new file mode 100644 index 000000000000..068486baec1c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php @@ -0,0 +1,367 @@ +google.cloud.vmwareengine.v1.ListExternalAddressesRequest + */ +class ListExternalAddressesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * external IP addresses. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListExternalAddresses` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAddresses` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of IP addresses, you can + * exclude the ones named `example-ip` by specifying + * `name != "example-ip"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-ip") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-ip-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-ip-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to be queried for + * external IP addresses. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListExternalAddressesRequest + * + * @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 private cloud to be queried for + * external IP addresses. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListExternalAddresses` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAddresses` must match the call that provided the page token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of IP addresses, you can + * exclude the ones named `example-ip` by specifying + * `name != "example-ip"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-ip") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-ip-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-ip-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * external IP addresses. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to be queried for + * external IP addresses. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of external IP addresses to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListExternalAddresses` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAddresses` 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 `ListExternalAddresses` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListExternalAddresses` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of IP addresses, you can + * exclude the ones named `example-ip` by specifying + * `name != "example-ip"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-ip") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-ip-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-ip-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of IP addresses, you can + * exclude the ones named `example-ip` by specifying + * `name != "example-ip"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-ip") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-ip-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-ip-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php new file mode 100644 index 000000000000..43b0db7791d5 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListExternalAddressesResponse + */ +class ListExternalAddressesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of external IP addresses. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; + */ + private $external_addresses; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $external_addresses + * A list of external IP addresses. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of external IP addresses. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExternalAddresses() + { + return $this->external_addresses; + } + + /** + * A list of external IP addresses. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExternalAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); + $this->external_addresses = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php new file mode 100644 index 000000000000..0a19130f8a2c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php @@ -0,0 +1,203 @@ +google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest + */ +class ListHcxActivationKeysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` 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 resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest + * + * @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 private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * 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 private cloud + * to be queried for HCX activation keys. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateClouds/my-cloud` + * + * 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 HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of HCX activation keys to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` 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 `ListHcxActivationKeys` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListHcxActivationKeys` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php new file mode 100644 index 000000000000..d38aeee53fb8 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse + */ +class ListHcxActivationKeysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of HCX activation keys. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; + */ + private $hcx_activation_keys; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $hcx_activation_keys + * List of HCX activation keys. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * List of HCX activation keys. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHcxActivationKeys() + { + return $this->hcx_activation_keys; + } + + /** + * List of HCX activation keys. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHcxActivationKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); + $this->hcx_activation_keys = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php new file mode 100644 index 000000000000..84953a0b6836 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php @@ -0,0 +1,371 @@ +google.cloud.vmwareengine.v1.ListLoggingServersRequest + */ +class ListLoggingServersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * logging servers. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of logging servers to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListLoggingServersRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListLoggingServersRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of logging servers, you can + * exclude the ones named `example-server` by specifying + * `name != "example-server"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-server") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-server-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-server-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to be queried for + * logging servers. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListLoggingServersRequest + * + * @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 private cloud to be queried for + * logging servers. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of logging servers to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListLoggingServersRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListLoggingServersRequest` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of logging servers, you can + * exclude the ones named `example-server` by specifying + * `name != "example-server"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-server") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-server-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-server-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * logging servers. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to be queried for + * logging servers. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 logging servers to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of logging servers to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListLoggingServersRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListLoggingServersRequest` 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 `ListLoggingServersRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListLoggingServersRequest` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of logging servers, you can + * exclude the ones named `example-server` by specifying + * `name != "example-server"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-server") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-server-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-server-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of logging servers, you can + * exclude the ones named `example-server` by specifying + * `name != "example-server"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-server") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-server-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-server-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php new file mode 100644 index 000000000000..549354db2821 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListLoggingServersResponse + */ +class ListLoggingServersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Logging Servers. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LoggingServer logging_servers = 1; + */ + private $logging_servers; + /** + * A token, which can be send 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\LoggingServer>|\Google\Protobuf\Internal\RepeatedField $logging_servers + * A list of Logging Servers. + * @type string $next_page_token + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of Logging Servers. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LoggingServer logging_servers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLoggingServers() + { + return $this->logging_servers; + } + + /** + * A list of Logging Servers. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LoggingServer logging_servers = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\LoggingServer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLoggingServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\LoggingServer::class); + $this->logging_servers = $arr; + + return $this; + } + + /** + * A token, which can be send 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 send 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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php new file mode 100644 index 000000000000..ab7704b5f7fd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php @@ -0,0 +1,371 @@ +google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest + */ +class ListManagementDnsZoneBindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * management DNS zone bindings. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of management DNS zone bindings to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListManagementDnsZoneBindings` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListManagementDnsZoneBindings` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of Management DNS Zone Bindings, + * you can exclude the ones named `example-management-dns-zone-binding` by + * specifying `name != "example-management-dns-zone-binding"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-management-dns-zone-binding") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-management-dns-zone-binding-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-management-dns-zone-binding-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to be queried for + * management DNS zone bindings. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListManagementDnsZoneBindingsRequest + * + * @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 private cloud to be queried for + * management DNS zone bindings. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of management DNS zone bindings to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListManagementDnsZoneBindings` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListManagementDnsZoneBindings` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of Management DNS Zone Bindings, + * you can exclude the ones named `example-management-dns-zone-binding` by + * specifying `name != "example-management-dns-zone-binding"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-management-dns-zone-binding") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-management-dns-zone-binding-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-management-dns-zone-binding-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * management DNS zone bindings. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to be queried for + * management DNS zone bindings. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 management DNS zone bindings to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of management DNS zone bindings to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListManagementDnsZoneBindings` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListManagementDnsZoneBindings` 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 `ListManagementDnsZoneBindings` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListManagementDnsZoneBindings` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of Management DNS Zone Bindings, + * you can exclude the ones named `example-management-dns-zone-binding` by + * specifying `name != "example-management-dns-zone-binding"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-management-dns-zone-binding") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-management-dns-zone-binding-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-management-dns-zone-binding-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of Management DNS Zone Bindings, + * you can exclude the ones named `example-management-dns-zone-binding` by + * specifying `name != "example-management-dns-zone-binding"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-management-dns-zone-binding") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-management-dns-zone-binding-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-management-dns-zone-binding-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php new file mode 100644 index 000000000000..96371ae524ff --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse + */ +class ListManagementDnsZoneBindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of management DNS zone bindings. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_bindings = 1; + */ + private $management_dns_zone_bindings; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding>|\Google\Protobuf\Internal\RepeatedField $management_dns_zone_bindings + * A list of management DNS zone bindings. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of management DNS zone bindings. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_bindings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManagementDnsZoneBindings() + { + return $this->management_dns_zone_bindings; + } + + /** + * A list of management DNS zone bindings. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_bindings = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManagementDnsZoneBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding::class); + $this->management_dns_zone_bindings = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php new file mode 100644 index 000000000000..38dce0b8e673 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php @@ -0,0 +1,357 @@ +google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest + */ +class ListNetworkPeeringsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location (global) to query for + * network peerings. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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 = ''; + /** + * The maximum number of network peerings to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListNetworkPeerings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPeerings` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-peering` by specifying + * `name != "example-peering"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-peering") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-peering-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-peering-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location (global) to query for + * network peerings. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListNetworkPeeringsRequest + * + * @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 location (global) to query for + * network peerings. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * @type int $page_size + * The maximum number of network peerings to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListNetworkPeerings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPeerings` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-peering` by specifying + * `name != "example-peering"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-peering") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-peering-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-peering-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location (global) to query for + * network peerings. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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 name of the location (global) to query for + * network peerings. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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; + } + + /** + * The maximum number of network peerings to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of network peerings to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListNetworkPeerings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPeerings` 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 `ListNetworkPeerings` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPeerings` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-peering` by specifying + * `name != "example-peering"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-peering") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-peering-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-peering-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-peering` by specifying + * `name != "example-peering"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-peering") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-peering-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-peering-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php new file mode 100644 index 000000000000..23484cf1c0fc --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse + */ +class ListNetworkPeeringsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of network peerings. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPeering network_peerings = 1; + */ + private $network_peerings; + /** + * 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 = ''; + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\NetworkPeering>|\Google\Protobuf\Internal\RepeatedField $network_peerings + * A list of network peerings. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of network peerings. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPeering network_peerings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkPeerings() + { + return $this->network_peerings; + } + + /** + * A list of network peerings. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPeering network_peerings = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\NetworkPeering>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkPeerings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NetworkPeering::class); + $this->network_peerings = $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; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php new file mode 100644 index 000000000000..bee75e476e17 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php @@ -0,0 +1,361 @@ +google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest + */ +class ListNetworkPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest + * + * @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 location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * @type int $page_size + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * 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 location (region) to query for + * network policies. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * 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 network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of network policies to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` 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 `ListNetworkPolicies` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNetworkPolicies` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network policies, you can + * exclude the ones named `example-policy` by specifying + * `name != "example-policy"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-policy") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-policy-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-policy-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php new file mode 100644 index 000000000000..abad447203f7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse + */ +class ListNetworkPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of network policies. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; + */ + private $network_policies; + /** + * A token, which can be send 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $network_policies + * A list of network policies. + * @type string $next_page_token + * A token, which can be send as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of network policies. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkPolicies() + { + return $this->network_policies; + } + + /** + * A list of network policies. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); + $this->network_policies = $arr; + + return $this; + } + + /** + * A token, which can be send 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 send 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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php new file mode 100644 index 000000000000..d8b2a072333f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php @@ -0,0 +1,312 @@ +google.cloud.vmwareengine.v1.ListNodeTypesRequest + */ +class ListNodeTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest + * + * @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 location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @type int $page_size + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` must match the call that provided the page token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * 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 location to be queried for node types. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * 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 node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of node types to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` 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 `ListNodeTypes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodeTypes` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of node types, you can + * exclude the ones named `standard-72` by specifying + * `name != "standard-72"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "standard-72") + * (virtual_cpu_count > 2) + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "standard-96") AND + * (virtual_cpu_count > 2) OR + * (name = "standard-72") + * ``` + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php new file mode 100644 index 000000000000..c8de39d538ae --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListNodeTypesResponse + */ +class ListNodeTypesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Node Types. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; + */ + private $node_types; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $node_types + * A list of Node Types. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of Node Types. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeTypes() + { + return $this->node_types; + } + + /** + * A list of Node Types. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeType::class); + $this->node_types = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php new file mode 100644 index 000000000000..55daa226a1ef --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php @@ -0,0 +1,198 @@ +google.cloud.vmwareengine.v1.ListNodesRequest + */ +class ListNodesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the cluster to be queried for nodes. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of nodes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListNodes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodes` 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 resource name of the cluster to be queried for nodes. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListNodesRequest + * + * @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 cluster to be queried for nodes. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * @type int $page_size + * The maximum number of nodes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListNodes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodes` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the cluster to be queried for nodes. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the cluster to be queried for nodes. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of nodes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of nodes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListNodes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodes` 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 `ListNodes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListNodes` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php new file mode 100644 index 000000000000..790b31a63eda --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php @@ -0,0 +1,106 @@ +google.cloud.vmwareengine.v1.ListNodesResponse + */ +class ListNodesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The nodes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Node nodes = 1; + */ + private $nodes; + /** + * 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 array<\Google\Cloud\VmwareEngine\V1\Node>|\Google\Protobuf\Internal\RepeatedField $nodes + * The nodes. + * @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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * The nodes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Node nodes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * The nodes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Node nodes = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\Node>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Node::class); + $this->nodes = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php new file mode 100644 index 000000000000..55118727a6e9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php @@ -0,0 +1,239 @@ +google.cloud.vmwareengine.v1.ListPeeringRoutesRequest + */ +class ListPeeringRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the network peering to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListPeeringRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPeeringRoutes` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * Currently, only filtering on the `direction` field is supported. To return + * routes imported from the peer network, provide "direction=INCOMING". To + * return routes exported from the VMware Engine network, provide + * "direction=OUTGOING". Other filter expressions return an error. + * + * Generated from protobuf field string filter = 6; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the network peering to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListPeeringRoutesRequest + * + * @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 network peering to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * @type int $page_size + * The maximum number of peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListPeeringRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPeeringRoutes` must + * match the call that provided the page token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * Currently, only filtering on the `direction` field is supported. To return + * routes imported from the peer network, provide "direction=INCOMING". To + * return routes exported from the VMware Engine network, provide + * "direction=OUTGOING". Other filter expressions return an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the network peering to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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 network peering to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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 peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListPeeringRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPeeringRoutes` 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 `ListPeeringRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPeeringRoutes` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * Currently, only filtering on the `direction` field is supported. To return + * routes imported from the peer network, provide "direction=INCOMING". To + * return routes exported from the VMware Engine network, provide + * "direction=OUTGOING". Other filter expressions return an error. + * + * Generated from protobuf field string filter = 6; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * Currently, only filtering on the `direction` field is supported. To return + * routes imported from the peer network, provide "direction=INCOMING". To + * return routes exported from the VMware Engine network, provide + * "direction=OUTGOING". Other filter expressions return an error. + * + * Generated from protobuf field string filter = 6; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php new file mode 100644 index 000000000000..61112faa0ec9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php @@ -0,0 +1,106 @@ +google.cloud.vmwareengine.v1.ListPeeringRoutesResponse + */ +class ListPeeringRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of peering routes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; + */ + private $peering_routes; + /** + * 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 array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $peering_routes + * A list of peering routes. + * @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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of peering routes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeeringRoutes() + { + return $this->peering_routes; + } + + /** + * A list of peering routes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeeringRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PeeringRoute::class); + $this->peering_routes = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php new file mode 100644 index 000000000000..8e9d635b77be --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php @@ -0,0 +1,362 @@ +google.cloud.vmwareengine.v1.ListPrivateCloudsRequest + */ +class ListPrivateCloudsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListPrivateCloudsRequest + * + * @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 private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * @type int $page_size + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` must + * match the call that provided the page token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * 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 private cloud to be queried for + * clusters. Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a` + * + * 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 private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of private clouds to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` 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 `ListPrivateClouds` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListPrivateClouds` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison operator, and the + * value that you want to use for filtering. The value must be a string, a + * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or + * `<`. + * For example, if you are filtering a list of private clouds, you can exclude + * the ones named `example-pc` by specifying `name != "example-pc"`. + * You can also filter nested fields. For example, you could specify + * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds + * only if they have a matching address in their network configuration. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-pc") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you can + * include `AND` and `OR` expressions explicitly. For example: + * ``` + * (name = "private-cloud-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "private-cloud-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results are + * ordered by `name` in ascending order. You can also sort results in + * descending order based on the `name` value using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php new file mode 100644 index 000000000000..bb0c02544fb4 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListPrivateCloudsResponse + */ +class ListPrivateCloudsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of private clouds. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; + */ + private $private_clouds; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $private_clouds + * A list of private clouds. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of private clouds. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrivateClouds() + { + return $this->private_clouds; + } + + /** + * A list of private clouds. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrivateClouds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); + $this->private_clouds = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php new file mode 100644 index 000000000000..fcb2b9941abf --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php @@ -0,0 +1,189 @@ +google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest + */ +class ListPrivateConnectionPeeringRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private connection to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-west1/privateConnections/my-connection` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListPrivateConnectionPeeringRoutes` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListPrivateConnectionPeeringRoutes` 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 resource name of the private connection to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-west1/privateConnections/my-connection` + * Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListPrivateConnectionPeeringRoutesRequest + * + * @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 private connection to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-west1/privateConnections/my-connection` + * @type int $page_size + * The maximum number of peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListPrivateConnectionPeeringRoutes` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListPrivateConnectionPeeringRoutes` must + * match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private connection to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-west1/privateConnections/my-connection` + * + * 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 private connection to retrieve peering + * routes from. Resource names are schemeless URIs that follow the conventions + * in https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/us-west1/privateConnections/my-connection` + * + * 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 peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of peering routes to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListPrivateConnectionPeeringRoutes` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListPrivateConnectionPeeringRoutes` 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 `ListPrivateConnectionPeeringRoutes` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListPrivateConnectionPeeringRoutes` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php new file mode 100644 index 000000000000..7ae5850a3c69 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php @@ -0,0 +1,106 @@ +google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse + */ +class ListPrivateConnectionPeeringRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of peering routes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; + */ + private $peering_routes; + /** + * 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 array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $peering_routes + * A list of peering routes. + * @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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of peering routes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeeringRoutes() + { + return $this->peering_routes; + } + + /** + * A list of peering routes. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeeringRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PeeringRoute::class); + $this->peering_routes = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php new file mode 100644 index 000000000000..7f5a5622e56b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php @@ -0,0 +1,357 @@ +google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest + */ +class ListPrivateConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to query for + * private connections. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of private connections to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of private connections, you can + * exclude the ones named `example-connection` by specifying + * `name != "example-connection"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-connection") + * (createTime > "2022-09-22T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-connection-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-connection-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location to query for + * private connections. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListPrivateConnectionsRequest + * + * @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 location to query for + * private connections. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * @type int $page_size + * The maximum number of private connections to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of private connections, you can + * exclude the ones named `example-connection` by specifying + * `name != "example-connection"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-connection") + * (createTime > "2022-09-22T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-connection-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-connection-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to query for + * private connections. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * 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 location to query for + * private connections. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/us-central1` + * + * 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 private connections to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of private connections to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` 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 `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of private connections, you can + * exclude the ones named `example-connection` by specifying + * `name != "example-connection"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-connection") + * (createTime > "2022-09-22T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-connection-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-connection-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of private connections, you can + * exclude the ones named `example-connection` by specifying + * `name != "example-connection"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-connection") + * (createTime > "2022-09-22T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-connection-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-connection-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php new file mode 100644 index 000000000000..2ce8e6c074aa --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse + */ +class ListPrivateConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of private connections. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateConnection private_connections = 1; + */ + private $private_connections; + /** + * 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 = ''; + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $private_connections + * A list of private connections. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of private connections. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateConnection private_connections = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrivateConnections() + { + return $this->private_connections; + } + + /** + * A list of private connections. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateConnection private_connections = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrivateConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PrivateConnection::class); + $this->private_connections = $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; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php new file mode 100644 index 000000000000..8cd0a8dbe644 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php @@ -0,0 +1,199 @@ +google.cloud.vmwareengine.v1.ListSubnetsRequest + */ +class ListSubnetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` 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 resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListSubnetsRequest + * + * @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 private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type int $page_size + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud to be queried for + * subnets. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of subnets to return in one page. + * The service may return fewer than this value. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` 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 `ListSubnetsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSubnetsRequest` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php new file mode 100644 index 000000000000..d6a41be2b735 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php @@ -0,0 +1,144 @@ +google.cloud.vmwareengine.v1.ListSubnetsResponse + */ +class ListSubnetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of subnets. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; + */ + private $subnets; + /** + * 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 = ''; + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $subnets + * A list of subnets. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached when making an aggregated query using + * wildcards. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of subnets. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSubnets() + { + return $this->subnets; + } + + /** + * A list of subnets. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSubnets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Subnet::class); + $this->subnets = $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; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached when making an aggregated query using + * wildcards. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php new file mode 100644 index 000000000000..5d04a5162774 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php @@ -0,0 +1,357 @@ +google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest + */ +class ListVmwareEngineNetworksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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 = ''; + /** + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest + * + * @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 location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. For + * example: `projects/my-project/locations/global` + * @type int $page_size + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * @type string $page_token + * A page token, received from a previous `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` must match the call that provided the page + * token. + * @type string $filter + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * @type string $order_by + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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 name of the location to query for + * VMware Engine networks. Resource names are schemeless URIs that follow the + * conventions in https://cloud.google.com/apis/design/resource_names. 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; + } + + /** + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in one page. + * The maximum value is coerced to 1000. + * The default value of this field is 500. + * + * 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 `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` 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 `ListVmwareEngineNetworks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListVmwareEngineNetworks` 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; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that matches resources returned in the response. + * The expression must specify the field name, a comparison + * operator, and the value that you want to use for filtering. The value + * must be a string, a number, or a boolean. The comparison operator + * must be `=`, `!=`, `>`, or `<`. + * For example, if you are filtering a list of network peerings, you can + * exclude the ones named `example-network` by specifying + * `name != "example-network"`. + * To filter on multiple expressions, provide each separate expression within + * parentheses. For example: + * ``` + * (name = "example-network") + * (createTime > "2021-04-12T08:15:10.40Z") + * ``` + * By default, each expression is an `AND` expression. However, you + * can include `AND` and `OR` expressions explicitly. + * For example: + * ``` + * (name = "example-network-1") AND + * (createTime > "2021-04-12T08:15:10.40Z") OR + * (name = "example-network-2") + * ``` + * + * 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; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sorts list results by a certain order. By default, returned results + * are ordered by `name` in ascending order. + * You can also sort results in descending order based on the `name` value + * using `orderBy="name desc"`. + * Currently, only ordering by `name` is supported. + * + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php new file mode 100644 index 000000000000..0ca339105be3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse + */ +class ListVmwareEngineNetworksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of VMware Engine networks. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; + */ + private $vmware_engine_networks; + /** + * 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 = ''; + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $vmware_engine_networks + * A list of VMware Engine networks. + * @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. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Unreachable resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * A list of VMware Engine networks. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVmwareEngineNetworks() + { + return $this->vmware_engine_networks; + } + + /** + * A list of VMware Engine networks. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; + * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVmwareEngineNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); + $this->vmware_engine_networks = $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; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unreachable resources. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php new file mode 100644 index 000000000000..599a522a3c30 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php @@ -0,0 +1,69 @@ +google.cloud.vmwareengine.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Capabilities of this location. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LocationMetadata.Capability capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $capabilities; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $capabilities + * Output only. Capabilities of this location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Capabilities of this location. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LocationMetadata.Capability capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCapabilities() + { + return $this->capabilities; + } + + /** + * Output only. Capabilities of this location. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LocationMetadata.Capability capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VmwareEngine\V1\LocationMetadata\Capability::class); + $this->capabilities = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php new file mode 100644 index 000000000000..b02dac2f136b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php @@ -0,0 +1,58 @@ +google.cloud.vmwareengine.v1.LocationMetadata.Capability + */ +class Capability +{ + /** + * The default value. This value is used if the capability is omitted or + * unknown. + * + * Generated from protobuf enum CAPABILITY_UNSPECIFIED = 0; + */ + const CAPABILITY_UNSPECIFIED = 0; + /** + * Stretch clusters are supported in this location. + * + * Generated from protobuf enum STRETCHED_CLUSTERS = 1; + */ + const STRETCHED_CLUSTERS = 1; + + private static $valueToName = [ + self::CAPABILITY_UNSPECIFIED => 'CAPABILITY_UNSPECIFIED', + self::STRETCHED_CLUSTERS => 'STRETCHED_CLUSTERS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Capability::class, \Google\Cloud\VmwareEngine\V1\LocationMetadata_Capability::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php new file mode 100644 index 000000000000..e064acbab3d1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php @@ -0,0 +1,349 @@ +google.cloud.vmwareengine.v1.LoggingServer + */ +class LoggingServer extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this logging server. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Fully-qualified domain name (FQDN) or IP Address of the logging + * server. + * + * Generated from protobuf field string hostname = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Required. Port number at which the logging server receives logs. + * + * Generated from protobuf field int32 port = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $port = 0; + /** + * Required. Protocol used by vCenter to send logs to a logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.Protocol protocol = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $protocol = 0; + /** + * Required. The type of component that produces logs that will be forwarded + * to this logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.SourceType source_type = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_type = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this logging server. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $hostname + * Required. Fully-qualified domain name (FQDN) or IP Address of the logging + * server. + * @type int $port + * Required. Port number at which the logging server receives logs. + * @type int $protocol + * Required. Protocol used by vCenter to send logs to a logging server. + * @type int $source_type + * Required. The type of component that produces logs that will be forwarded + * to this logging server. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this logging server. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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 this logging server. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Fully-qualified domain name (FQDN) or IP Address of the logging + * server. + * + * Generated from protobuf field string hostname = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Fully-qualified domain name (FQDN) or IP Address of the logging + * server. + * + * Generated from protobuf field string hostname = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Required. Port number at which the logging server receives logs. + * + * Generated from protobuf field int32 port = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Required. Port number at which the logging server receives logs. + * + * Generated from protobuf field int32 port = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Required. Protocol used by vCenter to send logs to a logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.Protocol protocol = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Required. Protocol used by vCenter to send logs to a logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.Protocol protocol = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\LoggingServer\Protocol::class); + $this->protocol = $var; + + return $this; + } + + /** + * Required. The type of component that produces logs that will be forwarded + * to this logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.SourceType source_type = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSourceType() + { + return $this->source_type; + } + + /** + * Required. The type of component that produces logs that will be forwarded + * to this logging server. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.SourceType source_type = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\LoggingServer\SourceType::class); + $this->source_type = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php new file mode 100644 index 000000000000..e73dd818e19a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php @@ -0,0 +1,86 @@ +google.cloud.vmwareengine.v1.LoggingServer.Protocol + */ +class Protocol +{ + /** + * Unspecified communications protocol. This is the default value. + * + * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; + */ + const PROTOCOL_UNSPECIFIED = 0; + /** + * UDP + * + * Generated from protobuf enum UDP = 1; + */ + const UDP = 1; + /** + * TCP + * + * Generated from protobuf enum TCP = 2; + */ + const TCP = 2; + /** + * TLS + * + * Generated from protobuf enum TLS = 3; + */ + const TLS = 3; + /** + * SSL + * + * Generated from protobuf enum SSL = 4; + */ + const SSL = 4; + /** + * RELP + * + * Generated from protobuf enum RELP = 5; + */ + const RELP = 5; + + private static $valueToName = [ + self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', + self::UDP => 'UDP', + self::TCP => 'TCP', + self::TLS => 'TLS', + self::SSL => 'SSL', + self::RELP => 'RELP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Protocol::class, \Google\Cloud\VmwareEngine\V1\LoggingServer_Protocol::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php new file mode 100644 index 000000000000..3c9f92ff6598 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.LoggingServer.SourceType + */ +class SourceType +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum SOURCE_TYPE_UNSPECIFIED = 0; + */ + const SOURCE_TYPE_UNSPECIFIED = 0; + /** + * Logs produced by ESXI hosts + * + * Generated from protobuf enum ESXI = 1; + */ + const ESXI = 1; + /** + * Logs produced by vCenter server + * + * Generated from protobuf enum VCSA = 2; + */ + const VCSA = 2; + + private static $valueToName = [ + self::SOURCE_TYPE_UNSPECIFIED => 'SOURCE_TYPE_UNSPECIFIED', + self::ESXI => 'ESXI', + self::VCSA => 'VCSA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SourceType::class, \Google\Cloud\VmwareEngine\V1\LoggingServer_SourceType::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php new file mode 100644 index 000000000000..d2a7a7f295a1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php @@ -0,0 +1,370 @@ +google.cloud.vmwareengine.v1.ManagementDnsZoneBinding + */ +class ManagementDnsZoneBinding extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this binding. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * User-provided description for this resource. + * + * Generated from protobuf field string description = 13; + */ + protected $description = ''; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + protected $bind_network; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this binding. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type int $state + * Output only. The state of the resource. + * @type string $description + * User-provided description for this resource. + * @type string $vpc_network + * Network to bind is a standard consumer VPC. + * Specify the name in the following form for consumer + * VPC network: `projects/{project}/global/networks/{network_id}`. + * `{project}` can either be a project number or a project ID. + * @type string $vmware_engine_network + * Network to bind is a VMware Engine network. + * Specify the name in the following form for VMware engine network: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * `{project}` can either be a project number or a project ID. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this binding. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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 this binding. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding\State::class); + $this->state = $var; + + return $this; + } + + /** + * User-provided description for this resource. + * + * Generated from protobuf field string description = 13; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this resource. + * + * Generated from protobuf field string description = 13; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Network to bind is a standard consumer VPC. + * Specify the name in the following form for consumer + * VPC network: `projects/{project}/global/networks/{network_id}`. + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vpc_network = 14 [(.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->readOneof(14); + } + + public function hasVpcNetwork() + { + return $this->hasOneof(14); + } + + /** + * Network to bind is a standard consumer VPC. + * Specify the name in the following form for consumer + * VPC network: `projects/{project}/global/networks/{network_id}`. + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vpc_network = 14 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Network to bind is a VMware Engine network. + * Specify the name in the following form for VMware engine network: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 15 [(.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->readOneof(15); + } + + public function hasVmwareEngineNetwork() + { + return $this->hasOneof(15); + } + + /** + * Network to bind is a VMware Engine network. + * Specify the name in the following form for VMware engine network: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 15 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * @return string + */ + public function getBindNetwork() + { + return $this->whichOneof("bind_network"); + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php new file mode 100644 index 000000000000..5b605adbdcb9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php @@ -0,0 +1,86 @@ +google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The binding is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The binding is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The binding is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The binding is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The binding has failed. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php new file mode 100644 index 000000000000..60536fcd1805 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php @@ -0,0 +1,260 @@ +google.cloud.vmwareengine.v1.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Management CIDR used by VMware management appliances. + * + * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $management_cidr = ''; + /** + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network = ''; + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network_canonical = ''; + /** + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * + * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $management_ip_address_layout_version = 0; + /** + * Output only. DNS Server IP of the Private Cloud. + * All DNS queries can be forwarded to this address for name resolution of + * Private Cloud's management entities like vCenter, NSX-T Manager and + * ESXi hosts. + * + * Generated from protobuf field string dns_server_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dns_server_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $management_cidr + * Required. Management CIDR used by VMware management appliances. + * @type string $vmware_engine_network + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * @type string $vmware_engine_network_canonical + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * @type int $management_ip_address_layout_version + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * @type string $dns_server_ip + * Output only. DNS Server IP of the Private Cloud. + * All DNS queries can be forwarded to this address for name resolution of + * Private Cloud's management entities like vCenter, NSX-T Manager and + * ESXi hosts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Management CIDR used by VMware management appliances. + * + * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManagementCidr() + { + return $this->management_cidr; + } + + /** + * Required. Management CIDR used by VMware management appliances. + * + * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManagementCidr($var) + { + GPBUtil::checkString($var, True); + $this->management_cidr = $var; + + return $this; + } + + /** + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + /** + * Optional. The relative resource name of the VMware Engine network attached + * to the private cloud. Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetworkCanonical() + { + return $this->vmware_engine_network_canonical; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkCanonical($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_canonical = $var; + + return $this; + } + + /** + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * + * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getManagementIpAddressLayoutVersion() + { + return $this->management_ip_address_layout_version; + } + + /** + * Output only. The IP address layout version of the management IP address + * range. Possible versions include: + * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address + * layout used by some existing private clouds. This is no longer supported + * for new private clouds as it does not support all features. + * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address + * layout used by all newly created private clouds. This version supports all + * current features. + * + * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setManagementIpAddressLayoutVersion($var) + { + GPBUtil::checkInt32($var); + $this->management_ip_address_layout_version = $var; + + return $this; + } + + /** + * Output only. DNS Server IP of the Private Cloud. + * All DNS queries can be forwarded to this address for name resolution of + * Private Cloud's management entities like vCenter, NSX-T Manager and + * ESXi hosts. + * + * Generated from protobuf field string dns_server_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDnsServerIp() + { + return $this->dns_server_ip; + } + + /** + * Output only. DNS Server IP of the Private Cloud. + * All DNS queries can be forwarded to this address for name resolution of + * Private Cloud's management entities like vCenter, NSX-T Manager and + * ESXi hosts. + * + * Generated from protobuf field string dns_server_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDnsServerIp($var) + { + GPBUtil::checkString($var, True); + $this->dns_server_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php new file mode 100644 index 000000000000..75600189db38 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php @@ -0,0 +1,775 @@ +google.cloud.vmwareengine.v1.NetworkPeering + */ +class NetworkPeering extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the network peering. NetworkPeering is a + * global resource and location can only be global. Resource names are + * scheme-less URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. The relative resource name of the network to peer with + * a standard VMware Engine network. The provided network can be a + * consumer VPC network or another standard VMware Engine network. If the + * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * Otherwise specify the name in the form: + * `projects/{project}/global/networks/{network_id}`, where + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string peer_network = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_network = ''; + /** + * Optional. True if custom routes are exported to the peered network; + * false otherwise. The default value is true. + * + * Generated from protobuf field optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $export_custom_routes = null; + /** + * Optional. True if custom routes are imported from the peered network; + * false otherwise. The default value is true. + * + * Generated from protobuf field optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $import_custom_routes = null; + /** + * Optional. True if full mesh connectivity is created and managed + * automatically between peered networks; false otherwise. Currently this + * field is always true because Google Compute Engine automatically creates + * and manages subnetwork routes between two VPC networks when peering state + * is 'ACTIVE'. + * + * Generated from protobuf field optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $exchange_subnet_routes = null; + /** + * Optional. True if all subnet routes with a public IP address range are + * exported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * exported to peers and are not controlled by this field. + * + * Generated from protobuf field optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $export_custom_routes_with_public_ip = null; + /** + * Optional. True if all subnet routes with public IP address range are + * imported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * imported to peers and are not controlled by this field. + * + * Generated from protobuf field optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $import_custom_routes_with_public_ip = null; + /** + * Output only. State of the network peering. This field + * has a value of 'ACTIVE' when there's a matching configuration in the peer + * network. New values may be added to this enum when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Output Only. Details about the current state of the network + * peering. + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Optional. Maximum transmission unit (MTU) in bytes. + * The default value is `1500`. If a value of `0` is provided for this field, + * VMware Engine uses the default value instead. + * + * Generated from protobuf field int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $peer_mtu = 0; + /** + * Required. The type of the network to peer with the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_network_type = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network = ''; + /** + * Optional. User-provided description for this network peering. + * + * Generated from protobuf field string description = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the network peering. NetworkPeering is a + * global resource and location can only be global. Resource names are + * scheme-less URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $peer_network + * Required. The relative resource name of the network to peer with + * a standard VMware Engine network. The provided network can be a + * consumer VPC network or another standard VMware Engine network. If the + * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * Otherwise specify the name in the form: + * `projects/{project}/global/networks/{network_id}`, where + * `{project}` can either be a project number or a project ID. + * @type bool $export_custom_routes + * Optional. True if custom routes are exported to the peered network; + * false otherwise. The default value is true. + * @type bool $import_custom_routes + * Optional. True if custom routes are imported from the peered network; + * false otherwise. The default value is true. + * @type bool $exchange_subnet_routes + * Optional. True if full mesh connectivity is created and managed + * automatically between peered networks; false otherwise. Currently this + * field is always true because Google Compute Engine automatically creates + * and manages subnetwork routes between two VPC networks when peering state + * is 'ACTIVE'. + * @type bool $export_custom_routes_with_public_ip + * Optional. True if all subnet routes with a public IP address range are + * exported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * exported to peers and are not controlled by this field. + * @type bool $import_custom_routes_with_public_ip + * Optional. True if all subnet routes with public IP address range are + * imported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * imported to peers and are not controlled by this field. + * @type int $state + * Output only. State of the network peering. This field + * has a value of 'ACTIVE' when there's a matching configuration in the peer + * network. New values may be added to this enum when appropriate. + * @type string $state_details + * Output only. Output Only. Details about the current state of the network + * peering. + * @type int $peer_mtu + * Optional. Maximum transmission unit (MTU) in bytes. + * The default value is `1500`. If a value of `0` is provided for this field, + * VMware Engine uses the default value instead. + * @type int $peer_network_type + * Required. The type of the network to peer with the VMware Engine network. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $vmware_engine_network + * Required. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * @type string $description + * Optional. User-provided description for this network peering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the network peering. NetworkPeering is a + * global resource and location can only be global. Resource names are + * scheme-less URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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 network peering. NetworkPeering is a + * global resource and location can only be global. Resource names are + * scheme-less URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/networkPeerings/my-peering` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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. The relative resource name of the network to peer with + * a standard VMware Engine network. The provided network can be a + * consumer VPC network or another standard VMware Engine network. If the + * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * Otherwise specify the name in the form: + * `projects/{project}/global/networks/{network_id}`, where + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string peer_network = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerNetwork() + { + return $this->peer_network; + } + + /** + * Required. The relative resource name of the network to peer with + * a standard VMware Engine network. The provided network can be a + * consumer VPC network or another standard VMware Engine network. If the + * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: + * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. + * Otherwise specify the name in the form: + * `projects/{project}/global/networks/{network_id}`, where + * `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string peer_network = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerNetwork($var) + { + GPBUtil::checkString($var, True); + $this->peer_network = $var; + + return $this; + } + + /** + * Optional. True if custom routes are exported to the peered network; + * false otherwise. The default value is true. + * + * Generated from protobuf field optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExportCustomRoutes() + { + return isset($this->export_custom_routes) ? $this->export_custom_routes : false; + } + + public function hasExportCustomRoutes() + { + return isset($this->export_custom_routes); + } + + public function clearExportCustomRoutes() + { + unset($this->export_custom_routes); + } + + /** + * Optional. True if custom routes are exported to the peered network; + * false otherwise. The default value is true. + * + * Generated from protobuf field optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExportCustomRoutes($var) + { + GPBUtil::checkBool($var); + $this->export_custom_routes = $var; + + return $this; + } + + /** + * Optional. True if custom routes are imported from the peered network; + * false otherwise. The default value is true. + * + * Generated from protobuf field optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getImportCustomRoutes() + { + return isset($this->import_custom_routes) ? $this->import_custom_routes : false; + } + + public function hasImportCustomRoutes() + { + return isset($this->import_custom_routes); + } + + public function clearImportCustomRoutes() + { + unset($this->import_custom_routes); + } + + /** + * Optional. True if custom routes are imported from the peered network; + * false otherwise. The default value is true. + * + * Generated from protobuf field optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setImportCustomRoutes($var) + { + GPBUtil::checkBool($var); + $this->import_custom_routes = $var; + + return $this; + } + + /** + * Optional. True if full mesh connectivity is created and managed + * automatically between peered networks; false otherwise. Currently this + * field is always true because Google Compute Engine automatically creates + * and manages subnetwork routes between two VPC networks when peering state + * is 'ACTIVE'. + * + * Generated from protobuf field optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExchangeSubnetRoutes() + { + return isset($this->exchange_subnet_routes) ? $this->exchange_subnet_routes : false; + } + + public function hasExchangeSubnetRoutes() + { + return isset($this->exchange_subnet_routes); + } + + public function clearExchangeSubnetRoutes() + { + unset($this->exchange_subnet_routes); + } + + /** + * Optional. True if full mesh connectivity is created and managed + * automatically between peered networks; false otherwise. Currently this + * field is always true because Google Compute Engine automatically creates + * and manages subnetwork routes between two VPC networks when peering state + * is 'ACTIVE'. + * + * Generated from protobuf field optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExchangeSubnetRoutes($var) + { + GPBUtil::checkBool($var); + $this->exchange_subnet_routes = $var; + + return $this; + } + + /** + * Optional. True if all subnet routes with a public IP address range are + * exported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * exported to peers and are not controlled by this field. + * + * Generated from protobuf field optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExportCustomRoutesWithPublicIp() + { + return isset($this->export_custom_routes_with_public_ip) ? $this->export_custom_routes_with_public_ip : false; + } + + public function hasExportCustomRoutesWithPublicIp() + { + return isset($this->export_custom_routes_with_public_ip); + } + + public function clearExportCustomRoutesWithPublicIp() + { + unset($this->export_custom_routes_with_public_ip); + } + + /** + * Optional. True if all subnet routes with a public IP address range are + * exported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * exported to peers and are not controlled by this field. + * + * Generated from protobuf field optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExportCustomRoutesWithPublicIp($var) + { + GPBUtil::checkBool($var); + $this->export_custom_routes_with_public_ip = $var; + + return $this; + } + + /** + * Optional. True if all subnet routes with public IP address range are + * imported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * imported to peers and are not controlled by this field. + * + * Generated from protobuf field optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getImportCustomRoutesWithPublicIp() + { + return isset($this->import_custom_routes_with_public_ip) ? $this->import_custom_routes_with_public_ip : false; + } + + public function hasImportCustomRoutesWithPublicIp() + { + return isset($this->import_custom_routes_with_public_ip); + } + + public function clearImportCustomRoutesWithPublicIp() + { + unset($this->import_custom_routes_with_public_ip); + } + + /** + * Optional. True if all subnet routes with public IP address range are + * imported; false otherwise. The default value is true. IPv4 special-use + * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always + * imported to peers and are not controlled by this field. + * + * Generated from protobuf field optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setImportCustomRoutesWithPublicIp($var) + { + GPBUtil::checkBool($var); + $this->import_custom_routes_with_public_ip = $var; + + return $this; + } + + /** + * Output only. State of the network peering. This field + * has a value of 'ACTIVE' when there's a matching configuration in the peer + * network. New values may be added to this enum when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the network peering. This field + * has a value of 'ACTIVE' when there's a matching configuration in the peer + * network. New values may be added to this enum when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Output Only. Details about the current state of the network + * peering. + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. Output Only. Details about the current state of the network + * peering. + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Optional. Maximum transmission unit (MTU) in bytes. + * The default value is `1500`. If a value of `0` is provided for this field, + * VMware Engine uses the default value instead. + * + * Generated from protobuf field int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPeerMtu() + { + return $this->peer_mtu; + } + + /** + * Optional. Maximum transmission unit (MTU) in bytes. + * The default value is `1500`. If a value of `0` is provided for this field, + * VMware Engine uses the default value instead. + * + * Generated from protobuf field int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPeerMtu($var) + { + GPBUtil::checkInt32($var); + $this->peer_mtu = $var; + + return $this; + } + + /** + * Required. The type of the network to peer with the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPeerNetworkType() + { + return $this->peer_network_type; + } + + /** + * Required. The type of the network to peer with the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPeerNetworkType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering\PeerNetworkType::class); + $this->peer_network_type = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + /** + * Required. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Optional. User-provided description for this network peering. + * + * Generated from protobuf field string description = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description for this network peering. + * + * Generated from protobuf field string description = 21 [(.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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php new file mode 100644 index 000000000000..a7cd5e3091b7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php @@ -0,0 +1,104 @@ +google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType + */ +class PeerNetworkType +{ + /** + * Unspecified + * + * Generated from protobuf enum PEER_NETWORK_TYPE_UNSPECIFIED = 0; + */ + const PEER_NETWORK_TYPE_UNSPECIFIED = 0; + /** + * Peering connection used for connecting to another VPC network established + * by the same user. For example, a peering connection to another VPC + * network in the same project or to an on-premises network. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Peering connection used for connecting to another VMware Engine network. + * + * Generated from protobuf enum VMWARE_ENGINE_NETWORK = 2; + */ + const VMWARE_ENGINE_NETWORK = 2; + /** + * Peering connection used for establishing [private services + * access](https://cloud.google.com/vpc/docs/private-services-access). + * + * Generated from protobuf enum PRIVATE_SERVICES_ACCESS = 3; + */ + const PRIVATE_SERVICES_ACCESS = 3; + /** + * Peering connection used for connecting to NetApp Cloud Volumes. + * + * Generated from protobuf enum NETAPP_CLOUD_VOLUMES = 4; + */ + const NETAPP_CLOUD_VOLUMES = 4; + /** + * Peering connection used for connecting to third-party services. Most + * third-party services require manual setup of reverse peering on the VPC + * network associated with the third-party service. + * + * Generated from protobuf enum THIRD_PARTY_SERVICE = 5; + */ + const THIRD_PARTY_SERVICE = 5; + /** + * Peering connection used for connecting to Dell PowerScale Filers + * + * Generated from protobuf enum DELL_POWERSCALE = 6; + */ + const DELL_POWERSCALE = 6; + /** + * Peering connection used for connecting to Google Cloud NetApp Volumes. + * + * Generated from protobuf enum GOOGLE_CLOUD_NETAPP_VOLUMES = 7; + */ + const GOOGLE_CLOUD_NETAPP_VOLUMES = 7; + + private static $valueToName = [ + self::PEER_NETWORK_TYPE_UNSPECIFIED => 'PEER_NETWORK_TYPE_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::VMWARE_ENGINE_NETWORK => 'VMWARE_ENGINE_NETWORK', + self::PRIVATE_SERVICES_ACCESS => 'PRIVATE_SERVICES_ACCESS', + self::NETAPP_CLOUD_VOLUMES => 'NETAPP_CLOUD_VOLUMES', + self::THIRD_PARTY_SERVICE => 'THIRD_PARTY_SERVICE', + self::DELL_POWERSCALE => 'DELL_POWERSCALE', + self::GOOGLE_CLOUD_NETAPP_VOLUMES => 'GOOGLE_CLOUD_NETAPP_VOLUMES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PeerNetworkType::class, \Google\Cloud\VmwareEngine\V1\NetworkPeering_PeerNetworkType::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php new file mode 100644 index 000000000000..0fa3a933fb06 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.NetworkPeering.State + */ +class State +{ + /** + * Unspecified network peering state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The peering is not active. + * + * Generated from protobuf enum INACTIVE = 1; + */ + const INACTIVE = 1; + /** + * The peering is active. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The peering is being created. + * + * Generated from protobuf enum CREATING = 3; + */ + const CREATING = 3; + /** + * The peering is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::INACTIVE => 'INACTIVE', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\NetworkPeering_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php new file mode 100644 index 000000000000..a0706a1327c9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php @@ -0,0 +1,470 @@ +google.cloud.vmwareengine.v1.NetworkPolicy + */ +class NetworkPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Network service that allows VMware workloads to access the internet. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; + */ + protected $internet_access = null; + /** + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; + */ + protected $external_ip = null; + /** + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * + * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $edge_services_cidr = ''; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network = ''; + /** + * Optional. User-provided description for this network policy. + * + * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network_canonical = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $internet_access + * Network service that allows VMware workloads to access the internet. + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $external_ip + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * @type string $edge_services_cidr + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $vmware_engine_network + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * @type string $description + * Optional. User-provided description for this network policy. + * @type string $vmware_engine_network_canonical + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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 this network policy. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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; + } + + /** + * Network service that allows VMware workloads to access the internet. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null + */ + public function getInternetAccess() + { + return $this->internet_access; + } + + public function hasInternetAccess() + { + return isset($this->internet_access); + } + + public function clearInternetAccess() + { + unset($this->internet_access); + } + + /** + * Network service that allows VMware workloads to access the internet. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var + * @return $this + */ + public function setInternetAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); + $this->internet_access = $var; + + return $this; + } + + /** + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null + */ + public function getExternalIp() + { + return $this->external_ip; + } + + public function hasExternalIp() + { + return isset($this->external_ip); + } + + public function clearExternalIp() + { + unset($this->external_ip); + } + + /** + * Network service that allows External IP addresses to be assigned to VMware + * workloads. This service can only be enabled when `internet_access` is also + * enabled. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); + $this->external_ip = $var; + + return $this; + } + + /** + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * + * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEdgeServicesCidr() + { + return $this->edge_services_cidr; + } + + /** + * Required. IP address range in CIDR notation used to create internet access + * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is + * required. The range cannot overlap with any prefixes either in the consumer + * VPC network or in use by the private clouds attached to that VPC network. + * + * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEdgeServicesCidr($var) + { + GPBUtil::checkString($var, True); + $this->edge_services_cidr = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + /** + * Optional. The relative resource name of the VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}` can either be a project number or a project ID. + * + * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Optional. User-provided description for this network policy. + * + * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description for this network policy. + * + * Generated from protobuf field string description = 13 [(.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 canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetworkCanonical() + { + return $this->vmware_engine_network_canonical; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkCanonical($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_canonical = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php new file mode 100644 index 000000000000..7569a32d83be --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php @@ -0,0 +1,112 @@ +google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService + */ +class NetworkService extends \Google\Protobuf\Internal\Message +{ + /** + * True if the service is enabled; false otherwise. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * True if the service is enabled; false otherwise. + * @type int $state + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * True if the service is enabled; false otherwise. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * True if the service is enabled; false otherwise. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the service. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService\State::class); + $this->state = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkService::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php new file mode 100644 index 000000000000..7254794bb492 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php @@ -0,0 +1,72 @@ +google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State + */ +class State +{ + /** + * Unspecified service state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Service is not provisioned. + * + * Generated from protobuf enum UNPROVISIONED = 1; + */ + const UNPROVISIONED = 1; + /** + * Service is in the process of being provisioned/deprovisioned. + * + * Generated from protobuf enum RECONCILING = 2; + */ + const RECONCILING = 2; + /** + * Service is active. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::UNPROVISIONED => 'UNPROVISIONED', + self::RECONCILING => 'RECONCILING', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php new file mode 100644 index 000000000000..7967bc524fb7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php @@ -0,0 +1,299 @@ +google.cloud.vmwareengine.v1.Node + */ +class Node extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this node. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Fully qualified domain name of the node. + * + * Generated from protobuf field string fqdn = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $fqdn = ''; + /** + * Output only. Internal IP address of the node. + * + * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $internal_ip = ''; + /** + * Output only. The canonical identifier of the node type (corresponds to the + * `NodeType`). + * For example: standard-72. + * + * Generated from protobuf field string node_type_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_type_id = ''; + /** + * Output only. The version number of the VMware ESXi + * management component in this cluster. + * + * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version = ''; + /** + * Output only. Customized number of cores + * + * Generated from protobuf field int64 custom_core_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_core_count = 0; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Node.State state = 7 [(.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 resource name of this node. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node + * @type string $fqdn + * Output only. Fully qualified domain name of the node. + * @type string $internal_ip + * Output only. Internal IP address of the node. + * @type string $node_type_id + * Output only. The canonical identifier of the node type (corresponds to the + * `NodeType`). + * For example: standard-72. + * @type string $version + * Output only. The version number of the VMware ESXi + * management component in this cluster. + * @type int|string $custom_core_count + * Output only. Customized number of cores + * @type int $state + * Output only. The state of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this node. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node + * + * 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 this node. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node + * + * 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. Fully qualified domain name of the node. + * + * Generated from protobuf field string fqdn = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Output only. Fully qualified domain name of the node. + * + * Generated from protobuf field string fqdn = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + + /** + * Output only. Internal IP address of the node. + * + * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Output only. Internal IP address of the node. + * + * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Output only. The canonical identifier of the node type (corresponds to the + * `NodeType`). + * For example: standard-72. + * + * Generated from protobuf field string node_type_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNodeTypeId() + { + return $this->node_type_id; + } + + /** + * Output only. The canonical identifier of the node type (corresponds to the + * `NodeType`). + * For example: standard-72. + * + * Generated from protobuf field string node_type_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNodeTypeId($var) + { + GPBUtil::checkString($var, True); + $this->node_type_id = $var; + + return $this; + } + + /** + * Output only. The version number of the VMware ESXi + * management component in this cluster. + * + * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Output only. The version number of the VMware ESXi + * management component in this cluster. + * + * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. Customized number of cores + * + * Generated from protobuf field int64 custom_core_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCustomCoreCount() + { + return $this->custom_core_count; + } + + /** + * Output only. Customized number of cores + * + * Generated from protobuf field int64 custom_core_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCustomCoreCount($var) + { + GPBUtil::checkInt64($var); + $this->custom_core_count = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Node.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Node.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Node\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php new file mode 100644 index 000000000000..3c40d2fd6abd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.Node.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Node is operational and can be used by the user. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Node is being provisioned. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Node is in a failed state. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * Node is undergoing maintenance, e.g.: during private cloud upgrade. + * + * Generated from protobuf enum UPGRADING = 4; + */ + const UPGRADING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::FAILED => 'FAILED', + self::UPGRADING => 'UPGRADING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Node_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php new file mode 100644 index 000000000000..dd6e532b2efd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php @@ -0,0 +1,439 @@ +google.cloud.vmwareengine.v1.NodeType + */ +class NodeType extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * + * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_type_id = ''; + /** + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The total number of virtual CPUs in a single node. + * + * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $virtual_cpu_count = 0; + /** + * Output only. The total number of CPU cores in a single node. + * + * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_core_count = 0; + /** + * Output only. The amount of physical memory available, defined in GB. + * + * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memory_gb = 0; + /** + * Output only. The amount of storage available, defined in GB. + * + * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_size_gb = 0; + /** + * Output only. List of possible values of custom core count. + * + * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_custom_core_counts; + /** + * Output only. The type of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NodeType.Kind kind = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kind = 0; + /** + * Output only. Families of the node type. + * For node types to be in the same cluster + * they must share at least one element in the `families`. + * + * Generated from protobuf field repeated string families = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $families; + /** + * Output only. Capabilities of this node type. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType.Capability capabilities = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $capabilities; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * @type string $node_type_id + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * @type string $display_name + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * @type int $virtual_cpu_count + * Output only. The total number of virtual CPUs in a single node. + * @type int $total_core_count + * Output only. The total number of CPU cores in a single node. + * @type int $memory_gb + * Output only. The amount of physical memory available, defined in GB. + * @type int $disk_size_gb + * Output only. The amount of storage available, defined in GB. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_custom_core_counts + * Output only. List of possible values of custom core count. + * @type int $kind + * Output only. The type of the resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $families + * Output only. Families of the node type. + * For node types to be in the same cluster + * they must share at least one element in the `families`. + * @type array|\Google\Protobuf\Internal\RepeatedField $capabilities + * Output only. Capabilities of this node type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * 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 this node type. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` + * + * 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 canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * + * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNodeTypeId() + { + return $this->node_type_id; + } + + /** + * Output only. The canonical identifier of the node type + * (corresponds to the `NodeType`). For example: standard-72. + * + * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNodeTypeId($var) + { + GPBUtil::checkString($var, True); + $this->node_type_id = $var; + + return $this; + } + + /** + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The friendly name for this node type. + * For example: ve1-standard-72 + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The total number of virtual CPUs in a single node. + * + * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVirtualCpuCount() + { + return $this->virtual_cpu_count; + } + + /** + * Output only. The total number of virtual CPUs in a single node. + * + * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVirtualCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->virtual_cpu_count = $var; + + return $this; + } + + /** + * Output only. The total number of CPU cores in a single node. + * + * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTotalCoreCount() + { + return $this->total_core_count; + } + + /** + * Output only. The total number of CPU cores in a single node. + * + * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTotalCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->total_core_count = $var; + + return $this; + } + + /** + * Output only. The amount of physical memory available, defined in GB. + * + * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Output only. The amount of physical memory available, defined in GB. + * + * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkInt32($var); + $this->memory_gb = $var; + + return $this; + } + + /** + * Output only. The amount of storage available, defined in GB. + * + * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Output only. The amount of storage available, defined in GB. + * + * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Output only. List of possible values of custom core count. + * + * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAvailableCustomCoreCounts() + { + return $this->available_custom_core_counts; + } + + /** + * Output only. List of possible values of custom core count. + * + * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAvailableCustomCoreCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->available_custom_core_counts = $arr; + + return $this; + } + + /** + * Output only. The type of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NodeType.Kind kind = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Output only. The type of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NodeType.Kind kind = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NodeType\Kind::class); + $this->kind = $var; + + return $this; + } + + /** + * Output only. Families of the node type. + * For node types to be in the same cluster + * they must share at least one element in the `families`. + * + * Generated from protobuf field repeated string families = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFamilies() + { + return $this->families; + } + + /** + * Output only. Families of the node type. + * For node types to be in the same cluster + * they must share at least one element in the `families`. + * + * Generated from protobuf field repeated string families = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFamilies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->families = $arr; + + return $this; + } + + /** + * Output only. Capabilities of this node type. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType.Capability capabilities = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCapabilities() + { + return $this->capabilities; + } + + /** + * Output only. Capabilities of this node type. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType.Capability capabilities = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VmwareEngine\V1\NodeType\Capability::class); + $this->capabilities = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php new file mode 100644 index 000000000000..9bdcbad5679a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php @@ -0,0 +1,58 @@ +google.cloud.vmwareengine.v1.NodeType.Capability + */ +class Capability +{ + /** + * The default value. This value is used if the capability is omitted or + * unknown. + * + * Generated from protobuf enum CAPABILITY_UNSPECIFIED = 0; + */ + const CAPABILITY_UNSPECIFIED = 0; + /** + * This node type supports stretch clusters. + * + * Generated from protobuf enum STRETCHED_CLUSTERS = 1; + */ + const STRETCHED_CLUSTERS = 1; + + private static $valueToName = [ + self::CAPABILITY_UNSPECIFIED => 'CAPABILITY_UNSPECIFIED', + self::STRETCHED_CLUSTERS => 'STRETCHED_CLUSTERS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Capability::class, \Google\Cloud\VmwareEngine\V1\NodeType_Capability::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php new file mode 100644 index 000000000000..303da1b43211 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.NodeType.Kind + */ +class Kind +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum KIND_UNSPECIFIED = 0; + */ + const KIND_UNSPECIFIED = 0; + /** + * Standard HCI node. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Storage only Node. + * + * Generated from protobuf enum STORAGE_ONLY = 2; + */ + const STORAGE_ONLY = 2; + + private static $valueToName = [ + self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::STORAGE_ONLY => 'STORAGE_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Kind::class, \Google\Cloud\VmwareEngine\V1\NodeType_Kind::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php new file mode 100644 index 000000000000..5308613bd056 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php @@ -0,0 +1,113 @@ +google.cloud.vmwareengine.v1.NodeTypeConfig + */ +class NodeTypeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The number of nodes of this type in the cluster + * + * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node_count = 0; + /** + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * + * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $node_count + * Required. The number of nodes of this type in the cluster + * @type int $custom_core_count + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The number of nodes of this type in the cluster + * + * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Required. The number of nodes of this type in the cluster + * + * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * + * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCustomCoreCount() + { + return $this->custom_core_count; + } + + /** + * Optional. Customized number of cores available to each node of the type. + * This number must always be one of `nodeType.availableCustomCoreCounts`. + * If zero is provided max value from `nodeType.availableCustomCoreCounts` + * will be used. + * + * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCustomCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->custom_core_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php new file mode 100644 index 000000000000..21cfc7076157 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php @@ -0,0 +1,169 @@ +google.cloud.vmwareengine.v1.Nsx + */ +class Nsx extends \Google\Protobuf\Internal\Message +{ + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + */ + protected $internal_ip = ''; + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + */ + protected $fqdn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $internal_ip + * Internal IP address of the appliance. + * @type string $version + * Version of the appliance. + * @type int $state + * Output only. The state of the appliance. + * @type string $fqdn + * Fully qualified domain name of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Nsx\State::class); + $this->state = $var; + + return $this; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php new file mode 100644 index 000000000000..768f7cb3f320 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.Nsx.State + */ +class State +{ + /** + * Unspecified appliance state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The appliance is operational and can be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The appliance is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Nsx_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php new file mode 100644 index 000000000000..a520f27cb3e3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php @@ -0,0 +1,311 @@ +google.cloud.vmwareengine.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. True if the user has requested cancellation + * of the operation; false otherwise. + * 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. True if the user has requested cancellation + * of the operation; false otherwise. + * 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\Vmwareengine\V1\Vmwareengine::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. True if the user has requested cancellation + * of the operation; false otherwise. + * 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. True if the user has requested cancellation + * of the operation; false otherwise. + * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php new file mode 100644 index 000000000000..ed79b2063cdf --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php @@ -0,0 +1,273 @@ +google.cloud.vmwareengine.v1.PeeringRoute + */ +class PeeringRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Destination range of the peering route in CIDR notation. + * + * Generated from protobuf field string dest_range = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dest_range = ''; + /** + * Output only. Type of the route in the peer VPC network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Type type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Output only. Region containing the next hop of the peering route. This + * field only applies to dynamic routes in the peer VPC network. + * + * Generated from protobuf field string next_hop_region = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_hop_region = ''; + /** + * Output only. The priority of the peering route. + * + * Generated from protobuf field int64 priority = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $priority = 0; + /** + * Output only. True if the peering route has been imported from a peered + * VPC network; false otherwise. The import happens if the field + * `NetworkPeering.importCustomRoutes` is true for this network, + * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and + * the import does not result in a route conflict. + * + * Generated from protobuf field bool imported = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $imported = false; + /** + * Output only. Direction of the routes exchanged with the peer network, from + * the VMware Engine network perspective: + * * Routes of direction `INCOMING` are imported from the peer network. + * * Routes of direction `OUTGOING` are exported from the intranet VPC network + * of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Direction direction = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $direction = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dest_range + * Output only. Destination range of the peering route in CIDR notation. + * @type int $type + * Output only. Type of the route in the peer VPC network. + * @type string $next_hop_region + * Output only. Region containing the next hop of the peering route. This + * field only applies to dynamic routes in the peer VPC network. + * @type int|string $priority + * Output only. The priority of the peering route. + * @type bool $imported + * Output only. True if the peering route has been imported from a peered + * VPC network; false otherwise. The import happens if the field + * `NetworkPeering.importCustomRoutes` is true for this network, + * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and + * the import does not result in a route conflict. + * @type int $direction + * Output only. Direction of the routes exchanged with the peer network, from + * the VMware Engine network perspective: + * * Routes of direction `INCOMING` are imported from the peer network. + * * Routes of direction `OUTGOING` are exported from the intranet VPC network + * of the VMware Engine network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Destination range of the peering route in CIDR notation. + * + * Generated from protobuf field string dest_range = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDestRange() + { + return $this->dest_range; + } + + /** + * Output only. Destination range of the peering route in CIDR notation. + * + * Generated from protobuf field string dest_range = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDestRange($var) + { + GPBUtil::checkString($var, True); + $this->dest_range = $var; + + return $this; + } + + /** + * Output only. Type of the route in the peer VPC network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Type type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type of the route in the peer VPC network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Type type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PeeringRoute\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Region containing the next hop of the peering route. This + * field only applies to dynamic routes in the peer VPC network. + * + * Generated from protobuf field string next_hop_region = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextHopRegion() + { + return $this->next_hop_region; + } + + /** + * Output only. Region containing the next hop of the peering route. This + * field only applies to dynamic routes in the peer VPC network. + * + * Generated from protobuf field string next_hop_region = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextHopRegion($var) + { + GPBUtil::checkString($var, True); + $this->next_hop_region = $var; + + return $this; + } + + /** + * Output only. The priority of the peering route. + * + * Generated from protobuf field int64 priority = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Output only. The priority of the peering route. + * + * Generated from protobuf field int64 priority = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt64($var); + $this->priority = $var; + + return $this; + } + + /** + * Output only. True if the peering route has been imported from a peered + * VPC network; false otherwise. The import happens if the field + * `NetworkPeering.importCustomRoutes` is true for this network, + * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and + * the import does not result in a route conflict. + * + * Generated from protobuf field bool imported = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getImported() + { + return $this->imported; + } + + /** + * Output only. True if the peering route has been imported from a peered + * VPC network; false otherwise. The import happens if the field + * `NetworkPeering.importCustomRoutes` is true for this network, + * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and + * the import does not result in a route conflict. + * + * Generated from protobuf field bool imported = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setImported($var) + { + GPBUtil::checkBool($var); + $this->imported = $var; + + return $this; + } + + /** + * Output only. Direction of the routes exchanged with the peer network, from + * the VMware Engine network perspective: + * * Routes of direction `INCOMING` are imported from the peer network. + * * Routes of direction `OUTGOING` are exported from the intranet VPC network + * of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Direction direction = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * Output only. Direction of the routes exchanged with the peer network, from + * the VMware Engine network perspective: + * * Routes of direction `INCOMING` are imported from the peer network. + * * Routes of direction `OUTGOING` are exported from the intranet VPC network + * of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Direction direction = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDirection($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PeeringRoute\Direction::class); + $this->direction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php new file mode 100644 index 000000000000..ca4028e37745 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.PeeringRoute.Direction + */ +class Direction +{ + /** + * Unspecified exchanged routes direction. This is default. + * + * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; + */ + const DIRECTION_UNSPECIFIED = 0; + /** + * Routes imported from the peer network. + * + * Generated from protobuf enum INCOMING = 1; + */ + const INCOMING = 1; + /** + * Routes exported to the peer network. + * + * Generated from protobuf enum OUTGOING = 2; + */ + const OUTGOING = 2; + + private static $valueToName = [ + self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', + self::INCOMING => 'INCOMING', + self::OUTGOING => 'OUTGOING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Direction::class, \Google\Cloud\VmwareEngine\V1\PeeringRoute_Direction::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php new file mode 100644 index 000000000000..cda62b924e81 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php @@ -0,0 +1,72 @@ +google.cloud.vmwareengine.v1.PeeringRoute.Type + */ +class Type +{ + /** + * Unspecified peering route type. This is the default value. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Dynamic routes in the peer network. + * + * Generated from protobuf enum DYNAMIC_PEERING_ROUTE = 1; + */ + const DYNAMIC_PEERING_ROUTE = 1; + /** + * Static routes in the peer network. + * + * Generated from protobuf enum STATIC_PEERING_ROUTE = 2; + */ + const STATIC_PEERING_ROUTE = 2; + /** + * Created, updated, and removed automatically by Google Cloud when subnets + * are created, modified, or deleted in the peer network. + * + * Generated from protobuf enum SUBNET_PEERING_ROUTE = 3; + */ + const SUBNET_PEERING_ROUTE = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::DYNAMIC_PEERING_ROUTE => 'DYNAMIC_PEERING_ROUTE', + self::STATIC_PEERING_ROUTE => 'STATIC_PEERING_ROUTE', + self::SUBNET_PEERING_ROUTE => 'SUBNET_PEERING_ROUTE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\PeeringRoute_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php new file mode 100644 index 000000000000..5b096e7b45d9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php @@ -0,0 +1,109 @@ +google.cloud.vmwareengine.v1.Principal + */ +class Principal extends \Google\Protobuf\Internal\Message +{ + protected $principal; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * The user who needs to be granted permission. + * @type string $service_account + * The service account which needs to be granted the permission. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * The user who needs to be granted permission. + * + * Generated from protobuf field string user = 1; + * @return string + */ + public function getUser() + { + return $this->readOneof(1); + } + + public function hasUser() + { + return $this->hasOneof(1); + } + + /** + * The user who needs to be granted permission. + * + * Generated from protobuf field string user = 1; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The service account which needs to be granted the permission. + * + * Generated from protobuf field string service_account = 2; + * @return string + */ + public function getServiceAccount() + { + return $this->readOneof(2); + } + + public function hasServiceAccount() + { + return $this->hasOneof(2); + } + + /** + * The service account which needs to be granted the permission. + * + * Generated from protobuf field string service_account = 2; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getPrincipal() + { + return $this->whichOneof("principal"); + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php new file mode 100644 index 000000000000..1e778c354002 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php @@ -0,0 +1,637 @@ +google.cloud.vmwareengine.v1.PrivateCloud + */ +class PrivateCloud extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Time when the resource was scheduled for deletion. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. Time when the resource will be irreversibly deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Network configuration of the private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_config = null; + /** + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + */ + protected $management_cluster = null; + /** + * User-provided description for this private cloud. + * + * Generated from protobuf field string description = 11; + */ + protected $description = ''; + /** + * Output only. HCX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hcx = null; + /** + * Output only. NSX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $nsx = null; + /** + * Output only. Vcenter appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vcenter = null; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Optional. Type of the private cloud. Defaults to STANDARD. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.Type type = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. Time when the resource was scheduled for deletion. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Time when the resource will be irreversibly deleted. + * @type int $state + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * @type \Google\Cloud\VmwareEngine\V1\NetworkConfig $network_config + * Required. Network configuration of the private cloud. + * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $management_cluster + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * @type string $description + * User-provided description for this private cloud. + * @type \Google\Cloud\VmwareEngine\V1\Hcx $hcx + * Output only. HCX appliance. + * @type \Google\Cloud\VmwareEngine\V1\Nsx $nsx + * Output only. NSX appliance. + * @type \Google\Cloud\VmwareEngine\V1\Vcenter $vcenter + * Output only. Vcenter appliance. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type int $type + * Optional. Type of the private cloud. Defaults to STANDARD. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 this private cloud. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Time when the resource was scheduled for deletion. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.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. Time when the resource was scheduled for deletion. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.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; + } + + /** + * Output only. Time when the resource will be irreversibly deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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. Time when the resource will be irreversibly deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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. State of the resource. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the resource. New values may be added to this enum + * when appropriate. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Network configuration of the private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkConfig|null + */ + public function getNetworkConfig() + { + return $this->network_config; + } + + public function hasNetworkConfig() + { + return isset($this->network_config); + } + + public function clearNetworkConfig() + { + unset($this->network_config); + } + + /** + * Required. Network configuration of the private cloud. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkConfig $var + * @return $this + */ + public function setNetworkConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkConfig::class); + $this->network_config = $var; + + return $this; + } + + /** + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster|null + */ + public function getManagementCluster() + { + return $this->management_cluster; + } + + public function hasManagementCluster() + { + return isset($this->management_cluster); + } + + public function clearManagementCluster() + { + unset($this->management_cluster); + } + + /** + * Required. Input only. The management cluster for this private cloud. + * This field is required during creation of the private cloud to provide + * details for the default cluster. + * The following fields can't be changed after private cloud creation: + * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $var + * @return $this + */ + public function setManagementCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster::class); + $this->management_cluster = $var; + + return $this; + } + + /** + * User-provided description for this private cloud. + * + * Generated from protobuf field string description = 11; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this private cloud. + * + * Generated from protobuf field string description = 11; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. HCX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VmwareEngine\V1\Hcx|null + */ + public function getHcx() + { + return $this->hcx; + } + + public function hasHcx() + { + return isset($this->hcx); + } + + public function clearHcx() + { + unset($this->hcx); + } + + /** + * Output only. HCX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VmwareEngine\V1\Hcx $var + * @return $this + */ + public function setHcx($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Hcx::class); + $this->hcx = $var; + + return $this; + } + + /** + * Output only. NSX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VmwareEngine\V1\Nsx|null + */ + public function getNsx() + { + return $this->nsx; + } + + public function hasNsx() + { + return isset($this->nsx); + } + + public function clearNsx() + { + unset($this->nsx); + } + + /** + * Output only. NSX appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VmwareEngine\V1\Nsx $var + * @return $this + */ + public function setNsx($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Nsx::class); + $this->nsx = $var; + + return $this; + } + + /** + * Output only. Vcenter appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VmwareEngine\V1\Vcenter|null + */ + public function getVcenter() + { + return $this->vcenter; + } + + public function hasVcenter() + { + return isset($this->vcenter); + } + + public function clearVcenter() + { + unset($this->vcenter); + } + + /** + * Output only. Vcenter appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VmwareEngine\V1\Vcenter $var + * @return $this + */ + public function setVcenter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Vcenter::class); + $this->vcenter = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Optional. Type of the private cloud. Defaults to STANDARD. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.Type type = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Type of the private cloud. Defaults to STANDARD. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.Type type = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php new file mode 100644 index 000000000000..df6000361aaf --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php @@ -0,0 +1,184 @@ +google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster + */ +class ManagementCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * + * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private $node_type_configs; + /** + * Optional. Configuration of a stretched cluster. Required for STRETCHED + * private clouds. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stretched_cluster_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_id + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * @type array|\Google\Protobuf\Internal\MapField $node_type_configs + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * @type \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $stretched_cluster_config + * Optional. Configuration of a stretched cluster. Required for STRETCHED + * private clouds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * + * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The user-provided identifier of the new `Cluster`. + * The identifier must meet the following requirements: + * * Only contains 1-63 alphanumeric characters and hyphens + * * Begins with an alphabetical character + * * Ends with a non-hyphen character + * * Not formatted as a UUID + * * Complies with [RFC + * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) + * + * Generated from protobuf field string cluster_id = 1 [(.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 map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getNodeTypeConfigs() + { + return $this->node_type_configs; + } + + /** + * Required. The map of cluster node types in this cluster, where the key is + * canonical identifier of the node type (corresponds to the `NodeType`). + * + * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setNodeTypeConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); + $this->node_type_configs = $arr; + + return $this; + } + + /** + * Optional. Configuration of a stretched cluster. Required for STRETCHED + * private clouds. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig|null + */ + public function getStretchedClusterConfig() + { + return $this->stretched_cluster_config; + } + + public function hasStretchedClusterConfig() + { + return isset($this->stretched_cluster_config); + } + + public function clearStretchedClusterConfig() + { + unset($this->stretched_cluster_config); + } + + /** + * Optional. Configuration of a stretched cluster. Required for STRETCHED + * private clouds. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $var + * @return $this + */ + public function setStretchedClusterConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig::class); + $this->stretched_cluster_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ManagementCluster::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_ManagementCluster::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php new file mode 100644 index 000000000000..d7c021d20aec --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php @@ -0,0 +1,94 @@ +google.cloud.vmwareengine.v1.PrivateCloud.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The private cloud is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The private cloud is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The private cloud is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The private cloud is in failed state. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The private cloud is scheduled for deletion. The deletion process can be + * cancelled by using the corresponding undelete method. + * + * Generated from protobuf enum DELETED = 6; + */ + const DELETED = 6; + /** + * The private cloud is irreversibly deleted and is being removed from the + * system. + * + * Generated from protobuf enum PURGING = 7; + */ + const PURGING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::FAILED => 'FAILED', + self::DELETED => 'DELETED', + self::PURGING => 'PURGING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php new file mode 100644 index 000000000000..2b7257917ef9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php @@ -0,0 +1,68 @@ +google.cloud.vmwareengine.v1.PrivateCloud.Type + */ +class Type +{ + /** + * Standard private is a zonal resource, with 3+ nodes. Default type. + * + * Generated from protobuf enum STANDARD = 0; + */ + const STANDARD = 0; + /** + * Time limited private cloud is a zonal resource, can have only 1 node and + * has limited life span. Will be deleted after defined period of time, + * can be converted into standard private cloud by expanding it up to 3 + * or more nodes. + * + * Generated from protobuf enum TIME_LIMITED = 1; + */ + const TIME_LIMITED = 1; + /** + * Stretched private cloud is a regional resource with redundancy, + * with a minimum of 6 nodes, nodes count has to be even. + * + * Generated from protobuf enum STRETCHED = 2; + */ + const STRETCHED = 2; + + private static $valueToName = [ + self::STANDARD => 'STANDARD', + self::TIME_LIMITED => 'TIME_LIMITED', + self::STRETCHED => 'STRETCHED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php new file mode 100644 index 000000000000..c68b2badfa67 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php @@ -0,0 +1,604 @@ +google.cloud.vmwareengine.v1.PrivateConnection + */ +class PrivateConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the private connection. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User-provided description for this private connection. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. State of the private connection. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. The relative resource name of Legacy VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}`, `{location}` will be same as specified in private + * connection resource name and `{vmware_engine_network_id}` will be in the + * form of `{location}`-default e.g. + * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. + * + * Generated from protobuf field string vmware_engine_network = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network = ''; + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vmware_engine_network_canonical = ''; + /** + * Required. Private connection type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.Type type = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. VPC network peering id between given network VPC and + * VMwareEngineNetwork. + * + * Generated from protobuf field string peering_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $peering_id = ''; + /** + * Optional. Routing Mode. + * Default value is set to GLOBAL. + * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or + * REGIONAL, for other types only GLOBAL is supported. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode routing_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $routing_mode = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Required. Service network to create private connection. + * Specify the name in the following form: + * `projects/{project}/global/networks/{network_id}` + * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking + * VPC, e.g. projects/project-tp/global/networks/servicenetworking. + * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, + * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. + * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. + * projects/project-tp/global/networks/dell-tenant-vpc. + * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or + * any other producer VPC to which the VMware Engine Network needs to be + * connected, e.g. projects/project/global/networks/vpc. + * + * Generated from protobuf field string service_network = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service_network = ''; + /** + * Output only. Peering state between service network and VMware Engine + * network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.PeeringState peering_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $peering_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the private connection. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $description + * Optional. User-provided description for this private connection. + * @type int $state + * Output only. State of the private connection. + * @type string $vmware_engine_network + * Required. The relative resource name of Legacy VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}`, `{location}` will be same as specified in private + * connection resource name and `{vmware_engine_network_id}` will be in the + * form of `{location}`-default e.g. + * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. + * @type string $vmware_engine_network_canonical + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * @type int $type + * Required. Private connection type. + * @type string $peering_id + * Output only. VPC network peering id between given network VPC and + * VMwareEngineNetwork. + * @type int $routing_mode + * Optional. Routing Mode. + * Default value is set to GLOBAL. + * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or + * REGIONAL, for other types only GLOBAL is supported. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $service_network + * Required. Service network to create private connection. + * Specify the name in the following form: + * `projects/{project}/global/networks/{network_id}` + * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking + * VPC, e.g. projects/project-tp/global/networks/servicenetworking. + * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, + * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. + * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. + * projects/project-tp/global/networks/dell-tenant-vpc. + * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or + * any other producer VPC to which the VMware Engine Network needs to be + * connected, e.g. projects/project/global/networks/vpc. + * @type int $peering_state + * Output only. Peering state between service network and VMware Engine + * network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the private connection. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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 private connection. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1/privateConnections/my-connection` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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; + } + + /** + * Optional. User-provided description for this private connection. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description for this private connection. + * + * Generated from protobuf field string description = 4 [(.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 private connection. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the private connection. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. The relative resource name of Legacy VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}`, `{location}` will be same as specified in private + * connection resource name and `{vmware_engine_network_id}` will be in the + * form of `{location}`-default e.g. + * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. + * + * Generated from protobuf field string vmware_engine_network = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + /** + * Required. The relative resource name of Legacy VMware Engine network. + * Specify the name in the following form: + * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * where `{project}`, `{location}` will be same as specified in private + * connection resource name and `{vmware_engine_network_id}` will be in the + * form of `{location}`-default e.g. + * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. + * + * Generated from protobuf field string vmware_engine_network = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVmwareEngineNetworkCanonical() + { + return $this->vmware_engine_network_canonical; + } + + /** + * Output only. The canonical name of the VMware Engine network in the form: + * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` + * + * Generated from protobuf field string vmware_engine_network_canonical = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVmwareEngineNetworkCanonical($var) + { + GPBUtil::checkString($var, True); + $this->vmware_engine_network_canonical = $var; + + return $this; + } + + /** + * Required. Private connection type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.Type type = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Private connection type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.Type type = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. VPC network peering id between given network VPC and + * VMwareEngineNetwork. + * + * Generated from protobuf field string peering_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPeeringId() + { + return $this->peering_id; + } + + /** + * Output only. VPC network peering id between given network VPC and + * VMwareEngineNetwork. + * + * Generated from protobuf field string peering_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPeeringId($var) + { + GPBUtil::checkString($var, True); + $this->peering_id = $var; + + return $this; + } + + /** + * Optional. Routing Mode. + * Default value is set to GLOBAL. + * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or + * REGIONAL, for other types only GLOBAL is supported. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode routing_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRoutingMode() + { + return $this->routing_mode; + } + + /** + * Optional. Routing Mode. + * Default value is set to GLOBAL. + * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or + * REGIONAL, for other types only GLOBAL is supported. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode routing_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRoutingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\RoutingMode::class); + $this->routing_mode = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Required. Service network to create private connection. + * Specify the name in the following form: + * `projects/{project}/global/networks/{network_id}` + * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking + * VPC, e.g. projects/project-tp/global/networks/servicenetworking. + * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, + * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. + * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. + * projects/project-tp/global/networks/dell-tenant-vpc. + * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or + * any other producer VPC to which the VMware Engine Network needs to be + * connected, e.g. projects/project/global/networks/vpc. + * + * Generated from protobuf field string service_network = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceNetwork() + { + return $this->service_network; + } + + /** + * Required. Service network to create private connection. + * Specify the name in the following form: + * `projects/{project}/global/networks/{network_id}` + * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking + * VPC, e.g. projects/project-tp/global/networks/servicenetworking. + * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, + * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. + * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. + * projects/project-tp/global/networks/dell-tenant-vpc. + * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or + * any other producer VPC to which the VMware Engine Network needs to be + * connected, e.g. projects/project/global/networks/vpc. + * + * Generated from protobuf field string service_network = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceNetwork($var) + { + GPBUtil::checkString($var, True); + $this->service_network = $var; + + return $this; + } + + /** + * Output only. Peering state between service network and VMware Engine + * network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.PeeringState peering_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPeeringState() + { + return $this->peering_state; + } + + /** + * Output only. Peering state between service network and VMware Engine + * network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.PeeringState peering_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPeeringState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\PeeringState::class); + $this->peering_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php new file mode 100644 index 000000000000..d35b801f864e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php @@ -0,0 +1,66 @@ +google.cloud.vmwareengine.v1.PrivateConnection.PeeringState + */ +class PeeringState +{ + /** + * The default value. This value is used if the peering state is omitted or + * unknown. + * + * Generated from protobuf enum PEERING_STATE_UNSPECIFIED = 0; + */ + const PEERING_STATE_UNSPECIFIED = 0; + /** + * The peering is in active state. + * + * Generated from protobuf enum PEERING_ACTIVE = 1; + */ + const PEERING_ACTIVE = 1; + /** + * The peering is in inactive state. + * + * Generated from protobuf enum PEERING_INACTIVE = 2; + */ + const PEERING_INACTIVE = 2; + + private static $valueToName = [ + self::PEERING_STATE_UNSPECIFIED => 'PEERING_STATE_UNSPECIFIED', + self::PEERING_ACTIVE => 'PEERING_ACTIVE', + self::PEERING_INACTIVE => 'PEERING_INACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PeeringState::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_PeeringState::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php new file mode 100644 index 000000000000..2642d234ccee --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php @@ -0,0 +1,68 @@ +google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode + */ +class RoutingMode +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum ROUTING_MODE_UNSPECIFIED = 0; + */ + const ROUTING_MODE_UNSPECIFIED = 0; + /** + * Global Routing Mode + * + * Generated from protobuf enum GLOBAL = 1; + */ + const PBGLOBAL = 1; + /** + * Regional Routing Mode + * + * Generated from protobuf enum REGIONAL = 2; + */ + const REGIONAL = 2; + + private static $valueToName = [ + self::ROUTING_MODE_UNSPECIFIED => 'ROUTING_MODE_UNSPECIFIED', + self::PBGLOBAL => 'GLOBAL', + self::REGIONAL => 'REGIONAL', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RoutingMode::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_RoutingMode::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php new file mode 100644 index 000000000000..dff8d99aa8fc --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php @@ -0,0 +1,93 @@ +google.cloud.vmwareengine.v1.PrivateConnection.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; + /** + * The private connection is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The private connection is ready. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The private connection is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The private connection is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The private connection is not provisioned, since no private cloud is + * present for which this private connection is needed. + * + * Generated from protobuf enum UNPROVISIONED = 5; + */ + const UNPROVISIONED = 5; + /** + * The private connection is in failed state. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::UNPROVISIONED => 'UNPROVISIONED', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php new file mode 100644 index 000000000000..d1b00632a382 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php @@ -0,0 +1,79 @@ +google.cloud.vmwareengine.v1.PrivateConnection.Type + */ +class Type +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Connection used for establishing [private services + * access](https://cloud.google.com/vpc/docs/private-services-access). + * + * Generated from protobuf enum PRIVATE_SERVICE_ACCESS = 1; + */ + const PRIVATE_SERVICE_ACCESS = 1; + /** + * Connection used for connecting to NetApp Cloud Volumes. + * + * Generated from protobuf enum NETAPP_CLOUD_VOLUMES = 2; + */ + const NETAPP_CLOUD_VOLUMES = 2; + /** + * Connection used for connecting to Dell PowerScale. + * + * Generated from protobuf enum DELL_POWERSCALE = 3; + */ + const DELL_POWERSCALE = 3; + /** + * Connection used for connecting to third-party services. + * + * Generated from protobuf enum THIRD_PARTY_SERVICE = 4; + */ + const THIRD_PARTY_SERVICE = 4; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PRIVATE_SERVICE_ACCESS => 'PRIVATE_SERVICE_ACCESS', + self::NETAPP_CLOUD_VOLUMES => 'NETAPP_CLOUD_VOLUMES', + self::DELL_POWERSCALE => 'DELL_POWERSCALE', + self::THIRD_PARTY_SERVICE => 'THIRD_PARTY_SERVICE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php new file mode 100644 index 000000000000..b438309f8d3c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php @@ -0,0 +1,179 @@ +google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest + */ +class RepairManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the management DNS zone binding to repair. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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 resource name of the management DNS zone binding to repair. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\RepairManagementDnsZoneBindingRequest + * + * @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 management DNS zone binding to repair. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the management DNS zone binding to repair. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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 management DNS zone binding to repair. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` + * + * 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php new file mode 100644 index 000000000000..9da980200072 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php @@ -0,0 +1,185 @@ +google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest + */ +class ResetNsxCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 $privateCloud Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php new file mode 100644 index 000000000000..a39d63627f24 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php @@ -0,0 +1,251 @@ +google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest + */ +class ResetVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. The username of the user to be to reset the credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value should be one of the following: + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $username = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 string $username + * Optional. The username of the user to be to reset the credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value should be one of the following: + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to reset credentials for. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. The username of the user to be to reset the credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value should be one of the following: + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Optional. The username of the user to be to reset the credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value should be one of the following: + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php new file mode 100644 index 000000000000..564092bc2a77 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest + */ +class RevokeDnsBindPermissionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $principal = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field. + * @param \Google\Cloud\VmwareEngine\V1\Principal $principal Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * @return \Google\Cloud\VmwareEngine\V1\RevokeDnsBindPermissionRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\VmwareEngine\V1\Principal $principal): self + { + return (new self()) + ->setName($name) + ->setPrincipal($principal); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * @type \Google\Cloud\VmwareEngine\V1\Principal $principal + * Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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 resource which stores the users/service accounts + * having the permission to bind to the corresponding intranet VPC of the + * consumer project. DnsBindPermission is a global resource. Resource names + * are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. For example: + * `projects/my-project/locations/global/dnsBindPermission` + * + * 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 consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Principal|null + */ + public function getPrincipal() + { + return $this->principal; + } + + public function hasPrincipal() + { + return isset($this->principal); + } + + public function clearPrincipal() + { + unset($this->principal); + } + + /** + * Required. The consumer provided user/service account which needs to be + * granted permission to bind with the intranet VPC corresponding to the + * consumer project. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Principal $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Principal::class); + $this->principal = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php new file mode 100644 index 000000000000..a84e71cca4cd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php @@ -0,0 +1,107 @@ +google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest + */ +class ShowNsxCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php new file mode 100644 index 000000000000..5201c0e2b530 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php @@ -0,0 +1,177 @@ +google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest + */ +class ShowVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_cloud = ''; + /** + * Optional. The username of the user to be queried for credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value must be one of the following: + * CloudOwner@gve.local, + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $username = ''; + + /** + * @param string $privateCloud Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest + * + * @experimental + */ + public static function build(string $privateCloud): self + { + return (new self()) + ->setPrivateCloud($privateCloud); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_cloud + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $username + * Optional. The username of the user to be queried for credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value must be one of the following: + * CloudOwner@gve.local, + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + /** + * Required. The resource name of the private cloud + * to be queried for credentials. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkString($var, True); + $this->private_cloud = $var; + + return $this; + } + + /** + * Optional. The username of the user to be queried for credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value must be one of the following: + * CloudOwner@gve.local, + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Optional. The username of the user to be queried for credentials. + * The default value of this field is CloudOwner@gve.local. + * The provided value must be one of the following: + * CloudOwner@gve.local, + * solution-user-01@gve.local, + * solution-user-02@gve.local, + * solution-user-03@gve.local, + * solution-user-04@gve.local, + * solution-user-05@gve.local, + * zertoadmin@gve.local. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php new file mode 100644 index 000000000000..fca19569c8eb --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php @@ -0,0 +1,133 @@ +google.cloud.vmwareengine.v1.StretchedClusterConfig + */ +class StretchedClusterConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Zone that will remain operational when connection between the two + * zones is lost. Specify the resource name of a zone that belongs to the + * region of the private cloud. For example: + * `projects/{project}/locations/europe-west3-a` where `{project}` can either + * be a project number or a project ID. + * + * Generated from protobuf field string preferred_location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $preferred_location = ''; + /** + * Required. Additional zone for a higher level of availability and load + * balancing. Specify the resource name of a zone that belongs to the region + * of the private cloud. For example: + * `projects/{project}/locations/europe-west3-b` where `{project}` can either + * be a project number or a project ID. + * + * Generated from protobuf field string secondary_location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $secondary_location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $preferred_location + * Required. Zone that will remain operational when connection between the two + * zones is lost. Specify the resource name of a zone that belongs to the + * region of the private cloud. For example: + * `projects/{project}/locations/europe-west3-a` where `{project}` can either + * be a project number or a project ID. + * @type string $secondary_location + * Required. Additional zone for a higher level of availability and load + * balancing. Specify the resource name of a zone that belongs to the region + * of the private cloud. For example: + * `projects/{project}/locations/europe-west3-b` where `{project}` can either + * be a project number or a project ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Zone that will remain operational when connection between the two + * zones is lost. Specify the resource name of a zone that belongs to the + * region of the private cloud. For example: + * `projects/{project}/locations/europe-west3-a` where `{project}` can either + * be a project number or a project ID. + * + * Generated from protobuf field string preferred_location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPreferredLocation() + { + return $this->preferred_location; + } + + /** + * Required. Zone that will remain operational when connection between the two + * zones is lost. Specify the resource name of a zone that belongs to the + * region of the private cloud. For example: + * `projects/{project}/locations/europe-west3-a` where `{project}` can either + * be a project number or a project ID. + * + * Generated from protobuf field string preferred_location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPreferredLocation($var) + { + GPBUtil::checkString($var, True); + $this->preferred_location = $var; + + return $this; + } + + /** + * Required. Additional zone for a higher level of availability and load + * balancing. Specify the resource name of a zone that belongs to the region + * of the private cloud. For example: + * `projects/{project}/locations/europe-west3-b` where `{project}` can either + * be a project number or a project ID. + * + * Generated from protobuf field string secondary_location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSecondaryLocation() + { + return $this->secondary_location; + } + + /** + * Required. Additional zone for a higher level of availability and load + * balancing. Specify the resource name of a zone that belongs to the region + * of the private cloud. For example: + * `projects/{project}/locations/europe-west3-b` where `{project}` can either + * be a project number or a project ID. + * + * Generated from protobuf field string secondary_location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSecondaryLocation($var) + { + GPBUtil::checkString($var, True); + $this->secondary_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php new file mode 100644 index 000000000000..dc5ded5f9a43 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php @@ -0,0 +1,262 @@ +google.cloud.vmwareengine.v1.Subnet + */ +class Subnet extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * + * Generated from protobuf field string ip_cidr_range = 7; + */ + protected $ip_cidr_range = ''; + /** + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * + * Generated from protobuf field string gateway_ip = 8; + */ + protected $gateway_ip = ''; + /** + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * + * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. VLAN ID of the VLAN on which the subnet is configured + * + * Generated from protobuf field int32 vlan_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vlan_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * @type string $ip_cidr_range + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * @type string $gateway_ip + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * @type string $type + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * @type int $state + * Output only. The state of the resource. + * @type int $vlan_id + * Output only. VLAN ID of the VLAN on which the subnet is configured + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * 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 this subnet. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` + * + * 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 IP address range of the subnet in CIDR format '10.0.0.0/24'. + * + * Generated from protobuf field string ip_cidr_range = 7; + * @return string + */ + public function getIpCidrRange() + { + return $this->ip_cidr_range; + } + + /** + * The IP address range of the subnet in CIDR format '10.0.0.0/24'. + * + * Generated from protobuf field string ip_cidr_range = 7; + * @param string $var + * @return $this + */ + public function setIpCidrRange($var) + { + GPBUtil::checkString($var, True); + $this->ip_cidr_range = $var; + + return $this; + } + + /** + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * + * Generated from protobuf field string gateway_ip = 8; + * @return string + */ + public function getGatewayIp() + { + return $this->gateway_ip; + } + + /** + * The IP address of the gateway of this subnet. + * Must fall within the IP prefix defined above. + * + * Generated from protobuf field string gateway_ip = 8; + * @param string $var + * @return $this + */ + public function setGatewayIp($var) + { + GPBUtil::checkString($var, True); + $this->gateway_ip = $var; + + return $this; + } + + /** + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * + * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of the subnet. For example "management" or + * "userDefined". + * + * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the resource. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Subnet\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. VLAN ID of the VLAN on which the subnet is configured + * + * Generated from protobuf field int32 vlan_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVlanId() + { + return $this->vlan_id; + } + + /** + * Output only. VLAN ID of the VLAN on which the subnet is configured + * + * Generated from protobuf field int32 vlan_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVlanId($var) + { + GPBUtil::checkInt32($var); + $this->vlan_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php new file mode 100644 index 000000000000..41e7a6b5b77f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php @@ -0,0 +1,93 @@ +google.cloud.vmwareengine.v1.Subnet.State + */ +class State +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The subnet is ready. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The subnet is being created. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * The subnet is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The subnet is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Changes requested in the last operation are being propagated. + * + * Generated from protobuf enum RECONCILING = 5; + */ + const RECONCILING = 5; + /** + * Last operation on the subnet did not succeed. Subnet's payload is + * reverted back to its most recent working state. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::RECONCILING => 'RECONCILING', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Subnet_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php new file mode 100644 index 000000000000..821fbcbc6865 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php @@ -0,0 +1,140 @@ +google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest + */ +class UndeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. 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 resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. + * + * @return \Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest + * + * @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 private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * @type string $request_id + * Optional. 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 private cloud scheduled for deletion. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` + * + * 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 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. 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php new file mode 100644 index 000000000000..badc304f0823 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php @@ -0,0 +1,233 @@ +google.cloud.vmwareengine.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 `updateMask` + * 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 description of the cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. 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. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The description of the cluster. + * @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 `updateMask` + * 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\VmwareEngine\V1\UpdateClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\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 `updateMask` + * 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\VmwareEngine\V1\Cluster $cluster + * Required. The description of the cluster. + * @type string $request_id + * Optional. The request ID must be a valid UUID with the exception that + * zero UUID is not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::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 `updateMask` + * 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 `updateMask` + * 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 description of the cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The description of the cluster. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. 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. 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. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. True if you want the request to be validated and not executed; + * false otherwise. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php new file mode 100644 index 000000000000..8d37ab7be38e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest + */ +class UpdateDnsForwardingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. DnsForwarding config details. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.DnsForwarding dns_forwarding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns_forwarding = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `DnsForwarding` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\VmwareEngine\V1\DnsForwarding $dnsForwarding Required. DnsForwarding config details. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `DnsForwarding` 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\VmwareEngine\V1\UpdateDnsForwardingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\DnsForwarding $dnsForwarding, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDnsForwarding($dnsForwarding) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\DnsForwarding $dns_forwarding + * Required. DnsForwarding config details. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `DnsForwarding` 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 string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. DnsForwarding config details. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.DnsForwarding dns_forwarding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\DnsForwarding|null + */ + public function getDnsForwarding() + { + return $this->dns_forwarding; + } + + public function hasDnsForwarding() + { + return isset($this->dns_forwarding); + } + + public function clearDnsForwarding() + { + unset($this->dns_forwarding); + } + + /** + * Required. DnsForwarding config details. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.DnsForwarding dns_forwarding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\DnsForwarding $var + * @return $this + */ + public function setDnsForwarding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\DnsForwarding::class); + $this->dns_forwarding = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `DnsForwarding` 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 = 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 + * `DnsForwarding` 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 = 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; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php new file mode 100644 index 000000000000..7012b7dd0069 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest + */ +class UpdateExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAccessRule` 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. Description of the external access rule. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_access_rule = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\VmwareEngine\V1\ExternalAccessRule $externalAccessRule Required. Description of the external access rule. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAccessRule` 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\VmwareEngine\V1\UpdateExternalAccessRuleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\ExternalAccessRule $externalAccessRule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setExternalAccessRule($externalAccessRule) + ->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 + * `ExternalAccessRule` 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\VmwareEngine\V1\ExternalAccessRule $external_access_rule + * Required. Description of the external access rule. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAccessRule` 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 + * `ExternalAccessRule` 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. Description of the external access rule. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\ExternalAccessRule|null + */ + public function getExternalAccessRule() + { + return $this->external_access_rule; + } + + public function hasExternalAccessRule() + { + return isset($this->external_access_rule); + } + + public function clearExternalAccessRule() + { + unset($this->external_access_rule); + } + + /** + * Required. Description of the external access rule. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $var + * @return $this + */ + public function setExternalAccessRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule::class); + $this->external_access_rule = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php new file mode 100644 index 000000000000..9b39c54b907a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateExternalAddressRequest + */ +class UpdateExternalAddressRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAddress` 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. External IP address description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $external_address = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\VmwareEngine\V1\ExternalAddress $externalAddress Required. External IP address description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAddress` 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\VmwareEngine\V1\UpdateExternalAddressRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\ExternalAddress $externalAddress, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setExternalAddress($externalAddress) + ->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 + * `ExternalAddress` 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\VmwareEngine\V1\ExternalAddress $external_address + * Required. External IP address description. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `ExternalAddress` 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 + * `ExternalAddress` 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. External IP address description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\ExternalAddress|null + */ + public function getExternalAddress() + { + return $this->external_address; + } + + public function hasExternalAddress() + { + return isset($this->external_address); + } + + public function clearExternalAddress() + { + unset($this->external_address); + } + + /** + * Required. External IP address description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\ExternalAddress $var + * @return $this + */ + public function setExternalAddress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); + $this->external_address = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php new file mode 100644 index 000000000000..a1fa394ba6f0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateLoggingServerRequest + */ +class UpdateLoggingServerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `LoggingServer` 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. Logging server description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $logging_server = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\VmwareEngine\V1\LoggingServer $loggingServer Required. Logging server description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `LoggingServer` 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\VmwareEngine\V1\UpdateLoggingServerRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\LoggingServer $loggingServer, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setLoggingServer($loggingServer) + ->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 + * `LoggingServer` 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\VmwareEngine\V1\LoggingServer $logging_server + * Required. Logging server description. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `LoggingServer` 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 + * `LoggingServer` 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. Logging server description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\LoggingServer|null + */ + public function getLoggingServer() + { + return $this->logging_server; + } + + public function hasLoggingServer() + { + return isset($this->logging_server); + } + + public function clearLoggingServer() + { + unset($this->logging_server); + } + + /** + * Required. Logging server description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\LoggingServer $var + * @return $this + */ + public function setLoggingServer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\LoggingServer::class); + $this->logging_server = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php new file mode 100644 index 000000000000..5080e3c59eb6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest + */ +class UpdateManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `ManagementDnsZoneBinding` 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. New values to update the management DNS zone binding with. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $management_dns_zone_binding = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding Required. New values to update the management DNS zone binding with. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `ManagementDnsZoneBinding` 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\VmwareEngine\V1\UpdateManagementDnsZoneBindingRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setManagementDnsZoneBinding($managementDnsZoneBinding) + ->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 + * `ManagementDnsZoneBinding` 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\VmwareEngine\V1\ManagementDnsZoneBinding $management_dns_zone_binding + * Required. New values to update the management DNS zone binding with. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `ManagementDnsZoneBinding` 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 + * `ManagementDnsZoneBinding` 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. New values to update the management DNS zone binding with. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding|null + */ + public function getManagementDnsZoneBinding() + { + return $this->management_dns_zone_binding; + } + + public function hasManagementDnsZoneBinding() + { + return isset($this->management_dns_zone_binding); + } + + public function clearManagementDnsZoneBinding() + { + unset($this->management_dns_zone_binding); + } + + /** + * Required. New values to update the management DNS zone binding with. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $var + * @return $this + */ + public function setManagementDnsZoneBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding::class); + $this->management_dns_zone_binding = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if the original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php new file mode 100644 index 000000000000..cb753c3e50ff --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest + */ +class UpdateNetworkPeeringRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Network peering description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_peering = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPeering` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\VmwareEngine\V1\NetworkPeering $networkPeering Required. Network peering description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPeering` 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\VmwareEngine\V1\UpdateNetworkPeeringRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\NetworkPeering $networkPeering, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNetworkPeering($networkPeering) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\NetworkPeering $network_peering + * Required. Network peering description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPeering` 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 string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Network peering description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPeering|null + */ + public function getNetworkPeering() + { + return $this->network_peering; + } + + public function hasNetworkPeering() + { + return isset($this->network_peering); + } + + public function clearNetworkPeering() + { + unset($this->network_peering); + } + + /** + * Required. Network peering description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPeering $var + * @return $this + */ + public function setNetworkPeering($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering::class); + $this->network_peering = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPeering` 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 = 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 + * `NetworkPeering` 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 = 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; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php new file mode 100644 index 000000000000..7fddaaad169e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest + */ +class UpdateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Network policy description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network_policy = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. Network policy description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` 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\VmwareEngine\V1\UpdateNetworkPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy + * Required. Network policy description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` 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 string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Network policy description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null + */ + public function getNetworkPolicy() + { + return $this->network_policy; + } + + public function hasNetworkPolicy() + { + return isset($this->network_policy); + } + + public function clearNetworkPolicy() + { + unset($this->network_policy); + } + + /** + * Required. Network policy description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var + * @return $this + */ + public function setNetworkPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); + $this->network_policy = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `NetworkPolicy` 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 = 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 + * `NetworkPolicy` 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 = 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; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php new file mode 100644 index 000000000000..16c19f6e1410 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php @@ -0,0 +1,195 @@ +google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest + */ +class UpdatePrivateCloudRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Private cloud description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_cloud = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. 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\VmwareEngine\V1\PrivateCloud $privateCloud Required. Private cloud description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * 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\VmwareEngine\V1\UpdatePrivateCloudRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud + * Required. Private cloud description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * 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 string $request_id + * Optional. 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Private cloud description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null + */ + public function getPrivateCloud() + { + return $this->private_cloud; + } + + public function hasPrivateCloud() + { + return isset($this->private_cloud); + } + + public function clearPrivateCloud() + { + unset($this->private_cloud); + } + + /** + * Required. Private cloud description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var + * @return $this + */ + public function setPrivateCloud($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); + $this->private_cloud = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * 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 = 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 + * `PrivateCloud` resource by the update. The fields specified in `updateMask` + * 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 = 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; + } + + /** + * Optional. 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. 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php new file mode 100644 index 000000000000..24fa1e9a5ae6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest + */ +class UpdatePrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Private connection description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_connection = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateConnection` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\VmwareEngine\V1\PrivateConnection $privateConnection Required. Private connection description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateConnection` 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\VmwareEngine\V1\UpdatePrivateConnectionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\PrivateConnection $privateConnection, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPrivateConnection($privateConnection) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\PrivateConnection $private_connection + * Required. Private connection description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateConnection` 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 string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Private connection description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\PrivateConnection|null + */ + public function getPrivateConnection() + { + return $this->private_connection; + } + + public function hasPrivateConnection() + { + return isset($this->private_connection); + } + + public function clearPrivateConnection() + { + unset($this->private_connection); + } + + /** + * Required. Private connection description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\PrivateConnection $var + * @return $this + */ + public function setPrivateConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection::class); + $this->private_connection = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PrivateConnection` 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 = 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 + * `PrivateConnection` 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 = 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; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php new file mode 100644 index 000000000000..b4877c06c757 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php @@ -0,0 +1,157 @@ +google.cloud.vmwareengine.v1.UpdateSubnetRequest + */ +class UpdateSubnetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Subnet` 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. Subnet description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subnet = null; + + /** + * @param \Google\Cloud\VmwareEngine\V1\Subnet $subnet Required. Subnet description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Subnet` 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\VmwareEngine\V1\UpdateSubnetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\Subnet $subnet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSubnet($subnet) + ->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 + * `Subnet` 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\VmwareEngine\V1\Subnet $subnet + * Required. Subnet description. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Subnet` 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 + * `Subnet` 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. Subnet description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\Subnet|null + */ + public function getSubnet() + { + return $this->subnet; + } + + public function hasSubnet() + { + return isset($this->subnet); + } + + public function clearSubnet() + { + unset($this->subnet); + } + + /** + * Required. Subnet description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\Subnet $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Subnet::class); + $this->subnet = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php new file mode 100644 index 000000000000..38f1091baa29 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php @@ -0,0 +1,240 @@ +google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest + */ +class UpdateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. VMware Engine network description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vmware_engine_network = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network 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. Only the + * following fields can be updated: `description`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. VMware Engine network description. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network 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. Only the + * following fields can be updated: `description`. + * + * @return \Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network + * Required. VMware Engine network description. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network 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. Only the + * following fields can be updated: `description`. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); + parent::__construct($data); + } + + /** + * Required. VMware Engine network description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null + */ + public function getVmwareEngineNetwork() + { + return $this->vmware_engine_network; + } + + public function hasVmwareEngineNetwork() + { + return isset($this->vmware_engine_network); + } + + public function clearVmwareEngineNetwork() + { + unset($this->vmware_engine_network); + } + + /** + * Required. VMware Engine network description. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var + * @return $this + */ + public function setVmwareEngineNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); + $this->vmware_engine_network = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * VMware Engine network 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. Only the + * following fields can be updated: `description`. + * + * 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 + * VMware Engine network 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. Only the + * following fields can be updated: `description`. + * + * 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; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server guarantees that a + * request doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php new file mode 100644 index 000000000000..1d7fb8297ae3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php @@ -0,0 +1,169 @@ +google.cloud.vmwareengine.v1.Vcenter + */ +class Vcenter extends \Google\Protobuf\Internal\Message +{ + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + */ + protected $internal_ip = ''; + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + */ + protected $fqdn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $internal_ip + * Internal IP address of the appliance. + * @type string $version + * Version of the appliance. + * @type int $state + * Output only. The state of the appliance. + * @type string $fqdn + * Fully qualified domain name of the appliance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the appliance. + * + * Generated from protobuf field string internal_ip = 2; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Version of the appliance. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the appliance. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Vcenter\State::class); + $this->state = $var; + + return $this; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name of the appliance. + * + * Generated from protobuf field string fqdn = 6; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php new file mode 100644 index 000000000000..37b87d5973f6 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php @@ -0,0 +1,64 @@ +google.cloud.vmwareengine.v1.Vcenter.State + */ +class State +{ + /** + * Unspecified appliance state. This is the default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The appliance is operational and can be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The appliance is being deployed. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::CREATING => 'CREATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Vcenter_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php new file mode 100644 index 000000000000..11b48b25b570 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php @@ -0,0 +1,396 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork + */ +class VmwareEngineNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update time of this resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-provided description for this VMware Engine network. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $vpc_networks; + /** + * Output only. State of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. VMware Engine network type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * + * Generated from protobuf field string etag = 10; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation time of this resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update time of this resource. + * @type string $description + * User-provided description for this VMware Engine network. + * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $vpc_networks + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * @type int $state + * Output only. State of the VMware Engine network. + * @type int $type + * Required. VMware Engine network type. + * @type string $uid + * Output only. System-generated unique identifier for the resource. + * @type string $etag + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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 VMware Engine network. + * Resource names are schemeless URIs that follow the conventions in + * https://cloud.google.com/apis/design/resource_names. + * For example: + * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` + * + * 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. Creation time of this resource. + * + * 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. Creation time of this resource. + * + * 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. Last update time of this resource. + * + * 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. Last update time of this resource. + * + * 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; + } + + /** + * User-provided description for this VMware Engine network. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * User-provided description for this VMware Engine network. + * + * 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; + } + + /** + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVpcNetworks() + { + return $this->vpc_networks; + } + + /** + * Output only. VMware Engine service VPC networks that provide connectivity + * from a private cloud to customer projects, the internet, and other Google + * Cloud services. + * + * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVpcNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork::class); + $this->vpc_networks = $arr; + + return $this; + } + + /** + * Output only. State of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the VMware Engine network. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. VMware Engine network type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. VMware Engine network type. + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System-generated unique identifier for the resource. + * + * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * + * Generated from protobuf field string etag = 10; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Checksum that may be sent on update and delete requests to ensure that the + * user-provided value is up to date before the server processes a request. + * The server computes checksums based on the value of other fields in the + * request. + * + * Generated from protobuf field string etag = 10; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php new file mode 100644 index 000000000000..3f8a6067ccdb --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php @@ -0,0 +1,78 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.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; + /** + * The VMware Engine network is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The VMware Engine network is ready. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The VMware Engine network is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The VMware Engine network is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_State::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php new file mode 100644 index 000000000000..28f91974aaa7 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php @@ -0,0 +1,66 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type + */ +class Type +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Network type used by private clouds created in projects without a network + * of type `STANDARD`. This network type is no longer used for new VMware + * Engine private cloud deployments. + * + * Generated from protobuf enum LEGACY = 1; + */ + const LEGACY = 1; + /** + * Standard network type used for private cloud connectivity. + * + * Generated from protobuf enum STANDARD = 2; + */ + const STANDARD = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::LEGACY => 'LEGACY', + self::STANDARD => 'STANDARD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php new file mode 100644 index 000000000000..9ef0665f0e7f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php @@ -0,0 +1,117 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork + */ +class VpcNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * @type string $network + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. Type of VPC network (INTRANET, INTERNET, or + * GOOGLE_CLOUD) + * + * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. The relative resource name of the service VPC network this + * VMware Engine network is attached to. For example: + * `projects/123123/global/networks/my-network` + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VpcNetwork::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php new file mode 100644 index 000000000000..194c6e10931a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php @@ -0,0 +1,76 @@ +google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type + */ +class Type +{ + /** + * The default value. This value should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * VPC network that will be peered with a consumer VPC network or the + * intranet VPC of another VMware Engine network. Access a private cloud + * through Compute Engine VMs on a peered VPC network or an on-premises + * resource connected to a peered consumer VPC network. + * + * Generated from protobuf enum INTRANET = 1; + */ + const INTRANET = 1; + /** + * VPC network used for internet access to and from a private cloud. + * + * Generated from protobuf enum INTERNET = 2; + */ + const INTERNET = 2; + /** + * VPC network used for access to Google Cloud services like + * Cloud Storage. + * + * Generated from protobuf enum GOOGLE_CLOUD = 3; + */ + const GOOGLE_CLOUD = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::INTRANET => 'INTRANET', + self::INTERNET => 'INTERNET', + self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork_Type::class); + diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php new file mode 100644 index 000000000000..d8d26b139c8c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php @@ -0,0 +1,111 @@ +setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $clusterId = '[CLUSTER_ID]'; + + create_cluster_sample($formattedParent, $clusterId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php new file mode 100644 index 000000000000..5d130ca4ca6b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php @@ -0,0 +1,109 @@ +setParent($formattedParent) + ->setExternalAccessRule($externalAccessRule) + ->setExternalAccessRuleId($externalAccessRuleId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createExternalAccessRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExternalAccessRule $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 = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + $externalAccessRuleId = '[EXTERNAL_ACCESS_RULE_ID]'; + + create_external_access_rule_sample($formattedParent, $externalAccessRuleId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php new file mode 100644 index 000000000000..7e0fb92de484 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php @@ -0,0 +1,109 @@ +setParent($formattedParent) + ->setExternalAddress($externalAddress) + ->setExternalAddressId($externalAddressId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createExternalAddress($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExternalAddress $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $externalAddressId = '[EXTERNAL_ADDRESS_ID]'; + + create_external_address_sample($formattedParent, $externalAddressId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php new file mode 100644 index 000000000000..adc1f4527850 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php @@ -0,0 +1,108 @@ +setParent($formattedParent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createHcxActivationKey($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var HcxActivationKey $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $hcxActivationKeyId = '[HCX_ACTIVATION_KEY_ID]'; + + create_hcx_activation_key_sample($formattedParent, $hcxActivationKeyId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php new file mode 100644 index 000000000000..8371739f6ba3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php @@ -0,0 +1,136 @@ +setHostname($loggingServerHostname) + ->setPort($loggingServerPort) + ->setProtocol($loggingServerProtocol) + ->setSourceType($loggingServerSourceType); + $request = (new CreateLoggingServerRequest()) + ->setParent($formattedParent) + ->setLoggingServer($loggingServer) + ->setLoggingServerId($loggingServerId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createLoggingServer($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LoggingServer $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $loggingServerHostname = '[HOSTNAME]'; + $loggingServerPort = 0; + $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; + $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; + $loggingServerId = '[LOGGING_SERVER_ID]'; + + create_logging_server_sample( + $formattedParent, + $loggingServerHostname, + $loggingServerPort, + $loggingServerProtocol, + $loggingServerSourceType, + $loggingServerId + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php new file mode 100644 index 000000000000..a6ecfb793e8f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php @@ -0,0 +1,116 @@ +setParent($formattedParent) + ->setManagementDnsZoneBinding($managementDnsZoneBinding) + ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createManagementDnsZoneBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + $managementDnsZoneBindingId = '[MANAGEMENT_DNS_ZONE_BINDING_ID]'; + + create_management_dns_zone_binding_sample($formattedParent, $managementDnsZoneBindingId); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php new file mode 100644 index 000000000000..d882fe57501b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php @@ -0,0 +1,140 @@ +setPeerNetwork($networkPeeringPeerNetwork) + ->setPeerNetworkType($networkPeeringPeerNetworkType) + ->setVmwareEngineNetwork($formattedNetworkPeeringVmwareEngineNetwork); + $request = (new CreateNetworkPeeringRequest()) + ->setParent($formattedParent) + ->setNetworkPeeringId($networkPeeringId) + ->setNetworkPeering($networkPeering); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createNetworkPeering($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NetworkPeering $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $networkPeeringId = '[NETWORK_PEERING_ID]'; + $networkPeeringPeerNetwork = '[PEER_NETWORK]'; + $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; + $formattedNetworkPeeringVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + + create_network_peering_sample( + $formattedParent, + $networkPeeringId, + $networkPeeringPeerNetwork, + $networkPeeringPeerNetworkType, + $formattedNetworkPeeringVmwareEngineNetwork + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php new file mode 100644 index 000000000000..bac7d58c4a6c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php @@ -0,0 +1,115 @@ +setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $request = (new CreateNetworkPolicyRequest()) + ->setParent($formattedParent) + ->setNetworkPolicyId($networkPolicyId) + ->setNetworkPolicy($networkPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createNetworkPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NetworkPolicy $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = '[NETWORK_POLICY_ID]'; + $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; + + create_network_policy_sample($formattedParent, $networkPolicyId, $networkPolicyEdgeServicesCidr); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php new file mode 100644 index 000000000000..11b2960c57e5 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php @@ -0,0 +1,139 @@ +setManagementCidr($privateCloudNetworkConfigManagementCidr); + $privateCloudManagementClusterNodeTypeConfigs = []; + $privateCloudManagementCluster = (new ManagementCluster()) + ->setClusterId($privateCloudManagementClusterClusterId) + ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); + $privateCloud = (new PrivateCloud()) + ->setNetworkConfig($privateCloudNetworkConfig) + ->setManagementCluster($privateCloudManagementCluster); + $request = (new CreatePrivateCloudRequest()) + ->setParent($formattedParent) + ->setPrivateCloudId($privateCloudId) + ->setPrivateCloud($privateCloud); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createPrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = '[PRIVATE_CLOUD_ID]'; + $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; + $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; + + create_private_cloud_sample( + $formattedParent, + $privateCloudId, + $privateCloudNetworkConfigManagementCidr, + $privateCloudManagementClusterClusterId + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php new file mode 100644 index 000000000000..a5080cc3743e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php @@ -0,0 +1,150 @@ +setVmwareEngineNetwork($formattedPrivateConnectionVmwareEngineNetwork) + ->setType($privateConnectionType) + ->setServiceNetwork($formattedPrivateConnectionServiceNetwork); + $request = (new CreatePrivateConnectionRequest()) + ->setParent($formattedParent) + ->setPrivateConnectionId($privateConnectionId) + ->setPrivateConnection($privateConnection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createPrivateConnection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateConnection $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $privateConnectionId = '[PRIVATE_CONNECTION_ID]'; + $formattedPrivateConnectionVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + $privateConnectionType = Type::TYPE_UNSPECIFIED; + $formattedPrivateConnectionServiceNetwork = VmwareEngineClient::networkName( + '[PROJECT]', + '[NETWORK]' + ); + + create_private_connection_sample( + $formattedParent, + $privateConnectionId, + $formattedPrivateConnectionVmwareEngineNetwork, + $privateConnectionType, + $formattedPrivateConnectionServiceNetwork + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreatePrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php new file mode 100644 index 000000000000..cd0d6b6a571d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php @@ -0,0 +1,118 @@ +setType($vmwareEngineNetworkType); + $request = (new CreateVmwareEngineNetworkRequest()) + ->setParent($formattedParent) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId) + ->setVmwareEngineNetwork($vmwareEngineNetwork); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->createVmwareEngineNetwork($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VmwareEngineNetwork $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = '[VMWARE_ENGINE_NETWORK_ID]'; + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + + create_vmware_engine_network_sample( + $formattedParent, + $vmwareEngineNetworkId, + $vmwareEngineNetworkType + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_CreateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php new file mode 100644 index 000000000000..d48815d0176c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php @@ -0,0 +1,92 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->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 = VmwareEngineClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[CLUSTER]' + ); + + delete_cluster_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php new file mode 100644 index 000000000000..c81941f37b1a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteExternalAccessRule($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 = VmwareEngineClient::externalAccessRuleName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]', + '[EXTERNAL_ACCESS_RULE]' + ); + + delete_external_access_rule_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php new file mode 100644 index 000000000000..2ecb2b32a340 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteExternalAddress($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 = VmwareEngineClient::externalAddressName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[EXTERNAL_ADDRESS]' + ); + + delete_external_address_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php new file mode 100644 index 000000000000..8cb9dd78549a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteLoggingServer($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 = VmwareEngineClient::loggingServerName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[LOGGING_SERVER]' + ); + + delete_logging_server_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php new file mode 100644 index 000000000000..8aa149bc6067 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteManagementDnsZoneBinding($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 = VmwareEngineClient::managementDnsZoneBindingName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[MANAGEMENT_DNS_ZONE_BINDING]' + ); + + delete_management_dns_zone_binding_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php new file mode 100644 index 000000000000..19df1760d0fe --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteNetworkPeering($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 = VmwareEngineClient::networkPeeringName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_PEERING]' + ); + + delete_network_peering_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php new file mode 100644 index 000000000000..c12774954e0e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteNetworkPolicy($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 = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + + delete_network_policy_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php new file mode 100644 index 000000000000..7baeefdc16bf --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php @@ -0,0 +1,101 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deletePrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + + delete_private_cloud_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php new file mode 100644 index 000000000000..07ef7d7e37cd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deletePrivateConnection($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 = VmwareEngineClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + + delete_private_connection_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeletePrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php new file mode 100644 index 000000000000..5f01b8e97047 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->deleteVmwareEngineNetwork($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 = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + + delete_vmware_engine_network_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_DeleteVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php new file mode 100644 index 000000000000..58c668445395 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php @@ -0,0 +1,85 @@ +setNetworkPolicy($formattedNetworkPolicy); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->fetchNetworkPolicyExternalAddresses($request); + + /** @var ExternalAddress $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 +{ + $formattedNetworkPolicy = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + + fetch_network_policy_external_addresses_sample($formattedNetworkPolicy); +} +// [END vmwareengine_v1_generated_VmwareEngine_FetchNetworkPolicyExternalAddresses_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php new file mode 100644 index 000000000000..54f59c6f8859 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $vmwareEngineClient->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 = VmwareEngineClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[CLUSTER]' + ); + + get_cluster_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php new file mode 100644 index 000000000000..5f8bc63d6110 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DnsBindPermission $response */ + $response = $vmwareEngineClient->getDnsBindPermission($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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + + get_dns_bind_permission_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetDnsBindPermission_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php new file mode 100644 index 000000000000..7a39a3c0e4f1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DnsForwarding $response */ + $response = $vmwareEngineClient->getDnsForwarding($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 = VmwareEngineClient::dnsForwardingName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + get_dns_forwarding_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetDnsForwarding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php new file mode 100644 index 000000000000..577cdebb07a3 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ExternalAccessRule $response */ + $response = $vmwareEngineClient->getExternalAccessRule($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 = VmwareEngineClient::externalAccessRuleName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]', + '[EXTERNAL_ACCESS_RULE]' + ); + + get_external_access_rule_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php new file mode 100644 index 000000000000..4782af24b346 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ExternalAddress $response */ + $response = $vmwareEngineClient->getExternalAddress($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 = VmwareEngineClient::externalAddressName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[EXTERNAL_ADDRESS]' + ); + + get_external_address_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php new file mode 100644 index 000000000000..fb4fd8d6d321 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HcxActivationKey $response */ + $response = $vmwareEngineClient->getHcxActivationKey($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 = VmwareEngineClient::hcxActivationKeyName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[HCX_ACTIVATION_KEY]' + ); + + get_hcx_activation_key_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php new file mode 100644 index 000000000000..d1722d12c994 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $vmwareEngineClient->getIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php new file mode 100644 index 000000000000..41220af357bc --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/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 vmwareengine_v1_generated_VmwareEngine_GetLocation_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php new file mode 100644 index 000000000000..04ecb1b4894a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LoggingServer $response */ + $response = $vmwareEngineClient->getLoggingServer($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 = VmwareEngineClient::loggingServerName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[LOGGING_SERVER]' + ); + + get_logging_server_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php new file mode 100644 index 000000000000..0089c322742d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ManagementDnsZoneBinding $response */ + $response = $vmwareEngineClient->getManagementDnsZoneBinding($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 = VmwareEngineClient::managementDnsZoneBindingName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[MANAGEMENT_DNS_ZONE_BINDING]' + ); + + get_management_dns_zone_binding_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php new file mode 100644 index 000000000000..e3656f15f394 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NetworkPeering $response */ + $response = $vmwareEngineClient->getNetworkPeering($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 = VmwareEngineClient::networkPeeringName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_PEERING]' + ); + + get_network_peering_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php new file mode 100644 index 000000000000..912ec9ffda86 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NetworkPolicy $response */ + $response = $vmwareEngineClient->getNetworkPolicy($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 = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + + get_network_policy_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php new file mode 100644 index 000000000000..0c5c8a4b018e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Node $response */ + $response = $vmwareEngineClient->getNode($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 = VmwareEngineClient::nodeName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[CLUSTER]', + '[NODE]' + ); + + get_node_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetNode_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php new file mode 100644 index 000000000000..de4dc4ff50cd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NodeType $response */ + $response = $vmwareEngineClient->getNodeType($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 = VmwareEngineClient::nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + + get_node_type_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetNodeType_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php new file mode 100644 index 000000000000..c761e8b394b1 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PrivateCloud $response */ + $response = $vmwareEngineClient->getPrivateCloud($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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + + get_private_cloud_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetPrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php new file mode 100644 index 000000000000..cbc02a8049dd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PrivateConnection $response */ + $response = $vmwareEngineClient->getPrivateConnection($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 = VmwareEngineClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + + get_private_connection_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetPrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php new file mode 100644 index 000000000000..33192d6af4ec --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Subnet $response */ + $response = $vmwareEngineClient->getSubnet($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 = VmwareEngineClient::subnetName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[SUBNET]' + ); + + get_subnet_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetSubnet_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php new file mode 100644 index 000000000000..7bf3a52d343b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VmwareEngineNetwork $response */ + $response = $vmwareEngineClient->getVmwareEngineNetwork($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 = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + + get_vmware_engine_network_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GetVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php new file mode 100644 index 000000000000..443f135066aa --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php @@ -0,0 +1,94 @@ +setName($formattedName) + ->setPrincipal($principal); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->grantDnsBindPermission($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DnsBindPermission $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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + + grant_dns_bind_permission_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_GrantDnsBindPermission_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php new file mode 100644 index 000000000000..2fca45306a35 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_clusters_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListClusters_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php new file mode 100644 index 000000000000..1e741c96dc75 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listExternalAccessRules($request); + + /** @var ExternalAccessRule $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 = VmwareEngineClient::networkPolicyName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_POLICY]' + ); + + list_external_access_rules_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListExternalAccessRules_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php new file mode 100644 index 000000000000..52e7182ab19f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listExternalAddresses($request); + + /** @var ExternalAddress $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_external_addresses_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListExternalAddresses_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php new file mode 100644 index 000000000000..55ab565dfec0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listHcxActivationKeys($request); + + /** @var HcxActivationKey $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_hcx_activation_keys_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListHcxActivationKeys_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php new file mode 100644 index 000000000000..398c1b6ab572 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/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 vmwareengine_v1_generated_VmwareEngine_ListLocations_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php new file mode 100644 index 000000000000..6b6ca9087f02 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listLoggingServers($request); + + /** @var LoggingServer $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_logging_servers_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListLoggingServers_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php new file mode 100644 index 000000000000..8b6f01e7ba61 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listManagementDnsZoneBindings($request); + + /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_management_dns_zone_bindings_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListManagementDnsZoneBindings_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php new file mode 100644 index 000000000000..73cfede6fd7c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listNetworkPeerings($request); + + /** @var NetworkPeering $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_network_peerings_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListNetworkPeerings_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php new file mode 100644 index 000000000000..8bc964a90b4f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listNetworkPolicies($request); + + /** @var NetworkPolicy $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_network_policies_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListNetworkPolicies_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php new file mode 100644 index 000000000000..da8b2b057252 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listNodeTypes($request); + + /** @var NodeType $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_node_types_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListNodeTypes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php new file mode 100644 index 000000000000..f3ef227fa551 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listNodes($request); + + /** @var Node $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 = VmwareEngineClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[CLUSTER]' + ); + + list_nodes_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListNodes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php new file mode 100644 index 000000000000..47d45c8dfd99 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listPeeringRoutes($request); + + /** @var PeeringRoute $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 = VmwareEngineClient::networkPeeringName( + '[PROJECT]', + '[LOCATION]', + '[NETWORK_PEERING]' + ); + + list_peering_routes_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListPeeringRoutes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php new file mode 100644 index 000000000000..f6206e04255b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listPrivateClouds($request); + + /** @var PrivateCloud $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_private_clouds_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateClouds_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php new file mode 100644 index 000000000000..c2ac1446fe4a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listPrivateConnectionPeeringRoutes($request); + + /** @var PeeringRoute $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 = VmwareEngineClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + + list_private_connection_peering_routes_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateConnectionPeeringRoutes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php new file mode 100644 index 000000000000..4cf703010432 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listPrivateConnections($request); + + /** @var PrivateConnection $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_private_connections_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateConnections_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php new file mode 100644 index 000000000000..b1ae86c73d61 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listSubnets($request); + + /** @var Subnet $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 = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + list_subnets_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListSubnets_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php new file mode 100644 index 000000000000..f891ebfb56c9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmwareEngineClient->listVmwareEngineNetworks($request); + + /** @var VmwareEngineNetwork $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); + + list_vmware_engine_networks_sample($formattedParent); +} +// [END vmwareengine_v1_generated_VmwareEngine_ListVmwareEngineNetworks_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php new file mode 100644 index 000000000000..4f16b745033c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php @@ -0,0 +1,93 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->repairManagementDnsZoneBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::managementDnsZoneBindingName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]', + '[MANAGEMENT_DNS_ZONE_BINDING]' + ); + + repair_management_dns_zone_binding_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_RepairManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php new file mode 100644 index 000000000000..315f89866980 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php @@ -0,0 +1,92 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->resetNsxCredentials($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $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 +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + reset_nsx_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ResetNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php new file mode 100644 index 000000000000..059245dc6f8b --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php @@ -0,0 +1,92 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->resetVcenterCredentials($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $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 +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + reset_vcenter_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ResetVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php new file mode 100644 index 000000000000..28fc63017980 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php @@ -0,0 +1,93 @@ +setName($formattedName) + ->setPrincipal($principal); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->revokeDnsBindPermission($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DnsBindPermission $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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + + revoke_dns_bind_permission_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_RevokeDnsBindPermission_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php new file mode 100644 index 000000000000..ef6c2393e578 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $vmwareEngineClient->setIamPolicy($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 +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END vmwareengine_v1_generated_VmwareEngine_SetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php new file mode 100644 index 000000000000..9048adc5e1b9 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php @@ -0,0 +1,80 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var Credentials $response */ + $response = $vmwareEngineClient->showNsxCredentials($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 +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + show_nsx_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ShowNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php new file mode 100644 index 000000000000..2fbf754bbddd --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php @@ -0,0 +1,80 @@ +setPrivateCloud($formattedPrivateCloud); + + // Call the API and handle any network failures. + try { + /** @var Credentials $response */ + $response = $vmwareEngineClient->showVcenterCredentials($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 +{ + $formattedPrivateCloud = VmwareEngineClient::privateCloudName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CLOUD]' + ); + + show_vcenter_credentials_sample($formattedPrivateCloud); +} +// [END vmwareengine_v1_generated_VmwareEngine_ShowVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php new file mode 100644 index 000000000000..0b557b342223 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $vmwareEngineClient->testIamPermissions($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 +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END vmwareengine_v1_generated_VmwareEngine_TestIamPermissions_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php new file mode 100644 index 000000000000..fd623b85b986 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->undeletePrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + + undelete_private_cloud_sample($formattedName); +} +// [END vmwareengine_v1_generated_VmwareEngine_UndeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php new file mode 100644 index 000000000000..3c8da159c642 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php @@ -0,0 +1,82 @@ +setNodeTypeConfigs($clusterNodeTypeConfigs); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->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 vmwareengine_v1_generated_VmwareEngine_UpdateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php new file mode 100644 index 000000000000..9af11986b179 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php @@ -0,0 +1,101 @@ +setDomain($dnsForwardingForwardingRulesDomain) + ->setNameServers($dnsForwardingForwardingRulesNameServers); + $dnsForwardingForwardingRules = [$forwardingRule,]; + $dnsForwarding = (new DnsForwarding()) + ->setForwardingRules($dnsForwardingForwardingRules); + $updateMask = new FieldMask(); + $request = (new UpdateDnsForwardingRequest()) + ->setDnsForwarding($dnsForwarding) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateDnsForwarding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DnsForwarding $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 +{ + $dnsForwardingForwardingRulesDomain = '[DOMAIN]'; + $dnsForwardingForwardingRulesNameServersElement = '[NAME_SERVERS]'; + + update_dns_forwarding_sample( + $dnsForwardingForwardingRulesDomain, + $dnsForwardingForwardingRulesNameServersElement + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateDnsForwarding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php new file mode 100644 index 000000000000..cd18fc1938df --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php @@ -0,0 +1,75 @@ +setUpdateMask($updateMask) + ->setExternalAccessRule($externalAccessRule); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateExternalAccessRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExternalAccessRule $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 vmwareengine_v1_generated_VmwareEngine_UpdateExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php new file mode 100644 index 000000000000..3a6279b1b0b0 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php @@ -0,0 +1,80 @@ +setUpdateMask($updateMask) + ->setExternalAddress($externalAddress); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateExternalAddress($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExternalAddress $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 vmwareengine_v1_generated_VmwareEngine_UpdateExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php new file mode 100644 index 000000000000..efa7dd5f3b31 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php @@ -0,0 +1,110 @@ +setHostname($loggingServerHostname) + ->setPort($loggingServerPort) + ->setProtocol($loggingServerProtocol) + ->setSourceType($loggingServerSourceType); + $request = (new UpdateLoggingServerRequest()) + ->setUpdateMask($updateMask) + ->setLoggingServer($loggingServer); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateLoggingServer($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LoggingServer $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 +{ + $loggingServerHostname = '[HOSTNAME]'; + $loggingServerPort = 0; + $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; + $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; + + update_logging_server_sample( + $loggingServerHostname, + $loggingServerPort, + $loggingServerProtocol, + $loggingServerSourceType + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php new file mode 100644 index 000000000000..d4afd6a8736e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php @@ -0,0 +1,75 @@ +setUpdateMask($updateMask) + ->setManagementDnsZoneBinding($managementDnsZoneBinding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateManagementDnsZoneBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ManagementDnsZoneBinding $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 vmwareengine_v1_generated_VmwareEngine_UpdateManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php new file mode 100644 index 000000000000..614a70d2f41d --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php @@ -0,0 +1,118 @@ +setPeerNetwork($networkPeeringPeerNetwork) + ->setPeerNetworkType($networkPeeringPeerNetworkType) + ->setVmwareEngineNetwork($formattedNetworkPeeringVmwareEngineNetwork); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPeeringRequest()) + ->setNetworkPeering($networkPeering) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateNetworkPeering($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NetworkPeering $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 +{ + $networkPeeringPeerNetwork = '[PEER_NETWORK]'; + $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; + $formattedNetworkPeeringVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + + update_network_peering_sample( + $networkPeeringPeerNetwork, + $networkPeeringPeerNetworkType, + $formattedNetworkPeeringVmwareEngineNetwork + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php new file mode 100644 index 000000000000..90eccdfd74ef --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php @@ -0,0 +1,101 @@ +setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPolicyRequest()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateNetworkPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NetworkPolicy $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 +{ + $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; + + update_network_policy_sample($networkPolicyEdgeServicesCidr); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php new file mode 100644 index 000000000000..d498da0b1e02 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php @@ -0,0 +1,118 @@ +setManagementCidr($privateCloudNetworkConfigManagementCidr); + $privateCloudManagementClusterNodeTypeConfigs = []; + $privateCloudManagementCluster = (new ManagementCluster()) + ->setClusterId($privateCloudManagementClusterClusterId) + ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); + $privateCloud = (new PrivateCloud()) + ->setNetworkConfig($privateCloudNetworkConfig) + ->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateCloudRequest()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updatePrivateCloud($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateCloud $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 +{ + $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; + $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; + + update_private_cloud_sample( + $privateCloudNetworkConfigManagementCidr, + $privateCloudManagementClusterClusterId + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php new file mode 100644 index 000000000000..61c377ec295f --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php @@ -0,0 +1,129 @@ +setVmwareEngineNetwork($formattedPrivateConnectionVmwareEngineNetwork) + ->setType($privateConnectionType) + ->setServiceNetwork($formattedPrivateConnectionServiceNetwork); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateConnectionRequest()) + ->setPrivateConnection($privateConnection) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updatePrivateConnection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateConnection $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 +{ + $formattedPrivateConnectionVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( + '[PROJECT]', + '[LOCATION]', + '[VMWARE_ENGINE_NETWORK]' + ); + $privateConnectionType = Type::TYPE_UNSPECIFIED; + $formattedPrivateConnectionServiceNetwork = VmwareEngineClient::networkName( + '[PROJECT]', + '[NETWORK]' + ); + + update_private_connection_sample( + $formattedPrivateConnectionVmwareEngineNetwork, + $privateConnectionType, + $formattedPrivateConnectionServiceNetwork + ); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdatePrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php new file mode 100644 index 000000000000..648055bfa7f5 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php @@ -0,0 +1,79 @@ +setUpdateMask($updateMask) + ->setSubnet($subnet); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateSubnet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Subnet $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 vmwareengine_v1_generated_VmwareEngine_UpdateSubnet_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php new file mode 100644 index 000000000000..56bcc1eb2e84 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php @@ -0,0 +1,90 @@ +setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $request = (new UpdateVmwareEngineNetworkRequest()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmwareEngineClient->updateVmwareEngineNetwork($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var VmwareEngineNetwork $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 +{ + $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; + + update_vmware_engine_network_sample($vmwareEngineNetworkType); +} +// [END vmwareengine_v1_generated_VmwareEngine_UpdateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php new file mode 100644 index 000000000000..2ae8f1c4a88e --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php @@ -0,0 +1,2997 @@ + createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createExternalAccessRuleAsync(CreateExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createExternalAddressAsync(CreateExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface createHcxActivationKeyAsync(CreateHcxActivationKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLoggingServerAsync(CreateLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface createManagementDnsZoneBindingAsync(CreateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNetworkPeeringAsync(CreateNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNetworkPolicyAsync(CreateNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPrivateCloudAsync(CreatePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPrivateConnectionAsync(CreatePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVmwareEngineNetworkAsync(CreateVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExternalAccessRuleAsync(DeleteExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExternalAddressAsync(DeleteExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLoggingServerAsync(DeleteLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteManagementDnsZoneBindingAsync(DeleteManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNetworkPeeringAsync(DeleteNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNetworkPolicyAsync(DeleteNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePrivateCloudAsync(DeletePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePrivateConnectionAsync(DeletePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVmwareEngineNetworkAsync(DeleteVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchNetworkPolicyExternalAddressesAsync(FetchNetworkPolicyExternalAddressesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsBindPermissionAsync(GetDnsBindPermissionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsForwardingAsync(GetDnsForwardingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExternalAccessRuleAsync(GetExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExternalAddressAsync(GetExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHcxActivationKeyAsync(GetHcxActivationKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLoggingServerAsync(GetLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface getManagementDnsZoneBindingAsync(GetManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNetworkPeeringAsync(GetNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNetworkPolicyAsync(GetNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNodeTypeAsync(GetNodeTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPrivateCloudAsync(GetPrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPrivateConnectionAsync(GetPrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSubnetAsync(GetSubnetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVmwareEngineNetworkAsync(GetVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface grantDnsBindPermissionAsync(GrantDnsBindPermissionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExternalAccessRulesAsync(ListExternalAccessRulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExternalAddressesAsync(ListExternalAddressesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHcxActivationKeysAsync(ListHcxActivationKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLoggingServersAsync(ListLoggingServersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listManagementDnsZoneBindingsAsync(ListManagementDnsZoneBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworkPeeringsAsync(ListNetworkPeeringsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworkPoliciesAsync(ListNetworkPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNodeTypesAsync(ListNodeTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPeeringRoutesAsync(ListPeeringRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateCloudsAsync(ListPrivateCloudsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateConnectionPeeringRoutesAsync(ListPrivateConnectionPeeringRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateConnectionsAsync(ListPrivateConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSubnetsAsync(ListSubnetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVmwareEngineNetworksAsync(ListVmwareEngineNetworksRequest $request, array $optionalArgs = []) + * @method PromiseInterface repairManagementDnsZoneBindingAsync(RepairManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetNsxCredentialsAsync(ResetNsxCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetVcenterCredentialsAsync(ResetVcenterCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface revokeDnsBindPermissionAsync(RevokeDnsBindPermissionRequest $request, array $optionalArgs = []) + * @method PromiseInterface showNsxCredentialsAsync(ShowNsxCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface showVcenterCredentialsAsync(ShowVcenterCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeletePrivateCloudAsync(UndeletePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDnsForwardingAsync(UpdateDnsForwardingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExternalAccessRuleAsync(UpdateExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExternalAddressAsync(UpdateExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLoggingServerAsync(UpdateLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateManagementDnsZoneBindingAsync(UpdateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNetworkPeeringAsync(UpdateNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNetworkPolicyAsync(UpdateNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePrivateCloudAsync(UpdatePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePrivateConnectionAsync(UpdatePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSubnetAsync(UpdateSubnetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVmwareEngineNetworkAsync(UpdateVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class VmwareEngineClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vmwareengine.v1.VmwareEngine'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vmwareengine.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vmwareengine.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/vmware_engine_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vmware_engine_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vmware_engine_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vmware_engine_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $privateCloud, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dns_bind_permission resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted dns_bind_permission resource. + */ + public static function dnsBindPermissionName(string $project, string $location): string + { + return self::getPathTemplate('dnsBindPermission')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * dns_forwarding resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * + * @return string The formatted dns_forwarding resource. + */ + public static function dnsForwardingName(string $project, string $location, string $privateCloud): string + { + return self::getPathTemplate('dnsForwarding')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * external_access_rule resource. + * + * @param string $project + * @param string $location + * @param string $networkPolicy + * @param string $externalAccessRule + * + * @return string The formatted external_access_rule resource. + */ + public static function externalAccessRuleName(string $project, string $location, string $networkPolicy, string $externalAccessRule): string + { + return self::getPathTemplate('externalAccessRule')->render([ + 'project' => $project, + 'location' => $location, + 'network_policy' => $networkPolicy, + 'external_access_rule' => $externalAccessRule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * external_address resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $externalAddress + * + * @return string The formatted external_address resource. + */ + public static function externalAddressName(string $project, string $location, string $privateCloud, string $externalAddress): string + { + return self::getPathTemplate('externalAddress')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'external_address' => $externalAddress, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * hcx_activation_key resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $hcxActivationKey + * + * @return string The formatted hcx_activation_key resource. + */ + public static function hcxActivationKeyName(string $project, string $location, string $privateCloud, string $hcxActivationKey): string + { + return self::getPathTemplate('hcxActivationKey')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'hcx_activation_key' => $hcxActivationKey, + ]); + } + + /** + * 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 + * logging_server resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $loggingServer + * + * @return string The formatted logging_server resource. + */ + public static function loggingServerName(string $project, string $location, string $privateCloud, string $loggingServer): string + { + return self::getPathTemplate('loggingServer')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'logging_server' => $loggingServer, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * management_dns_zone_binding resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $managementDnsZoneBinding + * + * @return string The formatted management_dns_zone_binding resource. + */ + public static function managementDnsZoneBindingName(string $project, string $location, string $privateCloud, string $managementDnsZoneBinding): string + { + return self::getPathTemplate('managementDnsZoneBinding')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'management_dns_zone_binding' => $managementDnsZoneBinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * network_peering resource. + * + * @param string $project + * @param string $location + * @param string $networkPeering + * + * @return string The formatted network_peering resource. + */ + public static function networkPeeringName(string $project, string $location, string $networkPeering): string + { + return self::getPathTemplate('networkPeering')->render([ + 'project' => $project, + 'location' => $location, + 'network_peering' => $networkPeering, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * network_policy resource. + * + * @param string $project + * @param string $location + * @param string $networkPolicy + * + * @return string The formatted network_policy resource. + */ + public static function networkPolicyName(string $project, string $location, string $networkPolicy): string + { + return self::getPathTemplate('networkPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'network_policy' => $networkPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a node + * resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $cluster + * @param string $node + * + * @return string The formatted node resource. + */ + public static function nodeName(string $project, string $location, string $privateCloud, string $cluster, string $node): string + { + return self::getPathTemplate('node')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'cluster' => $cluster, + 'node' => $node, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a node_type + * resource. + * + * @param string $project + * @param string $location + * @param string $nodeType + * + * @return string The formatted node_type resource. + */ + public static function nodeTypeName(string $project, string $location, string $nodeType): string + { + return self::getPathTemplate('nodeType')->render([ + 'project' => $project, + 'location' => $location, + 'node_type' => $nodeType, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * private_cloud resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * + * @return string The formatted private_cloud resource. + */ + public static function privateCloudName(string $project, string $location, string $privateCloud): string + { + return self::getPathTemplate('privateCloud')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * private_connection resource. + * + * @param string $project + * @param string $location + * @param string $privateConnection + * + * @return string The formatted private_connection resource. + */ + public static function privateConnectionName(string $project, string $location, string $privateConnection): string + { + return self::getPathTemplate('privateConnection')->render([ + 'project' => $project, + 'location' => $location, + 'private_connection' => $privateConnection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a subnet + * resource. + * + * @param string $project + * @param string $location + * @param string $privateCloud + * @param string $subnet + * + * @return string The formatted subnet resource. + */ + public static function subnetName(string $project, string $location, string $privateCloud, string $subnet): string + { + return self::getPathTemplate('subnet')->render([ + 'project' => $project, + 'location' => $location, + 'private_cloud' => $privateCloud, + 'subnet' => $subnet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vmware_engine_network resource. + * + * @param string $project + * @param string $location + * @param string $vmwareEngineNetwork + * + * @return string The formatted vmware_engine_network resource. + */ + public static function vmwareEngineNetworkName(string $project, string $location, string $vmwareEngineNetwork): string + { + return self::getPathTemplate('vmwareEngineNetwork')->render([ + 'project' => $project, + 'location' => $location, + 'vmware_engine_network' => $vmwareEngineNetwork, + ]); + } + + /** + * 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}/privateClouds/{private_cloud}/clusters/{cluster} + * - dnsBindPermission: projects/{project}/locations/{location}/dnsBindPermission + * - dnsForwarding: projects/{project}/locations/{location}/privateClouds/{private_cloud}/dnsForwarding + * - externalAccessRule: projects/{project}/locations/{location}/networkPolicies/{network_policy}/externalAccessRules/{external_access_rule} + * - externalAddress: projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address} + * - hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key} + * - location: projects/{project}/locations/{location} + * - loggingServer: projects/{project}/locations/{location}/privateClouds/{private_cloud}/loggingServers/{logging_server} + * - managementDnsZoneBinding: projects/{project}/locations/{location}/privateClouds/{private_cloud}/managementDnsZoneBindings/{management_dns_zone_binding} + * - network: projects/{project}/global/networks/{network} + * - networkPeering: projects/{project}/locations/{location}/networkPeerings/{network_peering} + * - networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy} + * - node: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node} + * - nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type} + * - privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud} + * - privateConnection: projects/{project}/locations/{location}/privateConnections/{private_connection} + * - subnet: projects/{project}/locations/{location}/privateClouds/{private_cloud}/subnets/{subnet} + * - vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vmwareengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new cluster in a given private cloud. + * Creating a new cluster provides additional nodes for + * use in the parent private cloud and requires sufficient [node + * quota](https://cloud.google.com/vmware-engine/quotas). + * + * The async variant is {@see VmwareEngineClient::createClusterAsync()} . + * + * @example samples/V1/VmwareEngineClient/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 external access rule in a given network policy. + * + * The async variant is {@see VmwareEngineClient::createExternalAccessRuleAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/create_external_access_rule.php + * + * @param CreateExternalAccessRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createExternalAccessRule(CreateExternalAccessRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateExternalAccessRule', $request, $callOptions)->wait(); + } + + /** + * Creates a new `ExternalAddress` resource in a given private cloud. The + * network policy that corresponds to the private cloud must have the external + * IP address network service enabled (`NetworkPolicy.external_ip`). + * + * The async variant is {@see VmwareEngineClient::createExternalAddressAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_external_address.php + * + * @param CreateExternalAddressRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createExternalAddress(CreateExternalAddressRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateExternalAddress', $request, $callOptions)->wait(); + } + + /** + * Creates a new HCX activation key in a given private cloud. + * + * The async variant is {@see VmwareEngineClient::createHcxActivationKeyAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_hcx_activation_key.php + * + * @param CreateHcxActivationKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createHcxActivationKey(CreateHcxActivationKeyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateHcxActivationKey', $request, $callOptions)->wait(); + } + + /** + * Create a new logging server for a given private cloud. + * + * The async variant is {@see VmwareEngineClient::createLoggingServerAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_logging_server.php + * + * @param CreateLoggingServerRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createLoggingServer(CreateLoggingServerRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLoggingServer', $request, $callOptions)->wait(); + } + + /** + * Creates a new `ManagementDnsZoneBinding` resource in a private cloud. + * This RPC creates the DNS binding and the resource that represents the + * DNS binding of the consumer VPC network to the management DNS zone. A + * management DNS zone is the Cloud DNS cross-project binding zone that + * VMware Engine creates for each private cloud. It contains FQDNs and + * corresponding IP addresses for the private cloud's ESXi hosts and + * management VM appliances like vCenter and NSX Manager. + * + * The async variant is + * {@see VmwareEngineClient::createManagementDnsZoneBindingAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php + * + * @param CreateManagementDnsZoneBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createManagementDnsZoneBinding(CreateManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateManagementDnsZoneBinding', $request, $callOptions)->wait(); + } + + /** + * Creates a new network peering between the peer network and VMware Engine + * network provided in a `NetworkPeering` resource. NetworkPeering is a + * global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::createNetworkPeeringAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_network_peering.php + * + * @param CreateNetworkPeeringRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createNetworkPeering(CreateNetworkPeeringRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateNetworkPeering', $request, $callOptions)->wait(); + } + + /** + * Creates a new network policy in a given VMware Engine network of a + * project and location (region). A new network policy cannot be created if + * another network policy already exists in the same scope. + * + * The async variant is {@see VmwareEngineClient::createNetworkPolicyAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_network_policy.php + * + * @param CreateNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createNetworkPolicy(CreateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new `PrivateCloud` resource in a given project and location. + * Private clouds of type `STANDARD` and + * `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are + * regional. + * Creating a private cloud also creates a [management + * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) + * for that private cloud. + * + * The async variant is {@see VmwareEngineClient::createPrivateCloudAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_private_cloud.php + * + * @param CreatePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createPrivateCloud(CreatePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Creates a new private connection that can be used for accessing private + * Clouds. + * + * The async variant is {@see VmwareEngineClient::createPrivateConnectionAsync()} . + * + * @example samples/V1/VmwareEngineClient/create_private_connection.php + * + * @param CreatePrivateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createPrivateConnection(CreatePrivateConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Creates a new VMware Engine network that can be used by a private cloud. + * + * The async variant is {@see VmwareEngineClient::createVmwareEngineNetworkAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/create_vmware_engine_network.php + * + * @param CreateVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createVmwareEngineNetwork(CreateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or + * gracefully shut down any workloads running on the cluster before deletion. + * You cannot delete the management cluster of a private cloud using this + * method. + * + * The async variant is {@see VmwareEngineClient::deleteClusterAsync()} . + * + * @example samples/V1/VmwareEngineClient/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 external access rule. + * + * The async variant is {@see VmwareEngineClient::deleteExternalAccessRuleAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/delete_external_access_rule.php + * + * @param DeleteExternalAccessRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteExternalAccessRule(DeleteExternalAccessRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteExternalAccessRule', $request, $callOptions)->wait(); + } + + /** + * Deletes a single external IP address. When you delete an external IP + * address, connectivity between the external IP address and the corresponding + * internal IP address is lost. + * + * The async variant is {@see VmwareEngineClient::deleteExternalAddressAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_external_address.php + * + * @param DeleteExternalAddressRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteExternalAddress(DeleteExternalAddressRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteExternalAddress', $request, $callOptions)->wait(); + } + + /** + * Deletes a single logging server. + * + * The async variant is {@see VmwareEngineClient::deleteLoggingServerAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_logging_server.php + * + * @param DeleteLoggingServerRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteLoggingServer(DeleteLoggingServerRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLoggingServer', $request, $callOptions)->wait(); + } + + /** + * Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone + * binding is deleted, the corresponding consumer VPC network is no longer + * bound to the management DNS zone. + * + * The async variant is + * {@see VmwareEngineClient::deleteManagementDnsZoneBindingAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php + * + * @param DeleteManagementDnsZoneBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteManagementDnsZoneBinding(DeleteManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteManagementDnsZoneBinding', $request, $callOptions)->wait(); + } + + /** + * Deletes a `NetworkPeering` resource. When a network peering is deleted for + * a VMware Engine network, the peer network becomes inaccessible to that + * VMware Engine network. NetworkPeering is a global resource and location can + * only be global. + * + * The async variant is {@see VmwareEngineClient::deleteNetworkPeeringAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_network_peering.php + * + * @param DeleteNetworkPeeringRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteNetworkPeering(DeleteNetworkPeeringRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNetworkPeering', $request, $callOptions)->wait(); + } + + /** + * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted + * when `NetworkService.state` is set to `RECONCILING` for either its external + * IP or internet access service. + * + * The async variant is {@see VmwareEngineClient::deleteNetworkPolicyAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_network_policy.php + * + * @param DeleteNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteNetworkPolicy(DeleteNetworkPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Schedules a `PrivateCloud` resource for deletion. + * + * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` + * set to `DELETED` and `expireTime` set to the time when deletion is final + * and can no longer be reversed. The delete operation is marked as done + * as soon as the `PrivateCloud` is successfully scheduled for deletion + * (this also applies when `delayHours` is set to zero), and the operation is + * not kept in pending state until `PrivateCloud` is purged. + * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before + * the `expireTime` elapses. When `expireTime` is reached, deletion is final + * and all private cloud resources are irreversibly removed and billing stops. + * During the final removal process, `PrivateCloud.state` is set to `PURGING`. + * `PrivateCloud` can be polled using standard `GET` method for the whole + * period of deletion and purging. It will not be returned only + * when it is completely purged. + * + * The async variant is {@see VmwareEngineClient::deletePrivateCloudAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_private_cloud.php + * + * @param DeletePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deletePrivateCloud(DeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Deletes a `PrivateConnection` resource. When a private connection is + * deleted for a VMware Engine network, the connected network becomes + * inaccessible to that VMware Engine network. + * + * The async variant is {@see VmwareEngineClient::deletePrivateConnectionAsync()} . + * + * @example samples/V1/VmwareEngineClient/delete_private_connection.php + * + * @param DeletePrivateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deletePrivateConnection(DeletePrivateConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware + * Engine network after all resources that refer to it are deleted. For + * example, a private cloud, a network peering, and a network policy can all + * refer to the same VMware Engine network. + * + * The async variant is {@see VmwareEngineClient::deleteVmwareEngineNetworkAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/delete_vmware_engine_network.php + * + * @param DeleteVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteVmwareEngineNetwork(DeleteVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Lists external IP addresses assigned to VMware workload VMs within the + * scope of the given network policy. + * + * The async variant is + * {@see VmwareEngineClient::fetchNetworkPolicyExternalAddressesAsync()} . + * + * @example samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php + * + * @param FetchNetworkPolicyExternalAddressesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 fetchNetworkPolicyExternalAddresses(FetchNetworkPolicyExternalAddressesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('FetchNetworkPolicyExternalAddresses', $request, $callOptions); + } + + /** + * Retrieves a `Cluster` resource by its resource name. + * + * The async variant is {@see VmwareEngineClient::getClusterAsync()} . + * + * @example samples/V1/VmwareEngineClient/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 all the principals having bind permission on the intranet VPC + * associated with the consumer project granted by the Grant API. + * DnsBindPermission is a global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::getDnsBindPermissionAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_dns_bind_permission.php + * + * @param GetDnsBindPermissionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DnsBindPermission + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDnsBindPermission(GetDnsBindPermissionRequest $request, array $callOptions = []): DnsBindPermission + { + return $this->startApiCall('GetDnsBindPermission', $request, $callOptions)->wait(); + } + + /** + * Gets details of the `DnsForwarding` config. + * + * The async variant is {@see VmwareEngineClient::getDnsForwardingAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_dns_forwarding.php + * + * @param GetDnsForwardingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DnsForwarding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDnsForwarding(GetDnsForwardingRequest $request, array $callOptions = []): DnsForwarding + { + return $this->startApiCall('GetDnsForwarding', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single external access rule. + * + * The async variant is {@see VmwareEngineClient::getExternalAccessRuleAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_external_access_rule.php + * + * @param GetExternalAccessRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ExternalAccessRule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExternalAccessRule(GetExternalAccessRuleRequest $request, array $callOptions = []): ExternalAccessRule + { + return $this->startApiCall('GetExternalAccessRule', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single external IP address. + * + * The async variant is {@see VmwareEngineClient::getExternalAddressAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_external_address.php + * + * @param GetExternalAddressRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ExternalAddress + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExternalAddress(GetExternalAddressRequest $request, array $callOptions = []): ExternalAddress + { + return $this->startApiCall('GetExternalAddress', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `HcxActivationKey` resource by its resource name. + * + * The async variant is {@see VmwareEngineClient::getHcxActivationKeyAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_hcx_activation_key.php + * + * @param GetHcxActivationKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HcxActivationKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHcxActivationKey(GetHcxActivationKeyRequest $request, array $callOptions = []): HcxActivationKey + { + return $this->startApiCall('GetHcxActivationKey', $request, $callOptions)->wait(); + } + + /** + * Gets details of a logging server. + * + * The async variant is {@see VmwareEngineClient::getLoggingServerAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_logging_server.php + * + * @param GetLoggingServerRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LoggingServer + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLoggingServer(GetLoggingServerRequest $request, array $callOptions = []): LoggingServer + { + return $this->startApiCall('GetLoggingServer', $request, $callOptions)->wait(); + } + + /** + * Retrieves a 'ManagementDnsZoneBinding' resource by its resource name. + * + * The async variant is + * {@see VmwareEngineClient::getManagementDnsZoneBindingAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php + * + * @param GetManagementDnsZoneBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagementDnsZoneBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getManagementDnsZoneBinding(GetManagementDnsZoneBindingRequest $request, array $callOptions = []): ManagementDnsZoneBinding + { + return $this->startApiCall('GetManagementDnsZoneBinding', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `NetworkPeering` resource by its resource name. The resource + * contains details of the network peering, such as peered + * networks, import and export custom route configurations, and peering state. + * NetworkPeering is a global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::getNetworkPeeringAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_network_peering.php + * + * @param GetNetworkPeeringRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NetworkPeering + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNetworkPeering(GetNetworkPeeringRequest $request, array $callOptions = []): NetworkPeering + { + return $this->startApiCall('GetNetworkPeering', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `NetworkPolicy` resource by its resource name. + * + * The async variant is {@see VmwareEngineClient::getNetworkPolicyAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_network_policy.php + * + * @param GetNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NetworkPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNetworkPolicy(GetNetworkPolicyRequest $request, array $callOptions = []): NetworkPolicy + { + return $this->startApiCall('GetNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single node. + * + * The async variant is {@see VmwareEngineClient::getNodeAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_node.php + * + * @param GetNodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Node + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNode(GetNodeRequest $request, array $callOptions = []): Node + { + return $this->startApiCall('GetNode', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single `NodeType`. + * + * The async variant is {@see VmwareEngineClient::getNodeTypeAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_node_type.php + * + * @param GetNodeTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NodeType + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNodeType(GetNodeTypeRequest $request, array $callOptions = []): NodeType + { + return $this->startApiCall('GetNodeType', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `PrivateCloud` resource by its resource name. + * + * The async variant is {@see VmwareEngineClient::getPrivateCloudAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_private_cloud.php + * + * @param GetPrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PrivateCloud + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPrivateCloud(GetPrivateCloudRequest $request, array $callOptions = []): PrivateCloud + { + return $this->startApiCall('GetPrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `PrivateConnection` resource by its resource name. The resource + * contains details of the private connection, such as connected + * network, routing mode and state. + * + * The async variant is {@see VmwareEngineClient::getPrivateConnectionAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_private_connection.php + * + * @param GetPrivateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PrivateConnection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPrivateConnection(GetPrivateConnectionRequest $request, array $callOptions = []): PrivateConnection + { + return $this->startApiCall('GetPrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single subnet. + * + * The async variant is {@see VmwareEngineClient::getSubnetAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_subnet.php + * + * @param GetSubnetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Subnet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSubnet(GetSubnetRequest $request, array $callOptions = []): Subnet + { + return $this->startApiCall('GetSubnet', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `VmwareEngineNetwork` resource by its resource name. The + * resource contains details of the VMware Engine network, such as its VMware + * Engine network type, peered networks in a service project, and state + * (for example, `CREATING`, `ACTIVE`, `DELETING`). + * + * The async variant is {@see VmwareEngineClient::getVmwareEngineNetworkAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_vmware_engine_network.php + * + * @param GetVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VmwareEngineNetwork + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVmwareEngineNetwork(GetVmwareEngineNetworkRequest $request, array $callOptions = []): VmwareEngineNetwork + { + return $this->startApiCall('GetVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Grants the bind permission to the customer provided principal(user / + * service account) to bind their DNS zone with the intranet VPC associated + * with the project. DnsBindPermission is a global resource and location can + * only be global. + * + * The async variant is {@see VmwareEngineClient::grantDnsBindPermissionAsync()} . + * + * @example samples/V1/VmwareEngineClient/grant_dns_bind_permission.php + * + * @param GrantDnsBindPermissionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 grantDnsBindPermission(GrantDnsBindPermissionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('GrantDnsBindPermission', $request, $callOptions)->wait(); + } + + /** + * Lists `Cluster` resources in a given private cloud. + * + * The async variant is {@see VmwareEngineClient::listClustersAsync()} . + * + * @example samples/V1/VmwareEngineClient/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 `ExternalAccessRule` resources in the specified network policy. + * + * The async variant is {@see VmwareEngineClient::listExternalAccessRulesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_external_access_rules.php + * + * @param ListExternalAccessRulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listExternalAccessRules(ListExternalAccessRulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExternalAccessRules', $request, $callOptions); + } + + /** + * Lists external IP addresses assigned to VMware workload VMs in a given + * private cloud. + * + * The async variant is {@see VmwareEngineClient::listExternalAddressesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_external_addresses.php + * + * @param ListExternalAddressesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listExternalAddresses(ListExternalAddressesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExternalAddresses', $request, $callOptions); + } + + /** + * Lists `HcxActivationKey` resources in a given private cloud. + * + * The async variant is {@see VmwareEngineClient::listHcxActivationKeysAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_hcx_activation_keys.php + * + * @param ListHcxActivationKeysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listHcxActivationKeys(ListHcxActivationKeysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHcxActivationKeys', $request, $callOptions); + } + + /** + * Lists logging servers configured for a given private + * cloud. + * + * The async variant is {@see VmwareEngineClient::listLoggingServersAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_logging_servers.php + * + * @param ListLoggingServersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listLoggingServers(ListLoggingServersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLoggingServers', $request, $callOptions); + } + + /** + * Lists Consumer VPCs bound to Management DNS Zone of a given private cloud. + * + * The async variant is + * {@see VmwareEngineClient::listManagementDnsZoneBindingsAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php + * + * @param ListManagementDnsZoneBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listManagementDnsZoneBindings(ListManagementDnsZoneBindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListManagementDnsZoneBindings', $request, $callOptions); + } + + /** + * Lists `NetworkPeering` resources in a given project. NetworkPeering is a + * global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::listNetworkPeeringsAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_network_peerings.php + * + * @param ListNetworkPeeringsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNetworkPeerings(ListNetworkPeeringsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNetworkPeerings', $request, $callOptions); + } + + /** + * Lists `NetworkPolicy` resources in a specified project and location. + * + * The async variant is {@see VmwareEngineClient::listNetworkPoliciesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_network_policies.php + * + * @param ListNetworkPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNetworkPolicies(ListNetworkPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNetworkPolicies', $request, $callOptions); + } + + /** + * Lists node types + * + * The async variant is {@see VmwareEngineClient::listNodeTypesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_node_types.php + * + * @param ListNodeTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNodeTypes(ListNodeTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNodeTypes', $request, $callOptions); + } + + /** + * Lists nodes in a given cluster. + * + * The async variant is {@see VmwareEngineClient::listNodesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_nodes.php + * + * @param ListNodesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNodes(ListNodesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNodes', $request, $callOptions); + } + + /** + * Lists the network peering routes exchanged over a peering connection. + * NetworkPeering is a global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::listPeeringRoutesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_peering_routes.php + * + * @param ListPeeringRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPeeringRoutes(ListPeeringRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPeeringRoutes', $request, $callOptions); + } + + /** + * Lists `PrivateCloud` resources in a given project and location. + * + * The async variant is {@see VmwareEngineClient::listPrivateCloudsAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_private_clouds.php + * + * @param ListPrivateCloudsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPrivateClouds(ListPrivateCloudsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPrivateClouds', $request, $callOptions); + } + + /** + * Lists the private connection routes exchanged over a peering connection. + * + * The async variant is + * {@see VmwareEngineClient::listPrivateConnectionPeeringRoutesAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php + * + * @param ListPrivateConnectionPeeringRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPrivateConnectionPeeringRoutes(ListPrivateConnectionPeeringRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPrivateConnectionPeeringRoutes', $request, $callOptions); + } + + /** + * Lists `PrivateConnection` resources in a given project and location. + * + * The async variant is {@see VmwareEngineClient::listPrivateConnectionsAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_private_connections.php + * + * @param ListPrivateConnectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPrivateConnections(ListPrivateConnectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPrivateConnections', $request, $callOptions); + } + + /** + * Lists subnets in a given private cloud. + * + * The async variant is {@see VmwareEngineClient::listSubnetsAsync()} . + * + * @example samples/V1/VmwareEngineClient/list_subnets.php + * + * @param ListSubnetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSubnets(ListSubnetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSubnets', $request, $callOptions); + } + + /** + * Lists `VmwareEngineNetwork` resources in a given project and location. + * + * The async variant is {@see VmwareEngineClient::listVmwareEngineNetworksAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/list_vmware_engine_networks.php + * + * @param ListVmwareEngineNetworksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listVmwareEngineNetworks(ListVmwareEngineNetworksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVmwareEngineNetworks', $request, $callOptions); + } + + /** + * Retries to create a `ManagementDnsZoneBinding` resource that is + * in failed state. + * + * The async variant is + * {@see VmwareEngineClient::repairManagementDnsZoneBindingAsync()} . + * + * @example samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php + * + * @param RepairManagementDnsZoneBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 repairManagementDnsZoneBinding(RepairManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RepairManagementDnsZoneBinding', $request, $callOptions)->wait(); + } + + /** + * Resets credentials of the NSX appliance. + * + * The async variant is {@see VmwareEngineClient::resetNsxCredentialsAsync()} . + * + * @example samples/V1/VmwareEngineClient/reset_nsx_credentials.php + * + * @param ResetNsxCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resetNsxCredentials(ResetNsxCredentialsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetNsxCredentials', $request, $callOptions)->wait(); + } + + /** + * Resets credentials of the Vcenter appliance. + * + * The async variant is {@see VmwareEngineClient::resetVcenterCredentialsAsync()} . + * + * @example samples/V1/VmwareEngineClient/reset_vcenter_credentials.php + * + * @param ResetVcenterCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 resetVcenterCredentials(ResetVcenterCredentialsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetVcenterCredentials', $request, $callOptions)->wait(); + } + + /** + * Revokes the bind permission from the customer provided principal(user / + * service account) on the intranet VPC associated with the consumer project. + * DnsBindPermission is a global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::revokeDnsBindPermissionAsync()} . + * + * @example samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php + * + * @param RevokeDnsBindPermissionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 revokeDnsBindPermission(RevokeDnsBindPermissionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RevokeDnsBindPermission', $request, $callOptions)->wait(); + } + + /** + * Gets details of credentials for NSX appliance. + * + * The async variant is {@see VmwareEngineClient::showNsxCredentialsAsync()} . + * + * @example samples/V1/VmwareEngineClient/show_nsx_credentials.php + * + * @param ShowNsxCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Credentials + * + * @throws ApiException Thrown if the API call fails. + */ + public function showNsxCredentials(ShowNsxCredentialsRequest $request, array $callOptions = []): Credentials + { + return $this->startApiCall('ShowNsxCredentials', $request, $callOptions)->wait(); + } + + /** + * Gets details of credentials for Vcenter appliance. + * + * The async variant is {@see VmwareEngineClient::showVcenterCredentialsAsync()} . + * + * @example samples/V1/VmwareEngineClient/show_vcenter_credentials.php + * + * @param ShowVcenterCredentialsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Credentials + * + * @throws ApiException Thrown if the API call fails. + */ + public function showVcenterCredentials(ShowVcenterCredentialsRequest $request, array $callOptions = []): Credentials + { + return $this->startApiCall('ShowVcenterCredentials', $request, $callOptions)->wait(); + } + + /** + * Restores a private cloud that was previously scheduled for deletion by + * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has + * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to + * the time when deletion can no longer be reversed. + * + * The async variant is {@see VmwareEngineClient::undeletePrivateCloudAsync()} . + * + * @example samples/V1/VmwareEngineClient/undelete_private_cloud.php + * + * @param UndeletePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 undeletePrivateCloud(UndeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeletePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Modifies a `Cluster` resource. Only fields specified in `updateMask` are + * applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see VmwareEngineClient::updateClusterAsync()} . + * + * @example samples/V1/VmwareEngineClient/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 the `DnsForwarding` config, like associated + * domains. Only fields specified in `update_mask` are applied. + * + * The async variant is {@see VmwareEngineClient::updateDnsForwardingAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_dns_forwarding.php + * + * @param UpdateDnsForwardingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateDnsForwarding(UpdateDnsForwardingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDnsForwarding', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single external access rule. + * Only fields specified in `update_mask` are applied. + * + * The async variant is {@see VmwareEngineClient::updateExternalAccessRuleAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/update_external_access_rule.php + * + * @param UpdateExternalAccessRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateExternalAccessRule(UpdateExternalAccessRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateExternalAccessRule', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single external IP address. + * Only fields specified in `update_mask` are applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see VmwareEngineClient::updateExternalAddressAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_external_address.php + * + * @param UpdateExternalAddressRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateExternalAddress(UpdateExternalAddressRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateExternalAddress', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single logging server. + * Only fields specified in `update_mask` are applied. + * + * The async variant is {@see VmwareEngineClient::updateLoggingServerAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_logging_server.php + * + * @param UpdateLoggingServerRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateLoggingServer(UpdateLoggingServerRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateLoggingServer', $request, $callOptions)->wait(); + } + + /** + * Updates a `ManagementDnsZoneBinding` resource. + * Only fields specified in `update_mask` are applied. + * + * The async variant is + * {@see VmwareEngineClient::updateManagementDnsZoneBindingAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php + * + * @param UpdateManagementDnsZoneBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateManagementDnsZoneBinding(UpdateManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateManagementDnsZoneBinding', $request, $callOptions)->wait(); + } + + /** + * Modifies a `NetworkPeering` resource. Only the `description` field can be + * updated. Only fields specified in `updateMask` are applied. NetworkPeering + * is a global resource and location can only be global. + * + * The async variant is {@see VmwareEngineClient::updateNetworkPeeringAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_network_peering.php + * + * @param UpdateNetworkPeeringRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateNetworkPeering(UpdateNetworkPeeringRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateNetworkPeering', $request, $callOptions)->wait(); + } + + /** + * Modifies a `NetworkPolicy` resource. Only the following fields can be + * updated: `internet_access`, `external_ip`, `edge_services_cidr`. + * Only fields specified in `updateMask` are applied. When updating a network + * policy, the external IP network service can only be disabled if there are + * no external IP addresses present in the scope of the policy. Also, a + * `NetworkService` cannot be updated when `NetworkService.state` is set + * to `RECONCILING`. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see VmwareEngineClient::updateNetworkPolicyAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_network_policy.php + * + * @param UpdateNetworkPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateNetworkPolicy(UpdateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateNetworkPolicy', $request, $callOptions)->wait(); + } + + /** + * Modifies a `PrivateCloud` resource. Only the following fields can be + * updated: `description`. + * Only fields specified in `updateMask` are applied. + * + * During operation processing, the resource is temporarily in the `ACTIVE` + * state before the operation fully completes. For that period of time, you + * can't update the resource. Use the operation status to determine when the + * processing fully completes. + * + * The async variant is {@see VmwareEngineClient::updatePrivateCloudAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_private_cloud.php + * + * @param UpdatePrivateCloudRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updatePrivateCloud(UpdatePrivateCloudRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePrivateCloud', $request, $callOptions)->wait(); + } + + /** + * Modifies a `PrivateConnection` resource. Only `description` and + * `routing_mode` fields can be updated. Only fields specified in `updateMask` + * are applied. + * + * The async variant is {@see VmwareEngineClient::updatePrivateConnectionAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_private_connection.php + * + * @param UpdatePrivateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updatePrivateConnection(UpdatePrivateConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single subnet. Only fields specified in + * `update_mask` are applied. + * + * *Note*: This API is synchronous and always returns a successful + * `google.longrunning.Operation` (LRO). The returned LRO will only have + * `done` and `response` fields. + * + * The async variant is {@see VmwareEngineClient::updateSubnetAsync()} . + * + * @example samples/V1/VmwareEngineClient/update_subnet.php + * + * @param UpdateSubnetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateSubnet(UpdateSubnetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSubnet', $request, $callOptions)->wait(); + } + + /** + * Modifies a VMware Engine network resource. Only the following fields can be + * updated: `description`. Only fields specified in `updateMask` are + * applied. + * + * The async variant is {@see VmwareEngineClient::updateVmwareEngineNetworkAsync()} + * . + * + * @example samples/V1/VmwareEngineClient/update_vmware_engine_network.php + * + * @param UpdateVmwareEngineNetworkRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateVmwareEngineNetwork(UpdateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateVmwareEngineNetwork', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see VmwareEngineClient::getLocationAsync()} . + * + * @example samples/V1/VmwareEngineClient/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 VmwareEngineClient::listLocationsAsync()} . + * + * @example samples/V1/VmwareEngineClient/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); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see VmwareEngineClient::getIamPolicyAsync()} . + * + * @example samples/V1/VmwareEngineClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see VmwareEngineClient::setIamPolicyAsync()} . + * + * @example samples/V1/VmwareEngineClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see VmwareEngineClient::testIamPermissionsAsync()} . + * + * @example samples/V1/VmwareEngineClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..f3559962a01c --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json @@ -0,0 +1,413 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.vmwareengine.v1", + "libraryPackage": "Google\\Cloud\\VmwareEngine\\V1", + "services": { + "VmwareEngine": { + "clients": { + "grpc": { + "libraryClient": "VmwareEngineGapicClient", + "rpcs": { + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "CreateExternalAccessRule": { + "methods": [ + "createExternalAccessRule" + ] + }, + "CreateExternalAddress": { + "methods": [ + "createExternalAddress" + ] + }, + "CreateHcxActivationKey": { + "methods": [ + "createHcxActivationKey" + ] + }, + "CreateLoggingServer": { + "methods": [ + "createLoggingServer" + ] + }, + "CreateManagementDnsZoneBinding": { + "methods": [ + "createManagementDnsZoneBinding" + ] + }, + "CreateNetworkPeering": { + "methods": [ + "createNetworkPeering" + ] + }, + "CreateNetworkPolicy": { + "methods": [ + "createNetworkPolicy" + ] + }, + "CreatePrivateCloud": { + "methods": [ + "createPrivateCloud" + ] + }, + "CreatePrivateConnection": { + "methods": [ + "createPrivateConnection" + ] + }, + "CreateVmwareEngineNetwork": { + "methods": [ + "createVmwareEngineNetwork" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "DeleteExternalAccessRule": { + "methods": [ + "deleteExternalAccessRule" + ] + }, + "DeleteExternalAddress": { + "methods": [ + "deleteExternalAddress" + ] + }, + "DeleteLoggingServer": { + "methods": [ + "deleteLoggingServer" + ] + }, + "DeleteManagementDnsZoneBinding": { + "methods": [ + "deleteManagementDnsZoneBinding" + ] + }, + "DeleteNetworkPeering": { + "methods": [ + "deleteNetworkPeering" + ] + }, + "DeleteNetworkPolicy": { + "methods": [ + "deleteNetworkPolicy" + ] + }, + "DeletePrivateCloud": { + "methods": [ + "deletePrivateCloud" + ] + }, + "DeletePrivateConnection": { + "methods": [ + "deletePrivateConnection" + ] + }, + "DeleteVmwareEngineNetwork": { + "methods": [ + "deleteVmwareEngineNetwork" + ] + }, + "FetchNetworkPolicyExternalAddresses": { + "methods": [ + "fetchNetworkPolicyExternalAddresses" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "GetDnsBindPermission": { + "methods": [ + "getDnsBindPermission" + ] + }, + "GetDnsForwarding": { + "methods": [ + "getDnsForwarding" + ] + }, + "GetExternalAccessRule": { + "methods": [ + "getExternalAccessRule" + ] + }, + "GetExternalAddress": { + "methods": [ + "getExternalAddress" + ] + }, + "GetHcxActivationKey": { + "methods": [ + "getHcxActivationKey" + ] + }, + "GetLoggingServer": { + "methods": [ + "getLoggingServer" + ] + }, + "GetManagementDnsZoneBinding": { + "methods": [ + "getManagementDnsZoneBinding" + ] + }, + "GetNetworkPeering": { + "methods": [ + "getNetworkPeering" + ] + }, + "GetNetworkPolicy": { + "methods": [ + "getNetworkPolicy" + ] + }, + "GetNode": { + "methods": [ + "getNode" + ] + }, + "GetNodeType": { + "methods": [ + "getNodeType" + ] + }, + "GetPrivateCloud": { + "methods": [ + "getPrivateCloud" + ] + }, + "GetPrivateConnection": { + "methods": [ + "getPrivateConnection" + ] + }, + "GetSubnet": { + "methods": [ + "getSubnet" + ] + }, + "GetVmwareEngineNetwork": { + "methods": [ + "getVmwareEngineNetwork" + ] + }, + "GrantDnsBindPermission": { + "methods": [ + "grantDnsBindPermission" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "ListExternalAccessRules": { + "methods": [ + "listExternalAccessRules" + ] + }, + "ListExternalAddresses": { + "methods": [ + "listExternalAddresses" + ] + }, + "ListHcxActivationKeys": { + "methods": [ + "listHcxActivationKeys" + ] + }, + "ListLoggingServers": { + "methods": [ + "listLoggingServers" + ] + }, + "ListManagementDnsZoneBindings": { + "methods": [ + "listManagementDnsZoneBindings" + ] + }, + "ListNetworkPeerings": { + "methods": [ + "listNetworkPeerings" + ] + }, + "ListNetworkPolicies": { + "methods": [ + "listNetworkPolicies" + ] + }, + "ListNodeTypes": { + "methods": [ + "listNodeTypes" + ] + }, + "ListNodes": { + "methods": [ + "listNodes" + ] + }, + "ListPeeringRoutes": { + "methods": [ + "listPeeringRoutes" + ] + }, + "ListPrivateClouds": { + "methods": [ + "listPrivateClouds" + ] + }, + "ListPrivateConnectionPeeringRoutes": { + "methods": [ + "listPrivateConnectionPeeringRoutes" + ] + }, + "ListPrivateConnections": { + "methods": [ + "listPrivateConnections" + ] + }, + "ListSubnets": { + "methods": [ + "listSubnets" + ] + }, + "ListVmwareEngineNetworks": { + "methods": [ + "listVmwareEngineNetworks" + ] + }, + "RepairManagementDnsZoneBinding": { + "methods": [ + "repairManagementDnsZoneBinding" + ] + }, + "ResetNsxCredentials": { + "methods": [ + "resetNsxCredentials" + ] + }, + "ResetVcenterCredentials": { + "methods": [ + "resetVcenterCredentials" + ] + }, + "RevokeDnsBindPermission": { + "methods": [ + "revokeDnsBindPermission" + ] + }, + "ShowNsxCredentials": { + "methods": [ + "showNsxCredentials" + ] + }, + "ShowVcenterCredentials": { + "methods": [ + "showVcenterCredentials" + ] + }, + "UndeletePrivateCloud": { + "methods": [ + "undeletePrivateCloud" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateDnsForwarding": { + "methods": [ + "updateDnsForwarding" + ] + }, + "UpdateExternalAccessRule": { + "methods": [ + "updateExternalAccessRule" + ] + }, + "UpdateExternalAddress": { + "methods": [ + "updateExternalAddress" + ] + }, + "UpdateLoggingServer": { + "methods": [ + "updateLoggingServer" + ] + }, + "UpdateManagementDnsZoneBinding": { + "methods": [ + "updateManagementDnsZoneBinding" + ] + }, + "UpdateNetworkPeering": { + "methods": [ + "updateNetworkPeering" + ] + }, + "UpdateNetworkPolicy": { + "methods": [ + "updateNetworkPolicy" + ] + }, + "UpdatePrivateCloud": { + "methods": [ + "updatePrivateCloud" + ] + }, + "UpdatePrivateConnection": { + "methods": [ + "updatePrivateConnection" + ] + }, + "UpdateSubnet": { + "methods": [ + "updateSubnet" + ] + }, + "UpdateVmwareEngineNetwork": { + "methods": [ + "updateVmwareEngineNetwork" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json new file mode 100644 index 000000000000..b669825592a5 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json @@ -0,0 +1,449 @@ +{ + "interfaces": { + "google.cloud.vmwareengine.v1.VmwareEngine": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [], + "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_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "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 + } + }, + "methods": { + "CreateCluster": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateExternalAccessRule": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateExternalAddress": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateHcxActivationKey": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateLoggingServer": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateManagementDnsZoneBinding": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateNetworkPeering": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateNetworkPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreatePrivateCloud": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreatePrivateConnection": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateVmwareEngineNetwork": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteCluster": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteExternalAccessRule": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteExternalAddress": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteLoggingServer": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteManagementDnsZoneBinding": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteNetworkPeering": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteNetworkPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeletePrivateCloud": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeletePrivateConnection": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteVmwareEngineNetwork": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "FetchNetworkPolicyExternalAddresses": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetCluster": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDnsBindPermission": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDnsForwarding": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetExternalAccessRule": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetExternalAddress": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetHcxActivationKey": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLoggingServer": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetManagementDnsZoneBinding": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetNetworkPeering": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetNetworkPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetNode": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetNodeType": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPrivateCloud": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPrivateConnection": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSubnet": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVmwareEngineNetwork": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GrantDnsBindPermission": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ListClusters": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListExternalAccessRules": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListExternalAddresses": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListHcxActivationKeys": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLoggingServers": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListManagementDnsZoneBindings": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListNetworkPeerings": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListNetworkPolicies": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListNodeTypes": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListNodes": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPeeringRoutes": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPrivateClouds": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPrivateConnectionPeeringRoutes": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPrivateConnections": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSubnets": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVmwareEngineNetworks": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RepairManagementDnsZoneBinding": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ResetNsxCredentials": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ResetVcenterCredentials": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "RevokeDnsBindPermission": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ShowNsxCredentials": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ShowVcenterCredentials": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UndeletePrivateCloud": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateCluster": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateDnsForwarding": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateExternalAccessRule": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateExternalAddress": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateLoggingServer": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateManagementDnsZoneBinding": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateNetworkPeering": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateNetworkPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdatePrivateCloud": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdatePrivateConnection": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateSubnet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateVmwareEngineNetwork": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetLocation": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "ListLocations": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetIamPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "SetIamPolicy": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "TestIamPermissions": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php new file mode 100644 index 000000000000..8005a342582a --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php @@ -0,0 +1,1430 @@ + [ + 'google.cloud.vmwareengine.v1.VmwareEngine' => [ + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateExternalAccessRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAccessRule', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateExternalAddress' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAddress', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateHcxActivationKey' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\HcxActivationKey', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLoggingServer' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\LoggingServer', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateManagementDnsZoneBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateNetworkPeering' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPeering', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateNetworkPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePrivateConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateConnection', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVmwareEngineNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\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\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExternalAccessRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExternalAddress' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLoggingServer' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteManagementDnsZoneBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNetworkPeering' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNetworkPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVmwareEngineNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GrantDnsBindPermission' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\DnsBindPermission', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RepairManagementDnsZoneBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResetNsxCredentials' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ResetVcenterCredentials' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'RevokeDnsBindPermission' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\DnsBindPermission', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UndeletePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cluster.name', + 'fieldAccessors' => [ + 'getCluster', + 'getName', + ], + ], + ], + ], + 'UpdateDnsForwarding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\DnsForwarding', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'dns_forwarding.name', + 'fieldAccessors' => [ + 'getDnsForwarding', + 'getName', + ], + ], + ], + ], + 'UpdateExternalAccessRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAccessRule', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'external_access_rule.name', + 'fieldAccessors' => [ + 'getExternalAccessRule', + 'getName', + ], + ], + ], + ], + 'UpdateExternalAddress' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAddress', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'external_address.name', + 'fieldAccessors' => [ + 'getExternalAddress', + 'getName', + ], + ], + ], + ], + 'UpdateLoggingServer' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\LoggingServer', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'logging_server.name', + 'fieldAccessors' => [ + 'getLoggingServer', + 'getName', + ], + ], + ], + ], + 'UpdateManagementDnsZoneBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'management_dns_zone_binding.name', + 'fieldAccessors' => [ + 'getManagementDnsZoneBinding', + 'getName', + ], + ], + ], + ], + 'UpdateNetworkPeering' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPeering', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'network_peering.name', + 'fieldAccessors' => [ + 'getNetworkPeering', + 'getName', + ], + ], + ], + ], + 'UpdateNetworkPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'network_policy.name', + 'fieldAccessors' => [ + 'getNetworkPolicy', + 'getName', + ], + ], + ], + ], + 'UpdatePrivateCloud' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_cloud.name', + 'fieldAccessors' => [ + 'getPrivateCloud', + 'getName', + ], + ], + ], + ], + 'UpdatePrivateConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateConnection', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'private_connection.name', + 'fieldAccessors' => [ + 'getPrivateConnection', + 'getName', + ], + ], + ], + ], + 'UpdateSubnet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Subnet', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'subnet.name', + 'fieldAccessors' => [ + 'getSubnet', + 'getName', + ], + ], + ], + ], + 'UpdateVmwareEngineNetwork' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', + 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'vmware_engine_network.name', + 'fieldAccessors' => [ + 'getVmwareEngineNetwork', + 'getName', + ], + ], + ], + ], + 'FetchNetworkPolicyExternalAddresses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExternalAddresses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\FetchNetworkPolicyExternalAddressesResponse', + 'headerParams' => [ + [ + 'keyName' => 'network_policy', + 'fieldAccessors' => [ + 'getNetworkPolicy', + ], + ], + ], + ], + 'GetCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Cluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsBindPermission' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\DnsBindPermission', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsForwarding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\DnsForwarding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExternalAccessRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ExternalAccessRule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExternalAddress' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ExternalAddress', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHcxActivationKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\HcxActivationKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLoggingServer' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\LoggingServer', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetManagementDnsZoneBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNetworkPeering' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\NetworkPeering', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNetworkPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\NetworkPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNode' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Node', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNodeType' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\NodeType', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateCloud' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\PrivateCloud', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\PrivateConnection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSubnet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Subnet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVmwareEngineNetwork' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', + '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\VmwareEngine\V1\ListClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListExternalAccessRules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExternalAccessRules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListExternalAccessRulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListExternalAddresses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExternalAddresses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListExternalAddressesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHcxActivationKeys' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHcxActivationKeys', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLoggingServers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLoggingServers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListLoggingServersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListManagementDnsZoneBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getManagementDnsZoneBindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListManagementDnsZoneBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkPeerings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNetworkPeerings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNetworkPeeringsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNetworkPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodeTypes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNodeTypes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNodeTypesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNodes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNodesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPeeringRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPeeringRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPeeringRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateClouds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPrivateClouds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateCloudsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateConnectionPeeringRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPeeringRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateConnectionPeeringRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPrivateConnections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateConnectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSubnets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSubnets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListSubnetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVmwareEngineNetworks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVmwareEngineNetworks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ShowNsxCredentials' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ShowVcenterCredentials' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', + 'headerParams' => [ + [ + 'keyName' => 'private_cloud', + 'fieldAccessors' => [ + 'getPrivateCloud', + ], + ], + ], + ], + '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', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'cluster' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}', + 'dnsBindPermission' => 'projects/{project}/locations/{location}/dnsBindPermission', + 'dnsForwarding' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/dnsForwarding', + 'externalAccessRule' => 'projects/{project}/locations/{location}/networkPolicies/{network_policy}/externalAccessRules/{external_access_rule}', + 'externalAddress' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}', + 'hcxActivationKey' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}', + 'location' => 'projects/{project}/locations/{location}', + 'loggingServer' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/loggingServers/{logging_server}', + 'managementDnsZoneBinding' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/managementDnsZoneBindings/{management_dns_zone_binding}', + 'network' => 'projects/{project}/global/networks/{network}', + 'networkPeering' => 'projects/{project}/locations/{location}/networkPeerings/{network_peering}', + 'networkPolicy' => 'projects/{project}/locations/{location}/networkPolicies/{network_policy}', + 'node' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}', + 'nodeType' => 'projects/{project}/locations/{location}/nodeTypes/{node_type}', + 'privateCloud' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}', + 'privateConnection' => 'projects/{project}/locations/{location}/privateConnections/{private_connection}', + 'subnet' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/subnets/{subnet}', + 'vmwareEngineNetwork' => 'projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php new file mode 100644 index 000000000000..d95541cca591 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php @@ -0,0 +1,1083 @@ + [ + '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.vmwareengine.v1.VmwareEngine' => [ + 'CreateCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', + 'body' => 'cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cluster_id', + ], + ], + 'CreateExternalAccessRule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/networkPolicies/*}/externalAccessRules', + 'body' => 'external_access_rule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'external_access_rule_id', + ], + ], + 'CreateExternalAddress' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/externalAddresses', + 'body' => 'external_address', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'external_address_id', + ], + ], + 'CreateHcxActivationKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', + 'body' => 'hcx_activation_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'hcx_activation_key_id', + ], + ], + 'CreateLoggingServer' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/loggingServers', + 'body' => 'logging_server', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'logging_server_id', + ], + ], + 'CreateManagementDnsZoneBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/managementDnsZoneBindings', + 'body' => 'management_dns_zone_binding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'management_dns_zone_binding_id', + ], + ], + 'CreateNetworkPeering' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPeerings', + 'body' => 'network_peering', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'network_peering_id', + ], + ], + 'CreateNetworkPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', + 'body' => 'network_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'network_policy_id', + ], + ], + 'CreatePrivateCloud' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', + 'body' => 'private_cloud', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'private_cloud_id', + ], + ], + 'CreatePrivateConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', + 'body' => 'private_connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'private_connection_id', + ], + ], + 'CreateVmwareEngineNetwork' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', + 'body' => 'vmware_engine_network', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'vmware_engine_network_id', + ], + ], + 'DeleteCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExternalAccessRule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*/externalAccessRules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExternalAddress' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/externalAddresses/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLoggingServer' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/loggingServers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteManagementDnsZoneBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNetworkPeering' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPeerings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNetworkPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateCloud' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateConnection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVmwareEngineNetwork' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FetchNetworkPolicyExternalAddresses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{network_policy=projects/*/locations/*/networkPolicies/*}:fetchExternalAddresses', + 'placeholders' => [ + 'network_policy' => [ + 'getters' => [ + 'getNetworkPolicy', + ], + ], + ], + ], + 'GetCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsBindPermission' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsBindPermission}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDnsForwarding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/dnsForwarding}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExternalAccessRule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*/externalAccessRules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExternalAddress' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/externalAddresses/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHcxActivationKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLoggingServer' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/loggingServers/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetManagementDnsZoneBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNetworkPeering' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPeerings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNetworkPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNode' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*/nodes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNodeType' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodeTypes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateCloud' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSubnet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/subnets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVmwareEngineNetwork' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GrantDnsBindPermission' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsBindPermission}:grant', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListExternalAccessRules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/networkPolicies/*}/externalAccessRules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListExternalAddresses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/externalAddresses', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHcxActivationKeys' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLoggingServers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/loggingServers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListManagementDnsZoneBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/managementDnsZoneBindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkPeerings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPeerings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNetworkPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodeTypes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodeTypes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNodes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*/clusters/*}/nodes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPeeringRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/networkPeerings/*}/peeringRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateClouds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateConnectionPeeringRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateConnections/*}/peeringRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSubnets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/subnets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVmwareEngineNetworks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RepairManagementDnsZoneBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}:repair', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResetNsxCredentials' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetNsxCredentials', + 'body' => '*', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ResetVcenterCredentials' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetVcenterCredentials', + 'body' => '*', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'RevokeDnsBindPermission' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsBindPermission}:revoke', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ShowNsxCredentials' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showNsxCredentials', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'ShowVcenterCredentials' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showVcenterCredentials', + 'placeholders' => [ + 'private_cloud' => [ + 'getters' => [ + 'getPrivateCloud', + ], + ], + ], + ], + 'UndeletePrivateCloud' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/privateClouds/*/clusters/*}', + 'body' => 'cluster', + 'placeholders' => [ + 'cluster.name' => [ + 'getters' => [ + 'getCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateDnsForwarding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{dns_forwarding.name=projects/*/locations/*/privateClouds/*/dnsForwarding}', + 'body' => 'dns_forwarding', + 'placeholders' => [ + 'dns_forwarding.name' => [ + 'getters' => [ + 'getDnsForwarding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateExternalAccessRule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{external_access_rule.name=projects/*/locations/*/networkPolicies/*/externalAccessRules/*}', + 'body' => 'external_access_rule', + 'placeholders' => [ + 'external_access_rule.name' => [ + 'getters' => [ + 'getExternalAccessRule', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateExternalAddress' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{external_address.name=projects/*/locations/*/privateClouds/*/externalAddresses/*}', + 'body' => 'external_address', + 'placeholders' => [ + 'external_address.name' => [ + 'getters' => [ + 'getExternalAddress', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateLoggingServer' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{logging_server.name=projects/*/locations/*/privateClouds/*/loggingServers/*}', + 'body' => 'logging_server', + 'placeholders' => [ + 'logging_server.name' => [ + 'getters' => [ + 'getLoggingServer', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateManagementDnsZoneBinding' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{management_dns_zone_binding.name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}', + 'body' => 'management_dns_zone_binding', + 'placeholders' => [ + 'management_dns_zone_binding.name' => [ + 'getters' => [ + 'getManagementDnsZoneBinding', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateNetworkPeering' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{network_peering.name=projects/*/locations/*/networkPeerings/*}', + 'body' => 'network_peering', + 'placeholders' => [ + 'network_peering.name' => [ + 'getters' => [ + 'getNetworkPeering', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateNetworkPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{network_policy.name=projects/*/locations/*/networkPolicies/*}', + 'body' => 'network_policy', + 'placeholders' => [ + 'network_policy.name' => [ + 'getters' => [ + 'getNetworkPolicy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdatePrivateCloud' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{private_cloud.name=projects/*/locations/*/privateClouds/*}', + 'body' => 'private_cloud', + 'placeholders' => [ + 'private_cloud.name' => [ + 'getters' => [ + 'getPrivateCloud', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdatePrivateConnection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{private_connection.name=projects/*/locations/*/privateConnections/*}', + 'body' => 'private_connection', + 'placeholders' => [ + 'private_connection.name' => [ + 'getters' => [ + 'getPrivateConnection', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSubnet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{subnet.name=projects/*/locations/*/privateClouds/*/subnets/*}', + 'body' => 'subnet', + 'placeholders' => [ + 'subnet.name' => [ + 'getters' => [ + 'getSubnet', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateVmwareEngineNetwork' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{vmware_engine_network.name=projects/*/locations/*/vmwareEngineNetworks/*}', + 'body' => 'vmware_engine_network', + 'placeholders' => [ + 'vmware_engine_network.name' => [ + 'getters' => [ + 'getVmwareEngineNetwork', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php new file mode 100644 index 000000000000..75e2221fc677 --- /dev/null +++ b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php @@ -0,0 +1,8496 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VmwareEngineClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VmwareEngineClient($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'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $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.vmwareengine.v1.VmwareEngine/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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $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 createExternalAccessRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createExternalAccessRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $priority = 1165461084; + $ipProtocol = 'ipProtocol-1134653776'; + $uid = 'uid115792'; + $expectedResponse = new ExternalAccessRule(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPriority($priority); + $expectedResponse->setIpProtocol($ipProtocol); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createExternalAccessRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $externalAccessRule = new ExternalAccessRule(); + $externalAccessRuleId = 'externalAccessRuleId1434975319'; + $request = (new CreateExternalAccessRuleRequest()) + ->setParent($formattedParent) + ->setExternalAccessRule($externalAccessRule) + ->setExternalAccessRuleId($externalAccessRuleId); + $response = $gapicClient->createExternalAccessRule($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.vmwareengine.v1.VmwareEngine/CreateExternalAccessRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getExternalAccessRule(); + $this->assertProtobufEquals($externalAccessRule, $actualValue); + $actualValue = $actualApiRequestObject->getExternalAccessRuleId(); + $this->assertProtobufEquals($externalAccessRuleId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createExternalAccessRuleTest'); + $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 createExternalAccessRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createExternalAccessRuleTest'); + $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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $externalAccessRule = new ExternalAccessRule(); + $externalAccessRuleId = 'externalAccessRuleId1434975319'; + $request = (new CreateExternalAccessRuleRequest()) + ->setParent($formattedParent) + ->setExternalAccessRule($externalAccessRule) + ->setExternalAccessRuleId($externalAccessRuleId); + $response = $gapicClient->createExternalAccessRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createExternalAccessRuleTest'); + 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 createExternalAddressTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createExternalAddressTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $internalIp = 'internalIp-2080778775'; + $externalIp = 'externalIp-1153075685'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new ExternalAddress(); + $expectedResponse->setName($name); + $expectedResponse->setInternalIp($internalIp); + $expectedResponse->setExternalIp($externalIp); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createExternalAddressTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $externalAddress = new ExternalAddress(); + $externalAddressId = 'externalAddressId344331834'; + $request = (new CreateExternalAddressRequest()) + ->setParent($formattedParent) + ->setExternalAddress($externalAddress) + ->setExternalAddressId($externalAddressId); + $response = $gapicClient->createExternalAddress($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.vmwareengine.v1.VmwareEngine/CreateExternalAddress', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getExternalAddress(); + $this->assertProtobufEquals($externalAddress, $actualValue); + $actualValue = $actualApiRequestObject->getExternalAddressId(); + $this->assertProtobufEquals($externalAddressId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createExternalAddressTest'); + $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 createExternalAddressExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createExternalAddressTest'); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $externalAddress = new ExternalAddress(); + $externalAddressId = 'externalAddressId344331834'; + $request = (new CreateExternalAddressRequest()) + ->setParent($formattedParent) + ->setExternalAddress($externalAddress) + ->setExternalAddressId($externalAddressId); + $response = $gapicClient->createExternalAddress($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createExternalAddressTest'); + 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 createHcxActivationKeyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHcxActivationKeyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $activationKey = 'activationKey-1343958090'; + $uid = 'uid115792'; + $expectedResponse = new HcxActivationKey(); + $expectedResponse->setName($name); + $expectedResponse->setActivationKey($activationKey); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createHcxActivationKeyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $hcxActivationKey = new HcxActivationKey(); + $hcxActivationKeyId = 'hcxActivationKeyId26532194'; + $request = (new CreateHcxActivationKeyRequest()) + ->setParent($formattedParent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + $response = $gapicClient->createHcxActivationKey($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.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getHcxActivationKey(); + $this->assertProtobufEquals($hcxActivationKey, $actualValue); + $actualValue = $actualApiRequestObject->getHcxActivationKeyId(); + $this->assertProtobufEquals($hcxActivationKeyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); + $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 createHcxActivationKeyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHcxActivationKeyTest'); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $hcxActivationKey = new HcxActivationKey(); + $hcxActivationKeyId = 'hcxActivationKeyId26532194'; + $request = (new CreateHcxActivationKeyRequest()) + ->setParent($formattedParent) + ->setHcxActivationKey($hcxActivationKey) + ->setHcxActivationKeyId($hcxActivationKeyId); + $response = $gapicClient->createHcxActivationKey($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); + 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 createLoggingServerTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLoggingServerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $port = 3446913; + $uid = 'uid115792'; + $expectedResponse = new LoggingServer(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $expectedResponse->setPort($port); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLoggingServerTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $loggingServer = new LoggingServer(); + $loggingServerHostname = 'loggingServerHostname2082652629'; + $loggingServer->setHostname($loggingServerHostname); + $loggingServerPort = 243392733; + $loggingServer->setPort($loggingServerPort); + $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; + $loggingServer->setProtocol($loggingServerProtocol); + $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; + $loggingServer->setSourceType($loggingServerSourceType); + $loggingServerId = 'loggingServerId-2097171785'; + $request = (new CreateLoggingServerRequest()) + ->setParent($formattedParent) + ->setLoggingServer($loggingServer) + ->setLoggingServerId($loggingServerId); + $response = $gapicClient->createLoggingServer($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.vmwareengine.v1.VmwareEngine/CreateLoggingServer', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLoggingServer(); + $this->assertProtobufEquals($loggingServer, $actualValue); + $actualValue = $actualApiRequestObject->getLoggingServerId(); + $this->assertProtobufEquals($loggingServerId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLoggingServerTest'); + $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 createLoggingServerExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLoggingServerTest'); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $loggingServer = new LoggingServer(); + $loggingServerHostname = 'loggingServerHostname2082652629'; + $loggingServer->setHostname($loggingServerHostname); + $loggingServerPort = 243392733; + $loggingServer->setPort($loggingServerPort); + $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; + $loggingServer->setProtocol($loggingServerProtocol); + $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; + $loggingServer->setSourceType($loggingServerSourceType); + $loggingServerId = 'loggingServerId-2097171785'; + $request = (new CreateLoggingServerRequest()) + ->setParent($formattedParent) + ->setLoggingServer($loggingServer) + ->setLoggingServerId($loggingServerId); + $response = $gapicClient->createLoggingServer($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLoggingServerTest'); + 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 createManagementDnsZoneBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createManagementDnsZoneBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $vpcNetwork = 'vpcNetwork-764161832'; + $uid = 'uid115792'; + $expectedResponse = new ManagementDnsZoneBinding(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVpcNetwork($vpcNetwork); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createManagementDnsZoneBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $managementDnsZoneBinding = new ManagementDnsZoneBinding(); + $managementDnsZoneBindingId = 'managementDnsZoneBindingId-1294625162'; + $request = (new CreateManagementDnsZoneBindingRequest()) + ->setParent($formattedParent) + ->setManagementDnsZoneBinding($managementDnsZoneBinding) + ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); + $response = $gapicClient->createManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/CreateManagementDnsZoneBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getManagementDnsZoneBinding(); + $this->assertProtobufEquals($managementDnsZoneBinding, $actualValue); + $actualValue = $actualApiRequestObject->getManagementDnsZoneBindingId(); + $this->assertProtobufEquals($managementDnsZoneBindingId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createManagementDnsZoneBindingTest'); + $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 createManagementDnsZoneBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createManagementDnsZoneBindingTest'); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $managementDnsZoneBinding = new ManagementDnsZoneBinding(); + $managementDnsZoneBindingId = 'managementDnsZoneBindingId-1294625162'; + $request = (new CreateManagementDnsZoneBindingRequest()) + ->setParent($formattedParent) + ->setManagementDnsZoneBinding($managementDnsZoneBinding) + ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); + $response = $gapicClient->createManagementDnsZoneBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createManagementDnsZoneBindingTest'); + 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 createNetworkPeeringTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $peerNetwork = 'peerNetwork2111238225'; + $exportCustomRoutes = false; + $importCustomRoutes = true; + $exchangeSubnetRoutes = true; + $exportCustomRoutesWithPublicIp = true; + $importCustomRoutesWithPublicIp = false; + $stateDetails = 'stateDetails632437908'; + $peerMtu = 69584721; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $expectedResponse = new NetworkPeering(); + $expectedResponse->setName($name); + $expectedResponse->setPeerNetwork($peerNetwork); + $expectedResponse->setExportCustomRoutes($exportCustomRoutes); + $expectedResponse->setImportCustomRoutes($importCustomRoutes); + $expectedResponse->setExchangeSubnetRoutes($exchangeSubnetRoutes); + $expectedResponse->setExportCustomRoutesWithPublicIp($exportCustomRoutesWithPublicIp); + $expectedResponse->setImportCustomRoutesWithPublicIp($importCustomRoutesWithPublicIp); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setPeerMtu($peerMtu); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNetworkPeeringTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $networkPeeringId = 'networkPeeringId-2057959125'; + $networkPeering = new NetworkPeering(); + $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; + $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); + $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; + $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); + $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); + $request = (new CreateNetworkPeeringRequest()) + ->setParent($formattedParent) + ->setNetworkPeeringId($networkPeeringId) + ->setNetworkPeering($networkPeering); + $response = $gapicClient->createNetworkPeering($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.vmwareengine.v1.VmwareEngine/CreateNetworkPeering', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPeeringId(); + $this->assertProtobufEquals($networkPeeringId, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPeering(); + $this->assertProtobufEquals($networkPeering, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPeeringTest'); + $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 createNetworkPeeringExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPeeringTest'); + $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]'); + $networkPeeringId = 'networkPeeringId-2057959125'; + $networkPeering = new NetworkPeering(); + $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; + $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); + $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; + $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); + $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); + $request = (new CreateNetworkPeeringRequest()) + ->setParent($formattedParent) + ->setNetworkPeeringId($networkPeeringId) + ->setNetworkPeering($networkPeering); + $response = $gapicClient->createNetworkPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPeeringTest'); + 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 createNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $networkPolicyId = 'networkPolicyId173955703'; + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $request = (new CreateNetworkPolicyRequest()) + ->setParent($formattedParent) + ->setNetworkPolicyId($networkPolicyId) + ->setNetworkPolicy($networkPolicy); + $response = $gapicClient->createNetworkPolicy($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.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPolicyId(); + $this->assertProtobufEquals($networkPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($networkPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); + $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 createNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNetworkPolicyTest'); + $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]'); + $networkPolicyId = 'networkPolicyId173955703'; + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $request = (new CreateNetworkPolicyRequest()) + ->setParent($formattedParent) + ->setNetworkPolicyId($networkPolicyId) + ->setNetworkPolicy($networkPolicy); + $response = $gapicClient->createNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); + 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 createPrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateCloudId = 'privateCloudId1366391457'; + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $request = (new CreatePrivateCloudRequest()) + ->setParent($formattedParent) + ->setPrivateCloudId($privateCloudId) + ->setPrivateCloud($privateCloud); + $response = $gapicClient->createPrivateCloud($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.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateCloudId(); + $this->assertProtobufEquals($privateCloudId, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($privateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); + $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 createPrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateCloudTest'); + $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]'); + $privateCloudId = 'privateCloudId1366391457'; + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $request = (new CreatePrivateCloudRequest()) + ->setParent($formattedParent) + ->setPrivateCloudId($privateCloudId) + ->setPrivateCloud($privateCloud); + $response = $gapicClient->createPrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); + 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 createPrivateConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $peeringId = 'peeringId-1561749894'; + $uid = 'uid115792'; + $serviceNetwork = 'serviceNetwork1072775844'; + $expectedResponse = new PrivateConnection(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $expectedResponse->setPeeringId($peeringId); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceNetwork($serviceNetwork); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPrivateConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateConnectionId = 'privateConnectionId-1948601248'; + $privateConnection = new PrivateConnection(); + $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); + $privateConnectionType = Type::TYPE_UNSPECIFIED; + $privateConnection->setType($privateConnectionType); + $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); + $request = (new CreatePrivateConnectionRequest()) + ->setParent($formattedParent) + ->setPrivateConnectionId($privateConnectionId) + ->setPrivateConnection($privateConnection); + $response = $gapicClient->createPrivateConnection($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.vmwareengine.v1.VmwareEngine/CreatePrivateConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateConnectionId(); + $this->assertProtobufEquals($privateConnectionId, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateConnection(); + $this->assertProtobufEquals($privateConnection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); + $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 createPrivateConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateConnectionTest'); + $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]'); + $privateConnectionId = 'privateConnectionId-1948601248'; + $privateConnection = new PrivateConnection(); + $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); + $privateConnectionType = Type::TYPE_UNSPECIFIED; + $privateConnection->setType($privateConnectionType); + $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); + $request = (new CreatePrivateConnectionRequest()) + ->setParent($formattedParent) + ->setPrivateConnectionId($privateConnectionId) + ->setPrivateConnection($privateConnection); + $response = $gapicClient->createPrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); + 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 createVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $request = (new CreateVmwareEngineNetworkRequest()) + ->setParent($formattedParent) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId) + ->setVmwareEngineNetwork($vmwareEngineNetwork); + $response = $gapicClient->createVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVmwareEngineNetworkId(); + $this->assertProtobufEquals($vmwareEngineNetworkId, $actualValue); + $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); + $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); + $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 createVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); + $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]'); + $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $request = (new CreateVmwareEngineNetworkRequest()) + ->setParent($formattedParent) + ->setVmwareEngineNetworkId($vmwareEngineNetworkId) + ->setVmwareEngineNetwork($vmwareEngineNetwork); + $response = $gapicClient->createVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); + 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]', '[PRIVATE_CLOUD]', '[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.vmwareengine.v1.VmwareEngine/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]', '[PRIVATE_CLOUD]', '[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 deleteExternalAccessRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExternalAccessRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteExternalAccessRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); + $request = (new DeleteExternalAccessRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExternalAccessRule($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.vmwareengine.v1.VmwareEngine/DeleteExternalAccessRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExternalAccessRuleTest'); + $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 deleteExternalAccessRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExternalAccessRuleTest'); + $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->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); + $request = (new DeleteExternalAccessRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExternalAccessRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExternalAccessRuleTest'); + 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 deleteExternalAddressTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExternalAddressTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteExternalAddressTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); + $request = (new DeleteExternalAddressRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExternalAddress($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.vmwareengine.v1.VmwareEngine/DeleteExternalAddress', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExternalAddressTest'); + $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 deleteExternalAddressExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExternalAddressTest'); + $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->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); + $request = (new DeleteExternalAddressRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExternalAddress($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExternalAddressTest'); + 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 deleteLoggingServerTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLoggingServerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLoggingServerTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); + $request = (new DeleteLoggingServerRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLoggingServer($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.vmwareengine.v1.VmwareEngine/DeleteLoggingServer', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLoggingServerTest'); + $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 deleteLoggingServerExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLoggingServerTest'); + $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->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); + $request = (new DeleteLoggingServerRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLoggingServer($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLoggingServerTest'); + 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 deleteManagementDnsZoneBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteManagementDnsZoneBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteManagementDnsZoneBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); + $request = (new DeleteManagementDnsZoneBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/DeleteManagementDnsZoneBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteManagementDnsZoneBindingTest'); + $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 deleteManagementDnsZoneBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteManagementDnsZoneBindingTest'); + $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->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); + $request = (new DeleteManagementDnsZoneBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteManagementDnsZoneBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteManagementDnsZoneBindingTest'); + 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 deleteNetworkPeeringTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNetworkPeeringTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); + $request = (new DeleteNetworkPeeringRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNetworkPeering($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.vmwareengine.v1.VmwareEngine/DeleteNetworkPeering', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPeeringTest'); + $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 deleteNetworkPeeringExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPeeringTest'); + $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->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); + $request = (new DeleteNetworkPeeringRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNetworkPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPeeringTest'); + 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 deleteNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new DeleteNetworkPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNetworkPolicy($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.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); + $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 deleteNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); + $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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new DeleteNetworkPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); + 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 deletePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new DeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateCloud($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.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); + $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 deletePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateCloudTest'); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new DeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); + 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 deletePrivateConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePrivateConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new DeletePrivateConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateConnection($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.vmwareengine.v1.VmwareEngine/DeletePrivateConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); + $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 deletePrivateConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateConnectionTest'); + $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->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new DeletePrivateConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); + 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 deleteVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new DeleteVmwareEngineNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); + $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 deleteVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); + $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->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new DeleteVmwareEngineNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); + 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 fetchNetworkPolicyExternalAddressesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $externalAddressesElement = new ExternalAddress(); + $externalAddresses = [ + $externalAddressesElement, + ]; + $expectedResponse = new FetchNetworkPolicyExternalAddressesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExternalAddresses($externalAddresses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedNetworkPolicy = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new FetchNetworkPolicyExternalAddressesRequest()) + ->setNetworkPolicy($formattedNetworkPolicy); + $response = $gapicClient->fetchNetworkPolicyExternalAddresses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExternalAddresses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/FetchNetworkPolicyExternalAddresses', $actualFuncCall); + $actualValue = $actualRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($formattedNetworkPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchNetworkPolicyExternalAddressesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedNetworkPolicy = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new FetchNetworkPolicyExternalAddressesRequest()) + ->setNetworkPolicy($formattedNetworkPolicy); + try { + $gapicClient->fetchNetworkPolicyExternalAddresses($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[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.vmwareengine.v1.VmwareEngine/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]', '[PRIVATE_CLOUD]', '[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 getDnsBindPermissionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new DnsBindPermission(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + $request = (new GetDnsBindPermissionRequest()) + ->setName($formattedName); + $response = $gapicClient->getDnsBindPermission($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.vmwareengine.v1.VmwareEngine/GetDnsBindPermission', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDnsBindPermissionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + $request = (new GetDnsBindPermissionRequest()) + ->setName($formattedName); + try { + $gapicClient->getDnsBindPermission($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDnsForwardingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new DnsForwarding(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dnsForwardingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new GetDnsForwardingRequest()) + ->setName($formattedName); + $response = $gapicClient->getDnsForwarding($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.vmwareengine.v1.VmwareEngine/GetDnsForwarding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDnsForwardingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->dnsForwardingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new GetDnsForwardingRequest()) + ->setName($formattedName); + try { + $gapicClient->getDnsForwarding($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExternalAccessRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $priority = 1165461084; + $ipProtocol = 'ipProtocol-1134653776'; + $uid = 'uid115792'; + $expectedResponse = new ExternalAccessRule(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setPriority($priority); + $expectedResponse->setIpProtocol($ipProtocol); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); + $request = (new GetExternalAccessRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getExternalAccessRule($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.vmwareengine.v1.VmwareEngine/GetExternalAccessRule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExternalAccessRuleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); + $request = (new GetExternalAccessRuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getExternalAccessRule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExternalAddressTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $internalIp = 'internalIp-2080778775'; + $externalIp = 'externalIp-1153075685'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new ExternalAddress(); + $expectedResponse->setName($name2); + $expectedResponse->setInternalIp($internalIp); + $expectedResponse->setExternalIp($externalIp); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); + $request = (new GetExternalAddressRequest()) + ->setName($formattedName); + $response = $gapicClient->getExternalAddress($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.vmwareengine.v1.VmwareEngine/GetExternalAddress', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExternalAddressExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); + $request = (new GetExternalAddressRequest()) + ->setName($formattedName); + try { + $gapicClient->getExternalAddress($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHcxActivationKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $activationKey = 'activationKey-1343958090'; + $uid = 'uid115792'; + $expectedResponse = new HcxActivationKey(); + $expectedResponse->setName($name2); + $expectedResponse->setActivationKey($activationKey); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + $request = (new GetHcxActivationKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getHcxActivationKey($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.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHcxActivationKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); + $request = (new GetHcxActivationKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getHcxActivationKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLoggingServerTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $hostname = 'hostname-299803597'; + $port = 3446913; + $uid = 'uid115792'; + $expectedResponse = new LoggingServer(); + $expectedResponse->setName($name2); + $expectedResponse->setHostname($hostname); + $expectedResponse->setPort($port); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); + $request = (new GetLoggingServerRequest()) + ->setName($formattedName); + $response = $gapicClient->getLoggingServer($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.vmwareengine.v1.VmwareEngine/GetLoggingServer', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLoggingServerExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); + $request = (new GetLoggingServerRequest()) + ->setName($formattedName); + try { + $gapicClient->getLoggingServer($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagementDnsZoneBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $vpcNetwork = 'vpcNetwork-764161832'; + $uid = 'uid115792'; + $expectedResponse = new ManagementDnsZoneBinding(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setVpcNetwork($vpcNetwork); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); + $request = (new GetManagementDnsZoneBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->getManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/GetManagementDnsZoneBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagementDnsZoneBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); + $request = (new GetManagementDnsZoneBindingRequest()) + ->setName($formattedName); + try { + $gapicClient->getManagementDnsZoneBinding($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPeeringTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $peerNetwork = 'peerNetwork2111238225'; + $exportCustomRoutes = false; + $importCustomRoutes = true; + $exchangeSubnetRoutes = true; + $exportCustomRoutesWithPublicIp = true; + $importCustomRoutesWithPublicIp = false; + $stateDetails = 'stateDetails632437908'; + $peerMtu = 69584721; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $expectedResponse = new NetworkPeering(); + $expectedResponse->setName($name2); + $expectedResponse->setPeerNetwork($peerNetwork); + $expectedResponse->setExportCustomRoutes($exportCustomRoutes); + $expectedResponse->setImportCustomRoutes($importCustomRoutes); + $expectedResponse->setExchangeSubnetRoutes($exchangeSubnetRoutes); + $expectedResponse->setExportCustomRoutesWithPublicIp($exportCustomRoutesWithPublicIp); + $expectedResponse->setImportCustomRoutesWithPublicIp($importCustomRoutesWithPublicIp); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setPeerMtu($peerMtu); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); + $request = (new GetNetworkPeeringRequest()) + ->setName($formattedName); + $response = $gapicClient->getNetworkPeering($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.vmwareengine.v1.VmwareEngine/GetNetworkPeering', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPeeringExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); + $request = (new GetNetworkPeeringRequest()) + ->setName($formattedName); + try { + $gapicClient->getNetworkPeering($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new GetNetworkPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getNetworkPolicy($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.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNetworkPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new GetNetworkPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getNetworkPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $fqdn = 'fqdn3150485'; + $internalIp = 'internalIp-2080778775'; + $nodeTypeId = 'nodeTypeId585437955'; + $version = 'version351608024'; + $customCoreCount = 2091833853; + $expectedResponse = new Node(); + $expectedResponse->setName($name2); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setInternalIp($internalIp); + $expectedResponse->setNodeTypeId($nodeTypeId); + $expectedResponse->setVersion($version); + $expectedResponse->setCustomCoreCount($customCoreCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]', '[NODE]'); + $request = (new GetNodeRequest()) + ->setName($formattedName); + $response = $gapicClient->getNode($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.vmwareengine.v1.VmwareEngine/GetNode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]', '[NODE]'); + $request = (new GetNodeRequest()) + ->setName($formattedName); + try { + $gapicClient->getNode($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTypeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $nodeTypeId = 'nodeTypeId585437955'; + $displayName = 'displayName1615086568'; + $virtualCpuCount = 289038212; + $totalCoreCount = 282953654; + $memoryGb = 1726613721; + $diskSizeGb = 757478089; + $expectedResponse = new NodeType(); + $expectedResponse->setName($name2); + $expectedResponse->setNodeTypeId($nodeTypeId); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVirtualCpuCount($virtualCpuCount); + $expectedResponse->setTotalCoreCount($totalCoreCount); + $expectedResponse->setMemoryGb($memoryGb); + $expectedResponse->setDiskSizeGb($diskSizeGb); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + $request = (new GetNodeTypeRequest()) + ->setName($formattedName); + $response = $gapicClient->getNodeType($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.vmwareengine.v1.VmwareEngine/GetNodeType', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNodeTypeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); + $request = (new GetNodeTypeRequest()) + ->setName($formattedName); + try { + $gapicClient->getNodeType($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateCloudTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new GetPrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->getPrivateCloud($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.vmwareengine.v1.VmwareEngine/GetPrivateCloud', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateCloudExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new GetPrivateCloudRequest()) + ->setName($formattedName); + try { + $gapicClient->getPrivateCloud($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $peeringId = 'peeringId-1561749894'; + $uid = 'uid115792'; + $serviceNetwork = 'serviceNetwork1072775844'; + $expectedResponse = new PrivateConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $expectedResponse->setPeeringId($peeringId); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceNetwork($serviceNetwork); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new GetPrivateConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getPrivateConnection($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.vmwareengine.v1.VmwareEngine/GetPrivateConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new GetPrivateConnectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getPrivateConnection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSubnetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $gatewayIp = 'gatewayIp955798786'; + $type = 'type3575610'; + $vlanId = 536153463; + $expectedResponse = new Subnet(); + $expectedResponse->setName($name2); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setGatewayIp($gatewayIp); + $expectedResponse->setType($type); + $expectedResponse->setVlanId($vlanId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->subnetName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[SUBNET]'); + $request = (new GetSubnetRequest()) + ->setName($formattedName); + $response = $gapicClient->getSubnet($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.vmwareengine.v1.VmwareEngine/GetSubnet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSubnetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->subnetName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[SUBNET]'); + $request = (new GetSubnetRequest()) + ->setName($formattedName); + try { + $gapicClient->getSubnet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVmwareEngineNetworkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new GetVmwareEngineNetworkRequest()) + ->setName($formattedName); + $response = $gapicClient->getVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVmwareEngineNetworkExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $request = (new GetVmwareEngineNetworkRequest()) + ->setName($formattedName); + try { + $gapicClient->getVmwareEngineNetwork($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function grantDnsBindPermissionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/grantDnsBindPermissionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new DnsBindPermission(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/grantDnsBindPermissionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + $principal = new Principal(); + $request = (new GrantDnsBindPermissionRequest()) + ->setName($formattedName) + ->setPrincipal($principal); + $response = $gapicClient->grantDnsBindPermission($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.vmwareengine.v1.VmwareEngine/GrantDnsBindPermission', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getPrincipal(); + $this->assertProtobufEquals($principal, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/grantDnsBindPermissionTest'); + $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 grantDnsBindPermissionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/grantDnsBindPermissionTest'); + $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->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + $principal = new Principal(); + $request = (new GrantDnsBindPermissionRequest()) + ->setName($formattedName) + ->setPrincipal($principal); + $response = $gapicClient->grantDnsBindPermission($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/grantDnsBindPermissionTest'); + 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $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.vmwareengine.v1.VmwareEngine/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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $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 listExternalAccessRulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $externalAccessRulesElement = new ExternalAccessRule(); + $externalAccessRules = [ + $externalAccessRulesElement, + ]; + $expectedResponse = new ListExternalAccessRulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExternalAccessRules($externalAccessRules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new ListExternalAccessRulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExternalAccessRules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExternalAccessRules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListExternalAccessRules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExternalAccessRulesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); + $request = (new ListExternalAccessRulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExternalAccessRules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExternalAddressesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $externalAddressesElement = new ExternalAddress(); + $externalAddresses = [ + $externalAddressesElement, + ]; + $expectedResponse = new ListExternalAddressesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExternalAddresses($externalAddresses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListExternalAddressesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExternalAddresses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExternalAddresses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListExternalAddresses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExternalAddressesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListExternalAddressesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExternalAddresses($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHcxActivationKeysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hcxActivationKeysElement = new HcxActivationKey(); + $hcxActivationKeys = [ + $hcxActivationKeysElement, + ]; + $expectedResponse = new ListHcxActivationKeysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHcxActivationKeys($hcxActivationKeys); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListHcxActivationKeysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHcxActivationKeys($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHcxActivationKeys()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHcxActivationKeysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListHcxActivationKeysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHcxActivationKeys($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLoggingServersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $loggingServersElement = new LoggingServer(); + $loggingServers = [ + $loggingServersElement, + ]; + $expectedResponse = new ListLoggingServersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLoggingServers($loggingServers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListLoggingServersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLoggingServers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLoggingServers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListLoggingServers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLoggingServersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListLoggingServersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLoggingServers($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagementDnsZoneBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $managementDnsZoneBindingsElement = new ManagementDnsZoneBinding(); + $managementDnsZoneBindings = [ + $managementDnsZoneBindingsElement, + ]; + $expectedResponse = new ListManagementDnsZoneBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setManagementDnsZoneBindings($managementDnsZoneBindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListManagementDnsZoneBindingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listManagementDnsZoneBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getManagementDnsZoneBindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListManagementDnsZoneBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagementDnsZoneBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListManagementDnsZoneBindingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listManagementDnsZoneBindings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPeeringsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $networkPeeringsElement = new NetworkPeering(); + $networkPeerings = [ + $networkPeeringsElement, + ]; + $expectedResponse = new ListNetworkPeeringsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNetworkPeerings($networkPeerings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworkPeeringsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNetworkPeerings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNetworkPeerings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPeerings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPeeringsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListNetworkPeeringsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNetworkPeerings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $networkPoliciesElement = new NetworkPolicy(); + $networkPolicies = [ + $networkPoliciesElement, + ]; + $expectedResponse = new ListNetworkPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNetworkPolicies($networkPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNetworkPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNetworkPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNetworkPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNetworkPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListNetworkPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNetworkPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodeTypesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nodeTypesElement = new NodeType(); + $nodeTypes = [ + $nodeTypesElement, + ]; + $expectedResponse = new ListNodeTypesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNodeTypes($nodeTypes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNodeTypesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNodeTypes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNodeTypes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodeTypesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListNodeTypesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNodeTypes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $nodesElement = new Node(); + $nodes = [ + $nodesElement, + ]; + $expectedResponse = new ListNodesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNodes($nodes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $request = (new ListNodesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNodes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNodes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNodesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]', '[PRIVATE_CLOUD]', '[CLUSTER]'); + $request = (new ListNodesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNodes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPeeringRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $peeringRoutesElement = new PeeringRoute(); + $peeringRoutes = [ + $peeringRoutesElement, + ]; + $expectedResponse = new ListPeeringRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPeeringRoutes($peeringRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); + $request = (new ListPeeringRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPeeringRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPeeringRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPeeringRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPeeringRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); + $request = (new ListPeeringRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPeeringRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateCloudsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $privateCloudsElement = new PrivateCloud(); + $privateClouds = [ + $privateCloudsElement, + ]; + $expectedResponse = new ListPrivateCloudsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPrivateClouds($privateClouds); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrivateCloudsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPrivateClouds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPrivateClouds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateCloudsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListPrivateCloudsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPrivateClouds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateConnectionPeeringRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $peeringRoutesElement = new PeeringRoute(); + $peeringRoutes = [ + $peeringRoutesElement, + ]; + $expectedResponse = new ListPrivateConnectionPeeringRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPeeringRoutes($peeringRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new ListPrivateConnectionPeeringRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPrivateConnectionPeeringRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPeeringRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateConnectionPeeringRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateConnectionPeeringRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new ListPrivateConnectionPeeringRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPrivateConnectionPeeringRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $privateConnectionsElement = new PrivateConnection(); + $privateConnections = [ + $privateConnectionsElement, + ]; + $expectedResponse = new ListPrivateConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPrivateConnections($privateConnections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrivateConnectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPrivateConnections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPrivateConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListPrivateConnectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPrivateConnections($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubnetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $subnetsElement = new Subnet(); + $subnets = [ + $subnetsElement, + ]; + $expectedResponse = new ListSubnetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSubnets($subnets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListSubnetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSubnets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSubnets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSubnetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ListSubnetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSubnets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVmwareEngineNetworksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vmwareEngineNetworksElement = new VmwareEngineNetwork(); + $vmwareEngineNetworks = [ + $vmwareEngineNetworksElement, + ]; + $expectedResponse = new ListVmwareEngineNetworksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVmwareEngineNetworks($vmwareEngineNetworks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVmwareEngineNetworksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVmwareEngineNetworks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVmwareEngineNetworks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVmwareEngineNetworksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListVmwareEngineNetworksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVmwareEngineNetworks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function repairManagementDnsZoneBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/repairManagementDnsZoneBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $vpcNetwork = 'vpcNetwork-764161832'; + $uid = 'uid115792'; + $expectedResponse = new ManagementDnsZoneBinding(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setVpcNetwork($vpcNetwork); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/repairManagementDnsZoneBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); + $request = (new RepairManagementDnsZoneBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->repairManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/RepairManagementDnsZoneBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/repairManagementDnsZoneBindingTest'); + $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 repairManagementDnsZoneBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/repairManagementDnsZoneBindingTest'); + $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->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); + $request = (new RepairManagementDnsZoneBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->repairManagementDnsZoneBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/repairManagementDnsZoneBindingTest'); + 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 resetNsxCredentialsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetNsxCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetNsxCredentialsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetNsxCredentials($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.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); + $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 resetNsxCredentialsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetNsxCredentialsTest'); + $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 + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetNsxCredentials($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); + 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 resetVcenterCredentialsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetVcenterCredentialsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetVcenterCredentials($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.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); + $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 resetVcenterCredentialsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); + $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 + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ResetVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->resetVcenterCredentials($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); + 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 revokeDnsBindPermissionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/revokeDnsBindPermissionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new DnsBindPermission(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/revokeDnsBindPermissionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + $principal = new Principal(); + $request = (new RevokeDnsBindPermissionRequest()) + ->setName($formattedName) + ->setPrincipal($principal); + $response = $gapicClient->revokeDnsBindPermission($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.vmwareengine.v1.VmwareEngine/RevokeDnsBindPermission', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getPrincipal(); + $this->assertProtobufEquals($principal, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/revokeDnsBindPermissionTest'); + $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 revokeDnsBindPermissionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/revokeDnsBindPermissionTest'); + $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->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); + $principal = new Principal(); + $request = (new RevokeDnsBindPermissionRequest()) + ->setName($formattedName) + ->setPrincipal($principal); + $response = $gapicClient->revokeDnsBindPermission($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/revokeDnsBindPermissionTest'); + 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 showNsxCredentialsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $username = 'username-265713450'; + $password = 'password1216985755'; + $expectedResponse = new Credentials(); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->showNsxCredentials($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.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', $actualFuncCall); + $actualValue = $actualRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showNsxCredentialsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowNsxCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + try { + $gapicClient->showNsxCredentials($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showVcenterCredentialsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $username2 = 'username2-1947551991'; + $password = 'password1216985755'; + $expectedResponse = new Credentials(); + $expectedResponse->setUsername($username2); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + $response = $gapicClient->showVcenterCredentials($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.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', $actualFuncCall); + $actualValue = $actualRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showVcenterCredentialsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new ShowVcenterCredentialsRequest()) + ->setPrivateCloud($formattedPrivateCloud); + try { + $gapicClient->showVcenterCredentials($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeletePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeletePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeletePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new UndeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->undeletePrivateCloud($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.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); + $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 undeletePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/undeletePrivateCloudTest'); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $request = (new UndeletePrivateCloudRequest()) + ->setName($formattedName); + $response = $gapicClient->undeletePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); + 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'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $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(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $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.vmwareengine.v1.VmwareEngine/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(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $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 updateDnsForwardingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDnsForwardingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new DnsForwarding(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDnsForwardingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $dnsForwarding = new DnsForwarding(); + $dnsForwardingForwardingRules = []; + $dnsForwarding->setForwardingRules($dnsForwardingForwardingRules); + $updateMask = new FieldMask(); + $request = (new UpdateDnsForwardingRequest()) + ->setDnsForwarding($dnsForwarding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDnsForwarding($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.vmwareengine.v1.VmwareEngine/UpdateDnsForwarding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDnsForwarding(); + $this->assertProtobufEquals($dnsForwarding, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDnsForwardingTest'); + $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 updateDnsForwardingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDnsForwardingTest'); + $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 + $dnsForwarding = new DnsForwarding(); + $dnsForwardingForwardingRules = []; + $dnsForwarding->setForwardingRules($dnsForwardingForwardingRules); + $updateMask = new FieldMask(); + $request = (new UpdateDnsForwardingRequest()) + ->setDnsForwarding($dnsForwarding) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDnsForwarding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDnsForwardingTest'); + 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 updateExternalAccessRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateExternalAccessRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $priority = 1165461084; + $ipProtocol = 'ipProtocol-1134653776'; + $uid = 'uid115792'; + $expectedResponse = new ExternalAccessRule(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setPriority($priority); + $expectedResponse->setIpProtocol($ipProtocol); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateExternalAccessRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $externalAccessRule = new ExternalAccessRule(); + $request = (new UpdateExternalAccessRuleRequest()) + ->setUpdateMask($updateMask) + ->setExternalAccessRule($externalAccessRule); + $response = $gapicClient->updateExternalAccessRule($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.vmwareengine.v1.VmwareEngine/UpdateExternalAccessRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getExternalAccessRule(); + $this->assertProtobufEquals($externalAccessRule, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateExternalAccessRuleTest'); + $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 updateExternalAccessRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateExternalAccessRuleTest'); + $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(); + $externalAccessRule = new ExternalAccessRule(); + $request = (new UpdateExternalAccessRuleRequest()) + ->setUpdateMask($updateMask) + ->setExternalAccessRule($externalAccessRule); + $response = $gapicClient->updateExternalAccessRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateExternalAccessRuleTest'); + 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 updateExternalAddressTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateExternalAddressTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $internalIp = 'internalIp-2080778775'; + $externalIp = 'externalIp-1153075685'; + $uid = 'uid115792'; + $description = 'description-1724546052'; + $expectedResponse = new ExternalAddress(); + $expectedResponse->setName($name); + $expectedResponse->setInternalIp($internalIp); + $expectedResponse->setExternalIp($externalIp); + $expectedResponse->setUid($uid); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateExternalAddressTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $externalAddress = new ExternalAddress(); + $request = (new UpdateExternalAddressRequest()) + ->setUpdateMask($updateMask) + ->setExternalAddress($externalAddress); + $response = $gapicClient->updateExternalAddress($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.vmwareengine.v1.VmwareEngine/UpdateExternalAddress', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getExternalAddress(); + $this->assertProtobufEquals($externalAddress, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateExternalAddressTest'); + $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 updateExternalAddressExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateExternalAddressTest'); + $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(); + $externalAddress = new ExternalAddress(); + $request = (new UpdateExternalAddressRequest()) + ->setUpdateMask($updateMask) + ->setExternalAddress($externalAddress); + $response = $gapicClient->updateExternalAddress($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateExternalAddressTest'); + 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 updateLoggingServerTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLoggingServerTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $hostname = 'hostname-299803597'; + $port = 3446913; + $uid = 'uid115792'; + $expectedResponse = new LoggingServer(); + $expectedResponse->setName($name); + $expectedResponse->setHostname($hostname); + $expectedResponse->setPort($port); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateLoggingServerTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $loggingServer = new LoggingServer(); + $loggingServerHostname = 'loggingServerHostname2082652629'; + $loggingServer->setHostname($loggingServerHostname); + $loggingServerPort = 243392733; + $loggingServer->setPort($loggingServerPort); + $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; + $loggingServer->setProtocol($loggingServerProtocol); + $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; + $loggingServer->setSourceType($loggingServerSourceType); + $request = (new UpdateLoggingServerRequest()) + ->setUpdateMask($updateMask) + ->setLoggingServer($loggingServer); + $response = $gapicClient->updateLoggingServer($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.vmwareengine.v1.VmwareEngine/UpdateLoggingServer', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getLoggingServer(); + $this->assertProtobufEquals($loggingServer, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLoggingServerTest'); + $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 updateLoggingServerExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLoggingServerTest'); + $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(); + $loggingServer = new LoggingServer(); + $loggingServerHostname = 'loggingServerHostname2082652629'; + $loggingServer->setHostname($loggingServerHostname); + $loggingServerPort = 243392733; + $loggingServer->setPort($loggingServerPort); + $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; + $loggingServer->setProtocol($loggingServerProtocol); + $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; + $loggingServer->setSourceType($loggingServerSourceType); + $request = (new UpdateLoggingServerRequest()) + ->setUpdateMask($updateMask) + ->setLoggingServer($loggingServer); + $response = $gapicClient->updateLoggingServer($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLoggingServerTest'); + 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 updateManagementDnsZoneBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateManagementDnsZoneBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $vpcNetwork = 'vpcNetwork-764161832'; + $uid = 'uid115792'; + $expectedResponse = new ManagementDnsZoneBinding(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVpcNetwork($vpcNetwork); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateManagementDnsZoneBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $managementDnsZoneBinding = new ManagementDnsZoneBinding(); + $request = (new UpdateManagementDnsZoneBindingRequest()) + ->setUpdateMask($updateMask) + ->setManagementDnsZoneBinding($managementDnsZoneBinding); + $response = $gapicClient->updateManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/UpdateManagementDnsZoneBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getManagementDnsZoneBinding(); + $this->assertProtobufEquals($managementDnsZoneBinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateManagementDnsZoneBindingTest'); + $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 updateManagementDnsZoneBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateManagementDnsZoneBindingTest'); + $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(); + $managementDnsZoneBinding = new ManagementDnsZoneBinding(); + $request = (new UpdateManagementDnsZoneBindingRequest()) + ->setUpdateMask($updateMask) + ->setManagementDnsZoneBinding($managementDnsZoneBinding); + $response = $gapicClient->updateManagementDnsZoneBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateManagementDnsZoneBindingTest'); + 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 updateNetworkPeeringTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $peerNetwork = 'peerNetwork2111238225'; + $exportCustomRoutes = false; + $importCustomRoutes = true; + $exchangeSubnetRoutes = true; + $exportCustomRoutesWithPublicIp = true; + $importCustomRoutesWithPublicIp = false; + $stateDetails = 'stateDetails632437908'; + $peerMtu = 69584721; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $expectedResponse = new NetworkPeering(); + $expectedResponse->setName($name); + $expectedResponse->setPeerNetwork($peerNetwork); + $expectedResponse->setExportCustomRoutes($exportCustomRoutes); + $expectedResponse->setImportCustomRoutes($importCustomRoutes); + $expectedResponse->setExchangeSubnetRoutes($exchangeSubnetRoutes); + $expectedResponse->setExportCustomRoutesWithPublicIp($exportCustomRoutesWithPublicIp); + $expectedResponse->setImportCustomRoutesWithPublicIp($importCustomRoutesWithPublicIp); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setPeerMtu($peerMtu); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNetworkPeeringTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $networkPeering = new NetworkPeering(); + $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; + $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); + $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; + $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); + $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPeeringRequest()) + ->setNetworkPeering($networkPeering) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNetworkPeering($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.vmwareengine.v1.VmwareEngine/UpdateNetworkPeering', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetworkPeering(); + $this->assertProtobufEquals($networkPeering, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPeeringTest'); + $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 updateNetworkPeeringExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPeeringTest'); + $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 + $networkPeering = new NetworkPeering(); + $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; + $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); + $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; + $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); + $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPeeringRequest()) + ->setNetworkPeering($networkPeering) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNetworkPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPeeringTest'); + 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 updateNetworkPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $edgeServicesCidr = 'edgeServicesCidr-792872013'; + $uid = 'uid115792'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $description = 'description-1724546052'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $expectedResponse = new NetworkPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); + $expectedResponse->setUid($uid); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateNetworkPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPolicyRequest()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNetworkPolicy($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.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNetworkPolicy(); + $this->assertProtobufEquals($networkPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); + $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 updateNetworkPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateNetworkPolicyTest'); + $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 + $networkPolicy = new NetworkPolicy(); + $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; + $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); + $updateMask = new FieldMask(); + $request = (new UpdateNetworkPolicyRequest()) + ->setNetworkPolicy($networkPolicy) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateNetworkPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); + 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 updatePrivateCloudTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateCloudTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new PrivateCloud(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePrivateCloudTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateCloudRequest()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePrivateCloud($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.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateCloud(); + $this->assertProtobufEquals($privateCloud, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); + $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 updatePrivateCloudExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateCloudTest'); + $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 + $privateCloud = new PrivateCloud(); + $privateCloudNetworkConfig = new NetworkConfig(); + $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; + $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); + $privateCloud->setNetworkConfig($privateCloudNetworkConfig); + $privateCloudManagementCluster = new ManagementCluster(); + $managementClusterClusterId = 'managementClusterClusterId311493182'; + $privateCloudManagementCluster->setClusterId($managementClusterClusterId); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $managementClusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); + $privateCloud->setManagementCluster($privateCloudManagementCluster); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateCloudRequest()) + ->setPrivateCloud($privateCloud) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePrivateCloud($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); + 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 updatePrivateConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; + $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; + $peeringId = 'peeringId-1561749894'; + $uid = 'uid115792'; + $serviceNetwork = 'serviceNetwork1072775844'; + $expectedResponse = new PrivateConnection(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); + $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); + $expectedResponse->setPeeringId($peeringId); + $expectedResponse->setUid($uid); + $expectedResponse->setServiceNetwork($serviceNetwork); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePrivateConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $privateConnection = new PrivateConnection(); + $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); + $privateConnectionType = Type::TYPE_UNSPECIFIED; + $privateConnection->setType($privateConnectionType); + $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateConnectionRequest()) + ->setPrivateConnection($privateConnection) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePrivateConnection($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.vmwareengine.v1.VmwareEngine/UpdatePrivateConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPrivateConnection(); + $this->assertProtobufEquals($privateConnection, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateConnectionTest'); + $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 updatePrivateConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePrivateConnectionTest'); + $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 + $privateConnection = new PrivateConnection(); + $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); + $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); + $privateConnectionType = Type::TYPE_UNSPECIFIED; + $privateConnection->setType($privateConnectionType); + $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); + $updateMask = new FieldMask(); + $request = (new UpdatePrivateConnectionRequest()) + ->setPrivateConnection($privateConnection) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePrivateConnectionTest'); + 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 updateSubnetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSubnetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $gatewayIp = 'gatewayIp955798786'; + $type = 'type3575610'; + $vlanId = 536153463; + $expectedResponse = new Subnet(); + $expectedResponse->setName($name); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setGatewayIp($gatewayIp); + $expectedResponse->setType($type); + $expectedResponse->setVlanId($vlanId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSubnetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $subnet = new Subnet(); + $request = (new UpdateSubnetRequest()) + ->setUpdateMask($updateMask) + ->setSubnet($subnet); + $response = $gapicClient->updateSubnet($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.vmwareengine.v1.VmwareEngine/UpdateSubnet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSubnet(); + $this->assertProtobufEquals($subnet, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSubnetTest'); + $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 updateSubnetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSubnetTest'); + $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(); + $subnet = new Subnet(); + $request = (new UpdateSubnetRequest()) + ->setUpdateMask($updateMask) + ->setSubnet($subnet); + $response = $gapicClient->updateSubnet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSubnetTest'); + 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 updateVmwareEngineNetworkTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new VmwareEngineNetwork(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVmwareEngineNetworkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $request = (new UpdateVmwareEngineNetworkRequest()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); + $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); + $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 updateVmwareEngineNetworkExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); + $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 + $vmwareEngineNetwork = new VmwareEngineNetwork(); + $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; + $vmwareEngineNetwork->setType($vmwareEngineNetworkType); + $updateMask = new FieldMask(); + $request = (new UpdateVmwareEngineNetworkRequest()) + ->setVmwareEngineNetwork($vmwareEngineNetwork) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateVmwareEngineNetwork($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); + 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 getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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'; + $management = false; + $uid = 'uid115792'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setManagement($management); + $expectedResponse->setUid($uid); + $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $nodeTypeConfigsValue = new NodeTypeConfig(); + $valueNodeCount = 1174748740; + $nodeTypeConfigsValue->setNodeCount($valueNodeCount); + $clusterNodeTypeConfigs = [ + 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, + ]; + $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); + $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.vmwareengine.v1.VmwareEngine/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/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php b/owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php new file mode 100644 index 0000000000000000000000000000000000000000..d90990e0cb7baaf878f9cd84c900d14b14ef4c34 GIT binary patch literal 3596 zcmb_f&2HO95UwOkiPo;;Ftwu?O~WV#;;0E3xjm$GoPhd?VZes6bIGX%lM6 zk}Er|p-WD^_Yrz4dhQz(C=3(@+FMRJ^ibpxf*!g*_&?A(9o z^*nGxU56O@7J+TGwXc#MR6XA%uI)N%YtZRHU$x!7haBi@s#@7nA8+lb)yl@sb*dV; z1K);*+I8Ko19jVR2W@@Vvn|_(L7?vz*-KNrY1}LT*y_W;vuvoY*Giv5Vzn(|HP*R> zMwwY?JdG?go)%XDupKK1RJv$#v)}-z^ydv)4zksNScLv9p`eK{BFJ*kH}oiLYR7T{ zNVSj4b_Uoc$i*sC*upkkzNHGAOm@k0>CxBJ2vUuCgL{nc8iOb zLo=3#X!fvZh%{Ne7W>d)E^oF%pN9gWQJrb}p<}~OH$q)!wM=BDWD>`Fm9)f1ZBO50`{rPOOPr7VEiKEh4X^W8zW=M6|MO%0{_y7eNyp5g1) zfMN^Cu-&95dq%+rxpQi2IV%jVf=n=IQS7<%RAGAM@CKDJE8}*SG3( zQ|!Z&T1AMZjqV$>4e}#Cir`Q}1sW~+x{QeOAabRC5Izlc$F)T^>Ic!|P!FB&`hk8R zpNIJ$6JVk2LmF0Tvkt!=(2P_*0~ycqDencdO1EB{$+zYWa6K{_gb|XkHp7jTD_}h%oVA|#^YqDC#oie?$ z7{#43m-lf^_5x87ir_rNZK1-d)&wdB$Pmk?ZJ(E;EaO7ztvL}FR{qX_IeC@YhW;+H zq4HM(To_9br5FJ}-Zr!`*^o|)S0j~J<=3S1@-GvI=11|Oe%!II%&Q_DZ%b~_)Ed3K z{NvB>lB;=*UF{BpFgoN!9L=x2GI_(| zfbS{-FzaBaz>Sx#!ch4s0cMZpjdJ%LIFE`(NZ%E~aSf4_`G>E}upS-(KC!2j-zbyD za`2r@8k3En{|l3z9hwC&A2xHDSk=Bq_LY-J6$?e-jGy@;CB9r0%#7|Xv^93!*px%} z6N8SJbG+87gzL3_NM2dzqm5Q(qm3qwYfp=Z(YHo8_prf7%s34?`MgPfC{zuD>l%jq lOdpG_40rq|H|6E@wwNYj!w0*3A^U{EgG-75VF-o*`~#gVt{VUV literal 0 HcmV?d00001 diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php new file mode 100644 index 000000000000..25fa64274902 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php @@ -0,0 +1,421 @@ +google.cloud.vpcaccess.v1.Connector + */ +class Connector extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name in the format `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Name of a VPC network. + * + * Generated from protobuf field string network = 2; + */ + protected $network = ''; + /** + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * + * Generated from protobuf field string ip_cidr_range = 3; + */ + protected $ip_cidr_range = ''; + /** + * Output only. State of the VPC access connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Minimum throughput of the connector in Mbps. Default and min is 200. + * + * Generated from protobuf field int32 min_throughput = 5; + */ + protected $min_throughput = 0; + /** + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * + * Generated from protobuf field int32 max_throughput = 6; + */ + protected $max_throughput = 0; + /** + * Output only. List of projects using the connector. + * + * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $connected_projects; + /** + * The subnet in which to house the VPC Access Connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; + */ + protected $subnet = null; + /** + * Machine type of VM Instance underlying connector. Default is e2-micro + * + * Generated from protobuf field string machine_type = 10; + */ + protected $machine_type = ''; + /** + * Minimum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 min_instances = 11; + */ + protected $min_instances = 0; + /** + * Maximum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 max_instances = 12; + */ + protected $max_instances = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name in the format `projects/*/locations/*/connectors/*`. + * @type string $network + * Name of a VPC network. + * @type string $ip_cidr_range + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * @type int $state + * Output only. State of the VPC access connector. + * @type int $min_throughput + * Minimum throughput of the connector in Mbps. Default and min is 200. + * @type int $max_throughput + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * @type array|\Google\Protobuf\Internal\RepeatedField $connected_projects + * Output only. List of projects using the connector. + * @type \Google\Cloud\VpcAccess\V1\Connector\Subnet $subnet + * The subnet in which to house the VPC Access Connector. + * @type string $machine_type + * Machine type of VM Instance underlying connector. Default is e2-micro + * @type int $min_instances + * Minimum value of instances in autoscaling group underlying the connector. + * @type int $max_instances + * Maximum value of instances in autoscaling group underlying the connector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * The resource name in the format `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name in the format `projects/*/locations/*/connectors/*`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name of a VPC network. + * + * Generated from protobuf field string network = 2; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Name of a VPC network. + * + * Generated from protobuf field string network = 2; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * + * Generated from protobuf field string ip_cidr_range = 3; + * @return string + */ + public function getIpCidrRange() + { + return $this->ip_cidr_range; + } + + /** + * The range of internal addresses that follows RFC 4632 notation. + * Example: `10.132.0.0/28`. + * + * Generated from protobuf field string ip_cidr_range = 3; + * @param string $var + * @return $this + */ + public function setIpCidrRange($var) + { + GPBUtil::checkString($var, True); + $this->ip_cidr_range = $var; + + return $this; + } + + /** + * Output only. State of the VPC access connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the VPC access connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VpcAccess\V1\Connector\State::class); + $this->state = $var; + + return $this; + } + + /** + * Minimum throughput of the connector in Mbps. Default and min is 200. + * + * Generated from protobuf field int32 min_throughput = 5; + * @return int + */ + public function getMinThroughput() + { + return $this->min_throughput; + } + + /** + * Minimum throughput of the connector in Mbps. Default and min is 200. + * + * Generated from protobuf field int32 min_throughput = 5; + * @param int $var + * @return $this + */ + public function setMinThroughput($var) + { + GPBUtil::checkInt32($var); + $this->min_throughput = $var; + + return $this; + } + + /** + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * + * Generated from protobuf field int32 max_throughput = 6; + * @return int + */ + public function getMaxThroughput() + { + return $this->max_throughput; + } + + /** + * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + * + * Generated from protobuf field int32 max_throughput = 6; + * @param int $var + * @return $this + */ + public function setMaxThroughput($var) + { + GPBUtil::checkInt32($var); + $this->max_throughput = $var; + + return $this; + } + + /** + * Output only. List of projects using the connector. + * + * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectedProjects() + { + return $this->connected_projects; + } + + /** + * Output only. List of projects using the connector. + * + * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectedProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->connected_projects = $arr; + + return $this; + } + + /** + * The subnet in which to house the VPC Access Connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; + * @return \Google\Cloud\VpcAccess\V1\Connector\Subnet|null + */ + public function getSubnet() + { + return $this->subnet; + } + + public function hasSubnet() + { + return isset($this->subnet); + } + + public function clearSubnet() + { + unset($this->subnet); + } + + /** + * The subnet in which to house the VPC Access Connector. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; + * @param \Google\Cloud\VpcAccess\V1\Connector\Subnet $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector\Subnet::class); + $this->subnet = $var; + + return $this; + } + + /** + * Machine type of VM Instance underlying connector. Default is e2-micro + * + * Generated from protobuf field string machine_type = 10; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Machine type of VM Instance underlying connector. Default is e2-micro + * + * Generated from protobuf field string machine_type = 10; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Minimum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 min_instances = 11; + * @return int + */ + public function getMinInstances() + { + return $this->min_instances; + } + + /** + * Minimum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 min_instances = 11; + * @param int $var + * @return $this + */ + public function setMinInstances($var) + { + GPBUtil::checkInt32($var); + $this->min_instances = $var; + + return $this; + } + + /** + * Maximum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 max_instances = 12; + * @return int + */ + public function getMaxInstances() + { + return $this->max_instances; + } + + /** + * Maximum value of instances in autoscaling group underlying the connector. + * + * Generated from protobuf field int32 max_instances = 12; + * @param int $var + * @return $this + */ + public function setMaxInstances($var) + { + GPBUtil::checkInt32($var); + $this->max_instances = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php new file mode 100644 index 000000000000..a8ea7061ed87 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php @@ -0,0 +1,85 @@ +google.cloud.vpcaccess.v1.Connector.State + */ +class State +{ + /** + * Invalid state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Connector is deployed and ready to receive traffic. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * An Insert operation is in progress. Transient condition. + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * A Delete operation is in progress. Transient condition. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Connector is in a bad state, manual deletion recommended. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * The connector is being updated. + * + * Generated from protobuf enum UPDATING = 5; + */ + const UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\VpcAccess\V1\Connector_State::class); + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php new file mode 100644 index 000000000000..4ea82c2b3192 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php @@ -0,0 +1,124 @@ +google.cloud.vpcaccess.v1.Connector.Subnet + */ +class Subnet extends \Google\Protobuf\Internal\Message +{ + /** + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * @type string $project_id + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Subnet name (relative, not fully qualified). + * E.g. if the full subnet selfLink is + * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} + * the correct input for this field would be {subnetName} + * + * 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; + } + + /** + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project in which the subnet exists. + * If not set, this project is assumed to be the project for which + * the connector create request was issued. + * + * Generated from protobuf field string project_id = 2; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Subnet::class, \Google\Cloud\VpcAccess\V1\Connector_Subnet::class); + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php new file mode 100644 index 000000000000..8b40233b6b2d --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php @@ -0,0 +1,168 @@ +google.cloud.vpcaccess.v1.CreateConnectorRequest + */ +class CreateConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for this connector. + * + * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connector_id = ''; + /** + * Required. Resource to create. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connector = null; + + /** + * @param string $parent Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. Please see + * {@see VpcAccessServiceClient::locationName()} for help formatting this field. + * @param string $connectorId Required. The ID to use for this connector. + * @param \Google\Cloud\VpcAccess\V1\Connector $connector Required. Resource to create. + * + * @return \Google\Cloud\VpcAccess\V1\CreateConnectorRequest + * + * @experimental + */ + public static function build(string $parent, string $connectorId, \Google\Cloud\VpcAccess\V1\Connector $connector): self + { + return (new self()) + ->setParent($parent) + ->setConnectorId($connectorId) + ->setConnector($connector); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/locations/*`. + * @type string $connector_id + * Required. The ID to use for this connector. + * @type \Google\Cloud\VpcAccess\V1\Connector $connector + * Required. Resource to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location in which the configuration should be created, + * specified in the format `projects/*/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 project and location in which the configuration should be created, + * specified in the format `projects/*/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; + } + + /** + * Required. The ID to use for this connector. + * + * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConnectorId() + { + return $this->connector_id; + } + + /** + * Required. The ID to use for this connector. + * + * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConnectorId($var) + { + GPBUtil::checkString($var, True); + $this->connector_id = $var; + + return $this; + } + + /** + * Required. Resource to create. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VpcAccess\V1\Connector|null + */ + public function getConnector() + { + return $this->connector; + } + + public function hasConnector() + { + return isset($this->connector); + } + + public function clearConnector() + { + unset($this->connector); + } + + /** + * Required. Resource to create. + * + * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VpcAccess\V1\Connector $var + * @return $this + */ + public function setConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector::class); + $this->connector = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php new file mode 100644 index 000000000000..dff74532e1f0 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.vpcaccess.v1.DeleteConnectorRequest + */ +class DeleteConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a Serverless VPC Access connector to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of a Serverless VPC Access connector to delete. Please see + * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest + * + * @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 a Serverless VPC Access connector to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a Serverless VPC Access connector 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. Name of a Serverless VPC Access connector 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/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php new file mode 100644 index 000000000000..e0e5f30df34b --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php @@ -0,0 +1,81 @@ +google.cloud.vpcaccess.v1.GetConnectorRequest + */ +class GetConnectorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a Serverless VPC Access connector to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of a Serverless VPC Access connector to get. Please see + * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\GetConnectorRequest + * + * @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 a Serverless VPC Access connector to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a Serverless VPC Access connector to get. + * + * 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 a Serverless VPC Access connector to get. + * + * 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/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php new file mode 100644 index 000000000000..c5aa13828211 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php @@ -0,0 +1,149 @@ +google.cloud.vpcaccess.v1.ListConnectorsRequest + */ +class ListConnectorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the routes should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Continuation token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the routes should be listed. Please see + * {@see VpcAccessServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VpcAccess\V1\ListConnectorsRequest + * + * @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 project and location from which the routes should be listed. + * @type int $page_size + * Maximum number of functions to return per call. + * @type string $page_token + * Continuation token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the routes should be listed. + * + * 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 and location from which the routes should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of functions to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of functions to return per call. + * + * 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; + } + + /** + * Continuation token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Continuation 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/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php new file mode 100644 index 000000000000..58ddaece4918 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php @@ -0,0 +1,101 @@ +google.cloud.vpcaccess.v1.ListConnectorsResponse + */ +class ListConnectorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of Serverless VPC Access connectors. + * + * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; + */ + private $connectors; + /** + * Continuation token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $connectors + * List of Serverless VPC Access connectors. + * @type string $next_page_token + * Continuation token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * List of Serverless VPC Access connectors. + * + * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectors() + { + return $this->connectors; + } + + /** + * List of Serverless VPC Access connectors. + * + * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; + * @param array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VpcAccess\V1\Connector::class); + $this->connectors = $arr; + + return $this; + } + + /** + * Continuation token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * 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; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php new file mode 100644 index 000000000000..45680ee1e154 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php @@ -0,0 +1,197 @@ +google.cloud.vpcaccess.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * + * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $method = ''; + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when the operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * + * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $target = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $method + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time when the operation completed. + * @type string $target + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * + * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Output only. Method that initiated the operation e.g. + * google.cloud.vpcaccess.v1.Connectors.CreateConnector. + * + * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * Output only. Time when the operation was 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. Time when the operation was 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. Time when the operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Time when the operation completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * + * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Name of the resource that this operation is acting on e.g. + * projects/my-project/locations/us-central1/connectors/v1. + * + * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php new file mode 100644 index 000000000000..5594e8562008 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vpcAccessServiceClient->createConnector($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Connector $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 = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $connectorId = '[CONNECTOR_ID]'; + + create_connector_sample($formattedParent, $connectorId); +} +// [END vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php new file mode 100644 index 000000000000..bddd6f649db3 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vpcAccessServiceClient->deleteConnector($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 = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + + delete_connector_sample($formattedName); +} +// [END vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php new file mode 100644 index 000000000000..7456e8311ff3 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Connector $response */ + $response = $vpcAccessServiceClient->getConnector($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 = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + + get_connector_sample($formattedName); +} +// [END vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php new file mode 100644 index 000000000000..5a3af4c6caa1 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vpcAccessServiceClient->listConnectors($request); + + /** @var Connector $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 = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_connectors_sample($formattedParent); +} +// [END vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php new file mode 100644 index 000000000000..0d93ad77f3b2 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/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 vpcaccess_v1_generated_VpcAccessService_ListLocations_sync] diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php new file mode 100644 index 000000000000..a0322361c9ec --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php @@ -0,0 +1,428 @@ + createConnectorAsync(CreateConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConnectorAsync(DeleteConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectorAsync(GetConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConnectorsAsync(ListConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class VpcAccessServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vpcaccess.v1.VpcAccessService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vpcaccess.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vpcaccess.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/vpc_access_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vpc_access_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vpc_access_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vpc_access_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 connector + * resource. + * + * @param string $project + * @param string $location + * @param string $connector + * + * @return string The formatted connector resource. + */ + public static function connectorName(string $project, string $location, string $connector): string + { + return self::getPathTemplate('connector')->render([ + 'project' => $project, + 'location' => $location, + 'connector' => $connector, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connector: projects/{project}/locations/{location}/connectors/{connector} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'vpcaccess.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a Serverless VPC Access connector, returns an operation. + * + * The async variant is {@see VpcAccessServiceClient::createConnectorAsync()} . + * + * @example samples/V1/VpcAccessServiceClient/create_connector.php + * + * @param CreateConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createConnector(CreateConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateConnector', $request, $callOptions)->wait(); + } + + /** + * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the + * resource does not exist. + * + * The async variant is {@see VpcAccessServiceClient::deleteConnectorAsync()} . + * + * @example samples/V1/VpcAccessServiceClient/delete_connector.php + * + * @param DeleteConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteConnector(DeleteConnectorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteConnector', $request, $callOptions)->wait(); + } + + /** + * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource + * does not exist. + * + * The async variant is {@see VpcAccessServiceClient::getConnectorAsync()} . + * + * @example samples/V1/VpcAccessServiceClient/get_connector.php + * + * @param GetConnectorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Connector + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnector(GetConnectorRequest $request, array $callOptions = []): Connector + { + return $this->startApiCall('GetConnector', $request, $callOptions)->wait(); + } + + /** + * Lists Serverless VPC Access connectors. + * + * The async variant is {@see VpcAccessServiceClient::listConnectorsAsync()} . + * + * @example samples/V1/VpcAccessServiceClient/list_connectors.php + * + * @param ListConnectorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listConnectors(ListConnectorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConnectors', $request, $callOptions); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see VpcAccessServiceClient::listLocationsAsync()} . + * + * @example samples/V1/VpcAccessServiceClient/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/VpcAccess/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VpcAccess/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..f11d5faee77d --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/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.cloud.vpcaccess.v1", + "libraryPackage": "Google\\Cloud\\VpcAccess\\V1", + "services": { + "VpcAccessService": { + "clients": { + "grpc": { + "libraryClient": "VpcAccessServiceGapicClient", + "rpcs": { + "CreateConnector": { + "methods": [ + "createConnector" + ] + }, + "DeleteConnector": { + "methods": [ + "deleteConnector" + ] + }, + "GetConnector": { + "methods": [ + "getConnector" + ] + }, + "ListConnectors": { + "methods": [ + "listConnectors" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json new file mode 100644 index 000000000000..d4f02ec4a931 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json @@ -0,0 +1,70 @@ +{ + "interfaces": { + "google.cloud.vpcaccess.v1.VpcAccessService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "UNKNOWN" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "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 + } + }, + "methods": { + "CreateConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetConnector": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListConnectors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_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/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php new file mode 100644 index 000000000000..e32b995f4bf2 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php @@ -0,0 +1,123 @@ + [ + 'google.cloud.vpcaccess.v1.VpcAccessService' => [ + 'CreateConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VpcAccess\V1\Connector', + 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConnector' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConnector' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VpcAccess\V1\Connector', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConnectors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VpcAccess\V1\ListConnectorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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' => [ + 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php new file mode 100644 index 000000000000..82cfdbb6b7cc --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php @@ -0,0 +1,114 @@ + [ + 'google.cloud.location.Locations' => [ + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vpcaccess.v1.VpcAccessService' => [ + 'CreateConnector' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', + 'body' => 'connector', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'connector_id', + ], + ], + 'DeleteConnector' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConnector' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php new file mode 100644 index 000000000000..50dc37221ff8 --- /dev/null +++ b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php @@ -0,0 +1,646 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VpcAccessServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VpcAccessServiceClient($options); + } + + /** @test */ + public function createConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $request = (new CreateConnectorRequest()) + ->setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + $response = $gapicClient->createConnector($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.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectorId(); + $this->assertProtobufEquals($connectorId, $actualValue); + $actualValue = $actualApiRequestObject->getConnector(); + $this->assertProtobufEquals($connector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + $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 createConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $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]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $request = (new CreateConnectorRequest()) + ->setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + $response = $gapicClient->createConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + 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 deleteConnectorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new DeleteConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnector($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.vpcaccess.v1.VpcAccessService/DeleteConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); + $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 deleteConnectorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectorTest'); + $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->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new DeleteConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnector($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); + 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 getConnectorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name2); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new GetConnectorRequest()) + ->setName($formattedName); + $response = $gapicClient->getConnector($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.vpcaccess.v1.VpcAccessService/GetConnector', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); + $request = (new GetConnectorRequest()) + ->setName($formattedName); + try { + $gapicClient->getConnector($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $connectorsElement = new Connector(); + $connectors = [ + $connectorsElement, + ]; + $expectedResponse = new ListConnectorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConnectors($connectors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConnectorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConnectors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConnectors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ListConnectorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConnectors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 createConnectorAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $network = 'network1843485230'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $minThroughput = 2064735799; + $maxThroughput = 1407819749; + $machineType = 'machineType1838323762'; + $minInstances = 1491624145; + $maxInstances = 330682013; + $expectedResponse = new Connector(); + $expectedResponse->setName($name); + $expectedResponse->setNetwork($network); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setMinThroughput($minThroughput); + $expectedResponse->setMaxThroughput($maxThroughput); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setMinInstances($minInstances); + $expectedResponse->setMaxInstances($maxInstances); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectorId = 'connectorId1928724045'; + $connector = new Connector(); + $request = (new CreateConnectorRequest()) + ->setParent($formattedParent) + ->setConnectorId($connectorId) + ->setConnector($connector); + $response = $gapicClient->createConnectorAsync($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.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectorId(); + $this->assertProtobufEquals($connectorId, $actualValue); + $actualValue = $actualApiRequestObject->getConnector(); + $this->assertProtobufEquals($connector, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectorTest'); + $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()); + } +} From 84457a3523357e1cb726bec79ee647d7f1ae0d30 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 5 Nov 2024 09:21:34 +0000 Subject: [PATCH 2/3] =?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 --- .../V1/Client/SqlBackupRunsServiceClient.php | 8 +- .../src/V1/Client/SqlConnectServiceClient.php | 4 +- .../V1/Client/SqlDatabasesServiceClient.php | 12 +- .../src/V1/Client/SqlFlagsServiceClient.php | 2 +- .../V1/Client/SqlInstancesServiceClient.php | 68 +- .../V1/Client/SqlOperationsServiceClient.php | 6 +- .../V1/Client/SqlSslCertsServiceClient.php | 8 +- .../src/V1/Client/SqlTiersServiceClient.php | 2 +- .../src/V1/Client/SqlUsersServiceClient.php | 10 +- .../src/V2/Client/StorageControlClient.php | 20 +- .../src/V1/Client/StorageInsightsClient.php | 18 +- .../Client/StorageTransferServiceClient.php | 28 +- .../V2/Client/CaseAttachmentServiceClient.php | 2 +- Support/src/V2/Client/CaseServiceClient.php | 16 +- .../src/V2/Client/CommentServiceClient.php | 4 +- Talent/src/V4/Client/CompanyServiceClient.php | 10 +- Talent/src/V4/Client/CompletionClient.php | 2 +- Talent/src/V4/Client/EventServiceClient.php | 2 +- Talent/src/V4/Client/JobServiceClient.php | 20 +- Talent/src/V4/Client/TenantServiceClient.php | 10 +- Tasks/src/V2/Client/CloudTasksClient.php | 36 +- .../src/V1/Client/TelcoAutomationClient.php | 76 +- .../src/V1/Client/TextToSpeechClient.php | 4 +- .../TextToSpeechLongAudioSynthesizeClient.php | 2 +- Tpu/src/V2/Client/TpuClient.php | 30 +- Trace/src/V2/Client/TraceServiceClient.php | 4 +- Translate/metadata/V3/AdaptiveMt.php | Bin 5571 -> 5617 bytes Translate/metadata/V3/TranslationService.php | Bin 20900 -> 20946 bytes .../GlossaryConfig.php | 38 + .../V3/Client/TranslationServiceClient.php | 76 +- .../src/V3/TranslateTextGlossaryConfig.php | 38 + .../Client/VideoIntelligenceServiceClient.php | 2 +- .../src/V1/Client/LivestreamServiceClient.php | 56 +- .../V1/Client/VideoStitcherServiceClient.php | 60 +- .../src/V1/Client/TranscoderServiceClient.php | 16 +- Vision/src/V1/Client/ImageAnnotatorClient.php | 8 +- Vision/src/V1/Client/ProductSearchClient.php | 38 +- .../src/V1/Client/VmMigrationClient.php | 96 +- .../src/V1/Client/VmwareEngineClient.php | 158 +- .../src/V1/Client/VpcAccessServiceClient.php | 10 +- .../V1/CloudSqlAvailableDatabaseVersions.php | 31 - .../Cloud/Sql/V1/CloudSqlBackupRuns.php | Bin 3592 -> 0 bytes .../Google/Cloud/Sql/V1/CloudSqlConnect.php | Bin 2697 -> 0 bytes .../Google/Cloud/Sql/V1/CloudSqlDatabases.php | 60 - .../Google/Cloud/Sql/V1/CloudSqlEvents.php | 31 - .../Google/Cloud/Sql/V1/CloudSqlFlags.php | Bin 1992 -> 0 bytes .../Cloud/Sql/V1/CloudSqlIamPolicies.php | 30 - .../Cloud/Sql/V1/CloudSqlInstanceNames.php | 31 - .../Google/Cloud/Sql/V1/CloudSqlInstances.php | Bin 22664 -> 0 bytes .../Cloud/Sql/V1/CloudSqlOperations.php | 52 - .../Google/Cloud/Sql/V1/CloudSqlRegions.php | 31 - .../Google/Cloud/Sql/V1/CloudSqlResources.php | Bin 16028 -> 0 bytes .../Google/Cloud/Sql/V1/CloudSqlSslCerts.php | 60 - .../Google/Cloud/Sql/V1/CloudSqlTiers.php | 43 - .../Google/Cloud/Sql/V1/CloudSqlUsers.php | Bin 3866 -> 0 bytes .../src/Google/Cloud/Sql/V1/AclEntry.php | 187 - .../Cloud/Sql/V1/AcquireSsrsLeaseContext.php | 217 - .../Cloud/Sql/V1/AdvancedMachineFeatures.php | 67 - .../src/Google/Cloud/Sql/V1/ApiWarning.php | 135 - .../Sql/V1/ApiWarning/SqlApiWarningCode.php | 80 - .../Cloud/Sql/V1/AvailableDatabaseVersion.php | 169 - .../Cloud/Sql/V1/BackupConfiguration.php | 598 -- .../TransactionalLogStorageState.php | 85 - .../src/Google/Cloud/Sql/V1/BackupContext.php | 101 - .../Cloud/Sql/V1/BackupReencryptionConfig.php | 121 - .../BackupReencryptionConfig/BackupType.php | 64 - .../Cloud/Sql/V1/BackupRetentionSettings.php | 151 - .../BackupRetentionSettings/RetentionUnit.php | 57 - .../src/Google/Cloud/Sql/V1/BackupRun.php | 777 -- .../Cloud/Sql/V1/BackupRunsListResponse.php | 139 - .../proto/src/Google/Cloud/Sql/V1/BakType.php | 66 - .../Google/Cloud/Sql/V1/BinLogCoordinates.php | 135 - .../src/Google/Cloud/Sql/V1/CloneContext.php | 383 - .../Google/Cloud/Sql/V1/ConnectSettings.php | 405 - .../Cloud/Sql/V1/ConnectSettings/CaMode.php | 65 - .../Google/Cloud/Sql/V1/DataCacheConfig.php | 67 - .../src/Google/Cloud/Sql/V1/Database.php | 354 - .../src/Google/Cloud/Sql/V1/DatabaseFlags.php | 125 - .../Google/Cloud/Sql/V1/DatabaseInstance.php | 2157 ----- .../DatabaseInstance/SqlFailoverReplica.php | 159 - .../V1/DatabaseInstance/SqlInstanceState.php | 100 - .../SqlNetworkArchitecture.php | 62 - .../DatabaseInstance/SqlOutOfDiskReport.php | 160 - .../SqlOutOfDiskReport/SqlOutOfDiskState.php | 65 - .../SqlScheduledMaintenance.php | 190 - .../Cloud/Sql/V1/DatabasesListResponse.php | 101 - .../src/Google/Cloud/Sql/V1/DemoteContext.php | 106 - .../Sql/V1/DemoteMasterConfiguration.php | 132 - .../Cloud/Sql/V1/DemoteMasterContext.php | 294 - .../DemoteMasterMySqlReplicaConfiguration.php | 245 - .../Cloud/Sql/V1/DenyMaintenancePeriod.php | 164 - .../Sql/V1/DiskEncryptionConfiguration.php | 101 - .../Cloud/Sql/V1/DiskEncryptionStatus.php | 101 - .../src/Google/Cloud/Sql/V1/ExportContext.php | 436 - .../V1/ExportContext/SqlBakExportOptions.php | 380 - .../V1/ExportContext/SqlCsvExportOptions.php | 216 - .../Sql/V1/ExportContext/SqlExportOptions.php | 370 - .../SqlExportOptions/MysqlExportOptions.php | 137 - .../PostgresExportOptions.php | 196 - .../Sql/V1/ExternalSyncParallelLevel.php | 68 - .../Google/Cloud/Sql/V1/FailoverContext.php | 105 - .../v1/proto/src/Google/Cloud/Sql/V1/Flag.php | 579 -- .../Google/Cloud/Sql/V1/FlagsListResponse.php | 101 - .../Cloud/Sql/V1/GeminiInstanceConfig.php | 297 - .../Sql/V1/GenerateEphemeralCertRequest.php | 261 - .../Sql/V1/GenerateEphemeralCertResponse.php | 77 - .../Sql/V1/GetConnectSettingsRequest.php | 149 - .../src/Google/Cloud/Sql/V1/ImportContext.php | 363 - .../V1/ImportContext/SqlBakImportOptions.php | 452 - .../SqlBakImportOptions/EncryptionOptions.php | 152 - .../V1/ImportContext/SqlCsvImportOptions.php | 254 - .../Sql/V1/ImportContext/SqlImportOptions.php | 220 - .../PostgresImportOptions.php | 188 - .../Google/Cloud/Sql/V1/InsightsConfig.php | 306 - .../Google/Cloud/Sql/V1/InstanceReference.php | 143 - .../V1/InstancesAcquireSsrsLeaseRequest.php | 77 - .../Cloud/Sql/V1/InstancesCloneRequest.php | 77 - .../Sql/V1/InstancesDemoteMasterRequest.php | 77 - .../Cloud/Sql/V1/InstancesDemoteRequest.php | 78 - .../Cloud/Sql/V1/InstancesExportRequest.php | 77 - .../Cloud/Sql/V1/InstancesFailoverRequest.php | 77 - .../Cloud/Sql/V1/InstancesImportRequest.php | 77 - .../Cloud/Sql/V1/InstancesListResponse.php | 173 - .../Sql/V1/InstancesListServerCasResponse.php | 128 - .../Sql/V1/InstancesReencryptRequest.php | 77 - .../Sql/V1/InstancesRestoreBackupRequest.php | 77 - .../Sql/V1/InstancesRotateServerCaRequest.php | 77 - .../Sql/V1/InstancesTruncateLogRequest.php | 77 - .../Google/Cloud/Sql/V1/IpConfiguration.php | 618 -- .../Cloud/Sql/V1/IpConfiguration/CaMode.php | 65 - .../Cloud/Sql/V1/IpConfiguration/SslMode.php | 90 - .../src/Google/Cloud/Sql/V1/IpMapping.php | 169 - .../Cloud/Sql/V1/LocationPreference.php | 193 - .../Google/Cloud/Sql/V1/MaintenanceWindow.php | 264 - .../Sql/V1/MySqlReplicaConfiguration.php | 548 -- .../Google/Cloud/Sql/V1/MySqlSyncConfig.php | 67 - .../Cloud/Sql/V1/OnPremisesConfiguration.php | 353 - .../src/Google/Cloud/Sql/V1/Operation.php | 814 -- .../Sql/V1/Operation/SqlOperationStatus.php | 71 - .../Sql/V1/Operation/SqlOperationType.php | 379 - .../Google/Cloud/Sql/V1/OperationError.php | 135 - .../Google/Cloud/Sql/V1/OperationErrors.php | 101 - .../Cloud/Sql/V1/OperationsListResponse.php | 139 - .../Google/Cloud/Sql/V1/PasswordStatus.php | 111 - .../Cloud/Sql/V1/PasswordValidationPolicy.php | 484 - .../PasswordValidationPolicy/Complexity.php | 58 - .../Cloud/Sql/V1/PerformDiskShrinkContext.php | 67 - .../src/Google/Cloud/Sql/V1/PscConfig.php | 127 - .../Cloud/Sql/V1/ReplicaConfiguration.php | 309 - .../Cloud/Sql/V1/ReplicationCluster.php | 186 - .../Cloud/Sql/V1/RestoreBackupContext.php | 170 - .../Cloud/Sql/V1/RotateServerCaContext.php | 105 - .../src/Google/Cloud/Sql/V1/Settings.php | 1856 ---- .../Sql/V1/Settings/ConnectorEnforcement.php | 66 - .../Google/Cloud/Sql/V1/Settings/Edition.php | 64 - .../Sql/V1/Settings/SqlActivationPolicy.php | 71 - .../Cloud/Sql/V1/SqlActiveDirectoryConfig.php | 101 - .../Cloud/Sql/V1/SqlAvailabilityType.php | 61 - .../Google/Cloud/Sql/V1/SqlBackendType.php | 66 - .../src/Google/Cloud/Sql/V1/SqlBackupKind.php | 61 - .../Cloud/Sql/V1/SqlBackupRunStatus.php | 113 - .../Google/Cloud/Sql/V1/SqlBackupRunType.php | 61 - .../Sql/V1/SqlBackupRunsDeleteRequest.php | 143 - .../Cloud/Sql/V1/SqlBackupRunsGetRequest.php | 135 - .../Sql/V1/SqlBackupRunsInsertRequest.php | 138 - .../Cloud/Sql/V1/SqlBackupRunsListRequest.php | 177 - .../Google/Cloud/Sql/V1/SqlDataDiskType.php | 69 - .../Cloud/Sql/V1/SqlDatabaseVersion.php | 348 - .../Sql/V1/SqlDatabasesDeleteRequest.php | 135 - .../Cloud/Sql/V1/SqlDatabasesGetRequest.php | 135 - .../Sql/V1/SqlDatabasesInsertRequest.php | 138 - .../Cloud/Sql/V1/SqlDatabasesListRequest.php | 101 - .../Sql/V1/SqlDatabasesUpdateRequest.php | 172 - .../Sql/V1/SqlExternalSyncSettingError.php | 139 - .../SqlExternalSyncSettingErrorType.php | 402 - .../src/Google/Cloud/Sql/V1/SqlFileType.php | 64 - .../src/Google/Cloud/Sql/V1/SqlFlagType.php | 95 - .../Cloud/Sql/V1/SqlFlagsListRequest.php | 71 - .../Google/Cloud/Sql/V1/SqlInstanceType.php | 68 - .../SqlInstancesAcquireSsrsLeaseRequest.php | 161 - .../SqlInstancesAcquireSsrsLeaseResponse.php | 67 - .../Sql/V1/SqlInstancesAddServerCaRequest.php | 101 - .../Cloud/Sql/V1/SqlInstancesCloneRequest.php | 142 - ...SqlInstancesCreateEphemeralCertRequest.php | 138 - .../Sql/V1/SqlInstancesDeleteRequest.php | 101 - .../V1/SqlInstancesDemoteMasterRequest.php | 138 - .../Sql/V1/SqlInstancesDemoteRequest.php | 145 - .../Sql/V1/SqlInstancesExportRequest.php | 138 - .../Sql/V1/SqlInstancesFailoverRequest.php | 138 - ...SqlInstancesGetDiskShrinkConfigRequest.php | 101 - ...qlInstancesGetDiskShrinkConfigResponse.php | 135 - ...lInstancesGetLatestRecoveryTimeRequest.php | 101 - ...InstancesGetLatestRecoveryTimeResponse.php | 111 - .../Cloud/Sql/V1/SqlInstancesGetRequest.php | 101 - .../Sql/V1/SqlInstancesImportRequest.php | 138 - .../Sql/V1/SqlInstancesInsertRequest.php | 108 - .../Cloud/Sql/V1/SqlInstancesListRequest.php | 213 - .../V1/SqlInstancesListServerCasRequest.php | 101 - .../Cloud/Sql/V1/SqlInstancesPatchRequest.php | 138 - .../SqlInstancesPerformDiskShrinkRequest.php | 145 - .../V1/SqlInstancesPromoteReplicaRequest.php | 159 - .../Sql/V1/SqlInstancesReencryptRequest.php | 145 - .../SqlInstancesReleaseSsrsLeaseRequest.php | 113 - .../SqlInstancesReleaseSsrsLeaseResponse.php | 67 - ...lInstancesRescheduleMaintenanceRequest.php | 138 - ...tancesRescheduleMaintenanceRequestBody.php | 77 - .../Reschedule.php | 124 - .../RescheduleType.php | 68 - .../SqlInstancesResetReplicaSizeRequest.php | 101 - .../V1/SqlInstancesResetSslConfigRequest.php | 101 - .../Sql/V1/SqlInstancesRestartRequest.php | 101 - .../V1/SqlInstancesRestoreBackupRequest.php | 138 - .../V1/SqlInstancesRotateServerCaRequest.php | 138 - .../SqlInstancesStartExternalSyncRequest.php | 291 - .../V1/SqlInstancesStartReplicaRequest.php | 101 - .../Sql/V1/SqlInstancesStopReplicaRequest.php | 101 - .../Sql/V1/SqlInstancesSwitchoverRequest.php | 153 - .../Sql/V1/SqlInstancesTruncateLogRequest.php | 138 - .../Sql/V1/SqlInstancesUpdateRequest.php | 138 - ...ancesVerifyExternalSyncSettingsRequest.php | 325 - .../ExternalSyncMode.php | 64 - .../MigrationType.php | 65 - ...ncesVerifyExternalSyncSettingsResponse.php | 135 - .../Google/Cloud/Sql/V1/SqlIpAddressType.php | 83 - .../Sql/V1/SqlOperationsCancelRequest.php | 101 - .../Cloud/Sql/V1/SqlOperationsGetRequest.php | 101 - .../Cloud/Sql/V1/SqlOperationsListRequest.php | 173 - .../Google/Cloud/Sql/V1/SqlPricingPlan.php | 61 - .../Cloud/Sql/V1/SqlReplicationType.php | 63 - .../Cloud/Sql/V1/SqlServerAuditConfig.php | 189 - .../Cloud/Sql/V1/SqlServerDatabaseDetails.php | 101 - .../Cloud/Sql/V1/SqlServerUserDetails.php | 101 - .../Cloud/Sql/V1/SqlSslCertsDeleteRequest.php | 133 - .../Cloud/Sql/V1/SqlSslCertsGetRequest.php | 133 - .../Cloud/Sql/V1/SqlSslCertsInsertRequest.php | 136 - .../Cloud/Sql/V1/SqlSslCertsListRequest.php | 99 - .../Cloud/Sql/V1/SqlSuspensionReason.php | 78 - .../Cloud/Sql/V1/SqlTiersListRequest.php | 67 - .../Google/Cloud/Sql/V1/SqlUpdateTrack.php | 74 - .../Cloud/Sql/V1/SqlUsersDeleteRequest.php | 167 - .../Cloud/Sql/V1/SqlUsersGetRequest.php | 169 - .../Cloud/Sql/V1/SqlUsersInsertRequest.php | 136 - .../Cloud/Sql/V1/SqlUsersListRequest.php | 99 - .../Cloud/Sql/V1/SqlUsersUpdateRequest.php | 204 - .../proto/src/Google/Cloud/Sql/V1/SslCert.php | 375 - .../src/Google/Cloud/Sql/V1/SslCertDetail.php | 115 - .../Sql/V1/SslCertsCreateEphemeralRequest.php | 101 - .../Cloud/Sql/V1/SslCertsInsertRequest.php | 71 - .../Cloud/Sql/V1/SslCertsInsertResponse.php | 207 - .../Cloud/Sql/V1/SslCertsListResponse.php | 101 - .../src/Google/Cloud/Sql/V1/SyncFlags.php | 106 - .../v1/proto/src/Google/Cloud/Sql/V1/Tier.php | 207 - .../Google/Cloud/Sql/V1/TiersListResponse.php | 101 - .../Cloud/Sql/V1/TruncateLogContext.php | 105 - .../v1/proto/src/Google/Cloud/Sql/V1/User.php | 474 - .../Cloud/Sql/V1/User/DualPasswordType.php | 71 - .../Google/Cloud/Sql/V1/User/SqlUserType.php | 85 - .../Sql/V1/UserPasswordValidationPolicy.php | 227 - .../Google/Cloud/Sql/V1/UsersListResponse.php | 140 - .../V1/SqlBackupRunsServiceClient/delete.php | 57 - .../V1/SqlBackupRunsServiceClient/get.php | 57 - .../V1/SqlBackupRunsServiceClient/insert.php | 57 - .../V1/SqlBackupRunsServiceClient/list.php | 59 - .../generate_ephemeral_cert.php | 60 - .../get_connect_settings.php | 57 - .../V1/SqlDatabasesServiceClient/delete.php | 57 - .../V1/SqlDatabasesServiceClient/get.php | 58 - .../V1/SqlDatabasesServiceClient/insert.php | 60 - .../V1/SqlDatabasesServiceClient/list.php | 57 - .../V1/SqlDatabasesServiceClient/patch.php | 58 - .../V1/SqlDatabasesServiceClient/update.php | 58 - .../samples/V1/SqlFlagsServiceClient/list.php | 57 - .../acquire_ssrs_lease.php | 80 - .../add_server_ca.php | 63 - .../V1/SqlInstancesServiceClient/clone.php | 58 - .../create_ephemeral.php | 60 - .../V1/SqlInstancesServiceClient/delete.php | 57 - .../V1/SqlInstancesServiceClient/demote.php | 87 - .../demote_master.php | 58 - .../V1/SqlInstancesServiceClient/export.php | 58 - .../V1/SqlInstancesServiceClient/failover.php | 64 - .../V1/SqlInstancesServiceClient/get.php | 57 - .../get_disk_shrink_config.php | 57 - .../get_latest_recovery_time.php | 57 - .../V1/SqlInstancesServiceClient/import.php | 58 - .../V1/SqlInstancesServiceClient/insert.php | 57 - .../V1/SqlInstancesServiceClient/list.php | 57 - .../list_server_cas.php | 61 - .../V1/SqlInstancesServiceClient/patch.php | 58 - .../perform_disk_shrink.php | 57 - .../promote_replica.php | 59 - .../SqlInstancesServiceClient/reencrypt.php | 57 - .../release_ssrs_lease.php | 76 - .../reschedule_maintenance.php | 57 - .../reset_replica_size.php | 57 - .../reset_ssl_config.php | 58 - .../V1/SqlInstancesServiceClient/restart.php | 57 - .../restore_backup.php | 58 - .../rotate_server_ca.php | 60 - .../start_external_sync.php | 57 - .../start_replica.php | 57 - .../stop_replica.php | 57 - .../SqlInstancesServiceClient/switchover.php | 58 - .../truncate_log.php | 58 - .../V1/SqlInstancesServiceClient/update.php | 58 - .../verify_external_sync_settings.php | 57 - .../V1/SqlOperationsServiceClient/cancel.php | 55 - .../V1/SqlOperationsServiceClient/get.php | 57 - .../V1/SqlOperationsServiceClient/list.php | 58 - .../V1/SqlSslCertsServiceClient/delete.php | 58 - .../V1/SqlSslCertsServiceClient/get.php | 59 - .../V1/SqlSslCertsServiceClient/insert.php | 59 - .../V1/SqlSslCertsServiceClient/list.php | 57 - .../samples/V1/SqlTiersServiceClient/list.php | 59 - .../V1/SqlUsersServiceClient/delete.php | 57 - .../samples/V1/SqlUsersServiceClient/get.php | 57 - .../V1/SqlUsersServiceClient/insert.php | 57 - .../samples/V1/SqlUsersServiceClient/list.php | 57 - .../V1/SqlUsersServiceClient/update.php | 57 - ...AvailableDatabaseVersionsServiceClient.php | 144 - .../V1/Client/SqlBackupRunsServiceClient.php | 278 - .../src/V1/Client/SqlConnectServiceClient.php | 223 - .../V1/Client/SqlDatabasesServiceClient.php | 337 - .../src/V1/Client/SqlEventsServiceClient.php | 144 - .../src/V1/Client/SqlFlagsServiceClient.php | 190 - .../V1/Client/SqlIamPoliciesServiceClient.php | 143 - .../Client/SqlInstanceNamesServiceClient.php | 143 - .../V1/Client/SqlInstancesServiceClient.php | 1165 --- .../V1/Client/SqlOperationsServiceClient.php | 246 - .../src/V1/Client/SqlRegionsServiceClient.php | 144 - .../V1/Client/SqlSslCertsServiceClient.php | 282 - .../src/V1/Client/SqlTiersServiceClient.php | 192 - .../src/V1/Client/SqlUsersServiceClient.php | 304 - .../SqlAdmin/v1/src/V1/gapic_metadata.json | 425 - ...tabase_versions_service_client_config.json | 31 - ...ase_versions_service_descriptor_config.php | 27 - ...se_versions_service_rest_client_config.php | 26 - ...sql_backup_runs_service_client_config.json | 52 - ..._backup_runs_service_descriptor_config.php | 112 - ...backup_runs_service_rest_client_config.php | 104 - .../sql_connect_service_client_config.json | 32 - .../sql_connect_service_descriptor_config.php | 64 - ...sql_connect_service_rest_client_config.php | 62 - .../sql_databases_service_client_config.json | 62 - ...ql_databases_service_descriptor_config.php | 160 - ...l_databases_service_rest_client_config.php | 148 - .../sql_events_service_client_config.json | 31 - .../sql_events_service_descriptor_config.php | 27 - .../sql_events_service_rest_client_config.php | 26 - .../sql_flags_service_client_config.json | 37 - .../sql_flags_service_descriptor_config.php | 32 - .../sql_flags_service_rest_client_config.php | 33 - ...ql_iam_policies_service_client_config.json | 21 - ...iam_policies_service_descriptor_config.php | 27 - ...am_policies_service_rest_client_config.php | 26 - ..._instance_names_service_client_config.json | 21 - ...stance_names_service_descriptor_config.php | 27 - ...tance_names_service_rest_client_config.php | 26 - .../sql_instances_service_client_config.json | 202 - ...ql_instances_service_descriptor_config.php | 628 -- ...l_instances_service_rest_client_config.php | 583 -- .../sql_operations_service_client_config.json | 47 - ...l_operations_service_descriptor_config.php | 76 - ..._operations_service_rest_client_config.php | 72 - .../sql_regions_service_client_config.json | 21 - .../sql_regions_service_descriptor_config.php | 27 - ...sql_regions_service_rest_client_config.php | 26 - .../sql_ssl_certs_service_client_config.json | 52 - ...ql_ssl_certs_service_descriptor_config.php | 112 - ...l_ssl_certs_service_rest_client_config.php | 104 - .../sql_tiers_service_client_config.json | 37 - .../sql_tiers_service_descriptor_config.php | 40 - .../sql_tiers_service_rest_client_config.php | 40 - .../sql_users_service_client_config.json | 57 - .../sql_users_service_descriptor_config.php | 124 - .../sql_users_service_rest_client_config.php | 116 - ...lableDatabaseVersionsServiceClientTest.php | 56 - .../Client/SqlBackupRunsServiceClientTest.php | 367 - .../V1/Client/SqlConnectServiceClientTest.php | 202 - .../Client/SqlDatabasesServiceClientTest.php | 502 - .../V1/Client/SqlEventsServiceClientTest.php | 56 - .../V1/Client/SqlFlagsServiceClientTest.php | 142 - .../SqlIamPoliciesServiceClientTest.php | 56 - .../SqlInstanceNamesServiceClientTest.php | 56 - .../Client/SqlInstancesServiceClientTest.php | 2466 ----- .../Client/SqlOperationsServiceClientTest.php | 266 - .../V1/Client/SqlRegionsServiceClientTest.php | 56 - .../Client/SqlSslCertsServiceClientTest.php | 352 - .../V1/Client/SqlTiersServiceClientTest.php | 142 - .../V1/Client/SqlUsersServiceClientTest.php | 434 - .../Storage/Control/V2/StorageControl.php | Bin 7876 -> 0 bytes .../V2/CommonLongRunningOperationMetadata.php | 273 - .../Control/V2/CreateFolderRequest.php | 280 - .../Control/V2/CreateManagedFolderRequest.php | 221 - .../Control/V2/DeleteFolderRequest.php | 221 - .../Control/V2/DeleteManagedFolderRequest.php | 271 - .../Cloud/Storage/Control/V2/Folder.php | 258 - .../Storage/Control/V2/GetFolderRequest.php | 221 - .../Control/V2/GetManagedFolderRequest.php | 225 - .../Control/V2/GetStorageLayoutRequest.php | 162 - .../Storage/Control/V2/ListFoldersRequest.php | 373 - .../Control/V2/ListFoldersResponse.php | 105 - .../Control/V2/ListManagedFoldersRequest.php | 233 - .../Control/V2/ListManagedFoldersResponse.php | 105 - .../Storage/Control/V2/ManagedFolder.php | 205 - .../Storage/Control/V2/PendingRenameInfo.php | 67 - .../Control/V2/RenameFolderMetadata.php | 146 - .../Control/V2/RenameFolderRequest.php | 261 - .../Storage/Control/V2/StorageLayout.php | 239 - .../StorageLayout/CustomPlacementConfig.php | 72 - .../StorageLayout/HierarchicalNamespace.php | 70 - .../V2/StorageControlClient/create_folder.php | 82 - .../create_managed_folder.php | 77 - .../V2/StorageControlClient/delete_folder.php | 71 - .../delete_managed_folder.php | 75 - .../V2/StorageControlClient/get_folder.php | 73 - .../get_managed_folder.php | 77 - .../get_storage_layout.php | 72 - .../V2/StorageControlClient/list_folders.php | 78 - .../list_managed_folders.php | 76 - .../V2/StorageControlClient/rename_folder.php | 90 - .../v2/src/V2/Client/StorageControlClient.php | 612 -- .../v2/src/V2/gapic_metadata.json | 68 - .../storage_control_client_config.json | 98 - .../storage_control_descriptor_config.php | 222 - .../V2/Client/StorageControlClientTest.php | 872 -- .../Storageinsights/V1/Storageinsights.php | Bin 7019 -> 0 bytes .../Cloud/StorageInsights/V1/CSVOptions.php | 135 - .../V1/CloudStorageDestinationOptions.php | 106 - .../V1/CloudStorageFilters.php | 68 - .../V1/CreateReportConfigRequest.php | 201 - .../V1/DeleteReportConfigRequest.php | 189 - .../StorageInsights/V1/FrequencyOptions.php | 164 - .../V1/FrequencyOptions/Frequency.php | 64 - .../V1/GetReportConfigRequest.php | 81 - .../V1/GetReportDetailRequest.php | 81 - .../V1/ListReportConfigsRequest.php | 221 - .../V1/ListReportConfigsResponse.php | 135 - .../V1/ListReportDetailsRequest.php | 221 - .../V1/ListReportDetailsResponse.php | 135 - .../V1/ObjectMetadataReportOptions.php | 152 - .../StorageInsights/V1/OperationMetadata.php | 307 - .../StorageInsights/V1/ParquetOptions.php | 33 - .../Cloud/StorageInsights/V1/ReportConfig.php | 397 - .../Cloud/StorageInsights/V1/ReportDetail.php | 383 - .../V1/ReportDetail/Metrics.php | 70 - .../V1/UpdateReportConfigRequest.php | 230 - .../create_report_config.php | 73 - .../delete_report_config.php | 73 - .../V1/StorageInsightsClient/get_location.php | 57 - .../get_report_config.php | 75 - .../get_report_detail.php | 76 - .../StorageInsightsClient/list_locations.php | 62 - .../list_report_configs.php | 76 - .../list_report_details.php | 80 - .../update_report_config.php | 62 - .../src/V1/Client/StorageInsightsClient.php | 504 - .../v1/src/V1/gapic_metadata.json | 63 - .../storage_insights_client_config.json | 89 - .../storage_insights_descriptor_config.php | 168 - .../storage_insights_rest_client_config.php | 183 - .../V1/Client/StorageInsightsClientTest.php | 719 -- .../Google/Storagetransfer/V1/Transfer.php | 112 - .../Storagetransfer/V1/TransferTypes.php | Bin 10789 -> 0 bytes .../Cloud/StorageTransfer/V1/AgentPool.php | 187 - .../V1/AgentPool/BandwidthLimit.php | 74 - .../StorageTransfer/V1/AgentPool/State.php | 74 - .../Cloud/StorageTransfer/V1/AwsAccessKey.php | 109 - .../V1/AwsS3CompatibleData.php | 227 - .../Cloud/StorageTransfer/V1/AwsS3Data.php | 445 - .../V1/AzureBlobStorageData.php | 291 - .../StorageTransfer/V1/AzureCredentials.php | 85 - .../V1/CreateAgentPoolRequest.php | 215 - .../V1/CreateTransferJobRequest.php | 77 - .../V1/DeleteAgentPoolRequest.php | 80 - .../V1/DeleteTransferJobRequest.php | 105 - .../StorageTransfer/V1/ErrorLogEntry.php | 105 - .../Cloud/StorageTransfer/V1/ErrorSummary.php | 144 - .../Cloud/StorageTransfer/V1/EventStream.php | 188 - .../Cloud/StorageTransfer/V1/GcsData.php | 198 - .../V1/GetAgentPoolRequest.php | 80 - .../V1/GetGoogleServiceAccountRequest.php | 71 - .../V1/GetTransferJobRequest.php | 105 - .../V1/GoogleServiceAccount.php | 101 - .../Cloud/StorageTransfer/V1/HdfsData.php | 70 - .../Cloud/StorageTransfer/V1/HttpData.php | 103 - .../V1/ListAgentPoolsRequest.php | 202 - .../V1/ListAgentPoolsResponse.php | 101 - .../V1/ListTransferJobsRequest.php | 176 - .../V1/ListTransferJobsResponse.php | 101 - .../StorageTransfer/V1/LoggingConfig.php | 159 - .../V1/LoggingConfig/LoggableAction.php | 71 - .../V1/LoggingConfig/LoggableActionState.php | 66 - .../StorageTransfer/V1/MetadataOptions.php | 427 - .../V1/MetadataOptions/Acl.php | 68 - .../V1/MetadataOptions/GID.php | 64 - .../V1/MetadataOptions/KmsKey.php | 66 - .../V1/MetadataOptions/Mode.php | 64 - .../V1/MetadataOptions/StorageClass.php | 95 - .../V1/MetadataOptions/Symlink.php | 64 - .../V1/MetadataOptions/TemporaryHold.php | 64 - .../V1/MetadataOptions/TimeCreated.php | 68 - .../V1/MetadataOptions/UID.php | 64 - .../StorageTransfer/V1/NotificationConfig.php | 170 - .../V1/NotificationConfig/EventType.php | 78 - .../V1/NotificationConfig/PayloadFormat.php | 66 - .../StorageTransfer/V1/ObjectConditions.php | 560 -- .../V1/PauseTransferOperationRequest.php | 67 - .../StorageTransfer/V1/PosixFilesystem.php | 67 - .../V1/ResumeTransferOperationRequest.php | 67 - .../V1/RunTransferJobRequest.php | 105 - .../V1/S3CompatibleMetadata.php | 194 - .../V1/S3CompatibleMetadata/AuthMethod.php | 64 - .../V1/S3CompatibleMetadata/ListApi.php | 64 - .../S3CompatibleMetadata/NetworkProtocol.php | 66 - .../V1/S3CompatibleMetadata/RequestModel.php | 66 - .../Cloud/StorageTransfer/V1/Schedule.php | 441 - .../StorageTransfer/V1/TransferCounters.php | 815 -- .../Cloud/StorageTransfer/V1/TransferJob.php | 680 -- .../StorageTransfer/V1/TransferJob/Status.php | 74 - .../StorageTransfer/V1/TransferManifest.php | 79 - .../StorageTransfer/V1/TransferOperation.php | 467 - .../V1/TransferOperation/Status.php | 99 - .../StorageTransfer/V1/TransferOptions.php | 261 - .../V1/TransferOptions/OverwriteWhen.php | 75 - .../Cloud/StorageTransfer/V1/TransferSpec.php | 642 -- .../V1/UpdateAgentPoolRequest.php | 196 - .../V1/UpdateTransferJobRequest.php | 277 - .../create_agent_pool.php | 96 - .../create_transfer_job.php | 59 - .../delete_agent_pool.php | 68 - .../delete_transfer_job.php | 73 - .../get_agent_pool.php | 70 - .../get_google_service_account.php | 78 - .../get_transfer_job.php | 74 - .../list_agent_pools.php | 75 - .../list_transfer_jobs.php | 86 - .../pause_transfer_operation.php | 68 - .../resume_transfer_operation.php | 68 - .../run_transfer_job.php | 86 - .../update_agent_pool.php | 74 - .../update_transfer_job.php | 83 - .../Client/StorageTransferServiceClient.php | 684 -- .../v1/src/V1/gapic_metadata.json | 88 - ...torage_transfer_service_client_config.json | 114 - ...age_transfer_service_descriptor_config.php | 207 - ...ge_transfer_service_rest_client_config.php | 225 - .../StorageTransferServiceClientTest.php | 1158 --- .../Google/Cloud/Support/V2/Actor.php | 33 - .../Google/Cloud/Support/V2/Attachment.php | 41 - .../Cloud/Support/V2/AttachmentService.php | 43 - .../Google/Cloud/Support/V2/CaseService.php | 88 - .../Google/Cloud/Support/V2/Comment.php | 38 - .../Cloud/Support/V2/CommentService.php | 49 - .../Google/Cloud/Support/V2/Escalation.php | Bin 1081 -> 0 bytes .../Google/Cloud/Support/V2/PBCase.php | Bin 2049 -> 0 bytes .../src/Google/Cloud/Support/V2/Actor.php | 164 - .../Google/Cloud/Support/V2/Attachment.php | 261 - .../Cloud/Support/V2/CaseClassification.php | 109 - .../Cloud/Support/V2/CloseCaseRequest.php | 67 - .../src/Google/Cloud/Support/V2/Comment.php | 231 - .../Cloud/Support/V2/CreateCaseRequest.php | 132 - .../Cloud/Support/V2/CreateCommentRequest.php | 127 - .../Cloud/Support/V2/EscalateCaseRequest.php | 111 - .../Google/Cloud/Support/V2/Escalation.php | 105 - .../Cloud/Support/V2/Escalation/Reason.php | 72 - .../Cloud/Support/V2/GetCaseRequest.php | 81 - .../Support/V2/ListAttachmentsRequest.php | 166 - .../Support/V2/ListAttachmentsResponse.php | 109 - .../Cloud/Support/V2/ListCasesRequest.php | 235 - .../Cloud/Support/V2/ListCasesResponse.php | 113 - .../Cloud/Support/V2/ListCommentsRequest.php | 158 - .../Cloud/Support/V2/ListCommentsResponse.php | 109 - .../src/Google/Cloud/Support/V2/PBCase.php | 635 -- .../Cloud/Support/V2/PBCase/Priority.php | 88 - .../Google/Cloud/Support/V2/PBCase/State.php | 89 - .../V2/SearchCaseClassificationsRequest.php | 147 - .../V2/SearchCaseClassificationsResponse.php | 109 - .../Cloud/Support/V2/SearchCasesRequest.php | 285 - .../Cloud/Support/V2/SearchCasesResponse.php | 113 - .../Cloud/Support/V2/UpdateCaseRequest.php | 172 - .../list_attachments.php | 77 - .../V2/CaseServiceClient/close_case.php | 71 - .../V2/CaseServiceClient/create_case.php | 76 - .../V2/CaseServiceClient/escalate_case.php | 77 - .../samples/V2/CaseServiceClient/get_case.php | 71 - .../V2/CaseServiceClient/list_cases.php | 81 - .../search_case_classifications.php | 65 - .../V2/CaseServiceClient/search_cases.php | 62 - .../V2/CaseServiceClient/update_case.php | 59 - .../CommentServiceClient/create_comment.php | 74 - .../V2/CommentServiceClient/list_comments.php | 77 - .../V2/Client/CaseAttachmentServiceClient.php | 274 - .../v2/src/V2/Client/CaseServiceClient.php | 519 - .../v2/src/V2/Client/CommentServiceClient.php | 363 - .../Support/v2/src/V2/gapic_metadata.json | 91 - ...case_attachment_service_client_config.json | 39 - ...e_attachment_service_descriptor_config.php | 53 - ..._attachment_service_rest_client_config.php | 46 - .../resources/case_service_client_config.json | 84 - .../case_service_descriptor_config.php | 148 - .../case_service_rest_client_config.php | 161 - .../comment_service_client_config.json | 54 - .../comment_service_descriptor_config.php | 68 - .../comment_service_rest_client_config.php | 65 - .../CaseAttachmentServiceClientTest.php | 172 - .../Unit/V2/Client/CaseServiceClientTest.php | 712 -- .../V2/Client/CommentServiceClientTest.php | 247 - .../Google/Cloud/Talent/V4/Common.php | Bin 6223 -> 0 bytes .../Google/Cloud/Talent/V4/Company.php | 48 - .../Google/Cloud/Talent/V4/CompanyService.php | 66 - .../Cloud/Talent/V4/CompletionService.php | Bin 2293 -> 0 bytes .../Google/Cloud/Talent/V4/Event.php | Bin 1539 -> 0 bytes .../Google/Cloud/Talent/V4/EventService.php | 38 - .../Google/Cloud/Talent/V4/Filters.php | Bin 3009 -> 0 bytes .../Google/Cloud/Talent/V4/Histogram.php | 35 - .../Google/Cloud/Talent/V4/Job.php | 81 - .../Google/Cloud/Talent/V4/JobService.php | Bin 7638 -> 0 bytes .../Google/Cloud/Talent/V4/Tenant.php | 33 - .../Google/Cloud/Talent/V4/TenantService.php | 64 - .../Talent/V4/BatchCreateJobsRequest.php | 133 - .../Talent/V4/BatchCreateJobsResponse.php | 75 - .../Talent/V4/BatchDeleteJobsRequest.php | 151 - .../Talent/V4/BatchDeleteJobsResponse.php | 75 - .../Talent/V4/BatchOperationMetadata.php | 353 - .../V4/BatchOperationMetadata/State.php | 96 - .../Talent/V4/BatchUpdateJobsRequest.php | 225 - .../Talent/V4/BatchUpdateJobsResponse.php | 75 - .../Google/Cloud/Talent/V4/ClientEvent.php | 240 - .../Google/Cloud/Talent/V4/CommuteFilter.php | 294 - .../Talent/V4/CommuteFilter/RoadTraffic.php | 64 - .../Google/Cloud/Talent/V4/CommuteMethod.php | 85 - .../src/Google/Cloud/Talent/V4/Company.php | 616 -- .../Cloud/Talent/V4/Company/DerivedInfo.php | 88 - .../Google/Cloud/Talent/V4/CompanySize.php | 96 - .../Cloud/Talent/V4/CompensationFilter.php | 187 - .../V4/CompensationFilter/FilterType.php | 101 - .../Cloud/Talent/V4/CompensationInfo.php | 223 - .../V4/CompensationInfo/CompensationEntry.php | 376 - .../V4/CompensationInfo/CompensationRange.php | 144 - .../V4/CompensationInfo/CompensationType.php | 132 - .../V4/CompensationInfo/CompensationUnit.php | 99 - .../Cloud/Talent/V4/CompleteQueryRequest.php | 323 - .../CompleteQueryRequest/CompletionScope.php | 69 - .../CompleteQueryRequest/CompletionType.php | 88 - .../Cloud/Talent/V4/CompleteQueryResponse.php | 115 - .../CompletionResult.php | 142 - .../Talent/V4/CreateClientEventRequest.php | 143 - .../Cloud/Talent/V4/CreateCompanyRequest.php | 138 - .../Cloud/Talent/V4/CreateJobRequest.php | 138 - .../Cloud/Talent/V4/CreateTenantRequest.php | 138 - .../Cloud/Talent/V4/CustomAttribute.php | 269 - .../src/Google/Cloud/Talent/V4/DegreeType.php | 128 - .../Cloud/Talent/V4/DeleteCompanyRequest.php | 97 - .../Cloud/Talent/V4/DeleteJobRequest.php | 97 - .../Cloud/Talent/V4/DeleteTenantRequest.php | 92 - .../src/Google/Cloud/Talent/V4/DeviceInfo.php | 107 - .../Cloud/Talent/V4/DeviceInfo/DeviceType.php | 95 - .../Google/Cloud/Talent/V4/EmploymentType.php | 131 - .../Cloud/Talent/V4/GetCompanyRequest.php | 97 - .../Google/Cloud/Talent/V4/GetJobRequest.php | 97 - .../Cloud/Talent/V4/GetTenantRequest.php | 92 - .../Google/Cloud/Talent/V4/HistogramQuery.php | 83 - .../Cloud/Talent/V4/HistogramQueryResult.php | 131 - .../Cloud/Talent/V4/HtmlSanitization.php | 64 - .../proto/src/Google/Cloud/Talent/V4/Job.php | 1765 ---- .../Cloud/Talent/V4/Job/ApplicationInfo.php | 170 - .../Cloud/Talent/V4/Job/DerivedInfo.php | 124 - .../Cloud/Talent/V4/Job/ProcessingOptions.php | 144 - .../src/Google/Cloud/Talent/V4/JobBenefit.php | 130 - .../Google/Cloud/Talent/V4/JobCategory.php | 260 - .../src/Google/Cloud/Talent/V4/JobEvent.php | 142 - .../Cloud/Talent/V4/JobEvent/JobEventType.php | 203 - .../src/Google/Cloud/Talent/V4/JobLevel.php | 84 - .../src/Google/Cloud/Talent/V4/JobQuery.php | 907 -- .../src/Google/Cloud/Talent/V4/JobResult.php | 145 - .../src/Google/Cloud/Talent/V4/JobView.php | 95 - .../Cloud/Talent/V4/ListCompaniesRequest.php | 214 - .../Cloud/Talent/V4/ListCompaniesResponse.php | 149 - .../Cloud/Talent/V4/ListJobsRequest.php | 348 - .../Cloud/Talent/V4/ListJobsResponse.php | 157 - .../Cloud/Talent/V4/ListTenantsRequest.php | 164 - .../Cloud/Talent/V4/ListTenantsResponse.php | 149 - .../src/Google/Cloud/Talent/V4/Location.php | 237 - .../Cloud/Talent/V4/Location/LocationType.php | 124 - .../Google/Cloud/Talent/V4/LocationFilter.php | 357 - .../LocationFilter/TelecommutePreference.php | 72 - .../Google/Cloud/Talent/V4/PostingRegion.php | 86 - .../Cloud/Talent/V4/RequestMetadata.php | 379 - .../Cloud/Talent/V4/ResponseMetadata.php | 71 - .../Cloud/Talent/V4/SearchJobsRequest.php | 1438 --- .../SearchJobsRequest/CustomRankingInfo.php | 185 - .../CustomRankingInfo/ImportanceLevel.php | 105 - .../DiversificationLevel.php | 113 - .../V4/SearchJobsRequest/KeywordMatchMode.php | 96 - .../V4/SearchJobsRequest/SearchMode.php | 71 - .../Cloud/Talent/V4/SearchJobsResponse.php | 381 - .../V4/SearchJobsResponse/CommuteInfo.php | 136 - .../V4/SearchJobsResponse/MatchingJob.php | 267 - .../Cloud/Talent/V4/SpellingCorrection.php | 155 - .../src/Google/Cloud/Talent/V4/Tenant.php | 128 - .../Google/Cloud/Talent/V4/TimestampRange.php | 121 - .../Cloud/Talent/V4/UpdateCompanyRequest.php | 178 - .../Cloud/Talent/V4/UpdateJobRequest.php | 168 - .../Cloud/Talent/V4/UpdateTenantRequest.php | 173 - .../src/Google/Cloud/Talent/V4/Visibility.php | 72 - .../CompanyServiceClient/create_company.php | 88 - .../CompanyServiceClient/delete_company.php | 74 - .../V4/CompanyServiceClient/get_company.php | 75 - .../CompanyServiceClient/list_companies.php | 79 - .../CompanyServiceClient/update_company.php | 78 - .../V4/CompletionClient/complete_query.php | 85 - .../create_client_event.php | 88 - .../V4/JobServiceClient/batch_create_jobs.php | 138 - .../V4/JobServiceClient/batch_delete_jobs.php | 88 - .../V4/JobServiceClient/batch_update_jobs.php | 138 - .../V4/JobServiceClient/create_job.php | 127 - .../V4/JobServiceClient/delete_job.php | 76 - .../samples/V4/JobServiceClient/get_job.php | 76 - .../samples/V4/JobServiceClient/list_jobs.php | 104 - .../V4/JobServiceClient/search_jobs.php | 83 - .../search_jobs_for_alert.php | 88 - .../V4/JobServiceClient/update_job.php | 113 - .../V4/TenantServiceClient/create_tenant.php | 82 - .../V4/TenantServiceClient/delete_tenant.php | 72 - .../V4/TenantServiceClient/get_tenant.php | 74 - .../V4/TenantServiceClient/list_tenants.php | 79 - .../V4/TenantServiceClient/update_tenant.php | 75 - .../v4/src/V4/Client/CompanyServiceClient.php | 370 - .../v4/src/V4/Client/CompletionClient.php | 259 - .../v4/src/V4/Client/EventServiceClient.php | 244 - .../v4/src/V4/Client/JobServiceClient.php | 610 -- .../v4/src/V4/Client/TenantServiceClient.php | 365 - .../Talent/v4/src/V4/gapic_metadata.json | 164 - .../company_service_client_config.json | 70 - .../company_service_descriptor_config.php | 101 - .../company_service_rest_client_config.php | 100 - .../resources/completion_client_config.json | 40 - .../completion_descriptor_config.php | 44 - .../completion_rest_client_config.php | 53 - .../event_service_client_config.json | 37 - .../event_service_descriptor_config.php | 43 - .../event_service_rest_client_config.php | 54 - .../resources/job_service_client_config.json | 95 - .../job_service_descriptor_config.php | 183 - .../job_service_rest_client_config.php | 163 - .../tenant_service_client_config.json | 70 - .../tenant_service_descriptor_config.php | 101 - .../tenant_service_rest_client_config.php | 100 - .../V4/Client/CompanyServiceClientTest.php | 524 - .../Unit/V4/Client/CompletionClientTest.php | 171 - .../Unit/V4/Client/EventServiceClientTest.php | 186 - .../Unit/V4/Client/JobServiceClientTest.php | 1107 --- .../V4/Client/TenantServiceClientTest.php | 450 - .../Google/Cloud/Tasks/V2/Cloudtasks.php | 114 - .../Google/Cloud/Tasks/V2/Queue.php | Bin 1983 -> 0 bytes .../Google/Cloud/Tasks/V2/Target.php | Bin 1761 -> 0 bytes .../Google/Cloud/Tasks/V2/Task.php | Bin 2022 -> 0 bytes .../Cloud/Tasks/V2/AppEngineHttpRequest.php | 469 - .../Cloud/Tasks/V2/AppEngineRouting.php | 373 - .../src/Google/Cloud/Tasks/V2/Attempt.php | 229 - .../Cloud/Tasks/V2/CreateQueueRequest.php | 160 - .../Cloud/Tasks/V2/CreateTaskRequest.php | 349 - .../Cloud/Tasks/V2/DeleteQueueRequest.php | 87 - .../Cloud/Tasks/V2/DeleteTaskRequest.php | 87 - .../Google/Cloud/Tasks/V2/GetQueueRequest.php | 86 - .../Google/Cloud/Tasks/V2/GetTaskRequest.php | 157 - .../src/Google/Cloud/Tasks/V2/HttpMethod.php | 96 - .../src/Google/Cloud/Tasks/V2/HttpRequest.php | 421 - .../Cloud/Tasks/V2/ListQueuesRequest.php | 269 - .../Cloud/Tasks/V2/ListQueuesResponse.php | 122 - .../Cloud/Tasks/V2/ListTasksRequest.php | 269 - .../Cloud/Tasks/V2/ListTasksResponse.php | 118 - .../src/Google/Cloud/Tasks/V2/OAuthToken.php | 128 - .../src/Google/Cloud/Tasks/V2/OidcToken.php | 126 - .../Cloud/Tasks/V2/PauseQueueRequest.php | 87 - .../Cloud/Tasks/V2/PurgeQueueRequest.php | 87 - .../proto/src/Google/Cloud/Tasks/V2/Queue.php | 611 -- .../src/Google/Cloud/Tasks/V2/Queue/State.php | 89 - .../src/Google/Cloud/Tasks/V2/RateLimits.php | 308 - .../Cloud/Tasks/V2/ResumeQueueRequest.php | 87 - .../src/Google/Cloud/Tasks/V2/RetryConfig.php | 490 - .../Google/Cloud/Tasks/V2/RunTaskRequest.php | 157 - .../Tasks/V2/StackdriverLoggingConfig.php | 80 - .../proto/src/Google/Cloud/Tasks/V2/Task.php | 684 -- .../src/Google/Cloud/Tasks/V2/Task/View.php | 79 - .../Cloud/Tasks/V2/UpdateQueueRequest.php | 165 - .../V2/CloudTasksClient/create_queue.php | 89 - .../V2/CloudTasksClient/create_task.php | 80 - .../V2/CloudTasksClient/delete_queue.php | 82 - .../V2/CloudTasksClient/delete_task.php | 74 - .../V2/CloudTasksClient/get_iam_policy.php | 79 - .../V2/CloudTasksClient/get_location.php | 57 - .../samples/V2/CloudTasksClient/get_queue.php | 72 - .../samples/V2/CloudTasksClient/get_task.php | 72 - .../V2/CloudTasksClient/list_locations.php | 62 - .../V2/CloudTasksClient/list_queues.php | 79 - .../V2/CloudTasksClient/list_tasks.php | 85 - .../V2/CloudTasksClient/pause_queue.php | 79 - .../V2/CloudTasksClient/purge_queue.php | 77 - .../V2/CloudTasksClient/resume_queue.php | 85 - .../samples/V2/CloudTasksClient/run_task.php | 97 - .../V2/CloudTasksClient/set_iam_policy.php | 83 - .../CloudTasksClient/test_iam_permissions.php | 85 - .../V2/CloudTasksClient/update_queue.php | 73 - .../v2/src/V2/Client/CloudTasksClient.php | 887 -- .../Tasks/v2/src/V2/CloudTasksClient.php | 34 - .../v2/src/V2/Gapic/CloudTasksGapicClient.php | 1466 --- .../Tasks/v2/src/V2/gapic_metadata.json | 108 - .../resources/cloud_tasks_client_config.json | 135 - .../cloud_tasks_descriptor_config.php | 276 - .../cloud_tasks_rest_client_config.php | 240 - .../Unit/V2/Client/CloudTasksClientTest.php | 1316 --- .../v2/tests/Unit/V2/CloudTasksClientTest.php | 1189 --- .../Google/Cloud/Tasks/V2Beta2/Cloudtasks.php | Bin 8540 -> 0 bytes .../Google/Cloud/Tasks/V2Beta2/OldTarget.php | 27 - .../Google/Cloud/Tasks/V2Beta2/Queue.php | Bin 2576 -> 0 bytes .../Google/Cloud/Tasks/V2Beta2/Target.php | Bin 3089 -> 0 bytes .../Google/Cloud/Tasks/V2Beta2/Task.php | Bin 2129 -> 0 bytes .../Tasks/V2beta2/AcknowledgeTaskRequest.php | 132 - .../Tasks/V2beta2/AppEngineHttpRequest.php | 484 - .../Tasks/V2beta2/AppEngineHttpTarget.php | 114 - .../Cloud/Tasks/V2beta2/AppEngineRouting.php | 536 -- .../Cloud/Tasks/V2beta2/AttemptStatus.php | 229 - .../Tasks/V2beta2/CancelLeaseRequest.php | 206 - .../Tasks/V2beta2/CreateQueueRequest.php | 136 - .../Cloud/Tasks/V2beta2/CreateTaskRequest.php | 302 - .../Tasks/V2beta2/DeleteQueueRequest.php | 72 - .../Cloud/Tasks/V2beta2/DeleteTaskRequest.php | 72 - .../Cloud/Tasks/V2beta2/GetQueueRequest.php | 128 - .../Cloud/Tasks/V2beta2/GetTaskRequest.php | 146 - .../Google/Cloud/Tasks/V2beta2/HttpMethod.php | 96 - .../Cloud/Tasks/V2beta2/HttpRequest.php | 416 - .../Google/Cloud/Tasks/V2beta2/HttpTarget.php | 375 - .../Cloud/Tasks/V2beta2/HttpTarget/Header.php | 104 - .../V2beta2/HttpTarget/HeaderOverride.php | 80 - .../Cloud/Tasks/V2beta2/LeaseTasksRequest.php | 442 - .../Tasks/V2beta2/LeaseTasksResponse.php | 68 - .../Cloud/Tasks/V2beta2/ListQueuesRequest.php | 310 - .../Tasks/V2beta2/ListQueuesResponse.php | 126 - .../Cloud/Tasks/V2beta2/ListTasksRequest.php | 258 - .../Cloud/Tasks/V2beta2/ListTasksResponse.php | 122 - .../Google/Cloud/Tasks/V2beta2/OAuthToken.php | 128 - .../Google/Cloud/Tasks/V2beta2/OidcToken.php | 126 - .../Cloud/Tasks/V2beta2/PathOverride.php | 68 - .../Cloud/Tasks/V2beta2/PauseQueueRequest.php | 72 - .../Cloud/Tasks/V2beta2/PullMessage.php | 165 - .../Google/Cloud/Tasks/V2beta2/PullTarget.php | 33 - .../Cloud/Tasks/V2beta2/PurgeQueueRequest.php | 72 - .../Cloud/Tasks/V2beta2/QueryOverride.php | 72 - .../src/Google/Cloud/Tasks/V2beta2/Queue.php | 771 -- .../Cloud/Tasks/V2beta2/Queue/State.php | 93 - .../Google/Cloud/Tasks/V2beta2/QueueStats.php | 253 - .../Google/Cloud/Tasks/V2beta2/RateLimits.php | 349 - .../Cloud/Tasks/V2beta2/RenewLeaseRequest.php | 258 - .../Tasks/V2beta2/ResumeQueueRequest.php | 72 - .../Cloud/Tasks/V2beta2/RetryConfig.php | 548 -- .../Cloud/Tasks/V2beta2/RunTaskRequest.php | 146 - .../src/Google/Cloud/Tasks/V2beta2/Task.php | 484 - .../Google/Cloud/Tasks/V2beta2/Task/View.php | 83 - .../Google/Cloud/Tasks/V2beta2/TaskStatus.php | 241 - .../Tasks/V2beta2/UpdateQueueRequest.php | 150 - .../Tasks/V2beta2/UploadQueueYamlRequest.php | 120 - .../Cloud/Tasks/V2beta2/UriOverride.php | 353 - .../Tasks/V2beta2/UriOverride/Scheme.php | 66 - .../UriOverride/UriOverrideEnforceMode.php | 67 - .../CloudTasksClient/acknowledge_task.php | 82 - .../V2beta2/CloudTasksClient/cancel_lease.php | 76 - .../V2beta2/CloudTasksClient/create_queue.php | 85 - .../V2beta2/CloudTasksClient/create_task.php | 80 - .../V2beta2/CloudTasksClient/delete_queue.php | 77 - .../V2beta2/CloudTasksClient/delete_task.php | 69 - .../CloudTasksClient/get_iam_policy.php | 74 - .../V2beta2/CloudTasksClient/get_location.php | 53 - .../V2beta2/CloudTasksClient/get_queue.php | 67 - .../V2beta2/CloudTasksClient/get_task.php | 67 - .../V2beta2/CloudTasksClient/lease_tasks.php | 93 - .../CloudTasksClient/list_locations.php | 58 - .../V2beta2/CloudTasksClient/list_queues.php | 74 - .../V2beta2/CloudTasksClient/list_tasks.php | 80 - .../V2beta2/CloudTasksClient/pause_queue.php | 74 - .../V2beta2/CloudTasksClient/purge_queue.php | 72 - .../V2beta2/CloudTasksClient/renew_lease.php | 78 - .../V2beta2/CloudTasksClient/resume_queue.php | 81 - .../V2beta2/CloudTasksClient/run_task.php | 96 - .../CloudTasksClient/set_iam_policy.php | 79 - .../CloudTasksClient/test_iam_permissions.php | 81 - .../V2beta2/CloudTasksClient/update_queue.php | 70 - .../CloudTasksClient/upload_queue_yaml.php | 69 - .../v2beta2/src/V2beta2/CloudTasksClient.php | 36 - .../V2beta2/Gapic/CloudTasksGapicClient.php | 1977 ---- .../v2beta2/src/V2beta2/gapic_metadata.json | 133 - .../resources/cloud_tasks_client_config.json | 160 - .../cloud_tasks_descriptor_config.php | 62 - .../cloud_tasks_rest_client_config.php | 288 - .../Unit/V2beta2/CloudTasksClientTest.php | 1492 --- .../Google/Cloud/Tasks/V2Beta3/Cloudtasks.php | 116 - .../Google/Cloud/Tasks/V2Beta3/Queue.php | Bin 2709 -> 0 bytes .../Google/Cloud/Tasks/V2Beta3/Target.php | Bin 3007 -> 0 bytes .../Google/Cloud/Tasks/V2Beta3/Task.php | Bin 2155 -> 0 bytes .../Tasks/V2beta3/AppEngineHttpQueue.php | 114 - .../Tasks/V2beta3/AppEngineHttpRequest.php | 478 - .../Cloud/Tasks/V2beta3/AppEngineRouting.php | 380 - .../Google/Cloud/Tasks/V2beta3/Attempt.php | 229 - .../Tasks/V2beta3/CreateQueueRequest.php | 136 - .../Cloud/Tasks/V2beta3/CreateTaskRequest.php | 302 - .../Tasks/V2beta3/DeleteQueueRequest.php | 72 - .../Cloud/Tasks/V2beta3/DeleteTaskRequest.php | 72 - .../Cloud/Tasks/V2beta3/GetQueueRequest.php | 128 - .../Cloud/Tasks/V2beta3/GetTaskRequest.php | 146 - .../Google/Cloud/Tasks/V2beta3/HttpMethod.php | 96 - .../Cloud/Tasks/V2beta3/HttpRequest.php | 433 - .../Google/Cloud/Tasks/V2beta3/HttpTarget.php | 367 - .../Cloud/Tasks/V2beta3/HttpTarget/Header.php | 104 - .../V2beta3/HttpTarget/HeaderOverride.php | 80 - .../Cloud/Tasks/V2beta3/ListQueuesRequest.php | 310 - .../Tasks/V2beta3/ListQueuesResponse.php | 126 - .../Cloud/Tasks/V2beta3/ListTasksRequest.php | 258 - .../Cloud/Tasks/V2beta3/ListTasksResponse.php | 122 - .../Google/Cloud/Tasks/V2beta3/OAuthToken.php | 128 - .../Google/Cloud/Tasks/V2beta3/OidcToken.php | 126 - .../Cloud/Tasks/V2beta3/PathOverride.php | 68 - .../Cloud/Tasks/V2beta3/PauseQueueRequest.php | 72 - .../Cloud/Tasks/V2beta3/PullMessage.php | 132 - .../Cloud/Tasks/V2beta3/PurgeQueueRequest.php | 72 - .../Cloud/Tasks/V2beta3/QueryOverride.php | 72 - .../src/Google/Cloud/Tasks/V2beta3/Queue.php | 883 -- .../Cloud/Tasks/V2beta3/Queue/State.php | 89 - .../Google/Cloud/Tasks/V2beta3/Queue/Type.php | 64 - .../Google/Cloud/Tasks/V2beta3/QueueStats.php | 253 - .../Google/Cloud/Tasks/V2beta3/RateLimits.php | 317 - .../Tasks/V2beta3/ResumeQueueRequest.php | 72 - .../Cloud/Tasks/V2beta3/RetryConfig.php | 502 - .../Cloud/Tasks/V2beta3/RunTaskRequest.php | 146 - .../V2beta3/StackdriverLoggingConfig.php | 80 - .../src/Google/Cloud/Tasks/V2beta3/Task.php | 746 -- .../Google/Cloud/Tasks/V2beta3/Task/View.php | 81 - .../Tasks/V2beta3/UpdateQueueRequest.php | 150 - .../Cloud/Tasks/V2beta3/UriOverride.php | 353 - .../Tasks/V2beta3/UriOverride/Scheme.php | 66 - .../UriOverride/UriOverrideEnforceMode.php | 67 - .../V2beta3/CloudTasksClient/create_queue.php | 85 - .../V2beta3/CloudTasksClient/create_task.php | 76 - .../V2beta3/CloudTasksClient/delete_queue.php | 77 - .../V2beta3/CloudTasksClient/delete_task.php | 69 - .../CloudTasksClient/get_iam_policy.php | 74 - .../V2beta3/CloudTasksClient/get_location.php | 53 - .../V2beta3/CloudTasksClient/get_queue.php | 67 - .../V2beta3/CloudTasksClient/get_task.php | 67 - .../CloudTasksClient/list_locations.php | 58 - .../V2beta3/CloudTasksClient/list_queues.php | 74 - .../V2beta3/CloudTasksClient/list_tasks.php | 80 - .../V2beta3/CloudTasksClient/pause_queue.php | 74 - .../V2beta3/CloudTasksClient/purge_queue.php | 72 - .../V2beta3/CloudTasksClient/resume_queue.php | 81 - .../V2beta3/CloudTasksClient/run_task.php | 93 - .../CloudTasksClient/set_iam_policy.php | 79 - .../CloudTasksClient/test_iam_permissions.php | 81 - .../V2beta3/CloudTasksClient/update_queue.php | 70 - .../v2beta3/src/V2beta3/CloudTasksClient.php | 36 - .../V2beta3/Gapic/CloudTasksGapicClient.php | 1542 --- .../v2beta3/src/V2beta3/gapic_metadata.json | 108 - .../resources/cloud_tasks_client_config.json | 135 - .../cloud_tasks_descriptor_config.php | 62 - .../cloud_tasks_rest_client_config.php | 240 - .../Unit/V2beta3/CloudTasksClientTest.php | 1189 --- .../Telcoautomation/V1/Telcoautomation.php | Bin 24410 -> 0 bytes .../V1/ApplyDeploymentRequest.php | 83 - .../V1/ApplyHydratedDeploymentRequest.php | 81 - .../V1/ApproveBlueprintRequest.php | 86 - .../Cloud/TelcoAutomation/V1/Blueprint.php | 586 -- .../V1/Blueprint/ApprovalState.php | 78 - .../TelcoAutomation/V1/BlueprintView.php | 61 - .../V1/ComputeDeploymentStatusRequest.php | 81 - .../V1/ComputeDeploymentStatusResponse.php | 135 - .../V1/CreateBlueprintRequest.php | 173 - .../V1/CreateDeploymentRequest.php | 173 - .../V1/CreateEdgeSlmRequest.php | 247 - .../V1/CreateOrchestrationClusterRequest.php | 247 - .../V1/DeleteBlueprintRequest.php | 96 - .../V1/DeleteEdgeSlmRequest.php | 155 - .../V1/DeleteOrchestrationClusterRequest.php | 155 - .../Cloud/TelcoAutomation/V1/Deployment.php | 623 -- .../TelcoAutomation/V1/Deployment/State.php | 80 - .../TelcoAutomation/V1/DeploymentLevel.php | 89 - .../TelcoAutomation/V1/DeploymentView.php | 61 - .../V1/DiscardBlueprintChangesRequest.php | 81 - .../V1/DiscardBlueprintChangesResponse.php | 33 - .../V1/DiscardDeploymentChangesRequest.php | 81 - .../V1/DiscardDeploymentChangesResponse.php | 33 - .../Cloud/TelcoAutomation/V1/EdgeSlm.php | 343 - .../TelcoAutomation/V1/EdgeSlm/State.php | 79 - .../V1/EdgeSlm/WorkloadClusterType.php | 65 - .../Google/Cloud/TelcoAutomation/V1/File.php | 177 - .../V1/FullManagementConfig.php | 383 - .../V1/GetBlueprintRequest.php | 139 - .../V1/GetDeploymentRequest.php | 144 - .../TelcoAutomation/V1/GetEdgeSlmRequest.php | 81 - .../V1/GetHydratedDeploymentRequest.php | 81 - .../V1/GetOrchestrationClusterRequest.php | 81 - .../V1/GetPublicBlueprintRequest.php | 81 - .../TelcoAutomation/V1/HydratedDeployment.php | 186 - .../V1/HydratedDeployment/State.php | 66 - .../TelcoAutomation/V1/HydrationStatus.php | 111 - .../V1/ListBlueprintRevisionsRequest.php | 153 - .../V1/ListBlueprintRevisionsResponse.php | 105 - .../V1/ListBlueprintsRequest.php | 205 - .../V1/ListBlueprintsResponse.php | 105 - .../V1/ListDeploymentRevisionsRequest.php | 153 - .../V1/ListDeploymentRevisionsResponse.php | 105 - .../V1/ListDeploymentsRequest.php | 205 - .../V1/ListDeploymentsResponse.php | 105 - .../V1/ListEdgeSlmsRequest.php | 221 - .../V1/ListEdgeSlmsResponse.php | 135 - .../V1/ListHydratedDeploymentsRequest.php | 165 - .../V1/ListHydratedDeploymentsResponse.php | 105 - .../V1/ListOrchestrationClustersRequest.php | 221 - .../V1/ListOrchestrationClustersResponse.php | 135 - .../V1/ListPublicBlueprintsRequest.php | 163 - .../V1/ListPublicBlueprintsResponse.php | 105 - .../TelcoAutomation/V1/ManagementConfig.php | 111 - .../V1/MasterAuthorizedNetworksConfig.php | 71 - .../CidrBlock.php | 120 - .../TelcoAutomation/V1/NFDeploySiteStatus.php | 189 - .../TelcoAutomation/V1/NFDeployStatus.php | 139 - .../TelcoAutomation/V1/OperationMetadata.php | 307 - .../V1/OrchestrationCluster.php | 306 - .../V1/OrchestrationCluster/State.php | 79 - .../V1/ProposeBlueprintRequest.php | 81 - .../TelcoAutomation/V1/PublicBlueprint.php | 250 - .../V1/RejectBlueprintRequest.php | 81 - .../V1/RemoveDeploymentRequest.php | 81 - .../TelcoAutomation/V1/ResourceStatus.php | 315 - .../Cloud/TelcoAutomation/V1/ResourceType.php | 61 - .../V1/RollbackDeploymentRequest.php | 117 - .../V1/SearchBlueprintRevisionsRequest.php | 233 - .../V1/SearchBlueprintRevisionsResponse.php | 105 - .../V1/SearchDeploymentRevisionsRequest.php | 238 - .../V1/SearchDeploymentRevisionsResponse.php | 105 - .../Cloud/TelcoAutomation/V1/SiteVersion.php | 135 - .../V1/StandardManagementConfig.php | 387 - .../Cloud/TelcoAutomation/V1/Status.php | 97 - .../V1/UpdateBlueprintRequest.php | 141 - .../V1/UpdateDeploymentRequest.php | 141 - .../V1/UpdateHydratedDeploymentRequest.php | 141 - .../TelcoAutomation/V1/WorkloadStatus.php | 111 - .../apply_deployment.php | 76 - .../apply_hydrated_deployment.php | 77 - .../approve_blueprint.php | 77 - .../compute_deployment_status.php | 76 - .../create_blueprint.php | 83 - .../create_deployment.php | 84 - .../TelcoAutomationClient/create_edge_slm.php | 90 - .../create_orchestration_cluster.php | 92 - .../delete_blueprint.php | 77 - .../TelcoAutomationClient/delete_edge_slm.php | 80 - .../delete_orchestration_cluster.php | 84 - .../discard_blueprint_changes.php | 78 - .../discard_deployment_changes.php | 78 - .../TelcoAutomationClient/get_blueprint.php | 80 - .../TelcoAutomationClient/get_deployment.php | 81 - .../V1/TelcoAutomationClient/get_edge_slm.php | 71 - .../get_hydrated_deployment.php | 77 - .../V1/TelcoAutomationClient/get_location.php | 57 - .../get_orchestration_cluster.php | 75 - .../get_public_blueprint.php | 75 - .../list_blueprint_revisions.php | 81 - .../TelcoAutomationClient/list_blueprints.php | 82 - .../list_deployment_revisions.php | 81 - .../list_deployments.php | 82 - .../TelcoAutomationClient/list_edge_slms.php | 76 - .../list_hydrated_deployments.php | 81 - .../TelcoAutomationClient/list_locations.php | 62 - .../list_orchestration_clusters.php | 76 - .../list_public_blueprints.php | 79 - .../propose_blueprint.php | 76 - .../reject_blueprint.php | 76 - .../remove_deployment.php | 75 - .../rollback_deployment.php | 80 - .../search_blueprint_revisions.php | 91 - .../search_deployment_revisions.php | 92 - .../update_blueprint.php | 76 - .../update_deployment.php | 75 - .../update_hydrated_deployment.php | 62 - .../src/V1/Client/TelcoAutomationClient.php | 1487 --- .../v1/src/V1/gapic_metadata.json | 208 - .../telco_automation_client_config.json | 212 - .../telco_automation_descriptor_config.php | 614 -- .../telco_automation_rest_client_config.php | 530 - .../V1/Client/TelcoAutomationClientTest.php | 3154 ------ .../Google/Cloud/Texttospeech/V1/CloudTts.php | Bin 4912 -> 0 bytes .../Cloud/Texttospeech/V1/CloudTtsLrs.php | 49 - .../TextToSpeech/V1/AdvancedVoiceOptions.php | 81 - .../Cloud/TextToSpeech/V1/AudioConfig.php | 329 - .../Cloud/TextToSpeech/V1/AudioEncoding.php | 90 - .../V1/CustomPronunciationParams.php | 177 - .../PhoneticEncoding.php | 66 - .../TextToSpeech/V1/CustomPronunciations.php | 67 - .../TextToSpeech/V1/CustomVoiceParams.php | 106 - .../V1/CustomVoiceParams/ReportedUsage.php | 68 - .../TextToSpeech/V1/ListVoicesRequest.php | 115 - .../TextToSpeech/V1/ListVoicesResponse.php | 67 - .../TextToSpeech/V1/MultiSpeakerMarkup.php | 67 - .../V1/MultiSpeakerMarkup/Turn.php | 108 - .../Cloud/TextToSpeech/V1/SsmlVoiceGender.php | 73 - .../V1/StreamingSynthesisInput.php | 84 - .../V1/StreamingSynthesizeConfig.php | 77 - .../V1/StreamingSynthesizeRequest.php | 118 - .../V1/StreamingSynthesizeResponse.php | 73 - .../Cloud/TextToSpeech/V1/SynthesisInput.php | 239 - .../V1/SynthesizeLongAudioMetadata.php | 162 - .../V1/SynthesizeLongAudioRequest.php | 246 - .../V1/SynthesizeLongAudioResponse.php | 33 - .../V1/SynthesizeSpeechRequest.php | 226 - .../V1/SynthesizeSpeechResponse.php | 83 - .../Google/Cloud/TextToSpeech/V1/Voice.php | 177 - .../TextToSpeech/V1/VoiceCloneParams.php | 67 - .../TextToSpeech/V1/VoiceSelectionParams.php | 303 - .../V1/TextToSpeechClient/list_voices.php | 57 - .../streaming_synthesize.php | 64 - .../TextToSpeechClient/synthesize_speech.php | 94 - .../synthesize_long_audio.php | 89 - .../v1/src/V1/Client/TextToSpeechClient.php | 292 - .../TextToSpeechLongAudioSynthesizeClient.php | 274 - .../src/V1/Gapic/TextToSpeechGapicClient.php | 412 - ...ToSpeechLongAudioSynthesizeGapicClient.php | 403 - .../v1/src/V1/TextToSpeechClient.php | 34 - .../TextToSpeechLongAudioSynthesizeClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 47 - .../text_to_speech_client_config.json | 58 - .../text_to_speech_descriptor_config.php | 46 - ...h_long_audio_synthesize_client_config.json | 37 - ...ong_audio_synthesize_descriptor_config.php | 50 - ...ng_audio_synthesize_rest_client_config.php | 65 - .../text_to_speech_rest_client_config.php | 62 - .../Unit/V1/Client/TextToSpeechClientTest.php | 325 - ...tToSpeechLongAudioSynthesizeClientTest.php | 270 - .../tests/Unit/V1/TextToSpeechClientTest.php | 291 - ...tToSpeechLongAudioSynthesizeClientTest.php | 193 - .../Google/Cloud/Tpu/V1/CloudTpu.php | Bin 6967 -> 0 bytes .../Google/Cloud/Tpu/V1/AcceleratorType.php | 101 - .../Google/Cloud/Tpu/V1/CreateNodeRequest.php | 145 - .../Google/Cloud/Tpu/V1/DeleteNodeRequest.php | 67 - .../Tpu/V1/GetAcceleratorTypeRequest.php | 67 - .../Google/Cloud/Tpu/V1/GetNodeRequest.php | 67 - .../Tpu/V1/GetTensorFlowVersionRequest.php | 68 - .../Tpu/V1/ListAcceleratorTypesRequest.php | 204 - .../Tpu/V1/ListAcceleratorTypesResponse.php | 136 - .../Google/Cloud/Tpu/V1/ListNodesRequest.php | 135 - .../Google/Cloud/Tpu/V1/ListNodesResponse.php | 135 - .../Tpu/V1/ListTensorFlowVersionsRequest.php | 204 - .../Tpu/V1/ListTensorFlowVersionsResponse.php | 136 - .../Google/Cloud/Tpu/V1/NetworkEndpoint.php | 101 - .../v1/proto/src/Google/Cloud/Tpu/V1/Node.php | 797 -- .../Google/Cloud/Tpu/V1/Node/ApiVersion.php | 71 - .../src/Google/Cloud/Tpu/V1/Node/Health.php | 87 - .../src/Google/Cloud/Tpu/V1/Node/State.php | 150 - .../Google/Cloud/Tpu/V1/OperationMetadata.php | 295 - .../Cloud/Tpu/V1/ReimageNodeRequest.php | 101 - .../Google/Cloud/Tpu/V1/SchedulingConfig.php | 101 - .../Google/Cloud/Tpu/V1/StartNodeRequest.php | 67 - .../Google/Cloud/Tpu/V1/StopNodeRequest.php | 67 - .../proto/src/Google/Cloud/Tpu/V1/Symptom.php | 179 - .../Cloud/Tpu/V1/Symptom/SymptomType.php | 94 - .../Google/Cloud/Tpu/V1/TensorFlowVersion.php | 101 - .../v1/samples/V1/TpuClient/create_node.php | 90 - .../v1/samples/V1/TpuClient/delete_node.php | 78 - .../V1/TpuClient/get_accelerator_type.php | 66 - .../v1/samples/V1/TpuClient/get_location.php | 53 - .../Tpu/v1/samples/V1/TpuClient/get_node.php | 66 - .../V1/TpuClient/get_tensor_flow_version.php | 70 - .../V1/TpuClient/list_accelerator_types.php | 71 - .../samples/V1/TpuClient/list_locations.php | 58 - .../v1/samples/V1/TpuClient/list_nodes.php | 71 - .../TpuClient/list_tensor_flow_versions.php | 75 - .../v1/samples/V1/TpuClient/reimage_node.php | 65 - .../v1/samples/V1/TpuClient/start_node.php | 65 - .../Tpu/v1/samples/V1/TpuClient/stop_node.php | 65 - .../Tpu/v1/src/V1/Gapic/TpuGapicClient.php | 1237 --- owl-bot-staging/Tpu/v1/src/V1/TpuClient.php | 34 - .../Tpu/v1/src/V1/gapic_metadata.json | 83 - .../src/V1/resources/tpu_client_config.json | 97 - .../V1/resources/tpu_descriptor_config.php | 122 - .../V1/resources/tpu_rest_client_config.php | 224 - .../Tpu/v1/tests/Unit/V1/TpuClientTest.php | 1289 --- .../Google/Cloud/Tpu/V2/CloudTpu.php | Bin 9430 -> 0 bytes .../Google/Cloud/Tpu/V2/AcceleratorConfig.php | 101 - .../Cloud/Tpu/V2/AcceleratorConfig/Type.php | 71 - .../Google/Cloud/Tpu/V2/AcceleratorType.php | 135 - .../src/Google/Cloud/Tpu/V2/AccessConfig.php | 67 - .../src/Google/Cloud/Tpu/V2/AttachedDisk.php | 114 - .../Cloud/Tpu/V2/AttachedDisk/DiskMode.php | 66 - .../Google/Cloud/Tpu/V2/CreateNodeRequest.php | 163 - .../Google/Cloud/Tpu/V2/DeleteNodeRequest.php | 81 - .../Tpu/V2/GenerateServiceIdentityRequest.php | 68 - .../V2/GenerateServiceIdentityResponse.php | 78 - .../Tpu/V2/GetAcceleratorTypeRequest.php | 81 - .../Tpu/V2/GetGuestAttributesRequest.php | 139 - .../Tpu/V2/GetGuestAttributesResponse.php | 68 - .../Google/Cloud/Tpu/V2/GetNodeRequest.php | 81 - .../Cloud/Tpu/V2/GetRuntimeVersionRequest.php | 81 - .../Google/Cloud/Tpu/V2/GuestAttributes.php | 119 - .../Cloud/Tpu/V2/GuestAttributesEntry.php | 135 - .../Cloud/Tpu/V2/GuestAttributesValue.php | 67 - .../Tpu/V2/ListAcceleratorTypesRequest.php | 218 - .../Tpu/V2/ListAcceleratorTypesResponse.php | 136 - .../Google/Cloud/Tpu/V2/ListNodesRequest.php | 149 - .../Google/Cloud/Tpu/V2/ListNodesResponse.php | 135 - .../Tpu/V2/ListRuntimeVersionsRequest.php | 218 - .../Tpu/V2/ListRuntimeVersionsResponse.php | 136 - .../src/Google/Cloud/Tpu/V2/NetworkConfig.php | 197 - .../Google/Cloud/Tpu/V2/NetworkEndpoint.php | 145 - .../v2/proto/src/Google/Cloud/Tpu/V2/Node.php | 965 -- .../Google/Cloud/Tpu/V2/Node/ApiVersion.php | 78 - .../src/Google/Cloud/Tpu/V2/Node/Health.php | 80 - .../src/Google/Cloud/Tpu/V2/Node/State.php | 150 - .../Google/Cloud/Tpu/V2/OperationMetadata.php | 295 - .../Google/Cloud/Tpu/V2/RuntimeVersion.php | 101 - .../Google/Cloud/Tpu/V2/SchedulingConfig.php | 101 - .../Google/Cloud/Tpu/V2/ServiceAccount.php | 109 - .../Google/Cloud/Tpu/V2/ServiceIdentity.php | 67 - .../Cloud/Tpu/V2/ShieldedInstanceConfig.php | 67 - .../Google/Cloud/Tpu/V2/StartNodeRequest.php | 67 - .../Google/Cloud/Tpu/V2/StopNodeRequest.php | 67 - .../proto/src/Google/Cloud/Tpu/V2/Symptom.php | 179 - .../Cloud/Tpu/V2/Symptom/SymptomType.php | 94 - .../Google/Cloud/Tpu/V2/UpdateNodeRequest.php | 146 - .../v2/samples/V2/TpuClient/create_node.php | 88 - .../v2/samples/V2/TpuClient/delete_node.php | 80 - .../TpuClient/generate_service_identity.php | 71 - .../V2/TpuClient/get_accelerator_type.php | 71 - .../V2/TpuClient/get_guest_attributes.php | 71 - .../v2/samples/V2/TpuClient/get_location.php | 57 - .../Tpu/v2/samples/V2/TpuClient/get_node.php | 71 - .../V2/TpuClient/get_runtime_version.php | 71 - .../V2/TpuClient/list_accelerator_types.php | 76 - .../samples/V2/TpuClient/list_locations.php | 62 - .../v2/samples/V2/TpuClient/list_nodes.php | 76 - .../V2/TpuClient/list_runtime_versions.php | 76 - .../v2/samples/V2/TpuClient/start_node.php | 83 - .../Tpu/v2/samples/V2/TpuClient/stop_node.php | 83 - .../v2/samples/V2/TpuClient/update_node.php | 87 - .../Tpu/v2/src/V2/Client/TpuClient.php | 751 -- .../Tpu/v2/src/V2/gapic_metadata.json | 93 - .../src/V2/resources/tpu_client_config.json | 107 - .../V2/resources/tpu_descriptor_config.php | 284 - .../V2/resources/tpu_rest_client_config.php | 252 - .../v2/tests/Unit/V2/Client/TpuClientTest.php | 1552 --- .../Google/Devtools/Cloudtrace/V2/Trace.php | Bin 4514 -> 0 bytes .../Google/Devtools/Cloudtrace/V2/Tracing.php | 42 - .../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 | 132 - .../src/Google/Cloud/Trace/V2/Span/Link.php | 189 - .../Google/Cloud/Trace/V2/Span/Link/Type.php | 65 - .../src/Google/Cloud/Trace/V2/Span/Links.php | 109 - .../Google/Cloud/Trace/V2/Span/SpanKind.php | 95 - .../Google/Cloud/Trace/V2/Span/TimeEvent.php | 155 - .../Trace/V2/Span/TimeEvent/Annotation.php | 132 - .../Trace/V2/Span/TimeEvent/MessageEvent.php | 188 - .../V2/Span/TimeEvent/MessageEvent/Type.php | 64 - .../Google/Cloud/Trace/V2/Span/TimeEvents.php | 148 - .../src/Google/Cloud/Trace/V2/StackTrace.php | 135 - .../Cloud/Trace/V2/StackTrace/StackFrame.php | 348 - .../Cloud/Trace/V2/StackTrace/StackFrames.php | 112 - .../Cloud/Trace/V2/TruncatableString.php | 125 - .../TraceServiceClient/batch_write_spans.php | 103 - .../V2/TraceServiceClient/create_span.php | 91 - .../v2/src/V2/Client/TraceServiceClient.php | 288 - .../src/V2/Gapic/TraceServiceGapicClient.php | 477 - .../Trace/v2/src/V2/TraceServiceClient.php | 34 - .../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 - .../tests/Unit/V2/TraceServiceClientTest.php | 205 - .../Google/Cloud/Translate/V3/AdaptiveMt.php | Bin 5617 -> 0 bytes .../Cloud/Translate/V3/AutomlTranslation.php | Bin 5823 -> 0 bytes .../Google/Cloud/Translate/V3/Common.php | Bin 2045 -> 0 bytes .../Cloud/Translate/V3/TranslationService.php | Bin 20946 -> 0 bytes .../Cloud/Translate/V3/AdaptiveMtDataset.php | 303 - .../Cloud/Translate/V3/AdaptiveMtFile.php | 227 - .../Cloud/Translate/V3/AdaptiveMtSentence.php | 227 - .../V3/AdaptiveMtTranslateRequest.php | 257 - .../GlossaryConfig.php | 160 - .../ReferenceSentenceConfig.php | 150 - .../ReferenceSentencePair.php | 104 - .../ReferenceSentencePairList.php | 70 - .../V3/AdaptiveMtTranslateResponse.php | 139 - .../Translate/V3/AdaptiveMtTranslation.php | 67 - .../Translate/V3/BatchDocumentInputConfig.php | 123 - .../V3/BatchDocumentOutputConfig.php | 186 - .../V3/BatchTransferResourcesResponse.php | 67 - .../TransferResourceResponse.php | 152 - .../V3/BatchTranslateDocumentMetadata.php | 411 - .../BatchTranslateDocumentMetadata/State.php | 88 - .../V3/BatchTranslateDocumentRequest.php | 595 -- .../V3/BatchTranslateDocumentResponse.php | 432 - .../Translate/V3/BatchTranslateMetadata.php | 225 - .../V3/BatchTranslateMetadata/State.php | 89 - .../Translate/V3/BatchTranslateResponse.php | 234 - .../V3/BatchTranslateTextRequest.php | 419 - .../V3/CreateAdaptiveMtDatasetRequest.php | 132 - .../Translate/V3/CreateDatasetMetadata.php | 199 - .../Translate/V3/CreateDatasetRequest.php | 127 - .../V3/CreateGlossaryEntryRequest.php | 127 - .../Translate/V3/CreateGlossaryMetadata.php | 147 - .../V3/CreateGlossaryMetadata/State.php | 86 - .../Translate/V3/CreateGlossaryRequest.php | 127 - .../Translate/V3/CreateModelMetadata.php | 199 - .../Cloud/Translate/V3/CreateModelRequest.php | 132 - .../src/Google/Cloud/Translate/V3/Dataset.php | 406 - .../Cloud/Translate/V3/DatasetInputConfig.php | 67 - .../V3/DatasetInputConfig/InputFile.php | 116 - .../Translate/V3/DatasetOutputConfig.php | 75 - .../V3/DeleteAdaptiveMtDatasetRequest.php | 86 - .../V3/DeleteAdaptiveMtFileRequest.php | 86 - .../Translate/V3/DeleteDatasetMetadata.php | 199 - .../Translate/V3/DeleteDatasetRequest.php | 81 - .../V3/DeleteGlossaryEntryRequest.php | 81 - .../Translate/V3/DeleteGlossaryMetadata.php | 147 - .../V3/DeleteGlossaryMetadata/State.php | 86 - .../Translate/V3/DeleteGlossaryRequest.php | 81 - .../Translate/V3/DeleteGlossaryResponse.php | 165 - .../Translate/V3/DeleteModelMetadata.php | 199 - .../Cloud/Translate/V3/DeleteModelRequest.php | 81 - .../Translate/V3/DetectLanguageRequest.php | 326 - .../Translate/V3/DetectLanguageResponse.php | 71 - .../Cloud/Translate/V3/DetectedLanguage.php | 105 - .../Translate/V3/DocumentInputConfig.php | 177 - .../Translate/V3/DocumentOutputConfig.php | 240 - .../Translate/V3/DocumentTranslation.php | 159 - .../src/Google/Cloud/Translate/V3/Example.php | 173 - .../Cloud/Translate/V3/ExportDataMetadata.php | 199 - .../Cloud/Translate/V3/ExportDataRequest.php | 131 - .../Cloud/Translate/V3/FileInputSource.php | 135 - .../Cloud/Translate/V3/GcsDestination.php | 83 - .../Cloud/Translate/V3/GcsInputSource.php | 67 - .../Translate/V3/GcsOutputDestination.php | 75 - .../Google/Cloud/Translate/V3/GcsSource.php | 67 - .../V3/GetAdaptiveMtDatasetRequest.php | 86 - .../Translate/V3/GetAdaptiveMtFileRequest.php | 86 - .../Cloud/Translate/V3/GetDatasetRequest.php | 81 - .../Translate/V3/GetGlossaryEntryRequest.php | 81 - .../Cloud/Translate/V3/GetGlossaryRequest.php | 81 - .../Cloud/Translate/V3/GetModelRequest.php | 81 - .../V3/GetSupportedLanguagesRequest.php | 247 - .../Google/Cloud/Translate/V3/Glossary.php | 350 - .../V3/Glossary/LanguageCodePair.php | 112 - .../V3/Glossary/LanguageCodesSet.php | 78 - .../Cloud/Translate/V3/GlossaryEntry.php | 184 - .../V3/GlossaryEntry/GlossaryTermsPair.php | 124 - .../V3/GlossaryEntry/GlossaryTermsSet.php | 76 - .../Translate/V3/GlossaryInputConfig.php | 120 - .../Cloud/Translate/V3/GlossaryTerm.php | 101 - .../V3/ImportAdaptiveMtFileRequest.php | 161 - .../V3/ImportAdaptiveMtFileResponse.php | 77 - .../Cloud/Translate/V3/ImportDataMetadata.php | 199 - .../Cloud/Translate/V3/ImportDataRequest.php | 131 - .../Google/Cloud/Translate/V3/InputConfig.php | 166 - .../V3/ListAdaptiveMtDatasetsRequest.php | 213 - .../V3/ListAdaptiveMtDatasetsResponse.php | 109 - .../V3/ListAdaptiveMtFilesRequest.php | 175 - .../V3/ListAdaptiveMtFilesResponse.php | 109 - .../V3/ListAdaptiveMtSentencesRequest.php | 178 - .../V3/ListAdaptiveMtSentencesResponse.php | 101 - .../Translate/V3/ListDatasetsRequest.php | 166 - .../Translate/V3/ListDatasetsResponse.php | 109 - .../Translate/V3/ListExamplesRequest.php | 208 - .../Translate/V3/ListExamplesResponse.php | 109 - .../Translate/V3/ListGlossariesRequest.php | 259 - .../Translate/V3/ListGlossariesResponse.php | 109 - .../V3/ListGlossaryEntriesRequest.php | 170 - .../V3/ListGlossaryEntriesResponse.php | 105 - .../Cloud/Translate/V3/ListModelsRequest.php | 208 - .../Cloud/Translate/V3/ListModelsResponse.php | 109 - .../src/Google/Cloud/Translate/V3/Model.php | 417 - .../Cloud/Translate/V3/OperationState.php | 83 - .../Cloud/Translate/V3/OutputConfig.php | 249 - .../Cloud/Translate/V3/Romanization.php | 121 - .../Translate/V3/RomanizeTextRequest.php | 190 - .../Translate/V3/RomanizeTextResponse.php | 75 - .../Cloud/Translate/V3/SupportedLanguage.php | 186 - .../Cloud/Translate/V3/SupportedLanguages.php | 71 - .../Translate/V3/TranslateDocumentRequest.php | 631 -- .../V3/TranslateDocumentResponse.php | 231 - .../V3/TranslateTextGlossaryConfig.php | 156 - .../Translate/V3/TranslateTextRequest.php | 599 -- .../Translate/V3/TranslateTextResponse.php | 123 - .../Google/Cloud/Translate/V3/Translation.php | 223 - .../Translate/V3/TransliterationConfig.php | 71 - .../V3/UpdateGlossaryEntryRequest.php | 90 - .../Translate/V3/UpdateGlossaryMetadata.php | 161 - .../V3/UpdateGlossaryMetadata/State.php | 86 - .../Translate/V3/UpdateGlossaryRequest.php | 141 - .../adaptive_mt_translate.php | 89 - .../batch_translate_document.php | 116 - .../batch_translate_text.php | 113 - .../create_adaptive_mt_dataset.php | 85 - .../create_dataset.php | 85 - .../create_glossary.php | 90 - .../create_glossary_entry.php | 73 - .../TranslationServiceClient/create_model.php | 86 - .../delete_adaptive_mt_dataset.php | 75 - .../delete_adaptive_mt_file.php | 75 - .../delete_dataset.php | 80 - .../delete_glossary.php | 85 - .../delete_glossary_entry.php | 74 - .../TranslationServiceClient/delete_model.php | 80 - .../detect_language.php | 81 - .../TranslationServiceClient/export_data.php | 83 - .../get_adaptive_mt_dataset.php | 76 - .../get_adaptive_mt_file.php | 77 - .../TranslationServiceClient/get_dataset.php | 71 - .../TranslationServiceClient/get_glossary.php | 72 - .../get_glossary_entry.php | 76 - .../V3/TranslationServiceClient/get_model.php | 71 - .../get_supported_languages.php | 83 - .../import_adaptive_mt_file.php | 77 - .../TranslationServiceClient/import_data.php | 83 - .../list_adaptive_mt_datasets.php | 77 - .../list_adaptive_mt_files.php | 82 - .../list_adaptive_mt_sentences.php | 85 - .../list_datasets.php | 77 - .../list_examples.php | 77 - .../list_glossaries.php | 77 - .../list_glossary_entries.php | 77 - .../TranslationServiceClient/list_models.php | 77 - .../romanize_text.php | 82 - .../translate_document.php | 88 - .../translate_text.php | 97 - .../update_glossary.php | 86 - .../update_glossary_entry.php | 59 - .../V3/Client/TranslationServiceClient.php | 1476 --- .../Gapic/TranslationServiceGapicClient.php | 3147 ------ .../v3/src/V3/TranslationServiceClient.php | 34 - .../Translate/v3/src/V3/gapic_metadata.json | 208 - .../translation_service_client_config.json | 235 - .../translation_service_descriptor_config.php | 636 -- ...translation_service_rest_client_config.php | 582 -- .../Client/TranslationServiceClientTest.php | 3545 ------- .../Unit/V3/TranslationServiceClientTest.php | 3274 ------- .../V1/VideoIntelligence.php | 271 - .../V1/AnnotateVideoProgress.php | 69 - .../V1/AnnotateVideoRequest.php | 357 - .../V1/AnnotateVideoResponse.php | 69 - .../V1/DetectedAttribute.php | 143 - .../VideoIntelligence/V1/DetectedLandmark.php | 150 - .../Cloud/VideoIntelligence/V1/Entity.php | 143 - .../V1/ExplicitContentAnnotation.php | 103 - .../V1/ExplicitContentDetectionConfig.php | 75 - .../V1/ExplicitContentFrame.php | 115 - .../VideoIntelligence/V1/FaceAnnotation.php | 136 - .../V1/FaceDetectionAnnotation.php | 135 - .../V1/FaceDetectionConfig.php | 147 - .../Cloud/VideoIntelligence/V1/FaceFrame.php | 124 - .../VideoIntelligence/V1/FaceSegment.php | 77 - .../Cloud/VideoIntelligence/V1/Feature.php | 110 - .../VideoIntelligence/V1/LabelAnnotation.php | 225 - .../V1/LabelDetectionConfig.php | 267 - .../V1/LabelDetectionMode.php | 68 - .../Cloud/VideoIntelligence/V1/LabelFrame.php | 115 - .../VideoIntelligence/V1/LabelSegment.php | 111 - .../Cloud/VideoIntelligence/V1/Likelihood.php | 82 - .../V1/LogoRecognitionAnnotation.php | 157 - .../V1/NormalizedBoundingBox.php | 171 - .../V1/NormalizedBoundingPoly.php | 81 - .../VideoIntelligence/V1/NormalizedVertex.php | 103 - .../V1/ObjectTrackingAnnotation.php | 284 - .../V1/ObjectTrackingConfig.php | 75 - .../V1/ObjectTrackingFrame.php | 122 - .../V1/PersonDetectionAnnotation.php | 101 - .../V1/PersonDetectionConfig.php | 155 - .../V1/ShotChangeDetectionConfig.php | 75 - .../VideoIntelligence/V1/SpeechContext.php | 88 - .../V1/SpeechRecognitionAlternative.php | 163 - .../V1/SpeechTranscription.php | 121 - .../V1/SpeechTranscriptionConfig.php | 447 - .../VideoIntelligence/V1/TextAnnotation.php | 137 - .../V1/TextDetectionConfig.php | 121 - .../Cloud/VideoIntelligence/V1/TextFrame.php | 123 - .../VideoIntelligence/V1/TextSegment.php | 149 - .../V1/TimestampedObject.php | 195 - .../Cloud/VideoIntelligence/V1/Track.php | 179 - .../V1/VideoAnnotationProgress.php | 283 - .../V1/VideoAnnotationResults.php | 710 -- .../VideoIntelligence/V1/VideoContext.php | 427 - .../VideoIntelligence/V1/VideoSegment.php | 129 - .../Cloud/VideoIntelligence/V1/WordInfo.php | 281 - .../annotate_video.php | 72 - .../Client/VideoIntelligenceServiceClient.php | 248 - .../v1/src/V1/gapic_metadata.json | 23 - ...eo_intelligence_service_client_config.json | 40 - ...intelligence_service_descriptor_config.php | 39 - ...ntelligence_service_rest_client_config.php | 100 - .../VideoIntelligenceServiceClientTest.php | 238 - .../Cloud/Video/Livestream/V1/Outputs.php | Bin 3877 -> 0 bytes .../Cloud/Video/Livestream/V1/Resources.php | Bin 10327 -> 0 bytes .../Cloud/Video/Livestream/V1/Service.php | 249 - .../Cloud/Video/LiveStream/V1/Asset.php | 424 - .../Video/LiveStream/V1/Asset/ImageAsset.php | 70 - .../Cloud/Video/LiveStream/V1/Asset/State.php | 78 - .../Video/LiveStream/V1/Asset/VideoAsset.php | 72 - .../Cloud/Video/LiveStream/V1/AudioFormat.php | 135 - .../Cloud/Video/LiveStream/V1/AudioStream.php | 327 - .../V1/AudioStream/AudioMapping.php | 246 - .../LiveStream/V1/AudioStreamProperty.php | 111 - .../Cloud/Video/LiveStream/V1/Channel.php | 827 -- .../Video/LiveStream/V1/Channel/Output.php | 70 - .../LiveStream/V1/Channel/StreamingState.php | 104 - .../V1/ChannelOperationResponse.php | 33 - .../Google/Cloud/Video/LiveStream/V1/Clip.php | 471 - .../Video/LiveStream/V1/Clip/ClipManifest.php | 132 - .../Cloud/Video/LiveStream/V1/Clip/Slice.php | 78 - .../Cloud/Video/LiveStream/V1/Clip/State.php | 81 - .../Video/LiveStream/V1/Clip/TimeSlice.php | 125 - .../LiveStream/V1/CreateAssetRequest.php | 252 - .../LiveStream/V1/CreateChannelRequest.php | 252 - .../Video/LiveStream/V1/CreateClipRequest.php | 253 - .../LiveStream/V1/CreateEventRequest.php | 252 - .../LiveStream/V1/CreateInputRequest.php | 252 - .../LiveStream/V1/DeleteAssetRequest.php | 160 - .../LiveStream/V1/DeleteChannelRequest.php | 206 - .../Video/LiveStream/V1/DeleteClipRequest.php | 160 - .../LiveStream/V1/DeleteEventRequest.php | 160 - .../LiveStream/V1/DeleteInputRequest.php | 160 - .../Video/LiveStream/V1/ElementaryStream.php | 185 - .../Cloud/Video/LiveStream/V1/Encryption.php | 273 - .../V1/Encryption/Aes128Encryption.php | 36 - .../LiveStream/V1/Encryption/Clearkey.php | 36 - .../LiveStream/V1/Encryption/DrmSystems.php | 213 - .../LiveStream/V1/Encryption/Fairplay.php | 36 - .../V1/Encryption/MpegCommonEncryption.php | 78 - .../LiveStream/V1/Encryption/Playready.php | 36 - .../V1/Encryption/SampleAesEncryption.php | 36 - .../V1/Encryption/SecretManagerSource.php | 74 - .../LiveStream/V1/Encryption/Widevine.php | 36 - .../Cloud/Video/LiveStream/V1/Event.php | 601 -- .../Video/LiveStream/V1/Event/AdBreakTask.php | 80 - .../LiveStream/V1/Event/InputSwitchTask.php | 78 - .../Video/LiveStream/V1/Event/MuteTask.php | 84 - .../V1/Event/ReturnToProgramTask.php | 37 - .../Video/LiveStream/V1/Event/SlateTask.php | 130 - .../Cloud/Video/LiveStream/V1/Event/State.php | 92 - .../Video/LiveStream/V1/Event/UnmuteTask.php | 36 - .../Video/LiveStream/V1/GetAssetRequest.php | 86 - .../Video/LiveStream/V1/GetChannelRequest.php | 86 - .../Video/LiveStream/V1/GetClipRequest.php | 86 - .../Video/LiveStream/V1/GetEventRequest.php | 86 - .../Video/LiveStream/V1/GetInputRequest.php | 86 - .../Video/LiveStream/V1/GetPoolRequest.php | 86 - .../Cloud/Video/LiveStream/V1/Input.php | 460 - .../LiveStream/V1/Input/SecurityRule.php | 80 - .../Cloud/Video/LiveStream/V1/Input/Tier.php | 71 - .../Cloud/Video/LiveStream/V1/Input/Type.php | 64 - .../Video/LiveStream/V1/InputAttachment.php | 157 - .../V1/InputAttachment/AutomaticFailover.php | 82 - .../Cloud/Video/LiveStream/V1/InputConfig.php | 67 - .../V1/InputConfig/InputSwitchMode.php | 72 - .../LiveStream/V1/InputStreamProperty.php | 149 - .../Video/LiveStream/V1/ListAssetsRequest.php | 226 - .../LiveStream/V1/ListAssetsResponse.php | 135 - .../LiveStream/V1/ListChannelsRequest.php | 242 - .../LiveStream/V1/ListChannelsResponse.php | 139 - .../Video/LiveStream/V1/ListClipsRequest.php | 221 - .../Video/LiveStream/V1/ListClipsResponse.php | 135 - .../Video/LiveStream/V1/ListEventsRequest.php | 242 - .../LiveStream/V1/ListEventsResponse.php | 139 - .../Video/LiveStream/V1/ListInputsRequest.php | 242 - .../LiveStream/V1/ListInputsResponse.php | 139 - .../Cloud/Video/LiveStream/V1/LogConfig.php | 70 - .../LiveStream/V1/LogConfig/LogSeverity.php | 92 - .../Cloud/Video/LiveStream/V1/Manifest.php | 381 - .../LiveStream/V1/Manifest/ManifestType.php | 64 - .../Cloud/Video/LiveStream/V1/MuxStream.php | 257 - .../LiveStream/V1/NormalizedCoordinate.php | 101 - .../LiveStream/V1/NormalizedResolution.php | 101 - .../Video/LiveStream/V1/OperationMetadata.php | 273 - .../Google/Cloud/Video/LiveStream/V1/Pool.php | 240 - .../LiveStream/V1/Pool/NetworkConfig.php | 94 - .../LiveStream/V1/PreprocessingConfig.php | 165 - .../V1/PreprocessingConfig/Audio.php | 106 - .../V1/PreprocessingConfig/Crop.php | 173 - .../LiveStream/V1/PreprocessingConfig/Pad.php | 173 - .../Video/LiveStream/V1/RetentionConfig.php | 129 - .../Video/LiveStream/V1/SegmentSettings.php | 105 - .../Cloud/Video/LiveStream/V1/SpriteSheet.php | 367 - .../LiveStream/V1/StartChannelRequest.php | 160 - .../Video/LiveStream/V1/StaticOverlay.php | 233 - .../LiveStream/V1/StopChannelRequest.php | 160 - .../Cloud/Video/LiveStream/V1/TextStream.php | 79 - .../Video/LiveStream/V1/TimecodeConfig.php | 150 - .../V1/TimecodeConfig/TimecodeSource.php | 64 - .../LiveStream/V1/UpdateChannelRequest.php | 293 - .../LiveStream/V1/UpdateInputRequest.php | 253 - .../Video/LiveStream/V1/UpdatePoolRequest.php | 232 - .../Cloud/Video/LiveStream/V1/VideoFormat.php | 169 - .../Cloud/Video/LiveStream/V1/VideoStream.php | 75 - .../V1/VideoStream/H264CodecSettings.php | 743 -- .../LiveStream/V1/VideoStreamProperty.php | 111 - .../LivestreamServiceClient/create_asset.php | 92 - .../create_channel.php | 95 - .../LivestreamServiceClient/create_clip.php | 104 - .../LivestreamServiceClient/create_event.php | 79 - .../LivestreamServiceClient/create_input.php | 91 - .../LivestreamServiceClient/delete_asset.php | 81 - .../delete_channel.php | 81 - .../LivestreamServiceClient/delete_clip.php | 87 - .../LivestreamServiceClient/delete_event.php | 75 - .../LivestreamServiceClient/delete_input.php | 81 - .../V1/LivestreamServiceClient/get_asset.php | 72 - .../LivestreamServiceClient/get_channel.php | 72 - .../V1/LivestreamServiceClient/get_clip.php | 77 - .../V1/LivestreamServiceClient/get_event.php | 77 - .../V1/LivestreamServiceClient/get_input.php | 72 - .../LivestreamServiceClient/get_location.php | 57 - .../V1/LivestreamServiceClient/get_pool.php | 72 - .../LivestreamServiceClient/list_assets.php | 77 - .../LivestreamServiceClient/list_channels.php | 77 - .../V1/LivestreamServiceClient/list_clips.php | 76 - .../LivestreamServiceClient/list_events.php | 77 - .../LivestreamServiceClient/list_inputs.php | 77 - .../list_locations.php | 62 - .../LivestreamServiceClient/start_channel.php | 85 - .../LivestreamServiceClient/stop_channel.php | 85 - .../update_channel.php | 74 - .../LivestreamServiceClient/update_input.php | 71 - .../LivestreamServiceClient/update_pool.php | 71 - .../src/V1/Client/LivestreamServiceClient.php | 1223 --- .../v1/src/V1/gapic_metadata.json | 158 - .../livestream_service_client_config.json | 184 - .../livestream_service_descriptor_config.php | 519 - .../livestream_service_rest_client_config.php | 414 - .../V1/Client/LivestreamServiceClientTest.php | 2860 ------ .../Cloud/Video/Stitcher/V1/AdTagDetails.php | 52 - .../Cloud/Video/Stitcher/V1/CdnKeys.php | Bin 1567 -> 0 bytes .../Cloud/Video/Stitcher/V1/Companions.php | Bin 1738 -> 0 bytes .../Google/Cloud/Video/Stitcher/V1/Events.php | Bin 1464 -> 0 bytes .../Cloud/Video/Stitcher/V1/FetchOptions.php | 32 - .../Cloud/Video/Stitcher/V1/LiveConfigs.php | Bin 2272 -> 0 bytes .../Cloud/Video/Stitcher/V1/Sessions.php | Bin 3981 -> 0 bytes .../Google/Cloud/Video/Stitcher/V1/Slates.php | 37 - .../Cloud/Video/Stitcher/V1/StitchDetails.php | 45 - .../Stitcher/V1/VideoStitcherService.php | 243 - .../Cloud/Video/Stitcher/V1/VodConfigs.php | Bin 1571 -> 0 bytes .../Cloud/Video/Stitcher/V1/AdRequest.php | 155 - .../Video/Stitcher/V1/AdStitchDetail.php | 213 - .../Cloud/Video/Stitcher/V1/AdTracking.php | 63 - .../Cloud/Video/Stitcher/V1/AkamaiCdnKey.php | 67 - .../Google/Cloud/Video/Stitcher/V1/CdnKey.php | 219 - .../Cloud/Video/Stitcher/V1/Companion.php | 455 - .../Cloud/Video/Stitcher/V1/CompanionAds.php | 101 - .../V1/CompanionAds/DisplayRequirement.php | 71 - .../Video/Stitcher/V1/CreateCdnKeyRequest.php | 189 - .../Stitcher/V1/CreateLiveConfigRequest.php | 242 - .../Stitcher/V1/CreateLiveSessionRequest.php | 132 - .../Video/Stitcher/V1/CreateSlateRequest.php | 257 - .../Stitcher/V1/CreateVodConfigRequest.php | 242 - .../Stitcher/V1/CreateVodSessionRequest.php | 132 - .../Video/Stitcher/V1/DeleteCdnKeyRequest.php | 86 - .../Stitcher/V1/DeleteLiveConfigRequest.php | 86 - .../Video/Stitcher/V1/DeleteSlateRequest.php | 86 - .../Stitcher/V1/DeleteVodConfigRequest.php | 86 - .../Google/Cloud/Video/Stitcher/V1/Event.php | 179 - .../Video/Stitcher/V1/Event/EventType.php | 218 - .../Cloud/Video/Stitcher/V1/FetchOptions.php | 79 - .../Cloud/Video/Stitcher/V1/GamLiveConfig.php | 135 - .../Cloud/Video/Stitcher/V1/GamVodConfig.php | 67 - .../Video/Stitcher/V1/GetCdnKeyRequest.php | 86 - .../Stitcher/V1/GetLiveAdTagDetailRequest.php | 86 - .../Stitcher/V1/GetLiveConfigRequest.php | 91 - .../Stitcher/V1/GetLiveSessionRequest.php | 86 - .../Video/Stitcher/V1/GetSlateRequest.php | 86 - .../Stitcher/V1/GetVodAdTagDetailRequest.php | 91 - .../Video/Stitcher/V1/GetVodConfigRequest.php | 86 - .../Stitcher/V1/GetVodSessionRequest.php | 86 - .../Stitcher/V1/GetVodStitchDetailRequest.php | 91 - .../Cloud/Video/Stitcher/V1/GoogleCdnKey.php | 101 - .../Video/Stitcher/V1/HtmlAdResource.php | 67 - .../Video/Stitcher/V1/IframeAdResource.php | 67 - .../Cloud/Video/Stitcher/V1/Interstitials.php | 111 - .../Video/Stitcher/V1/ListCdnKeysRequest.php | 226 - .../Video/Stitcher/V1/ListCdnKeysResponse.php | 135 - .../V1/ListLiveAdTagDetailsRequest.php | 154 - .../V1/ListLiveAdTagDetailsResponse.php | 101 - .../Stitcher/V1/ListLiveConfigsRequest.php | 234 - .../Stitcher/V1/ListLiveConfigsResponse.php | 135 - .../Video/Stitcher/V1/ListSlatesRequest.php | 226 - .../Video/Stitcher/V1/ListSlatesResponse.php | 135 - .../V1/ListVodAdTagDetailsRequest.php | 154 - .../V1/ListVodAdTagDetailsResponse.php | 101 - .../Stitcher/V1/ListVodConfigsRequest.php | 238 - .../Stitcher/V1/ListVodConfigsResponse.php | 135 - .../V1/ListVodStitchDetailsRequest.php | 154 - .../V1/ListVodStitchDetailsResponse.php | 101 - .../Video/Stitcher/V1/LiveAdTagDetail.php | 107 - .../Cloud/Video/Stitcher/V1/LiveConfig.php | 427 - .../Video/Stitcher/V1/LiveConfig/State.php | 71 - .../V1/LiveConfig/StitchingPolicy.php | 66 - .../Cloud/Video/Stitcher/V1/LiveSession.php | 340 - .../Stitcher/V1/LiveSession/GamSettings.php | 120 - .../Video/Stitcher/V1/ManifestOptions.php | 109 - .../V1/ManifestOptions/OrderPolicy.php | 64 - .../Cloud/Video/Stitcher/V1/MediaCdnKey.php | 149 - .../Stitcher/V1/MediaCdnKey/TokenConfig.php | 90 - .../Video/Stitcher/V1/OperationMetadata.php | 189 - .../Video/Stitcher/V1/PrefetchConfig.php | 131 - .../Cloud/Video/Stitcher/V1/ProgressEvent.php | 128 - .../Video/Stitcher/V1/RenditionFilter.php | 109 - .../Video/Stitcher/V1/RequestMetadata.php | 77 - .../Video/Stitcher/V1/ResponseMetadata.php | 257 - .../Google/Cloud/Video/Stitcher/V1/Slate.php | 153 - .../Video/Stitcher/V1/Slate/GamSlate.php | 105 - .../Video/Stitcher/V1/StaticAdResource.php | 101 - .../Video/Stitcher/V1/UpdateCdnKeyRequest.php | 146 - .../Stitcher/V1/UpdateLiveConfigRequest.php | 151 - .../Video/Stitcher/V1/UpdateSlateRequest.php | 136 - .../Stitcher/V1/UpdateVodConfigRequest.php | 151 - .../Video/Stitcher/V1/VodAdTagDetail.php | 107 - .../Cloud/Video/Stitcher/V1/VodConfig.php | 261 - .../Video/Stitcher/V1/VodConfig/State.php | 71 - .../Cloud/Video/Stitcher/V1/VodSession.php | 497 - .../Stitcher/V1/VodSession/GamSettings.php | 105 - .../Cloud/Video/Stitcher/V1/VodSessionAd.php | 171 - .../Video/Stitcher/V1/VodSessionAdBreak.php | 189 - .../Video/Stitcher/V1/VodSessionContent.php | 81 - .../Video/Stitcher/V1/VodStitchDetail.php | 107 - .../create_cdn_key.php | 94 - .../create_live_config.php | 106 - .../create_live_session.php | 85 - .../create_slate.php | 92 - .../create_vod_config.php | 100 - .../create_vod_session.php | 79 - .../delete_cdn_key.php | 81 - .../delete_live_config.php | 85 - .../delete_slate.php | 81 - .../delete_vod_config.php | 85 - .../get_cdn_key.php | 72 - .../get_live_ad_tag_detail.php | 77 - .../get_live_config.php | 78 - .../get_live_session.php | 76 - .../VideoStitcherServiceClient/get_slate.php | 72 - .../get_vod_ad_tag_detail.php | 78 - .../get_vod_config.php | 77 - .../get_vod_session.php | 77 - .../get_vod_stitch_detail.php | 78 - .../list_cdn_keys.php | 77 - .../list_live_ad_tag_details.php | 81 - .../list_live_configs.php | 78 - .../list_slates.php | 77 - .../list_vod_ad_tag_details.php | 81 - .../list_vod_configs.php | 78 - .../list_vod_stitch_details.php | 82 - .../update_cdn_key.php | 75 - .../update_live_config.php | 92 - .../update_slate.php | 74 - .../update_vod_config.php | 91 - .../V1/Client/VideoStitcherServiceClient.php | 1325 --- .../v1/src/V1/gapic_metadata.json | 168 - .../video_stitcher_service_client_config.json | 194 - ...deo_stitcher_service_descriptor_config.php | 544 -- ...eo_stitcher_service_rest_client_config.php | 444 - .../Client/VideoStitcherServiceClientTest.php | 3059 ------ .../Cloud/Video/Transcoder/V1/Resources.php | Bin 11097 -> 0 bytes .../Cloud/Video/Transcoder/V1/Services.php | 90 - .../Cloud/Video/Transcoder/V1/AdBreak.php | 81 - .../Cloud/Video/Transcoder/V1/AudioStream.php | 389 - .../V1/AudioStream/AudioMapping.php | 248 - .../Video/Transcoder/V1/CreateJobRequest.php | 132 - .../V1/CreateJobTemplateRequest.php | 184 - .../Video/Transcoder/V1/DeleteJobRequest.php | 124 - .../V1/DeleteJobTemplateRequest.php | 124 - .../Cloud/Video/Transcoder/V1/EditAtom.php | 209 - .../Video/Transcoder/V1/ElementaryStream.php | 177 - .../Cloud/Video/Transcoder/V1/Encryption.php | 265 - .../V1/Encryption/Aes128Encryption.php | 36 - .../Transcoder/V1/Encryption/Clearkey.php | 36 - .../Transcoder/V1/Encryption/DrmSystems.php | 212 - .../Transcoder/V1/Encryption/Fairplay.php | 36 - .../V1/Encryption/MpegCommonEncryption.php | 82 - .../Transcoder/V1/Encryption/Playready.php | 36 - .../V1/Encryption/SampleAesEncryption.php | 36 - .../V1/Encryption/SecretManagerSource.php | 86 - .../Transcoder/V1/Encryption/Widevine.php | 36 - .../Video/Transcoder/V1/GetJobRequest.php | 86 - .../Transcoder/V1/GetJobTemplateRequest.php | 91 - .../Cloud/Video/Transcoder/V1/Input.php | 165 - .../Google/Cloud/Video/Transcoder/V1/Job.php | 672 -- .../V1/Job/OptimizationStrategy.php | 64 - .../Transcoder/V1/Job/ProcessingMode.php | 67 - .../Transcoder/V1/Job/ProcessingState.php | 79 - .../Cloud/Video/Transcoder/V1/JobConfig.php | 451 - .../Cloud/Video/Transcoder/V1/JobTemplate.php | 157 - .../Transcoder/V1/ListJobTemplatesRequest.php | 234 - .../V1/ListJobTemplatesResponse.php | 135 - .../Video/Transcoder/V1/ListJobsRequest.php | 230 - .../Video/Transcoder/V1/ListJobsResponse.php | 135 - .../Cloud/Video/Transcoder/V1/Manifest.php | 197 - .../Transcoder/V1/Manifest/DashConfig.php | 74 - .../DashConfig/SegmentReferenceScheme.php | 64 - .../Transcoder/V1/Manifest/ManifestType.php | 64 - .../Cloud/Video/Transcoder/V1/MuxStream.php | 299 - .../Cloud/Video/Transcoder/V1/Output.php | 79 - .../Cloud/Video/Transcoder/V1/Overlay.php | 115 - .../Video/Transcoder/V1/Overlay/Animation.php | 144 - .../Transcoder/V1/Overlay/AnimationEnd.php | 82 - .../Transcoder/V1/Overlay/AnimationFade.php | 222 - .../Transcoder/V1/Overlay/AnimationStatic.php | 140 - .../Video/Transcoder/V1/Overlay/FadeType.php | 64 - .../Video/Transcoder/V1/Overlay/Image.php | 168 - .../V1/Overlay/NormalizedCoordinate.php | 104 - .../Transcoder/V1/PreprocessingConfig.php | 341 - .../V1/PreprocessingConfig/Audio.php | 182 - .../V1/PreprocessingConfig/Color.php | 163 - .../V1/PreprocessingConfig/Crop.php | 173 - .../V1/PreprocessingConfig/Deblock.php | 113 - .../V1/PreprocessingConfig/Deinterlace.php | 111 - .../Deinterlace/BwdifConfig.php | 178 - .../Deinterlace/YadifConfig.php | 216 - .../V1/PreprocessingConfig/Denoise.php | 121 - .../Transcoder/V1/PreprocessingConfig/Pad.php | 173 - .../Video/Transcoder/V1/PubsubDestination.php | 71 - .../Video/Transcoder/V1/SegmentSettings.php | 123 - .../Cloud/Video/Transcoder/V1/SpriteSheet.php | 575 -- .../Cloud/Video/Transcoder/V1/TextStream.php | 209 - .../Transcoder/V1/TextStream/TextMapping.php | 142 - .../Cloud/Video/Transcoder/V1/VideoStream.php | 141 - .../V1/VideoStream/H264CodecSettings.php | 994 -- .../V1/VideoStream/H265CodecSettings.php | 1008 -- .../V1/VideoStream/Vp9CodecSettings.php | 570 -- .../V1/TranscoderServiceClient/create_job.php | 74 - .../create_job_template.php | 81 - .../V1/TranscoderServiceClient/delete_job.php | 70 - .../delete_job_template.php | 74 - .../V1/TranscoderServiceClient/get_job.php | 72 - .../get_job_template.php | 77 - .../list_job_templates.php | 77 - .../V1/TranscoderServiceClient/list_jobs.php | 76 - .../src/V1/Client/TranscoderServiceClient.php | 476 - .../v1/src/V1/gapic_metadata.json | 58 - .../transcoder_service_client_config.json | 84 - .../transcoder_service_descriptor_config.php | 145 - .../transcoder_service_rest_client_config.php | 122 - .../V1/Client/TranscoderServiceClientTest.php | 676 -- .../Google/Cloud/Vision/V1/Geometry.php | 40 - .../Google/Cloud/Vision/V1/ImageAnnotator.php | Bin 11700 -> 0 bytes .../Google/Cloud/Vision/V1/ProductSearch.php | 55 - .../Cloud/Vision/V1/ProductSearchService.php | Bin 9855 -> 0 bytes .../Google/Cloud/Vision/V1/TextAnnotation.php | Bin 2489 -> 0 bytes .../Google/Cloud/Vision/V1/WebDetection.php | 51 - .../V1/AddProductToProductSetRequest.php | 140 - .../Cloud/Vision/V1/AnnotateFileRequest.php | 225 - .../Cloud/Vision/V1/AnnotateFileResponse.php | 198 - .../Cloud/Vision/V1/AnnotateImageRequest.php | 156 - .../Cloud/Vision/V1/AnnotateImageResponse.php | 617 -- .../Vision/V1/AsyncAnnotateFileRequest.php | 199 - .../Vision/V1/AsyncAnnotateFileResponse.php | 77 - .../V1/AsyncBatchAnnotateFilesRequest.php | 193 - .../V1/AsyncBatchAnnotateFilesResponse.php | 71 - .../V1/AsyncBatchAnnotateImagesRequest.php | 238 - .../V1/AsyncBatchAnnotateImagesResponse.php | 77 - .../Vision/V1/BatchAnnotateFilesRequest.php | 197 - .../Vision/V1/BatchAnnotateFilesResponse.php | 71 - .../Vision/V1/BatchAnnotateImagesRequest.php | 192 - .../Vision/V1/BatchAnnotateImagesResponse.php | 67 - .../Vision/V1/BatchOperationMetadata.php | 165 - .../V1/BatchOperationMetadata/State.php | 81 - .../src/Google/Cloud/Vision/V1/Block.php | 279 - .../Cloud/Vision/V1/Block/BlockType.php | 85 - .../Google/Cloud/Vision/V1/BoundingPoly.php | 101 - .../src/Google/Cloud/Vision/V1/ColorInfo.php | 150 - .../Cloud/Vision/V1/CreateProductRequest.php | 189 - .../Vision/V1/CreateProductSetRequest.php | 184 - .../Vision/V1/CreateReferenceImageRequest.php | 199 - .../src/Google/Cloud/Vision/V1/CropHint.php | 153 - .../Cloud/Vision/V1/CropHintsAnnotation.php | 67 - .../Cloud/Vision/V1/CropHintsParams.php | 87 - .../Cloud/Vision/V1/DeleteProductRequest.php | 92 - .../Vision/V1/DeleteProductSetRequest.php | 92 - .../Vision/V1/DeleteReferenceImageRequest.php | 92 - .../Vision/V1/DominantColorsAnnotation.php | 67 - .../Cloud/Vision/V1/EntityAnnotation.php | 422 - .../Google/Cloud/Vision/V1/FaceAnnotation.php | 627 -- .../Vision/V1/FaceAnnotation/Landmark.php | 114 - .../V1/FaceAnnotation/Landmark/Type.php | 305 - .../src/Google/Cloud/Vision/V1/Feature.php | 153 - .../Google/Cloud/Vision/V1/Feature/Type.php | 139 - .../Google/Cloud/Vision/V1/GcsDestination.php | 135 - .../src/Google/Cloud/Vision/V1/GcsSource.php | 71 - .../Cloud/Vision/V1/GetProductRequest.php | 92 - .../Cloud/Vision/V1/GetProductSetRequest.php | 92 - .../Vision/V1/GetReferenceImageRequest.php | 92 - .../src/Google/Cloud/Vision/V1/Image.php | 135 - .../Vision/V1/ImageAnnotationContext.php | 106 - .../Google/Cloud/Vision/V1/ImageContext.php | 315 - .../Cloud/Vision/V1/ImageProperties.php | 77 - .../Google/Cloud/Vision/V1/ImageSource.php | 169 - .../Vision/V1/ImportProductSetsGcsSource.php | 260 - .../V1/ImportProductSetsInputConfig.php | 78 - .../Vision/V1/ImportProductSetsRequest.php | 133 - .../Vision/V1/ImportProductSetsResponse.php | 122 - .../Google/Cloud/Vision/V1/InputConfig.php | 165 - .../Google/Cloud/Vision/V1/LatLongRect.php | 121 - .../src/Google/Cloud/Vision/V1/Likelihood.php | 83 - .../Vision/V1/ListProductSetsRequest.php | 155 - .../Vision/V1/ListProductSetsResponse.php | 105 - .../V1/ListProductsInProductSetRequest.php | 160 - .../V1/ListProductsInProductSetResponse.php | 105 - .../Cloud/Vision/V1/ListProductsRequest.php | 160 - .../Cloud/Vision/V1/ListProductsResponse.php | 105 - .../Vision/V1/ListReferenceImagesRequest.php | 168 - .../Vision/V1/ListReferenceImagesResponse.php | 135 - .../Vision/V1/LocalizedObjectAnnotation.php | 221 - .../Google/Cloud/Vision/V1/LocationInfo.php | 77 - .../Cloud/Vision/V1/NormalizedVertex.php | 103 - .../Cloud/Vision/V1/OperationMetadata.php | 155 - .../Vision/V1/OperationMetadata/State.php | 78 - .../Google/Cloud/Vision/V1/OutputConfig.php | 143 - .../proto/src/Google/Cloud/Vision/V1/Page.php | 221 - .../src/Google/Cloud/Vision/V1/Paragraph.php | 245 - .../src/Google/Cloud/Vision/V1/Position.php | 137 - .../src/Google/Cloud/Vision/V1/Product.php | 275 - .../Cloud/Vision/V1/Product/KeyValue.php | 112 - .../Cloud/Vision/V1/ProductSearchParams.php | 243 - .../Cloud/Vision/V1/ProductSearchResults.php | 165 - .../V1/ProductSearchResults/GroupedResult.php | 149 - .../ProductSearchResults/ObjectAnnotation.php | 180 - .../Vision/V1/ProductSearchResults/Result.php | 156 - .../src/Google/Cloud/Vision/V1/ProductSet.php | 231 - .../Cloud/Vision/V1/ProductSetPurgeConfig.php | 75 - .../src/Google/Cloud/Vision/V1/Property.php | 135 - .../Cloud/Vision/V1/PurgeProductsRequest.php | 203 - .../Google/Cloud/Vision/V1/ReferenceImage.php | 176 - .../V1/RemoveProductFromProductSetRequest.php | 145 - .../Cloud/Vision/V1/SafeSearchAnnotation.php | 241 - .../src/Google/Cloud/Vision/V1/Symbol.php | 245 - .../Google/Cloud/Vision/V1/TextAnnotation.php | 108 - .../V1/TextAnnotation/DetectedBreak.php | 104 - .../DetectedBreak/BreakType.php | 86 - .../V1/TextAnnotation/DetectedLanguage.php | 112 - .../Vision/V1/TextAnnotation/TextProperty.php | 114 - .../Cloud/Vision/V1/TextDetectionParams.php | 130 - .../Cloud/Vision/V1/UpdateProductRequest.php | 161 - .../Vision/V1/UpdateProductSetRequest.php | 151 - .../src/Google/Cloud/Vision/V1/Vertex.php | 102 - .../Google/Cloud/Vision/V1/WebDetection.php | 253 - .../Vision/V1/WebDetection/WebEntity.php | 142 - .../Cloud/Vision/V1/WebDetection/WebImage.php | 104 - .../Cloud/Vision/V1/WebDetection/WebLabel.php | 112 - .../Cloud/Vision/V1/WebDetection/WebPage.php | 222 - .../Cloud/Vision/V1/WebDetectionParams.php | 72 - .../proto/src/Google/Cloud/Vision/V1/Word.php | 249 - .../async_batch_annotate_files.php | 77 - .../async_batch_annotate_images.php | 83 - .../batch_annotate_files.php | 66 - .../batch_annotate_images.php | 60 - .../add_product_to_product_set.php | 86 - .../V1/ProductSearchClient/create_product.php | 83 - .../create_product_set.php | 80 - .../create_reference_image.php | 100 - .../V1/ProductSearchClient/delete_product.php | 76 - .../delete_product_set.php | 75 - .../delete_reference_image.php | 83 - .../V1/ProductSearchClient/get_product.php | 78 - .../ProductSearchClient/get_product_set.php | 78 - .../get_reference_image.php | 83 - .../import_product_sets.php | 98 - .../ProductSearchClient/list_product_sets.php | 83 - .../V1/ProductSearchClient/list_products.php | 83 - .../list_products_in_product_set.php | 85 - .../list_reference_images.php | 85 - .../V1/ProductSearchClient/purge_products.php | 105 - .../remove_product_from_product_set.php | 82 - .../V1/ProductSearchClient/update_product.php | 73 - .../update_product_set.php | 66 - .../V1/src/V1/Client/ImageAnnotatorClient.php | 387 - .../V1/src/V1/Client/ProductSearchClient.php | 988 -- .../V1/Gapic/ImageAnnotatorGapicClient.php | 667 -- .../src/V1/Gapic/ProductSearchGapicClient.php | 1603 ---- .../Vision/V1/src/V1/ImageAnnotatorClient.php | 34 - .../Vision/V1/src/V1/ProductSearchClient.php | 34 - .../Vision/V1/src/V1/gapic_metadata.json | 142 - .../image_annotator_client_config.json | 55 - .../image_annotator_descriptor_config.php | 93 - .../image_annotator_rest_client_config.php | 152 - .../product_search_client_config.json | 140 - .../product_search_descriptor_config.php | 310 - .../product_search_rest_client_config.php | 276 - .../V1/Client/ImageAnnotatorClientTest.php | 509 - .../V1/Client/ProductSearchClientTest.php | 1540 --- .../Unit/V1/ImageAnnotatorClientTest.php | 423 - .../tests/Unit/V1/ProductSearchClientTest.php | 1403 --- .../Cloud/Vmmigration/V1/Vmmigration.php | Bin 37746 -> 0 bytes .../Cloud/VMMigration/V1/AdaptingOSStep.php | 33 - .../V1/AddGroupMigrationRequest.php | 115 - .../V1/AddGroupMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/ApplianceVersion.php | 169 - .../Cloud/VMMigration/V1/AppliedLicense.php | 101 - .../VMMigration/V1/AppliedLicense/Type.php | 71 - .../Cloud/VMMigration/V1/AvailableUpdates.php | 137 - .../Cloud/VMMigration/V1/AwsSecurityGroup.php | 101 - .../Cloud/VMMigration/V1/AwsSourceDetails.php | 348 - .../AwsSourceDetails/AccessKeyCredentials.php | 104 - .../VMMigration/V1/AwsSourceDetails/State.php | 74 - .../VMMigration/V1/AwsSourceDetails/Tag.php | 104 - .../VMMigration/V1/AwsSourceVmDetails.php | 101 - .../V1/AwsSourceVmDetails/Firmware.php | 64 - .../Cloud/VMMigration/V1/AwsVmDetails.php | 645 -- .../V1/AwsVmDetails/BootOption.php | 64 - .../V1/AwsVmDetails/PowerState.php | 79 - .../V1/AwsVmDetails/VmArchitecture.php | 78 - .../V1/AwsVmDetails/VmVirtualizationType.php | 64 - .../Cloud/VMMigration/V1/AwsVmsDetails.php | 67 - .../VMMigration/V1/CancelCloneJobRequest.php | 81 - .../VMMigration/V1/CancelCloneJobResponse.php | 33 - .../V1/CancelCutoverJobRequest.php | 81 - .../V1/CancelCutoverJobResponse.php | 33 - .../Google/Cloud/VMMigration/V1/CloneJob.php | 370 - .../Cloud/VMMigration/V1/CloneJob/State.php | 100 - .../Google/Cloud/VMMigration/V1/CloneStep.php | 229 - .../V1/ComputeEngineBootOption.php | 61 - .../VMMigration/V1/ComputeEngineDiskType.php | 69 - .../V1/ComputeEngineLicenseType.php | 61 - .../V1/ComputeEngineTargetDefaults.php | 674 -- .../V1/ComputeEngineTargetDetails.php | 670 -- .../VMMigration/V1/ComputeScheduling.php | 206 - .../ComputeScheduling/OnHostMaintenance.php | 62 - .../V1/ComputeScheduling/RestartType.php | 67 - .../VMMigration/V1/CreateCloneJobRequest.php | 237 - .../V1/CreateCutoverJobRequest.php | 237 - .../V1/CreateDatacenterConnectorRequest.php | 252 - .../VMMigration/V1/CreateGroupRequest.php | 237 - .../V1/CreateMigratingVmRequest.php | 237 - .../VMMigration/V1/CreateSourceRequest.php | 237 - .../V1/CreateTargetProjectRequest.php | 237 - .../V1/CreateUtilizationReportRequest.php | 258 - .../Cloud/VMMigration/V1/CutoverJob.php | 435 - .../Cloud/VMMigration/V1/CutoverJob/State.php | 100 - .../Cloud/VMMigration/V1/CutoverStep.php | 295 - .../Google/Cloud/VMMigration/V1/CycleStep.php | 229 - .../VMMigration/V1/DatacenterConnector.php | 620 -- .../V1/DatacenterConnector/State.php | 81 - .../V1/DeleteDatacenterConnectorRequest.php | 155 - .../VMMigration/V1/DeleteGroupRequest.php | 155 - .../V1/DeleteMigratingVmRequest.php | 81 - .../VMMigration/V1/DeleteSourceRequest.php | 155 - .../V1/DeleteTargetProjectRequest.php | 155 - .../V1/DeleteUtilizationReportRequest.php | 155 - .../VMMigration/V1/FetchInventoryRequest.php | 120 - .../VMMigration/V1/FetchInventoryResponse.php | 157 - .../V1/FinalizeMigrationRequest.php | 81 - .../V1/FinalizeMigrationResponse.php | 33 - .../VMMigration/V1/GetCloneJobRequest.php | 81 - .../VMMigration/V1/GetCutoverJobRequest.php | 81 - .../V1/GetDatacenterConnectorRequest.php | 81 - .../Cloud/VMMigration/V1/GetGroupRequest.php | 81 - .../VMMigration/V1/GetMigratingVmRequest.php | 115 - .../V1/GetReplicationCycleRequest.php | 81 - .../Cloud/VMMigration/V1/GetSourceRequest.php | 81 - .../V1/GetTargetProjectRequest.php | 81 - .../V1/GetUtilizationReportRequest.php | 119 - .../src/Google/Cloud/VMMigration/V1/Group.php | 224 - .../V1/InitializingReplicationStep.php | 33 - .../V1/InstantiatingMigratedVMStep.php | 33 - .../VMMigration/V1/ListCloneJobsRequest.php | 241 - .../VMMigration/V1/ListCloneJobsResponse.php | 139 - .../VMMigration/V1/ListCutoverJobsRequest.php | 241 - .../V1/ListCutoverJobsResponse.php | 139 - .../V1/ListDatacenterConnectorsRequest.php | 245 - .../V1/ListDatacenterConnectorsResponse.php | 139 - .../VMMigration/V1/ListGroupsRequest.php | 241 - .../VMMigration/V1/ListGroupsResponse.php | 139 - .../V1/ListMigratingVmsRequest.php | 275 - .../V1/ListMigratingVmsResponse.php | 139 - .../V1/ListReplicationCyclesRequest.php | 241 - .../V1/ListReplicationCyclesResponse.php | 139 - .../VMMigration/V1/ListSourcesRequest.php | 241 - .../VMMigration/V1/ListSourcesResponse.php | 139 - .../V1/ListTargetProjectsRequest.php | 241 - .../V1/ListTargetProjectsResponse.php | 139 - .../V1/ListUtilizationReportsRequest.php | 279 - .../V1/ListUtilizationReportsResponse.php | 139 - .../Cloud/VMMigration/V1/MigratingVm.php | 796 -- .../VMMigration/V1/MigratingVm/State.php | 133 - .../Cloud/VMMigration/V1/MigratingVmView.php | 63 - .../Cloud/VMMigration/V1/MigrationError.php | 239 - .../V1/MigrationError/ErrorCode.php | 115 - .../Cloud/VMMigration/V1/NetworkInterface.php | 177 - .../VMMigration/V1/OperationMetadata.php | 307 - .../VMMigration/V1/PauseMigrationRequest.php | 67 - .../VMMigration/V1/PauseMigrationResponse.php | 33 - .../VMMigration/V1/PostProcessingStep.php | 33 - .../VMMigration/V1/PreparingVMDisksStep.php | 33 - .../V1/RemoveGroupMigrationRequest.php | 115 - .../V1/RemoveGroupMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/ReplicatingStep.php | 177 - .../Cloud/VMMigration/V1/ReplicationCycle.php | 393 - .../VMMigration/V1/ReplicationCycle/State.php | 79 - .../Cloud/VMMigration/V1/ReplicationSync.php | 81 - .../VMMigration/V1/ResumeMigrationRequest.php | 67 - .../V1/ResumeMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/SchedulePolicy.php | 119 - .../VMMigration/V1/SchedulingNodeAffinity.php | 141 - .../V1/SchedulingNodeAffinity/Operator.php | 65 - .../V1/ShuttingDownSourceVMStep.php | 33 - .../Google/Cloud/VMMigration/V1/Source.php | 299 - .../VMMigration/V1/StartMigrationRequest.php | 81 - .../VMMigration/V1/StartMigrationResponse.php | 33 - .../Cloud/VMMigration/V1/TargetProject.php | 228 - .../VMMigration/V1/UpdateGroupRequest.php | 230 - .../V1/UpdateMigratingVmRequest.php | 230 - .../VMMigration/V1/UpdateSourceRequest.php | 230 - .../V1/UpdateTargetProjectRequest.php | 230 - .../V1/UpgradeApplianceRequest.php | 141 - .../V1/UpgradeApplianceResponse.php | 33 - .../Cloud/VMMigration/V1/UpgradeStatus.php | 223 - .../VMMigration/V1/UpgradeStatus/State.php | 71 - .../VMMigration/V1/UtilizationReport.php | 446 - .../V1/UtilizationReport/State.php | 71 - .../V1/UtilizationReport/TimeFrame.php | 71 - .../VMMigration/V1/UtilizationReportView.php | 64 - .../VMMigration/V1/VmUtilizationInfo.php | 153 - .../VMMigration/V1/VmUtilizationMetrics.php | 313 - .../VMMigration/V1/VmwareSourceDetails.php | 174 - .../Cloud/VMMigration/V1/VmwareVmDetails.php | 453 - .../V1/VmwareVmDetails/BootOption.php | 64 - .../V1/VmwareVmDetails/PowerState.php | 71 - .../Cloud/VMMigration/V1/VmwareVmsDetails.php | 67 - .../VmMigrationClient/add_group_migration.php | 83 - .../V1/VmMigrationClient/cancel_clone_job.php | 89 - .../VmMigrationClient/cancel_cutover_job.php | 89 - .../V1/VmMigrationClient/create_clone_job.php | 93 - .../VmMigrationClient/create_cutover_job.php | 95 - .../create_datacenter_connector.php | 93 - .../V1/VmMigrationClient/create_group.php | 88 - .../VmMigrationClient/create_migrating_vm.php | 88 - .../V1/VmMigrationClient/create_source.php | 88 - .../create_target_project.php | 91 - .../create_utilization_report.php | 95 - .../delete_datacenter_connector.php | 85 - .../V1/VmMigrationClient/delete_group.php | 80 - .../VmMigrationClient/delete_migrating_vm.php | 85 - .../V1/VmMigrationClient/delete_source.php | 80 - .../delete_target_project.php | 87 - .../delete_utilization_report.php | 85 - .../V1/VmMigrationClient/fetch_inventory.php | 75 - .../VmMigrationClient/finalize_migration.php | 89 - .../V1/VmMigrationClient/get_clone_job.php | 77 - .../V1/VmMigrationClient/get_cutover_job.php | 77 - .../get_datacenter_connector.php | 76 - .../V1/VmMigrationClient/get_group.php | 71 - .../V1/VmMigrationClient/get_location.php | 57 - .../V1/VmMigrationClient/get_migrating_vm.php | 76 - .../get_replication_cycle.php | 77 - .../V1/VmMigrationClient/get_source.php | 71 - .../VmMigrationClient/get_target_project.php | 78 - .../get_utilization_report.php | 76 - .../V1/VmMigrationClient/list_clone_jobs.php | 87 - .../VmMigrationClient/list_cutover_jobs.php | 87 - .../list_datacenter_connectors.php | 82 - .../V1/VmMigrationClient/list_groups.php | 82 - .../V1/VmMigrationClient/list_locations.php | 62 - .../VmMigrationClient/list_migrating_vms.php | 82 - .../list_replication_cycles.php | 87 - .../V1/VmMigrationClient/list_sources.php | 82 - .../list_target_projects.php | 85 - .../list_utilization_reports.php | 82 - .../V1/VmMigrationClient/pause_migration.php | 90 - .../remove_group_migration.php | 83 - .../V1/VmMigrationClient/resume_migration.php | 91 - .../V1/VmMigrationClient/start_migration.php | 89 - .../V1/VmMigrationClient/update_group.php | 71 - .../VmMigrationClient/update_migrating_vm.php | 71 - .../V1/VmMigrationClient/update_source.php | 71 - .../update_target_project.php | 74 - .../VmMigrationClient/upgrade_appliance.php | 89 - .../v1/src/V1/Client/VmMigrationClient.php | 1847 ---- .../VmMigration/v1/src/V1/gapic_metadata.json | 258 - .../resources/vm_migration_client_config.json | 292 - .../vm_migration_descriptor_config.php | 891 -- .../vm_migration_rest_client_config.php | 682 -- .../Unit/V1/Client/VmMigrationClientTest.php | 5156 ---------- .../Cloud/Vmwareengine/V1/Vmwareengine.php | Bin 34481 -> 0 bytes .../Vmwareengine/V1/VmwareengineResources.php | Bin 16539 -> 0 bytes .../VmwareEngine/V1/AutoscalingSettings.php | 240 - .../AutoscalingSettings/AutoscalingPolicy.php | 305 - .../V1/AutoscalingSettings/Thresholds.php | 105 - .../Google/Cloud/VmwareEngine/V1/Cluster.php | 411 - .../Cloud/VmwareEngine/V1/Cluster/State.php | 87 - .../VmwareEngine/V1/CreateClusterRequest.php | 306 - .../V1/CreateExternalAccessRuleRequest.php | 313 - .../V1/CreateExternalAddressRequest.php | 313 - .../V1/CreateHcxActivationKeyRequest.php | 313 - .../V1/CreateLoggingServerRequest.php | 313 - .../CreateManagementDnsZoneBindingRequest.php | 317 - .../V1/CreateNetworkPeeringRequest.php | 308 - .../V1/CreateNetworkPolicyRequest.php | 318 - .../V1/CreatePrivateCloudRequest.php | 306 - .../V1/CreatePrivateConnectionRequest.php | 308 - .../V1/CreateVmwareEngineNetworkRequest.php | 333 - .../Cloud/VmwareEngine/V1/Credentials.php | 101 - .../VmwareEngine/V1/DeleteClusterRequest.php | 140 - .../V1/DeleteExternalAccessRuleRequest.php | 180 - .../V1/DeleteExternalAddressRequest.php | 180 - .../V1/DeleteLoggingServerRequest.php | 180 - .../DeleteManagementDnsZoneBindingRequest.php | 180 - .../V1/DeleteNetworkPeeringRequest.php | 180 - .../V1/DeleteNetworkPolicyRequest.php | 180 - .../V1/DeletePrivateCloudRequest.php | 262 - .../V1/DeletePrivateConnectionRequest.php | 180 - .../V1/DeleteVmwareEngineNetworkRequest.php | 226 - .../VmwareEngine/V1/DnsBindPermission.php | 130 - .../Cloud/VmwareEngine/V1/DnsForwarding.php | 207 - .../V1/DnsForwarding/ForwardingRule.php | 107 - .../VmwareEngine/V1/ExternalAccessRule.php | 620 -- .../V1/ExternalAccessRule/Action.php | 65 - .../V1/ExternalAccessRule/IpRange.php | 159 - .../V1/ExternalAccessRule/State.php | 78 - .../Cloud/VmwareEngine/V1/ExternalAddress.php | 342 - .../VmwareEngine/V1/ExternalAddress/State.php | 78 - ...hNetworkPolicyExternalAddressesRequest.php | 202 - ...NetworkPolicyExternalAddressesResponse.php | 110 - .../VmwareEngine/V1/GetClusterRequest.php | 102 - .../V1/GetDnsBindPermissionRequest.php | 107 - .../V1/GetDnsForwardingRequest.php | 102 - .../V1/GetExternalAccessRuleRequest.php | 102 - .../V1/GetExternalAddressRequest.php | 102 - .../V1/GetHcxActivationKeyRequest.php | 101 - .../V1/GetLoggingServerRequest.php | 102 - .../V1/GetManagementDnsZoneBindingRequest.php | 102 - .../V1/GetNetworkPeeringRequest.php | 102 - .../V1/GetNetworkPolicyRequest.php | 102 - .../Cloud/VmwareEngine/V1/GetNodeRequest.php | 92 - .../VmwareEngine/V1/GetNodeTypeRequest.php | 102 - .../V1/GetPrivateCloudRequest.php | 102 - .../V1/GetPrivateConnectionRequest.php | 102 - .../VmwareEngine/V1/GetSubnetRequest.php | 102 - .../V1/GetVmwareEngineNetworkRequest.php | 102 - .../V1/GrantDnsBindPermissionRequest.php | 241 - .../src/Google/Cloud/VmwareEngine/V1/Hcx.php | 169 - .../Cloud/VmwareEngine/V1/Hcx/State.php | 71 - .../VmwareEngine/V1/HcxActivationKey.php | 236 - .../V1/HcxActivationKey/State.php | 71 - .../VmwareEngine/V1/ListClustersRequest.php | 322 - .../VmwareEngine/V1/ListClustersResponse.php | 144 - .../V1/ListExternalAccessRulesRequest.php | 366 - .../V1/ListExternalAccessRulesResponse.php | 144 - .../V1/ListExternalAddressesRequest.php | 367 - .../V1/ListExternalAddressesResponse.php | 144 - .../V1/ListHcxActivationKeysRequest.php | 203 - .../V1/ListHcxActivationKeysResponse.php | 144 - .../V1/ListLoggingServersRequest.php | 371 - .../V1/ListLoggingServersResponse.php | 144 - .../ListManagementDnsZoneBindingsRequest.php | 371 - .../ListManagementDnsZoneBindingsResponse.php | 144 - .../V1/ListNetworkPeeringsRequest.php | 357 - .../V1/ListNetworkPeeringsResponse.php | 140 - .../V1/ListNetworkPoliciesRequest.php | 361 - .../V1/ListNetworkPoliciesResponse.php | 144 - .../VmwareEngine/V1/ListNodeTypesRequest.php | 312 - .../VmwareEngine/V1/ListNodeTypesResponse.php | 144 - .../VmwareEngine/V1/ListNodesRequest.php | 198 - .../VmwareEngine/V1/ListNodesResponse.php | 106 - .../V1/ListPeeringRoutesRequest.php | 239 - .../V1/ListPeeringRoutesResponse.php | 106 - .../V1/ListPrivateCloudsRequest.php | 362 - .../V1/ListPrivateCloudsResponse.php | 144 - ...tPrivateConnectionPeeringRoutesRequest.php | 189 - ...PrivateConnectionPeeringRoutesResponse.php | 106 - .../V1/ListPrivateConnectionsRequest.php | 357 - .../V1/ListPrivateConnectionsResponse.php | 140 - .../VmwareEngine/V1/ListSubnetsRequest.php | 199 - .../VmwareEngine/V1/ListSubnetsResponse.php | 144 - .../V1/ListVmwareEngineNetworksRequest.php | 357 - .../V1/ListVmwareEngineNetworksResponse.php | 140 - .../VmwareEngine/V1/LocationMetadata.php | 69 - .../V1/LocationMetadata/Capability.php | 58 - .../Cloud/VmwareEngine/V1/LoggingServer.php | 349 - .../V1/LoggingServer/Protocol.php | 86 - .../V1/LoggingServer/SourceType.php | 64 - .../V1/ManagementDnsZoneBinding.php | 370 - .../V1/ManagementDnsZoneBinding/State.php | 86 - .../Cloud/VmwareEngine/V1/NetworkConfig.php | 260 - .../Cloud/VmwareEngine/V1/NetworkPeering.php | 775 -- .../V1/NetworkPeering/PeerNetworkType.php | 104 - .../VmwareEngine/V1/NetworkPeering/State.php | 78 - .../Cloud/VmwareEngine/V1/NetworkPolicy.php | 470 - .../V1/NetworkPolicy/NetworkService.php | 112 - .../V1/NetworkPolicy/NetworkService/State.php | 72 - .../src/Google/Cloud/VmwareEngine/V1/Node.php | 299 - .../Cloud/VmwareEngine/V1/Node/State.php | 78 - .../Google/Cloud/VmwareEngine/V1/NodeType.php | 439 - .../VmwareEngine/V1/NodeType/Capability.php | 58 - .../Cloud/VmwareEngine/V1/NodeType/Kind.php | 64 - .../Cloud/VmwareEngine/V1/NodeTypeConfig.php | 113 - .../src/Google/Cloud/VmwareEngine/V1/Nsx.php | 169 - .../Cloud/VmwareEngine/V1/Nsx/State.php | 64 - .../VmwareEngine/V1/OperationMetadata.php | 311 - .../Cloud/VmwareEngine/V1/PeeringRoute.php | 273 - .../V1/PeeringRoute/Direction.php | 64 - .../VmwareEngine/V1/PeeringRoute/Type.php | 72 - .../Cloud/VmwareEngine/V1/Principal.php | 109 - .../Cloud/VmwareEngine/V1/PrivateCloud.php | 637 -- .../V1/PrivateCloud/ManagementCluster.php | 184 - .../VmwareEngine/V1/PrivateCloud/State.php | 94 - .../VmwareEngine/V1/PrivateCloud/Type.php | 68 - .../VmwareEngine/V1/PrivateConnection.php | 604 -- .../V1/PrivateConnection/PeeringState.php | 66 - .../V1/PrivateConnection/RoutingMode.php | 68 - .../V1/PrivateConnection/State.php | 93 - .../V1/PrivateConnection/Type.php | 79 - .../RepairManagementDnsZoneBindingRequest.php | 179 - .../V1/ResetNsxCredentialsRequest.php | 185 - .../V1/ResetVcenterCredentialsRequest.php | 251 - .../V1/RevokeDnsBindPermissionRequest.php | 241 - .../V1/ShowNsxCredentialsRequest.php | 107 - .../V1/ShowVcenterCredentialsRequest.php | 177 - .../V1/StretchedClusterConfig.php | 133 - .../Google/Cloud/VmwareEngine/V1/Subnet.php | 262 - .../Cloud/VmwareEngine/V1/Subnet/State.php | 93 - .../V1/UndeletePrivateCloudRequest.php | 140 - .../VmwareEngine/V1/UpdateClusterRequest.php | 233 - .../V1/UpdateDnsForwardingRequest.php | 235 - .../V1/UpdateExternalAccessRuleRequest.php | 235 - .../V1/UpdateExternalAddressRequest.php | 235 - .../V1/UpdateLoggingServerRequest.php | 235 - .../UpdateManagementDnsZoneBindingRequest.php | 235 - .../V1/UpdateNetworkPeeringRequest.php | 235 - .../V1/UpdateNetworkPolicyRequest.php | 235 - .../V1/UpdatePrivateCloudRequest.php | 195 - .../V1/UpdatePrivateConnectionRequest.php | 235 - .../VmwareEngine/V1/UpdateSubnetRequest.php | 157 - .../V1/UpdateVmwareEngineNetworkRequest.php | 240 - .../Google/Cloud/VmwareEngine/V1/Vcenter.php | 169 - .../Cloud/VmwareEngine/V1/Vcenter/State.php | 64 - .../VmwareEngine/V1/VmwareEngineNetwork.php | 396 - .../V1/VmwareEngineNetwork/State.php | 78 - .../V1/VmwareEngineNetwork/Type.php | 66 - .../V1/VmwareEngineNetwork/VpcNetwork.php | 117 - .../VmwareEngineNetwork/VpcNetwork/Type.php | 76 - .../V1/VmwareEngineClient/create_cluster.php | 111 - .../create_external_access_rule.php | 109 - .../create_external_address.php | 109 - .../create_hcx_activation_key.php | 108 - .../create_logging_server.php | 136 - .../create_management_dns_zone_binding.php | 116 - .../create_network_peering.php | 140 - .../create_network_policy.php | 115 - .../create_private_cloud.php | 139 - .../create_private_connection.php | 150 - .../create_vmware_engine_network.php | 118 - .../V1/VmwareEngineClient/delete_cluster.php | 92 - .../delete_external_access_rule.php | 89 - .../delete_external_address.php | 91 - .../delete_logging_server.php | 89 - .../delete_management_dns_zone_binding.php | 91 - .../delete_network_peering.php | 91 - .../delete_network_policy.php | 90 - .../delete_private_cloud.php | 101 - .../delete_private_connection.php | 90 - .../delete_vmware_engine_network.php | 91 - ...etch_network_policy_external_addresses.php | 85 - .../V1/VmwareEngineClient/get_cluster.php | 80 - .../get_dns_bind_permission.php | 78 - .../VmwareEngineClient/get_dns_forwarding.php | 79 - .../get_external_access_rule.php | 80 - .../get_external_address.php | 80 - .../get_hcx_activation_key.php | 80 - .../V1/VmwareEngineClient/get_iam_policy.php | 72 - .../V1/VmwareEngineClient/get_location.php | 57 - .../VmwareEngineClient/get_logging_server.php | 80 - .../get_management_dns_zone_binding.php | 80 - .../get_network_peering.php | 82 - .../VmwareEngineClient/get_network_policy.php | 79 - .../V1/VmwareEngineClient/get_node.php | 79 - .../V1/VmwareEngineClient/get_node_type.php | 75 - .../VmwareEngineClient/get_private_cloud.php | 75 - .../get_private_connection.php | 81 - .../V1/VmwareEngineClient/get_subnet.php | 80 - .../get_vmware_engine_network.php | 82 - .../grant_dns_bind_permission.php | 94 - .../V1/VmwareEngineClient/list_clusters.php | 84 - .../list_external_access_rules.php | 84 - .../list_external_addresses.php | 86 - .../list_hcx_activation_keys.php | 85 - .../V1/VmwareEngineClient/list_locations.php | 62 - .../list_logging_servers.php | 86 - .../list_management_dns_zone_bindings.php | 85 - .../list_network_peerings.php | 80 - .../list_network_policies.php | 79 - .../V1/VmwareEngineClient/list_node_types.php | 80 - .../V1/VmwareEngineClient/list_nodes.php | 85 - .../list_peering_routes.php | 84 - .../list_private_clouds.php | 80 - ...list_private_connection_peering_routes.php | 83 - .../list_private_connections.php | 79 - .../V1/VmwareEngineClient/list_subnets.php | 85 - .../list_vmware_engine_networks.php | 79 - .../repair_management_dns_zone_binding.php | 93 - .../reset_nsx_credentials.php | 92 - .../reset_vcenter_credentials.php | 92 - .../revoke_dns_bind_permission.php | 93 - .../V1/VmwareEngineClient/set_iam_policy.php | 77 - .../show_nsx_credentials.php | 80 - .../show_vcenter_credentials.php | 80 - .../test_iam_permissions.php | 84 - .../undelete_private_cloud.php | 90 - .../V1/VmwareEngineClient/update_cluster.php | 82 - .../update_dns_forwarding.php | 101 - .../update_external_access_rule.php | 75 - .../update_external_address.php | 80 - .../update_logging_server.php | 110 - .../update_management_dns_zone_binding.php | 75 - .../update_network_peering.php | 118 - .../update_network_policy.php | 101 - .../update_private_cloud.php | 118 - .../update_private_connection.php | 129 - .../V1/VmwareEngineClient/update_subnet.php | 79 - .../update_vmware_engine_network.php | 90 - .../v1/src/V1/Client/VmwareEngineClient.php | 2997 ------ .../v1/src/V1/gapic_metadata.json | 413 - .../vmware_engine_client_config.json | 449 - .../vmware_engine_descriptor_config.php | 1430 --- .../vmware_engine_rest_client_config.php | 1083 --- .../Unit/V1/Client/VmwareEngineClientTest.php | 8496 ----------------- .../Google/Cloud/Vpcaccess/V1/VpcAccess.php | Bin 3596 -> 0 bytes .../Google/Cloud/VpcAccess/V1/Connector.php | 421 - .../Cloud/VpcAccess/V1/Connector/State.php | 85 - .../Cloud/VpcAccess/V1/Connector/Subnet.php | 124 - .../VpcAccess/V1/CreateConnectorRequest.php | 168 - .../VpcAccess/V1/DeleteConnectorRequest.php | 81 - .../VpcAccess/V1/GetConnectorRequest.php | 81 - .../VpcAccess/V1/ListConnectorsRequest.php | 149 - .../VpcAccess/V1/ListConnectorsResponse.php | 101 - .../Cloud/VpcAccess/V1/OperationMetadata.php | 197 - .../create_connector.php | 89 - .../delete_connector.php | 81 - .../VpcAccessServiceClient/get_connector.php | 72 - .../list_connectors.php | 76 - .../VpcAccessServiceClient/list_locations.php | 62 - .../src/V1/Client/VpcAccessServiceClient.php | 428 - .../VpcAccess/v1/src/V1/gapic_metadata.json | 43 - .../vpc_access_service_client_config.json | 70 - .../vpc_access_service_descriptor_config.php | 123 - .../vpc_access_service_rest_client_config.php | 114 - .../V1/Client/VpcAccessServiceClientTest.php | 646 -- 2449 files changed, 538 insertions(+), 428875 deletions(-) delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlOperations.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php delete mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/GPBMetadata/Google/Cloud/Storageinsights/V1/Storageinsights.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php delete mode 100644 owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_location.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_locations.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php delete mode 100644 owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php delete mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php delete mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json delete mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php delete mode 100644 owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php delete mode 100644 owl-bot-staging/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/TransferTypes.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json delete mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php delete mode 100644 owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CommentService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Common.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Company.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompletionService.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Event.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Filters.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/JobService.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php delete mode 100644 owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/create_company.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php delete mode 100644 owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php delete mode 100644 owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php delete mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php delete mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php delete mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php delete mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php delete mode 100644 owl-bot-staging/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Queue.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Target.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Task.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php delete mode 100644 owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_location.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_locations.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/CloudTasksClient.php delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/Gapic/CloudTasksGapicClient.php delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php delete mode 100644 owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php delete mode 100644 owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php delete mode 100644 owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Cloudtasks.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Target.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/Gapic/CloudTasksGapicClient.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json delete mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json delete mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php delete mode 100644 owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Target.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Task.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/Gapic/CloudTasksGapicClient.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json delete mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json delete mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php delete mode 100644 owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/GPBMetadata/Google/Cloud/Telcoautomation/V1/Telcoautomation.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_location.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_locations.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json delete mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php delete mode 100644 owl-bot-staging/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTts.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTtsLrs.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechLongAudioSynthesizeClient.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_client_config.json delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_descriptor_config.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php delete mode 100644 owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/GPBMetadata/Google/Cloud/Tpu/V1/CloudTpu.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php delete mode 100644 owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php delete mode 100644 owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php delete mode 100644 owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php delete mode 100644 owl-bot-staging/Tpu/v1/src/V1/TpuClient.php delete mode 100644 owl-bot-staging/Tpu/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Tpu/v1/src/V1/resources/tpu_client_config.json delete mode 100644 owl-bot-staging/Tpu/v1/src/V1/resources/tpu_descriptor_config.php delete mode 100644 owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php delete mode 100644 owl-bot-staging/Tpu/v1/tests/Unit/V1/TpuClientTest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/GPBMetadata/Google/Cloud/Tpu/V2/CloudTpu.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php delete mode 100644 owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_location.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_locations.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php delete mode 100644 owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php delete mode 100644 owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php delete mode 100644 owl-bot-staging/Tpu/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json delete mode 100644 owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php delete mode 100644 owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php delete mode 100644 owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.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/TraceServiceGapicClient.php delete mode 100644 owl-bot-staging/Trace/v2/src/V2/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/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AdaptiveMt.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AutomlTranslation.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/Common.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/TranslationService.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php delete mode 100644 owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php delete mode 100644 owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php delete mode 100644 owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php delete mode 100644 owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php delete mode 100644 owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php delete mode 100644 owl-bot-staging/Translate/v3/src/V3/gapic_metadata.json delete mode 100644 owl-bot-staging/Translate/v3/src/V3/resources/translation_service_client_config.json delete mode 100644 owl-bot-staging/Translate/v3/src/V3/resources/translation_service_descriptor_config.php delete mode 100644 owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php delete mode 100644 owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php delete mode 100644 owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json delete mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Resources.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Service.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Sessions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VodConfigs.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Services.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php delete mode 100644 owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/TextAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/WebDetection.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php delete mode 100644 owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php delete mode 100644 owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/ProductSearchClient.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_client_config.json delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_descriptor_config.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php delete mode 100644 owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php delete mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php delete mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php delete mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php delete mode 100644 owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php delete mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php delete mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php delete mode 100644 owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php delete mode 100644 owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php delete mode 100644 owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php delete mode 100644 owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php delete mode 100644 owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php delete mode 100644 owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php delete mode 100644 owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php diff --git a/SqlAdmin/src/V1/Client/SqlBackupRunsServiceClient.php b/SqlAdmin/src/V1/Client/SqlBackupRunsServiceClient.php index 18245ffda299..ab9cb33a1785 100644 --- a/SqlAdmin/src/V1/Client/SqlBackupRunsServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlBackupRunsServiceClient.php @@ -46,10 +46,10 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface deleteAsync(SqlBackupRunsDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlBackupRunsGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlBackupRunsInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlBackupRunsListRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAsync(SqlBackupRunsDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlBackupRunsGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlBackupRunsInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlBackupRunsListRequest $request, array $optionalArgs = []) */ final class SqlBackupRunsServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlConnectServiceClient.php b/SqlAdmin/src/V1/Client/SqlConnectServiceClient.php index 2a690a9a7e89..5edf163a47f4 100644 --- a/SqlAdmin/src/V1/Client/SqlConnectServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlConnectServiceClient.php @@ -43,8 +43,8 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface generateEphemeralCertAsync(GenerateEphemeralCertRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectSettingsAsync(GetConnectSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateEphemeralCertAsync(GenerateEphemeralCertRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectSettingsAsync(GetConnectSettingsRequest $request, array $optionalArgs = []) */ final class SqlConnectServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlDatabasesServiceClient.php b/SqlAdmin/src/V1/Client/SqlDatabasesServiceClient.php index 30e27179fc91..8c56e22a30e8 100644 --- a/SqlAdmin/src/V1/Client/SqlDatabasesServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlDatabasesServiceClient.php @@ -47,12 +47,12 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface deleteAsync(SqlDatabasesDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlDatabasesGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlDatabasesInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlDatabasesListRequest $request, array $optionalArgs = []) - * @method PromiseInterface patchAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAsync(SqlDatabasesDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlDatabasesGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlDatabasesInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlDatabasesListRequest $request, array $optionalArgs = []) + * @method PromiseInterface patchAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) */ final class SqlDatabasesServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlFlagsServiceClient.php b/SqlAdmin/src/V1/Client/SqlFlagsServiceClient.php index 6b2f951b8d37..0cc81d7d1d91 100644 --- a/SqlAdmin/src/V1/Client/SqlFlagsServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlFlagsServiceClient.php @@ -41,7 +41,7 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface listAsync(SqlFlagsListRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlFlagsListRequest $request, array $optionalArgs = []) */ final class SqlFlagsServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php b/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php index d77cdccb41c7..bd944af1ab4f 100644 --- a/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php @@ -83,40 +83,40 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface acquireSsrsLeaseAsync(SqlInstancesAcquireSsrsLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface addServerCaAsync(SqlInstancesAddServerCaRequest $request, array $optionalArgs = []) - * @method PromiseInterface cloneAsync(SqlInstancesCloneRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEphemeralAsync(SqlInstancesCreateEphemeralCertRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAsync(SqlInstancesDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface demoteAsync(SqlInstancesDemoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface demoteMasterAsync(SqlInstancesDemoteMasterRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportAsync(SqlInstancesExportRequest $request, array $optionalArgs = []) - * @method PromiseInterface failoverAsync(SqlInstancesFailoverRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlInstancesGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDiskShrinkConfigAsync(SqlInstancesGetDiskShrinkConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLatestRecoveryTimeAsync(SqlInstancesGetLatestRecoveryTimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAsync(SqlInstancesImportRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlInstancesInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlInstancesListRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServerCasAsync(SqlInstancesListServerCasRequest $request, array $optionalArgs = []) - * @method PromiseInterface patchAsync(SqlInstancesPatchRequest $request, array $optionalArgs = []) - * @method PromiseInterface performDiskShrinkAsync(SqlInstancesPerformDiskShrinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface promoteReplicaAsync(SqlInstancesPromoteReplicaRequest $request, array $optionalArgs = []) - * @method PromiseInterface reencryptAsync(SqlInstancesReencryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface releaseSsrsLeaseAsync(SqlInstancesReleaseSsrsLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface rescheduleMaintenanceAsync(SqlInstancesRescheduleMaintenanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetReplicaSizeAsync(SqlInstancesResetReplicaSizeRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetSslConfigAsync(SqlInstancesResetSslConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface restartAsync(SqlInstancesRestartRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreBackupAsync(SqlInstancesRestoreBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface rotateServerCaAsync(SqlInstancesRotateServerCaRequest $request, array $optionalArgs = []) - * @method PromiseInterface startExternalSyncAsync(SqlInstancesStartExternalSyncRequest $request, array $optionalArgs = []) - * @method PromiseInterface startReplicaAsync(SqlInstancesStartReplicaRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopReplicaAsync(SqlInstancesStopReplicaRequest $request, array $optionalArgs = []) - * @method PromiseInterface switchoverAsync(SqlInstancesSwitchoverRequest $request, array $optionalArgs = []) - * @method PromiseInterface truncateLogAsync(SqlInstancesTruncateLogRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAsync(SqlInstancesUpdateRequest $request, array $optionalArgs = []) - * @method PromiseInterface verifyExternalSyncSettingsAsync(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface acquireSsrsLeaseAsync(SqlInstancesAcquireSsrsLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface addServerCaAsync(SqlInstancesAddServerCaRequest $request, array $optionalArgs = []) + * @method PromiseInterface cloneAsync(SqlInstancesCloneRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEphemeralAsync(SqlInstancesCreateEphemeralCertRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAsync(SqlInstancesDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface demoteAsync(SqlInstancesDemoteRequest $request, array $optionalArgs = []) + * @method PromiseInterface demoteMasterAsync(SqlInstancesDemoteMasterRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportAsync(SqlInstancesExportRequest $request, array $optionalArgs = []) + * @method PromiseInterface failoverAsync(SqlInstancesFailoverRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlInstancesGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDiskShrinkConfigAsync(SqlInstancesGetDiskShrinkConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLatestRecoveryTimeAsync(SqlInstancesGetLatestRecoveryTimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAsync(SqlInstancesImportRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlInstancesInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlInstancesListRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServerCasAsync(SqlInstancesListServerCasRequest $request, array $optionalArgs = []) + * @method PromiseInterface patchAsync(SqlInstancesPatchRequest $request, array $optionalArgs = []) + * @method PromiseInterface performDiskShrinkAsync(SqlInstancesPerformDiskShrinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface promoteReplicaAsync(SqlInstancesPromoteReplicaRequest $request, array $optionalArgs = []) + * @method PromiseInterface reencryptAsync(SqlInstancesReencryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface releaseSsrsLeaseAsync(SqlInstancesReleaseSsrsLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface rescheduleMaintenanceAsync(SqlInstancesRescheduleMaintenanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetReplicaSizeAsync(SqlInstancesResetReplicaSizeRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetSslConfigAsync(SqlInstancesResetSslConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface restartAsync(SqlInstancesRestartRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreBackupAsync(SqlInstancesRestoreBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface rotateServerCaAsync(SqlInstancesRotateServerCaRequest $request, array $optionalArgs = []) + * @method PromiseInterface startExternalSyncAsync(SqlInstancesStartExternalSyncRequest $request, array $optionalArgs = []) + * @method PromiseInterface startReplicaAsync(SqlInstancesStartReplicaRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopReplicaAsync(SqlInstancesStopReplicaRequest $request, array $optionalArgs = []) + * @method PromiseInterface switchoverAsync(SqlInstancesSwitchoverRequest $request, array $optionalArgs = []) + * @method PromiseInterface truncateLogAsync(SqlInstancesTruncateLogRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAsync(SqlInstancesUpdateRequest $request, array $optionalArgs = []) + * @method PromiseInterface verifyExternalSyncSettingsAsync(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $optionalArgs = []) */ final class SqlInstancesServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlOperationsServiceClient.php b/SqlAdmin/src/V1/Client/SqlOperationsServiceClient.php index 076b9c0fbbd4..cbe526e53a0c 100644 --- a/SqlAdmin/src/V1/Client/SqlOperationsServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlOperationsServiceClient.php @@ -44,9 +44,9 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface cancelAsync(SqlOperationsCancelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlOperationsGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlOperationsListRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelAsync(SqlOperationsCancelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlOperationsGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlOperationsListRequest $request, array $optionalArgs = []) */ final class SqlOperationsServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlSslCertsServiceClient.php b/SqlAdmin/src/V1/Client/SqlSslCertsServiceClient.php index a9773610c7b4..4068aa262cae 100644 --- a/SqlAdmin/src/V1/Client/SqlSslCertsServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlSslCertsServiceClient.php @@ -47,10 +47,10 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface deleteAsync(SqlSslCertsDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlSslCertsGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlSslCertsInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlSslCertsListRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAsync(SqlSslCertsDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlSslCertsGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlSslCertsInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlSslCertsListRequest $request, array $optionalArgs = []) */ final class SqlSslCertsServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlTiersServiceClient.php b/SqlAdmin/src/V1/Client/SqlTiersServiceClient.php index 0b502852ef6f..20912c5f9e76 100644 --- a/SqlAdmin/src/V1/Client/SqlTiersServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlTiersServiceClient.php @@ -41,7 +41,7 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface listAsync(SqlTiersListRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlTiersListRequest $request, array $optionalArgs = []) */ final class SqlTiersServiceClient { diff --git a/SqlAdmin/src/V1/Client/SqlUsersServiceClient.php b/SqlAdmin/src/V1/Client/SqlUsersServiceClient.php index 52302bb14f97..2374a4d2b7dc 100644 --- a/SqlAdmin/src/V1/Client/SqlUsersServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlUsersServiceClient.php @@ -47,11 +47,11 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface deleteAsync(SqlUsersDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlUsersGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlUsersInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlUsersListRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAsync(SqlUsersUpdateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAsync(SqlUsersDeleteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAsync(SqlUsersGetRequest $request, array $optionalArgs = []) + * @method PromiseInterface insertAsync(SqlUsersInsertRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAsync(SqlUsersListRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAsync(SqlUsersUpdateRequest $request, array $optionalArgs = []) */ final class SqlUsersServiceClient { diff --git a/StorageControl/src/V2/Client/StorageControlClient.php b/StorageControl/src/V2/Client/StorageControlClient.php index f7358c653c9a..f013661f907c 100644 --- a/StorageControl/src/V2/Client/StorageControlClient.php +++ b/StorageControl/src/V2/Client/StorageControlClient.php @@ -62,16 +62,16 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getManagedFolderAsync(GetManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStorageLayoutAsync(GetStorageLayoutRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFoldersAsync(ListFoldersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listManagedFoldersAsync(ListManagedFoldersRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameFolderAsync(RenameFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getManagedFolderAsync(GetManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStorageLayoutAsync(GetStorageLayoutRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFoldersAsync(ListFoldersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listManagedFoldersAsync(ListManagedFoldersRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameFolderAsync(RenameFolderRequest $request, array $optionalArgs = []) */ final class StorageControlClient { diff --git a/StorageInsights/src/V1/Client/StorageInsightsClient.php b/StorageInsights/src/V1/Client/StorageInsightsClient.php index 3150e1978763..a338ec885d75 100644 --- a/StorageInsights/src/V1/Client/StorageInsightsClient.php +++ b/StorageInsights/src/V1/Client/StorageInsightsClient.php @@ -58,15 +58,15 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createReportConfigAsync(CreateReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReportConfigAsync(DeleteReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReportConfigAsync(GetReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReportDetailAsync(GetReportDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReportConfigsAsync(ListReportConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReportDetailsAsync(ListReportDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateReportConfigAsync(UpdateReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReportConfigAsync(CreateReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReportConfigAsync(DeleteReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReportConfigAsync(GetReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReportDetailAsync(GetReportDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReportConfigsAsync(ListReportConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReportDetailsAsync(ListReportDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReportConfigAsync(UpdateReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class StorageInsightsClient { diff --git a/StorageTransfer/src/V1/Client/StorageTransferServiceClient.php b/StorageTransfer/src/V1/Client/StorageTransferServiceClient.php index f1b24e46836a..41d1ff627a69 100644 --- a/StorageTransfer/src/V1/Client/StorageTransferServiceClient.php +++ b/StorageTransfer/src/V1/Client/StorageTransferServiceClient.php @@ -69,20 +69,20 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAgentPoolAsync(CreateAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTransferJobAsync(CreateTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAgentPoolAsync(DeleteAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransferJobAsync(DeleteTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAgentPoolAsync(GetAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGoogleServiceAccountAsync(GetGoogleServiceAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransferJobAsync(GetTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAgentPoolsAsync(ListAgentPoolsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferJobsAsync(ListTransferJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseTransferOperationAsync(PauseTransferOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeTransferOperationAsync(ResumeTransferOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface runTransferJobAsync(RunTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAgentPoolAsync(UpdateAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTransferJobAsync(UpdateTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAgentPoolAsync(CreateAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTransferJobAsync(CreateTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAgentPoolAsync(DeleteAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTransferJobAsync(DeleteTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAgentPoolAsync(GetAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGoogleServiceAccountAsync(GetGoogleServiceAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTransferJobAsync(GetTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAgentPoolsAsync(ListAgentPoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTransferJobsAsync(ListTransferJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseTransferOperationAsync(PauseTransferOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeTransferOperationAsync(ResumeTransferOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface runTransferJobAsync(RunTransferJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAgentPoolAsync(UpdateAgentPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTransferJobAsync(UpdateTransferJobRequest $request, array $optionalArgs = []) */ final class StorageTransferServiceClient { diff --git a/Support/src/V2/Client/CaseAttachmentServiceClient.php b/Support/src/V2/Client/CaseAttachmentServiceClient.php index aeada38595be..d44adc2032d8 100644 --- a/Support/src/V2/Client/CaseAttachmentServiceClient.php +++ b/Support/src/V2/Client/CaseAttachmentServiceClient.php @@ -47,7 +47,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) */ final class CaseAttachmentServiceClient { diff --git a/Support/src/V2/Client/CaseServiceClient.php b/Support/src/V2/Client/CaseServiceClient.php index a4a95e040f38..6bab4803cc29 100644 --- a/Support/src/V2/Client/CaseServiceClient.php +++ b/Support/src/V2/Client/CaseServiceClient.php @@ -55,14 +55,14 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) */ final class CaseServiceClient { diff --git a/Support/src/V2/Client/CommentServiceClient.php b/Support/src/V2/Client/CommentServiceClient.php index 96e991fd6df9..a17ec076bf06 100644 --- a/Support/src/V2/Client/CommentServiceClient.php +++ b/Support/src/V2/Client/CommentServiceClient.php @@ -49,8 +49,8 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) */ final class CommentServiceClient { diff --git a/Talent/src/V4/Client/CompanyServiceClient.php b/Talent/src/V4/Client/CompanyServiceClient.php index 9485e66d45d8..63c14c67a5c3 100644 --- a/Talent/src/V4/Client/CompanyServiceClient.php +++ b/Talent/src/V4/Client/CompanyServiceClient.php @@ -52,11 +52,11 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createCompanyAsync(CreateCompanyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCompanyAsync(DeleteCompanyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCompanyAsync(GetCompanyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCompaniesAsync(ListCompaniesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCompanyAsync(UpdateCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCompanyAsync(CreateCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCompanyAsync(DeleteCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCompanyAsync(GetCompanyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCompaniesAsync(ListCompaniesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCompanyAsync(UpdateCompanyRequest $request, array $optionalArgs = []) */ final class CompanyServiceClient { diff --git a/Talent/src/V4/Client/CompletionClient.php b/Talent/src/V4/Client/CompletionClient.php index 9bcf4e0f9c53..7a5b0f9a965a 100644 --- a/Talent/src/V4/Client/CompletionClient.php +++ b/Talent/src/V4/Client/CompletionClient.php @@ -47,7 +47,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface completeQueryAsync(CompleteQueryRequest $request, array $optionalArgs = []) + * @method PromiseInterface completeQueryAsync(CompleteQueryRequest $request, array $optionalArgs = []) */ final class CompletionClient { diff --git a/Talent/src/V4/Client/EventServiceClient.php b/Talent/src/V4/Client/EventServiceClient.php index ec2d0703ea89..0b6fb7a5b45a 100644 --- a/Talent/src/V4/Client/EventServiceClient.php +++ b/Talent/src/V4/Client/EventServiceClient.php @@ -47,7 +47,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createClientEventAsync(CreateClientEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClientEventAsync(CreateClientEventRequest $request, array $optionalArgs = []) */ final class EventServiceClient { diff --git a/Talent/src/V4/Client/JobServiceClient.php b/Talent/src/V4/Client/JobServiceClient.php index c2ff40443c47..3fbb37f9737d 100644 --- a/Talent/src/V4/Client/JobServiceClient.php +++ b/Talent/src/V4/Client/JobServiceClient.php @@ -60,16 +60,16 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface batchCreateJobsAsync(BatchCreateJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchDeleteJobsAsync(BatchDeleteJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchUpdateJobsAsync(BatchUpdateJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchJobsAsync(SearchJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchJobsForAlertAsync(SearchJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateJobAsync(UpdateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCreateJobsAsync(BatchCreateJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeleteJobsAsync(BatchDeleteJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateJobsAsync(BatchUpdateJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchJobsAsync(SearchJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchJobsForAlertAsync(SearchJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateJobAsync(UpdateJobRequest $request, array $optionalArgs = []) */ final class JobServiceClient { diff --git a/Talent/src/V4/Client/TenantServiceClient.php b/Talent/src/V4/Client/TenantServiceClient.php index bdacc9264e57..70c200a761fd 100644 --- a/Talent/src/V4/Client/TenantServiceClient.php +++ b/Talent/src/V4/Client/TenantServiceClient.php @@ -52,11 +52,11 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createTenantAsync(CreateTenantRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTenantAsync(DeleteTenantRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTenantAsync(GetTenantRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTenantsAsync(ListTenantsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTenantAsync(UpdateTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTenantAsync(CreateTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTenantAsync(DeleteTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTenantAsync(GetTenantRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTenantsAsync(ListTenantsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTenantAsync(UpdateTenantRequest $request, array $optionalArgs = []) */ final class TenantServiceClient { diff --git a/Tasks/src/V2/Client/CloudTasksClient.php b/Tasks/src/V2/Client/CloudTasksClient.php index c235b01cbd71..63e400a68607 100644 --- a/Tasks/src/V2/Client/CloudTasksClient.php +++ b/Tasks/src/V2/Client/CloudTasksClient.php @@ -70,24 +70,24 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createQueueAsync(CreateQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTaskAsync(CreateTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteQueueAsync(DeleteQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTaskAsync(DeleteTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getQueueAsync(GetQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface listQueuesAsync(ListQueuesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseQueueAsync(PauseQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface purgeQueueAsync(PurgeQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeQueueAsync(ResumeQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface runTaskAsync(RunTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateQueueAsync(UpdateQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createQueueAsync(CreateQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTaskAsync(CreateTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteQueueAsync(DeleteQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTaskAsync(DeleteTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getQueueAsync(GetQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface listQueuesAsync(ListQueuesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseQueueAsync(PauseQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface purgeQueueAsync(PurgeQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeQueueAsync(ResumeQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface runTaskAsync(RunTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateQueueAsync(UpdateQueueRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class CloudTasksClient { diff --git a/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php b/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php index c575a40978b9..dfbfcaee607b 100644 --- a/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php +++ b/TelcoAutomation/src/V1/Client/TelcoAutomationClient.php @@ -101,44 +101,44 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface applyDeploymentAsync(ApplyDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface applyHydratedDeploymentAsync(ApplyHydratedDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface approveBlueprintAsync(ApproveBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface computeDeploymentStatusAsync(ComputeDeploymentStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBlueprintAsync(CreateBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDeploymentAsync(CreateDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEdgeSlmAsync(CreateEdgeSlmRequest $request, array $optionalArgs = []) - * @method PromiseInterface createOrchestrationClusterAsync(CreateOrchestrationClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBlueprintAsync(DeleteBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEdgeSlmAsync(DeleteEdgeSlmRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOrchestrationClusterAsync(DeleteOrchestrationClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface discardBlueprintChangesAsync(DiscardBlueprintChangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface discardDeploymentChangesAsync(DiscardDeploymentChangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBlueprintAsync(GetBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEdgeSlmAsync(GetEdgeSlmRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHydratedDeploymentAsync(GetHydratedDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOrchestrationClusterAsync(GetOrchestrationClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPublicBlueprintAsync(GetPublicBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBlueprintRevisionsAsync(ListBlueprintRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBlueprintsAsync(ListBlueprintsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentRevisionsAsync(ListDeploymentRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEdgeSlmsAsync(ListEdgeSlmsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHydratedDeploymentsAsync(ListHydratedDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrchestrationClustersAsync(ListOrchestrationClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPublicBlueprintsAsync(ListPublicBlueprintsRequest $request, array $optionalArgs = []) - * @method PromiseInterface proposeBlueprintAsync(ProposeBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface rejectBlueprintAsync(RejectBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeDeploymentAsync(RemoveDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackDeploymentAsync(RollbackDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchBlueprintRevisionsAsync(SearchBlueprintRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchDeploymentRevisionsAsync(SearchDeploymentRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBlueprintAsync(UpdateBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDeploymentAsync(UpdateDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateHydratedDeploymentAsync(UpdateHydratedDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface applyDeploymentAsync(ApplyDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface applyHydratedDeploymentAsync(ApplyHydratedDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface approveBlueprintAsync(ApproveBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface computeDeploymentStatusAsync(ComputeDeploymentStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBlueprintAsync(CreateBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDeploymentAsync(CreateDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEdgeSlmAsync(CreateEdgeSlmRequest $request, array $optionalArgs = []) + * @method PromiseInterface createOrchestrationClusterAsync(CreateOrchestrationClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBlueprintAsync(DeleteBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEdgeSlmAsync(DeleteEdgeSlmRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteOrchestrationClusterAsync(DeleteOrchestrationClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface discardBlueprintChangesAsync(DiscardBlueprintChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface discardDeploymentChangesAsync(DiscardDeploymentChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBlueprintAsync(GetBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEdgeSlmAsync(GetEdgeSlmRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHydratedDeploymentAsync(GetHydratedDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOrchestrationClusterAsync(GetOrchestrationClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPublicBlueprintAsync(GetPublicBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBlueprintRevisionsAsync(ListBlueprintRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBlueprintsAsync(ListBlueprintsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeploymentRevisionsAsync(ListDeploymentRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEdgeSlmsAsync(ListEdgeSlmsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHydratedDeploymentsAsync(ListHydratedDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOrchestrationClustersAsync(ListOrchestrationClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPublicBlueprintsAsync(ListPublicBlueprintsRequest $request, array $optionalArgs = []) + * @method PromiseInterface proposeBlueprintAsync(ProposeBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface rejectBlueprintAsync(RejectBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeDeploymentAsync(RemoveDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackDeploymentAsync(RollbackDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchBlueprintRevisionsAsync(SearchBlueprintRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchDeploymentRevisionsAsync(SearchDeploymentRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBlueprintAsync(UpdateBlueprintRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDeploymentAsync(UpdateDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateHydratedDeploymentAsync(UpdateHydratedDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class TelcoAutomationClient { diff --git a/TextToSpeech/src/V1/Client/TextToSpeechClient.php b/TextToSpeech/src/V1/Client/TextToSpeechClient.php index de30a4de55b1..fee05b775d9e 100644 --- a/TextToSpeech/src/V1/Client/TextToSpeechClient.php +++ b/TextToSpeech/src/V1/Client/TextToSpeechClient.php @@ -50,8 +50,8 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface listVoicesAsync(ListVoicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface synthesizeSpeechAsync(SynthesizeSpeechRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVoicesAsync(ListVoicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface synthesizeSpeechAsync(SynthesizeSpeechRequest $request, array $optionalArgs = []) */ final class TextToSpeechClient { diff --git a/TextToSpeech/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php b/TextToSpeech/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php index 4cba6f089c1d..41093acd73df 100644 --- a/TextToSpeech/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php +++ b/TextToSpeech/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php @@ -49,7 +49,7 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface synthesizeLongAudioAsync(SynthesizeLongAudioRequest $request, array $optionalArgs = []) + * @method PromiseInterface synthesizeLongAudioAsync(SynthesizeLongAudioRequest $request, array $optionalArgs = []) */ final class TextToSpeechLongAudioSynthesizeClient { diff --git a/Tpu/src/V2/Client/TpuClient.php b/Tpu/src/V2/Client/TpuClient.php index 024bf050a566..be4f90160919 100644 --- a/Tpu/src/V2/Client/TpuClient.php +++ b/Tpu/src/V2/Client/TpuClient.php @@ -72,21 +72,21 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createNodeAsync(CreateNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNodeAsync(DeleteNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateServiceIdentityAsync(GenerateServiceIdentityRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAcceleratorTypeAsync(GetAcceleratorTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGuestAttributesAsync(GetGuestAttributesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRuntimeVersionAsync(GetRuntimeVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAcceleratorTypesAsync(ListAcceleratorTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRuntimeVersionsAsync(ListRuntimeVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startNodeAsync(StartNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopNodeAsync(StopNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNodeAsync(UpdateNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNodeAsync(CreateNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNodeAsync(DeleteNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateServiceIdentityAsync(GenerateServiceIdentityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAcceleratorTypeAsync(GetAcceleratorTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGuestAttributesAsync(GetGuestAttributesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRuntimeVersionAsync(GetRuntimeVersionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAcceleratorTypesAsync(ListAcceleratorTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRuntimeVersionsAsync(ListRuntimeVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startNodeAsync(StartNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopNodeAsync(StopNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNodeAsync(UpdateNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class TpuClient { diff --git a/Trace/src/V2/Client/TraceServiceClient.php b/Trace/src/V2/Client/TraceServiceClient.php index 93a656aa45ea..da8c98f524a0 100644 --- a/Trace/src/V2/Client/TraceServiceClient.php +++ b/Trace/src/V2/Client/TraceServiceClient.php @@ -53,8 +53,8 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface batchWriteSpansAsync(BatchWriteSpansRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSpanAsync(Span $request, array $optionalArgs = []) + * @method PromiseInterface batchWriteSpansAsync(BatchWriteSpansRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSpanAsync(Span $request, array $optionalArgs = []) */ final class TraceServiceClient { diff --git a/Translate/metadata/V3/AdaptiveMt.php b/Translate/metadata/V3/AdaptiveMt.php index 3b461863ad49b04b652d647510ce6a6a3afce186..3519bbd86b75191729b2398fce72d1ec5f870c65 100644 GIT binary patch delta 77 zcmX@C{ZV_vB_@{hs$AL=y|p(pGGAh0>gL#dmED<{X$s?HN$zwNA#EV>{Wo}_&Y-MB^1hc6w`y#XN8kYb7 delta 27 jcmcb#m~qKs#tpMs824bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $ignore_case = false; + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $contextual_translation_enabled = false; /** * Constructor. @@ -48,6 +55,9 @@ class GlossaryConfig extends \Google\Protobuf\Internal\Message * @type bool $ignore_case * Optional. Indicates match is case insensitive. The default value is * `false` if missing. + * @type bool $contextual_translation_enabled + * Optional. If set to true, the glossary will be used for contextual + * translation. * } */ public function __construct($data = NULL) { @@ -115,6 +125,34 @@ public function setIgnoreCase($var) return $this; } + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getContextualTranslationEnabled() + { + return $this->contextual_translation_enabled; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setContextualTranslationEnabled($var) + { + GPBUtil::checkBool($var); + $this->contextual_translation_enabled = $var; + + return $this; + } + } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/Translate/src/V3/Client/TranslationServiceClient.php b/Translate/src/V3/Client/TranslationServiceClient.php index 07a9091209c8..42c3d39832d8 100644 --- a/Translate/src/V3/Client/TranslationServiceClient.php +++ b/Translate/src/V3/Client/TranslationServiceClient.php @@ -100,44 +100,44 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) */ final class TranslationServiceClient { diff --git a/Translate/src/V3/TranslateTextGlossaryConfig.php b/Translate/src/V3/TranslateTextGlossaryConfig.php index f99bf2b04950..2edd102cf343 100644 --- a/Translate/src/V3/TranslateTextGlossaryConfig.php +++ b/Translate/src/V3/TranslateTextGlossaryConfig.php @@ -32,6 +32,13 @@ class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $ignore_case = false; + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $contextual_translation_enabled = false; /** * Constructor. @@ -47,6 +54,9 @@ class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message * @type bool $ignore_case * Optional. Indicates match is case insensitive. The default value is `false` * if missing. + * @type bool $contextual_translation_enabled + * Optional. If set to true, the glossary will be used for contextual + * translation. * } */ public function __construct($data = NULL) { @@ -114,5 +124,33 @@ public function setIgnoreCase($var) return $this; } + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getContextualTranslationEnabled() + { + return $this->contextual_translation_enabled; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setContextualTranslationEnabled($var) + { + GPBUtil::checkBool($var); + $this->contextual_translation_enabled = $var; + + return $this; + } + } diff --git a/VideoIntelligence/src/V1/Client/VideoIntelligenceServiceClient.php b/VideoIntelligence/src/V1/Client/VideoIntelligenceServiceClient.php index dd3dc22d8d16..3cae5880936d 100644 --- a/VideoIntelligence/src/V1/Client/VideoIntelligenceServiceClient.php +++ b/VideoIntelligence/src/V1/Client/VideoIntelligenceServiceClient.php @@ -45,7 +45,7 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * - * @method PromiseInterface annotateVideoAsync(AnnotateVideoRequest $request, array $optionalArgs = []) + * @method PromiseInterface annotateVideoAsync(AnnotateVideoRequest $request, array $optionalArgs = []) */ final class VideoIntelligenceServiceClient { diff --git a/VideoLiveStream/src/V1/Client/LivestreamServiceClient.php b/VideoLiveStream/src/V1/Client/LivestreamServiceClient.php index 548cd8a08028..bea00f58aad0 100644 --- a/VideoLiveStream/src/V1/Client/LivestreamServiceClient.php +++ b/VideoLiveStream/src/V1/Client/LivestreamServiceClient.php @@ -88,34 +88,34 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createAssetAsync(CreateAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createChannelAsync(CreateChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClipAsync(CreateClipRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEventAsync(CreateEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInputAsync(CreateInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteChannelAsync(DeleteChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClipAsync(DeleteClipRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEventAsync(DeleteEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInputAsync(DeleteInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getChannelAsync(GetChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClipAsync(GetClipRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEventAsync(GetEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInputAsync(GetInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPoolAsync(GetPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listChannelsAsync(ListChannelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClipsAsync(ListClipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInputsAsync(ListInputsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startChannelAsync(StartChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopChannelAsync(StopChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateChannelAsync(UpdateChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInputAsync(UpdateInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePoolAsync(UpdatePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAssetAsync(CreateAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createChannelAsync(CreateChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClipAsync(CreateClipRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEventAsync(CreateEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInputAsync(CreateInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteChannelAsync(DeleteChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClipAsync(DeleteClipRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEventAsync(DeleteEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInputAsync(DeleteInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getChannelAsync(GetChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClipAsync(GetClipRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEventAsync(GetEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInputAsync(GetInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPoolAsync(GetPoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listChannelsAsync(ListChannelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClipsAsync(ListClipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInputsAsync(ListInputsRequest $request, array $optionalArgs = []) + * @method PromiseInterface startChannelAsync(StartChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopChannelAsync(StopChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateChannelAsync(UpdateChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInputAsync(UpdateInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePoolAsync(UpdatePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class LivestreamServiceClient { diff --git a/VideoStitcher/src/V1/Client/VideoStitcherServiceClient.php b/VideoStitcher/src/V1/Client/VideoStitcherServiceClient.php index 6deadb0b97f5..b2b8b48ad5ee 100644 --- a/VideoStitcher/src/V1/Client/VideoStitcherServiceClient.php +++ b/VideoStitcher/src/V1/Client/VideoStitcherServiceClient.php @@ -92,36 +92,36 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createCdnKeyAsync(CreateCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLiveConfigAsync(CreateLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLiveSessionAsync(CreateLiveSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSlateAsync(CreateSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVodConfigAsync(CreateVodConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVodSessionAsync(CreateVodSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCdnKeyAsync(DeleteCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLiveConfigAsync(DeleteLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSlateAsync(DeleteSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVodConfigAsync(DeleteVodConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCdnKeyAsync(GetCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLiveAdTagDetailAsync(GetLiveAdTagDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLiveConfigAsync(GetLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLiveSessionAsync(GetLiveSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSlateAsync(GetSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodAdTagDetailAsync(GetVodAdTagDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodConfigAsync(GetVodConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodSessionAsync(GetVodSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodStitchDetailAsync(GetVodStitchDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCdnKeysAsync(ListCdnKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLiveAdTagDetailsAsync(ListLiveAdTagDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLiveConfigsAsync(ListLiveConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSlatesAsync(ListSlatesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVodAdTagDetailsAsync(ListVodAdTagDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVodConfigsAsync(ListVodConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVodStitchDetailsAsync(ListVodStitchDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCdnKeyAsync(UpdateCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLiveConfigAsync(UpdateLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSlateAsync(UpdateSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVodConfigAsync(UpdateVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCdnKeyAsync(CreateCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLiveConfigAsync(CreateLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLiveSessionAsync(CreateLiveSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSlateAsync(CreateSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVodConfigAsync(CreateVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVodSessionAsync(CreateVodSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCdnKeyAsync(DeleteCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLiveConfigAsync(DeleteLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSlateAsync(DeleteSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVodConfigAsync(DeleteVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCdnKeyAsync(GetCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLiveAdTagDetailAsync(GetLiveAdTagDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLiveConfigAsync(GetLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLiveSessionAsync(GetLiveSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSlateAsync(GetSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodAdTagDetailAsync(GetVodAdTagDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodConfigAsync(GetVodConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodSessionAsync(GetVodSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVodStitchDetailAsync(GetVodStitchDetailRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCdnKeysAsync(ListCdnKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLiveAdTagDetailsAsync(ListLiveAdTagDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLiveConfigsAsync(ListLiveConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSlatesAsync(ListSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVodAdTagDetailsAsync(ListVodAdTagDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVodConfigsAsync(ListVodConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVodStitchDetailsAsync(ListVodStitchDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCdnKeyAsync(UpdateCdnKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLiveConfigAsync(UpdateLiveConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSlateAsync(UpdateSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVodConfigAsync(UpdateVodConfigRequest $request, array $optionalArgs = []) */ final class VideoStitcherServiceClient { diff --git a/VideoTranscoder/src/V1/Client/TranscoderServiceClient.php b/VideoTranscoder/src/V1/Client/TranscoderServiceClient.php index 92e40fb9dd7b..428937a678a6 100644 --- a/VideoTranscoder/src/V1/Client/TranscoderServiceClient.php +++ b/VideoTranscoder/src/V1/Client/TranscoderServiceClient.php @@ -61,14 +61,14 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createJobTemplateAsync(CreateJobTemplateRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobTemplateAsync(DeleteJobTemplateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobTemplateAsync(GetJobTemplateRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobTemplatesAsync(ListJobTemplatesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createJobTemplateAsync(CreateJobTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteJobTemplateAsync(DeleteJobTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getJobTemplateAsync(GetJobTemplateRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobTemplatesAsync(ListJobTemplatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) */ final class TranscoderServiceClient { diff --git a/Vision/src/V1/Client/ImageAnnotatorClient.php b/Vision/src/V1/Client/ImageAnnotatorClient.php index 316bf7bb6068..2c72737cf8c0 100644 --- a/Vision/src/V1/Client/ImageAnnotatorClient.php +++ b/Vision/src/V1/Client/ImageAnnotatorClient.php @@ -60,10 +60,10 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchAnnotateFilesAsync(BatchAnnotateFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchAnnotateImagesAsync(BatchAnnotateImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchAnnotateFilesAsync(BatchAnnotateFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchAnnotateImagesAsync(BatchAnnotateImagesRequest $request, array $optionalArgs = []) */ final class ImageAnnotatorClient { diff --git a/Vision/src/V1/Client/ProductSearchClient.php b/Vision/src/V1/Client/ProductSearchClient.php index cac9c44240b6..0a21d64767ce 100644 --- a/Vision/src/V1/Client/ProductSearchClient.php +++ b/Vision/src/V1/Client/ProductSearchClient.php @@ -88,25 +88,25 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface addProductToProductSetAsync(AddProductToProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProductAsync(CreateProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProductSetAsync(CreateProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReferenceImageAsync(CreateReferenceImageRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProductAsync(DeleteProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProductSetAsync(DeleteProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReferenceImageAsync(DeleteReferenceImageRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProductAsync(GetProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProductSetAsync(GetProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReferenceImageAsync(GetReferenceImageRequest $request, array $optionalArgs = []) - * @method PromiseInterface importProductSetsAsync(ImportProductSetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProductSetsAsync(ListProductSetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProductsAsync(ListProductsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProductsInProductSetAsync(ListProductsInProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReferenceImagesAsync(ListReferenceImagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface purgeProductsAsync(PurgeProductsRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeProductFromProductSetAsync(RemoveProductFromProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProductAsync(UpdateProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProductSetAsync(UpdateProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface addProductToProductSetAsync(AddProductToProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProductAsync(CreateProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProductSetAsync(CreateProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReferenceImageAsync(CreateReferenceImageRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProductAsync(DeleteProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProductSetAsync(DeleteProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReferenceImageAsync(DeleteReferenceImageRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProductAsync(GetProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProductSetAsync(GetProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReferenceImageAsync(GetReferenceImageRequest $request, array $optionalArgs = []) + * @method PromiseInterface importProductSetsAsync(ImportProductSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProductSetsAsync(ListProductSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProductsAsync(ListProductsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProductsInProductSetAsync(ListProductsInProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReferenceImagesAsync(ListReferenceImagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface purgeProductsAsync(PurgeProductsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeProductFromProductSetAsync(RemoveProductFromProductSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProductAsync(UpdateProductRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProductSetAsync(UpdateProductSetRequest $request, array $optionalArgs = []) */ final class ProductSearchClient { diff --git a/VmMigration/src/V1/Client/VmMigrationClient.php b/VmMigration/src/V1/Client/VmMigrationClient.php index 6770977e510e..78823152c534 100644 --- a/VmMigration/src/V1/Client/VmMigrationClient.php +++ b/VmMigration/src/V1/Client/VmMigrationClient.php @@ -108,54 +108,54 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCloneJobAsync(CreateCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCutoverJobAsync(CreateCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatacenterConnectorAsync(CreateDatacenterConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMigratingVmAsync(CreateMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSourceAsync(CreateSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTargetProjectAsync(CreateTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUtilizationReportAsync(CreateUtilizationReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMigratingVmAsync(DeleteMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSourceAsync(DeleteSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTargetProjectAsync(DeleteTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUtilizationReportAsync(DeleteUtilizationReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface finalizeMigrationAsync(FinalizeMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCloneJobAsync(GetCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCutoverJobAsync(GetCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatacenterConnectorAsync(GetDatacenterConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMigratingVmAsync(GetMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReplicationCycleAsync(GetReplicationCycleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTargetProjectAsync(GetTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUtilizationReportAsync(GetUtilizationReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCloneJobsAsync(ListCloneJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCutoverJobsAsync(ListCutoverJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatacenterConnectorsAsync(ListDatacenterConnectorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMigratingVmsAsync(ListMigratingVmsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReplicationCyclesAsync(ListReplicationCyclesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTargetProjectsAsync(ListTargetProjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUtilizationReportsAsync(ListUtilizationReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseMigrationAsync(PauseMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeGroupMigrationAsync(RemoveGroupMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeMigrationAsync(ResumeMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMigratingVmAsync(UpdateMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTargetProjectAsync(UpdateTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface upgradeApplianceAsync(UpgradeApplianceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCloneJobAsync(CreateCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCutoverJobAsync(CreateCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatacenterConnectorAsync(CreateDatacenterConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMigratingVmAsync(CreateMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSourceAsync(CreateSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTargetProjectAsync(CreateTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUtilizationReportAsync(CreateUtilizationReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMigratingVmAsync(DeleteMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSourceAsync(DeleteSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTargetProjectAsync(DeleteTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUtilizationReportAsync(DeleteUtilizationReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface finalizeMigrationAsync(FinalizeMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCloneJobAsync(GetCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCutoverJobAsync(GetCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatacenterConnectorAsync(GetDatacenterConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMigratingVmAsync(GetMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReplicationCycleAsync(GetReplicationCycleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTargetProjectAsync(GetTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUtilizationReportAsync(GetUtilizationReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCloneJobsAsync(ListCloneJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCutoverJobsAsync(ListCutoverJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatacenterConnectorsAsync(ListDatacenterConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMigratingVmsAsync(ListMigratingVmsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReplicationCyclesAsync(ListReplicationCyclesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTargetProjectsAsync(ListTargetProjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUtilizationReportsAsync(ListUtilizationReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseMigrationAsync(PauseMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeGroupMigrationAsync(RemoveGroupMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeMigrationAsync(ResumeMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMigratingVmAsync(UpdateMigratingVmRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTargetProjectAsync(UpdateTargetProjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface upgradeApplianceAsync(UpgradeApplianceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class VmMigrationClient { diff --git a/VmwareEngine/src/V1/Client/VmwareEngineClient.php b/VmwareEngine/src/V1/Client/VmwareEngineClient.php index 22767cf25bf9..bec62a14f57c 100644 --- a/VmwareEngine/src/V1/Client/VmwareEngineClient.php +++ b/VmwareEngine/src/V1/Client/VmwareEngineClient.php @@ -148,85 +148,85 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExternalAccessRuleAsync(CreateExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExternalAddressAsync(CreateExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface createHcxActivationKeyAsync(CreateHcxActivationKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLoggingServerAsync(CreateLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface createManagementDnsZoneBindingAsync(CreateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface createNetworkPeeringAsync(CreateNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface createNetworkPolicyAsync(CreateNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPrivateCloudAsync(CreatePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPrivateConnectionAsync(CreatePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVmwareEngineNetworkAsync(CreateVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExternalAccessRuleAsync(DeleteExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExternalAddressAsync(DeleteExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLoggingServerAsync(DeleteLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteManagementDnsZoneBindingAsync(DeleteManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNetworkPeeringAsync(DeleteNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNetworkPolicyAsync(DeleteNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePrivateCloudAsync(DeletePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePrivateConnectionAsync(DeletePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVmwareEngineNetworkAsync(DeleteVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchNetworkPolicyExternalAddressesAsync(FetchNetworkPolicyExternalAddressesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDnsBindPermissionAsync(GetDnsBindPermissionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDnsForwardingAsync(GetDnsForwardingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExternalAccessRuleAsync(GetExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExternalAddressAsync(GetExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHcxActivationKeyAsync(GetHcxActivationKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLoggingServerAsync(GetLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface getManagementDnsZoneBindingAsync(GetManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNetworkPeeringAsync(GetNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNetworkPolicyAsync(GetNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNodeTypeAsync(GetNodeTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPrivateCloudAsync(GetPrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPrivateConnectionAsync(GetPrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSubnetAsync(GetSubnetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVmwareEngineNetworkAsync(GetVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface grantDnsBindPermissionAsync(GrantDnsBindPermissionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExternalAccessRulesAsync(ListExternalAccessRulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExternalAddressesAsync(ListExternalAddressesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHcxActivationKeysAsync(ListHcxActivationKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLoggingServersAsync(ListLoggingServersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listManagementDnsZoneBindingsAsync(ListManagementDnsZoneBindingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworkPeeringsAsync(ListNetworkPeeringsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworkPoliciesAsync(ListNetworkPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNodeTypesAsync(ListNodeTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPeeringRoutesAsync(ListPeeringRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateCloudsAsync(ListPrivateCloudsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateConnectionPeeringRoutesAsync(ListPrivateConnectionPeeringRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateConnectionsAsync(ListPrivateConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSubnetsAsync(ListSubnetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVmwareEngineNetworksAsync(ListVmwareEngineNetworksRequest $request, array $optionalArgs = []) - * @method PromiseInterface repairManagementDnsZoneBindingAsync(RepairManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetNsxCredentialsAsync(ResetNsxCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetVcenterCredentialsAsync(ResetVcenterCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface revokeDnsBindPermissionAsync(RevokeDnsBindPermissionRequest $request, array $optionalArgs = []) - * @method PromiseInterface showNsxCredentialsAsync(ShowNsxCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface showVcenterCredentialsAsync(ShowVcenterCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeletePrivateCloudAsync(UndeletePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDnsForwardingAsync(UpdateDnsForwardingRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExternalAccessRuleAsync(UpdateExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExternalAddressAsync(UpdateExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLoggingServerAsync(UpdateLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateManagementDnsZoneBindingAsync(UpdateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNetworkPeeringAsync(UpdateNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNetworkPolicyAsync(UpdateNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePrivateCloudAsync(UpdatePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePrivateConnectionAsync(UpdatePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSubnetAsync(UpdateSubnetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVmwareEngineNetworkAsync(UpdateVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createExternalAccessRuleAsync(CreateExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createExternalAddressAsync(CreateExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface createHcxActivationKeyAsync(CreateHcxActivationKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLoggingServerAsync(CreateLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface createManagementDnsZoneBindingAsync(CreateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNetworkPeeringAsync(CreateNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface createNetworkPolicyAsync(CreateNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPrivateCloudAsync(CreatePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPrivateConnectionAsync(CreatePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVmwareEngineNetworkAsync(CreateVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExternalAccessRuleAsync(DeleteExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExternalAddressAsync(DeleteExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLoggingServerAsync(DeleteLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteManagementDnsZoneBindingAsync(DeleteManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNetworkPeeringAsync(DeleteNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNetworkPolicyAsync(DeleteNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePrivateCloudAsync(DeletePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePrivateConnectionAsync(DeletePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVmwareEngineNetworkAsync(DeleteVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchNetworkPolicyExternalAddressesAsync(FetchNetworkPolicyExternalAddressesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsBindPermissionAsync(GetDnsBindPermissionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDnsForwardingAsync(GetDnsForwardingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExternalAccessRuleAsync(GetExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExternalAddressAsync(GetExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHcxActivationKeyAsync(GetHcxActivationKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLoggingServerAsync(GetLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface getManagementDnsZoneBindingAsync(GetManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNetworkPeeringAsync(GetNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNetworkPolicyAsync(GetNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNodeTypeAsync(GetNodeTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPrivateCloudAsync(GetPrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPrivateConnectionAsync(GetPrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSubnetAsync(GetSubnetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVmwareEngineNetworkAsync(GetVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface grantDnsBindPermissionAsync(GrantDnsBindPermissionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExternalAccessRulesAsync(ListExternalAccessRulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExternalAddressesAsync(ListExternalAddressesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHcxActivationKeysAsync(ListHcxActivationKeysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLoggingServersAsync(ListLoggingServersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listManagementDnsZoneBindingsAsync(ListManagementDnsZoneBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworkPeeringsAsync(ListNetworkPeeringsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNetworkPoliciesAsync(ListNetworkPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNodeTypesAsync(ListNodeTypesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPeeringRoutesAsync(ListPeeringRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateCloudsAsync(ListPrivateCloudsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateConnectionPeeringRoutesAsync(ListPrivateConnectionPeeringRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateConnectionsAsync(ListPrivateConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSubnetsAsync(ListSubnetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVmwareEngineNetworksAsync(ListVmwareEngineNetworksRequest $request, array $optionalArgs = []) + * @method PromiseInterface repairManagementDnsZoneBindingAsync(RepairManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetNsxCredentialsAsync(ResetNsxCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetVcenterCredentialsAsync(ResetVcenterCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface revokeDnsBindPermissionAsync(RevokeDnsBindPermissionRequest $request, array $optionalArgs = []) + * @method PromiseInterface showNsxCredentialsAsync(ShowNsxCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface showVcenterCredentialsAsync(ShowVcenterCredentialsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeletePrivateCloudAsync(UndeletePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDnsForwardingAsync(UpdateDnsForwardingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExternalAccessRuleAsync(UpdateExternalAccessRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExternalAddressAsync(UpdateExternalAddressRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLoggingServerAsync(UpdateLoggingServerRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateManagementDnsZoneBindingAsync(UpdateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNetworkPeeringAsync(UpdateNetworkPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNetworkPolicyAsync(UpdateNetworkPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePrivateCloudAsync(UpdatePrivateCloudRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePrivateConnectionAsync(UpdatePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSubnetAsync(UpdateSubnetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVmwareEngineNetworkAsync(UpdateVmwareEngineNetworkRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) */ final class VmwareEngineClient { diff --git a/VpcAccess/src/V1/Client/VpcAccessServiceClient.php b/VpcAccess/src/V1/Client/VpcAccessServiceClient.php index 0cb7eca0b92a..64e2986d4c7d 100644 --- a/VpcAccess/src/V1/Client/VpcAccessServiceClient.php +++ b/VpcAccess/src/V1/Client/VpcAccessServiceClient.php @@ -57,11 +57,11 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface createConnectorAsync(CreateConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConnectorAsync(DeleteConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectorAsync(GetConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConnectorsAsync(ListConnectorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createConnectorAsync(CreateConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConnectorAsync(DeleteConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectorAsync(GetConnectorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConnectorsAsync(ListConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ final class VpcAccessServiceClient { diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php deleted file mode 100644 index 3f0ba3ef12ce..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' -Ë -?google/cloud/sql/v1/cloud_sql_available_database_versions.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2A -#SqlAvailableDatabaseVersionsServiceÊAsqladmin.googleapis.comBn -com.google.cloud.sql.v1B&CloudSqlAvailableDatabaseVersionsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php deleted file mode 100644 index 656eb56e3d78b4771af9b4b025799d3c6be34b5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3592 zcmbtX&r{o05Uw#8yaeJXKkT8?Msbn`DA>iBHXT#a@ectWi0xoIopd~-k>zJlktHEL zK}gD_ryhFip*^)TJ@?P(smJyo=%If|_dUr%7zdIx2Vy<#e*3*|ceU?*@ujtA!Ci5K z7{pd6>583Wk?s-EvQ28LrY?5eUXR$KYW6KnCw4{@%QdlDYl>32(!7JNj_KMe$&0(D zxvP_`s+(>%>m2CW!xisA#s|5hsQa!Z+pghcI5vQx^oe6BDiJs8#V3R+U4<&`4Gz;T zF_?DaKyN==Sp`sa#c@Qwh-*a-wu4yk3Pk*8xgA|oMTaUB|GTF-vSw&hQ*`YmZfQ;I zDY`=t=DcmsHB_pZhR7UhhDzoaL=ThM-m^@UU`-sbsxwtkk#@zP#5NSYT_%odYZf)_ zI-2J5yMzW>vX%J-KP-dOdg8ptF`qw2a!sVROTy7b(I(WjjaAN@0h|QC+9Nb8SX#Sa z7$#G}G@N|?bWf)cuX8Nv8ZqeG`K)V1?-t3Pa;Ta1o4bZ{>m?d@)vXbwD!%a1ibXN7JzNYOgh^n4&HllTGreiO29SU1nYJktolvqv4qVht z02tG{sfZYvj|vHx(hSrRJ0UfOD{FXVt9Il1sdl9{SbqA5LLJW!A~qB6%{f77}%zs?*td@BHtyLB8DF+cByp^CWvjD zc50HF-W`w%_d}*;u^EG(CW)B}4`G}hTO>7wF0;A&BVEEeG|^bVtaSZPE&`?E=o=S4 zg=@I=PpH7HVPL;ju5rYLH$e1@xIfTT8#^{0F73uBsCiAt?k4FGi+>C>UDe>6K+7FENx58 zO06o_rD~bEPhufo4OV@eDdxu)(J#KZ4Ku+mcy4aP`=JeNRjTFl)Em`8y|GzqB6ZwI zee-#vQYvgG#ui(U2+&Xy-b{Dlb_kFu(tKW*hCpW^UT8IIPYO*g2tMLI%F>fUwVW8s z{S<>6VO*y{>_bf@!Y>hsd1FS%UR-zV9Cv0Q&5iz$2cM60>AS!G{c&tRzW znW_02f~VS*xpt4!pS_!Qc|LH3-y$&1I$2o0T)ohko%?vCc_81JuS5DVr~0|@j#THq z{j-pC4s@m4*9<={9>tst-evwO$a|DpPClDGIyxG9nN?i6=iObFEnT5K)9x=_W{!dI z@WM(z!vhv&NMfK-`zJrPz2HsE!9m9C<585~rjR)nJ4UfOtNd>##wY&6 d2f^`m$-6;>E*xxpXzGZ|2DkJs1t)L<@E@7Re)#|Z diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php deleted file mode 100644 index 9c37134791ac4c5e96c589d0443ed8cc5a5b30ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2697 zcmbVO-A?016m9^qy8~sZX+?;(>})^+x{EE+Ri%c~%5g#z2}ne;dr?`kCiWzm;@HMB z0nsfteT4Qw`W{uU+S^`KYTu!^J@(ikgs{6Q7hq=2?{~g)=6v-{&q)&N3Y>KOm(lHgpA%d9I*o0|BCd}r!YrfvwN62;w z=QuuuGea6eZxDu`V9<7%jkzEK{%kUCF^>sGT=qTWa)3L;GlqmHY3^1z=zxqa2ir0f&-v1Yo4H?M_jW^xgD}V_+bM?i^VP#LlC2r?VZGJWR7+4 zwv4e@yc6UB7U6)7ddE1VVi0=!aomxC>*1F<0WdvartW!ugo5w!V(})Y8x!{_8ZM)r zm`>-AQP(Na9=TwC`2MP+g_Tu?f}T>zpee#0R--%s(n8AbAHqCe!ms?FNkbptwL{*XPl6yLG z(TSk9+6nfF!0y|9hbhE~_Rqw)n>x`1cKvC`hjE`pnd z!dePt+B|AHq$G`Bp-=D0jt4NiDe!TLrfEwSM@{q&78ib+Lm%C|j!kF-W>e*t3{vhk zs-mVb-fD=uf(hce&5813^vD}O{_)SxGY86k^ztYD&b2qm*R_@o1vpDTuQgjf=jjYl ze#-zel4ayp^_9JeK}?iQ<1S32BH_;;#aSHY^(nG|$6u~bw<0cPKFj^^tG)`;oj85w zCBeXS=PImIzw1^{h=3P0?eg++>{25G(Ua@bZr~Ep@x%U$cZq|eX#PRr)!1PPI&~F1 zO+umcar_wHP^J-WIE~D=JCYO0Fa~X{>&NRH#0_-?A3=LR{@tFBDgOD^@GX2HH<^*e Q=ia3!mXyoMHM&OVKc*vnPyhe` diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php deleted file mode 100644 index 6832b2da3391..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' -„ --google/cloud/sql/v1/cloud_sql_databases.protogoogle.cloud.sql.v1google/api/client.proto-google/cloud/sql/v1/cloud_sql_resources.proto"P -SqlDatabasesDeleteRequest -database (  -instance (  -project ( "M -SqlDatabasesGetRequest -database (  -instance (  -project ( "k -SqlDatabasesInsertRequest -instance (  -project ( + -bodyd ( 2.google.cloud.sql.v1.Database"< -SqlDatabasesListRequest -instance (  -project ( "} -SqlDatabasesUpdateRequest -database (  -instance (  -project ( + -bodyd ( 2.google.cloud.sql.v1.Database"S -DatabasesListResponse -kind ( , -items ( 2.google.cloud.sql.v1.Database2í -SqlDatabasesService¢ -Delete..google.cloud.sql.v1.SqlDatabasesDeleteRequest.google.cloud.sql.v1.Operation"H‚Óä“B*@/v1/projects/{project}/instances/{instance}/databases/{database}› -Get+.google.cloud.sql.v1.SqlDatabasesGetRequest.google.cloud.sql.v1.Database"H‚Óä“B@/v1/projects/{project}/instances/{instance}/databases/{database} -Insert..google.cloud.sql.v1.SqlDatabasesInsertRequest.google.cloud.sql.v1.Operation"C‚Óä“="5/v1/projects/{project}/instances/{instance}/databases:bodyŸ -List,.google.cloud.sql.v1.SqlDatabasesListRequest*.google.cloud.sql.v1.DatabasesListResponse"=‚Óä“75/v1/projects/{project}/instances/{instance}/databases§ -Patch..google.cloud.sql.v1.SqlDatabasesUpdateRequest.google.cloud.sql.v1.Operation"N‚Óä“H2@/v1/projects/{project}/instances/{instance}/databases/{database}:body¨ -Update..google.cloud.sql.v1.SqlDatabasesUpdateRequest.google.cloud.sql.v1.Operation"N‚Óä“H@/v1/projects/{project}/instances/{instance}/databases/{database}:body|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB^ -com.google.cloud.sql.v1BCloudSqlDatabasesProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php deleted file mode 100644 index 481a3e1354b7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' - -*google/cloud/sql/v1/cloud_sql_events.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2. -SqlEventsServiceÊAsqladmin.googleapis.comB[ -com.google.cloud.sql.v1BCloudSqlEventsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php deleted file mode 100644 index 74026d821d785d584ed9684ddc6972899b6a5772..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1992 zcmb7FU2hsk6fFkZVW<+aR%A?-YU)NcZsSF!Q6F&K3e18~ZJ@Am6borJECU{8*IvP=qZExZ;hjJa`S{t|8CN^qK^CJiq-jv(4jK`igc4*Odyy>tg zuAJiRF#Kb|A8X{0vCsongj_PA!Y4MxjZXE9N-`vp^cw*||3ne=dsj~X{O|}N+aW^W zU=h~piU$3FFueTfz+pBPl1TV^!i2?KCK++q_t3{N9uY@SV7Q4LOL@8dhJMqPl)J>~*Ql^L^QFf-04?R4)~~p(r&RDIqpxUCS0uYXCs9iMPz35MMg%%a$=5!G_(b7;39pQgsx|?qfyrU_KqX;GFPDU@ z_e=e~+rny5W9MOC+GF&HIF2``LrX}`+_5zy4ycez0a04hQF_AMa4okE6=g~v#MH5> zI-JNao}H_(08hS)@EdpIpP?)V)fw!Z1#d~X%xwl?`5S4faHhj7vEugtnbtl-n^58a zF0fqs&d@y4;(o!=Zd8^kkPMY+?VUUfC8`4jFZWv&=Vx^2S>r@U?Z^c=X;A=>}fa*mS)GTb0a{8_xm-vM(7{WL3}y@ diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php deleted file mode 100644 index 80accbd77ab5..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' -ÿ -0google/cloud/sql/v1/cloud_sql_iam_policies.protogoogle.cloud.sql.v1google/api/client.proto23 -SqlIamPoliciesServiceÊAsqladmin.googleapis.comB` -com.google.cloud.sql.v1BCloudSqlIamPoliciesProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php deleted file mode 100644 index 8867162ecf31..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' -­ -2google/cloud/sql/v1/cloud_sql_instance_names.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto25 -SqlInstanceNamesServiceÊAsqladmin.googleapis.comBi -com.google.cloud.sql.v1B!CloudSqlInstanceNamesServiceProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php deleted file mode 100644 index c81584bd4fabcb433bd27569a684488d59762815..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22664 zcmcIsTWlOzTHdyEv5#Y?U5S&9ol8$8Gr3G+Cr);DlFUq|Z?=2Vx9Mspla;kaySr@n zrf<_#os1U-1PEA=K)^mAA%u{S79p*Kv|*0h~+vtrq+95Q3ga>KIQ<%$*EEX1>xQ?8bs^3Em)vXdYnJI3erooDwRGghgW zZ9B>z;#t}S#eSYe@n5^UTd!53fbZa+Yc(5-)tp+nUi%LA^I>$aT(>Pi863OUZC0FG zs~M#Ud0=mnWvDexy?Ek~4i&TL~0&?u6n~v3Kmg_r7%dT{4ZKu^KVCbVq`J?ibL2V&U7M7?G;oyq2G)U0|nZXJ|g)mokLr>aLQ&KXBqv;-GTfVOuU$u1Zd zTOJ<;Z)&Lq9(2l$_8ZK7-YK`+R%ZytoOkYgRFj+%t5!Y6*nk+_@Q#uW_B#8)pNH6; zi3CVHBZjYXd0T~ut-iXqd|tvRw`-6+I#VHT%U6^advtK-t~@z8V8rSj_kiT^%MuuO&Ujdp*G}tD+798dm3()k&0#*5_TEnigg=u2PAFqM;kJ z+G%zY>wVj*IFTuOpuc7j6$n_bX^lT!d!HTKZB-8=RREh?zqJ}b@l{V5slfG**adar zq*b?^30BsBEyS+)0W?~Ul`Y#)JQHl-iEjhPquX9t0bEbx?c957$n8&otPr4LU`}{Nc46fiIQ*; zcFVTq3Y}hI=T*{VYPLt41$JVuR)@Su<#2}0HOgO@P-NY@V{-*DuW5|6%lnq;v|d`x z$aKFJImWd}ibeYuadnYBJ`d;}zcMP6oyx)Z)3rCE&u8o{6?GUsA-`=nOcN+l(zSb% z>p7KX^jGYX3fXvF!*(W=igm`SyCzwNR@dQh=hiQ{2k%;rRoA|g8VKnd{vE+_upGm# zCtA(D+Wz?D)Ss|r6@S2S%02EJtxxpd2>IE9AhbGGyj*$NZI6$L_OXxe*WK-_X1!-* zf)>$#Gt@^D@&PTEMJGTd=0oNF2vmYr(UX3=WeB29$Zq|{-*8%>=%he?HRN|8N*#Fn zAWWt;0iS4ovvv1qnhY+X|9XgBQyHybb@p1FMzUtVG!8no=F17rXB;as03VX!SYJ50 z?bpWJZNyuiB_GZ2Z>E3#IK*zKy9fVP4ywh<@gCW-^tH<&xp4_-Qup?wKPVUtp))2ZXNvl)avS)E6RiU>r6phUGZ5=KcgOgm#&ogWm}_!~spjIm8UDX8lkY zWo?hm+JI~}T2(7T&db8O5lH=sFk4lz&H}V{jh&Zxbc9;&A#xn6&Tvz$ZLr10p^e-R z$4T<+2`(kq0

-0xu$spf-oH^);=*786#{`wwzaGam>5o=U0`Q8 z!tHXWT(4Vovu?ez>X8|~X0Ujx1S-gB8JZ=0mOKlqBRC0lb~*J~DOJqHGN$n&moT&W zWIsPMb|Rn4q;n}S^Bg;w-`LJeyO_NB`GpzrErXT*ZC@ZS7-6QjcE|J6>Rm_RCt^)wH-sMq555UM1TeHw|Wx01wJ|CB9xwp7i>Ad@o>hq`Hz-Xw2Gn$EWZH3**x z6~x`9eRk0U8IU2-HrY~@Cr-=;&(8F%a3gR96_C5o3wEw=A@?Mnum!n*b*w~ zpDDehfc9lJv`1{g;)#?#w1Yv5xh}%rWDyVHzLW*L=CB(t_CXHT{O)`g_9t-Nk34D~ zx%0fg`O-R+A^ur*s$4;d!Its7NCK+6_a!K3_cfjm>BBL2_hPP#;h%*RUK4o-yN$fN z1@(IDWvyA2INf72ugje#8G86b)9?_l1RfjG_s_*R?EyPpbF799qfX<;OND6X+36-Y z+f?!yB7I@A%icK=qHbUa$3tTLE<0W!sRGKh;Ke`$<#}l5*g_eO$197}txcMiliAxg zPon7GW|zE0gMwBq&CYd1#O(TD6`yF{3`D{Q$~}svvcY0dRH|iI1hpIJCKD+rplw#l zeMcUg-1S3q*Q>G>Z*PMUpO#{0QOn_>rde<8_bs$@J#b?R9CsOqMZINWmCw7ij%C;# zJ7XaM=BkDQTP}-Nrj2)SRq(QJ#oK`k_Cs`6{o4>*Rn5b*BmCAthX0tIusWSq$7T26 zkQqy;PKES^Q#4VFDV$*qLGcPA$PiG^{hX{#Y!1)8YLntln*!TYtyJ3ii2Mm36Guc&&*vO`_$E*6y+S zb_*#3tROZ;fyR-W(w3P92fjr)pQ;J>uv2d0&?o?zB`rqvW=bY=RPD$tbl2JhWIv+Jp!TyRX_U8>MQgM5jHn z3nlvZD=gff^7e*^lS#4TI1tB;wciV*W#M@3DC*6jYI+3K|ASPyp06jekKvRYzYz_eK{LYTjL&&54*nx1lcyv;5V zcD0IS!YgZaK^LomB7!$G%mL)t1tc*bQH>gQPPPk)d|6D6EMmyqdawn{Hw$tSY*%lN zw#Am*WAy{mIIv-k1rLDykRFOmm({F_w8I$ySXjRrcq$+irKvEM(`gZz7^}W#){)_j zoaGx$AWH4pZL3Mr0u5cZA@)l+=!Ny*C;=c1Z$goeCod11a#KHC$)4lTAx!+&dHxH< zua31(dL_bt!|v?k9JoTez@I=l+AtE$YPoZ0dhc}p?m4@}Ik=ZQ>^qia44YdIw#t+< zONk^Z*7p+>PG3J@(q3IVvce$-pN$_PDXgx|g}2orch|OG!%RdjanyHq*pi!Kt|BD! zlFX6Ie1#7K4=+fU7&1{^RWj9Ng=`o)8!Z&J+5V0lxyqpqn$|eFf4FMUcCNE!Pq%Wx zLsF^gInOr;Z89&@+6$(k4raFYg#G{%qrx3|hp!NvL=D0_-*xhPL^3Er%omB-2W+mw zgL7d!cdidX+w%wnM(?uA&UM1^h1Uk)yLU1s?&P$4s?p3tMxq_imcr zU1Q;P2ks@r&Kq-|k2xL*fep5f(J1&KuRGX>35CM_p2&k9oZ~bi&CWTN|kz)jKGZ5$is0!AKN+! zyp}&@8gyyDbKq)B;Yi(KvmUDtb(lS=UjFA0?>q=p603|st92Y9YXtsiKXr-CR?1DY zN^U1#dWPFixTy3P9)Z+EGRgmhopYaHPPqyWL<0kY4C!?ZlG~GNQT(~U&YQsymj7jn zld4aLXiX?p$e5~~NN-!*pIuo0WNZQJ157@f_lOj`CDheDc8%5pNAgIf0ZFTp4-d1# z16(yCJ1)vZFWBM$Fzsy=#y`!N`R$UK-!PMDN* zG`6-&$^7#i3P%xkj<>K5Y(Ea&{x*L#3RC?rLo5vZT&dxE)ldT<^wK#Xl}n@oaYM4c zxSh+z;u)#}prmDNqvVxKqQW(WB-jG|oz88d%#}%%QsHU!S)!Q2X2ZwewasN?>0Bw5 zqjkc^(e`p;BbLqp$O#IQM3uo*$DCZAnhEK@$XkyB)S`9+Wdh)yOO>AIi%-p1F|m~{ zr4ps>Vn1~+vPdrVJa8m-gtz%jGWhLOe2Ja$ah?2Cb!bg=uZOZ2Fl)MD@ay zy^Y<=Mk%w}0TH;t6`laklL~`-9-U9#TT!aw^Y!0F<$ajH113Ra`fbo&4bf)>lPpUA zpDIbS!f8RF9^Q7lUOp7-Qye?X9Td*aK2Y(K>^L9A%jD`b{fE=+wxYTyZ9KGxgL*2o zpJS}gXw9u>0!_puU{`zVF8@V{vEEOu#!mMZ6rmc)(8BuYf?5xX;^xb29c@NgmB)4D z;>g_#n@fj!qWO&cQ;#43NzdZ4e2wl+MBm=>HXBX9B8Bec7YOULAkmsa47Ovr!;G*mpSE z1sa-M;khdaR(9Erf!>Ok7o2dn-`Pek5b*PZ=-kF zRdK<9Boe#=r2{V*H4HBk!h>f|LZ|eH?6m7Jx*(CZa}!*i1QMV1(sq14`d-iCtb5IX z?tFh?2-&Ay+1k@>nzgFTr=m^O!wC-sF_mUnQPX+MmI7-NecMJsjMs!*eIf9Bz_h_~ zL*Gm!45)VDAm_soo7Mkko_9eH&D#5S_bqnJn|p*D4ueLH;jnjHdXV6#B6(P=%Ow0y zPw~dXBj-F|cgbb(w_O;iQi=ShRI!*Z28rQ0rX}*Z99$dftst)nE)L`o&*SMFx+=_E zzGT9)f=H52_7*B%xkNr&Kr;qOX);!d#bZXwe3mL2009>bqFhWBGHAdsV;T5p$rmQj z*e<|RTSloiXKZh5q!Z~>u4ER9>1XiMHpyv2lLz{pwhM)P5e-hJzu|*Ba_4e+v#=>U zJ%nGGA*@akR=pQFYBh0JPJNa(N=A4F8I{F!?pZ98PMXirl#)q3OJ%~d+N5JwQk z^@XteDj7Emv0^M6UZe@?ikl^niCT8T8k~X^@RgA&;)KoECLJ5G1i9^i8$LtZR_B5r zh%Ztb>0Fw~6F!Ty-WhcSf0rtTm+0Jju*DL&ST=>jH_+ym*b1K`%)ljCoP>9#Vk_sh zOYDLQR`Tlx#X6;MgnV!LsEF7hCyq+UL-;~JyBVc?5t{?2gIcNZGMzytorTk%G$m7- zd}l^@g&=dj;*kji0KDijMED{R4EP)LGGCxo!2%wm8{tbtup)xB7pCm>izTxF;0+01 z9^j=w$% zRTys*IgR{w5g{T;ma!c-62&y9oDqIUoHFOBQl2KIH(m(tB9Yp;P6DA$F@b1eJ0p6< zC>-84!Z$bodKwpU%JN?a6_+7%wN3m=SF=7tB zP8zIzn{Qt|ik=X2@e%3`%Igj_eGYrMO1lGgi6SZIObm)#XkwM))<~`NK?oRjw_gks z`OJ0}%yduxKcstx)fR32hR%{zF$Cx09-r@>s9_?Cm+zYakVW*`7gFkml#_x#XzBkMBCjT(NaDBq23rw5pKjy>pR(u1Nv|@vX^wY)1}<@*o%Vt% zQIqFZKgjL&GIZKwP_ArOWX4&d!>M}YJmIeYQOMsU*WWGS*7GO20k`FAUjKSvMC20Q z9H2z@6j9_E87F$|Fv*ORhH&uOOjsn@2!Z-i70~)^p;Grw|&AldD8%KDX1UoP(?n}+s;e?|?nP?40?o6_iM?6dIntzQnY(@NCIeMwkvD_MF$4cVODbLNi1y;?3_5`~O&HPb6c$5%4?ZHd3^n+YaAJm?+j70)&4ZZ=9EjfTJUWkg_O23T8hVVZ~;5-vZVgxSAOyz z-|d0{jtcW+)5sa;>R4tNBa8YC@RQ_Uf3~^ z^EKRlHOPq;UWweFgxHLmxzK`3^y(qIL&p`2IH%qR`h!WR=UQ)xB6Q2FcM(bpzLu`y z=#3p0$plC8L;dTMAnDz(l31d6VhSZZ2 zjobWt63f9Yz@A|gLxmfo-{2_e+DMeNzX`El94Jw)SF34-acf3_pdxOVC^CM2o_x1NCK~t13sY#jK11eA` zcj?EVsDHw^sJ;Bz{D<0AN&)AH;3{YhvE1UWV+P0iDK zE%#FZW5~O2{J2?@7lyTNAH_3F3wvV=eRzRFo~NRu5Ob^ ze;@8FnkeXt4Lm0?hC8bc9~WWQE>7gmaz=3RqBzRveZOFgI7%5kE}Cx?M}ZUEuPSKx z{M4LM6B+|cW%RgMrugYUnJn6KdS7jjNB=!|8sh5(V|W_A&m4?vl9u1VB>fc<3w^f| zwZ|hhQ{N2b#^mymP275#(=wqyo8dpHu?fjRC*NBKprD*tejJ#fvaVo0d}7^n|?wPXy`2j+~6`cqE+ zls*ya$XWTn+ah`Hr%2`@{-cI#@jVw*`;qV-L-qq^xjP8%SXKouaI$1C=^1EGCOMk@ zfIa*OO^c9l-}P`UxD#E)t$&KUt5GcFdNdzQf;aSm4?p6le}_f`fd=o*jiJ#3=eaxh zXrw$1nJ!O8YHe*Ijfay7*vU_DHvM`3G0vucio3JXnqqLK+|(yroRa!P$5!sU&?=?r zA34YQ>k(t@YOvfOLi*9W8k{M2mE^nnXtG^(`bsIwzwi&S^Y-WUaup52l6UZFPJ0z! z)BUHIdEhv0`_bCk>({UQUapn9&Vl%P?j1DnIiz}Sj~b4JY>~ZRinternalAddGeneratedFile( - ' -Ó -.google/cloud/sql/v1/cloud_sql_operations.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto-google/cloud/sql/v1/cloud_sql_resources.protogoogle/protobuf/empty.proto"= -SqlOperationsGetRequest - operation (  -project ( "f -SqlOperationsListRequest -instance (  - max_results (  - -page_token (  -project ( "n -OperationsListResponse -kind ( - -items ( 2.google.cloud.sql.v1.Operation -next_page_token ( "@ -SqlOperationsCancelRequest - operation (  -project ( 2à -SqlOperationsServiceŠ -Get,.google.cloud.sql.v1.SqlOperationsGetRequest.google.cloud.sql.v1.Operation"5‚Óä“/-/v1/projects/{project}/operations/{operation} -List-.google.cloud.sql.v1.SqlOperationsListRequest+.google.cloud.sql.v1.OperationsListResponse")‚Óä“#!/v1/projects/{project}/operations -Cancel/.google.cloud.sql.v1.SqlOperationsCancelRequest.google.protobuf.Empty"<‚Óä“6"4/v1/projects/{project}/operations/{operation}/cancel|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB_ -com.google.cloud.sql.v1BCloudSqlOperationsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php deleted file mode 100644 index abf01220dbad..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' -š -+google/cloud/sql/v1/cloud_sql_regions.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2/ -SqlRegionsServiceÊAsqladmin.googleapis.comBc -com.google.cloud.sql.v1BCloudSqlRegionsServiceProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php deleted file mode 100644 index e69a8481094d66cc7955a51251eff3da784c5b6c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16028 zcmcgz&2t+^b~i{$BpM<(8cHHW$r23tLy|2@1SMIbZ0`<$Aqg8_20+Pj(K|H+hUA1G z0M7uFxm!LZsoKgRo5LRRQI*tIPN}3)mA@dTR6g!|$Zabhn_D(Hr7Byg%I|ge3^3pT zRD6gJGSM^ry8HF(_kQp9dOrGI_n^yeB{!|M<(NIIncO`|_71FM*Xi^+jZQ1M+uz%> zoMfYO)U{idvyx2a%E?l>p44;s`djGgcKS}kT2JnGI{Pi_exudtH}AV&x9%UWiXR4k z7>*_0b62=z#@gnQ<#x@6mE5dkidN5Tnmu!8lMC6&l8~L+*R7rBtIrr~v`p7c@nD#1nStyw|kb;Hd{M6%WXJzx7Tqhcy)b!-|G2_q?X%v zyVb6j6PHOY^YJ*RICkDg3AR3m-0-e^8}5B#OQmbgrmy1- zSmbSAE2N|M*#8`}d;cd>R2RkTE8KEdV5}?0tIIc}3~sI1^!rVz8)3i8H%FiMJO#)X zP6>D=S1F#SI&4mBwDfk*IZ@}?xnr}{w-S+LPa3}!ph+F6`Z@luPi#M3v3o!?wb2zc2PCX&O6pV%ty>2^=A=w@pQMhS+e$d!O$vs zEn$b=}y|@`dfHuFRx<5n)RivvJt(R;`}ZrbAG(dOax0RjVwHqbM4UK0F2Arg(Zi zRA*zPtoU-bAwhk_6v#B~w$(It`M9p!<7=K&e~;mA*3!?(K2qy!J}Bn~TdwMLS|e9g zzCNPIC_9%eZZDP)3S_B)WGv$q_p3rEg95bta{jRX4_d*F*XccvJH z&9yp0M&dl#y_#V+x*d2AL8&?@9EqgBMy_Uy~x+ITjUz*Wg}ZCZ|A(eIOA{u;yDiZsmIgsgY&^2 zGno`i8fPdfm1c>GRZjOzify-4s9E8VqQ zb`PGzI<{I|f#*p1{((J0+-V8*q&{Ht-pCs*6K>j5hft>p*@vBRixulcOBcBQRmW*c`$i~gv}{CL<>9tVP2#iKxNi>v2S3n50;U13)6w&PQ>j})d$3dBEEV>8$YxGXK z;>5?($xu<44FTmk-cu3SJ9~Srj@gu9>olYsgk;Qm*E}4ZwFpeFIqQsh7?}0)A4J$9 zCUj~wm)He3D>x?O>po($+^GapkYbr#%OKx~U}-thJ1((>ulqO=Ll4B>U1yi}C=GHA zynF;Cf~3~i^{ff52JX-reaOvb`R6lCIkj~-o$!h+OSpz8B3sOD99T!D(P_6%HK$DPDP3gtcVY|yus9v#XexMBkl=#$l|sVOHW$x z@{ic%&{5PCcCOK~%(fIVVIzeG(kyE4VePit^AP)4eU^VR#ch7{EYM+ed*Ba%vdMW* z#>cBTApB)`^nP1_gvpD>+UDr|atA>GJf6NDx;>Z}cMhwBIJzgou+O%LsYC>M%*Ccn z1QDf2K%fL4IQ*EnnAEQro6jGOb0pUNG3-ewwolxA(Ph|^jI2sH#&AzEc~vXk84s*TtaZo(1fKrCcz{3k zqh4@qpi~}QWVoXopwsFf0c;3Z5*Gi+-lJ+r{3BD2s^j9HNQTG6KQg4~@;^>{ekwT2 zCQ|`hof8gb{F5V$V=L67i2g(IYt*1ubYGx%mWI6HnKndGxZUwHc?r!XIAU1!yq`w! zzmOjtb+%~sdj}ndNP15gVHZlj-V8M=pDsm80MtS( z54zf21Dpj&NMYcgvwMQpF}#VAvJ52lhTu*O&d(T>^4blcy0gijPuLvRWKizTdvn=Wsi_{6{(Fp8&1*IVqSRw$HTfJ4+v+3L$m9TbaJ${GGI&@(EF`#+6x zsqhk%%+7o4R=v7iqxZ9gJm^Rxt5@qFbF)OVR`t)f^Ppmt>D0~+J1-^%54M=q!lnTN zXtP}2Ea*m2D}gV{89r^B)i8sr?DEL-tX4DdXeu+$V#Yw%nTu?JZ}dQesjpbn*Rq;m zF?!qM0m=U7gzDdASINX)!N3~G{rX1`A(<2DoB1)##MuQtpcIj6F|{D+$BN_U`zdy1 z4^&R)m9cMH28taX%_$CXhL98x&JR0nk4r~p>w>0iH;G8)?ZWK`a8T;6z_1rVB7>47 z-sc6#{?04)4x2eZO-^FUNzq%q&89&%$|Ppun@`z=eixt&`6lwPLw>^J>06~hX(pA1bKyqn!=4tQu9W#HYcc9T%Prx+-J7esinm-@E|i-TUV z_YZom@NJ+EukZ{KbgyU+ZZGJ=%M=J4Y^P@yJ9}jJl0n*LoOP*7o zutg!C&^V~+met;eH>Sm%0mq+tGwZg%{2Hiu8OTrjlFgXhIrZx)R6dBo3L|BRBy0AM zx&|i%g3;kj(go9kp|vUX1_cdsBYSdCk9wUoeZ-bzCU#(5df z{Pyun>i6R;TEXe`jExUu5G*$HQB@>H_Mx$T?f@yb(6(Ap6W$*PbMEv-w*BRj~P%YH->c^1>Rm^%Vxtvt&R&{PSp=@PM7dbYz)@ZM7NsjxCQEz75Yp4 zY?f!#zRtOtQ|tznyvr56s_{Z?{bgme;LX_ie6dolqEd?^dS3s6|2;*2qlyg_g#tGI z-mc{6?-}|#rx#HARnDm~Hj9FIT|?*dRE5uI+0V8s%IxygT!iXEwUSn;ZI$cF9B)B| zOuS({FBi6pxWZG>Nh6f!sh5YK>0Zqc6CT0Qkl!@C8kvMk%?ZTWdr$^ zIL<|lQ@Jj>@+B5EAmXa>Ce5{|5r{2mrL3;p0EE4Wzj39(s8sXM2_xq#%1ypIc$CvO z^eVvbphuEFLYR@`3#GrsTXC%c8PzJVo(vQyfe5bq9>QayrWZC0*xU1bmQsSj z`c^0v7)*+)!JhTqr$7jnG1=ohSpOKWqzS5=*Ef%#;BfO3@4#M3+P zjT>L)e{^_hc+MSs!mfJPexO)F@%*An%Ra(oHBqk(Jxbn=6rcxOL;|lz>4&sq!8L_n z4D?KZAf@K_l+NT6rXa-tiW*!pO9*Tj4vI&JEAVBDA*)Fc;G3MYWqhdNe^s2ZE@{#Ck;C#!%8zIejI(+5O9(AX@kegD5 zsYe4k$9QEEpOaAd!ru)wh#?w9vOgQ_(g0fz?SMeo;b!e4?7{o$_t|w{3&Te0k!9+c z+p)oJG#t}CFkExbf=vz#-IF2mozpp(PZM+NevBF;`6I4V?*^6t=M$~E#Fn^K<31B| z+6Hd2op>bd6+Zbf-a?wRmGgQ@zZkfXwFC)Kguw(n_6gW~B2736C+QD2k>EyiH+0*= z8L*Gof=^nBV=fxVFd-aF0LCaic|h*m#kOD^ugz-tl-ZT6dX z&(q+WT;83~)xoT5yo*LXr1qZSN-2K9!6e>A-?4;+=c{$`vM7{%&MreC#8H9Ax7uLy z8`cp*Wg^K%rNgJ;iNXv-SAEcv!v|bA5grdW`yrd0pJ$qH@%2qGP2l_}Q3HaVP2u&Z ziff`~^O&gECQJgCSKF4c2TH6Dhn%>@C5D#{G})^tI&H{4n4~a$5sIZvyu$^BdlYgf z!?9dv*Tssw>c>%wgPeUq+$3(FwM?P^9J?mP&`BiN7m#x2wWKVsBJUcBz_^!1SG@#p z6uh&yKJ_G$+T#_;Qz7OZ_7=ZHj@zZko(SDn%E&rLK@XB-t?)v7Sp!x_s#?-1xtpS$ zLyw$}@&alSltiUA*{n1;N=4|?7M?N$?xZ6FLS;j*B5OgSGev3S;I~mh`U33#6}uE_ zZkRE0pAvFsq$GN2qg>7EMJkj8ufZY>E0ya=V`RmI>H>5Auc_1;TN-C8s1?f_K%80z z#VuI$bE#j8>Q5G2nGd3b#))Vp1`WGHw>R4Tqh0@o6=f-SCc)Qz76Uxx{6BqaG=$rt#fuxNNOnXO)rL2acs2Z9jO>Ook;1j)RTRl$dG3~a!f&;5^E?$UpueG< z4YW+NLt#Sp{F4aEaAAJ(RJYxJIW3qS#MrP4zd!nn4k zP@_aOdd~aCMw-|7$!$%e2QR)2O(UbQIFD8S;B*t2fXDEVnHY;2-avOZSq!`2Uyr1_ zU`1P4e^3M)+XWK9ue)z- z2-=`d#L@KK28&}ZgvCHRb3B-2*J(OLL4k7!lL&j?$X9E1V^c3F5zYq@QA0dSj<-#b z1M%1&4AK`jegZWC)O~4~e8tdmIS@d#u#t%PkaP`qO6BePW?3*F;t|nUASpqU74u+P zs202`CpL5UuV*>uLg9(P@^ew?P$lQ$(QpH3Iy(<DjmekpRhHp!{Vd*m-SL`J2(EwDR-OrZwf?N1GlhzZz|Nr2NNd(_`g7N1HxW z{+Xiw&mc?zTXvqpXmJP@kiw zpk?v}V&p<13Q*~n^nDZtLLWR=B46GS9GLv}6#eh-cka9R z!W*?qeB_P4y1UQ#zq{u-Q@Zw^|55G-;=|^l@1Us)Y&Sx_f#z?DFO|P#-!k^UgfhGr diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php deleted file mode 100644 index e33f77f7390e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php +++ /dev/null @@ -1,60 +0,0 @@ -internalAddGeneratedFile( - ' -Ñ --google/cloud/sql/v1/cloud_sql_ssl_certs.protogoogle.cloud.sql.v1google/api/client.proto-google/cloud/sql/v1/cloud_sql_resources.proto"W -SqlSslCertsDeleteRequest -instance (  -project (  -sha1_fingerprint ( "T -SqlSslCertsGetRequest -instance (  -project (  -sha1_fingerprint ( "w -SqlSslCertsInsertRequest -instance (  -project ( 8 -bodyd ( 2*.google.cloud.sql.v1.SslCertsInsertRequest"; -SqlSslCertsListRequest -instance (  -project ( ", -SslCertsInsertRequest - common_name ( "È -SslCertsInsertResponse -kind ( 1 - operation ( 2.google.cloud.sql.v1.Operation4 -server_ca_cert ( 2.google.cloud.sql.v1.SslCert7 - client_cert ( 2".google.cloud.sql.v1.SslCertDetail"Q -SslCertsListResponse -kind ( + -items ( 2.google.cloud.sql.v1.SslCert2ª -SqlSslCertsService¨ -Delete-.google.cloud.sql.v1.SqlSslCertsDeleteRequest.google.cloud.sql.v1.Operation"O‚Óä“I*G/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}  -Get*.google.cloud.sql.v1.SqlSslCertsGetRequest.google.cloud.sql.v1.SslCert"O‚Óä“IG/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}¨ -Insert-.google.cloud.sql.v1.SqlSslCertsInsertRequest+.google.cloud.sql.v1.SslCertsInsertResponse"B‚Óä“<"4/v1/projects/{project}/instances/{instance}/sslCerts:bodyœ -List+.google.cloud.sql.v1.SqlSslCertsListRequest).google.cloud.sql.v1.SslCertsListResponse"<‚Óä“64/v1/projects/{project}/instances/{instance}/sslCerts|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB] -com.google.cloud.sql.v1BCloudSqlSslCertsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php deleted file mode 100644 index c09b8b6ec147..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php +++ /dev/null @@ -1,43 +0,0 @@ -internalAddGeneratedFile( - ' -™ -)google/cloud/sql/v1/cloud_sql_tiers.protogoogle.cloud.sql.v1google/api/client.proto"& -SqlTiersListRequest -project ( "K -TiersListResponse -kind ( ( -items ( 2.google.cloud.sql.v1.Tier"S -Tier -tier (  -RAM ( -kind (  - -Disk_Quota ( -region ( 2 -SqlTiersService~ -List(.google.cloud.sql.v1.SqlTiersListRequest&.google.cloud.sql.v1.TiersListResponse"$‚Óä“/v1/projects/{project}/tiers|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminBZ -com.google.cloud.sql.v1BCloudSqlTiersProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php deleted file mode 100644 index f15240c77b8951ff07401883d2505da7df5be51e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3866 zcmb7H&r{n*6t2J!vJfB(DUO>as*^S*lh^~fB+jqe7>FB!Js8tT##4T035{TXcaowjF?th(zs zyB5h9meV#f{=SttSdtGKJZNp7cz#--B4q0=;=8&*)b(=yC1JX$GrhJh0BS27pjO$p zYCB7h5Hc*?_f@e7YgG<|-XazLx$U||4b^8lga2+(U!yip<6xygp;<7 zwrw!#*ec&pvJH}2R3#?2z2!O(_Y*aAsLZJV8frzG5zp4GT7me6M_uN4WiZWVcM0nd z$X8N}!Lb~UHq?~#F`GT%j-(ziI>M%DJ?bvu%g7;MjgP z+l{FU@u7_?79}p?sFO65M*3hWu@LOn zT?#eBb0SM6aU=4g!HL)E0rP>uz0*(jLV^SH>w&o_M9_4`3|Q{1~Ty!iZvad#T8XaUBt6!g4#ea)K+{%tiXF-_VH2iG=na{5#JJn#bbOS zSwT3&T_-FAjlxLa5JrMVU?gtng#~$@;`2xF;|RLOLn%Y6J#;*C z2YM)Y1I1N#pv4~H8)!kdEa#AzT0@5tFg2Yq(sG$E@;!#1p=)liStD;;Doaxf)g?3# zAu*I!IxJ#*3tc0&Ubjg90h-Yy#-5PP1b%?Vc`I%ELN$}iHwR`V45K1UIeViK{EnXo z#G?&rh&bb8kmZTwH)y(dGoD7{mSgM@Qv^DJAES5&AQC7qlOV`M=u;=iPP<9|J%(bO zXkIOQ)Rv&4T0+onwZK^14XPy+y-+m{wZUD!cv2hVd>Kddd_gSSM=^HflK2EXO)q~Q zIvH(4LeA+x%iCa#U!afueVC#ia3w~#W`bMP^5Yi)W^#FPAPgW>#1^;bLA&RN&c>&$!OG5 zXd+)NZftAC&DoDIM$;=BrD{Pd=3Z*m%IemvfgM+B2%bYT z-Ph||rD}P06vxqg-=ai|;hX42|C@fyvE(~6+wVP2qU(ifZbK{QDwVHGTLo?VRe4pb zZdS^xE5)_qY60B;1TAcqw3nqqaqX4XV-0c4qgi;_yE*~_yVSchnx95fZAfOA{`?g* z2gTi=faFs&KPdUUcbU}Z znS6=s1NByN`3E($(B#AK|N8g+$o)G@{EIl4dVc0@@as4e4oX-He;#Kz+dlqTL8CAZ zp_LCjBlM>`F%zfEsV{{eS^QvVKQeFm=sw230YP$*oHzB@89lxpx>3( XtH^DPe?CxSz)eh8${W)$I!5S!qn_B? diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php deleted file mode 100644 index a30afe817105..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.sql.v1.AclEntry - */ -class AclEntry extends \Google\Protobuf\Internal\Message -{ - /** - * The allowlisted value for the access control list. - * - * Generated from protobuf field string value = 1; - */ - protected $value = ''; - /** - * The time when this access control entry expires in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; - */ - protected $expiration_time = null; - /** - * Optional. A label to identify this entry. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $name = ''; - /** - * This is always `sql#aclEntry`. - * - * Generated from protobuf field string kind = 4; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * The allowlisted value for the access control list. - * @type \Google\Protobuf\Timestamp $expiration_time - * The time when this access control entry expires in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type string $name - * Optional. A label to identify this entry. - * @type string $kind - * This is always `sql#aclEntry`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The allowlisted value for the access control list. - * - * Generated from protobuf field string value = 1; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The allowlisted value for the access control list. - * - * 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 time when this access control entry expires in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * 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 time when this access control entry expires in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * 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; - } - - /** - * Optional. A label to identify this entry. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optional. A label to identify this entry. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * This is always `sql#aclEntry`. - * - * Generated from protobuf field string kind = 4; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#aclEntry`. - * - * Generated from protobuf field string kind = 4; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php deleted file mode 100644 index 429f1de7dc04..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.sql.v1.AcquireSsrsLeaseContext - */ -class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message -{ - /** - * The username to be used as the setup login to connect to the database - * server for SSRS setup. - * - * Generated from protobuf field optional string setup_login = 1; - */ - protected $setup_login = null; - /** - * The username to be used as the service login to connect to the report - * database for SSRS setup. - * - * Generated from protobuf field optional string service_login = 2; - */ - protected $service_login = null; - /** - * The report database to be used for SSRS setup. - * - * Generated from protobuf field optional string report_database = 3; - */ - protected $report_database = null; - /** - * Lease duration needed for SSRS setup. - * - * Generated from protobuf field optional .google.protobuf.Duration duration = 4; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $setup_login - * The username to be used as the setup login to connect to the database - * server for SSRS setup. - * @type string $service_login - * The username to be used as the service login to connect to the report - * database for SSRS setup. - * @type string $report_database - * The report database to be used for SSRS setup. - * @type \Google\Protobuf\Duration $duration - * Lease duration needed for SSRS setup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The username to be used as the setup login to connect to the database - * server for SSRS setup. - * - * Generated from protobuf field optional string setup_login = 1; - * @return string - */ - public function getSetupLogin() - { - return isset($this->setup_login) ? $this->setup_login : ''; - } - - public function hasSetupLogin() - { - return isset($this->setup_login); - } - - public function clearSetupLogin() - { - unset($this->setup_login); - } - - /** - * The username to be used as the setup login to connect to the database - * server for SSRS setup. - * - * Generated from protobuf field optional string setup_login = 1; - * @param string $var - * @return $this - */ - public function setSetupLogin($var) - { - GPBUtil::checkString($var, True); - $this->setup_login = $var; - - return $this; - } - - /** - * The username to be used as the service login to connect to the report - * database for SSRS setup. - * - * Generated from protobuf field optional string service_login = 2; - * @return string - */ - public function getServiceLogin() - { - return isset($this->service_login) ? $this->service_login : ''; - } - - public function hasServiceLogin() - { - return isset($this->service_login); - } - - public function clearServiceLogin() - { - unset($this->service_login); - } - - /** - * The username to be used as the service login to connect to the report - * database for SSRS setup. - * - * Generated from protobuf field optional string service_login = 2; - * @param string $var - * @return $this - */ - public function setServiceLogin($var) - { - GPBUtil::checkString($var, True); - $this->service_login = $var; - - return $this; - } - - /** - * The report database to be used for SSRS setup. - * - * Generated from protobuf field optional string report_database = 3; - * @return string - */ - public function getReportDatabase() - { - return isset($this->report_database) ? $this->report_database : ''; - } - - public function hasReportDatabase() - { - return isset($this->report_database); - } - - public function clearReportDatabase() - { - unset($this->report_database); - } - - /** - * The report database to be used for SSRS setup. - * - * Generated from protobuf field optional string report_database = 3; - * @param string $var - * @return $this - */ - public function setReportDatabase($var) - { - GPBUtil::checkString($var, True); - $this->report_database = $var; - - return $this; - } - - /** - * Lease duration needed for SSRS setup. - * - * Generated from protobuf field optional .google.protobuf.Duration duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Lease duration needed for SSRS setup. - * - * Generated from protobuf field optional .google.protobuf.Duration duration = 4; - * @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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php deleted file mode 100644 index 7918b421cd93..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.AdvancedMachineFeatures - */ -class AdvancedMachineFeatures extends \Google\Protobuf\Internal\Message -{ - /** - * The number of threads per physical core. - * - * Generated from protobuf field int32 threads_per_core = 1; - */ - protected $threads_per_core = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $threads_per_core - * The number of threads per physical core. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The number of threads per physical core. - * - * Generated from protobuf field int32 threads_per_core = 1; - * @return int - */ - public function getThreadsPerCore() - { - return $this->threads_per_core; - } - - /** - * The number of threads per physical core. - * - * Generated from protobuf field int32 threads_per_core = 1; - * @param int $var - * @return $this - */ - public function setThreadsPerCore($var) - { - GPBUtil::checkInt32($var); - $this->threads_per_core = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php deleted file mode 100644 index b78fa08028b9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.ApiWarning - */ -class ApiWarning extends \Google\Protobuf\Internal\Message -{ - /** - * Code to uniquely identify the warning type. - * - * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; - */ - protected $code = 0; - /** - * The warning message. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * The region name for REGION_UNREACHABLE warning. - * - * Generated from protobuf field string region = 3; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Code to uniquely identify the warning type. - * @type string $message - * The warning message. - * @type string $region - * The region name for REGION_UNREACHABLE warning. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Code to uniquely identify the warning type. - * - * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Code to uniquely identify the warning type. - * - * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ApiWarning\SqlApiWarningCode::class); - $this->code = $var; - - return $this; - } - - /** - * The warning message. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The warning message. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * The region name for REGION_UNREACHABLE warning. - * - * Generated from protobuf field string region = 3; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * The region name for REGION_UNREACHABLE warning. - * - * Generated from protobuf field string region = 3; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php deleted file mode 100644 index 0661de42c5d0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.sql.v1.ApiWarning.SqlApiWarningCode - */ -class SqlApiWarningCode -{ - /** - * An unknown or unset warning type from Cloud SQL API. - * - * Generated from protobuf enum SQL_API_WARNING_CODE_UNSPECIFIED = 0; - */ - const SQL_API_WARNING_CODE_UNSPECIFIED = 0; - /** - * Warning when one or more regions are not reachable. The returned result - * set may be incomplete. - * - * Generated from protobuf enum REGION_UNREACHABLE = 1; - */ - const REGION_UNREACHABLE = 1; - /** - * Warning when user provided maxResults parameter exceeds the limit. The - * returned result set may be incomplete. - * - * Generated from protobuf enum MAX_RESULTS_EXCEEDS_LIMIT = 2; - */ - const MAX_RESULTS_EXCEEDS_LIMIT = 2; - /** - * Warning when user tries to create/update a user with credentials that - * have previously been compromised by a public data breach. - * - * Generated from protobuf enum COMPROMISED_CREDENTIALS = 3; - */ - const COMPROMISED_CREDENTIALS = 3; - /** - * Warning when the operation succeeds but some non-critical workflow state - * failed. - * - * Generated from protobuf enum INTERNAL_STATE_FAILURE = 4; - */ - const INTERNAL_STATE_FAILURE = 4; - - private static $valueToName = [ - self::SQL_API_WARNING_CODE_UNSPECIFIED => 'SQL_API_WARNING_CODE_UNSPECIFIED', - self::REGION_UNREACHABLE => 'REGION_UNREACHABLE', - self::MAX_RESULTS_EXCEEDS_LIMIT => 'MAX_RESULTS_EXCEEDS_LIMIT', - self::COMPROMISED_CREDENTIALS => 'COMPROMISED_CREDENTIALS', - self::INTERNAL_STATE_FAILURE => 'INTERNAL_STATE_FAILURE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlApiWarningCode::class, \Google\Cloud\Sql\V1\ApiWarning_SqlApiWarningCode::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php deleted file mode 100644 index 7cad64f74533..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AvailableDatabaseVersion.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.sql.v1.AvailableDatabaseVersion - */ -class AvailableDatabaseVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The version's major version name. - * - * Generated from protobuf field optional string major_version = 3; - */ - protected $major_version = null; - /** - * The database version name. For MySQL 8.0, this string provides the database - * major and minor version. - * - * Generated from protobuf field optional string name = 8; - */ - protected $name = null; - /** - * The database version's display name. - * - * Generated from protobuf field optional string display_name = 9; - */ - protected $display_name = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $major_version - * The version's major version name. - * @type string $name - * The database version name. For MySQL 8.0, this string provides the database - * major and minor version. - * @type string $display_name - * The database version's display name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The version's major version name. - * - * Generated from protobuf field optional string major_version = 3; - * @return string - */ - public function getMajorVersion() - { - return isset($this->major_version) ? $this->major_version : ''; - } - - public function hasMajorVersion() - { - return isset($this->major_version); - } - - public function clearMajorVersion() - { - unset($this->major_version); - } - - /** - * The version's major version name. - * - * Generated from protobuf field optional string major_version = 3; - * @param string $var - * @return $this - */ - public function setMajorVersion($var) - { - GPBUtil::checkString($var, True); - $this->major_version = $var; - - return $this; - } - - /** - * The database version name. For MySQL 8.0, this string provides the database - * major and minor version. - * - * Generated from protobuf field optional string name = 8; - * @return string - */ - public function getName() - { - return isset($this->name) ? $this->name : ''; - } - - public function hasName() - { - return isset($this->name); - } - - public function clearName() - { - unset($this->name); - } - - /** - * The database version name. For MySQL 8.0, this string provides the database - * major and minor version. - * - * Generated from protobuf field optional string name = 8; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The database version's display name. - * - * Generated from protobuf field optional string display_name = 9; - * @return string - */ - public function getDisplayName() - { - return isset($this->display_name) ? $this->display_name : ''; - } - - public function hasDisplayName() - { - return isset($this->display_name); - } - - public function clearDisplayName() - { - unset($this->display_name); - } - - /** - * The database version's display name. - * - * Generated from protobuf field optional string display_name = 9; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php deleted file mode 100644 index 91debce97023..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php +++ /dev/null @@ -1,598 +0,0 @@ -google.cloud.sql.v1.BackupConfiguration - */ -class BackupConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * Start time for the daily backup configuration in UTC timezone in the 24 - * hour format - `HH:MM`. - * - * Generated from protobuf field string start_time = 1; - */ - protected $start_time = ''; - /** - * Whether this configuration is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; - */ - protected $enabled = null; - /** - * This is always `sql#backupConfiguration`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - /** - * (MySQL only) Whether binary log is enabled. If backup configuration is - * disabled, binarylog must be disabled as well. - * - * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; - */ - protected $binary_log_enabled = null; - /** - * Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; - */ - protected $replication_log_archiving_enabled = null; - /** - * Location of the backup - * - * Generated from protobuf field string location = 6; - */ - protected $location = ''; - /** - * Whether point in time recovery is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; - */ - protected $point_in_time_recovery_enabled = null; - /** - * Backup retention settings. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; - */ - protected $backup_retention_settings = null; - /** - * The number of days of transaction logs we retain for point in time - * restore, from 1-7. - * - * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; - */ - protected $transaction_log_retention_days = null; - /** - * Output only. This value contains the storage location of transactional logs - * used to perform point-in-time recovery (PITR) for the database. - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transactional_log_storage_state = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_time - * Start time for the daily backup configuration in UTC timezone in the 24 - * hour format - `HH:MM`. - * @type \Google\Protobuf\BoolValue $enabled - * Whether this configuration is enabled. - * @type string $kind - * This is always `sql#backupConfiguration`. - * @type \Google\Protobuf\BoolValue $binary_log_enabled - * (MySQL only) Whether binary log is enabled. If backup configuration is - * disabled, binarylog must be disabled as well. - * @type \Google\Protobuf\BoolValue $replication_log_archiving_enabled - * Reserved for future use. - * @type string $location - * Location of the backup - * @type \Google\Protobuf\BoolValue $point_in_time_recovery_enabled - * Whether point in time recovery is enabled. - * @type \Google\Cloud\Sql\V1\BackupRetentionSettings $backup_retention_settings - * Backup retention settings. - * @type \Google\Protobuf\Int32Value $transaction_log_retention_days - * The number of days of transaction logs we retain for point in time - * restore, from 1-7. - * @type int $transactional_log_storage_state - * Output only. This value contains the storage location of transactional logs - * used to perform point-in-time recovery (PITR) for the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Start time for the daily backup configuration in UTC timezone in the 24 - * hour format - `HH:MM`. - * - * Generated from protobuf field string start_time = 1; - * @return string - */ - public function getStartTime() - { - return $this->start_time; - } - - /** - * Start time for the daily backup configuration in UTC timezone in the 24 - * hour format - `HH:MM`. - * - * Generated from protobuf field string start_time = 1; - * @param string $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkString($var, True); - $this->start_time = $var; - - return $this; - } - - /** - * Whether this configuration is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnabled() - { - return $this->enabled; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * Returns the unboxed value from getEnabled() - - * Whether this configuration is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; - * @return bool|null - */ - public function getEnabledUnwrapped() - { - return $this->readWrapperValue("enabled"); - } - - /** - * Whether this configuration is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether this configuration is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; - * @param bool|null $var - * @return $this - */ - public function setEnabledUnwrapped($var) - { - $this->writeWrapperValue("enabled", $var); - return $this;} - - /** - * This is always `sql#backupConfiguration`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#backupConfiguration`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * (MySQL only) Whether binary log is enabled. If backup configuration is - * disabled, binarylog must be disabled as well. - * - * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; - * @return \Google\Protobuf\BoolValue|null - */ - public function getBinaryLogEnabled() - { - return $this->binary_log_enabled; - } - - public function hasBinaryLogEnabled() - { - return isset($this->binary_log_enabled); - } - - public function clearBinaryLogEnabled() - { - unset($this->binary_log_enabled); - } - - /** - * Returns the unboxed value from getBinaryLogEnabled() - - * (MySQL only) Whether binary log is enabled. If backup configuration is - * disabled, binarylog must be disabled as well. - * - * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; - * @return bool|null - */ - public function getBinaryLogEnabledUnwrapped() - { - return $this->readWrapperValue("binary_log_enabled"); - } - - /** - * (MySQL only) Whether binary log is enabled. If backup configuration is - * disabled, binarylog must be disabled as well. - * - * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setBinaryLogEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->binary_log_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * (MySQL only) Whether binary log is enabled. If backup configuration is - * disabled, binarylog must be disabled as well. - * - * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; - * @param bool|null $var - * @return $this - */ - public function setBinaryLogEnabledUnwrapped($var) - { - $this->writeWrapperValue("binary_log_enabled", $var); - return $this;} - - /** - * Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; - * @return \Google\Protobuf\BoolValue|null - */ - public function getReplicationLogArchivingEnabled() - { - return $this->replication_log_archiving_enabled; - } - - public function hasReplicationLogArchivingEnabled() - { - return isset($this->replication_log_archiving_enabled); - } - - public function clearReplicationLogArchivingEnabled() - { - unset($this->replication_log_archiving_enabled); - } - - /** - * Returns the unboxed value from getReplicationLogArchivingEnabled() - - * Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; - * @return bool|null - */ - public function getReplicationLogArchivingEnabledUnwrapped() - { - return $this->readWrapperValue("replication_log_archiving_enabled"); - } - - /** - * Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setReplicationLogArchivingEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->replication_log_archiving_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; - * @param bool|null $var - * @return $this - */ - public function setReplicationLogArchivingEnabledUnwrapped($var) - { - $this->writeWrapperValue("replication_log_archiving_enabled", $var); - return $this;} - - /** - * Location of the backup - * - * Generated from protobuf field string location = 6; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location of the backup - * - * Generated from protobuf field string location = 6; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Whether point in time recovery is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; - * @return \Google\Protobuf\BoolValue|null - */ - public function getPointInTimeRecoveryEnabled() - { - return $this->point_in_time_recovery_enabled; - } - - public function hasPointInTimeRecoveryEnabled() - { - return isset($this->point_in_time_recovery_enabled); - } - - public function clearPointInTimeRecoveryEnabled() - { - unset($this->point_in_time_recovery_enabled); - } - - /** - * Returns the unboxed value from getPointInTimeRecoveryEnabled() - - * Whether point in time recovery is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; - * @return bool|null - */ - public function getPointInTimeRecoveryEnabledUnwrapped() - { - return $this->readWrapperValue("point_in_time_recovery_enabled"); - } - - /** - * Whether point in time recovery is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setPointInTimeRecoveryEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->point_in_time_recovery_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether point in time recovery is enabled. - * - * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; - * @param bool|null $var - * @return $this - */ - public function setPointInTimeRecoveryEnabledUnwrapped($var) - { - $this->writeWrapperValue("point_in_time_recovery_enabled", $var); - return $this;} - - /** - * Backup retention settings. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; - * @return \Google\Cloud\Sql\V1\BackupRetentionSettings|null - */ - public function getBackupRetentionSettings() - { - return $this->backup_retention_settings; - } - - public function hasBackupRetentionSettings() - { - return isset($this->backup_retention_settings); - } - - public function clearBackupRetentionSettings() - { - unset($this->backup_retention_settings); - } - - /** - * Backup retention settings. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; - * @param \Google\Cloud\Sql\V1\BackupRetentionSettings $var - * @return $this - */ - public function setBackupRetentionSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupRetentionSettings::class); - $this->backup_retention_settings = $var; - - return $this; - } - - /** - * The number of days of transaction logs we retain for point in time - * restore, from 1-7. - * - * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; - * @return \Google\Protobuf\Int32Value|null - */ - public function getTransactionLogRetentionDays() - { - return $this->transaction_log_retention_days; - } - - public function hasTransactionLogRetentionDays() - { - return isset($this->transaction_log_retention_days); - } - - public function clearTransactionLogRetentionDays() - { - unset($this->transaction_log_retention_days); - } - - /** - * Returns the unboxed value from getTransactionLogRetentionDays() - - * The number of days of transaction logs we retain for point in time - * restore, from 1-7. - * - * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; - * @return int|null - */ - public function getTransactionLogRetentionDaysUnwrapped() - { - return $this->readWrapperValue("transaction_log_retention_days"); - } - - /** - * The number of days of transaction logs we retain for point in time - * restore, from 1-7. - * - * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setTransactionLogRetentionDays($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->transaction_log_retention_days = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The number of days of transaction logs we retain for point in time - * restore, from 1-7. - * - * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; - * @param int|null $var - * @return $this - */ - public function setTransactionLogRetentionDaysUnwrapped($var) - { - $this->writeWrapperValue("transaction_log_retention_days", $var); - return $this;} - - /** - * Output only. This value contains the storage location of transactional logs - * used to perform point-in-time recovery (PITR) for the database. - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTransactionalLogStorageState() - { - return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0; - } - - public function hasTransactionalLogStorageState() - { - return isset($this->transactional_log_storage_state); - } - - public function clearTransactionalLogStorageState() - { - unset($this->transactional_log_storage_state); - } - - /** - * Output only. This value contains the storage location of transactional logs - * used to perform point-in-time recovery (PITR) for the database. - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTransactionalLogStorageState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupConfiguration\TransactionalLogStorageState::class); - $this->transactional_log_storage_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php deleted file mode 100644 index 4c48892a0c91..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState - */ -class TransactionalLogStorageState -{ - /** - * Unspecified. - * - * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; - */ - const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; - /** - * The transaction logs used for PITR for the instance are stored - * on a data disk. - * - * Generated from protobuf enum DISK = 1; - */ - const DISK = 1; - /** - * The transaction logs used for PITR for the instance are switching from - * being stored on a data disk to being stored in Cloud Storage. - * Only applicable to MySQL. - * - * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2; - */ - const SWITCHING_TO_CLOUD_STORAGE = 2; - /** - * The transaction logs used for PITR for the instance are now stored - * in Cloud Storage. Previously, they were stored on a data disk. - * Only applicable to MySQL. - * - * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3; - */ - const SWITCHED_TO_CLOUD_STORAGE = 3; - /** - * The transaction logs used for PITR for the instance are stored in - * Cloud Storage. Only applicable to MySQL and PostgreSQL. - * - * Generated from protobuf enum CLOUD_STORAGE = 4; - */ - const CLOUD_STORAGE = 4; - - private static $valueToName = [ - self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', - self::DISK => 'DISK', - self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE', - self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE', - self::CLOUD_STORAGE => 'CLOUD_STORAGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TransactionalLogStorageState::class, \Google\Cloud\Sql\V1\BackupConfiguration_TransactionalLogStorageState::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php deleted file mode 100644 index 961ce1b42aac..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.BackupContext - */ -class BackupContext extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of the backup. - * - * Generated from protobuf field int64 backup_id = 1; - */ - protected $backup_id = 0; - /** - * This is always `sql#backupContext`. - * - * Generated from protobuf field string kind = 2; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $backup_id - * The identifier of the backup. - * @type string $kind - * This is always `sql#backupContext`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of the backup. - * - * Generated from protobuf field int64 backup_id = 1; - * @return int|string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * The identifier of the backup. - * - * Generated from protobuf field int64 backup_id = 1; - * @param int|string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkInt64($var); - $this->backup_id = $var; - - return $this; - } - - /** - * This is always `sql#backupContext`. - * - * Generated from protobuf field string kind = 2; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#backupContext`. - * - * Generated from protobuf field string kind = 2; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php deleted file mode 100644 index eab7ab57883d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.sql.v1.BackupReencryptionConfig - */ -class BackupReencryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Backup re-encryption limit - * - * Generated from protobuf field optional int32 backup_limit = 1; - */ - protected $backup_limit = null; - /** - * Type of backups users want to re-encrypt. - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; - */ - protected $backup_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $backup_limit - * Backup re-encryption limit - * @type int $backup_type - * Type of backups users want to re-encrypt. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Backup re-encryption limit - * - * Generated from protobuf field optional int32 backup_limit = 1; - * @return int - */ - public function getBackupLimit() - { - return isset($this->backup_limit) ? $this->backup_limit : 0; - } - - public function hasBackupLimit() - { - return isset($this->backup_limit); - } - - public function clearBackupLimit() - { - unset($this->backup_limit); - } - - /** - * Backup re-encryption limit - * - * Generated from protobuf field optional int32 backup_limit = 1; - * @param int $var - * @return $this - */ - public function setBackupLimit($var) - { - GPBUtil::checkInt32($var); - $this->backup_limit = $var; - - return $this; - } - - /** - * Type of backups users want to re-encrypt. - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; - * @return int - */ - public function getBackupType() - { - return isset($this->backup_type) ? $this->backup_type : 0; - } - - public function hasBackupType() - { - return isset($this->backup_type); - } - - public function clearBackupType() - { - unset($this->backup_type); - } - - /** - * Type of backups users want to re-encrypt. - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; - * @param int $var - * @return $this - */ - public function setBackupType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupReencryptionConfig\BackupType::class); - $this->backup_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php deleted file mode 100644 index f72845f44ee1..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.sql.v1.BackupReencryptionConfig.BackupType - */ -class BackupType -{ - /** - * Unknown backup type, will be defaulted to AUTOMATIC backup type - * - * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; - */ - const BACKUP_TYPE_UNSPECIFIED = 0; - /** - * Reencrypt automatic backups - * - * Generated from protobuf enum AUTOMATED = 1; - */ - const AUTOMATED = 1; - /** - * Reencrypt on-demand backups - * - * Generated from protobuf enum ON_DEMAND = 2; - */ - const ON_DEMAND = 2; - - private static $valueToName = [ - self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', - self::AUTOMATED => 'AUTOMATED', - self::ON_DEMAND => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackupType::class, \Google\Cloud\Sql\V1\BackupReencryptionConfig_BackupType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php deleted file mode 100644 index 74494506fb6c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.sql.v1.BackupRetentionSettings - */ -class BackupRetentionSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The unit that 'retained_backups' represents. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; - */ - protected $retention_unit = 0; - /** - * Depending on the value of retention_unit, this is used to determine - * if a backup needs to be deleted. If retention_unit is 'COUNT', we will - * retain this many backups. - * - * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; - */ - protected $retained_backups = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $retention_unit - * The unit that 'retained_backups' represents. - * @type \Google\Protobuf\Int32Value $retained_backups - * Depending on the value of retention_unit, this is used to determine - * if a backup needs to be deleted. If retention_unit is 'COUNT', we will - * retain this many backups. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The unit that 'retained_backups' represents. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; - * @return int - */ - public function getRetentionUnit() - { - return $this->retention_unit; - } - - /** - * The unit that 'retained_backups' represents. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; - * @param int $var - * @return $this - */ - public function setRetentionUnit($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupRetentionSettings\RetentionUnit::class); - $this->retention_unit = $var; - - return $this; - } - - /** - * Depending on the value of retention_unit, this is used to determine - * if a backup needs to be deleted. If retention_unit is 'COUNT', we will - * retain this many backups. - * - * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; - * @return \Google\Protobuf\Int32Value|null - */ - public function getRetainedBackups() - { - return $this->retained_backups; - } - - public function hasRetainedBackups() - { - return isset($this->retained_backups); - } - - public function clearRetainedBackups() - { - unset($this->retained_backups); - } - - /** - * Returns the unboxed value from getRetainedBackups() - - * Depending on the value of retention_unit, this is used to determine - * if a backup needs to be deleted. If retention_unit is 'COUNT', we will - * retain this many backups. - * - * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; - * @return int|null - */ - public function getRetainedBackupsUnwrapped() - { - return $this->readWrapperValue("retained_backups"); - } - - /** - * Depending on the value of retention_unit, this is used to determine - * if a backup needs to be deleted. If retention_unit is 'COUNT', we will - * retain this many backups. - * - * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setRetainedBackups($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->retained_backups = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Depending on the value of retention_unit, this is used to determine - * if a backup needs to be deleted. If retention_unit is 'COUNT', we will - * retain this many backups. - * - * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; - * @param int|null $var - * @return $this - */ - public function setRetainedBackupsUnwrapped($var) - { - $this->writeWrapperValue("retained_backups", $var); - return $this;} - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php deleted file mode 100644 index b1a12d681838..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit - */ -class RetentionUnit -{ - /** - * Backup retention unit is unspecified, will be treated as COUNT. - * - * Generated from protobuf enum RETENTION_UNIT_UNSPECIFIED = 0; - */ - const RETENTION_UNIT_UNSPECIFIED = 0; - /** - * Retention will be by count, eg. "retain the most recent 7 backups". - * - * Generated from protobuf enum COUNT = 1; - */ - const COUNT = 1; - - private static $valueToName = [ - self::RETENTION_UNIT_UNSPECIFIED => 'RETENTION_UNIT_UNSPECIFIED', - self::COUNT => 'COUNT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetentionUnit::class, \Google\Cloud\Sql\V1\BackupRetentionSettings_RetentionUnit::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php deleted file mode 100644 index 4c324d709909..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php +++ /dev/null @@ -1,777 +0,0 @@ -google.cloud.sql.v1.BackupRun - */ -class BackupRun extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#backupRun`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The status of this run. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; - */ - protected $status = 0; - /** - * The time the run was enqueued in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; - */ - protected $enqueued_time = null; - /** - * The identifier for this backup run. Unique only for a specific Cloud SQL - * instance. - * - * Generated from protobuf field int64 id = 4; - */ - protected $id = 0; - /** - * The time the backup operation actually started in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - */ - protected $start_time = null; - /** - * The time the backup operation completed in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - /** - * Information about why the backup operation failed. This is only present if - * the run has the FAILED status. - * - * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; - */ - protected $error = null; - /** - * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". - * This field defaults to "ON_DEMAND" and is ignored, when specified for - * insert requests. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; - */ - protected $type = 0; - /** - * The description of this run, only applicable to on-demand backups. - * - * Generated from protobuf field string description = 9; - */ - protected $description = ''; - /** - * The start time of the backup window during which this the backup was - * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; - */ - protected $window_start_time = null; - /** - * Name of the database instance. - * - * Generated from protobuf field string instance = 11; - */ - protected $instance = ''; - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 12; - */ - protected $self_link = ''; - /** - * Location of the backups. - * - * Generated from protobuf field string location = 13; - */ - protected $location = ''; - /** - * Encryption configuration specific to a backup. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; - */ - protected $disk_encryption_configuration = null; - /** - * Encryption status specific to a backup. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; - */ - protected $disk_encryption_status = null; - /** - * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; - */ - protected $backup_kind = 0; - /** - * Backup time zone to prevent restores to an instance with - * a different time zone. Now relevant only for SQL Server. - * - * Generated from protobuf field string time_zone = 23; - */ - protected $time_zone = ''; - /** - * Output only. The maximum chargeable bytes for the backup. - * - * Generated from protobuf field optional int64 max_chargeable_bytes = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $max_chargeable_bytes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#backupRun`. - * @type int $status - * The status of this run. - * @type \Google\Protobuf\Timestamp $enqueued_time - * The time the run was enqueued in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type int|string $id - * The identifier for this backup run. Unique only for a specific Cloud SQL - * instance. - * @type \Google\Protobuf\Timestamp $start_time - * The time the backup operation actually started in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type \Google\Protobuf\Timestamp $end_time - * The time the backup operation completed in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type \Google\Cloud\Sql\V1\OperationError $error - * Information about why the backup operation failed. This is only present if - * the run has the FAILED status. - * @type int $type - * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". - * This field defaults to "ON_DEMAND" and is ignored, when specified for - * insert requests. - * @type string $description - * The description of this run, only applicable to on-demand backups. - * @type \Google\Protobuf\Timestamp $window_start_time - * The start time of the backup window during which this the backup was - * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for - * example `2012-11-15T16:19:00.094Z`. - * @type string $instance - * Name of the database instance. - * @type string $self_link - * The URI of this resource. - * @type string $location - * Location of the backups. - * @type \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $disk_encryption_configuration - * Encryption configuration specific to a backup. - * @type \Google\Cloud\Sql\V1\DiskEncryptionStatus $disk_encryption_status - * Encryption status specific to a backup. - * @type int $backup_kind - * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. - * @type string $time_zone - * Backup time zone to prevent restores to an instance with - * a different time zone. Now relevant only for SQL Server. - * @type int|string $max_chargeable_bytes - * Output only. The maximum chargeable bytes for the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#backupRun`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#backupRun`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The status of this run. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * The status of this run. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupRunStatus::class); - $this->status = $var; - - return $this; - } - - /** - * The time the run was enqueued in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEnqueuedTime() - { - return $this->enqueued_time; - } - - public function hasEnqueuedTime() - { - return isset($this->enqueued_time); - } - - public function clearEnqueuedTime() - { - unset($this->enqueued_time); - } - - /** - * The time the run was enqueued in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEnqueuedTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->enqueued_time = $var; - - return $this; - } - - /** - * The identifier for this backup run. Unique only for a specific Cloud SQL - * instance. - * - * Generated from protobuf field int64 id = 4; - * @return int|string - */ - public function getId() - { - return $this->id; - } - - /** - * The identifier for this backup run. Unique only for a specific Cloud SQL - * instance. - * - * Generated from protobuf field int64 id = 4; - * @param int|string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkInt64($var); - $this->id = $var; - - return $this; - } - - /** - * The time the backup operation actually started in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * 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); - } - - /** - * The time the backup operation actually started in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * 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; - } - - /** - * The time the backup operation completed in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * 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); - } - - /** - * The time the backup operation completed in UTC timezone in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * 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; - } - - /** - * Information about why the backup operation failed. This is only present if - * the run has the FAILED status. - * - * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; - * @return \Google\Cloud\Sql\V1\OperationError|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Information about why the backup operation failed. This is only present if - * the run has the FAILED status. - * - * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; - * @param \Google\Cloud\Sql\V1\OperationError $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OperationError::class); - $this->error = $var; - - return $this; - } - - /** - * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". - * This field defaults to "ON_DEMAND" and is ignored, when specified for - * insert requests. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". - * This field defaults to "ON_DEMAND" and is ignored, when specified for - * insert requests. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupRunType::class); - $this->type = $var; - - return $this; - } - - /** - * The description of this run, only applicable to on-demand backups. - * - * Generated from protobuf field string description = 9; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of this run, only applicable to on-demand backups. - * - * Generated from protobuf field string description = 9; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The start time of the backup window during which this the backup was - * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getWindowStartTime() - { - return $this->window_start_time; - } - - public function hasWindowStartTime() - { - return isset($this->window_start_time); - } - - public function clearWindowStartTime() - { - unset($this->window_start_time); - } - - /** - * The start time of the backup window during which this the backup was - * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setWindowStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->window_start_time = $var; - - return $this; - } - - /** - * Name of the database instance. - * - * Generated from protobuf field string instance = 11; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Name of the database instance. - * - * Generated from protobuf field string instance = 11; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 12; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 12; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Location of the backups. - * - * Generated from protobuf field string location = 13; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location of the backups. - * - * Generated from protobuf field string location = 13; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Encryption configuration specific to a backup. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; - * @return \Google\Cloud\Sql\V1\DiskEncryptionConfiguration|null - */ - public function getDiskEncryptionConfiguration() - { - return $this->disk_encryption_configuration; - } - - public function hasDiskEncryptionConfiguration() - { - return isset($this->disk_encryption_configuration); - } - - public function clearDiskEncryptionConfiguration() - { - unset($this->disk_encryption_configuration); - } - - /** - * Encryption configuration specific to a backup. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; - * @param \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $var - * @return $this - */ - public function setDiskEncryptionConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionConfiguration::class); - $this->disk_encryption_configuration = $var; - - return $this; - } - - /** - * Encryption status specific to a backup. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; - * @return \Google\Cloud\Sql\V1\DiskEncryptionStatus|null - */ - public function getDiskEncryptionStatus() - { - return $this->disk_encryption_status; - } - - public function hasDiskEncryptionStatus() - { - return isset($this->disk_encryption_status); - } - - public function clearDiskEncryptionStatus() - { - unset($this->disk_encryption_status); - } - - /** - * Encryption status specific to a backup. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; - * @param \Google\Cloud\Sql\V1\DiskEncryptionStatus $var - * @return $this - */ - public function setDiskEncryptionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionStatus::class); - $this->disk_encryption_status = $var; - - return $this; - } - - /** - * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; - * @return int - */ - public function getBackupKind() - { - return $this->backup_kind; - } - - /** - * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; - * @param int $var - * @return $this - */ - public function setBackupKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupKind::class); - $this->backup_kind = $var; - - return $this; - } - - /** - * Backup time zone to prevent restores to an instance with - * a different time zone. Now relevant only for SQL Server. - * - * Generated from protobuf field string time_zone = 23; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * Backup time zone to prevent restores to an instance with - * a different time zone. Now relevant only for SQL Server. - * - * Generated from protobuf field string time_zone = 23; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * Output only. The maximum chargeable bytes for the backup. - * - * Generated from protobuf field optional int64 max_chargeable_bytes = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getMaxChargeableBytes() - { - return isset($this->max_chargeable_bytes) ? $this->max_chargeable_bytes : 0; - } - - public function hasMaxChargeableBytes() - { - return isset($this->max_chargeable_bytes); - } - - public function clearMaxChargeableBytes() - { - unset($this->max_chargeable_bytes); - } - - /** - * Output only. The maximum chargeable bytes for the backup. - * - * Generated from protobuf field optional int64 max_chargeable_bytes = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setMaxChargeableBytes($var) - { - GPBUtil::checkInt64($var); - $this->max_chargeable_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php deleted file mode 100644 index 9bbd7c75674f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.sql.v1.BackupRunsListResponse - */ -class BackupRunsListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#backupRunsList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * A list of backup runs in reverse chronological order of the enqueued time. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; - */ - private $items; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#backupRunsList`. - * @type array<\Google\Cloud\Sql\V1\BackupRun>|\Google\Protobuf\Internal\RepeatedField $items - * A list of backup runs in reverse chronological order of the enqueued time. - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#backupRunsList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#backupRunsList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * A list of backup runs in reverse chronological order of the enqueued time. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * A list of backup runs in reverse chronological order of the enqueued time. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; - * @param array<\Google\Cloud\Sql\V1\BackupRun>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\BackupRun::class); - $this->items = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php deleted file mode 100644 index 490cd7ee7edb..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.sql.v1.BakType - */ -class BakType -{ - /** - * Default type. - * - * Generated from protobuf enum BAK_TYPE_UNSPECIFIED = 0; - */ - const BAK_TYPE_UNSPECIFIED = 0; - /** - * Full backup. - * - * Generated from protobuf enum FULL = 1; - */ - const FULL = 1; - /** - * Differential backup. - * - * Generated from protobuf enum DIFF = 2; - */ - const DIFF = 2; - /** - * Transaction Log backup - * - * Generated from protobuf enum TLOG = 3; - */ - const TLOG = 3; - - private static $valueToName = [ - self::BAK_TYPE_UNSPECIFIED => 'BAK_TYPE_UNSPECIFIED', - self::FULL => 'FULL', - self::DIFF => 'DIFF', - self::TLOG => 'TLOG', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php deleted file mode 100644 index 0cbd09e04f0b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.BinLogCoordinates - */ -class BinLogCoordinates extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the binary log file for a Cloud SQL instance. - * - * Generated from protobuf field string bin_log_file_name = 1; - */ - protected $bin_log_file_name = ''; - /** - * Position (offset) within the binary log file. - * - * Generated from protobuf field int64 bin_log_position = 2; - */ - protected $bin_log_position = 0; - /** - * This is always `sql#binLogCoordinates`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bin_log_file_name - * Name of the binary log file for a Cloud SQL instance. - * @type int|string $bin_log_position - * Position (offset) within the binary log file. - * @type string $kind - * This is always `sql#binLogCoordinates`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Name of the binary log file for a Cloud SQL instance. - * - * Generated from protobuf field string bin_log_file_name = 1; - * @return string - */ - public function getBinLogFileName() - { - return $this->bin_log_file_name; - } - - /** - * Name of the binary log file for a Cloud SQL instance. - * - * Generated from protobuf field string bin_log_file_name = 1; - * @param string $var - * @return $this - */ - public function setBinLogFileName($var) - { - GPBUtil::checkString($var, True); - $this->bin_log_file_name = $var; - - return $this; - } - - /** - * Position (offset) within the binary log file. - * - * Generated from protobuf field int64 bin_log_position = 2; - * @return int|string - */ - public function getBinLogPosition() - { - return $this->bin_log_position; - } - - /** - * Position (offset) within the binary log file. - * - * Generated from protobuf field int64 bin_log_position = 2; - * @param int|string $var - * @return $this - */ - public function setBinLogPosition($var) - { - GPBUtil::checkInt64($var); - $this->bin_log_position = $var; - - return $this; - } - - /** - * This is always `sql#binLogCoordinates`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#binLogCoordinates`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php deleted file mode 100644 index 419ee86a5372..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php +++ /dev/null @@ -1,383 +0,0 @@ -google.cloud.sql.v1.CloneContext - */ -class CloneContext extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#cloneContext`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Reserved for future use. - * - * Generated from protobuf field int64 pitr_timestamp_ms = 2; - */ - protected $pitr_timestamp_ms = 0; - /** - * Name of the Cloud SQL instance to be created as a clone. - * - * Generated from protobuf field string destination_instance_name = 3; - */ - protected $destination_instance_name = ''; - /** - * Binary log coordinates, if specified, identify the position up to which the - * source instance is cloned. If not specified, the source instance is - * cloned up to the most recent binary log coordinates. - * - * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; - */ - protected $bin_log_coordinates = null; - /** - * Timestamp, if specified, identifies the time to which the source instance - * is cloned. - * - * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; - */ - protected $point_in_time = null; - /** - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the cloned instance - * ip will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Reserved for future use. - * - * Generated from protobuf field string allocated_ip_range = 6; - */ - protected $allocated_ip_range = ''; - /** - * (SQL Server only) Clone only the specified databases from the source - * instance. Clone all databases if empty. - * - * Generated from protobuf field repeated string database_names = 9; - */ - private $database_names; - /** - * Optional. Copy clone and point-in-time recovery clone of an instance to the - * specified zone. If no zone is specified, clone to the same primary zone as - * the source instance. This field applies to all DB types. - * - * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preferred_zone = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#cloneContext`. - * @type int|string $pitr_timestamp_ms - * Reserved for future use. - * @type string $destination_instance_name - * Name of the Cloud SQL instance to be created as a clone. - * @type \Google\Cloud\Sql\V1\BinLogCoordinates $bin_log_coordinates - * Binary log coordinates, if specified, identify the position up to which the - * source instance is cloned. If not specified, the source instance is - * cloned up to the most recent binary log coordinates. - * @type \Google\Protobuf\Timestamp $point_in_time - * Timestamp, if specified, identifies the time to which the source instance - * is cloned. - * @type string $allocated_ip_range - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the cloned instance - * ip will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Reserved for future use. - * @type array|\Google\Protobuf\Internal\RepeatedField $database_names - * (SQL Server only) Clone only the specified databases from the source - * instance. Clone all databases if empty. - * @type string $preferred_zone - * Optional. Copy clone and point-in-time recovery clone of an instance to the - * specified zone. If no zone is specified, clone to the same primary zone as - * the source instance. This field applies to all DB types. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#cloneContext`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#cloneContext`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Reserved for future use. - * - * Generated from protobuf field int64 pitr_timestamp_ms = 2; - * @return int|string - */ - public function getPitrTimestampMs() - { - return $this->pitr_timestamp_ms; - } - - /** - * Reserved for future use. - * - * Generated from protobuf field int64 pitr_timestamp_ms = 2; - * @param int|string $var - * @return $this - */ - public function setPitrTimestampMs($var) - { - GPBUtil::checkInt64($var); - $this->pitr_timestamp_ms = $var; - - return $this; - } - - /** - * Name of the Cloud SQL instance to be created as a clone. - * - * Generated from protobuf field string destination_instance_name = 3; - * @return string - */ - public function getDestinationInstanceName() - { - return $this->destination_instance_name; - } - - /** - * Name of the Cloud SQL instance to be created as a clone. - * - * Generated from protobuf field string destination_instance_name = 3; - * @param string $var - * @return $this - */ - public function setDestinationInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->destination_instance_name = $var; - - return $this; - } - - /** - * Binary log coordinates, if specified, identify the position up to which the - * source instance is cloned. If not specified, the source instance is - * cloned up to the most recent binary log coordinates. - * - * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; - * @return \Google\Cloud\Sql\V1\BinLogCoordinates|null - */ - public function getBinLogCoordinates() - { - return $this->bin_log_coordinates; - } - - public function hasBinLogCoordinates() - { - return isset($this->bin_log_coordinates); - } - - public function clearBinLogCoordinates() - { - unset($this->bin_log_coordinates); - } - - /** - * Binary log coordinates, if specified, identify the position up to which the - * source instance is cloned. If not specified, the source instance is - * cloned up to the most recent binary log coordinates. - * - * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; - * @param \Google\Cloud\Sql\V1\BinLogCoordinates $var - * @return $this - */ - public function setBinLogCoordinates($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BinLogCoordinates::class); - $this->bin_log_coordinates = $var; - - return $this; - } - - /** - * Timestamp, if specified, identifies the time to which the source instance - * is cloned. - * - * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPointInTime() - { - return $this->point_in_time; - } - - public function hasPointInTime() - { - return isset($this->point_in_time); - } - - public function clearPointInTime() - { - unset($this->point_in_time); - } - - /** - * Timestamp, if specified, identifies the time to which the source instance - * is cloned. - * - * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPointInTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->point_in_time = $var; - - return $this; - } - - /** - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the cloned instance - * ip will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Reserved for future use. - * - * Generated from protobuf field string allocated_ip_range = 6; - * @return string - */ - public function getAllocatedIpRange() - { - return $this->allocated_ip_range; - } - - /** - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the cloned instance - * ip will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * [a-z]([-a-z0-9]*[a-z0-9])?. - * Reserved for future use. - * - * Generated from protobuf field string allocated_ip_range = 6; - * @param string $var - * @return $this - */ - public function setAllocatedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->allocated_ip_range = $var; - - return $this; - } - - /** - * (SQL Server only) Clone only the specified databases from the source - * instance. Clone all databases if empty. - * - * Generated from protobuf field repeated string database_names = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatabaseNames() - { - return $this->database_names; - } - - /** - * (SQL Server only) Clone only the specified databases from the source - * instance. Clone all databases if empty. - * - * Generated from protobuf field repeated string database_names = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatabaseNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->database_names = $arr; - - return $this; - } - - /** - * Optional. Copy clone and point-in-time recovery clone of an instance to the - * specified zone. If no zone is specified, clone to the same primary zone as - * the source instance. This field applies to all DB types. - * - * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPreferredZone() - { - return isset($this->preferred_zone) ? $this->preferred_zone : ''; - } - - public function hasPreferredZone() - { - return isset($this->preferred_zone); - } - - public function clearPreferredZone() - { - unset($this->preferred_zone); - } - - /** - * Optional. Copy clone and point-in-time recovery clone of an instance to the - * specified zone. If no zone is specified, clone to the same primary zone as - * the source instance. This field applies to all DB types. - * - * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPreferredZone($var) - { - GPBUtil::checkString($var, True); - $this->preferred_zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php deleted file mode 100644 index 55a567be5477..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php +++ /dev/null @@ -1,405 +0,0 @@ -google.cloud.sql.v1.ConnectSettings - */ -class ConnectSettings extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#connectSettings`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * SSL configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; - */ - protected $server_ca_cert = null; - /** - * The assigned IP addresses for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; - */ - private $ip_addresses; - /** - * The cloud region for the instance. For example, `us-central1`, - * `europe-west1`. The region cannot be changed after instance creation. - * - * Generated from protobuf field string region = 4; - */ - protected $region = ''; - /** - * The database engine type and version. The `databaseVersion` - * field cannot be changed after instance creation. - * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), - * or `MYSQL_5_6`. - * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. - * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), - * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, - * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; - */ - protected $database_version = 0; - /** - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; - */ - protected $backend_type = 0; - /** - * Whether PSC connectivity is enabled for this instance. - * - * Generated from protobuf field bool psc_enabled = 33; - */ - protected $psc_enabled = false; - /** - * The dns name of the instance. - * - * Generated from protobuf field string dns_name = 34; - */ - protected $dns_name = ''; - /** - * Specify what type of CA is used for the server certificate. - * - * Generated from protobuf field .google.cloud.sql.v1.ConnectSettings.CaMode server_ca_mode = 35; - */ - protected $server_ca_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#connectSettings`. - * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert - * SSL configuration. - * @type array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses - * The assigned IP addresses for the instance. - * @type string $region - * The cloud region for the instance. For example, `us-central1`, - * `europe-west1`. The region cannot be changed after instance creation. - * @type int $database_version - * The database engine type and version. The `databaseVersion` - * field cannot be changed after instance creation. - * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), - * or `MYSQL_5_6`. - * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. - * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), - * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, - * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * @type int $backend_type - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * @type bool $psc_enabled - * Whether PSC connectivity is enabled for this instance. - * @type string $dns_name - * The dns name of the instance. - * @type int $server_ca_mode - * Specify what type of CA is used for the server certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#connectSettings`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#connectSettings`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * SSL configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; - * @return \Google\Cloud\Sql\V1\SslCert|null - */ - public function getServerCaCert() - { - return $this->server_ca_cert; - } - - public function hasServerCaCert() - { - return isset($this->server_ca_cert); - } - - public function clearServerCaCert() - { - unset($this->server_ca_cert); - } - - /** - * SSL configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; - * @param \Google\Cloud\Sql\V1\SslCert $var - * @return $this - */ - public function setServerCaCert($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); - $this->server_ca_cert = $var; - - return $this; - } - - /** - * The assigned IP addresses for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpAddresses() - { - return $this->ip_addresses; - } - - /** - * The assigned IP addresses for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; - * @param array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\IpMapping::class); - $this->ip_addresses = $arr; - - return $this; - } - - /** - * The cloud region for the instance. For example, `us-central1`, - * `europe-west1`. The region cannot be changed after instance creation. - * - * Generated from protobuf field string region = 4; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * The cloud region for the instance. For example, `us-central1`, - * `europe-west1`. The region cannot be changed after instance creation. - * - * Generated from protobuf field string region = 4; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * The database engine type and version. The `databaseVersion` - * field cannot be changed after instance creation. - * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), - * or `MYSQL_5_6`. - * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. - * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), - * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, - * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; - * @return int - */ - public function getDatabaseVersion() - { - return $this->database_version; - } - - /** - * The database engine type and version. The `databaseVersion` - * field cannot be changed after instance creation. - * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), - * or `MYSQL_5_6`. - * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. - * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), - * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, - * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; - * @param int $var - * @return $this - */ - public function setDatabaseVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); - $this->database_version = $var; - - return $this; - } - - /** - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; - * @return int - */ - public function getBackendType() - { - return $this->backend_type; - } - - /** - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; - * @param int $var - * @return $this - */ - public function setBackendType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackendType::class); - $this->backend_type = $var; - - return $this; - } - - /** - * Whether PSC connectivity is enabled for this instance. - * - * Generated from protobuf field bool psc_enabled = 33; - * @return bool - */ - public function getPscEnabled() - { - return $this->psc_enabled; - } - - /** - * Whether PSC connectivity is enabled for this instance. - * - * Generated from protobuf field bool psc_enabled = 33; - * @param bool $var - * @return $this - */ - public function setPscEnabled($var) - { - GPBUtil::checkBool($var); - $this->psc_enabled = $var; - - return $this; - } - - /** - * The dns name of the instance. - * - * Generated from protobuf field string dns_name = 34; - * @return string - */ - public function getDnsName() - { - return $this->dns_name; - } - - /** - * The dns name of the instance. - * - * Generated from protobuf field string dns_name = 34; - * @param string $var - * @return $this - */ - public function setDnsName($var) - { - GPBUtil::checkString($var, True); - $this->dns_name = $var; - - return $this; - } - - /** - * Specify what type of CA is used for the server certificate. - * - * Generated from protobuf field .google.cloud.sql.v1.ConnectSettings.CaMode server_ca_mode = 35; - * @return int - */ - public function getServerCaMode() - { - return $this->server_ca_mode; - } - - /** - * Specify what type of CA is used for the server certificate. - * - * Generated from protobuf field .google.cloud.sql.v1.ConnectSettings.CaMode server_ca_mode = 35; - * @param int $var - * @return $this - */ - public function setServerCaMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ConnectSettings\CaMode::class); - $this->server_ca_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php deleted file mode 100644 index 172d17a7b126..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings/CaMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.sql.v1.ConnectSettings.CaMode - */ -class CaMode -{ - /** - * CA mode is unknown. - * - * Generated from protobuf enum CA_MODE_UNSPECIFIED = 0; - */ - const CA_MODE_UNSPECIFIED = 0; - /** - * Google-managed self-signed internal CA. - * - * Generated from protobuf enum GOOGLE_MANAGED_INTERNAL_CA = 1; - */ - const GOOGLE_MANAGED_INTERNAL_CA = 1; - /** - * Google-managed regional CA part of root CA hierarchy hosted on Google - * Cloud's Certificate Authority Service (CAS). - * - * Generated from protobuf enum GOOGLE_MANAGED_CAS_CA = 2; - */ - const GOOGLE_MANAGED_CAS_CA = 2; - - private static $valueToName = [ - self::CA_MODE_UNSPECIFIED => 'CA_MODE_UNSPECIFIED', - self::GOOGLE_MANAGED_INTERNAL_CA => 'GOOGLE_MANAGED_INTERNAL_CA', - self::GOOGLE_MANAGED_CAS_CA => 'GOOGLE_MANAGED_CAS_CA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CaMode::class, \Google\Cloud\Sql\V1\ConnectSettings_CaMode::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php deleted file mode 100644 index 64063925f8c6..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.DataCacheConfig - */ -class DataCacheConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether data cache is enabled for the instance. - * - * Generated from protobuf field bool data_cache_enabled = 1; - */ - protected $data_cache_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $data_cache_enabled - * Whether data cache is enabled for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Whether data cache is enabled for the instance. - * - * Generated from protobuf field bool data_cache_enabled = 1; - * @return bool - */ - public function getDataCacheEnabled() - { - return $this->data_cache_enabled; - } - - /** - * Whether data cache is enabled for the instance. - * - * Generated from protobuf field bool data_cache_enabled = 1; - * @param bool $var - * @return $this - */ - public function setDataCacheEnabled($var) - { - GPBUtil::checkBool($var); - $this->data_cache_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php deleted file mode 100644 index 820ce4a13ffe..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php +++ /dev/null @@ -1,354 +0,0 @@ -google.cloud.sql.v1.Database - */ -class Database extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#database`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The Cloud SQL charset value. - * - * Generated from protobuf field string charset = 2; - */ - protected $charset = ''; - /** - * The Cloud SQL collation value. - * - * Generated from protobuf field string collation = 3; - */ - protected $collation = ''; - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * Generated from protobuf field string etag = 4; - */ - protected $etag = ''; - /** - * The name of the database in the Cloud SQL instance. This does not include - * the project ID or instance name. - * - * Generated from protobuf field string name = 5; - */ - protected $name = ''; - /** - * The name of the Cloud SQL instance. This does not include the project ID. - * - * Generated from protobuf field string instance = 6; - */ - protected $instance = ''; - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 7; - */ - protected $self_link = ''; - /** - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. - * - * Generated from protobuf field string project = 8; - */ - protected $project = ''; - protected $database_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#database`. - * @type string $charset - * The Cloud SQL charset value. - * @type string $collation - * The Cloud SQL collation value. - * @type string $etag - * This field is deprecated and will be removed from a future version of the - * API. - * @type string $name - * The name of the database in the Cloud SQL instance. This does not include - * the project ID or instance name. - * @type string $instance - * The name of the Cloud SQL instance. This does not include the project ID. - * @type string $self_link - * The URI of this resource. - * @type string $project - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. - * @type \Google\Cloud\Sql\V1\SqlServerDatabaseDetails $sqlserver_database_details - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#database`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#database`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The Cloud SQL charset value. - * - * Generated from protobuf field string charset = 2; - * @return string - */ - public function getCharset() - { - return $this->charset; - } - - /** - * The Cloud SQL charset value. - * - * Generated from protobuf field string charset = 2; - * @param string $var - * @return $this - */ - public function setCharset($var) - { - GPBUtil::checkString($var, True); - $this->charset = $var; - - return $this; - } - - /** - * The Cloud SQL collation value. - * - * Generated from protobuf field string collation = 3; - * @return string - */ - public function getCollation() - { - return $this->collation; - } - - /** - * The Cloud SQL collation value. - * - * Generated from protobuf field string collation = 3; - * @param string $var - * @return $this - */ - public function setCollation($var) - { - GPBUtil::checkString($var, True); - $this->collation = $var; - - return $this; - } - - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * Generated from protobuf field string etag = 4; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * Generated from protobuf field string etag = 4; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The name of the database in the Cloud SQL instance. This does not include - * the project ID or instance name. - * - * Generated from protobuf field string name = 5; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the database in the Cloud SQL instance. This does not include - * the project ID or instance name. - * - * Generated from protobuf field string name = 5; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The name of the Cloud SQL instance. This does not include the project ID. - * - * Generated from protobuf field string instance = 6; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * The name of the Cloud SQL instance. This does not include the project ID. - * - * Generated from protobuf field string instance = 6; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 7; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 7; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. - * - * Generated from protobuf field string project = 8; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. - * - * Generated from protobuf field string project = 8; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9; - * @return \Google\Cloud\Sql\V1\SqlServerDatabaseDetails|null - */ - public function getSqlserverDatabaseDetails() - { - return $this->readOneof(9); - } - - public function hasSqlserverDatabaseDetails() - { - return $this->hasOneof(9); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9; - * @param \Google\Cloud\Sql\V1\SqlServerDatabaseDetails $var - * @return $this - */ - public function setSqlserverDatabaseDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerDatabaseDetails::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getDatabaseDetails() - { - return $this->whichOneof("database_details"); - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php deleted file mode 100644 index 6ff8e5bfce63..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.sql.v1.DatabaseFlags - */ -class DatabaseFlags extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the flag. These flags are passed at instance startup, so - * include both server options and system variables. Flags are - * specified with underscores, not hyphens. For more information, see - * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) - * in the Cloud SQL documentation. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The value of the flag. Boolean flags are set to `on` for true - * and `off` for false. This field must be omitted if the flag - * doesn't take a value. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the flag. These flags are passed at instance startup, so - * include both server options and system variables. Flags are - * specified with underscores, not hyphens. For more information, see - * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) - * in the Cloud SQL documentation. - * @type string $value - * The value of the flag. Boolean flags are set to `on` for true - * and `off` for false. This field must be omitted if the flag - * doesn't take a value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the flag. These flags are passed at instance startup, so - * include both server options and system variables. Flags are - * specified with underscores, not hyphens. For more information, see - * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) - * in the Cloud SQL documentation. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the flag. These flags are passed at instance startup, so - * include both server options and system variables. Flags are - * specified with underscores, not hyphens. For more information, see - * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) - * in the Cloud SQL documentation. - * - * 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 value of the flag. Boolean flags are set to `on` for true - * and `off` for false. This field must be omitted if the flag - * doesn't take a value. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the flag. Boolean flags are set to `on` for true - * and `off` for false. This field must be omitted if the flag - * doesn't take a value. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php deleted file mode 100644 index f4a643d52e7e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php +++ /dev/null @@ -1,2157 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance - */ -class DatabaseInstance extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#instance`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The current serving state of the Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; - */ - protected $state = 0; - /** - * The database engine type and version. The `databaseVersion` field cannot - * be changed after instance creation. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; - */ - protected $database_version = 0; - /** - * The user settings. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; - */ - protected $settings = null; - /** - * This field is deprecated and will be removed from a future version of the - * API. Use the `settings.settingsVersion` field instead. - * - * Generated from protobuf field string etag = 5; - */ - protected $etag = ''; - /** - * The name and status of the failover replica. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; - */ - protected $failover_replica = null; - /** - * The name of the instance which will act as primary in the replication - * setup. - * - * Generated from protobuf field string master_instance_name = 7; - */ - protected $master_instance_name = ''; - /** - * The replicas of the instance. - * - * Generated from protobuf field repeated string replica_names = 8; - */ - private $replica_names; - /** - * The maximum disk size of the instance in bytes. - * - * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; - * @deprecated - */ - protected $max_disk_size = null; - /** - * The current disk usage of the instance in bytes. This property has been - * deprecated. Use the - * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - * Monitoring API instead. Please see [this - * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - * for details. - * - * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; - * @deprecated - */ - protected $current_disk_size = null; - /** - * The assigned IP addresses for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; - */ - private $ip_addresses; - /** - * SSL configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; - */ - protected $server_ca_cert = null; - /** - * The instance type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; - */ - protected $instance_type = 0; - /** - * The project ID of the project containing the Cloud SQL instance. The Google - * apps domain is prefixed if applicable. - * - * Generated from protobuf field string project = 14; - */ - protected $project = ''; - /** - * The IPv6 address assigned to the instance. - * (Deprecated) This property was applicable only - * to First Generation instances. - * - * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; - * @deprecated - */ - protected $ipv6_address = ''; - /** - * The service account email address assigned to the instance.\This - * property is read-only. - * - * Generated from protobuf field string service_account_email_address = 16; - */ - protected $service_account_email_address = ''; - /** - * Configuration specific to on-premises instances. - * - * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; - */ - protected $on_premises_configuration = null; - /** - * Configuration specific to failover replicas and read replicas. - * - * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; - */ - protected $replica_configuration = null; - /** - * The backend type. - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; - */ - protected $backend_type = 0; - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 20; - */ - protected $self_link = ''; - /** - * If the instance state is SUSPENDED, the reason for the suspension. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; - */ - private $suspension_reason; - /** - * Connection name of the Cloud SQL instance used in connection strings. - * - * Generated from protobuf field string connection_name = 22; - */ - protected $connection_name = ''; - /** - * Name of the Cloud SQL instance. This does not include the project ID. - * - * Generated from protobuf field string name = 23; - */ - protected $name = ''; - /** - * The geographical region of the Cloud SQL instance. - * It can be one of the - * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) - * where Cloud SQL operates: - * For example, `asia-east1`, `europe-west1`, and `us-central1`. - * The default value is `us-central1`. - * - * Generated from protobuf field string region = 24; - */ - protected $region = ''; - /** - * The Compute Engine zone that the instance is currently serving from. This - * value could be different from the zone that was specified when the instance - * was created if the instance has failed over to its secondary zone. WARNING: - * Changing this might restart the instance. - * - * Generated from protobuf field string gce_zone = 25; - */ - protected $gce_zone = ''; - /** - * The Compute Engine zone that the failover instance is currently serving - * from for a regional instance. This value could be different - * from the zone that was specified when the instance - * was created if the instance has failed over to its secondary/failover zone. - * - * Generated from protobuf field string secondary_gce_zone = 34; - */ - protected $secondary_gce_zone = ''; - /** - * Disk encryption configuration specific to an instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; - */ - protected $disk_encryption_configuration = null; - /** - * Disk encryption status specific to an instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; - */ - protected $disk_encryption_status = null; - /** - * Initial root password. Use only on creation. You must set root passwords - * before you can connect to PostgreSQL instances. - * - * Generated from protobuf field string root_password = 29; - */ - protected $root_password = ''; - /** - * The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; - */ - protected $scheduled_maintenance = null; - /** - * This status indicates whether the instance satisfies PZS. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; - */ - protected $satisfies_pzs = null; - /** - * Output only. Stores the current database version running on the instance - * including minor version such as `MYSQL_8_0_18`. - * - * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_installed_version = ''; - /** - * This field represents the report generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; - */ - protected $out_of_disk_report = null; - /** - * Output only. The time when the instance was created in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. List all maintenance versions applicable on the instance - * - * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $available_maintenance_versions; - /** - * The current software version on the instance. - * - * Generated from protobuf field string maintenance_version = 42; - */ - protected $maintenance_version = ''; - /** - * Output only. All database versions that are available for upgrade. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.AvailableDatabaseVersion upgradable_database_versions = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $upgradable_database_versions; - /** - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; - */ - protected $sql_network_architecture = null; - /** - * Output only. The link to service attachment of PSC instance. - * - * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_service_attachment_link = null; - /** - * Output only. The dns name of the instance. - * - * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dns_name = null; - /** - * Output only. DEPRECATED: please use write_endpoint instead. - * - * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $primary_dns_name = null; - /** - * Output only. The dns name of the primary instance in a replication group. - * - * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $write_endpoint = null; - /** - * Optional. A primary instance and disaster recovery (DR) replica pair. - * A DR replica is a cross-region replica that you designate - * for failover in the event that the primary instance - * experiences regional failure. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $replication_cluster = null; - /** - * Gemini instance configuration. - * - * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; - */ - protected $gemini_config = null; - /** - * Output only. This status indicates whether the instance satisfies PZI. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = null; - /** - * Input only. Whether Cloud SQL is enabled to switch storing point-in-time - * recovery log files from a data disk to Cloud Storage. - * - * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $switch_transaction_logs_to_cloud_storage_enabled = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#instance`. - * @type int $state - * The current serving state of the Cloud SQL instance. - * @type int $database_version - * The database engine type and version. The `databaseVersion` field cannot - * be changed after instance creation. - * @type \Google\Cloud\Sql\V1\Settings $settings - * The user settings. - * @type string $etag - * This field is deprecated and will be removed from a future version of the - * API. Use the `settings.settingsVersion` field instead. - * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica $failover_replica - * The name and status of the failover replica. - * @type string $master_instance_name - * The name of the instance which will act as primary in the replication - * setup. - * @type array|\Google\Protobuf\Internal\RepeatedField $replica_names - * The replicas of the instance. - * @type \Google\Protobuf\Int64Value $max_disk_size - * The maximum disk size of the instance in bytes. - * @type \Google\Protobuf\Int64Value $current_disk_size - * The current disk usage of the instance in bytes. This property has been - * deprecated. Use the - * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - * Monitoring API instead. Please see [this - * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - * for details. - * @type array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses - * The assigned IP addresses for the instance. - * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert - * SSL configuration. - * @type int $instance_type - * The instance type. - * @type string $project - * The project ID of the project containing the Cloud SQL instance. The Google - * apps domain is prefixed if applicable. - * @type string $ipv6_address - * The IPv6 address assigned to the instance. - * (Deprecated) This property was applicable only - * to First Generation instances. - * @type string $service_account_email_address - * The service account email address assigned to the instance.\This - * property is read-only. - * @type \Google\Cloud\Sql\V1\OnPremisesConfiguration $on_premises_configuration - * Configuration specific to on-premises instances. - * @type \Google\Cloud\Sql\V1\ReplicaConfiguration $replica_configuration - * Configuration specific to failover replicas and read replicas. - * @type int $backend_type - * The backend type. - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * @type string $self_link - * The URI of this resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $suspension_reason - * If the instance state is SUSPENDED, the reason for the suspension. - * @type string $connection_name - * Connection name of the Cloud SQL instance used in connection strings. - * @type string $name - * Name of the Cloud SQL instance. This does not include the project ID. - * @type string $region - * The geographical region of the Cloud SQL instance. - * It can be one of the - * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) - * where Cloud SQL operates: - * For example, `asia-east1`, `europe-west1`, and `us-central1`. - * The default value is `us-central1`. - * @type string $gce_zone - * The Compute Engine zone that the instance is currently serving from. This - * value could be different from the zone that was specified when the instance - * was created if the instance has failed over to its secondary zone. WARNING: - * Changing this might restart the instance. - * @type string $secondary_gce_zone - * The Compute Engine zone that the failover instance is currently serving - * from for a regional instance. This value could be different - * from the zone that was specified when the instance - * was created if the instance has failed over to its secondary/failover zone. - * @type \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $disk_encryption_configuration - * Disk encryption configuration specific to an instance. - * @type \Google\Cloud\Sql\V1\DiskEncryptionStatus $disk_encryption_status - * Disk encryption status specific to an instance. - * @type string $root_password - * Initial root password. Use only on creation. You must set root passwords - * before you can connect to PostgreSQL instances. - * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance $scheduled_maintenance - * The start time of any upcoming scheduled maintenance for this instance. - * @type \Google\Protobuf\BoolValue $satisfies_pzs - * This status indicates whether the instance satisfies PZS. - * The status is reserved for future use. - * @type string $database_installed_version - * Output only. Stores the current database version running on the instance - * including minor version such as `MYSQL_8_0_18`. - * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport $out_of_disk_report - * This field represents the report generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the instance was created in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type array|\Google\Protobuf\Internal\RepeatedField $available_maintenance_versions - * Output only. List all maintenance versions applicable on the instance - * @type string $maintenance_version - * The current software version on the instance. - * @type array<\Google\Cloud\Sql\V1\AvailableDatabaseVersion>|\Google\Protobuf\Internal\RepeatedField $upgradable_database_versions - * Output only. All database versions that are available for upgrade. - * @type int $sql_network_architecture - * @type string $psc_service_attachment_link - * Output only. The link to service attachment of PSC instance. - * @type string $dns_name - * Output only. The dns name of the instance. - * @type string $primary_dns_name - * Output only. DEPRECATED: please use write_endpoint instead. - * @type string $write_endpoint - * Output only. The dns name of the primary instance in a replication group. - * @type \Google\Cloud\Sql\V1\ReplicationCluster $replication_cluster - * Optional. A primary instance and disaster recovery (DR) replica pair. - * A DR replica is a cross-region replica that you designate - * for failover in the event that the primary instance - * experiences regional failure. Only applicable to MySQL. - * @type \Google\Cloud\Sql\V1\GeminiInstanceConfig $gemini_config - * Gemini instance configuration. - * @type \Google\Protobuf\BoolValue $satisfies_pzi - * Output only. This status indicates whether the instance satisfies PZI. - * The status is reserved for future use. - * @type \Google\Protobuf\BoolValue $switch_transaction_logs_to_cloud_storage_enabled - * Input only. Whether Cloud SQL is enabled to switch storing point-in-time - * recovery log files from a data disk to Cloud Storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#instance`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#instance`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The current serving state of the Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current serving state of the Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlInstanceState::class); - $this->state = $var; - - return $this; - } - - /** - * The database engine type and version. The `databaseVersion` field cannot - * be changed after instance creation. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; - * @return int - */ - public function getDatabaseVersion() - { - return $this->database_version; - } - - /** - * The database engine type and version. The `databaseVersion` field cannot - * be changed after instance creation. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; - * @param int $var - * @return $this - */ - public function setDatabaseVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); - $this->database_version = $var; - - return $this; - } - - /** - * The user settings. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; - * @return \Google\Cloud\Sql\V1\Settings|null - */ - public function getSettings() - { - return $this->settings; - } - - public function hasSettings() - { - return isset($this->settings); - } - - public function clearSettings() - { - unset($this->settings); - } - - /** - * The user settings. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; - * @param \Google\Cloud\Sql\V1\Settings $var - * @return $this - */ - public function setSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Settings::class); - $this->settings = $var; - - return $this; - } - - /** - * This field is deprecated and will be removed from a future version of the - * API. Use the `settings.settingsVersion` field instead. - * - * Generated from protobuf field string etag = 5; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This field is deprecated and will be removed from a future version of the - * API. Use the `settings.settingsVersion` field instead. - * - * Generated from protobuf field string etag = 5; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * The name and status of the failover replica. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; - * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica|null - */ - public function getFailoverReplica() - { - return $this->failover_replica; - } - - public function hasFailoverReplica() - { - return isset($this->failover_replica); - } - - public function clearFailoverReplica() - { - unset($this->failover_replica); - } - - /** - * The name and status of the failover replica. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; - * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica $var - * @return $this - */ - public function setFailoverReplica($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica::class); - $this->failover_replica = $var; - - return $this; - } - - /** - * The name of the instance which will act as primary in the replication - * setup. - * - * Generated from protobuf field string master_instance_name = 7; - * @return string - */ - public function getMasterInstanceName() - { - return $this->master_instance_name; - } - - /** - * The name of the instance which will act as primary in the replication - * setup. - * - * Generated from protobuf field string master_instance_name = 7; - * @param string $var - * @return $this - */ - public function setMasterInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->master_instance_name = $var; - - return $this; - } - - /** - * The replicas of the instance. - * - * Generated from protobuf field repeated string replica_names = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplicaNames() - { - return $this->replica_names; - } - - /** - * The replicas of the instance. - * - * Generated from protobuf field repeated string replica_names = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplicaNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->replica_names = $arr; - - return $this; - } - - /** - * The maximum disk size of the instance in bytes. - * - * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; - * @return \Google\Protobuf\Int64Value|null - * @deprecated - */ - public function getMaxDiskSize() - { - @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); - return $this->max_disk_size; - } - - public function hasMaxDiskSize() - { - @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); - return isset($this->max_disk_size); - } - - public function clearMaxDiskSize() - { - @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); - unset($this->max_disk_size); - } - - /** - * Returns the unboxed value from getMaxDiskSize() - - * The maximum disk size of the instance in bytes. - * - * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; - * @return int|string|null - */ - public function getMaxDiskSizeUnwrapped() - { - @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("max_disk_size"); - } - - /** - * The maximum disk size of the instance in bytes. - * - * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - * @deprecated - */ - public function setMaxDiskSize($var) - { - @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->max_disk_size = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The maximum disk size of the instance in bytes. - * - * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; - * @param int|string|null $var - * @return $this - */ - public function setMaxDiskSizeUnwrapped($var) - { - $this->writeWrapperValue("max_disk_size", $var); - return $this;} - - /** - * The current disk usage of the instance in bytes. This property has been - * deprecated. Use the - * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - * Monitoring API instead. Please see [this - * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - * for details. - * - * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; - * @return \Google\Protobuf\Int64Value|null - * @deprecated - */ - public function getCurrentDiskSize() - { - @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); - return $this->current_disk_size; - } - - public function hasCurrentDiskSize() - { - @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); - return isset($this->current_disk_size); - } - - public function clearCurrentDiskSize() - { - @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); - unset($this->current_disk_size); - } - - /** - * Returns the unboxed value from getCurrentDiskSize() - - * The current disk usage of the instance in bytes. This property has been - * deprecated. Use the - * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - * Monitoring API instead. Please see [this - * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - * for details. - * - * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; - * @return int|string|null - */ - public function getCurrentDiskSizeUnwrapped() - { - @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("current_disk_size"); - } - - /** - * The current disk usage of the instance in bytes. This property has been - * deprecated. Use the - * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - * Monitoring API instead. Please see [this - * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - * for details. - * - * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - * @deprecated - */ - public function setCurrentDiskSize($var) - { - @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->current_disk_size = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The current disk usage of the instance in bytes. This property has been - * deprecated. Use the - * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud - * Monitoring API instead. Please see [this - * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) - * for details. - * - * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; - * @param int|string|null $var - * @return $this - */ - public function setCurrentDiskSizeUnwrapped($var) - { - $this->writeWrapperValue("current_disk_size", $var); - return $this;} - - /** - * The assigned IP addresses for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpAddresses() - { - return $this->ip_addresses; - } - - /** - * The assigned IP addresses for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; - * @param array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\IpMapping::class); - $this->ip_addresses = $arr; - - return $this; - } - - /** - * SSL configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; - * @return \Google\Cloud\Sql\V1\SslCert|null - */ - public function getServerCaCert() - { - return $this->server_ca_cert; - } - - public function hasServerCaCert() - { - return isset($this->server_ca_cert); - } - - public function clearServerCaCert() - { - unset($this->server_ca_cert); - } - - /** - * SSL configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; - * @param \Google\Cloud\Sql\V1\SslCert $var - * @return $this - */ - public function setServerCaCert($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); - $this->server_ca_cert = $var; - - return $this; - } - - /** - * The instance type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; - * @return int - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * The instance type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; - * @param int $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstanceType::class); - $this->instance_type = $var; - - return $this; - } - - /** - * The project ID of the project containing the Cloud SQL instance. The Google - * apps domain is prefixed if applicable. - * - * Generated from protobuf field string project = 14; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The project ID of the project containing the Cloud SQL instance. The Google - * apps domain is prefixed if applicable. - * - * Generated from protobuf field string project = 14; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The IPv6 address assigned to the instance. - * (Deprecated) This property was applicable only - * to First Generation instances. - * - * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; - * @return string - * @deprecated - */ - public function getIpv6Address() - { - @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); - return $this->ipv6_address; - } - - /** - * The IPv6 address assigned to the instance. - * (Deprecated) This property was applicable only - * to First Generation instances. - * - * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setIpv6Address($var) - { - @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->ipv6_address = $var; - - return $this; - } - - /** - * The service account email address assigned to the instance.\This - * property is read-only. - * - * Generated from protobuf field string service_account_email_address = 16; - * @return string - */ - public function getServiceAccountEmailAddress() - { - return $this->service_account_email_address; - } - - /** - * The service account email address assigned to the instance.\This - * property is read-only. - * - * Generated from protobuf field string service_account_email_address = 16; - * @param string $var - * @return $this - */ - public function setServiceAccountEmailAddress($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email_address = $var; - - return $this; - } - - /** - * Configuration specific to on-premises instances. - * - * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; - * @return \Google\Cloud\Sql\V1\OnPremisesConfiguration|null - */ - public function getOnPremisesConfiguration() - { - return $this->on_premises_configuration; - } - - public function hasOnPremisesConfiguration() - { - return isset($this->on_premises_configuration); - } - - public function clearOnPremisesConfiguration() - { - unset($this->on_premises_configuration); - } - - /** - * Configuration specific to on-premises instances. - * - * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; - * @param \Google\Cloud\Sql\V1\OnPremisesConfiguration $var - * @return $this - */ - public function setOnPremisesConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OnPremisesConfiguration::class); - $this->on_premises_configuration = $var; - - return $this; - } - - /** - * Configuration specific to failover replicas and read replicas. - * - * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; - * @return \Google\Cloud\Sql\V1\ReplicaConfiguration|null - */ - public function getReplicaConfiguration() - { - return $this->replica_configuration; - } - - public function hasReplicaConfiguration() - { - return isset($this->replica_configuration); - } - - public function clearReplicaConfiguration() - { - unset($this->replica_configuration); - } - - /** - * Configuration specific to failover replicas and read replicas. - * - * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; - * @param \Google\Cloud\Sql\V1\ReplicaConfiguration $var - * @return $this - */ - public function setReplicaConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicaConfiguration::class); - $this->replica_configuration = $var; - - return $this; - } - - /** - * The backend type. - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; - * @return int - */ - public function getBackendType() - { - return $this->backend_type; - } - - /** - * The backend type. - * `SECOND_GEN`: Cloud SQL database instance. - * `EXTERNAL`: A database server that is not managed by Google. - * This property is read-only; use the `tier` property in the `settings` - * object to determine the database type. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; - * @param int $var - * @return $this - */ - public function setBackendType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackendType::class); - $this->backend_type = $var; - - return $this; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 20; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 20; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * If the instance state is SUSPENDED, the reason for the suspension. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSuspensionReason() - { - return $this->suspension_reason; - } - - /** - * If the instance state is SUSPENDED, the reason for the suspension. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSuspensionReason($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1\SqlSuspensionReason::class); - $this->suspension_reason = $arr; - - return $this; - } - - /** - * Connection name of the Cloud SQL instance used in connection strings. - * - * Generated from protobuf field string connection_name = 22; - * @return string - */ - public function getConnectionName() - { - return $this->connection_name; - } - - /** - * Connection name of the Cloud SQL instance used in connection strings. - * - * Generated from protobuf field string connection_name = 22; - * @param string $var - * @return $this - */ - public function setConnectionName($var) - { - GPBUtil::checkString($var, True); - $this->connection_name = $var; - - return $this; - } - - /** - * Name of the Cloud SQL instance. This does not include the project ID. - * - * Generated from protobuf field string name = 23; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the Cloud SQL instance. This does not include the project ID. - * - * Generated from protobuf field string name = 23; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The geographical region of the Cloud SQL instance. - * It can be one of the - * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) - * where Cloud SQL operates: - * For example, `asia-east1`, `europe-west1`, and `us-central1`. - * The default value is `us-central1`. - * - * Generated from protobuf field string region = 24; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * The geographical region of the Cloud SQL instance. - * It can be one of the - * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) - * where Cloud SQL operates: - * For example, `asia-east1`, `europe-west1`, and `us-central1`. - * The default value is `us-central1`. - * - * Generated from protobuf field string region = 24; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * The Compute Engine zone that the instance is currently serving from. This - * value could be different from the zone that was specified when the instance - * was created if the instance has failed over to its secondary zone. WARNING: - * Changing this might restart the instance. - * - * Generated from protobuf field string gce_zone = 25; - * @return string - */ - public function getGceZone() - { - return $this->gce_zone; - } - - /** - * The Compute Engine zone that the instance is currently serving from. This - * value could be different from the zone that was specified when the instance - * was created if the instance has failed over to its secondary zone. WARNING: - * Changing this might restart the instance. - * - * Generated from protobuf field string gce_zone = 25; - * @param string $var - * @return $this - */ - public function setGceZone($var) - { - GPBUtil::checkString($var, True); - $this->gce_zone = $var; - - return $this; - } - - /** - * The Compute Engine zone that the failover instance is currently serving - * from for a regional instance. This value could be different - * from the zone that was specified when the instance - * was created if the instance has failed over to its secondary/failover zone. - * - * Generated from protobuf field string secondary_gce_zone = 34; - * @return string - */ - public function getSecondaryGceZone() - { - return $this->secondary_gce_zone; - } - - /** - * The Compute Engine zone that the failover instance is currently serving - * from for a regional instance. This value could be different - * from the zone that was specified when the instance - * was created if the instance has failed over to its secondary/failover zone. - * - * Generated from protobuf field string secondary_gce_zone = 34; - * @param string $var - * @return $this - */ - public function setSecondaryGceZone($var) - { - GPBUtil::checkString($var, True); - $this->secondary_gce_zone = $var; - - return $this; - } - - /** - * Disk encryption configuration specific to an instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; - * @return \Google\Cloud\Sql\V1\DiskEncryptionConfiguration|null - */ - public function getDiskEncryptionConfiguration() - { - return $this->disk_encryption_configuration; - } - - public function hasDiskEncryptionConfiguration() - { - return isset($this->disk_encryption_configuration); - } - - public function clearDiskEncryptionConfiguration() - { - unset($this->disk_encryption_configuration); - } - - /** - * Disk encryption configuration specific to an instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; - * @param \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $var - * @return $this - */ - public function setDiskEncryptionConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionConfiguration::class); - $this->disk_encryption_configuration = $var; - - return $this; - } - - /** - * Disk encryption status specific to an instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; - * @return \Google\Cloud\Sql\V1\DiskEncryptionStatus|null - */ - public function getDiskEncryptionStatus() - { - return $this->disk_encryption_status; - } - - public function hasDiskEncryptionStatus() - { - return isset($this->disk_encryption_status); - } - - public function clearDiskEncryptionStatus() - { - unset($this->disk_encryption_status); - } - - /** - * Disk encryption status specific to an instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; - * @param \Google\Cloud\Sql\V1\DiskEncryptionStatus $var - * @return $this - */ - public function setDiskEncryptionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionStatus::class); - $this->disk_encryption_status = $var; - - return $this; - } - - /** - * Initial root password. Use only on creation. You must set root passwords - * before you can connect to PostgreSQL instances. - * - * Generated from protobuf field string root_password = 29; - * @return string - */ - public function getRootPassword() - { - return $this->root_password; - } - - /** - * Initial root password. Use only on creation. You must set root passwords - * before you can connect to PostgreSQL instances. - * - * Generated from protobuf field string root_password = 29; - * @param string $var - * @return $this - */ - public function setRootPassword($var) - { - GPBUtil::checkString($var, True); - $this->root_password = $var; - - return $this; - } - - /** - * The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; - * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance|null - */ - public function getScheduledMaintenance() - { - return $this->scheduled_maintenance; - } - - public function hasScheduledMaintenance() - { - return isset($this->scheduled_maintenance); - } - - public function clearScheduledMaintenance() - { - unset($this->scheduled_maintenance); - } - - /** - * The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; - * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance $var - * @return $this - */ - public function setScheduledMaintenance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance::class); - $this->scheduled_maintenance = $var; - - return $this; - } - - /** - * This status indicates whether the instance satisfies PZS. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Returns the unboxed value from getSatisfiesPzs() - - * This status indicates whether the instance satisfies PZS. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; - * @return bool|null - */ - public function getSatisfiesPzsUnwrapped() - { - return $this->readWrapperValue("satisfies_pzs"); - } - - /** - * This status indicates whether the instance satisfies PZS. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * This status indicates whether the instance satisfies PZS. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; - * @param bool|null $var - * @return $this - */ - public function setSatisfiesPzsUnwrapped($var) - { - $this->writeWrapperValue("satisfies_pzs", $var); - return $this;} - - /** - * Output only. Stores the current database version running on the instance - * including minor version such as `MYSQL_8_0_18`. - * - * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseInstalledVersion() - { - return $this->database_installed_version; - } - - /** - * Output only. Stores the current database version running on the instance - * including minor version such as `MYSQL_8_0_18`. - * - * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseInstalledVersion($var) - { - GPBUtil::checkString($var, True); - $this->database_installed_version = $var; - - return $this; - } - - /** - * This field represents the report generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; - * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport|null - */ - public function getOutOfDiskReport() - { - return $this->out_of_disk_report; - } - - public function hasOutOfDiskReport() - { - return isset($this->out_of_disk_report); - } - - public function clearOutOfDiskReport() - { - unset($this->out_of_disk_report); - } - - /** - * This field represents the report generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; - * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport $var - * @return $this - */ - public function setOutOfDiskReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport::class); - $this->out_of_disk_report = $var; - - return $this; - } - - /** - * Output only. The time when the instance was created in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the instance was created in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.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. List all maintenance versions applicable on the instance - * - * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAvailableMaintenanceVersions() - { - return $this->available_maintenance_versions; - } - - /** - * Output only. List all maintenance versions applicable on the instance - * - * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAvailableMaintenanceVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->available_maintenance_versions = $arr; - - return $this; - } - - /** - * The current software version on the instance. - * - * Generated from protobuf field string maintenance_version = 42; - * @return string - */ - public function getMaintenanceVersion() - { - return $this->maintenance_version; - } - - /** - * The current software version on the instance. - * - * Generated from protobuf field string maintenance_version = 42; - * @param string $var - * @return $this - */ - public function setMaintenanceVersion($var) - { - GPBUtil::checkString($var, True); - $this->maintenance_version = $var; - - return $this; - } - - /** - * Output only. All database versions that are available for upgrade. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.AvailableDatabaseVersion upgradable_database_versions = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpgradableDatabaseVersions() - { - return $this->upgradable_database_versions; - } - - /** - * Output only. All database versions that are available for upgrade. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.AvailableDatabaseVersion upgradable_database_versions = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Sql\V1\AvailableDatabaseVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpgradableDatabaseVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\AvailableDatabaseVersion::class); - $this->upgradable_database_versions = $arr; - - return $this; - } - - /** - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; - * @return int - */ - public function getSqlNetworkArchitecture() - { - return isset($this->sql_network_architecture) ? $this->sql_network_architecture : 0; - } - - public function hasSqlNetworkArchitecture() - { - return isset($this->sql_network_architecture); - } - - public function clearSqlNetworkArchitecture() - { - unset($this->sql_network_architecture); - } - - /** - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; - * @param int $var - * @return $this - */ - public function setSqlNetworkArchitecture($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlNetworkArchitecture::class); - $this->sql_network_architecture = $var; - - return $this; - } - - /** - * Output only. The link to service attachment of PSC instance. - * - * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPscServiceAttachmentLink() - { - return isset($this->psc_service_attachment_link) ? $this->psc_service_attachment_link : ''; - } - - public function hasPscServiceAttachmentLink() - { - return isset($this->psc_service_attachment_link); - } - - public function clearPscServiceAttachmentLink() - { - unset($this->psc_service_attachment_link); - } - - /** - * Output only. The link to service attachment of PSC instance. - * - * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPscServiceAttachmentLink($var) - { - GPBUtil::checkString($var, True); - $this->psc_service_attachment_link = $var; - - return $this; - } - - /** - * Output only. The dns name of the instance. - * - * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDnsName() - { - return isset($this->dns_name) ? $this->dns_name : ''; - } - - public function hasDnsName() - { - return isset($this->dns_name); - } - - public function clearDnsName() - { - unset($this->dns_name); - } - - /** - * Output only. The dns name of the instance. - * - * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDnsName($var) - { - GPBUtil::checkString($var, True); - $this->dns_name = $var; - - return $this; - } - - /** - * Output only. DEPRECATED: please use write_endpoint instead. - * - * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getPrimaryDnsName() - { - @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); - return isset($this->primary_dns_name) ? $this->primary_dns_name : ''; - } - - public function hasPrimaryDnsName() - { - @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); - return isset($this->primary_dns_name); - } - - public function clearPrimaryDnsName() - { - @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); - unset($this->primary_dns_name); - } - - /** - * Output only. DEPRECATED: please use write_endpoint instead. - * - * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPrimaryDnsName($var) - { - @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->primary_dns_name = $var; - - return $this; - } - - /** - * Output only. The dns name of the primary instance in a replication group. - * - * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWriteEndpoint() - { - return isset($this->write_endpoint) ? $this->write_endpoint : ''; - } - - public function hasWriteEndpoint() - { - return isset($this->write_endpoint); - } - - public function clearWriteEndpoint() - { - unset($this->write_endpoint); - } - - /** - * Output only. The dns name of the primary instance in a replication group. - * - * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWriteEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->write_endpoint = $var; - - return $this; - } - - /** - * Optional. A primary instance and disaster recovery (DR) replica pair. - * A DR replica is a cross-region replica that you designate - * for failover in the event that the primary instance - * experiences regional failure. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Sql\V1\ReplicationCluster|null - */ - public function getReplicationCluster() - { - return $this->replication_cluster; - } - - public function hasReplicationCluster() - { - return isset($this->replication_cluster); - } - - public function clearReplicationCluster() - { - unset($this->replication_cluster); - } - - /** - * Optional. A primary instance and disaster recovery (DR) replica pair. - * A DR replica is a cross-region replica that you designate - * for failover in the event that the primary instance - * experiences regional failure. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Sql\V1\ReplicationCluster $var - * @return $this - */ - public function setReplicationCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicationCluster::class); - $this->replication_cluster = $var; - - return $this; - } - - /** - * Gemini instance configuration. - * - * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; - * @return \Google\Cloud\Sql\V1\GeminiInstanceConfig|null - */ - public function getGeminiConfig() - { - return $this->gemini_config; - } - - public function hasGeminiConfig() - { - return isset($this->gemini_config); - } - - public function clearGeminiConfig() - { - unset($this->gemini_config); - } - - /** - * Gemini instance configuration. - * - * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; - * @param \Google\Cloud\Sql\V1\GeminiInstanceConfig $var - * @return $this - */ - public function setGeminiConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\GeminiInstanceConfig::class); - $this->gemini_config = $var; - - return $this; - } - - /** - * Output only. This status indicates whether the instance satisfies PZI. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSatisfiesPzi() - { - return $this->satisfies_pzi; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Returns the unboxed value from getSatisfiesPzi() - - * Output only. This status indicates whether the instance satisfies PZI. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool|null - */ - public function getSatisfiesPziUnwrapped() - { - return $this->readWrapperValue("satisfies_pzi"); - } - - /** - * Output only. This status indicates whether the instance satisfies PZI. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Output only. This status indicates whether the instance satisfies PZI. - * The status is reserved for future use. - * - * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzi = 56 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setSatisfiesPziUnwrapped($var) - { - $this->writeWrapperValue("satisfies_pzi", $var); - return $this;} - - /** - * Input only. Whether Cloud SQL is enabled to switch storing point-in-time - * recovery log files from a data disk to Cloud Storage. - * - * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSwitchTransactionLogsToCloudStorageEnabled() - { - return $this->switch_transaction_logs_to_cloud_storage_enabled; - } - - public function hasSwitchTransactionLogsToCloudStorageEnabled() - { - return isset($this->switch_transaction_logs_to_cloud_storage_enabled); - } - - public function clearSwitchTransactionLogsToCloudStorageEnabled() - { - unset($this->switch_transaction_logs_to_cloud_storage_enabled); - } - - /** - * Returns the unboxed value from getSwitchTransactionLogsToCloudStorageEnabled() - - * Input only. Whether Cloud SQL is enabled to switch storing point-in-time - * recovery log files from a data disk to Cloud Storage. - * - * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return bool|null - */ - public function getSwitchTransactionLogsToCloudStorageEnabledUnwrapped() - { - return $this->readWrapperValue("switch_transaction_logs_to_cloud_storage_enabled"); - } - - /** - * Input only. Whether Cloud SQL is enabled to switch storing point-in-time - * recovery log files from a data disk to Cloud Storage. - * - * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSwitchTransactionLogsToCloudStorageEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->switch_transaction_logs_to_cloud_storage_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Input only. Whether Cloud SQL is enabled to switch storing point-in-time - * recovery log files from a data disk to Cloud Storage. - * - * Generated from protobuf field optional .google.protobuf.BoolValue switch_transaction_logs_to_cloud_storage_enabled = 57 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setSwitchTransactionLogsToCloudStorageEnabledUnwrapped($var) - { - $this->writeWrapperValue("switch_transaction_logs_to_cloud_storage_enabled", $var); - return $this;} - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php deleted file mode 100644 index ee7d98530190..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica - */ -class SqlFailoverReplica extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the failover replica. If specified at instance creation, a - * failover replica is created for the instance. The name - * doesn't include the project ID. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * failover to the failover replica when the status is true. - * - * Generated from protobuf field .google.protobuf.BoolValue available = 2; - */ - protected $available = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the failover replica. If specified at instance creation, a - * failover replica is created for the instance. The name - * doesn't include the project ID. - * @type \Google\Protobuf\BoolValue $available - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * failover to the failover replica when the status is true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The name of the failover replica. If specified at instance creation, a - * failover replica is created for the instance. The name - * doesn't include the project ID. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the failover replica. If specified at instance creation, a - * failover replica is created for the instance. The name - * doesn't include the project 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 availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * failover to the failover replica when the status is true. - * - * Generated from protobuf field .google.protobuf.BoolValue available = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getAvailable() - { - return $this->available; - } - - public function hasAvailable() - { - return isset($this->available); - } - - public function clearAvailable() - { - unset($this->available); - } - - /** - * Returns the unboxed value from getAvailable() - - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * failover to the failover replica when the status is true. - * - * Generated from protobuf field .google.protobuf.BoolValue available = 2; - * @return bool|null - */ - public function getAvailableUnwrapped() - { - return $this->readWrapperValue("available"); - } - - /** - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * failover to the failover replica when the status is true. - * - * Generated from protobuf field .google.protobuf.BoolValue available = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setAvailable($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->available = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * failover to the failover replica when the status is true. - * - * Generated from protobuf field .google.protobuf.BoolValue available = 2; - * @param bool|null $var - * @return $this - */ - public function setAvailableUnwrapped($var) - { - $this->writeWrapperValue("available", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlFailoverReplica::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlFailoverReplica::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php deleted file mode 100644 index a4a61d210edb..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance.SqlInstanceState - */ -class SqlInstanceState -{ - /** - * The state of the instance is unknown. - * - * Generated from protobuf enum SQL_INSTANCE_STATE_UNSPECIFIED = 0; - */ - const SQL_INSTANCE_STATE_UNSPECIFIED = 0; - /** - * The instance is running, or has been stopped by owner. - * - * Generated from protobuf enum RUNNABLE = 1; - */ - const RUNNABLE = 1; - /** - * The instance is not available, for example due to problems with billing. - * - * Generated from protobuf enum SUSPENDED = 2; - */ - const SUSPENDED = 2; - /** - * The instance is being deleted. - * - * Generated from protobuf enum PENDING_DELETE = 3; - */ - const PENDING_DELETE = 3; - /** - * The instance is being created. - * - * Generated from protobuf enum PENDING_CREATE = 4; - */ - const PENDING_CREATE = 4; - /** - * The instance is down for maintenance. - * - * Generated from protobuf enum MAINTENANCE = 5; - */ - const MAINTENANCE = 5; - /** - * The creation of the instance failed or a fatal error occurred during - * maintenance. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Deprecated - * - * Generated from protobuf enum ONLINE_MAINTENANCE = 7 [deprecated = true]; - */ - const ONLINE_MAINTENANCE = 7; - - private static $valueToName = [ - self::SQL_INSTANCE_STATE_UNSPECIFIED => 'SQL_INSTANCE_STATE_UNSPECIFIED', - self::RUNNABLE => 'RUNNABLE', - self::SUSPENDED => 'SUSPENDED', - self::PENDING_DELETE => 'PENDING_DELETE', - self::PENDING_CREATE => 'PENDING_CREATE', - self::MAINTENANCE => 'MAINTENANCE', - self::FAILED => 'FAILED', - self::ONLINE_MAINTENANCE => 'ONLINE_MAINTENANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlInstanceState::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlInstanceState::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php deleted file mode 100644 index 78fb88c614f8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture - */ -class SqlNetworkArchitecture -{ - /** - * Generated from protobuf enum SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; - */ - const SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; - /** - * The instance uses the new network architecture. - * - * Generated from protobuf enum NEW_NETWORK_ARCHITECTURE = 1; - */ - const NEW_NETWORK_ARCHITECTURE = 1; - /** - * The instance uses the old network architecture. - * - * Generated from protobuf enum OLD_NETWORK_ARCHITECTURE = 2; - */ - const OLD_NETWORK_ARCHITECTURE = 2; - - private static $valueToName = [ - self::SQL_NETWORK_ARCHITECTURE_UNSPECIFIED => 'SQL_NETWORK_ARCHITECTURE_UNSPECIFIED', - self::NEW_NETWORK_ARCHITECTURE => 'NEW_NETWORK_ARCHITECTURE', - self::OLD_NETWORK_ARCHITECTURE => 'OLD_NETWORK_ARCHITECTURE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlNetworkArchitecture::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlNetworkArchitecture::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php deleted file mode 100644 index 8e07020085dd..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport - */ -class SqlOutOfDiskReport extends \Google\Protobuf\Internal\Message -{ - /** - * This field represents the state generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; - */ - protected $sql_out_of_disk_state = null; - /** - * The minimum recommended increase size in GigaBytes - * This field is consumed by the frontend - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * - * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; - */ - protected $sql_min_recommended_increase_size_gb = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $sql_out_of_disk_state - * This field represents the state generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * @type int $sql_min_recommended_increase_size_gb - * The minimum recommended increase size in GigaBytes - * This field is consumed by the frontend - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This field represents the state generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; - * @return int - */ - public function getSqlOutOfDiskState() - { - return isset($this->sql_out_of_disk_state) ? $this->sql_out_of_disk_state : 0; - } - - public function hasSqlOutOfDiskState() - { - return isset($this->sql_out_of_disk_state); - } - - public function clearSqlOutOfDiskState() - { - unset($this->sql_out_of_disk_state); - } - - /** - * This field represents the state generated by the proactive database - * wellness job for OutOfDisk issues. - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * * the proactive database wellness job - * - * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; - * @param int $var - * @return $this - */ - public function setSqlOutOfDiskState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport\SqlOutOfDiskState::class); - $this->sql_out_of_disk_state = $var; - - return $this; - } - - /** - * The minimum recommended increase size in GigaBytes - * This field is consumed by the frontend - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * - * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; - * @return int - */ - public function getSqlMinRecommendedIncreaseSizeGb() - { - return isset($this->sql_min_recommended_increase_size_gb) ? $this->sql_min_recommended_increase_size_gb : 0; - } - - public function hasSqlMinRecommendedIncreaseSizeGb() - { - return isset($this->sql_min_recommended_increase_size_gb); - } - - public function clearSqlMinRecommendedIncreaseSizeGb() - { - unset($this->sql_min_recommended_increase_size_gb); - } - - /** - * The minimum recommended increase size in GigaBytes - * This field is consumed by the frontend - * * Writers: - * * the proactive database wellness job for OOD. - * * Readers: - * - * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; - * @param int $var - * @return $this - */ - public function setSqlMinRecommendedIncreaseSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->sql_min_recommended_increase_size_gb = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlOutOfDiskReport::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlOutOfDiskReport::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php deleted file mode 100644 index 5138c1304df8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState - */ -class SqlOutOfDiskState -{ - /** - * Unspecified state - * - * Generated from protobuf enum SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; - */ - const SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; - /** - * The instance has plenty space on data disk - * - * Generated from protobuf enum NORMAL = 1; - */ - const NORMAL = 1; - /** - * Data disk is almost used up. It is shutdown to prevent data - * corruption. - * - * Generated from protobuf enum SOFT_SHUTDOWN = 2; - */ - const SOFT_SHUTDOWN = 2; - - private static $valueToName = [ - self::SQL_OUT_OF_DISK_STATE_UNSPECIFIED => 'SQL_OUT_OF_DISK_STATE_UNSPECIFIED', - self::NORMAL => 'NORMAL', - self::SOFT_SHUTDOWN => 'SOFT_SHUTDOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlOutOfDiskState::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlOutOfDiskReport_SqlOutOfDiskState::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php deleted file mode 100644 index 100d09af9e5a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance - */ -class SqlScheduledMaintenance extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Generated from protobuf field bool can_defer = 2 [deprecated = true]; - * @deprecated - */ - protected $can_defer = false; - /** - * If the scheduled maintenance can be rescheduled. - * - * Generated from protobuf field bool can_reschedule = 3; - */ - protected $can_reschedule = false; - /** - * Maintenance cannot be rescheduled to start beyond this deadline. - * - * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; - */ - protected $schedule_deadline_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of any upcoming scheduled maintenance for this instance. - * @type bool $can_defer - * @type bool $can_reschedule - * If the scheduled maintenance can be rescheduled. - * @type \Google\Protobuf\Timestamp $schedule_deadline_time - * Maintenance cannot be rescheduled to start beyond this deadline. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The start time of any upcoming scheduled maintenance for this instance. - * - * 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 any upcoming scheduled maintenance for this instance. - * - * 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; - } - - /** - * Generated from protobuf field bool can_defer = 2 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getCanDefer() - { - @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); - return $this->can_defer; - } - - /** - * Generated from protobuf field bool can_defer = 2 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setCanDefer($var) - { - @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->can_defer = $var; - - return $this; - } - - /** - * If the scheduled maintenance can be rescheduled. - * - * Generated from protobuf field bool can_reschedule = 3; - * @return bool - */ - public function getCanReschedule() - { - return $this->can_reschedule; - } - - /** - * If the scheduled maintenance can be rescheduled. - * - * Generated from protobuf field bool can_reschedule = 3; - * @param bool $var - * @return $this - */ - public function setCanReschedule($var) - { - GPBUtil::checkBool($var); - $this->can_reschedule = $var; - - return $this; - } - - /** - * Maintenance cannot be rescheduled to start beyond this deadline. - * - * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleDeadlineTime() - { - return $this->schedule_deadline_time; - } - - public function hasScheduleDeadlineTime() - { - return isset($this->schedule_deadline_time); - } - - public function clearScheduleDeadlineTime() - { - unset($this->schedule_deadline_time); - } - - /** - * Maintenance cannot be rescheduled to start beyond this deadline. - * - * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleDeadlineTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_deadline_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlScheduledMaintenance::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlScheduledMaintenance::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php deleted file mode 100644 index aadf490102b2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.DatabasesListResponse - */ -class DatabasesListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#databasesList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of database resources in the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#databasesList`. - * @type array<\Google\Cloud\Sql\V1\Database>|\Google\Protobuf\Internal\RepeatedField $items - * List of database resources in the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#databasesList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#databasesList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of database resources in the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of database resources in the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; - * @param array<\Google\Cloud\Sql\V1\Database>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Database::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php deleted file mode 100644 index 062b74cae1e8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.sql.v1.DemoteContext - */ -class DemoteContext extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#demoteContext`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Required. The name of the instance which acts as the on-premises primary - * instance in the replication setup. - * - * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_representative_instance_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#demoteContext`. - * @type string $source_representative_instance_name - * Required. The name of the instance which acts as the on-premises primary - * instance in the replication setup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#demoteContext`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#demoteContext`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Required. The name of the instance which acts as the on-premises primary - * instance in the replication setup. - * - * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceRepresentativeInstanceName() - { - return $this->source_representative_instance_name; - } - - /** - * Required. The name of the instance which acts as the on-premises primary - * instance in the replication setup. - * - * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceRepresentativeInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->source_representative_instance_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php deleted file mode 100644 index 7a13ebe2beda..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.sql.v1.DemoteMasterConfiguration - */ -class DemoteMasterConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#demoteMasterConfiguration`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; - */ - protected $mysql_replica_configuration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#demoteMasterConfiguration`. - * @type \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration $mysql_replica_configuration - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#demoteMasterConfiguration`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#demoteMasterConfiguration`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; - * @return \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration|null - */ - public function getMysqlReplicaConfiguration() - { - return $this->mysql_replica_configuration; - } - - public function hasMysqlReplicaConfiguration() - { - return isset($this->mysql_replica_configuration); - } - - public function clearMysqlReplicaConfiguration() - { - unset($this->mysql_replica_configuration); - } - - /** - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; - * @param \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration $var - * @return $this - */ - public function setMysqlReplicaConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration::class); - $this->mysql_replica_configuration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php deleted file mode 100644 index 89f01303456f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php +++ /dev/null @@ -1,294 +0,0 @@ -google.cloud.sql.v1.DemoteMasterContext - */ -class DemoteMasterContext extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#demoteMasterContext`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Verify the GTID consistency for demote operation. Default value: - * `True`. Setting this flag to `false` enables you to bypass the GTID - * consistency check between on-premises primary instance and Cloud SQL - * instance during the demotion operation but also exposes you to the risk of - * future replication failures. Change the value only if you know the reason - * for the GTID divergence and are confident that doing so will not cause any - * replication issues. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; - */ - protected $verify_gtid_consistency = null; - /** - * The name of the instance which will act as on-premises primary instance - * in the replication setup. - * - * Generated from protobuf field string master_instance_name = 3; - */ - protected $master_instance_name = ''; - /** - * Configuration specific to read-replicas replicating from the on-premises - * primary instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; - */ - protected $replica_configuration = null; - /** - * Flag to skip replication setup on the instance. - * - * Generated from protobuf field bool skip_replication_setup = 5; - */ - protected $skip_replication_setup = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#demoteMasterContext`. - * @type \Google\Protobuf\BoolValue $verify_gtid_consistency - * Verify the GTID consistency for demote operation. Default value: - * `True`. Setting this flag to `false` enables you to bypass the GTID - * consistency check between on-premises primary instance and Cloud SQL - * instance during the demotion operation but also exposes you to the risk of - * future replication failures. Change the value only if you know the reason - * for the GTID divergence and are confident that doing so will not cause any - * replication issues. - * @type string $master_instance_name - * The name of the instance which will act as on-premises primary instance - * in the replication setup. - * @type \Google\Cloud\Sql\V1\DemoteMasterConfiguration $replica_configuration - * Configuration specific to read-replicas replicating from the on-premises - * primary instance. - * @type bool $skip_replication_setup - * Flag to skip replication setup on the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#demoteMasterContext`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#demoteMasterContext`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Verify the GTID consistency for demote operation. Default value: - * `True`. Setting this flag to `false` enables you to bypass the GTID - * consistency check between on-premises primary instance and Cloud SQL - * instance during the demotion operation but also exposes you to the risk of - * future replication failures. Change the value only if you know the reason - * for the GTID divergence and are confident that doing so will not cause any - * replication issues. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getVerifyGtidConsistency() - { - return $this->verify_gtid_consistency; - } - - public function hasVerifyGtidConsistency() - { - return isset($this->verify_gtid_consistency); - } - - public function clearVerifyGtidConsistency() - { - unset($this->verify_gtid_consistency); - } - - /** - * Returns the unboxed value from getVerifyGtidConsistency() - - * Verify the GTID consistency for demote operation. Default value: - * `True`. Setting this flag to `false` enables you to bypass the GTID - * consistency check between on-premises primary instance and Cloud SQL - * instance during the demotion operation but also exposes you to the risk of - * future replication failures. Change the value only if you know the reason - * for the GTID divergence and are confident that doing so will not cause any - * replication issues. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; - * @return bool|null - */ - public function getVerifyGtidConsistencyUnwrapped() - { - return $this->readWrapperValue("verify_gtid_consistency"); - } - - /** - * Verify the GTID consistency for demote operation. Default value: - * `True`. Setting this flag to `false` enables you to bypass the GTID - * consistency check between on-premises primary instance and Cloud SQL - * instance during the demotion operation but also exposes you to the risk of - * future replication failures. Change the value only if you know the reason - * for the GTID divergence and are confident that doing so will not cause any - * replication issues. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setVerifyGtidConsistency($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->verify_gtid_consistency = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Verify the GTID consistency for demote operation. Default value: - * `True`. Setting this flag to `false` enables you to bypass the GTID - * consistency check between on-premises primary instance and Cloud SQL - * instance during the demotion operation but also exposes you to the risk of - * future replication failures. Change the value only if you know the reason - * for the GTID divergence and are confident that doing so will not cause any - * replication issues. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; - * @param bool|null $var - * @return $this - */ - public function setVerifyGtidConsistencyUnwrapped($var) - { - $this->writeWrapperValue("verify_gtid_consistency", $var); - return $this;} - - /** - * The name of the instance which will act as on-premises primary instance - * in the replication setup. - * - * Generated from protobuf field string master_instance_name = 3; - * @return string - */ - public function getMasterInstanceName() - { - return $this->master_instance_name; - } - - /** - * The name of the instance which will act as on-premises primary instance - * in the replication setup. - * - * Generated from protobuf field string master_instance_name = 3; - * @param string $var - * @return $this - */ - public function setMasterInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->master_instance_name = $var; - - return $this; - } - - /** - * Configuration specific to read-replicas replicating from the on-premises - * primary instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; - * @return \Google\Cloud\Sql\V1\DemoteMasterConfiguration|null - */ - public function getReplicaConfiguration() - { - return $this->replica_configuration; - } - - public function hasReplicaConfiguration() - { - return isset($this->replica_configuration); - } - - public function clearReplicaConfiguration() - { - unset($this->replica_configuration); - } - - /** - * Configuration specific to read-replicas replicating from the on-premises - * primary instance. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; - * @param \Google\Cloud\Sql\V1\DemoteMasterConfiguration $var - * @return $this - */ - public function setReplicaConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterConfiguration::class); - $this->replica_configuration = $var; - - return $this; - } - - /** - * Flag to skip replication setup on the instance. - * - * Generated from protobuf field bool skip_replication_setup = 5; - * @return bool - */ - public function getSkipReplicationSetup() - { - return $this->skip_replication_setup; - } - - /** - * Flag to skip replication setup on the instance. - * - * Generated from protobuf field bool skip_replication_setup = 5; - * @param bool $var - * @return $this - */ - public function setSkipReplicationSetup($var) - { - GPBUtil::checkBool($var); - $this->skip_replication_setup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php deleted file mode 100644 index 3c5d89aa32d2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration - */ -class DemoteMasterMySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#demoteMasterMysqlReplicaConfiguration`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The username for the replication connection. - * - * Generated from protobuf field string username = 2; - */ - protected $username = ''; - /** - * The password for the replication connection. - * - * Generated from protobuf field string password = 3; - */ - protected $password = ''; - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. The format of the replica's - * private key can be either PKCS #1 or PKCS #8. - * - * Generated from protobuf field string client_key = 4; - */ - protected $client_key = ''; - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 5; - */ - protected $client_certificate = ''; - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 6; - */ - protected $ca_certificate = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#demoteMasterMysqlReplicaConfiguration`. - * @type string $username - * The username for the replication connection. - * @type string $password - * The password for the replication connection. - * @type string $client_key - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. The format of the replica's - * private key can be either PKCS #1 or PKCS #8. - * @type string $client_certificate - * PEM representation of the replica's x509 certificate. - * @type string $ca_certificate - * PEM representation of the trusted CA's x509 certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#demoteMasterMysqlReplicaConfiguration`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#demoteMasterMysqlReplicaConfiguration`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The username for the replication connection. - * - * Generated from protobuf field string username = 2; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The username for the replication connection. - * - * Generated from protobuf field string username = 2; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The password for the replication connection. - * - * Generated from protobuf field string password = 3; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * The password for the replication connection. - * - * Generated from protobuf field string password = 3; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. The format of the replica's - * private key can be either PKCS #1 or PKCS #8. - * - * Generated from protobuf field string client_key = 4; - * @return string - */ - public function getClientKey() - { - return $this->client_key; - } - - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. The format of the replica's - * private key can be either PKCS #1 or PKCS #8. - * - * Generated from protobuf field string client_key = 4; - * @param string $var - * @return $this - */ - public function setClientKey($var) - { - GPBUtil::checkString($var, True); - $this->client_key = $var; - - return $this; - } - - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 5; - * @return string - */ - public function getClientCertificate() - { - return $this->client_certificate; - } - - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 5; - * @param string $var - * @return $this - */ - public function setClientCertificate($var) - { - GPBUtil::checkString($var, True); - $this->client_certificate = $var; - - return $this; - } - - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 6; - * @return string - */ - public function getCaCertificate() - { - return $this->ca_certificate; - } - - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 6; - * @param string $var - * @return $this - */ - public function setCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->ca_certificate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php deleted file mode 100644 index 74bae8b5cfdb..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.sql.v1.DenyMaintenancePeriod - */ -class DenyMaintenancePeriod extends \Google\Protobuf\Internal\Message -{ - /** - * "deny maintenance period" start date. If the year of the start date is - * empty, the year of the end date also must be empty. In this case, it means - * the deny maintenance period recurs every year. The date is in format - * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * - * Generated from protobuf field string start_date = 1; - */ - protected $start_date = ''; - /** - * "deny maintenance period" end date. If the year of the end date is empty, - * the year of the start date also must be empty. In this case, it means the - * no maintenance interval recurs every year. The date is in format yyyy-mm-dd - * i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * - * Generated from protobuf field string end_date = 2; - */ - protected $end_date = ''; - /** - * Time in UTC when the "deny maintenance period" starts on start_date and - * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - * - * Generated from protobuf field string time = 3; - */ - protected $time = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_date - * "deny maintenance period" start date. If the year of the start date is - * empty, the year of the end date also must be empty. In this case, it means - * the deny maintenance period recurs every year. The date is in format - * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * @type string $end_date - * "deny maintenance period" end date. If the year of the end date is empty, - * the year of the start date also must be empty. In this case, it means the - * no maintenance interval recurs every year. The date is in format yyyy-mm-dd - * i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * @type string $time - * Time in UTC when the "deny maintenance period" starts on start_date and - * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * "deny maintenance period" start date. If the year of the start date is - * empty, the year of the end date also must be empty. In this case, it means - * the deny maintenance period recurs every year. The date is in format - * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * - * Generated from protobuf field string start_date = 1; - * @return string - */ - public function getStartDate() - { - return $this->start_date; - } - - /** - * "deny maintenance period" start date. If the year of the start date is - * empty, the year of the end date also must be empty. In this case, it means - * the deny maintenance period recurs every year. The date is in format - * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * - * Generated from protobuf field string start_date = 1; - * @param string $var - * @return $this - */ - public function setStartDate($var) - { - GPBUtil::checkString($var, True); - $this->start_date = $var; - - return $this; - } - - /** - * "deny maintenance period" end date. If the year of the end date is empty, - * the year of the start date also must be empty. In this case, it means the - * no maintenance interval recurs every year. The date is in format yyyy-mm-dd - * i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * - * Generated from protobuf field string end_date = 2; - * @return string - */ - public function getEndDate() - { - return $this->end_date; - } - - /** - * "deny maintenance period" end date. If the year of the end date is empty, - * the year of the start date also must be empty. In this case, it means the - * no maintenance interval recurs every year. The date is in format yyyy-mm-dd - * i.e., 2020-11-01, or mm-dd, i.e., 11-01 - * - * Generated from protobuf field string end_date = 2; - * @param string $var - * @return $this - */ - public function setEndDate($var) - { - GPBUtil::checkString($var, True); - $this->end_date = $var; - - return $this; - } - - /** - * Time in UTC when the "deny maintenance period" starts on start_date and - * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - * - * Generated from protobuf field string time = 3; - * @return string - */ - public function getTime() - { - return $this->time; - } - - /** - * Time in UTC when the "deny maintenance period" starts on start_date and - * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - * - * Generated from protobuf field string time = 3; - * @param string $var - * @return $this - */ - public function setTime($var) - { - GPBUtil::checkString($var, True); - $this->time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php deleted file mode 100644 index cc5e86839a03..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.DiskEncryptionConfiguration - */ -class DiskEncryptionConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of KMS key for disk encryption - * - * Generated from protobuf field string kms_key_name = 1; - */ - protected $kms_key_name = ''; - /** - * This is always `sql#diskEncryptionConfiguration`. - * - * Generated from protobuf field string kind = 2; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Resource name of KMS key for disk encryption - * @type string $kind - * This is always `sql#diskEncryptionConfiguration`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of KMS key for disk encryption - * - * Generated from protobuf field string kms_key_name = 1; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Resource name of KMS key for disk encryption - * - * Generated from protobuf field string kms_key_name = 1; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * This is always `sql#diskEncryptionConfiguration`. - * - * Generated from protobuf field string kind = 2; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#diskEncryptionConfiguration`. - * - * Generated from protobuf field string kind = 2; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php deleted file mode 100644 index 9d2eb56e3d7e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.DiskEncryptionStatus - */ -class DiskEncryptionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * KMS key version used to encrypt the Cloud SQL instance resource - * - * Generated from protobuf field string kms_key_version_name = 1; - */ - protected $kms_key_version_name = ''; - /** - * This is always `sql#diskEncryptionStatus`. - * - * Generated from protobuf field string kind = 2; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_version_name - * KMS key version used to encrypt the Cloud SQL instance resource - * @type string $kind - * This is always `sql#diskEncryptionStatus`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * KMS key version used to encrypt the Cloud SQL instance resource - * - * Generated from protobuf field string kms_key_version_name = 1; - * @return string - */ - public function getKmsKeyVersionName() - { - return $this->kms_key_version_name; - } - - /** - * KMS key version used to encrypt the Cloud SQL instance resource - * - * Generated from protobuf field string kms_key_version_name = 1; - * @param string $var - * @return $this - */ - public function setKmsKeyVersionName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version_name = $var; - - return $this; - } - - /** - * This is always `sql#diskEncryptionStatus`. - * - * Generated from protobuf field string kind = 2; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#diskEncryptionStatus`. - * - * Generated from protobuf field string kind = 2; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php deleted file mode 100644 index 829e466796b3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php +++ /dev/null @@ -1,436 +0,0 @@ -google.cloud.sql.v1.ExportContext - */ -class ExportContext extends \Google\Protobuf\Internal\Message -{ - /** - * The path to the file in Google Cloud Storage where the export will be - * stored. The URI is in the form `gs://bucketName/fileName`. If the file - * already exists, the request succeeds, but the operation fails. If - * `fileType` is `SQL` and the filename ends with .gz, - * the contents are compressed. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Databases to be exported.
`MySQL instances:` If - * `fileType` is `SQL` and no database is specified, all - * databases are exported, except for the `mysql` system database. - * If `fileType` is `CSV`, you can specify one database, - * either by using this property or by using the - * `csvExportOptions.selectQuery` property, which takes precedence - * over this property.
`PostgreSQL instances:` You must specify - * one database to be exported. If `fileType` is `CSV`, - * this database must match the one specified in the - * `csvExportOptions.selectQuery` property.
`SQL Server - * instances:` You must specify one database to be exported, and the - * `fileType` must be `BAK`. - * - * Generated from protobuf field repeated string databases = 2; - */ - private $databases; - /** - * This is always `sql#exportContext`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - /** - * Options for exporting data as SQL statements. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; - */ - protected $sql_export_options = null; - /** - * Options for exporting data as CSV. `MySQL` and `PostgreSQL` - * instances only. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; - */ - protected $csv_export_options = null; - /** - * The file type for the specified uri. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; - */ - protected $file_type = 0; - /** - * Option for export offload. - * - * Generated from protobuf field .google.protobuf.BoolValue offload = 8; - */ - protected $offload = null; - /** - * Options for exporting data as BAK files. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; - */ - protected $bak_export_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The path to the file in Google Cloud Storage where the export will be - * stored. The URI is in the form `gs://bucketName/fileName`. If the file - * already exists, the request succeeds, but the operation fails. If - * `fileType` is `SQL` and the filename ends with .gz, - * the contents are compressed. - * @type array|\Google\Protobuf\Internal\RepeatedField $databases - * Databases to be exported.
`MySQL instances:` If - * `fileType` is `SQL` and no database is specified, all - * databases are exported, except for the `mysql` system database. - * If `fileType` is `CSV`, you can specify one database, - * either by using this property or by using the - * `csvExportOptions.selectQuery` property, which takes precedence - * over this property.
`PostgreSQL instances:` You must specify - * one database to be exported. If `fileType` is `CSV`, - * this database must match the one specified in the - * `csvExportOptions.selectQuery` property.
`SQL Server - * instances:` You must specify one database to be exported, and the - * `fileType` must be `BAK`. - * @type string $kind - * This is always `sql#exportContext`. - * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions $sql_export_options - * Options for exporting data as SQL statements. - * @type \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions $csv_export_options - * Options for exporting data as CSV. `MySQL` and `PostgreSQL` - * instances only. - * @type int $file_type - * The file type for the specified uri. - * @type \Google\Protobuf\BoolValue $offload - * Option for export offload. - * @type \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions $bak_export_options - * Options for exporting data as BAK files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The path to the file in Google Cloud Storage where the export will be - * stored. The URI is in the form `gs://bucketName/fileName`. If the file - * already exists, the request succeeds, but the operation fails. If - * `fileType` is `SQL` and the filename ends with .gz, - * the contents are compressed. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The path to the file in Google Cloud Storage where the export will be - * stored. The URI is in the form `gs://bucketName/fileName`. If the file - * already exists, the request succeeds, but the operation fails. If - * `fileType` is `SQL` and the filename ends with .gz, - * the contents are compressed. - * - * 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; - } - - /** - * Databases to be exported.
`MySQL instances:` If - * `fileType` is `SQL` and no database is specified, all - * databases are exported, except for the `mysql` system database. - * If `fileType` is `CSV`, you can specify one database, - * either by using this property or by using the - * `csvExportOptions.selectQuery` property, which takes precedence - * over this property.
`PostgreSQL instances:` You must specify - * one database to be exported. If `fileType` is `CSV`, - * this database must match the one specified in the - * `csvExportOptions.selectQuery` property.
`SQL Server - * instances:` You must specify one database to be exported, and the - * `fileType` must be `BAK`. - * - * Generated from protobuf field repeated string databases = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatabases() - { - return $this->databases; - } - - /** - * Databases to be exported.
`MySQL instances:` If - * `fileType` is `SQL` and no database is specified, all - * databases are exported, except for the `mysql` system database. - * If `fileType` is `CSV`, you can specify one database, - * either by using this property or by using the - * `csvExportOptions.selectQuery` property, which takes precedence - * over this property.
`PostgreSQL instances:` You must specify - * one database to be exported. If `fileType` is `CSV`, - * this database must match the one specified in the - * `csvExportOptions.selectQuery` property.
`SQL Server - * instances:` You must specify one database to be exported, and the - * `fileType` must be `BAK`. - * - * Generated from protobuf field repeated string databases = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->databases = $arr; - - return $this; - } - - /** - * This is always `sql#exportContext`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#exportContext`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Options for exporting data as SQL statements. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; - * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions|null - */ - public function getSqlExportOptions() - { - return $this->sql_export_options; - } - - public function hasSqlExportOptions() - { - return isset($this->sql_export_options); - } - - public function clearSqlExportOptions() - { - unset($this->sql_export_options); - } - - /** - * Options for exporting data as SQL statements. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; - * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions $var - * @return $this - */ - public function setSqlExportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions::class); - $this->sql_export_options = $var; - - return $this; - } - - /** - * Options for exporting data as CSV. `MySQL` and `PostgreSQL` - * instances only. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; - * @return \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions|null - */ - public function getCsvExportOptions() - { - return $this->csv_export_options; - } - - public function hasCsvExportOptions() - { - return isset($this->csv_export_options); - } - - public function clearCsvExportOptions() - { - unset($this->csv_export_options); - } - - /** - * Options for exporting data as CSV. `MySQL` and `PostgreSQL` - * instances only. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; - * @param \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions $var - * @return $this - */ - public function setCsvExportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions::class); - $this->csv_export_options = $var; - - return $this; - } - - /** - * The file type for the specified uri. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; - * @return int - */ - public function getFileType() - { - return $this->file_type; - } - - /** - * The file type for the specified uri. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; - * @param int $var - * @return $this - */ - public function setFileType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFileType::class); - $this->file_type = $var; - - return $this; - } - - /** - * Option for export offload. - * - * Generated from protobuf field .google.protobuf.BoolValue offload = 8; - * @return \Google\Protobuf\BoolValue|null - */ - public function getOffload() - { - return $this->offload; - } - - public function hasOffload() - { - return isset($this->offload); - } - - public function clearOffload() - { - unset($this->offload); - } - - /** - * Returns the unboxed value from getOffload() - - * Option for export offload. - * - * Generated from protobuf field .google.protobuf.BoolValue offload = 8; - * @return bool|null - */ - public function getOffloadUnwrapped() - { - return $this->readWrapperValue("offload"); - } - - /** - * Option for export offload. - * - * Generated from protobuf field .google.protobuf.BoolValue offload = 8; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setOffload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->offload = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Option for export offload. - * - * Generated from protobuf field .google.protobuf.BoolValue offload = 8; - * @param bool|null $var - * @return $this - */ - public function setOffloadUnwrapped($var) - { - $this->writeWrapperValue("offload", $var); - return $this;} - - /** - * Options for exporting data as BAK files. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; - * @return \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions|null - */ - public function getBakExportOptions() - { - return $this->bak_export_options; - } - - public function hasBakExportOptions() - { - return isset($this->bak_export_options); - } - - public function clearBakExportOptions() - { - unset($this->bak_export_options); - } - - /** - * Options for exporting data as BAK files. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; - * @param \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions $var - * @return $this - */ - public function setBakExportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions::class); - $this->bak_export_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php deleted file mode 100644 index 9eebf409ce5f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php +++ /dev/null @@ -1,380 +0,0 @@ -google.cloud.sql.v1.ExportContext.SqlBakExportOptions - */ -class SqlBakExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Whether or not the export should be striped. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 1; - */ - protected $striped = null; - /** - * Option for specifying how many stripes to use for the export. - * If blank, and the value of the striped field is true, - * the number of stripes is automatically chosen. - * - * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; - */ - protected $stripe_count = null; - /** - * Type of this bak file will be export, FULL or DIFF, SQL Server only - * - * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; - */ - protected $bak_type = 0; - /** - * Deprecated: copy_only is deprecated. Use differential_base instead - * - * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; - * @deprecated - */ - protected $copy_only = null; - /** - * Whether or not the backup can be used as a differential base - * copy_only backup can not be served as differential base - * - * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; - */ - protected $differential_base = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $striped - * Whether or not the export should be striped. - * @type \Google\Protobuf\Int32Value $stripe_count - * Option for specifying how many stripes to use for the export. - * If blank, and the value of the striped field is true, - * the number of stripes is automatically chosen. - * @type int $bak_type - * Type of this bak file will be export, FULL or DIFF, SQL Server only - * @type \Google\Protobuf\BoolValue $copy_only - * Deprecated: copy_only is deprecated. Use differential_base instead - * @type \Google\Protobuf\BoolValue $differential_base - * Whether or not the backup can be used as a differential base - * copy_only backup can not be served as differential base - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Whether or not the export should be striped. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 1; - * @return \Google\Protobuf\BoolValue|null - */ - public function getStriped() - { - return $this->striped; - } - - public function hasStriped() - { - return isset($this->striped); - } - - public function clearStriped() - { - unset($this->striped); - } - - /** - * Returns the unboxed value from getStriped() - - * Whether or not the export should be striped. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 1; - * @return bool|null - */ - public function getStripedUnwrapped() - { - return $this->readWrapperValue("striped"); - } - - /** - * Whether or not the export should be striped. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 1; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setStriped($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->striped = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the export should be striped. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 1; - * @param bool|null $var - * @return $this - */ - public function setStripedUnwrapped($var) - { - $this->writeWrapperValue("striped", $var); - return $this;} - - /** - * Option for specifying how many stripes to use for the export. - * If blank, and the value of the striped field is true, - * the number of stripes is automatically chosen. - * - * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; - * @return \Google\Protobuf\Int32Value|null - */ - public function getStripeCount() - { - return $this->stripe_count; - } - - public function hasStripeCount() - { - return isset($this->stripe_count); - } - - public function clearStripeCount() - { - unset($this->stripe_count); - } - - /** - * Returns the unboxed value from getStripeCount() - - * Option for specifying how many stripes to use for the export. - * If blank, and the value of the striped field is true, - * the number of stripes is automatically chosen. - * - * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; - * @return int|null - */ - public function getStripeCountUnwrapped() - { - return $this->readWrapperValue("stripe_count"); - } - - /** - * Option for specifying how many stripes to use for the export. - * If blank, and the value of the striped field is true, - * the number of stripes is automatically chosen. - * - * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setStripeCount($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->stripe_count = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Option for specifying how many stripes to use for the export. - * If blank, and the value of the striped field is true, - * the number of stripes is automatically chosen. - * - * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; - * @param int|null $var - * @return $this - */ - public function setStripeCountUnwrapped($var) - { - $this->writeWrapperValue("stripe_count", $var); - return $this;} - - /** - * Type of this bak file will be export, FULL or DIFF, SQL Server only - * - * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; - * @return int - */ - public function getBakType() - { - return $this->bak_type; - } - - /** - * Type of this bak file will be export, FULL or DIFF, SQL Server only - * - * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; - * @param int $var - * @return $this - */ - public function setBakType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BakType::class); - $this->bak_type = $var; - - return $this; - } - - /** - * Deprecated: copy_only is deprecated. Use differential_base instead - * - * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; - * @return \Google\Protobuf\BoolValue|null - * @deprecated - */ - public function getCopyOnly() - { - @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); - return $this->copy_only; - } - - public function hasCopyOnly() - { - @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); - return isset($this->copy_only); - } - - public function clearCopyOnly() - { - @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); - unset($this->copy_only); - } - - /** - * Returns the unboxed value from getCopyOnly() - - * Deprecated: copy_only is deprecated. Use differential_base instead - * - * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; - * @return bool|null - */ - public function getCopyOnlyUnwrapped() - { - @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("copy_only"); - } - - /** - * Deprecated: copy_only is deprecated. Use differential_base instead - * - * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - * @deprecated - */ - public function setCopyOnly($var) - { - @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->copy_only = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Deprecated: copy_only is deprecated. Use differential_base instead - * - * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; - * @param bool|null $var - * @return $this - */ - public function setCopyOnlyUnwrapped($var) - { - $this->writeWrapperValue("copy_only", $var); - return $this;} - - /** - * Whether or not the backup can be used as a differential base - * copy_only backup can not be served as differential base - * - * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; - * @return \Google\Protobuf\BoolValue|null - */ - public function getDifferentialBase() - { - return $this->differential_base; - } - - public function hasDifferentialBase() - { - return isset($this->differential_base); - } - - public function clearDifferentialBase() - { - unset($this->differential_base); - } - - /** - * Returns the unboxed value from getDifferentialBase() - - * Whether or not the backup can be used as a differential base - * copy_only backup can not be served as differential base - * - * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; - * @return bool|null - */ - public function getDifferentialBaseUnwrapped() - { - return $this->readWrapperValue("differential_base"); - } - - /** - * Whether or not the backup can be used as a differential base - * copy_only backup can not be served as differential base - * - * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setDifferentialBase($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->differential_base = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the backup can be used as a differential base - * copy_only backup can not be served as differential base - * - * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; - * @param bool|null $var - * @return $this - */ - public function setDifferentialBaseUnwrapped($var) - { - $this->writeWrapperValue("differential_base", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlBakExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlBakExportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php deleted file mode 100644 index c73966c0af69..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.sql.v1.ExportContext.SqlCsvExportOptions - */ -class SqlCsvExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The select query used to extract the data. - * - * Generated from protobuf field string select_query = 1; - */ - protected $select_query = ''; - /** - * Specifies the character that should appear before a data character that - * needs to be escaped. - * - * Generated from protobuf field string escape_character = 2; - */ - protected $escape_character = ''; - /** - * Specifies the quoting character to be used when a data value is quoted. - * - * Generated from protobuf field string quote_character = 3; - */ - protected $quote_character = ''; - /** - * Specifies the character that separates columns within each row (line) of - * the file. - * - * Generated from protobuf field string fields_terminated_by = 4; - */ - protected $fields_terminated_by = ''; - /** - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * - * Generated from protobuf field string lines_terminated_by = 6; - */ - protected $lines_terminated_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $select_query - * The select query used to extract the data. - * @type string $escape_character - * Specifies the character that should appear before a data character that - * needs to be escaped. - * @type string $quote_character - * Specifies the quoting character to be used when a data value is quoted. - * @type string $fields_terminated_by - * Specifies the character that separates columns within each row (line) of - * the file. - * @type string $lines_terminated_by - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The select query used to extract the data. - * - * Generated from protobuf field string select_query = 1; - * @return string - */ - public function getSelectQuery() - { - return $this->select_query; - } - - /** - * The select query used to extract the data. - * - * Generated from protobuf field string select_query = 1; - * @param string $var - * @return $this - */ - public function setSelectQuery($var) - { - GPBUtil::checkString($var, True); - $this->select_query = $var; - - return $this; - } - - /** - * Specifies the character that should appear before a data character that - * needs to be escaped. - * - * Generated from protobuf field string escape_character = 2; - * @return string - */ - public function getEscapeCharacter() - { - return $this->escape_character; - } - - /** - * Specifies the character that should appear before a data character that - * needs to be escaped. - * - * Generated from protobuf field string escape_character = 2; - * @param string $var - * @return $this - */ - public function setEscapeCharacter($var) - { - GPBUtil::checkString($var, True); - $this->escape_character = $var; - - return $this; - } - - /** - * Specifies the quoting character to be used when a data value is quoted. - * - * Generated from protobuf field string quote_character = 3; - * @return string - */ - public function getQuoteCharacter() - { - return $this->quote_character; - } - - /** - * Specifies the quoting character to be used when a data value is quoted. - * - * Generated from protobuf field string quote_character = 3; - * @param string $var - * @return $this - */ - public function setQuoteCharacter($var) - { - GPBUtil::checkString($var, True); - $this->quote_character = $var; - - return $this; - } - - /** - * Specifies the character that separates columns within each row (line) of - * the file. - * - * Generated from protobuf field string fields_terminated_by = 4; - * @return string - */ - public function getFieldsTerminatedBy() - { - return $this->fields_terminated_by; - } - - /** - * Specifies the character that separates columns within each row (line) of - * the file. - * - * Generated from protobuf field string fields_terminated_by = 4; - * @param string $var - * @return $this - */ - public function setFieldsTerminatedBy($var) - { - GPBUtil::checkString($var, True); - $this->fields_terminated_by = $var; - - return $this; - } - - /** - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * - * Generated from protobuf field string lines_terminated_by = 6; - * @return string - */ - public function getLinesTerminatedBy() - { - return $this->lines_terminated_by; - } - - /** - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * - * Generated from protobuf field string lines_terminated_by = 6; - * @param string $var - * @return $this - */ - public function setLinesTerminatedBy($var) - { - GPBUtil::checkString($var, True); - $this->lines_terminated_by = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlCsvExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlCsvExportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php deleted file mode 100644 index 04e4ea02ebc9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php +++ /dev/null @@ -1,370 +0,0 @@ -google.cloud.sql.v1.ExportContext.SqlExportOptions - */ -class SqlExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Tables to export, or that were exported, from the specified database. If - * you specify tables, specify one and only one database. For PostgreSQL - * instances, you can specify only one table. - * - * Generated from protobuf field repeated string tables = 1; - */ - private $tables; - /** - * Export only schemas. - * - * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; - */ - protected $schema_only = null; - /** - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; - */ - protected $mysql_export_options = null; - /** - * Optional. The number of threads to use for parallel export. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $threads = null; - /** - * Optional. Whether or not the export should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parallel = null; - /** - * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions postgres_export_options = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $postgres_export_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $tables - * Tables to export, or that were exported, from the specified database. If - * you specify tables, specify one and only one database. For PostgreSQL - * instances, you can specify only one table. - * @type \Google\Protobuf\BoolValue $schema_only - * Export only schemas. - * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions $mysql_export_options - * @type \Google\Protobuf\Int32Value $threads - * Optional. The number of threads to use for parallel export. - * @type \Google\Protobuf\BoolValue $parallel - * Optional. Whether or not the export should be parallel. - * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions $postgres_export_options - * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Tables to export, or that were exported, from the specified database. If - * you specify tables, specify one and only one database. For PostgreSQL - * instances, you can specify only one table. - * - * Generated from protobuf field repeated string tables = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTables() - { - return $this->tables; - } - - /** - * Tables to export, or that were exported, from the specified database. If - * you specify tables, specify one and only one database. For PostgreSQL - * instances, you can specify only one table. - * - * Generated from protobuf field repeated string tables = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tables = $arr; - - return $this; - } - - /** - * Export only schemas. - * - * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSchemaOnly() - { - return $this->schema_only; - } - - public function hasSchemaOnly() - { - return isset($this->schema_only); - } - - public function clearSchemaOnly() - { - unset($this->schema_only); - } - - /** - * Returns the unboxed value from getSchemaOnly() - - * Export only schemas. - * - * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; - * @return bool|null - */ - public function getSchemaOnlyUnwrapped() - { - return $this->readWrapperValue("schema_only"); - } - - /** - * Export only schemas. - * - * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSchemaOnly($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->schema_only = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Export only schemas. - * - * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; - * @param bool|null $var - * @return $this - */ - public function setSchemaOnlyUnwrapped($var) - { - $this->writeWrapperValue("schema_only", $var); - return $this;} - - /** - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; - * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions|null - */ - public function getMysqlExportOptions() - { - return $this->mysql_export_options; - } - - public function hasMysqlExportOptions() - { - return isset($this->mysql_export_options); - } - - public function clearMysqlExportOptions() - { - unset($this->mysql_export_options); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; - * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions $var - * @return $this - */ - public function setMysqlExportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions::class); - $this->mysql_export_options = $var; - - return $this; - } - - /** - * Optional. The number of threads to use for parallel export. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getThreads() - { - return $this->threads; - } - - public function hasThreads() - { - return isset($this->threads); - } - - public function clearThreads() - { - unset($this->threads); - } - - /** - * Returns the unboxed value from getThreads() - - * Optional. The number of threads to use for parallel export. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|null - */ - public function getThreadsUnwrapped() - { - return $this->readWrapperValue("threads"); - } - - /** - * Optional. The number of threads to use for parallel export. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setThreads($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->threads = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Optional. The number of threads to use for parallel export. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|null $var - * @return $this - */ - public function setThreadsUnwrapped($var) - { - $this->writeWrapperValue("threads", $var); - return $this;} - - /** - * Optional. Whether or not the export should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getParallel() - { - return $this->parallel; - } - - public function hasParallel() - { - return isset($this->parallel); - } - - public function clearParallel() - { - unset($this->parallel); - } - - /** - * Returns the unboxed value from getParallel() - - * Optional. Whether or not the export should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getParallelUnwrapped() - { - return $this->readWrapperValue("parallel"); - } - - /** - * Optional. Whether or not the export should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setParallel($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->parallel = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. Whether or not the export should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setParallelUnwrapped($var) - { - $this->writeWrapperValue("parallel", $var); - return $this;} - - /** - * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions postgres_export_options = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions|null - */ - public function getPostgresExportOptions() - { - return $this->postgres_export_options; - } - - public function hasPostgresExportOptions() - { - return isset($this->postgres_export_options); - } - - public function clearPostgresExportOptions() - { - unset($this->postgres_export_options); - } - - /** - * Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions postgres_export_options = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions $var - * @return $this - */ - public function setPostgresExportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\PostgresExportOptions::class); - $this->postgres_export_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php deleted file mode 100644 index 113b82d013e4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions - */ -class MysqlExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Option to include SQL statement required to set up replication. If set - * to `1`, the dump file includes a CHANGE MASTER TO statement with the - * binary log coordinates, and --set-gtid-purged is set to ON. If set to - * `2`, the CHANGE MASTER TO statement is written as a SQL comment and - * has no effect. If set to any value other than `1`, --set-gtid-purged - * is set to OFF. - * - * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; - */ - protected $master_data = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int32Value $master_data - * Option to include SQL statement required to set up replication. If set - * to `1`, the dump file includes a CHANGE MASTER TO statement with the - * binary log coordinates, and --set-gtid-purged is set to ON. If set to - * `2`, the CHANGE MASTER TO statement is written as a SQL comment and - * has no effect. If set to any value other than `1`, --set-gtid-purged - * is set to OFF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Option to include SQL statement required to set up replication. If set - * to `1`, the dump file includes a CHANGE MASTER TO statement with the - * binary log coordinates, and --set-gtid-purged is set to ON. If set to - * `2`, the CHANGE MASTER TO statement is written as a SQL comment and - * has no effect. If set to any value other than `1`, --set-gtid-purged - * is set to OFF. - * - * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; - * @return \Google\Protobuf\Int32Value|null - */ - public function getMasterData() - { - return $this->master_data; - } - - public function hasMasterData() - { - return isset($this->master_data); - } - - public function clearMasterData() - { - unset($this->master_data); - } - - /** - * Returns the unboxed value from getMasterData() - - * Option to include SQL statement required to set up replication. If set - * to `1`, the dump file includes a CHANGE MASTER TO statement with the - * binary log coordinates, and --set-gtid-purged is set to ON. If set to - * `2`, the CHANGE MASTER TO statement is written as a SQL comment and - * has no effect. If set to any value other than `1`, --set-gtid-purged - * is set to OFF. - * - * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; - * @return int|null - */ - public function getMasterDataUnwrapped() - { - return $this->readWrapperValue("master_data"); - } - - /** - * Option to include SQL statement required to set up replication. If set - * to `1`, the dump file includes a CHANGE MASTER TO statement with the - * binary log coordinates, and --set-gtid-purged is set to ON. If set to - * `2`, the CHANGE MASTER TO statement is written as a SQL comment and - * has no effect. If set to any value other than `1`, --set-gtid-purged - * is set to OFF. - * - * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setMasterData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->master_data = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Option to include SQL statement required to set up replication. If set - * to `1`, the dump file includes a CHANGE MASTER TO statement with the - * binary log coordinates, and --set-gtid-purged is set to ON. If set to - * `2`, the CHANGE MASTER TO statement is written as a SQL comment and - * has no effect. If set to any value other than `1`, --set-gtid-purged - * is set to OFF. - * - * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; - * @param int|null $var - * @return $this - */ - public function setMasterDataUnwrapped($var) - { - $this->writeWrapperValue("master_data", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MysqlExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions_MysqlExportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php deleted file mode 100644 index 1ff2881f0909..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/PostgresExportOptions.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.sql.v1.ExportContext.SqlExportOptions.PostgresExportOptions - */ -class PostgresExportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Use this option to include DROP SQL statements. - * These statements are used to delete database objects before running the - * import operation. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $clean = null; - /** - * Optional. Option to include an IF EXISTS SQL statement with each DROP - * statement produced by clean. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $if_exists = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $clean - * Optional. Use this option to include DROP SQL statements. - * These statements are used to delete database objects before running the - * import operation. - * @type \Google\Protobuf\BoolValue $if_exists - * Optional. Option to include an IF EXISTS SQL statement with each DROP - * statement produced by clean. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Use this option to include DROP SQL statements. - * These statements are used to delete database objects before running the - * import operation. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getClean() - { - return $this->clean; - } - - public function hasClean() - { - return isset($this->clean); - } - - public function clearClean() - { - unset($this->clean); - } - - /** - * Returns the unboxed value from getClean() - - * Optional. Use this option to include DROP SQL statements. - * These statements are used to delete database objects before running the - * import operation. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getCleanUnwrapped() - { - return $this->readWrapperValue("clean"); - } - - /** - * Optional. Use this option to include DROP SQL statements. - * These statements are used to delete database objects before running the - * import operation. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setClean($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->clean = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. Use this option to include DROP SQL statements. - * These statements are used to delete database objects before running the - * import operation. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setCleanUnwrapped($var) - { - $this->writeWrapperValue("clean", $var); - return $this;} - - /** - * Optional. Option to include an IF EXISTS SQL statement with each DROP - * statement produced by clean. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getIfExists() - { - return $this->if_exists; - } - - public function hasIfExists() - { - return isset($this->if_exists); - } - - public function clearIfExists() - { - unset($this->if_exists); - } - - /** - * Returns the unboxed value from getIfExists() - - * Optional. Option to include an IF EXISTS SQL statement with each DROP - * statement produced by clean. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getIfExistsUnwrapped() - { - return $this->readWrapperValue("if_exists"); - } - - /** - * Optional. Option to include an IF EXISTS SQL statement with each DROP - * statement produced by clean. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setIfExists($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->if_exists = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. Option to include an IF EXISTS SQL statement with each DROP - * statement produced by clean. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setIfExistsUnwrapped($var) - { - $this->writeWrapperValue("if_exists", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostgresExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions_PostgresExportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php deleted file mode 100644 index c3d02dee27f5..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.sql.v1.ExternalSyncParallelLevel - */ -class ExternalSyncParallelLevel -{ - /** - * Unknown sync parallel level. Will be defaulted to OPTIMAL. - * - * Generated from protobuf enum EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; - */ - const EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; - /** - * Minimal parallel level. - * - * Generated from protobuf enum MIN = 1; - */ - const MIN = 1; - /** - * Optimal parallel level. - * - * Generated from protobuf enum OPTIMAL = 2; - */ - const OPTIMAL = 2; - /** - * Maximum parallel level. - * - * Generated from protobuf enum MAX = 3; - */ - const MAX = 3; - - private static $valueToName = [ - self::EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED => 'EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED', - self::MIN => 'MIN', - self::OPTIMAL => 'OPTIMAL', - self::MAX => 'MAX', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php deleted file mode 100644 index ca709f956f5d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.sql.v1.FailoverContext - */ -class FailoverContext extends \Google\Protobuf\Internal\Message -{ - /** - * The current settings version of this instance. Request will be rejected if - * this version doesn't match the current settings version. - * - * Generated from protobuf field int64 settings_version = 1; - */ - protected $settings_version = 0; - /** - * This is always `sql#failoverContext`. - * - * Generated from protobuf field string kind = 2; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $settings_version - * The current settings version of this instance. Request will be rejected if - * this version doesn't match the current settings version. - * @type string $kind - * This is always `sql#failoverContext`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The current settings version of this instance. Request will be rejected if - * this version doesn't match the current settings version. - * - * Generated from protobuf field int64 settings_version = 1; - * @return int|string - */ - public function getSettingsVersion() - { - return $this->settings_version; - } - - /** - * The current settings version of this instance. Request will be rejected if - * this version doesn't match the current settings version. - * - * Generated from protobuf field int64 settings_version = 1; - * @param int|string $var - * @return $this - */ - public function setSettingsVersion($var) - { - GPBUtil::checkInt64($var); - $this->settings_version = $var; - - return $this; - } - - /** - * This is always `sql#failoverContext`. - * - * Generated from protobuf field string kind = 2; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#failoverContext`. - * - * Generated from protobuf field string kind = 2; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php deleted file mode 100644 index 3a0051417697..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php +++ /dev/null @@ -1,579 +0,0 @@ -google.cloud.sql.v1.Flag - */ -class Flag extends \Google\Protobuf\Internal\Message -{ - /** - * This is the name of the flag. Flag names always use underscores, not - * hyphens, for example: `max_allowed_packet` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, - * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a - * value, such as `skip_grant_tables`. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; - */ - protected $type = 0; - /** - * The database version this flag applies to. Can be - * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, - * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: - * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, - * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * See [the complete - * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; - */ - private $applies_to; - /** - * For `STRING` flags, a list of strings that the value can be set to. - * - * Generated from protobuf field repeated string allowed_string_values = 4; - */ - private $allowed_string_values; - /** - * For `INTEGER` flags, the minimum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; - */ - protected $min_value = null; - /** - * For `INTEGER` flags, the maximum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; - */ - protected $max_value = null; - /** - * Indicates whether changing this flag will trigger a database restart. Only - * applicable to Second Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; - */ - protected $requires_restart = null; - /** - * This is always `sql#flag`. - * - * Generated from protobuf field string kind = 8; - */ - protected $kind = ''; - /** - * Whether or not the flag is considered in beta. - * - * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; - */ - protected $in_beta = null; - /** - * Use this field if only certain integers are accepted. Can be combined - * with min_value and max_value to add additional values. - * - * Generated from protobuf field repeated int64 allowed_int_values = 10; - */ - private $allowed_int_values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * This is the name of the flag. Flag names always use underscores, not - * hyphens, for example: `max_allowed_packet` - * @type int $type - * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, - * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a - * value, such as `skip_grant_tables`. - * @type array|\Google\Protobuf\Internal\RepeatedField $applies_to - * The database version this flag applies to. Can be - * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, - * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: - * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, - * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * See [the complete - * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_string_values - * For `STRING` flags, a list of strings that the value can be set to. - * @type \Google\Protobuf\Int64Value $min_value - * For `INTEGER` flags, the minimum allowed value. - * @type \Google\Protobuf\Int64Value $max_value - * For `INTEGER` flags, the maximum allowed value. - * @type \Google\Protobuf\BoolValue $requires_restart - * Indicates whether changing this flag will trigger a database restart. Only - * applicable to Second Generation instances. - * @type string $kind - * This is always `sql#flag`. - * @type \Google\Protobuf\BoolValue $in_beta - * Whether or not the flag is considered in beta. - * @type array|array|\Google\Protobuf\Internal\RepeatedField $allowed_int_values - * Use this field if only certain integers are accepted. Can be combined - * with min_value and max_value to add additional values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); - parent::__construct($data); - } - - /** - * This is the name of the flag. Flag names always use underscores, not - * hyphens, for example: `max_allowed_packet` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * This is the name of the flag. Flag names always use underscores, not - * hyphens, for example: `max_allowed_packet` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, - * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a - * value, such as `skip_grant_tables`. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, - * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a - * value, such as `skip_grant_tables`. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFlagType::class); - $this->type = $var; - - return $this; - } - - /** - * The database version this flag applies to. Can be - * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, - * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: - * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, - * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * See [the complete - * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppliesTo() - { - return $this->applies_to; - } - - /** - * The database version this flag applies to. Can be - * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, - * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, - * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: - * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, - * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, - * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or - * `SQLSERVER_2019_WEB`. - * See [the complete - * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppliesTo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); - $this->applies_to = $arr; - - return $this; - } - - /** - * For `STRING` flags, a list of strings that the value can be set to. - * - * Generated from protobuf field repeated string allowed_string_values = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedStringValues() - { - return $this->allowed_string_values; - } - - /** - * For `STRING` flags, a list of strings that the value can be set to. - * - * Generated from protobuf field repeated string allowed_string_values = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedStringValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_string_values = $arr; - - return $this; - } - - /** - * For `INTEGER` flags, the minimum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMinValue() - { - return $this->min_value; - } - - public function hasMinValue() - { - return isset($this->min_value); - } - - public function clearMinValue() - { - unset($this->min_value); - } - - /** - * Returns the unboxed value from getMinValue() - - * For `INTEGER` flags, the minimum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; - * @return int|string|null - */ - public function getMinValueUnwrapped() - { - return $this->readWrapperValue("min_value"); - } - - /** - * For `INTEGER` flags, the minimum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->min_value = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * For `INTEGER` flags, the minimum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; - * @param int|string|null $var - * @return $this - */ - public function setMinValueUnwrapped($var) - { - $this->writeWrapperValue("min_value", $var); - return $this;} - - /** - * For `INTEGER` flags, the maximum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMaxValue() - { - return $this->max_value; - } - - public function hasMaxValue() - { - return isset($this->max_value); - } - - public function clearMaxValue() - { - unset($this->max_value); - } - - /** - * Returns the unboxed value from getMaxValue() - - * For `INTEGER` flags, the maximum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; - * @return int|string|null - */ - public function getMaxValueUnwrapped() - { - return $this->readWrapperValue("max_value"); - } - - /** - * For `INTEGER` flags, the maximum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->max_value = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * For `INTEGER` flags, the maximum allowed value. - * - * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; - * @param int|string|null $var - * @return $this - */ - public function setMaxValueUnwrapped($var) - { - $this->writeWrapperValue("max_value", $var); - return $this;} - - /** - * Indicates whether changing this flag will trigger a database restart. Only - * applicable to Second Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRequiresRestart() - { - return $this->requires_restart; - } - - public function hasRequiresRestart() - { - return isset($this->requires_restart); - } - - public function clearRequiresRestart() - { - unset($this->requires_restart); - } - - /** - * Returns the unboxed value from getRequiresRestart() - - * Indicates whether changing this flag will trigger a database restart. Only - * applicable to Second Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; - * @return bool|null - */ - public function getRequiresRestartUnwrapped() - { - return $this->readWrapperValue("requires_restart"); - } - - /** - * Indicates whether changing this flag will trigger a database restart. Only - * applicable to Second Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRequiresRestart($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->requires_restart = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Indicates whether changing this flag will trigger a database restart. Only - * applicable to Second Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; - * @param bool|null $var - * @return $this - */ - public function setRequiresRestartUnwrapped($var) - { - $this->writeWrapperValue("requires_restart", $var); - return $this;} - - /** - * This is always `sql#flag`. - * - * Generated from protobuf field string kind = 8; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#flag`. - * - * Generated from protobuf field string kind = 8; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Whether or not the flag is considered in beta. - * - * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; - * @return \Google\Protobuf\BoolValue|null - */ - public function getInBeta() - { - return $this->in_beta; - } - - public function hasInBeta() - { - return isset($this->in_beta); - } - - public function clearInBeta() - { - unset($this->in_beta); - } - - /** - * Returns the unboxed value from getInBeta() - - * Whether or not the flag is considered in beta. - * - * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; - * @return bool|null - */ - public function getInBetaUnwrapped() - { - return $this->readWrapperValue("in_beta"); - } - - /** - * Whether or not the flag is considered in beta. - * - * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setInBeta($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->in_beta = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the flag is considered in beta. - * - * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; - * @param bool|null $var - * @return $this - */ - public function setInBetaUnwrapped($var) - { - $this->writeWrapperValue("in_beta", $var); - return $this;} - - /** - * Use this field if only certain integers are accepted. Can be combined - * with min_value and max_value to add additional values. - * - * Generated from protobuf field repeated int64 allowed_int_values = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedIntValues() - { - return $this->allowed_int_values; - } - - /** - * Use this field if only certain integers are accepted. Can be combined - * with min_value and max_value to add additional values. - * - * Generated from protobuf field repeated int64 allowed_int_values = 10; - * @param array|array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedIntValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); - $this->allowed_int_values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php deleted file mode 100644 index a6691eeb2c74..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.FlagsListResponse - */ -class FlagsListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#flagsList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of flags. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#flagsList`. - * @type array<\Google\Cloud\Sql\V1\Flag>|\Google\Protobuf\Internal\RepeatedField $items - * List of flags. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#flagsList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#flagsList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of flags. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of flags. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; - * @param array<\Google\Cloud\Sql\V1\Flag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Flag::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php deleted file mode 100644 index 66a1a7651be3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.sql.v1.GeminiInstanceConfig - */ -class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Whether Gemini is enabled. - * - * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $entitled = null; - /** - * Output only. Whether the vacuum management is enabled. - * - * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_vacuum_mgmt_enabled = null; - /** - * Output only. Whether canceling the out-of-memory (OOM) session is enabled. - * - * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $oom_session_cancel_enabled = null; - /** - * Output only. Whether the active query is enabled. - * - * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $active_query_enabled = null; - /** - * Output only. Whether the index advisor is enabled. - * - * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_advisor_enabled = null; - /** - * Output only. Whether the flag recommender is enabled. - * - * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $flag_recommender_enabled = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $entitled - * Output only. Whether Gemini is enabled. - * @type bool $google_vacuum_mgmt_enabled - * Output only. Whether the vacuum management is enabled. - * @type bool $oom_session_cancel_enabled - * Output only. Whether canceling the out-of-memory (OOM) session is enabled. - * @type bool $active_query_enabled - * Output only. Whether the active query is enabled. - * @type bool $index_advisor_enabled - * Output only. Whether the index advisor is enabled. - * @type bool $flag_recommender_enabled - * Output only. Whether the flag recommender is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Whether Gemini is enabled. - * - * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getEntitled() - { - return isset($this->entitled) ? $this->entitled : false; - } - - public function hasEntitled() - { - return isset($this->entitled); - } - - public function clearEntitled() - { - unset($this->entitled); - } - - /** - * Output only. Whether Gemini is enabled. - * - * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setEntitled($var) - { - GPBUtil::checkBool($var); - $this->entitled = $var; - - return $this; - } - - /** - * Output only. Whether the vacuum management is enabled. - * - * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleVacuumMgmtEnabled() - { - return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false; - } - - public function hasGoogleVacuumMgmtEnabled() - { - return isset($this->google_vacuum_mgmt_enabled); - } - - public function clearGoogleVacuumMgmtEnabled() - { - unset($this->google_vacuum_mgmt_enabled); - } - - /** - * Output only. Whether the vacuum management is enabled. - * - * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleVacuumMgmtEnabled($var) - { - GPBUtil::checkBool($var); - $this->google_vacuum_mgmt_enabled = $var; - - return $this; - } - - /** - * Output only. Whether canceling the out-of-memory (OOM) session is enabled. - * - * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getOomSessionCancelEnabled() - { - return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false; - } - - public function hasOomSessionCancelEnabled() - { - return isset($this->oom_session_cancel_enabled); - } - - public function clearOomSessionCancelEnabled() - { - unset($this->oom_session_cancel_enabled); - } - - /** - * Output only. Whether canceling the out-of-memory (OOM) session is enabled. - * - * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setOomSessionCancelEnabled($var) - { - GPBUtil::checkBool($var); - $this->oom_session_cancel_enabled = $var; - - return $this; - } - - /** - * Output only. Whether the active query is enabled. - * - * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getActiveQueryEnabled() - { - return isset($this->active_query_enabled) ? $this->active_query_enabled : false; - } - - public function hasActiveQueryEnabled() - { - return isset($this->active_query_enabled); - } - - public function clearActiveQueryEnabled() - { - unset($this->active_query_enabled); - } - - /** - * Output only. Whether the active query is enabled. - * - * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setActiveQueryEnabled($var) - { - GPBUtil::checkBool($var); - $this->active_query_enabled = $var; - - return $this; - } - - /** - * Output only. Whether the index advisor is enabled. - * - * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIndexAdvisorEnabled() - { - return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false; - } - - public function hasIndexAdvisorEnabled() - { - return isset($this->index_advisor_enabled); - } - - public function clearIndexAdvisorEnabled() - { - unset($this->index_advisor_enabled); - } - - /** - * Output only. Whether the index advisor is enabled. - * - * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIndexAdvisorEnabled($var) - { - GPBUtil::checkBool($var); - $this->index_advisor_enabled = $var; - - return $this; - } - - /** - * Output only. Whether the flag recommender is enabled. - * - * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getFlagRecommenderEnabled() - { - return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false; - } - - public function hasFlagRecommenderEnabled() - { - return isset($this->flag_recommender_enabled); - } - - public function clearFlagRecommenderEnabled() - { - unset($this->flag_recommender_enabled); - } - - /** - * Output only. Whether the flag recommender is enabled. - * - * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setFlagRecommenderEnabled($var) - { - GPBUtil::checkBool($var); - $this->flag_recommender_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php deleted file mode 100644 index 8a1c5622df77..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.sql.v1.GenerateEphemeralCertRequest - */ -class GenerateEphemeralCertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * PEM encoded public key to include in the signed certificate. - * - * Generated from protobuf field string public_key = 3; - */ - protected $public_key = ''; - /** - * Optional. Access token to include in the signed certificate. - * - * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $access_token = ''; - /** - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_time = null; - /** - * Optional. If set, it will contain the cert valid duration. - * - * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $valid_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type string $public_key - * PEM encoded public key to include in the signed certificate. - * @type string $access_token - * Optional. Access token to include in the signed certificate. - * @type \Google\Protobuf\Timestamp $read_time - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * @type \Google\Protobuf\Duration $valid_duration - * Optional. If set, it will contain the cert valid duration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * PEM encoded public key to include in the signed certificate. - * - * Generated from protobuf field string public_key = 3; - * @return string - */ - public function getPublicKey() - { - return $this->public_key; - } - - /** - * PEM encoded public key to include in the signed certificate. - * - * Generated from protobuf field string public_key = 3; - * @param string $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->public_key = $var; - - return $this; - } - - /** - * Optional. Access token to include in the signed certificate. - * - * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Optional. Access token to include in the signed certificate. - * - * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Optional. If set, it will contain the cert valid duration. - * - * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getValidDuration() - { - return $this->valid_duration; - } - - public function hasValidDuration() - { - return isset($this->valid_duration); - } - - public function clearValidDuration() - { - unset($this->valid_duration); - } - - /** - * Optional. If set, it will contain the cert valid duration. - * - * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setValidDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->valid_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php deleted file mode 100644 index 8830de381056..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.GenerateEphemeralCertResponse - */ -class GenerateEphemeralCertResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Generated cert - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; - */ - protected $ephemeral_cert = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\SslCert $ephemeral_cert - * Generated cert - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); - parent::__construct($data); - } - - /** - * Generated cert - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; - * @return \Google\Cloud\Sql\V1\SslCert|null - */ - public function getEphemeralCert() - { - return $this->ephemeral_cert; - } - - public function hasEphemeralCert() - { - return isset($this->ephemeral_cert); - } - - public function clearEphemeralCert() - { - unset($this->ephemeral_cert); - } - - /** - * Generated cert - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; - * @param \Google\Cloud\Sql\V1\SslCert $var - * @return $this - */ - public function setEphemeralCert($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); - $this->ephemeral_cert = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php deleted file mode 100644 index 9e2eede2ac38..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.sql.v1.GetConnectSettingsRequest - */ -class GetConnectSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Protobuf\Timestamp $read_time - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Optional snapshot read timestamp to trade freshness for - * performance. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php deleted file mode 100644 index 06b90533ca26..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php +++ /dev/null @@ -1,363 +0,0 @@ -google.cloud.sql.v1.ImportContext - */ -class ImportContext extends \Google\Protobuf\Internal\Message -{ - /** - * Path to the import file in Cloud Storage, in the form - * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported - * when `fileType` is `SQL`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * The target database for the import. If `fileType` is `SQL`, this field - * is required only if the import file does not specify a database, and is - * overridden by any database specification in the import file. If - * `fileType` is `CSV`, one database must be specified. - * - * Generated from protobuf field string database = 2; - */ - protected $database = ''; - /** - * This is always `sql#importContext`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - /** - * The file type for the specified uri.\`SQL`: The file - * contains SQL statements. \`CSV`: The file contains CSV data. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; - */ - protected $file_type = 0; - /** - * Options for importing data as CSV. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; - */ - protected $csv_import_options = null; - /** - * The PostgreSQL user for this import operation. PostgreSQL instances only. - * - * Generated from protobuf field string import_user = 6; - */ - protected $import_user = ''; - /** - * Import parameters specific to SQL Server .BAK files - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; - */ - protected $bak_import_options = null; - /** - * Optional. Options for importing data from SQL statements. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sql_import_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Path to the import file in Cloud Storage, in the form - * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported - * when `fileType` is `SQL`. The instance must have - * write permissions to the bucket and read access to the file. - * @type string $database - * The target database for the import. If `fileType` is `SQL`, this field - * is required only if the import file does not specify a database, and is - * overridden by any database specification in the import file. If - * `fileType` is `CSV`, one database must be specified. - * @type string $kind - * This is always `sql#importContext`. - * @type int $file_type - * The file type for the specified uri.\`SQL`: The file - * contains SQL statements. \`CSV`: The file contains CSV data. - * @type \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions $csv_import_options - * Options for importing data as CSV. - * @type string $import_user - * The PostgreSQL user for this import operation. PostgreSQL instances only. - * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $bak_import_options - * Import parameters specific to SQL Server .BAK files - * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $sql_import_options - * Optional. Options for importing data from SQL statements. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Path to the import file in Cloud Storage, in the form - * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported - * when `fileType` is `SQL`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Path to the import file in Cloud Storage, in the form - * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported - * when `fileType` is `SQL`. The instance must have - * write permissions to the bucket and read access to the file. - * - * 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; - } - - /** - * The target database for the import. If `fileType` is `SQL`, this field - * is required only if the import file does not specify a database, and is - * overridden by any database specification in the import file. If - * `fileType` is `CSV`, one database must be specified. - * - * Generated from protobuf field string database = 2; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The target database for the import. If `fileType` is `SQL`, this field - * is required only if the import file does not specify a database, and is - * overridden by any database specification in the import file. If - * `fileType` is `CSV`, one database must be specified. - * - * Generated from protobuf field string database = 2; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * This is always `sql#importContext`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#importContext`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The file type for the specified uri.\`SQL`: The file - * contains SQL statements. \`CSV`: The file contains CSV data. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; - * @return int - */ - public function getFileType() - { - return $this->file_type; - } - - /** - * The file type for the specified uri.\`SQL`: The file - * contains SQL statements. \`CSV`: The file contains CSV data. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; - * @param int $var - * @return $this - */ - public function setFileType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFileType::class); - $this->file_type = $var; - - return $this; - } - - /** - * Options for importing data as CSV. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; - * @return \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions|null - */ - public function getCsvImportOptions() - { - return $this->csv_import_options; - } - - public function hasCsvImportOptions() - { - return isset($this->csv_import_options); - } - - public function clearCsvImportOptions() - { - unset($this->csv_import_options); - } - - /** - * Options for importing data as CSV. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; - * @param \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions $var - * @return $this - */ - public function setCsvImportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions::class); - $this->csv_import_options = $var; - - return $this; - } - - /** - * The PostgreSQL user for this import operation. PostgreSQL instances only. - * - * Generated from protobuf field string import_user = 6; - * @return string - */ - public function getImportUser() - { - return $this->import_user; - } - - /** - * The PostgreSQL user for this import operation. PostgreSQL instances only. - * - * Generated from protobuf field string import_user = 6; - * @param string $var - * @return $this - */ - public function setImportUser($var) - { - GPBUtil::checkString($var, True); - $this->import_user = $var; - - return $this; - } - - /** - * Import parameters specific to SQL Server .BAK files - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; - * @return \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions|null - */ - public function getBakImportOptions() - { - return $this->bak_import_options; - } - - public function hasBakImportOptions() - { - return isset($this->bak_import_options); - } - - public function clearBakImportOptions() - { - unset($this->bak_import_options); - } - - /** - * Import parameters specific to SQL Server .BAK files - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; - * @param \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $var - * @return $this - */ - public function setBakImportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions::class); - $this->bak_import_options = $var; - - return $this; - } - - /** - * Optional. Options for importing data from SQL statements. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions|null - */ - public function getSqlImportOptions() - { - return $this->sql_import_options; - } - - public function hasSqlImportOptions() - { - return isset($this->sql_import_options); - } - - public function clearSqlImportOptions() - { - unset($this->sql_import_options); - } - - /** - * Optional. Options for importing data from SQL statements. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $var - * @return $this - */ - public function setSqlImportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions::class); - $this->sql_import_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php deleted file mode 100644 index 5d36cba31680..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php +++ /dev/null @@ -1,452 +0,0 @@ -google.cloud.sql.v1.ImportContext.SqlBakImportOptions - */ -class SqlBakImportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; - */ - protected $encryption_options = null; - /** - * Whether or not the backup set being restored is striped. - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 2; - */ - protected $striped = null; - /** - * Whether or not the backup importing will restore database - * with NORECOVERY option - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; - */ - protected $no_recovery = null; - /** - * Whether or not the backup importing request will just bring database - * online without downloading Bak content only one of "no_recovery" and - * "recovery_only" can be true otherwise error will return. Applies only to - * Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; - */ - protected $recovery_only = null; - /** - * Type of the bak content, FULL or DIFF - * - * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; - */ - protected $bak_type = 0; - /** - * Optional. The timestamp when the import should stop. This timestamp is in - * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, - * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT - * keyword and applies to Cloud SQL for SQL Server only. - * - * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $stop_at = null; - /** - * Optional. The marked transaction where the import should stop. This field - * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL - * Server only. - * - * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $stop_at_mark = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions $encryption_options - * @type \Google\Protobuf\BoolValue $striped - * Whether or not the backup set being restored is striped. - * Applies only to Cloud SQL for SQL Server. - * @type \Google\Protobuf\BoolValue $no_recovery - * Whether or not the backup importing will restore database - * with NORECOVERY option - * Applies only to Cloud SQL for SQL Server. - * @type \Google\Protobuf\BoolValue $recovery_only - * Whether or not the backup importing request will just bring database - * online without downloading Bak content only one of "no_recovery" and - * "recovery_only" can be true otherwise error will return. Applies only to - * Cloud SQL for SQL Server. - * @type int $bak_type - * Type of the bak content, FULL or DIFF - * @type \Google\Protobuf\Timestamp $stop_at - * Optional. The timestamp when the import should stop. This timestamp is in - * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, - * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT - * keyword and applies to Cloud SQL for SQL Server only. - * @type string $stop_at_mark - * Optional. The marked transaction where the import should stop. This field - * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL - * Server only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; - * @return \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions|null - */ - public function getEncryptionOptions() - { - return $this->encryption_options; - } - - public function hasEncryptionOptions() - { - return isset($this->encryption_options); - } - - public function clearEncryptionOptions() - { - unset($this->encryption_options); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; - * @param \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions $var - * @return $this - */ - public function setEncryptionOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions::class); - $this->encryption_options = $var; - - return $this; - } - - /** - * Whether or not the backup set being restored is striped. - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 2; - * @return \Google\Protobuf\BoolValue|null - */ - public function getStriped() - { - return $this->striped; - } - - public function hasStriped() - { - return isset($this->striped); - } - - public function clearStriped() - { - unset($this->striped); - } - - /** - * Returns the unboxed value from getStriped() - - * Whether or not the backup set being restored is striped. - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 2; - * @return bool|null - */ - public function getStripedUnwrapped() - { - return $this->readWrapperValue("striped"); - } - - /** - * Whether or not the backup set being restored is striped. - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 2; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setStriped($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->striped = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the backup set being restored is striped. - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue striped = 2; - * @param bool|null $var - * @return $this - */ - public function setStripedUnwrapped($var) - { - $this->writeWrapperValue("striped", $var); - return $this;} - - /** - * Whether or not the backup importing will restore database - * with NORECOVERY option - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; - * @return \Google\Protobuf\BoolValue|null - */ - public function getNoRecovery() - { - return $this->no_recovery; - } - - public function hasNoRecovery() - { - return isset($this->no_recovery); - } - - public function clearNoRecovery() - { - unset($this->no_recovery); - } - - /** - * Returns the unboxed value from getNoRecovery() - - * Whether or not the backup importing will restore database - * with NORECOVERY option - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; - * @return bool|null - */ - public function getNoRecoveryUnwrapped() - { - return $this->readWrapperValue("no_recovery"); - } - - /** - * Whether or not the backup importing will restore database - * with NORECOVERY option - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setNoRecovery($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->no_recovery = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the backup importing will restore database - * with NORECOVERY option - * Applies only to Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; - * @param bool|null $var - * @return $this - */ - public function setNoRecoveryUnwrapped($var) - { - $this->writeWrapperValue("no_recovery", $var); - return $this;} - - /** - * Whether or not the backup importing request will just bring database - * online without downloading Bak content only one of "no_recovery" and - * "recovery_only" can be true otherwise error will return. Applies only to - * Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRecoveryOnly() - { - return $this->recovery_only; - } - - public function hasRecoveryOnly() - { - return isset($this->recovery_only); - } - - public function clearRecoveryOnly() - { - unset($this->recovery_only); - } - - /** - * Returns the unboxed value from getRecoveryOnly() - - * Whether or not the backup importing request will just bring database - * online without downloading Bak content only one of "no_recovery" and - * "recovery_only" can be true otherwise error will return. Applies only to - * Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; - * @return bool|null - */ - public function getRecoveryOnlyUnwrapped() - { - return $this->readWrapperValue("recovery_only"); - } - - /** - * Whether or not the backup importing request will just bring database - * online without downloading Bak content only one of "no_recovery" and - * "recovery_only" can be true otherwise error will return. Applies only to - * Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRecoveryOnly($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->recovery_only = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the backup importing request will just bring database - * online without downloading Bak content only one of "no_recovery" and - * "recovery_only" can be true otherwise error will return. Applies only to - * Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; - * @param bool|null $var - * @return $this - */ - public function setRecoveryOnlyUnwrapped($var) - { - $this->writeWrapperValue("recovery_only", $var); - return $this;} - - /** - * Type of the bak content, FULL or DIFF - * - * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; - * @return int - */ - public function getBakType() - { - return $this->bak_type; - } - - /** - * Type of the bak content, FULL or DIFF - * - * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; - * @param int $var - * @return $this - */ - public function setBakType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BakType::class); - $this->bak_type = $var; - - return $this; - } - - /** - * Optional. The timestamp when the import should stop. This timestamp is in - * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, - * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT - * keyword and applies to Cloud SQL for SQL Server only. - * - * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStopAt() - { - return $this->stop_at; - } - - public function hasStopAt() - { - return isset($this->stop_at); - } - - public function clearStopAt() - { - unset($this->stop_at); - } - - /** - * Optional. The timestamp when the import should stop. This timestamp is in - * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, - * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT - * keyword and applies to Cloud SQL for SQL Server only. - * - * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStopAt($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->stop_at = $var; - - return $this; - } - - /** - * Optional. The marked transaction where the import should stop. This field - * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL - * Server only. - * - * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getStopAtMark() - { - return $this->stop_at_mark; - } - - /** - * Optional. The marked transaction where the import should stop. This field - * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL - * Server only. - * - * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setStopAtMark($var) - { - GPBUtil::checkString($var, True); - $this->stop_at_mark = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlBakImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlBakImportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php deleted file mode 100644 index 2e46dffcbc90..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions - */ -class EncryptionOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Path to the Certificate (.cer) in Cloud Storage, in the form - * `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string cert_path = 1; - */ - protected $cert_path = ''; - /** - * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the - * form `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string pvk_path = 2; - */ - protected $pvk_path = ''; - /** - * Password that encrypts the private key - * - * Generated from protobuf field string pvk_password = 3; - */ - protected $pvk_password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cert_path - * Path to the Certificate (.cer) in Cloud Storage, in the form - * `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * @type string $pvk_path - * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the - * form `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * @type string $pvk_password - * Password that encrypts the private key - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Path to the Certificate (.cer) in Cloud Storage, in the form - * `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string cert_path = 1; - * @return string - */ - public function getCertPath() - { - return $this->cert_path; - } - - /** - * Path to the Certificate (.cer) in Cloud Storage, in the form - * `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string cert_path = 1; - * @param string $var - * @return $this - */ - public function setCertPath($var) - { - GPBUtil::checkString($var, True); - $this->cert_path = $var; - - return $this; - } - - /** - * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the - * form `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string pvk_path = 2; - * @return string - */ - public function getPvkPath() - { - return $this->pvk_path; - } - - /** - * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the - * form `gs://bucketName/fileName`. The instance must have - * write permissions to the bucket and read access to the file. - * - * Generated from protobuf field string pvk_path = 2; - * @param string $var - * @return $this - */ - public function setPvkPath($var) - { - GPBUtil::checkString($var, True); - $this->pvk_path = $var; - - return $this; - } - - /** - * Password that encrypts the private key - * - * Generated from protobuf field string pvk_password = 3; - * @return string - */ - public function getPvkPassword() - { - return $this->pvk_password; - } - - /** - * Password that encrypts the private key - * - * Generated from protobuf field string pvk_password = 3; - * @param string $var - * @return $this - */ - public function setPvkPassword($var) - { - GPBUtil::checkString($var, True); - $this->pvk_password = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncryptionOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlBakImportOptions_EncryptionOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php deleted file mode 100644 index e320a13a1262..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php +++ /dev/null @@ -1,254 +0,0 @@ -google.cloud.sql.v1.ImportContext.SqlCsvImportOptions - */ -class SqlCsvImportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The table to which CSV data is imported. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * The columns to which CSV data is imported. If not specified, all columns - * of the database table are loaded with CSV data. - * - * Generated from protobuf field repeated string columns = 2; - */ - private $columns; - /** - * Specifies the character that should appear before a data character that - * needs to be escaped. - * - * Generated from protobuf field string escape_character = 4; - */ - protected $escape_character = ''; - /** - * Specifies the quoting character to be used when a data value is quoted. - * - * Generated from protobuf field string quote_character = 5; - */ - protected $quote_character = ''; - /** - * Specifies the character that separates columns within each row (line) of - * the file. - * - * Generated from protobuf field string fields_terminated_by = 6; - */ - protected $fields_terminated_by = ''; - /** - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * - * Generated from protobuf field string lines_terminated_by = 8; - */ - protected $lines_terminated_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * The table to which CSV data is imported. - * @type array|\Google\Protobuf\Internal\RepeatedField $columns - * The columns to which CSV data is imported. If not specified, all columns - * of the database table are loaded with CSV data. - * @type string $escape_character - * Specifies the character that should appear before a data character that - * needs to be escaped. - * @type string $quote_character - * Specifies the quoting character to be used when a data value is quoted. - * @type string $fields_terminated_by - * Specifies the character that separates columns within each row (line) of - * the file. - * @type string $lines_terminated_by - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The table to which CSV data is imported. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * The table to which CSV data is imported. - * - * 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; - } - - /** - * The columns to which CSV data is imported. If not specified, all columns - * of the database table are loaded with CSV data. - * - * Generated from protobuf field repeated string columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumns() - { - return $this->columns; - } - - /** - * The columns to which CSV data is imported. If not specified, all columns - * of the database table are loaded with CSV data. - * - * Generated from protobuf field repeated string columns = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->columns = $arr; - - return $this; - } - - /** - * Specifies the character that should appear before a data character that - * needs to be escaped. - * - * Generated from protobuf field string escape_character = 4; - * @return string - */ - public function getEscapeCharacter() - { - return $this->escape_character; - } - - /** - * Specifies the character that should appear before a data character that - * needs to be escaped. - * - * Generated from protobuf field string escape_character = 4; - * @param string $var - * @return $this - */ - public function setEscapeCharacter($var) - { - GPBUtil::checkString($var, True); - $this->escape_character = $var; - - return $this; - } - - /** - * Specifies the quoting character to be used when a data value is quoted. - * - * Generated from protobuf field string quote_character = 5; - * @return string - */ - public function getQuoteCharacter() - { - return $this->quote_character; - } - - /** - * Specifies the quoting character to be used when a data value is quoted. - * - * Generated from protobuf field string quote_character = 5; - * @param string $var - * @return $this - */ - public function setQuoteCharacter($var) - { - GPBUtil::checkString($var, True); - $this->quote_character = $var; - - return $this; - } - - /** - * Specifies the character that separates columns within each row (line) of - * the file. - * - * Generated from protobuf field string fields_terminated_by = 6; - * @return string - */ - public function getFieldsTerminatedBy() - { - return $this->fields_terminated_by; - } - - /** - * Specifies the character that separates columns within each row (line) of - * the file. - * - * Generated from protobuf field string fields_terminated_by = 6; - * @param string $var - * @return $this - */ - public function setFieldsTerminatedBy($var) - { - GPBUtil::checkString($var, True); - $this->fields_terminated_by = $var; - - return $this; - } - - /** - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * - * Generated from protobuf field string lines_terminated_by = 8; - * @return string - */ - public function getLinesTerminatedBy() - { - return $this->lines_terminated_by; - } - - /** - * This is used to separate lines. If a line does not contain all fields, - * the rest of the columns are set to their default values. - * - * Generated from protobuf field string lines_terminated_by = 8; - * @param string $var - * @return $this - */ - public function setLinesTerminatedBy($var) - { - GPBUtil::checkString($var, True); - $this->lines_terminated_by = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlCsvImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlCsvImportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php deleted file mode 100644 index eddd8a30e024..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.sql.v1.ImportContext.SqlImportOptions - */ -class SqlImportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of threads to use for parallel import. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $threads = null; - /** - * Optional. Whether or not the import should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parallel = null; - /** - * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions postgres_import_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $postgres_import_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int32Value $threads - * Optional. The number of threads to use for parallel import. - * @type \Google\Protobuf\BoolValue $parallel - * Optional. Whether or not the import should be parallel. - * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions $postgres_import_options - * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of threads to use for parallel import. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getThreads() - { - return $this->threads; - } - - public function hasThreads() - { - return isset($this->threads); - } - - public function clearThreads() - { - unset($this->threads); - } - - /** - * Returns the unboxed value from getThreads() - - * Optional. The number of threads to use for parallel import. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|null - */ - public function getThreadsUnwrapped() - { - return $this->readWrapperValue("threads"); - } - - /** - * Optional. The number of threads to use for parallel import. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setThreads($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->threads = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Optional. The number of threads to use for parallel import. - * - * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|null $var - * @return $this - */ - public function setThreadsUnwrapped($var) - { - $this->writeWrapperValue("threads", $var); - return $this;} - - /** - * Optional. Whether or not the import should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getParallel() - { - return $this->parallel; - } - - public function hasParallel() - { - return isset($this->parallel); - } - - public function clearParallel() - { - unset($this->parallel); - } - - /** - * Returns the unboxed value from getParallel() - - * Optional. Whether or not the import should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getParallelUnwrapped() - { - return $this->readWrapperValue("parallel"); - } - - /** - * Optional. Whether or not the import should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setParallel($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->parallel = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. Whether or not the import should be parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setParallelUnwrapped($var) - { - $this->writeWrapperValue("parallel", $var); - return $this;} - - /** - * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions postgres_import_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions|null - */ - public function getPostgresImportOptions() - { - return $this->postgres_import_options; - } - - public function hasPostgresImportOptions() - { - return isset($this->postgres_import_options); - } - - public function clearPostgresImportOptions() - { - unset($this->postgres_import_options); - } - - /** - * Optional. Options for importing from a Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions postgres_import_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions $var - * @return $this - */ - public function setPostgresImportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions\PostgresImportOptions::class); - $this->postgres_import_options = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlImportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php deleted file mode 100644 index 5333c31280a6..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions/PostgresImportOptions.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.sql.v1.ImportContext.SqlImportOptions.PostgresImportOptions - */ -class PostgresImportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The --clean flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $clean = null; - /** - * Optional. The --if-exists flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $if_exists = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $clean - * Optional. The --clean flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * @type \Google\Protobuf\BoolValue $if_exists - * Optional. The --if-exists flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The --clean flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getClean() - { - return $this->clean; - } - - public function hasClean() - { - return isset($this->clean); - } - - public function clearClean() - { - unset($this->clean); - } - - /** - * Returns the unboxed value from getClean() - - * Optional. The --clean flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getCleanUnwrapped() - { - return $this->readWrapperValue("clean"); - } - - /** - * Optional. The --clean flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setClean($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->clean = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. The --clean flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue clean = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setCleanUnwrapped($var) - { - $this->writeWrapperValue("clean", $var); - return $this;} - - /** - * Optional. The --if-exists flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getIfExists() - { - return $this->if_exists; - } - - public function hasIfExists() - { - return isset($this->if_exists); - } - - public function clearIfExists() - { - unset($this->if_exists); - } - - /** - * Returns the unboxed value from getIfExists() - - * Optional. The --if-exists flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getIfExistsUnwrapped() - { - return $this->readWrapperValue("if_exists"); - } - - /** - * Optional. The --if-exists flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setIfExists($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->if_exists = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. The --if-exists flag for the pg_restore utility. This flag - * applies only if you enabled Cloud SQL to import files in parallel. - * - * Generated from protobuf field .google.protobuf.BoolValue if_exists = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setIfExistsUnwrapped($var) - { - $this->writeWrapperValue("if_exists", $var); - return $this;} - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostgresImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlImportOptions_PostgresImportOptions::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php deleted file mode 100644 index 0614d521e328..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.sql.v1.InsightsConfig - */ -class InsightsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether Query Insights feature is enabled. - * - * Generated from protobuf field bool query_insights_enabled = 1; - */ - protected $query_insights_enabled = false; - /** - * Whether Query Insights will record client address when enabled. - * - * Generated from protobuf field bool record_client_address = 2; - */ - protected $record_client_address = false; - /** - * Whether Query Insights will record application tags from query when - * enabled. - * - * Generated from protobuf field bool record_application_tags = 3; - */ - protected $record_application_tags = false; - /** - * Maximum query length stored in bytes. Default value: 1024 bytes. - * Range: 256-4500 bytes. Query length more than this field value will be - * truncated to this value. When unset, query length will be the default - * value. Changing query length will restart the database. - * - * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; - */ - protected $query_string_length = null; - /** - * Number of query execution plans captured by Insights per minute - * for all queries combined. Default is 5. - * - * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; - */ - protected $query_plans_per_minute = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $query_insights_enabled - * Whether Query Insights feature is enabled. - * @type bool $record_client_address - * Whether Query Insights will record client address when enabled. - * @type bool $record_application_tags - * Whether Query Insights will record application tags from query when - * enabled. - * @type \Google\Protobuf\Int32Value $query_string_length - * Maximum query length stored in bytes. Default value: 1024 bytes. - * Range: 256-4500 bytes. Query length more than this field value will be - * truncated to this value. When unset, query length will be the default - * value. Changing query length will restart the database. - * @type \Google\Protobuf\Int32Value $query_plans_per_minute - * Number of query execution plans captured by Insights per minute - * for all queries combined. Default is 5. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Whether Query Insights feature is enabled. - * - * Generated from protobuf field bool query_insights_enabled = 1; - * @return bool - */ - public function getQueryInsightsEnabled() - { - return $this->query_insights_enabled; - } - - /** - * Whether Query Insights feature is enabled. - * - * Generated from protobuf field bool query_insights_enabled = 1; - * @param bool $var - * @return $this - */ - public function setQueryInsightsEnabled($var) - { - GPBUtil::checkBool($var); - $this->query_insights_enabled = $var; - - return $this; - } - - /** - * Whether Query Insights will record client address when enabled. - * - * Generated from protobuf field bool record_client_address = 2; - * @return bool - */ - public function getRecordClientAddress() - { - return $this->record_client_address; - } - - /** - * Whether Query Insights will record client address when enabled. - * - * Generated from protobuf field bool record_client_address = 2; - * @param bool $var - * @return $this - */ - public function setRecordClientAddress($var) - { - GPBUtil::checkBool($var); - $this->record_client_address = $var; - - return $this; - } - - /** - * Whether Query Insights will record application tags from query when - * enabled. - * - * Generated from protobuf field bool record_application_tags = 3; - * @return bool - */ - public function getRecordApplicationTags() - { - return $this->record_application_tags; - } - - /** - * Whether Query Insights will record application tags from query when - * enabled. - * - * Generated from protobuf field bool record_application_tags = 3; - * @param bool $var - * @return $this - */ - public function setRecordApplicationTags($var) - { - GPBUtil::checkBool($var); - $this->record_application_tags = $var; - - return $this; - } - - /** - * Maximum query length stored in bytes. Default value: 1024 bytes. - * Range: 256-4500 bytes. Query length more than this field value will be - * truncated to this value. When unset, query length will be the default - * value. Changing query length will restart the database. - * - * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; - * @return \Google\Protobuf\Int32Value|null - */ - public function getQueryStringLength() - { - return $this->query_string_length; - } - - public function hasQueryStringLength() - { - return isset($this->query_string_length); - } - - public function clearQueryStringLength() - { - unset($this->query_string_length); - } - - /** - * Returns the unboxed value from getQueryStringLength() - - * Maximum query length stored in bytes. Default value: 1024 bytes. - * Range: 256-4500 bytes. Query length more than this field value will be - * truncated to this value. When unset, query length will be the default - * value. Changing query length will restart the database. - * - * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; - * @return int|null - */ - public function getQueryStringLengthUnwrapped() - { - return $this->readWrapperValue("query_string_length"); - } - - /** - * Maximum query length stored in bytes. Default value: 1024 bytes. - * Range: 256-4500 bytes. Query length more than this field value will be - * truncated to this value. When unset, query length will be the default - * value. Changing query length will restart the database. - * - * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setQueryStringLength($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->query_string_length = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Maximum query length stored in bytes. Default value: 1024 bytes. - * Range: 256-4500 bytes. Query length more than this field value will be - * truncated to this value. When unset, query length will be the default - * value. Changing query length will restart the database. - * - * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; - * @param int|null $var - * @return $this - */ - public function setQueryStringLengthUnwrapped($var) - { - $this->writeWrapperValue("query_string_length", $var); - return $this;} - - /** - * Number of query execution plans captured by Insights per minute - * for all queries combined. Default is 5. - * - * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; - * @return \Google\Protobuf\Int32Value|null - */ - public function getQueryPlansPerMinute() - { - return $this->query_plans_per_minute; - } - - public function hasQueryPlansPerMinute() - { - return isset($this->query_plans_per_minute); - } - - public function clearQueryPlansPerMinute() - { - unset($this->query_plans_per_minute); - } - - /** - * Returns the unboxed value from getQueryPlansPerMinute() - - * Number of query execution plans captured by Insights per minute - * for all queries combined. Default is 5. - * - * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; - * @return int|null - */ - public function getQueryPlansPerMinuteUnwrapped() - { - return $this->readWrapperValue("query_plans_per_minute"); - } - - /** - * Number of query execution plans captured by Insights per minute - * for all queries combined. Default is 5. - * - * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setQueryPlansPerMinute($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->query_plans_per_minute = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Number of query execution plans captured by Insights per minute - * for all queries combined. Default is 5. - * - * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; - * @param int|null $var - * @return $this - */ - public function setQueryPlansPerMinuteUnwrapped($var) - { - $this->writeWrapperValue("query_plans_per_minute", $var); - return $this;} - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php deleted file mode 100644 index 408946eab2e9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.sql.v1.InstanceReference - */ -class InstanceReference extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Cloud SQL instance being referenced. - * This does not include the project ID. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The region of the Cloud SQL instance being referenced. - * - * Generated from protobuf field string region = 2; - */ - protected $region = ''; - /** - * The project ID of the Cloud SQL instance being referenced. - * The default is the same project ID as the instance references it. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the Cloud SQL instance being referenced. - * This does not include the project ID. - * @type string $region - * The region of the Cloud SQL instance being referenced. - * @type string $project - * The project ID of the Cloud SQL instance being referenced. - * The default is the same project ID as the instance references it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Cloud SQL instance being referenced. - * This does not include the project ID. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the Cloud SQL instance being referenced. - * This does not include the project 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 region of the Cloud SQL instance being referenced. - * - * Generated from protobuf field string region = 2; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * The region of the Cloud SQL instance being referenced. - * - * Generated from protobuf field string region = 2; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * The project ID of the Cloud SQL instance being referenced. - * The default is the same project ID as the instance references it. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The project ID of the Cloud SQL instance being referenced. - * The default is the same project ID as the instance references it. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php deleted file mode 100644 index 59a57b65e6a8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest - */ -class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the acquire SSRS lease operation. - * - * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; - */ - protected $acquire_ssrs_lease_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context - * Contains details about the acquire SSRS lease operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the acquire SSRS lease operation. - * - * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; - * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null - */ - public function getAcquireSsrsLeaseContext() - { - return $this->acquire_ssrs_lease_context; - } - - public function hasAcquireSsrsLeaseContext() - { - return isset($this->acquire_ssrs_lease_context); - } - - public function clearAcquireSsrsLeaseContext() - { - unset($this->acquire_ssrs_lease_context); - } - - /** - * Contains details about the acquire SSRS lease operation. - * - * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; - * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var - * @return $this - */ - public function setAcquireSsrsLeaseContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); - $this->acquire_ssrs_lease_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php deleted file mode 100644 index 966e8da45186..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesCloneRequest - */ -class InstancesCloneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the clone operation. - * - * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; - */ - protected $clone_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\CloneContext $clone_context - * Contains details about the clone operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the clone operation. - * - * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; - * @return \Google\Cloud\Sql\V1\CloneContext|null - */ - public function getCloneContext() - { - return $this->clone_context; - } - - public function hasCloneContext() - { - return isset($this->clone_context); - } - - public function clearCloneContext() - { - unset($this->clone_context); - } - - /** - * Contains details about the clone operation. - * - * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; - * @param \Google\Cloud\Sql\V1\CloneContext $var - * @return $this - */ - public function setCloneContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\CloneContext::class); - $this->clone_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php deleted file mode 100644 index eb523b01e5f6..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesDemoteMasterRequest - */ -class InstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the demoteMaster operation. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; - */ - protected $demote_master_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\DemoteMasterContext $demote_master_context - * Contains details about the demoteMaster operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the demoteMaster operation. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; - * @return \Google\Cloud\Sql\V1\DemoteMasterContext|null - */ - public function getDemoteMasterContext() - { - return $this->demote_master_context; - } - - public function hasDemoteMasterContext() - { - return isset($this->demote_master_context); - } - - public function clearDemoteMasterContext() - { - unset($this->demote_master_context); - } - - /** - * Contains details about the demoteMaster operation. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; - * @param \Google\Cloud\Sql\V1\DemoteMasterContext $var - * @return $this - */ - public function setDemoteMasterContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterContext::class); - $this->demote_master_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php deleted file mode 100644 index d2c405572a4c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.sql.v1.InstancesDemoteRequest - */ -class InstancesDemoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Contains details about the demote operation. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $demote_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\DemoteContext $demote_context - * Required. Contains details about the demote operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Required. Contains details about the demote operation. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Sql\V1\DemoteContext|null - */ - public function getDemoteContext() - { - return $this->demote_context; - } - - public function hasDemoteContext() - { - return isset($this->demote_context); - } - - public function clearDemoteContext() - { - unset($this->demote_context); - } - - /** - * Required. Contains details about the demote operation. - * - * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Sql\V1\DemoteContext $var - * @return $this - */ - public function setDemoteContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteContext::class); - $this->demote_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php deleted file mode 100644 index c5b961981af4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesExportRequest - */ -class InstancesExportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the export operation. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; - */ - protected $export_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\ExportContext $export_context - * Contains details about the export operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the export operation. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; - * @return \Google\Cloud\Sql\V1\ExportContext|null - */ - public function getExportContext() - { - return $this->export_context; - } - - public function hasExportContext() - { - return isset($this->export_context); - } - - public function clearExportContext() - { - unset($this->export_context); - } - - /** - * Contains details about the export operation. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; - * @param \Google\Cloud\Sql\V1\ExportContext $var - * @return $this - */ - public function setExportContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext::class); - $this->export_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php deleted file mode 100644 index 3fbccb780c2b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesFailoverRequest - */ -class InstancesFailoverRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Failover Context. - * - * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; - */ - protected $failover_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\FailoverContext $failover_context - * Failover Context. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Failover Context. - * - * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; - * @return \Google\Cloud\Sql\V1\FailoverContext|null - */ - public function getFailoverContext() - { - return $this->failover_context; - } - - public function hasFailoverContext() - { - return isset($this->failover_context); - } - - public function clearFailoverContext() - { - unset($this->failover_context); - } - - /** - * Failover Context. - * - * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; - * @param \Google\Cloud\Sql\V1\FailoverContext $var - * @return $this - */ - public function setFailoverContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\FailoverContext::class); - $this->failover_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php deleted file mode 100644 index 68c3f5dc1b15..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesImportRequest - */ -class InstancesImportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the import operation. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; - */ - protected $import_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\ImportContext $import_context - * Contains details about the import operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the import operation. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; - * @return \Google\Cloud\Sql\V1\ImportContext|null - */ - public function getImportContext() - { - return $this->import_context; - } - - public function hasImportContext() - { - return isset($this->import_context); - } - - public function clearImportContext() - { - unset($this->import_context); - } - - /** - * Contains details about the import operation. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; - * @param \Google\Cloud\Sql\V1\ImportContext $var - * @return $this - */ - public function setImportContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext::class); - $this->import_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php deleted file mode 100644 index 8f182efcbb27..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.sql.v1.InstancesListResponse - */ -class InstancesListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#instancesList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of warnings that occurred while handling the request. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; - */ - private $warnings; - /** - * List of database instance resources. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; - */ - private $items; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 4; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#instancesList`. - * @type array<\Google\Cloud\Sql\V1\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $warnings - * List of warnings that occurred while handling the request. - * @type array<\Google\Cloud\Sql\V1\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $items - * List of database instance resources. - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#instancesList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#instancesList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of warnings that occurred while handling the request. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * List of warnings that occurred while handling the request. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; - * @param array<\Google\Cloud\Sql\V1\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\ApiWarning::class); - $this->warnings = $arr; - - return $this; - } - - /** - * List of database instance resources. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of database instance resources. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; - * @param array<\Google\Cloud\Sql\V1\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DatabaseInstance::class); - $this->items = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 4; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 4; - * @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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php deleted file mode 100644 index 488af9f2b7e7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.sql.v1.InstancesListServerCasResponse - */ -class InstancesListServerCasResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of server CA certificates for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; - */ - private $certs; - /** - * Generated from protobuf field string active_version = 2; - */ - protected $active_version = ''; - /** - * This is always `sql#instancesListServerCas`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $certs - * List of server CA certificates for the instance. - * @type string $active_version - * @type string $kind - * This is always `sql#instancesListServerCas`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * List of server CA certificates for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCerts() - { - return $this->certs; - } - - /** - * List of server CA certificates for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; - * @param array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SslCert::class); - $this->certs = $arr; - - return $this; - } - - /** - * Generated from protobuf field string active_version = 2; - * @return string - */ - public function getActiveVersion() - { - return $this->active_version; - } - - /** - * Generated from protobuf field string active_version = 2; - * @param string $var - * @return $this - */ - public function setActiveVersion($var) - { - GPBUtil::checkString($var, True); - $this->active_version = $var; - - return $this; - } - - /** - * This is always `sql#instancesListServerCas`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#instancesListServerCas`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php deleted file mode 100644 index ffd45275fa43..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesReencryptRequest - */ -class InstancesReencryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration specific to backup re-encryption - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; - */ - protected $backup_reencryption_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\BackupReencryptionConfig $backup_reencryption_config - * Configuration specific to backup re-encryption - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Configuration specific to backup re-encryption - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; - * @return \Google\Cloud\Sql\V1\BackupReencryptionConfig|null - */ - public function getBackupReencryptionConfig() - { - return $this->backup_reencryption_config; - } - - public function hasBackupReencryptionConfig() - { - return isset($this->backup_reencryption_config); - } - - public function clearBackupReencryptionConfig() - { - unset($this->backup_reencryption_config); - } - - /** - * Configuration specific to backup re-encryption - * - * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; - * @param \Google\Cloud\Sql\V1\BackupReencryptionConfig $var - * @return $this - */ - public function setBackupReencryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupReencryptionConfig::class); - $this->backup_reencryption_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php deleted file mode 100644 index 46c274d13f1b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesRestoreBackupRequest - */ -class InstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Parameters required to perform the restore backup operation. - * - * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; - */ - protected $restore_backup_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\RestoreBackupContext $restore_backup_context - * Parameters required to perform the restore backup operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Parameters required to perform the restore backup operation. - * - * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; - * @return \Google\Cloud\Sql\V1\RestoreBackupContext|null - */ - public function getRestoreBackupContext() - { - return $this->restore_backup_context; - } - - public function hasRestoreBackupContext() - { - return isset($this->restore_backup_context); - } - - public function clearRestoreBackupContext() - { - unset($this->restore_backup_context); - } - - /** - * Parameters required to perform the restore backup operation. - * - * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; - * @param \Google\Cloud\Sql\V1\RestoreBackupContext $var - * @return $this - */ - public function setRestoreBackupContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\RestoreBackupContext::class); - $this->restore_backup_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php deleted file mode 100644 index 74b58e53c479..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesRotateServerCaRequest - */ -class InstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the rotate server CA operation. - * - * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; - */ - protected $rotate_server_ca_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\RotateServerCaContext $rotate_server_ca_context - * Contains details about the rotate server CA operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the rotate server CA operation. - * - * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; - * @return \Google\Cloud\Sql\V1\RotateServerCaContext|null - */ - public function getRotateServerCaContext() - { - return $this->rotate_server_ca_context; - } - - public function hasRotateServerCaContext() - { - return isset($this->rotate_server_ca_context); - } - - public function clearRotateServerCaContext() - { - unset($this->rotate_server_ca_context); - } - - /** - * Contains details about the rotate server CA operation. - * - * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; - * @param \Google\Cloud\Sql\V1\RotateServerCaContext $var - * @return $this - */ - public function setRotateServerCaContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\RotateServerCaContext::class); - $this->rotate_server_ca_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php deleted file mode 100644 index 2a0b469e871c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.InstancesTruncateLogRequest - */ -class InstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Contains details about the truncate log operation. - * - * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; - */ - protected $truncate_log_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\TruncateLogContext $truncate_log_context - * Contains details about the truncate log operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Contains details about the truncate log operation. - * - * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; - * @return \Google\Cloud\Sql\V1\TruncateLogContext|null - */ - public function getTruncateLogContext() - { - return $this->truncate_log_context; - } - - public function hasTruncateLogContext() - { - return isset($this->truncate_log_context); - } - - public function clearTruncateLogContext() - { - unset($this->truncate_log_context); - } - - /** - * Contains details about the truncate log operation. - * - * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; - * @param \Google\Cloud\Sql\V1\TruncateLogContext $var - * @return $this - */ - public function setTruncateLogContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\TruncateLogContext::class); - $this->truncate_log_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php deleted file mode 100644 index 1363a986f54d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php +++ /dev/null @@ -1,618 +0,0 @@ -google.cloud.sql.v1.IpConfiguration - */ -class IpConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * Whether the instance is assigned a public IP address or not. - * - * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; - */ - protected $ipv4_enabled = null; - /** - * The resource link for the VPC network from which the Cloud SQL instance is - * accessible for private IP. For example, - * `/projects/myProject/global/networks/default`. This setting can - * be updated, but it cannot be removed after it is set. - * - * Generated from protobuf field string private_network = 2; - */ - protected $private_network = ''; - /** - * Use `ssl_mode` instead. - * Whether SSL/TLS connections over IP are enforced. - * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. - * For SSL/TLS connections, the client certificate won't be verified. If - * set to true, then only allow connections encrypted with SSL/TLS and with - * valid client certificates. If you want to enforce SSL/TLS without enforcing - * the requirement for valid client certificates, then use the `ssl_mode` flag - * instead of the `require_ssl` flag. - * - * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; - */ - protected $require_ssl = null; - /** - * The list of external networks that are allowed to connect to the instance - * using the IP. In 'CIDR' notation, also known as 'slash' notation (for - * example: `157.197.200.0/24`). - * - * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; - */ - private $authorized_networks; - /** - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the instance ip - * will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * `[a-z]([-a-z0-9]*[a-z0-9])?.` - * - * Generated from protobuf field string allocated_ip_range = 6; - */ - protected $allocated_ip_range = ''; - /** - * Controls connectivity to private IP instances from Google services, - * such as BigQuery. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; - */ - protected $enable_private_path_for_google_cloud_services = null; - /** - * Specify how SSL/TLS is enforced in database connections. If you must use - * the `require_ssl` flag for backward compatibility, then only the following - * value pairs are valid: - * For PostgreSQL and MySQL: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` - * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` - * For SQL Server: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` - * The value of `ssl_mode` has priority over the value of `require_ssl`. - * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and - * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL - * connections, while `require_ssl=false` means accept both non-SSL - * and SSL connections. In this case, MySQL and PostgreSQL databases respect - * `ssl_mode` and accepts only SSL connections. - * - * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; - */ - protected $ssl_mode = 0; - /** - * PSC settings for this instance. - * - * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; - */ - protected $psc_config = null; - /** - * Specify what type of CA is used for the server certificate. - * - * Generated from protobuf field optional .google.cloud.sql.v1.IpConfiguration.CaMode server_ca_mode = 10; - */ - protected $server_ca_mode = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\BoolValue $ipv4_enabled - * Whether the instance is assigned a public IP address or not. - * @type string $private_network - * The resource link for the VPC network from which the Cloud SQL instance is - * accessible for private IP. For example, - * `/projects/myProject/global/networks/default`. This setting can - * be updated, but it cannot be removed after it is set. - * @type \Google\Protobuf\BoolValue $require_ssl - * Use `ssl_mode` instead. - * Whether SSL/TLS connections over IP are enforced. - * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. - * For SSL/TLS connections, the client certificate won't be verified. If - * set to true, then only allow connections encrypted with SSL/TLS and with - * valid client certificates. If you want to enforce SSL/TLS without enforcing - * the requirement for valid client certificates, then use the `ssl_mode` flag - * instead of the `require_ssl` flag. - * @type array<\Google\Cloud\Sql\V1\AclEntry>|\Google\Protobuf\Internal\RepeatedField $authorized_networks - * The list of external networks that are allowed to connect to the instance - * using the IP. In 'CIDR' notation, also known as 'slash' notation (for - * example: `157.197.200.0/24`). - * @type string $allocated_ip_range - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the instance ip - * will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * `[a-z]([-a-z0-9]*[a-z0-9])?.` - * @type \Google\Protobuf\BoolValue $enable_private_path_for_google_cloud_services - * Controls connectivity to private IP instances from Google services, - * such as BigQuery. - * @type int $ssl_mode - * Specify how SSL/TLS is enforced in database connections. If you must use - * the `require_ssl` flag for backward compatibility, then only the following - * value pairs are valid: - * For PostgreSQL and MySQL: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` - * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` - * For SQL Server: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` - * The value of `ssl_mode` has priority over the value of `require_ssl`. - * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and - * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL - * connections, while `require_ssl=false` means accept both non-SSL - * and SSL connections. In this case, MySQL and PostgreSQL databases respect - * `ssl_mode` and accepts only SSL connections. - * @type \Google\Cloud\Sql\V1\PscConfig $psc_config - * PSC settings for this instance. - * @type int $server_ca_mode - * Specify what type of CA is used for the server certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Whether the instance is assigned a public IP address or not. - * - * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; - * @return \Google\Protobuf\BoolValue|null - */ - public function getIpv4Enabled() - { - return $this->ipv4_enabled; - } - - public function hasIpv4Enabled() - { - return isset($this->ipv4_enabled); - } - - public function clearIpv4Enabled() - { - unset($this->ipv4_enabled); - } - - /** - * Returns the unboxed value from getIpv4Enabled() - - * Whether the instance is assigned a public IP address or not. - * - * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; - * @return bool|null - */ - public function getIpv4EnabledUnwrapped() - { - return $this->readWrapperValue("ipv4_enabled"); - } - - /** - * Whether the instance is assigned a public IP address or not. - * - * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setIpv4Enabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->ipv4_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether the instance is assigned a public IP address or not. - * - * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; - * @param bool|null $var - * @return $this - */ - public function setIpv4EnabledUnwrapped($var) - { - $this->writeWrapperValue("ipv4_enabled", $var); - return $this;} - - /** - * The resource link for the VPC network from which the Cloud SQL instance is - * accessible for private IP. For example, - * `/projects/myProject/global/networks/default`. This setting can - * be updated, but it cannot be removed after it is set. - * - * Generated from protobuf field string private_network = 2; - * @return string - */ - public function getPrivateNetwork() - { - return $this->private_network; - } - - /** - * The resource link for the VPC network from which the Cloud SQL instance is - * accessible for private IP. For example, - * `/projects/myProject/global/networks/default`. This setting can - * be updated, but it cannot be removed after it is set. - * - * Generated from protobuf field string private_network = 2; - * @param string $var - * @return $this - */ - public function setPrivateNetwork($var) - { - GPBUtil::checkString($var, True); - $this->private_network = $var; - - return $this; - } - - /** - * Use `ssl_mode` instead. - * Whether SSL/TLS connections over IP are enforced. - * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. - * For SSL/TLS connections, the client certificate won't be verified. If - * set to true, then only allow connections encrypted with SSL/TLS and with - * valid client certificates. If you want to enforce SSL/TLS without enforcing - * the requirement for valid client certificates, then use the `ssl_mode` flag - * instead of the `require_ssl` flag. - * - * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; - * @return \Google\Protobuf\BoolValue|null - */ - public function getRequireSsl() - { - return $this->require_ssl; - } - - public function hasRequireSsl() - { - return isset($this->require_ssl); - } - - public function clearRequireSsl() - { - unset($this->require_ssl); - } - - /** - * Returns the unboxed value from getRequireSsl() - - * Use `ssl_mode` instead. - * Whether SSL/TLS connections over IP are enforced. - * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. - * For SSL/TLS connections, the client certificate won't be verified. If - * set to true, then only allow connections encrypted with SSL/TLS and with - * valid client certificates. If you want to enforce SSL/TLS without enforcing - * the requirement for valid client certificates, then use the `ssl_mode` flag - * instead of the `require_ssl` flag. - * - * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; - * @return bool|null - */ - public function getRequireSslUnwrapped() - { - return $this->readWrapperValue("require_ssl"); - } - - /** - * Use `ssl_mode` instead. - * Whether SSL/TLS connections over IP are enforced. - * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. - * For SSL/TLS connections, the client certificate won't be verified. If - * set to true, then only allow connections encrypted with SSL/TLS and with - * valid client certificates. If you want to enforce SSL/TLS without enforcing - * the requirement for valid client certificates, then use the `ssl_mode` flag - * instead of the `require_ssl` flag. - * - * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setRequireSsl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->require_ssl = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Use `ssl_mode` instead. - * Whether SSL/TLS connections over IP are enforced. - * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. - * For SSL/TLS connections, the client certificate won't be verified. If - * set to true, then only allow connections encrypted with SSL/TLS and with - * valid client certificates. If you want to enforce SSL/TLS without enforcing - * the requirement for valid client certificates, then use the `ssl_mode` flag - * instead of the `require_ssl` flag. - * - * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; - * @param bool|null $var - * @return $this - */ - public function setRequireSslUnwrapped($var) - { - $this->writeWrapperValue("require_ssl", $var); - return $this;} - - /** - * The list of external networks that are allowed to connect to the instance - * using the IP. In 'CIDR' notation, also known as 'slash' notation (for - * example: `157.197.200.0/24`). - * - * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuthorizedNetworks() - { - return $this->authorized_networks; - } - - /** - * The list of external networks that are allowed to connect to the instance - * using the IP. In 'CIDR' notation, also known as 'slash' notation (for - * example: `157.197.200.0/24`). - * - * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; - * @param array<\Google\Cloud\Sql\V1\AclEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuthorizedNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\AclEntry::class); - $this->authorized_networks = $arr; - - return $this; - } - - /** - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the instance ip - * will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * `[a-z]([-a-z0-9]*[a-z0-9])?.` - * - * Generated from protobuf field string allocated_ip_range = 6; - * @return string - */ - public function getAllocatedIpRange() - { - return $this->allocated_ip_range; - } - - /** - * The name of the allocated ip range for the private ip Cloud SQL instance. - * For example: "google-managed-services-default". If set, the instance ip - * will be created in the allocated range. The range name must comply with - * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name - * must be 1-63 characters long and match the regular expression - * `[a-z]([-a-z0-9]*[a-z0-9])?.` - * - * Generated from protobuf field string allocated_ip_range = 6; - * @param string $var - * @return $this - */ - public function setAllocatedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->allocated_ip_range = $var; - - return $this; - } - - /** - * Controls connectivity to private IP instances from Google services, - * such as BigQuery. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnablePrivatePathForGoogleCloudServices() - { - return $this->enable_private_path_for_google_cloud_services; - } - - public function hasEnablePrivatePathForGoogleCloudServices() - { - return isset($this->enable_private_path_for_google_cloud_services); - } - - public function clearEnablePrivatePathForGoogleCloudServices() - { - unset($this->enable_private_path_for_google_cloud_services); - } - - /** - * Returns the unboxed value from getEnablePrivatePathForGoogleCloudServices() - - * Controls connectivity to private IP instances from Google services, - * such as BigQuery. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; - * @return bool|null - */ - public function getEnablePrivatePathForGoogleCloudServicesUnwrapped() - { - return $this->readWrapperValue("enable_private_path_for_google_cloud_services"); - } - - /** - * Controls connectivity to private IP instances from Google services, - * such as BigQuery. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnablePrivatePathForGoogleCloudServices($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enable_private_path_for_google_cloud_services = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Controls connectivity to private IP instances from Google services, - * such as BigQuery. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; - * @param bool|null $var - * @return $this - */ - public function setEnablePrivatePathForGoogleCloudServicesUnwrapped($var) - { - $this->writeWrapperValue("enable_private_path_for_google_cloud_services", $var); - return $this;} - - /** - * Specify how SSL/TLS is enforced in database connections. If you must use - * the `require_ssl` flag for backward compatibility, then only the following - * value pairs are valid: - * For PostgreSQL and MySQL: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` - * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` - * For SQL Server: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` - * The value of `ssl_mode` has priority over the value of `require_ssl`. - * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and - * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL - * connections, while `require_ssl=false` means accept both non-SSL - * and SSL connections. In this case, MySQL and PostgreSQL databases respect - * `ssl_mode` and accepts only SSL connections. - * - * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; - * @return int - */ - public function getSslMode() - { - return $this->ssl_mode; - } - - /** - * Specify how SSL/TLS is enforced in database connections. If you must use - * the `require_ssl` flag for backward compatibility, then only the following - * value pairs are valid: - * For PostgreSQL and MySQL: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` - * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` - * For SQL Server: - * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` - * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` - * The value of `ssl_mode` has priority over the value of `require_ssl`. - * For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and - * `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL - * connections, while `require_ssl=false` means accept both non-SSL - * and SSL connections. In this case, MySQL and PostgreSQL databases respect - * `ssl_mode` and accepts only SSL connections. - * - * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; - * @param int $var - * @return $this - */ - public function setSslMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\IpConfiguration\SslMode::class); - $this->ssl_mode = $var; - - return $this; - } - - /** - * PSC settings for this instance. - * - * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; - * @return \Google\Cloud\Sql\V1\PscConfig|null - */ - public function getPscConfig() - { - return $this->psc_config; - } - - public function hasPscConfig() - { - return isset($this->psc_config); - } - - public function clearPscConfig() - { - unset($this->psc_config); - } - - /** - * PSC settings for this instance. - * - * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; - * @param \Google\Cloud\Sql\V1\PscConfig $var - * @return $this - */ - public function setPscConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PscConfig::class); - $this->psc_config = $var; - - return $this; - } - - /** - * Specify what type of CA is used for the server certificate. - * - * Generated from protobuf field optional .google.cloud.sql.v1.IpConfiguration.CaMode server_ca_mode = 10; - * @return int - */ - public function getServerCaMode() - { - return isset($this->server_ca_mode) ? $this->server_ca_mode : 0; - } - - public function hasServerCaMode() - { - return isset($this->server_ca_mode); - } - - public function clearServerCaMode() - { - unset($this->server_ca_mode); - } - - /** - * Specify what type of CA is used for the server certificate. - * - * Generated from protobuf field optional .google.cloud.sql.v1.IpConfiguration.CaMode server_ca_mode = 10; - * @param int $var - * @return $this - */ - public function setServerCaMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\IpConfiguration\CaMode::class); - $this->server_ca_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php deleted file mode 100644 index bb757881488d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/CaMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.sql.v1.IpConfiguration.CaMode - */ -class CaMode -{ - /** - * CA mode is unknown. - * - * Generated from protobuf enum CA_MODE_UNSPECIFIED = 0; - */ - const CA_MODE_UNSPECIFIED = 0; - /** - * Google-managed self-signed internal CA. - * - * Generated from protobuf enum GOOGLE_MANAGED_INTERNAL_CA = 1; - */ - const GOOGLE_MANAGED_INTERNAL_CA = 1; - /** - * Google-managed regional CA part of root CA hierarchy hosted on Google - * Cloud's Certificate Authority Service (CAS). - * - * Generated from protobuf enum GOOGLE_MANAGED_CAS_CA = 2; - */ - const GOOGLE_MANAGED_CAS_CA = 2; - - private static $valueToName = [ - self::CA_MODE_UNSPECIFIED => 'CA_MODE_UNSPECIFIED', - self::GOOGLE_MANAGED_INTERNAL_CA => 'GOOGLE_MANAGED_INTERNAL_CA', - self::GOOGLE_MANAGED_CAS_CA => 'GOOGLE_MANAGED_CAS_CA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CaMode::class, \Google\Cloud\Sql\V1\IpConfiguration_CaMode::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php deleted file mode 100644 index 05fac4f5a6c6..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.sql.v1.IpConfiguration.SslMode - */ -class SslMode -{ - /** - * The SSL mode is unknown. - * - * Generated from protobuf enum SSL_MODE_UNSPECIFIED = 0; - */ - const SSL_MODE_UNSPECIFIED = 0; - /** - * Allow non-SSL/non-TLS and SSL/TLS connections. - * For SSL connections to MySQL and PostgreSQL, the client certificate - * isn't verified. - * When this value is used, the legacy `require_ssl` flag must be false or - * cleared to avoid a conflict between the values of the two flags. - * - * Generated from protobuf enum ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; - */ - const ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; - /** - * Only allow connections encrypted with SSL/TLS. - * For SSL connections to MySQL and PostgreSQL, the client certificate - * isn't verified. - * When this value is used, the legacy `require_ssl` flag must be false or - * cleared to avoid a conflict between the values of the two flags. - * - * Generated from protobuf enum ENCRYPTED_ONLY = 2; - */ - const ENCRYPTED_ONLY = 2; - /** - * Only allow connections encrypted with SSL/TLS and with valid - * client certificates. - * When this value is used, the legacy `require_ssl` flag must be true or - * cleared to avoid the conflict between values of two flags. - * PostgreSQL clients or users that connect using IAM database - * authentication must use either the - * [Cloud SQL Auth - * Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or - * [Cloud SQL - * Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) - * to enforce client identity verification. - * Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server. - * - * Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; - */ - const TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; - - private static $valueToName = [ - self::SSL_MODE_UNSPECIFIED => 'SSL_MODE_UNSPECIFIED', - self::ALLOW_UNENCRYPTED_AND_ENCRYPTED => 'ALLOW_UNENCRYPTED_AND_ENCRYPTED', - self::ENCRYPTED_ONLY => 'ENCRYPTED_ONLY', - self::TRUSTED_CLIENT_CERTIFICATE_REQUIRED => 'TRUSTED_CLIENT_CERTIFICATE_REQUIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SslMode::class, \Google\Cloud\Sql\V1\IpConfiguration_SslMode::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php deleted file mode 100644 index c4b273578314..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.sql.v1.IpMapping - */ -class IpMapping extends \Google\Protobuf\Internal\Message -{ - /** - * The type of this IP address. A `PRIMARY` address is a public address that - * can accept incoming connections. A `PRIVATE` address is a private address - * that can accept incoming connections. An `OUTGOING` address is the source - * address of connections originating from the instance, if supported. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; - */ - protected $type = 0; - /** - * The IP address assigned. - * - * Generated from protobuf field string ip_address = 2; - */ - protected $ip_address = ''; - /** - * The due time for this IP to be retired in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. This field is only available when - * the IP is scheduled to be retired. - * - * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; - */ - protected $time_to_retire = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of this IP address. A `PRIMARY` address is a public address that - * can accept incoming connections. A `PRIVATE` address is a private address - * that can accept incoming connections. An `OUTGOING` address is the source - * address of connections originating from the instance, if supported. - * @type string $ip_address - * The IP address assigned. - * @type \Google\Protobuf\Timestamp $time_to_retire - * The due time for this IP to be retired in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. This field is only available when - * the IP is scheduled to be retired. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The type of this IP address. A `PRIMARY` address is a public address that - * can accept incoming connections. A `PRIVATE` address is a private address - * that can accept incoming connections. An `OUTGOING` address is the source - * address of connections originating from the instance, if supported. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this IP address. A `PRIMARY` address is a public address that - * can accept incoming connections. A `PRIVATE` address is a private address - * that can accept incoming connections. An `OUTGOING` address is the source - * address of connections originating from the instance, if supported. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlIpAddressType::class); - $this->type = $var; - - return $this; - } - - /** - * The IP address assigned. - * - * Generated from protobuf field string ip_address = 2; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The IP address assigned. - * - * Generated from protobuf field string ip_address = 2; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * The due time for this IP to be retired in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. This field is only available when - * the IP is scheduled to be retired. - * - * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeToRetire() - { - return $this->time_to_retire; - } - - public function hasTimeToRetire() - { - return isset($this->time_to_retire); - } - - public function clearTimeToRetire() - { - unset($this->time_to_retire); - } - - /** - * The due time for this IP to be retired in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. This field is only available when - * the IP is scheduled to be retired. - * - * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeToRetire($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_to_retire = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php deleted file mode 100644 index d7c676367daa..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.sql.v1.LocationPreference - */ -class LocationPreference extends \Google\Protobuf\Internal\Message -{ - /** - * The App Engine application to follow, it must be in the same region as the - * Cloud SQL instance. WARNING: Changing this might restart the instance. - * - * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; - * @deprecated - */ - protected $follow_gae_application = ''; - /** - * The preferred Compute Engine zone (for example: us-central1-a, - * us-central1-b, etc.). WARNING: Changing this might restart the instance. - * - * Generated from protobuf field string zone = 2; - */ - protected $zone = ''; - /** - * The preferred Compute Engine zone for the secondary/failover - * (for example: us-central1-a, us-central1-b, etc.). - * To disable this field, set it to 'no_secondary_zone'. - * - * Generated from protobuf field string secondary_zone = 4; - */ - protected $secondary_zone = ''; - /** - * This is always `sql#locationPreference`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $follow_gae_application - * The App Engine application to follow, it must be in the same region as the - * Cloud SQL instance. WARNING: Changing this might restart the instance. - * @type string $zone - * The preferred Compute Engine zone (for example: us-central1-a, - * us-central1-b, etc.). WARNING: Changing this might restart the instance. - * @type string $secondary_zone - * The preferred Compute Engine zone for the secondary/failover - * (for example: us-central1-a, us-central1-b, etc.). - * To disable this field, set it to 'no_secondary_zone'. - * @type string $kind - * This is always `sql#locationPreference`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The App Engine application to follow, it must be in the same region as the - * Cloud SQL instance. WARNING: Changing this might restart the instance. - * - * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getFollowGaeApplication() - { - @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); - return $this->follow_gae_application; - } - - /** - * The App Engine application to follow, it must be in the same region as the - * Cloud SQL instance. WARNING: Changing this might restart the instance. - * - * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setFollowGaeApplication($var) - { - @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->follow_gae_application = $var; - - return $this; - } - - /** - * The preferred Compute Engine zone (for example: us-central1-a, - * us-central1-b, etc.). WARNING: Changing this might restart the instance. - * - * Generated from protobuf field string zone = 2; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The preferred Compute Engine zone (for example: us-central1-a, - * us-central1-b, etc.). WARNING: Changing this might restart the instance. - * - * Generated from protobuf field string zone = 2; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The preferred Compute Engine zone for the secondary/failover - * (for example: us-central1-a, us-central1-b, etc.). - * To disable this field, set it to 'no_secondary_zone'. - * - * Generated from protobuf field string secondary_zone = 4; - * @return string - */ - public function getSecondaryZone() - { - return $this->secondary_zone; - } - - /** - * The preferred Compute Engine zone for the secondary/failover - * (for example: us-central1-a, us-central1-b, etc.). - * To disable this field, set it to 'no_secondary_zone'. - * - * Generated from protobuf field string secondary_zone = 4; - * @param string $var - * @return $this - */ - public function setSecondaryZone($var) - { - GPBUtil::checkString($var, True); - $this->secondary_zone = $var; - - return $this; - } - - /** - * This is always `sql#locationPreference`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#locationPreference`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php deleted file mode 100644 index 5ca180bd001b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.sql.v1.MaintenanceWindow - */ -class MaintenanceWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Hour of day - 0 to 23. Specify in the UTC time zone. - * - * Generated from protobuf field .google.protobuf.Int32Value hour = 1; - */ - protected $hour = null; - /** - * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. - * Returned in output as an integer, 1 to 7, where `1` equals Monday. - * - * Generated from protobuf field .google.protobuf.Int32Value day = 2; - */ - protected $day = null; - /** - * Maintenance timing settings: `canary`, `stable`, or `week5`. - * For more information, see [About maintenance on Cloud SQL - * instances](https://cloud.google.com/sql/docs/mysql/maintenance). - * - * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; - */ - protected $update_track = 0; - /** - * This is always `sql#maintenanceWindow`. - * - * Generated from protobuf field string kind = 4; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int32Value $hour - * Hour of day - 0 to 23. Specify in the UTC time zone. - * @type \Google\Protobuf\Int32Value $day - * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. - * Returned in output as an integer, 1 to 7, where `1` equals Monday. - * @type int $update_track - * Maintenance timing settings: `canary`, `stable`, or `week5`. - * For more information, see [About maintenance on Cloud SQL - * instances](https://cloud.google.com/sql/docs/mysql/maintenance). - * @type string $kind - * This is always `sql#maintenanceWindow`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Hour of day - 0 to 23. Specify in the UTC time zone. - * - * Generated from protobuf field .google.protobuf.Int32Value hour = 1; - * @return \Google\Protobuf\Int32Value|null - */ - public function getHour() - { - return $this->hour; - } - - public function hasHour() - { - return isset($this->hour); - } - - public function clearHour() - { - unset($this->hour); - } - - /** - * Returns the unboxed value from getHour() - - * Hour of day - 0 to 23. Specify in the UTC time zone. - * - * Generated from protobuf field .google.protobuf.Int32Value hour = 1; - * @return int|null - */ - public function getHourUnwrapped() - { - return $this->readWrapperValue("hour"); - } - - /** - * Hour of day - 0 to 23. Specify in the UTC time zone. - * - * Generated from protobuf field .google.protobuf.Int32Value hour = 1; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setHour($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->hour = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Hour of day - 0 to 23. Specify in the UTC time zone. - * - * Generated from protobuf field .google.protobuf.Int32Value hour = 1; - * @param int|null $var - * @return $this - */ - public function setHourUnwrapped($var) - { - $this->writeWrapperValue("hour", $var); - return $this;} - - /** - * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. - * Returned in output as an integer, 1 to 7, where `1` equals Monday. - * - * Generated from protobuf field .google.protobuf.Int32Value day = 2; - * @return \Google\Protobuf\Int32Value|null - */ - public function getDay() - { - return $this->day; - } - - public function hasDay() - { - return isset($this->day); - } - - public function clearDay() - { - unset($this->day); - } - - /** - * Returns the unboxed value from getDay() - - * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. - * Returned in output as an integer, 1 to 7, where `1` equals Monday. - * - * Generated from protobuf field .google.protobuf.Int32Value day = 2; - * @return int|null - */ - public function getDayUnwrapped() - { - return $this->readWrapperValue("day"); - } - - /** - * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. - * Returned in output as an integer, 1 to 7, where `1` equals Monday. - * - * Generated from protobuf field .google.protobuf.Int32Value day = 2; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->day = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, - * `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. - * Returned in output as an integer, 1 to 7, where `1` equals Monday. - * - * Generated from protobuf field .google.protobuf.Int32Value day = 2; - * @param int|null $var - * @return $this - */ - public function setDayUnwrapped($var) - { - $this->writeWrapperValue("day", $var); - return $this;} - - /** - * Maintenance timing settings: `canary`, `stable`, or `week5`. - * For more information, see [About maintenance on Cloud SQL - * instances](https://cloud.google.com/sql/docs/mysql/maintenance). - * - * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; - * @return int - */ - public function getUpdateTrack() - { - return $this->update_track; - } - - /** - * Maintenance timing settings: `canary`, `stable`, or `week5`. - * For more information, see [About maintenance on Cloud SQL - * instances](https://cloud.google.com/sql/docs/mysql/maintenance). - * - * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; - * @param int $var - * @return $this - */ - public function setUpdateTrack($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlUpdateTrack::class); - $this->update_track = $var; - - return $this; - } - - /** - * This is always `sql#maintenanceWindow`. - * - * Generated from protobuf field string kind = 4; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#maintenanceWindow`. - * - * Generated from protobuf field string kind = 4; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php deleted file mode 100644 index f341b4701919..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php +++ /dev/null @@ -1,548 +0,0 @@ -google.cloud.sql.v1.MySqlReplicaConfiguration - */ -class MySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * Path to a SQL dump file in Google Cloud Storage from which the replica - * instance is to be created. The URI is in the form gs://bucketName/fileName. - * Compressed gzip files (.gz) are also supported. - * Dumps have the binlog co-ordinates from which replication - * begins. This can be accomplished by setting --master-data to 1 when using - * mysqldump. - * - * Generated from protobuf field string dump_file_path = 1; - */ - protected $dump_file_path = ''; - /** - * The username for the replication connection. - * - * Generated from protobuf field string username = 2; - */ - protected $username = ''; - /** - * The password for the replication connection. - * - * Generated from protobuf field string password = 3; - */ - protected $password = ''; - /** - * Seconds to wait between connect retries. MySQL's default is 60 seconds. - * - * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; - */ - protected $connect_retry_interval = null; - /** - * Interval in milliseconds between replication heartbeats. - * - * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; - */ - protected $master_heartbeat_period = null; - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 6; - */ - protected $ca_certificate = ''; - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 7; - */ - protected $client_certificate = ''; - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * - * Generated from protobuf field string client_key = 8; - */ - protected $client_key = ''; - /** - * A list of permissible ciphers to use for SSL encryption. - * - * Generated from protobuf field string ssl_cipher = 9; - */ - protected $ssl_cipher = ''; - /** - * Whether or not to check the primary instance's Common Name value in the - * certificate that it sends during the SSL handshake. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; - */ - protected $verify_server_certificate = null; - /** - * This is always `sql#mysqlReplicaConfiguration`. - * - * Generated from protobuf field string kind = 11; - */ - protected $kind = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dump_file_path - * Path to a SQL dump file in Google Cloud Storage from which the replica - * instance is to be created. The URI is in the form gs://bucketName/fileName. - * Compressed gzip files (.gz) are also supported. - * Dumps have the binlog co-ordinates from which replication - * begins. This can be accomplished by setting --master-data to 1 when using - * mysqldump. - * @type string $username - * The username for the replication connection. - * @type string $password - * The password for the replication connection. - * @type \Google\Protobuf\Int32Value $connect_retry_interval - * Seconds to wait between connect retries. MySQL's default is 60 seconds. - * @type \Google\Protobuf\Int64Value $master_heartbeat_period - * Interval in milliseconds between replication heartbeats. - * @type string $ca_certificate - * PEM representation of the trusted CA's x509 certificate. - * @type string $client_certificate - * PEM representation of the replica's x509 certificate. - * @type string $client_key - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * @type string $ssl_cipher - * A list of permissible ciphers to use for SSL encryption. - * @type \Google\Protobuf\BoolValue $verify_server_certificate - * Whether or not to check the primary instance's Common Name value in the - * certificate that it sends during the SSL handshake. - * @type string $kind - * This is always `sql#mysqlReplicaConfiguration`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Path to a SQL dump file in Google Cloud Storage from which the replica - * instance is to be created. The URI is in the form gs://bucketName/fileName. - * Compressed gzip files (.gz) are also supported. - * Dumps have the binlog co-ordinates from which replication - * begins. This can be accomplished by setting --master-data to 1 when using - * mysqldump. - * - * Generated from protobuf field string dump_file_path = 1; - * @return string - */ - public function getDumpFilePath() - { - return $this->dump_file_path; - } - - /** - * Path to a SQL dump file in Google Cloud Storage from which the replica - * instance is to be created. The URI is in the form gs://bucketName/fileName. - * Compressed gzip files (.gz) are also supported. - * Dumps have the binlog co-ordinates from which replication - * begins. This can be accomplished by setting --master-data to 1 when using - * mysqldump. - * - * Generated from protobuf field string dump_file_path = 1; - * @param string $var - * @return $this - */ - public function setDumpFilePath($var) - { - GPBUtil::checkString($var, True); - $this->dump_file_path = $var; - - return $this; - } - - /** - * The username for the replication connection. - * - * Generated from protobuf field string username = 2; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The username for the replication connection. - * - * Generated from protobuf field string username = 2; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The password for the replication connection. - * - * Generated from protobuf field string password = 3; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * The password for the replication connection. - * - * Generated from protobuf field string password = 3; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Seconds to wait between connect retries. MySQL's default is 60 seconds. - * - * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; - * @return \Google\Protobuf\Int32Value|null - */ - public function getConnectRetryInterval() - { - return $this->connect_retry_interval; - } - - public function hasConnectRetryInterval() - { - return isset($this->connect_retry_interval); - } - - public function clearConnectRetryInterval() - { - unset($this->connect_retry_interval); - } - - /** - * Returns the unboxed value from getConnectRetryInterval() - - * Seconds to wait between connect retries. MySQL's default is 60 seconds. - * - * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; - * @return int|null - */ - public function getConnectRetryIntervalUnwrapped() - { - return $this->readWrapperValue("connect_retry_interval"); - } - - /** - * Seconds to wait between connect retries. MySQL's default is 60 seconds. - * - * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setConnectRetryInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->connect_retry_interval = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Seconds to wait between connect retries. MySQL's default is 60 seconds. - * - * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; - * @param int|null $var - * @return $this - */ - public function setConnectRetryIntervalUnwrapped($var) - { - $this->writeWrapperValue("connect_retry_interval", $var); - return $this;} - - /** - * Interval in milliseconds between replication heartbeats. - * - * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; - * @return \Google\Protobuf\Int64Value|null - */ - public function getMasterHeartbeatPeriod() - { - return $this->master_heartbeat_period; - } - - public function hasMasterHeartbeatPeriod() - { - return isset($this->master_heartbeat_period); - } - - public function clearMasterHeartbeatPeriod() - { - unset($this->master_heartbeat_period); - } - - /** - * Returns the unboxed value from getMasterHeartbeatPeriod() - - * Interval in milliseconds between replication heartbeats. - * - * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; - * @return int|string|null - */ - public function getMasterHeartbeatPeriodUnwrapped() - { - return $this->readWrapperValue("master_heartbeat_period"); - } - - /** - * Interval in milliseconds between replication heartbeats. - * - * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setMasterHeartbeatPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->master_heartbeat_period = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Interval in milliseconds between replication heartbeats. - * - * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; - * @param int|string|null $var - * @return $this - */ - public function setMasterHeartbeatPeriodUnwrapped($var) - { - $this->writeWrapperValue("master_heartbeat_period", $var); - return $this;} - - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 6; - * @return string - */ - public function getCaCertificate() - { - return $this->ca_certificate; - } - - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 6; - * @param string $var - * @return $this - */ - public function setCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->ca_certificate = $var; - - return $this; - } - - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 7; - * @return string - */ - public function getClientCertificate() - { - return $this->client_certificate; - } - - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 7; - * @param string $var - * @return $this - */ - public function setClientCertificate($var) - { - GPBUtil::checkString($var, True); - $this->client_certificate = $var; - - return $this; - } - - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * - * Generated from protobuf field string client_key = 8; - * @return string - */ - public function getClientKey() - { - return $this->client_key; - } - - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * - * Generated from protobuf field string client_key = 8; - * @param string $var - * @return $this - */ - public function setClientKey($var) - { - GPBUtil::checkString($var, True); - $this->client_key = $var; - - return $this; - } - - /** - * A list of permissible ciphers to use for SSL encryption. - * - * Generated from protobuf field string ssl_cipher = 9; - * @return string - */ - public function getSslCipher() - { - return $this->ssl_cipher; - } - - /** - * A list of permissible ciphers to use for SSL encryption. - * - * Generated from protobuf field string ssl_cipher = 9; - * @param string $var - * @return $this - */ - public function setSslCipher($var) - { - GPBUtil::checkString($var, True); - $this->ssl_cipher = $var; - - return $this; - } - - /** - * Whether or not to check the primary instance's Common Name value in the - * certificate that it sends during the SSL handshake. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; - * @return \Google\Protobuf\BoolValue|null - */ - public function getVerifyServerCertificate() - { - return $this->verify_server_certificate; - } - - public function hasVerifyServerCertificate() - { - return isset($this->verify_server_certificate); - } - - public function clearVerifyServerCertificate() - { - unset($this->verify_server_certificate); - } - - /** - * Returns the unboxed value from getVerifyServerCertificate() - - * Whether or not to check the primary instance's Common Name value in the - * certificate that it sends during the SSL handshake. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; - * @return bool|null - */ - public function getVerifyServerCertificateUnwrapped() - { - return $this->readWrapperValue("verify_server_certificate"); - } - - /** - * Whether or not to check the primary instance's Common Name value in the - * certificate that it sends during the SSL handshake. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setVerifyServerCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->verify_server_certificate = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not to check the primary instance's Common Name value in the - * certificate that it sends during the SSL handshake. - * - * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; - * @param bool|null $var - * @return $this - */ - public function setVerifyServerCertificateUnwrapped($var) - { - $this->writeWrapperValue("verify_server_certificate", $var); - return $this;} - - /** - * This is always `sql#mysqlReplicaConfiguration`. - * - * Generated from protobuf field string kind = 11; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#mysqlReplicaConfiguration`. - * - * Generated from protobuf field string kind = 11; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php deleted file mode 100644 index bc03053dd3ac..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.MySqlSyncConfig - */ -class MySqlSyncConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Flags to use for the initial dump. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; - */ - private $initial_sync_flags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Sql\V1\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $initial_sync_flags - * Flags to use for the initial dump. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Flags to use for the initial dump. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInitialSyncFlags() - { - return $this->initial_sync_flags; - } - - /** - * Flags to use for the initial dump. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; - * @param array<\Google\Cloud\Sql\V1\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInitialSyncFlags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SyncFlags::class); - $this->initial_sync_flags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php deleted file mode 100644 index 23b8294b885a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.sql.v1.OnPremisesConfiguration - */ -class OnPremisesConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * The host and port of the on-premises instance in host:port format - * - * Generated from protobuf field string host_port = 1; - */ - protected $host_port = ''; - /** - * This is always `sql#onPremisesConfiguration`. - * - * Generated from protobuf field string kind = 2; - */ - protected $kind = ''; - /** - * The username for connecting to on-premises instance. - * - * Generated from protobuf field string username = 3; - */ - protected $username = ''; - /** - * The password for connecting to on-premises instance. - * - * Generated from protobuf field string password = 4; - */ - protected $password = ''; - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 5; - */ - protected $ca_certificate = ''; - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 6; - */ - protected $client_certificate = ''; - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * - * Generated from protobuf field string client_key = 7; - */ - protected $client_key = ''; - /** - * The dump file to create the Cloud SQL replica. - * - * Generated from protobuf field string dump_file_path = 8; - */ - protected $dump_file_path = ''; - /** - * The reference to Cloud SQL instance if the source is Cloud SQL. - * - * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; - */ - protected $source_instance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host_port - * The host and port of the on-premises instance in host:port format - * @type string $kind - * This is always `sql#onPremisesConfiguration`. - * @type string $username - * The username for connecting to on-premises instance. - * @type string $password - * The password for connecting to on-premises instance. - * @type string $ca_certificate - * PEM representation of the trusted CA's x509 certificate. - * @type string $client_certificate - * PEM representation of the replica's x509 certificate. - * @type string $client_key - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * @type string $dump_file_path - * The dump file to create the Cloud SQL replica. - * @type \Google\Cloud\Sql\V1\InstanceReference $source_instance - * The reference to Cloud SQL instance if the source is Cloud SQL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The host and port of the on-premises instance in host:port format - * - * Generated from protobuf field string host_port = 1; - * @return string - */ - public function getHostPort() - { - return $this->host_port; - } - - /** - * The host and port of the on-premises instance in host:port format - * - * Generated from protobuf field string host_port = 1; - * @param string $var - * @return $this - */ - public function setHostPort($var) - { - GPBUtil::checkString($var, True); - $this->host_port = $var; - - return $this; - } - - /** - * This is always `sql#onPremisesConfiguration`. - * - * Generated from protobuf field string kind = 2; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#onPremisesConfiguration`. - * - * Generated from protobuf field string kind = 2; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The username for connecting to on-premises instance. - * - * Generated from protobuf field string username = 3; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The username for connecting to on-premises instance. - * - * Generated from protobuf field string username = 3; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The password for connecting to on-premises instance. - * - * Generated from protobuf field string password = 4; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * The password for connecting to on-premises instance. - * - * Generated from protobuf field string password = 4; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 5; - * @return string - */ - public function getCaCertificate() - { - return $this->ca_certificate; - } - - /** - * PEM representation of the trusted CA's x509 certificate. - * - * Generated from protobuf field string ca_certificate = 5; - * @param string $var - * @return $this - */ - public function setCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->ca_certificate = $var; - - return $this; - } - - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 6; - * @return string - */ - public function getClientCertificate() - { - return $this->client_certificate; - } - - /** - * PEM representation of the replica's x509 certificate. - * - * Generated from protobuf field string client_certificate = 6; - * @param string $var - * @return $this - */ - public function setClientCertificate($var) - { - GPBUtil::checkString($var, True); - $this->client_certificate = $var; - - return $this; - } - - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * - * Generated from protobuf field string client_key = 7; - * @return string - */ - public function getClientKey() - { - return $this->client_key; - } - - /** - * PEM representation of the replica's private key. The corresponsing public - * key is encoded in the client's certificate. - * - * Generated from protobuf field string client_key = 7; - * @param string $var - * @return $this - */ - public function setClientKey($var) - { - GPBUtil::checkString($var, True); - $this->client_key = $var; - - return $this; - } - - /** - * The dump file to create the Cloud SQL replica. - * - * Generated from protobuf field string dump_file_path = 8; - * @return string - */ - public function getDumpFilePath() - { - return $this->dump_file_path; - } - - /** - * The dump file to create the Cloud SQL replica. - * - * Generated from protobuf field string dump_file_path = 8; - * @param string $var - * @return $this - */ - public function setDumpFilePath($var) - { - GPBUtil::checkString($var, True); - $this->dump_file_path = $var; - - return $this; - } - - /** - * The reference to Cloud SQL instance if the source is Cloud SQL. - * - * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; - * @return \Google\Cloud\Sql\V1\InstanceReference|null - */ - public function getSourceInstance() - { - return $this->source_instance; - } - - public function hasSourceInstance() - { - return isset($this->source_instance); - } - - public function clearSourceInstance() - { - unset($this->source_instance); - } - - /** - * The reference to Cloud SQL instance if the source is Cloud SQL. - * - * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; - * @param \Google\Cloud\Sql\V1\InstanceReference $var - * @return $this - */ - public function setSourceInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstanceReference::class); - $this->source_instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php deleted file mode 100644 index ed7f1506f616..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php +++ /dev/null @@ -1,814 +0,0 @@ -google.cloud.sql.v1.Operation - */ -class Operation extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#operation`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Generated from protobuf field string target_link = 2; - */ - protected $target_link = ''; - /** - * The status of an operation. - * - * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; - */ - protected $status = 0; - /** - * The email address of the user who initiated this operation. - * - * Generated from protobuf field string user = 4; - */ - protected $user = ''; - /** - * The time this operation was enqueued in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; - */ - protected $insert_time = null; - /** - * The time this operation actually started in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - */ - protected $start_time = null; - /** - * The time this operation finished in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - */ - protected $end_time = null; - /** - * If errors occurred during processing of this operation, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; - */ - protected $error = null; - /** - * An Admin API warning message. - * - * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; - */ - protected $api_warning = null; - /** - * The type of the operation. Valid values are: - * * `CREATE` - * * `DELETE` - * * `UPDATE` - * * `RESTART` - * * `IMPORT` - * * `EXPORT` - * * `BACKUP_VOLUME` - * * `RESTORE_VOLUME` - * * `CREATE_USER` - * * `DELETE_USER` - * * `CREATE_DATABASE` - * * `DELETE_DATABASE` - * - * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; - */ - protected $operation_type = 0; - /** - * The context for import operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; - */ - protected $import_context = null; - /** - * The context for export operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; - */ - protected $export_context = null; - /** - * The context for backup operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; - */ - protected $backup_context = null; - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - * - * Generated from protobuf field string name = 12; - */ - protected $name = ''; - /** - * Name of the database instance related to this operation. - * - * Generated from protobuf field string target_id = 13; - */ - protected $target_id = ''; - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 14; - */ - protected $self_link = ''; - /** - * The project ID of the target instance related to this operation. - * - * Generated from protobuf field string target_project = 15; - */ - protected $target_project = ''; - /** - * The context for acquire SSRS lease operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; - */ - protected $acquire_ssrs_lease_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#operation`. - * @type string $target_link - * @type int $status - * The status of an operation. - * @type string $user - * The email address of the user who initiated this operation. - * @type \Google\Protobuf\Timestamp $insert_time - * The time this operation was enqueued in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation actually started in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation finished in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type \Google\Cloud\Sql\V1\OperationErrors $error - * If errors occurred during processing of this operation, this field will be - * populated. - * @type \Google\Cloud\Sql\V1\ApiWarning $api_warning - * An Admin API warning message. - * @type int $operation_type - * The type of the operation. Valid values are: - * * `CREATE` - * * `DELETE` - * * `UPDATE` - * * `RESTART` - * * `IMPORT` - * * `EXPORT` - * * `BACKUP_VOLUME` - * * `RESTORE_VOLUME` - * * `CREATE_USER` - * * `DELETE_USER` - * * `CREATE_DATABASE` - * * `DELETE_DATABASE` - * @type \Google\Cloud\Sql\V1\ImportContext $import_context - * The context for import operation, if applicable. - * @type \Google\Cloud\Sql\V1\ExportContext $export_context - * The context for export operation, if applicable. - * @type \Google\Cloud\Sql\V1\BackupContext $backup_context - * The context for backup operation, if applicable. - * @type string $name - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - * @type string $target_id - * Name of the database instance related to this operation. - * @type string $self_link - * The URI of this resource. - * @type string $target_project - * The project ID of the target instance related to this operation. - * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context - * The context for acquire SSRS lease operation, if applicable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#operation`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#operation`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Generated from protobuf field string target_link = 2; - * @return string - */ - public function getTargetLink() - { - return $this->target_link; - } - - /** - * Generated from protobuf field string target_link = 2; - * @param string $var - * @return $this - */ - public function setTargetLink($var) - { - GPBUtil::checkString($var, True); - $this->target_link = $var; - - return $this; - } - - /** - * The status of an operation. - * - * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * The status of an operation. - * - * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Operation\SqlOperationStatus::class); - $this->status = $var; - - return $this; - } - - /** - * The email address of the user who initiated this operation. - * - * Generated from protobuf field string user = 4; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * The email address of the user who initiated this operation. - * - * Generated from protobuf field string user = 4; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->user = $var; - - return $this; - } - - /** - * The time this operation was enqueued in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getInsertTime() - { - return $this->insert_time; - } - - public function hasInsertTime() - { - return isset($this->insert_time); - } - - public function clearInsertTime() - { - unset($this->insert_time); - } - - /** - * The time this operation was enqueued in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setInsertTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->insert_time = $var; - - return $this; - } - - /** - * The time this operation actually started in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - * @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 actually started in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; - * @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 finished in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - * @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 finished in UTC timezone in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * If errors occurred during processing of this operation, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; - * @return \Google\Cloud\Sql\V1\OperationErrors|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * If errors occurred during processing of this operation, this field will be - * populated. - * - * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; - * @param \Google\Cloud\Sql\V1\OperationErrors $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OperationErrors::class); - $this->error = $var; - - return $this; - } - - /** - * An Admin API warning message. - * - * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; - * @return \Google\Cloud\Sql\V1\ApiWarning|null - */ - public function getApiWarning() - { - return $this->api_warning; - } - - public function hasApiWarning() - { - return isset($this->api_warning); - } - - public function clearApiWarning() - { - unset($this->api_warning); - } - - /** - * An Admin API warning message. - * - * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; - * @param \Google\Cloud\Sql\V1\ApiWarning $var - * @return $this - */ - public function setApiWarning($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ApiWarning::class); - $this->api_warning = $var; - - return $this; - } - - /** - * The type of the operation. Valid values are: - * * `CREATE` - * * `DELETE` - * * `UPDATE` - * * `RESTART` - * * `IMPORT` - * * `EXPORT` - * * `BACKUP_VOLUME` - * * `RESTORE_VOLUME` - * * `CREATE_USER` - * * `DELETE_USER` - * * `CREATE_DATABASE` - * * `DELETE_DATABASE` - * - * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * The type of the operation. Valid values are: - * * `CREATE` - * * `DELETE` - * * `UPDATE` - * * `RESTART` - * * `IMPORT` - * * `EXPORT` - * * `BACKUP_VOLUME` - * * `RESTORE_VOLUME` - * * `CREATE_USER` - * * `DELETE_USER` - * * `CREATE_DATABASE` - * * `DELETE_DATABASE` - * - * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Operation\SqlOperationType::class); - $this->operation_type = $var; - - return $this; - } - - /** - * The context for import operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; - * @return \Google\Cloud\Sql\V1\ImportContext|null - */ - public function getImportContext() - { - return $this->import_context; - } - - public function hasImportContext() - { - return isset($this->import_context); - } - - public function clearImportContext() - { - unset($this->import_context); - } - - /** - * The context for import operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; - * @param \Google\Cloud\Sql\V1\ImportContext $var - * @return $this - */ - public function setImportContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext::class); - $this->import_context = $var; - - return $this; - } - - /** - * The context for export operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; - * @return \Google\Cloud\Sql\V1\ExportContext|null - */ - public function getExportContext() - { - return $this->export_context; - } - - public function hasExportContext() - { - return isset($this->export_context); - } - - public function clearExportContext() - { - unset($this->export_context); - } - - /** - * The context for export operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; - * @param \Google\Cloud\Sql\V1\ExportContext $var - * @return $this - */ - public function setExportContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext::class); - $this->export_context = $var; - - return $this; - } - - /** - * The context for backup operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; - * @return \Google\Cloud\Sql\V1\BackupContext|null - */ - public function getBackupContext() - { - return $this->backup_context; - } - - public function hasBackupContext() - { - return isset($this->backup_context); - } - - public function clearBackupContext() - { - unset($this->backup_context); - } - - /** - * The context for backup operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; - * @param \Google\Cloud\Sql\V1\BackupContext $var - * @return $this - */ - public function setBackupContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupContext::class); - $this->backup_context = $var; - - return $this; - } - - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - * - * Generated from protobuf field string name = 12; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * An identifier that uniquely identifies the operation. You can use this - * identifier to retrieve the Operations resource that has information about - * the operation. - * - * Generated from protobuf field string name = 12; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Name of the database instance related to this operation. - * - * Generated from protobuf field string target_id = 13; - * @return string - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * Name of the database instance related to this operation. - * - * Generated from protobuf field string target_id = 13; - * @param string $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkString($var, True); - $this->target_id = $var; - - return $this; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 14; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 14; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * The project ID of the target instance related to this operation. - * - * Generated from protobuf field string target_project = 15; - * @return string - */ - public function getTargetProject() - { - return $this->target_project; - } - - /** - * The project ID of the target instance related to this operation. - * - * Generated from protobuf field string target_project = 15; - * @param string $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkString($var, True); - $this->target_project = $var; - - return $this; - } - - /** - * The context for acquire SSRS lease operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; - * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null - */ - public function getAcquireSsrsLeaseContext() - { - return $this->acquire_ssrs_lease_context; - } - - public function hasAcquireSsrsLeaseContext() - { - return isset($this->acquire_ssrs_lease_context); - } - - public function clearAcquireSsrsLeaseContext() - { - unset($this->acquire_ssrs_lease_context); - } - - /** - * The context for acquire SSRS lease operation, if applicable. - * - * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; - * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var - * @return $this - */ - public function setAcquireSsrsLeaseContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); - $this->acquire_ssrs_lease_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php deleted file mode 100644 index 424ad5206f10..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.sql.v1.Operation.SqlOperationStatus - */ -class SqlOperationStatus -{ - /** - * The state of the operation is unknown. - * - * Generated from protobuf enum SQL_OPERATION_STATUS_UNSPECIFIED = 0; - */ - const SQL_OPERATION_STATUS_UNSPECIFIED = 0; - /** - * The operation has been queued, but has not started yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The operation is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The operation completed. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - - private static $valueToName = [ - self::SQL_OPERATION_STATUS_UNSPECIFIED => 'SQL_OPERATION_STATUS_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlOperationStatus::class, \Google\Cloud\Sql\V1\Operation_SqlOperationStatus::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php deleted file mode 100644 index aece4b0cb2a7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php +++ /dev/null @@ -1,379 +0,0 @@ -google.cloud.sql.v1.Operation.SqlOperationType - */ -class SqlOperationType -{ - /** - * Unknown operation type. - * - * Generated from protobuf enum SQL_OPERATION_TYPE_UNSPECIFIED = 0; - */ - const SQL_OPERATION_TYPE_UNSPECIFIED = 0; - /** - * Imports data into a Cloud SQL instance. - * - * Generated from protobuf enum IMPORT = 1; - */ - const IMPORT = 1; - /** - * Exports data from a Cloud SQL instance to a Cloud Storage - * bucket. - * - * Generated from protobuf enum EXPORT = 2; - */ - const EXPORT = 2; - /** - * Creates a new Cloud SQL instance. - * - * Generated from protobuf enum CREATE = 3; - */ - const CREATE = 3; - /** - * Updates the settings of a Cloud SQL instance. - * - * Generated from protobuf enum UPDATE = 4; - */ - const UPDATE = 4; - /** - * Deletes a Cloud SQL instance. - * - * Generated from protobuf enum DELETE = 5; - */ - const DELETE = 5; - /** - * Restarts the Cloud SQL instance. - * - * Generated from protobuf enum RESTART = 6; - */ - const RESTART = 6; - /** - * Generated from protobuf enum BACKUP = 7 [deprecated = true]; - */ - const BACKUP = 7; - /** - * Generated from protobuf enum SNAPSHOT = 8 [deprecated = true]; - */ - const SNAPSHOT = 8; - /** - * Performs instance backup. - * - * Generated from protobuf enum BACKUP_VOLUME = 9; - */ - const BACKUP_VOLUME = 9; - /** - * Deletes an instance backup. - * - * Generated from protobuf enum DELETE_VOLUME = 10; - */ - const DELETE_VOLUME = 10; - /** - * Restores an instance backup. - * - * Generated from protobuf enum RESTORE_VOLUME = 11; - */ - const RESTORE_VOLUME = 11; - /** - * Injects a privileged user in mysql for MOB instances. - * - * Generated from protobuf enum INJECT_USER = 12; - */ - const INJECT_USER = 12; - /** - * Clones a Cloud SQL instance. - * - * Generated from protobuf enum CLONE = 14; - */ - const PBCLONE = 14; - /** - * Stops replication on a Cloud SQL read replica instance. - * - * Generated from protobuf enum STOP_REPLICA = 15; - */ - const STOP_REPLICA = 15; - /** - * Starts replication on a Cloud SQL read replica instance. - * - * Generated from protobuf enum START_REPLICA = 16; - */ - const START_REPLICA = 16; - /** - * Promotes a Cloud SQL replica instance. - * - * Generated from protobuf enum PROMOTE_REPLICA = 17; - */ - const PROMOTE_REPLICA = 17; - /** - * Creates a Cloud SQL replica instance. - * - * Generated from protobuf enum CREATE_REPLICA = 18; - */ - const CREATE_REPLICA = 18; - /** - * Creates a new user in a Cloud SQL instance. - * - * Generated from protobuf enum CREATE_USER = 19; - */ - const CREATE_USER = 19; - /** - * Deletes a user from a Cloud SQL instance. - * - * Generated from protobuf enum DELETE_USER = 20; - */ - const DELETE_USER = 20; - /** - * Updates an existing user in a Cloud SQL instance. - * - * Generated from protobuf enum UPDATE_USER = 21; - */ - const UPDATE_USER = 21; - /** - * Creates a database in the Cloud SQL instance. - * - * Generated from protobuf enum CREATE_DATABASE = 22; - */ - const CREATE_DATABASE = 22; - /** - * Deletes a database in the Cloud SQL instance. - * - * Generated from protobuf enum DELETE_DATABASE = 23; - */ - const DELETE_DATABASE = 23; - /** - * Updates a database in the Cloud SQL instance. - * - * Generated from protobuf enum UPDATE_DATABASE = 24; - */ - const UPDATE_DATABASE = 24; - /** - * Performs failover of an HA-enabled Cloud SQL - * failover replica. - * - * Generated from protobuf enum FAILOVER = 25; - */ - const FAILOVER = 25; - /** - * Deletes the backup taken by a backup run. - * - * Generated from protobuf enum DELETE_BACKUP = 26; - */ - const DELETE_BACKUP = 26; - /** - * Generated from protobuf enum RECREATE_REPLICA = 27; - */ - const RECREATE_REPLICA = 27; - /** - * Truncates a general or slow log table in MySQL. - * - * Generated from protobuf enum TRUNCATE_LOG = 28; - */ - const TRUNCATE_LOG = 28; - /** - * Demotes the stand-alone instance to be a Cloud SQL - * read replica for an external database server. - * - * Generated from protobuf enum DEMOTE_MASTER = 29; - */ - const DEMOTE_MASTER = 29; - /** - * Indicates that the instance is currently in maintenance. Maintenance - * typically causes the instance to be unavailable for 1-3 minutes. - * - * Generated from protobuf enum MAINTENANCE = 30; - */ - const MAINTENANCE = 30; - /** - * This field is deprecated, and will be removed in future version of API. - * - * Generated from protobuf enum ENABLE_PRIVATE_IP = 31 [deprecated = true]; - */ - const ENABLE_PRIVATE_IP = 31; - /** - * Generated from protobuf enum DEFER_MAINTENANCE = 32 [deprecated = true]; - */ - const DEFER_MAINTENANCE = 32; - /** - * Creates clone instance. - * - * Generated from protobuf enum CREATE_CLONE = 33 [deprecated = true]; - */ - const CREATE_CLONE = 33; - /** - * Reschedule maintenance to another time. - * - * Generated from protobuf enum RESCHEDULE_MAINTENANCE = 34; - */ - const RESCHEDULE_MAINTENANCE = 34; - /** - * Starts external sync of a Cloud SQL EM replica to an external primary - * instance. - * - * Generated from protobuf enum START_EXTERNAL_SYNC = 35; - */ - const START_EXTERNAL_SYNC = 35; - /** - * Recovers logs from an instance's old data disk. - * - * Generated from protobuf enum LOG_CLEANUP = 36; - */ - const LOG_CLEANUP = 36; - /** - * Performs auto-restart of an HA-enabled Cloud SQL database for auto - * recovery. - * - * Generated from protobuf enum AUTO_RESTART = 37; - */ - const AUTO_RESTART = 37; - /** - * Re-encrypts CMEK instances with latest key version. - * - * Generated from protobuf enum REENCRYPT = 38; - */ - const REENCRYPT = 38; - /** - * Switches the roles of the primary and replica pair. The target instance - * should be the replica. - * - * Generated from protobuf enum SWITCHOVER = 39; - */ - const SWITCHOVER = 39; - /** - * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). - * - * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42; - */ - const ACQUIRE_SSRS_LEASE = 42; - /** - * Release a lease for the setup of SQL Server Reporting Services (SSRS). - * - * Generated from protobuf enum RELEASE_SSRS_LEASE = 43; - */ - const RELEASE_SSRS_LEASE = 43; - /** - * Reconfigures old primary after a promote replica operation. Effect of a - * promote operation to the old primary is executed in this operation, - * asynchronously from the promote replica operation executed to the - * replica. - * - * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44; - */ - const RECONFIGURE_OLD_PRIMARY = 44; - /** - * Indicates that the instance, its read replicas, and its cascading - * replicas are in maintenance. Maintenance typically gets initiated on - * groups of replicas first, followed by the primary instance. For each - * instance, maintenance typically causes the instance to be unavailable for - * 1-3 minutes. - * - * Generated from protobuf enum CLUSTER_MAINTENANCE = 45; - */ - const CLUSTER_MAINTENANCE = 45; - /** - * Indicates that the instance (and any of its replicas) are currently in - * maintenance. This is initiated as a self-service request by using SSM. - * Maintenance typically causes the instance to be unavailable for 1-3 - * minutes. - * - * Generated from protobuf enum SELF_SERVICE_MAINTENANCE = 46; - */ - const SELF_SERVICE_MAINTENANCE = 46; - /** - * Switches a primary instance to a replica. This operation runs as part of - * a switchover operation to the original primary instance. - * - * Generated from protobuf enum SWITCHOVER_TO_REPLICA = 47; - */ - const SWITCHOVER_TO_REPLICA = 47; - /** - * Updates the major version of a Cloud SQL instance. - * - * Generated from protobuf enum MAJOR_VERSION_UPGRADE = 48; - */ - const MAJOR_VERSION_UPGRADE = 48; - - private static $valueToName = [ - self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED', - self::IMPORT => 'IMPORT', - self::EXPORT => 'EXPORT', - self::CREATE => 'CREATE', - self::UPDATE => 'UPDATE', - self::DELETE => 'DELETE', - self::RESTART => 'RESTART', - self::BACKUP => 'BACKUP', - self::SNAPSHOT => 'SNAPSHOT', - self::BACKUP_VOLUME => 'BACKUP_VOLUME', - self::DELETE_VOLUME => 'DELETE_VOLUME', - self::RESTORE_VOLUME => 'RESTORE_VOLUME', - self::INJECT_USER => 'INJECT_USER', - self::PBCLONE => 'CLONE', - self::STOP_REPLICA => 'STOP_REPLICA', - self::START_REPLICA => 'START_REPLICA', - self::PROMOTE_REPLICA => 'PROMOTE_REPLICA', - self::CREATE_REPLICA => 'CREATE_REPLICA', - self::CREATE_USER => 'CREATE_USER', - self::DELETE_USER => 'DELETE_USER', - self::UPDATE_USER => 'UPDATE_USER', - self::CREATE_DATABASE => 'CREATE_DATABASE', - self::DELETE_DATABASE => 'DELETE_DATABASE', - self::UPDATE_DATABASE => 'UPDATE_DATABASE', - self::FAILOVER => 'FAILOVER', - self::DELETE_BACKUP => 'DELETE_BACKUP', - self::RECREATE_REPLICA => 'RECREATE_REPLICA', - self::TRUNCATE_LOG => 'TRUNCATE_LOG', - self::DEMOTE_MASTER => 'DEMOTE_MASTER', - self::MAINTENANCE => 'MAINTENANCE', - self::ENABLE_PRIVATE_IP => 'ENABLE_PRIVATE_IP', - self::DEFER_MAINTENANCE => 'DEFER_MAINTENANCE', - self::CREATE_CLONE => 'CREATE_CLONE', - self::RESCHEDULE_MAINTENANCE => 'RESCHEDULE_MAINTENANCE', - self::START_EXTERNAL_SYNC => 'START_EXTERNAL_SYNC', - self::LOG_CLEANUP => 'LOG_CLEANUP', - self::AUTO_RESTART => 'AUTO_RESTART', - self::REENCRYPT => 'REENCRYPT', - self::SWITCHOVER => 'SWITCHOVER', - self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE', - self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE', - self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY', - self::CLUSTER_MAINTENANCE => 'CLUSTER_MAINTENANCE', - self::SELF_SERVICE_MAINTENANCE => 'SELF_SERVICE_MAINTENANCE', - self::SWITCHOVER_TO_REPLICA => 'SWITCHOVER_TO_REPLICA', - self::MAJOR_VERSION_UPGRADE => 'MAJOR_VERSION_UPGRADE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlOperationType::class, \Google\Cloud\Sql\V1\Operation_SqlOperationType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php deleted file mode 100644 index 9983939c0bda..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.OperationError - */ -class OperationError extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#operationError`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Identifies the specific error that occurred. - * - * Generated from protobuf field string code = 2; - */ - protected $code = ''; - /** - * Additional information about the error encountered. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#operationError`. - * @type string $code - * Identifies the specific error that occurred. - * @type string $message - * Additional information about the error encountered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#operationError`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#operationError`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Identifies the specific error that occurred. - * - * Generated from protobuf field string code = 2; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Identifies the specific error that occurred. - * - * Generated from protobuf field string code = 2; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - - /** - * Additional information about the error encountered. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional information about the error encountered. - * - * 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; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php deleted file mode 100644 index 6e439bac00ad..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.OperationErrors - */ -class OperationErrors extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#operationErrors`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The list of errors encountered while processing this operation. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#operationErrors`. - * @type array<\Google\Cloud\Sql\V1\OperationError>|\Google\Protobuf\Internal\RepeatedField $errors - * The list of errors encountered while processing this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#operationErrors`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#operationErrors`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The list of errors encountered while processing this operation. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * The list of errors encountered while processing this operation. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; - * @param array<\Google\Cloud\Sql\V1\OperationError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\OperationError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php deleted file mode 100644 index cfa3c41fcd72..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.sql.v1.OperationsListResponse - */ -class OperationsListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#operationsList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of operation resources. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; - */ - private $items; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#operationsList`. - * @type array<\Google\Cloud\Sql\V1\Operation>|\Google\Protobuf\Internal\RepeatedField $items - * List of operation resources. - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#operationsList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#operationsList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of operation resources. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of operation resources. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; - * @param array<\Google\Cloud\Sql\V1\Operation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Operation::class); - $this->items = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php deleted file mode 100644 index 04e5de0765ce..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.sql.v1.PasswordStatus - */ -class PasswordStatus extends \Google\Protobuf\Internal\Message -{ - /** - * If true, user does not have login privileges. - * - * Generated from protobuf field bool locked = 1; - */ - protected $locked = false; - /** - * The expiration time of the current password. - * - * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; - */ - protected $password_expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $locked - * If true, user does not have login privileges. - * @type \Google\Protobuf\Timestamp $password_expiration_time - * The expiration time of the current password. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * If true, user does not have login privileges. - * - * Generated from protobuf field bool locked = 1; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * If true, user does not have login privileges. - * - * Generated from protobuf field bool locked = 1; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - - /** - * The expiration time of the current password. - * - * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPasswordExpirationTime() - { - return $this->password_expiration_time; - } - - public function hasPasswordExpirationTime() - { - return isset($this->password_expiration_time); - } - - public function clearPasswordExpirationTime() - { - unset($this->password_expiration_time); - } - - /** - * The expiration time of the current password. - * - * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPasswordExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->password_expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php deleted file mode 100644 index 41c3210abebc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php +++ /dev/null @@ -1,484 +0,0 @@ -google.cloud.sql.v1.PasswordValidationPolicy - */ -class PasswordValidationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Minimum number of characters allowed. - * - * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; - */ - protected $min_length = null; - /** - * The complexity of the password. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; - */ - protected $complexity = 0; - /** - * Number of previous passwords that cannot be reused. - * - * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; - */ - protected $reuse_interval = null; - /** - * Disallow username as a part of the password. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; - */ - protected $disallow_username_substring = null; - /** - * Minimum interval after which the password can be changed. This flag is only - * supported for PostgreSQL. - * - * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; - */ - protected $password_change_interval = null; - /** - * Whether the password policy is enabled or not. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; - */ - protected $enable_password_policy = null; - /** - * This field is deprecated and will be removed in a future version of the - * API. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; - * @deprecated - */ - protected $disallow_compromised_credentials = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int32Value $min_length - * Minimum number of characters allowed. - * @type int $complexity - * The complexity of the password. - * @type \Google\Protobuf\Int32Value $reuse_interval - * Number of previous passwords that cannot be reused. - * @type \Google\Protobuf\BoolValue $disallow_username_substring - * Disallow username as a part of the password. - * @type \Google\Protobuf\Duration $password_change_interval - * Minimum interval after which the password can be changed. This flag is only - * supported for PostgreSQL. - * @type \Google\Protobuf\BoolValue $enable_password_policy - * Whether the password policy is enabled or not. - * @type \Google\Protobuf\BoolValue $disallow_compromised_credentials - * This field is deprecated and will be removed in a future version of the - * API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Minimum number of characters allowed. - * - * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; - * @return \Google\Protobuf\Int32Value|null - */ - public function getMinLength() - { - return $this->min_length; - } - - public function hasMinLength() - { - return isset($this->min_length); - } - - public function clearMinLength() - { - unset($this->min_length); - } - - /** - * Returns the unboxed value from getMinLength() - - * Minimum number of characters allowed. - * - * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; - * @return int|null - */ - public function getMinLengthUnwrapped() - { - return $this->readWrapperValue("min_length"); - } - - /** - * Minimum number of characters allowed. - * - * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setMinLength($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->min_length = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Minimum number of characters allowed. - * - * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; - * @param int|null $var - * @return $this - */ - public function setMinLengthUnwrapped($var) - { - $this->writeWrapperValue("min_length", $var); - return $this;} - - /** - * The complexity of the password. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; - * @return int - */ - public function getComplexity() - { - return $this->complexity; - } - - /** - * The complexity of the password. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; - * @param int $var - * @return $this - */ - public function setComplexity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\PasswordValidationPolicy\Complexity::class); - $this->complexity = $var; - - return $this; - } - - /** - * Number of previous passwords that cannot be reused. - * - * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; - * @return \Google\Protobuf\Int32Value|null - */ - public function getReuseInterval() - { - return $this->reuse_interval; - } - - public function hasReuseInterval() - { - return isset($this->reuse_interval); - } - - public function clearReuseInterval() - { - unset($this->reuse_interval); - } - - /** - * Returns the unboxed value from getReuseInterval() - - * Number of previous passwords that cannot be reused. - * - * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; - * @return int|null - */ - public function getReuseIntervalUnwrapped() - { - return $this->readWrapperValue("reuse_interval"); - } - - /** - * Number of previous passwords that cannot be reused. - * - * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setReuseInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->reuse_interval = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Number of previous passwords that cannot be reused. - * - * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; - * @param int|null $var - * @return $this - */ - public function setReuseIntervalUnwrapped($var) - { - $this->writeWrapperValue("reuse_interval", $var); - return $this;} - - /** - * Disallow username as a part of the password. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; - * @return \Google\Protobuf\BoolValue|null - */ - public function getDisallowUsernameSubstring() - { - return $this->disallow_username_substring; - } - - public function hasDisallowUsernameSubstring() - { - return isset($this->disallow_username_substring); - } - - public function clearDisallowUsernameSubstring() - { - unset($this->disallow_username_substring); - } - - /** - * Returns the unboxed value from getDisallowUsernameSubstring() - - * Disallow username as a part of the password. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; - * @return bool|null - */ - public function getDisallowUsernameSubstringUnwrapped() - { - return $this->readWrapperValue("disallow_username_substring"); - } - - /** - * Disallow username as a part of the password. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setDisallowUsernameSubstring($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->disallow_username_substring = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Disallow username as a part of the password. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; - * @param bool|null $var - * @return $this - */ - public function setDisallowUsernameSubstringUnwrapped($var) - { - $this->writeWrapperValue("disallow_username_substring", $var); - return $this;} - - /** - * Minimum interval after which the password can be changed. This flag is only - * supported for PostgreSQL. - * - * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getPasswordChangeInterval() - { - return $this->password_change_interval; - } - - public function hasPasswordChangeInterval() - { - return isset($this->password_change_interval); - } - - public function clearPasswordChangeInterval() - { - unset($this->password_change_interval); - } - - /** - * Minimum interval after which the password can be changed. This flag is only - * supported for PostgreSQL. - * - * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPasswordChangeInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->password_change_interval = $var; - - return $this; - } - - /** - * Whether the password policy is enabled or not. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnablePasswordPolicy() - { - return $this->enable_password_policy; - } - - public function hasEnablePasswordPolicy() - { - return isset($this->enable_password_policy); - } - - public function clearEnablePasswordPolicy() - { - unset($this->enable_password_policy); - } - - /** - * Returns the unboxed value from getEnablePasswordPolicy() - - * Whether the password policy is enabled or not. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; - * @return bool|null - */ - public function getEnablePasswordPolicyUnwrapped() - { - return $this->readWrapperValue("enable_password_policy"); - } - - /** - * Whether the password policy is enabled or not. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnablePasswordPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enable_password_policy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether the password policy is enabled or not. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; - * @param bool|null $var - * @return $this - */ - public function setEnablePasswordPolicyUnwrapped($var) - { - $this->writeWrapperValue("enable_password_policy", $var); - return $this;} - - /** - * This field is deprecated and will be removed in a future version of the - * API. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; - * @return \Google\Protobuf\BoolValue|null - * @deprecated - */ - public function getDisallowCompromisedCredentials() - { - @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); - return $this->disallow_compromised_credentials; - } - - public function hasDisallowCompromisedCredentials() - { - @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); - return isset($this->disallow_compromised_credentials); - } - - public function clearDisallowCompromisedCredentials() - { - @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); - unset($this->disallow_compromised_credentials); - } - - /** - * Returns the unboxed value from getDisallowCompromisedCredentials() - - * This field is deprecated and will be removed in a future version of the - * API. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; - * @return bool|null - */ - public function getDisallowCompromisedCredentialsUnwrapped() - { - @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("disallow_compromised_credentials"); - } - - /** - * This field is deprecated and will be removed in a future version of the - * API. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - * @deprecated - */ - public function setDisallowCompromisedCredentials($var) - { - @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->disallow_compromised_credentials = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * This field is deprecated and will be removed in a future version of the - * API. - * - * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; - * @param bool|null $var - * @return $this - */ - public function setDisallowCompromisedCredentialsUnwrapped($var) - { - $this->writeWrapperValue("disallow_compromised_credentials", $var); - return $this;} - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php deleted file mode 100644 index 30292b5fb504..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.sql.v1.PasswordValidationPolicy.Complexity - */ -class Complexity -{ - /** - * Complexity check is not specified. - * - * Generated from protobuf enum COMPLEXITY_UNSPECIFIED = 0; - */ - const COMPLEXITY_UNSPECIFIED = 0; - /** - * A combination of lowercase, uppercase, numeric, and non-alphanumeric - * characters. - * - * Generated from protobuf enum COMPLEXITY_DEFAULT = 1; - */ - const COMPLEXITY_DEFAULT = 1; - - private static $valueToName = [ - self::COMPLEXITY_UNSPECIFIED => 'COMPLEXITY_UNSPECIFIED', - self::COMPLEXITY_DEFAULT => 'COMPLEXITY_DEFAULT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Complexity::class, \Google\Cloud\Sql\V1\PasswordValidationPolicy_Complexity::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php deleted file mode 100644 index 9b78ebbaf0a0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.PerformDiskShrinkContext - */ -class PerformDiskShrinkContext extends \Google\Protobuf\Internal\Message -{ - /** - * The target disk shrink size in GigaBytes. - * - * Generated from protobuf field int64 target_size_gb = 1; - */ - protected $target_size_gb = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $target_size_gb - * The target disk shrink size in GigaBytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The target disk shrink size in GigaBytes. - * - * Generated from protobuf field int64 target_size_gb = 1; - * @return int|string - */ - public function getTargetSizeGb() - { - return $this->target_size_gb; - } - - /** - * The target disk shrink size in GigaBytes. - * - * Generated from protobuf field int64 target_size_gb = 1; - * @param int|string $var - * @return $this - */ - public function setTargetSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->target_size_gb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php deleted file mode 100644 index 9d8bb9a95229..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.sql.v1.PscConfig - */ -class PscConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether PSC connectivity is enabled for this instance. - * - * Generated from protobuf field optional bool psc_enabled = 1; - */ - protected $psc_enabled = null; - /** - * Optional. The list of consumer projects that are allow-listed for PSC - * connections to this instance. This instance can be connected to with PSC - * from any network in these projects. - * Each consumer project in this list may be represented by a project number - * (numeric) or by a project id (alphanumeric). - * - * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $allowed_consumer_projects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $psc_enabled - * Whether PSC connectivity is enabled for this instance. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_consumer_projects - * Optional. The list of consumer projects that are allow-listed for PSC - * connections to this instance. This instance can be connected to with PSC - * from any network in these projects. - * Each consumer project in this list may be represented by a project number - * (numeric) or by a project id (alphanumeric). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * Whether PSC connectivity is enabled for this instance. - * - * Generated from protobuf field optional bool psc_enabled = 1; - * @return bool - */ - public function getPscEnabled() - { - return isset($this->psc_enabled) ? $this->psc_enabled : false; - } - - public function hasPscEnabled() - { - return isset($this->psc_enabled); - } - - public function clearPscEnabled() - { - unset($this->psc_enabled); - } - - /** - * Whether PSC connectivity is enabled for this instance. - * - * Generated from protobuf field optional bool psc_enabled = 1; - * @param bool $var - * @return $this - */ - public function setPscEnabled($var) - { - GPBUtil::checkBool($var); - $this->psc_enabled = $var; - - return $this; - } - - /** - * Optional. The list of consumer projects that are allow-listed for PSC - * connections to this instance. This instance can be connected to with PSC - * from any network in these projects. - * Each consumer project in this list may be represented by a project number - * (numeric) or by a project id (alphanumeric). - * - * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedConsumerProjects() - { - return $this->allowed_consumer_projects; - } - - /** - * Optional. The list of consumer projects that are allow-listed for PSC - * connections to this instance. This instance can be connected to with PSC - * from any network in these projects. - * Each consumer project in this list may be represented by a project number - * (numeric) or by a project id (alphanumeric). - * - * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedConsumerProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_consumer_projects = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php deleted file mode 100644 index 98e162465cd0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.sql.v1.ReplicaConfiguration - */ -class ReplicaConfiguration extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#replicaConfiguration`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; - */ - protected $mysql_replica_configuration = null; - /** - * Specifies if the replica is the failover target. If the field is set to - * `true`, the replica will be designated as a failover replica. In case the - * primary instance fails, the replica instance will be promoted as the new - * primary instance. Only one replica can be specified as failover target, and - * the replica has to be in different zone with the primary instance. - * - * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; - */ - protected $failover_target = null; - /** - * Optional. Specifies if a SQL Server replica is a cascadable replica. A - * cascadable replica is a SQL Server cross region replica that supports - * replica(s) under it. - * - * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cascadable_replica = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#replicaConfiguration`. - * @type \Google\Cloud\Sql\V1\MySqlReplicaConfiguration $mysql_replica_configuration - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * @type \Google\Protobuf\BoolValue $failover_target - * Specifies if the replica is the failover target. If the field is set to - * `true`, the replica will be designated as a failover replica. In case the - * primary instance fails, the replica instance will be promoted as the new - * primary instance. Only one replica can be specified as failover target, and - * the replica has to be in different zone with the primary instance. - * @type \Google\Protobuf\BoolValue $cascadable_replica - * Optional. Specifies if a SQL Server replica is a cascadable replica. A - * cascadable replica is a SQL Server cross region replica that supports - * replica(s) under it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#replicaConfiguration`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#replicaConfiguration`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; - * @return \Google\Cloud\Sql\V1\MySqlReplicaConfiguration|null - */ - public function getMysqlReplicaConfiguration() - { - return $this->mysql_replica_configuration; - } - - public function hasMysqlReplicaConfiguration() - { - return isset($this->mysql_replica_configuration); - } - - public function clearMysqlReplicaConfiguration() - { - unset($this->mysql_replica_configuration); - } - - /** - * MySQL specific configuration when replicating from a MySQL on-premises - * primary instance. Replication configuration information such as the - * username, password, certificates, and keys are not stored in the instance - * metadata. The configuration information is used only to set up the - * replication connection and is stored by MySQL in a file named - * `master.info` in the data directory. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; - * @param \Google\Cloud\Sql\V1\MySqlReplicaConfiguration $var - * @return $this - */ - public function setMysqlReplicaConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlReplicaConfiguration::class); - $this->mysql_replica_configuration = $var; - - return $this; - } - - /** - * Specifies if the replica is the failover target. If the field is set to - * `true`, the replica will be designated as a failover replica. In case the - * primary instance fails, the replica instance will be promoted as the new - * primary instance. Only one replica can be specified as failover target, and - * the replica has to be in different zone with the primary instance. - * - * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; - * @return \Google\Protobuf\BoolValue|null - */ - public function getFailoverTarget() - { - return $this->failover_target; - } - - public function hasFailoverTarget() - { - return isset($this->failover_target); - } - - public function clearFailoverTarget() - { - unset($this->failover_target); - } - - /** - * Returns the unboxed value from getFailoverTarget() - - * Specifies if the replica is the failover target. If the field is set to - * `true`, the replica will be designated as a failover replica. In case the - * primary instance fails, the replica instance will be promoted as the new - * primary instance. Only one replica can be specified as failover target, and - * the replica has to be in different zone with the primary instance. - * - * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; - * @return bool|null - */ - public function getFailoverTargetUnwrapped() - { - return $this->readWrapperValue("failover_target"); - } - - /** - * Specifies if the replica is the failover target. If the field is set to - * `true`, the replica will be designated as a failover replica. In case the - * primary instance fails, the replica instance will be promoted as the new - * primary instance. Only one replica can be specified as failover target, and - * the replica has to be in different zone with the primary instance. - * - * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setFailoverTarget($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->failover_target = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Specifies if the replica is the failover target. If the field is set to - * `true`, the replica will be designated as a failover replica. In case the - * primary instance fails, the replica instance will be promoted as the new - * primary instance. Only one replica can be specified as failover target, and - * the replica has to be in different zone with the primary instance. - * - * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; - * @param bool|null $var - * @return $this - */ - public function setFailoverTargetUnwrapped($var) - { - $this->writeWrapperValue("failover_target", $var); - return $this;} - - /** - * Optional. Specifies if a SQL Server replica is a cascadable replica. A - * cascadable replica is a SQL Server cross region replica that supports - * replica(s) under it. - * - * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getCascadableReplica() - { - return $this->cascadable_replica; - } - - public function hasCascadableReplica() - { - return isset($this->cascadable_replica); - } - - public function clearCascadableReplica() - { - unset($this->cascadable_replica); - } - - /** - * Returns the unboxed value from getCascadableReplica() - - * Optional. Specifies if a SQL Server replica is a cascadable replica. A - * cascadable replica is a SQL Server cross region replica that supports - * replica(s) under it. - * - * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getCascadableReplicaUnwrapped() - { - return $this->readWrapperValue("cascadable_replica"); - } - - /** - * Optional. Specifies if a SQL Server replica is a cascadable replica. A - * cascadable replica is a SQL Server cross region replica that supports - * replica(s) under it. - * - * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setCascadableReplica($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->cascadable_replica = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. Specifies if a SQL Server replica is a cascadable replica. A - * cascadable replica is a SQL Server cross region replica that supports - * replica(s) under it. - * - * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setCascadableReplicaUnwrapped($var) - { - $this->writeWrapperValue("cascadable_replica", $var); - return $this;} - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php deleted file mode 100644 index 8ffcc580e2bc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.sql.v1.ReplicationCluster - */ -class ReplicationCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. If set, it indicates this instance has a private service - * access (PSA) dns endpoint that is pointing to the primary instance of the - * cluster. If this instance is the primary, the dns should be pointing to - * this instance. After Switchover or Replica failover, this DNS endpoint - * points to the promoted instance. This is a read-only field, returned to the - * user as information. This field can exist even if a standalone instance - * does not yet have a replica, or had a DR replica that was deleted. - * - * Generated from protobuf field string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psa_write_endpoint = ''; - /** - * Optional. If the instance is a primary instance, then this field identifies - * the disaster recovery (DR) replica. A DR replica is an optional - * configuration for Enterprise Plus edition instances. If the instance is a - * read replica, then the field is not set. Set this field to a replica name - * to designate a DR replica for a primary instance. Remove the replica name - * to remove the DR replica designation. - * - * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $failover_dr_replica_name = ''; - /** - * Output only. Read-only field that indicates whether the replica is a DR - * replica. This field is not set if the instance is a primary instance. - * - * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dr_replica = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $psa_write_endpoint - * Output only. If set, it indicates this instance has a private service - * access (PSA) dns endpoint that is pointing to the primary instance of the - * cluster. If this instance is the primary, the dns should be pointing to - * this instance. After Switchover or Replica failover, this DNS endpoint - * points to the promoted instance. This is a read-only field, returned to the - * user as information. This field can exist even if a standalone instance - * does not yet have a replica, or had a DR replica that was deleted. - * @type string $failover_dr_replica_name - * Optional. If the instance is a primary instance, then this field identifies - * the disaster recovery (DR) replica. A DR replica is an optional - * configuration for Enterprise Plus edition instances. If the instance is a - * read replica, then the field is not set. Set this field to a replica name - * to designate a DR replica for a primary instance. Remove the replica name - * to remove the DR replica designation. - * @type bool $dr_replica - * Output only. Read-only field that indicates whether the replica is a DR - * replica. This field is not set if the instance is a primary instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Output only. If set, it indicates this instance has a private service - * access (PSA) dns endpoint that is pointing to the primary instance of the - * cluster. If this instance is the primary, the dns should be pointing to - * this instance. After Switchover or Replica failover, this DNS endpoint - * points to the promoted instance. This is a read-only field, returned to the - * user as information. This field can exist even if a standalone instance - * does not yet have a replica, or had a DR replica that was deleted. - * - * Generated from protobuf field string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPsaWriteEndpoint() - { - return $this->psa_write_endpoint; - } - - /** - * Output only. If set, it indicates this instance has a private service - * access (PSA) dns endpoint that is pointing to the primary instance of the - * cluster. If this instance is the primary, the dns should be pointing to - * this instance. After Switchover or Replica failover, this DNS endpoint - * points to the promoted instance. This is a read-only field, returned to the - * user as information. This field can exist even if a standalone instance - * does not yet have a replica, or had a DR replica that was deleted. - * - * Generated from protobuf field string psa_write_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPsaWriteEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->psa_write_endpoint = $var; - - return $this; - } - - /** - * Optional. If the instance is a primary instance, then this field identifies - * the disaster recovery (DR) replica. A DR replica is an optional - * configuration for Enterprise Plus edition instances. If the instance is a - * read replica, then the field is not set. Set this field to a replica name - * to designate a DR replica for a primary instance. Remove the replica name - * to remove the DR replica designation. - * - * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFailoverDrReplicaName() - { - return $this->failover_dr_replica_name; - } - - /** - * Optional. If the instance is a primary instance, then this field identifies - * the disaster recovery (DR) replica. A DR replica is an optional - * configuration for Enterprise Plus edition instances. If the instance is a - * read replica, then the field is not set. Set this field to a replica name - * to designate a DR replica for a primary instance. Remove the replica name - * to remove the DR replica designation. - * - * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFailoverDrReplicaName($var) - { - GPBUtil::checkString($var, True); - $this->failover_dr_replica_name = $var; - - return $this; - } - - /** - * Output only. Read-only field that indicates whether the replica is a DR - * replica. This field is not set if the instance is a primary instance. - * - * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getDrReplica() - { - return $this->dr_replica; - } - - /** - * Output only. Read-only field that indicates whether the replica is a DR - * replica. This field is not set if the instance is a primary instance. - * - * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setDrReplica($var) - { - GPBUtil::checkBool($var); - $this->dr_replica = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php deleted file mode 100644 index 181d00941303..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.sql.v1.RestoreBackupContext - */ -class RestoreBackupContext extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#restoreBackupContext`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The ID of the backup run to restore from. - * - * Generated from protobuf field int64 backup_run_id = 2; - */ - protected $backup_run_id = 0; - /** - * The ID of the instance that the backup was taken from. - * - * Generated from protobuf field string instance_id = 3; - */ - protected $instance_id = ''; - /** - * The full project ID of the source instance. - * - * Generated from protobuf field string project = 4; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#restoreBackupContext`. - * @type int|string $backup_run_id - * The ID of the backup run to restore from. - * @type string $instance_id - * The ID of the instance that the backup was taken from. - * @type string $project - * The full project ID of the source instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#restoreBackupContext`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#restoreBackupContext`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The ID of the backup run to restore from. - * - * Generated from protobuf field int64 backup_run_id = 2; - * @return int|string - */ - public function getBackupRunId() - { - return $this->backup_run_id; - } - - /** - * The ID of the backup run to restore from. - * - * Generated from protobuf field int64 backup_run_id = 2; - * @param int|string $var - * @return $this - */ - public function setBackupRunId($var) - { - GPBUtil::checkInt64($var); - $this->backup_run_id = $var; - - return $this; - } - - /** - * The ID of the instance that the backup was taken from. - * - * Generated from protobuf field string instance_id = 3; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * The ID of the instance that the backup was taken from. - * - * Generated from protobuf field string instance_id = 3; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * The full project ID of the source instance. - * - * Generated from protobuf field string project = 4; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The full project ID of the source instance. - * - * Generated from protobuf field string project = 4; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php deleted file mode 100644 index ae676d1af208..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.sql.v1.RotateServerCaContext - */ -class RotateServerCaContext extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#rotateServerCaContext`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The fingerprint of the next version to be rotated to. If left unspecified, - * will be rotated to the most recently added server CA version. - * - * Generated from protobuf field string next_version = 2; - */ - protected $next_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#rotateServerCaContext`. - * @type string $next_version - * The fingerprint of the next version to be rotated to. If left unspecified, - * will be rotated to the most recently added server CA version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#rotateServerCaContext`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#rotateServerCaContext`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The fingerprint of the next version to be rotated to. If left unspecified, - * will be rotated to the most recently added server CA version. - * - * Generated from protobuf field string next_version = 2; - * @return string - */ - public function getNextVersion() - { - return $this->next_version; - } - - /** - * The fingerprint of the next version to be rotated to. If left unspecified, - * will be rotated to the most recently added server CA version. - * - * Generated from protobuf field string next_version = 2; - * @param string $var - * @return $this - */ - public function setNextVersion($var) - { - GPBUtil::checkString($var, True); - $this->next_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php deleted file mode 100644 index aa9adf24e354..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php +++ /dev/null @@ -1,1856 +0,0 @@ -google.cloud.sql.v1.Settings - */ -class Settings extends \Google\Protobuf\Internal\Message -{ - /** - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During update, - * use the most recent settingsVersion value for this instance and do not try - * to update this value. - * - * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; - */ - protected $settings_version = null; - /** - * The App Engine app IDs that can access this instance. - * (Deprecated) Applied to First Generation instances only. - * - * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; - * @deprecated - */ - private $authorized_gae_applications; - /** - * The tier (or machine type) for this instance, for example - * `db-custom-1-3840`. WARNING: Changing this restarts the instance. - * - * Generated from protobuf field string tier = 3; - */ - protected $tier = ''; - /** - * This is always `sql#settings`. - * - * Generated from protobuf field string kind = 4; - */ - protected $kind = ''; - /** - * User-provided labels, represented as a dictionary where each label is a - * single key value pair. - * - * Generated from protobuf field map user_labels = 5; - */ - private $user_labels; - /** - * Availability type. Potential values: - * * `ZONAL`: The instance serves data from only one zone. Outages in that - * zone affect data accessibility. - * * `REGIONAL`: The instance can serve data from more than one zone in a - * region (it is highly available)./ - * For more information, see [Overview of the High Availability - * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). - * - * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; - */ - protected $availability_type = 0; - /** - * The pricing plan for this instance. This can be either `PER_USE` or - * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; - */ - protected $pricing_plan = 0; - /** - * The type of replication this instance uses. This can be either - * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only - * applicable to First Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; - * @deprecated - */ - protected $replication_type = 0; - /** - * The maximum size to which storage capacity can be automatically increased. - * The default value is 0, which specifies that there is no limit. - * - * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; - */ - protected $storage_auto_resize_limit = null; - /** - * The activation policy specifies when the instance is activated; it is - * applicable only when the instance state is RUNNABLE. Valid values: - * * `ALWAYS`: The instance is on, and remains so even in the absence of - * connection requests. - * * `NEVER`: The instance is off; it is not activated, even if a - * connection request arrives. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; - */ - protected $activation_policy = 0; - /** - * The settings for IP Management. This allows to enable or disable the - * instance IP and manage which external networks can connect to the instance. - * The IPv4 address cannot be disabled for Second Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; - */ - protected $ip_configuration = null; - /** - * Configuration to increase storage size automatically. The default value is - * true. - * - * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; - */ - protected $storage_auto_resize = null; - /** - * The location preference settings. This allows the instance to be located as - * near as possible to either an App Engine app or Compute Engine zone for - * better performance. App Engine co-location was only applicable to First - * Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; - */ - protected $location_preference = null; - /** - * The database flags passed to the instance at startup. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; - */ - private $database_flags; - /** - * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for - * First Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; - */ - protected $data_disk_type = 0; - /** - * The maintenance window for this instance. This specifies when the instance - * can be restarted for maintenance purposes. - * - * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; - */ - protected $maintenance_window = null; - /** - * The daily backup configuration for the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; - */ - protected $backup_configuration = null; - /** - * Configuration specific to read replica instances. Indicates whether - * replication is enabled or not. WARNING: Changing this restarts the - * instance. - * - * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; - */ - protected $database_replication_enabled = null; - /** - * Configuration specific to read replica instances. Indicates whether - * database flags for crash-safe replication are enabled. This property was - * only applicable to First Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; - * @deprecated - */ - protected $crash_safe_replication_enabled = null; - /** - * The size of data disk, in GB. The data disk size minimum is 10GB. - * - * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; - */ - protected $data_disk_size_gb = null; - /** - * Active Directory configuration, relevant only for Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; - */ - protected $active_directory_config = null; - /** - * The name of server Instance collation. - * - * Generated from protobuf field string collation = 23; - */ - protected $collation = ''; - /** - * Deny maintenance periods - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; - */ - private $deny_maintenance_periods; - /** - * Insights configuration, for now relevant only for Postgres. - * - * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; - */ - protected $insights_config = null; - /** - * The local user password validation policy of the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; - */ - protected $password_validation_policy = null; - /** - * SQL Server specific audit configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; - */ - protected $sql_server_audit_config = null; - /** - * Optional. The edition of the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $edition = 0; - /** - * Specifies if connections must use Cloud SQL connectors. - * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances - * can be connected without Cloud SQL - * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL - * Connectors). - * Note that using REQUIRED disables all existing authorized networks. If - * this field is not specified when creating a new instance, NOT_REQUIRED is - * used. If this field is not specified when patching or updating an existing - * instance, it is left unchanged in the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; - */ - protected $connector_enforcement = 0; - /** - * Configuration to protect against accidental instance deletion. - * - * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; - */ - protected $deletion_protection_enabled = null; - /** - * Server timezone, relevant only for Cloud SQL for SQL Server. - * - * Generated from protobuf field string time_zone = 34; - */ - protected $time_zone = ''; - /** - * Specifies advanced machine configuration for the instances relevant only - * for SQL Server. - * - * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; - */ - protected $advanced_machine_features = null; - /** - * Configuration for data cache. - * - * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; - */ - protected $data_cache_config = null; - /** - * Optional. When this parameter is set to true, Cloud SQL instances can - * connect to Vertex AI to pass requests for real-time predictions and - * insights to the AI. The default value is false. This applies only to Cloud - * SQL for PostgreSQL instances. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_google_ml_integration = null; - /** - * Optional. By default, Cloud SQL instances have schema extraction disabled - * for Dataplex. When this parameter is set to true, schema extraction for - * Dataplex on Cloud SQL instances is activated. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_dataplex_integration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $settings_version - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During update, - * use the most recent settingsVersion value for this instance and do not try - * to update this value. - * @type array|\Google\Protobuf\Internal\RepeatedField $authorized_gae_applications - * The App Engine app IDs that can access this instance. - * (Deprecated) Applied to First Generation instances only. - * @type string $tier - * The tier (or machine type) for this instance, for example - * `db-custom-1-3840`. WARNING: Changing this restarts the instance. - * @type string $kind - * This is always `sql#settings`. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * User-provided labels, represented as a dictionary where each label is a - * single key value pair. - * @type int $availability_type - * Availability type. Potential values: - * * `ZONAL`: The instance serves data from only one zone. Outages in that - * zone affect data accessibility. - * * `REGIONAL`: The instance can serve data from more than one zone in a - * region (it is highly available)./ - * For more information, see [Overview of the High Availability - * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). - * @type int $pricing_plan - * The pricing plan for this instance. This can be either `PER_USE` or - * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. - * @type int $replication_type - * The type of replication this instance uses. This can be either - * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only - * applicable to First Generation instances. - * @type \Google\Protobuf\Int64Value $storage_auto_resize_limit - * The maximum size to which storage capacity can be automatically increased. - * The default value is 0, which specifies that there is no limit. - * @type int $activation_policy - * The activation policy specifies when the instance is activated; it is - * applicable only when the instance state is RUNNABLE. Valid values: - * * `ALWAYS`: The instance is on, and remains so even in the absence of - * connection requests. - * * `NEVER`: The instance is off; it is not activated, even if a - * connection request arrives. - * @type \Google\Cloud\Sql\V1\IpConfiguration $ip_configuration - * The settings for IP Management. This allows to enable or disable the - * instance IP and manage which external networks can connect to the instance. - * The IPv4 address cannot be disabled for Second Generation instances. - * @type \Google\Protobuf\BoolValue $storage_auto_resize - * Configuration to increase storage size automatically. The default value is - * true. - * @type \Google\Cloud\Sql\V1\LocationPreference $location_preference - * The location preference settings. This allows the instance to be located as - * near as possible to either an App Engine app or Compute Engine zone for - * better performance. App Engine co-location was only applicable to First - * Generation instances. - * @type array<\Google\Cloud\Sql\V1\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $database_flags - * The database flags passed to the instance at startup. - * @type int $data_disk_type - * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for - * First Generation instances. - * @type \Google\Cloud\Sql\V1\MaintenanceWindow $maintenance_window - * The maintenance window for this instance. This specifies when the instance - * can be restarted for maintenance purposes. - * @type \Google\Cloud\Sql\V1\BackupConfiguration $backup_configuration - * The daily backup configuration for the instance. - * @type \Google\Protobuf\BoolValue $database_replication_enabled - * Configuration specific to read replica instances. Indicates whether - * replication is enabled or not. WARNING: Changing this restarts the - * instance. - * @type \Google\Protobuf\BoolValue $crash_safe_replication_enabled - * Configuration specific to read replica instances. Indicates whether - * database flags for crash-safe replication are enabled. This property was - * only applicable to First Generation instances. - * @type \Google\Protobuf\Int64Value $data_disk_size_gb - * The size of data disk, in GB. The data disk size minimum is 10GB. - * @type \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig $active_directory_config - * Active Directory configuration, relevant only for Cloud SQL for SQL Server. - * @type string $collation - * The name of server Instance collation. - * @type array<\Google\Cloud\Sql\V1\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $deny_maintenance_periods - * Deny maintenance periods - * @type \Google\Cloud\Sql\V1\InsightsConfig $insights_config - * Insights configuration, for now relevant only for Postgres. - * @type \Google\Cloud\Sql\V1\PasswordValidationPolicy $password_validation_policy - * The local user password validation policy of the instance. - * @type \Google\Cloud\Sql\V1\SqlServerAuditConfig $sql_server_audit_config - * SQL Server specific audit configuration. - * @type int $edition - * Optional. The edition of the instance. - * @type int $connector_enforcement - * Specifies if connections must use Cloud SQL connectors. - * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances - * can be connected without Cloud SQL - * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL - * Connectors). - * Note that using REQUIRED disables all existing authorized networks. If - * this field is not specified when creating a new instance, NOT_REQUIRED is - * used. If this field is not specified when patching or updating an existing - * instance, it is left unchanged in the instance. - * @type \Google\Protobuf\BoolValue $deletion_protection_enabled - * Configuration to protect against accidental instance deletion. - * @type string $time_zone - * Server timezone, relevant only for Cloud SQL for SQL Server. - * @type \Google\Cloud\Sql\V1\AdvancedMachineFeatures $advanced_machine_features - * Specifies advanced machine configuration for the instances relevant only - * for SQL Server. - * @type \Google\Cloud\Sql\V1\DataCacheConfig $data_cache_config - * Configuration for data cache. - * @type \Google\Protobuf\BoolValue $enable_google_ml_integration - * Optional. When this parameter is set to true, Cloud SQL instances can - * connect to Vertex AI to pass requests for real-time predictions and - * insights to the AI. The default value is false. This applies only to Cloud - * SQL for PostgreSQL instances. - * @type \Google\Protobuf\BoolValue $enable_dataplex_integration - * Optional. By default, Cloud SQL instances have schema extraction disabled - * for Dataplex. When this parameter is set to true, schema extraction for - * Dataplex on Cloud SQL instances is activated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During update, - * use the most recent settingsVersion value for this instance and do not try - * to update this value. - * - * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; - * @return \Google\Protobuf\Int64Value|null - */ - public function getSettingsVersion() - { - return $this->settings_version; - } - - public function hasSettingsVersion() - { - return isset($this->settings_version); - } - - public function clearSettingsVersion() - { - unset($this->settings_version); - } - - /** - * Returns the unboxed value from getSettingsVersion() - - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During update, - * use the most recent settingsVersion value for this instance and do not try - * to update this value. - * - * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; - * @return int|string|null - */ - public function getSettingsVersionUnwrapped() - { - return $this->readWrapperValue("settings_version"); - } - - /** - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During update, - * use the most recent settingsVersion value for this instance and do not try - * to update this value. - * - * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setSettingsVersion($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->settings_version = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The version of instance settings. This is a required field for update - * method to make sure concurrent updates are handled properly. During update, - * use the most recent settingsVersion value for this instance and do not try - * to update this value. - * - * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; - * @param int|string|null $var - * @return $this - */ - public function setSettingsVersionUnwrapped($var) - { - $this->writeWrapperValue("settings_version", $var); - return $this;} - - /** - * The App Engine app IDs that can access this instance. - * (Deprecated) Applied to First Generation instances only. - * - * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getAuthorizedGaeApplications() - { - @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); - return $this->authorized_gae_applications; - } - - /** - * The App Engine app IDs that can access this instance. - * (Deprecated) Applied to First Generation instances only. - * - * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setAuthorizedGaeApplications($var) - { - @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->authorized_gae_applications = $arr; - - return $this; - } - - /** - * The tier (or machine type) for this instance, for example - * `db-custom-1-3840`. WARNING: Changing this restarts the instance. - * - * Generated from protobuf field string tier = 3; - * @return string - */ - public function getTier() - { - return $this->tier; - } - - /** - * The tier (or machine type) for this instance, for example - * `db-custom-1-3840`. WARNING: Changing this restarts the instance. - * - * Generated from protobuf field string tier = 3; - * @param string $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkString($var, True); - $this->tier = $var; - - return $this; - } - - /** - * This is always `sql#settings`. - * - * Generated from protobuf field string kind = 4; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#settings`. - * - * Generated from protobuf field string kind = 4; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * User-provided labels, represented as a dictionary where each label is a - * single key value pair. - * - * Generated from protobuf field map user_labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * User-provided labels, represented as a dictionary where each label is a - * single key value pair. - * - * Generated from protobuf field map user_labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - - /** - * Availability type. Potential values: - * * `ZONAL`: The instance serves data from only one zone. Outages in that - * zone affect data accessibility. - * * `REGIONAL`: The instance can serve data from more than one zone in a - * region (it is highly available)./ - * For more information, see [Overview of the High Availability - * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). - * - * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; - * @return int - */ - public function getAvailabilityType() - { - return $this->availability_type; - } - - /** - * Availability type. Potential values: - * * `ZONAL`: The instance serves data from only one zone. Outages in that - * zone affect data accessibility. - * * `REGIONAL`: The instance can serve data from more than one zone in a - * region (it is highly available)./ - * For more information, see [Overview of the High Availability - * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). - * - * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; - * @param int $var - * @return $this - */ - public function setAvailabilityType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlAvailabilityType::class); - $this->availability_type = $var; - - return $this; - } - - /** - * The pricing plan for this instance. This can be either `PER_USE` or - * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; - * @return int - */ - public function getPricingPlan() - { - return $this->pricing_plan; - } - - /** - * The pricing plan for this instance. This can be either `PER_USE` or - * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; - * @param int $var - * @return $this - */ - public function setPricingPlan($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlPricingPlan::class); - $this->pricing_plan = $var; - - return $this; - } - - /** - * The type of replication this instance uses. This can be either - * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only - * applicable to First Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; - * @return int - * @deprecated - */ - public function getReplicationType() - { - @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); - return $this->replication_type; - } - - /** - * The type of replication this instance uses. This can be either - * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only - * applicable to First Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setReplicationType($var) - { - @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlReplicationType::class); - $this->replication_type = $var; - - return $this; - } - - /** - * The maximum size to which storage capacity can be automatically increased. - * The default value is 0, which specifies that there is no limit. - * - * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; - * @return \Google\Protobuf\Int64Value|null - */ - public function getStorageAutoResizeLimit() - { - return $this->storage_auto_resize_limit; - } - - public function hasStorageAutoResizeLimit() - { - return isset($this->storage_auto_resize_limit); - } - - public function clearStorageAutoResizeLimit() - { - unset($this->storage_auto_resize_limit); - } - - /** - * Returns the unboxed value from getStorageAutoResizeLimit() - - * The maximum size to which storage capacity can be automatically increased. - * The default value is 0, which specifies that there is no limit. - * - * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; - * @return int|string|null - */ - public function getStorageAutoResizeLimitUnwrapped() - { - return $this->readWrapperValue("storage_auto_resize_limit"); - } - - /** - * The maximum size to which storage capacity can be automatically increased. - * The default value is 0, which specifies that there is no limit. - * - * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setStorageAutoResizeLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->storage_auto_resize_limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The maximum size to which storage capacity can be automatically increased. - * The default value is 0, which specifies that there is no limit. - * - * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; - * @param int|string|null $var - * @return $this - */ - public function setStorageAutoResizeLimitUnwrapped($var) - { - $this->writeWrapperValue("storage_auto_resize_limit", $var); - return $this;} - - /** - * The activation policy specifies when the instance is activated; it is - * applicable only when the instance state is RUNNABLE. Valid values: - * * `ALWAYS`: The instance is on, and remains so even in the absence of - * connection requests. - * * `NEVER`: The instance is off; it is not activated, even if a - * connection request arrives. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; - * @return int - */ - public function getActivationPolicy() - { - return $this->activation_policy; - } - - /** - * The activation policy specifies when the instance is activated; it is - * applicable only when the instance state is RUNNABLE. Valid values: - * * `ALWAYS`: The instance is on, and remains so even in the absence of - * connection requests. - * * `NEVER`: The instance is off; it is not activated, even if a - * connection request arrives. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; - * @param int $var - * @return $this - */ - public function setActivationPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\SqlActivationPolicy::class); - $this->activation_policy = $var; - - return $this; - } - - /** - * The settings for IP Management. This allows to enable or disable the - * instance IP and manage which external networks can connect to the instance. - * The IPv4 address cannot be disabled for Second Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; - * @return \Google\Cloud\Sql\V1\IpConfiguration|null - */ - public function getIpConfiguration() - { - return $this->ip_configuration; - } - - public function hasIpConfiguration() - { - return isset($this->ip_configuration); - } - - public function clearIpConfiguration() - { - unset($this->ip_configuration); - } - - /** - * The settings for IP Management. This allows to enable or disable the - * instance IP and manage which external networks can connect to the instance. - * The IPv4 address cannot be disabled for Second Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; - * @param \Google\Cloud\Sql\V1\IpConfiguration $var - * @return $this - */ - public function setIpConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\IpConfiguration::class); - $this->ip_configuration = $var; - - return $this; - } - - /** - * Configuration to increase storage size automatically. The default value is - * true. - * - * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; - * @return \Google\Protobuf\BoolValue|null - */ - public function getStorageAutoResize() - { - return $this->storage_auto_resize; - } - - public function hasStorageAutoResize() - { - return isset($this->storage_auto_resize); - } - - public function clearStorageAutoResize() - { - unset($this->storage_auto_resize); - } - - /** - * Returns the unboxed value from getStorageAutoResize() - - * Configuration to increase storage size automatically. The default value is - * true. - * - * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; - * @return bool|null - */ - public function getStorageAutoResizeUnwrapped() - { - return $this->readWrapperValue("storage_auto_resize"); - } - - /** - * Configuration to increase storage size automatically. The default value is - * true. - * - * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setStorageAutoResize($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->storage_auto_resize = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Configuration to increase storage size automatically. The default value is - * true. - * - * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; - * @param bool|null $var - * @return $this - */ - public function setStorageAutoResizeUnwrapped($var) - { - $this->writeWrapperValue("storage_auto_resize", $var); - return $this;} - - /** - * The location preference settings. This allows the instance to be located as - * near as possible to either an App Engine app or Compute Engine zone for - * better performance. App Engine co-location was only applicable to First - * Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; - * @return \Google\Cloud\Sql\V1\LocationPreference|null - */ - public function getLocationPreference() - { - return $this->location_preference; - } - - public function hasLocationPreference() - { - return isset($this->location_preference); - } - - public function clearLocationPreference() - { - unset($this->location_preference); - } - - /** - * The location preference settings. This allows the instance to be located as - * near as possible to either an App Engine app or Compute Engine zone for - * better performance. App Engine co-location was only applicable to First - * Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; - * @param \Google\Cloud\Sql\V1\LocationPreference $var - * @return $this - */ - public function setLocationPreference($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\LocationPreference::class); - $this->location_preference = $var; - - return $this; - } - - /** - * The database flags passed to the instance at startup. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatabaseFlags() - { - return $this->database_flags; - } - - /** - * The database flags passed to the instance at startup. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; - * @param array<\Google\Cloud\Sql\V1\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatabaseFlags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DatabaseFlags::class); - $this->database_flags = $arr; - - return $this; - } - - /** - * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for - * First Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; - * @return int - */ - public function getDataDiskType() - { - return $this->data_disk_type; - } - - /** - * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for - * First Generation instances. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; - * @param int $var - * @return $this - */ - public function setDataDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDataDiskType::class); - $this->data_disk_type = $var; - - return $this; - } - - /** - * The maintenance window for this instance. This specifies when the instance - * can be restarted for maintenance purposes. - * - * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; - * @return \Google\Cloud\Sql\V1\MaintenanceWindow|null - */ - public function getMaintenanceWindow() - { - return $this->maintenance_window; - } - - public function hasMaintenanceWindow() - { - return isset($this->maintenance_window); - } - - public function clearMaintenanceWindow() - { - unset($this->maintenance_window); - } - - /** - * The maintenance window for this instance. This specifies when the instance - * can be restarted for maintenance purposes. - * - * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; - * @param \Google\Cloud\Sql\V1\MaintenanceWindow $var - * @return $this - */ - public function setMaintenanceWindow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MaintenanceWindow::class); - $this->maintenance_window = $var; - - return $this; - } - - /** - * The daily backup configuration for the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; - * @return \Google\Cloud\Sql\V1\BackupConfiguration|null - */ - public function getBackupConfiguration() - { - return $this->backup_configuration; - } - - public function hasBackupConfiguration() - { - return isset($this->backup_configuration); - } - - public function clearBackupConfiguration() - { - unset($this->backup_configuration); - } - - /** - * The daily backup configuration for the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; - * @param \Google\Cloud\Sql\V1\BackupConfiguration $var - * @return $this - */ - public function setBackupConfiguration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupConfiguration::class); - $this->backup_configuration = $var; - - return $this; - } - - /** - * Configuration specific to read replica instances. Indicates whether - * replication is enabled or not. WARNING: Changing this restarts the - * instance. - * - * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; - * @return \Google\Protobuf\BoolValue|null - */ - public function getDatabaseReplicationEnabled() - { - return $this->database_replication_enabled; - } - - public function hasDatabaseReplicationEnabled() - { - return isset($this->database_replication_enabled); - } - - public function clearDatabaseReplicationEnabled() - { - unset($this->database_replication_enabled); - } - - /** - * Returns the unboxed value from getDatabaseReplicationEnabled() - - * Configuration specific to read replica instances. Indicates whether - * replication is enabled or not. WARNING: Changing this restarts the - * instance. - * - * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; - * @return bool|null - */ - public function getDatabaseReplicationEnabledUnwrapped() - { - return $this->readWrapperValue("database_replication_enabled"); - } - - /** - * Configuration specific to read replica instances. Indicates whether - * replication is enabled or not. WARNING: Changing this restarts the - * instance. - * - * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setDatabaseReplicationEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->database_replication_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Configuration specific to read replica instances. Indicates whether - * replication is enabled or not. WARNING: Changing this restarts the - * instance. - * - * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; - * @param bool|null $var - * @return $this - */ - public function setDatabaseReplicationEnabledUnwrapped($var) - { - $this->writeWrapperValue("database_replication_enabled", $var); - return $this;} - - /** - * Configuration specific to read replica instances. Indicates whether - * database flags for crash-safe replication are enabled. This property was - * only applicable to First Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; - * @return \Google\Protobuf\BoolValue|null - * @deprecated - */ - public function getCrashSafeReplicationEnabled() - { - @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); - return $this->crash_safe_replication_enabled; - } - - public function hasCrashSafeReplicationEnabled() - { - @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); - return isset($this->crash_safe_replication_enabled); - } - - public function clearCrashSafeReplicationEnabled() - { - @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); - unset($this->crash_safe_replication_enabled); - } - - /** - * Returns the unboxed value from getCrashSafeReplicationEnabled() - - * Configuration specific to read replica instances. Indicates whether - * database flags for crash-safe replication are enabled. This property was - * only applicable to First Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; - * @return bool|null - */ - public function getCrashSafeReplicationEnabledUnwrapped() - { - @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("crash_safe_replication_enabled"); - } - - /** - * Configuration specific to read replica instances. Indicates whether - * database flags for crash-safe replication are enabled. This property was - * only applicable to First Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - * @deprecated - */ - public function setCrashSafeReplicationEnabled($var) - { - @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->crash_safe_replication_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Configuration specific to read replica instances. Indicates whether - * database flags for crash-safe replication are enabled. This property was - * only applicable to First Generation instances. - * - * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; - * @param bool|null $var - * @return $this - */ - public function setCrashSafeReplicationEnabledUnwrapped($var) - { - $this->writeWrapperValue("crash_safe_replication_enabled", $var); - return $this;} - - /** - * The size of data disk, in GB. The data disk size minimum is 10GB. - * - * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; - * @return \Google\Protobuf\Int64Value|null - */ - public function getDataDiskSizeGb() - { - return $this->data_disk_size_gb; - } - - public function hasDataDiskSizeGb() - { - return isset($this->data_disk_size_gb); - } - - public function clearDataDiskSizeGb() - { - unset($this->data_disk_size_gb); - } - - /** - * Returns the unboxed value from getDataDiskSizeGb() - - * The size of data disk, in GB. The data disk size minimum is 10GB. - * - * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; - * @return int|string|null - */ - public function getDataDiskSizeGbUnwrapped() - { - return $this->readWrapperValue("data_disk_size_gb"); - } - - /** - * The size of data disk, in GB. The data disk size minimum is 10GB. - * - * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setDataDiskSizeGb($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->data_disk_size_gb = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The size of data disk, in GB. The data disk size minimum is 10GB. - * - * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; - * @param int|string|null $var - * @return $this - */ - public function setDataDiskSizeGbUnwrapped($var) - { - $this->writeWrapperValue("data_disk_size_gb", $var); - return $this;} - - /** - * Active Directory configuration, relevant only for Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; - * @return \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig|null - */ - public function getActiveDirectoryConfig() - { - return $this->active_directory_config; - } - - public function hasActiveDirectoryConfig() - { - return isset($this->active_directory_config); - } - - public function clearActiveDirectoryConfig() - { - unset($this->active_directory_config); - } - - /** - * Active Directory configuration, relevant only for Cloud SQL for SQL Server. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; - * @param \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig $var - * @return $this - */ - public function setActiveDirectoryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig::class); - $this->active_directory_config = $var; - - return $this; - } - - /** - * The name of server Instance collation. - * - * Generated from protobuf field string collation = 23; - * @return string - */ - public function getCollation() - { - return $this->collation; - } - - /** - * The name of server Instance collation. - * - * Generated from protobuf field string collation = 23; - * @param string $var - * @return $this - */ - public function setCollation($var) - { - GPBUtil::checkString($var, True); - $this->collation = $var; - - return $this; - } - - /** - * Deny maintenance periods - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDenyMaintenancePeriods() - { - return $this->deny_maintenance_periods; - } - - /** - * Deny maintenance periods - * - * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; - * @param array<\Google\Cloud\Sql\V1\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDenyMaintenancePeriods($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DenyMaintenancePeriod::class); - $this->deny_maintenance_periods = $arr; - - return $this; - } - - /** - * Insights configuration, for now relevant only for Postgres. - * - * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; - * @return \Google\Cloud\Sql\V1\InsightsConfig|null - */ - public function getInsightsConfig() - { - return $this->insights_config; - } - - public function hasInsightsConfig() - { - return isset($this->insights_config); - } - - public function clearInsightsConfig() - { - unset($this->insights_config); - } - - /** - * Insights configuration, for now relevant only for Postgres. - * - * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; - * @param \Google\Cloud\Sql\V1\InsightsConfig $var - * @return $this - */ - public function setInsightsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InsightsConfig::class); - $this->insights_config = $var; - - return $this; - } - - /** - * The local user password validation policy of the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; - * @return \Google\Cloud\Sql\V1\PasswordValidationPolicy|null - */ - public function getPasswordValidationPolicy() - { - return $this->password_validation_policy; - } - - public function hasPasswordValidationPolicy() - { - return isset($this->password_validation_policy); - } - - public function clearPasswordValidationPolicy() - { - unset($this->password_validation_policy); - } - - /** - * The local user password validation policy of the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; - * @param \Google\Cloud\Sql\V1\PasswordValidationPolicy $var - * @return $this - */ - public function setPasswordValidationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PasswordValidationPolicy::class); - $this->password_validation_policy = $var; - - return $this; - } - - /** - * SQL Server specific audit configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; - * @return \Google\Cloud\Sql\V1\SqlServerAuditConfig|null - */ - public function getSqlServerAuditConfig() - { - return $this->sql_server_audit_config; - } - - public function hasSqlServerAuditConfig() - { - return isset($this->sql_server_audit_config); - } - - public function clearSqlServerAuditConfig() - { - unset($this->sql_server_audit_config); - } - - /** - * SQL Server specific audit configuration. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; - * @param \Google\Cloud\Sql\V1\SqlServerAuditConfig $var - * @return $this - */ - public function setSqlServerAuditConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerAuditConfig::class); - $this->sql_server_audit_config = $var; - - return $this; - } - - /** - * Optional. The edition of the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEdition() - { - return $this->edition; - } - - /** - * Optional. The edition of the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\Edition::class); - $this->edition = $var; - - return $this; - } - - /** - * Specifies if connections must use Cloud SQL connectors. - * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances - * can be connected without Cloud SQL - * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL - * Connectors). - * Note that using REQUIRED disables all existing authorized networks. If - * this field is not specified when creating a new instance, NOT_REQUIRED is - * used. If this field is not specified when patching or updating an existing - * instance, it is left unchanged in the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; - * @return int - */ - public function getConnectorEnforcement() - { - return $this->connector_enforcement; - } - - /** - * Specifies if connections must use Cloud SQL connectors. - * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances - * can be connected without Cloud SQL - * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL - * Connectors). - * Note that using REQUIRED disables all existing authorized networks. If - * this field is not specified when creating a new instance, NOT_REQUIRED is - * used. If this field is not specified when patching or updating an existing - * instance, it is left unchanged in the instance. - * - * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; - * @param int $var - * @return $this - */ - public function setConnectorEnforcement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\ConnectorEnforcement::class); - $this->connector_enforcement = $var; - - return $this; - } - - /** - * Configuration to protect against accidental instance deletion. - * - * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; - * @return \Google\Protobuf\BoolValue|null - */ - public function getDeletionProtectionEnabled() - { - return $this->deletion_protection_enabled; - } - - public function hasDeletionProtectionEnabled() - { - return isset($this->deletion_protection_enabled); - } - - public function clearDeletionProtectionEnabled() - { - unset($this->deletion_protection_enabled); - } - - /** - * Returns the unboxed value from getDeletionProtectionEnabled() - - * Configuration to protect against accidental instance deletion. - * - * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; - * @return bool|null - */ - public function getDeletionProtectionEnabledUnwrapped() - { - return $this->readWrapperValue("deletion_protection_enabled"); - } - - /** - * Configuration to protect against accidental instance deletion. - * - * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setDeletionProtectionEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->deletion_protection_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Configuration to protect against accidental instance deletion. - * - * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; - * @param bool|null $var - * @return $this - */ - public function setDeletionProtectionEnabledUnwrapped($var) - { - $this->writeWrapperValue("deletion_protection_enabled", $var); - return $this;} - - /** - * Server timezone, relevant only for Cloud SQL for SQL Server. - * - * Generated from protobuf field string time_zone = 34; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * Server timezone, relevant only for Cloud SQL for SQL Server. - * - * Generated from protobuf field string time_zone = 34; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * Specifies advanced machine configuration for the instances relevant only - * for SQL Server. - * - * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; - * @return \Google\Cloud\Sql\V1\AdvancedMachineFeatures|null - */ - public function getAdvancedMachineFeatures() - { - return $this->advanced_machine_features; - } - - public function hasAdvancedMachineFeatures() - { - return isset($this->advanced_machine_features); - } - - public function clearAdvancedMachineFeatures() - { - unset($this->advanced_machine_features); - } - - /** - * Specifies advanced machine configuration for the instances relevant only - * for SQL Server. - * - * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; - * @param \Google\Cloud\Sql\V1\AdvancedMachineFeatures $var - * @return $this - */ - public function setAdvancedMachineFeatures($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AdvancedMachineFeatures::class); - $this->advanced_machine_features = $var; - - return $this; - } - - /** - * Configuration for data cache. - * - * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; - * @return \Google\Cloud\Sql\V1\DataCacheConfig|null - */ - public function getDataCacheConfig() - { - return $this->data_cache_config; - } - - public function hasDataCacheConfig() - { - return isset($this->data_cache_config); - } - - public function clearDataCacheConfig() - { - unset($this->data_cache_config); - } - - /** - * Configuration for data cache. - * - * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; - * @param \Google\Cloud\Sql\V1\DataCacheConfig $var - * @return $this - */ - public function setDataCacheConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DataCacheConfig::class); - $this->data_cache_config = $var; - - return $this; - } - - /** - * Optional. When this parameter is set to true, Cloud SQL instances can - * connect to Vertex AI to pass requests for real-time predictions and - * insights to the AI. The default value is false. This applies only to Cloud - * SQL for PostgreSQL instances. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnableGoogleMlIntegration() - { - return $this->enable_google_ml_integration; - } - - public function hasEnableGoogleMlIntegration() - { - return isset($this->enable_google_ml_integration); - } - - public function clearEnableGoogleMlIntegration() - { - unset($this->enable_google_ml_integration); - } - - /** - * Returns the unboxed value from getEnableGoogleMlIntegration() - - * Optional. When this parameter is set to true, Cloud SQL instances can - * connect to Vertex AI to pass requests for real-time predictions and - * insights to the AI. The default value is false. This applies only to Cloud - * SQL for PostgreSQL instances. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getEnableGoogleMlIntegrationUnwrapped() - { - return $this->readWrapperValue("enable_google_ml_integration"); - } - - /** - * Optional. When this parameter is set to true, Cloud SQL instances can - * connect to Vertex AI to pass requests for real-time predictions and - * insights to the AI. The default value is false. This applies only to Cloud - * SQL for PostgreSQL instances. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnableGoogleMlIntegration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enable_google_ml_integration = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. When this parameter is set to true, Cloud SQL instances can - * connect to Vertex AI to pass requests for real-time predictions and - * insights to the AI. The default value is false. This applies only to Cloud - * SQL for PostgreSQL instances. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setEnableGoogleMlIntegrationUnwrapped($var) - { - $this->writeWrapperValue("enable_google_ml_integration", $var); - return $this;} - - /** - * Optional. By default, Cloud SQL instances have schema extraction disabled - * for Dataplex. When this parameter is set to true, schema extraction for - * Dataplex on Cloud SQL instances is activated. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnableDataplexIntegration() - { - return $this->enable_dataplex_integration; - } - - public function hasEnableDataplexIntegration() - { - return isset($this->enable_dataplex_integration); - } - - public function clearEnableDataplexIntegration() - { - unset($this->enable_dataplex_integration); - } - - /** - * Returns the unboxed value from getEnableDataplexIntegration() - - * Optional. By default, Cloud SQL instances have schema extraction disabled - * for Dataplex. When this parameter is set to true, schema extraction for - * Dataplex on Cloud SQL instances is activated. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getEnableDataplexIntegrationUnwrapped() - { - return $this->readWrapperValue("enable_dataplex_integration"); - } - - /** - * Optional. By default, Cloud SQL instances have schema extraction disabled - * for Dataplex. When this parameter is set to true, schema extraction for - * Dataplex on Cloud SQL instances is activated. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnableDataplexIntegration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enable_dataplex_integration = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. By default, Cloud SQL instances have schema extraction disabled - * for Dataplex. When this parameter is set to true, schema extraction for - * Dataplex on Cloud SQL instances is activated. - * - * Generated from protobuf field .google.protobuf.BoolValue enable_dataplex_integration = 41 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setEnableDataplexIntegrationUnwrapped($var) - { - $this->writeWrapperValue("enable_dataplex_integration", $var); - return $this;} - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php deleted file mode 100644 index b5e20e282ce4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.sql.v1.Settings.ConnectorEnforcement - */ -class ConnectorEnforcement -{ - /** - * The requirement for Cloud SQL connectors is unknown. - * - * Generated from protobuf enum CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; - */ - const CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; - /** - * Do not require Cloud SQL connectors. - * - * Generated from protobuf enum NOT_REQUIRED = 1; - */ - const NOT_REQUIRED = 1; - /** - * Require all connections to use Cloud SQL connectors, including the - * Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. - * Note: This disables all existing authorized networks. - * - * Generated from protobuf enum REQUIRED = 2; - */ - const REQUIRED = 2; - - private static $valueToName = [ - self::CONNECTOR_ENFORCEMENT_UNSPECIFIED => 'CONNECTOR_ENFORCEMENT_UNSPECIFIED', - self::NOT_REQUIRED => 'NOT_REQUIRED', - self::REQUIRED => 'REQUIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConnectorEnforcement::class, \Google\Cloud\Sql\V1\Settings_ConnectorEnforcement::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php deleted file mode 100644 index 5c3af9f7ac03..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.sql.v1.Settings.Edition - */ -class Edition -{ - /** - * The instance did not specify the edition. - * - * Generated from protobuf enum EDITION_UNSPECIFIED = 0; - */ - const EDITION_UNSPECIFIED = 0; - /** - * The instance is an enterprise edition. - * - * Generated from protobuf enum ENTERPRISE = 2; - */ - const ENTERPRISE = 2; - /** - * The instance is an Enterprise Plus edition. - * - * Generated from protobuf enum ENTERPRISE_PLUS = 3; - */ - const ENTERPRISE_PLUS = 3; - - private static $valueToName = [ - self::EDITION_UNSPECIFIED => 'EDITION_UNSPECIFIED', - self::ENTERPRISE => 'ENTERPRISE', - self::ENTERPRISE_PLUS => 'ENTERPRISE_PLUS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Edition::class, \Google\Cloud\Sql\V1\Settings_Edition::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php deleted file mode 100644 index 3e387860df63..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.sql.v1.Settings.SqlActivationPolicy - */ -class SqlActivationPolicy -{ - /** - * Unknown activation plan. - * - * Generated from protobuf enum SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; - */ - const SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; - /** - * The instance is always up and running. - * - * Generated from protobuf enum ALWAYS = 1; - */ - const ALWAYS = 1; - /** - * The instance never starts. - * - * Generated from protobuf enum NEVER = 2; - */ - const NEVER = 2; - /** - * The instance starts upon receiving requests. - * - * Generated from protobuf enum ON_DEMAND = 3 [deprecated = true]; - */ - const ON_DEMAND = 3; - - private static $valueToName = [ - self::SQL_ACTIVATION_POLICY_UNSPECIFIED => 'SQL_ACTIVATION_POLICY_UNSPECIFIED', - self::ALWAYS => 'ALWAYS', - self::NEVER => 'NEVER', - self::ON_DEMAND => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlActivationPolicy::class, \Google\Cloud\Sql\V1\Settings_SqlActivationPolicy::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php deleted file mode 100644 index 1ce7310f6dca..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlActiveDirectoryConfig - */ -class SqlActiveDirectoryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * This is always sql#activeDirectoryConfig. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The name of the domain (e.g., mydomain.com). - * - * Generated from protobuf field string domain = 2; - */ - protected $domain = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always sql#activeDirectoryConfig. - * @type string $domain - * The name of the domain (e.g., mydomain.com). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always sql#activeDirectoryConfig. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always sql#activeDirectoryConfig. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The name of the domain (e.g., mydomain.com). - * - * Generated from protobuf field string domain = 2; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * The name of the domain (e.g., mydomain.com). - * - * Generated from protobuf field string domain = 2; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php deleted file mode 100644 index 31a166e7bd1e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.sql.v1.SqlAvailabilityType - */ -class SqlAvailabilityType -{ - /** - * This is an unknown Availability type. - * - * Generated from protobuf enum SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; - */ - const SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; - /** - * Zonal available instance. - * - * Generated from protobuf enum ZONAL = 1; - */ - const ZONAL = 1; - /** - * Regional available instance. - * - * Generated from protobuf enum REGIONAL = 2; - */ - const REGIONAL = 2; - - private static $valueToName = [ - self::SQL_AVAILABILITY_TYPE_UNSPECIFIED => 'SQL_AVAILABILITY_TYPE_UNSPECIFIED', - self::ZONAL => 'ZONAL', - self::REGIONAL => 'REGIONAL', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php deleted file mode 100644 index 83410c24b301..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.sql.v1.SqlBackendType - */ -class SqlBackendType -{ - /** - * This is an unknown backend type for instance. - * - * Generated from protobuf enum SQL_BACKEND_TYPE_UNSPECIFIED = 0; - */ - const SQL_BACKEND_TYPE_UNSPECIFIED = 0; - /** - * V1 speckle instance. - * - * Generated from protobuf enum FIRST_GEN = 1 [deprecated = true]; - */ - const FIRST_GEN = 1; - /** - * V2 speckle instance. - * - * Generated from protobuf enum SECOND_GEN = 2; - */ - const SECOND_GEN = 2; - /** - * On premises instance. - * - * Generated from protobuf enum EXTERNAL = 3; - */ - const EXTERNAL = 3; - - private static $valueToName = [ - self::SQL_BACKEND_TYPE_UNSPECIFIED => 'SQL_BACKEND_TYPE_UNSPECIFIED', - self::FIRST_GEN => 'FIRST_GEN', - self::SECOND_GEN => 'SECOND_GEN', - self::EXTERNAL => 'EXTERNAL', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php deleted file mode 100644 index c4c169c2f790..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.sql.v1.SqlBackupKind - */ -class SqlBackupKind -{ - /** - * This is an unknown BackupKind. - * - * Generated from protobuf enum SQL_BACKUP_KIND_UNSPECIFIED = 0; - */ - const SQL_BACKUP_KIND_UNSPECIFIED = 0; - /** - * The snapshot based backups - * - * Generated from protobuf enum SNAPSHOT = 1; - */ - const SNAPSHOT = 1; - /** - * Physical backups - * - * Generated from protobuf enum PHYSICAL = 2; - */ - const PHYSICAL = 2; - - private static $valueToName = [ - self::SQL_BACKUP_KIND_UNSPECIFIED => 'SQL_BACKUP_KIND_UNSPECIFIED', - self::SNAPSHOT => 'SNAPSHOT', - self::PHYSICAL => 'PHYSICAL', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php deleted file mode 100644 index e7d2d6b71be2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.sql.v1.SqlBackupRunStatus - */ -class SqlBackupRunStatus -{ - /** - * The status of the run is unknown. - * - * Generated from protobuf enum SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; - */ - const SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; - /** - * The backup operation was enqueued. - * - * Generated from protobuf enum ENQUEUED = 1; - */ - const ENQUEUED = 1; - /** - * The backup is overdue across a given backup window. Indicates a - * problem. Example: Long-running operation in progress during - * the whole window. - * - * Generated from protobuf enum OVERDUE = 2; - */ - const OVERDUE = 2; - /** - * The backup is in progress. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * The backup failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The backup was successful. - * - * Generated from protobuf enum SUCCESSFUL = 5; - */ - const SUCCESSFUL = 5; - /** - * The backup was skipped (without problems) for a given backup - * window. Example: Instance was idle. - * - * Generated from protobuf enum SKIPPED = 6; - */ - const SKIPPED = 6; - /** - * The backup is about to be deleted. - * - * Generated from protobuf enum DELETION_PENDING = 7; - */ - const DELETION_PENDING = 7; - /** - * The backup deletion failed. - * - * Generated from protobuf enum DELETION_FAILED = 8; - */ - const DELETION_FAILED = 8; - /** - * The backup has been deleted. - * - * Generated from protobuf enum DELETED = 9; - */ - const DELETED = 9; - - private static $valueToName = [ - self::SQL_BACKUP_RUN_STATUS_UNSPECIFIED => 'SQL_BACKUP_RUN_STATUS_UNSPECIFIED', - self::ENQUEUED => 'ENQUEUED', - self::OVERDUE => 'OVERDUE', - self::RUNNING => 'RUNNING', - self::FAILED => 'FAILED', - self::SUCCESSFUL => 'SUCCESSFUL', - self::SKIPPED => 'SKIPPED', - self::DELETION_PENDING => 'DELETION_PENDING', - self::DELETION_FAILED => 'DELETION_FAILED', - self::DELETED => 'DELETED', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php deleted file mode 100644 index af9710f16b4b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.sql.v1.SqlBackupRunType - */ -class SqlBackupRunType -{ - /** - * This is an unknown BackupRun type. - * - * Generated from protobuf enum SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; - */ - const SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; - /** - * The backup schedule automatically triggers a backup. - * - * Generated from protobuf enum AUTOMATED = 1; - */ - const AUTOMATED = 1; - /** - * The user manually triggers a backup. - * - * Generated from protobuf enum ON_DEMAND = 2; - */ - const ON_DEMAND = 2; - - private static $valueToName = [ - self::SQL_BACKUP_RUN_TYPE_UNSPECIFIED => 'SQL_BACKUP_RUN_TYPE_UNSPECIFIED', - self::AUTOMATED => 'AUTOMATED', - self::ON_DEMAND => '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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php deleted file mode 100644 index 3ac692b31491..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.sql.v1.SqlBackupRunsDeleteRequest - */ -class SqlBackupRunsDeleteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the backup run to delete. To find a backup run ID, use the - * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) - * method. - * - * Generated from protobuf field int64 id = 1; - */ - protected $id = 0; - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $id - * The ID of the backup run to delete. To find a backup run ID, use the - * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) - * method. - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the backup run to delete. To find a backup run ID, use the - * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) - * method. - * - * Generated from protobuf field int64 id = 1; - * @return int|string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of the backup run to delete. To find a backup run ID, use the - * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) - * method. - * - * Generated from protobuf field int64 id = 1; - * @param int|string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkInt64($var); - $this->id = $var; - - return $this; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php deleted file mode 100644 index eb84e91a6924..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.SqlBackupRunsGetRequest - */ -class SqlBackupRunsGetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of this backup run. - * - * Generated from protobuf field int64 id = 1; - */ - protected $id = 0; - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $id - * The ID of this backup run. - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); - parent::__construct($data); - } - - /** - * The ID of this backup run. - * - * Generated from protobuf field int64 id = 1; - * @return int|string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of this backup run. - * - * Generated from protobuf field int64 id = 1; - * @param int|string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkInt64($var); - $this->id = $var; - - return $this; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php deleted file mode 100644 index a65e8e21c3d4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlBackupRunsInsertRequest - */ -class SqlBackupRunsInsertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\BackupRun $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; - * @return \Google\Cloud\Sql\V1\BackupRun|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; - * @param \Google\Cloud\Sql\V1\BackupRun $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupRun::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php deleted file mode 100644 index b674e837dd0c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.sql.v1.SqlBackupRunsListRequest - */ -class SqlBackupRunsListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID, or "-" for all instances. This does not include - * the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Maximum number of backup runs per response. - * - * Generated from protobuf field int32 max_results = 2; - */ - protected $max_results = 0; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID, or "-" for all instances. This does not include - * the project ID. - * @type int $max_results - * Maximum number of backup runs per response. - * @type string $page_token - * A previously-returned page token representing part of the larger set of - * results to view. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID, or "-" for all instances. This does not include - * the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID, or "-" for all instances. This does not include - * the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Maximum number of backup runs per response. - * - * Generated from protobuf field int32 max_results = 2; - * @return int - */ - public function getMaxResults() - { - return $this->max_results; - } - - /** - * Maximum number of backup runs per response. - * - * Generated from protobuf field int32 max_results = 2; - * @param int $var - * @return $this - */ - public function setMaxResults($var) - { - GPBUtil::checkInt32($var); - $this->max_results = $var; - - return $this; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * 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; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php deleted file mode 100644 index e1ac52150431..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.sql.v1.SqlDataDiskType - */ -class SqlDataDiskType -{ - /** - * This is an unknown data disk type. - * - * Generated from protobuf enum SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; - */ - const SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; - /** - * An SSD data disk. - * - * Generated from protobuf enum PD_SSD = 1; - */ - const PD_SSD = 1; - /** - * An HDD data disk. - * - * Generated from protobuf enum PD_HDD = 2; - */ - const PD_HDD = 2; - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * Generated from protobuf enum OBSOLETE_LOCAL_SSD = 3 [deprecated = true]; - */ - const OBSOLETE_LOCAL_SSD = 3; - - private static $valueToName = [ - self::SQL_DATA_DISK_TYPE_UNSPECIFIED => 'SQL_DATA_DISK_TYPE_UNSPECIFIED', - self::PD_SSD => 'PD_SSD', - self::PD_HDD => 'PD_HDD', - self::OBSOLETE_LOCAL_SSD => 'OBSOLETE_LOCAL_SSD', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php deleted file mode 100644 index f251191daedb..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php +++ /dev/null @@ -1,348 +0,0 @@ -google.cloud.sql.v1.SqlDatabaseVersion - */ -class SqlDatabaseVersion -{ - /** - * This is an unknown database version. - * - * Generated from protobuf enum SQL_DATABASE_VERSION_UNSPECIFIED = 0; - */ - const SQL_DATABASE_VERSION_UNSPECIFIED = 0; - /** - * The database version is MySQL 5.1. - * - * Generated from protobuf enum MYSQL_5_1 = 2 [deprecated = true]; - */ - const MYSQL_5_1 = 2; - /** - * The database version is MySQL 5.5. - * - * Generated from protobuf enum MYSQL_5_5 = 3 [deprecated = true]; - */ - const MYSQL_5_5 = 3; - /** - * The database version is MySQL 5.6. - * - * Generated from protobuf enum MYSQL_5_6 = 5; - */ - const MYSQL_5_6 = 5; - /** - * The database version is MySQL 5.7. - * - * Generated from protobuf enum MYSQL_5_7 = 6; - */ - const MYSQL_5_7 = 6; - /** - * The database version is SQL Server 2017 Standard. - * - * Generated from protobuf enum SQLSERVER_2017_STANDARD = 11; - */ - const SQLSERVER_2017_STANDARD = 11; - /** - * The database version is SQL Server 2017 Enterprise. - * - * Generated from protobuf enum SQLSERVER_2017_ENTERPRISE = 14; - */ - const SQLSERVER_2017_ENTERPRISE = 14; - /** - * The database version is SQL Server 2017 Express. - * - * Generated from protobuf enum SQLSERVER_2017_EXPRESS = 15; - */ - const SQLSERVER_2017_EXPRESS = 15; - /** - * The database version is SQL Server 2017 Web. - * - * Generated from protobuf enum SQLSERVER_2017_WEB = 16; - */ - const SQLSERVER_2017_WEB = 16; - /** - * The database version is PostgreSQL 9.6. - * - * Generated from protobuf enum POSTGRES_9_6 = 9; - */ - const POSTGRES_9_6 = 9; - /** - * The database version is PostgreSQL 10. - * - * Generated from protobuf enum POSTGRES_10 = 18; - */ - const POSTGRES_10 = 18; - /** - * The database version is PostgreSQL 11. - * - * Generated from protobuf enum POSTGRES_11 = 10; - */ - const POSTGRES_11 = 10; - /** - * The database version is PostgreSQL 12. - * - * Generated from protobuf enum POSTGRES_12 = 19; - */ - const POSTGRES_12 = 19; - /** - * The database version is PostgreSQL 13. - * - * Generated from protobuf enum POSTGRES_13 = 23; - */ - const POSTGRES_13 = 23; - /** - * The database version is PostgreSQL 14. - * - * Generated from protobuf enum POSTGRES_14 = 110; - */ - const POSTGRES_14 = 110; - /** - * The database version is PostgreSQL 15. - * - * Generated from protobuf enum POSTGRES_15 = 172; - */ - const POSTGRES_15 = 172; - /** - * The database version is PostgreSQL 16. - * - * Generated from protobuf enum POSTGRES_16 = 272; - */ - const POSTGRES_16 = 272; - /** - * The database version is MySQL 8. - * - * Generated from protobuf enum MYSQL_8_0 = 20; - */ - const MYSQL_8_0 = 20; - /** - * The database major version is MySQL 8.0 and the minor version is 18. - * - * Generated from protobuf enum MYSQL_8_0_18 = 41; - */ - const MYSQL_8_0_18 = 41; - /** - * The database major version is MySQL 8.0 and the minor version is 26. - * - * Generated from protobuf enum MYSQL_8_0_26 = 85; - */ - const MYSQL_8_0_26 = 85; - /** - * The database major version is MySQL 8.0 and the minor version is 27. - * - * Generated from protobuf enum MYSQL_8_0_27 = 111; - */ - const MYSQL_8_0_27 = 111; - /** - * The database major version is MySQL 8.0 and the minor version is 28. - * - * Generated from protobuf enum MYSQL_8_0_28 = 132; - */ - const MYSQL_8_0_28 = 132; - /** - * The database major version is MySQL 8.0 and the minor version is 29. - * - * Generated from protobuf enum MYSQL_8_0_29 = 148 [deprecated = true]; - */ - const MYSQL_8_0_29 = 148; - /** - * The database major version is MySQL 8.0 and the minor version is 30. - * - * Generated from protobuf enum MYSQL_8_0_30 = 174; - */ - const MYSQL_8_0_30 = 174; - /** - * The database major version is MySQL 8.0 and the minor version is 31. - * - * Generated from protobuf enum MYSQL_8_0_31 = 197; - */ - const MYSQL_8_0_31 = 197; - /** - * The database major version is MySQL 8.0 and the minor version is 32. - * - * Generated from protobuf enum MYSQL_8_0_32 = 213; - */ - const MYSQL_8_0_32 = 213; - /** - * The database major version is MySQL 8.0 and the minor version is 33. - * - * Generated from protobuf enum MYSQL_8_0_33 = 238; - */ - const MYSQL_8_0_33 = 238; - /** - * The database major version is MySQL 8.0 and the minor version is 34. - * - * Generated from protobuf enum MYSQL_8_0_34 = 239; - */ - const MYSQL_8_0_34 = 239; - /** - * The database major version is MySQL 8.0 and the minor version is 35. - * - * Generated from protobuf enum MYSQL_8_0_35 = 240; - */ - const MYSQL_8_0_35 = 240; - /** - * The database major version is MySQL 8.0 and the minor version is 36. - * - * Generated from protobuf enum MYSQL_8_0_36 = 241; - */ - const MYSQL_8_0_36 = 241; - /** - * The database major version is MySQL 8.0 and the minor version is 37. - * - * Generated from protobuf enum MYSQL_8_0_37 = 355; - */ - const MYSQL_8_0_37 = 355; - /** - * The database major version is MySQL 8.0 and the minor version is 38. - * - * Generated from protobuf enum MYSQL_8_0_38 = 356; - */ - const MYSQL_8_0_38 = 356; - /** - * The database major version is MySQL 8.0 and the minor version is 39. - * - * Generated from protobuf enum MYSQL_8_0_39 = 357; - */ - const MYSQL_8_0_39 = 357; - /** - * The database major version is MySQL 8.0 and the minor version is 40. - * - * Generated from protobuf enum MYSQL_8_0_40 = 358; - */ - const MYSQL_8_0_40 = 358; - /** - * The database version is MySQL 8.4. - * - * Generated from protobuf enum MYSQL_8_4 = 398; - */ - const MYSQL_8_4 = 398; - /** - * The database version is MySQL 8.4 and the patch version is 0. - * - * Generated from protobuf enum MYSQL_8_4_0 = 399; - */ - const MYSQL_8_4_0 = 399; - /** - * The database version is SQL Server 2019 Standard. - * - * Generated from protobuf enum SQLSERVER_2019_STANDARD = 26; - */ - const SQLSERVER_2019_STANDARD = 26; - /** - * The database version is SQL Server 2019 Enterprise. - * - * Generated from protobuf enum SQLSERVER_2019_ENTERPRISE = 27; - */ - const SQLSERVER_2019_ENTERPRISE = 27; - /** - * The database version is SQL Server 2019 Express. - * - * Generated from protobuf enum SQLSERVER_2019_EXPRESS = 28; - */ - const SQLSERVER_2019_EXPRESS = 28; - /** - * The database version is SQL Server 2019 Web. - * - * Generated from protobuf enum SQLSERVER_2019_WEB = 29; - */ - const SQLSERVER_2019_WEB = 29; - /** - * The database version is SQL Server 2022 Standard. - * - * Generated from protobuf enum SQLSERVER_2022_STANDARD = 199; - */ - const SQLSERVER_2022_STANDARD = 199; - /** - * The database version is SQL Server 2022 Enterprise. - * - * Generated from protobuf enum SQLSERVER_2022_ENTERPRISE = 200; - */ - const SQLSERVER_2022_ENTERPRISE = 200; - /** - * The database version is SQL Server 2022 Express. - * - * Generated from protobuf enum SQLSERVER_2022_EXPRESS = 201; - */ - const SQLSERVER_2022_EXPRESS = 201; - /** - * The database version is SQL Server 2022 Web. - * - * Generated from protobuf enum SQLSERVER_2022_WEB = 202; - */ - const SQLSERVER_2022_WEB = 202; - - private static $valueToName = [ - self::SQL_DATABASE_VERSION_UNSPECIFIED => 'SQL_DATABASE_VERSION_UNSPECIFIED', - self::MYSQL_5_1 => 'MYSQL_5_1', - self::MYSQL_5_5 => 'MYSQL_5_5', - self::MYSQL_5_6 => 'MYSQL_5_6', - self::MYSQL_5_7 => 'MYSQL_5_7', - self::SQLSERVER_2017_STANDARD => 'SQLSERVER_2017_STANDARD', - self::SQLSERVER_2017_ENTERPRISE => 'SQLSERVER_2017_ENTERPRISE', - self::SQLSERVER_2017_EXPRESS => 'SQLSERVER_2017_EXPRESS', - self::SQLSERVER_2017_WEB => 'SQLSERVER_2017_WEB', - self::POSTGRES_9_6 => 'POSTGRES_9_6', - self::POSTGRES_10 => 'POSTGRES_10', - self::POSTGRES_11 => 'POSTGRES_11', - self::POSTGRES_12 => 'POSTGRES_12', - self::POSTGRES_13 => 'POSTGRES_13', - self::POSTGRES_14 => 'POSTGRES_14', - self::POSTGRES_15 => 'POSTGRES_15', - self::POSTGRES_16 => 'POSTGRES_16', - self::MYSQL_8_0 => 'MYSQL_8_0', - self::MYSQL_8_0_18 => 'MYSQL_8_0_18', - self::MYSQL_8_0_26 => 'MYSQL_8_0_26', - self::MYSQL_8_0_27 => 'MYSQL_8_0_27', - self::MYSQL_8_0_28 => 'MYSQL_8_0_28', - self::MYSQL_8_0_29 => 'MYSQL_8_0_29', - self::MYSQL_8_0_30 => 'MYSQL_8_0_30', - self::MYSQL_8_0_31 => 'MYSQL_8_0_31', - self::MYSQL_8_0_32 => 'MYSQL_8_0_32', - self::MYSQL_8_0_33 => 'MYSQL_8_0_33', - self::MYSQL_8_0_34 => 'MYSQL_8_0_34', - self::MYSQL_8_0_35 => 'MYSQL_8_0_35', - self::MYSQL_8_0_36 => 'MYSQL_8_0_36', - self::MYSQL_8_0_37 => 'MYSQL_8_0_37', - self::MYSQL_8_0_38 => 'MYSQL_8_0_38', - self::MYSQL_8_0_39 => 'MYSQL_8_0_39', - self::MYSQL_8_0_40 => 'MYSQL_8_0_40', - self::MYSQL_8_4 => 'MYSQL_8_4', - self::MYSQL_8_4_0 => 'MYSQL_8_4_0', - self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD', - self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE', - self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS', - self::SQLSERVER_2019_WEB => 'SQLSERVER_2019_WEB', - self::SQLSERVER_2022_STANDARD => 'SQLSERVER_2022_STANDARD', - self::SQLSERVER_2022_ENTERPRISE => 'SQLSERVER_2022_ENTERPRISE', - self::SQLSERVER_2022_EXPRESS => 'SQLSERVER_2022_EXPRESS', - self::SQLSERVER_2022_WEB => 'SQLSERVER_2022_WEB', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php deleted file mode 100644 index 503872be9d28..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.SqlDatabasesDeleteRequest - */ -class SqlDatabasesDeleteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the database to be deleted in the instance. - * - * Generated from protobuf field string database = 1; - */ - protected $database = ''; - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Name of the database to be deleted in the instance. - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); - parent::__construct($data); - } - - /** - * Name of the database to be deleted in the instance. - * - * Generated from protobuf field string database = 1; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Name of the database to be deleted in the instance. - * - * Generated from protobuf field string database = 1; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php deleted file mode 100644 index b208cae08bf2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.SqlDatabasesGetRequest - */ -class SqlDatabasesGetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the database in the instance. - * - * Generated from protobuf field string database = 1; - */ - protected $database = ''; - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Name of the database in the instance. - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); - parent::__construct($data); - } - - /** - * Name of the database in the instance. - * - * Generated from protobuf field string database = 1; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Name of the database in the instance. - * - * Generated from protobuf field string database = 1; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php deleted file mode 100644 index c2537d9d5edc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlDatabasesInsertRequest - */ -class SqlDatabasesInsertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\Database $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); - parent::__construct($data); - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; - * @return \Google\Cloud\Sql\V1\Database|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; - * @param \Google\Cloud\Sql\V1\Database $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Database::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php deleted file mode 100644 index e9163885e1c2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlDatabasesListRequest - */ -class SqlDatabasesListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php deleted file mode 100644 index c8f2042a8b84..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.sql.v1.SqlDatabasesUpdateRequest - */ -class SqlDatabasesUpdateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the database to be updated in the instance. - * - * Generated from protobuf field string database = 1; - */ - protected $database = ''; - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Name of the database to be updated in the instance. - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\Database $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); - parent::__construct($data); - } - - /** - * Name of the database to be updated in the instance. - * - * Generated from protobuf field string database = 1; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Name of the database to be updated in the instance. - * - * Generated from protobuf field string database = 1; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; - * @return \Google\Cloud\Sql\V1\Database|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; - * @param \Google\Cloud\Sql\V1\Database $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Database::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php deleted file mode 100644 index 2bfbb89ddbc3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.sql.v1.SqlExternalSyncSettingError - */ -class SqlExternalSyncSettingError extends \Google\Protobuf\Internal\Message -{ - /** - * Can be `sql#externalSyncSettingError` or - * `sql#externalSyncSettingWarning`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Identifies the specific error that occurred. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; - */ - protected $type = 0; - /** - * Additional information about the error encountered. - * - * Generated from protobuf field string detail = 3; - */ - protected $detail = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * Can be `sql#externalSyncSettingError` or - * `sql#externalSyncSettingWarning`. - * @type int $type - * Identifies the specific error that occurred. - * @type string $detail - * Additional information about the error encountered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Can be `sql#externalSyncSettingError` or - * `sql#externalSyncSettingWarning`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Can be `sql#externalSyncSettingError` or - * `sql#externalSyncSettingWarning`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Identifies the specific error that occurred. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Identifies the specific error that occurred. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError\SqlExternalSyncSettingErrorType::class); - $this->type = $var; - - return $this; - } - - /** - * Additional information about the error encountered. - * - * Generated from protobuf field string detail = 3; - * @return string - */ - public function getDetail() - { - return $this->detail; - } - - /** - * Additional information about the error encountered. - * - * Generated from protobuf field string detail = 3; - * @param string $var - * @return $this - */ - public function setDetail($var) - { - GPBUtil::checkString($var, True); - $this->detail = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php deleted file mode 100644 index 81c020c0fcfc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php +++ /dev/null @@ -1,402 +0,0 @@ -google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType - */ -class SqlExternalSyncSettingErrorType -{ - /** - * Generated from protobuf enum SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; - */ - const SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum CONNECTION_FAILURE = 1; - */ - const CONNECTION_FAILURE = 1; - /** - * Generated from protobuf enum BINLOG_NOT_ENABLED = 2; - */ - const BINLOG_NOT_ENABLED = 2; - /** - * Generated from protobuf enum INCOMPATIBLE_DATABASE_VERSION = 3; - */ - const INCOMPATIBLE_DATABASE_VERSION = 3; - /** - * Generated from protobuf enum REPLICA_ALREADY_SETUP = 4; - */ - const REPLICA_ALREADY_SETUP = 4; - /** - * The replication user is missing privileges that are required. - * - * Generated from protobuf enum INSUFFICIENT_PRIVILEGE = 5; - */ - const INSUFFICIENT_PRIVILEGE = 5; - /** - * Unsupported migration type. - * - * Generated from protobuf enum UNSUPPORTED_MIGRATION_TYPE = 6; - */ - const UNSUPPORTED_MIGRATION_TYPE = 6; - /** - * No pglogical extension installed on databases, applicable for postgres. - * - * Generated from protobuf enum NO_PGLOGICAL_INSTALLED = 7; - */ - const NO_PGLOGICAL_INSTALLED = 7; - /** - * pglogical node already exists on databases, applicable for postgres. - * - * Generated from protobuf enum PGLOGICAL_NODE_ALREADY_EXISTS = 8; - */ - const PGLOGICAL_NODE_ALREADY_EXISTS = 8; - /** - * The value of parameter wal_level is not set to logical. - * - * Generated from protobuf enum INVALID_WAL_LEVEL = 9; - */ - const INVALID_WAL_LEVEL = 9; - /** - * The value of parameter shared_preload_libraries does not include - * pglogical. - * - * Generated from protobuf enum INVALID_SHARED_PRELOAD_LIBRARY = 10; - */ - const INVALID_SHARED_PRELOAD_LIBRARY = 10; - /** - * The value of parameter max_replication_slots is not sufficient. - * - * Generated from protobuf enum INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; - */ - const INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; - /** - * The value of parameter max_wal_senders is not sufficient. - * - * Generated from protobuf enum INSUFFICIENT_MAX_WAL_SENDERS = 12; - */ - const INSUFFICIENT_MAX_WAL_SENDERS = 12; - /** - * The value of parameter max_worker_processes is not sufficient. - * - * Generated from protobuf enum INSUFFICIENT_MAX_WORKER_PROCESSES = 13; - */ - const INSUFFICIENT_MAX_WORKER_PROCESSES = 13; - /** - * Extensions installed are either not supported or having unsupported - * versions. - * - * Generated from protobuf enum UNSUPPORTED_EXTENSIONS = 14; - */ - const UNSUPPORTED_EXTENSIONS = 14; - /** - * The value of parameter rds.logical_replication is not set to 1. - * - * Generated from protobuf enum INVALID_RDS_LOGICAL_REPLICATION = 15; - */ - const INVALID_RDS_LOGICAL_REPLICATION = 15; - /** - * The primary instance logging setup doesn't allow EM sync. - * - * Generated from protobuf enum INVALID_LOGGING_SETUP = 16; - */ - const INVALID_LOGGING_SETUP = 16; - /** - * The primary instance database parameter setup doesn't allow EM sync. - * - * Generated from protobuf enum INVALID_DB_PARAM = 17; - */ - const INVALID_DB_PARAM = 17; - /** - * The gtid_mode is not supported, applicable for MySQL. - * - * Generated from protobuf enum UNSUPPORTED_GTID_MODE = 18; - */ - const UNSUPPORTED_GTID_MODE = 18; - /** - * SQL Server Agent is not running. - * - * Generated from protobuf enum SQLSERVER_AGENT_NOT_RUNNING = 19; - */ - const SQLSERVER_AGENT_NOT_RUNNING = 19; - /** - * The table definition is not support due to missing primary key or replica - * identity, applicable for postgres. - * - * Generated from protobuf enum UNSUPPORTED_TABLE_DEFINITION = 20; - */ - const UNSUPPORTED_TABLE_DEFINITION = 20; - /** - * The customer has a definer that will break EM setup. - * - * Generated from protobuf enum UNSUPPORTED_DEFINER = 21; - */ - const UNSUPPORTED_DEFINER = 21; - /** - * SQL Server @@SERVERNAME does not match actual host name. - * - * Generated from protobuf enum SQLSERVER_SERVERNAME_MISMATCH = 22; - */ - const SQLSERVER_SERVERNAME_MISMATCH = 22; - /** - * The primary instance has been setup and will fail the setup. - * - * Generated from protobuf enum PRIMARY_ALREADY_SETUP = 23; - */ - const PRIMARY_ALREADY_SETUP = 23; - /** - * The primary instance has unsupported binary log format. - * - * Generated from protobuf enum UNSUPPORTED_BINLOG_FORMAT = 24; - */ - const UNSUPPORTED_BINLOG_FORMAT = 24; - /** - * The primary instance's binary log retention setting. - * - * Generated from protobuf enum BINLOG_RETENTION_SETTING = 25; - */ - const BINLOG_RETENTION_SETTING = 25; - /** - * The primary instance has tables with unsupported storage engine. - * - * Generated from protobuf enum UNSUPPORTED_STORAGE_ENGINE = 26; - */ - const UNSUPPORTED_STORAGE_ENGINE = 26; - /** - * Source has tables with limited support - * eg: PostgreSQL tables without primary keys. - * - * Generated from protobuf enum LIMITED_SUPPORT_TABLES = 27; - */ - const LIMITED_SUPPORT_TABLES = 27; - /** - * The replica instance contains existing data. - * - * Generated from protobuf enum EXISTING_DATA_IN_REPLICA = 28; - */ - const EXISTING_DATA_IN_REPLICA = 28; - /** - * The replication user is missing privileges that are optional. - * - * Generated from protobuf enum MISSING_OPTIONAL_PRIVILEGES = 29; - */ - const MISSING_OPTIONAL_PRIVILEGES = 29; - /** - * Additional BACKUP_ADMIN privilege is granted to the replication user - * which may lock source MySQL 8 instance for DDLs during initial sync. - * - * Generated from protobuf enum RISKY_BACKUP_ADMIN_PRIVILEGE = 30; - */ - const RISKY_BACKUP_ADMIN_PRIVILEGE = 30; - /** - * The Cloud Storage bucket is missing necessary permissions. - * - * Generated from protobuf enum INSUFFICIENT_GCS_PERMISSIONS = 31; - */ - const INSUFFICIENT_GCS_PERMISSIONS = 31; - /** - * The Cloud Storage bucket has an error in the file or contains invalid - * file information. - * - * Generated from protobuf enum INVALID_FILE_INFO = 32; - */ - const INVALID_FILE_INFO = 32; - /** - * The source instance has unsupported database settings for migration. - * - * Generated from protobuf enum UNSUPPORTED_DATABASE_SETTINGS = 33; - */ - const UNSUPPORTED_DATABASE_SETTINGS = 33; - /** - * The replication user is missing parallel import specific privileges. - * (e.g. LOCK TABLES) for MySQL. - * - * Generated from protobuf enum MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; - */ - const MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; - /** - * The global variable local_infile is off on external server replica. - * - * Generated from protobuf enum LOCAL_INFILE_OFF = 35; - */ - const LOCAL_INFILE_OFF = 35; - /** - * This code instructs customers to turn on point-in-time recovery manually - * for the instance after promoting the Cloud SQL for PostgreSQL instance. - * - * Generated from protobuf enum TURN_ON_PITR_AFTER_PROMOTE = 36; - */ - const TURN_ON_PITR_AFTER_PROMOTE = 36; - /** - * The minor version of replica database is incompatible with the source. - * - * Generated from protobuf enum INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; - */ - const INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; - /** - * This warning message indicates that Cloud SQL uses the maximum number of - * subscriptions to migrate data from the source to the destination. - * - * Generated from protobuf enum SOURCE_MAX_SUBSCRIPTIONS = 38; - */ - const SOURCE_MAX_SUBSCRIPTIONS = 38; - /** - * Unable to verify definers on the source for MySQL. - * - * Generated from protobuf enum UNABLE_TO_VERIFY_DEFINERS = 39; - */ - const UNABLE_TO_VERIFY_DEFINERS = 39; - /** - * If a time out occurs while the subscription counts are calculated, then - * this value is set to 1. Otherwise, this value is set to 2. - * - * Generated from protobuf enum SUBSCRIPTION_CALCULATION_STATUS = 40; - */ - const SUBSCRIPTION_CALCULATION_STATUS = 40; - /** - * Count of subscriptions needed to sync source data for PostgreSQL - * database. - * - * Generated from protobuf enum PG_SUBSCRIPTION_COUNT = 41; - */ - const PG_SUBSCRIPTION_COUNT = 41; - /** - * Final parallel level that is used to do migration. - * - * Generated from protobuf enum PG_SYNC_PARALLEL_LEVEL = 42; - */ - const PG_SYNC_PARALLEL_LEVEL = 42; - /** - * The disk size of the replica instance is smaller than the data size of - * the source instance. - * - * Generated from protobuf enum INSUFFICIENT_DISK_SIZE = 43; - */ - const INSUFFICIENT_DISK_SIZE = 43; - /** - * The data size of the source instance is greater than 1 TB, the number of - * cores of the replica instance is less than 8, and the memory of the - * replica is less than 32 GB. - * - * Generated from protobuf enum INSUFFICIENT_MACHINE_TIER = 44; - */ - const INSUFFICIENT_MACHINE_TIER = 44; - /** - * The warning message indicates the unsupported extensions will not be - * migrated to the destination. - * - * Generated from protobuf enum UNSUPPORTED_EXTENSIONS_NOT_MIGRATED = 45; - */ - const UNSUPPORTED_EXTENSIONS_NOT_MIGRATED = 45; - /** - * The warning message indicates the pg_cron extension and settings will not - * be migrated to the destination. - * - * Generated from protobuf enum EXTENSIONS_NOT_MIGRATED = 46; - */ - const EXTENSIONS_NOT_MIGRATED = 46; - /** - * The error message indicates that pg_cron flags are enabled on the - * destination which is not supported during the migration. - * - * Generated from protobuf enum PG_CRON_FLAG_ENABLED_IN_REPLICA = 47; - */ - const PG_CRON_FLAG_ENABLED_IN_REPLICA = 47; - /** - * This error message indicates that the specified extensions are not - * enabled on destination instance. For example, before you can migrate - * data to the destination instance, you must enable the PGAudit extension - * on the instance. - * - * Generated from protobuf enum EXTENSIONS_NOT_ENABLED_IN_REPLICA = 48; - */ - const EXTENSIONS_NOT_ENABLED_IN_REPLICA = 48; - /** - * The source database has generated columns that can't be migrated. Please - * change them to regular columns before migration. - * - * Generated from protobuf enum UNSUPPORTED_COLUMNS = 49; - */ - const UNSUPPORTED_COLUMNS = 49; - - private static $valueToName = [ - self::SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED => 'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED', - self::CONNECTION_FAILURE => 'CONNECTION_FAILURE', - self::BINLOG_NOT_ENABLED => 'BINLOG_NOT_ENABLED', - self::INCOMPATIBLE_DATABASE_VERSION => 'INCOMPATIBLE_DATABASE_VERSION', - self::REPLICA_ALREADY_SETUP => 'REPLICA_ALREADY_SETUP', - self::INSUFFICIENT_PRIVILEGE => 'INSUFFICIENT_PRIVILEGE', - self::UNSUPPORTED_MIGRATION_TYPE => 'UNSUPPORTED_MIGRATION_TYPE', - self::NO_PGLOGICAL_INSTALLED => 'NO_PGLOGICAL_INSTALLED', - self::PGLOGICAL_NODE_ALREADY_EXISTS => 'PGLOGICAL_NODE_ALREADY_EXISTS', - self::INVALID_WAL_LEVEL => 'INVALID_WAL_LEVEL', - self::INVALID_SHARED_PRELOAD_LIBRARY => 'INVALID_SHARED_PRELOAD_LIBRARY', - self::INSUFFICIENT_MAX_REPLICATION_SLOTS => 'INSUFFICIENT_MAX_REPLICATION_SLOTS', - self::INSUFFICIENT_MAX_WAL_SENDERS => 'INSUFFICIENT_MAX_WAL_SENDERS', - self::INSUFFICIENT_MAX_WORKER_PROCESSES => 'INSUFFICIENT_MAX_WORKER_PROCESSES', - self::UNSUPPORTED_EXTENSIONS => 'UNSUPPORTED_EXTENSIONS', - self::INVALID_RDS_LOGICAL_REPLICATION => 'INVALID_RDS_LOGICAL_REPLICATION', - self::INVALID_LOGGING_SETUP => 'INVALID_LOGGING_SETUP', - self::INVALID_DB_PARAM => 'INVALID_DB_PARAM', - self::UNSUPPORTED_GTID_MODE => 'UNSUPPORTED_GTID_MODE', - self::SQLSERVER_AGENT_NOT_RUNNING => 'SQLSERVER_AGENT_NOT_RUNNING', - self::UNSUPPORTED_TABLE_DEFINITION => 'UNSUPPORTED_TABLE_DEFINITION', - self::UNSUPPORTED_DEFINER => 'UNSUPPORTED_DEFINER', - self::SQLSERVER_SERVERNAME_MISMATCH => 'SQLSERVER_SERVERNAME_MISMATCH', - self::PRIMARY_ALREADY_SETUP => 'PRIMARY_ALREADY_SETUP', - self::UNSUPPORTED_BINLOG_FORMAT => 'UNSUPPORTED_BINLOG_FORMAT', - self::BINLOG_RETENTION_SETTING => 'BINLOG_RETENTION_SETTING', - self::UNSUPPORTED_STORAGE_ENGINE => 'UNSUPPORTED_STORAGE_ENGINE', - self::LIMITED_SUPPORT_TABLES => 'LIMITED_SUPPORT_TABLES', - self::EXISTING_DATA_IN_REPLICA => 'EXISTING_DATA_IN_REPLICA', - self::MISSING_OPTIONAL_PRIVILEGES => 'MISSING_OPTIONAL_PRIVILEGES', - self::RISKY_BACKUP_ADMIN_PRIVILEGE => 'RISKY_BACKUP_ADMIN_PRIVILEGE', - self::INSUFFICIENT_GCS_PERMISSIONS => 'INSUFFICIENT_GCS_PERMISSIONS', - self::INVALID_FILE_INFO => 'INVALID_FILE_INFO', - self::UNSUPPORTED_DATABASE_SETTINGS => 'UNSUPPORTED_DATABASE_SETTINGS', - self::MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE => 'MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE', - self::LOCAL_INFILE_OFF => 'LOCAL_INFILE_OFF', - self::TURN_ON_PITR_AFTER_PROMOTE => 'TURN_ON_PITR_AFTER_PROMOTE', - self::INCOMPATIBLE_DATABASE_MINOR_VERSION => 'INCOMPATIBLE_DATABASE_MINOR_VERSION', - self::SOURCE_MAX_SUBSCRIPTIONS => 'SOURCE_MAX_SUBSCRIPTIONS', - self::UNABLE_TO_VERIFY_DEFINERS => 'UNABLE_TO_VERIFY_DEFINERS', - self::SUBSCRIPTION_CALCULATION_STATUS => 'SUBSCRIPTION_CALCULATION_STATUS', - self::PG_SUBSCRIPTION_COUNT => 'PG_SUBSCRIPTION_COUNT', - self::PG_SYNC_PARALLEL_LEVEL => 'PG_SYNC_PARALLEL_LEVEL', - self::INSUFFICIENT_DISK_SIZE => 'INSUFFICIENT_DISK_SIZE', - self::INSUFFICIENT_MACHINE_TIER => 'INSUFFICIENT_MACHINE_TIER', - self::UNSUPPORTED_EXTENSIONS_NOT_MIGRATED => 'UNSUPPORTED_EXTENSIONS_NOT_MIGRATED', - self::EXTENSIONS_NOT_MIGRATED => 'EXTENSIONS_NOT_MIGRATED', - self::PG_CRON_FLAG_ENABLED_IN_REPLICA => 'PG_CRON_FLAG_ENABLED_IN_REPLICA', - self::EXTENSIONS_NOT_ENABLED_IN_REPLICA => 'EXTENSIONS_NOT_ENABLED_IN_REPLICA', - self::UNSUPPORTED_COLUMNS => 'UNSUPPORTED_COLUMNS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlExternalSyncSettingErrorType::class, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError_SqlExternalSyncSettingErrorType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php deleted file mode 100644 index 724da57f17ba..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.sql.v1.SqlFileType - */ -class SqlFileType -{ - /** - * Unknown file type. - * - * Generated from protobuf enum SQL_FILE_TYPE_UNSPECIFIED = 0; - */ - const SQL_FILE_TYPE_UNSPECIFIED = 0; - /** - * File containing SQL statements. - * - * Generated from protobuf enum SQL = 1; - */ - const SQL = 1; - /** - * File in CSV format. - * - * Generated from protobuf enum CSV = 2; - */ - const CSV = 2; - /** - * Generated from protobuf enum BAK = 4; - */ - const BAK = 4; - - private static $valueToName = [ - self::SQL_FILE_TYPE_UNSPECIFIED => 'SQL_FILE_TYPE_UNSPECIFIED', - self::SQL => 'SQL', - self::CSV => 'CSV', - self::BAK => 'BAK', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php deleted file mode 100644 index 7c6f2f5685a9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.sql.v1.SqlFlagType - */ -class SqlFlagType -{ - /** - * This is an unknown flag type. - * - * Generated from protobuf enum SQL_FLAG_TYPE_UNSPECIFIED = 0; - */ - const SQL_FLAG_TYPE_UNSPECIFIED = 0; - /** - * Boolean type flag. - * - * Generated from protobuf enum BOOLEAN = 1; - */ - const BOOLEAN = 1; - /** - * String type flag. - * - * Generated from protobuf enum STRING = 2; - */ - const STRING = 2; - /** - * Integer type flag. - * - * Generated from protobuf enum INTEGER = 3; - */ - const INTEGER = 3; - /** - * Flag type used for a server startup option. - * - * Generated from protobuf enum NONE = 4; - */ - const NONE = 4; - /** - * Type introduced specially for MySQL TimeZone offset. Accept a string value - * with the format [-12:59, 13:00]. - * - * Generated from protobuf enum MYSQL_TIMEZONE_OFFSET = 5; - */ - const MYSQL_TIMEZONE_OFFSET = 5; - /** - * Float type flag. - * - * Generated from protobuf enum FLOAT = 6; - */ - const FLOAT = 6; - /** - * Comma-separated list of the strings in a SqlFlagType enum. - * - * Generated from protobuf enum REPEATED_STRING = 7; - */ - const REPEATED_STRING = 7; - - private static $valueToName = [ - self::SQL_FLAG_TYPE_UNSPECIFIED => 'SQL_FLAG_TYPE_UNSPECIFIED', - self::BOOLEAN => 'BOOLEAN', - self::STRING => 'STRING', - self::INTEGER => 'INTEGER', - self::NONE => 'NONE', - self::MYSQL_TIMEZONE_OFFSET => 'MYSQL_TIMEZONE_OFFSET', - self::FLOAT => 'FLOAT', - self::REPEATED_STRING => 'REPEATED_STRING', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php deleted file mode 100644 index 329b62db5183..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.sql.v1.SqlFlagsListRequest - */ -class SqlFlagsListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Database type and version you want to retrieve flags for. By default, this - * method returns flags for all database types and versions. - * - * Generated from protobuf field string database_version = 1; - */ - protected $database_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database_version - * Database type and version you want to retrieve flags for. By default, this - * method returns flags for all database types and versions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); - parent::__construct($data); - } - - /** - * Database type and version you want to retrieve flags for. By default, this - * method returns flags for all database types and versions. - * - * Generated from protobuf field string database_version = 1; - * @return string - */ - public function getDatabaseVersion() - { - return $this->database_version; - } - - /** - * Database type and version you want to retrieve flags for. By default, this - * method returns flags for all database types and versions. - * - * Generated from protobuf field string database_version = 1; - * @param string $var - * @return $this - */ - public function setDatabaseVersion($var) - { - GPBUtil::checkString($var, True); - $this->database_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php deleted file mode 100644 index 983f95a0d726..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.sql.v1.SqlInstanceType - */ -class SqlInstanceType -{ - /** - * This is an unknown Cloud SQL instance type. - * - * Generated from protobuf enum SQL_INSTANCE_TYPE_UNSPECIFIED = 0; - */ - const SQL_INSTANCE_TYPE_UNSPECIFIED = 0; - /** - * A regular Cloud SQL instance that is not replicating from a primary - * instance. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 1; - */ - const CLOUD_SQL_INSTANCE = 1; - /** - * An instance running on the customer's premises that is not managed by - * Cloud SQL. - * - * Generated from protobuf enum ON_PREMISES_INSTANCE = 2; - */ - const ON_PREMISES_INSTANCE = 2; - /** - * A Cloud SQL instance acting as a read-replica. - * - * Generated from protobuf enum READ_REPLICA_INSTANCE = 3; - */ - const READ_REPLICA_INSTANCE = 3; - - private static $valueToName = [ - self::SQL_INSTANCE_TYPE_UNSPECIFIED => 'SQL_INSTANCE_TYPE_UNSPECIFIED', - self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', - self::ON_PREMISES_INSTANCE => 'ON_PREMISES_INSTANCE', - self::READ_REPLICA_INSTANCE => 'READ_REPLICA_INSTANCE', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php deleted file mode 100644 index cab0a2bad6f7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest - */ -class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Cloud SQL instance ID. This doesn't include the project ID. It's - * composed of lowercase letters, numbers, and hyphens, and it must start with - * a letter. The total length must be 98 characters or less (Example: - * instance-id). - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = ''; - /** - * Required. Project ID of the project that contains the instance (Example: - * project-id). - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - /** - * Required. The request body. - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Required. Cloud SQL instance ID. This doesn't include the project ID. It's - * composed of lowercase letters, numbers, and hyphens, and it must start with - * a letter. The total length must be 98 characters or less (Example: - * instance-id). - * @type string $project - * Required. Project ID of the project that contains the instance (Example: - * project-id). - * @type \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $body - * Required. The request body. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Required. Cloud SQL instance ID. This doesn't include the project ID. It's - * composed of lowercase letters, numbers, and hyphens, and it must start with - * a letter. The total length must be 98 characters or less (Example: - * instance-id). - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Required. Cloud SQL instance ID. This doesn't include the project ID. It's - * composed of lowercase letters, numbers, and hyphens, and it must start with - * a letter. The total length must be 98 characters or less (Example: - * instance-id). - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Required. Project ID of the project that contains the instance (Example: - * project-id). - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. Project ID of the project that contains the instance (Example: - * project-id). - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Required. The request body. - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Required. The request body. - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php deleted file mode 100644 index 95b0265ee5c4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseResponse - */ -class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier for this operation. - * - * Generated from protobuf field string operation_id = 1; - */ - protected $operation_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation_id - * The unique identifier for this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier for this operation. - * - * Generated from protobuf field string operation_id = 1; - * @return string - */ - public function getOperationId() - { - return $this->operation_id; - } - - /** - * The unique identifier for this operation. - * - * Generated from protobuf field string operation_id = 1; - * @param string $var - * @return $this - */ - public function setOperationId($var) - { - GPBUtil::checkString($var, True); - $this->operation_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php deleted file mode 100644 index 3fd7548f2b0f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesAddServerCaRequest - */ -class SqlInstancesAddServerCaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php deleted file mode 100644 index f7ca7510d738..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.sql.v1.SqlInstancesCloneRequest - */ -class SqlInstancesCloneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the Cloud SQL instance to be cloned (source). This does not - * include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the source as well as the clone Cloud SQL instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * The ID of the Cloud SQL instance to be cloned (source). This does not - * include the project ID. - * @type string $project - * Project ID of the source as well as the clone Cloud SQL instance. - * @type \Google\Cloud\Sql\V1\InstancesCloneRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the Cloud SQL instance to be cloned (source). This does not - * include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * The ID of the Cloud SQL instance to be cloned (source). This does not - * include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the source as well as the clone Cloud SQL instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the source as well as the clone Cloud SQL instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesCloneRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesCloneRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesCloneRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php deleted file mode 100644 index c86fb60cbadf..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest - */ -class SqlInstancesCreateEphemeralCertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the Cloud SQL project. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the Cloud SQL project. - * @type \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the Cloud SQL project. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the Cloud SQL project. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; - * @return \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; - * @param \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php deleted file mode 100644 index f3a80ccc7e80..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesDeleteRequest - */ -class SqlInstancesDeleteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance to be deleted. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance to be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance to be deleted. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance to be deleted. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php deleted file mode 100644 index 3b87034db915..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesDemoteMasterRequest - */ -class SqlInstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance name. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance name. - * @type string $project - * ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance name. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance name. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php deleted file mode 100644 index e014b469ecbf..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.sql.v1.SqlInstancesDemoteRequest - */ -class SqlInstancesDemoteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Cloud SQL instance name. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = ''; - /** - * Required. ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - /** - * Required. The request body. - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Required. Cloud SQL instance name. - * @type string $project - * Required. ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\InstancesDemoteRequest $body - * Required. The request body. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Required. Cloud SQL instance name. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Required. Cloud SQL instance name. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Required. ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Required. The request body. - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Sql\V1\InstancesDemoteRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Required. The request body. - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Sql\V1\InstancesDemoteRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesDemoteRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php deleted file mode 100644 index 501b530aab43..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesExportRequest - */ -class SqlInstancesExportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance to be exported. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance to be exported. - * @type \Google\Cloud\Sql\V1\InstancesExportRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance to be exported. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance to be exported. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesExportRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesExportRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesExportRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php deleted file mode 100644 index f443137e24a0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesFailoverRequest - */ -class SqlInstancesFailoverRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * ID of the project that contains the read replica. - * @type \Google\Cloud\Sql\V1\InstancesFailoverRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesFailoverRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesFailoverRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesFailoverRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php deleted file mode 100644 index 647f3647e66c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest - */ -class SqlInstancesGetDiskShrinkConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php deleted file mode 100644 index 56f64db0042d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigResponse - */ -class SqlInstancesGetDiskShrinkConfigResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#getDiskShrinkConfig`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The minimum size to which a disk can be shrunk in GigaBytes. - * - * Generated from protobuf field int64 minimal_target_size_gb = 2; - */ - protected $minimal_target_size_gb = 0; - /** - * Additional message to customers. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#getDiskShrinkConfig`. - * @type int|string $minimal_target_size_gb - * The minimum size to which a disk can be shrunk in GigaBytes. - * @type string $message - * Additional message to customers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#getDiskShrinkConfig`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#getDiskShrinkConfig`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The minimum size to which a disk can be shrunk in GigaBytes. - * - * Generated from protobuf field int64 minimal_target_size_gb = 2; - * @return int|string - */ - public function getMinimalTargetSizeGb() - { - return $this->minimal_target_size_gb; - } - - /** - * The minimum size to which a disk can be shrunk in GigaBytes. - * - * Generated from protobuf field int64 minimal_target_size_gb = 2; - * @param int|string $var - * @return $this - */ - public function setMinimalTargetSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->minimal_target_size_gb = $var; - - return $this; - } - - /** - * Additional message to customers. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Additional message to customers. - * - * 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; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php deleted file mode 100644 index 0cf92a769961..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest - */ -class SqlInstancesGetLatestRecoveryTimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php deleted file mode 100644 index 9a5bfafef504..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeResponse - */ -class SqlInstancesGetLatestRecoveryTimeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#getLatestRecoveryTime`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Timestamp, identifies the latest recovery time of the source instance. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; - */ - protected $latest_recovery_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#getLatestRecoveryTime`. - * @type \Google\Protobuf\Timestamp $latest_recovery_time - * Timestamp, identifies the latest recovery time of the source instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#getLatestRecoveryTime`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#getLatestRecoveryTime`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Timestamp, identifies the latest recovery time of the source instance. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestRecoveryTime() - { - return $this->latest_recovery_time; - } - - public function hasLatestRecoveryTime() - { - return isset($this->latest_recovery_time); - } - - public function clearLatestRecoveryTime() - { - unset($this->latest_recovery_time); - } - - /** - * Timestamp, identifies the latest recovery time of the source instance. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestRecoveryTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_recovery_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php deleted file mode 100644 index 5d2e86246d5a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesGetRequest - */ -class SqlInstancesGetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php deleted file mode 100644 index 6a9167d840f5..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesImportRequest - */ -class SqlInstancesImportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\InstancesImportRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesImportRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesImportRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesImportRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php deleted file mode 100644 index 572d4c1dd354..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.sql.v1.SqlInstancesInsertRequest - */ -class SqlInstancesInsertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Project ID of the project to which the newly created Cloud SQL instances - * should belong. - * - * Generated from protobuf field string project = 1; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Project ID of the project to which the newly created Cloud SQL instances - * should belong. - * @type \Google\Cloud\Sql\V1\DatabaseInstance $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Project ID of the project to which the newly created Cloud SQL instances - * should belong. - * - * Generated from protobuf field string project = 1; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project to which the newly created Cloud SQL instances - * should belong. - * - * Generated from protobuf field string project = 1; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - * @return \Google\Cloud\Sql\V1\DatabaseInstance|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - * @param \Google\Cloud\Sql\V1\DatabaseInstance $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php deleted file mode 100644 index 335999acd233..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.sql.v1.SqlInstancesListRequest - */ -class SqlInstancesListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * A filter expression that filters resources listed in the response. - * The expression is in the form of field:value. For example, - * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per - * their JSON representation, such as 'settings.userLabels.auto_start:true'. - * Multiple filter queries are space-separated. For example. - * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each - * expression is an AND expression. However, you can include AND and OR - * expressions explicitly. - * - * Generated from protobuf field string filter = 1; - */ - protected $filter = ''; - /** - * The maximum number of instances to return. The service may return fewer - * than this value. - * If unspecified, at most 500 instances are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field uint32 max_results = 2; - */ - protected $max_results = 0; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Project ID of the project for which to list Cloud SQL instances. - * - * Generated from protobuf field string project = 4; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * A filter expression that filters resources listed in the response. - * The expression is in the form of field:value. For example, - * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per - * their JSON representation, such as 'settings.userLabels.auto_start:true'. - * Multiple filter queries are space-separated. For example. - * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each - * expression is an AND expression. However, you can include AND and OR - * expressions explicitly. - * @type int $max_results - * The maximum number of instances to return. The service may return fewer - * than this value. - * If unspecified, at most 500 instances are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * @type string $page_token - * A previously-returned page token representing part of the larger set of - * results to view. - * @type string $project - * Project ID of the project for which to list Cloud SQL instances. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * A filter expression that filters resources listed in the response. - * The expression is in the form of field:value. For example, - * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per - * their JSON representation, such as 'settings.userLabels.auto_start:true'. - * Multiple filter queries are space-separated. For example. - * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each - * expression is an AND expression. However, you can include AND and OR - * expressions explicitly. - * - * Generated from protobuf field string filter = 1; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that filters resources listed in the response. - * The expression is in the form of field:value. For example, - * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per - * their JSON representation, such as 'settings.userLabels.auto_start:true'. - * Multiple filter queries are space-separated. For example. - * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each - * expression is an AND expression. However, you can include AND and OR - * expressions explicitly. - * - * 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 maximum number of instances to return. The service may return fewer - * than this value. - * If unspecified, at most 500 instances are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field uint32 max_results = 2; - * @return int - */ - public function getMaxResults() - { - return $this->max_results; - } - - /** - * The maximum number of instances to return. The service may return fewer - * than this value. - * If unspecified, at most 500 instances are returned. - * The maximum value is 1000; values above 1000 are coerced to 1000. - * - * Generated from protobuf field uint32 max_results = 2; - * @param int $var - * @return $this - */ - public function setMaxResults($var) - { - GPBUtil::checkUint32($var); - $this->max_results = $var; - - return $this; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * 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; - } - - /** - * Project ID of the project for which to list Cloud SQL instances. - * - * Generated from protobuf field string project = 4; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project for which to list Cloud SQL instances. - * - * Generated from protobuf field string project = 4; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php deleted file mode 100644 index 8ab5a35297cc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesListServerCasRequest - */ -class SqlInstancesListServerCasRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php deleted file mode 100644 index 5fbb01eaea97..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesPatchRequest - */ -class SqlInstancesPatchRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\DatabaseInstance $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - * @return \Google\Cloud\Sql\V1\DatabaseInstance|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - * @param \Google\Cloud\Sql\V1\DatabaseInstance $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php deleted file mode 100644 index 8614588e5314..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest - */ -class SqlInstancesPerformDiskShrinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Perform disk shrink context. - * - * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\PerformDiskShrinkContext $body - * Perform disk shrink context. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Perform disk shrink context. - * - * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; - * @return \Google\Cloud\Sql\V1\PerformDiskShrinkContext|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Perform disk shrink context. - * - * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; - * @param \Google\Cloud\Sql\V1\PerformDiskShrinkContext $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PerformDiskShrinkContext::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php deleted file mode 100644 index 8be73ae30256..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest - */ -class SqlInstancesPromoteReplicaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Set to true to invoke a replica failover to the designated DR - * replica. As part of replica failover, the promote operation attempts - * to add the original primary instance as a replica of the promoted - * DR replica when the original primary instance comes back online. - * If set to false or not specified, then the original primary - * instance becomes an independent Cloud SQL primary instance. - * Only applicable to MySQL. - * - * Generated from protobuf field bool failover = 3; - */ - protected $failover = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL read replica instance name. - * @type string $project - * ID of the project that contains the read replica. - * @type bool $failover - * Set to true to invoke a replica failover to the designated DR - * replica. As part of replica failover, the promote operation attempts - * to add the original primary instance as a replica of the promoted - * DR replica when the original primary instance comes back online. - * If set to false or not specified, then the original primary - * instance becomes an independent Cloud SQL primary instance. - * Only applicable to MySQL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Set to true to invoke a replica failover to the designated DR - * replica. As part of replica failover, the promote operation attempts - * to add the original primary instance as a replica of the promoted - * DR replica when the original primary instance comes back online. - * If set to false or not specified, then the original primary - * instance becomes an independent Cloud SQL primary instance. - * Only applicable to MySQL. - * - * Generated from protobuf field bool failover = 3; - * @return bool - */ - public function getFailover() - { - return $this->failover; - } - - /** - * Set to true to invoke a replica failover to the designated DR - * replica. As part of replica failover, the promote operation attempts - * to add the original primary instance as a replica of the promoted - * DR replica when the original primary instance comes back online. - * If set to false or not specified, then the original primary - * instance becomes an independent Cloud SQL primary instance. - * Only applicable to MySQL. - * - * Generated from protobuf field bool failover = 3; - * @param bool $var - * @return $this - */ - public function setFailover($var) - { - GPBUtil::checkBool($var); - $this->failover = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php deleted file mode 100644 index be4171d47bc2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.sql.v1.SqlInstancesReencryptRequest - */ -class SqlInstancesReencryptRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Reencrypt body that users request - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\InstancesReencryptRequest $body - * Reencrypt body that users request - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Reencrypt body that users request - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; - * @return \Google\Cloud\Sql\V1\InstancesReencryptRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Reencrypt body that users request - * - * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; - * @param \Google\Cloud\Sql\V1\InstancesReencryptRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesReencryptRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php deleted file mode 100644 index a79384e72450..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest - */ -class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cloud SQL instance ID. This doesn't include the project ID. - * The instance ID contains lowercase letters, numbers, and hyphens, and it - * must start with a letter. This ID can have a maximum length of 98 - * characters. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = ''; - /** - * Required. The project ID that contains the instance. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Required. The Cloud SQL instance ID. This doesn't include the project ID. - * The instance ID contains lowercase letters, numbers, and hyphens, and it - * must start with a letter. This ID can have a maximum length of 98 - * characters. - * @type string $project - * Required. The project ID that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cloud SQL instance ID. This doesn't include the project ID. - * The instance ID contains lowercase letters, numbers, and hyphens, and it - * must start with a letter. This ID can have a maximum length of 98 - * characters. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Required. The Cloud SQL instance ID. This doesn't include the project ID. - * The instance ID contains lowercase letters, numbers, and hyphens, and it - * must start with a letter. This ID can have a maximum length of 98 - * characters. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Required. The project ID that contains the instance. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The project ID that contains the instance. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php deleted file mode 100644 index c155d6d2135d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseResponse - */ -class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique identifier for this operation. - * - * Generated from protobuf field string operation_id = 1; - */ - protected $operation_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation_id - * The unique identifier for this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * The unique identifier for this operation. - * - * Generated from protobuf field string operation_id = 1; - * @return string - */ - public function getOperationId() - { - return $this->operation_id; - } - - /** - * The unique identifier for this operation. - * - * Generated from protobuf field string operation_id = 1; - * @param string $var - * @return $this - */ - public function setOperationId($var) - { - GPBUtil::checkString($var, True); - $this->operation_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php deleted file mode 100644 index a761f690b0c0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest - */ -class SqlInstancesRescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; - * @return \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; - * @param \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php deleted file mode 100644 index 62b51d5bb1e4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody - */ -class SqlInstancesRescheduleMaintenanceRequestBody extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of the reschedule the user wants. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; - */ - protected $reschedule = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $reschedule - * Required. The type of the reschedule the user wants. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of the reschedule the user wants. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; - * @return \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule|null - */ - public function getReschedule() - { - return $this->reschedule; - } - - public function hasReschedule() - { - return isset($this->reschedule); - } - - public function clearReschedule() - { - unset($this->reschedule); - } - - /** - * Required. The type of the reschedule the user wants. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; - * @param \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $var - * @return $this - */ - public function setReschedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule::class); - $this->reschedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php deleted file mode 100644 index cb830fe36b1d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule - */ -class Reschedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of the reschedule. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; - */ - protected $reschedule_type = 0; - /** - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $schedule_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reschedule_type - * Required. The type of the reschedule. - * @type \Google\Protobuf\Timestamp $schedule_time - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of the reschedule. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; - * @return int - */ - public function getRescheduleType() - { - return $this->reschedule_type; - } - - /** - * Required. The type of the reschedule. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; - * @param int $var - * @return $this - */ - public function setRescheduleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\RescheduleType::class); - $this->reschedule_type = $var; - - return $this; - } - - /** - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in - * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reschedule::class, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody_Reschedule::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php deleted file mode 100644 index 8b8109bca17b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType - */ -class RescheduleType -{ - /** - * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; - */ - const RESCHEDULE_TYPE_UNSPECIFIED = 0; - /** - * Reschedules maintenance to happen now (within 5 minutes). - * - * Generated from protobuf enum IMMEDIATE = 1; - */ - const IMMEDIATE = 1; - /** - * Reschedules maintenance to occur within one week from the originally - * scheduled day and time. - * - * Generated from protobuf enum NEXT_AVAILABLE_WINDOW = 2; - */ - const NEXT_AVAILABLE_WINDOW = 2; - /** - * Reschedules maintenance to a specific time and day. - * - * Generated from protobuf enum SPECIFIC_TIME = 3; - */ - const SPECIFIC_TIME = 3; - - private static $valueToName = [ - self::RESCHEDULE_TYPE_UNSPECIFIED => 'RESCHEDULE_TYPE_UNSPECIFIED', - self::IMMEDIATE => 'IMMEDIATE', - self::NEXT_AVAILABLE_WINDOW => 'NEXT_AVAILABLE_WINDOW', - self::SPECIFIC_TIME => 'SPECIFIC_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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RescheduleType::class, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody_RescheduleType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php deleted file mode 100644 index b8779a814c01..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest - */ -class SqlInstancesResetReplicaSizeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL read replica instance name. - * @type string $project - * ID of the project that contains the read replica. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php deleted file mode 100644 index 4fd11700c853..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesResetSslConfigRequest - */ -class SqlInstancesResetSslConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php deleted file mode 100644 index fd65741f020a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRestartRequest - */ -class SqlInstancesRestartRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance to be restarted. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance to be restarted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance to be restarted. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance to be restarted. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php deleted file mode 100644 index 203876cdec69..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRestoreBackupRequest - */ -class SqlInstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php deleted file mode 100644 index 0f0c1a5593fa..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesRotateServerCaRequest - */ -class SqlInstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php deleted file mode 100644 index 0b9578d2ec23..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php +++ /dev/null @@ -1,291 +0,0 @@ -google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest - */ -class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * External sync mode. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; - */ - protected $sync_mode = 0; - /** - * Whether to skip the verification step (VESS). - * - * Generated from protobuf field bool skip_verification = 4; - */ - protected $skip_verification = false; - /** - * Optional. Parallel level for initial data sync. Currently only applicable - * for MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sync_parallel_level = 0; - /** - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $migration_type = 0; - protected $sync_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * ID of the project that contains the instance. - * @type int $sync_mode - * External sync mode. - * @type bool $skip_verification - * Whether to skip the verification step (VESS). - * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config - * MySQL-specific settings for start external sync. - * @type int $sync_parallel_level - * Optional. Parallel level for initial data sync. Currently only applicable - * for MySQL. - * @type int $migration_type - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * External sync mode. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; - * @return int - */ - public function getSyncMode() - { - return $this->sync_mode; - } - - /** - * External sync mode. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; - * @param int $var - * @return $this - */ - public function setSyncMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); - $this->sync_mode = $var; - - return $this; - } - - /** - * Whether to skip the verification step (VESS). - * - * Generated from protobuf field bool skip_verification = 4; - * @return bool - */ - public function getSkipVerification() - { - return $this->skip_verification; - } - - /** - * Whether to skip the verification step (VESS). - * - * Generated from protobuf field bool skip_verification = 4; - * @param bool $var - * @return $this - */ - public function setSkipVerification($var) - { - GPBUtil::checkBool($var); - $this->skip_verification = $var; - - return $this; - } - - /** - * MySQL-specific settings for start external sync. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6; - * @return \Google\Cloud\Sql\V1\MySqlSyncConfig|null - */ - public function getMysqlSyncConfig() - { - return $this->readOneof(6); - } - - public function hasMysqlSyncConfig() - { - return $this->hasOneof(6); - } - - /** - * MySQL-specific settings for start external sync. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6; - * @param \Google\Cloud\Sql\V1\MySqlSyncConfig $var - * @return $this - */ - public function setMysqlSyncConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlSyncConfig::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Parallel level for initial data sync. Currently only applicable - * for MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSyncParallelLevel() - { - return $this->sync_parallel_level; - } - - /** - * Optional. Parallel level for initial data sync. Currently only applicable - * for MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSyncParallelLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); - $this->sync_parallel_level = $var; - - return $this; - } - - /** - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMigrationType() - { - return $this->migration_type; - } - - /** - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMigrationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); - $this->migration_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getSyncConfig() - { - return $this->whichOneof("sync_config"); - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php deleted file mode 100644 index cd9d636bd47d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesStartReplicaRequest - */ -class SqlInstancesStartReplicaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL read replica instance name. - * @type string $project - * ID of the project that contains the read replica. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php deleted file mode 100644 index 8460b58e74e7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlInstancesStopReplicaRequest - */ -class SqlInstancesStopReplicaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL read replica instance name. - * @type string $project - * ID of the project that contains the read replica. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the read replica. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php deleted file mode 100644 index d2194c9f7ac0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.sql.v1.SqlInstancesSwitchoverRequest - */ -class SqlInstancesSwitchoverRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * ID of the project that contains the replica. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a - * sum of all database operations. Default value is 10 minutes and can be - * modified to a maximum value of 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL read replica instance name. - * @type string $project - * ID of the project that contains the replica. - * @type \Google\Protobuf\Duration $db_timeout - * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a - * sum of all database operations. Default value is 10 minutes and can be - * modified to a maximum value of 24 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL read replica instance name. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * ID of the project that contains the replica. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * ID of the project that contains the replica. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a - * sum of all database operations. Default value is 10 minutes and can be - * modified to a maximum value of 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getDbTimeout() - { - return $this->db_timeout; - } - - public function hasDbTimeout() - { - return isset($this->db_timeout); - } - - public function clearDbTimeout() - { - unset($this->db_timeout); - } - - /** - * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a - * sum of all database operations. Default value is 10 minutes and can be - * modified to a maximum value of 24 hours. - * - * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDbTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->db_timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php deleted file mode 100644 index 902c6634648a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesTruncateLogRequest - */ -class SqlInstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the Cloud SQL project. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the Cloud SQL project. - * @type \Google\Cloud\Sql\V1\InstancesTruncateLogRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the Cloud SQL project. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the Cloud SQL project. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; - * @return \Google\Cloud\Sql\V1\InstancesTruncateLogRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; - * @param \Google\Cloud\Sql\V1\InstancesTruncateLogRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesTruncateLogRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php deleted file mode 100644 index a1835cce803e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.sql.v1.SqlInstancesUpdateRequest - */ -class SqlInstancesUpdateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\DatabaseInstance $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - * @return \Google\Cloud\Sql\V1\DatabaseInstance|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; - * @param \Google\Cloud\Sql\V1\DatabaseInstance $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php deleted file mode 100644 index 9d3de366d3dd..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php +++ /dev/null @@ -1,325 +0,0 @@ -google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest - */ -class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Flag to enable verifying connection only - * - * Generated from protobuf field bool verify_connection_only = 3; - */ - protected $verify_connection_only = false; - /** - * External sync mode - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; - */ - protected $sync_mode = 0; - /** - * Optional. Flag to verify settings required by replication setup only - * - * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $verify_replication_only = false; - /** - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $migration_type = 0; - /** - * Optional. Parallel level for initial data sync. Only applicable for - * PostgreSQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sync_parallel_level = 0; - protected $sync_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type bool $verify_connection_only - * Flag to enable verifying connection only - * @type int $sync_mode - * External sync mode - * @type bool $verify_replication_only - * Optional. Flag to verify settings required by replication setup only - * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config - * Optional. MySQL-specific settings for start external sync. - * @type int $migration_type - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * @type int $sync_parallel_level - * Optional. Parallel level for initial data sync. Only applicable for - * PostgreSQL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Flag to enable verifying connection only - * - * Generated from protobuf field bool verify_connection_only = 3; - * @return bool - */ - public function getVerifyConnectionOnly() - { - return $this->verify_connection_only; - } - - /** - * Flag to enable verifying connection only - * - * Generated from protobuf field bool verify_connection_only = 3; - * @param bool $var - * @return $this - */ - public function setVerifyConnectionOnly($var) - { - GPBUtil::checkBool($var); - $this->verify_connection_only = $var; - - return $this; - } - - /** - * External sync mode - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; - * @return int - */ - public function getSyncMode() - { - return $this->sync_mode; - } - - /** - * External sync mode - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; - * @param int $var - * @return $this - */ - public function setSyncMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); - $this->sync_mode = $var; - - return $this; - } - - /** - * Optional. Flag to verify settings required by replication setup only - * - * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getVerifyReplicationOnly() - { - return $this->verify_replication_only; - } - - /** - * Optional. Flag to verify settings required by replication setup only - * - * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setVerifyReplicationOnly($var) - { - GPBUtil::checkBool($var); - $this->verify_replication_only = $var; - - return $this; - } - - /** - * Optional. MySQL-specific settings for start external sync. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Sql\V1\MySqlSyncConfig|null - */ - public function getMysqlSyncConfig() - { - return $this->readOneof(6); - } - - public function hasMysqlSyncConfig() - { - return $this->hasOneof(6); - } - - /** - * Optional. MySQL-specific settings for start external sync. - * - * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Sql\V1\MySqlSyncConfig $var - * @return $this - */ - public function setMysqlSyncConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlSyncConfig::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMigrationType() - { - return $this->migration_type; - } - - /** - * Optional. MigrationType configures the migration to use physical files or - * logical dump files. If not set, then the logical dump file configuration is - * used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL. - * - * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMigrationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); - $this->migration_type = $var; - - return $this; - } - - /** - * Optional. Parallel level for initial data sync. Only applicable for - * PostgreSQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSyncParallelLevel() - { - return $this->sync_parallel_level; - } - - /** - * Optional. Parallel level for initial data sync. Only applicable for - * PostgreSQL. - * - * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSyncParallelLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); - $this->sync_parallel_level = $var; - - return $this; - } - - /** - * @return string - */ - public function getSyncConfig() - { - return $this->whichOneof("sync_config"); - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php deleted file mode 100644 index 81bc7e811bfc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode - */ -class ExternalSyncMode -{ - /** - * Unknown external sync mode, will be defaulted to ONLINE mode - * - * Generated from protobuf enum EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; - */ - const EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; - /** - * Online external sync will set up replication after initial data external - * sync - * - * Generated from protobuf enum ONLINE = 1; - */ - const ONLINE = 1; - /** - * Offline external sync only dumps and loads a one-time snapshot of - * the primary instance's data - * - * Generated from protobuf enum OFFLINE = 2; - */ - const OFFLINE = 2; - - private static $valueToName = [ - self::EXTERNAL_SYNC_MODE_UNSPECIFIED => 'EXTERNAL_SYNC_MODE_UNSPECIFIED', - self::ONLINE => 'ONLINE', - self::OFFLINE => 'OFFLINE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExternalSyncMode::class, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest_ExternalSyncMode::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php deleted file mode 100644 index d4e8642f4146..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType - */ -class MigrationType -{ - /** - * Default value is a logical dump file-based migration - * - * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0; - */ - const MIGRATION_TYPE_UNSPECIFIED = 0; - /** - * Logical dump file-based migration - * - * Generated from protobuf enum LOGICAL = 1; - */ - const LOGICAL = 1; - /** - * Physical file-based migration - * - * Generated from protobuf enum PHYSICAL = 2; - */ - const PHYSICAL = 2; - - private static $valueToName = [ - self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED', - self::LOGICAL => 'LOGICAL', - self::PHYSICAL => 'PHYSICAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MigrationType::class, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest_MigrationType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php deleted file mode 100644 index 9765ba2aa15c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsResponse - */ -class SqlInstancesVerifyExternalSyncSettingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#migrationSettingErrorList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of migration violations. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; - */ - private $errors; - /** - * List of migration warnings. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; - */ - private $warnings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#migrationSettingErrorList`. - * @type array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $errors - * List of migration violations. - * @type array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $warnings - * List of migration warnings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#migrationSettingErrorList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#migrationSettingErrorList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of migration violations. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * List of migration violations. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; - * @param array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError::class); - $this->errors = $arr; - - return $this; - } - - /** - * List of migration warnings. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * List of migration warnings. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; - * @param array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError::class); - $this->warnings = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php deleted file mode 100644 index a4db37dc4140..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.sql.v1.SqlIpAddressType - */ -class SqlIpAddressType -{ - /** - * This is an unknown IP address type. - * - * Generated from protobuf enum SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; - */ - const SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; - /** - * IP address the customer is supposed to connect to. Usually this is the - * load balancer's IP address - * - * Generated from protobuf enum PRIMARY = 1; - */ - const PRIMARY = 1; - /** - * Source IP address of the connection a read replica establishes to its - * external primary instance. This IP address can be allowlisted by the - * customer in case it has a firewall that filters incoming connection to its - * on premises primary instance. - * - * Generated from protobuf enum OUTGOING = 2; - */ - const OUTGOING = 2; - /** - * Private IP used when using private IPs and network peering. - * - * Generated from protobuf enum PRIVATE = 3; - */ - const PBPRIVATE = 3; - /** - * V1 IP of a migrated instance. We want the user to - * decommission this IP as soon as the migration is complete. - * Note: V1 instances with V1 ip addresses will be counted as PRIMARY. - * - * Generated from protobuf enum MIGRATED_1ST_GEN = 4; - */ - const MIGRATED_1ST_GEN = 4; - - private static $valueToName = [ - self::SQL_IP_ADDRESS_TYPE_UNSPECIFIED => 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED', - self::PRIMARY => 'PRIMARY', - self::OUTGOING => 'OUTGOING', - self::PBPRIVATE => 'PRIVATE', - self::MIGRATED_1ST_GEN => 'MIGRATED_1ST_GEN', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php deleted file mode 100644 index 6f519700a0f1..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlOperationsCancelRequest - */ -class SqlOperationsCancelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Instance operation ID. - * - * Generated from protobuf field string operation = 1; - */ - protected $operation = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation - * Instance operation ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); - parent::__construct($data); - } - - /** - * Instance operation ID. - * - * Generated from protobuf field string operation = 1; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * Instance operation ID. - * - * Generated from protobuf field string operation = 1; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php deleted file mode 100644 index 3d8bb11843ab..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlOperationsGetRequest - */ -class SqlOperationsGetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Instance operation ID. - * - * Generated from protobuf field string operation = 1; - */ - protected $operation = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation - * Instance operation ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); - parent::__construct($data); - } - - /** - * Instance operation ID. - * - * Generated from protobuf field string operation = 1; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * Instance operation ID. - * - * Generated from protobuf field string operation = 1; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php deleted file mode 100644 index 7824a1ca0552..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.sql.v1.SqlOperationsListRequest - */ -class SqlOperationsListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Maximum number of operations per response. - * - * Generated from protobuf field uint32 max_results = 2; - */ - protected $max_results = 0; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type int $max_results - * Maximum number of operations per response. - * @type string $page_token - * A previously-returned page token representing part of the larger set of - * results to view. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Maximum number of operations per response. - * - * Generated from protobuf field uint32 max_results = 2; - * @return int - */ - public function getMaxResults() - { - return $this->max_results; - } - - /** - * Maximum number of operations per response. - * - * Generated from protobuf field uint32 max_results = 2; - * @param int $var - * @return $this - */ - public function setMaxResults($var) - { - GPBUtil::checkUint32($var); - $this->max_results = $var; - - return $this; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * 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; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php deleted file mode 100644 index 2752c3156e60..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.sql.v1.SqlPricingPlan - */ -class SqlPricingPlan -{ - /** - * This is an unknown pricing plan for this instance. - * - * Generated from protobuf enum SQL_PRICING_PLAN_UNSPECIFIED = 0; - */ - const SQL_PRICING_PLAN_UNSPECIFIED = 0; - /** - * The instance is billed at a monthly flat rate. - * - * Generated from protobuf enum PACKAGE = 1; - */ - const PACKAGE = 1; - /** - * The instance is billed per usage. - * - * Generated from protobuf enum PER_USE = 2; - */ - const PER_USE = 2; - - private static $valueToName = [ - self::SQL_PRICING_PLAN_UNSPECIFIED => 'SQL_PRICING_PLAN_UNSPECIFIED', - self::PACKAGE => 'PACKAGE', - self::PER_USE => 'PER_USE', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php deleted file mode 100644 index d96c9de2d50f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.sql.v1.SqlReplicationType - */ -class SqlReplicationType -{ - /** - * This is an unknown replication type for a Cloud SQL instance. - * - * Generated from protobuf enum SQL_REPLICATION_TYPE_UNSPECIFIED = 0; - */ - const SQL_REPLICATION_TYPE_UNSPECIFIED = 0; - /** - * The synchronous replication mode for First Generation instances. It is the - * default value. - * - * Generated from protobuf enum SYNCHRONOUS = 1; - */ - const SYNCHRONOUS = 1; - /** - * The asynchronous replication mode for First Generation instances. It - * provides a slight performance gain, but if an outage occurs while this - * option is set to asynchronous, you can lose up to a few seconds of updates - * to your data. - * - * Generated from protobuf enum ASYNCHRONOUS = 2; - */ - const ASYNCHRONOUS = 2; - - private static $valueToName = [ - self::SQL_REPLICATION_TYPE_UNSPECIFIED => 'SQL_REPLICATION_TYPE_UNSPECIFIED', - self::SYNCHRONOUS => 'SYNCHRONOUS', - self::ASYNCHRONOUS => 'ASYNCHRONOUS', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php deleted file mode 100644 index 6f65acfdf334..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.sql.v1.SqlServerAuditConfig - */ -class SqlServerAuditConfig extends \Google\Protobuf\Internal\Message -{ - /** - * This is always sql#sqlServerAuditConfig - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The name of the destination bucket (e.g., gs://mybucket). - * - * Generated from protobuf field string bucket = 2; - */ - protected $bucket = ''; - /** - * How long to keep generated audit files. - * - * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; - */ - protected $retention_interval = null; - /** - * How often to upload generated audit files. - * - * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; - */ - protected $upload_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always sql#sqlServerAuditConfig - * @type string $bucket - * The name of the destination bucket (e.g., gs://mybucket). - * @type \Google\Protobuf\Duration $retention_interval - * How long to keep generated audit files. - * @type \Google\Protobuf\Duration $upload_interval - * How often to upload generated audit files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always sql#sqlServerAuditConfig - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always sql#sqlServerAuditConfig - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The name of the destination bucket (e.g., gs://mybucket). - * - * Generated from protobuf field string bucket = 2; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * The name of the destination bucket (e.g., gs://mybucket). - * - * Generated from protobuf field string bucket = 2; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * How long to keep generated audit files. - * - * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getRetentionInterval() - { - return $this->retention_interval; - } - - public function hasRetentionInterval() - { - return isset($this->retention_interval); - } - - public function clearRetentionInterval() - { - unset($this->retention_interval); - } - - /** - * How long to keep generated audit files. - * - * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetentionInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention_interval = $var; - - return $this; - } - - /** - * How often to upload generated audit files. - * - * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getUploadInterval() - { - return $this->upload_interval; - } - - public function hasUploadInterval() - { - return isset($this->upload_interval); - } - - public function clearUploadInterval() - { - unset($this->upload_interval); - } - - /** - * How often to upload generated audit files. - * - * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setUploadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->upload_interval = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php deleted file mode 100644 index 98d2b10fb0aa..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlServerDatabaseDetails - */ -class SqlServerDatabaseDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The version of SQL Server with which the database is to be made compatible - * - * Generated from protobuf field int32 compatibility_level = 1; - */ - protected $compatibility_level = 0; - /** - * The recovery model of a SQL Server database - * - * Generated from protobuf field string recovery_model = 2; - */ - protected $recovery_model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $compatibility_level - * The version of SQL Server with which the database is to be made compatible - * @type string $recovery_model - * The recovery model of a SQL Server database - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The version of SQL Server with which the database is to be made compatible - * - * Generated from protobuf field int32 compatibility_level = 1; - * @return int - */ - public function getCompatibilityLevel() - { - return $this->compatibility_level; - } - - /** - * The version of SQL Server with which the database is to be made compatible - * - * Generated from protobuf field int32 compatibility_level = 1; - * @param int $var - * @return $this - */ - public function setCompatibilityLevel($var) - { - GPBUtil::checkInt32($var); - $this->compatibility_level = $var; - - return $this; - } - - /** - * The recovery model of a SQL Server database - * - * Generated from protobuf field string recovery_model = 2; - * @return string - */ - public function getRecoveryModel() - { - return $this->recovery_model; - } - - /** - * The recovery model of a SQL Server database - * - * Generated from protobuf field string recovery_model = 2; - * @param string $var - * @return $this - */ - public function setRecoveryModel($var) - { - GPBUtil::checkString($var, True); - $this->recovery_model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php deleted file mode 100644 index 3b85c94c2bab..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SqlServerUserDetails - */ -class SqlServerUserDetails extends \Google\Protobuf\Internal\Message -{ - /** - * If the user has been disabled - * - * Generated from protobuf field bool disabled = 1; - */ - protected $disabled = false; - /** - * The server roles for this user - * - * Generated from protobuf field repeated string server_roles = 2; - */ - private $server_roles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $disabled - * If the user has been disabled - * @type array|\Google\Protobuf\Internal\RepeatedField $server_roles - * The server roles for this user - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * If the user has been disabled - * - * Generated from protobuf field bool disabled = 1; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * If the user has been disabled - * - * Generated from protobuf field bool disabled = 1; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * The server roles for this user - * - * Generated from protobuf field repeated string server_roles = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServerRoles() - { - return $this->server_roles; - } - - /** - * The server roles for this user - * - * Generated from protobuf field repeated string server_roles = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServerRoles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->server_roles = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php deleted file mode 100644 index 56c21ca3bac9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.sql.v1.SqlSslCertsDeleteRequest - */ -class SqlSslCertsDeleteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Sha1 FingerPrint. - * - * Generated from protobuf field string sha1_fingerprint = 3; - */ - protected $sha1_fingerprint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type string $sha1_fingerprint - * Sha1 FingerPrint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Sha1 FingerPrint. - * - * Generated from protobuf field string sha1_fingerprint = 3; - * @return string - */ - public function getSha1Fingerprint() - { - return $this->sha1_fingerprint; - } - - /** - * Sha1 FingerPrint. - * - * Generated from protobuf field string sha1_fingerprint = 3; - * @param string $var - * @return $this - */ - public function setSha1Fingerprint($var) - { - GPBUtil::checkString($var, True); - $this->sha1_fingerprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php deleted file mode 100644 index bf1d185a176f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.sql.v1.SqlSslCertsGetRequest - */ -class SqlSslCertsGetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Sha1 FingerPrint. - * - * Generated from protobuf field string sha1_fingerprint = 3; - */ - protected $sha1_fingerprint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type string $sha1_fingerprint - * Sha1 FingerPrint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Sha1 FingerPrint. - * - * Generated from protobuf field string sha1_fingerprint = 3; - * @return string - */ - public function getSha1Fingerprint() - { - return $this->sha1_fingerprint; - } - - /** - * Sha1 FingerPrint. - * - * Generated from protobuf field string sha1_fingerprint = 3; - * @param string $var - * @return $this - */ - public function setSha1Fingerprint($var) - { - GPBUtil::checkString($var, True); - $this->sha1_fingerprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php deleted file mode 100644 index 534e0d079f27..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.sql.v1.SqlSslCertsInsertRequest - */ -class SqlSslCertsInsertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\SslCertsInsertRequest $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; - * @return \Google\Cloud\Sql\V1\SslCertsInsertRequest|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; - * @param \Google\Cloud\Sql\V1\SslCertsInsertRequest $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertsInsertRequest::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php deleted file mode 100644 index 1d17b4d8f053..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.sql.v1.SqlSslCertsListRequest - */ -class SqlSslCertsListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Cloud SQL instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Cloud SQL instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php deleted file mode 100644 index 0cd862973ac3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.sql.v1.SqlSuspensionReason - */ -class SqlSuspensionReason -{ - /** - * This is an unknown suspension reason. - * - * Generated from protobuf enum SQL_SUSPENSION_REASON_UNSPECIFIED = 0; - */ - const SQL_SUSPENSION_REASON_UNSPECIFIED = 0; - /** - * The instance is suspended due to billing issues (for example:, GCP account - * issue) - * - * Generated from protobuf enum BILLING_ISSUE = 2; - */ - const BILLING_ISSUE = 2; - /** - * The instance is suspended due to illegal content (for example:, child - * pornography, copyrighted material, etc.). - * - * Generated from protobuf enum LEGAL_ISSUE = 3; - */ - const LEGAL_ISSUE = 3; - /** - * The instance is causing operational issues (for example:, causing the - * database to crash). - * - * Generated from protobuf enum OPERATIONAL_ISSUE = 4; - */ - const OPERATIONAL_ISSUE = 4; - /** - * The KMS key used by the instance is either revoked or denied access to - * - * Generated from protobuf enum KMS_KEY_ISSUE = 5; - */ - const KMS_KEY_ISSUE = 5; - - private static $valueToName = [ - self::SQL_SUSPENSION_REASON_UNSPECIFIED => 'SQL_SUSPENSION_REASON_UNSPECIFIED', - self::BILLING_ISSUE => 'BILLING_ISSUE', - self::LEGAL_ISSUE => 'LEGAL_ISSUE', - self::OPERATIONAL_ISSUE => 'OPERATIONAL_ISSUE', - self::KMS_KEY_ISSUE => 'KMS_KEY_ISSUE', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php deleted file mode 100644 index 37497ea9de91..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.sql.v1.SqlTiersListRequest - */ -class SqlTiersListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Project ID of the project for which to list tiers. - * - * Generated from protobuf field string project = 1; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Project ID of the project for which to list tiers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); - parent::__construct($data); - } - - /** - * Project ID of the project for which to list tiers. - * - * Generated from protobuf field string project = 1; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project for which to list tiers. - * - * Generated from protobuf field string project = 1; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php deleted file mode 100644 index b83f41093d28..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.sql.v1.SqlUpdateTrack - */ -class SqlUpdateTrack -{ - /** - * This is an unknown maintenance timing preference. - * - * Generated from protobuf enum SQL_UPDATE_TRACK_UNSPECIFIED = 0; - */ - const SQL_UPDATE_TRACK_UNSPECIFIED = 0; - /** - * For an instance with a scheduled maintenance window, this maintenance - * timing indicates that the maintenance update is scheduled 7 to 14 days - * after the notification is sent out. Also referred to as `Week 1` (Console) - * and `preview` (gcloud CLI). - * - * Generated from protobuf enum canary = 1; - */ - const canary = 1; - /** - * For an instance with a scheduled maintenance window, this maintenance - * timing indicates that the maintenance update is scheduled 15 to 21 days - * after the notification is sent out. Also referred to as `Week 2` (Console) - * and `production` (gcloud CLI). - * - * Generated from protobuf enum stable = 2; - */ - const stable = 2; - /** - * For instance with a scheduled maintenance window, this maintenance - * timing indicates that the maintenance update is scheduled 35 to 42 days - * after the notification is sent out. - * - * Generated from protobuf enum week5 = 3; - */ - const week5 = 3; - - private static $valueToName = [ - self::SQL_UPDATE_TRACK_UNSPECIFIED => 'SQL_UPDATE_TRACK_UNSPECIFIED', - self::canary => 'canary', - self::stable => 'stable', - self::week5 => 'week5', - ]; - - 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php deleted file mode 100644 index 5c934f9681fb..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.sql.v1.SqlUsersDeleteRequest - */ -class SqlUsersDeleteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Host of the user in the instance. - * - * Generated from protobuf field string host = 1; - */ - protected $host = ''; - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Name of the user in the instance. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host - * Host of the user in the instance. - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $name - * Name of the user in the instance. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * Host of the user in the instance. - * - * Generated from protobuf field string host = 1; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Host of the user in the instance. - * - * Generated from protobuf field string host = 1; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Name of the user in the instance. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the user in the instance. - * - * 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; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php deleted file mode 100644 index b018b7342a5e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.sql.v1.SqlUsersGetRequest - */ -class SqlUsersGetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * User of the instance. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - */ - protected $project = ''; - /** - * Host of a user of the instance. - * - * Generated from protobuf field string host = 4; - */ - protected $host = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $name - * User of the instance. - * @type string $project - * Project ID of the project that contains the instance. - * @type string $host - * Host of a user of the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * User of the instance. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * User of the instance. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 3; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Host of a user of the instance. - * - * Generated from protobuf field string host = 4; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Host of a user of the instance. - * - * Generated from protobuf field string host = 4; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php deleted file mode 100644 index 98e3d15e852a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.sql.v1.SqlUsersInsertRequest - */ -class SqlUsersInsertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.User body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\User $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.User body = 100; - * @return \Google\Cloud\Sql\V1\User|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.User body = 100; - * @param \Google\Cloud\Sql\V1\User $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\User::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php deleted file mode 100644 index 5b1872f2a7c5..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.sql.v1.SqlUsersListRequest - */ -class SqlUsersListRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - */ - protected $instance = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $project - * Project ID of the project that contains the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 1; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php deleted file mode 100644 index b1e560c6a665..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.sql.v1.SqlUsersUpdateRequest - */ -class SqlUsersUpdateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Host of the user in the instance. - * - * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $host = ''; - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Name of the user in the instance. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - */ - protected $project = ''; - /** - * Generated from protobuf field .google.cloud.sql.v1.User body = 100; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host - * Optional. Host of the user in the instance. - * @type string $instance - * Database instance ID. This does not include the project ID. - * @type string $name - * Name of the user in the instance. - * @type string $project - * Project ID of the project that contains the instance. - * @type \Google\Cloud\Sql\V1\User $body - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Host of the user in the instance. - * - * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Optional. Host of the user in the instance. - * - * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Database instance ID. This does not include the project ID. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Name of the user in the instance. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the user in the instance. - * - * 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; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Project ID of the project that contains the instance. - * - * Generated from protobuf field string project = 4; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.User body = 100; - * @return \Google\Cloud\Sql\V1\User|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.User body = 100; - * @param \Google\Cloud\Sql\V1\User $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\User::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php deleted file mode 100644 index 1f6d18839eeb..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php +++ /dev/null @@ -1,375 +0,0 @@ -google.cloud.sql.v1.SslCert - */ -class SslCert extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#sslCert`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * Serial number, as extracted from the certificate. - * - * Generated from protobuf field string cert_serial_number = 2; - */ - protected $cert_serial_number = ''; - /** - * PEM representation. - * - * Generated from protobuf field string cert = 3; - */ - protected $cert = ''; - /** - * The time when the certificate was created in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z` - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - /** - * User supplied name. Constrained to [a-zA-Z.-_ ]+. - * - * Generated from protobuf field string common_name = 5; - */ - protected $common_name = ''; - /** - * The time when the certificate expires in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - */ - protected $expiration_time = null; - /** - * Sha1 Fingerprint. - * - * Generated from protobuf field string sha1_fingerprint = 7; - */ - protected $sha1_fingerprint = ''; - /** - * Name of the database instance. - * - * Generated from protobuf field string instance = 8; - */ - protected $instance = ''; - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 9; - */ - protected $self_link = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#sslCert`. - * @type string $cert_serial_number - * Serial number, as extracted from the certificate. - * @type string $cert - * PEM representation. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the certificate was created in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z` - * @type string $common_name - * User supplied name. Constrained to [a-zA-Z.-_ ]+. - * @type \Google\Protobuf\Timestamp $expiration_time - * The time when the certificate expires in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * @type string $sha1_fingerprint - * Sha1 Fingerprint. - * @type string $instance - * Name of the database instance. - * @type string $self_link - * The URI of this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#sslCert`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#sslCert`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Serial number, as extracted from the certificate. - * - * Generated from protobuf field string cert_serial_number = 2; - * @return string - */ - public function getCertSerialNumber() - { - return $this->cert_serial_number; - } - - /** - * Serial number, as extracted from the certificate. - * - * Generated from protobuf field string cert_serial_number = 2; - * @param string $var - * @return $this - */ - public function setCertSerialNumber($var) - { - GPBUtil::checkString($var, True); - $this->cert_serial_number = $var; - - return $this; - } - - /** - * PEM representation. - * - * Generated from protobuf field string cert = 3; - * @return string - */ - public function getCert() - { - return $this->cert; - } - - /** - * PEM representation. - * - * Generated from protobuf field string cert = 3; - * @param string $var - * @return $this - */ - public function setCert($var) - { - GPBUtil::checkString($var, True); - $this->cert = $var; - - return $this; - } - - /** - * The time when the certificate was created in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z` - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @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 time when the certificate was created in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z` - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * User supplied name. Constrained to [a-zA-Z.-_ ]+. - * - * Generated from protobuf field string common_name = 5; - * @return string - */ - public function getCommonName() - { - return $this->common_name; - } - - /** - * User supplied name. Constrained to [a-zA-Z.-_ ]+. - * - * Generated from protobuf field string common_name = 5; - * @param string $var - * @return $this - */ - public function setCommonName($var) - { - GPBUtil::checkString($var, True); - $this->common_name = $var; - - return $this; - } - - /** - * The time when the certificate expires in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @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 time when the certificate expires in [RFC - * 3339](https://tools.ietf.org/html/rfc3339) format, for example - * `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - - /** - * Sha1 Fingerprint. - * - * Generated from protobuf field string sha1_fingerprint = 7; - * @return string - */ - public function getSha1Fingerprint() - { - return $this->sha1_fingerprint; - } - - /** - * Sha1 Fingerprint. - * - * Generated from protobuf field string sha1_fingerprint = 7; - * @param string $var - * @return $this - */ - public function setSha1Fingerprint($var) - { - GPBUtil::checkString($var, True); - $this->sha1_fingerprint = $var; - - return $this; - } - - /** - * Name of the database instance. - * - * Generated from protobuf field string instance = 8; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Name of the database instance. - * - * Generated from protobuf field string instance = 8; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 9; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * The URI of this resource. - * - * Generated from protobuf field string self_link = 9; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php deleted file mode 100644 index 4d9eb12d3397..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.sql.v1.SslCertDetail - */ -class SslCertDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The public information about the cert. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; - */ - protected $cert_info = null; - /** - * The private key for the client cert, in pem format. Keep private in order - * to protect your security. - * - * Generated from protobuf field string cert_private_key = 2; - */ - protected $cert_private_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Sql\V1\SslCert $cert_info - * The public information about the cert. - * @type string $cert_private_key - * The private key for the client cert, in pem format. Keep private in order - * to protect your security. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The public information about the cert. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; - * @return \Google\Cloud\Sql\V1\SslCert|null - */ - public function getCertInfo() - { - return $this->cert_info; - } - - public function hasCertInfo() - { - return isset($this->cert_info); - } - - public function clearCertInfo() - { - unset($this->cert_info); - } - - /** - * The public information about the cert. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; - * @param \Google\Cloud\Sql\V1\SslCert $var - * @return $this - */ - public function setCertInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); - $this->cert_info = $var; - - return $this; - } - - /** - * The private key for the client cert, in pem format. Keep private in order - * to protect your security. - * - * Generated from protobuf field string cert_private_key = 2; - * @return string - */ - public function getCertPrivateKey() - { - return $this->cert_private_key; - } - - /** - * The private key for the client cert, in pem format. Keep private in order - * to protect your security. - * - * Generated from protobuf field string cert_private_key = 2; - * @param string $var - * @return $this - */ - public function setCertPrivateKey($var) - { - GPBUtil::checkString($var, True); - $this->cert_private_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php deleted file mode 100644 index 3652c5694a2a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SslCertsCreateEphemeralRequest - */ -class SslCertsCreateEphemeralRequest extends \Google\Protobuf\Internal\Message -{ - /** - * PEM encoded public key to include in the signed certificate. - * - * Generated from protobuf field string public_key = 1; - */ - protected $public_key = ''; - /** - * Access token to include in the signed certificate. - * - * Generated from protobuf field string access_token = 2; - */ - protected $access_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $public_key - * PEM encoded public key to include in the signed certificate. - * @type string $access_token - * Access token to include in the signed certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * PEM encoded public key to include in the signed certificate. - * - * Generated from protobuf field string public_key = 1; - * @return string - */ - public function getPublicKey() - { - return $this->public_key; - } - - /** - * PEM encoded public key to include in the signed certificate. - * - * Generated from protobuf field string public_key = 1; - * @param string $var - * @return $this - */ - public function setPublicKey($var) - { - GPBUtil::checkString($var, True); - $this->public_key = $var; - - return $this; - } - - /** - * Access token to include in the signed certificate. - * - * Generated from protobuf field string access_token = 2; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * Access token to include in the signed certificate. - * - * Generated from protobuf field string access_token = 2; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php deleted file mode 100644 index ee4048262803..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.sql.v1.SslCertsInsertRequest - */ -class SslCertsInsertRequest extends \Google\Protobuf\Internal\Message -{ - /** - * User supplied name. Must be a distinct name from the other certificates - * for this instance. - * - * Generated from protobuf field string common_name = 1; - */ - protected $common_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $common_name - * User supplied name. Must be a distinct name from the other certificates - * for this instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * User supplied name. Must be a distinct name from the other certificates - * for this instance. - * - * Generated from protobuf field string common_name = 1; - * @return string - */ - public function getCommonName() - { - return $this->common_name; - } - - /** - * User supplied name. Must be a distinct name from the other certificates - * for this instance. - * - * Generated from protobuf field string common_name = 1; - * @param string $var - * @return $this - */ - public function setCommonName($var) - { - GPBUtil::checkString($var, True); - $this->common_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php deleted file mode 100644 index 8c78bd59278f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.sql.v1.SslCertsInsertResponse - */ -class SslCertsInsertResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#sslCertsInsert`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The operation to track the ssl certs insert request. - * - * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; - */ - protected $operation = null; - /** - * The server Certificate Authority's certificate. If this is missing you can - * force a new one to be generated by calling resetSslConfig method on - * instances resource. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; - */ - protected $server_ca_cert = null; - /** - * The new client certificate and private key. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; - */ - protected $client_cert = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#sslCertsInsert`. - * @type \Google\Cloud\Sql\V1\Operation $operation - * The operation to track the ssl certs insert request. - * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert - * The server Certificate Authority's certificate. If this is missing you can - * force a new one to be generated by calling resetSslConfig method on - * instances resource. - * @type \Google\Cloud\Sql\V1\SslCertDetail $client_cert - * The new client certificate and private key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#sslCertsInsert`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#sslCertsInsert`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The operation to track the ssl certs insert request. - * - * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; - * @return \Google\Cloud\Sql\V1\Operation|null - */ - public function getOperation() - { - return $this->operation; - } - - public function hasOperation() - { - return isset($this->operation); - } - - public function clearOperation() - { - unset($this->operation); - } - - /** - * The operation to track the ssl certs insert request. - * - * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; - * @param \Google\Cloud\Sql\V1\Operation $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Operation::class); - $this->operation = $var; - - return $this; - } - - /** - * The server Certificate Authority's certificate. If this is missing you can - * force a new one to be generated by calling resetSslConfig method on - * instances resource. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; - * @return \Google\Cloud\Sql\V1\SslCert|null - */ - public function getServerCaCert() - { - return $this->server_ca_cert; - } - - public function hasServerCaCert() - { - return isset($this->server_ca_cert); - } - - public function clearServerCaCert() - { - unset($this->server_ca_cert); - } - - /** - * The server Certificate Authority's certificate. If this is missing you can - * force a new one to be generated by calling resetSslConfig method on - * instances resource. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; - * @param \Google\Cloud\Sql\V1\SslCert $var - * @return $this - */ - public function setServerCaCert($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); - $this->server_ca_cert = $var; - - return $this; - } - - /** - * The new client certificate and private key. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; - * @return \Google\Cloud\Sql\V1\SslCertDetail|null - */ - public function getClientCert() - { - return $this->client_cert; - } - - public function hasClientCert() - { - return isset($this->client_cert); - } - - public function clearClientCert() - { - unset($this->client_cert); - } - - /** - * The new client certificate and private key. - * - * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; - * @param \Google\Cloud\Sql\V1\SslCertDetail $var - * @return $this - */ - public function setClientCert($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertDetail::class); - $this->client_cert = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php deleted file mode 100644 index 7ecb980459f4..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.SslCertsListResponse - */ -class SslCertsListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#sslCertsList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of client certificates for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#sslCertsList`. - * @type array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $items - * List of client certificates for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#sslCertsList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#sslCertsList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of client certificates for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of client certificates for the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; - * @param array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SslCert::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php deleted file mode 100644 index cf7b01c0902d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.sql.v1.SyncFlags - */ -class SyncFlags extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the flag. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The value of the flag. This field must be omitted if the flag - * doesn't take a value. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the flag. - * @type string $value - * The value of the flag. This field must be omitted if the flag - * doesn't take a value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the flag. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the flag. - * - * 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 value of the flag. This field must be omitted if the flag - * doesn't take a value. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the flag. This field must be omitted if the flag - * doesn't take a value. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php deleted file mode 100644 index 7be60ec5d8bd..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.sql.v1.Tier - */ -class Tier extends \Google\Protobuf\Internal\Message -{ - /** - * An identifier for the machine type, for example, `db-custom-1-3840`. For - * related information, see [Pricing](/sql/pricing). - * - * Generated from protobuf field string tier = 1; - */ - protected $tier = ''; - /** - * The maximum RAM usage of this tier in bytes. - * - * Generated from protobuf field int64 RAM = 2; - */ - protected $RAM = 0; - /** - * This is always `sql#tier`. - * - * Generated from protobuf field string kind = 3; - */ - protected $kind = ''; - /** - * The maximum disk size of this tier in bytes. - * - * Generated from protobuf field int64 Disk_Quota = 4; - */ - protected $Disk_Quota = 0; - /** - * The applicable regions for this tier. - * - * Generated from protobuf field repeated string region = 5; - */ - private $region; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tier - * An identifier for the machine type, for example, `db-custom-1-3840`. For - * related information, see [Pricing](/sql/pricing). - * @type int|string $RAM - * The maximum RAM usage of this tier in bytes. - * @type string $kind - * This is always `sql#tier`. - * @type int|string $Disk_Quota - * The maximum disk size of this tier in bytes. - * @type array|\Google\Protobuf\Internal\RepeatedField $region - * The applicable regions for this tier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); - parent::__construct($data); - } - - /** - * An identifier for the machine type, for example, `db-custom-1-3840`. For - * related information, see [Pricing](/sql/pricing). - * - * Generated from protobuf field string tier = 1; - * @return string - */ - public function getTier() - { - return $this->tier; - } - - /** - * An identifier for the machine type, for example, `db-custom-1-3840`. For - * related information, see [Pricing](/sql/pricing). - * - * Generated from protobuf field string tier = 1; - * @param string $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkString($var, True); - $this->tier = $var; - - return $this; - } - - /** - * The maximum RAM usage of this tier in bytes. - * - * Generated from protobuf field int64 RAM = 2; - * @return int|string - */ - public function getRAM() - { - return $this->RAM; - } - - /** - * The maximum RAM usage of this tier in bytes. - * - * Generated from protobuf field int64 RAM = 2; - * @param int|string $var - * @return $this - */ - public function setRAM($var) - { - GPBUtil::checkInt64($var); - $this->RAM = $var; - - return $this; - } - - /** - * This is always `sql#tier`. - * - * Generated from protobuf field string kind = 3; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#tier`. - * - * Generated from protobuf field string kind = 3; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The maximum disk size of this tier in bytes. - * - * Generated from protobuf field int64 Disk_Quota = 4; - * @return int|string - */ - public function getDiskQuota() - { - return $this->Disk_Quota; - } - - /** - * The maximum disk size of this tier in bytes. - * - * Generated from protobuf field int64 Disk_Quota = 4; - * @param int|string $var - * @return $this - */ - public function setDiskQuota($var) - { - GPBUtil::checkInt64($var); - $this->Disk_Quota = $var; - - return $this; - } - - /** - * The applicable regions for this tier. - * - * Generated from protobuf field repeated string region = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegion() - { - return $this->region; - } - - /** - * The applicable regions for this tier. - * - * Generated from protobuf field repeated string region = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->region = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php deleted file mode 100644 index f43549e0960f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.sql.v1.TiersListResponse - */ -class TiersListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#tiersList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of tiers. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#tiersList`. - * @type array<\Google\Cloud\Sql\V1\Tier>|\Google\Protobuf\Internal\RepeatedField $items - * List of tiers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#tiersList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#tiersList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of tiers. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of tiers. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; - * @param array<\Google\Cloud\Sql\V1\Tier>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Tier::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php deleted file mode 100644 index e97d8dbfdb71..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.sql.v1.TruncateLogContext - */ -class TruncateLogContext extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#truncateLogContext`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and - * `MYSQL_SLOW_TABLE`. - * - * Generated from protobuf field string log_type = 2; - */ - protected $log_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#truncateLogContext`. - * @type string $log_type - * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and - * `MYSQL_SLOW_TABLE`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#truncateLogContext`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#truncateLogContext`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and - * `MYSQL_SLOW_TABLE`. - * - * Generated from protobuf field string log_type = 2; - * @return string - */ - public function getLogType() - { - return $this->log_type; - } - - /** - * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and - * `MYSQL_SLOW_TABLE`. - * - * Generated from protobuf field string log_type = 2; - * @param string $var - * @return $this - */ - public function setLogType($var) - { - GPBUtil::checkString($var, True); - $this->log_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php deleted file mode 100644 index d77a1fd3563c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php +++ /dev/null @@ -1,474 +0,0 @@ -google.cloud.sql.v1.User - */ -class User extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#user`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * The password for the user. - * - * Generated from protobuf field string password = 2; - */ - protected $password = ''; - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - /** - * The name of the user in the Cloud SQL instance. Can be omitted for - * `update` because it is already specified in the URL. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * Optional. The host from which the user can connect. For `insert` - * operations, host defaults to an empty string. For `update` - * operations, host is specified as part of the request URL. The host name - * cannot be updated after insertion. For a MySQL instance, it's required; - * for a PostgreSQL or SQL Server instance, it's optional. - * - * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $host = ''; - /** - * The name of the Cloud SQL instance. This does not include the project ID. - * Can be omitted for `update` because it is already specified on the - * URL. - * - * Generated from protobuf field string instance = 6; - */ - protected $instance = ''; - /** - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. Can be omitted for `update` because - * it is already specified on the URL. - * - * Generated from protobuf field string project = 7; - */ - protected $project = ''; - /** - * The user type. It determines the method to authenticate the user during - * login. The default is the database's built-in user type. - * - * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; - */ - protected $type = 0; - /** - * User level password validation policy. - * - * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; - */ - protected $password_policy = null; - /** - * Dual password status for the user. - * - * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; - */ - protected $dual_password_type = null; - protected $user_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#user`. - * @type string $password - * The password for the user. - * @type string $etag - * This field is deprecated and will be removed from a future version of the - * API. - * @type string $name - * The name of the user in the Cloud SQL instance. Can be omitted for - * `update` because it is already specified in the URL. - * @type string $host - * Optional. The host from which the user can connect. For `insert` - * operations, host defaults to an empty string. For `update` - * operations, host is specified as part of the request URL. The host name - * cannot be updated after insertion. For a MySQL instance, it's required; - * for a PostgreSQL or SQL Server instance, it's optional. - * @type string $instance - * The name of the Cloud SQL instance. This does not include the project ID. - * Can be omitted for `update` because it is already specified on the - * URL. - * @type string $project - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. Can be omitted for `update` because - * it is already specified on the URL. - * @type int $type - * The user type. It determines the method to authenticate the user during - * login. The default is the database's built-in user type. - * @type \Google\Cloud\Sql\V1\SqlServerUserDetails $sqlserver_user_details - * @type \Google\Cloud\Sql\V1\UserPasswordValidationPolicy $password_policy - * User level password validation policy. - * @type int $dual_password_type - * Dual password status for the user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#user`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#user`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * The password for the user. - * - * Generated from protobuf field string password = 2; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * The password for the user. - * - * Generated from protobuf field string password = 2; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This field is deprecated and will be removed from a future version of the - * API. - * - * 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; - } - - /** - * The name of the user in the Cloud SQL instance. Can be omitted for - * `update` because it is already specified in the URL. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the user in the Cloud SQL instance. Can be omitted for - * `update` because it is already specified in the URL. - * - * 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; - } - - /** - * Optional. The host from which the user can connect. For `insert` - * operations, host defaults to an empty string. For `update` - * operations, host is specified as part of the request URL. The host name - * cannot be updated after insertion. For a MySQL instance, it's required; - * for a PostgreSQL or SQL Server instance, it's optional. - * - * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Optional. The host from which the user can connect. For `insert` - * operations, host defaults to an empty string. For `update` - * operations, host is specified as part of the request URL. The host name - * cannot be updated after insertion. For a MySQL instance, it's required; - * for a PostgreSQL or SQL Server instance, it's optional. - * - * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * The name of the Cloud SQL instance. This does not include the project ID. - * Can be omitted for `update` because it is already specified on the - * URL. - * - * Generated from protobuf field string instance = 6; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * The name of the Cloud SQL instance. This does not include the project ID. - * Can be omitted for `update` because it is already specified on the - * URL. - * - * Generated from protobuf field string instance = 6; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. Can be omitted for `update` because - * it is already specified on the URL. - * - * Generated from protobuf field string project = 7; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The project ID of the project containing the Cloud SQL database. The Google - * apps domain is prefixed if applicable. Can be omitted for `update` because - * it is already specified on the URL. - * - * Generated from protobuf field string project = 7; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The user type. It determines the method to authenticate the user during - * login. The default is the database's built-in user type. - * - * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The user type. It determines the method to authenticate the user during - * login. The default is the database's built-in user type. - * - * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\User\SqlUserType::class); - $this->type = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9; - * @return \Google\Cloud\Sql\V1\SqlServerUserDetails|null - */ - public function getSqlserverUserDetails() - { - return $this->readOneof(9); - } - - public function hasSqlserverUserDetails() - { - return $this->hasOneof(9); - } - - /** - * Generated from protobuf field .google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9; - * @param \Google\Cloud\Sql\V1\SqlServerUserDetails $var - * @return $this - */ - public function setSqlserverUserDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerUserDetails::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * User level password validation policy. - * - * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; - * @return \Google\Cloud\Sql\V1\UserPasswordValidationPolicy|null - */ - public function getPasswordPolicy() - { - return $this->password_policy; - } - - public function hasPasswordPolicy() - { - return isset($this->password_policy); - } - - public function clearPasswordPolicy() - { - unset($this->password_policy); - } - - /** - * User level password validation policy. - * - * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; - * @param \Google\Cloud\Sql\V1\UserPasswordValidationPolicy $var - * @return $this - */ - public function setPasswordPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\UserPasswordValidationPolicy::class); - $this->password_policy = $var; - - return $this; - } - - /** - * Dual password status for the user. - * - * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; - * @return int - */ - public function getDualPasswordType() - { - return isset($this->dual_password_type) ? $this->dual_password_type : 0; - } - - public function hasDualPasswordType() - { - return isset($this->dual_password_type); - } - - public function clearDualPasswordType() - { - unset($this->dual_password_type); - } - - /** - * Dual password status for the user. - * - * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; - * @param int $var - * @return $this - */ - public function setDualPasswordType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\User\DualPasswordType::class); - $this->dual_password_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getUserDetails() - { - return $this->whichOneof("user_details"); - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php deleted file mode 100644 index 02da08dd9a1f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.sql.v1.User.DualPasswordType - */ -class DualPasswordType -{ - /** - * The default value. - * - * Generated from protobuf enum DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; - */ - const DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; - /** - * Do not update the user's dual password status. - * - * Generated from protobuf enum NO_MODIFY_DUAL_PASSWORD = 1; - */ - const NO_MODIFY_DUAL_PASSWORD = 1; - /** - * No dual password usable for connecting using this user. - * - * Generated from protobuf enum NO_DUAL_PASSWORD = 2; - */ - const NO_DUAL_PASSWORD = 2; - /** - * Dual password usable for connecting using this user. - * - * Generated from protobuf enum DUAL_PASSWORD = 3; - */ - const DUAL_PASSWORD = 3; - - private static $valueToName = [ - self::DUAL_PASSWORD_TYPE_UNSPECIFIED => 'DUAL_PASSWORD_TYPE_UNSPECIFIED', - self::NO_MODIFY_DUAL_PASSWORD => 'NO_MODIFY_DUAL_PASSWORD', - self::NO_DUAL_PASSWORD => 'NO_DUAL_PASSWORD', - self::DUAL_PASSWORD => 'DUAL_PASSWORD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DualPasswordType::class, \Google\Cloud\Sql\V1\User_DualPasswordType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php deleted file mode 100644 index 4f6c75f172b9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.sql.v1.User.SqlUserType - */ -class SqlUserType -{ - /** - * The database's built-in user type. - * - * Generated from protobuf enum BUILT_IN = 0; - */ - const BUILT_IN = 0; - /** - * Cloud IAM user. - * - * Generated from protobuf enum CLOUD_IAM_USER = 1; - */ - const CLOUD_IAM_USER = 1; - /** - * Cloud IAM service account. - * - * Generated from protobuf enum CLOUD_IAM_SERVICE_ACCOUNT = 2; - */ - const CLOUD_IAM_SERVICE_ACCOUNT = 2; - /** - * Cloud IAM group non-login user. - * - * Generated from protobuf enum CLOUD_IAM_GROUP = 3; - */ - const CLOUD_IAM_GROUP = 3; - /** - * Cloud IAM group login user. - * - * Generated from protobuf enum CLOUD_IAM_GROUP_USER = 4; - */ - const CLOUD_IAM_GROUP_USER = 4; - /** - * Cloud IAM group login service account. - * - * Generated from protobuf enum CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; - */ - const CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; - - private static $valueToName = [ - self::BUILT_IN => 'BUILT_IN', - self::CLOUD_IAM_USER => 'CLOUD_IAM_USER', - self::CLOUD_IAM_SERVICE_ACCOUNT => 'CLOUD_IAM_SERVICE_ACCOUNT', - self::CLOUD_IAM_GROUP => 'CLOUD_IAM_GROUP', - self::CLOUD_IAM_GROUP_USER => 'CLOUD_IAM_GROUP_USER', - self::CLOUD_IAM_GROUP_SERVICE_ACCOUNT => 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlUserType::class, \Google\Cloud\Sql\V1\User_SqlUserType::class); - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php deleted file mode 100644 index 5db3484ac7c2..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.sql.v1.UserPasswordValidationPolicy - */ -class UserPasswordValidationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Number of failed login attempts allowed before user get locked. - * - * Generated from protobuf field int32 allowed_failed_attempts = 1; - */ - protected $allowed_failed_attempts = 0; - /** - * Expiration duration after password is updated. - * - * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; - */ - protected $password_expiration_duration = null; - /** - * If true, failed login attempts check will be enabled. - * - * Generated from protobuf field bool enable_failed_attempts_check = 3; - */ - protected $enable_failed_attempts_check = false; - /** - * Output only. Read-only password status. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - /** - * If true, the user must specify the current password before changing the - * password. This flag is supported only for MySQL. - * - * Generated from protobuf field bool enable_password_verification = 5; - */ - protected $enable_password_verification = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $allowed_failed_attempts - * Number of failed login attempts allowed before user get locked. - * @type \Google\Protobuf\Duration $password_expiration_duration - * Expiration duration after password is updated. - * @type bool $enable_failed_attempts_check - * If true, failed login attempts check will be enabled. - * @type \Google\Cloud\Sql\V1\PasswordStatus $status - * Output only. Read-only password status. - * @type bool $enable_password_verification - * If true, the user must specify the current password before changing the - * password. This flag is supported only for MySQL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * Number of failed login attempts allowed before user get locked. - * - * Generated from protobuf field int32 allowed_failed_attempts = 1; - * @return int - */ - public function getAllowedFailedAttempts() - { - return $this->allowed_failed_attempts; - } - - /** - * Number of failed login attempts allowed before user get locked. - * - * Generated from protobuf field int32 allowed_failed_attempts = 1; - * @param int $var - * @return $this - */ - public function setAllowedFailedAttempts($var) - { - GPBUtil::checkInt32($var); - $this->allowed_failed_attempts = $var; - - return $this; - } - - /** - * Expiration duration after password is updated. - * - * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getPasswordExpirationDuration() - { - return $this->password_expiration_duration; - } - - public function hasPasswordExpirationDuration() - { - return isset($this->password_expiration_duration); - } - - public function clearPasswordExpirationDuration() - { - unset($this->password_expiration_duration); - } - - /** - * Expiration duration after password is updated. - * - * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPasswordExpirationDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->password_expiration_duration = $var; - - return $this; - } - - /** - * If true, failed login attempts check will be enabled. - * - * Generated from protobuf field bool enable_failed_attempts_check = 3; - * @return bool - */ - public function getEnableFailedAttemptsCheck() - { - return $this->enable_failed_attempts_check; - } - - /** - * If true, failed login attempts check will be enabled. - * - * Generated from protobuf field bool enable_failed_attempts_check = 3; - * @param bool $var - * @return $this - */ - public function setEnableFailedAttemptsCheck($var) - { - GPBUtil::checkBool($var); - $this->enable_failed_attempts_check = $var; - - return $this; - } - - /** - * Output only. Read-only password status. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Sql\V1\PasswordStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Read-only password status. - * - * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Sql\V1\PasswordStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PasswordStatus::class); - $this->status = $var; - - return $this; - } - - /** - * If true, the user must specify the current password before changing the - * password. This flag is supported only for MySQL. - * - * Generated from protobuf field bool enable_password_verification = 5; - * @return bool - */ - public function getEnablePasswordVerification() - { - return $this->enable_password_verification; - } - - /** - * If true, the user must specify the current password before changing the - * password. This flag is supported only for MySQL. - * - * Generated from protobuf field bool enable_password_verification = 5; - * @param bool $var - * @return $this - */ - public function setEnablePasswordVerification($var) - { - GPBUtil::checkBool($var); - $this->enable_password_verification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php deleted file mode 100644 index 4023ff5fc2bf..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.sql.v1.UsersListResponse - */ -class UsersListResponse extends \Google\Protobuf\Internal\Message -{ - /** - * This is always `sql#usersList`. - * - * Generated from protobuf field string kind = 1; - */ - protected $kind = ''; - /** - * List of user resources in the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; - */ - private $items; - /** - * Unused. - * - * Generated from protobuf field string next_page_token = 3 [deprecated = true]; - * @deprecated - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kind - * This is always `sql#usersList`. - * @type array<\Google\Cloud\Sql\V1\User>|\Google\Protobuf\Internal\RepeatedField $items - * List of user resources in the instance. - * @type string $next_page_token - * Unused. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); - parent::__construct($data); - } - - /** - * This is always `sql#usersList`. - * - * Generated from protobuf field string kind = 1; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * This is always `sql#usersList`. - * - * Generated from protobuf field string kind = 1; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * List of user resources in the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of user resources in the instance. - * - * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; - * @param array<\Google\Cloud\Sql\V1\User>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\User::class); - $this->items = $arr; - - return $this; - } - - /** - * Unused. - * - * Generated from protobuf field string next_page_token = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getNextPageToken() - { - @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); - return $this->next_page_token; - } - - /** - * Unused. - * - * Generated from protobuf field string next_page_token = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setNextPageToken($var) - { - @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php deleted file mode 100644 index 3c14bb21208a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php +++ /dev/null @@ -1,57 +0,0 @@ -delete($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlBackupRunsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php deleted file mode 100644 index afa9913adb03..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php +++ /dev/null @@ -1,57 +0,0 @@ -get($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlBackupRunsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php deleted file mode 100644 index ea1b4c617c63..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php +++ /dev/null @@ -1,57 +0,0 @@ -insert($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlBackupRunsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php deleted file mode 100644 index 8b8a1d8bfdfc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php +++ /dev/null @@ -1,59 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlBackupRunsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php deleted file mode 100644 index c2425b500411..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php +++ /dev/null @@ -1,60 +0,0 @@ -generateEphemeralCert($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlConnectService_GenerateEphemeralCert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php deleted file mode 100644 index b170636acde3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php +++ /dev/null @@ -1,57 +0,0 @@ -getConnectSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlConnectService_GetConnectSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php deleted file mode 100644 index e99a3f2bf791..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php +++ /dev/null @@ -1,57 +0,0 @@ -delete($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlDatabasesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php deleted file mode 100644 index bf33a4db331d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php +++ /dev/null @@ -1,58 +0,0 @@ -get($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlDatabasesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php deleted file mode 100644 index 215022a1cd3a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php +++ /dev/null @@ -1,60 +0,0 @@ -insert($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlDatabasesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php deleted file mode 100644 index d2f9f97c5542..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php +++ /dev/null @@ -1,57 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlDatabasesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php deleted file mode 100644 index 71d182cb0137..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php +++ /dev/null @@ -1,58 +0,0 @@ -patch($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlDatabasesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php deleted file mode 100644 index 68601967795d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php +++ /dev/null @@ -1,58 +0,0 @@ -update($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlDatabasesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php deleted file mode 100644 index d129c9b22da1..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php +++ /dev/null @@ -1,57 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlFlagsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php deleted file mode 100644 index eb1711a8938e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php +++ /dev/null @@ -1,80 +0,0 @@ -setInstance($instance) - ->setProject($project) - ->setBody($body); - - // Call the API and handle any network failures. - try { - /** @var SqlInstancesAcquireSsrsLeaseResponse $response */ - $response = $sqlInstancesServiceClient->acquireSsrsLease($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 -{ - $instance = '[INSTANCE]'; - $project = '[PROJECT]'; - - acquire_ssrs_lease_sample($instance, $project); -} -// [END sqladmin_v1_generated_SqlInstancesService_AcquireSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php deleted file mode 100644 index 07344b6db82c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php +++ /dev/null @@ -1,63 +0,0 @@ -addServerCa($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_AddServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php deleted file mode 100644 index 50edbc47572f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php +++ /dev/null @@ -1,58 +0,0 @@ -clone($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Clone_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php deleted file mode 100644 index c207649669a3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php +++ /dev/null @@ -1,60 +0,0 @@ -createEphemeral($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_CreateEphemeral_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php deleted file mode 100644 index a4b275b5844f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php +++ /dev/null @@ -1,57 +0,0 @@ -delete($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php deleted file mode 100644 index 01a4b26624b6..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php +++ /dev/null @@ -1,87 +0,0 @@ -setSourceRepresentativeInstanceName($bodyDemoteContextSourceRepresentativeInstanceName); - $body = (new InstancesDemoteRequest()) - ->setDemoteContext($bodyDemoteContext); - $request = (new SqlInstancesDemoteRequest()) - ->setInstance($instance) - ->setProject($project) - ->setBody($body); - - // Call the API and handle any network failures. - try { - /** @var Operation $response */ - $response = $sqlInstancesServiceClient->demote($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 -{ - $instance = '[INSTANCE]'; - $project = '[PROJECT]'; - $bodyDemoteContextSourceRepresentativeInstanceName = '[SOURCE_REPRESENTATIVE_INSTANCE_NAME]'; - - demote_sample($instance, $project, $bodyDemoteContextSourceRepresentativeInstanceName); -} -// [END sqladmin_v1_generated_SqlInstancesService_Demote_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php deleted file mode 100644 index dbf950be9fb1..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php +++ /dev/null @@ -1,58 +0,0 @@ -demoteMaster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_DemoteMaster_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php deleted file mode 100644 index 070a2ceaf657..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php +++ /dev/null @@ -1,58 +0,0 @@ -export($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Export_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php deleted file mode 100644 index 4882dda8ba22..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php +++ /dev/null @@ -1,64 +0,0 @@ -failover($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Failover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php deleted file mode 100644 index 743f86f11906..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php +++ /dev/null @@ -1,57 +0,0 @@ -get($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php deleted file mode 100644 index e97c4fa67898..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php +++ /dev/null @@ -1,57 +0,0 @@ -getDiskShrinkConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_GetDiskShrinkConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php deleted file mode 100644 index 5ffd507acd8f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php +++ /dev/null @@ -1,57 +0,0 @@ -getLatestRecoveryTime($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_GetLatestRecoveryTime_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php deleted file mode 100644 index 864538ad14a1..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php +++ /dev/null @@ -1,58 +0,0 @@ -import($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Import_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php deleted file mode 100644 index 6ee9257924c0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php +++ /dev/null @@ -1,57 +0,0 @@ -insert($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php deleted file mode 100644 index 03b89adf9d92..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php +++ /dev/null @@ -1,57 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php deleted file mode 100644 index d0497d3b2482..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php +++ /dev/null @@ -1,61 +0,0 @@ -listServerCas($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_ListServerCas_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php deleted file mode 100644 index fadfac70c04c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php +++ /dev/null @@ -1,58 +0,0 @@ -patch($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php deleted file mode 100644 index 77a2c96ddcf1..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php +++ /dev/null @@ -1,57 +0,0 @@ -performDiskShrink($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_PerformDiskShrink_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php deleted file mode 100644 index 1f61ff4141e8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php +++ /dev/null @@ -1,59 +0,0 @@ -promoteReplica($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_PromoteReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php deleted file mode 100644 index a4175c69217c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php +++ /dev/null @@ -1,57 +0,0 @@ -reencrypt($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Reencrypt_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php deleted file mode 100644 index 9795d90041e8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php +++ /dev/null @@ -1,76 +0,0 @@ -setInstance($instance) - ->setProject($project); - - // Call the API and handle any network failures. - try { - /** @var SqlInstancesReleaseSsrsLeaseResponse $response */ - $response = $sqlInstancesServiceClient->releaseSsrsLease($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 -{ - $instance = '[INSTANCE]'; - $project = '[PROJECT]'; - - release_ssrs_lease_sample($instance, $project); -} -// [END sqladmin_v1_generated_SqlInstancesService_ReleaseSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php deleted file mode 100644 index 43a7a8a7b2f8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php +++ /dev/null @@ -1,57 +0,0 @@ -rescheduleMaintenance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php deleted file mode 100644 index 6d249f20d66c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php +++ /dev/null @@ -1,57 +0,0 @@ -resetReplicaSize($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_ResetReplicaSize_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php deleted file mode 100644 index 2b70c2126902..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php +++ /dev/null @@ -1,58 +0,0 @@ -resetSslConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_ResetSslConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php deleted file mode 100644 index d633b1d763a7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php +++ /dev/null @@ -1,57 +0,0 @@ -restart($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Restart_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php deleted file mode 100644 index ab1ba29f1674..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php +++ /dev/null @@ -1,58 +0,0 @@ -restoreBackup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_RestoreBackup_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php deleted file mode 100644 index c19ab49460c7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php +++ /dev/null @@ -1,60 +0,0 @@ -rotateServerCa($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_RotateServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php deleted file mode 100644 index 9fc1ced4b130..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php +++ /dev/null @@ -1,57 +0,0 @@ -startExternalSync($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_StartExternalSync_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php deleted file mode 100644 index f97637c106f5..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php +++ /dev/null @@ -1,57 +0,0 @@ -startReplica($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_StartReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php deleted file mode 100644 index 4b12bda8ef2c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php +++ /dev/null @@ -1,57 +0,0 @@ -stopReplica($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_StopReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php deleted file mode 100644 index 58894b07f6e7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php +++ /dev/null @@ -1,58 +0,0 @@ -switchover($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Switchover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php deleted file mode 100644 index 0e6f130dc788..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php +++ /dev/null @@ -1,58 +0,0 @@ -truncateLog($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_TruncateLog_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php deleted file mode 100644 index 8df4adfa6f43..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php +++ /dev/null @@ -1,58 +0,0 @@ -update($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php deleted file mode 100644 index 98e058a44c75..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php +++ /dev/null @@ -1,57 +0,0 @@ -verifyExternalSyncSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlInstancesService_VerifyExternalSyncSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php deleted file mode 100644 index 3666a907132b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php +++ /dev/null @@ -1,55 +0,0 @@ -cancel($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlOperationsService_Cancel_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php deleted file mode 100644 index 52eb3c62d29e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php +++ /dev/null @@ -1,57 +0,0 @@ -get($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlOperationsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php deleted file mode 100644 index 0beed7105897..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php +++ /dev/null @@ -1,58 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlOperationsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php deleted file mode 100644 index 0d6646e07dcc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php +++ /dev/null @@ -1,58 +0,0 @@ -delete($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlSslCertsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php deleted file mode 100644 index 3f462a607ecd..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php +++ /dev/null @@ -1,59 +0,0 @@ -get($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlSslCertsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php deleted file mode 100644 index 092fb4ef8c79..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php +++ /dev/null @@ -1,59 +0,0 @@ -insert($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlSslCertsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php deleted file mode 100644 index 4e69956a2289..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php +++ /dev/null @@ -1,57 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlSslCertsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php deleted file mode 100644 index e2d320dddaa3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php +++ /dev/null @@ -1,59 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlTiersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php deleted file mode 100644 index 0dcccbd25a60..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php +++ /dev/null @@ -1,57 +0,0 @@ -delete($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlUsersService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php deleted file mode 100644 index b1f9784cbc43..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php +++ /dev/null @@ -1,57 +0,0 @@ -get($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlUsersService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php deleted file mode 100644 index 4c09243fc801..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php +++ /dev/null @@ -1,57 +0,0 @@ -insert($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlUsersService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php deleted file mode 100644 index 90925d6bc614..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php +++ /dev/null @@ -1,57 +0,0 @@ -list($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlUsersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php deleted file mode 100644 index 8c2584251ae9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php +++ /dev/null @@ -1,57 +0,0 @@ -update($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END sqladmin_v1_generated_SqlUsersService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php deleted file mode 100644 index 6dac880c0a7d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php +++ /dev/null @@ -1,144 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_available_database_versions_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php deleted file mode 100644 index ab9cb33a1785..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php +++ /dev/null @@ -1,278 +0,0 @@ - deleteAsync(SqlBackupRunsDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlBackupRunsGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlBackupRunsInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlBackupRunsListRequest $request, array $optionalArgs = []) - */ -final class SqlBackupRunsServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlBackupRunsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_backup_runs_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes the backup taken by a backup run. - * - * The async variant is {@see SqlBackupRunsServiceClient::deleteAsync()} . - * - * @example samples/V1/SqlBackupRunsServiceClient/delete.php - * - * @param SqlBackupRunsDeleteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 delete(SqlBackupRunsDeleteRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Delete', $request, $callOptions)->wait(); - } - - /** - * Retrieves a resource containing information about a backup run. - * - * The async variant is {@see SqlBackupRunsServiceClient::getAsync()} . - * - * @example samples/V1/SqlBackupRunsServiceClient/get.php - * - * @param SqlBackupRunsGetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupRun - * - * @throws ApiException Thrown if the API call fails. - */ - public function get(SqlBackupRunsGetRequest $request, array $callOptions = []): BackupRun - { - return $this->startApiCall('Get', $request, $callOptions)->wait(); - } - - /** - * Creates a new backup run on demand. - * - * The async variant is {@see SqlBackupRunsServiceClient::insertAsync()} . - * - * @example samples/V1/SqlBackupRunsServiceClient/insert.php - * - * @param SqlBackupRunsInsertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 insert(SqlBackupRunsInsertRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Insert', $request, $callOptions)->wait(); - } - - /** - * Lists all backup runs associated with the project or a given instance - * and configuration in the reverse chronological order of the backup - * initiation time. - * - * The async variant is {@see SqlBackupRunsServiceClient::listAsync()} . - * - * @example samples/V1/SqlBackupRunsServiceClient/list.php - * - * @param SqlBackupRunsListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupRunsListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlBackupRunsListRequest $request, array $callOptions = []): BackupRunsListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php deleted file mode 100644 index ad6ad4e31547..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php +++ /dev/null @@ -1,223 +0,0 @@ - generateEphemeralCertAsync(GenerateEphemeralCertRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectSettingsAsync(GetConnectSettingsRequest $request, array $optionalArgs = []) - */ -final class SqlConnectServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlConnectService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_connect_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_connect_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_connect_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_connect_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Generates a short-lived X509 certificate containing the provided public key - * and signed by a private key specific to the target instance. Users may use - * the certificate to authenticate as themselves when connecting to the - * database. - * - * The async variant is - * {@see SqlConnectServiceClient::generateEphemeralCertAsync()} . - * - * @example samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php - * - * @param GenerateEphemeralCertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateEphemeralCertResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateEphemeralCert(GenerateEphemeralCertRequest $request, array $callOptions = []): GenerateEphemeralCertResponse - { - return $this->startApiCall('GenerateEphemeralCert', $request, $callOptions)->wait(); - } - - /** - * Retrieves connect settings about a Cloud SQL instance. - * - * The async variant is {@see SqlConnectServiceClient::getConnectSettingsAsync()} . - * - * @example samples/V1/SqlConnectServiceClient/get_connect_settings.php - * - * @param GetConnectSettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ConnectSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConnectSettings(GetConnectSettingsRequest $request, array $callOptions = []): ConnectSettings - { - return $this->startApiCall('GetConnectSettings', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php deleted file mode 100644 index 8c56e22a30e8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php +++ /dev/null @@ -1,337 +0,0 @@ - deleteAsync(SqlDatabasesDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlDatabasesGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlDatabasesInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlDatabasesListRequest $request, array $optionalArgs = []) - * @method PromiseInterface patchAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAsync(SqlDatabasesUpdateRequest $request, array $optionalArgs = []) - */ -final class SqlDatabasesServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlDatabasesService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_databases_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_databases_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_databases_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_databases_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes a database from a Cloud SQL instance. - * - * The async variant is {@see SqlDatabasesServiceClient::deleteAsync()} . - * - * @example samples/V1/SqlDatabasesServiceClient/delete.php - * - * @param SqlDatabasesDeleteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 delete(SqlDatabasesDeleteRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Delete', $request, $callOptions)->wait(); - } - - /** - * Retrieves a resource containing information about a database inside a Cloud - * SQL instance. - * - * The async variant is {@see SqlDatabasesServiceClient::getAsync()} . - * - * @example samples/V1/SqlDatabasesServiceClient/get.php - * - * @param SqlDatabasesGetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 get(SqlDatabasesGetRequest $request, array $callOptions = []): Database - { - return $this->startApiCall('Get', $request, $callOptions)->wait(); - } - - /** - * Inserts a resource containing information about a database inside a Cloud - * SQL instance. - * - * **Note:** You can't modify the default character set and collation. - * - * The async variant is {@see SqlDatabasesServiceClient::insertAsync()} . - * - * @example samples/V1/SqlDatabasesServiceClient/insert.php - * - * @param SqlDatabasesInsertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 insert(SqlDatabasesInsertRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Insert', $request, $callOptions)->wait(); - } - - /** - * Lists databases in the specified Cloud SQL instance. - * - * The async variant is {@see SqlDatabasesServiceClient::listAsync()} . - * - * @example samples/V1/SqlDatabasesServiceClient/list.php - * - * @param SqlDatabasesListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DatabasesListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlDatabasesListRequest $request, array $callOptions = []): DatabasesListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } - - /** - * Partially updates a resource containing information about a database inside - * a Cloud SQL instance. This method supports patch semantics. - * - * The async variant is {@see SqlDatabasesServiceClient::patchAsync()} . - * - * @example samples/V1/SqlDatabasesServiceClient/patch.php - * - * @param SqlDatabasesUpdateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 patch(SqlDatabasesUpdateRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Patch', $request, $callOptions)->wait(); - } - - /** - * Updates a resource containing information about a database inside a Cloud - * SQL instance. - * - * The async variant is {@see SqlDatabasesServiceClient::updateAsync()} . - * - * @example samples/V1/SqlDatabasesServiceClient/update.php - * - * @param SqlDatabasesUpdateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 update(SqlDatabasesUpdateRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Update', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php deleted file mode 100644 index 8c66b8e93d57..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php +++ /dev/null @@ -1,144 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_events_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_events_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_events_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_events_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php deleted file mode 100644 index 0cc81d7d1d91..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php +++ /dev/null @@ -1,190 +0,0 @@ - listAsync(SqlFlagsListRequest $request, array $optionalArgs = []) - */ -final class SqlFlagsServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlFlagsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_flags_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_flags_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_flags_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_flags_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Lists all available database flags for Cloud SQL instances. - * - * The async variant is {@see SqlFlagsServiceClient::listAsync()} . - * - * @example samples/V1/SqlFlagsServiceClient/list.php - * - * @param SqlFlagsListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FlagsListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlFlagsListRequest $request, array $callOptions = []): FlagsListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php deleted file mode 100644 index c6372946e40a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php +++ /dev/null @@ -1,143 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_iam_policies_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php deleted file mode 100644 index b14a6ad7fc16..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php +++ /dev/null @@ -1,143 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_instance_names_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php deleted file mode 100644 index aecab9e45507..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php +++ /dev/null @@ -1,1165 +0,0 @@ - acquireSsrsLeaseAsync(SqlInstancesAcquireSsrsLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface addServerCaAsync(SqlInstancesAddServerCaRequest $request, array $optionalArgs = []) - * @method PromiseInterface cloneAsync(SqlInstancesCloneRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEphemeralAsync(SqlInstancesCreateEphemeralCertRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAsync(SqlInstancesDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface demoteAsync(SqlInstancesDemoteRequest $request, array $optionalArgs = []) - * @method PromiseInterface demoteMasterAsync(SqlInstancesDemoteMasterRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportAsync(SqlInstancesExportRequest $request, array $optionalArgs = []) - * @method PromiseInterface failoverAsync(SqlInstancesFailoverRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlInstancesGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDiskShrinkConfigAsync(SqlInstancesGetDiskShrinkConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLatestRecoveryTimeAsync(SqlInstancesGetLatestRecoveryTimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAsync(SqlInstancesImportRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlInstancesInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlInstancesListRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServerCasAsync(SqlInstancesListServerCasRequest $request, array $optionalArgs = []) - * @method PromiseInterface patchAsync(SqlInstancesPatchRequest $request, array $optionalArgs = []) - * @method PromiseInterface performDiskShrinkAsync(SqlInstancesPerformDiskShrinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface promoteReplicaAsync(SqlInstancesPromoteReplicaRequest $request, array $optionalArgs = []) - * @method PromiseInterface reencryptAsync(SqlInstancesReencryptRequest $request, array $optionalArgs = []) - * @method PromiseInterface releaseSsrsLeaseAsync(SqlInstancesReleaseSsrsLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface rescheduleMaintenanceAsync(SqlInstancesRescheduleMaintenanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetReplicaSizeAsync(SqlInstancesResetReplicaSizeRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetSslConfigAsync(SqlInstancesResetSslConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface restartAsync(SqlInstancesRestartRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreBackupAsync(SqlInstancesRestoreBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface rotateServerCaAsync(SqlInstancesRotateServerCaRequest $request, array $optionalArgs = []) - * @method PromiseInterface startExternalSyncAsync(SqlInstancesStartExternalSyncRequest $request, array $optionalArgs = []) - * @method PromiseInterface startReplicaAsync(SqlInstancesStartReplicaRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopReplicaAsync(SqlInstancesStopReplicaRequest $request, array $optionalArgs = []) - * @method PromiseInterface switchoverAsync(SqlInstancesSwitchoverRequest $request, array $optionalArgs = []) - * @method PromiseInterface truncateLogAsync(SqlInstancesTruncateLogRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAsync(SqlInstancesUpdateRequest $request, array $optionalArgs = []) - * @method PromiseInterface verifyExternalSyncSettingsAsync(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $optionalArgs = []) - */ -final class SqlInstancesServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlInstancesService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_instances_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instances_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instances_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_instances_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). - * - * The async variant is {@see SqlInstancesServiceClient::acquireSsrsLeaseAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php - * - * @param SqlInstancesAcquireSsrsLeaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SqlInstancesAcquireSsrsLeaseResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function acquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesAcquireSsrsLeaseResponse - { - return $this->startApiCall('AcquireSsrsLease', $request, $callOptions)->wait(); - } - - /** - * Adds a new trusted Certificate Authority (CA) version for the specified - * instance. Required to prepare for a certificate rotation. If a CA version - * was previously added but never used in a certificate rotation, this - * operation replaces that version. There cannot be more than one CA version - * waiting to be rotated in. For instances that have enabled Certificate - * Authority Service (CAS) based server CA, please use AddServerCertificate to - * add a new server certificate. - * - * The async variant is {@see SqlInstancesServiceClient::addServerCaAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/add_server_ca.php - * - * @param SqlInstancesAddServerCaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 addServerCa(SqlInstancesAddServerCaRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('AddServerCa', $request, $callOptions)->wait(); - } - - /** - * Creates a Cloud SQL instance as a clone of the source instance. Using this - * operation might cause your instance to restart. - * - * The async variant is {@see SqlInstancesServiceClient::cloneAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/clone.php - * - * @param SqlInstancesCloneRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 clone(SqlInstancesCloneRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Clone', $request, $callOptions)->wait(); - } - - /** - * Generates a short-lived X509 certificate containing the provided public key - * and signed by a private key specific to the target instance. Users may use - * the certificate to authenticate as themselves when connecting to the - * database. - * - * The async variant is {@see SqlInstancesServiceClient::createEphemeralAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/create_ephemeral.php - * - * @param SqlInstancesCreateEphemeralCertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SslCert - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEphemeral(SqlInstancesCreateEphemeralCertRequest $request, array $callOptions = []): SslCert - { - return $this->startApiCall('CreateEphemeral', $request, $callOptions)->wait(); - } - - /** - * Deletes a Cloud SQL instance. - * - * The async variant is {@see SqlInstancesServiceClient::deleteAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/delete.php - * - * @param SqlInstancesDeleteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 delete(SqlInstancesDeleteRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Delete', $request, $callOptions)->wait(); - } - - /** - * Demotes an existing standalone instance to be a Cloud SQL read replica - * for an external database server. - * - * The async variant is {@see SqlInstancesServiceClient::demoteAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/demote.php - * - * @param SqlInstancesDemoteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 demote(SqlInstancesDemoteRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Demote', $request, $callOptions)->wait(); - } - - /** - * Demotes the stand-alone instance to be a Cloud SQL read replica for an - * external database server. - * - * The async variant is {@see SqlInstancesServiceClient::demoteMasterAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/demote_master.php - * - * @param SqlInstancesDemoteMasterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 demoteMaster(SqlInstancesDemoteMasterRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('DemoteMaster', $request, $callOptions)->wait(); - } - - /** - * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL - * dump or CSV file. - * - * The async variant is {@see SqlInstancesServiceClient::exportAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/export.php - * - * @param SqlInstancesExportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 export(SqlInstancesExportRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Export', $request, $callOptions)->wait(); - } - - /** - * Initiates a manual failover of a high availability (HA) primary instance - * to a standby instance, which becomes the primary instance. Users are - * then rerouted to the new primary. For more information, see the - * [Overview of high - * availability](https://cloud.google.com/sql/docs/mysql/high-availability) - * page in the Cloud SQL documentation. - * If using Legacy HA (MySQL only), this causes the instance to failover to - * its failover replica instance. - * - * The async variant is {@see SqlInstancesServiceClient::failoverAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/failover.php - * - * @param SqlInstancesFailoverRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 failover(SqlInstancesFailoverRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Failover', $request, $callOptions)->wait(); - } - - /** - * Retrieves a resource containing information about a Cloud SQL instance. - * - * The async variant is {@see SqlInstancesServiceClient::getAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/get.php - * - * @param SqlInstancesGetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DatabaseInstance - * - * @throws ApiException Thrown if the API call fails. - */ - public function get(SqlInstancesGetRequest $request, array $callOptions = []): DatabaseInstance - { - return $this->startApiCall('Get', $request, $callOptions)->wait(); - } - - /** - * Get Disk Shrink Config for a given instance. - * - * The async variant is - * {@see SqlInstancesServiceClient::getDiskShrinkConfigAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php - * - * @param SqlInstancesGetDiskShrinkConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SqlInstancesGetDiskShrinkConfigResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDiskShrinkConfig(SqlInstancesGetDiskShrinkConfigRequest $request, array $callOptions = []): SqlInstancesGetDiskShrinkConfigResponse - { - return $this->startApiCall('GetDiskShrinkConfig', $request, $callOptions)->wait(); - } - - /** - * Get Latest Recovery Time for a given instance. - * - * The async variant is - * {@see SqlInstancesServiceClient::getLatestRecoveryTimeAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php - * - * @param SqlInstancesGetLatestRecoveryTimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SqlInstancesGetLatestRecoveryTimeResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLatestRecoveryTime(SqlInstancesGetLatestRecoveryTimeRequest $request, array $callOptions = []): SqlInstancesGetLatestRecoveryTimeResponse - { - return $this->startApiCall('GetLatestRecoveryTime', $request, $callOptions)->wait(); - } - - /** - * Imports data into a Cloud SQL instance from a SQL dump or CSV file in - * Cloud Storage. - * - * The async variant is {@see SqlInstancesServiceClient::importAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/import.php - * - * @param SqlInstancesImportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 import(SqlInstancesImportRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Import', $request, $callOptions)->wait(); - } - - /** - * Creates a new Cloud SQL instance. - * - * The async variant is {@see SqlInstancesServiceClient::insertAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/insert.php - * - * @param SqlInstancesInsertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 insert(SqlInstancesInsertRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Insert', $request, $callOptions)->wait(); - } - - /** - * Lists instances under a given project. - * - * The async variant is {@see SqlInstancesServiceClient::listAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/list.php - * - * @param SqlInstancesListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return InstancesListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlInstancesListRequest $request, array $callOptions = []): InstancesListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } - - /** - * Lists all of the trusted Certificate Authorities (CAs) for the specified - * instance. There can be up to three CAs listed: the CA that was used to sign - * the certificate that is currently in use, a CA that has been added but not - * yet used to sign a certificate, and a CA used to sign a certificate that - * has previously rotated out. - * - * The async variant is {@see SqlInstancesServiceClient::listServerCasAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/list_server_cas.php - * - * @param SqlInstancesListServerCasRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return InstancesListServerCasResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listServerCas(SqlInstancesListServerCasRequest $request, array $callOptions = []): InstancesListServerCasResponse - { - return $this->startApiCall('ListServerCas', $request, $callOptions)->wait(); - } - - /** - * Partially updates settings of a Cloud SQL instance by merging the request - * with the current configuration. This method supports patch semantics. - * - * The async variant is {@see SqlInstancesServiceClient::patchAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/patch.php - * - * @param SqlInstancesPatchRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 patch(SqlInstancesPatchRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Patch', $request, $callOptions)->wait(); - } - - /** - * Perform Disk Shrink on primary instance. - * - * The async variant is {@see SqlInstancesServiceClient::performDiskShrinkAsync()} - * . - * - * @example samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php - * - * @param SqlInstancesPerformDiskShrinkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 performDiskShrink(SqlInstancesPerformDiskShrinkRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('PerformDiskShrink', $request, $callOptions)->wait(); - } - - /** - * Promotes the read replica instance to be an independent Cloud SQL - * primary instance. - * Using this operation might cause your instance to restart. - * - * The async variant is {@see SqlInstancesServiceClient::promoteReplicaAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/promote_replica.php - * - * @param SqlInstancesPromoteReplicaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 promoteReplica(SqlInstancesPromoteReplicaRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('PromoteReplica', $request, $callOptions)->wait(); - } - - /** - * Reencrypt CMEK instance with latest key version. - * - * The async variant is {@see SqlInstancesServiceClient::reencryptAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/reencrypt.php - * - * @param SqlInstancesReencryptRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 reencrypt(SqlInstancesReencryptRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Reencrypt', $request, $callOptions)->wait(); - } - - /** - * Release a lease for the setup of SQL Server Reporting Services (SSRS). - * - * The async variant is {@see SqlInstancesServiceClient::releaseSsrsLeaseAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php - * - * @param SqlInstancesReleaseSsrsLeaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SqlInstancesReleaseSsrsLeaseResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function releaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesReleaseSsrsLeaseResponse - { - return $this->startApiCall('ReleaseSsrsLease', $request, $callOptions)->wait(); - } - - /** - * Reschedules the maintenance on the given instance. - * - * The async variant is - * {@see SqlInstancesServiceClient::rescheduleMaintenanceAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php - * - * @param SqlInstancesRescheduleMaintenanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 rescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); - } - - /** - * Reset Replica Size to primary instance disk size. - * - * The async variant is {@see SqlInstancesServiceClient::resetReplicaSizeAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/reset_replica_size.php - * - * @param SqlInstancesResetReplicaSizeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resetReplicaSize(SqlInstancesResetReplicaSizeRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('ResetReplicaSize', $request, $callOptions)->wait(); - } - - /** - * Deletes all client certificates and generates a new server SSL certificate - * for the instance. - * - * The async variant is {@see SqlInstancesServiceClient::resetSslConfigAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/reset_ssl_config.php - * - * @param SqlInstancesResetSslConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resetSslConfig(SqlInstancesResetSslConfigRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('ResetSslConfig', $request, $callOptions)->wait(); - } - - /** - * Restarts a Cloud SQL instance. - * - * The async variant is {@see SqlInstancesServiceClient::restartAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/restart.php - * - * @param SqlInstancesRestartRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 restart(SqlInstancesRestartRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Restart', $request, $callOptions)->wait(); - } - - /** - * Restores a backup of a Cloud SQL instance. Using this operation might cause - * your instance to restart. - * - * The async variant is {@see SqlInstancesServiceClient::restoreBackupAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/restore_backup.php - * - * @param SqlInstancesRestoreBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 restoreBackup(SqlInstancesRestoreBackupRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('RestoreBackup', $request, $callOptions)->wait(); - } - - /** - * Rotates the server certificate to one signed by the Certificate Authority - * (CA) version previously added with the addServerCA method. For instances - * that have enabled Certificate Authority Service (CAS) based server CA, - * please use RotateServerCertificate to rotate the server certificate. - * - * The async variant is {@see SqlInstancesServiceClient::rotateServerCaAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/rotate_server_ca.php - * - * @param SqlInstancesRotateServerCaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 rotateServerCa(SqlInstancesRotateServerCaRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('RotateServerCa', $request, $callOptions)->wait(); - } - - /** - * Start External primary instance migration. - * - * The async variant is {@see SqlInstancesServiceClient::startExternalSyncAsync()} - * . - * - * @example samples/V1/SqlInstancesServiceClient/start_external_sync.php - * - * @param SqlInstancesStartExternalSyncRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startExternalSync(SqlInstancesStartExternalSyncRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('StartExternalSync', $request, $callOptions)->wait(); - } - - /** - * Starts the replication in the read replica instance. - * - * The async variant is {@see SqlInstancesServiceClient::startReplicaAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/start_replica.php - * - * @param SqlInstancesStartReplicaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startReplica(SqlInstancesStartReplicaRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('StartReplica', $request, $callOptions)->wait(); - } - - /** - * Stops the replication in the read replica instance. - * - * The async variant is {@see SqlInstancesServiceClient::stopReplicaAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/stop_replica.php - * - * @param SqlInstancesStopReplicaRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 stopReplica(SqlInstancesStopReplicaRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('StopReplica', $request, $callOptions)->wait(); - } - - /** - * Switches over from the primary instance to the designated DR replica - * instance. - * - * The async variant is {@see SqlInstancesServiceClient::switchoverAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/switchover.php - * - * @param SqlInstancesSwitchoverRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 switchover(SqlInstancesSwitchoverRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Switchover', $request, $callOptions)->wait(); - } - - /** - * Truncate MySQL general and slow query log tables - * MySQL only. - * - * The async variant is {@see SqlInstancesServiceClient::truncateLogAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/truncate_log.php - * - * @param SqlInstancesTruncateLogRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 truncateLog(SqlInstancesTruncateLogRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('TruncateLog', $request, $callOptions)->wait(); - } - - /** - * Updates settings of a Cloud SQL instance. Using this operation might cause - * your instance to restart. - * - * The async variant is {@see SqlInstancesServiceClient::updateAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/update.php - * - * @param SqlInstancesUpdateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 update(SqlInstancesUpdateRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Update', $request, $callOptions)->wait(); - } - - /** - * Verify External primary instance external sync settings. - * - * The async variant is - * {@see SqlInstancesServiceClient::verifyExternalSyncSettingsAsync()} . - * - * @example samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php - * - * @param SqlInstancesVerifyExternalSyncSettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SqlInstancesVerifyExternalSyncSettingsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function verifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $callOptions = []): SqlInstancesVerifyExternalSyncSettingsResponse - { - return $this->startApiCall('VerifyExternalSyncSettings', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php deleted file mode 100644 index cbe526e53a0c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php +++ /dev/null @@ -1,246 +0,0 @@ - cancelAsync(SqlOperationsCancelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlOperationsGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlOperationsListRequest $request, array $optionalArgs = []) - */ -final class SqlOperationsServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlOperationsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_operations_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_operations_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_operations_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_operations_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Cancels an instance operation that has been performed on an instance. - * - * The async variant is {@see SqlOperationsServiceClient::cancelAsync()} . - * - * @example samples/V1/SqlOperationsServiceClient/cancel.php - * - * @param SqlOperationsCancelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 cancel(SqlOperationsCancelRequest $request, array $callOptions = []): void - { - $this->startApiCall('Cancel', $request, $callOptions)->wait(); - } - - /** - * Retrieves an instance operation that has been performed on an instance. - * - * The async variant is {@see SqlOperationsServiceClient::getAsync()} . - * - * @example samples/V1/SqlOperationsServiceClient/get.php - * - * @param SqlOperationsGetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 get(SqlOperationsGetRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Get', $request, $callOptions)->wait(); - } - - /** - * Lists all instance operations that have been performed on the given Cloud - * SQL instance in the reverse chronological order of the start time. - * - * The async variant is {@see SqlOperationsServiceClient::listAsync()} . - * - * @example samples/V1/SqlOperationsServiceClient/list.php - * - * @param SqlOperationsListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationsListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlOperationsListRequest $request, array $callOptions = []): OperationsListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php deleted file mode 100644 index 242dbb55bbc9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php +++ /dev/null @@ -1,144 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_regions_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_regions_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_regions_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_regions_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php deleted file mode 100644 index 4068aa262cae..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php +++ /dev/null @@ -1,282 +0,0 @@ - deleteAsync(SqlSslCertsDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlSslCertsGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlSslCertsInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlSslCertsListRequest $request, array $optionalArgs = []) - */ -final class SqlSslCertsServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlSslCertsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_ssl_certs_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes the SSL certificate. For First Generation instances, the - * certificate remains valid until the instance is restarted. - * - * The async variant is {@see SqlSslCertsServiceClient::deleteAsync()} . - * - * @example samples/V1/SqlSslCertsServiceClient/delete.php - * - * @param SqlSslCertsDeleteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 delete(SqlSslCertsDeleteRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Delete', $request, $callOptions)->wait(); - } - - /** - * Retrieves a particular SSL certificate. Does not include the private key - * (required for usage). The private key must be saved from the response to - * initial creation. - * - * The async variant is {@see SqlSslCertsServiceClient::getAsync()} . - * - * @example samples/V1/SqlSslCertsServiceClient/get.php - * - * @param SqlSslCertsGetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SslCert - * - * @throws ApiException Thrown if the API call fails. - */ - public function get(SqlSslCertsGetRequest $request, array $callOptions = []): SslCert - { - return $this->startApiCall('Get', $request, $callOptions)->wait(); - } - - /** - * Creates an SSL certificate and returns it along with the private key and - * server certificate authority. The new certificate will not be usable until - * the instance is restarted. - * - * The async variant is {@see SqlSslCertsServiceClient::insertAsync()} . - * - * @example samples/V1/SqlSslCertsServiceClient/insert.php - * - * @param SqlSslCertsInsertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SslCertsInsertResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function insert(SqlSslCertsInsertRequest $request, array $callOptions = []): SslCertsInsertResponse - { - return $this->startApiCall('Insert', $request, $callOptions)->wait(); - } - - /** - * Lists all of the current SSL certificates for the instance. - * - * The async variant is {@see SqlSslCertsServiceClient::listAsync()} . - * - * @example samples/V1/SqlSslCertsServiceClient/list.php - * - * @param SqlSslCertsListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SslCertsListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlSslCertsListRequest $request, array $callOptions = []): SslCertsListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php deleted file mode 100644 index 20912c5f9e76..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php +++ /dev/null @@ -1,192 +0,0 @@ - listAsync(SqlTiersListRequest $request, array $optionalArgs = []) - */ -final class SqlTiersServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlTiersService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_tiers_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_tiers_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_tiers_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_tiers_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Lists all available machine types (tiers) for Cloud SQL, for example, - * `db-custom-1-3840`. For more information, see - * https://cloud.google.com/sql/pricing. - * - * The async variant is {@see SqlTiersServiceClient::listAsync()} . - * - * @example samples/V1/SqlTiersServiceClient/list.php - * - * @param SqlTiersListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TiersListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlTiersListRequest $request, array $callOptions = []): TiersListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php deleted file mode 100644 index 2374a4d2b7dc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php +++ /dev/null @@ -1,304 +0,0 @@ - deleteAsync(SqlUsersDeleteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAsync(SqlUsersGetRequest $request, array $optionalArgs = []) - * @method PromiseInterface insertAsync(SqlUsersInsertRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAsync(SqlUsersListRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAsync(SqlUsersUpdateRequest $request, array $optionalArgs = []) - */ -final class SqlUsersServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.sql.v1.SqlUsersService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.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/sqlservice.admin', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/sql_users_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_users_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_users_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/sql_users_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'sqladmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes a user from a Cloud SQL instance. - * - * The async variant is {@see SqlUsersServiceClient::deleteAsync()} . - * - * @example samples/V1/SqlUsersServiceClient/delete.php - * - * @param SqlUsersDeleteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 delete(SqlUsersDeleteRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Delete', $request, $callOptions)->wait(); - } - - /** - * Retrieves a resource containing information about a user. - * - * The async variant is {@see SqlUsersServiceClient::getAsync()} . - * - * @example samples/V1/SqlUsersServiceClient/get.php - * - * @param SqlUsersGetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return User - * - * @throws ApiException Thrown if the API call fails. - */ - public function get(SqlUsersGetRequest $request, array $callOptions = []): User - { - return $this->startApiCall('Get', $request, $callOptions)->wait(); - } - - /** - * Creates a new user in a Cloud SQL instance. - * - * The async variant is {@see SqlUsersServiceClient::insertAsync()} . - * - * @example samples/V1/SqlUsersServiceClient/insert.php - * - * @param SqlUsersInsertRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 insert(SqlUsersInsertRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Insert', $request, $callOptions)->wait(); - } - - /** - * Lists users in the specified Cloud SQL instance. - * - * The async variant is {@see SqlUsersServiceClient::listAsync()} . - * - * @example samples/V1/SqlUsersServiceClient/list.php - * - * @param SqlUsersListRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UsersListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function list(SqlUsersListRequest $request, array $callOptions = []): UsersListResponse - { - return $this->startApiCall('List', $request, $callOptions)->wait(); - } - - /** - * Updates an existing user in a Cloud SQL instance. - * - * The async variant is {@see SqlUsersServiceClient::updateAsync()} . - * - * @example samples/V1/SqlUsersServiceClient/update.php - * - * @param SqlUsersUpdateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 update(SqlUsersUpdateRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('Update', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json deleted file mode 100644 index a32b84c89910..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.sql.v1", - "libraryPackage": "Google\\Cloud\\Sql\\V1", - "services": { - "SqlAvailableDatabaseVersionsService": { - "clients": { - "grpc": { - "libraryClient": "SqlAvailableDatabaseVersionsServiceGapicClient" - } - } - }, - "SqlBackupRunsService": { - "clients": { - "grpc": { - "libraryClient": "SqlBackupRunsServiceGapicClient", - "rpcs": { - "Delete": { - "methods": [ - "delete" - ] - }, - "Get": { - "methods": [ - "get" - ] - }, - "Insert": { - "methods": [ - "insert" - ] - }, - "List": { - "methods": [ - "list" - ] - } - } - } - } - }, - "SqlConnectService": { - "clients": { - "grpc": { - "libraryClient": "SqlConnectServiceGapicClient", - "rpcs": { - "GenerateEphemeralCert": { - "methods": [ - "generateEphemeralCert" - ] - }, - "GetConnectSettings": { - "methods": [ - "getConnectSettings" - ] - } - } - } - } - }, - "SqlDatabasesService": { - "clients": { - "grpc": { - "libraryClient": "SqlDatabasesServiceGapicClient", - "rpcs": { - "Delete": { - "methods": [ - "delete" - ] - }, - "Get": { - "methods": [ - "get" - ] - }, - "Insert": { - "methods": [ - "insert" - ] - }, - "List": { - "methods": [ - "list" - ] - }, - "Patch": { - "methods": [ - "patch" - ] - }, - "Update": { - "methods": [ - "update" - ] - } - } - } - } - }, - "SqlEventsService": { - "clients": { - "grpc": { - "libraryClient": "SqlEventsServiceGapicClient" - } - } - }, - "SqlFlagsService": { - "clients": { - "grpc": { - "libraryClient": "SqlFlagsServiceGapicClient", - "rpcs": { - "List": { - "methods": [ - "list" - ] - } - } - } - } - }, - "SqlIamPoliciesService": { - "clients": { - "grpc": { - "libraryClient": "SqlIamPoliciesServiceGapicClient" - } - } - }, - "SqlInstanceNamesService": { - "clients": { - "grpc": { - "libraryClient": "SqlInstanceNamesServiceGapicClient" - } - } - }, - "SqlInstancesService": { - "clients": { - "grpc": { - "libraryClient": "SqlInstancesServiceGapicClient", - "rpcs": { - "AcquireSsrsLease": { - "methods": [ - "acquireSsrsLease" - ] - }, - "AddServerCa": { - "methods": [ - "addServerCa" - ] - }, - "Clone": { - "methods": [ - "clone" - ] - }, - "CreateEphemeral": { - "methods": [ - "createEphemeral" - ] - }, - "Delete": { - "methods": [ - "delete" - ] - }, - "Demote": { - "methods": [ - "demote" - ] - }, - "DemoteMaster": { - "methods": [ - "demoteMaster" - ] - }, - "Export": { - "methods": [ - "export" - ] - }, - "Failover": { - "methods": [ - "failover" - ] - }, - "Get": { - "methods": [ - "get" - ] - }, - "GetDiskShrinkConfig": { - "methods": [ - "getDiskShrinkConfig" - ] - }, - "GetLatestRecoveryTime": { - "methods": [ - "getLatestRecoveryTime" - ] - }, - "Import": { - "methods": [ - "import" - ] - }, - "Insert": { - "methods": [ - "insert" - ] - }, - "List": { - "methods": [ - "list" - ] - }, - "ListServerCas": { - "methods": [ - "listServerCas" - ] - }, - "Patch": { - "methods": [ - "patch" - ] - }, - "PerformDiskShrink": { - "methods": [ - "performDiskShrink" - ] - }, - "PromoteReplica": { - "methods": [ - "promoteReplica" - ] - }, - "Reencrypt": { - "methods": [ - "reencrypt" - ] - }, - "ReleaseSsrsLease": { - "methods": [ - "releaseSsrsLease" - ] - }, - "RescheduleMaintenance": { - "methods": [ - "rescheduleMaintenance" - ] - }, - "ResetReplicaSize": { - "methods": [ - "resetReplicaSize" - ] - }, - "ResetSslConfig": { - "methods": [ - "resetSslConfig" - ] - }, - "Restart": { - "methods": [ - "restart" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "RotateServerCa": { - "methods": [ - "rotateServerCa" - ] - }, - "StartExternalSync": { - "methods": [ - "startExternalSync" - ] - }, - "StartReplica": { - "methods": [ - "startReplica" - ] - }, - "StopReplica": { - "methods": [ - "stopReplica" - ] - }, - "Switchover": { - "methods": [ - "switchover" - ] - }, - "TruncateLog": { - "methods": [ - "truncateLog" - ] - }, - "Update": { - "methods": [ - "update" - ] - }, - "VerifyExternalSyncSettings": { - "methods": [ - "verifyExternalSyncSettings" - ] - } - } - } - } - }, - "SqlOperationsService": { - "clients": { - "grpc": { - "libraryClient": "SqlOperationsServiceGapicClient", - "rpcs": { - "Cancel": { - "methods": [ - "cancel" - ] - }, - "Get": { - "methods": [ - "get" - ] - }, - "List": { - "methods": [ - "list" - ] - } - } - } - } - }, - "SqlRegionsService": { - "clients": { - "grpc": { - "libraryClient": "SqlRegionsServiceGapicClient" - } - } - }, - "SqlSslCertsService": { - "clients": { - "grpc": { - "libraryClient": "SqlSslCertsServiceGapicClient", - "rpcs": { - "Delete": { - "methods": [ - "delete" - ] - }, - "Get": { - "methods": [ - "get" - ] - }, - "Insert": { - "methods": [ - "insert" - ] - }, - "List": { - "methods": [ - "list" - ] - } - } - } - } - }, - "SqlTiersService": { - "clients": { - "grpc": { - "libraryClient": "SqlTiersServiceGapicClient", - "rpcs": { - "List": { - "methods": [ - "list" - ] - } - } - } - } - }, - "SqlUsersService": { - "clients": { - "grpc": { - "libraryClient": "SqlUsersServiceGapicClient", - "rpcs": { - "Delete": { - "methods": [ - "delete" - ] - }, - "Get": { - "methods": [ - "get" - ] - }, - "Insert": { - "methods": [ - "insert" - ] - }, - "List": { - "methods": [ - "list" - ] - }, - "Update": { - "methods": [ - "update" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json deleted file mode 100644 index 67533dc18e0f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlAvailableDatabaseVersionsService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": [] - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php deleted file mode 100644 index 356e7981b252..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlAvailableDatabaseVersionsService' => [], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php deleted file mode 100644 index b33f57959be3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php +++ /dev/null @@ -1,26 +0,0 @@ - [], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json deleted file mode 100644 index b69646a9f35d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlBackupRunsService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "Delete": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Get": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Insert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php deleted file mode 100644 index afda4d34224e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php +++ /dev/null @@ -1,112 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlBackupRunsService' => [ - 'Delete' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'id', - 'fieldAccessors' => [ - 'getId', - ], - ], - ], - ], - 'Get' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\BackupRun', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'id', - 'fieldAccessors' => [ - 'getId', - ], - ], - ], - ], - 'Insert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\BackupRunsListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php deleted file mode 100644 index 88a3920f7733..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php +++ /dev/null @@ -1,104 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlBackupRunsService' => [ - 'Delete' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns/{id}', - 'placeholders' => [ - 'id' => [ - 'getters' => [ - 'getId', - ], - ], - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Get' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns/{id}', - 'placeholders' => [ - 'id' => [ - 'getters' => [ - 'getId', - ], - ], - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Insert' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json deleted file mode 100644 index 4c1986cfb3a9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlConnectService": { - "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": { - "GenerateEphemeralCert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetConnectSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php deleted file mode 100644 index 24ec469afcb7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php +++ /dev/null @@ -1,64 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlConnectService' => [ - 'GenerateEphemeralCert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\GenerateEphemeralCertResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'GetConnectSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\ConnectSettings', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php deleted file mode 100644 index b68bacc8b395..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php +++ /dev/null @@ -1,62 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlConnectService' => [ - 'GenerateEphemeralCert' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}:generateEphemeralCert', - 'body' => '*', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'GetConnectSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/connectSettings', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json deleted file mode 100644 index 6542ee505199..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlDatabasesService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "Delete": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Get": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Insert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Patch": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Update": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php deleted file mode 100644 index 5484e5243370..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php +++ /dev/null @@ -1,160 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlDatabasesService' => [ - 'Delete' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'Get' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Database', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'Insert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\DatabasesListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Patch' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'Update' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php deleted file mode 100644 index 92ed62735309..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlDatabasesService' => [ - 'Delete' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Get' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Insert' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Patch' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', - 'body' => 'body', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Update' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', - 'body' => 'body', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json deleted file mode 100644 index cb52d4e16a1f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlEventsService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": [] - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php deleted file mode 100644 index 55d525ef6df8..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlEventsService' => [], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php deleted file mode 100644 index b33f57959be3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php +++ /dev/null @@ -1,26 +0,0 @@ - [], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json deleted file mode 100644 index ae3b5f2ee3d0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlFlagsService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php deleted file mode 100644 index 34f76073b652..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php +++ /dev/null @@ -1,32 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlFlagsService' => [ - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\FlagsListResponse', - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php deleted file mode 100644 index caa3c0daf149..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php +++ /dev/null @@ -1,33 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlFlagsService' => [ - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/flags', - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json deleted file mode 100644 index c14bc6174db0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlIamPoliciesService": { - "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": [] - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php deleted file mode 100644 index 45c8076dd07f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlIamPoliciesService' => [], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php deleted file mode 100644 index b33f57959be3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php +++ /dev/null @@ -1,26 +0,0 @@ - [], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json deleted file mode 100644 index a6173faa203a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlInstanceNamesService": { - "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": [] - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php deleted file mode 100644 index 0c94603c1c35..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlInstanceNamesService' => [], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php deleted file mode 100644 index b33f57959be3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php +++ /dev/null @@ -1,26 +0,0 @@ - [], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json deleted file mode 100644 index acab843eb19f..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlInstancesService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "AcquireSsrsLease": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "AddServerCa": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Clone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateEphemeral": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Delete": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Demote": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DemoteMaster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Export": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Failover": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Get": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetDiskShrinkConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLatestRecoveryTime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Import": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Insert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListServerCas": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Patch": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PerformDiskShrink": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PromoteReplica": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Reencrypt": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ReleaseSsrsLease": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RescheduleMaintenance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetReplicaSize": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetSslConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Restart": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RestoreBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RotateServerCa": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartExternalSync": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartReplica": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopReplica": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Switchover": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TruncateLog": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Update": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "VerifyExternalSyncSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php deleted file mode 100644 index 8a91a4186997..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php +++ /dev/null @@ -1,628 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlInstancesService' => [ - 'AcquireSsrsLease' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'AddServerCa' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Clone' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'CreateEphemeral' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SslCert', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Delete' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Demote' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'DemoteMaster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Export' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Failover' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Get' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\DatabaseInstance', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'GetDiskShrinkConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesGetDiskShrinkConfigResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'GetLatestRecoveryTime' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesGetLatestRecoveryTimeResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Import' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Insert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\InstancesListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - ], - ], - 'ListServerCas' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\InstancesListServerCasResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Patch' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'PerformDiskShrink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'PromoteReplica' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Reencrypt' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'ReleaseSsrsLease' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'RescheduleMaintenance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'ResetReplicaSize' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'ResetSslConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Restart' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'RestoreBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'RotateServerCa' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'StartExternalSync' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'StartReplica' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'StopReplica' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Switchover' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'TruncateLog' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Update' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'VerifyExternalSyncSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php deleted file mode 100644 index 29c60fc1eb5c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php +++ /dev/null @@ -1,583 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlInstancesService' => [ - 'AcquireSsrsLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/acquireSsrsLease', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'AddServerCa' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/addServerCa', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Clone' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/clone', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'CreateEphemeral' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/createEphemeral', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Delete' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Demote' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/demote', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'DemoteMaster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/demoteMaster', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Export' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/export', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Failover' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/failover', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Get' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'GetDiskShrinkConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/getDiskShrinkConfig', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'GetLatestRecoveryTime' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/getLatestRecoveryTime', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Import' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/import', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Insert' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances', - 'body' => 'body', - 'placeholders' => [ - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances', - 'placeholders' => [ - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'ListServerCas' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/listServerCas', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Patch' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'PerformDiskShrink' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/performDiskShrink', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'PromoteReplica' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/promoteReplica', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Reencrypt' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/reencrypt', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'ReleaseSsrsLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/releaseSsrsLease', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'RescheduleMaintenance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rescheduleMaintenance', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'ResetReplicaSize' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/resetReplicaSize', - 'body' => '*', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'ResetSslConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/resetSslConfig', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Restart' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/restart', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'RestoreBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/restoreBackup', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'RotateServerCa' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rotateServerCa', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'StartExternalSync' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/startExternalSync', - 'body' => '*', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'StartReplica' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/startReplica', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'StopReplica' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/stopReplica', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Switchover' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/switchover', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'TruncateLog' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/truncateLog', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Update' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'VerifyExternalSyncSettings' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings', - 'body' => '*', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json deleted file mode 100644 index 5ce164fb9ef6..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlOperationsService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "Cancel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Get": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php deleted file mode 100644 index c10561a60717..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlOperationsService' => [ - 'Cancel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'operation', - 'fieldAccessors' => [ - 'getOperation', - ], - ], - ], - ], - 'Get' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'operation', - 'fieldAccessors' => [ - 'getOperation', - ], - ], - ], - ], - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\OperationsListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php deleted file mode 100644 index 1f90139216f3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php +++ /dev/null @@ -1,72 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlOperationsService' => [ - 'Cancel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/operations/{operation}/cancel', - 'placeholders' => [ - 'operation' => [ - 'getters' => [ - 'getOperation', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Get' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/operations/{operation}', - 'placeholders' => [ - 'operation' => [ - 'getters' => [ - 'getOperation', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/operations', - 'placeholders' => [ - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json deleted file mode 100644 index 174e56eb3b97..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlRegionsService": { - "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": [] - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php deleted file mode 100644 index d3311811274a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php +++ /dev/null @@ -1,27 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlRegionsService' => [], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php deleted file mode 100644 index b33f57959be3..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php +++ /dev/null @@ -1,26 +0,0 @@ - [], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json deleted file mode 100644 index 46ceaef63718..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlSslCertsService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "Delete": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Get": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Insert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php deleted file mode 100644 index 2fd9e63e4e12..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php +++ /dev/null @@ -1,112 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlSslCertsService' => [ - 'Delete' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'sha1_fingerprint', - 'fieldAccessors' => [ - 'getSha1Fingerprint', - ], - ], - ], - ], - 'Get' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SslCert', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'sha1_fingerprint', - 'fieldAccessors' => [ - 'getSha1Fingerprint', - ], - ], - ], - ], - 'Insert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SslCertsInsertResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\SslCertsListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php deleted file mode 100644 index 293461e0404a..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php +++ /dev/null @@ -1,104 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlSslCertsService' => [ - 'Delete' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - 'sha1_fingerprint' => [ - 'getters' => [ - 'getSha1Fingerprint', - ], - ], - ], - ], - 'Get' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - 'sha1_fingerprint' => [ - 'getters' => [ - 'getSha1Fingerprint', - ], - ], - ], - ], - 'Insert' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json deleted file mode 100644 index 5cb74b67df4b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlTiersService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php deleted file mode 100644 index 0b40da39b6bc..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlTiersService' => [ - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\TiersListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php deleted file mode 100644 index e983b43d09d9..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php +++ /dev/null @@ -1,40 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlTiersService' => [ - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/tiers', - 'placeholders' => [ - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json deleted file mode 100644 index b9b8a36e8ce7..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "interfaces": { - "google.cloud.sql.v1.SqlUsersService": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "Delete": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Get": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Insert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "List": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "Update": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php deleted file mode 100644 index d998757a81db..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php +++ /dev/null @@ -1,124 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlUsersService' => [ - 'Delete' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Get' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\User', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'Insert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'List' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\UsersListResponse', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'Update' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Sql\V1\Operation', - 'headerParams' => [ - [ - 'keyName' => 'project', - 'fieldAccessors' => [ - 'getProject', - ], - ], - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php deleted file mode 100644 index 1ce8c4a32f35..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php +++ /dev/null @@ -1,116 +0,0 @@ - [ - 'google.cloud.sql.v1.SqlUsersService' => [ - 'Delete' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Get' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users/{name}', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Insert' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'List' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - 'Update' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', - 'body' => 'body', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - 'project' => [ - 'getters' => [ - 'getProject', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php deleted file mode 100644 index 9715a06bdc6d..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlAvailableDatabaseVersionsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlAvailableDatabaseVersionsServiceClient($options); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php deleted file mode 100644 index a111d09df748..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php +++ /dev/null @@ -1,367 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlBackupRunsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlBackupRunsServiceClient($options); - } - - /** @test */ - public function deleteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlBackupRunsDeleteRequest(); - $response = $gapicClient->delete($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.sql.v1.SqlBackupRunsService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlBackupRunsDeleteRequest(); - try { - $gapicClient->delete($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $id2 = 3227150; - $description = 'description-1724546052'; - $instance2 = 'instance2902024968'; - $selfLink = 'selfLink-1691268851'; - $location = 'location1901043637'; - $timeZone = 'timeZone36848094'; - $maxChargeableBytes = 1424371595; - $expectedResponse = new BackupRun(); - $expectedResponse->setKind($kind); - $expectedResponse->setId($id2); - $expectedResponse->setDescription($description); - $expectedResponse->setInstance($instance2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setLocation($location); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setMaxChargeableBytes($maxChargeableBytes); - $transport->addResponse($expectedResponse); - $request = new SqlBackupRunsGetRequest(); - $response = $gapicClient->get($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.sql.v1.SqlBackupRunsService/Get', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlBackupRunsGetRequest(); - try { - $gapicClient->get($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlBackupRunsInsertRequest(); - $response = $gapicClient->insert($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.sql.v1.SqlBackupRunsService/Insert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlBackupRunsInsertRequest(); - try { - $gapicClient->insert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new BackupRunsListResponse(); - $expectedResponse->setKind($kind); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - $request = new SqlBackupRunsListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlBackupRunsService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlBackupRunsListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlBackupRunsDeleteRequest(); - $response = $gapicClient->deleteAsync($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.sql.v1.SqlBackupRunsService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php deleted file mode 100644 index 7463ad765f89..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php +++ /dev/null @@ -1,202 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlConnectServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlConnectServiceClient($options); - } - - /** @test */ - public function generateEphemeralCertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateEphemeralCertResponse(); - $transport->addResponse($expectedResponse); - $request = new GenerateEphemeralCertRequest(); - $response = $gapicClient->generateEphemeralCert($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.sql.v1.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateEphemeralCertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 GenerateEphemeralCertRequest(); - try { - $gapicClient->generateEphemeralCert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $region = 'region-934795532'; - $pscEnabled = true; - $dnsName = 'dnsName411992033'; - $expectedResponse = new ConnectSettings(); - $expectedResponse->setKind($kind); - $expectedResponse->setRegion($region); - $expectedResponse->setPscEnabled($pscEnabled); - $expectedResponse->setDnsName($dnsName); - $transport->addResponse($expectedResponse); - $request = new GetConnectSettingsRequest(); - $response = $gapicClient->getConnectSettings($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.sql.v1.SqlConnectService/GetConnectSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 GetConnectSettingsRequest(); - try { - $gapicClient->getConnectSettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateEphemeralCertAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateEphemeralCertResponse(); - $transport->addResponse($expectedResponse); - $request = new GenerateEphemeralCertRequest(); - $response = $gapicClient->generateEphemeralCertAsync($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.sql.v1.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php deleted file mode 100644 index 217b77521648..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php +++ /dev/null @@ -1,502 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlDatabasesServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlDatabasesServiceClient($options); - } - - /** @test */ - public function deleteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesDeleteRequest(); - $response = $gapicClient->delete($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.sql.v1.SqlDatabasesService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlDatabasesDeleteRequest(); - try { - $gapicClient->delete($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $charset = 'charset739074380'; - $collation = 'collation1880293257'; - $etag = 'etag3123477'; - $name = 'name3373707'; - $instance2 = 'instance2902024968'; - $selfLink = 'selfLink-1691268851'; - $project2 = 'project2-894831476'; - $expectedResponse = new Database(); - $expectedResponse->setKind($kind); - $expectedResponse->setCharset($charset); - $expectedResponse->setCollation($collation); - $expectedResponse->setEtag($etag); - $expectedResponse->setName($name); - $expectedResponse->setInstance($instance2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setProject($project2); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesGetRequest(); - $response = $gapicClient->get($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.sql.v1.SqlDatabasesService/Get', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlDatabasesGetRequest(); - try { - $gapicClient->get($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesInsertRequest(); - $response = $gapicClient->insert($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.sql.v1.SqlDatabasesService/Insert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlDatabasesInsertRequest(); - try { - $gapicClient->insert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new DatabasesListResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlDatabasesService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlDatabasesListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function patchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesUpdateRequest(); - $response = $gapicClient->patch($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.sql.v1.SqlDatabasesService/Patch', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function patchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlDatabasesUpdateRequest(); - try { - $gapicClient->patch($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesUpdateRequest(); - $response = $gapicClient->update($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.sql.v1.SqlDatabasesService/Update', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlDatabasesUpdateRequest(); - try { - $gapicClient->update($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlDatabasesDeleteRequest(); - $response = $gapicClient->deleteAsync($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.sql.v1.SqlDatabasesService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php deleted file mode 100644 index 25ef5a2c273c..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlEventsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlEventsServiceClient($options); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php deleted file mode 100644 index 3a540339561b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php +++ /dev/null @@ -1,142 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlFlagsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlFlagsServiceClient($options); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new FlagsListResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlFlagsListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlFlagsService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlFlagsListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new FlagsListResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlFlagsListRequest(); - $response = $gapicClient->listAsync($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.sql.v1.SqlFlagsService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php deleted file mode 100644 index ecde531e3f3e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlIamPoliciesServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlIamPoliciesServiceClient($options); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php deleted file mode 100644 index 64aed46c7dc5..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlInstanceNamesServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlInstanceNamesServiceClient($options); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php deleted file mode 100644 index 09956e8eeb12..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php +++ /dev/null @@ -1,2466 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlInstancesServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlInstancesServiceClient($options); - } - - /** @test */ - public function acquireSsrsLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $operationId = 'operationId-274116877'; - $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); - $expectedResponse->setOperationId($operationId); - $transport->addResponse($expectedResponse); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $body = new InstancesAcquireSsrsLeaseRequest(); - $request = (new SqlInstancesAcquireSsrsLeaseRequest()) - ->setInstance($instance) - ->setProject($project) - ->setBody($body); - $response = $gapicClient->acquireSsrsLease($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.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); - $actualValue = $actualRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($project, $actualValue); - $actualValue = $actualRequestObject->getBody(); - $this->assertProtobufEquals($body, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acquireSsrsLeaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $body = new InstancesAcquireSsrsLeaseRequest(); - $request = (new SqlInstancesAcquireSsrsLeaseRequest()) - ->setInstance($instance) - ->setProject($project) - ->setBody($body); - try { - $gapicClient->acquireSsrsLease($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addServerCaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesAddServerCaRequest(); - $response = $gapicClient->addServerCa($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.sql.v1.SqlInstancesService/AddServerCa', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addServerCaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesAddServerCaRequest(); - try { - $gapicClient->addServerCa($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cloneTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesCloneRequest(); - $response = $gapicClient->clone($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.sql.v1.SqlInstancesService/Clone', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cloneExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesCloneRequest(); - try { - $gapicClient->clone($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEphemeralTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $certSerialNumber = 'certSerialNumber-440611559'; - $cert = 'cert3050020'; - $commonName = 'commonName-1924955041'; - $sha1Fingerprint = 'sha1Fingerprint-1699692374'; - $instance2 = 'instance2902024968'; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new SslCert(); - $expectedResponse->setKind($kind); - $expectedResponse->setCertSerialNumber($certSerialNumber); - $expectedResponse->setCert($cert); - $expectedResponse->setCommonName($commonName); - $expectedResponse->setSha1Fingerprint($sha1Fingerprint); - $expectedResponse->setInstance($instance2); - $expectedResponse->setSelfLink($selfLink); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesCreateEphemeralCertRequest(); - $response = $gapicClient->createEphemeral($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.sql.v1.SqlInstancesService/CreateEphemeral', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEphemeralExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesCreateEphemeralCertRequest(); - try { - $gapicClient->createEphemeral($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesDeleteRequest(); - $response = $gapicClient->delete($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.sql.v1.SqlInstancesService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesDeleteRequest(); - try { - $gapicClient->delete($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function demoteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $body = new InstancesDemoteRequest(); - $bodyDemoteContext = new DemoteContext(); - $demoteContextSourceRepresentativeInstanceName = 'demoteContextSourceRepresentativeInstanceName1566063379'; - $bodyDemoteContext->setSourceRepresentativeInstanceName($demoteContextSourceRepresentativeInstanceName); - $body->setDemoteContext($bodyDemoteContext); - $request = (new SqlInstancesDemoteRequest()) - ->setInstance($instance) - ->setProject($project) - ->setBody($body); - $response = $gapicClient->demote($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.sql.v1.SqlInstancesService/Demote', $actualFuncCall); - $actualValue = $actualRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($project, $actualValue); - $actualValue = $actualRequestObject->getBody(); - $this->assertProtobufEquals($body, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function demoteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $body = new InstancesDemoteRequest(); - $bodyDemoteContext = new DemoteContext(); - $demoteContextSourceRepresentativeInstanceName = 'demoteContextSourceRepresentativeInstanceName1566063379'; - $bodyDemoteContext->setSourceRepresentativeInstanceName($demoteContextSourceRepresentativeInstanceName); - $body->setDemoteContext($bodyDemoteContext); - $request = (new SqlInstancesDemoteRequest()) - ->setInstance($instance) - ->setProject($project) - ->setBody($body); - try { - $gapicClient->demote($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function demoteMasterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesDemoteMasterRequest(); - $response = $gapicClient->demoteMaster($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.sql.v1.SqlInstancesService/DemoteMaster', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function demoteMasterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesDemoteMasterRequest(); - try { - $gapicClient->demoteMaster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesExportRequest(); - $response = $gapicClient->export($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.sql.v1.SqlInstancesService/Export', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesExportRequest(); - try { - $gapicClient->export($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function failoverTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesFailoverRequest(); - $response = $gapicClient->failover($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.sql.v1.SqlInstancesService/Failover', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function failoverExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesFailoverRequest(); - try { - $gapicClient->failover($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $etag = 'etag3123477'; - $masterInstanceName = 'masterInstanceName-383886120'; - $project2 = 'project2-894831476'; - $ipv6Address = 'ipv6Address1952176540'; - $serviceAccountEmailAddress = 'serviceAccountEmailAddress303603125'; - $selfLink = 'selfLink-1691268851'; - $connectionName = 'connectionName731664204'; - $name = 'name3373707'; - $region = 'region-934795532'; - $gceZone = 'gceZone-227587294'; - $secondaryGceZone = 'secondaryGceZone826699149'; - $rootPassword = 'rootPassword448743768'; - $databaseInstalledVersion = 'databaseInstalledVersion-1701014705'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $pscServiceAttachmentLink = 'pscServiceAttachmentLink309057421'; - $dnsName = 'dnsName411992033'; - $primaryDnsName = 'primaryDnsName-1306966658'; - $writeEndpoint = 'writeEndpoint-1575656971'; - $expectedResponse = new DatabaseInstance(); - $expectedResponse->setKind($kind); - $expectedResponse->setEtag($etag); - $expectedResponse->setMasterInstanceName($masterInstanceName); - $expectedResponse->setProject($project2); - $expectedResponse->setIpv6Address($ipv6Address); - $expectedResponse->setServiceAccountEmailAddress($serviceAccountEmailAddress); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setConnectionName($connectionName); - $expectedResponse->setName($name); - $expectedResponse->setRegion($region); - $expectedResponse->setGceZone($gceZone); - $expectedResponse->setSecondaryGceZone($secondaryGceZone); - $expectedResponse->setRootPassword($rootPassword); - $expectedResponse->setDatabaseInstalledVersion($databaseInstalledVersion); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setPscServiceAttachmentLink($pscServiceAttachmentLink); - $expectedResponse->setDnsName($dnsName); - $expectedResponse->setPrimaryDnsName($primaryDnsName); - $expectedResponse->setWriteEndpoint($writeEndpoint); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesGetRequest(); - $response = $gapicClient->get($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.sql.v1.SqlInstancesService/Get', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesGetRequest(); - try { - $gapicClient->get($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDiskShrinkConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $minimalTargetSizeGb = 1076246647; - $message = 'message954925063'; - $expectedResponse = new SqlInstancesGetDiskShrinkConfigResponse(); - $expectedResponse->setKind($kind); - $expectedResponse->setMinimalTargetSizeGb($minimalTargetSizeGb); - $expectedResponse->setMessage($message); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesGetDiskShrinkConfigRequest(); - $response = $gapicClient->getDiskShrinkConfig($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.sql.v1.SqlInstancesService/GetDiskShrinkConfig', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDiskShrinkConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesGetDiskShrinkConfigRequest(); - try { - $gapicClient->getDiskShrinkConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLatestRecoveryTimeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new SqlInstancesGetLatestRecoveryTimeResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesGetLatestRecoveryTimeRequest(); - $response = $gapicClient->getLatestRecoveryTime($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.sql.v1.SqlInstancesService/GetLatestRecoveryTime', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLatestRecoveryTimeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesGetLatestRecoveryTimeRequest(); - try { - $gapicClient->getLatestRecoveryTime($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesImportRequest(); - $response = $gapicClient->import($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.sql.v1.SqlInstancesService/Import', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesImportRequest(); - try { - $gapicClient->import($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesInsertRequest(); - $response = $gapicClient->insert($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.sql.v1.SqlInstancesService/Insert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesInsertRequest(); - try { - $gapicClient->insert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new InstancesListResponse(); - $expectedResponse->setKind($kind); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlInstancesService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServerCasTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $activeVersion = 'activeVersion442490015'; - $kind = 'kind3292052'; - $expectedResponse = new InstancesListServerCasResponse(); - $expectedResponse->setActiveVersion($activeVersion); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesListServerCasRequest(); - $response = $gapicClient->listServerCas($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.sql.v1.SqlInstancesService/ListServerCas', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServerCasExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesListServerCasRequest(); - try { - $gapicClient->listServerCas($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function patchTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesPatchRequest(); - $response = $gapicClient->patch($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.sql.v1.SqlInstancesService/Patch', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function patchExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesPatchRequest(); - try { - $gapicClient->patch($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function performDiskShrinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesPerformDiskShrinkRequest(); - $response = $gapicClient->performDiskShrink($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.sql.v1.SqlInstancesService/PerformDiskShrink', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function performDiskShrinkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesPerformDiskShrinkRequest(); - try { - $gapicClient->performDiskShrink($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function promoteReplicaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesPromoteReplicaRequest(); - $response = $gapicClient->promoteReplica($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.sql.v1.SqlInstancesService/PromoteReplica', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function promoteReplicaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesPromoteReplicaRequest(); - try { - $gapicClient->promoteReplica($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reencryptTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesReencryptRequest(); - $response = $gapicClient->reencrypt($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.sql.v1.SqlInstancesService/Reencrypt', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reencryptExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesReencryptRequest(); - try { - $gapicClient->reencrypt($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function releaseSsrsLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $operationId = 'operationId-274116877'; - $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse(); - $expectedResponse->setOperationId($operationId); - $transport->addResponse($expectedResponse); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $request = (new SqlInstancesReleaseSsrsLeaseRequest()) - ->setInstance($instance) - ->setProject($project); - $response = $gapicClient->releaseSsrsLease($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.sql.v1.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall); - $actualValue = $actualRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($project, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function releaseSsrsLeaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $request = (new SqlInstancesReleaseSsrsLeaseRequest()) - ->setInstance($instance) - ->setProject($project); - try { - $gapicClient->releaseSsrsLease($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rescheduleMaintenanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesRescheduleMaintenanceRequest(); - $response = $gapicClient->rescheduleMaintenance($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.sql.v1.SqlInstancesService/RescheduleMaintenance', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rescheduleMaintenanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesRescheduleMaintenanceRequest(); - try { - $gapicClient->rescheduleMaintenance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetReplicaSizeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesResetReplicaSizeRequest(); - $response = $gapicClient->resetReplicaSize($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.sql.v1.SqlInstancesService/ResetReplicaSize', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetReplicaSizeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesResetReplicaSizeRequest(); - try { - $gapicClient->resetReplicaSize($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetSslConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesResetSslConfigRequest(); - $response = $gapicClient->resetSslConfig($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.sql.v1.SqlInstancesService/ResetSslConfig', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetSslConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesResetSslConfigRequest(); - try { - $gapicClient->resetSslConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restartTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesRestartRequest(); - $response = $gapicClient->restart($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.sql.v1.SqlInstancesService/Restart', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restartExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesRestartRequest(); - try { - $gapicClient->restart($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesRestoreBackupRequest(); - $response = $gapicClient->restoreBackup($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.sql.v1.SqlInstancesService/RestoreBackup', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesRestoreBackupRequest(); - try { - $gapicClient->restoreBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rotateServerCaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesRotateServerCaRequest(); - $response = $gapicClient->rotateServerCa($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.sql.v1.SqlInstancesService/RotateServerCa', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rotateServerCaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesRotateServerCaRequest(); - try { - $gapicClient->rotateServerCa($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startExternalSyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesStartExternalSyncRequest(); - $response = $gapicClient->startExternalSync($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.sql.v1.SqlInstancesService/StartExternalSync', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startExternalSyncExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesStartExternalSyncRequest(); - try { - $gapicClient->startExternalSync($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startReplicaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesStartReplicaRequest(); - $response = $gapicClient->startReplica($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.sql.v1.SqlInstancesService/StartReplica', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startReplicaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesStartReplicaRequest(); - try { - $gapicClient->startReplica($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopReplicaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesStopReplicaRequest(); - $response = $gapicClient->stopReplica($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.sql.v1.SqlInstancesService/StopReplica', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopReplicaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesStopReplicaRequest(); - try { - $gapicClient->stopReplica($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function switchoverTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesSwitchoverRequest(); - $response = $gapicClient->switchover($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.sql.v1.SqlInstancesService/Switchover', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function switchoverExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesSwitchoverRequest(); - try { - $gapicClient->switchover($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function truncateLogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesTruncateLogRequest(); - $response = $gapicClient->truncateLog($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.sql.v1.SqlInstancesService/TruncateLog', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function truncateLogExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesTruncateLogRequest(); - try { - $gapicClient->truncateLog($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesUpdateRequest(); - $response = $gapicClient->update($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.sql.v1.SqlInstancesService/Update', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesUpdateRequest(); - try { - $gapicClient->update($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyExternalSyncSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new SqlInstancesVerifyExternalSyncSettingsResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlInstancesVerifyExternalSyncSettingsRequest(); - $response = $gapicClient->verifyExternalSyncSettings($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.sql.v1.SqlInstancesService/VerifyExternalSyncSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyExternalSyncSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlInstancesVerifyExternalSyncSettingsRequest(); - try { - $gapicClient->verifyExternalSyncSettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acquireSsrsLeaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $operationId = 'operationId-274116877'; - $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); - $expectedResponse->setOperationId($operationId); - $transport->addResponse($expectedResponse); - // Mock request - $instance = 'instance555127957'; - $project = 'project-309310695'; - $body = new InstancesAcquireSsrsLeaseRequest(); - $request = (new SqlInstancesAcquireSsrsLeaseRequest()) - ->setInstance($instance) - ->setProject($project) - ->setBody($body); - $response = $gapicClient->acquireSsrsLeaseAsync($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.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); - $actualValue = $actualRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualRequestObject->getProject(); - $this->assertProtobufEquals($project, $actualValue); - $actualValue = $actualRequestObject->getBody(); - $this->assertProtobufEquals($body, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php deleted file mode 100644 index 49cb2ed5b4d0..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php +++ /dev/null @@ -1,266 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlOperationsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlOperationsServiceClient($options); - } - - /** @test */ - public function cancelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - $request = new SqlOperationsCancelRequest(); - $gapicClient->cancel($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.sql.v1.SqlOperationsService/Cancel', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlOperationsCancelRequest(); - try { - $gapicClient->cancel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlOperationsGetRequest(); - $response = $gapicClient->get($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.sql.v1.SqlOperationsService/Get', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlOperationsGetRequest(); - try { - $gapicClient->get($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new OperationsListResponse(); - $expectedResponse->setKind($kind); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - $request = new SqlOperationsListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlOperationsService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlOperationsListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - $request = new SqlOperationsCancelRequest(); - $gapicClient->cancelAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.sql.v1.SqlOperationsService/Cancel', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php deleted file mode 100644 index 7bc1ce6c6762..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php +++ /dev/null @@ -1,56 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlRegionsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlRegionsServiceClient($options); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php deleted file mode 100644 index a89591d72e4b..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php +++ /dev/null @@ -1,352 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlSslCertsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlSslCertsServiceClient($options); - } - - /** @test */ - public function deleteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlSslCertsDeleteRequest(); - $response = $gapicClient->delete($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.sql.v1.SqlSslCertsService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlSslCertsDeleteRequest(); - try { - $gapicClient->delete($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $certSerialNumber = 'certSerialNumber-440611559'; - $cert = 'cert3050020'; - $commonName = 'commonName-1924955041'; - $sha1Fingerprint2 = 'sha1Fingerprint2-1316795939'; - $instance2 = 'instance2902024968'; - $selfLink = 'selfLink-1691268851'; - $expectedResponse = new SslCert(); - $expectedResponse->setKind($kind); - $expectedResponse->setCertSerialNumber($certSerialNumber); - $expectedResponse->setCert($cert); - $expectedResponse->setCommonName($commonName); - $expectedResponse->setSha1Fingerprint($sha1Fingerprint2); - $expectedResponse->setInstance($instance2); - $expectedResponse->setSelfLink($selfLink); - $transport->addResponse($expectedResponse); - $request = new SqlSslCertsGetRequest(); - $response = $gapicClient->get($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.sql.v1.SqlSslCertsService/Get', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlSslCertsGetRequest(); - try { - $gapicClient->get($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new SslCertsInsertResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlSslCertsInsertRequest(); - $response = $gapicClient->insert($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.sql.v1.SqlSslCertsService/Insert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlSslCertsInsertRequest(); - try { - $gapicClient->insert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new SslCertsListResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlSslCertsListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlSslCertsService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlSslCertsListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlSslCertsDeleteRequest(); - $response = $gapicClient->deleteAsync($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.sql.v1.SqlSslCertsService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php deleted file mode 100644 index 02f50f531d47..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php +++ /dev/null @@ -1,142 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlTiersServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlTiersServiceClient($options); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new TiersListResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlTiersListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlTiersService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlTiersListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $expectedResponse = new TiersListResponse(); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - $request = new SqlTiersListRequest(); - $response = $gapicClient->listAsync($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.sql.v1.SqlTiersService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php deleted file mode 100644 index 0defde537e8e..000000000000 --- a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php +++ /dev/null @@ -1,434 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SqlUsersServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SqlUsersServiceClient($options); - } - - /** @test */ - public function deleteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name2 = 'name2-1052831874'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name2); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlUsersDeleteRequest(); - $response = $gapicClient->delete($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.sql.v1.SqlUsersService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlUsersDeleteRequest(); - try { - $gapicClient->delete($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $password = 'password1216985755'; - $etag = 'etag3123477'; - $name2 = 'name2-1052831874'; - $host2 = 'host2-1211484325'; - $instance2 = 'instance2902024968'; - $project2 = 'project2-894831476'; - $expectedResponse = new User(); - $expectedResponse->setKind($kind); - $expectedResponse->setPassword($password); - $expectedResponse->setEtag($etag); - $expectedResponse->setName($name2); - $expectedResponse->setHost($host2); - $expectedResponse->setInstance($instance2); - $expectedResponse->setProject($project2); - $transport->addResponse($expectedResponse); - $request = new SqlUsersGetRequest(); - $response = $gapicClient->get($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.sql.v1.SqlUsersService/Get', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlUsersGetRequest(); - try { - $gapicClient->get($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlUsersInsertRequest(); - $response = $gapicClient->insert($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.sql.v1.SqlUsersService/Insert', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function insertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlUsersInsertRequest(); - try { - $gapicClient->insert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new UsersListResponse(); - $expectedResponse->setKind($kind); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - $request = new SqlUsersListRequest(); - $response = $gapicClient->list($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.sql.v1.SqlUsersService/List', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlUsersListRequest(); - try { - $gapicClient->list($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name2 = 'name2-1052831874'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name2); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlUsersUpdateRequest(); - $response = $gapicClient->update($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.sql.v1.SqlUsersService/Update', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SqlUsersUpdateRequest(); - try { - $gapicClient->update($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name2 = 'name2-1052831874'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name2); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); - $transport->addResponse($expectedResponse); - $request = new SqlUsersDeleteRequest(); - $response = $gapicClient->deleteAsync($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.sql.v1.SqlUsersService/Delete', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php b/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php deleted file mode 100644 index 37944800ca83f08715584225fd1103678b4368a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7876 zcmds6&2QYs6)(AoEsbi)9@WxjUE2)h#)=~EBAd7Y)=>(sWXT5nA*hCd1Pc&c?(B*U zmt;wSI4%jx znznIYyLbPAc5~zQgI7T{@_V68YFfwlJ1(h2u^(C;Qn7t64t=+>S501-;#Ha1M#!_e zBnm8>Xj|L$yCk++R%|u4n3={8xtYc~H`91ny@8PJT2Z8lPvQ&u2x;&a^qQ_?Yf)^) z@b8KfnU3egj^#Q(fk~}tZOe@anCO>n_dGjxd{3ha_dS~|zpincRQ5{XLlD-q#IJ1{ z7l=vYwilDov)sl8iR{n`z~5~Ut<^dtPNPZREWa*>rRJQrw#H`PzJhr;QU|p7B z*WPnPJ{hf6nm(Jb;+9juDg0N_m)B8c!li~^;RB0ej9$oL6JM6Z7xxI8il1V0Y*@w>u-+mHg9_?*m;O$r#U?H5lo?bT$=eu&F`kziib+~`$IzC@Q1@no5c=Z@Q1aPmBW?O;$`&|f6)J_ptD;f-ej^nH7Dc8tT7|%cFd{f)<^&DPv-Gt=Qh>$lUtY&lLqPqYM2~o*xTIid5m2LM1OF z6mow|r&Xk2OxI_g8p^XzzW&>kI;GT0sA%@vVk6csq3;g(mX4$URYCLXEJNg(Uq`0` z3t)^zs)@Pd5qNwbiFg)O2K%cyu=4>a)+$YXjsu+{&0m)K?0rb=UKlxhJbS08{OFkI z|AKjK5SPS6p4b0BqMxV;-*F<5$x)KZCj=CL34mM72-*~e>B}5|MTFS<*#D4l#$kvl zcpefbByHyrBOCD&th9*hbRB3(ic<-^3f9oPOCCA4-wCZ?*Rf3~Lt$Lx%Z&kj37wNA zfMFP=2+Q)~nC@E~dK1k{(TD=5uLM_7!T^xq1t7)InTi+DoJStTW@h3v%cu37i9OF<7Ws-pu!^8i=DCScY>Fa*C>wC1> z+2PGj+Uq2J_3=_g>)#lq>P<8S8NsU?r<_Tv8)cg@27<~P9|W9)Snd_@5?T<%Oj@RG zL1*r|3^Yd4jHwFvB039|sRPYNWI_*NQ%a=)X6vY+f2N@CWK$;%$3rv+bq<2YDhb_r zFeaXC!Sf zKhPYWL#LsIYPzJwP@k$b8qbaQ(Ul?HkQ4^|<~U7}u*9L%f2N>C=zb(SN#&?XJ?AQG zf?gZbmD#i!@EnurnrA_lX!I{sbmp$*LCI-xF73~2sJ8Z*f=axtl_rtI z;oW21t%w93w!S1I_$KVQcyt9UqS;-}Au7oNWeXKUYa^RE*89q9h1PYs@7I5?q7v_M zCF{u~lXc6xkN+*$&^lSJ>+hQ$6g0L|<~8!z=H>-=9)D8ME42BO!jpEy|6LNin8sMf zxPNb_KSHHJGZ0;@f#&2C;)P|VI(8}!ZECAu&7oOQ55!3({!~HV&TbZQIVa<@f+8hL zqnm8~ohQa3-+8X`)>r(4#qsf9{_$&d5qb=GFu{iEyuBpT;f_D=8`ziQT??ihQKQyzpntlY$u$HUsf=2>|!#H%(-1T z-Dl|DW8+eKjyAC8eqxkpTev!K`!zB8pYsDHsinfz#K*x&APFb)%3I5l!pSrBi}Vyo zqDp){$KB!OwUp*eJXruI*`q)@VR+D^4{Ac51bvKTK zs8*@$@9zum(<5Z77w=YV*YCBi!Ok;o`(bx=GVwAToVKp{o_jD-u|@V0C)+*OO|BXz z(W8TzlMcp|_Cq*$tN%eo7vV@@IEeLmK_{Z#Z__%st$eV?f|Tfi3Ao=$?o88bR0u2F zq{7CXUaAJo8|l*@)yrG#%Cx*rV_gu2Jli^u!r9nG~o~vCjZve^m1#J-+gATN{3#PGD&`? Jd58`X`VX;kPoe+- diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php deleted file mode 100644 index 67e1c36d73d3..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php +++ /dev/null @@ -1,273 +0,0 @@ -google.storage.control.v2.CommonLongRunningOperationMetadata - */ -class CommonLongRunningOperationMetadata 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. The time the operation was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The type of operation invoked. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. Identifies whether the user has requested cancellation. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * - * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $progress_percent = 0; - - /** - * 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 \Google\Protobuf\Timestamp $update_time - * Output only. The time the operation was last modified. - * @type string $type - * Output only. The type of operation invoked. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation. - * @type int $progress_percent - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::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. The time the operation was last modified. - * - * 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 operation was last modified. - * - * 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. The type of operation invoked. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of operation invoked. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.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. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * - * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * - * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php deleted file mode 100644 index fa07c167ad9d..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -google.storage.control.v2.CreateFolderRequest - */ -class CreateFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * - * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $folder = null; - /** - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $folder_id = ''; - /** - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * - * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $recursive = false; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * @param \Google\Cloud\Storage\Control\V2\Folder $folder Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * @param string $folderId Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * @return \Google\Cloud\Storage\Control\V2\CreateFolderRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Storage\Control\V2\Folder $folder, string $folderId): self - { - return (new self()) - ->setParent($parent) - ->setFolder($folder) - ->setFolderId($folderId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * @type \Google\Cloud\Storage\Control\V2\Folder $folder - * Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * @type string $folder_id - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * @type bool $recursive - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * - * 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. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * - * 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. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * - * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\Folder|null - */ - public function getFolder() - { - return $this->folder; - } - - public function hasFolder() - { - return isset($this->folder); - } - - public function clearFolder() - { - unset($this->folder); - } - - /** - * Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * - * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\Folder $var - * @return $this - */ - public function setFolder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\Folder::class); - $this->folder = $var; - - return $this; - } - - /** - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFolderId() - { - return $this->folder_id; - } - - /** - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFolderId($var) - { - GPBUtil::checkString($var, True); - $this->folder_id = $var; - - return $this; - } - - /** - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * - * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRecursive() - { - return $this->recursive; - } - - /** - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * - * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRecursive($var) - { - GPBUtil::checkBool($var); - $this->recursive = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php deleted file mode 100644 index e5320e9019f0..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.storage.control.v2.CreateManagedFolderRequest - */ -class CreateManagedFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * - * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $managed_folder = null; - /** - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $managed_folder_id = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * @param string $managedFolderId Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * @return \Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder, string $managedFolderId): self - { - return (new self()) - ->setParent($parent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the bucket this managed folder belongs to. - * @type \Google\Cloud\Storage\Control\V2\ManagedFolder $managed_folder - * Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * @type string $managed_folder_id - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket this managed folder belongs to. - * - * 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. Name of the bucket this managed folder belongs to. - * - * 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. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * - * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\ManagedFolder|null - */ - public function getManagedFolder() - { - return $this->managed_folder; - } - - public function hasManagedFolder() - { - return isset($this->managed_folder); - } - - public function clearManagedFolder() - { - unset($this->managed_folder); - } - - /** - * Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * - * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $var - * @return $this - */ - public function setManagedFolder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); - $this->managed_folder = $var; - - return $this; - } - - /** - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getManagedFolderId() - { - return $this->managed_folder_id; - } - - /** - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setManagedFolderId($var) - { - GPBUtil::checkString($var, True); - $this->managed_folder_id = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php deleted file mode 100644 index a3523693513e..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.storage.control.v2.DeleteFolderRequest - */ -class DeleteFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * Please see {@see StorageControlClient::folderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\DeleteFolderRequest - * - * @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 folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type int|string $if_metageneration_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * @type int|string $if_metageneration_not_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.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; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php deleted file mode 100644 index 957f9300a277..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.storage.control.v2.DeleteManagedFolderRequest - */ -class DeleteManagedFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * - * Generated from protobuf field bool allow_non_empty = 5; - */ - protected $allow_non_empty = false; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest - * - * @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 managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * @type int|string $if_metageneration_match - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * @type int|string $if_metageneration_not_match - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * @type bool $allow_non_empty - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 7 [(.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 operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * - * Generated from protobuf field bool allow_non_empty = 5; - * @return bool - */ - public function getAllowNonEmpty() - { - return $this->allow_non_empty; - } - - /** - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * - * Generated from protobuf field bool allow_non_empty = 5; - * @param bool $var - * @return $this - */ - public function setAllowNonEmpty($var) - { - GPBUtil::checkBool($var); - $this->allow_non_empty = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php deleted file mode 100644 index 3bcb0c88fcfc..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php +++ /dev/null @@ -1,258 +0,0 @@ -google.storage.control.v2.Folder - */ -class Folder extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metageneration = 0; - /** - * Output only. The creation time of the folder. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The modification time of the folder. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * - * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_rename_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type int|string $metageneration - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the folder. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The modification time of the folder. - * @type \Google\Cloud\Storage\Control\V2\PendingRenameInfo $pending_rename_info - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * 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 version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getMetageneration() - { - return $this->metageneration; - } - - /** - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setMetageneration($var) - { - GPBUtil::checkInt64($var); - $this->metageneration = $var; - - return $this; - } - - /** - * Output only. The creation time of the folder. - * - * 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 time of the folder. - * - * 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 modification time of the folder. - * - * 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 modification time of the folder. - * - * 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; - } - - /** - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * - * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\PendingRenameInfo|null - */ - public function getPendingRenameInfo() - { - return $this->pending_rename_info; - } - - public function hasPendingRenameInfo() - { - return isset($this->pending_rename_info); - } - - public function clearPendingRenameInfo() - { - unset($this->pending_rename_info); - } - - /** - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * - * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\PendingRenameInfo $var - * @return $this - */ - public function setPendingRenameInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\PendingRenameInfo::class); - $this->pending_rename_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php deleted file mode 100644 index 6ba954a244f2..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.storage.control.v2.GetFolderRequest - */ -class GetFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * Please see {@see StorageControlClient::folderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetFolderRequest - * - * @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 folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type int|string $if_metageneration_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * @type int|string $if_metageneration_not_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.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; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php deleted file mode 100644 index b4deee313827..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.storage.control.v2.GetManagedFolderRequest - */ -class GetManagedFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetManagedFolderRequest - * - * @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 managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * @type int|string $if_metageneration_match - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * @type int|string $if_metageneration_not_match - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 6 [(.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 operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php deleted file mode 100644 index ca2429d9ac1f..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.storage.control.v2.GetStorageLayoutRequest - */ -class GetStorageLayoutRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * - * Generated from protobuf field string prefix = 2; - */ - protected $prefix = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * Please see {@see StorageControlClient::storageLayoutName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetStorageLayoutRequest - * - * @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 StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * @type string $prefix - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * 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 StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * 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; - } - - /** - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * - * Generated from protobuf field string prefix = 2; - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - - /** - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * - * Generated from protobuf field string prefix = 2; - * @param string $var - * @return $this - */ - public function setPrefix($var) - { - GPBUtil::checkString($var, True); - $this->prefix = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php deleted file mode 100644 index 9f009d6463c2..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php +++ /dev/null @@ -1,373 +0,0 @@ -google.storage.control.v2.ListFoldersRequest - */ -class ListFoldersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $prefix = ''; - /** - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * - * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lexicographic_start = ''; - /** - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lexicographic_end = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\ListFoldersRequest - * - * @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. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * @type int $page_size - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * @type string $page_token - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * @type string $prefix - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * @type string $delimiter - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * @type string $lexicographic_start - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * @type string $lexicographic_end - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * - * 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. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * - * 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. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * - * 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 previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * 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. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - - /** - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrefix($var) - { - GPBUtil::checkString($var, True); - $this->prefix = $var; - - return $this; - } - - /** - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * - * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * - * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLexicographicStart() - { - return $this->lexicographic_start; - } - - /** - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLexicographicStart($var) - { - GPBUtil::checkString($var, True); - $this->lexicographic_start = $var; - - return $this; - } - - /** - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLexicographicEnd() - { - return $this->lexicographic_end; - } - - /** - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLexicographicEnd($var) - { - GPBUtil::checkString($var, True); - $this->lexicographic_end = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php deleted file mode 100644 index eb67af3ca9e8..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storage.control.v2.ListFoldersResponse - */ -class ListFoldersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of child folders - * - * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; - */ - private $folders; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * The list of child folders - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * The list of child folders - * - * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * The list of child folders - * - * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; - * @param array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\Folder::class); - $this->folders = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php deleted file mode 100644 index 4af92f638e5a..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.storage.control.v2.ListManagedFoldersRequest - */ -class ListManagedFoldersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $prefix = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\ListManagedFoldersRequest - * - * @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. Name of the bucket this managed folder belongs to. - * @type int $page_size - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * @type string $page_token - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * @type string $prefix - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket this managed folder belongs to. - * - * 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. Name of the bucket this managed folder belongs to. - * - * 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. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * 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 previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * 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. Filter results to match managed folders with name starting with - * this prefix. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - - /** - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrefix($var) - { - GPBUtil::checkString($var, True); - $this->prefix = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php deleted file mode 100644 index 7ca7daea2e9c..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storage.control.v2.ListManagedFoldersResponse - */ -class ListManagedFoldersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching managed folders - * - * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; - */ - private $managed_folders; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $managed_folders - * The list of matching managed folders - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching managed folders - * - * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManagedFolders() - { - return $this->managed_folders; - } - - /** - * The list of matching managed folders - * - * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; - * @param array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManagedFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); - $this->managed_folders = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php deleted file mode 100644 index 46a6d1984b82..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php +++ /dev/null @@ -1,205 +0,0 @@ -google.storage.control.v2.ManagedFolder - */ -class ManagedFolder extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metageneration = 0; - /** - * Output only. The creation time of the managed folder. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The modification time of the managed folder. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * @type int|string $metageneration - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the managed folder. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The modification time of the managed folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * 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 metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getMetageneration() - { - return $this->metageneration; - } - - /** - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setMetageneration($var) - { - GPBUtil::checkInt64($var); - $this->metageneration = $var; - - return $this; - } - - /** - * Output only. The creation time of the managed folder. - * - * 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 time of the managed folder. - * - * 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 modification time of the managed folder. - * - * 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 modification time of the managed folder. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php deleted file mode 100644 index 52172ad37498..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php +++ /dev/null @@ -1,67 +0,0 @@ -google.storage.control.v2.PendingRenameInfo - */ -class PendingRenameInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the rename operation. - * - * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation - * Output only. The name of the rename operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the rename operation. - * - * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * Output only. The name of the rename operation. - * - * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php deleted file mode 100644 index d9d0313fd1a7..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php +++ /dev/null @@ -1,146 +0,0 @@ -google.storage.control.v2.RenameFolderMetadata - */ -class RenameFolderMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - /** - * The path of the source folder. - * - * Generated from protobuf field string source_folder_id = 2; - */ - protected $source_folder_id = ''; - /** - * The path of the destination folder. - * - * Generated from protobuf field string destination_folder_id = 3; - */ - protected $destination_folder_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata - * Generic metadata for the long running operation. - * @type string $source_folder_id - * The path of the source folder. - * @type string $destination_folder_id - * The path of the destination folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - - /** - * The path of the source folder. - * - * Generated from protobuf field string source_folder_id = 2; - * @return string - */ - public function getSourceFolderId() - { - return $this->source_folder_id; - } - - /** - * The path of the source folder. - * - * Generated from protobuf field string source_folder_id = 2; - * @param string $var - * @return $this - */ - public function setSourceFolderId($var) - { - GPBUtil::checkString($var, True); - $this->source_folder_id = $var; - - return $this; - } - - /** - * The path of the destination folder. - * - * Generated from protobuf field string destination_folder_id = 3; - * @return string - */ - public function getDestinationFolderId() - { - return $this->destination_folder_id; - } - - /** - * The path of the destination folder. - * - * Generated from protobuf field string destination_folder_id = 3; - * @param string $var - * @return $this - */ - public function setDestinationFolderId($var) - { - GPBUtil::checkString($var, True); - $this->destination_folder_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php deleted file mode 100644 index 6d939843b450..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.storage.control.v2.RenameFolderRequest - */ -class RenameFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The destination folder ID, e.g. `foo/bar/`. - * - * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination_folder_id = ''; - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 4; - */ - protected $if_metageneration_match = null; - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 5; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * Please see {@see StorageControlClient::folderName()} for help formatting this field. - * @param string $destinationFolderId Required. The destination folder ID, e.g. `foo/bar/`. - * - * @return \Google\Cloud\Storage\Control\V2\RenameFolderRequest - * - * @experimental - */ - public static function build(string $name, string $destinationFolderId): self - { - return (new self()) - ->setName($name) - ->setDestinationFolderId($destinationFolderId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type string $destination_folder_id - * Required. The destination folder ID, e.g. `foo/bar/`. - * @type int|string $if_metageneration_match - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * @type int|string $if_metageneration_not_match - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 7 [(.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 destination folder ID, e.g. `foo/bar/`. - * - * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDestinationFolderId() - { - return $this->destination_folder_id; - } - - /** - * Required. The destination folder ID, e.g. `foo/bar/`. - * - * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDestinationFolderId($var) - { - GPBUtil::checkString($var, True); - $this->destination_folder_id = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 4; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 5; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 5; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @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/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php deleted file mode 100644 index a48fbe8ef2ee..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php +++ /dev/null @@ -1,239 +0,0 @@ -google.storage.control.v2.StorageLayout - */ -class StorageLayout extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The location of the bucket. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $location = ''; - /** - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * - * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $location_type = ''; - /** - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $custom_placement_config = null; - /** - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hierarchical_namespace = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * @type string $location - * Output only. The location of the bucket. - * @type string $location_type - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * @type \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $custom_placement_config - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * @type \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $hierarchical_namespace - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * 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 location of the bucket. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Output only. The location of the bucket. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * - * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLocationType() - { - return $this->location_type; - } - - /** - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * - * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLocationType($var) - { - GPBUtil::checkString($var, True); - $this->location_type = $var; - - return $this; - } - - /** - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig|null - */ - public function getCustomPlacementConfig() - { - return $this->custom_placement_config; - } - - public function hasCustomPlacementConfig() - { - return isset($this->custom_placement_config); - } - - public function clearCustomPlacementConfig() - { - unset($this->custom_placement_config); - } - - /** - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $var - * @return $this - */ - public function setCustomPlacementConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig::class); - $this->custom_placement_config = $var; - - return $this; - } - - /** - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace|null - */ - public function getHierarchicalNamespace() - { - return $this->hierarchical_namespace; - } - - public function hasHierarchicalNamespace() - { - return isset($this->hierarchical_namespace); - } - - public function clearHierarchicalNamespace() - { - unset($this->hierarchical_namespace); - } - - /** - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $var - * @return $this - */ - public function setHierarchicalNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace::class); - $this->hierarchical_namespace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php deleted file mode 100644 index 5c05317b146b..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php +++ /dev/null @@ -1,72 +0,0 @@ -google.storage.control.v2.StorageLayout.CustomPlacementConfig - */ -class CustomPlacementConfig extends \Google\Protobuf\Internal\Message -{ - /** - * List of locations to use for data placement. - * - * Generated from protobuf field repeated string data_locations = 1; - */ - private $data_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations - * List of locations to use for data placement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * List of locations to use for data placement. - * - * Generated from protobuf field repeated string data_locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataLocations() - { - return $this->data_locations; - } - - /** - * List of locations to use for data placement. - * - * Generated from protobuf field repeated string data_locations = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomPlacementConfig::class, \Google\Cloud\Storage\Control\V2\StorageLayout_CustomPlacementConfig::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php deleted file mode 100644 index 34e91aff6d81..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php +++ /dev/null @@ -1,70 +0,0 @@ -google.storage.control.v2.StorageLayout.HierarchicalNamespace - */ -class HierarchicalNamespace extends \Google\Protobuf\Internal\Message -{ - /** - * Enables the hierarchical namespace feature. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Enables the hierarchical namespace feature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Enables the hierarchical namespace feature. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enables the hierarchical namespace feature. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HierarchicalNamespace::class, \Google\Cloud\Storage\Control\V2\StorageLayout_HierarchicalNamespace::class); - diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php deleted file mode 100644 index 8f69c308974b..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - - // Call the API and handle any network failures. - try { - /** @var Folder $response */ - $response = $storageControlClient->createFolder($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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - $folderId = '[FOLDER_ID]'; - - create_folder_sample($formattedParent, $folderId); -} -// [END storage_v2_generated_StorageControl_CreateFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php deleted file mode 100644 index 367c733b53f7..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - - // Call the API and handle any network failures. - try { - /** @var ManagedFolder $response */ - $response = $storageControlClient->createManagedFolder($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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - $managedFolderId = '[MANAGED_FOLDER_ID]'; - - create_managed_folder_sample($formattedParent, $managedFolderId); -} -// [END storage_v2_generated_StorageControl_CreateManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php deleted file mode 100644 index 40e321078635..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $storageControlClient->deleteFolder($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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - - delete_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_DeleteFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php deleted file mode 100644 index 63dab9b8481f..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $storageControlClient->deleteManagedFolder($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 = StorageControlClient::managedFolderName( - '[PROJECT]', - '[BUCKET]', - '[MANAGED_FOLDER]' - ); - - delete_managed_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_DeleteManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php deleted file mode 100644 index 1685e43ec814..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Folder $response */ - $response = $storageControlClient->getFolder($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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - - get_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php deleted file mode 100644 index c6fbdeb48898..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ManagedFolder $response */ - $response = $storageControlClient->getManagedFolder($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 = StorageControlClient::managedFolderName( - '[PROJECT]', - '[BUCKET]', - '[MANAGED_FOLDER]' - ); - - get_managed_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php deleted file mode 100644 index 3a8b9e36aeb6..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var StorageLayout $response */ - $response = $storageControlClient->getStorageLayout($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 = StorageControlClient::storageLayoutName('[PROJECT]', '[BUCKET]'); - - get_storage_layout_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetStorageLayout_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php deleted file mode 100644 index ba2043d14fc8..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageControlClient->listFolders($request); - - /** @var Folder $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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - - list_folders_sample($formattedParent); -} -// [END storage_v2_generated_StorageControl_ListFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php deleted file mode 100644 index 7b9623d4f14a..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageControlClient->listManagedFolders($request); - - /** @var ManagedFolder $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 = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - - list_managed_folders_sample($formattedParent); -} -// [END storage_v2_generated_StorageControl_ListManagedFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php deleted file mode 100644 index 9d8954e31f8d..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setDestinationFolderId($destinationFolderId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $storageControlClient->renameFolder($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Folder $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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $destinationFolderId = '[DESTINATION_FOLDER_ID]'; - - rename_folder_sample($formattedName, $destinationFolderId); -} -// [END storage_v2_generated_StorageControl_RenameFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php b/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php deleted file mode 100644 index 1f8bdf138bb8..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php +++ /dev/null @@ -1,612 +0,0 @@ - createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getManagedFolderAsync(GetManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStorageLayoutAsync(GetStorageLayoutRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFoldersAsync(ListFoldersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listManagedFoldersAsync(ListManagedFoldersRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameFolderAsync(RenameFolderRequest $request, array $optionalArgs = []) - */ -final class StorageControlClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.storage.control.v2.StorageControl'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'storage.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'storage.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/devstorage.full_control', - 'https://www.googleapis.com/auth/devstorage.read_only', - 'https://www.googleapis.com/auth/devstorage.read_write', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/storage_control_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_control_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_control_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - ]; - } - - /** Implements ClientOptionsTrait::supportedTransports. */ - private static function supportedTransports() - { - return [ - 'grpc', - 'grpc-fallback', - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 bucket - * resource. - * - * @param string $project - * @param string $bucket - * - * @return string The formatted bucket resource. - */ - public static function bucketName(string $project, string $bucket): string - { - return self::getPathTemplate('bucket')->render([ - 'project' => $project, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $project - * @param string $bucket - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $project, string $bucket, string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'project' => $project, - 'bucket' => $bucket, - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * managed_folder resource. - * - * @param string $project - * @param string $bucket - * @param string $managedFolder - * - * @return string The formatted managed_folder resource. - */ - public static function managedFolderName(string $project, string $bucket, string $managedFolder): string - { - return self::getPathTemplate('managedFolder')->render([ - 'project' => $project, - 'bucket' => $bucket, - 'managed_folder' => $managedFolder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * storage_layout resource. - * - * @param string $project - * @param string $bucket - * - * @return string The formatted storage_layout resource. - */ - public static function storageLayoutName(string $project, string $bucket): string - { - return self::getPathTemplate('storageLayout')->render([ - 'project' => $project, - 'bucket' => $bucket, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - bucket: projects/{project}/buckets/{bucket} - * - folder: projects/{project}/buckets/{bucket}/folders/{folder=**} - * - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**} - * - storageLayout: projects/{project}/buckets/{bucket}/storageLayout - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'storage.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. At the moment, supports only - * `grpc`. *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' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} method for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new folder. This operation is only applicable to a hierarchical - * namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::createFolderAsync()} . - * - * @example samples/V2/StorageControlClient/create_folder.php - * - * @param CreateFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Folder - * - * @throws ApiException Thrown if the API call fails. - */ - public function createFolder(CreateFolderRequest $request, array $callOptions = []): Folder - { - return $this->startApiCall('CreateFolder', $request, $callOptions)->wait(); - } - - /** - * Creates a new managed folder. - * - * The async variant is {@see StorageControlClient::createManagedFolderAsync()} . - * - * @example samples/V2/StorageControlClient/create_managed_folder.php - * - * @param CreateManagedFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ManagedFolder - * - * @throws ApiException Thrown if the API call fails. - */ - public function createManagedFolder(CreateManagedFolderRequest $request, array $callOptions = []): ManagedFolder - { - return $this->startApiCall('CreateManagedFolder', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes an empty folder. This operation is only applicable to a - * hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::deleteFolderAsync()} . - * - * @example samples/V2/StorageControlClient/delete_folder.php - * - * @param DeleteFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteFolder(DeleteFolderRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteFolder', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes an empty managed folder. - * - * The async variant is {@see StorageControlClient::deleteManagedFolderAsync()} . - * - * @example samples/V2/StorageControlClient/delete_managed_folder.php - * - * @param DeleteManagedFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteManagedFolder(DeleteManagedFolderRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteManagedFolder', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for the specified folder. This operation is only - * applicable to a hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::getFolderAsync()} . - * - * @example samples/V2/StorageControlClient/get_folder.php - * - * @param GetFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Folder - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFolder(GetFolderRequest $request, array $callOptions = []): Folder - { - return $this->startApiCall('GetFolder', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for the specified managed folder. - * - * The async variant is {@see StorageControlClient::getManagedFolderAsync()} . - * - * @example samples/V2/StorageControlClient/get_managed_folder.php - * - * @param GetManagedFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ManagedFolder - * - * @throws ApiException Thrown if the API call fails. - */ - public function getManagedFolder(GetManagedFolderRequest $request, array $callOptions = []): ManagedFolder - { - return $this->startApiCall('GetManagedFolder', $request, $callOptions)->wait(); - } - - /** - * Returns the storage layout configuration for a given bucket. - * - * The async variant is {@see StorageControlClient::getStorageLayoutAsync()} . - * - * @example samples/V2/StorageControlClient/get_storage_layout.php - * - * @param GetStorageLayoutRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return StorageLayout - * - * @throws ApiException Thrown if the API call fails. - */ - public function getStorageLayout(GetStorageLayoutRequest $request, array $callOptions = []): StorageLayout - { - return $this->startApiCall('GetStorageLayout', $request, $callOptions)->wait(); - } - - /** - * Retrieves a list of folders. This operation is only applicable to a - * hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::listFoldersAsync()} . - * - * @example samples/V2/StorageControlClient/list_folders.php - * - * @param ListFoldersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFolders(ListFoldersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFolders', $request, $callOptions); - } - - /** - * Retrieves a list of managed folders for a given bucket. - * - * The async variant is {@see StorageControlClient::listManagedFoldersAsync()} . - * - * @example samples/V2/StorageControlClient/list_managed_folders.php - * - * @param ListManagedFoldersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listManagedFolders(ListManagedFoldersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListManagedFolders', $request, $callOptions); - } - - /** - * Renames a source folder to a destination folder. This operation is only - * applicable to a hierarchical namespace enabled bucket. During a rename, the - * source and destination folders are locked until the long running operation - * completes. - * - * The async variant is {@see StorageControlClient::renameFolderAsync()} . - * - * @example samples/V2/StorageControlClient/rename_folder.php - * - * @param RenameFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 renameFolder(RenameFolderRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RenameFolder', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json b/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 61ee835d8977..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.storage.control.v2", - "libraryPackage": "Google\\Cloud\\Storage\\Control\\V2", - "services": { - "StorageControl": { - "clients": { - "grpc": { - "libraryClient": "StorageControlGapicClient", - "rpcs": { - "CreateFolder": { - "methods": [ - "createFolder" - ] - }, - "CreateManagedFolder": { - "methods": [ - "createManagedFolder" - ] - }, - "DeleteFolder": { - "methods": [ - "deleteFolder" - ] - }, - "DeleteManagedFolder": { - "methods": [ - "deleteManagedFolder" - ] - }, - "GetFolder": { - "methods": [ - "getFolder" - ] - }, - "GetManagedFolder": { - "methods": [ - "getManagedFolder" - ] - }, - "GetStorageLayout": { - "methods": [ - "getStorageLayout" - ] - }, - "ListFolders": { - "methods": [ - "listFolders" - ] - }, - "ListManagedFolders": { - "methods": [ - "listManagedFolders" - ] - }, - "RenameFolder": { - "methods": [ - "renameFolder" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json deleted file mode 100644 index b6522d27f8ab..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "interfaces": { - "google.storage.control.v2.StorageControl": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNKNOWN" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 2.0, - "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 - } - }, - "methods": { - "CreateFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateManagedFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteManagedFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetManagedFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetStorageLayout": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListFolders": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListManagedFolders": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RenameFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php deleted file mode 100644 index 6a5949b7c46c..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php +++ /dev/null @@ -1,222 +0,0 @@ - [ - 'google.storage.control.v2.StorageControl' => [ - 'RenameFolder' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\Folder', - 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\RenameFolderMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'CreateFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'CreateManagedFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'DeleteFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'DeleteManagedFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetManagedFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetStorageLayout' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\StorageLayout', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'ListFolders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFolders', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ListFoldersResponse', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListManagedFolders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getManagedFolders', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ListManagedFoldersResponse', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'templateMap' => [ - 'bucket' => 'projects/{project}/buckets/{bucket}', - 'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}', - 'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}', - 'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout', - ], - ], - ], -]; diff --git a/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php b/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php deleted file mode 100644 index 615b5dfe5600..000000000000 --- a/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php +++ /dev/null @@ -1,872 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return StorageControlClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new StorageControlClient($options); - } - - /** @test */ - public function createFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $folder = new Folder(); - $folderId = 'folderId527488652'; - $request = (new CreateFolderRequest()) - ->setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - $response = $gapicClient->createFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFolder(); - $this->assertProtobufEquals($folder, $actualValue); - $actualValue = $actualRequestObject->getFolderId(); - $this->assertProtobufEquals($folderId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); - $folder = new Folder(); - $folderId = 'folderId527488652'; - $request = (new CreateFolderRequest()) - ->setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - try { - $gapicClient->createFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createManagedFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $metageneration = 1048558813; - $expectedResponse = new ManagedFolder(); - $expectedResponse->setName($name); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $managedFolder = new ManagedFolder(); - $managedFolderId = 'managedFolderId-239131156'; - $request = (new CreateManagedFolderRequest()) - ->setParent($formattedParent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - $response = $gapicClient->createManagedFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/CreateManagedFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getManagedFolder(); - $this->assertProtobufEquals($managedFolder, $actualValue); - $actualValue = $actualRequestObject->getManagedFolderId(); - $this->assertProtobufEquals($managedFolderId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createManagedFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); - $managedFolder = new ManagedFolder(); - $managedFolderId = 'managedFolderId-239131156'; - $request = (new CreateManagedFolderRequest()) - ->setParent($formattedParent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - try { - $gapicClient->createManagedFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new DeleteFolderRequest()) - ->setName($formattedName); - $gapicClient->deleteFolder($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new DeleteFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteManagedFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new DeleteManagedFolderRequest()) - ->setName($formattedName); - $gapicClient->deleteManagedFolder($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/DeleteManagedFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteManagedFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new DeleteManagedFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteManagedFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new GetFolderRequest()) - ->setName($formattedName); - $response = $gapicClient->getFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new GetFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->getFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getManagedFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $metageneration = 1048558813; - $expectedResponse = new ManagedFolder(); - $expectedResponse->setName($name2); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new GetManagedFolderRequest()) - ->setName($formattedName); - $response = $gapicClient->getManagedFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetManagedFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getManagedFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new GetManagedFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->getManagedFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStorageLayoutTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $locationType = 'locationType-1796591228'; - $expectedResponse = new StorageLayout(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setLocationType($locationType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); - $request = (new GetStorageLayoutRequest()) - ->setName($formattedName); - $response = $gapicClient->getStorageLayout($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetStorageLayout', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStorageLayoutExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->storageLayoutName('[PROJECT]', '[BUCKET]'); - $request = (new GetStorageLayoutRequest()) - ->setName($formattedName); - try { - $gapicClient->getStorageLayout($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFoldersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $foldersElement = new Folder(); - $folders = [ - $foldersElement, - ]; - $expectedResponse = new ListFoldersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFolders($folders); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListFoldersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFolders($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/ListFolders', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFoldersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListFoldersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFolders($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listManagedFoldersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $managedFoldersElement = new ManagedFolder(); - $managedFolders = [ - $managedFoldersElement, - ]; - $expectedResponse = new ListManagedFoldersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setManagedFolders($managedFolders); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListManagedFoldersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listManagedFolders($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getManagedFolders()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/ListManagedFolders', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listManagedFoldersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListManagedFoldersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listManagedFolders($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameFolderTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/renameFolderTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setMetageneration($metageneration); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/renameFolderTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $destinationFolderId = 'destinationFolderId368368539'; - $request = (new RenameFolderRequest()) - ->setName($formattedName) - ->setDestinationFolderId($destinationFolderId); - $response = $gapicClient->renameFolder($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.storage.control.v2.StorageControl/RenameFolder', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getDestinationFolderId(); - $this->assertProtobufEquals($destinationFolderId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/renameFolderTest'); - $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 renameFolderExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/renameFolderTest'); - $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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $destinationFolderId = 'destinationFolderId368368539'; - $request = (new RenameFolderRequest()) - ->setName($formattedName) - ->setDestinationFolderId($destinationFolderId); - $response = $gapicClient->renameFolder($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/renameFolderTest'); - 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 createFolderAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $folder = new Folder(); - $folderId = 'folderId527488652'; - $request = (new CreateFolderRequest()) - ->setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - $response = $gapicClient->createFolderAsync($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.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFolder(); - $this->assertProtobufEquals($folder, $actualValue); - $actualValue = $actualRequestObject->getFolderId(); - $this->assertProtobufEquals($folderId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/GPBMetadata/Google/Cloud/Storageinsights/V1/Storageinsights.php b/owl-bot-staging/StorageInsights/v1/proto/src/GPBMetadata/Google/Cloud/Storageinsights/V1/Storageinsights.php deleted file mode 100644 index 6cde30d40d295a8fba48dad7098faff119932d01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7019 zcmcIp&2JmW6%R#A7KgSz#<5MyfW28Kh@x0aP)^X6j_Q&WB`dWpm6lZ`C9qg7hvHVt z-Rf&L9`?mhL|Qv&qR+h#PdyZ9FMad1B9~G~DvmFvX6C(l zpTGCs&Ib>Ic7X0^8^j}_MM+a@9BQ;pv>^1UZ~Ly+=(buU)NH>KI4%hdOA9ez%#As2^H;#PK3$uT7);K_R(h@EZ{FtPY6+%O={! zcKI=(R@0(ZeSke_7Wzx0|96ub7v_@nYjVxqr zd(gbv3FzVI7sjMq;Kx?9e-7Fm2jZ4monUm@T3|ygTeLfdFLn+CQeT729Q~S@go22t zlkq@a{-Gnow$yCKQMwLUz8J?9i?X-T|CZ7F=SpvUTaXzX6^sNb7zc%g>yob(H~<|i z<^(V-NXk6hXtBUD8#1!wfg3%Pp$s3nbyIF}h=Kgf6BZzHQvp@HDY$na3=&tzCzv6* zujK(HbQstGYs{f?sLah}KBphqU5*EoU#PkzaJ- zN?buxffa&Paw#pfm?_`;x-{|M(lUNGX-aVc7%MUWs`I_f@I1-{0LEqn@RyqaK9d+D z#FwbQPrO{3@y0V~s^z!RK>hfNZijlxIO!+g8IRAaoi;`Wd>mLHcZ` zOjkk|SZ(Py92&=P`d>ib3fxFZuY~G?SK^yZbh*!H+!y28tel3hz}FE9Mc9~5Q}~c= zr1U?58qWe2j;E>d9+;JHnk)slxw0z@%4aGEj2J7$Wdm|EAH52>c`ORKe*iWWi+1hvtPR#WcS(VZ|P4{(b>n682kzF2!;2rQQI;1#~&`tRQOp)MVMsd7fs- z9R((M0b%L;z@lw42uaKNBsa~2{dIIHYFlA5f@JDK`e$G@jde67@P@lLyMmRQ0ErAy zTJR>Ca;*k&BS>17em_uW&ca}senKnb5vQ$sG(5xxnx$3SgJ-sS(jY`r8Hxeok!YW{>2r2nNb@-v%uNC;e9wXnreTV-mE}YEr=fpEfTMBI{W+eq+`%lt}|xOcSp;B2WmD zD`-k2qbS#6aUNYbAYtPK?bG-snh_XbLemmK-514MoWFyv$r=H9WLq%cxGvWx#}b=E zU>fI878(f?7)PKf&*2Ow*Z-A5bL*UeXCH0_e6GMxP^P8Uc*f1F+#j0oNiIgbfZsw0 z6bJ?ANEn@03}e8-cZ3NUGRdMjct~GGnG?o0(AD)?^(W7&Pbwdo&z?Npu2weJH>+!N zui*@uTq|up`e-f%ozc`!tJNRF?+LwzQ03{aQZ$F=1oW5@fv(JgDNiB{bIp@e&{5I0kWT+}0^QtdFf>zvT;r{q;snxn{V@F}_!LspG@fa0}g340~nuMQ};aJ{XJnpk*GW%G0X5Enh`f zPPs|{&!npF0=X0QJ(1_4-5G3?;_5E)?WDQl)swXoBcQ`0G#_V_sVu=-@a#%qs3qcf zSH3I*LPZBLA5p>I9m?k<@WD$TqFIP|7PK)RQQGrE`Sb@n_xLTJhaLcw_}l|2!e*bC zHEV&gD<2GH{S6WPFxArtp|Khv;r_lx2)ePR69ukyX!4mN3j$`w?Kz&mEYT4=4jF;f zSJH8mXX67BT72K}nk#?2gk~l7Y|0OI_^&B6KQQXy;l1PlO-+m>3&o+{ zJcU&B5_jTi9md zx1IXanHJwN#x#6I&5z7YkD`w97j#%B|^H~8a_!TU-0>cL-{RN*pq3!keK zb@_gz9+1?TI=mpgoX`cEVv+MH788t$#oa<>6uF< diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php deleted file mode 100644 index 25cd86d4002d..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CSVOptions.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.storageinsights.v1.CSVOptions - */ -class CSVOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Record separator characters in CSV. - * - * Generated from protobuf field string record_separator = 1; - */ - protected $record_separator = ''; - /** - * Delimiter characters in CSV. - * - * Generated from protobuf field string delimiter = 2; - */ - protected $delimiter = ''; - /** - * If set, will include a header row in the CSV report. - * - * Generated from protobuf field bool header_required = 3; - */ - protected $header_required = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $record_separator - * Record separator characters in CSV. - * @type string $delimiter - * Delimiter characters in CSV. - * @type bool $header_required - * If set, will include a header row in the CSV report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Record separator characters in CSV. - * - * Generated from protobuf field string record_separator = 1; - * @return string - */ - public function getRecordSeparator() - { - return $this->record_separator; - } - - /** - * Record separator characters in CSV. - * - * Generated from protobuf field string record_separator = 1; - * @param string $var - * @return $this - */ - public function setRecordSeparator($var) - { - GPBUtil::checkString($var, True); - $this->record_separator = $var; - - return $this; - } - - /** - * Delimiter characters in CSV. - * - * Generated from protobuf field string delimiter = 2; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Delimiter characters in CSV. - * - * Generated from protobuf field string delimiter = 2; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * If set, will include a header row in the CSV report. - * - * Generated from protobuf field bool header_required = 3; - * @return bool - */ - public function getHeaderRequired() - { - return $this->header_required; - } - - /** - * If set, will include a header row in the CSV report. - * - * Generated from protobuf field bool header_required = 3; - * @param bool $var - * @return $this - */ - public function setHeaderRequired($var) - { - GPBUtil::checkBool($var); - $this->header_required = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php deleted file mode 100644 index 0dfdb6efcee1..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageDestinationOptions.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.storageinsights.v1.CloudStorageDestinationOptions - */ -class CloudStorageDestinationOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Destination bucket. - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - /** - * Destination path is the path in the bucket where the report should be - * generated. - * - * Generated from protobuf field string destination_path = 2; - */ - protected $destination_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Destination bucket. - * @type string $destination_path - * Destination path is the path in the bucket where the report should be - * generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Destination bucket. - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Destination bucket. - * - * Generated from protobuf field string bucket = 1; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Destination path is the path in the bucket where the report should be - * generated. - * - * Generated from protobuf field string destination_path = 2; - * @return string - */ - public function getDestinationPath() - { - return $this->destination_path; - } - - /** - * Destination path is the path in the bucket where the report should be - * generated. - * - * Generated from protobuf field string destination_path = 2; - * @param string $var - * @return $this - */ - public function setDestinationPath($var) - { - GPBUtil::checkString($var, True); - $this->destination_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php deleted file mode 100644 index 7d65faa4ed79..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CloudStorageFilters.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.storageinsights.v1.CloudStorageFilters - */ -class CloudStorageFilters extends \Google\Protobuf\Internal\Message -{ - /** - * Bucket for which the report will be generated. - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Bucket for which the report will be generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Bucket for which the report will be generated. - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Bucket for which the report will be generated. - * - * Generated from protobuf field string bucket = 1; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php deleted file mode 100644 index 182f55b16706..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/CreateReportConfigRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.storageinsights.v1.CreateReportConfigRequest - */ -class CreateReportConfigRequest 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. The resource being created - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_config = 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 StorageInsightsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\StorageInsights\V1\ReportConfig $reportConfig Required. The resource being created - * - * @return \Google\Cloud\StorageInsights\V1\CreateReportConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\StorageInsights\V1\ReportConfig $reportConfig): self - { - return (new self()) - ->setParent($parent) - ->setReportConfig($reportConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type \Google\Cloud\StorageInsights\V1\ReportConfig $report_config - * 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\Storageinsights\V1\Storageinsights::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. The resource being created - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\StorageInsights\V1\ReportConfig|null - */ - public function getReportConfig() - { - return $this->report_config; - } - - public function hasReportConfig() - { - return isset($this->report_config); - } - - public function clearReportConfig() - { - unset($this->report_config); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\StorageInsights\V1\ReportConfig $var - * @return $this - */ - public function setReportConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ReportConfig::class); - $this->report_config = $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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php deleted file mode 100644 index 4fea2e9560c1..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/DeleteReportConfigRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.storageinsights.v1.DeleteReportConfigRequest - */ -class DeleteReportConfigRequest 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. If set, all ReportDetails for this ReportConfig will be deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = 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 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see StorageInsightsClient::reportConfigName()} for help formatting this field. - * - * @return \Google\Cloud\StorageInsights\V1\DeleteReportConfigRequest - * - * @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 bool $force - * Optional. If set, all ReportDetails for this ReportConfig will be deleted. - * @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\Storageinsights\V1\Storageinsights::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. If set, all ReportDetails for this ReportConfig will be deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set, all ReportDetails for this ReportConfig will be deleted. - * - * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $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 = 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 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 = 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php deleted file mode 100644 index 09b1f0fc3c8e..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.storageinsights.v1.FrequencyOptions - */ -class FrequencyOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Frequency of report generation. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions.Frequency frequency = 1; - */ - protected $frequency = 0; - /** - * The date from which report generation should start. - * UTC time zone. - * - * Generated from protobuf field .google.type.Date start_date = 2; - */ - protected $start_date = null; - /** - * The date on which report generation should stop (Inclusive). - * UTC time zone. - * - * Generated from protobuf field .google.type.Date end_date = 3; - */ - protected $end_date = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $frequency - * Frequency of report generation. - * @type \Google\Type\Date $start_date - * The date from which report generation should start. - * UTC time zone. - * @type \Google\Type\Date $end_date - * The date on which report generation should stop (Inclusive). - * UTC time zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Frequency of report generation. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions.Frequency frequency = 1; - * @return int - */ - public function getFrequency() - { - return $this->frequency; - } - - /** - * Frequency of report generation. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions.Frequency frequency = 1; - * @param int $var - * @return $this - */ - public function setFrequency($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageInsights\V1\FrequencyOptions\Frequency::class); - $this->frequency = $var; - - return $this; - } - - /** - * The date from which report generation should start. - * UTC time zone. - * - * Generated from protobuf field .google.type.Date start_date = 2; - * @return \Google\Type\Date|null - */ - public function getStartDate() - { - return $this->start_date; - } - - public function hasStartDate() - { - return isset($this->start_date); - } - - public function clearStartDate() - { - unset($this->start_date); - } - - /** - * The date from which report generation should start. - * UTC time zone. - * - * Generated from protobuf field .google.type.Date start_date = 2; - * @param \Google\Type\Date $var - * @return $this - */ - public function setStartDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->start_date = $var; - - return $this; - } - - /** - * The date on which report generation should stop (Inclusive). - * UTC time zone. - * - * Generated from protobuf field .google.type.Date end_date = 3; - * @return \Google\Type\Date|null - */ - public function getEndDate() - { - return $this->end_date; - } - - public function hasEndDate() - { - return isset($this->end_date); - } - - public function clearEndDate() - { - unset($this->end_date); - } - - /** - * The date on which report generation should stop (Inclusive). - * UTC time zone. - * - * Generated from protobuf field .google.type.Date end_date = 3; - * @param \Google\Type\Date $var - * @return $this - */ - public function setEndDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->end_date = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php deleted file mode 100644 index 350afa68dca4..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/FrequencyOptions/Frequency.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.storageinsights.v1.FrequencyOptions.Frequency - */ -class Frequency -{ - /** - * Unspecified. - * - * Generated from protobuf enum FREQUENCY_UNSPECIFIED = 0; - */ - const FREQUENCY_UNSPECIFIED = 0; - /** - * Report will be generated daily. - * - * Generated from protobuf enum DAILY = 1; - */ - const DAILY = 1; - /** - * Report will be generated weekly. - * - * Generated from protobuf enum WEEKLY = 2; - */ - const WEEKLY = 2; - - private static $valueToName = [ - self::FREQUENCY_UNSPECIFIED => 'FREQUENCY_UNSPECIFIED', - self::DAILY => 'DAILY', - self::WEEKLY => 'WEEKLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Frequency::class, \Google\Cloud\StorageInsights\V1\FrequencyOptions_Frequency::class); - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php deleted file mode 100644 index 8158367d9ded..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportConfigRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.storageinsights.v1.GetReportConfigRequest - */ -class GetReportConfigRequest 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 StorageInsightsClient::reportConfigName()} for help formatting this field. - * - * @return \Google\Cloud\StorageInsights\V1\GetReportConfigRequest - * - * @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\Storageinsights\V1\Storageinsights::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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php deleted file mode 100644 index c0798c466611..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/GetReportDetailRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.storageinsights.v1.GetReportDetailRequest - */ -class GetReportDetailRequest 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 StorageInsightsClient::reportDetailName()} for help formatting this field. - * - * @return \Google\Cloud\StorageInsights\V1\GetReportDetailRequest - * - * @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\Storageinsights\V1\Storageinsights::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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php deleted file mode 100644 index 0b81255d3d05..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.storageinsights.v1.ListReportConfigsRequest - */ -class ListReportConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListReportConfigsRequest - * - * 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 ListReportConfigsRequest - * Please see {@see StorageInsightsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\StorageInsights\V1\ListReportConfigsRequest - * - * @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 ListReportConfigsRequest - * @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\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListReportConfigsRequest - * - * 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 ListReportConfigsRequest - * - * 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php deleted file mode 100644 index 67ce8ce5f0f2..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportConfigsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.storageinsights.v1.ListReportConfigsResponse - */ -class ListReportConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ReportConfig - * - * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportConfig report_configs = 1; - */ - private $report_configs; - /** - * 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 array<\Google\Cloud\StorageInsights\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $report_configs - * The list of ReportConfig - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * The list of ReportConfig - * - * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportConfig report_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReportConfigs() - { - return $this->report_configs; - } - - /** - * The list of ReportConfig - * - * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportConfig report_configs = 1; - * @param array<\Google\Cloud\StorageInsights\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReportConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageInsights\V1\ReportConfig::class); - $this->report_configs = $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php deleted file mode 100644 index 1822f972ee85..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.storageinsights.v1.ListReportDetailsRequest - */ -class ListReportDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListReportDetailsRequest - * - * 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 ListReportDetailsRequest - * Please see {@see StorageInsightsClient::reportConfigName()} for help formatting this field. - * - * @return \Google\Cloud\StorageInsights\V1\ListReportDetailsRequest - * - * @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 ListReportDetailsRequest - * @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\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListReportDetailsRequest - * - * 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 ListReportDetailsRequest - * - * 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php deleted file mode 100644 index 906f589b9718..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ListReportDetailsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.storageinsights.v1.ListReportDetailsResponse - */ -class ListReportDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ReportDetail - * - * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportDetail report_details = 1; - */ - private $report_details; - /** - * 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 array<\Google\Cloud\StorageInsights\V1\ReportDetail>|\Google\Protobuf\Internal\RepeatedField $report_details - * The list of ReportDetail - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * The list of ReportDetail - * - * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportDetail report_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReportDetails() - { - return $this->report_details; - } - - /** - * The list of ReportDetail - * - * Generated from protobuf field repeated .google.cloud.storageinsights.v1.ReportDetail report_details = 1; - * @param array<\Google\Cloud\StorageInsights\V1\ReportDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReportDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageInsights\V1\ReportDetail::class); - $this->report_details = $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php deleted file mode 100644 index 53e660175af8..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ObjectMetadataReportOptions.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.storageinsights.v1.ObjectMetadataReportOptions - */ -class ObjectMetadataReportOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Metadata fields to be included in the report. - * - * Generated from protobuf field repeated string metadata_fields = 1; - */ - private $metadata_fields; - protected $filter; - protected $destination_options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $metadata_fields - * Metadata fields to be included in the report. - * @type \Google\Cloud\StorageInsights\V1\CloudStorageFilters $storage_filters - * Cloud Storage as the storage system. - * @type \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions $storage_destination_options - * Cloud Storage as the storage system. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Metadata fields to be included in the report. - * - * Generated from protobuf field repeated string metadata_fields = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetadataFields() - { - return $this->metadata_fields; - } - - /** - * Metadata fields to be included in the report. - * - * Generated from protobuf field repeated string metadata_fields = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetadataFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata_fields = $arr; - - return $this; - } - - /** - * Cloud Storage as the storage system. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageFilters storage_filters = 2; - * @return \Google\Cloud\StorageInsights\V1\CloudStorageFilters|null - */ - public function getStorageFilters() - { - return $this->readOneof(2); - } - - public function hasStorageFilters() - { - return $this->hasOneof(2); - } - - /** - * Cloud Storage as the storage system. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageFilters storage_filters = 2; - * @param \Google\Cloud\StorageInsights\V1\CloudStorageFilters $var - * @return $this - */ - public function setStorageFilters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\CloudStorageFilters::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cloud Storage as the storage system. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageDestinationOptions storage_destination_options = 3; - * @return \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions|null - */ - public function getStorageDestinationOptions() - { - return $this->readOneof(3); - } - - public function hasStorageDestinationOptions() - { - return $this->hasOneof(3); - } - - /** - * Cloud Storage as the storage system. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.CloudStorageDestinationOptions storage_destination_options = 3; - * @param \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions $var - * @return $this - */ - public function setStorageDestinationOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\CloudStorageDestinationOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilter() - { - return $this->whichOneof("filter"); - } - - /** - * @return string - */ - public function getDestinationOptions() - { - return $this->whichOneof("destination_options"); - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php deleted file mode 100644 index 202d568632bc..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.storageinsights.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 been cancelled successfully - * 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 been cancelled successfully - * 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\Storageinsights\V1\Storageinsights::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 been cancelled successfully - * 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 been cancelled successfully - * 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/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php deleted file mode 100644 index 0ab81e8889bd..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ParquetOptions.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.storageinsights.v1.ParquetOptions - */ -class ParquetOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php deleted file mode 100644 index 39fb01d11da7..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportConfig.php +++ /dev/null @@ -1,397 +0,0 @@ -google.cloud.storageinsights.v1.ReportConfig - */ -class ReportConfig extends \Google\Protobuf\Internal\Message -{ - /** - * name of resource. It will be of form - * projects//locations//reportConfigs/. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. [Output only] Create time stamp - * - * 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 time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The frequency of report generation. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions frequency_options = 5; - */ - protected $frequency_options = null; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * User provided display name which can be empty and limited to 256 characters - * that is editable. - * - * Generated from protobuf field string display_name = 11; - */ - protected $display_name = ''; - protected $report_format; - protected $report_kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * name of resource. It will be of form - * projects//locations//reportConfigs/. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp - * @type \Google\Cloud\StorageInsights\V1\FrequencyOptions $frequency_options - * The frequency of report generation. - * @type \Google\Cloud\StorageInsights\V1\CSVOptions $csv_options - * Options for CSV formatted reports. - * @type \Google\Cloud\StorageInsights\V1\ParquetOptions $parquet_options - * Options for Parquet formatted reports. - * @type \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions $object_metadata_report_options - * Report for exporting object metadata. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type string $display_name - * User provided display name which can be empty and limited to 256 characters - * that is editable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * name of resource. It will be of form - * projects//locations//reportConfigs/. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * name of resource. It will be of form - * projects//locations//reportConfigs/. - * - * 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 time stamp - * - * 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 time stamp - * - * 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 time stamp - * - * 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 time stamp - * - * 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; - } - - /** - * The frequency of report generation. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions frequency_options = 5; - * @return \Google\Cloud\StorageInsights\V1\FrequencyOptions|null - */ - public function getFrequencyOptions() - { - return $this->frequency_options; - } - - public function hasFrequencyOptions() - { - return isset($this->frequency_options); - } - - public function clearFrequencyOptions() - { - unset($this->frequency_options); - } - - /** - * The frequency of report generation. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.FrequencyOptions frequency_options = 5; - * @param \Google\Cloud\StorageInsights\V1\FrequencyOptions $var - * @return $this - */ - public function setFrequencyOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\FrequencyOptions::class); - $this->frequency_options = $var; - - return $this; - } - - /** - * Options for CSV formatted reports. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.CSVOptions csv_options = 6; - * @return \Google\Cloud\StorageInsights\V1\CSVOptions|null - */ - public function getCsvOptions() - { - return $this->readOneof(6); - } - - public function hasCsvOptions() - { - return $this->hasOneof(6); - } - - /** - * Options for CSV formatted reports. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.CSVOptions csv_options = 6; - * @param \Google\Cloud\StorageInsights\V1\CSVOptions $var - * @return $this - */ - public function setCsvOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\CSVOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Options for Parquet formatted reports. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ParquetOptions parquet_options = 7; - * @return \Google\Cloud\StorageInsights\V1\ParquetOptions|null - */ - public function getParquetOptions() - { - return $this->readOneof(7); - } - - public function hasParquetOptions() - { - return $this->hasOneof(7); - } - - /** - * Options for Parquet formatted reports. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ParquetOptions parquet_options = 7; - * @param \Google\Cloud\StorageInsights\V1\ParquetOptions $var - * @return $this - */ - public function setParquetOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ParquetOptions::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Report for exporting object metadata. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ObjectMetadataReportOptions object_metadata_report_options = 8; - * @return \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions|null - */ - public function getObjectMetadataReportOptions() - { - return $this->readOneof(8); - } - - public function hasObjectMetadataReportOptions() - { - return $this->hasOneof(8); - } - - /** - * Report for exporting object metadata. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ObjectMetadataReportOptions object_metadata_report_options = 8; - * @param \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions $var - * @return $this - */ - public function setObjectMetadataReportOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ObjectMetadataReportOptions::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 10; - * @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; - } - - /** - * User provided display name which can be empty and limited to 256 characters - * that is editable. - * - * Generated from protobuf field string display_name = 11; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User provided display name which can be empty and limited to 256 characters - * that is editable. - * - * Generated from protobuf field string display_name = 11; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getReportFormat() - { - return $this->whichOneof("report_format"); - } - - /** - * @return string - */ - public function getReportKind() - { - return $this->whichOneof("report_kind"); - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php deleted file mode 100644 index 82542d8b9d96..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail.php +++ /dev/null @@ -1,383 +0,0 @@ -google.cloud.storageinsights.v1.ReportDetail - */ -class ReportDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Name of resource. It will be of form - * projects//locations//reportConfigs//reportDetails/. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The snapshot time. - * All the report data is referenced at this point of time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 2; - */ - protected $snapshot_time = null; - /** - * Prefix of the object name of each report's shard. This will have full - * prefix except the "extension" and "shard_id". - * For example, if the `destination_path` is - * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` - * and the value of `report_path_prefix` field would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. - * - * Generated from protobuf field string report_path_prefix = 8; - */ - protected $report_path_prefix = ''; - /** - * Total shards generated for the report. - * - * Generated from protobuf field int64 shards_count = 9; - */ - protected $shards_count = 0; - /** - * Status of the ReportDetail. - * - * Generated from protobuf field .google.rpc.Status status = 4; - */ - protected $status = null; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * The date for which report is generated. The time part of target_datetime - * will be zero till we support multiple reports per day. - * - * Generated from protobuf field .google.type.DateTime target_datetime = 6; - */ - protected $target_datetime = null; - /** - * Metrics of the report. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportDetail.Metrics report_metrics = 7; - */ - protected $report_metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of resource. It will be of form - * projects//locations//reportConfigs//reportDetails/. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The snapshot time. - * All the report data is referenced at this point of time. - * @type string $report_path_prefix - * Prefix of the object name of each report's shard. This will have full - * prefix except the "extension" and "shard_id". - * For example, if the `destination_path` is - * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` - * and the value of `report_path_prefix` field would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. - * @type int|string $shards_count - * Total shards generated for the report. - * @type \Google\Rpc\Status $status - * Status of the ReportDetail. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type \Google\Type\DateTime $target_datetime - * The date for which report is generated. The time part of target_datetime - * will be zero till we support multiple reports per day. - * @type \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics $report_metrics - * Metrics of the report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Name of resource. It will be of form - * projects//locations//reportConfigs//reportDetails/. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of resource. It will be of form - * projects//locations//reportConfigs//reportDetails/. - * - * 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 snapshot time. - * All the report data is referenced at this point of time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 2; - * @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 snapshot time. - * All the report data is referenced at this point of time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - - /** - * Prefix of the object name of each report's shard. This will have full - * prefix except the "extension" and "shard_id". - * For example, if the `destination_path` is - * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` - * and the value of `report_path_prefix` field would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. - * - * Generated from protobuf field string report_path_prefix = 8; - * @return string - */ - public function getReportPathPrefix() - { - return $this->report_path_prefix; - } - - /** - * Prefix of the object name of each report's shard. This will have full - * prefix except the "extension" and "shard_id". - * For example, if the `destination_path` is - * `{{report-config-id}}/dt={{datetime}}`, the shard object name would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_5.csv` - * and the value of `report_path_prefix` field would be - * `gs://my-insights/1A34-F2E456-12B456-1C3D/dt=2022-05-20T06:35/1A34-F2E456-12B456-1C3D_2022-05-20T06:35_`. - * - * Generated from protobuf field string report_path_prefix = 8; - * @param string $var - * @return $this - */ - public function setReportPathPrefix($var) - { - GPBUtil::checkString($var, True); - $this->report_path_prefix = $var; - - return $this; - } - - /** - * Total shards generated for the report. - * - * Generated from protobuf field int64 shards_count = 9; - * @return int|string - */ - public function getShardsCount() - { - return $this->shards_count; - } - - /** - * Total shards generated for the report. - * - * Generated from protobuf field int64 shards_count = 9; - * @param int|string $var - * @return $this - */ - public function setShardsCount($var) - { - GPBUtil::checkInt64($var); - $this->shards_count = $var; - - return $this; - } - - /** - * Status of the ReportDetail. - * - * Generated from protobuf field .google.rpc.Status status = 4; - * @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 ReportDetail. - * - * Generated from protobuf field .google.rpc.Status status = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * 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; - } - - /** - * The date for which report is generated. The time part of target_datetime - * will be zero till we support multiple reports per day. - * - * Generated from protobuf field .google.type.DateTime target_datetime = 6; - * @return \Google\Type\DateTime|null - */ - public function getTargetDatetime() - { - return $this->target_datetime; - } - - public function hasTargetDatetime() - { - return isset($this->target_datetime); - } - - public function clearTargetDatetime() - { - unset($this->target_datetime); - } - - /** - * The date for which report is generated. The time part of target_datetime - * will be zero till we support multiple reports per day. - * - * Generated from protobuf field .google.type.DateTime target_datetime = 6; - * @param \Google\Type\DateTime $var - * @return $this - */ - public function setTargetDatetime($var) - { - GPBUtil::checkMessage($var, \Google\Type\DateTime::class); - $this->target_datetime = $var; - - return $this; - } - - /** - * Metrics of the report. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportDetail.Metrics report_metrics = 7; - * @return \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics|null - */ - public function getReportMetrics() - { - return $this->report_metrics; - } - - public function hasReportMetrics() - { - return isset($this->report_metrics); - } - - public function clearReportMetrics() - { - unset($this->report_metrics); - } - - /** - * Metrics of the report. - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportDetail.Metrics report_metrics = 7; - * @param \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics $var - * @return $this - */ - public function setReportMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ReportDetail\Metrics::class); - $this->report_metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php deleted file mode 100644 index 3c8117f9dc2d..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/ReportDetail/Metrics.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.storageinsights.v1.ReportDetail.Metrics - */ -class Metrics extends \Google\Protobuf\Internal\Message -{ - /** - * Count of Cloud Storage objects which are part of the report. - * - * Generated from protobuf field int64 processed_records_count = 1; - */ - protected $processed_records_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $processed_records_count - * Count of Cloud Storage objects which are part of the report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Count of Cloud Storage objects which are part of the report. - * - * Generated from protobuf field int64 processed_records_count = 1; - * @return int|string - */ - public function getProcessedRecordsCount() - { - return $this->processed_records_count; - } - - /** - * Count of Cloud Storage objects which are part of the report. - * - * Generated from protobuf field int64 processed_records_count = 1; - * @param int|string $var - * @return $this - */ - public function setProcessedRecordsCount($var) - { - GPBUtil::checkInt64($var); - $this->processed_records_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metrics::class, \Google\Cloud\StorageInsights\V1\ReportDetail_Metrics::class); - diff --git a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php b/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php deleted file mode 100644 index f71297f950de..000000000000 --- a/owl-bot-staging/StorageInsights/v1/proto/src/Google/Cloud/StorageInsights/V1/UpdateReportConfigRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.storageinsights.v1.UpdateReportConfigRequest - */ -class UpdateReportConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ReportConfig 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.storageinsights.v1.ReportConfig report_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_config = 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\StorageInsights\V1\ReportConfig $reportConfig Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * ReportConfig 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\StorageInsights\V1\UpdateReportConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\StorageInsights\V1\ReportConfig $reportConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setReportConfig($reportConfig) - ->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 - * ReportConfig 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\StorageInsights\V1\ReportConfig $report_config - * 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\Storageinsights\V1\Storageinsights::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ReportConfig 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 - * ReportConfig 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.storageinsights.v1.ReportConfig report_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\StorageInsights\V1\ReportConfig|null - */ - public function getReportConfig() - { - return $this->report_config; - } - - public function hasReportConfig() - { - return isset($this->report_config); - } - - public function clearReportConfig() - { - unset($this->report_config); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.storageinsights.v1.ReportConfig report_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\StorageInsights\V1\ReportConfig $var - * @return $this - */ - public function setReportConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageInsights\V1\ReportConfig::class); - $this->report_config = $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/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php deleted file mode 100644 index 9c3a7c679252..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/create_report_config.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent) - ->setReportConfig($reportConfig); - - // Call the API and handle any network failures. - try { - /** @var ReportConfig $response */ - $response = $storageInsightsClient->createReportConfig($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 = StorageInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - create_report_config_sample($formattedParent); -} -// [END storageinsights_v1_generated_StorageInsights_CreateReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php deleted file mode 100644 index 892d4976a73d..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/delete_report_config.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $storageInsightsClient->deleteReportConfig($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 = StorageInsightsClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - - delete_report_config_sample($formattedName); -} -// [END storageinsights_v1_generated_StorageInsights_DeleteReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_location.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_location.php deleted file mode 100644 index 5c3dc794f219..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/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 storageinsights_v1_generated_StorageInsights_GetLocation_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php deleted file mode 100644 index c58cad7be5b9..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_config.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReportConfig $response */ - $response = $storageInsightsClient->getReportConfig($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 = StorageInsightsClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - - get_report_config_sample($formattedName); -} -// [END storageinsights_v1_generated_StorageInsights_GetReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php deleted file mode 100644 index 17dde08f6656..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/get_report_detail.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReportDetail $response */ - $response = $storageInsightsClient->getReportDetail($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 = StorageInsightsClient::reportDetailName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]', - '[REPORT_DETAIL]' - ); - - get_report_detail_sample($formattedName); -} -// [END storageinsights_v1_generated_StorageInsights_GetReportDetail_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_locations.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_locations.php deleted file mode 100644 index 4deb67d4fa7f..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/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 storageinsights_v1_generated_StorageInsights_ListLocations_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php deleted file mode 100644 index 483cec7af297..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_configs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageInsightsClient->listReportConfigs($request); - - /** @var ReportConfig $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 = StorageInsightsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_report_configs_sample($formattedParent); -} -// [END storageinsights_v1_generated_StorageInsights_ListReportConfigs_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php deleted file mode 100644 index 8604d5298a32..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/list_report_details.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageInsightsClient->listReportDetails($request); - - /** @var ReportDetail $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 = StorageInsightsClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - - list_report_details_sample($formattedParent); -} -// [END storageinsights_v1_generated_StorageInsights_ListReportDetails_sync] diff --git a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php b/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php deleted file mode 100644 index 61fbbc87a279..000000000000 --- a/owl-bot-staging/StorageInsights/v1/samples/V1/StorageInsightsClient/update_report_config.php +++ /dev/null @@ -1,62 +0,0 @@ -setUpdateMask($updateMask) - ->setReportConfig($reportConfig); - - // Call the API and handle any network failures. - try { - /** @var ReportConfig $response */ - $response = $storageInsightsClient->updateReportConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END storageinsights_v1_generated_StorageInsights_UpdateReportConfig_sync] diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php b/owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php deleted file mode 100644 index 682050739ae6..000000000000 --- a/owl-bot-staging/StorageInsights/v1/src/V1/Client/StorageInsightsClient.php +++ /dev/null @@ -1,504 +0,0 @@ - createReportConfigAsync(CreateReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReportConfigAsync(DeleteReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReportConfigAsync(GetReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReportDetailAsync(GetReportDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReportConfigsAsync(ListReportConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReportDetailsAsync(ListReportDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateReportConfigAsync(UpdateReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class StorageInsightsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.storageinsights.v1.StorageInsights'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'storageinsights.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'storageinsights.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/storage_insights_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_insights_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_insights_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/storage_insights_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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 - * report_config resource. - * - * @param string $project - * @param string $location - * @param string $reportConfig - * - * @return string The formatted report_config resource. - */ - public static function reportConfigName(string $project, string $location, string $reportConfig): string - { - return self::getPathTemplate('reportConfig')->render([ - 'project' => $project, - 'location' => $location, - 'report_config' => $reportConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * report_detail resource. - * - * @param string $project - * @param string $location - * @param string $reportConfig - * @param string $reportDetail - * - * @return string The formatted report_detail resource. - */ - public static function reportDetailName(string $project, string $location, string $reportConfig, string $reportDetail): string - { - return self::getPathTemplate('reportDetail')->render([ - 'project' => $project, - 'location' => $location, - 'report_config' => $reportConfig, - 'report_detail' => $reportDetail, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - reportConfig: projects/{project}/locations/{location}/reportConfigs/{report_config} - * - reportDetail: projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'storageinsights.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new ReportConfig in a given project and location. - * - * The async variant is {@see StorageInsightsClient::createReportConfigAsync()} . - * - * @example samples/V1/StorageInsightsClient/create_report_config.php - * - * @param CreateReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReportConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReportConfig(CreateReportConfigRequest $request, array $callOptions = []): ReportConfig - { - return $this->startApiCall('CreateReportConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ReportConfig. - * - * The async variant is {@see StorageInsightsClient::deleteReportConfigAsync()} . - * - * @example samples/V1/StorageInsightsClient/delete_report_config.php - * - * @param DeleteReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteReportConfig(DeleteReportConfigRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteReportConfig', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ReportConfig. - * - * The async variant is {@see StorageInsightsClient::getReportConfigAsync()} . - * - * @example samples/V1/StorageInsightsClient/get_report_config.php - * - * @param GetReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReportConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReportConfig(GetReportConfigRequest $request, array $callOptions = []): ReportConfig - { - return $this->startApiCall('GetReportConfig', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ReportDetail. - * - * The async variant is {@see StorageInsightsClient::getReportDetailAsync()} . - * - * @example samples/V1/StorageInsightsClient/get_report_detail.php - * - * @param GetReportDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReportDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReportDetail(GetReportDetailRequest $request, array $callOptions = []): ReportDetail - { - return $this->startApiCall('GetReportDetail', $request, $callOptions)->wait(); - } - - /** - * Lists ReportConfigs in a given project and location. - * - * The async variant is {@see StorageInsightsClient::listReportConfigsAsync()} . - * - * @example samples/V1/StorageInsightsClient/list_report_configs.php - * - * @param ListReportConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReportConfigs(ListReportConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReportConfigs', $request, $callOptions); - } - - /** - * Lists ReportDetails in a given project and location. - * - * The async variant is {@see StorageInsightsClient::listReportDetailsAsync()} . - * - * @example samples/V1/StorageInsightsClient/list_report_details.php - * - * @param ListReportDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReportDetails(ListReportDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReportDetails', $request, $callOptions); - } - - /** - * Updates the parameters of a single ReportConfig. - * - * The async variant is {@see StorageInsightsClient::updateReportConfigAsync()} . - * - * @example samples/V1/StorageInsightsClient/update_report_config.php - * - * @param UpdateReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReportConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateReportConfig(UpdateReportConfigRequest $request, array $callOptions = []): ReportConfig - { - return $this->startApiCall('UpdateReportConfig', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see StorageInsightsClient::getLocationAsync()} . - * - * @example samples/V1/StorageInsightsClient/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 StorageInsightsClient::listLocationsAsync()} . - * - * @example samples/V1/StorageInsightsClient/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/StorageInsights/v1/src/V1/gapic_metadata.json b/owl-bot-staging/StorageInsights/v1/src/V1/gapic_metadata.json deleted file mode 100644 index c56c7e00942e..000000000000 --- a/owl-bot-staging/StorageInsights/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.storageinsights.v1", - "libraryPackage": "Google\\Cloud\\StorageInsights\\V1", - "services": { - "StorageInsights": { - "clients": { - "grpc": { - "libraryClient": "StorageInsightsGapicClient", - "rpcs": { - "CreateReportConfig": { - "methods": [ - "createReportConfig" - ] - }, - "DeleteReportConfig": { - "methods": [ - "deleteReportConfig" - ] - }, - "GetReportConfig": { - "methods": [ - "getReportConfig" - ] - }, - "GetReportDetail": { - "methods": [ - "getReportDetail" - ] - }, - "ListReportConfigs": { - "methods": [ - "listReportConfigs" - ] - }, - "ListReportDetails": { - "methods": [ - "listReportDetails" - ] - }, - "UpdateReportConfig": { - "methods": [ - "updateReportConfig" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json deleted file mode 100644 index 29d201413a81..000000000000 --- a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.storageinsights.v1.StorageInsights": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "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 - } - }, - "methods": { - "CreateReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetReportDetail": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListReportConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListReportDetails": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php deleted file mode 100644 index 2db16c29fda1..000000000000 --- a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_descriptor_config.php +++ /dev/null @@ -1,168 +0,0 @@ - [ - 'google.cloud.storageinsights.v1.StorageInsights' => [ - 'CreateReportConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportConfig', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteReportConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReportConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReportDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListReportConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReportConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\StorageInsights\V1\ListReportConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReportDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReportDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\StorageInsights\V1\ListReportDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateReportConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageInsights\V1\ReportConfig', - 'headerParams' => [ - [ - 'keyName' => 'report_config.name', - 'fieldAccessors' => [ - 'getReportConfig', - 'getName', - ], - ], - ], - ], - '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' => [ - 'location' => 'projects/{project}/locations/{location}', - 'reportConfig' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}', - 'reportDetail' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}/reportDetails/{report_detail}', - ], - ], - ], -]; diff --git a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php b/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php deleted file mode 100644 index 85d5310815ca..000000000000 --- a/owl-bot-staging/StorageInsights/v1/src/V1/resources/storage_insights_rest_client_config.php +++ /dev/null @@ -1,183 +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.storageinsights.v1.StorageInsights' => [ - 'CreateReportConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', - 'body' => 'report_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteReportConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReportConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReportDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*/reportDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListReportConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListReportDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reportConfigs/*}/reportDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateReportConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{report_config.name=projects/*/locations/*/reportConfigs/*}', - 'body' => 'report_config', - 'placeholders' => [ - 'report_config.name' => [ - 'getters' => [ - 'getReportConfig', - '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/*}', - '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/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php b/owl-bot-staging/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php deleted file mode 100644 index 551f6aed5cd3..000000000000 --- a/owl-bot-staging/StorageInsights/v1/tests/Unit/V1/Client/StorageInsightsClientTest.php +++ /dev/null @@ -1,719 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return StorageInsightsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new StorageInsightsClient($options); - } - - /** @test */ - public function createReportConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ReportConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $reportConfig = new ReportConfig(); - $request = (new CreateReportConfigRequest()) - ->setParent($formattedParent) - ->setReportConfig($reportConfig); - $response = $gapicClient->createReportConfig($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.storageinsights.v1.StorageInsights/CreateReportConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReportConfig(); - $this->assertProtobufEquals($reportConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReportConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $reportConfig = new ReportConfig(); - $request = (new CreateReportConfigRequest()) - ->setParent($formattedParent) - ->setReportConfig($reportConfig); - try { - $gapicClient->createReportConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReportConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new DeleteReportConfigRequest()) - ->setName($formattedName); - $gapicClient->deleteReportConfig($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.storageinsights.v1.StorageInsights/DeleteReportConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReportConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new DeleteReportConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteReportConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ReportConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new GetReportConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getReportConfig($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.storageinsights.v1.StorageInsights/GetReportConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new GetReportConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getReportConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $reportPathPrefix = 'reportPathPrefix39964001'; - $shardsCount = 2027352923; - $expectedResponse = new ReportDetail(); - $expectedResponse->setName($name2); - $expectedResponse->setReportPathPrefix($reportPathPrefix); - $expectedResponse->setShardsCount($shardsCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reportDetailName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT_DETAIL]'); - $request = (new GetReportDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getReportDetail($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.storageinsights.v1.StorageInsights/GetReportDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reportDetailName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT_DETAIL]'); - $request = (new GetReportDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getReportDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reportConfigsElement = new ReportConfig(); - $reportConfigs = [ - $reportConfigsElement, - ]; - $expectedResponse = new ListReportConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReportConfigs($reportConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListReportConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReportConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReportConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.storageinsights.v1.StorageInsights/ListReportConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListReportConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReportConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reportDetailsElement = new ReportDetail(); - $reportDetails = [ - $reportDetailsElement, - ]; - $expectedResponse = new ListReportDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReportDetails($reportDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new ListReportDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReportDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReportDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.storageinsights.v1.StorageInsights/ListReportDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new ListReportDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReportDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateReportConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ReportConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $reportConfig = new ReportConfig(); - $request = (new UpdateReportConfigRequest()) - ->setUpdateMask($updateMask) - ->setReportConfig($reportConfig); - $response = $gapicClient->updateReportConfig($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.storageinsights.v1.StorageInsights/UpdateReportConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getReportConfig(); - $this->assertProtobufEquals($reportConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateReportConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $reportConfig = new ReportConfig(); - $request = (new UpdateReportConfigRequest()) - ->setUpdateMask($updateMask) - ->setReportConfig($reportConfig); - try { - $gapicClient->updateReportConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 createReportConfigAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ReportConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $reportConfig = new ReportConfig(); - $request = (new CreateReportConfigRequest()) - ->setParent($formattedParent) - ->setReportConfig($reportConfig); - $response = $gapicClient->createReportConfigAsync($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.storageinsights.v1.StorageInsights/CreateReportConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReportConfig(); - $this->assertProtobufEquals($reportConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php b/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php deleted file mode 100644 index 97a74f5c6dce..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/Transfer.php +++ /dev/null @@ -1,112 +0,0 @@ -internalAddGeneratedFile( - ' -é" -(google/storagetransfer/v1/transfer.protogoogle.storagetransfer.v1google/api/client.protogoogle/api/field_behavior.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto.google/storagetransfer/v1/transfer_types.proto"9 -GetGoogleServiceAccountRequest - -project_id ( BàA"] -CreateTransferJobRequestA - transfer_job ( 2&.google.storagetransfer.v1.TransferJobBàA"Ñ -UpdateTransferJobRequest -job_name ( BàA - -project_id ( BàAA - transfer_job ( 2&.google.storagetransfer.v1.TransferJobBàAB -update_transfer_job_field_mask ( 2.google.protobuf.FieldMask"G -GetTransferJobRequest -job_name ( BàA - -project_id ( BàA"J -DeleteTransferJobRequest -job_name ( BàA - -project_id ( BàA"U -ListTransferJobsRequest -filter ( BàA - page_size ( - -page_token ( "r -ListTransferJobsResponse= - transfer_jobs ( 2&.google.storagetransfer.v1.TransferJob -next_page_token ( "2 -PauseTransferOperationRequest -name ( BàA"3 -ResumeTransferOperationRequest -name ( BàA"G -RunTransferJobRequest -job_name ( BàA - -project_id ( BàA"Œ -CreateAgentPoolRequest - -project_id ( BàA= - -agent_pool ( 2$.google.storagetransfer.v1.AgentPoolBàA - agent_pool_id ( BàA"ˆ -UpdateAgentPoolRequest= - -agent_pool ( 2$.google.storagetransfer.v1.AgentPoolBàA/ - update_mask ( 2.google.protobuf.FieldMask"( -GetAgentPoolRequest -name ( BàA"+ -DeleteAgentPoolRequest -name ( BàA"g -ListAgentPoolsRequest - -project_id ( BàA -filter (  - page_size ( - -page_token ( "l -ListAgentPoolsResponse9 - agent_pools ( 2$.google.storagetransfer.v1.AgentPool -next_page_token ( 2‘ -StorageTransferServiceµ -GetGoogleServiceAccount9.google.storagetransfer.v1.GetGoogleServiceAccountRequest/.google.storagetransfer.v1.GoogleServiceAccount".‚Óä“(&/v1/googleServiceAccounts/{project_id}˜ -CreateTransferJob3.google.storagetransfer.v1.CreateTransferJobRequest&.google.storagetransfer.v1.TransferJob"&‚Óä“ "/v1/transferJobs: transfer_job› -UpdateTransferJob3.google.storagetransfer.v1.UpdateTransferJobRequest&.google.storagetransfer.v1.TransferJob")‚Óä“#2/v1/{job_name=transferJobs/**}:*’ -GetTransferJob0.google.storagetransfer.v1.GetTransferJobRequest&.google.storagetransfer.v1.TransferJob"&‚Óä“ /v1/{job_name=transferJobs/**}• -ListTransferJobs2.google.storagetransfer.v1.ListTransferJobsRequest3.google.storagetransfer.v1.ListTransferJobsResponse"‚Óä“/v1/transferJobs -PauseTransferOperation8.google.storagetransfer.v1.PauseTransferOperationRequest.google.protobuf.Empty"1‚Óä“+"&/v1/{name=transferOperations/**}:pause:*  -ResumeTransferOperation9.google.storagetransfer.v1.ResumeTransferOperationRequest.google.protobuf.Empty"2‚Óä“,"\'/v1/{name=transferOperations/**}:resume:*½ -RunTransferJob0.google.storagetransfer.v1.RunTransferJobRequest.google.longrunning.Operation"ZÊA* -google.protobuf.EmptyTransferOperation‚Óä“\'""/v1/{job_name=transferJobs/**}:run:*ˆ -DeleteTransferJob3.google.storagetransfer.v1.DeleteTransferJobRequest.google.protobuf.Empty"&‚Óä“ */v1/{job_name=transferJobs/**}Ì -CreateAgentPool1.google.storagetransfer.v1.CreateAgentPoolRequest$.google.storagetransfer.v1.AgentPool"`ÚA#project_id,agent_pool,agent_pool_id‚Óä“4"&/v1/projects/{project_id=*}/agentPools: -agent_poolÆ -UpdateAgentPool1.google.storagetransfer.v1.UpdateAgentPoolRequest$.google.storagetransfer.v1.AgentPool"ZÚAagent_pool,update_mask‚Óä“;2-/v1/{agent_pool.name=projects/*/agentPools/*}: -agent_pool— - GetAgentPool..google.storagetransfer.v1.GetAgentPoolRequest$.google.storagetransfer.v1.AgentPool"1ÚAname‚Óä“$"/v1/{name=projects/*/agentPools/*}² -ListAgentPools0.google.storagetransfer.v1.ListAgentPoolsRequest1.google.storagetransfer.v1.ListAgentPoolsResponse";ÚA -project_id‚Óä“(&/v1/projects/{project_id=*}/agentPools -DeleteAgentPool1.google.storagetransfer.v1.DeleteAgentPoolRequest.google.protobuf.Empty"1ÚAname‚Óä“$*"/v1/{name=projects/*/agentPools/*}RÊAstoragetransfer.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBï -#com.google.storagetransfer.v1.protoB TransferProtoZMcloud.google.com/go/storagetransfer/apiv1/storagetransferpb;storagetransferpbøªGoogle.Cloud.StorageTransfer.V1ÊGoogle\\Cloud\\StorageTransfer\\V1ê"Google::Cloud::StorageTransfer::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/TransferTypes.php b/owl-bot-staging/StorageTransfer/v1/proto/src/GPBMetadata/Google/Storagetransfer/V1/TransferTypes.php deleted file mode 100644 index 120c424a099b5abc02951e4accf72f15d3591f64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10789 zcmb_iPjlNyb{`3nEImq;1j{z9@z^x%osnl|shCc7r{wX>f+Qr-qDT%w+0m9#2t+m| zj6nhcK-t`>sZ^yZxuj|@x#X5pE;;23N`WP!?yA#j&owOO+Rov^MnPSIq;Ej^X&O%^tTa=T;>r5~yDy;2rr`DNwW_6g_ z={UndAm4!{Q~YVLzG>OHsr=N&f-D30!{hH+CorsTZkooF*RZI*_mPqL{vI32>zoyT z81LAK$T(|B`kgv0KZI4EbkwSny5X2%L9p z5U2h3X;^9Sy_B6n7Xykj@Z~+&=vxDWj%hI4bbZz}dLhwEck-uYD@1D_x`K*j?rsue7SLAo7gxxyK-PTk zCv7BCJo+p;^F@~{#Ep=wX-1yh<_gSvj?E0y8}RKckTrH}XV~p|&LA+l4jTG^t7w7v zr{qTyP|^^>Oj6=QyZz z%fn#ecq4IAC5O_wJz;;*_3`+j{L>WN=C)Htu!9baW_5)XMf^NWVMLo}gRbjfJ`i>* zPMd`}kDXxb;9j*LZ$rj^Ve~`9!}XFWZl>s0e{sH{2q@vbFT+w7od|v1IkV6ul>eE9 zwaaMb24u`(a7t^QIwD$Ti(5Bbv7n*|TplIJIxKnY&xRNZDBdxf8%ehK^-V>#gphrb zA%6$+JYgZ~MhI4Xp)pB-eAc_{*D$tf93buu}Q}F$H`K_tb;- zuCcGRcN-PspsqKya&^0^RaQQd^Y9=(slL?>y}DCZ+XpSpc=LxVQ&&(FSEdyo7AKVR z3EXdK-yLXr+t_bZv|3`xPeGZSep79=57e5m+tAxu#n9V_H4PVj0J%xJri!N!v(w7= zu$d0>y5--PCcp`*7#dIXvKNxD~1vv%p%diU(7h z)x@!G!!n;~lwND)wr;#BqRC-5wp&FX2NnjOF&SO-y!;%VCCD)8_65k z#EA-x=s0hYU#`GP6xa<%oH?|KH0z3jdZ;Dk0G1}jK7{qg8?E)WRmBT`yQ|d`x4r}m zmFo7k*3#;2y!Hi{t!qe+mkuze*50az`ii9d<2)=z+t*#zkzc~nNyj&M7U2q~<7bLW z%JDH+A?%=(8)IMM>}e-WBxw}$3YO3Jz*`CY+OM~ZDY*nP;W$jF;uJ!HfXYu( z&cX9MW%u1F`CC{yMSL+Kfg(hv_#{O_1W8c94y?viA@-2Hu`;IQLwG0v*fHWZBSLEN zlM(1kM+=wXKHTG5_#{*mwQ>ZynK)?Ns~P(TeHk_GT8 zy3e{6VO)M>+X>646)x^NW;u=MYE{G)1EFVFvxP30hG8$1dFaXG5+m|tQQM^1cjR7C zyu;m$r67*CdI*_v%ltTLyNSf?hb&k}+>HVmg=7(Ad6rv6VGEeo*T{j5SP15`GR>AU zupn#*NlHtQi5XPs0j&SD=9T}>z;Yrw$z{0ZkNS2LptHqdip?aL3%cM$x1S;87y`#M z^qZ7GU=bsibb@t1d1bTf(^+v`i7RJ1EOiy4*f$d1ZF7jhMz4flo`zpM?%od;D z;Bxo+yggHcMcy63DiVFUn_J+w^ott^qBa9IXo#DDVq`S;;I@9aU#r&l68R4yVKkxd zRhyUs*I*?YX|^<7YrWABD1HMo+G#Gidcmu{xin^6-Z=22utz51UJGf z8Vs4U0Q9SVuwSA)tRN>@4|3vv7ddJ0oRfZyIh!Dn=^&?CPGWBb9@1b1%YrJ_7u81H zC>@mdv^EZHs|Pg#1E?FKiJjsSghDGZh-ts8Mv zTib8qQCo*t8r70Ffd-bC4=)Aly~M=%sT2d|Ld!?~y?x!-(+(3V#QH3nNL3yhW<(cT zz=llBBdCaLSNHL*2P7Ful4OKVF2dKe)gXYmxpTf$8{DYmX zaW)pslE0jWdA)PWxn2TXYfRQs( z#QC(QtMYeKkkQUCC+h(Qtp2$AjJ2d+!aYV5s2U;(HALGAn`>!()?dMc31;@ewZvl! zKUk=O6bZ`jX3>1YN3++?F?HY0yR8^kGTrbEi&|8?Xr{{ZyvXBAEXd!$(iqD4SUvFk zc}2rCT9#KEui^H<3C7KF!e>3}B$vVLkSYE=y2CI(MoZyKN1-0$!bUtY$-jcE?VOxY zu^5UGaC;*~OieI^68;G0BkK#{VH(&UTl&|q7{87X%YB-%Y}`0r!5kWKF!aO3pLXg< zcX(yI=`i%=U%(R2sd!Q1@~KgrDW+V$XjFU)cVoSJ0jh-nQBGVb02k)9^>|@Q>DO5J z6S!lezhj%wap`@T__^&ZBL9N23v<-Wz?0ntnYtMV$<%`l46Uw~YS_S-;thqrxE3EF&T1Jec10KjFO)L z2s(QB;vpcfjse!KVS>anurkG};d?V2r zlz*N(kHlr_)ickRAH)5qZ_>jtd=EMAa`4?s*igTBJVLGGQ%RD5Z&7{<4<=!bcep{_l`#0tr?EOfnrPMp)SS12Y_hWs|@3D2wK_2DV1?A7L1bNGlsn+RvaR)m!6phdfo9cni zLl45dC`?H-5!&Yr;lC&V&C&!ujvgS#oQ$m({Q%!%>lJzgyH)zHDR_cC@04hZwNBua zmLkni)b@Y9&p+IVxac+P#Mw-QYWnyJKX6Qpy2mdsjQsD^)IUr=5+6bp%JfMH-X8x_ zGFr9p=J~%y6h}v#&^4yIew-WpN&63`%-*f Y82cKLBB0f|tKYNKa6aWAK diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php deleted file mode 100644 index f7d504146c20..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool.php +++ /dev/null @@ -1,187 +0,0 @@ -google.storagetransfer.v1.AgentPool - */ -class AgentPool extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specifies a unique string that identifies the agent pool. - * Format: `projects/{project_id}/agentPools/{agent_pool_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Specifies the client-specified AgentPool description. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * Output only. Specifies the state of the AgentPool. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Specifies the bandwidth limit details. If this field is unspecified, the - * default value is set as 'No Limit'. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool.BandwidthLimit bandwidth_limit = 5; - */ - protected $bandwidth_limit = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Specifies a unique string that identifies the agent pool. - * Format: `projects/{project_id}/agentPools/{agent_pool_id}` - * @type string $display_name - * Specifies the client-specified AgentPool description. - * @type int $state - * Output only. Specifies the state of the AgentPool. - * @type \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit $bandwidth_limit - * Specifies the bandwidth limit details. If this field is unspecified, the - * default value is set as 'No Limit'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specifies a unique string that identifies the agent pool. - * Format: `projects/{project_id}/agentPools/{agent_pool_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Specifies a unique string that identifies the agent pool. - * Format: `projects/{project_id}/agentPools/{agent_pool_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Specifies the client-specified AgentPool description. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Specifies the client-specified AgentPool description. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Specifies the state of the AgentPool. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Specifies the state of the AgentPool. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\AgentPool\State::class); - $this->state = $var; - - return $this; - } - - /** - * Specifies the bandwidth limit details. If this field is unspecified, the - * default value is set as 'No Limit'. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool.BandwidthLimit bandwidth_limit = 5; - * @return \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit|null - */ - public function getBandwidthLimit() - { - return $this->bandwidth_limit; - } - - public function hasBandwidthLimit() - { - return isset($this->bandwidth_limit); - } - - public function clearBandwidthLimit() - { - unset($this->bandwidth_limit); - } - - /** - * Specifies the bandwidth limit details. If this field is unspecified, the - * default value is set as 'No Limit'. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool.BandwidthLimit bandwidth_limit = 5; - * @param \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit $var - * @return $this - */ - public function setBandwidthLimit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool\BandwidthLimit::class); - $this->bandwidth_limit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php deleted file mode 100644 index efbd0af7ea7f..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/BandwidthLimit.php +++ /dev/null @@ -1,74 +0,0 @@ -google.storagetransfer.v1.AgentPool.BandwidthLimit - */ -class BandwidthLimit extends \Google\Protobuf\Internal\Message -{ - /** - * Bandwidth rate in megabytes per second, distributed across all the agents - * in the pool. - * - * Generated from protobuf field int64 limit_mbps = 1; - */ - protected $limit_mbps = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $limit_mbps - * Bandwidth rate in megabytes per second, distributed across all the agents - * in the pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Bandwidth rate in megabytes per second, distributed across all the agents - * in the pool. - * - * Generated from protobuf field int64 limit_mbps = 1; - * @return int|string - */ - public function getLimitMbps() - { - return $this->limit_mbps; - } - - /** - * Bandwidth rate in megabytes per second, distributed across all the agents - * in the pool. - * - * Generated from protobuf field int64 limit_mbps = 1; - * @param int|string $var - * @return $this - */ - public function setLimitMbps($var) - { - GPBUtil::checkInt64($var); - $this->limit_mbps = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BandwidthLimit::class, \Google\Cloud\StorageTransfer\V1\AgentPool_BandwidthLimit::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php deleted file mode 100644 index 3677f8fd9b0d..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AgentPool/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.storagetransfer.v1.AgentPool.State - */ -class State -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * This is an initialization state. During this stage, resources are - * allocated for the AgentPool. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Determines that the AgentPool is created for use. At this state, Agents - * can join the AgentPool and participate in the transfer jobs in that pool. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * Determines that the AgentPool deletion has been initiated, and all the - * resources are scheduled to be cleaned up and freed. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\StorageTransfer\V1\AgentPool_State::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php deleted file mode 100644 index 9a5486d994d5..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsAccessKey.php +++ /dev/null @@ -1,109 +0,0 @@ -google.storagetransfer.v1.AwsAccessKey - */ -class AwsAccessKey extends \Google\Protobuf\Internal\Message -{ - /** - * Required. AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $access_key_id = ''; - /** - * Required. AWS secret access key. This field is not returned in RPC - * responses. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $secret_access_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_key_id - * Required. AWS access key ID. - * @type string $secret_access_key - * Required. AWS secret access key. This field is not returned in RPC - * responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAccessKeyId() - { - return $this->access_key_id; - } - - /** - * Required. AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAccessKeyId($var) - { - GPBUtil::checkString($var, True); - $this->access_key_id = $var; - - return $this; - } - - /** - * Required. AWS secret access key. This field is not returned in RPC - * responses. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSecretAccessKey() - { - return $this->secret_access_key; - } - - /** - * Required. AWS secret access key. This field is not returned in RPC - * responses. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSecretAccessKey($var) - { - GPBUtil::checkString($var, True); - $this->secret_access_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php deleted file mode 100644 index 18827d4e76a6..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3CompatibleData.php +++ /dev/null @@ -1,227 +0,0 @@ -google.storagetransfer.v1.AwsS3CompatibleData - */ -class AwsS3CompatibleData extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specifies the name of the bucket. - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket_name = ''; - /** - * Specifies the root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This - * field is treated as an object prefix. As such, it should generally not - * begin with a '/'. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - /** - * Required. Specifies the endpoint of the storage service. - * - * Generated from protobuf field string endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint = ''; - /** - * Specifies the region to sign requests with. This can be left blank if - * requests should be signed with an empty region. - * - * Generated from protobuf field string region = 5; - */ - protected $region = ''; - protected $data_provider; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket_name - * Required. Specifies the name of the bucket. - * @type string $path - * Specifies the root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This - * field is treated as an object prefix. As such, it should generally not - * begin with a '/'. - * @type string $endpoint - * Required. Specifies the endpoint of the storage service. - * @type string $region - * Specifies the region to sign requests with. This can be left blank if - * requests should be signed with an empty region. - * @type \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata $s3_metadata - * A S3 compatible metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specifies the name of the bucket. - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucketName() - { - return $this->bucket_name; - } - - /** - * Required. Specifies the name of the bucket. - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucketName($var) - { - GPBUtil::checkString($var, True); - $this->bucket_name = $var; - - return $this; - } - - /** - * Specifies the root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This - * field is treated as an object prefix. As such, it should generally not - * begin with a '/'. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Specifies the root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This - * field is treated as an object prefix. As such, it should generally not - * begin with a '/'. - * - * Generated from protobuf field string path = 2; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Required. Specifies the endpoint of the storage service. - * - * Generated from protobuf field string endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * Required. Specifies the endpoint of the storage service. - * - * Generated from protobuf field string endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - - /** - * Specifies the region to sign requests with. This can be left blank if - * requests should be signed with an empty region. - * - * Generated from protobuf field string region = 5; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Specifies the region to sign requests with. This can be left blank if - * requests should be signed with an empty region. - * - * Generated from protobuf field string region = 5; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * A S3 compatible metadata. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata s3_metadata = 4; - * @return \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata|null - */ - public function getS3Metadata() - { - return $this->readOneof(4); - } - - public function hasS3Metadata() - { - return $this->hasOneof(4); - } - - /** - * A S3 compatible metadata. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata s3_metadata = 4; - * @param \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata $var - * @return $this - */ - public function setS3Metadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getDataProvider() - { - return $this->whichOneof("data_provider"); - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php deleted file mode 100644 index 21d2a93d42e6..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AwsS3Data.php +++ /dev/null @@ -1,445 +0,0 @@ -google.storagetransfer.v1.AwsS3Data - */ -class AwsS3Data extends \Google\Protobuf\Internal\Message -{ - /** - * Required. S3 Bucket name (see - * [Creating a - * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket_name = ''; - /** - * Input only. AWS access key used to sign the API requests to the AWS S3 - * bucket. Permissions on the bucket must be granted to the access ID of the - * AWS access key. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * - * Generated from protobuf field .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $aws_access_key = null; - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * - * Generated from protobuf field string path = 3; - */ - protected $path = ''; - /** - * The Amazon Resource Name (ARN) of the role to support temporary - * credentials via `AssumeRoleWithWebIdentity`. For more information about - * ARNs, see [IAM - * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). - * When a role ARN is provided, Transfer Service fetches temporary - * credentials for the session using a `AssumeRoleWithWebIdentity` call for - * the provided role using the - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for - * this project. - * - * Generated from protobuf field string role_arn = 4; - */ - protected $role_arn = ''; - /** - * Optional. The CloudFront distribution domain name pointing to this bucket, - * to use when fetching. - * See - * [Transfer from S3 via - * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) - * for more information. - * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must - * begin with `https://`. - * - * Generated from protobuf field string cloudfront_domain = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloudfront_domain = ''; - /** - * Optional. The Resource name of a secret in Secret Manager. - * AWS credentials must be stored in Secret Manager in JSON format: - * { - * "access_key_id": "ACCESS_KEY_ID", - * "secret_access_key": "SECRET_ACCESS_KEY" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Amazon S3] - * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or - * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * - * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $credentials_secret = ''; - protected $private_network; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket_name - * Required. S3 Bucket name (see - * [Creating a - * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). - * @type \Google\Cloud\StorageTransfer\V1\AwsAccessKey $aws_access_key - * Input only. AWS access key used to sign the API requests to the AWS S3 - * bucket. Permissions on the bucket must be granted to the access ID of the - * AWS access key. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * @type string $path - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * @type string $role_arn - * The Amazon Resource Name (ARN) of the role to support temporary - * credentials via `AssumeRoleWithWebIdentity`. For more information about - * ARNs, see [IAM - * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). - * When a role ARN is provided, Transfer Service fetches temporary - * credentials for the session using a `AssumeRoleWithWebIdentity` call for - * the provided role using the - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for - * this project. - * @type string $cloudfront_domain - * Optional. The CloudFront distribution domain name pointing to this bucket, - * to use when fetching. - * See - * [Transfer from S3 via - * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) - * for more information. - * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must - * begin with `https://`. - * @type string $credentials_secret - * Optional. The Resource name of a secret in Secret Manager. - * AWS credentials must be stored in Secret Manager in JSON format: - * { - * "access_key_id": "ACCESS_KEY_ID", - * "secret_access_key": "SECRET_ACCESS_KEY" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Amazon S3] - * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or - * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * @type bool $managed_private_network - * Egress bytes over a Google-managed private network. - * This network is shared between other users of Storage Transfer Service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. S3 Bucket name (see - * [Creating a - * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucketName() - { - return $this->bucket_name; - } - - /** - * Required. S3 Bucket name (see - * [Creating a - * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucketName($var) - { - GPBUtil::checkString($var, True); - $this->bucket_name = $var; - - return $this; - } - - /** - * Input only. AWS access key used to sign the API requests to the AWS S3 - * bucket. Permissions on the bucket must be granted to the access ID of the - * AWS access key. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * - * Generated from protobuf field .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\StorageTransfer\V1\AwsAccessKey|null - */ - public function getAwsAccessKey() - { - return $this->aws_access_key; - } - - public function hasAwsAccessKey() - { - return isset($this->aws_access_key); - } - - public function clearAwsAccessKey() - { - unset($this->aws_access_key); - } - - /** - * Input only. AWS access key used to sign the API requests to the AWS S3 - * bucket. Permissions on the bucket must be granted to the access ID of the - * AWS access key. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * - * Generated from protobuf field .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\StorageTransfer\V1\AwsAccessKey $var - * @return $this - */ - public function setAwsAccessKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AwsAccessKey::class); - $this->aws_access_key = $var; - - return $this; - } - - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * - * Generated from protobuf field string path = 3; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * - * Generated from protobuf field string path = 3; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * The Amazon Resource Name (ARN) of the role to support temporary - * credentials via `AssumeRoleWithWebIdentity`. For more information about - * ARNs, see [IAM - * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). - * When a role ARN is provided, Transfer Service fetches temporary - * credentials for the session using a `AssumeRoleWithWebIdentity` call for - * the provided role using the - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for - * this project. - * - * Generated from protobuf field string role_arn = 4; - * @return string - */ - public function getRoleArn() - { - return $this->role_arn; - } - - /** - * The Amazon Resource Name (ARN) of the role to support temporary - * credentials via `AssumeRoleWithWebIdentity`. For more information about - * ARNs, see [IAM - * ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). - * When a role ARN is provided, Transfer Service fetches temporary - * credentials for the session using a `AssumeRoleWithWebIdentity` call for - * the provided role using the - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] for - * this project. - * - * Generated from protobuf field string role_arn = 4; - * @param string $var - * @return $this - */ - public function setRoleArn($var) - { - GPBUtil::checkString($var, True); - $this->role_arn = $var; - - return $this; - } - - /** - * Optional. The CloudFront distribution domain name pointing to this bucket, - * to use when fetching. - * See - * [Transfer from S3 via - * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) - * for more information. - * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must - * begin with `https://`. - * - * Generated from protobuf field string cloudfront_domain = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCloudfrontDomain() - { - return $this->cloudfront_domain; - } - - /** - * Optional. The CloudFront distribution domain name pointing to this bucket, - * to use when fetching. - * See - * [Transfer from S3 via - * CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) - * for more information. - * Format: `https://{id}.cloudfront.net` or any valid custom domain. Must - * begin with `https://`. - * - * Generated from protobuf field string cloudfront_domain = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCloudfrontDomain($var) - { - GPBUtil::checkString($var, True); - $this->cloudfront_domain = $var; - - return $this; - } - - /** - * Optional. The Resource name of a secret in Secret Manager. - * AWS credentials must be stored in Secret Manager in JSON format: - * { - * "access_key_id": "ACCESS_KEY_ID", - * "secret_access_key": "SECRET_ACCESS_KEY" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Amazon S3] - * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or - * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * - * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCredentialsSecret() - { - return $this->credentials_secret; - } - - /** - * Optional. The Resource name of a secret in Secret Manager. - * AWS credentials must be stored in Secret Manager in JSON format: - * { - * "access_key_id": "ACCESS_KEY_ID", - * "secret_access_key": "SECRET_ACCESS_KEY" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Amazon S3] - * (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [role_arn][google.storagetransfer.v1.AwsS3Data.role_arn] or - * [aws_access_key][google.storagetransfer.v1.AwsS3Data.aws_access_key]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * - * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCredentialsSecret($var) - { - GPBUtil::checkString($var, True); - $this->credentials_secret = $var; - - return $this; - } - - /** - * Egress bytes over a Google-managed private network. - * This network is shared between other users of Storage Transfer Service. - * - * Generated from protobuf field bool managed_private_network = 8; - * @return bool - */ - public function getManagedPrivateNetwork() - { - return $this->readOneof(8); - } - - public function hasManagedPrivateNetwork() - { - return $this->hasOneof(8); - } - - /** - * Egress bytes over a Google-managed private network. - * This network is shared between other users of Storage Transfer Service. - * - * Generated from protobuf field bool managed_private_network = 8; - * @param bool $var - * @return $this - */ - public function setManagedPrivateNetwork($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getPrivateNetwork() - { - return $this->whichOneof("private_network"); - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php deleted file mode 100644 index 24b3b9fab1b2..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureBlobStorageData.php +++ /dev/null @@ -1,291 +0,0 @@ -google.storagetransfer.v1.AzureBlobStorageData - */ -class AzureBlobStorageData extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Azure Storage account. - * - * Generated from protobuf field string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $storage_account = ''; - /** - * Required. Input only. Credentials used to authenticate API requests to - * Azure. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * - * Generated from protobuf field .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $azure_credentials = null; - /** - * Required. The container to transfer from the Azure Storage account. - * - * Generated from protobuf field string container = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $container = ''; - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * - * Generated from protobuf field string path = 5; - */ - protected $path = ''; - /** - * Optional. The Resource name of a secret in Secret Manager. - * The Azure SAS token must be stored in Secret Manager in JSON format: - * { - * "sas_token" : "SAS_TOKEN" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Microsoft Azure Blob Storage] - * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * - * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $credentials_secret = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $storage_account - * Required. The name of the Azure Storage account. - * @type \Google\Cloud\StorageTransfer\V1\AzureCredentials $azure_credentials - * Required. Input only. Credentials used to authenticate API requests to - * Azure. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * @type string $container - * Required. The container to transfer from the Azure Storage account. - * @type string $path - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * @type string $credentials_secret - * Optional. The Resource name of a secret in Secret Manager. - * The Azure SAS token must be stored in Secret Manager in JSON format: - * { - * "sas_token" : "SAS_TOKEN" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Microsoft Azure Blob Storage] - * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Azure Storage account. - * - * Generated from protobuf field string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStorageAccount() - { - return $this->storage_account; - } - - /** - * Required. The name of the Azure Storage account. - * - * Generated from protobuf field string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStorageAccount($var) - { - GPBUtil::checkString($var, True); - $this->storage_account = $var; - - return $this; - } - - /** - * Required. Input only. Credentials used to authenticate API requests to - * Azure. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * - * Generated from protobuf field .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\StorageTransfer\V1\AzureCredentials|null - */ - public function getAzureCredentials() - { - return $this->azure_credentials; - } - - public function hasAzureCredentials() - { - return isset($this->azure_credentials); - } - - public function clearAzureCredentials() - { - unset($this->azure_credentials); - } - - /** - * Required. Input only. Credentials used to authenticate API requests to - * Azure. - * For information on our data retention policy for user credentials, see - * [User credentials](/storage-transfer/docs/data-retention#user-credentials). - * - * Generated from protobuf field .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\StorageTransfer\V1\AzureCredentials $var - * @return $this - */ - public function setAzureCredentials($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AzureCredentials::class); - $this->azure_credentials = $var; - - return $this; - } - - /** - * Required. The container to transfer from the Azure Storage account. - * - * Generated from protobuf field string container = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getContainer() - { - return $this->container; - } - - /** - * Required. The container to transfer from the Azure Storage account. - * - * Generated from protobuf field string container = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkString($var, True); - $this->container = $var; - - return $this; - } - - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * - * Generated from protobuf field string path = 5; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * - * Generated from protobuf field string path = 5; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Optional. The Resource name of a secret in Secret Manager. - * The Azure SAS token must be stored in Secret Manager in JSON format: - * { - * "sas_token" : "SAS_TOKEN" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Microsoft Azure Blob Storage] - * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * - * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCredentialsSecret() - { - return $this->credentials_secret; - } - - /** - * Optional. The Resource name of a secret in Secret Manager. - * The Azure SAS token must be stored in Secret Manager in JSON format: - * { - * "sas_token" : "SAS_TOKEN" - * } - * [GoogleServiceAccount][google.storagetransfer.v1.GoogleServiceAccount] must - * be granted `roles/secretmanager.secretAccessor` for the resource. - * See [Configure access to a source: Microsoft Azure Blob Storage] - * (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) - * for more information. - * If `credentials_secret` is specified, do not specify - * [azure_credentials][google.storagetransfer.v1.AzureBlobStorageData.azure_credentials]. - * Format: `projects/{project_number}/secrets/{secret_name}` - * - * Generated from protobuf field string credentials_secret = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCredentialsSecret($var) - { - GPBUtil::checkString($var, True); - $this->credentials_secret = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php deleted file mode 100644 index 3195617e14c0..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/AzureCredentials.php +++ /dev/null @@ -1,85 +0,0 @@ -google.storagetransfer.v1.AzureCredentials - */ -class AzureCredentials extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Azure shared access signature (SAS). - * For more information about SAS, see - * [Grant limited access to Azure Storage resources using shared access - * signatures - * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). - * - * Generated from protobuf field string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sas_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sas_token - * Required. Azure shared access signature (SAS). - * For more information about SAS, see - * [Grant limited access to Azure Storage resources using shared access - * signatures - * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. Azure shared access signature (SAS). - * For more information about SAS, see - * [Grant limited access to Azure Storage resources using shared access - * signatures - * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). - * - * Generated from protobuf field string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSasToken() - { - return $this->sas_token; - } - - /** - * Required. Azure shared access signature (SAS). - * For more information about SAS, see - * [Grant limited access to Azure Storage resources using shared access - * signatures - * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). - * - * Generated from protobuf field string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSasToken($var) - { - GPBUtil::checkString($var, True); - $this->sas_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php deleted file mode 100644 index 24da653a69be..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateAgentPoolRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.storagetransfer.v1.CreateAgentPoolRequest - */ -class CreateAgentPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud project that owns the - * agent pool. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The agent pool to create. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent_pool = null; - /** - * Required. The ID of the agent pool to create. - * The `agent_pool_id` must meet the following requirements: - * * Length of 128 characters or less. - * * Not start with the string `goog`. - * * Start with a lowercase ASCII character, followed by: - * * Zero or more: lowercase Latin alphabet characters, numerals, - * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - * * One or more numerals or lowercase ASCII characters. - * As expressed by the regular expression: - * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. - * - * Generated from protobuf field string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent_pool_id = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud project that owns the - * agent pool. - * @param \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool Required. The agent pool to create. - * @param string $agentPoolId Required. The ID of the agent pool to create. - * - * The `agent_pool_id` must meet the following requirements: - * - * * Length of 128 characters or less. - * * Not start with the string `goog`. - * * Start with a lowercase ASCII character, followed by: - * * Zero or more: lowercase Latin alphabet characters, numerals, - * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - * * One or more numerals or lowercase ASCII characters. - * - * As expressed by the regular expression: - * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. - * - * @return \Google\Cloud\StorageTransfer\V1\CreateAgentPoolRequest - * - * @experimental - */ - public static function build(string $projectId, \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool, string $agentPoolId): self - { - return (new self()) - ->setProjectId($projectId) - ->setAgentPool($agentPool) - ->setAgentPoolId($agentPoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud project that owns the - * agent pool. - * @type \Google\Cloud\StorageTransfer\V1\AgentPool $agent_pool - * Required. The agent pool to create. - * @type string $agent_pool_id - * Required. The ID of the agent pool to create. - * The `agent_pool_id` must meet the following requirements: - * * Length of 128 characters or less. - * * Not start with the string `goog`. - * * Start with a lowercase ASCII character, followed by: - * * Zero or more: lowercase Latin alphabet characters, numerals, - * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - * * One or more numerals or lowercase ASCII characters. - * As expressed by the regular expression: - * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud project that owns the - * agent pool. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * agent pool. - * - * 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 agent pool to create. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\StorageTransfer\V1\AgentPool|null - */ - public function getAgentPool() - { - return $this->agent_pool; - } - - public function hasAgentPool() - { - return isset($this->agent_pool); - } - - public function clearAgentPool() - { - unset($this->agent_pool); - } - - /** - * Required. The agent pool to create. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\StorageTransfer\V1\AgentPool $var - * @return $this - */ - public function setAgentPool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool::class); - $this->agent_pool = $var; - - return $this; - } - - /** - * Required. The ID of the agent pool to create. - * The `agent_pool_id` must meet the following requirements: - * * Length of 128 characters or less. - * * Not start with the string `goog`. - * * Start with a lowercase ASCII character, followed by: - * * Zero or more: lowercase Latin alphabet characters, numerals, - * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - * * One or more numerals or lowercase ASCII characters. - * As expressed by the regular expression: - * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. - * - * Generated from protobuf field string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAgentPoolId() - { - return $this->agent_pool_id; - } - - /** - * Required. The ID of the agent pool to create. - * The `agent_pool_id` must meet the following requirements: - * * Length of 128 characters or less. - * * Not start with the string `goog`. - * * Start with a lowercase ASCII character, followed by: - * * Zero or more: lowercase Latin alphabet characters, numerals, - * hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - * * One or more numerals or lowercase ASCII characters. - * As expressed by the regular expression: - * `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. - * - * Generated from protobuf field string agent_pool_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAgentPoolId($var) - { - GPBUtil::checkString($var, True); - $this->agent_pool_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php deleted file mode 100644 index b1164d786f1b..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/CreateTransferJobRequest.php +++ /dev/null @@ -1,77 +0,0 @@ -google.storagetransfer.v1.CreateTransferJobRequest - */ -class CreateTransferJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The job to create. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transfer_job = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\StorageTransfer\V1\TransferJob $transfer_job - * Required. The job to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The job to create. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\StorageTransfer\V1\TransferJob|null - */ - public function getTransferJob() - { - return $this->transfer_job; - } - - public function hasTransferJob() - { - return isset($this->transfer_job); - } - - public function clearTransferJob() - { - unset($this->transfer_job); - } - - /** - * Required. The job to create. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\StorageTransfer\V1\TransferJob $var - * @return $this - */ - public function setTransferJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferJob::class); - $this->transfer_job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php deleted file mode 100644 index 85ac4ce5034c..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteAgentPoolRequest.php +++ /dev/null @@ -1,80 +0,0 @@ -google.storagetransfer.v1.DeleteAgentPoolRequest - */ -class DeleteAgentPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent pool to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the agent pool to delete. - * - * @return \Google\Cloud\StorageTransfer\V1\DeleteAgentPoolRequest - * - * @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 agent pool to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent pool to delete. - * - * 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 agent pool to delete. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php deleted file mode 100644 index 3dde1ab00126..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/DeleteTransferJobRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storagetransfer.v1.DeleteTransferJobRequest - */ -class DeleteTransferJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The job to delete. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_name = ''; - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_name - * Required. The job to delete. - * @type string $project_id - * Required. The ID of the Google Cloud project that owns the - * job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The job to delete. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobName() - { - return $this->job_name; - } - - /** - * Required. The job to delete. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobName($var) - { - GPBUtil::checkString($var, True); - $this->job_name = $var; - - return $this; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php deleted file mode 100644 index 08f96dd976ca..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorLogEntry.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storagetransfer.v1.ErrorLogEntry - */ -class ErrorLogEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A URL that refers to the target (a data source, a data sink, - * or an object) with which the error is associated. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $url = ''; - /** - * A list of messages that carry the error details. - * - * Generated from protobuf field repeated string error_details = 3; - */ - private $error_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Required. A URL that refers to the target (a data source, a data sink, - * or an object) with which the error is associated. - * @type array|\Google\Protobuf\Internal\RepeatedField $error_details - * A list of messages that carry the error details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. A URL that refers to the target (a data source, a data sink, - * or an object) with which the error is associated. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Required. A URL that refers to the target (a data source, a data sink, - * or an object) with which the error is associated. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * A list of messages that carry the error details. - * - * Generated from protobuf field repeated string error_details = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorDetails() - { - return $this->error_details; - } - - /** - * A list of messages that carry the error details. - * - * Generated from protobuf field repeated string error_details = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->error_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php deleted file mode 100644 index fff660e9c4ce..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ErrorSummary.php +++ /dev/null @@ -1,144 +0,0 @@ -google.storagetransfer.v1.ErrorSummary - */ -class ErrorSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Required. - * - * Generated from protobuf field .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $error_code = 0; - /** - * Required. Count of this type of error. - * - * Generated from protobuf field int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $error_count = 0; - /** - * Error samples. - * At most 5 error log entries are recorded for a given - * error code for a single transfer operation. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; - */ - private $error_log_entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $error_code - * Required. - * @type int|string $error_count - * Required. Count of this type of error. - * @type array<\Google\Cloud\StorageTransfer\V1\ErrorLogEntry>|\Google\Protobuf\Internal\RepeatedField $error_log_entries - * Error samples. - * At most 5 error log entries are recorded for a given - * error code for a single transfer operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. - * - * Generated from protobuf field .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getErrorCode() - { - return $this->error_code; - } - - /** - * Required. - * - * Generated from protobuf field .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setErrorCode($var) - { - GPBUtil::checkEnum($var, \Google\Rpc\Code::class); - $this->error_code = $var; - - return $this; - } - - /** - * Required. Count of this type of error. - * - * Generated from protobuf field int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getErrorCount() - { - return $this->error_count; - } - - /** - * Required. Count of this type of error. - * - * Generated from protobuf field int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setErrorCount($var) - { - GPBUtil::checkInt64($var); - $this->error_count = $var; - - return $this; - } - - /** - * Error samples. - * At most 5 error log entries are recorded for a given - * error code for a single transfer operation. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorLogEntries() - { - return $this->error_log_entries; - } - - /** - * Error samples. - * At most 5 error log entries are recorded for a given - * error code for a single transfer operation. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; - * @param array<\Google\Cloud\StorageTransfer\V1\ErrorLogEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorLogEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\ErrorLogEntry::class); - $this->error_log_entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php deleted file mode 100644 index 787bd47f1925..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/EventStream.php +++ /dev/null @@ -1,188 +0,0 @@ -google.storagetransfer.v1.EventStream - */ -class EventStream extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specifies a unique name of the resource such as AWS SQS - * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', - * or Pub/Sub subscription resource name in the form - * 'projects/{project}/subscriptions/{sub}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Specifies the date and time that Storage Transfer Service starts - * listening for events from this stream. If no start time is specified or - * start time is in the past, Storage Transfer Service starts listening - * immediately. - * - * Generated from protobuf field .google.protobuf.Timestamp event_stream_start_time = 2; - */ - protected $event_stream_start_time = null; - /** - * Specifies the data and time at which Storage Transfer Service stops - * listening for events from this stream. After this time, any transfers in - * progress will complete, but no new transfers are initiated. - * - * Generated from protobuf field .google.protobuf.Timestamp event_stream_expiration_time = 3; - */ - protected $event_stream_expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Specifies a unique name of the resource such as AWS SQS - * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', - * or Pub/Sub subscription resource name in the form - * 'projects/{project}/subscriptions/{sub}'. - * @type \Google\Protobuf\Timestamp $event_stream_start_time - * Specifies the date and time that Storage Transfer Service starts - * listening for events from this stream. If no start time is specified or - * start time is in the past, Storage Transfer Service starts listening - * immediately. - * @type \Google\Protobuf\Timestamp $event_stream_expiration_time - * Specifies the data and time at which Storage Transfer Service stops - * listening for events from this stream. After this time, any transfers in - * progress will complete, but no new transfers are initiated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specifies a unique name of the resource such as AWS SQS - * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', - * or Pub/Sub subscription resource name in the form - * 'projects/{project}/subscriptions/{sub}'. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Specifies a unique name of the resource such as AWS SQS - * ARN in the form 'arn:aws:sqs:region:account_id:queue_name', - * or Pub/Sub subscription resource name in the form - * 'projects/{project}/subscriptions/{sub}'. - * - * 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; - } - - /** - * Specifies the date and time that Storage Transfer Service starts - * listening for events from this stream. If no start time is specified or - * start time is in the past, Storage Transfer Service starts listening - * immediately. - * - * Generated from protobuf field .google.protobuf.Timestamp event_stream_start_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventStreamStartTime() - { - return $this->event_stream_start_time; - } - - public function hasEventStreamStartTime() - { - return isset($this->event_stream_start_time); - } - - public function clearEventStreamStartTime() - { - unset($this->event_stream_start_time); - } - - /** - * Specifies the date and time that Storage Transfer Service starts - * listening for events from this stream. If no start time is specified or - * start time is in the past, Storage Transfer Service starts listening - * immediately. - * - * Generated from protobuf field .google.protobuf.Timestamp event_stream_start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventStreamStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_stream_start_time = $var; - - return $this; - } - - /** - * Specifies the data and time at which Storage Transfer Service stops - * listening for events from this stream. After this time, any transfers in - * progress will complete, but no new transfers are initiated. - * - * Generated from protobuf field .google.protobuf.Timestamp event_stream_expiration_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventStreamExpirationTime() - { - return $this->event_stream_expiration_time; - } - - public function hasEventStreamExpirationTime() - { - return isset($this->event_stream_expiration_time); - } - - public function clearEventStreamExpirationTime() - { - unset($this->event_stream_expiration_time); - } - - /** - * Specifies the data and time at which Storage Transfer Service stops - * listening for events from this stream. After this time, any transfers in - * progress will complete, but no new transfers are initiated. - * - * Generated from protobuf field .google.protobuf.Timestamp event_stream_expiration_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventStreamExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_stream_expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php deleted file mode 100644 index ff79b3646040..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GcsData.php +++ /dev/null @@ -1,198 +0,0 @@ -google.storagetransfer.v1.GcsData - */ -class GcsData extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Cloud Storage bucket name. Must meet - * [Bucket Name Requirements](/storage/docs/naming#requirements). - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket_name = ''; - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * The root path value must meet - * [Object Name Requirements](/storage/docs/naming#objectnames). - * - * Generated from protobuf field string path = 3; - */ - protected $path = ''; - /** - * Preview. Enables the transfer of managed folders between Cloud Storage - * buckets. Set this option on the gcs_data_source. - * If set to true: - * - Managed folders in the source bucket are transferred to the - * destination bucket. - * - Managed folders in the destination bucket are overwritten. Other - * OVERWRITE options are not supported. - * See - * [Transfer Cloud Storage managed - * folders](/storage-transfer/docs/managed-folders). - * - * Generated from protobuf field bool managed_folder_transfer_enabled = 4; - */ - protected $managed_folder_transfer_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket_name - * Required. Cloud Storage bucket name. Must meet - * [Bucket Name Requirements](/storage/docs/naming#requirements). - * @type string $path - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * The root path value must meet - * [Object Name Requirements](/storage/docs/naming#objectnames). - * @type bool $managed_folder_transfer_enabled - * Preview. Enables the transfer of managed folders between Cloud Storage - * buckets. Set this option on the gcs_data_source. - * If set to true: - * - Managed folders in the source bucket are transferred to the - * destination bucket. - * - Managed folders in the destination bucket are overwritten. Other - * OVERWRITE options are not supported. - * See - * [Transfer Cloud Storage managed - * folders](/storage-transfer/docs/managed-folders). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. Cloud Storage bucket name. Must meet - * [Bucket Name Requirements](/storage/docs/naming#requirements). - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucketName() - { - return $this->bucket_name; - } - - /** - * Required. Cloud Storage bucket name. Must meet - * [Bucket Name Requirements](/storage/docs/naming#requirements). - * - * Generated from protobuf field string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucketName($var) - { - GPBUtil::checkString($var, True); - $this->bucket_name = $var; - - return $this; - } - - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * The root path value must meet - * [Object Name Requirements](/storage/docs/naming#objectnames). - * - * Generated from protobuf field string path = 3; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Root path to transfer objects. - * Must be an empty string or full path name that ends with a '/'. This field - * is treated as an object prefix. As such, it should generally not begin with - * a '/'. - * The root path value must meet - * [Object Name Requirements](/storage/docs/naming#objectnames). - * - * Generated from protobuf field string path = 3; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Preview. Enables the transfer of managed folders between Cloud Storage - * buckets. Set this option on the gcs_data_source. - * If set to true: - * - Managed folders in the source bucket are transferred to the - * destination bucket. - * - Managed folders in the destination bucket are overwritten. Other - * OVERWRITE options are not supported. - * See - * [Transfer Cloud Storage managed - * folders](/storage-transfer/docs/managed-folders). - * - * Generated from protobuf field bool managed_folder_transfer_enabled = 4; - * @return bool - */ - public function getManagedFolderTransferEnabled() - { - return $this->managed_folder_transfer_enabled; - } - - /** - * Preview. Enables the transfer of managed folders between Cloud Storage - * buckets. Set this option on the gcs_data_source. - * If set to true: - * - Managed folders in the source bucket are transferred to the - * destination bucket. - * - Managed folders in the destination bucket are overwritten. Other - * OVERWRITE options are not supported. - * See - * [Transfer Cloud Storage managed - * folders](/storage-transfer/docs/managed-folders). - * - * Generated from protobuf field bool managed_folder_transfer_enabled = 4; - * @param bool $var - * @return $this - */ - public function setManagedFolderTransferEnabled($var) - { - GPBUtil::checkBool($var); - $this->managed_folder_transfer_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php deleted file mode 100644 index f9c7e04c6591..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetAgentPoolRequest.php +++ /dev/null @@ -1,80 +0,0 @@ -google.storagetransfer.v1.GetAgentPoolRequest - */ -class GetAgentPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the agent pool to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the agent pool to get. - * - * @return \Google\Cloud\StorageTransfer\V1\GetAgentPoolRequest - * - * @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 agent pool to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the agent pool to get. - * - * 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 agent pool to get. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php deleted file mode 100644 index 78735764c2ea..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetGoogleServiceAccountRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.storagetransfer.v1.GetGoogleServiceAccountRequest - */ -class GetGoogleServiceAccountRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud project that the Google service - * account is associated with. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. The ID of the Google Cloud project that the Google service - * account is associated with. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud project that the Google service - * account is associated with. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that the Google service - * account is associated with. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php deleted file mode 100644 index c2efb03a573d..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GetTransferJobRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storagetransfer.v1.GetTransferJobRequest - */ -class GetTransferJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The job to get. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_name = ''; - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_name - * Required. The job to get. - * @type string $project_id - * Required. The ID of the Google Cloud project that owns the - * job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The job to get. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobName() - { - return $this->job_name; - } - - /** - * Required. The job to get. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobName($var) - { - GPBUtil::checkString($var, True); - $this->job_name = $var; - - return $this; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php deleted file mode 100644 index 82f7b9177e50..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/GoogleServiceAccount.php +++ /dev/null @@ -1,101 +0,0 @@ -google.storagetransfer.v1.GoogleServiceAccount - */ -class GoogleServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Email address of the service account. - * - * Generated from protobuf field string account_email = 1; - */ - protected $account_email = ''; - /** - * Unique identifier for the service account. - * - * Generated from protobuf field string subject_id = 2; - */ - protected $subject_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $account_email - * Email address of the service account. - * @type string $subject_id - * Unique identifier for the service account. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string account_email = 1; - * @return string - */ - public function getAccountEmail() - { - return $this->account_email; - } - - /** - * Email address of the service account. - * - * Generated from protobuf field string account_email = 1; - * @param string $var - * @return $this - */ - public function setAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->account_email = $var; - - return $this; - } - - /** - * Unique identifier for the service account. - * - * Generated from protobuf field string subject_id = 2; - * @return string - */ - public function getSubjectId() - { - return $this->subject_id; - } - - /** - * Unique identifier for the service account. - * - * Generated from protobuf field string subject_id = 2; - * @param string $var - * @return $this - */ - public function setSubjectId($var) - { - GPBUtil::checkString($var, True); - $this->subject_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php deleted file mode 100644 index 0f758e41c179..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HdfsData.php +++ /dev/null @@ -1,70 +0,0 @@ -google.storagetransfer.v1.HdfsData - */ -class HdfsData extends \Google\Protobuf\Internal\Message -{ - /** - * Root path to transfer files. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Root path to transfer files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Root path to transfer files. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Root path to transfer files. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php deleted file mode 100644 index add9daed9214..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/HttpData.php +++ /dev/null @@ -1,103 +0,0 @@ -` is - * transferred to a data sink, the name of the object at the data sink is - * `/`. - * * If the specified size of an object does not match the actual size of the - * object fetched, the object is not transferred. - * * If the specified MD5 does not match the MD5 computed from the transferred - * bytes, the object transfer fails. - * * Ensure that each URL you specify is publicly accessible. For - * example, in Cloud Storage you can - * [share an object publicly] - * (/storage/docs/cloud-console#_sharingdata) and get a link to it. - * * Storage Transfer Service obeys `robots.txt` rules and requires the source - * HTTP server to support `Range` requests and to return a `Content-Length` - * header in each response. - * * [ObjectConditions][google.storagetransfer.v1.ObjectConditions] have no - * effect when filtering objects to transfer. - * - * Generated from protobuf message google.storagetransfer.v1.HttpData - */ -class HttpData extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URL that points to the file that stores the object list - * entries. This file must allow public access. Currently, only URLs with - * HTTP and HTTPS schemes are supported. - * - * Generated from protobuf field string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $list_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $list_url - * Required. The URL that points to the file that stores the object list - * entries. This file must allow public access. Currently, only URLs with - * HTTP and HTTPS schemes are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URL that points to the file that stores the object list - * entries. This file must allow public access. Currently, only URLs with - * HTTP and HTTPS schemes are supported. - * - * Generated from protobuf field string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getListUrl() - { - return $this->list_url; - } - - /** - * Required. The URL that points to the file that stores the object list - * entries. This file must allow public access. Currently, only URLs with - * HTTP and HTTPS schemes are supported. - * - * Generated from protobuf field string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setListUrl($var) - { - GPBUtil::checkString($var, True); - $this->list_url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php deleted file mode 100644 index 28498058b27d..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.storagetransfer.v1.ListAgentPoolsRequest - */ -class ListAgentPoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the Google Cloud project that owns the job. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * An optional list of query parameters specified as JSON text in the - * form of: - * `{"agentPoolNames":["agentpool1","agentpool2",...]}` - * Since `agentPoolNames` support multiple values, its values must be - * specified with array notation. When the filter is either empty or not - * provided, the list returns all agent pools for the project. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The list page size. The max allowed value is `256`. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The list page token. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $projectId Required. The ID of the Google Cloud project that owns the job. - * - * @return \Google\Cloud\StorageTransfer\V1\ListAgentPoolsRequest - * - * @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. The ID of the Google Cloud project that owns the job. - * @type string $filter - * An optional list of query parameters specified as JSON text in the - * form of: - * `{"agentPoolNames":["agentpool1","agentpool2",...]}` - * Since `agentPoolNames` support multiple values, its values must be - * specified with array notation. When the filter is either empty or not - * provided, the list returns all agent pools for the project. - * @type int $page_size - * The list page size. The max allowed value is `256`. - * @type string $page_token - * The list page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the Google Cloud project that owns the job. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that owns the job. - * - * 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; - } - - /** - * An optional list of query parameters specified as JSON text in the - * form of: - * `{"agentPoolNames":["agentpool1","agentpool2",...]}` - * Since `agentPoolNames` support multiple values, its values must be - * specified with array notation. When the filter is either empty or not - * provided, the list returns all agent pools for the project. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An optional list of query parameters specified as JSON text in the - * form of: - * `{"agentPoolNames":["agentpool1","agentpool2",...]}` - * Since `agentPoolNames` support multiple values, its values must be - * specified with array notation. When the filter is either empty or not - * provided, the list returns all agent pools for the project. - * - * 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 list page size. The max allowed value is `256`. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The list page size. The max allowed value is `256`. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The list page token. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The list page token. - * - * 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/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php deleted file mode 100644 index d2c226f11f56..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListAgentPoolsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.storagetransfer.v1.ListAgentPoolsResponse - */ -class ListAgentPoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of agent pools. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.AgentPool agent_pools = 1; - */ - private $agent_pools; - /** - * The list next page token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\StorageTransfer\V1\AgentPool>|\Google\Protobuf\Internal\RepeatedField $agent_pools - * A list of agent pools. - * @type string $next_page_token - * The list next page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * A list of agent pools. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.AgentPool agent_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAgentPools() - { - return $this->agent_pools; - } - - /** - * A list of agent pools. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.AgentPool agent_pools = 1; - * @param array<\Google\Cloud\StorageTransfer\V1\AgentPool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAgentPools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\AgentPool::class); - $this->agent_pools = $arr; - - return $this; - } - - /** - * The list next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php deleted file mode 100644 index 1709bfb490ac..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsRequest.php +++ /dev/null @@ -1,176 +0,0 @@ -google.storagetransfer.v1.ListTransferJobsRequest - */ -class ListTransferJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of query parameters specified as JSON text in the form of: - * `{"projectId":"my_project_id", - * "jobNames":["jobid1","jobid2",...], - * "jobStatuses":["status1","status2",...]}` - * Since `jobNames` and `jobStatuses` support multiple values, their values - * must be specified with array notation. `projectId` is required. - * `jobNames` and `jobStatuses` are optional. The valid values for - * `jobStatuses` are case-insensitive: - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * The list page size. The max allowed value is 256. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * The list page token. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * Required. A list of query parameters specified as JSON text in the form of: - * `{"projectId":"my_project_id", - * "jobNames":["jobid1","jobid2",...], - * "jobStatuses":["status1","status2",...]}` - * Since `jobNames` and `jobStatuses` support multiple values, their values - * must be specified with array notation. `projectId` is required. - * `jobNames` and `jobStatuses` are optional. The valid values for - * `jobStatuses` are case-insensitive: - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. - * @type int $page_size - * The list page size. The max allowed value is 256. - * @type string $page_token - * The list page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of query parameters specified as JSON text in the form of: - * `{"projectId":"my_project_id", - * "jobNames":["jobid1","jobid2",...], - * "jobStatuses":["status1","status2",...]}` - * Since `jobNames` and `jobStatuses` support multiple values, their values - * must be specified with array notation. `projectId` is required. - * `jobNames` and `jobStatuses` are optional. The valid values for - * `jobStatuses` are case-insensitive: - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. A list of query parameters specified as JSON text in the form of: - * `{"projectId":"my_project_id", - * "jobNames":["jobid1","jobid2",...], - * "jobStatuses":["status1","status2",...]}` - * Since `jobNames` and `jobStatuses` support multiple values, their values - * must be specified with array notation. `projectId` is required. - * `jobNames` and `jobStatuses` are optional. The valid values for - * `jobStatuses` are case-insensitive: - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The list page size. The max allowed value is 256. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The list page size. The max allowed value is 256. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The list page token. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The list page token. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php deleted file mode 100644 index d90d034828db..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ListTransferJobsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.storagetransfer.v1.ListTransferJobsResponse - */ -class ListTransferJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of transfer jobs. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; - */ - private $transfer_jobs; - /** - * The list next page token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\StorageTransfer\V1\TransferJob>|\Google\Protobuf\Internal\RepeatedField $transfer_jobs - * A list of transfer jobs. - * @type string $next_page_token - * The list next page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * A list of transfer jobs. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransferJobs() - { - return $this->transfer_jobs; - } - - /** - * A list of transfer jobs. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; - * @param array<\Google\Cloud\StorageTransfer\V1\TransferJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransferJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\TransferJob::class); - $this->transfer_jobs = $arr; - - return $this; - } - - /** - * The list next page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php deleted file mode 100644 index 22f830828e9c..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig.php +++ /dev/null @@ -1,159 +0,0 @@ -google.storagetransfer.v1.LoggingConfig - */ -class LoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the actions to be logged. If empty, no logs are generated. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableAction log_actions = 1; - */ - private $log_actions; - /** - * States in which `log_actions` are logged. If empty, no logs are generated. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableActionState log_action_states = 2; - */ - private $log_action_states; - /** - * For PosixFilesystem transfers, enables - * [file system transfer - * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) - * instead of, or in addition to, Cloud Logging. - * This option ignores [LoggableAction] and [LoggableActionState]. If these - * are set, Cloud Logging will also be enabled for this transfer. - * - * Generated from protobuf field bool enable_onprem_gcs_transfer_logs = 3; - */ - protected $enable_onprem_gcs_transfer_logs = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $log_actions - * Specifies the actions to be logged. If empty, no logs are generated. - * @type array|\Google\Protobuf\Internal\RepeatedField $log_action_states - * States in which `log_actions` are logged. If empty, no logs are generated. - * @type bool $enable_onprem_gcs_transfer_logs - * For PosixFilesystem transfers, enables - * [file system transfer - * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) - * instead of, or in addition to, Cloud Logging. - * This option ignores [LoggableAction] and [LoggableActionState]. If these - * are set, Cloud Logging will also be enabled for this transfer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the actions to be logged. If empty, no logs are generated. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableAction log_actions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogActions() - { - return $this->log_actions; - } - - /** - * Specifies the actions to be logged. If empty, no logs are generated. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableAction log_actions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\StorageTransfer\V1\LoggingConfig\LoggableAction::class); - $this->log_actions = $arr; - - return $this; - } - - /** - * States in which `log_actions` are logged. If empty, no logs are generated. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableActionState log_action_states = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogActionStates() - { - return $this->log_action_states; - } - - /** - * States in which `log_actions` are logged. If empty, no logs are generated. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.LoggingConfig.LoggableActionState log_action_states = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogActionStates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\StorageTransfer\V1\LoggingConfig\LoggableActionState::class); - $this->log_action_states = $arr; - - return $this; - } - - /** - * For PosixFilesystem transfers, enables - * [file system transfer - * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) - * instead of, or in addition to, Cloud Logging. - * This option ignores [LoggableAction] and [LoggableActionState]. If these - * are set, Cloud Logging will also be enabled for this transfer. - * - * Generated from protobuf field bool enable_onprem_gcs_transfer_logs = 3; - * @return bool - */ - public function getEnableOnpremGcsTransferLogs() - { - return $this->enable_onprem_gcs_transfer_logs; - } - - /** - * For PosixFilesystem transfers, enables - * [file system transfer - * logs](https://cloud.google.com/storage-transfer/docs/on-prem-transfer-log-format) - * instead of, or in addition to, Cloud Logging. - * This option ignores [LoggableAction] and [LoggableActionState]. If these - * are set, Cloud Logging will also be enabled for this transfer. - * - * Generated from protobuf field bool enable_onprem_gcs_transfer_logs = 3; - * @param bool $var - * @return $this - */ - public function setEnableOnpremGcsTransferLogs($var) - { - GPBUtil::checkBool($var); - $this->enable_onprem_gcs_transfer_logs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php deleted file mode 100644 index dccfaae7ab3f..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableAction.php +++ /dev/null @@ -1,71 +0,0 @@ -google.storagetransfer.v1.LoggingConfig.LoggableAction - */ -class LoggableAction -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum LOGGABLE_ACTION_UNSPECIFIED = 0; - */ - const LOGGABLE_ACTION_UNSPECIFIED = 0; - /** - * Listing objects in a bucket. - * - * Generated from protobuf enum FIND = 1; - */ - const FIND = 1; - /** - * Deleting objects at the source or the destination. - * - * Generated from protobuf enum DELETE = 2; - */ - const DELETE = 2; - /** - * Copying objects to Google Cloud Storage. - * - * Generated from protobuf enum COPY = 3; - */ - const COPY = 3; - - private static $valueToName = [ - self::LOGGABLE_ACTION_UNSPECIFIED => 'LOGGABLE_ACTION_UNSPECIFIED', - self::FIND => 'FIND', - self::DELETE => 'DELETE', - self::COPY => 'COPY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoggableAction::class, \Google\Cloud\StorageTransfer\V1\LoggingConfig_LoggableAction::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php deleted file mode 100644 index 0547a7be29ad..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/LoggingConfig/LoggableActionState.php +++ /dev/null @@ -1,66 +0,0 @@ -google.storagetransfer.v1.LoggingConfig.LoggableActionState - */ -class LoggableActionState -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum LOGGABLE_ACTION_STATE_UNSPECIFIED = 0; - */ - const LOGGABLE_ACTION_STATE_UNSPECIFIED = 0; - /** - * `LoggableAction` completed successfully. `SUCCEEDED` actions are - * logged as [INFO][google.logging.type.LogSeverity.INFO]. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * `LoggableAction` terminated in an error state. `FAILED` actions are - * logged as [ERROR][google.logging.type.LogSeverity.ERROR]. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::LOGGABLE_ACTION_STATE_UNSPECIFIED => 'LOGGABLE_ACTION_STATE_UNSPECIFIED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoggableActionState::class, \Google\Cloud\StorageTransfer\V1\LoggingConfig_LoggableActionState::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php deleted file mode 100644 index e1c793ca7909..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions.php +++ /dev/null @@ -1,427 +0,0 @@ -google.storagetransfer.v1.MetadataOptions - */ -class MetadataOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how symlinks should be handled by the transfer. By default, - * symlinks are not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Symlink symlink = 1; - */ - protected $symlink = 0; - /** - * Specifies how each file's mode attribute should be handled by the transfer. - * By default, mode is not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Mode mode = 2; - */ - protected $mode = 0; - /** - * Specifies how each file's POSIX group ID (GID) attribute should be handled - * by the transfer. By default, GID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.GID gid = 3; - */ - protected $gid = 0; - /** - * Specifies how each file's POSIX user ID (UID) attribute should be handled - * by the transfer. By default, UID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.UID uid = 4; - */ - protected $uid = 0; - /** - * Specifies how each object's ACLs should be preserved for transfers between - * Google Cloud Storage buckets. If unspecified, the default behavior is the - * same as ACL_DESTINATION_BUCKET_DEFAULT. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Acl acl = 5; - */ - protected $acl = 0; - /** - * Specifies the storage class to set on objects being transferred to Google - * Cloud Storage buckets. If unspecified, the default behavior is the same as - * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.StorageClass storage_class = 6; - */ - protected $storage_class = 0; - /** - * Specifies how each object's temporary hold status should be preserved for - * transfers between Google Cloud Storage buckets. If unspecified, the - * default behavior is the same as - * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TemporaryHold temporary_hold = 7; - */ - protected $temporary_hold = 0; - /** - * Specifies how each object's Cloud KMS customer-managed encryption key - * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If - * unspecified, the default behavior is the same as - * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.KmsKey kms_key = 8; - */ - protected $kms_key = 0; - /** - * Specifies how each object's `timeCreated` metadata is preserved for - * transfers. If unspecified, the default behavior is the same as - * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. - * This behavior is supported for transfers to Cloud Storage buckets from - * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TimeCreated time_created = 9; - */ - protected $time_created = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $symlink - * Specifies how symlinks should be handled by the transfer. By default, - * symlinks are not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * @type int $mode - * Specifies how each file's mode attribute should be handled by the transfer. - * By default, mode is not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * @type int $gid - * Specifies how each file's POSIX group ID (GID) attribute should be handled - * by the transfer. By default, GID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * @type int $uid - * Specifies how each file's POSIX user ID (UID) attribute should be handled - * by the transfer. By default, UID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * @type int $acl - * Specifies how each object's ACLs should be preserved for transfers between - * Google Cloud Storage buckets. If unspecified, the default behavior is the - * same as ACL_DESTINATION_BUCKET_DEFAULT. - * @type int $storage_class - * Specifies the storage class to set on objects being transferred to Google - * Cloud Storage buckets. If unspecified, the default behavior is the same as - * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. - * @type int $temporary_hold - * Specifies how each object's temporary hold status should be preserved for - * transfers between Google Cloud Storage buckets. If unspecified, the - * default behavior is the same as - * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. - * @type int $kms_key - * Specifies how each object's Cloud KMS customer-managed encryption key - * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If - * unspecified, the default behavior is the same as - * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. - * @type int $time_created - * Specifies how each object's `timeCreated` metadata is preserved for - * transfers. If unspecified, the default behavior is the same as - * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. - * This behavior is supported for transfers to Cloud Storage buckets from - * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how symlinks should be handled by the transfer. By default, - * symlinks are not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Symlink symlink = 1; - * @return int - */ - public function getSymlink() - { - return $this->symlink; - } - - /** - * Specifies how symlinks should be handled by the transfer. By default, - * symlinks are not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Symlink symlink = 1; - * @param int $var - * @return $this - */ - public function setSymlink($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\Symlink::class); - $this->symlink = $var; - - return $this; - } - - /** - * Specifies how each file's mode attribute should be handled by the transfer. - * By default, mode is not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Mode mode = 2; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Specifies how each file's mode attribute should be handled by the transfer. - * By default, mode is not preserved. Only applicable to transfers involving - * POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Mode mode = 2; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Specifies how each file's POSIX group ID (GID) attribute should be handled - * by the transfer. By default, GID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.GID gid = 3; - * @return int - */ - public function getGid() - { - return $this->gid; - } - - /** - * Specifies how each file's POSIX group ID (GID) attribute should be handled - * by the transfer. By default, GID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.GID gid = 3; - * @param int $var - * @return $this - */ - public function setGid($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\GID::class); - $this->gid = $var; - - return $this; - } - - /** - * Specifies how each file's POSIX user ID (UID) attribute should be handled - * by the transfer. By default, UID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.UID uid = 4; - * @return int - */ - public function getUid() - { - return $this->uid; - } - - /** - * Specifies how each file's POSIX user ID (UID) attribute should be handled - * by the transfer. By default, UID is not preserved. Only applicable to - * transfers involving POSIX file systems, and ignored for other transfers. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.UID uid = 4; - * @param int $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\UID::class); - $this->uid = $var; - - return $this; - } - - /** - * Specifies how each object's ACLs should be preserved for transfers between - * Google Cloud Storage buckets. If unspecified, the default behavior is the - * same as ACL_DESTINATION_BUCKET_DEFAULT. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Acl acl = 5; - * @return int - */ - public function getAcl() - { - return $this->acl; - } - - /** - * Specifies how each object's ACLs should be preserved for transfers between - * Google Cloud Storage buckets. If unspecified, the default behavior is the - * same as ACL_DESTINATION_BUCKET_DEFAULT. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.Acl acl = 5; - * @param int $var - * @return $this - */ - public function setAcl($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\Acl::class); - $this->acl = $var; - - return $this; - } - - /** - * Specifies the storage class to set on objects being transferred to Google - * Cloud Storage buckets. If unspecified, the default behavior is the same as - * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.StorageClass storage_class = 6; - * @return int - */ - public function getStorageClass() - { - return $this->storage_class; - } - - /** - * Specifies the storage class to set on objects being transferred to Google - * Cloud Storage buckets. If unspecified, the default behavior is the same as - * [STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.StorageClass.STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.StorageClass storage_class = 6; - * @param int $var - * @return $this - */ - public function setStorageClass($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\StorageClass::class); - $this->storage_class = $var; - - return $this; - } - - /** - * Specifies how each object's temporary hold status should be preserved for - * transfers between Google Cloud Storage buckets. If unspecified, the - * default behavior is the same as - * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TemporaryHold temporary_hold = 7; - * @return int - */ - public function getTemporaryHold() - { - return $this->temporary_hold; - } - - /** - * Specifies how each object's temporary hold status should be preserved for - * transfers between Google Cloud Storage buckets. If unspecified, the - * default behavior is the same as - * [TEMPORARY_HOLD_PRESERVE][google.storagetransfer.v1.MetadataOptions.TemporaryHold.TEMPORARY_HOLD_PRESERVE]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TemporaryHold temporary_hold = 7; - * @param int $var - * @return $this - */ - public function setTemporaryHold($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\TemporaryHold::class); - $this->temporary_hold = $var; - - return $this; - } - - /** - * Specifies how each object's Cloud KMS customer-managed encryption key - * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If - * unspecified, the default behavior is the same as - * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.KmsKey kms_key = 8; - * @return int - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Specifies how each object's Cloud KMS customer-managed encryption key - * (CMEK) is preserved for transfers between Google Cloud Storage buckets. If - * unspecified, the default behavior is the same as - * [KMS_KEY_DESTINATION_BUCKET_DEFAULT][google.storagetransfer.v1.MetadataOptions.KmsKey.KMS_KEY_DESTINATION_BUCKET_DEFAULT]. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.KmsKey kms_key = 8; - * @param int $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\KmsKey::class); - $this->kms_key = $var; - - return $this; - } - - /** - * Specifies how each object's `timeCreated` metadata is preserved for - * transfers. If unspecified, the default behavior is the same as - * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. - * This behavior is supported for transfers to Cloud Storage buckets from - * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TimeCreated time_created = 9; - * @return int - */ - public function getTimeCreated() - { - return $this->time_created; - } - - /** - * Specifies how each object's `timeCreated` metadata is preserved for - * transfers. If unspecified, the default behavior is the same as - * [TIME_CREATED_SKIP][google.storagetransfer.v1.MetadataOptions.TimeCreated.TIME_CREATED_SKIP]. - * This behavior is supported for transfers to Cloud Storage buckets from - * Cloud Storage, Amazon S3, S3-compatible storage, and Azure sources. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions.TimeCreated time_created = 9; - * @param int $var - * @return $this - */ - public function setTimeCreated($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions\TimeCreated::class); - $this->time_created = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php deleted file mode 100644 index d9f42c4fe8d2..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Acl.php +++ /dev/null @@ -1,68 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.Acl - */ -class Acl -{ - /** - * ACL behavior is unspecified. - * - * Generated from protobuf enum ACL_UNSPECIFIED = 0; - */ - const ACL_UNSPECIFIED = 0; - /** - * Use the destination bucket's default object ACLS, if applicable. - * - * Generated from protobuf enum ACL_DESTINATION_BUCKET_DEFAULT = 1; - */ - const ACL_DESTINATION_BUCKET_DEFAULT = 1; - /** - * Preserve the object's original ACLs. This requires the service account - * to have `storage.objects.getIamPolicy` permission for the source object. - * [Uniform bucket-level - * access](https://cloud.google.com/storage/docs/uniform-bucket-level-access) - * must not be enabled on either the source or destination buckets. - * - * Generated from protobuf enum ACL_PRESERVE = 2; - */ - const ACL_PRESERVE = 2; - - private static $valueToName = [ - self::ACL_UNSPECIFIED => 'ACL_UNSPECIFIED', - self::ACL_DESTINATION_BUCKET_DEFAULT => 'ACL_DESTINATION_BUCKET_DEFAULT', - self::ACL_PRESERVE => 'ACL_PRESERVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Acl::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_Acl::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php deleted file mode 100644 index eca202bd832a..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/GID.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.GID - */ -class GID -{ - /** - * GID behavior is unspecified. - * - * Generated from protobuf enum GID_UNSPECIFIED = 0; - */ - const GID_UNSPECIFIED = 0; - /** - * Do not preserve GID during a transfer job. - * - * Generated from protobuf enum GID_SKIP = 1; - */ - const GID_SKIP = 1; - /** - * Preserve GID during a transfer job. - * - * Generated from protobuf enum GID_NUMBER = 2; - */ - const GID_NUMBER = 2; - - private static $valueToName = [ - self::GID_UNSPECIFIED => 'GID_UNSPECIFIED', - self::GID_SKIP => 'GID_SKIP', - self::GID_NUMBER => 'GID_NUMBER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GID::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_GID::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php deleted file mode 100644 index ff533f92928b..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/KmsKey.php +++ /dev/null @@ -1,66 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.KmsKey - */ -class KmsKey -{ - /** - * KmsKey behavior is unspecified. - * - * Generated from protobuf enum KMS_KEY_UNSPECIFIED = 0; - */ - const KMS_KEY_UNSPECIFIED = 0; - /** - * Use the destination bucket's default encryption settings. - * - * Generated from protobuf enum KMS_KEY_DESTINATION_BUCKET_DEFAULT = 1; - */ - const KMS_KEY_DESTINATION_BUCKET_DEFAULT = 1; - /** - * Preserve the object's original Cloud KMS customer-managed encryption key - * (CMEK) if present. Objects that do not use a Cloud KMS encryption key - * will be encrypted using the destination bucket's encryption settings. - * - * Generated from protobuf enum KMS_KEY_PRESERVE = 2; - */ - const KMS_KEY_PRESERVE = 2; - - private static $valueToName = [ - self::KMS_KEY_UNSPECIFIED => 'KMS_KEY_UNSPECIFIED', - self::KMS_KEY_DESTINATION_BUCKET_DEFAULT => 'KMS_KEY_DESTINATION_BUCKET_DEFAULT', - self::KMS_KEY_PRESERVE => 'KMS_KEY_PRESERVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KmsKey::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_KmsKey::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php deleted file mode 100644 index 4d56f1db1a4d..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Mode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.Mode - */ -class Mode -{ - /** - * Mode behavior is unspecified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Do not preserve mode during a transfer job. - * - * Generated from protobuf enum MODE_SKIP = 1; - */ - const MODE_SKIP = 1; - /** - * Preserve mode during a transfer job. - * - * Generated from protobuf enum MODE_PRESERVE = 2; - */ - const MODE_PRESERVE = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::MODE_SKIP => 'MODE_SKIP', - self::MODE_PRESERVE => 'MODE_PRESERVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_Mode::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php deleted file mode 100644 index 6a74f16c95fd..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/StorageClass.php +++ /dev/null @@ -1,95 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.StorageClass - */ -class StorageClass -{ - /** - * Storage class behavior is unspecified. - * - * Generated from protobuf enum STORAGE_CLASS_UNSPECIFIED = 0; - */ - const STORAGE_CLASS_UNSPECIFIED = 0; - /** - * Use the destination bucket's default storage class. - * - * Generated from protobuf enum STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT = 1; - */ - const STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT = 1; - /** - * Preserve the object's original storage class. This is only supported for - * transfers from Google Cloud Storage buckets. REGIONAL and MULTI_REGIONAL - * storage classes will be mapped to STANDARD to ensure they can be written - * to the destination bucket. - * - * Generated from protobuf enum STORAGE_CLASS_PRESERVE = 2; - */ - const STORAGE_CLASS_PRESERVE = 2; - /** - * Set the storage class to STANDARD. - * - * Generated from protobuf enum STORAGE_CLASS_STANDARD = 3; - */ - const STORAGE_CLASS_STANDARD = 3; - /** - * Set the storage class to NEARLINE. - * - * Generated from protobuf enum STORAGE_CLASS_NEARLINE = 4; - */ - const STORAGE_CLASS_NEARLINE = 4; - /** - * Set the storage class to COLDLINE. - * - * Generated from protobuf enum STORAGE_CLASS_COLDLINE = 5; - */ - const STORAGE_CLASS_COLDLINE = 5; - /** - * Set the storage class to ARCHIVE. - * - * Generated from protobuf enum STORAGE_CLASS_ARCHIVE = 6; - */ - const STORAGE_CLASS_ARCHIVE = 6; - - private static $valueToName = [ - self::STORAGE_CLASS_UNSPECIFIED => 'STORAGE_CLASS_UNSPECIFIED', - self::STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT => 'STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT', - self::STORAGE_CLASS_PRESERVE => 'STORAGE_CLASS_PRESERVE', - self::STORAGE_CLASS_STANDARD => 'STORAGE_CLASS_STANDARD', - self::STORAGE_CLASS_NEARLINE => 'STORAGE_CLASS_NEARLINE', - self::STORAGE_CLASS_COLDLINE => 'STORAGE_CLASS_COLDLINE', - self::STORAGE_CLASS_ARCHIVE => 'STORAGE_CLASS_ARCHIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StorageClass::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_StorageClass::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php deleted file mode 100644 index 31c5c5316361..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/Symlink.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.Symlink - */ -class Symlink -{ - /** - * Symlink behavior is unspecified. - * - * Generated from protobuf enum SYMLINK_UNSPECIFIED = 0; - */ - const SYMLINK_UNSPECIFIED = 0; - /** - * Do not preserve symlinks during a transfer job. - * - * Generated from protobuf enum SYMLINK_SKIP = 1; - */ - const SYMLINK_SKIP = 1; - /** - * Preserve symlinks during a transfer job. - * - * Generated from protobuf enum SYMLINK_PRESERVE = 2; - */ - const SYMLINK_PRESERVE = 2; - - private static $valueToName = [ - self::SYMLINK_UNSPECIFIED => 'SYMLINK_UNSPECIFIED', - self::SYMLINK_SKIP => 'SYMLINK_SKIP', - self::SYMLINK_PRESERVE => 'SYMLINK_PRESERVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Symlink::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_Symlink::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php deleted file mode 100644 index 35983ecf3759..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TemporaryHold.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.TemporaryHold - */ -class TemporaryHold -{ - /** - * Temporary hold behavior is unspecified. - * - * Generated from protobuf enum TEMPORARY_HOLD_UNSPECIFIED = 0; - */ - const TEMPORARY_HOLD_UNSPECIFIED = 0; - /** - * Do not set a temporary hold on the destination object. - * - * Generated from protobuf enum TEMPORARY_HOLD_SKIP = 1; - */ - const TEMPORARY_HOLD_SKIP = 1; - /** - * Preserve the object's original temporary hold status. - * - * Generated from protobuf enum TEMPORARY_HOLD_PRESERVE = 2; - */ - const TEMPORARY_HOLD_PRESERVE = 2; - - private static $valueToName = [ - self::TEMPORARY_HOLD_UNSPECIFIED => 'TEMPORARY_HOLD_UNSPECIFIED', - self::TEMPORARY_HOLD_SKIP => 'TEMPORARY_HOLD_SKIP', - self::TEMPORARY_HOLD_PRESERVE => 'TEMPORARY_HOLD_PRESERVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TemporaryHold::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_TemporaryHold::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php deleted file mode 100644 index 457c4b7faf2b..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/TimeCreated.php +++ /dev/null @@ -1,68 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.TimeCreated - */ -class TimeCreated -{ - /** - * TimeCreated behavior is unspecified. - * - * Generated from protobuf enum TIME_CREATED_UNSPECIFIED = 0; - */ - const TIME_CREATED_UNSPECIFIED = 0; - /** - * Do not preserve the `timeCreated` metadata from the source object. - * - * Generated from protobuf enum TIME_CREATED_SKIP = 1; - */ - const TIME_CREATED_SKIP = 1; - /** - * Preserves the source object's `timeCreated` or `lastModified` metadata in - * the `customTime` field in the destination object. Note that any value - * stored in the source object's `customTime` field will not be propagated - * to the destination object. - * - * Generated from protobuf enum TIME_CREATED_PRESERVE_AS_CUSTOM_TIME = 2; - */ - const TIME_CREATED_PRESERVE_AS_CUSTOM_TIME = 2; - - private static $valueToName = [ - self::TIME_CREATED_UNSPECIFIED => 'TIME_CREATED_UNSPECIFIED', - self::TIME_CREATED_SKIP => 'TIME_CREATED_SKIP', - self::TIME_CREATED_PRESERVE_AS_CUSTOM_TIME => 'TIME_CREATED_PRESERVE_AS_CUSTOM_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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeCreated::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_TimeCreated::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php deleted file mode 100644 index d0862a23bf76..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/MetadataOptions/UID.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.MetadataOptions.UID - */ -class UID -{ - /** - * UID behavior is unspecified. - * - * Generated from protobuf enum UID_UNSPECIFIED = 0; - */ - const UID_UNSPECIFIED = 0; - /** - * Do not preserve UID during a transfer job. - * - * Generated from protobuf enum UID_SKIP = 1; - */ - const UID_SKIP = 1; - /** - * Preserve UID during a transfer job. - * - * Generated from protobuf enum UID_NUMBER = 2; - */ - const UID_NUMBER = 2; - - private static $valueToName = [ - self::UID_UNSPECIFIED => 'UID_UNSPECIFIED', - self::UID_SKIP => 'UID_SKIP', - self::UID_NUMBER => 'UID_NUMBER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UID::class, \Google\Cloud\StorageTransfer\V1\MetadataOptions_UID::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php deleted file mode 100644 index 93dfdb45a9d1..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig.php +++ /dev/null @@ -1,170 +0,0 @@ -google.storagetransfer.v1.NotificationConfig - */ -class NotificationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `Topic.name` of the Pub/Sub topic to which to publish - * notifications. Must be of the format: `projects/{project}/topics/{topic}`. - * Not matching this format results in an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pubsub_topic = ''; - /** - * Event types for which a notification is desired. If empty, send - * notifications for all event types. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; - */ - private $event_types; - /** - * Required. The desired format of the notification message payloads. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $payload_format = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $pubsub_topic - * Required. The `Topic.name` of the Pub/Sub topic to which to publish - * notifications. Must be of the format: `projects/{project}/topics/{topic}`. - * Not matching this format results in an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * @type array|\Google\Protobuf\Internal\RepeatedField $event_types - * Event types for which a notification is desired. If empty, send - * notifications for all event types. - * @type int $payload_format - * Required. The desired format of the notification message payloads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `Topic.name` of the Pub/Sub topic to which to publish - * notifications. Must be of the format: `projects/{project}/topics/{topic}`. - * Not matching this format results in an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPubsubTopic() - { - return $this->pubsub_topic; - } - - /** - * Required. The `Topic.name` of the Pub/Sub topic to which to publish - * notifications. Must be of the format: `projects/{project}/topics/{topic}`. - * Not matching this format results in an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPubsubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pubsub_topic = $var; - - return $this; - } - - /** - * Event types for which a notification is desired. If empty, send - * notifications for all event types. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEventTypes() - { - return $this->event_types; - } - - /** - * Event types for which a notification is desired. If empty, send - * notifications for all event types. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEventTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\StorageTransfer\V1\NotificationConfig\EventType::class); - $this->event_types = $arr; - - return $this; - } - - /** - * Required. The desired format of the notification message payloads. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPayloadFormat() - { - return $this->payload_format; - } - - /** - * Required. The desired format of the notification message payloads. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPayloadFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\NotificationConfig\PayloadFormat::class); - $this->payload_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php deleted file mode 100644 index e6de4c39d41c..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/EventType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.storagetransfer.v1.NotificationConfig.EventType - */ -class EventType -{ - /** - * Illegal value, to avoid allowing a default. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * `TransferOperation` completed with status - * [SUCCESS][google.storagetransfer.v1.TransferOperation.Status.SUCCESS]. - * - * Generated from protobuf enum TRANSFER_OPERATION_SUCCESS = 1; - */ - const TRANSFER_OPERATION_SUCCESS = 1; - /** - * `TransferOperation` completed with status - * [FAILED][google.storagetransfer.v1.TransferOperation.Status.FAILED]. - * - * Generated from protobuf enum TRANSFER_OPERATION_FAILED = 2; - */ - const TRANSFER_OPERATION_FAILED = 2; - /** - * `TransferOperation` completed with status - * [ABORTED][google.storagetransfer.v1.TransferOperation.Status.ABORTED]. - * - * Generated from protobuf enum TRANSFER_OPERATION_ABORTED = 3; - */ - const TRANSFER_OPERATION_ABORTED = 3; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::TRANSFER_OPERATION_SUCCESS => 'TRANSFER_OPERATION_SUCCESS', - self::TRANSFER_OPERATION_FAILED => 'TRANSFER_OPERATION_FAILED', - self::TRANSFER_OPERATION_ABORTED => 'TRANSFER_OPERATION_ABORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\StorageTransfer\V1\NotificationConfig_EventType::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php deleted file mode 100644 index 4e63909f0ac1..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/NotificationConfig/PayloadFormat.php +++ /dev/null @@ -1,66 +0,0 @@ -google.storagetransfer.v1.NotificationConfig.PayloadFormat - */ -class PayloadFormat -{ - /** - * Illegal value, to avoid allowing a default. - * - * Generated from protobuf enum PAYLOAD_FORMAT_UNSPECIFIED = 0; - */ - const PAYLOAD_FORMAT_UNSPECIFIED = 0; - /** - * No payload is included with the notification. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * `TransferOperation` is [formatted as a JSON - * response](https://developers.google.com/protocol-buffers/docs/proto3#json), - * in application/json. - * - * Generated from protobuf enum JSON = 2; - */ - const JSON = 2; - - private static $valueToName = [ - self::PAYLOAD_FORMAT_UNSPECIFIED => 'PAYLOAD_FORMAT_UNSPECIFIED', - self::NONE => 'NONE', - self::JSON => 'JSON', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PayloadFormat::class, \Google\Cloud\StorageTransfer\V1\NotificationConfig_PayloadFormat::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php deleted file mode 100644 index b979bf3b0bd6..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ObjectConditions.php +++ /dev/null @@ -1,560 +0,0 @@ -google.storagetransfer.v1.ObjectConditions - */ -class ObjectConditions extends \Google\Protobuf\Internal\Message -{ - /** - * Ensures that objects are not transferred until a specific minimum time - * has elapsed after the "last modification time". When a - * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, - * objects with a "last modification time" are transferred only if the elapsed - * time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation` and the "last modification time" of the object is equal - * to or greater than the value of min_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * - * Generated from protobuf field .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; - */ - protected $min_time_elapsed_since_last_modification = null; - /** - * Ensures that objects are not transferred if a specific maximum time - * has elapsed since the "last modification time". - * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] - * begins, objects with a "last modification time" are transferred only if the - * elapsed time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation`and the "last modification time" of the object - * is less than the value of max_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * - * Generated from protobuf field .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; - */ - protected $max_time_elapsed_since_last_modification = null; - /** - * If you specify `include_prefixes`, Storage Transfer Service uses the items - * in the `include_prefixes` array to determine which objects to include in a - * transfer. Objects must start with one of the matching `include_prefixes` - * for inclusion in the transfer. If - * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] - * is specified, objects must not start with any of the `exclude_prefixes` - * specified for inclusion in the transfer. - * The following are requirements of `include_prefixes`: - * * Each include-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each include-prefix must omit the leading slash. For example, to - * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the include-prefix as `logs/y=2015/requests.gz`. - * * None of the include-prefix values can be empty, if specified. - * * Each include-prefix must include a distinct portion of the object - * namespace. No include-prefix may be a prefix of another - * include-prefix. - * The max size of `include_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * - * Generated from protobuf field repeated string include_prefixes = 3; - */ - private $include_prefixes; - /** - * If you specify `exclude_prefixes`, Storage Transfer Service uses the items - * in the `exclude_prefixes` array to determine which objects to exclude from - * a transfer. Objects must not start with one of the matching - * `exclude_prefixes` for inclusion in a transfer. - * The following are requirements of `exclude_prefixes`: - * * Each exclude-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each exclude-prefix must omit the leading slash. For example, to - * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the exclude-prefix as `logs/y=2015/requests.gz`. - * * None of the exclude-prefix values can be empty, if specified. - * * Each exclude-prefix must exclude a distinct portion of the object - * namespace. No exclude-prefix may be a prefix of another - * exclude-prefix. - * * If - * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] - * is specified, then each exclude-prefix must start with the value of a - * path explicitly included by `include_prefixes`. - * The max size of `exclude_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * - * Generated from protobuf field repeated string exclude_prefixes = 4; - */ - private $exclude_prefixes; - /** - * If specified, only objects with a "last modification time" on or after - * this timestamp and objects that don't have a "last modification time" are - * transferred. - * The `last_modified_since` and `last_modified_before` fields can be used - * together for chunked data processing. For example, consider a script that - * processes each day's worth of data at a time. For that you'd set each - * of the fields as follows: - * * `last_modified_since` to the start of the day - * * `last_modified_before` to the end of the day - * - * Generated from protobuf field .google.protobuf.Timestamp last_modified_since = 5; - */ - protected $last_modified_since = null; - /** - * If specified, only objects with a "last modification time" before this - * timestamp and objects that don't have a "last modification time" are - * transferred. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modified_before = 6; - */ - protected $last_modified_before = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $min_time_elapsed_since_last_modification - * Ensures that objects are not transferred until a specific minimum time - * has elapsed after the "last modification time". When a - * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, - * objects with a "last modification time" are transferred only if the elapsed - * time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation` and the "last modification time" of the object is equal - * to or greater than the value of min_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * @type \Google\Protobuf\Duration $max_time_elapsed_since_last_modification - * Ensures that objects are not transferred if a specific maximum time - * has elapsed since the "last modification time". - * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] - * begins, objects with a "last modification time" are transferred only if the - * elapsed time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation`and the "last modification time" of the object - * is less than the value of max_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_prefixes - * If you specify `include_prefixes`, Storage Transfer Service uses the items - * in the `include_prefixes` array to determine which objects to include in a - * transfer. Objects must start with one of the matching `include_prefixes` - * for inclusion in the transfer. If - * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] - * is specified, objects must not start with any of the `exclude_prefixes` - * specified for inclusion in the transfer. - * The following are requirements of `include_prefixes`: - * * Each include-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each include-prefix must omit the leading slash. For example, to - * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the include-prefix as `logs/y=2015/requests.gz`. - * * None of the include-prefix values can be empty, if specified. - * * Each include-prefix must include a distinct portion of the object - * namespace. No include-prefix may be a prefix of another - * include-prefix. - * The max size of `include_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_prefixes - * If you specify `exclude_prefixes`, Storage Transfer Service uses the items - * in the `exclude_prefixes` array to determine which objects to exclude from - * a transfer. Objects must not start with one of the matching - * `exclude_prefixes` for inclusion in a transfer. - * The following are requirements of `exclude_prefixes`: - * * Each exclude-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each exclude-prefix must omit the leading slash. For example, to - * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the exclude-prefix as `logs/y=2015/requests.gz`. - * * None of the exclude-prefix values can be empty, if specified. - * * Each exclude-prefix must exclude a distinct portion of the object - * namespace. No exclude-prefix may be a prefix of another - * exclude-prefix. - * * If - * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] - * is specified, then each exclude-prefix must start with the value of a - * path explicitly included by `include_prefixes`. - * The max size of `exclude_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * @type \Google\Protobuf\Timestamp $last_modified_since - * If specified, only objects with a "last modification time" on or after - * this timestamp and objects that don't have a "last modification time" are - * transferred. - * The `last_modified_since` and `last_modified_before` fields can be used - * together for chunked data processing. For example, consider a script that - * processes each day's worth of data at a time. For that you'd set each - * of the fields as follows: - * * `last_modified_since` to the start of the day - * * `last_modified_before` to the end of the day - * @type \Google\Protobuf\Timestamp $last_modified_before - * If specified, only objects with a "last modification time" before this - * timestamp and objects that don't have a "last modification time" are - * transferred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Ensures that objects are not transferred until a specific minimum time - * has elapsed after the "last modification time". When a - * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, - * objects with a "last modification time" are transferred only if the elapsed - * time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation` and the "last modification time" of the object is equal - * to or greater than the value of min_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * - * Generated from protobuf field .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getMinTimeElapsedSinceLastModification() - { - return $this->min_time_elapsed_since_last_modification; - } - - public function hasMinTimeElapsedSinceLastModification() - { - return isset($this->min_time_elapsed_since_last_modification); - } - - public function clearMinTimeElapsedSinceLastModification() - { - unset($this->min_time_elapsed_since_last_modification); - } - - /** - * Ensures that objects are not transferred until a specific minimum time - * has elapsed after the "last modification time". When a - * [TransferOperation][google.storagetransfer.v1.TransferOperation] begins, - * objects with a "last modification time" are transferred only if the elapsed - * time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation` and the "last modification time" of the object is equal - * to or greater than the value of min_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * - * Generated from protobuf field .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinTimeElapsedSinceLastModification($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_time_elapsed_since_last_modification = $var; - - return $this; - } - - /** - * Ensures that objects are not transferred if a specific maximum time - * has elapsed since the "last modification time". - * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] - * begins, objects with a "last modification time" are transferred only if the - * elapsed time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation`and the "last modification time" of the object - * is less than the value of max_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * - * Generated from protobuf field .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxTimeElapsedSinceLastModification() - { - return $this->max_time_elapsed_since_last_modification; - } - - public function hasMaxTimeElapsedSinceLastModification() - { - return isset($this->max_time_elapsed_since_last_modification); - } - - public function clearMaxTimeElapsedSinceLastModification() - { - unset($this->max_time_elapsed_since_last_modification); - } - - /** - * Ensures that objects are not transferred if a specific maximum time - * has elapsed since the "last modification time". - * When a [TransferOperation][google.storagetransfer.v1.TransferOperation] - * begins, objects with a "last modification time" are transferred only if the - * elapsed time between the - * [start_time][google.storagetransfer.v1.TransferOperation.start_time] of the - * `TransferOperation`and the "last modification time" of the object - * is less than the value of max_time_elapsed_since_last_modification`. - * Objects that do not have a "last modification time" are also transferred. - * - * Generated from protobuf field .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxTimeElapsedSinceLastModification($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_time_elapsed_since_last_modification = $var; - - return $this; - } - - /** - * If you specify `include_prefixes`, Storage Transfer Service uses the items - * in the `include_prefixes` array to determine which objects to include in a - * transfer. Objects must start with one of the matching `include_prefixes` - * for inclusion in the transfer. If - * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] - * is specified, objects must not start with any of the `exclude_prefixes` - * specified for inclusion in the transfer. - * The following are requirements of `include_prefixes`: - * * Each include-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each include-prefix must omit the leading slash. For example, to - * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the include-prefix as `logs/y=2015/requests.gz`. - * * None of the include-prefix values can be empty, if specified. - * * Each include-prefix must include a distinct portion of the object - * namespace. No include-prefix may be a prefix of another - * include-prefix. - * The max size of `include_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * - * Generated from protobuf field repeated string include_prefixes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludePrefixes() - { - return $this->include_prefixes; - } - - /** - * If you specify `include_prefixes`, Storage Transfer Service uses the items - * in the `include_prefixes` array to determine which objects to include in a - * transfer. Objects must start with one of the matching `include_prefixes` - * for inclusion in the transfer. If - * [exclude_prefixes][google.storagetransfer.v1.ObjectConditions.exclude_prefixes] - * is specified, objects must not start with any of the `exclude_prefixes` - * specified for inclusion in the transfer. - * The following are requirements of `include_prefixes`: - * * Each include-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each include-prefix must omit the leading slash. For example, to - * include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the include-prefix as `logs/y=2015/requests.gz`. - * * None of the include-prefix values can be empty, if specified. - * * Each include-prefix must include a distinct portion of the object - * namespace. No include-prefix may be a prefix of another - * include-prefix. - * The max size of `include_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * - * Generated from protobuf field repeated string include_prefixes = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludePrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_prefixes = $arr; - - return $this; - } - - /** - * If you specify `exclude_prefixes`, Storage Transfer Service uses the items - * in the `exclude_prefixes` array to determine which objects to exclude from - * a transfer. Objects must not start with one of the matching - * `exclude_prefixes` for inclusion in a transfer. - * The following are requirements of `exclude_prefixes`: - * * Each exclude-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each exclude-prefix must omit the leading slash. For example, to - * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the exclude-prefix as `logs/y=2015/requests.gz`. - * * None of the exclude-prefix values can be empty, if specified. - * * Each exclude-prefix must exclude a distinct portion of the object - * namespace. No exclude-prefix may be a prefix of another - * exclude-prefix. - * * If - * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] - * is specified, then each exclude-prefix must start with the value of a - * path explicitly included by `include_prefixes`. - * The max size of `exclude_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * - * Generated from protobuf field repeated string exclude_prefixes = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludePrefixes() - { - return $this->exclude_prefixes; - } - - /** - * If you specify `exclude_prefixes`, Storage Transfer Service uses the items - * in the `exclude_prefixes` array to determine which objects to exclude from - * a transfer. Objects must not start with one of the matching - * `exclude_prefixes` for inclusion in a transfer. - * The following are requirements of `exclude_prefixes`: - * * Each exclude-prefix can contain any sequence of Unicode characters, to - * a max length of 1024 bytes when UTF8-encoded, and must not contain - * Carriage Return or Line Feed characters. Wildcard matching and regular - * expression matching are not supported. - * * Each exclude-prefix must omit the leading slash. For example, to - * exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, - * specify the exclude-prefix as `logs/y=2015/requests.gz`. - * * None of the exclude-prefix values can be empty, if specified. - * * Each exclude-prefix must exclude a distinct portion of the object - * namespace. No exclude-prefix may be a prefix of another - * exclude-prefix. - * * If - * [include_prefixes][google.storagetransfer.v1.ObjectConditions.include_prefixes] - * is specified, then each exclude-prefix must start with the value of a - * path explicitly included by `include_prefixes`. - * The max size of `exclude_prefixes` is 1000. - * For more information, see [Filtering objects from - * transfers](/storage-transfer/docs/filtering-objects-from-transfers). - * - * Generated from protobuf field repeated string exclude_prefixes = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludePrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_prefixes = $arr; - - return $this; - } - - /** - * If specified, only objects with a "last modification time" on or after - * this timestamp and objects that don't have a "last modification time" are - * transferred. - * The `last_modified_since` and `last_modified_before` fields can be used - * together for chunked data processing. For example, consider a script that - * processes each day's worth of data at a time. For that you'd set each - * of the fields as follows: - * * `last_modified_since` to the start of the day - * * `last_modified_before` to the end of the day - * - * Generated from protobuf field .google.protobuf.Timestamp last_modified_since = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastModifiedSince() - { - return $this->last_modified_since; - } - - public function hasLastModifiedSince() - { - return isset($this->last_modified_since); - } - - public function clearLastModifiedSince() - { - unset($this->last_modified_since); - } - - /** - * If specified, only objects with a "last modification time" on or after - * this timestamp and objects that don't have a "last modification time" are - * transferred. - * The `last_modified_since` and `last_modified_before` fields can be used - * together for chunked data processing. For example, consider a script that - * processes each day's worth of data at a time. For that you'd set each - * of the fields as follows: - * * `last_modified_since` to the start of the day - * * `last_modified_before` to the end of the day - * - * Generated from protobuf field .google.protobuf.Timestamp last_modified_since = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastModifiedSince($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_modified_since = $var; - - return $this; - } - - /** - * If specified, only objects with a "last modification time" before this - * timestamp and objects that don't have a "last modification time" are - * transferred. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modified_before = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastModifiedBefore() - { - return $this->last_modified_before; - } - - public function hasLastModifiedBefore() - { - return isset($this->last_modified_before); - } - - public function clearLastModifiedBefore() - { - unset($this->last_modified_before); - } - - /** - * If specified, only objects with a "last modification time" before this - * timestamp and objects that don't have a "last modification time" are - * transferred. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modified_before = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastModifiedBefore($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_modified_before = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php deleted file mode 100644 index 2c1d3fd5061c..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PauseTransferOperationRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.storagetransfer.v1.PauseTransferOperationRequest - */ -class PauseTransferOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the transfer operation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the transfer operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the transfer operation. - * - * 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 transfer operation. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php deleted file mode 100644 index 9548f9724538..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/PosixFilesystem.php +++ /dev/null @@ -1,67 +0,0 @@ -google.storagetransfer.v1.PosixFilesystem - */ -class PosixFilesystem extends \Google\Protobuf\Internal\Message -{ - /** - * Root directory path to the filesystem. - * - * Generated from protobuf field string root_directory = 1; - */ - protected $root_directory = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $root_directory - * Root directory path to the filesystem. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Root directory path to the filesystem. - * - * Generated from protobuf field string root_directory = 1; - * @return string - */ - public function getRootDirectory() - { - return $this->root_directory; - } - - /** - * Root directory path to the filesystem. - * - * Generated from protobuf field string root_directory = 1; - * @param string $var - * @return $this - */ - public function setRootDirectory($var) - { - GPBUtil::checkString($var, True); - $this->root_directory = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php deleted file mode 100644 index b3eec9a2595b..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/ResumeTransferOperationRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.storagetransfer.v1.ResumeTransferOperationRequest - */ -class ResumeTransferOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the transfer operation. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the transfer operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the transfer operation. - * - * 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 transfer operation. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php deleted file mode 100644 index c38e28cd7784..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/RunTransferJobRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storagetransfer.v1.RunTransferJobRequest - */ -class RunTransferJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the transfer job. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_name = ''; - /** - * Required. The ID of the Google Cloud project that owns the transfer - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_name - * Required. The name of the transfer job. - * @type string $project_id - * Required. The ID of the Google Cloud project that owns the transfer - * job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the transfer job. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobName() - { - return $this->job_name; - } - - /** - * Required. The name of the transfer job. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobName($var) - { - GPBUtil::checkString($var, True); - $this->job_name = $var; - - return $this; - } - - /** - * Required. The ID of the Google Cloud project that owns the transfer - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that owns the transfer - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php deleted file mode 100644 index 701406b66fc8..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata.php +++ /dev/null @@ -1,194 +0,0 @@ -google.storagetransfer.v1.S3CompatibleMetadata - */ -class S3CompatibleMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the authentication and authorization method used by the storage - * service. When not specified, Transfer Service will attempt to determine - * right auth method to use. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1; - */ - protected $auth_method = 0; - /** - * Specifies the API request model used to call the storage service. When not - * specified, the default value of RequestModel - * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2; - */ - protected $request_model = 0; - /** - * Specifies the network protocol of the agent. When not specified, the - * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3; - */ - protected $protocol = 0; - /** - * The Listing API to use for discovering objects. When not specified, - * Transfer Service will attempt to determine the right API to use. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4; - */ - protected $list_api = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $auth_method - * Specifies the authentication and authorization method used by the storage - * service. When not specified, Transfer Service will attempt to determine - * right auth method to use. - * @type int $request_model - * Specifies the API request model used to call the storage service. When not - * specified, the default value of RequestModel - * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. - * @type int $protocol - * Specifies the network protocol of the agent. When not specified, the - * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. - * @type int $list_api - * The Listing API to use for discovering objects. When not specified, - * Transfer Service will attempt to determine the right API to use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the authentication and authorization method used by the storage - * service. When not specified, Transfer Service will attempt to determine - * right auth method to use. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1; - * @return int - */ - public function getAuthMethod() - { - return $this->auth_method; - } - - /** - * Specifies the authentication and authorization method used by the storage - * service. When not specified, Transfer Service will attempt to determine - * right auth method to use. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod auth_method = 1; - * @param int $var - * @return $this - */ - public function setAuthMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\AuthMethod::class); - $this->auth_method = $var; - - return $this; - } - - /** - * Specifies the API request model used to call the storage service. When not - * specified, the default value of RequestModel - * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2; - * @return int - */ - public function getRequestModel() - { - return $this->request_model; - } - - /** - * Specifies the API request model used to call the storage service. When not - * specified, the default value of RequestModel - * REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.RequestModel request_model = 2; - * @param int $var - * @return $this - */ - public function setRequestModel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\RequestModel::class); - $this->request_model = $var; - - return $this; - } - - /** - * Specifies the network protocol of the agent. When not specified, the - * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Specifies the network protocol of the agent. When not specified, the - * default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol protocol = 3; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\NetworkProtocol::class); - $this->protocol = $var; - - return $this; - } - - /** - * The Listing API to use for discovering objects. When not specified, - * Transfer Service will attempt to determine the right API to use. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4; - * @return int - */ - public function getListApi() - { - return $this->list_api; - } - - /** - * The Listing API to use for discovering objects. When not specified, - * Transfer Service will attempt to determine the right API to use. - * - * Generated from protobuf field .google.storagetransfer.v1.S3CompatibleMetadata.ListApi list_api = 4; - * @param int $var - * @return $this - */ - public function setListApi($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata\ListApi::class); - $this->list_api = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php deleted file mode 100644 index bce457c3194c..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/AuthMethod.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.S3CompatibleMetadata.AuthMethod - */ -class AuthMethod -{ - /** - * AuthMethod is not specified. - * - * Generated from protobuf enum AUTH_METHOD_UNSPECIFIED = 0; - */ - const AUTH_METHOD_UNSPECIFIED = 0; - /** - * Auth requests with AWS SigV4. - * - * Generated from protobuf enum AUTH_METHOD_AWS_SIGNATURE_V4 = 1; - */ - const AUTH_METHOD_AWS_SIGNATURE_V4 = 1; - /** - * Auth requests with AWS SigV2. - * - * Generated from protobuf enum AUTH_METHOD_AWS_SIGNATURE_V2 = 2; - */ - const AUTH_METHOD_AWS_SIGNATURE_V2 = 2; - - private static $valueToName = [ - self::AUTH_METHOD_UNSPECIFIED => 'AUTH_METHOD_UNSPECIFIED', - self::AUTH_METHOD_AWS_SIGNATURE_V4 => 'AUTH_METHOD_AWS_SIGNATURE_V4', - self::AUTH_METHOD_AWS_SIGNATURE_V2 => 'AUTH_METHOD_AWS_SIGNATURE_V2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AuthMethod::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_AuthMethod::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php deleted file mode 100644 index 62d307b60946..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/ListApi.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storagetransfer.v1.S3CompatibleMetadata.ListApi - */ -class ListApi -{ - /** - * ListApi is not specified. - * - * Generated from protobuf enum LIST_API_UNSPECIFIED = 0; - */ - const LIST_API_UNSPECIFIED = 0; - /** - * Perform listing using ListObjectsV2 API. - * - * Generated from protobuf enum LIST_OBJECTS_V2 = 1; - */ - const LIST_OBJECTS_V2 = 1; - /** - * Legacy ListObjects API. - * - * Generated from protobuf enum LIST_OBJECTS = 2; - */ - const LIST_OBJECTS = 2; - - private static $valueToName = [ - self::LIST_API_UNSPECIFIED => 'LIST_API_UNSPECIFIED', - self::LIST_OBJECTS_V2 => 'LIST_OBJECTS_V2', - self::LIST_OBJECTS => 'LIST_OBJECTS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListApi::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_ListApi::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php deleted file mode 100644 index 29c2e7d6a416..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/NetworkProtocol.php +++ /dev/null @@ -1,66 +0,0 @@ -google.storagetransfer.v1.S3CompatibleMetadata.NetworkProtocol - */ -class NetworkProtocol -{ - /** - * NetworkProtocol is not specified. - * - * Generated from protobuf enum NETWORK_PROTOCOL_UNSPECIFIED = 0; - */ - const NETWORK_PROTOCOL_UNSPECIFIED = 0; - /** - * Perform requests using HTTPS. - * - * Generated from protobuf enum NETWORK_PROTOCOL_HTTPS = 1; - */ - const NETWORK_PROTOCOL_HTTPS = 1; - /** - * Not recommended: This sends data in clear-text. This is only - * appropriate within a closed network or for publicly available data. - * Perform requests using HTTP. - * - * Generated from protobuf enum NETWORK_PROTOCOL_HTTP = 2; - */ - const NETWORK_PROTOCOL_HTTP = 2; - - private static $valueToName = [ - self::NETWORK_PROTOCOL_UNSPECIFIED => 'NETWORK_PROTOCOL_UNSPECIFIED', - self::NETWORK_PROTOCOL_HTTPS => 'NETWORK_PROTOCOL_HTTPS', - self::NETWORK_PROTOCOL_HTTP => 'NETWORK_PROTOCOL_HTTP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkProtocol::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_NetworkProtocol::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php deleted file mode 100644 index 832494b6d409..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/S3CompatibleMetadata/RequestModel.php +++ /dev/null @@ -1,66 +0,0 @@ -google.storagetransfer.v1.S3CompatibleMetadata.RequestModel - */ -class RequestModel -{ - /** - * RequestModel is not specified. - * - * Generated from protobuf enum REQUEST_MODEL_UNSPECIFIED = 0; - */ - const REQUEST_MODEL_UNSPECIFIED = 0; - /** - * Perform requests using Virtual Hosted Style. - * Example: https://bucket-name.s3.region.amazonaws.com/key-name - * - * Generated from protobuf enum REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1; - */ - const REQUEST_MODEL_VIRTUAL_HOSTED_STYLE = 1; - /** - * Perform requests using Path Style. - * Example: https://s3.region.amazonaws.com/bucket-name/key-name - * - * Generated from protobuf enum REQUEST_MODEL_PATH_STYLE = 2; - */ - const REQUEST_MODEL_PATH_STYLE = 2; - - private static $valueToName = [ - self::REQUEST_MODEL_UNSPECIFIED => 'REQUEST_MODEL_UNSPECIFIED', - self::REQUEST_MODEL_VIRTUAL_HOSTED_STYLE => 'REQUEST_MODEL_VIRTUAL_HOSTED_STYLE', - self::REQUEST_MODEL_PATH_STYLE => 'REQUEST_MODEL_PATH_STYLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequestModel::class, \Google\Cloud\StorageTransfer\V1\S3CompatibleMetadata_RequestModel::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php deleted file mode 100644 index 29c271a20bcf..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/Schedule.php +++ /dev/null @@ -1,441 +0,0 @@ -google.storagetransfer.v1.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The start date of a transfer. Date boundaries are determined - * relative to UTC time. If `schedule_start_date` and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * are in the past relative to the job's creation time, the transfer starts - * the day after you schedule the transfer request. - * **Note:** When starting jobs at or near midnight UTC it is possible that - * a job starts later than expected. For example, if you send an outbound - * request on June 1 one millisecond prior to midnight UTC and the Storage - * Transfer Service server receives the request on June 2, then it creates - * a TransferJob with `schedule_start_date` set to June 2 and a - * `start_time_of_day` set to midnight UTC. The first scheduled - * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes - * place on June 3 at midnight UTC. - * - * Generated from protobuf field .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schedule_start_date = null; - /** - * The last day a transfer runs. Date boundaries are determined relative to - * UTC time. A job runs once per 24 hours within the following guidelines: - * * If `schedule_end_date` and - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * are the same and in - * the future relative to UTC, the transfer is executed only one time. - * * If `schedule_end_date` is later than `schedule_start_date` and - * `schedule_end_date` is in the future relative to UTC, the job runs each - * day at - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * through `schedule_end_date`. - * - * Generated from protobuf field .google.type.Date schedule_end_date = 2; - */ - protected $schedule_end_date = null; - /** - * The time in UTC that a transfer job is scheduled to run. Transfers may - * start later than this time. - * If `start_time_of_day` is not specified: - * * One-time transfers run immediately. - * * Recurring transfers run immediately, and each day at midnight UTC, - * through - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. - * If `start_time_of_day` is specified: - * * One-time transfers run at the specified time. - * * Recurring transfers run at the specified time each day, through - * `schedule_end_date`. - * - * Generated from protobuf field .google.type.TimeOfDay start_time_of_day = 3; - */ - protected $start_time_of_day = null; - /** - * The time in UTC that no further transfer operations are scheduled. Combined - * with - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], - * `end_time_of_day` specifies the end date and time for starting new transfer - * operations. This field must be greater than or equal to the timestamp - * corresponding to the combintation of - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], - * and is subject to the following: - * * If `end_time_of_day` is not set and `schedule_end_date` is set, then - * a default value of `23:59:59` is used for `end_time_of_day`. - * * If `end_time_of_day` is set and `schedule_end_date` is not set, then - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. - * - * Generated from protobuf field .google.type.TimeOfDay end_time_of_day = 4; - */ - protected $end_time_of_day = null; - /** - * Interval between the start of each scheduled TransferOperation. If - * unspecified, the default value is 24 hours. This value may not be less than - * 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration repeat_interval = 5; - */ - protected $repeat_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Date $schedule_start_date - * Required. The start date of a transfer. Date boundaries are determined - * relative to UTC time. If `schedule_start_date` and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * are in the past relative to the job's creation time, the transfer starts - * the day after you schedule the transfer request. - * **Note:** When starting jobs at or near midnight UTC it is possible that - * a job starts later than expected. For example, if you send an outbound - * request on June 1 one millisecond prior to midnight UTC and the Storage - * Transfer Service server receives the request on June 2, then it creates - * a TransferJob with `schedule_start_date` set to June 2 and a - * `start_time_of_day` set to midnight UTC. The first scheduled - * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes - * place on June 3 at midnight UTC. - * @type \Google\Type\Date $schedule_end_date - * The last day a transfer runs. Date boundaries are determined relative to - * UTC time. A job runs once per 24 hours within the following guidelines: - * * If `schedule_end_date` and - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * are the same and in - * the future relative to UTC, the transfer is executed only one time. - * * If `schedule_end_date` is later than `schedule_start_date` and - * `schedule_end_date` is in the future relative to UTC, the job runs each - * day at - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * through `schedule_end_date`. - * @type \Google\Type\TimeOfDay $start_time_of_day - * The time in UTC that a transfer job is scheduled to run. Transfers may - * start later than this time. - * If `start_time_of_day` is not specified: - * * One-time transfers run immediately. - * * Recurring transfers run immediately, and each day at midnight UTC, - * through - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. - * If `start_time_of_day` is specified: - * * One-time transfers run at the specified time. - * * Recurring transfers run at the specified time each day, through - * `schedule_end_date`. - * @type \Google\Type\TimeOfDay $end_time_of_day - * The time in UTC that no further transfer operations are scheduled. Combined - * with - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], - * `end_time_of_day` specifies the end date and time for starting new transfer - * operations. This field must be greater than or equal to the timestamp - * corresponding to the combintation of - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], - * and is subject to the following: - * * If `end_time_of_day` is not set and `schedule_end_date` is set, then - * a default value of `23:59:59` is used for `end_time_of_day`. - * * If `end_time_of_day` is set and `schedule_end_date` is not set, then - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. - * @type \Google\Protobuf\Duration $repeat_interval - * Interval between the start of each scheduled TransferOperation. If - * unspecified, the default value is 24 hours. This value may not be less than - * 1 hour. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Required. The start date of a transfer. Date boundaries are determined - * relative to UTC time. If `schedule_start_date` and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * are in the past relative to the job's creation time, the transfer starts - * the day after you schedule the transfer request. - * **Note:** When starting jobs at or near midnight UTC it is possible that - * a job starts later than expected. For example, if you send an outbound - * request on June 1 one millisecond prior to midnight UTC and the Storage - * Transfer Service server receives the request on June 2, then it creates - * a TransferJob with `schedule_start_date` set to June 2 and a - * `start_time_of_day` set to midnight UTC. The first scheduled - * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes - * place on June 3 at midnight UTC. - * - * Generated from protobuf field .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Date|null - */ - public function getScheduleStartDate() - { - return $this->schedule_start_date; - } - - public function hasScheduleStartDate() - { - return isset($this->schedule_start_date); - } - - public function clearScheduleStartDate() - { - unset($this->schedule_start_date); - } - - /** - * Required. The start date of a transfer. Date boundaries are determined - * relative to UTC time. If `schedule_start_date` and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * are in the past relative to the job's creation time, the transfer starts - * the day after you schedule the transfer request. - * **Note:** When starting jobs at or near midnight UTC it is possible that - * a job starts later than expected. For example, if you send an outbound - * request on June 1 one millisecond prior to midnight UTC and the Storage - * Transfer Service server receives the request on June 2, then it creates - * a TransferJob with `schedule_start_date` set to June 2 and a - * `start_time_of_day` set to midnight UTC. The first scheduled - * [TransferOperation][google.storagetransfer.v1.TransferOperation] takes - * place on June 3 at midnight UTC. - * - * Generated from protobuf field .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Date $var - * @return $this - */ - public function setScheduleStartDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->schedule_start_date = $var; - - return $this; - } - - /** - * The last day a transfer runs. Date boundaries are determined relative to - * UTC time. A job runs once per 24 hours within the following guidelines: - * * If `schedule_end_date` and - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * are the same and in - * the future relative to UTC, the transfer is executed only one time. - * * If `schedule_end_date` is later than `schedule_start_date` and - * `schedule_end_date` is in the future relative to UTC, the job runs each - * day at - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * through `schedule_end_date`. - * - * Generated from protobuf field .google.type.Date schedule_end_date = 2; - * @return \Google\Type\Date|null - */ - public function getScheduleEndDate() - { - return $this->schedule_end_date; - } - - public function hasScheduleEndDate() - { - return isset($this->schedule_end_date); - } - - public function clearScheduleEndDate() - { - unset($this->schedule_end_date); - } - - /** - * The last day a transfer runs. Date boundaries are determined relative to - * UTC time. A job runs once per 24 hours within the following guidelines: - * * If `schedule_end_date` and - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * are the same and in - * the future relative to UTC, the transfer is executed only one time. - * * If `schedule_end_date` is later than `schedule_start_date` and - * `schedule_end_date` is in the future relative to UTC, the job runs each - * day at - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] - * through `schedule_end_date`. - * - * Generated from protobuf field .google.type.Date schedule_end_date = 2; - * @param \Google\Type\Date $var - * @return $this - */ - public function setScheduleEndDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->schedule_end_date = $var; - - return $this; - } - - /** - * The time in UTC that a transfer job is scheduled to run. Transfers may - * start later than this time. - * If `start_time_of_day` is not specified: - * * One-time transfers run immediately. - * * Recurring transfers run immediately, and each day at midnight UTC, - * through - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. - * If `start_time_of_day` is specified: - * * One-time transfers run at the specified time. - * * Recurring transfers run at the specified time each day, through - * `schedule_end_date`. - * - * Generated from protobuf field .google.type.TimeOfDay start_time_of_day = 3; - * @return \Google\Type\TimeOfDay|null - */ - public function getStartTimeOfDay() - { - return $this->start_time_of_day; - } - - public function hasStartTimeOfDay() - { - return isset($this->start_time_of_day); - } - - public function clearStartTimeOfDay() - { - unset($this->start_time_of_day); - } - - /** - * The time in UTC that a transfer job is scheduled to run. Transfers may - * start later than this time. - * If `start_time_of_day` is not specified: - * * One-time transfers run immediately. - * * Recurring transfers run immediately, and each day at midnight UTC, - * through - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. - * If `start_time_of_day` is specified: - * * One-time transfers run at the specified time. - * * Recurring transfers run at the specified time each day, through - * `schedule_end_date`. - * - * Generated from protobuf field .google.type.TimeOfDay start_time_of_day = 3; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStartTimeOfDay($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->start_time_of_day = $var; - - return $this; - } - - /** - * The time in UTC that no further transfer operations are scheduled. Combined - * with - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], - * `end_time_of_day` specifies the end date and time for starting new transfer - * operations. This field must be greater than or equal to the timestamp - * corresponding to the combintation of - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], - * and is subject to the following: - * * If `end_time_of_day` is not set and `schedule_end_date` is set, then - * a default value of `23:59:59` is used for `end_time_of_day`. - * * If `end_time_of_day` is set and `schedule_end_date` is not set, then - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. - * - * Generated from protobuf field .google.type.TimeOfDay end_time_of_day = 4; - * @return \Google\Type\TimeOfDay|null - */ - public function getEndTimeOfDay() - { - return $this->end_time_of_day; - } - - public function hasEndTimeOfDay() - { - return isset($this->end_time_of_day); - } - - public function clearEndTimeOfDay() - { - unset($this->end_time_of_day); - } - - /** - * The time in UTC that no further transfer operations are scheduled. Combined - * with - * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], - * `end_time_of_day` specifies the end date and time for starting new transfer - * operations. This field must be greater than or equal to the timestamp - * corresponding to the combintation of - * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] - * and - * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], - * and is subject to the following: - * * If `end_time_of_day` is not set and `schedule_end_date` is set, then - * a default value of `23:59:59` is used for `end_time_of_day`. - * * If `end_time_of_day` is set and `schedule_end_date` is not set, then - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. - * - * Generated from protobuf field .google.type.TimeOfDay end_time_of_day = 4; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setEndTimeOfDay($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->end_time_of_day = $var; - - return $this; - } - - /** - * Interval between the start of each scheduled TransferOperation. If - * unspecified, the default value is 24 hours. This value may not be less than - * 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration repeat_interval = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getRepeatInterval() - { - return $this->repeat_interval; - } - - public function hasRepeatInterval() - { - return isset($this->repeat_interval); - } - - public function clearRepeatInterval() - { - unset($this->repeat_interval); - } - - /** - * Interval between the start of each scheduled TransferOperation. If - * unspecified, the default value is 24 hours. This value may not be less than - * 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration repeat_interval = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRepeatInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->repeat_interval = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php deleted file mode 100644 index 53014ea3e1ba..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferCounters.php +++ /dev/null @@ -1,815 +0,0 @@ -google.storagetransfer.v1.TransferCounters - */ -class TransferCounters extends \Google\Protobuf\Internal\Message -{ - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found_from_source = 1; - */ - protected $objects_found_from_source = 0; - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found_from_source = 2; - */ - protected $bytes_found_from_source = 0; - /** - * Objects found only in the data sink that are scheduled to be deleted. - * - * Generated from protobuf field int64 objects_found_only_from_sink = 3; - */ - protected $objects_found_only_from_sink = 0; - /** - * Bytes found only in the data sink that are scheduled to be deleted. - * - * Generated from protobuf field int64 bytes_found_only_from_sink = 4; - */ - protected $bytes_found_only_from_sink = 0; - /** - * Objects in the data source that are not transferred because they already - * exist in the data sink. - * - * Generated from protobuf field int64 objects_from_source_skipped_by_sync = 5; - */ - protected $objects_from_source_skipped_by_sync = 0; - /** - * Bytes in the data source that are not transferred because they already - * exist in the data sink. - * - * Generated from protobuf field int64 bytes_from_source_skipped_by_sync = 6; - */ - protected $bytes_from_source_skipped_by_sync = 0; - /** - * Objects that are copied to the data sink. - * - * Generated from protobuf field int64 objects_copied_to_sink = 7; - */ - protected $objects_copied_to_sink = 0; - /** - * Bytes that are copied to the data sink. - * - * Generated from protobuf field int64 bytes_copied_to_sink = 8; - */ - protected $bytes_copied_to_sink = 0; - /** - * Objects that are deleted from the data source. - * - * Generated from protobuf field int64 objects_deleted_from_source = 9; - */ - protected $objects_deleted_from_source = 0; - /** - * Bytes that are deleted from the data source. - * - * Generated from protobuf field int64 bytes_deleted_from_source = 10; - */ - protected $bytes_deleted_from_source = 0; - /** - * Objects that are deleted from the data sink. - * - * Generated from protobuf field int64 objects_deleted_from_sink = 11; - */ - protected $objects_deleted_from_sink = 0; - /** - * Bytes that are deleted from the data sink. - * - * Generated from protobuf field int64 bytes_deleted_from_sink = 12; - */ - protected $bytes_deleted_from_sink = 0; - /** - * Objects in the data source that failed to be transferred or that failed - * to be deleted after being transferred. - * - * Generated from protobuf field int64 objects_from_source_failed = 13; - */ - protected $objects_from_source_failed = 0; - /** - * Bytes in the data source that failed to be transferred or that failed to - * be deleted after being transferred. - * - * Generated from protobuf field int64 bytes_from_source_failed = 14; - */ - protected $bytes_from_source_failed = 0; - /** - * Objects that failed to be deleted from the data sink. - * - * Generated from protobuf field int64 objects_failed_to_delete_from_sink = 15; - */ - protected $objects_failed_to_delete_from_sink = 0; - /** - * Bytes that failed to be deleted from the data sink. - * - * Generated from protobuf field int64 bytes_failed_to_delete_from_sink = 16; - */ - protected $bytes_failed_to_delete_from_sink = 0; - /** - * For transfers involving PosixFilesystem only. - * Number of directories found while listing. For example, if the root - * directory of the transfer is `base/` and there are two other directories, - * `a/` and `b/` under this directory, the count after listing `base/`, - * `base/a/` and `base/b/` is 3. - * - * Generated from protobuf field int64 directories_found_from_source = 17; - */ - protected $directories_found_from_source = 0; - /** - * For transfers involving PosixFilesystem only. - * Number of listing failures for each directory found at the source. - * Potential failures when listing a directory include permission failure or - * block failure. If listing a directory fails, no files in the directory are - * transferred. - * - * Generated from protobuf field int64 directories_failed_to_list_from_source = 18; - */ - protected $directories_failed_to_list_from_source = 0; - /** - * For transfers involving PosixFilesystem only. - * Number of successful listings for each directory found at the source. - * - * Generated from protobuf field int64 directories_successfully_listed_from_source = 19; - */ - protected $directories_successfully_listed_from_source = 0; - /** - * Number of successfully cleaned up intermediate objects. - * - * Generated from protobuf field int64 intermediate_objects_cleaned_up = 22; - */ - protected $intermediate_objects_cleaned_up = 0; - /** - * Number of intermediate objects failed cleaned up. - * - * Generated from protobuf field int64 intermediate_objects_failed_cleaned_up = 23; - */ - protected $intermediate_objects_failed_cleaned_up = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $objects_found_from_source - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * @type int|string $bytes_found_from_source - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * @type int|string $objects_found_only_from_sink - * Objects found only in the data sink that are scheduled to be deleted. - * @type int|string $bytes_found_only_from_sink - * Bytes found only in the data sink that are scheduled to be deleted. - * @type int|string $objects_from_source_skipped_by_sync - * Objects in the data source that are not transferred because they already - * exist in the data sink. - * @type int|string $bytes_from_source_skipped_by_sync - * Bytes in the data source that are not transferred because they already - * exist in the data sink. - * @type int|string $objects_copied_to_sink - * Objects that are copied to the data sink. - * @type int|string $bytes_copied_to_sink - * Bytes that are copied to the data sink. - * @type int|string $objects_deleted_from_source - * Objects that are deleted from the data source. - * @type int|string $bytes_deleted_from_source - * Bytes that are deleted from the data source. - * @type int|string $objects_deleted_from_sink - * Objects that are deleted from the data sink. - * @type int|string $bytes_deleted_from_sink - * Bytes that are deleted from the data sink. - * @type int|string $objects_from_source_failed - * Objects in the data source that failed to be transferred or that failed - * to be deleted after being transferred. - * @type int|string $bytes_from_source_failed - * Bytes in the data source that failed to be transferred or that failed to - * be deleted after being transferred. - * @type int|string $objects_failed_to_delete_from_sink - * Objects that failed to be deleted from the data sink. - * @type int|string $bytes_failed_to_delete_from_sink - * Bytes that failed to be deleted from the data sink. - * @type int|string $directories_found_from_source - * For transfers involving PosixFilesystem only. - * Number of directories found while listing. For example, if the root - * directory of the transfer is `base/` and there are two other directories, - * `a/` and `b/` under this directory, the count after listing `base/`, - * `base/a/` and `base/b/` is 3. - * @type int|string $directories_failed_to_list_from_source - * For transfers involving PosixFilesystem only. - * Number of listing failures for each directory found at the source. - * Potential failures when listing a directory include permission failure or - * block failure. If listing a directory fails, no files in the directory are - * transferred. - * @type int|string $directories_successfully_listed_from_source - * For transfers involving PosixFilesystem only. - * Number of successful listings for each directory found at the source. - * @type int|string $intermediate_objects_cleaned_up - * Number of successfully cleaned up intermediate objects. - * @type int|string $intermediate_objects_failed_cleaned_up - * Number of intermediate objects failed cleaned up. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found_from_source = 1; - * @return int|string - */ - public function getObjectsFoundFromSource() - { - return $this->objects_found_from_source; - } - - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found_from_source = 1; - * @param int|string $var - * @return $this - */ - public function setObjectsFoundFromSource($var) - { - GPBUtil::checkInt64($var); - $this->objects_found_from_source = $var; - - return $this; - } - - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found_from_source = 2; - * @return int|string - */ - public function getBytesFoundFromSource() - { - return $this->bytes_found_from_source; - } - - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found_from_source = 2; - * @param int|string $var - * @return $this - */ - public function setBytesFoundFromSource($var) - { - GPBUtil::checkInt64($var); - $this->bytes_found_from_source = $var; - - return $this; - } - - /** - * Objects found only in the data sink that are scheduled to be deleted. - * - * Generated from protobuf field int64 objects_found_only_from_sink = 3; - * @return int|string - */ - public function getObjectsFoundOnlyFromSink() - { - return $this->objects_found_only_from_sink; - } - - /** - * Objects found only in the data sink that are scheduled to be deleted. - * - * Generated from protobuf field int64 objects_found_only_from_sink = 3; - * @param int|string $var - * @return $this - */ - public function setObjectsFoundOnlyFromSink($var) - { - GPBUtil::checkInt64($var); - $this->objects_found_only_from_sink = $var; - - return $this; - } - - /** - * Bytes found only in the data sink that are scheduled to be deleted. - * - * Generated from protobuf field int64 bytes_found_only_from_sink = 4; - * @return int|string - */ - public function getBytesFoundOnlyFromSink() - { - return $this->bytes_found_only_from_sink; - } - - /** - * Bytes found only in the data sink that are scheduled to be deleted. - * - * Generated from protobuf field int64 bytes_found_only_from_sink = 4; - * @param int|string $var - * @return $this - */ - public function setBytesFoundOnlyFromSink($var) - { - GPBUtil::checkInt64($var); - $this->bytes_found_only_from_sink = $var; - - return $this; - } - - /** - * Objects in the data source that are not transferred because they already - * exist in the data sink. - * - * Generated from protobuf field int64 objects_from_source_skipped_by_sync = 5; - * @return int|string - */ - public function getObjectsFromSourceSkippedBySync() - { - return $this->objects_from_source_skipped_by_sync; - } - - /** - * Objects in the data source that are not transferred because they already - * exist in the data sink. - * - * Generated from protobuf field int64 objects_from_source_skipped_by_sync = 5; - * @param int|string $var - * @return $this - */ - public function setObjectsFromSourceSkippedBySync($var) - { - GPBUtil::checkInt64($var); - $this->objects_from_source_skipped_by_sync = $var; - - return $this; - } - - /** - * Bytes in the data source that are not transferred because they already - * exist in the data sink. - * - * Generated from protobuf field int64 bytes_from_source_skipped_by_sync = 6; - * @return int|string - */ - public function getBytesFromSourceSkippedBySync() - { - return $this->bytes_from_source_skipped_by_sync; - } - - /** - * Bytes in the data source that are not transferred because they already - * exist in the data sink. - * - * Generated from protobuf field int64 bytes_from_source_skipped_by_sync = 6; - * @param int|string $var - * @return $this - */ - public function setBytesFromSourceSkippedBySync($var) - { - GPBUtil::checkInt64($var); - $this->bytes_from_source_skipped_by_sync = $var; - - return $this; - } - - /** - * Objects that are copied to the data sink. - * - * Generated from protobuf field int64 objects_copied_to_sink = 7; - * @return int|string - */ - public function getObjectsCopiedToSink() - { - return $this->objects_copied_to_sink; - } - - /** - * Objects that are copied to the data sink. - * - * Generated from protobuf field int64 objects_copied_to_sink = 7; - * @param int|string $var - * @return $this - */ - public function setObjectsCopiedToSink($var) - { - GPBUtil::checkInt64($var); - $this->objects_copied_to_sink = $var; - - return $this; - } - - /** - * Bytes that are copied to the data sink. - * - * Generated from protobuf field int64 bytes_copied_to_sink = 8; - * @return int|string - */ - public function getBytesCopiedToSink() - { - return $this->bytes_copied_to_sink; - } - - /** - * Bytes that are copied to the data sink. - * - * Generated from protobuf field int64 bytes_copied_to_sink = 8; - * @param int|string $var - * @return $this - */ - public function setBytesCopiedToSink($var) - { - GPBUtil::checkInt64($var); - $this->bytes_copied_to_sink = $var; - - return $this; - } - - /** - * Objects that are deleted from the data source. - * - * Generated from protobuf field int64 objects_deleted_from_source = 9; - * @return int|string - */ - public function getObjectsDeletedFromSource() - { - return $this->objects_deleted_from_source; - } - - /** - * Objects that are deleted from the data source. - * - * Generated from protobuf field int64 objects_deleted_from_source = 9; - * @param int|string $var - * @return $this - */ - public function setObjectsDeletedFromSource($var) - { - GPBUtil::checkInt64($var); - $this->objects_deleted_from_source = $var; - - return $this; - } - - /** - * Bytes that are deleted from the data source. - * - * Generated from protobuf field int64 bytes_deleted_from_source = 10; - * @return int|string - */ - public function getBytesDeletedFromSource() - { - return $this->bytes_deleted_from_source; - } - - /** - * Bytes that are deleted from the data source. - * - * Generated from protobuf field int64 bytes_deleted_from_source = 10; - * @param int|string $var - * @return $this - */ - public function setBytesDeletedFromSource($var) - { - GPBUtil::checkInt64($var); - $this->bytes_deleted_from_source = $var; - - return $this; - } - - /** - * Objects that are deleted from the data sink. - * - * Generated from protobuf field int64 objects_deleted_from_sink = 11; - * @return int|string - */ - public function getObjectsDeletedFromSink() - { - return $this->objects_deleted_from_sink; - } - - /** - * Objects that are deleted from the data sink. - * - * Generated from protobuf field int64 objects_deleted_from_sink = 11; - * @param int|string $var - * @return $this - */ - public function setObjectsDeletedFromSink($var) - { - GPBUtil::checkInt64($var); - $this->objects_deleted_from_sink = $var; - - return $this; - } - - /** - * Bytes that are deleted from the data sink. - * - * Generated from protobuf field int64 bytes_deleted_from_sink = 12; - * @return int|string - */ - public function getBytesDeletedFromSink() - { - return $this->bytes_deleted_from_sink; - } - - /** - * Bytes that are deleted from the data sink. - * - * Generated from protobuf field int64 bytes_deleted_from_sink = 12; - * @param int|string $var - * @return $this - */ - public function setBytesDeletedFromSink($var) - { - GPBUtil::checkInt64($var); - $this->bytes_deleted_from_sink = $var; - - return $this; - } - - /** - * Objects in the data source that failed to be transferred or that failed - * to be deleted after being transferred. - * - * Generated from protobuf field int64 objects_from_source_failed = 13; - * @return int|string - */ - public function getObjectsFromSourceFailed() - { - return $this->objects_from_source_failed; - } - - /** - * Objects in the data source that failed to be transferred or that failed - * to be deleted after being transferred. - * - * Generated from protobuf field int64 objects_from_source_failed = 13; - * @param int|string $var - * @return $this - */ - public function setObjectsFromSourceFailed($var) - { - GPBUtil::checkInt64($var); - $this->objects_from_source_failed = $var; - - return $this; - } - - /** - * Bytes in the data source that failed to be transferred or that failed to - * be deleted after being transferred. - * - * Generated from protobuf field int64 bytes_from_source_failed = 14; - * @return int|string - */ - public function getBytesFromSourceFailed() - { - return $this->bytes_from_source_failed; - } - - /** - * Bytes in the data source that failed to be transferred or that failed to - * be deleted after being transferred. - * - * Generated from protobuf field int64 bytes_from_source_failed = 14; - * @param int|string $var - * @return $this - */ - public function setBytesFromSourceFailed($var) - { - GPBUtil::checkInt64($var); - $this->bytes_from_source_failed = $var; - - return $this; - } - - /** - * Objects that failed to be deleted from the data sink. - * - * Generated from protobuf field int64 objects_failed_to_delete_from_sink = 15; - * @return int|string - */ - public function getObjectsFailedToDeleteFromSink() - { - return $this->objects_failed_to_delete_from_sink; - } - - /** - * Objects that failed to be deleted from the data sink. - * - * Generated from protobuf field int64 objects_failed_to_delete_from_sink = 15; - * @param int|string $var - * @return $this - */ - public function setObjectsFailedToDeleteFromSink($var) - { - GPBUtil::checkInt64($var); - $this->objects_failed_to_delete_from_sink = $var; - - return $this; - } - - /** - * Bytes that failed to be deleted from the data sink. - * - * Generated from protobuf field int64 bytes_failed_to_delete_from_sink = 16; - * @return int|string - */ - public function getBytesFailedToDeleteFromSink() - { - return $this->bytes_failed_to_delete_from_sink; - } - - /** - * Bytes that failed to be deleted from the data sink. - * - * Generated from protobuf field int64 bytes_failed_to_delete_from_sink = 16; - * @param int|string $var - * @return $this - */ - public function setBytesFailedToDeleteFromSink($var) - { - GPBUtil::checkInt64($var); - $this->bytes_failed_to_delete_from_sink = $var; - - return $this; - } - - /** - * For transfers involving PosixFilesystem only. - * Number of directories found while listing. For example, if the root - * directory of the transfer is `base/` and there are two other directories, - * `a/` and `b/` under this directory, the count after listing `base/`, - * `base/a/` and `base/b/` is 3. - * - * Generated from protobuf field int64 directories_found_from_source = 17; - * @return int|string - */ - public function getDirectoriesFoundFromSource() - { - return $this->directories_found_from_source; - } - - /** - * For transfers involving PosixFilesystem only. - * Number of directories found while listing. For example, if the root - * directory of the transfer is `base/` and there are two other directories, - * `a/` and `b/` under this directory, the count after listing `base/`, - * `base/a/` and `base/b/` is 3. - * - * Generated from protobuf field int64 directories_found_from_source = 17; - * @param int|string $var - * @return $this - */ - public function setDirectoriesFoundFromSource($var) - { - GPBUtil::checkInt64($var); - $this->directories_found_from_source = $var; - - return $this; - } - - /** - * For transfers involving PosixFilesystem only. - * Number of listing failures for each directory found at the source. - * Potential failures when listing a directory include permission failure or - * block failure. If listing a directory fails, no files in the directory are - * transferred. - * - * Generated from protobuf field int64 directories_failed_to_list_from_source = 18; - * @return int|string - */ - public function getDirectoriesFailedToListFromSource() - { - return $this->directories_failed_to_list_from_source; - } - - /** - * For transfers involving PosixFilesystem only. - * Number of listing failures for each directory found at the source. - * Potential failures when listing a directory include permission failure or - * block failure. If listing a directory fails, no files in the directory are - * transferred. - * - * Generated from protobuf field int64 directories_failed_to_list_from_source = 18; - * @param int|string $var - * @return $this - */ - public function setDirectoriesFailedToListFromSource($var) - { - GPBUtil::checkInt64($var); - $this->directories_failed_to_list_from_source = $var; - - return $this; - } - - /** - * For transfers involving PosixFilesystem only. - * Number of successful listings for each directory found at the source. - * - * Generated from protobuf field int64 directories_successfully_listed_from_source = 19; - * @return int|string - */ - public function getDirectoriesSuccessfullyListedFromSource() - { - return $this->directories_successfully_listed_from_source; - } - - /** - * For transfers involving PosixFilesystem only. - * Number of successful listings for each directory found at the source. - * - * Generated from protobuf field int64 directories_successfully_listed_from_source = 19; - * @param int|string $var - * @return $this - */ - public function setDirectoriesSuccessfullyListedFromSource($var) - { - GPBUtil::checkInt64($var); - $this->directories_successfully_listed_from_source = $var; - - return $this; - } - - /** - * Number of successfully cleaned up intermediate objects. - * - * Generated from protobuf field int64 intermediate_objects_cleaned_up = 22; - * @return int|string - */ - public function getIntermediateObjectsCleanedUp() - { - return $this->intermediate_objects_cleaned_up; - } - - /** - * Number of successfully cleaned up intermediate objects. - * - * Generated from protobuf field int64 intermediate_objects_cleaned_up = 22; - * @param int|string $var - * @return $this - */ - public function setIntermediateObjectsCleanedUp($var) - { - GPBUtil::checkInt64($var); - $this->intermediate_objects_cleaned_up = $var; - - return $this; - } - - /** - * Number of intermediate objects failed cleaned up. - * - * Generated from protobuf field int64 intermediate_objects_failed_cleaned_up = 23; - * @return int|string - */ - public function getIntermediateObjectsFailedCleanedUp() - { - return $this->intermediate_objects_failed_cleaned_up; - } - - /** - * Number of intermediate objects failed cleaned up. - * - * Generated from protobuf field int64 intermediate_objects_failed_cleaned_up = 23; - * @param int|string $var - * @return $this - */ - public function setIntermediateObjectsFailedCleanedUp($var) - { - GPBUtil::checkInt64($var); - $this->intermediate_objects_failed_cleaned_up = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php deleted file mode 100644 index efc91b2f5ac8..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob.php +++ /dev/null @@ -1,680 +0,0 @@ -google.storagetransfer.v1.TransferJob - */ -class TransferJob extends \Google\Protobuf\Internal\Message -{ - /** - * A unique name (within the transfer project) assigned when the job is - * created. If this field is empty in a CreateTransferJobRequest, Storage - * Transfer Service assigns a unique name. Otherwise, the specified name - * is used as the unique name for this job. - * If the specified name is in use by a job, the creation request fails with - * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * This name must start with `"transferJobs/"` prefix and end with a letter or - * a number, and should be no more than 128 characters. For transfers - * involving PosixFilesystem, this name must start with `transferJobs/OPI` - * specifically. For all other transfer types, this name must not start with - * `transferJobs/OPI`. - * Non-PosixFilesystem example: - * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * PosixFilesystem example: - * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * Applications must not rely on the enforcement of naming requirements - * involving OPI. - * Invalid job names fail with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A description provided by the user for the job. Its max length is 1024 - * bytes when Unicode-encoded. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The ID of the Google Cloud project that owns the job. - * - * Generated from protobuf field string project_id = 3; - */ - protected $project_id = ''; - /** - * Transfer specification. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 4; - */ - protected $transfer_spec = null; - /** - * Notification configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 11; - */ - protected $notification_config = null; - /** - * Logging configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 14; - */ - protected $logging_config = null; - /** - * Specifies schedule for the transfer job. - * This is an optional field. When the field is not set, the job never - * executes a transfer, unless you invoke RunTransferJob or update the job to - * have a non-empty schedule. - * - * Generated from protobuf field .google.storagetransfer.v1.Schedule schedule = 5; - */ - protected $schedule = null; - /** - * Specifies the event stream for the transfer job for event-driven transfers. - * When EventStream is specified, the Schedule fields are ignored. - * - * Generated from protobuf field .google.storagetransfer.v1.EventStream event_stream = 15; - */ - protected $event_stream = null; - /** - * Status of the job. This value MUST be specified for - * `CreateTransferJobRequests`. - * **Note:** The effect of the new job status takes place during a subsequent - * job run. For example, if you change the job status from - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an - * operation spawned by the transfer is running, the status change would not - * affect the current operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob.Status status = 6; - */ - protected $status = 0; - /** - * Output only. The time that the transfer job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creation_time = null; - /** - * Output only. The time that the transfer job was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_modification_time = null; - /** - * Output only. The time that the transfer job was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deletion_time = null; - /** - * The name of the most recently started TransferOperation of this JobConfig. - * Present if a TransferOperation has been created for this JobConfig. - * - * Generated from protobuf field string latest_operation_name = 12; - */ - protected $latest_operation_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A unique name (within the transfer project) assigned when the job is - * created. If this field is empty in a CreateTransferJobRequest, Storage - * Transfer Service assigns a unique name. Otherwise, the specified name - * is used as the unique name for this job. - * If the specified name is in use by a job, the creation request fails with - * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * This name must start with `"transferJobs/"` prefix and end with a letter or - * a number, and should be no more than 128 characters. For transfers - * involving PosixFilesystem, this name must start with `transferJobs/OPI` - * specifically. For all other transfer types, this name must not start with - * `transferJobs/OPI`. - * Non-PosixFilesystem example: - * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * PosixFilesystem example: - * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * Applications must not rely on the enforcement of naming requirements - * involving OPI. - * Invalid job names fail with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * @type string $description - * A description provided by the user for the job. Its max length is 1024 - * bytes when Unicode-encoded. - * @type string $project_id - * The ID of the Google Cloud project that owns the job. - * @type \Google\Cloud\StorageTransfer\V1\TransferSpec $transfer_spec - * Transfer specification. - * @type \Google\Cloud\StorageTransfer\V1\NotificationConfig $notification_config - * Notification configuration. - * @type \Google\Cloud\StorageTransfer\V1\LoggingConfig $logging_config - * Logging configuration. - * @type \Google\Cloud\StorageTransfer\V1\Schedule $schedule - * Specifies schedule for the transfer job. - * This is an optional field. When the field is not set, the job never - * executes a transfer, unless you invoke RunTransferJob or update the job to - * have a non-empty schedule. - * @type \Google\Cloud\StorageTransfer\V1\EventStream $event_stream - * Specifies the event stream for the transfer job for event-driven transfers. - * When EventStream is specified, the Schedule fields are ignored. - * @type int $status - * Status of the job. This value MUST be specified for - * `CreateTransferJobRequests`. - * **Note:** The effect of the new job status takes place during a subsequent - * job run. For example, if you change the job status from - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an - * operation spawned by the transfer is running, the status change would not - * affect the current operation. - * @type \Google\Protobuf\Timestamp $creation_time - * Output only. The time that the transfer job was created. - * @type \Google\Protobuf\Timestamp $last_modification_time - * Output only. The time that the transfer job was last modified. - * @type \Google\Protobuf\Timestamp $deletion_time - * Output only. The time that the transfer job was deleted. - * @type string $latest_operation_name - * The name of the most recently started TransferOperation of this JobConfig. - * Present if a TransferOperation has been created for this JobConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * A unique name (within the transfer project) assigned when the job is - * created. If this field is empty in a CreateTransferJobRequest, Storage - * Transfer Service assigns a unique name. Otherwise, the specified name - * is used as the unique name for this job. - * If the specified name is in use by a job, the creation request fails with - * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * This name must start with `"transferJobs/"` prefix and end with a letter or - * a number, and should be no more than 128 characters. For transfers - * involving PosixFilesystem, this name must start with `transferJobs/OPI` - * specifically. For all other transfer types, this name must not start with - * `transferJobs/OPI`. - * Non-PosixFilesystem example: - * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * PosixFilesystem example: - * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * Applications must not rely on the enforcement of naming requirements - * involving OPI. - * Invalid job names fail with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A unique name (within the transfer project) assigned when the job is - * created. If this field is empty in a CreateTransferJobRequest, Storage - * Transfer Service assigns a unique name. Otherwise, the specified name - * is used as the unique name for this job. - * If the specified name is in use by a job, the creation request fails with - * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * This name must start with `"transferJobs/"` prefix and end with a letter or - * a number, and should be no more than 128 characters. For transfers - * involving PosixFilesystem, this name must start with `transferJobs/OPI` - * specifically. For all other transfer types, this name must not start with - * `transferJobs/OPI`. - * Non-PosixFilesystem example: - * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * PosixFilesystem example: - * `"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$"` - * Applications must not rely on the enforcement of naming requirements - * involving OPI. - * Invalid job names fail with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * 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; - } - - /** - * A description provided by the user for the job. Its max length is 1024 - * bytes when Unicode-encoded. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description provided by the user for the job. Its max length is 1024 - * bytes when Unicode-encoded. - * - * 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; - } - - /** - * The ID of the Google Cloud project that owns the job. - * - * Generated from protobuf field string project_id = 3; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The ID of the Google Cloud project that owns the job. - * - * Generated from protobuf field string project_id = 3; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Transfer specification. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 4; - * @return \Google\Cloud\StorageTransfer\V1\TransferSpec|null - */ - public function getTransferSpec() - { - return $this->transfer_spec; - } - - public function hasTransferSpec() - { - return isset($this->transfer_spec); - } - - public function clearTransferSpec() - { - unset($this->transfer_spec); - } - - /** - * Transfer specification. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 4; - * @param \Google\Cloud\StorageTransfer\V1\TransferSpec $var - * @return $this - */ - public function setTransferSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferSpec::class); - $this->transfer_spec = $var; - - return $this; - } - - /** - * Notification configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 11; - * @return \Google\Cloud\StorageTransfer\V1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Notification configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 11; - * @param \Google\Cloud\StorageTransfer\V1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * Logging configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 14; - * @return \Google\Cloud\StorageTransfer\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Logging configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 14; - * @param \Google\Cloud\StorageTransfer\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Specifies schedule for the transfer job. - * This is an optional field. When the field is not set, the job never - * executes a transfer, unless you invoke RunTransferJob or update the job to - * have a non-empty schedule. - * - * Generated from protobuf field .google.storagetransfer.v1.Schedule schedule = 5; - * @return \Google\Cloud\StorageTransfer\V1\Schedule|null - */ - public function getSchedule() - { - return $this->schedule; - } - - public function hasSchedule() - { - return isset($this->schedule); - } - - public function clearSchedule() - { - unset($this->schedule); - } - - /** - * Specifies schedule for the transfer job. - * This is an optional field. When the field is not set, the job never - * executes a transfer, unless you invoke RunTransferJob or update the job to - * have a non-empty schedule. - * - * Generated from protobuf field .google.storagetransfer.v1.Schedule schedule = 5; - * @param \Google\Cloud\StorageTransfer\V1\Schedule $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\Schedule::class); - $this->schedule = $var; - - return $this; - } - - /** - * Specifies the event stream for the transfer job for event-driven transfers. - * When EventStream is specified, the Schedule fields are ignored. - * - * Generated from protobuf field .google.storagetransfer.v1.EventStream event_stream = 15; - * @return \Google\Cloud\StorageTransfer\V1\EventStream|null - */ - public function getEventStream() - { - return $this->event_stream; - } - - public function hasEventStream() - { - return isset($this->event_stream); - } - - public function clearEventStream() - { - unset($this->event_stream); - } - - /** - * Specifies the event stream for the transfer job for event-driven transfers. - * When EventStream is specified, the Schedule fields are ignored. - * - * Generated from protobuf field .google.storagetransfer.v1.EventStream event_stream = 15; - * @param \Google\Cloud\StorageTransfer\V1\EventStream $var - * @return $this - */ - public function setEventStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\EventStream::class); - $this->event_stream = $var; - - return $this; - } - - /** - * Status of the job. This value MUST be specified for - * `CreateTransferJobRequests`. - * **Note:** The effect of the new job status takes place during a subsequent - * job run. For example, if you change the job status from - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an - * operation spawned by the transfer is running, the status change would not - * affect the current operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob.Status status = 6; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Status of the job. This value MUST be specified for - * `CreateTransferJobRequests`. - * **Note:** The effect of the new job status takes place during a subsequent - * job run. For example, if you change the job status from - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an - * operation spawned by the transfer is running, the status change would not - * affect the current operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob.Status status = 6; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\TransferJob\Status::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The time that the transfer job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreationTime() - { - return $this->creation_time; - } - - public function hasCreationTime() - { - return isset($this->creation_time); - } - - public function clearCreationTime() - { - unset($this->creation_time); - } - - /** - * Output only. The time that the transfer job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->creation_time = $var; - - return $this; - } - - /** - * Output only. The time that the transfer job was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastModificationTime() - { - return $this->last_modification_time; - } - - public function hasLastModificationTime() - { - return isset($this->last_modification_time); - } - - public function clearLastModificationTime() - { - unset($this->last_modification_time); - } - - /** - * Output only. The time that the transfer job was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastModificationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_modification_time = $var; - - return $this; - } - - /** - * Output only. The time that the transfer job was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeletionTime() - { - return $this->deletion_time; - } - - public function hasDeletionTime() - { - return isset($this->deletion_time); - } - - public function clearDeletionTime() - { - unset($this->deletion_time); - } - - /** - * Output only. The time that the transfer job was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeletionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->deletion_time = $var; - - return $this; - } - - /** - * The name of the most recently started TransferOperation of this JobConfig. - * Present if a TransferOperation has been created for this JobConfig. - * - * Generated from protobuf field string latest_operation_name = 12; - * @return string - */ - public function getLatestOperationName() - { - return $this->latest_operation_name; - } - - /** - * The name of the most recently started TransferOperation of this JobConfig. - * Present if a TransferOperation has been created for this JobConfig. - * - * Generated from protobuf field string latest_operation_name = 12; - * @param string $var - * @return $this - */ - public function setLatestOperationName($var) - { - GPBUtil::checkString($var, True); - $this->latest_operation_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php deleted file mode 100644 index f54ca4bfc2ce..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferJob/Status.php +++ /dev/null @@ -1,74 +0,0 @@ -google.storagetransfer.v1.TransferJob.Status - */ -class Status -{ - /** - * Zero is an illegal value. - * - * Generated from protobuf enum STATUS_UNSPECIFIED = 0; - */ - const STATUS_UNSPECIFIED = 0; - /** - * New transfers are performed based on the schedule. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * New transfers are not scheduled. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * This is a soft delete state. After a transfer job is set to this - * state, the job and all the transfer executions are subject to - * garbage collection. Transfer jobs become eligible for garbage collection - * 30 days after their status is set to `DELETED`. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - - private static $valueToName = [ - self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Status::class, \Google\Cloud\StorageTransfer\V1\TransferJob_Status::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php deleted file mode 100644 index 6927b1763dac..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferManifest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.storagetransfer.v1.TransferManifest - */ -class TransferManifest extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the path to the manifest in Cloud Storage. The Google-managed - * service account for the transfer must have `storage.objects.get` - * permission for this object. An example path is - * `gs://bucket_name/path/manifest.csv`. - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Specifies the path to the manifest in Cloud Storage. The Google-managed - * service account for the transfer must have `storage.objects.get` - * permission for this object. An example path is - * `gs://bucket_name/path/manifest.csv`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the path to the manifest in Cloud Storage. The Google-managed - * service account for the transfer must have `storage.objects.get` - * permission for this object. An example path is - * `gs://bucket_name/path/manifest.csv`. - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Specifies the path to the manifest in Cloud Storage. The Google-managed - * service account for the transfer must have `storage.objects.get` - * permission for this object. An example path is - * `gs://bucket_name/path/manifest.csv`. - * - * Generated from protobuf field string location = 1; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php deleted file mode 100644 index e846c718a831..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation.php +++ /dev/null @@ -1,467 +0,0 @@ -google.storagetransfer.v1.TransferOperation - */ -class TransferOperation extends \Google\Protobuf\Internal\Message -{ - /** - * A globally unique ID assigned by the system. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The ID of the Google Cloud project that owns the operation. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * Transfer specification. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 3; - */ - protected $transfer_spec = null; - /** - * Notification configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 10; - */ - protected $notification_config = null; - /** - * Cloud Logging configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 12; - */ - protected $logging_config = null; - /** - * Start time of this transfer execution. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * End time of this transfer execution. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - protected $end_time = null; - /** - * Status of the transfer operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOperation.Status status = 6; - */ - protected $status = 0; - /** - * Information about the progress of the transfer operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferCounters counters = 7; - */ - protected $counters = null; - /** - * Summarizes errors encountered with sample error log entries. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; - */ - private $error_breakdowns; - /** - * The name of the transfer job that triggers this transfer operation. - * - * Generated from protobuf field string transfer_job_name = 9; - */ - protected $transfer_job_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A globally unique ID assigned by the system. - * @type string $project_id - * The ID of the Google Cloud project that owns the operation. - * @type \Google\Cloud\StorageTransfer\V1\TransferSpec $transfer_spec - * Transfer specification. - * @type \Google\Cloud\StorageTransfer\V1\NotificationConfig $notification_config - * Notification configuration. - * @type \Google\Cloud\StorageTransfer\V1\LoggingConfig $logging_config - * Cloud Logging configuration. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of this transfer execution. - * @type \Google\Protobuf\Timestamp $end_time - * End time of this transfer execution. - * @type int $status - * Status of the transfer operation. - * @type \Google\Cloud\StorageTransfer\V1\TransferCounters $counters - * Information about the progress of the transfer operation. - * @type array<\Google\Cloud\StorageTransfer\V1\ErrorSummary>|\Google\Protobuf\Internal\RepeatedField $error_breakdowns - * Summarizes errors encountered with sample error log entries. - * @type string $transfer_job_name - * The name of the transfer job that triggers this transfer operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * A globally unique ID assigned by the system. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A globally unique ID assigned by the system. - * - * 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 ID of the Google Cloud project that owns the operation. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The ID of the Google Cloud project that owns the operation. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Transfer specification. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 3; - * @return \Google\Cloud\StorageTransfer\V1\TransferSpec|null - */ - public function getTransferSpec() - { - return $this->transfer_spec; - } - - public function hasTransferSpec() - { - return isset($this->transfer_spec); - } - - public function clearTransferSpec() - { - unset($this->transfer_spec); - } - - /** - * Transfer specification. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferSpec transfer_spec = 3; - * @param \Google\Cloud\StorageTransfer\V1\TransferSpec $var - * @return $this - */ - public function setTransferSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferSpec::class); - $this->transfer_spec = $var; - - return $this; - } - - /** - * Notification configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 10; - * @return \Google\Cloud\StorageTransfer\V1\NotificationConfig|null - */ - public function getNotificationConfig() - { - return $this->notification_config; - } - - public function hasNotificationConfig() - { - return isset($this->notification_config); - } - - public function clearNotificationConfig() - { - unset($this->notification_config); - } - - /** - * Notification configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.NotificationConfig notification_config = 10; - * @param \Google\Cloud\StorageTransfer\V1\NotificationConfig $var - * @return $this - */ - public function setNotificationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\NotificationConfig::class); - $this->notification_config = $var; - - return $this; - } - - /** - * Cloud Logging configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 12; - * @return \Google\Cloud\StorageTransfer\V1\LoggingConfig|null - */ - public function getLoggingConfig() - { - return $this->logging_config; - } - - public function hasLoggingConfig() - { - return isset($this->logging_config); - } - - public function clearLoggingConfig() - { - unset($this->logging_config); - } - - /** - * Cloud Logging configuration. - * - * Generated from protobuf field .google.storagetransfer.v1.LoggingConfig logging_config = 12; - * @param \Google\Cloud\StorageTransfer\V1\LoggingConfig $var - * @return $this - */ - public function setLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\LoggingConfig::class); - $this->logging_config = $var; - - return $this; - } - - /** - * Start time of this transfer execution. - * - * 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 this transfer execution. - * - * 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 this transfer execution. - * - * 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 this transfer execution. - * - * 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; - } - - /** - * Status of the transfer operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOperation.Status status = 6; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Status of the transfer operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOperation.Status status = 6; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\TransferOperation\Status::class); - $this->status = $var; - - return $this; - } - - /** - * Information about the progress of the transfer operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferCounters counters = 7; - * @return \Google\Cloud\StorageTransfer\V1\TransferCounters|null - */ - public function getCounters() - { - return $this->counters; - } - - public function hasCounters() - { - return isset($this->counters); - } - - public function clearCounters() - { - unset($this->counters); - } - - /** - * Information about the progress of the transfer operation. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferCounters counters = 7; - * @param \Google\Cloud\StorageTransfer\V1\TransferCounters $var - * @return $this - */ - public function setCounters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferCounters::class); - $this->counters = $var; - - return $this; - } - - /** - * Summarizes errors encountered with sample error log entries. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorBreakdowns() - { - return $this->error_breakdowns; - } - - /** - * Summarizes errors encountered with sample error log entries. - * - * Generated from protobuf field repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; - * @param array<\Google\Cloud\StorageTransfer\V1\ErrorSummary>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorBreakdowns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\StorageTransfer\V1\ErrorSummary::class); - $this->error_breakdowns = $arr; - - return $this; - } - - /** - * The name of the transfer job that triggers this transfer operation. - * - * Generated from protobuf field string transfer_job_name = 9; - * @return string - */ - public function getTransferJobName() - { - return $this->transfer_job_name; - } - - /** - * The name of the transfer job that triggers this transfer operation. - * - * Generated from protobuf field string transfer_job_name = 9; - * @param string $var - * @return $this - */ - public function setTransferJobName($var) - { - GPBUtil::checkString($var, True); - $this->transfer_job_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php deleted file mode 100644 index 780e98a79148..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOperation/Status.php +++ /dev/null @@ -1,99 +0,0 @@ -google.storagetransfer.v1.TransferOperation.Status - */ -class Status -{ - /** - * Zero is an illegal value. - * - * Generated from protobuf enum STATUS_UNSPECIFIED = 0; - */ - const STATUS_UNSPECIFIED = 0; - /** - * In progress. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * Paused. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * Completed successfully. - * - * Generated from protobuf enum SUCCESS = 3; - */ - const SUCCESS = 3; - /** - * Terminated due to an unrecoverable failure. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * Aborted by the user. - * - * Generated from protobuf enum ABORTED = 5; - */ - const ABORTED = 5; - /** - * Temporarily delayed by the system. No user action is required. - * - * Generated from protobuf enum QUEUED = 6; - */ - const QUEUED = 6; - /** - * The operation is suspending and draining the ongoing work to completion. - * - * Generated from protobuf enum SUSPENDING = 7; - */ - const SUSPENDING = 7; - - private static $valueToName = [ - self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::PAUSED => 'PAUSED', - self::SUCCESS => 'SUCCESS', - self::FAILED => 'FAILED', - self::ABORTED => 'ABORTED', - self::QUEUED => 'QUEUED', - self::SUSPENDING => 'SUSPENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Status::class, \Google\Cloud\StorageTransfer\V1\TransferOperation_Status::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php deleted file mode 100644 index 64ec64d7320b..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions.php +++ /dev/null @@ -1,261 +0,0 @@ -google.storagetransfer.v1.TransferOptions - */ -class TransferOptions extends \Google\Protobuf\Internal\Message -{ - /** - * When to overwrite objects that already exist in the sink. The default is - * that only objects that are different from the source are ovewritten. If - * true, all objects in the sink whose name matches an object in the source - * are overwritten with the source object. - * - * Generated from protobuf field bool overwrite_objects_already_existing_in_sink = 1; - */ - protected $overwrite_objects_already_existing_in_sink = false; - /** - * Whether objects that exist only in the sink should be deleted. - * **Note:** This option and - * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] - * are mutually exclusive. - * - * Generated from protobuf field bool delete_objects_unique_in_sink = 2; - */ - protected $delete_objects_unique_in_sink = false; - /** - * Whether objects should be deleted from the source after they are - * transferred to the sink. - * **Note:** This option and - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * are mutually exclusive. - * - * Generated from protobuf field bool delete_objects_from_source_after_transfer = 3; - */ - protected $delete_objects_from_source_after_transfer = false; - /** - * When to overwrite objects that already exist in the sink. If not set, - * overwrite behavior is determined by - * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOptions.OverwriteWhen overwrite_when = 4; - */ - protected $overwrite_when = 0; - /** - * Represents the selected metadata options for a transfer job. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions metadata_options = 5; - */ - protected $metadata_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $overwrite_objects_already_existing_in_sink - * When to overwrite objects that already exist in the sink. The default is - * that only objects that are different from the source are ovewritten. If - * true, all objects in the sink whose name matches an object in the source - * are overwritten with the source object. - * @type bool $delete_objects_unique_in_sink - * Whether objects that exist only in the sink should be deleted. - * **Note:** This option and - * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] - * are mutually exclusive. - * @type bool $delete_objects_from_source_after_transfer - * Whether objects should be deleted from the source after they are - * transferred to the sink. - * **Note:** This option and - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * are mutually exclusive. - * @type int $overwrite_when - * When to overwrite objects that already exist in the sink. If not set, - * overwrite behavior is determined by - * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. - * @type \Google\Cloud\StorageTransfer\V1\MetadataOptions $metadata_options - * Represents the selected metadata options for a transfer job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * When to overwrite objects that already exist in the sink. The default is - * that only objects that are different from the source are ovewritten. If - * true, all objects in the sink whose name matches an object in the source - * are overwritten with the source object. - * - * Generated from protobuf field bool overwrite_objects_already_existing_in_sink = 1; - * @return bool - */ - public function getOverwriteObjectsAlreadyExistingInSink() - { - return $this->overwrite_objects_already_existing_in_sink; - } - - /** - * When to overwrite objects that already exist in the sink. The default is - * that only objects that are different from the source are ovewritten. If - * true, all objects in the sink whose name matches an object in the source - * are overwritten with the source object. - * - * Generated from protobuf field bool overwrite_objects_already_existing_in_sink = 1; - * @param bool $var - * @return $this - */ - public function setOverwriteObjectsAlreadyExistingInSink($var) - { - GPBUtil::checkBool($var); - $this->overwrite_objects_already_existing_in_sink = $var; - - return $this; - } - - /** - * Whether objects that exist only in the sink should be deleted. - * **Note:** This option and - * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] - * are mutually exclusive. - * - * Generated from protobuf field bool delete_objects_unique_in_sink = 2; - * @return bool - */ - public function getDeleteObjectsUniqueInSink() - { - return $this->delete_objects_unique_in_sink; - } - - /** - * Whether objects that exist only in the sink should be deleted. - * **Note:** This option and - * [delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] - * are mutually exclusive. - * - * Generated from protobuf field bool delete_objects_unique_in_sink = 2; - * @param bool $var - * @return $this - */ - public function setDeleteObjectsUniqueInSink($var) - { - GPBUtil::checkBool($var); - $this->delete_objects_unique_in_sink = $var; - - return $this; - } - - /** - * Whether objects should be deleted from the source after they are - * transferred to the sink. - * **Note:** This option and - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * are mutually exclusive. - * - * Generated from protobuf field bool delete_objects_from_source_after_transfer = 3; - * @return bool - */ - public function getDeleteObjectsFromSourceAfterTransfer() - { - return $this->delete_objects_from_source_after_transfer; - } - - /** - * Whether objects should be deleted from the source after they are - * transferred to the sink. - * **Note:** This option and - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * are mutually exclusive. - * - * Generated from protobuf field bool delete_objects_from_source_after_transfer = 3; - * @param bool $var - * @return $this - */ - public function setDeleteObjectsFromSourceAfterTransfer($var) - { - GPBUtil::checkBool($var); - $this->delete_objects_from_source_after_transfer = $var; - - return $this; - } - - /** - * When to overwrite objects that already exist in the sink. If not set, - * overwrite behavior is determined by - * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOptions.OverwriteWhen overwrite_when = 4; - * @return int - */ - public function getOverwriteWhen() - { - return $this->overwrite_when; - } - - /** - * When to overwrite objects that already exist in the sink. If not set, - * overwrite behavior is determined by - * [overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink]. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOptions.OverwriteWhen overwrite_when = 4; - * @param int $var - * @return $this - */ - public function setOverwriteWhen($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\StorageTransfer\V1\TransferOptions\OverwriteWhen::class); - $this->overwrite_when = $var; - - return $this; - } - - /** - * Represents the selected metadata options for a transfer job. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions metadata_options = 5; - * @return \Google\Cloud\StorageTransfer\V1\MetadataOptions|null - */ - public function getMetadataOptions() - { - return $this->metadata_options; - } - - public function hasMetadataOptions() - { - return isset($this->metadata_options); - } - - public function clearMetadataOptions() - { - unset($this->metadata_options); - } - - /** - * Represents the selected metadata options for a transfer job. - * - * Generated from protobuf field .google.storagetransfer.v1.MetadataOptions metadata_options = 5; - * @param \Google\Cloud\StorageTransfer\V1\MetadataOptions $var - * @return $this - */ - public function setMetadataOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\MetadataOptions::class); - $this->metadata_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php deleted file mode 100644 index c8287bcc3efd..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferOptions/OverwriteWhen.php +++ /dev/null @@ -1,75 +0,0 @@ -google.storagetransfer.v1.TransferOptions.OverwriteWhen - */ -class OverwriteWhen -{ - /** - * Overwrite behavior is unspecified. - * - * Generated from protobuf enum OVERWRITE_WHEN_UNSPECIFIED = 0; - */ - const OVERWRITE_WHEN_UNSPECIFIED = 0; - /** - * Overwrites destination objects with the source objects, only if the - * objects have the same name but different HTTP ETags or checksum values. - * - * Generated from protobuf enum DIFFERENT = 1; - */ - const DIFFERENT = 1; - /** - * Never overwrites a destination object if a source object has the - * same name. In this case, the source object is not transferred. - * - * Generated from protobuf enum NEVER = 2; - */ - const NEVER = 2; - /** - * Always overwrite the destination object with the source object, even if - * the HTTP Etags or checksum values are the same. - * - * Generated from protobuf enum ALWAYS = 3; - */ - const ALWAYS = 3; - - private static $valueToName = [ - self::OVERWRITE_WHEN_UNSPECIFIED => 'OVERWRITE_WHEN_UNSPECIFIED', - self::DIFFERENT => 'DIFFERENT', - self::NEVER => 'NEVER', - self::ALWAYS => 'ALWAYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OverwriteWhen::class, \Google\Cloud\StorageTransfer\V1\TransferOptions_OverwriteWhen::class); - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php deleted file mode 100644 index 28466a839393..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/TransferSpec.php +++ /dev/null @@ -1,642 +0,0 @@ -google.storagetransfer.v1.TransferSpec - */ -class TransferSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Only objects that satisfy these object conditions are included in the set - * of data source and data sink objects. Object conditions based on - * objects' "last modification time" do not exclude objects in a data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.ObjectConditions object_conditions = 5; - */ - protected $object_conditions = null; - /** - * If the option - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * is `true` and time-based object conditions such as 'last modification time' - * are specified, the request fails with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOptions transfer_options = 6; - */ - protected $transfer_options = null; - /** - * A manifest file provides a list of objects to be transferred from the data - * source. This field points to the location of the manifest file. - * Otherwise, the entire source bucket is used. ObjectConditions still apply. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferManifest transfer_manifest = 15; - */ - protected $transfer_manifest = null; - /** - * Specifies the agent pool name associated with the posix data source. When - * unspecified, the default name is used. - * - * Generated from protobuf field string source_agent_pool_name = 17; - */ - protected $source_agent_pool_name = ''; - /** - * Specifies the agent pool name associated with the posix data sink. When - * unspecified, the default name is used. - * - * Generated from protobuf field string sink_agent_pool_name = 18; - */ - protected $sink_agent_pool_name = ''; - protected $data_sink; - protected $data_source; - protected $intermediate_data_location; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\StorageTransfer\V1\GcsData $gcs_data_sink - * A Cloud Storage data sink. - * @type \Google\Cloud\StorageTransfer\V1\PosixFilesystem $posix_data_sink - * A POSIX Filesystem data sink. - * @type \Google\Cloud\StorageTransfer\V1\GcsData $gcs_data_source - * A Cloud Storage data source. - * @type \Google\Cloud\StorageTransfer\V1\AwsS3Data $aws_s3_data_source - * An AWS S3 data source. - * @type \Google\Cloud\StorageTransfer\V1\HttpData $http_data_source - * An HTTP URL data source. - * @type \Google\Cloud\StorageTransfer\V1\PosixFilesystem $posix_data_source - * A POSIX Filesystem data source. - * @type \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData $azure_blob_storage_data_source - * An Azure Blob Storage data source. - * @type \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData $aws_s3_compatible_data_source - * An AWS S3 compatible data source. - * @type \Google\Cloud\StorageTransfer\V1\HdfsData $hdfs_data_source - * An HDFS cluster data source. - * @type \Google\Cloud\StorageTransfer\V1\GcsData $gcs_intermediate_data_location - * For transfers between file systems, specifies a Cloud Storage bucket - * to be used as an intermediate location through which to transfer data. - * See [Transfer data between file - * systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for - * more information. - * @type \Google\Cloud\StorageTransfer\V1\ObjectConditions $object_conditions - * Only objects that satisfy these object conditions are included in the set - * of data source and data sink objects. Object conditions based on - * objects' "last modification time" do not exclude objects in a data sink. - * @type \Google\Cloud\StorageTransfer\V1\TransferOptions $transfer_options - * If the option - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * is `true` and time-based object conditions such as 'last modification time' - * are specified, the request fails with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * @type \Google\Cloud\StorageTransfer\V1\TransferManifest $transfer_manifest - * A manifest file provides a list of objects to be transferred from the data - * source. This field points to the location of the manifest file. - * Otherwise, the entire source bucket is used. ObjectConditions still apply. - * @type string $source_agent_pool_name - * Specifies the agent pool name associated with the posix data source. When - * unspecified, the default name is used. - * @type string $sink_agent_pool_name - * Specifies the agent pool name associated with the posix data sink. When - * unspecified, the default name is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\TransferTypes::initOnce(); - parent::__construct($data); - } - - /** - * A Cloud Storage data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_sink = 4; - * @return \Google\Cloud\StorageTransfer\V1\GcsData|null - */ - public function getGcsDataSink() - { - return $this->readOneof(4); - } - - public function hasGcsDataSink() - { - return $this->hasOneof(4); - } - - /** - * A Cloud Storage data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_sink = 4; - * @param \Google\Cloud\StorageTransfer\V1\GcsData $var - * @return $this - */ - public function setGcsDataSink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\GcsData::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A POSIX Filesystem data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_sink = 13; - * @return \Google\Cloud\StorageTransfer\V1\PosixFilesystem|null - */ - public function getPosixDataSink() - { - return $this->readOneof(13); - } - - public function hasPosixDataSink() - { - return $this->hasOneof(13); - } - - /** - * A POSIX Filesystem data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_sink = 13; - * @param \Google\Cloud\StorageTransfer\V1\PosixFilesystem $var - * @return $this - */ - public function setPosixDataSink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\PosixFilesystem::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * A Cloud Storage data source. - * - * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_source = 1; - * @return \Google\Cloud\StorageTransfer\V1\GcsData|null - */ - public function getGcsDataSource() - { - return $this->readOneof(1); - } - - public function hasGcsDataSource() - { - return $this->hasOneof(1); - } - - /** - * A Cloud Storage data source. - * - * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_data_source = 1; - * @param \Google\Cloud\StorageTransfer\V1\GcsData $var - * @return $this - */ - public function setGcsDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\GcsData::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An AWS S3 data source. - * - * Generated from protobuf field .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; - * @return \Google\Cloud\StorageTransfer\V1\AwsS3Data|null - */ - public function getAwsS3DataSource() - { - return $this->readOneof(2); - } - - public function hasAwsS3DataSource() - { - return $this->hasOneof(2); - } - - /** - * An AWS S3 data source. - * - * Generated from protobuf field .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; - * @param \Google\Cloud\StorageTransfer\V1\AwsS3Data $var - * @return $this - */ - public function setAwsS3DataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AwsS3Data::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An HTTP URL data source. - * - * Generated from protobuf field .google.storagetransfer.v1.HttpData http_data_source = 3; - * @return \Google\Cloud\StorageTransfer\V1\HttpData|null - */ - public function getHttpDataSource() - { - return $this->readOneof(3); - } - - public function hasHttpDataSource() - { - return $this->hasOneof(3); - } - - /** - * An HTTP URL data source. - * - * Generated from protobuf field .google.storagetransfer.v1.HttpData http_data_source = 3; - * @param \Google\Cloud\StorageTransfer\V1\HttpData $var - * @return $this - */ - public function setHttpDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\HttpData::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A POSIX Filesystem data source. - * - * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_source = 14; - * @return \Google\Cloud\StorageTransfer\V1\PosixFilesystem|null - */ - public function getPosixDataSource() - { - return $this->readOneof(14); - } - - public function hasPosixDataSource() - { - return $this->hasOneof(14); - } - - /** - * A POSIX Filesystem data source. - * - * Generated from protobuf field .google.storagetransfer.v1.PosixFilesystem posix_data_source = 14; - * @param \Google\Cloud\StorageTransfer\V1\PosixFilesystem $var - * @return $this - */ - public function setPosixDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\PosixFilesystem::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * An Azure Blob Storage data source. - * - * Generated from protobuf field .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; - * @return \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData|null - */ - public function getAzureBlobStorageDataSource() - { - return $this->readOneof(8); - } - - public function hasAzureBlobStorageDataSource() - { - return $this->hasOneof(8); - } - - /** - * An Azure Blob Storage data source. - * - * Generated from protobuf field .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; - * @param \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData $var - * @return $this - */ - public function setAzureBlobStorageDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AzureBlobStorageData::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * An AWS S3 compatible data source. - * - * Generated from protobuf field .google.storagetransfer.v1.AwsS3CompatibleData aws_s3_compatible_data_source = 19; - * @return \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData|null - */ - public function getAwsS3CompatibleDataSource() - { - return $this->readOneof(19); - } - - public function hasAwsS3CompatibleDataSource() - { - return $this->hasOneof(19); - } - - /** - * An AWS S3 compatible data source. - * - * Generated from protobuf field .google.storagetransfer.v1.AwsS3CompatibleData aws_s3_compatible_data_source = 19; - * @param \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData $var - * @return $this - */ - public function setAwsS3CompatibleDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AwsS3CompatibleData::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * An HDFS cluster data source. - * - * Generated from protobuf field .google.storagetransfer.v1.HdfsData hdfs_data_source = 20; - * @return \Google\Cloud\StorageTransfer\V1\HdfsData|null - */ - public function getHdfsDataSource() - { - return $this->readOneof(20); - } - - public function hasHdfsDataSource() - { - return $this->hasOneof(20); - } - - /** - * An HDFS cluster data source. - * - * Generated from protobuf field .google.storagetransfer.v1.HdfsData hdfs_data_source = 20; - * @param \Google\Cloud\StorageTransfer\V1\HdfsData $var - * @return $this - */ - public function setHdfsDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\HdfsData::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * For transfers between file systems, specifies a Cloud Storage bucket - * to be used as an intermediate location through which to transfer data. - * See [Transfer data between file - * systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for - * more information. - * - * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_intermediate_data_location = 16; - * @return \Google\Cloud\StorageTransfer\V1\GcsData|null - */ - public function getGcsIntermediateDataLocation() - { - return $this->readOneof(16); - } - - public function hasGcsIntermediateDataLocation() - { - return $this->hasOneof(16); - } - - /** - * For transfers between file systems, specifies a Cloud Storage bucket - * to be used as an intermediate location through which to transfer data. - * See [Transfer data between file - * systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for - * more information. - * - * Generated from protobuf field .google.storagetransfer.v1.GcsData gcs_intermediate_data_location = 16; - * @param \Google\Cloud\StorageTransfer\V1\GcsData $var - * @return $this - */ - public function setGcsIntermediateDataLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\GcsData::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Only objects that satisfy these object conditions are included in the set - * of data source and data sink objects. Object conditions based on - * objects' "last modification time" do not exclude objects in a data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.ObjectConditions object_conditions = 5; - * @return \Google\Cloud\StorageTransfer\V1\ObjectConditions|null - */ - public function getObjectConditions() - { - return $this->object_conditions; - } - - public function hasObjectConditions() - { - return isset($this->object_conditions); - } - - public function clearObjectConditions() - { - unset($this->object_conditions); - } - - /** - * Only objects that satisfy these object conditions are included in the set - * of data source and data sink objects. Object conditions based on - * objects' "last modification time" do not exclude objects in a data sink. - * - * Generated from protobuf field .google.storagetransfer.v1.ObjectConditions object_conditions = 5; - * @param \Google\Cloud\StorageTransfer\V1\ObjectConditions $var - * @return $this - */ - public function setObjectConditions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\ObjectConditions::class); - $this->object_conditions = $var; - - return $this; - } - - /** - * If the option - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * is `true` and time-based object conditions such as 'last modification time' - * are specified, the request fails with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOptions transfer_options = 6; - * @return \Google\Cloud\StorageTransfer\V1\TransferOptions|null - */ - public function getTransferOptions() - { - return $this->transfer_options; - } - - public function hasTransferOptions() - { - return isset($this->transfer_options); - } - - public function clearTransferOptions() - { - unset($this->transfer_options); - } - - /** - * If the option - * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] - * is `true` and time-based object conditions such as 'last modification time' - * are specified, the request fails with an - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferOptions transfer_options = 6; - * @param \Google\Cloud\StorageTransfer\V1\TransferOptions $var - * @return $this - */ - public function setTransferOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferOptions::class); - $this->transfer_options = $var; - - return $this; - } - - /** - * A manifest file provides a list of objects to be transferred from the data - * source. This field points to the location of the manifest file. - * Otherwise, the entire source bucket is used. ObjectConditions still apply. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferManifest transfer_manifest = 15; - * @return \Google\Cloud\StorageTransfer\V1\TransferManifest|null - */ - public function getTransferManifest() - { - return $this->transfer_manifest; - } - - public function hasTransferManifest() - { - return isset($this->transfer_manifest); - } - - public function clearTransferManifest() - { - unset($this->transfer_manifest); - } - - /** - * A manifest file provides a list of objects to be transferred from the data - * source. This field points to the location of the manifest file. - * Otherwise, the entire source bucket is used. ObjectConditions still apply. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferManifest transfer_manifest = 15; - * @param \Google\Cloud\StorageTransfer\V1\TransferManifest $var - * @return $this - */ - public function setTransferManifest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferManifest::class); - $this->transfer_manifest = $var; - - return $this; - } - - /** - * Specifies the agent pool name associated with the posix data source. When - * unspecified, the default name is used. - * - * Generated from protobuf field string source_agent_pool_name = 17; - * @return string - */ - public function getSourceAgentPoolName() - { - return $this->source_agent_pool_name; - } - - /** - * Specifies the agent pool name associated with the posix data source. When - * unspecified, the default name is used. - * - * Generated from protobuf field string source_agent_pool_name = 17; - * @param string $var - * @return $this - */ - public function setSourceAgentPoolName($var) - { - GPBUtil::checkString($var, True); - $this->source_agent_pool_name = $var; - - return $this; - } - - /** - * Specifies the agent pool name associated with the posix data sink. When - * unspecified, the default name is used. - * - * Generated from protobuf field string sink_agent_pool_name = 18; - * @return string - */ - public function getSinkAgentPoolName() - { - return $this->sink_agent_pool_name; - } - - /** - * Specifies the agent pool name associated with the posix data sink. When - * unspecified, the default name is used. - * - * Generated from protobuf field string sink_agent_pool_name = 18; - * @param string $var - * @return $this - */ - public function setSinkAgentPoolName($var) - { - GPBUtil::checkString($var, True); - $this->sink_agent_pool_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getDataSink() - { - return $this->whichOneof("data_sink"); - } - - /** - * @return string - */ - public function getDataSource() - { - return $this->whichOneof("data_source"); - } - - /** - * @return string - */ - public function getIntermediateDataLocation() - { - return $this->whichOneof("intermediate_data_location"); - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php deleted file mode 100644 index 5be6031ef1f1..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateAgentPoolRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.storagetransfer.v1.UpdateAgentPoolRequest - */ -class UpdateAgentPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The agent pool to update. `agent_pool` is expected to specify - * following fields: - * * [name][google.storagetransfer.v1.AgentPool.name] - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * An `UpdateAgentPoolRequest` with any other fields is rejected - * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $agent_pool = null; - /** - * The [field mask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) - * of the fields in `agentPool` to update in this request. - * The following `agentPool` fields can be updated: - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\StorageTransfer\V1\AgentPool $agentPool Required. The agent pool to update. `agent_pool` is expected to specify - * following fields: - * - * * [name][google.storagetransfer.v1.AgentPool.name] - * - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * An `UpdateAgentPoolRequest` with any other fields is rejected - * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * @param \Google\Protobuf\FieldMask $updateMask The [field mask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) - * of the fields in `agentPool` to update in this request. - * The following `agentPool` fields can be updated: - * - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * - * @return \Google\Cloud\StorageTransfer\V1\UpdateAgentPoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\StorageTransfer\V1\AgentPool $agentPool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAgentPool($agentPool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\StorageTransfer\V1\AgentPool $agent_pool - * Required. The agent pool to update. `agent_pool` is expected to specify - * following fields: - * * [name][google.storagetransfer.v1.AgentPool.name] - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * An `UpdateAgentPoolRequest` with any other fields is rejected - * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * @type \Google\Protobuf\FieldMask $update_mask - * The [field mask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) - * of the fields in `agentPool` to update in this request. - * The following `agentPool` fields can be updated: - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The agent pool to update. `agent_pool` is expected to specify - * following fields: - * * [name][google.storagetransfer.v1.AgentPool.name] - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * An `UpdateAgentPoolRequest` with any other fields is rejected - * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\StorageTransfer\V1\AgentPool|null - */ - public function getAgentPool() - { - return $this->agent_pool; - } - - public function hasAgentPool() - { - return isset($this->agent_pool); - } - - public function clearAgentPool() - { - unset($this->agent_pool); - } - - /** - * Required. The agent pool to update. `agent_pool` is expected to specify - * following fields: - * * [name][google.storagetransfer.v1.AgentPool.name] - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * An `UpdateAgentPoolRequest` with any other fields is rejected - * with the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field .google.storagetransfer.v1.AgentPool agent_pool = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\StorageTransfer\V1\AgentPool $var - * @return $this - */ - public function setAgentPool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\AgentPool::class); - $this->agent_pool = $var; - - return $this; - } - - /** - * The [field mask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) - * of the fields in `agentPool` to update in this request. - * The following `agentPool` fields can be updated: - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * - * 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 [field mask] - * (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) - * of the fields in `agentPool` to update in this request. - * The following `agentPool` fields can be updated: - * * [display_name][google.storagetransfer.v1.AgentPool.display_name] - * * [bandwidth_limit][google.storagetransfer.v1.AgentPool.bandwidth_limit] - * - * 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/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php b/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php deleted file mode 100644 index 569b3c14ca52..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/proto/src/Google/Cloud/StorageTransfer/V1/UpdateTransferJobRequest.php +++ /dev/null @@ -1,277 +0,0 @@ -google.storagetransfer.v1.UpdateTransferJobRequest - */ -class UpdateTransferJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of job to update. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_name = ''; - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The job to update. `transferJob` is expected to specify one or - * more of five fields: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. An - * `UpdateTransferJobRequest` that specifies other fields are rejected with - * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a - * job status to - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires - * `storagetransfer.jobs.delete` permission. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transfer_job = null; - /** - * The field mask of the fields in `transferJob` that are to be updated in - * this request. Fields in `transferJob` that can be updated are: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. To update the - * `transfer_spec` of the job, a complete transfer specification must be - * provided. An incomplete specification missing any required fields is - * rejected with the error - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_transfer_job_field_mask = 4; - */ - protected $update_transfer_job_field_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $job_name - * Required. The name of job to update. - * @type string $project_id - * Required. The ID of the Google Cloud project that owns the - * job. - * @type \Google\Cloud\StorageTransfer\V1\TransferJob $transfer_job - * Required. The job to update. `transferJob` is expected to specify one or - * more of five fields: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. An - * `UpdateTransferJobRequest` that specifies other fields are rejected with - * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a - * job status to - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires - * `storagetransfer.jobs.delete` permission. - * @type \Google\Protobuf\FieldMask $update_transfer_job_field_mask - * The field mask of the fields in `transferJob` that are to be updated in - * this request. Fields in `transferJob` that can be updated are: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. To update the - * `transfer_spec` of the job, a complete transfer specification must be - * provided. An incomplete specification missing any required fields is - * rejected with the error - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storagetransfer\V1\Transfer::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of job to update. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobName() - { - return $this->job_name; - } - - /** - * Required. The name of job to update. - * - * Generated from protobuf field string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobName($var) - { - GPBUtil::checkString($var, True); - $this->job_name = $var; - - return $this; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The ID of the Google Cloud project that owns the - * job. - * - * Generated from protobuf field string project_id = 2 [(.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 job to update. `transferJob` is expected to specify one or - * more of five fields: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. An - * `UpdateTransferJobRequest` that specifies other fields are rejected with - * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a - * job status to - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires - * `storagetransfer.jobs.delete` permission. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\StorageTransfer\V1\TransferJob|null - */ - public function getTransferJob() - { - return $this->transfer_job; - } - - public function hasTransferJob() - { - return isset($this->transfer_job); - } - - public function clearTransferJob() - { - unset($this->transfer_job); - } - - /** - * Required. The job to update. `transferJob` is expected to specify one or - * more of five fields: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. An - * `UpdateTransferJobRequest` that specifies other fields are rejected with - * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a - * job status to - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires - * `storagetransfer.jobs.delete` permission. - * - * Generated from protobuf field .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\StorageTransfer\V1\TransferJob $var - * @return $this - */ - public function setTransferJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\StorageTransfer\V1\TransferJob::class); - $this->transfer_job = $var; - - return $this; - } - - /** - * The field mask of the fields in `transferJob` that are to be updated in - * this request. Fields in `transferJob` that can be updated are: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. To update the - * `transfer_spec` of the job, a complete transfer specification must be - * provided. An incomplete specification missing any required fields is - * rejected with the error - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_transfer_job_field_mask = 4; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateTransferJobFieldMask() - { - return $this->update_transfer_job_field_mask; - } - - public function hasUpdateTransferJobFieldMask() - { - return isset($this->update_transfer_job_field_mask); - } - - public function clearUpdateTransferJobFieldMask() - { - unset($this->update_transfer_job_field_mask); - } - - /** - * The field mask of the fields in `transferJob` that are to be updated in - * this request. Fields in `transferJob` that can be updated are: - * [description][google.storagetransfer.v1.TransferJob.description], - * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], - * [notification_config][google.storagetransfer.v1.TransferJob.notification_config], - * [logging_config][google.storagetransfer.v1.TransferJob.logging_config], and - * [status][google.storagetransfer.v1.TransferJob.status]. To update the - * `transfer_spec` of the job, a complete transfer specification must be - * provided. An incomplete specification missing any required fields is - * rejected with the error - * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_transfer_job_field_mask = 4; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateTransferJobFieldMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_transfer_job_field_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php deleted file mode 100644 index 32cce959bf7c..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_agent_pool.php +++ /dev/null @@ -1,96 +0,0 @@ -setName($agentPoolName); - $request = (new CreateAgentPoolRequest()) - ->setProjectId($projectId) - ->setAgentPool($agentPool) - ->setAgentPoolId($agentPoolId); - - // Call the API and handle any network failures. - try { - /** @var AgentPool $response */ - $response = $storageTransferServiceClient->createAgentPool($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]'; - $agentPoolName = '[NAME]'; - $agentPoolId = '[AGENT_POOL_ID]'; - - create_agent_pool_sample($projectId, $agentPoolName, $agentPoolId); -} -// [END storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php deleted file mode 100644 index d438f00b0091..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/create_transfer_job.php +++ /dev/null @@ -1,59 +0,0 @@ -setTransferJob($transferJob); - - // Call the API and handle any network failures. - try { - /** @var TransferJob $response */ - $response = $storageTransferServiceClient->createTransferJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php deleted file mode 100644 index 67fc8d9b15cd..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_agent_pool.php +++ /dev/null @@ -1,68 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $storageTransferServiceClient->deleteAgentPool($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_agent_pool_sample($name); -} -// [END storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php deleted file mode 100644 index 07ebf77d734a..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/delete_transfer_job.php +++ /dev/null @@ -1,73 +0,0 @@ -setJobName($jobName) - ->setProjectId($projectId); - - // Call the API and handle any network failures. - try { - $storageTransferServiceClient->deleteTransferJob($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 -{ - $jobName = '[JOB_NAME]'; - $projectId = '[PROJECT_ID]'; - - delete_transfer_job_sample($jobName, $projectId); -} -// [END storagetransfer_v1_generated_StorageTransferService_DeleteTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php deleted file mode 100644 index f5eeed1e2477..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_agent_pool.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var AgentPool $response */ - $response = $storageTransferServiceClient->getAgentPool($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_agent_pool_sample($name); -} -// [END storagetransfer_v1_generated_StorageTransferService_GetAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php deleted file mode 100644 index 33ace4d42240..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_google_service_account.php +++ /dev/null @@ -1,78 +0,0 @@ -setProjectId($projectId); - - // Call the API and handle any network failures. - try { - /** @var GoogleServiceAccount $response */ - $response = $storageTransferServiceClient->getGoogleServiceAccount($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]'; - - get_google_service_account_sample($projectId); -} -// [END storagetransfer_v1_generated_StorageTransferService_GetGoogleServiceAccount_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php deleted file mode 100644 index 0c91f0f8b622..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/get_transfer_job.php +++ /dev/null @@ -1,74 +0,0 @@ -setJobName($jobName) - ->setProjectId($projectId); - - // Call the API and handle any network failures. - try { - /** @var TransferJob $response */ - $response = $storageTransferServiceClient->getTransferJob($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 -{ - $jobName = '[JOB_NAME]'; - $projectId = '[PROJECT_ID]'; - - get_transfer_job_sample($jobName, $projectId); -} -// [END storagetransfer_v1_generated_StorageTransferService_GetTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php deleted file mode 100644 index e5d6660252e5..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_agent_pools.php +++ /dev/null @@ -1,75 +0,0 @@ -setProjectId($projectId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageTransferServiceClient->listAgentPools($request); - - /** @var AgentPool $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_agent_pools_sample($projectId); -} -// [END storagetransfer_v1_generated_StorageTransferService_ListAgentPools_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php deleted file mode 100644 index 1cfc07fd6efb..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/list_transfer_jobs.php +++ /dev/null @@ -1,86 +0,0 @@ -setFilter($filter); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageTransferServiceClient->listTransferJobs($request); - - /** @var TransferJob $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 -{ - $filter = '[FILTER]'; - - list_transfer_jobs_sample($filter); -} -// [END storagetransfer_v1_generated_StorageTransferService_ListTransferJobs_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php deleted file mode 100644 index bbd600ef9754..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/pause_transfer_operation.php +++ /dev/null @@ -1,68 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $storageTransferServiceClient->pauseTransferOperation($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]'; - - pause_transfer_operation_sample($name); -} -// [END storagetransfer_v1_generated_StorageTransferService_PauseTransferOperation_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php deleted file mode 100644 index 8c24f0462fb6..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/resume_transfer_operation.php +++ /dev/null @@ -1,68 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $storageTransferServiceClient->resumeTransferOperation($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]'; - - resume_transfer_operation_sample($name); -} -// [END storagetransfer_v1_generated_StorageTransferService_ResumeTransferOperation_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php deleted file mode 100644 index 92fe27f2d8fe..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/run_transfer_job.php +++ /dev/null @@ -1,86 +0,0 @@ -setJobName($jobName) - ->setProjectId($projectId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $storageTransferServiceClient->runTransferJob($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 -{ - $jobName = '[JOB_NAME]'; - $projectId = '[PROJECT_ID]'; - - run_transfer_job_sample($jobName, $projectId); -} -// [END storagetransfer_v1_generated_StorageTransferService_RunTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php deleted file mode 100644 index 3fb072f3e14a..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_agent_pool.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($agentPoolName); - $request = (new UpdateAgentPoolRequest()) - ->setAgentPool($agentPool); - - // Call the API and handle any network failures. - try { - /** @var AgentPool $response */ - $response = $storageTransferServiceClient->updateAgentPool($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 -{ - $agentPoolName = '[NAME]'; - - update_agent_pool_sample($agentPoolName); -} -// [END storagetransfer_v1_generated_StorageTransferService_UpdateAgentPool_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php b/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php deleted file mode 100644 index 07be9c36746b..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/samples/V1/StorageTransferServiceClient/update_transfer_job.php +++ /dev/null @@ -1,83 +0,0 @@ -setJobName($jobName) - ->setProjectId($projectId) - ->setTransferJob($transferJob); - - // Call the API and handle any network failures. - try { - /** @var TransferJob $response */ - $response = $storageTransferServiceClient->updateTransferJob($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 -{ - $jobName = '[JOB_NAME]'; - $projectId = '[PROJECT_ID]'; - - update_transfer_job_sample($jobName, $projectId); -} -// [END storagetransfer_v1_generated_StorageTransferService_UpdateTransferJob_sync] diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php b/owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php deleted file mode 100644 index ad0aa911baff..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/src/V1/Client/StorageTransferServiceClient.php +++ /dev/null @@ -1,684 +0,0 @@ - createAgentPoolAsync(CreateAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTransferJobAsync(CreateTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAgentPoolAsync(DeleteAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTransferJobAsync(DeleteTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAgentPoolAsync(GetAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGoogleServiceAccountAsync(GetGoogleServiceAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTransferJobAsync(GetTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAgentPoolsAsync(ListAgentPoolsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTransferJobsAsync(ListTransferJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseTransferOperationAsync(PauseTransferOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeTransferOperationAsync(ResumeTransferOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface runTransferJobAsync(RunTransferJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAgentPoolAsync(UpdateAgentPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTransferJobAsync(UpdateTransferJobRequest $request, array $optionalArgs = []) - */ -final class StorageTransferServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.storagetransfer.v1.StorageTransferService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'storagetransfer.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'storagetransfer.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/storage_transfer_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_transfer_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_transfer_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/storage_transfer_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 agent_pools - * resource. - * - * @param string $projectId - * @param string $agentPoolId - * - * @return string The formatted agent_pools resource. - */ - public static function agentPoolsName(string $projectId, string $agentPoolId): string - { - return self::getPathTemplate('agentPools')->render([ - 'project_id' => $projectId, - 'agent_pool_id' => $agentPoolId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - agentPools: projects/{project_id}/agentPools/{agent_pool_id} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'storagetransfer.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an agent pool resource. - * - * The async variant is {@see StorageTransferServiceClient::createAgentPoolAsync()} - * . - * - * @example samples/V1/StorageTransferServiceClient/create_agent_pool.php - * - * @param CreateAgentPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AgentPool - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAgentPool(CreateAgentPoolRequest $request, array $callOptions = []): AgentPool - { - return $this->startApiCall('CreateAgentPool', $request, $callOptions)->wait(); - } - - /** - * Creates a transfer job that runs periodically. - * - * The async variant is - * {@see StorageTransferServiceClient::createTransferJobAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/create_transfer_job.php - * - * @param CreateTransferJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTransferJob(CreateTransferJobRequest $request, array $callOptions = []): TransferJob - { - return $this->startApiCall('CreateTransferJob', $request, $callOptions)->wait(); - } - - /** - * Deletes an agent pool. - * - * The async variant is {@see StorageTransferServiceClient::deleteAgentPoolAsync()} - * . - * - * @example samples/V1/StorageTransferServiceClient/delete_agent_pool.php - * - * @param DeleteAgentPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAgentPool(DeleteAgentPoolRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAgentPool', $request, $callOptions)->wait(); - } - - /** - * Deletes a transfer job. Deleting a transfer job sets its status to - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. - * - * The async variant is - * {@see StorageTransferServiceClient::deleteTransferJobAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/delete_transfer_job.php - * - * @param DeleteTransferJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteTransferJob(DeleteTransferJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTransferJob', $request, $callOptions)->wait(); - } - - /** - * Gets an agent pool. - * - * The async variant is {@see StorageTransferServiceClient::getAgentPoolAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/get_agent_pool.php - * - * @param GetAgentPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AgentPool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAgentPool(GetAgentPoolRequest $request, array $callOptions = []): AgentPool - { - return $this->startApiCall('GetAgentPool', $request, $callOptions)->wait(); - } - - /** - * Returns the Google service account that is used by Storage Transfer - * Service to access buckets in the project where transfers - * run or in other projects. Each Google service account is associated - * with one Google Cloud project. Users - * should add this service account to the Google Cloud Storage bucket - * ACLs to grant access to Storage Transfer Service. This service - * account is created and owned by Storage Transfer Service and can - * only be used by Storage Transfer Service. - * - * The async variant is - * {@see StorageTransferServiceClient::getGoogleServiceAccountAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/get_google_service_account.php - * - * @param GetGoogleServiceAccountRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GoogleServiceAccount - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGoogleServiceAccount(GetGoogleServiceAccountRequest $request, array $callOptions = []): GoogleServiceAccount - { - return $this->startApiCall('GetGoogleServiceAccount', $request, $callOptions)->wait(); - } - - /** - * Gets a transfer job. - * - * The async variant is {@see StorageTransferServiceClient::getTransferJobAsync()} - * . - * - * @example samples/V1/StorageTransferServiceClient/get_transfer_job.php - * - * @param GetTransferJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTransferJob(GetTransferJobRequest $request, array $callOptions = []): TransferJob - { - return $this->startApiCall('GetTransferJob', $request, $callOptions)->wait(); - } - - /** - * Lists agent pools. - * - * The async variant is {@see StorageTransferServiceClient::listAgentPoolsAsync()} - * . - * - * @example samples/V1/StorageTransferServiceClient/list_agent_pools.php - * - * @param ListAgentPoolsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAgentPools(ListAgentPoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAgentPools', $request, $callOptions); - } - - /** - * Lists transfer jobs. - * - * The async variant is - * {@see StorageTransferServiceClient::listTransferJobsAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/list_transfer_jobs.php - * - * @param ListTransferJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTransferJobs(ListTransferJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTransferJobs', $request, $callOptions); - } - - /** - * Pauses a transfer operation. - * - * The async variant is - * {@see StorageTransferServiceClient::pauseTransferOperationAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/pause_transfer_operation.php - * - * @param PauseTransferOperationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 pauseTransferOperation(PauseTransferOperationRequest $request, array $callOptions = []): void - { - $this->startApiCall('PauseTransferOperation', $request, $callOptions)->wait(); - } - - /** - * Resumes a transfer operation that is paused. - * - * The async variant is - * {@see StorageTransferServiceClient::resumeTransferOperationAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/resume_transfer_operation.php - * - * @param ResumeTransferOperationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 resumeTransferOperation(ResumeTransferOperationRequest $request, array $callOptions = []): void - { - $this->startApiCall('ResumeTransferOperation', $request, $callOptions)->wait(); - } - - /** - * Starts a new operation for the specified transfer job. - * A `TransferJob` has a maximum of one active `TransferOperation`. If this - * method is called while a `TransferOperation` is active, an error is - * returned. - * - * The async variant is {@see StorageTransferServiceClient::runTransferJobAsync()} - * . - * - * @example samples/V1/StorageTransferServiceClient/run_transfer_job.php - * - * @param RunTransferJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 runTransferJob(RunTransferJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunTransferJob', $request, $callOptions)->wait(); - } - - /** - * Updates an existing agent pool resource. - * - * The async variant is {@see StorageTransferServiceClient::updateAgentPoolAsync()} - * . - * - * @example samples/V1/StorageTransferServiceClient/update_agent_pool.php - * - * @param UpdateAgentPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AgentPool - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAgentPool(UpdateAgentPoolRequest $request, array $callOptions = []): AgentPool - { - return $this->startApiCall('UpdateAgentPool', $request, $callOptions)->wait(); - } - - /** - * Updates a transfer job. Updating a job's transfer spec does not affect - * transfer operations that are running already. - * - * **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status] - * field can be modified using this RPC (for example, to set a job's status to - * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED], - * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or - * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]). - * - * The async variant is - * {@see StorageTransferServiceClient::updateTransferJobAsync()} . - * - * @example samples/V1/StorageTransferServiceClient/update_transfer_job.php - * - * @param UpdateTransferJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TransferJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTransferJob(UpdateTransferJobRequest $request, array $callOptions = []): TransferJob - { - return $this->startApiCall('UpdateTransferJob', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json b/owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 357d3d96c332..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.storagetransfer.v1", - "libraryPackage": "Google\\Cloud\\StorageTransfer\\V1", - "services": { - "StorageTransferService": { - "clients": { - "grpc": { - "libraryClient": "StorageTransferServiceGapicClient", - "rpcs": { - "CreateAgentPool": { - "methods": [ - "createAgentPool" - ] - }, - "CreateTransferJob": { - "methods": [ - "createTransferJob" - ] - }, - "DeleteAgentPool": { - "methods": [ - "deleteAgentPool" - ] - }, - "DeleteTransferJob": { - "methods": [ - "deleteTransferJob" - ] - }, - "GetAgentPool": { - "methods": [ - "getAgentPool" - ] - }, - "GetGoogleServiceAccount": { - "methods": [ - "getGoogleServiceAccount" - ] - }, - "GetTransferJob": { - "methods": [ - "getTransferJob" - ] - }, - "ListAgentPools": { - "methods": [ - "listAgentPools" - ] - }, - "ListTransferJobs": { - "methods": [ - "listTransferJobs" - ] - }, - "PauseTransferOperation": { - "methods": [ - "pauseTransferOperation" - ] - }, - "ResumeTransferOperation": { - "methods": [ - "resumeTransferOperation" - ] - }, - "RunTransferJob": { - "methods": [ - "runTransferJob" - ] - }, - "UpdateAgentPool": { - "methods": [ - "updateAgentPool" - ] - }, - "UpdateTransferJob": { - "methods": [ - "updateTransferJob" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json deleted file mode 100644 index 52816cb2166d..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_client_config.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "interfaces": { - "google.storagetransfer.v1.StorageTransferService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 2.0, - "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 - } - }, - "methods": { - "CreateAgentPool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateTransferJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAgentPool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTransferJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAgentPool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGoogleServiceAccount": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTransferJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAgentPools": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTransferJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PauseTransferOperation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ResumeTransferOperation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RunTransferJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAgentPool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateTransferJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php deleted file mode 100644 index 02ba6f580f9d..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_descriptor_config.php +++ /dev/null @@ -1,207 +0,0 @@ - [ - 'google.storagetransfer.v1.StorageTransferService' => [ - 'RunTransferJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\StorageTransfer\V1\TransferOperation', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'job_name', - 'fieldAccessors' => [ - 'getJobName', - ], - ], - ], - ], - 'CreateAgentPool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\AgentPool', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - ], - ], - 'CreateTransferJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\TransferJob', - ], - 'DeleteAgentPool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTransferJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'job_name', - 'fieldAccessors' => [ - 'getJobName', - ], - ], - ], - ], - 'GetAgentPool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\AgentPool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGoogleServiceAccount' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\GoogleServiceAccount', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - ], - ], - 'GetTransferJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\TransferJob', - 'headerParams' => [ - [ - 'keyName' => 'job_name', - 'fieldAccessors' => [ - 'getJobName', - ], - ], - ], - ], - 'ListAgentPools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAgentPools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\ListAgentPoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - ], - ], - 'ListTransferJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTransferJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\ListTransferJobsResponse', - ], - 'PauseTransferOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResumeTransferOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAgentPool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\AgentPool', - 'headerParams' => [ - [ - 'keyName' => 'agent_pool.name', - 'fieldAccessors' => [ - 'getAgentPool', - 'getName', - ], - ], - ], - ], - 'UpdateTransferJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\StorageTransfer\V1\TransferJob', - 'headerParams' => [ - [ - 'keyName' => 'job_name', - 'fieldAccessors' => [ - 'getJobName', - ], - ], - ], - ], - 'templateMap' => [ - 'agentPools' => 'projects/{project_id}/agentPools/{agent_pool_id}', - ], - ], - ], -]; diff --git a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php b/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php deleted file mode 100644 index 14d19decd51f..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/src/V1/resources/storage_transfer_service_rest_client_config.php +++ /dev/null @@ -1,225 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=transferOperations/**}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=transferOperations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=transferOperations}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.storagetransfer.v1.StorageTransferService' => [ - 'CreateAgentPool' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/projects/{project_id=*}/agentPools', - 'body' => 'agent_pool', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - 'queryParams' => [ - 'agent_pool_id', - ], - ], - 'CreateTransferJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/transferJobs', - 'body' => 'transfer_job', - ], - 'DeleteAgentPool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/agentPools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTransferJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{job_name=transferJobs/**}', - 'placeholders' => [ - 'job_name' => [ - 'getters' => [ - 'getJobName', - ], - ], - ], - 'queryParams' => [ - 'project_id', - ], - ], - 'GetAgentPool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/agentPools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGoogleServiceAccount' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/googleServiceAccounts/{project_id}', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - ], - 'GetTransferJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{job_name=transferJobs/**}', - 'placeholders' => [ - 'job_name' => [ - 'getters' => [ - 'getJobName', - ], - ], - ], - 'queryParams' => [ - 'project_id', - ], - ], - 'ListAgentPools' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id=*}/agentPools', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - ], - 'ListTransferJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/transferJobs', - 'queryParams' => [ - 'filter', - ], - ], - 'PauseTransferOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=transferOperations/**}:pause', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResumeTransferOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=transferOperations/**}:resume', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RunTransferJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{job_name=transferJobs/**}:run', - 'body' => '*', - 'placeholders' => [ - 'job_name' => [ - 'getters' => [ - 'getJobName', - ], - ], - ], - ], - 'UpdateAgentPool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{agent_pool.name=projects/*/agentPools/*}', - 'body' => 'agent_pool', - 'placeholders' => [ - 'agent_pool.name' => [ - 'getters' => [ - 'getAgentPool', - 'getName', - ], - ], - ], - ], - 'UpdateTransferJob' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{job_name=transferJobs/**}', - 'body' => '*', - 'placeholders' => [ - 'job_name' => [ - 'getters' => [ - 'getJobName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php b/owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php deleted file mode 100644 index 8e04ba0e2c08..000000000000 --- a/owl-bot-staging/StorageTransfer/v1/tests/Unit/V1/Client/StorageTransferServiceClientTest.php +++ /dev/null @@ -1,1158 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return StorageTransferServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new StorageTransferServiceClient($options); - } - - /** @test */ - public function createAgentPoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AgentPool(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $agentPool = new AgentPool(); - $agentPoolName = 'agentPoolName-2036536596'; - $agentPool->setName($agentPoolName); - $agentPoolId = 'agentPoolId-773019420'; - $request = (new CreateAgentPoolRequest()) - ->setProjectId($projectId) - ->setAgentPool($agentPool) - ->setAgentPoolId($agentPoolId); - $response = $gapicClient->createAgentPool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/CreateAgentPool', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getAgentPool(); - $this->assertProtobufEquals($agentPool, $actualValue); - $actualValue = $actualRequestObject->getAgentPoolId(); - $this->assertProtobufEquals($agentPoolId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAgentPoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $agentPool = new AgentPool(); - $agentPoolName = 'agentPoolName-2036536596'; - $agentPool->setName($agentPoolName); - $agentPoolId = 'agentPoolId-773019420'; - $request = (new CreateAgentPoolRequest()) - ->setProjectId($projectId) - ->setAgentPool($agentPool) - ->setAgentPoolId($agentPoolId); - try { - $gapicClient->createAgentPool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTransferJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $projectId = 'projectId-1969970175'; - $latestOperationName = 'latestOperationName1224975899'; - $expectedResponse = new TransferJob(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProjectId($projectId); - $expectedResponse->setLatestOperationName($latestOperationName); - $transport->addResponse($expectedResponse); - // Mock request - $transferJob = new TransferJob(); - $request = (new CreateTransferJobRequest()) - ->setTransferJob($transferJob); - $response = $gapicClient->createTransferJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/CreateTransferJob', $actualFuncCall); - $actualValue = $actualRequestObject->getTransferJob(); - $this->assertProtobufEquals($transferJob, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTransferJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $transferJob = new TransferJob(); - $request = (new CreateTransferJobRequest()) - ->setTransferJob($transferJob); - try { - $gapicClient->createTransferJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAgentPoolTest() - { - $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 DeleteAgentPoolRequest()) - ->setName($name); - $gapicClient->deleteAgentPool($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/DeleteAgentPool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAgentPoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 DeleteAgentPoolRequest()) - ->setName($name); - try { - $gapicClient->deleteAgentPool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransferJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $request = (new DeleteTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId); - $gapicClient->deleteTransferJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/DeleteTransferJob', $actualFuncCall); - $actualValue = $actualRequestObject->getJobName(); - $this->assertProtobufEquals($jobName, $actualValue); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTransferJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $request = (new DeleteTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId); - try { - $gapicClient->deleteTransferJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAgentPoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AgentPool(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetAgentPoolRequest()) - ->setName($name); - $response = $gapicClient->getAgentPool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/GetAgentPool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAgentPoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 GetAgentPoolRequest()) - ->setName($name); - try { - $gapicClient->getAgentPool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGoogleServiceAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accountEmail = 'accountEmail-539286774'; - $subjectId = 'subjectId-573637362'; - $expectedResponse = new GoogleServiceAccount(); - $expectedResponse->setAccountEmail($accountEmail); - $expectedResponse->setSubjectId($subjectId); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $request = (new GetGoogleServiceAccountRequest()) - ->setProjectId($projectId); - $response = $gapicClient->getGoogleServiceAccount($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/GetGoogleServiceAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGoogleServiceAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 GetGoogleServiceAccountRequest()) - ->setProjectId($projectId); - try { - $gapicClient->getGoogleServiceAccount($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransferJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $projectId2 = 'projectId2939242356'; - $latestOperationName = 'latestOperationName1224975899'; - $expectedResponse = new TransferJob(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setLatestOperationName($latestOperationName); - $transport->addResponse($expectedResponse); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $request = (new GetTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId); - $response = $gapicClient->getTransferJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/GetTransferJob', $actualFuncCall); - $actualValue = $actualRequestObject->getJobName(); - $this->assertProtobufEquals($jobName, $actualValue); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTransferJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $request = (new GetTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId); - try { - $gapicClient->getTransferJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAgentPoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $agentPoolsElement = new AgentPool(); - $agentPools = [ - $agentPoolsElement, - ]; - $expectedResponse = new ListAgentPoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAgentPools($agentPools); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $request = (new ListAgentPoolsRequest()) - ->setProjectId($projectId); - $response = $gapicClient->listAgentPools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAgentPools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/ListAgentPools', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAgentPoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListAgentPoolsRequest()) - ->setProjectId($projectId); - try { - $gapicClient->listAgentPools($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $transferJobsElement = new TransferJob(); - $transferJobs = [ - $transferJobsElement, - ]; - $expectedResponse = new ListTransferJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTransferJobs($transferJobs); - $transport->addResponse($expectedResponse); - // Mock request - $filter = 'filter-1274492040'; - $request = (new ListTransferJobsRequest()) - ->setFilter($filter); - $response = $gapicClient->listTransferJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTransferJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/ListTransferJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTransferJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $filter = 'filter-1274492040'; - $request = (new ListTransferJobsRequest()) - ->setFilter($filter); - try { - $gapicClient->listTransferJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseTransferOperationTest() - { - $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 PauseTransferOperationRequest()) - ->setName($name); - $gapicClient->pauseTransferOperation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/PauseTransferOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseTransferOperationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 PauseTransferOperationRequest()) - ->setName($name); - try { - $gapicClient->pauseTransferOperation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeTransferOperationTest() - { - $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 ResumeTransferOperationRequest()) - ->setName($name); - $gapicClient->resumeTransferOperation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/ResumeTransferOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeTransferOperationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ResumeTransferOperationRequest()) - ->setName($name); - try { - $gapicClient->resumeTransferOperation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTransferJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runTransferJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runTransferJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $request = (new RunTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId); - $response = $gapicClient->runTransferJob($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.storagetransfer.v1.StorageTransferService/RunTransferJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getJobName(); - $this->assertProtobufEquals($jobName, $actualValue); - $actualValue = $actualApiRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runTransferJobTest'); - $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 runTransferJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runTransferJobTest'); - $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 - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $request = (new RunTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId); - $response = $gapicClient->runTransferJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runTransferJobTest'); - 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 updateAgentPoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AgentPool(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $agentPool = new AgentPool(); - $agentPoolName = 'agentPoolName-2036536596'; - $agentPool->setName($agentPoolName); - $request = (new UpdateAgentPoolRequest()) - ->setAgentPool($agentPool); - $response = $gapicClient->updateAgentPool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/UpdateAgentPool', $actualFuncCall); - $actualValue = $actualRequestObject->getAgentPool(); - $this->assertProtobufEquals($agentPool, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAgentPoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $agentPool = new AgentPool(); - $agentPoolName = 'agentPoolName-2036536596'; - $agentPool->setName($agentPoolName); - $request = (new UpdateAgentPoolRequest()) - ->setAgentPool($agentPool); - try { - $gapicClient->updateAgentPool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTransferJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $projectId2 = 'projectId2939242356'; - $latestOperationName = 'latestOperationName1224975899'; - $expectedResponse = new TransferJob(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setLatestOperationName($latestOperationName); - $transport->addResponse($expectedResponse); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $transferJob = new TransferJob(); - $request = (new UpdateTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId) - ->setTransferJob($transferJob); - $response = $gapicClient->updateTransferJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storagetransfer.v1.StorageTransferService/UpdateTransferJob', $actualFuncCall); - $actualValue = $actualRequestObject->getJobName(); - $this->assertProtobufEquals($jobName, $actualValue); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getTransferJob(); - $this->assertProtobufEquals($transferJob, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTransferJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $jobName = 'jobName-1615239731'; - $projectId = 'projectId-1969970175'; - $transferJob = new TransferJob(); - $request = (new UpdateTransferJobRequest()) - ->setJobName($jobName) - ->setProjectId($projectId) - ->setTransferJob($transferJob); - try { - $gapicClient->updateTransferJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAgentPoolAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AgentPool(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $agentPool = new AgentPool(); - $agentPoolName = 'agentPoolName-2036536596'; - $agentPool->setName($agentPoolName); - $agentPoolId = 'agentPoolId-773019420'; - $request = (new CreateAgentPoolRequest()) - ->setProjectId($projectId) - ->setAgentPool($agentPool) - ->setAgentPoolId($agentPoolId); - $response = $gapicClient->createAgentPoolAsync($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.storagetransfer.v1.StorageTransferService/CreateAgentPool', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getAgentPool(); - $this->assertProtobufEquals($agentPool, $actualValue); - $actualValue = $actualRequestObject->getAgentPoolId(); - $this->assertProtobufEquals($agentPoolId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php deleted file mode 100644 index b6d59108b0a5..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' -Ç -#google/cloud/support/v2/actor.protogoogle.cloud.support.v2"I -Actor - display_name (  -email (  -google_support (BàAB³ -com.google.cloud.support.v2B -ActorProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php deleted file mode 100644 index 8f4f65d5528d..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php +++ /dev/null @@ -1,41 +0,0 @@ -internalAddGeneratedFile( - ' -ë -(google/cloud/support/v2/attachment.protogoogle.cloud.support.v2google/api/resource.proto#google/cloud/support/v2/actor.protogoogle/protobuf/timestamp.proto" - -Attachment -name ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 -creator ( 2.google.cloud.support.v2.ActorBàA -filename (  - mime_type ( BàA - -size_bytes (BàA:°êA¬ -&cloudsupport.googleapis.com/AttachmentEorganizations/{organization}/cases/{case}/attachments/{attachment_id};projects/{project}/cases/{case}/attachments/{attachment_id}B¸ -com.google.cloud.support.v2BAttachmentProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php deleted file mode 100644 index 41e2894478d5..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php +++ /dev/null @@ -1,43 +0,0 @@ -internalAddGeneratedFile( - ' -Ñ -0google/cloud/support/v2/attachment_service.protogoogle.cloud.support.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/support/v2/attachment.proto"y -ListAttachmentsRequest8 -parent ( B(àAúA" - cloudsupport.googleapis.com/Case - page_size ( - -page_token ( "l -ListAttachmentsResponse8 - attachments ( 2#.google.cloud.support.v2.Attachment -next_page_token ( 2Ñ -CaseAttachmentServiceæ -ListAttachments/.google.cloud.support.v2.ListAttachmentsRequest0.google.cloud.support.v2.ListAttachmentsResponse"pÚAparent‚Óä“a+/v2/{parent=projects/*/cases/*}/attachmentsZ20/v2/{parent=organizations/*/cases/*}/attachmentsOÊAcloudsupport.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¿ -com.google.cloud.support.v2BAttachmentServiceProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php deleted file mode 100644 index 99512b9f6a3b..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php +++ /dev/null @@ -1,88 +0,0 @@ -internalAddGeneratedFile( - ' -¸ -*google/cloud/support/v2/case_service.protogoogle.cloud.support.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/cloud/support/v2/case.proto(google/cloud/support/v2/escalation.proto google/protobuf/field_mask.proto"H -GetCaseRequest6 -name ( B(àAúA" - cloudsupport.googleapis.com/Case" -CreateCaseRequest8 -parent ( B(àAúA" cloudsupport.googleapis.com/Case0 -case ( 2.google.cloud.support.v2.CaseBàA"ƒ -ListCasesRequest8 -parent ( B(àAúA" cloudsupport.googleapis.com/Case -filter (  - page_size ( - -page_token ( "Z -ListCasesResponse, -cases ( 2.google.cloud.support.v2.Case -next_page_token ( "Z -SearchCasesRequest -parent (  -query (  - page_size ( - -page_token ( "\\ -SearchCasesResponse, -cases ( 2.google.cloud.support.v2.Case -next_page_token ( "† -EscalateCaseRequest6 -name ( B(àAúA" - cloudsupport.googleapis.com/Case7 - -escalation ( 2#.google.cloud.support.v2.Escalation"v -UpdateCaseRequest0 -case ( 2.google.cloud.support.v2.CaseBàA/ - update_mask ( 2.google.protobuf.FieldMask"J -CloseCaseRequest6 -name ( B(àAúA" - cloudsupport.googleapis.com/Case"X - SearchCaseClassificationsRequest -query (  - page_size ( - -page_token ( "‡ -!SearchCaseClassificationsResponseI -case_classifications ( 2+.google.cloud.support.v2.CaseClassification -next_page_token ( 2Ï - CaseService¥ -GetCase\'.google.cloud.support.v2.GetCaseRequest.google.cloud.support.v2.Case"RÚAname‚Óä“E/v2/{name=projects/*/cases/*}Z$"/v2/{name=organizations/*/cases/*}¸ - ListCases).google.cloud.support.v2.ListCasesRequest*.google.cloud.support.v2.ListCasesResponse"TÚAparent‚Óä“E/v2/{parent=projects/*}/casesZ$"/v2/{parent=organizations/*}/casesà - SearchCases+.google.cloud.support.v2.SearchCasesRequest,.google.cloud.support.v2.SearchCasesResponse"Y‚Óä“S$/v2/{parent=projects/*}/cases:searchZ+)/v2/{parent=organizations/*}/cases:search¾ - -CreateCase*.google.cloud.support.v2.CreateCaseRequest.google.cloud.support.v2.Case"eÚA parent,case‚Óä“Q"/v2/{parent=projects/*}/cases:caseZ*""/v2/{parent=organizations/*}/cases:caseÍ - -UpdateCase*.google.cloud.support.v2.UpdateCaseRequest.google.cloud.support.v2.Case"tÚAcase,update_mask‚Óä“[2"/v2/{case.name=projects/*/cases/*}:caseZ/2\'/v2/{case.name=organizations/*/cases/*}:caseÀ - EscalateCase,.google.cloud.support.v2.EscalateCaseRequest.google.cloud.support.v2.Case"c‚Óä“]"&/v2/{name=projects/*/cases/*}:escalate:*Z0"+/v2/{name=organizations/*/cases/*}:escalate:*´ - CloseCase).google.cloud.support.v2.CloseCaseRequest.google.cloud.support.v2.Case"]‚Óä“W"#/v2/{name=projects/*/cases/*}:close:*Z-"(/v2/{name=organizations/*/cases/*}:close:*º -SearchCaseClassifications9.google.cloud.support.v2.SearchCaseClassificationsRequest:.google.cloud.support.v2.SearchCaseClassificationsResponse"&‚Óä“ /v2/caseClassifications:searchOÊAcloudsupport.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¹ -com.google.cloud.support.v2BCaseServiceProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php deleted file mode 100644 index d21c0ed73696..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php +++ /dev/null @@ -1,38 +0,0 @@ -internalAddGeneratedFile( - ' -¶ -%google/cloud/support/v2/comment.protogoogle.cloud.support.v2google/api/resource.proto#google/cloud/support/v2/actor.protogoogle/protobuf/timestamp.proto"Ò -Comment -name ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 -creator ( 2.google.cloud.support.v2.ActorBàA -body (  -plain_text_body ( BàA:›êA— -#cloudsupport.googleapis.com/CommentinternalAddGeneratedFile( - ' -› - --google/cloud/support/v2/comment_service.protogoogle.cloud.support.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto%google/cloud/support/v2/comment.proto"v -ListCommentsRequest8 -parent ( B(àAúA" - cloudsupport.googleapis.com/Case - page_size ( - -page_token ( "c -ListCommentsResponse2 -comments ( 2 .google.cloud.support.v2.Comment -next_page_token ( "ˆ -CreateCommentRequest8 -parent ( B(àAúA" - cloudsupport.googleapis.com/Case6 -comment ( 2 .google.cloud.support.v2.CommentBàA2¥ -CommentService× - ListComments,.google.cloud.support.v2.ListCommentsRequest-.google.cloud.support.v2.ListCommentsResponse"jÚAparent‚Óä“[(/v2/{parent=projects/*/cases/*}/commentsZ/-/v2/{parent=organizations/*/cases/*}/commentsç - CreateComment-.google.cloud.support.v2.CreateCommentRequest .google.cloud.support.v2.Comment"„ÚAparent,comment‚Óä“m"(/v2/{parent=projects/*/cases/*}/comments:commentZ8"-/v2/{parent=organizations/*/cases/*}/comments:commentOÊAcloudsupport.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¼ -com.google.cloud.support.v2BCommentServiceProtoPZ5cloud.google.com/go/support/apiv2/supportpb;supportpbªGoogle.Cloud.Support.V2ÊGoogle\\Cloud\\Support\\V2êGoogle::Cloud::Support::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php deleted file mode 100644 index 3d81565e3ad8879c3bc389bb29a40a462fff8f65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1081 zcma)5-D(p-7&VC&9MFa>*ivuCT4*Y|frvL#Yst?xF0{##-4>CBFquq}k?qbfJ6llc z3;6^-gBRX<>$Oke?CfS!r~&tC*zY^%JKxWFdmA` zlXNzt5)ytTSVW}_VQ&Zr!vH!xH+ZI@2~Q=V2+ld5N3=;Io=%%dDg>9RdEIK#gy0A( z#$(%%0ubXXng~oN?0cPas_+ym9QF-9>}L4T&+*}9>j(f6;Us}h$pgLus6UZTB1T}M zG&zC$EE%(yDTX8VMfY(GXE;izhTqMdr7_6_!3;2r32hw0oHNVa7hLy!43~<$Y!rG7 zp&KhIV;qG&-IHWOap~z)gyvM01I+$34vVrG9h<>Mt`VU-B9EbxDZO1CLP=FB<0GRx zBe*GF;Xmfp7A!nvG@5qk0$(#O5n6S%A~8+9ddG?u+S6&N_*Cz;QP#*R9)Mpp(D>hl zTHAT1ZB}m=tGBOPdp|1xtk!0ofDK7;!sDI$u+n(kdSR~t+AEMfGKfy?ce`rsf=8dy zM6nqo=Ad>SXr6~AwnxB5o@zY-*2ro5!@>As;CoKjJ$0R4{hqZ2Hb;&>Ji7>79ShuZ zr(UtP!B*gO-w)hw`)urd@SIWL`cA!?Wp^%oci{N`*gf~!-Jo9Ue6N6~+6n7)cQ#kT z&DD67k8kp+EIZ{_%{edafd$hJDJCW+N9F5Vb-Qo;U>iT!g&*w8){kW*EUZ#`MVsYM pbvK70WN-)-K!h$^lMUm)*9YaUU*^|$>sZ$ws>#gH=?2^Y@E4GKTOt4e diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php deleted file mode 100644 index f6618add0822ddf464f94c19ebf25d40b63d9eb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2049 zcma)7-EQMV6edaAZKmCB>n^GZ((aJ1*i?W6+2uzr1?8`ir4pMYEdoWdCiWy96Av;2`)nB(MZF%W8%I!!rhKB`T(GDkVFpE@hk{t9<4iGkht|Y3Bw@b z^~*-xAu-itID~w1LF14(6!)ywca#&Ca5C;m8r8Z~IOY-{CCqu>hF9Lu&^(jVXMeg#mPX zgcsFVf&gfKZ1|i;KJmsK8aojSc@SCPs_Qe#bJ~QZc95kN;n)<{(i(OBts;*wj}m$_ zJH`>^N#q~OxQS; z&zjRYVjuxdF2cL9@)|z*hGnETT{q|W81z@mSrHsPM}L=5_5X#Z?4>@M6sMMnQ@dMypq4scw3j+m|5`&ULcPi+S`q433%F1#E058p z%i_=@SGKekrF9o=xS7a6r)o(W+h|LU0h=-hG!OO_ux~Uz(v~!(iF|D_IXOhxL1j^y zeI58zU6*mIs1hd=A?XQ?Y27GfH!Wn6+XzeKA-#8lk`$W~+jKT~Q$;o2(w z*(@n9(S{RIc(p}Z^`We|vVbqx(sD86s3e3>LWbJ9AF7TX$Xr3BK9Yzhi#)flTa%(y z-bD|cz~^v}Y1`^Pz{-LnAfI@U-&J?Ov@U4_wc6qvrtV4;fIZ^R5;CK<6S!2}li;t= zdKkeRGJd6EuxvFxTv~;=AI-|VtG}XENgR~5GaNNXUHh~@w7PBM*ywh)-%%c*QosAd zc0qZ9Dn{S724-*29S-fDY4%RK_VCoQ%)w~8sO+Lg&GyJJ`}Uyw{i!hkbV&v^Pfn#7 zpl3!0%qt2)YwZ(r2+yn46STf4Mp4mYYhaiIWAx*#GS*Ph`V^`V=Vy>joDE1I&KD3- zoG-Um^Q{^16JXu&r>liW)Aw8 z1^JqT-eA*Z{f3jn{OPyiUQcc}tu3~jHcYphcGmb~@y|G0eEH^s)%UtsNnyG!ak`!X lb^WX{S(Eeg;(7ip{5ahwH`b4sTISrbdZcH%Am(U}&_CesfX@H` diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php deleted file mode 100644 index b06b828e7944..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.support.v2.Actor - */ -class Actor extends \Google\Protobuf\Internal\Message -{ - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The email address of the actor. If not provided, it is inferred from - * credentials supplied during case creation. If the authenticated principal - * does not have an email address, one must be provided. When a name is - * provided, an email must also be provided. This will be obfuscated if the - * user is a Google Support agent. - * - * Generated from protobuf field string email = 2; - */ - protected $email = ''; - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_support = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * @type string $email - * The email address of the actor. If not provided, it is inferred from - * credentials supplied during case creation. If the authenticated principal - * does not have an email address, one must be provided. When a name is - * provided, an email must also be provided. This will be obfuscated if the - * user is a Google Support agent. - * @type bool $google_support - * Output only. Whether the actor is a Google support actor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Actor::initOnce(); - parent::__construct($data); - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The email address of the actor. If not provided, it is inferred from - * credentials supplied during case creation. If the authenticated principal - * does not have an email address, one must be provided. When a name is - * provided, an email must also be provided. This will be obfuscated if the - * user is a Google Support agent. - * - * Generated from protobuf field string email = 2; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * The email address of the actor. If not provided, it is inferred from - * credentials supplied during case creation. If the authenticated principal - * does not have an email address, one must be provided. When a name is - * provided, an email must also be provided. This will be obfuscated if the - * user is a Google Support agent. - * - * Generated from protobuf field string email = 2; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleSupport() - { - return $this->google_support; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleSupport($var) - { - GPBUtil::checkBool($var); - $this->google_support = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php deleted file mode 100644 index 663e8b810e46..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.support.v2.Attachment - */ -class Attachment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time at which the attachment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - */ - protected $filename = ''; - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mime_type = ''; - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the attachment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the attachment was created. - * @type \Google\Cloud\Support\V2\Actor $creator - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * @type string $filename - * The filename of the attachment (e.g. `"graph.jpg"`). - * @type string $mime_type - * Output only. The MIME type of the attachment (e.g. text/plain). - * @type int|string $size_bytes - * Output only. The size of the attachment in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the attachment. - * - * 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 attachment. - * - * 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 time at which the attachment was 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 at which the attachment was 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 user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php deleted file mode 100644 index 1a81cb3ee8ec..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.CaseClassification - */ -class CaseClassification extends \Google\Protobuf\Internal\Message -{ - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * The display name of the classification. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * @type string $display_name - * The display name of the classification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The display name of the classification. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the classification. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php deleted file mode 100644 index e73092da8df0..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2.CloseCaseRequest - */ -class CloseCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the case resource to be closed. - * - * 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 fully qualified name of the case resource to be closed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the case resource to be closed. - * - * 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 fully qualified name of the case resource to be closed. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php deleted file mode 100644 index 3de25ed6e0cc..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.support.v2.Comment - */ -class Comment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name for the comment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time when this comment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent created this comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The full comment body. Maximum of 12800 characters. This can contain rich - * text syntax. - * - * Generated from protobuf field string body = 4; - */ - protected $body = ''; - /** - * Output only. DEPRECATED. An automatically generated plain text version of - * body with all rich text syntax stripped. - * - * Generated from protobuf field string plain_text_body = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $plain_text_body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name for the comment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when this comment was created. - * @type \Google\Cloud\Support\V2\Actor $creator - * Output only. The user or Google Support agent created this comment. - * @type string $body - * The full comment body. Maximum of 12800 characters. This can contain rich - * text syntax. - * @type string $plain_text_body - * Output only. DEPRECATED. An automatically generated plain text version of - * body with all rich text syntax stripped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Comment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name for the comment. - * - * 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 for the comment. - * - * 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 time when this comment was 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 when this comment was 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 user or Google Support agent created this comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user or Google Support agent created this comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The full comment body. Maximum of 12800 characters. This can contain rich - * text syntax. - * - * Generated from protobuf field string body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The full comment body. Maximum of 12800 characters. This can contain rich - * text syntax. - * - * Generated from protobuf field string body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. DEPRECATED. An automatically generated plain text version of - * body with all rich text syntax stripped. - * - * Generated from protobuf field string plain_text_body = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPlainTextBody() - { - return $this->plain_text_body; - } - - /** - * Output only. DEPRECATED. An automatically generated plain text version of - * body with all rich text syntax stripped. - * - * Generated from protobuf field string plain_text_body = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPlainTextBody($var) - { - GPBUtil::checkString($var, True); - $this->plain_text_body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php deleted file mode 100644 index 32a3199a0eba..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.support.v2.CreateCaseRequest - */ -class CreateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Google Cloud Resource under which the case should - * be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - - /** - * @param string $parent Required. The name of the Google Cloud Resource under which the case should - * be created. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to be created. - * - * @return \Google\Cloud\Support\V2\CreateCaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\PBCase $case): self - { - return (new self()) - ->setParent($parent) - ->setCase($case); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the Google Cloud Resource under which the case should - * be created. - * @type \Google\Cloud\Support\V2\PBCase $case - * Required. The case to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Google Cloud Resource under which the case should - * be 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 name of the Google Cloud Resource under which the case should - * be 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 case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); - $this->case = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php deleted file mode 100644 index 36d7c6dea2c8..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2.CreateCommentRequest - */ -class CreateCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of Case to which this comment should be added. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Comment object to be added to this Case. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $comment = null; - - /** - * @param string $parent Required. The resource name of Case to which this comment should be added. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\Comment $comment Required. The Comment object to be added to this Case. - * - * @return \Google\Cloud\Support\V2\CreateCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\Comment $comment): self - { - return (new self()) - ->setParent($parent) - ->setComment($comment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of Case to which this comment should be added. - * @type \Google\Cloud\Support\V2\Comment $comment - * Required. The Comment object to be added to this Case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of Case to which this comment should be added. - * - * 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 Case to which this comment should be added. - * - * 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 Comment object to be added to this Case. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\Comment|null - */ - public function getComment() - { - return $this->comment; - } - - public function hasComment() - { - return isset($this->comment); - } - - public function clearComment() - { - unset($this->comment); - } - - /** - * Required. The Comment object to be added to this Case. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Comment::class); - $this->comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php deleted file mode 100644 index d1679dd4a89f..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.support.v2.EscalateCaseRequest - */ -class EscalateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the Case resource to be escalated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The escalation object to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - */ - protected $escalation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The fully qualified name of the Case resource to be escalated. - * @type \Google\Cloud\Support\V2\Escalation $escalation - * The escalation object to be sent with the escalation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the Case resource to be escalated. - * - * 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 fully qualified name of the Case resource to be escalated. - * - * 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 escalation object to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - * @return \Google\Cloud\Support\V2\Escalation|null - */ - public function getEscalation() - { - return $this->escalation; - } - - public function hasEscalation() - { - return isset($this->escalation); - } - - public function clearEscalation() - { - unset($this->escalation); - } - - /** - * The escalation object to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - * @param \Google\Cloud\Support\V2\Escalation $var - * @return $this - */ - public function setEscalation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Escalation::class); - $this->escalation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php deleted file mode 100644 index bfa958070799..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2.Escalation - */ -class Escalation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reason = 0; - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $justification = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * Required. The reason why the Case is being escalated. - * @type string $justification - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Escalation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\Escalation\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJustification() - { - return $this->justification; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkString($var, True); - $this->justification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php deleted file mode 100644 index 63d438e354b9..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.support.v2.Escalation.Reason - */ -class Reason -{ - /** - * The escalation reason is in an unknown state or has not been specified. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * The case is taking too long to resolve. - * - * Generated from protobuf enum RESOLUTION_TIME = 1; - */ - const RESOLUTION_TIME = 1; - /** - * The support agent does not have the expertise required to successfully - * resolve the issue. - * - * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; - */ - const TECHNICAL_EXPERTISE = 2; - /** - * The issue is having a significant business impact. - * - * Generated from protobuf enum BUSINESS_IMPACT = 3; - */ - const BUSINESS_IMPACT = 3; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RESOLUTION_TIME => 'RESOLUTION_TIME', - self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', - self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reason::class, \Google\Cloud\Support\V2\Escalation_Reason::class); - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php deleted file mode 100644 index 2e56f2090688..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetCaseRequest - */ -class GetCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of a case to be retrieved. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The fully qualified name of a case to be retrieved. Please see - * {@see CaseServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetCaseRequest - * - * @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 fully qualified name of a case to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of a case to be retrieved. - * - * 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 fully qualified name of a case to be retrieved. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php deleted file mode 100644 index 54623ecec4d0..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.support.v2.ListAttachmentsRequest - */ -class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of Case object for which attachments should be - * listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of attachments fetched with each request. If not - * provided, the default is 10. The maximum page size that will be returned is - * 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of Case object for which attachments should be - * listed. Please see - * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListAttachmentsRequest - * - * @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 Case object for which attachments should be - * listed. - * @type int $page_size - * The maximum number of attachments fetched with each request. If not - * provided, the default is 10. The maximum page size that will be returned is - * 100. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of Case object for which attachments should be - * listed. - * - * 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 Case object for which attachments should be - * listed. - * - * 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 attachments fetched with each request. If not - * provided, the default is 10. The maximum page size that will be returned is - * 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of attachments fetched with each request. If not - * provided, the default is 10. The maximum page size that will be returned is - * 100. - * - * 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 the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php deleted file mode 100644 index a927967cb7eb..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.ListAttachmentsResponse - */ -class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of attachments associated with the given case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - */ - private $attachments; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `cases.attachments.list` requests. If - * unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Support\V2\Attachment>|\Google\Protobuf\Internal\RepeatedField $attachments - * The list of attachments associated with the given case. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `cases.attachments.list` requests. If - * unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * The list of attachments associated with the given case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttachments() - { - return $this->attachments; - } - - /** - * The list of attachments associated with the given case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - * @param array<\Google\Cloud\Support\V2\Attachment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Attachment::class); - $this->attachments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `cases.attachments.list` requests. If - * unspecified, there are no more results to retrieve. - * - * 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 results. This should be set in the - * `page_token` field of subsequent `cases.attachments.list` requests. If - * unspecified, there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php deleted file mode 100644 index 908f6acd5030..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.support.v2.ListCasesRequest - */ -class ListCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of parent resource to list cases under. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression written in filter language. If non-empty, the query returns - * the cases that match the filter. Else, the query doesn't filter the cases. - * Filter expressions use the following fields with the operators equals (`=`) - * and `AND`: - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * Examples: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The fully qualified name of parent resource to list cases under. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListCasesRequest - * - * @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 fully qualified name of parent resource to list cases under. - * @type string $filter - * An expression written in filter language. If non-empty, the query returns - * the cases that match the filter. Else, the query doesn't filter the cases. - * Filter expressions use the following fields with the operators equals (`=`) - * and `AND`: - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * Examples: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of parent resource to list cases under. - * - * 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 fully qualified name of parent resource to list cases under. - * - * 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 written in filter language. If non-empty, the query returns - * the cases that match the filter. Else, the query doesn't filter the cases. - * Filter expressions use the following fields with the operators equals (`=`) - * and `AND`: - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * Examples: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression written in filter language. If non-empty, the query returns - * the cases that match the filter. Else, the query doesn't filter the cases. - * Filter expressions use the following fields with the operators equals (`=`) - * and `AND`: - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * Examples: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * 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 maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php deleted file mode 100644 index 77427330549c..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2.ListCasesResponse - */ -class ListCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of the subsequent `ListCasesRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $cases - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of the subsequent `ListCasesRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @param array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of the subsequent `ListCasesRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * 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 results. This should be set in the - * `page_token` field of the subsequent `ListCasesRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php deleted file mode 100644 index 9cf6b77a2751..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.support.v2.ListCommentsRequest - */ -class ListCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of Case object for which comments should be - * listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of comments fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of Case object for which comments should be - * listed. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListCommentsRequest - * - * @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 Case object for which comments should be - * listed. - * @type int $page_size - * The maximum number of comments fetched with each request. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of Case object for which comments should be - * listed. - * - * 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 Case object for which comments should be - * listed. - * - * 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 comments fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of comments fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php deleted file mode 100644 index afd122a85834..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.ListCommentsResponse - */ -class ListCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Comments associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - */ - private $comments; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ListCommentsRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Support\V2\Comment>|\Google\Protobuf\Internal\RepeatedField $comments - * The list of Comments associated with the given Case. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ListCommentsRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Comments associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getComments() - { - return $this->comments; - } - - /** - * The list of Comments associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - * @param array<\Google\Cloud\Support\V2\Comment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Comment::class); - $this->comments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ListCommentsRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * 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 results. This should be set in the - * `page_token` field of subsequent `ListCommentsRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php deleted file mode 100644 index 4a32250098b6..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php +++ /dev/null @@ -1,635 +0,0 @@ -google.cloud.support.v2.Case - */ -class PBCase extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name for the case. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - */ - protected $classification = null; - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - */ - protected $time_zone = ''; - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - */ - private $subscriber_email_addresses; - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - */ - protected $creator = null; - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - */ - protected $contact_email = ''; - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - */ - protected $escalated = false; - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - */ - protected $test_case = false; - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - */ - protected $language_code = ''; - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name for the case. - * @type string $display_name - * The short summary of the issue reported in this case. - * @type string $description - * A broad description of the issue. - * @type \Google\Cloud\Support\V2\CaseClassification $classification - * The issue classification applicable to this case. - * @type string $time_zone - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * @type array|\Google\Protobuf\Internal\RepeatedField $subscriber_email_addresses - * The email addresses to receive updates on this case. - * @type int $state - * Output only. The current status of the support case. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this case was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this case was last updated. - * @type \Google\Cloud\Support\V2\Actor $creator - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * @type string $contact_email - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * @type bool $escalated - * Whether the case is currently escalated. - * @type bool $test_case - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * @type string $language_code - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * @type int $priority - * The priority of this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The resource name for the case. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name for the case. - * - * 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 short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The short summary of the issue reported in this case. - * - * 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; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A broad description of the issue. - * - * 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; - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - * @return \Google\Cloud\Support\V2\CaseClassification|null - */ - public function getClassification() - { - return $this->classification; - } - - public function hasClassification() - { - return isset($this->classification); - } - - public function clearClassification() - { - unset($this->classification); - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - * @param \Google\Cloud\Support\V2\CaseClassification $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\CaseClassification::class); - $this->classification = $var; - - return $this; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubscriberEmailAddresses() - { - return $this->subscriber_email_addresses; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubscriberEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subscriber_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time this case was created. - * - * 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 time this case was created. - * - * 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 time this case was last updated. - * - * 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 time this case was last updated. - * - * 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; - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @return string - */ - public function getContactEmail() - { - return $this->contact_email; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @param string $var - * @return $this - */ - public function setContactEmail($var) - { - GPBUtil::checkString($var, True); - $this->contact_email = $var; - - return $this; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @return bool - */ - public function getEscalated() - { - return $this->escalated; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @param bool $var - * @return $this - */ - public function setEscalated($var) - { - GPBUtil::checkBool($var); - $this->escalated = $var; - - return $this; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @return bool - */ - public function getTestCase() - { - return $this->test_case; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @param bool $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkBool($var); - $this->test_case = $var; - - return $this; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\Priority::class); - $this->priority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php deleted file mode 100644 index a2d22b12ff29..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.support.v2.Case.Priority - */ -class Priority -{ - /** - * Priority is undefined or has not been set yet. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Extreme impact on a production service. Service is hard down. - * - * Generated from protobuf enum P0 = 1; - */ - const P0 = 1; - /** - * Critical impact on a production service. Service is currently unusable. - * - * Generated from protobuf enum P1 = 2; - */ - const P1 = 2; - /** - * Severe impact on a production service. Service is usable but greatly - * impaired. - * - * Generated from protobuf enum P2 = 3; - */ - const P2 = 3; - /** - * Medium impact on a production service. Service is available, but - * moderately impaired. - * - * Generated from protobuf enum P3 = 4; - */ - const P3 = 4; - /** - * General questions or minor issues. Production service is fully - * available. - * - * Generated from protobuf enum P4 = 5; - */ - const P4 = 5; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::P0 => 'P0', - self::P1 => 'P1', - self::P2 => 'P2', - self::P3 => 'P3', - self::P4 => 'P4', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Priority::class, \Google\Cloud\Support\V2\Case_Priority::class); - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php deleted file mode 100644 index 851dbbe5b87f..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.support.v2.Case.State - */ -class State -{ - /** - * Case is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The case has been created but no one is assigned to work on it yet. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * The case is currently being handled by Google support. - * - * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; - */ - const IN_PROGRESS_GOOGLE_SUPPORT = 2; - /** - * Google is waiting for a response. - * - * Generated from protobuf enum ACTION_REQUIRED = 3; - */ - const ACTION_REQUIRED = 3; - /** - * A solution has been offered for the case, but it isn't yet closed. - * - * Generated from protobuf enum SOLUTION_PROVIDED = 4; - */ - const SOLUTION_PROVIDED = 4; - /** - * The case has been resolved. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', - self::CLOSED => 'CLOSED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Support\V2\Case_State::class); - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php deleted file mode 100644 index 7f53b4492458..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.support.v2.SearchCaseClassificationsRequest - */ -class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * An expression written in the Google Cloud filter language. If non-empty, - * then only cases whose fields match the filter are returned. If empty, then - * no messages are filtered out. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of cases fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * An expression written in the Google Cloud filter language. If non-empty, - * then only cases whose fields match the filter are returned. If empty, then - * no messages are filtered out. - * @type int $page_size - * The maximum number of cases fetched with each request. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * An expression written in the Google Cloud filter language. If non-empty, - * then only cases whose fields match the filter are returned. If empty, then - * no messages are filtered out. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression written in the Google Cloud filter language. If non-empty, - * then only cases whose fields match the filter are returned. If empty, then - * no messages are filtered out. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. - * - * 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 the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php deleted file mode 100644 index bc505b11f599..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.SearchCaseClassificationsResponse - */ -class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - */ - private $case_classifications; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `SearchCaseClassificationsRequest` message - * that is issued. If unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Support\V2\CaseClassification>|\Google\Protobuf\Internal\RepeatedField $case_classifications - * The classifications retrieved. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `SearchCaseClassificationsRequest` message - * that is issued. If unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCaseClassifications() - { - return $this->case_classifications; - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - * @param array<\Google\Cloud\Support\V2\CaseClassification>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCaseClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\CaseClassification::class); - $this->case_classifications = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `SearchCaseClassificationsRequest` message - * that is issued. If unspecified, there are no more results to retrieve. - * - * 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 results. This should be set in the - * `page_token` field of subsequent `SearchCaseClassificationsRequest` message - * that is issued. If unspecified, there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php deleted file mode 100644 index ae66bcad69fc..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php +++ /dev/null @@ -1,285 +0,0 @@ -google.cloud.support.v2.SearchCasesRequest - */ -class SearchCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The fully qualified name of parent resource to search cases under. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * An expression written in filter language. - * A query uses the following fields with the operators equals (`=`) and - * `AND`: - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * - `billingAccount`: A billing account in the form - * `billingAccounts/` - * You must specify either `organization` or `project`. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * Examples: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The fully qualified name of parent resource to search cases under. - * @type string $query - * An expression written in filter language. - * A query uses the following fields with the operators equals (`=`) and - * `AND`: - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * - `billingAccount`: A billing account in the form - * `billingAccounts/` - * You must specify either `organization` or `project`. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * Examples: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. The default page - * size is 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The fully qualified name of parent resource to search cases under. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The fully qualified name of parent resource to search cases under. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression written in filter language. - * A query uses the following fields with the operators equals (`=`) and - * `AND`: - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * - `billingAccount`: A billing account in the form - * `billingAccounts/` - * You must specify either `organization` or `project`. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * Examples: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression written in filter language. - * A query uses the following fields with the operators equals (`=`) and - * `AND`: - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * - `state`: The accepted values are `OPEN` or `CLOSED`. - * - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * - `billingAccount`: A billing account in the form - * `billingAccounts/` - * You must specify either `organization` or `project`. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * Examples: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * 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 the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php deleted file mode 100644 index 2bf2e0df01ac..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2.SearchCasesResponse - */ -class SearchCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `SearchCaseRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $cases - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `SearchCaseRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the Google Cloud Resource, after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @param array<\Google\Cloud\Support\V2\PBCase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `SearchCaseRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * 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 results. This should be set in the - * `page_token` field of subsequent `SearchCaseRequest` message that is - * issued. If unspecified, there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php deleted file mode 100644 index 2ced0c907010..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.support.v2.UpdateCaseRequest - */ -class UpdateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The case object to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - /** - * A list of attributes of the case object that should be updated - * as part of this request. Supported values are `priority`, `display_name`, - * and `subscriber_email_addresses`. If no fields are specified, all supported - * fields are updated. - * WARNING: If you do not provide a field mask, then you might accidentally - * clear some fields. For example, if you leave the field mask empty and do - * not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2\PBCase $case Required. The case object to update. - * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case object that should be updated - * as part of this request. Supported values are `priority`, `display_name`, - * and `subscriber_email_addresses`. If no fields are specified, all supported - * fields are updated. - * - * WARNING: If you do not provide a field mask, then you might accidentally - * clear some fields. For example, if you leave the field mask empty and do - * not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * @return \Google\Cloud\Support\V2\UpdateCaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCase($case) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2\PBCase $case - * Required. The case object to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A list of attributes of the case object that should be updated - * as part of this request. Supported values are `priority`, `display_name`, - * and `subscriber_email_addresses`. If no fields are specified, all supported - * fields are updated. - * WARNING: If you do not provide a field mask, then you might accidentally - * clear some fields. For example, if you leave the field mask empty and do - * not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The case object to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case object to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * A list of attributes of the case object that should be updated - * as part of this request. Supported values are `priority`, `display_name`, - * and `subscriber_email_addresses`. If no fields are specified, all supported - * fields are updated. - * WARNING: If you do not provide a field mask, then you might accidentally - * clear some fields. For example, if you leave the field mask empty and do - * not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * 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 list of attributes of the case object that should be updated - * as part of this request. Supported values are `priority`, `display_name`, - * and `subscriber_email_addresses`. If no fields are specified, all supported - * fields are updated. - * WARNING: If you do not provide a field mask, then you might accidentally - * clear some fields. For example, if you leave the field mask empty and do - * not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * 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/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php deleted file mode 100644 index 7ebb59e33a5a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseAttachmentServiceClient->listAttachments($request); - - /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_attachments_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php deleted file mode 100644 index dd62d99252c6..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - close_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php deleted file mode 100644 index dd22f006af31..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent) - ->setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->createCase($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 = CaseServiceClient::projectName('[PROJECT]'); - - create_case_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php deleted file mode 100644 index 67e5d6a627a1..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - escalate_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php deleted file mode 100644 index 4a8d0488600f..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - get_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php deleted file mode 100644 index 0eda14b5abb8..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->listCases($request); - - /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); - - list_cases_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php deleted file mode 100644 index 86fac7bd4aa7..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php +++ /dev/null @@ -1,65 +0,0 @@ - ". For example "Technical - * Issue > Compute > Compute Engine". - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function search_case_classifications_sample(): void -{ - // Create a client. - $caseServiceClient = new CaseServiceClient(); - - // Prepare the request message. - $request = new SearchCaseClassificationsRequest(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->searchCaseClassifications($request); - - /** @var CaseClassification $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 cloudsupport_v2_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php deleted file mode 100644 index 4b7af732bd80..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php +++ /dev/null @@ -1,62 +0,0 @@ -searchCases($request); - - /** @var PBCase $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 cloudsupport_v2_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php deleted file mode 100644 index a440ac08a041..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php +++ /dev/null @@ -1,59 +0,0 @@ -setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->updateCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudsupport_v2_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php deleted file mode 100644 index 0543ae42dfef..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setComment($comment); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->createComment($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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - create_comment_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php deleted file mode 100644 index 5cfab2bbfef6..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $commentServiceClient->listComments($request); - - /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_comments_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php deleted file mode 100644 index 6acdc19bf4d6..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php +++ /dev/null @@ -1,274 +0,0 @@ - listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) - */ -final class CaseAttachmentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CaseAttachmentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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/case_attachment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - projectCase: projects/{project}/cases/{case} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudsupport.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Retrieve all attachments associated with a support case. - * - * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} - * . - * - * @example samples/V2/CaseAttachmentServiceClient/list_attachments.php - * - * @param ListAttachmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php deleted file mode 100644 index 9cfac7cc93d7..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php +++ /dev/null @@ -1,519 +0,0 @@ - closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) - */ -final class CaseServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CaseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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/case_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * 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_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * 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_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organization: organizations/{organization} - * - organizationCase: organizations/{organization}/cases/{case} - * - project: projects/{project} - * - projectCase: projects/{project}/cases/{case} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudsupport.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Close the specified case. - * - * The async variant is {@see CaseServiceClient::closeCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/close_case.php - * - * @param CloseCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); - } - - /** - * Create a new case and associate it with the given Google Cloud Resource. - * The case object must have the following fields set: `display_name`, - * `description`, `classification`, and `priority`. - * - * The async variant is {@see CaseServiceClient::createCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/create_case.php - * - * @param CreateCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); - } - - /** - * Escalate a case. Escalating a case will initiate the Google Cloud Support - * escalation management process. - * - * This operation is only available to certain Customer Care tiers. Go to - * https://cloud.google.com/support and look for 'Technical support - * escalations' in the feature list to find out which tiers are able to - * perform escalations. - * - * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/escalate_case.php - * - * @param EscalateCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve the specified case. - * - * The async variant is {@see CaseServiceClient::getCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/get_case.php - * - * @param GetCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('GetCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve all cases under the specified parent. - * - * Note: Listing cases under an Organization returns only the cases directly - * parented by that organization. To retrieve all cases under an organization, - * including cases parented by projects under that organization, use - * `cases.search`. - * - * The async variant is {@see CaseServiceClient::listCasesAsync()} . - * - * @example samples/V2/CaseServiceClient/list_cases.php - * - * @param ListCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCases', $request, $callOptions); - } - - /** - * Retrieve valid classifications to be used when creating a support case. - * The classications are hierarchical, with each classification containing - * all levels of the hierarchy, separated by " > ". For example "Technical - * Issue > Compute > Compute Engine". - * - * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} - * . - * - * @example samples/V2/CaseServiceClient/search_case_classifications.php - * - * @param SearchCaseClassificationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); - } - - /** - * Search cases using the specified query. - * - * The async variant is {@see CaseServiceClient::searchCasesAsync()} . - * - * @example samples/V2/CaseServiceClient/search_cases.php - * - * @param SearchCasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCases', $request, $callOptions); - } - - /** - * Update the specified case. Only a subset of fields can be updated. - * - * The async variant is {@see CaseServiceClient::updateCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/update_case.php - * - * @param UpdateCaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php deleted file mode 100644 index 313ae37957df..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php +++ /dev/null @@ -1,363 +0,0 @@ - createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) - */ -final class CommentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CommentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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/comment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a comment - * resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted comment resource. - */ - public static function commentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('comment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_comment resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted organization_case_comment resource. - */ - public static function organizationCaseCommentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('organizationCaseComment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_comment resource. - * - * @param string $project - * @param string $case - * @param string $comment - * - * @return string The formatted project_case_comment resource. - */ - public static function projectCaseCommentName(string $project, string $case, string $comment): string - { - return self::getPathTemplate('projectCaseComment')->render([ - 'project' => $project, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - comment: organizations/{organization}/cases/{case}/comments/{comment} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudsupport.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Add a new comment to the specified Case. - * The comment object must have the following fields set: body. - * - * The async variant is {@see CommentServiceClient::createCommentAsync()} . - * - * @example samples/V2/CommentServiceClient/create_comment.php - * - * @param CreateCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Comment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); - } - - /** - * Retrieve all Comments associated with the Case object. - * - * The async variant is {@see CommentServiceClient::listCommentsAsync()} . - * - * @example samples/V2/CommentServiceClient/list_comments.php - * - * @param ListCommentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListComments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json deleted file mode 100644 index d00e90d65343..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.support.v2", - "libraryPackage": "Google\\Cloud\\Support\\V2", - "services": { - "CaseAttachmentService": { - "clients": { - "grpc": { - "libraryClient": "CaseAttachmentServiceGapicClient", - "rpcs": { - "ListAttachments": { - "methods": [ - "listAttachments" - ] - } - } - } - } - }, - "CaseService": { - "clients": { - "grpc": { - "libraryClient": "CaseServiceGapicClient", - "rpcs": { - "CloseCase": { - "methods": [ - "closeCase" - ] - }, - "CreateCase": { - "methods": [ - "createCase" - ] - }, - "EscalateCase": { - "methods": [ - "escalateCase" - ] - }, - "GetCase": { - "methods": [ - "getCase" - ] - }, - "ListCases": { - "methods": [ - "listCases" - ] - }, - "SearchCaseClassifications": { - "methods": [ - "searchCaseClassifications" - ] - }, - "SearchCases": { - "methods": [ - "searchCases" - ] - }, - "UpdateCase": { - "methods": [ - "updateCase" - ] - } - } - } - } - }, - "CommentService": { - "clients": { - "grpc": { - "libraryClient": "CommentServiceGapicClient", - "rpcs": { - "CreateComment": { - "methods": [ - "createComment" - ] - }, - "ListComments": { - "methods": [ - "listComments" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json deleted file mode 100644 index 6ae7449b3151..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CaseAttachmentService": { - "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": 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 - } - }, - "methods": { - "ListAttachments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php deleted file mode 100644 index a6acb27cb7fb..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php +++ /dev/null @@ -1,53 +0,0 @@ - [ - 'google.cloud.support.v2.CaseAttachmentService' => [ - 'ListAttachments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListAttachmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php deleted file mode 100644 index 44f5c6786e92..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php +++ /dev/null @@ -1,46 +0,0 @@ - [ - 'google.cloud.support.v2.CaseAttachmentService' => [ - 'ListAttachments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/attachments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/attachments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json deleted file mode 100644 index 7fff474416b4..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CaseService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "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_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 - } - }, - "methods": { - "CloseCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EscalateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCaseClassifications": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php deleted file mode 100644 index b97e8e966e33..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.support.v2.CaseService' => [ - 'CloseCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCaseClassifications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SearchCaseClassificationsResponse', - ], - 'SearchCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SearchCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'case.name', - 'fieldAccessors' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organization' => 'organizations/{organization}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'project' => 'projects/{project}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php deleted file mode 100644 index 35e1aa86a107..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php +++ /dev/null @@ -1,161 +0,0 @@ - [ - 'google.cloud.support.v2.CaseService' => [ - 'CloseCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}:close', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:close', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/cases', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}:escalate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:escalate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/cases', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/caseClassifications:search', - ], - 'SearchCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/cases:search', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases:search', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{case.name=projects/*/cases/*}', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{case.name=organizations/*/cases/*}', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'case.name' => [ - 'getters' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json deleted file mode 100644 index 1b66ef04b47d..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CommentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "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_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 - } - }, - "methods": { - "CreateComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListComments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php deleted file mode 100644 index f3f31a7f53de..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php +++ /dev/null @@ -1,68 +0,0 @@ - [ - 'google.cloud.support.v2.CommentService' => [ - 'CreateComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Comment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php deleted file mode 100644 index 63e87c0fef3f..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php +++ /dev/null @@ -1,65 +0,0 @@ - [ - 'google.cloud.support.v2.CommentService' => [ - 'CreateComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', - 'body' => 'comment', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', - 'body' => 'comment', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php deleted file mode 100644 index f78230ffac55..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php +++ /dev/null @@ -1,172 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseAttachmentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseAttachmentServiceClient($options); - } - - /** @test */ - public function listAttachmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachmentsElement = new Attachment(); - $attachments = [ - $attachmentsElement, - ]; - $expectedResponse = new ListAttachmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachments($attachments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachmentsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachmentsElement = new Attachment(); - $attachments = [ - $attachmentsElement, - ]; - $expectedResponse = new ListAttachmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachments($attachments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachmentsAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php deleted file mode 100644 index c5806436f84e..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php +++ /dev/null @@ -1,712 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseServiceClient($options); - } - - /** @test */ - public function closeCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCase($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.support.v2.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function closeCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->closeCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - $response = $gapicClient->createCase($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.support.v2.CaseService/CreateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - try { - $gapicClient->createCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function escalateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->escalateCase($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.support.v2.CaseService/EscalateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function escalateCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->escalateCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getCase($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.support.v2.CaseService/GetCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new ListCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/ListCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListCasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCaseClassificationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $caseClassificationsElement = new CaseClassification(); - $caseClassifications = [ - $caseClassificationsElement, - ]; - $expectedResponse = new SearchCaseClassificationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCaseClassifications($caseClassifications); - $transport->addResponse($expectedResponse); - $request = new SearchCaseClassificationsRequest(); - $response = $gapicClient->searchCaseClassifications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/SearchCaseClassifications', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCaseClassificationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SearchCaseClassificationsRequest(); - try { - $gapicClient->searchCaseClassifications($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new SearchCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - $request = new SearchCasesRequest(); - $response = $gapicClient->searchCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/SearchCases', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 SearchCasesRequest(); - try { - $gapicClient->searchCases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - $response = $gapicClient->updateCase($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.support.v2.CaseService/UpdateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - try { - $gapicClient->updateCase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function closeCaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCaseAsync($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.support.v2.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php deleted file mode 100644 index 871515b3e1fe..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php +++ /dev/null @@ -1,247 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CommentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CommentServiceClient($options); - } - - /** @test */ - public function createCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createComment($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.support.v2.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCommentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - try { - $gapicClient->createComment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $commentsElement = new Comment(); - $comments = [ - $commentsElement, - ]; - $expectedResponse = new ListCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setComments($comments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CommentService/ListComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCommentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listComments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCommentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createCommentAsync($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.support.v2.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Common.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Common.php deleted file mode 100644 index fbb17a17a223be9d7627c5758cb364fdb89fcd53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6223 zcmbtY-EQN?6|N-zj@Mo;_s?-Q8$}y58zYfXcY&f#w*^IxBxWg6B`G^z7$9hgwuw-r zLQ$JIL9Tk!t3E){t3E=3-t+|u^ch;9=nM1}`kf)AwY1*+Y<**D=A1ca&iT&Y{OUKO zixGQNZ3S_V`dKijo?ce7i=aA6lPu{cQT23kb{3@7eli?|QIOWFRn4lJmRseT?!E`s zaWYB!!9n#rNzS8SuOB6o!CvM^L7eTqc(Mn^VG`HHd5p#WFc^>geo$?78=WBY2Y%+C zv;^ykN~|ZYU_Ci}@(E-8$RCfZsyKpu!>afjO-`e*Uma(DhJWveV=s)uEcB!BYiR$p zdge#t0IaXlo=xI@7AA3(7_7J-JpQnnpGmauj}qMWX?3bhmkfZ*pXhNGq_H2JXu-Ij zhNCP=yC6L{I1jR!*=XhQhlN-=E6Q_!FTw9q{e! z>*N|!DWmYD83xgy5nT8$!X!O7czLUrhg`=xyOW@Z2I{x9T?&T;r zG5jow&wnISCy9g0AIZ~AaI;7m4ANly8YP9pKmK)CxEHiDZ#IGS$20qrH$Gth`j9>P z0T7q(Mx$`yjw7fKme}xvZ?v=*w}fvNbqH0<6?ii*w0|dy+|0c*tvgo z2f-Fx78}!;6f7fQ63@?Vl2g=Twl#x+?Z@YVTxSfXOEZu3+b&g0k2m&r>bZoR3Ch=J zO!7x;Erb@}_KYk#S*H6!UGc9U4v*k)9Gd!(X}wzdE9RN8_G>r=+r2VqLyXIt}E z+g?zEj;_xELVlmE!h#;KxLpxC-=4}8#DJ+0pUZdHjnp56ld(4hAjaEEAT8DYTVgk+ zng|8nVQ(3hs<^skdhT(Tdp*>Y1*6ES2Q@?6#tHbW?X+8ytt+ zQ*5qCW%+G(-|02H>ozO$4Hyj)4Bb7JmgJjkqiZ>?VtA^hacNnW*bU;Hk*vrv+q$~q z{Y+YYWo=(tBTkd+t#-q*+m@wC>w?O)Id`FoW^>1pSnZD`cGC{Nm>^qBQ?|UtRtCw? z4`bmp;$vfk8rbA3rRVR*gvj}l`q+2qDd9(nxx zkoS_Yo_`9*GghA7wH8fJ7d!B##t(IsUk8X)RypDgfMJWVj@8f&?$PfuAw@AY+tM|u zB7;h|9Jm`F4a)Q0S)IvHolP|311Je_2Le3xyG@eQNC@FTbiSE|6| zx7kLNyj(0}u|m!|3nP>@|1=7OZ`R};CVw7Wewm~LZyfk(|3d5$=6ybC= zNz*`-QTY~I@8`dQ+{kP4J+?Jl^0MHotU$ut`b9R3azNC6zs@97_fZg!MM@x#%Foy; zdWSSD?y#|c@H!YQvevIIaGY@|f6i)t98dE0z&rKFf!Dtx&`T-l6&d5r0 z$Ps&VMOc;~`(Gz5PdWduw4L8o*sWJD++s^t5dF(HGM&IM4w|4*61Lgef3t&nH~`6Z z#UCb#`Dy9;k|~s_Se#U%m`<_$KFw`PM4d`YwOS&TWTl{N8UjqX;@~@LCU$sHXXfX z>SoK!mnz5&EBv>;ywsqMbZx7tyPnflY)~N$q5MEpM|T_)JV#oQaj>g*9h4ZPJ&~bM zm=<)A)@pxR&|6?*QSY7!S@ZQ1`n0W{ZBY4y=9;48vrK9pasCY76-t~P%XHiLu|ylk zTp{{pDx8*yB&>Hh6un+O5-F|L{$64C8h+Nluz(7YjArFTWy{pcPpia}DNGit()H|h zhj^*>i9@`rz@$!PU8L?wzmM_>3{2x>nU>G|Fq)*4vS^tiW0|l$%`CJ?m2z3$V;lW6 zfSkM$%klhOZ5tRSBMe^!!>R~??_#*x=dFDob?s}moL~DcyM;r88ROL_o>zJ8r%;GgLYbPN;{)EyA?p(&a}Xaxd8Z*osJot{k=f_4?N`5IF_mdb&hA*9%Zvb#lTfzB52!C)HXLPdvS9GF?zS7I4*x>YZdL$ zJG%Z9Z1GuL+iSz=p!IEs?XAsQE9ly}+Nywf$TV`1TIrUF>I*)xnhHI>Ntk*EEhjtLMVqxO$$t7u1&6?iXwgm^OkJK}2MPXoDYeV*$^o3otPpEj9sY zTKEiNbq*wId02H6Q=zC4GmVC8hzp9V@Xxr~qmf8j-u>GO+ki|J`RP1C7YC1%Sm1}Z zEQpwoB=|;A#f*h~;Gu=~nz||AFOar4Q(@m~Hqo3zB_K`F4!P|D+yyVd`V7H=Bvhd* zC??>GQHz3fiC{o(YAQ~f#yygyajKxOKW4i|562*dc^2+1DlrvEU`|Eoi7G3!Q&b(Z zoX)9cA{Hq<_24*h9Ey>c%iwR!h&`3YO8AEm&~scQ1qvFQW($NR-25`EHponH0dAw{ zrT`vE18U$b>4v<`?lct}*)F#c{H|Gu0%?=r*5-=gw#6;CNT+rWu0nu0$TLXF(oOl~ z1NI1s1$o5CdyEdGxLg=oXm0baqT7;03DMv!WTabS#1SqhbtG9vT;SYZ6Tt3KKOq>8 zU|Zxf^d`5_ELKHKQwz~SY0guIlhfHS8vJqxbB1i`hSyT^4a(qHzbijvJ21RsnT5v$ zTVXCox<@WTk#T`K8og&5_sP+i!;wftv68mwBwXHAD34+mh8^3M)75c%>WtnZe>lh~ zxqKv3)Fx?%Jng6g?}CM!Ex-X00Oj76YwV#&OU6vFAToiYyvdRt$moY01hne_!pQnS z5{X8bKs$kicjPL20GHy40c5!&h{Uj3cvH|-M|!v$uuXdIz_exu=k(A*X2FXA+1utV z0`7bOz2;Ry)Fd;PTP72^+(5pDUtBI#c4Nj4!*O^TMqzeIkwFy#<17rca6YPi5ul!B zqA@Fx1F56rns=nTZLeinEra55VZGaH7`iG|cFNl&a8s0H&DIae;U%ig!cz!oG29<1#xvRx4Xb*riuPrR?p%<0uo5*u&`erx z1Z)Qb$7`C+2K6|2>l3fJ-O}^@ycsRt>A<&lo=jii{ZWXA`1~nybo$BkN=+@ kV%qun2ebFikMh^)E05XKxQ6{}9internalAddGeneratedFile( - ' -¹ -$google/cloud/talent/v4/company.protogoogle.cloud.talent.v4google/api/resource.proto#google/cloud/talent/v4/common.proto"È -Company -name (  - display_name ( BàA - external_id ( BàA1 -size (2#.google.cloud.talent.v4.CompanySize -headquarters_address (  - hiring_agency ( -eeo_text (  - website_uri (  -career_site_uri (  - image_uri - ( 4 -(keyword_searchable_job_custom_attributes ( BF - derived_info ( 2+.google.cloud.talent.v4.Company.DerivedInfoBàA - suspended (BàAN - DerivedInfo? -headquarters_location ( 2 .google.cloud.talent.v4.Location:YêAV -jobs.googleapis.com/Company7projects/{project}/tenants/{tenant}/companies/{company}Bf -com.google.cloud.talent.v4B CompanyProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php deleted file mode 100644 index 7b0524e10a8e..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompanyService.php +++ /dev/null @@ -1,66 +0,0 @@ -internalAddGeneratedFile( - ' -« -,google/cloud/talent/v4/company_service.protogoogle.cloud.talent.v4google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/talent/v4/common.proto$google/cloud/talent/v4/company.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" -CreateCompanyRequest2 -parent ( B"àAúA -jobs.googleapis.com/Tenant5 -company ( 2.google.cloud.talent.v4.CompanyBàA"F -GetCompanyRequest1 -name ( B#àAúA -jobs.googleapis.com/Company"~ -UpdateCompanyRequest5 -company ( 2.google.cloud.talent.v4.CompanyBàA/ - update_mask ( 2.google.protobuf.FieldMask"I -DeleteCompanyRequest1 -name ( B#àAúA -jobs.googleapis.com/Company"Œ -ListCompaniesRequest2 -parent ( B"àAúA -jobs.googleapis.com/Tenant - -page_token (  - page_size ( -require_open_jobs ("  -ListCompaniesResponse2 - companies ( 2.google.cloud.talent.v4.Company -next_page_token ( : -metadata ( 2(.google.cloud.talent.v4.ResponseMetadata2à -CompanyService­ - CreateCompany,.google.cloud.talent.v4.CreateCompanyRequest.google.cloud.talent.v4.Company"MÚAparent,company‚Óä“6"+/v4/{parent=projects/*/tenants/*}/companies:company” - -GetCompany).google.cloud.talent.v4.GetCompanyRequest.google.cloud.talent.v4.Company":ÚAname‚Óä“-+/v4/{name=projects/*/tenants/*/companies/*}º - UpdateCompany,.google.cloud.talent.v4.UpdateCompanyRequest.google.cloud.talent.v4.Company"ZÚAcompany,update_mask‚Óä“>23/v4/{company.name=projects/*/tenants/*/companies/*}:company‘ - DeleteCompany,.google.cloud.talent.v4.DeleteCompanyRequest.google.protobuf.Empty":ÚAname‚Óä“-*+/v4/{name=projects/*/tenants/*/companies/*}ª - ListCompanies,.google.cloud.talent.v4.ListCompaniesRequest-.google.cloud.talent.v4.ListCompaniesResponse"<ÚAparent‚Óä“-+/v4/{parent=projects/*/tenants/*}/companieslÊAjobs.googleapis.comÒAShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBm -com.google.cloud.talent.v4BCompanyServiceProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompletionService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/CompletionService.php deleted file mode 100644 index baf392f3c6aea288432de94029eea3f600c72c52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2293 zcmbtW-EJF26vlRv){{1v1%h#lI=GeUqQtA3NJyKeXze(WX=0mti`2@J8L!9oR_mQ* zXEu?ka)Y?wo;RojkHAB42`|6}PthyR?5uy9*dhVncrEV*{7! zw#&kvE{ID#p`YyN($S^DVP1#R;KZ?MF~Ua3BO}UvVpDwBEFV)rdPI=+VFc5zNSL-2 z!L+~G*+s~93Fo*ng=;A^^a^44`C->}Y|I4_@ORJQ9mjKoLtN*3xYQo*6PHs!xoF!D zJzJ)Sr9;EBY2g7@n9}y1&wzwIJjtsmc>zw^HBZpMBW`=2ayxK*!Gb238peQ%DVuVq z@E{H=;ha7$s2mOBLXvw}1R3K}Dz&vgkvpdZo zmN`~j2j1*zJ_inUdu2K#Ck_j)=K7Sz%DHrs=QPmpIe}C}3?1Vj$u>Pz{n(rTE;Pxr4qWuG5W~iw!=W zGYDdO;-kCq(Sq^<4wO;;rxo-;Tp;x8kOt$Y^t+I9p_R~@pdRr=Hh~j`bUFW*nS5j3 zM!A=)%Zmyc(&a^{R^5s$H4UwTb1=>(BbOAoXq#xmCEg$;1KP1!kMe8^rwVDgBGHoH|tg=A=k}k<)d09lgxjMHfCTFUb};C&0$&3FF@Ty>8~2)j#aac zs(_Y3H>AB;f8ME^$JI1@F2V@qyf`cwn zh4s?oOERRO=IDlE1{lpi*GF+9k7To6Dl9_;k0_r>m)+6G_+q5=;m8IYFo>0^p;s%dAaRNS}QX0 zU;Oar-#;fGYPuYquT;(M!MuD)ZNc@=bhQJkGs9Mos0uyj{%*d%psfBdTSFmyZs_{y z>1mwHw9-i^hH7AM`z{fE7L2z3&0Gd4`zQzDmt3v988aaZMGfg_YBm!uN~%|?h7&cL z0h@d)Kvr;P)kgj9?qu;gnW|W=?ppNG@cI2|-`-Nga&ERRovV?hntx~L455Djv1;Z(k>DRASh~OZ$XnR zxiXLz{+a$tePfQo7D*)dX_tO62tN=olaf{Vc<}r~rQe=1;Pm zg*3n!^BI2~(9EL|Wz-Mp@0|MyUie`~IP(46#WD&QjUy}oW)zUlQ=Hcnxd%ziwVvRD zizVc9=~E+OB#r!VIwV<;(uBpS#Z&wJE5gd5iAd+^s;wwT7r2vi?DyXzd4gHGB#e04&?a{ zbR}P%&r7uN{xu8qYjgu)QHMxWN36efLE?ldR4jpiiNdbBJO_vUXF_*n$li+<#kx zMv;tuf;xMX5J`UL@cGAzmt9;A$~o>ropa2%*xE|${y$aNE;@)r^cC#AFbAG~sZU(b zeP!w1#l*36%@`T_PyBfX6QzP0P`@hf&QaaG$@>gW-m_3+4;7|xlpfiQfr9{>5m(9S*QVlX!HZkwnLpRH$NF*it92avH7zXd4;>(>x!m_PNqR z3T*S;#)p$jRJKtQHqN;Iq4E&5V9OC>)Gn1BF$-hj>b9KGsjc$!Q2AsqhdsV3KkzdL zAble5pjCN&m>a3M6Y)*&DlRsspHRL$^Ba=Pj*G*e)tcryvrTE+Z=aO6@L9f7)>hC5 O*N@E1m&6_10sISftjrAn diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php deleted file mode 100644 index ae6d88b3d093..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/EventService.php +++ /dev/null @@ -1,38 +0,0 @@ -internalAddGeneratedFile( - ' -‹ -*google/cloud/talent/v4/event_service.protogoogle.cloud.talent.v4google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/cloud/talent/v4/event.proto"Ž -CreateClientEventRequest2 -parent ( B"àAúA -jobs.googleapis.com/Tenant> - client_event ( 2#.google.cloud.talent.v4.ClientEventBàA2Å - EventServiceÆ -CreateClientEvent0.google.cloud.talent.v4.CreateClientEventRequest#.google.cloud.talent.v4.ClientEvent"ZÚAparent,client_event‚Óä“>"./v4/{parent=projects/*/tenants/*}/clientEvents: client_eventlÊAjobs.googleapis.comÒAShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBk -com.google.cloud.talent.v4BEventServiceProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Filters.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Filters.php deleted file mode 100644 index 831cdcb3832e0877e48b983876328735cbed3e6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3009 zcmbVO-E!MR6t3;0O*V;}C^U6a3aT60lmWZAWdNrE{39psIJR+QpdHWbtfjRhkhMZu zr5L6c-0%jx0I$InZ^CfTJ8*U-Ij$Q+AUCmnes<4yzVGaL@|k<;qPyxLb*M);HP!xD z<)>72J;s^AY_%T@2GmmxHgYYSdO20Cw$x@zSG8(gzXPE@3p|4s)gfa;o8}Fh1!kTT zn>svy_BcPVY)(BtCley%kP-D=Vo>$4T|TCqn1qwwp^WWSL~Ku&vAr)J?;~W`#P`)& zm;?QYRQPj)zHJ$*&k2WryOxhF$Kn>Ttsmh22kL;>K84uVeFuSKaEm#r2xvJ5-Fu*h zIfd`8%b?x^HNH(-Kmg_U>JC)k5W82UzTsIeXI>jzi^U=36X3)zdk>;xMLKJs?uBue`-aoDw*b_Gr%6Y zH^EXMdmsI@fp#xLSY<2p%1K)1LR#m}9`D?p6Ad~6EJL>MycIb~?gNwZW&~Jd&qQ_( zsN`*lN@Te;ZQ*h0p)vdC0$O^?`dSFeQ5W90y)1!4iG(dn5*xamsaoq556tKc1-eH+~f3mRk7@?D#Z zu^cd&tFpL5v?)teHXgxD#G=`L21$(OVysR4g<_N~lzye3er81$SVoGRhW;rQ zB*7juon}^LeRFdQCBa}CxgFuH+(2ved&3S)YGP=lpIH;BvwtN~dZyFY(KTY49`*f* zY@2AsqeB<~A<2>wid}RKsEk43KqS%2%@}A=c@D(iaE8h@+5o^ffgudz8;?Mvf;fr2 zgwpGwElzD36T|f=yg(E@B{|ZCCvn0VQO+Kbl$w3^n@niUOqniQMsP4vdJpZ0a7(XE0dv6Ea%C^ymOw6)Y|w7vpk zQn`(`rwvbAEB*DzT*zI)pK|JtQc^iaivhfQ zq4Lv(PcDLQJ7gF$J^w4r71tkOV3yYuPzyT#0*1!T@ z0u?5>L?jnnS<3#LKu>Pz)+qN~d+-=r%+-f$SttXUCbX|TeHLJLE z-0C)U=+O?^Dm9zkQltJ{tKxF$M2l@Hk$lRgxAamYHZEj;PoXuyX=*l=&qv#c@>6C; zE&R9921^k*hZsLX8=w)70|3l3EeFP?Xx}_lg+U*o>)az})W-316A5uUZc+Rm<>CiC z47`K3iEXnN*cyT649llD(tD)MC8ds5Jw{9n2Mh+55ef2xIPt6?UqK|-fk-_JJi4Mh zL}`<{P+Z_qIlW+Li^8_zWO7`HVbvN`$@u6>wt-frQh*FIomQ!e^-if)t5;@3x{g+3 zL#?A}&~WH~xqI>qAGNxj^<;S+rK2h^bHx@@9-ti{T73LWE#=jaXTIEi+KK0d&>?;# z*(g6`@!m^Z3s&E7TX6gP@rPfNsfvEmzbf&6bbqpwycceRQ_JJr#Zh{O>)lKA5~05V D9|yg3 diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php deleted file mode 100644 index e9b56f10d303..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Histogram.php +++ /dev/null @@ -1,35 +0,0 @@ -internalAddGeneratedFile( - ' -‘ -&google/cloud/talent/v4/histogram.protogoogle.cloud.talent.v4") -HistogramQuery -histogram_query ( "± -HistogramQueryResult -histogram_query ( N - histogram ( 2;.google.cloud.talent.v4.HistogramQueryResult.HistogramEntry0 -HistogramEntry -key (  -value (:8Bh -com.google.cloud.talent.v4BHistogramProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php deleted file mode 100644 index d73a645cb8c9..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Job.php +++ /dev/null @@ -1,81 +0,0 @@ -internalAddGeneratedFile( - ' -ÿ - google/cloud/talent/v4/job.protogoogle.cloud.talent.v4google/api/resource.proto#google/cloud/talent/v4/common.protogoogle/protobuf/timestamp.proto"õ -Job -name ( 4 -company ( B#àAúA -jobs.googleapis.com/Company -requisition_id ( BàA -title ( BàA - description ( BàA - addresses ( E -application_info ( 2+.google.cloud.talent.v4.Job.ApplicationInfo8 - job_benefits (2".google.cloud.talent.v4.JobBenefitC -compensation_info ( 2(.google.cloud.talent.v4.CompensationInfoL -custom_attributes - ( 21.google.cloud.talent.v4.Job.CustomAttributesEntry8 - degree_types (2".google.cloud.talent.v4.DegreeType - -department ( @ -employment_types (2&.google.cloud.talent.v4.EmploymentType - -incentives (  - language_code ( 3 - job_level (2 .google.cloud.talent.v4.JobLevel -promotion_value ( -qualifications (  -responsibilities ( = -posting_region (2%.google.cloud.talent.v4.PostingRegion: - -visibility (2".google.cloud.talent.v4.VisibilityB2 -job_start_time ( 2.google.protobuf.Timestamp0 - job_end_time ( 2.google.protobuf.Timestamp8 -posting_publish_time ( 2.google.protobuf.Timestamp7 -posting_expire_time ( 2.google.protobuf.Timestamp< -posting_create_time ( 2.google.protobuf.TimestampBàA< -posting_update_time ( 2.google.protobuf.TimestampBàA! -company_display_name ( BàAB - derived_info ( 2\'.google.cloud.talent.v4.Job.DerivedInfoBàAI -processing_options ( 2-.google.cloud.talent.v4.Job.ProcessingOptionsD -ApplicationInfo -emails (  - instruction (  -uris (  - DerivedInfo3 - locations ( 2 .google.cloud.talent.v4.Location; -job_categories (2#.google.cloud.talent.v4.JobCategoryƒ -ProcessingOptions) -!disable_street_address_resolution (C -html_sanitization (2(.google.cloud.talent.v4.HtmlSanitization` -CustomAttributesEntry -key ( 6 -value ( 2\'.google.cloud.talent.v4.CustomAttribute:8:LêAI -jobs.googleapis.com/Job.projects/{project}/tenants/{tenant}/jobs/{job}Bb -com.google.cloud.talent.v4BJobProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/JobService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/JobService.php deleted file mode 100644 index 2f168ffe6f60ecd1c4a9ea54c609e730049880d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7638 zcmcgx&2tmU6_5NO>=xK^8?X>$8D?294wecnOHv|`9Z6#&kSwnx3{ELEHIiEPz-VSN zGcq_^R8mQ*a?aN=mmE{cA^$k@P*WELtk?g@Tn++G_?)P55kKg;~ zp6`Co+PBb$!X`0@t-7Quv=0S$p9q$1x@O1Jh4!G=Beu{n`!`7yi4hIf`az zuBPhRkHCxvLQmBl0_;a=djq56YNjDjhMLhKtG5I$lhR(dOfdU_;48FEJpo>5l?|8J zhN`zp#Oc_Y<(l?3kmmDy#0~sMS5|L%$5L@xPgvzT=JQ9Cd?2{?fP_yM1e>@6+qlp4 zrUKpszgow*OR}_Van3r(>-X4=WQZ zIR=JS(d_q4WAanS`8PBjVt5KKjSG0BIj*^9tNr)a0f0O?bHz0F?15ou#$Kyt(G)#h zlmqaV2Ap^DqXSkzo!qzF!}nliV5zFk%gK4`R;SefG!G)8#L{#9q2?u{)a?ej2hk;~ zLAKD`xrzRG2dz$8neatUnd#6Pl;Jfjb8t7k;z>{~4eA@s8D7fLS3?^;nixvk%M6d; zQi#Cz;O}jH=xwpXLIo2lEnwUux*kE)<3RSPZbVS+`)Kv(-ch5+l+uT|%bEf1JfaW0 z<5)R|%9!nX;PUn_kM9!-pD`T*X70B>fW)Kly=_~aEUlaahi`~BN)~MbT?$gDPJTEb zj*GJ>ZmBjzBoz~4tMi4c|B$BsBVEEP(07~+R|LZ5WWcRi;KS=^8n#kXK%K~4_9(_9 zo&n0jG>8%(qH~+Xg+KiR*U=2^U!%vNsN<;4Pc7(gVVyk{sKOJd0462|OoT$6h1^x&;<4?&<+W{ zg=RpG1L2xJ!P$5PEgIyttAx~}D4EB3G}rg06sB+@w;H7jv^aLIKh=nTOQ59&QSHwD zS8`<;B^)M2>6=}`{JD_38>PjO12cT33cPp&C2gKO%9vHHn^6Ki2>4dX z?L!u|L{5kj0LFht>F_1AL=3g96QymNYM0Q?#sWNtCA1V2EGAVWPU;Mc+l?r>K|kiw z!>E~?2sL;C#m!#NA#Q4(0q+7j*H>S25HLI2_b(XFC0A1*6 z2QXo1J*~rfwW5;)qNmQm_CoGqlo>|@RvHykp;GX3wA>lM0Mb`%)p!Y>gORsqrWQbW zB6ojs;YB8-&SjKA1inTUcUW9rlEYVE78Dz|v!6szMnsxY5>PNW5MA@^kRvyO<(lmnT}qa4Ur5%&E_UR%(n z9T>7gHA{5R;us?q(3Ns^yH;;XTSZx^$UAaHdAilumW$<$vRq1j1J9wEt=g8HjNvnA zx>9?VoT5wBa;21<1~kR1aDjSSP0rBON9D~&$yuC0XXNM2x?Gi$aj}k2C~GgHm4+%eT`QG$?=wd%ICwF_3lV)I#TWN`*6z=f*x zTxmY4%cJyhETRv5Eq0Z{u2QMh8Xyo3DOaR=xw)I16@LL$ejG!T@rk_qtX3~6RjGNr zlhWwoC{4(c3utL{PpVYFs4FNny4)-`E3#7Cs(^LkFXIS@6W8lFRa!s*+%!Eyt>@k( zu;n5$EIEK5swS?YmC>qrr~pC-y6XT!X-~TyC3v(pLT3V|TtZ35 zBDxNXwoTZ5o>lNfZY|0o4N4DgEe0IvFJmYX_Vy~D4o@D<0NV-L{hUF+uR{OhlLB-% zy69>yG&sl5EDQPy_wQx2?C=im(jmj&q|?qkuAsAY>>s#piSMDaR4G5YY;v6>syVdi+A8!N#h>q)m5JOX-@(D`>EABJLv*n~!5_@&?>{|e zyvdED{Nzdf4>9lTVBY?}ojpFH(}*W>?;6p4KLvAoplfdILL;&Z%@ve}7#_LMG+~x9 zT>LFG%ih#jMVK#KfeTRdjbs z@g7eXzjX0&{F*Q0n30|<7>Eo9^?xKX?E9}Ka_s<}0iV)a2u`8%wB_!UUj1~gg1}s&en=YYq!P>@CSenWGop%1oP#XuQ&AJ z*U8hnHvT7ECdY7rGf|-*BlK1LrcWPwnaBh$V&ad#knTi-kJqGt+P}uUl@de49A??K z#oUCJwTERcA6vsei=jAwD8L{2s*a<2_KMXER@e&++d7 z070fi10W#rz57l8l;28=5XRes;Uff7>rQTs`3m+jC#p7vgg^u51SAXzeO)IjuKr1E zm~~<1lYD*F%R1Jx-Y4z&Vbs|G_&NX02S>kO_$0nzk)?4+$c+#mzLm~->hh_0BqL8O zfK);68uu9LA-?4YdAv4+FB0r!GaWs~hMto=Ex*IG%8Ba}7B4=DQV0Gi7QV!6n6?BT z`P{Ed&rg}2dGV7|>FH|)`lj_Sq-7{L;N5^l%7pW|`m@6PPadC&CU_CXzJn*6JR v)xPil`2Ey$vDs+HS=xVmGx&aSn|~V&eM+SBm)1GvGa{qppZngRHwgU~90kca diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php deleted file mode 100644 index f01fd0c6e4c3..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/Tenant.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' -¿ -#google/cloud/talent/v4/tenant.protogoogle.cloud.talent.v4google/api/resource.proto"v -Tenant -name (  - external_id ( BàA:DêAA -jobs.googleapis.com/Tenant#projects/{project}/tenants/{tenant}Be -com.google.cloud.talent.v4B TenantProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php b/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php deleted file mode 100644 index 4f4d9da36d8e..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/GPBMetadata/Google/Cloud/Talent/V4/TenantService.php +++ /dev/null @@ -1,64 +0,0 @@ -internalAddGeneratedFile( - ' -Ë -+google/cloud/talent/v4/tenant_service.protogoogle.cloud.talent.v4google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto#google/cloud/talent/v4/common.proto#google/cloud/talent/v4/tenant.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" -CreateTenantRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project3 -tenant ( 2.google.cloud.talent.v4.TenantBàA"D -GetTenantRequest0 -name ( B"àAúA -jobs.googleapis.com/Tenant"{ -UpdateTenantRequest3 -tenant ( 2.google.cloud.talent.v4.TenantBàA/ - update_mask ( 2.google.protobuf.FieldMask"G -DeleteTenantRequest0 -name ( B"àAúA -jobs.googleapis.com/Tenant"€ -ListTenantsRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - -page_token (  - page_size ("› -ListTenantsResponse/ -tenants ( 2.google.cloud.talent.v4.Tenant -next_page_token ( : -metadata ( 2(.google.cloud.talent.v4.ResponseMetadata2ð - TenantServiceœ - CreateTenant+.google.cloud.talent.v4.CreateTenantRequest.google.cloud.talent.v4.Tenant"?ÚA parent,tenant‚Óä“)"/v4/{parent=projects/*}/tenants:tenant… - GetTenant(.google.cloud.talent.v4.GetTenantRequest.google.cloud.talent.v4.Tenant".ÚAname‚Óä“!/v4/{name=projects/*/tenants/*}¨ - UpdateTenant+.google.cloud.talent.v4.UpdateTenantRequest.google.cloud.talent.v4.Tenant"KÚAtenant,update_mask‚Óä“02&/v4/{tenant.name=projects/*/tenants/*}:tenantƒ - DeleteTenant+.google.cloud.talent.v4.DeleteTenantRequest.google.protobuf.Empty".ÚAname‚Óä“!*/v4/{name=projects/*/tenants/*}˜ - ListTenants*.google.cloud.talent.v4.ListTenantsRequest+.google.cloud.talent.v4.ListTenantsResponse"0ÚAparent‚Óä“!/v4/{parent=projects/*}/tenantslÊAjobs.googleapis.comÒAShttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/jobsBl -com.google.cloud.talent.v4BTenantServiceProtoPZ2cloud.google.com/go/talent/apiv4/talentpb;talentpb¢CTSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php deleted file mode 100644 index b28a6699f650..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.talent.v4.BatchCreateJobsRequest - */ -class BatchCreateJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The jobs to be created. - * A maximum of 200 jobs can be created in a batch. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $jobs; - - /** - * @param string $parent Required. The resource name of the tenant under which the job is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". Please see - * {@see JobServiceClient::tenantName()} for help formatting this field. - * @param \Google\Cloud\Talent\V4\Job[] $jobs Required. The jobs to be created. - * A maximum of 200 jobs can be created in a batch. - * - * @return \Google\Cloud\Talent\V4\BatchCreateJobsRequest - * - * @experimental - */ - public static function build(string $parent, array $jobs): self - { - return (new self()) - ->setParent($parent) - ->setJobs($jobs); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * @type array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Required. The jobs to be created. - * A maximum of 200 jobs can be created in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 jobs to be created. - * A maximum of 200 jobs can be created in a batch. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Required. The jobs to be created. - * A maximum of 200 jobs can be created in a batch. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Job::class); - $this->jobs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php deleted file mode 100644 index 93fef511aee4..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchCreateJobsResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.talent.v4.BatchCreateJobsResponse - */ -class BatchCreateJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of job mutation results from a batch create operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - */ - private $job_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $job_results - * List of job mutation results from a batch create operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * List of job mutation results from a batch create operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobResults() - { - return $this->job_results; - } - - /** - * List of job mutation results from a batch create operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - * @param array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\JobResult::class); - $this->job_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php deleted file mode 100644 index 9914c8abdfa5..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.talent.v4.BatchDeleteJobsRequest - */ -class BatchDeleteJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * The parent of all of the jobs specified in `names` must match this field. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The names of the jobs to delete. - * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". - * For example, "projects/foo/tenants/bar/jobs/baz". - * A maximum of 200 jobs can be deleted in a batch. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.resource_reference) = { - */ - private $names; - - /** - * @param string $parent Required. The resource name of the tenant under which the job is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * The parent of all of the jobs specified in `names` must match this field. Please see - * {@see JobServiceClient::tenantName()} for help formatting this field. - * @param string[] $names The names of the jobs to delete. - * - * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". - * For example, "projects/foo/tenants/bar/jobs/baz". - * - * A maximum of 200 jobs can be deleted in a batch. - * - * @return \Google\Cloud\Talent\V4\BatchDeleteJobsRequest - * - * @experimental - */ - public static function build(string $parent, array $names): self - { - return (new self()) - ->setParent($parent) - ->setNames($names); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * The parent of all of the jobs specified in `names` must match this field. - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * The names of the jobs to delete. - * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". - * For example, "projects/foo/tenants/bar/jobs/baz". - * A maximum of 200 jobs can be deleted in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * The parent of all of the jobs specified in `names` must match this field. - * - * 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 tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * The parent of all of the jobs specified in `names` must match this field. - * - * 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 names of the jobs to delete. - * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". - * For example, "projects/foo/tenants/bar/jobs/baz". - * A maximum of 200 jobs can be deleted in a batch. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * The names of the jobs to delete. - * The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". - * For example, "projects/foo/tenants/bar/jobs/baz". - * A maximum of 200 jobs can be deleted in a batch. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php deleted file mode 100644 index c69a951344a6..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchDeleteJobsResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.talent.v4.BatchDeleteJobsResponse - */ -class BatchDeleteJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of job mutation results from a batch delete operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - */ - private $job_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $job_results - * List of job mutation results from a batch delete operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * List of job mutation results from a batch delete operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobResults() - { - return $this->job_results; - } - - /** - * List of job mutation results from a batch delete operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - * @param array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\JobResult::class); - $this->job_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php deleted file mode 100644 index dd7b37355530..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.talent.v4.BatchOperationMetadata - */ -class BatchOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of a long running operation. - * - * Generated from protobuf field .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * More detailed information about operation state. - * - * Generated from protobuf field string state_description = 2; - */ - protected $state_description = ''; - /** - * Count of successful item(s) inside an operation. - * - * Generated from protobuf field int32 success_count = 3; - */ - protected $success_count = 0; - /** - * Count of failed item(s) inside an operation. - * - * Generated from protobuf field int32 failure_count = 4; - */ - protected $failure_count = 0; - /** - * Count of total item(s) inside an operation. - * - * Generated from protobuf field int32 total_count = 5; - */ - protected $total_count = 0; - /** - * The time when the batch operation is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - protected $create_time = null; - /** - * The time when the batch operation status is updated. The metadata and the - * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is - * refreshed every minute otherwise cached data is returned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - */ - protected $update_time = null; - /** - * The time when the batch operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to `true`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 8; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of a long running operation. - * @type string $state_description - * More detailed information about operation state. - * @type int $success_count - * Count of successful item(s) inside an operation. - * @type int $failure_count - * Count of failed item(s) inside an operation. - * @type int $total_count - * Count of total item(s) inside an operation. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the batch operation is created. - * @type \Google\Protobuf\Timestamp $update_time - * The time when the batch operation status is updated. The metadata and the - * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is - * refreshed every minute otherwise cached data is returned. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the batch operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to `true`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * The state of a long running operation. - * - * Generated from protobuf field .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of a long running operation. - * - * Generated from protobuf field .google.cloud.talent.v4.BatchOperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\BatchOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * More detailed information about operation state. - * - * Generated from protobuf field string state_description = 2; - * @return string - */ - public function getStateDescription() - { - return $this->state_description; - } - - /** - * More detailed information about operation state. - * - * Generated from protobuf field string state_description = 2; - * @param string $var - * @return $this - */ - public function setStateDescription($var) - { - GPBUtil::checkString($var, True); - $this->state_description = $var; - - return $this; - } - - /** - * Count of successful item(s) inside an operation. - * - * Generated from protobuf field int32 success_count = 3; - * @return int - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Count of successful item(s) inside an operation. - * - * Generated from protobuf field int32 success_count = 3; - * @param int $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt32($var); - $this->success_count = $var; - - return $this; - } - - /** - * Count of failed item(s) inside an operation. - * - * Generated from protobuf field int32 failure_count = 4; - * @return int - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Count of failed item(s) inside an operation. - * - * Generated from protobuf field int32 failure_count = 4; - * @param int $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt32($var); - $this->failure_count = $var; - - return $this; - } - - /** - * Count of total item(s) inside an operation. - * - * Generated from protobuf field int32 total_count = 5; - * @return int - */ - public function getTotalCount() - { - return $this->total_count; - } - - /** - * Count of total item(s) inside an operation. - * - * Generated from protobuf field int32 total_count = 5; - * @param int $var - * @return $this - */ - public function setTotalCount($var) - { - GPBUtil::checkInt32($var); - $this->total_count = $var; - - return $this; - } - - /** - * The time when the batch operation is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 time when the batch operation is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time when the batch operation status is updated. The metadata and the - * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is - * refreshed every minute otherwise cached data is returned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - * @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 time when the batch operation status is updated. The metadata and the - * [update_time][google.cloud.talent.v4.BatchOperationMetadata.update_time] is - * refreshed every minute otherwise cached data is returned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7; - * @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 time when the batch operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to `true`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 8; - * @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 when the batch operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to `true`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 8; - * @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/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php deleted file mode 100644 index cbae45c231d6..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchOperationMetadata/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.talent.v4.BatchOperationMetadata.State - */ -class State -{ - /** - * Default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The batch operation is being prepared for processing. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * The batch operation is actively being processed. - * - * Generated from protobuf enum PROCESSING = 2; - */ - const PROCESSING = 2; - /** - * The batch operation is processed, and at least one item has been - * successfully processed. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The batch operation is done and no item has been successfully processed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The batch operation is in the process of cancelling after - * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] - * is called. - * - * Generated from protobuf enum CANCELLING = 5; - */ - const CANCELLING = 5; - /** - * The batch operation is done after - * [google.longrunning.Operations.CancelOperation][google.longrunning.Operations.CancelOperation] - * is called. Any items processed before cancelling are returned in the - * response. - * - * Generated from protobuf enum CANCELLED = 6; - */ - const CANCELLED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::PROCESSING => 'PROCESSING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Talent\V4\BatchOperationMetadata_State::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php deleted file mode 100644 index b97257b42cc8..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.talent.v4.BatchUpdateJobsRequest - */ -class BatchUpdateJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The jobs to be updated. - * A maximum of 200 jobs can be updated in a batch. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $jobs; - /** - * Strongly recommended for the best service experience. Be aware that it will - * also increase latency when checking the status of a batch operation. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] - * are updated. Otherwise all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, The [Job][google.cloud.talent.v4.Job] inside - * [JobResult][JobOperationResult.JobResult] - * will only contains fields that is updated, plus the Id of the Job. - * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, - * which can yield a very large response. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param string $parent Required. The resource name of the tenant under which the job is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". Please see - * {@see JobServiceClient::tenantName()} for help formatting this field. - * @param \Google\Cloud\Talent\V4\Job[] $jobs Required. The jobs to be updated. - * A maximum of 200 jobs can be updated in a batch. - * - * @return \Google\Cloud\Talent\V4\BatchUpdateJobsRequest - * - * @experimental - */ - public static function build(string $parent, array $jobs): self - { - return (new self()) - ->setParent($parent) - ->setJobs($jobs); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * @type array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * Required. The jobs to be updated. - * A maximum of 200 jobs can be updated in a batch. - * @type \Google\Protobuf\FieldMask $update_mask - * Strongly recommended for the best service experience. Be aware that it will - * also increase latency when checking the status of a batch operation. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] - * are updated. Otherwise all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, The [Job][google.cloud.talent.v4.Job] inside - * [JobResult][JobOperationResult.JobResult] - * will only contains fields that is updated, plus the Id of the Job. - * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, - * which can yield a very large response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 jobs to be updated. - * A maximum of 200 jobs can be updated in a batch. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Required. The jobs to be updated. - * A maximum of 200 jobs can be updated in a batch. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * Strongly recommended for the best service experience. Be aware that it will - * also increase latency when checking the status of a batch operation. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] - * are updated. Otherwise all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, The [Job][google.cloud.talent.v4.Job] inside - * [JobResult][JobOperationResult.JobResult] - * will only contains fields that is updated, plus the Id of the Job. - * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, - * which can yield a very large response. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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); - } - - /** - * Strongly recommended for the best service experience. Be aware that it will - * also increase latency when checking the status of a batch operation. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, only the specified fields in [Job][google.cloud.talent.v4.Job] - * are updated. Otherwise all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * If [update_mask][google.cloud.talent.v4.BatchUpdateJobsRequest.update_mask] - * is provided, The [Job][google.cloud.talent.v4.Job] inside - * [JobResult][JobOperationResult.JobResult] - * will only contains fields that is updated, plus the Id of the Job. - * Otherwise, [Job][google.cloud.talent.v4.Job] will include all fields, - * which can yield a very large response. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @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/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php deleted file mode 100644 index 98e15dc91515..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/BatchUpdateJobsResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.talent.v4.BatchUpdateJobsResponse - */ -class BatchUpdateJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of job mutation results from a batch update operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - */ - private $job_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $job_results - * List of job mutation results from a batch update operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * List of job mutation results from a batch update operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobResults() - { - return $this->job_results; - } - - /** - * List of job mutation results from a batch update operation. It can change - * until operation status is FINISHED, FAILED or CANCELLED. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobResult job_results = 1; - * @param array<\Google\Cloud\Talent\V4\JobResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\JobResult::class); - $this->job_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php deleted file mode 100644 index 51a941ee0c4e..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ClientEvent.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.talent.v4.ClientEvent - */ -class ClientEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Strongly recommended for the best service experience. - * A unique ID generated in the API responses. It can be found in - * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. - * - * Generated from protobuf field string request_id = 1; - */ - protected $request_id = ''; - /** - * Required. A unique identifier, generated by the client application. - * - * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_id = ''; - /** - * Required. The timestamp of the event. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $create_time = null; - /** - * Notes about the event provided by recruiters or other users, for example, - * feedback on why a job was bookmarked. - * - * Generated from protobuf field string event_notes = 9; - */ - protected $event_notes = ''; - protected $event; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $request_id - * Strongly recommended for the best service experience. - * A unique ID generated in the API responses. It can be found in - * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. - * @type string $event_id - * Required. A unique identifier, generated by the client application. - * @type \Google\Protobuf\Timestamp $create_time - * Required. The timestamp of the event. - * @type \Google\Cloud\Talent\V4\JobEvent $job_event - * An event issued when a job seeker interacts with the application that - * implements Cloud Talent Solution. - * @type string $event_notes - * Notes about the event provided by recruiters or other users, for example, - * feedback on why a job was bookmarked. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Event::initOnce(); - parent::__construct($data); - } - - /** - * Strongly recommended for the best service experience. - * A unique ID generated in the API responses. It can be found in - * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. - * - * Generated from protobuf field string request_id = 1; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Strongly recommended for the best service experience. - * A unique ID generated in the API responses. It can be found in - * [ResponseMetadata.request_id][google.cloud.talent.v4.ResponseMetadata.request_id]. - * - * Generated from protobuf field string request_id = 1; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Required. A unique identifier, generated by the client application. - * - * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventId() - { - return $this->event_id; - } - - /** - * Required. A unique identifier, generated by the client application. - * - * 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 timestamp of the event. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The timestamp of the event. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * An event issued when a job seeker interacts with the application that - * implements Cloud Talent Solution. - * - * Generated from protobuf field .google.cloud.talent.v4.JobEvent job_event = 5; - * @return \Google\Cloud\Talent\V4\JobEvent|null - */ - public function getJobEvent() - { - return $this->readOneof(5); - } - - public function hasJobEvent() - { - return $this->hasOneof(5); - } - - /** - * An event issued when a job seeker interacts with the application that - * implements Cloud Talent Solution. - * - * Generated from protobuf field .google.cloud.talent.v4.JobEvent job_event = 5; - * @param \Google\Cloud\Talent\V4\JobEvent $var - * @return $this - */ - public function setJobEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\JobEvent::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Notes about the event provided by recruiters or other users, for example, - * feedback on why a job was bookmarked. - * - * Generated from protobuf field string event_notes = 9; - * @return string - */ - public function getEventNotes() - { - return $this->event_notes; - } - - /** - * Notes about the event provided by recruiters or other users, for example, - * feedback on why a job was bookmarked. - * - * Generated from protobuf field string event_notes = 9; - * @param string $var - * @return $this - */ - public function setEventNotes($var) - { - GPBUtil::checkString($var, True); - $this->event_notes = $var; - - return $this; - } - - /** - * @return string - */ - public function getEvent() - { - return $this->whichOneof("event"); - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php deleted file mode 100644 index 1837c9ce90ac..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter.php +++ /dev/null @@ -1,294 +0,0 @@ -google.cloud.talent.v4.CommuteFilter - */ -class CommuteFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The method of transportation to calculate the commute time for. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $commute_method = 0; - /** - * Required. The latitude and longitude of the location to calculate the - * commute time from. - * - * Generated from protobuf field .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_coordinates = null; - /** - * Required. The maximum travel time in seconds. The maximum allowed value is - * `3600s` (one hour). Format is `123s`. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $travel_duration = null; - /** - * If `true`, jobs without street level addresses may also be returned. - * For city level addresses, the city center is used. For state and coarser - * level addresses, text matching is used. - * If this field is set to `false` or isn't specified, only jobs that include - * street level addresses will be returned by commute search. - * - * Generated from protobuf field bool allow_imprecise_addresses = 4; - */ - protected $allow_imprecise_addresses = false; - protected $traffic_option; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $commute_method - * Required. The method of transportation to calculate the commute time for. - * @type \Google\Type\LatLng $start_coordinates - * Required. The latitude and longitude of the location to calculate the - * commute time from. - * @type \Google\Protobuf\Duration $travel_duration - * Required. The maximum travel time in seconds. The maximum allowed value is - * `3600s` (one hour). Format is `123s`. - * @type bool $allow_imprecise_addresses - * If `true`, jobs without street level addresses may also be returned. - * For city level addresses, the city center is used. For state and coarser - * level addresses, text matching is used. - * If this field is set to `false` or isn't specified, only jobs that include - * street level addresses will be returned by commute search. - * @type int $road_traffic - * Specifies the traffic density to use when calculating commute time. - * @type \Google\Type\TimeOfDay $departure_time - * The departure time used to calculate traffic impact, represented as - * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. - * Currently traffic model is restricted to hour level resolution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); - parent::__construct($data); - } - - /** - * Required. The method of transportation to calculate the commute time for. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getCommuteMethod() - { - return $this->commute_method; - } - - /** - * Required. The method of transportation to calculate the commute time for. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteMethod commute_method = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setCommuteMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CommuteMethod::class); - $this->commute_method = $var; - - return $this; - } - - /** - * Required. The latitude and longitude of the location to calculate the - * commute time from. - * - * Generated from protobuf field .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\LatLng|null - */ - public function getStartCoordinates() - { - return $this->start_coordinates; - } - - public function hasStartCoordinates() - { - return isset($this->start_coordinates); - } - - public function clearStartCoordinates() - { - unset($this->start_coordinates); - } - - /** - * Required. The latitude and longitude of the location to calculate the - * commute time from. - * - * Generated from protobuf field .google.type.LatLng start_coordinates = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setStartCoordinates($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->start_coordinates = $var; - - return $this; - } - - /** - * Required. The maximum travel time in seconds. The maximum allowed value is - * `3600s` (one hour). Format is `123s`. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Required. The maximum travel time in seconds. The maximum allowed value is - * `3600s` (one hour). Format is `123s`. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * If `true`, jobs without street level addresses may also be returned. - * For city level addresses, the city center is used. For state and coarser - * level addresses, text matching is used. - * If this field is set to `false` or isn't specified, only jobs that include - * street level addresses will be returned by commute search. - * - * Generated from protobuf field bool allow_imprecise_addresses = 4; - * @return bool - */ - public function getAllowImpreciseAddresses() - { - return $this->allow_imprecise_addresses; - } - - /** - * If `true`, jobs without street level addresses may also be returned. - * For city level addresses, the city center is used. For state and coarser - * level addresses, text matching is used. - * If this field is set to `false` or isn't specified, only jobs that include - * street level addresses will be returned by commute search. - * - * Generated from protobuf field bool allow_imprecise_addresses = 4; - * @param bool $var - * @return $this - */ - public function setAllowImpreciseAddresses($var) - { - GPBUtil::checkBool($var); - $this->allow_imprecise_addresses = $var; - - return $this; - } - - /** - * Specifies the traffic density to use when calculating commute time. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; - * @return int - */ - public function getRoadTraffic() - { - return $this->readOneof(5); - } - - public function hasRoadTraffic() - { - return $this->hasOneof(5); - } - - /** - * Specifies the traffic density to use when calculating commute time. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter.RoadTraffic road_traffic = 5; - * @param int $var - * @return $this - */ - public function setRoadTraffic($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CommuteFilter\RoadTraffic::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The departure time used to calculate traffic impact, represented as - * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. - * Currently traffic model is restricted to hour level resolution. - * - * Generated from protobuf field .google.type.TimeOfDay departure_time = 6; - * @return \Google\Type\TimeOfDay|null - */ - public function getDepartureTime() - { - return $this->readOneof(6); - } - - public function hasDepartureTime() - { - return $this->hasOneof(6); - } - - /** - * The departure time used to calculate traffic impact, represented as - * [google.type.TimeOfDay][google.type.TimeOfDay] in local time zone. - * Currently traffic model is restricted to hour level resolution. - * - * Generated from protobuf field .google.type.TimeOfDay departure_time = 6; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setDepartureTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getTrafficOption() - { - return $this->whichOneof("traffic_option"); - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php deleted file mode 100644 index d0f5360e5eb3..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteFilter/RoadTraffic.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.talent.v4.CommuteFilter.RoadTraffic - */ -class RoadTraffic -{ - /** - * Road traffic situation isn't specified. - * - * Generated from protobuf enum ROAD_TRAFFIC_UNSPECIFIED = 0; - */ - const ROAD_TRAFFIC_UNSPECIFIED = 0; - /** - * Optimal commute time without considering any traffic impact. - * - * Generated from protobuf enum TRAFFIC_FREE = 1; - */ - const TRAFFIC_FREE = 1; - /** - * Commute time calculation takes in account the peak traffic impact. - * - * Generated from protobuf enum BUSY_HOUR = 2; - */ - const BUSY_HOUR = 2; - - private static $valueToName = [ - self::ROAD_TRAFFIC_UNSPECIFIED => 'ROAD_TRAFFIC_UNSPECIFIED', - self::TRAFFIC_FREE => 'TRAFFIC_FREE', - self::BUSY_HOUR => 'BUSY_HOUR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RoadTraffic::class, \Google\Cloud\Talent\V4\CommuteFilter_RoadTraffic::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php deleted file mode 100644 index 3cfc0c904de1..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CommuteMethod.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.talent.v4.CommuteMethod - */ -class CommuteMethod -{ - /** - * Commute method isn't specified. - * - * Generated from protobuf enum COMMUTE_METHOD_UNSPECIFIED = 0; - */ - const COMMUTE_METHOD_UNSPECIFIED = 0; - /** - * Commute time is calculated based on driving time. - * - * Generated from protobuf enum DRIVING = 1; - */ - const DRIVING = 1; - /** - * Commute time is calculated based on public transit including bus, metro, - * subway, and so on. - * - * Generated from protobuf enum TRANSIT = 2; - */ - const TRANSIT = 2; - /** - * Commute time is calculated based on walking time. - * - * Generated from protobuf enum WALKING = 3; - */ - const WALKING = 3; - /** - * Commute time is calculated based on biking time. - * - * Generated from protobuf enum CYCLING = 4; - */ - const CYCLING = 4; - /** - * Commute time is calculated based on public transit that is wheelchair - * accessible. - * - * Generated from protobuf enum TRANSIT_ACCESSIBLE = 5; - */ - const TRANSIT_ACCESSIBLE = 5; - - private static $valueToName = [ - self::COMMUTE_METHOD_UNSPECIFIED => 'COMMUTE_METHOD_UNSPECIFIED', - self::DRIVING => 'DRIVING', - self::TRANSIT => 'TRANSIT', - self::WALKING => 'WALKING', - self::CYCLING => 'CYCLING', - self::TRANSIT_ACCESSIBLE => 'TRANSIT_ACCESSIBLE', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php deleted file mode 100644 index c17e8e4821df..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company.php +++ /dev/null @@ -1,616 +0,0 @@ -google.cloud.talent.v4.Company - */ -class Company extends \Google\Protobuf\Internal\Message -{ - /** - * Required during company update. - * The resource name for a company. This is generated by the service when a - * company is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The display name of the company, for example, "Google LLC". - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. Client side company identifier, used to uniquely identify the - * company. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_id = ''; - /** - * The employer's company size. - * - * Generated from protobuf field .google.cloud.talent.v4.CompanySize size = 4; - */ - protected $size = 0; - /** - * The street address of the company's main headquarters, which may be - * different from the job location. The service attempts - * to geolocate the provided address, and populates a more specific - * location wherever possible in - * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. - * - * Generated from protobuf field string headquarters_address = 5; - */ - protected $headquarters_address = ''; - /** - * Set to true if it is the hiring agency that post jobs for other - * employers. - * Defaults to false if not provided. - * - * Generated from protobuf field bool hiring_agency = 6; - */ - protected $hiring_agency = false; - /** - * Equal Employment Opportunity legal disclaimer text to be - * associated with all jobs, and typically to be displayed in all - * roles. - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field string eeo_text = 7; - */ - protected $eeo_text = ''; - /** - * The URI representing the company's primary web site or home page, - * for example, "https://www.google.com". - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string website_uri = 8; - */ - protected $website_uri = ''; - /** - * The URI to employer's career site or careers page on the employer's web - * site, for example, "https://careers.google.com". - * - * Generated from protobuf field string career_site_uri = 9; - */ - protected $career_site_uri = ''; - /** - * A URI that hosts the employer's company logo. - * - * Generated from protobuf field string image_uri = 10; - */ - protected $image_uri = ''; - /** - * This field is deprecated. Please set the searchability of the custom - * attribute in the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going - * forward. - * A list of keys of filterable - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], - * whose corresponding `string_values` are used in keyword searches. Jobs with - * `string_values` under these specified field keys are returned if any - * of the values match the search keyword. Custom field values with - * parenthesis, brackets and special symbols are not searchable as-is, - * and those keyword queries must be surrounded by quotes. - * - * Generated from protobuf field repeated string keyword_searchable_job_custom_attributes = 11 [deprecated = true]; - * @deprecated - */ - private $keyword_searchable_job_custom_attributes; - /** - * Output only. Derived details about the company. - * - * Generated from protobuf field .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $derived_info = null; - /** - * Output only. Indicates whether a company is flagged to be suspended from - * public availability by the service when job content appears suspicious, - * abusive, or spammy. - * - * Generated from protobuf field bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $suspended = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required during company update. - * The resource name for a company. This is generated by the service when a - * company is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * @type string $display_name - * Required. The display name of the company, for example, "Google LLC". - * @type string $external_id - * Required. Client side company identifier, used to uniquely identify the - * company. - * The maximum number of allowed characters is 255. - * @type int $size - * The employer's company size. - * @type string $headquarters_address - * The street address of the company's main headquarters, which may be - * different from the job location. The service attempts - * to geolocate the provided address, and populates a more specific - * location wherever possible in - * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. - * @type bool $hiring_agency - * Set to true if it is the hiring agency that post jobs for other - * employers. - * Defaults to false if not provided. - * @type string $eeo_text - * Equal Employment Opportunity legal disclaimer text to be - * associated with all jobs, and typically to be displayed in all - * roles. - * The maximum number of allowed characters is 500. - * @type string $website_uri - * The URI representing the company's primary web site or home page, - * for example, "https://www.google.com". - * The maximum number of allowed characters is 255. - * @type string $career_site_uri - * The URI to employer's career site or careers page on the employer's web - * site, for example, "https://careers.google.com". - * @type string $image_uri - * A URI that hosts the employer's company logo. - * @type array|\Google\Protobuf\Internal\RepeatedField $keyword_searchable_job_custom_attributes - * This field is deprecated. Please set the searchability of the custom - * attribute in the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going - * forward. - * A list of keys of filterable - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], - * whose corresponding `string_values` are used in keyword searches. Jobs with - * `string_values` under these specified field keys are returned if any - * of the values match the search keyword. Custom field values with - * parenthesis, brackets and special symbols are not searchable as-is, - * and those keyword queries must be surrounded by quotes. - * @type \Google\Cloud\Talent\V4\Company\DerivedInfo $derived_info - * Output only. Derived details about the company. - * @type bool $suspended - * Output only. Indicates whether a company is flagged to be suspended from - * public availability by the service when job content appears suspicious, - * abusive, or spammy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Company::initOnce(); - parent::__construct($data); - } - - /** - * Required during company update. - * The resource name for a company. This is generated by the service when a - * company is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required during company update. - * The resource name for a company. This is generated by the service when a - * company is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * 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 display name of the company, for example, "Google LLC". - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The display name of the company, for example, "Google LLC". - * - * 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; - } - - /** - * Required. Client side company identifier, used to uniquely identify the - * company. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExternalId() - { - return $this->external_id; - } - - /** - * Required. Client side company identifier, used to uniquely identify the - * company. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string external_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExternalId($var) - { - GPBUtil::checkString($var, True); - $this->external_id = $var; - - return $this; - } - - /** - * The employer's company size. - * - * Generated from protobuf field .google.cloud.talent.v4.CompanySize size = 4; - * @return int - */ - public function getSize() - { - return $this->size; - } - - /** - * The employer's company size. - * - * Generated from protobuf field .google.cloud.talent.v4.CompanySize size = 4; - * @param int $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompanySize::class); - $this->size = $var; - - return $this; - } - - /** - * The street address of the company's main headquarters, which may be - * different from the job location. The service attempts - * to geolocate the provided address, and populates a more specific - * location wherever possible in - * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. - * - * Generated from protobuf field string headquarters_address = 5; - * @return string - */ - public function getHeadquartersAddress() - { - return $this->headquarters_address; - } - - /** - * The street address of the company's main headquarters, which may be - * different from the job location. The service attempts - * to geolocate the provided address, and populates a more specific - * location wherever possible in - * [DerivedInfo.headquarters_location][google.cloud.talent.v4.Company.DerivedInfo.headquarters_location]. - * - * Generated from protobuf field string headquarters_address = 5; - * @param string $var - * @return $this - */ - public function setHeadquartersAddress($var) - { - GPBUtil::checkString($var, True); - $this->headquarters_address = $var; - - return $this; - } - - /** - * Set to true if it is the hiring agency that post jobs for other - * employers. - * Defaults to false if not provided. - * - * Generated from protobuf field bool hiring_agency = 6; - * @return bool - */ - public function getHiringAgency() - { - return $this->hiring_agency; - } - - /** - * Set to true if it is the hiring agency that post jobs for other - * employers. - * Defaults to false if not provided. - * - * Generated from protobuf field bool hiring_agency = 6; - * @param bool $var - * @return $this - */ - public function setHiringAgency($var) - { - GPBUtil::checkBool($var); - $this->hiring_agency = $var; - - return $this; - } - - /** - * Equal Employment Opportunity legal disclaimer text to be - * associated with all jobs, and typically to be displayed in all - * roles. - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field string eeo_text = 7; - * @return string - */ - public function getEeoText() - { - return $this->eeo_text; - } - - /** - * Equal Employment Opportunity legal disclaimer text to be - * associated with all jobs, and typically to be displayed in all - * roles. - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field string eeo_text = 7; - * @param string $var - * @return $this - */ - public function setEeoText($var) - { - GPBUtil::checkString($var, True); - $this->eeo_text = $var; - - return $this; - } - - /** - * The URI representing the company's primary web site or home page, - * for example, "https://www.google.com". - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string website_uri = 8; - * @return string - */ - public function getWebsiteUri() - { - return $this->website_uri; - } - - /** - * The URI representing the company's primary web site or home page, - * for example, "https://www.google.com". - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string website_uri = 8; - * @param string $var - * @return $this - */ - public function setWebsiteUri($var) - { - GPBUtil::checkString($var, True); - $this->website_uri = $var; - - return $this; - } - - /** - * The URI to employer's career site or careers page on the employer's web - * site, for example, "https://careers.google.com". - * - * Generated from protobuf field string career_site_uri = 9; - * @return string - */ - public function getCareerSiteUri() - { - return $this->career_site_uri; - } - - /** - * The URI to employer's career site or careers page on the employer's web - * site, for example, "https://careers.google.com". - * - * Generated from protobuf field string career_site_uri = 9; - * @param string $var - * @return $this - */ - public function setCareerSiteUri($var) - { - GPBUtil::checkString($var, True); - $this->career_site_uri = $var; - - return $this; - } - - /** - * A URI that hosts the employer's company logo. - * - * Generated from protobuf field string image_uri = 10; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * A URI that hosts the employer's company logo. - * - * Generated from protobuf field string image_uri = 10; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * This field is deprecated. Please set the searchability of the custom - * attribute in the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going - * forward. - * A list of keys of filterable - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], - * whose corresponding `string_values` are used in keyword searches. Jobs with - * `string_values` under these specified field keys are returned if any - * of the values match the search keyword. Custom field values with - * parenthesis, brackets and special symbols are not searchable as-is, - * and those keyword queries must be surrounded by quotes. - * - * Generated from protobuf field repeated string keyword_searchable_job_custom_attributes = 11 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getKeywordSearchableJobCustomAttributes() - { - @trigger_error('keyword_searchable_job_custom_attributes is deprecated.', E_USER_DEPRECATED); - return $this->keyword_searchable_job_custom_attributes; - } - - /** - * This field is deprecated. Please set the searchability of the custom - * attribute in the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] going - * forward. - * A list of keys of filterable - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes], - * whose corresponding `string_values` are used in keyword searches. Jobs with - * `string_values` under these specified field keys are returned if any - * of the values match the search keyword. Custom field values with - * parenthesis, brackets and special symbols are not searchable as-is, - * and those keyword queries must be surrounded by quotes. - * - * Generated from protobuf field repeated string keyword_searchable_job_custom_attributes = 11 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setKeywordSearchableJobCustomAttributes($var) - { - @trigger_error('keyword_searchable_job_custom_attributes is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->keyword_searchable_job_custom_attributes = $arr; - - return $this; - } - - /** - * Output only. Derived details about the company. - * - * Generated from protobuf field .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Talent\V4\Company\DerivedInfo|null - */ - public function getDerivedInfo() - { - return $this->derived_info; - } - - public function hasDerivedInfo() - { - return isset($this->derived_info); - } - - public function clearDerivedInfo() - { - unset($this->derived_info); - } - - /** - * Output only. Derived details about the company. - * - * Generated from protobuf field .google.cloud.talent.v4.Company.DerivedInfo derived_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Talent\V4\Company\DerivedInfo $var - * @return $this - */ - public function setDerivedInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Company\DerivedInfo::class); - $this->derived_info = $var; - - return $this; - } - - /** - * Output only. Indicates whether a company is flagged to be suspended from - * public availability by the service when job content appears suspicious, - * abusive, or spammy. - * - * Generated from protobuf field bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSuspended() - { - return $this->suspended; - } - - /** - * Output only. Indicates whether a company is flagged to be suspended from - * public availability by the service when job content appears suspicious, - * abusive, or spammy. - * - * Generated from protobuf field bool suspended = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSuspended($var) - { - GPBUtil::checkBool($var); - $this->suspended = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php deleted file mode 100644 index 1dde1b753907..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Company/DerivedInfo.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.talent.v4.Company.DerivedInfo - */ -class DerivedInfo extends \Google\Protobuf\Internal\Message -{ - /** - * A structured headquarters location of the company, resolved from - * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] - * if provided. - * - * Generated from protobuf field .google.cloud.talent.v4.Location headquarters_location = 1; - */ - protected $headquarters_location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Location $headquarters_location - * A structured headquarters location of the company, resolved from - * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] - * if provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Company::initOnce(); - parent::__construct($data); - } - - /** - * A structured headquarters location of the company, resolved from - * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] - * if provided. - * - * Generated from protobuf field .google.cloud.talent.v4.Location headquarters_location = 1; - * @return \Google\Cloud\Talent\V4\Location|null - */ - public function getHeadquartersLocation() - { - return $this->headquarters_location; - } - - public function hasHeadquartersLocation() - { - return isset($this->headquarters_location); - } - - public function clearHeadquartersLocation() - { - unset($this->headquarters_location); - } - - /** - * A structured headquarters location of the company, resolved from - * [Company.headquarters_address][google.cloud.talent.v4.Company.headquarters_address] - * if provided. - * - * Generated from protobuf field .google.cloud.talent.v4.Location headquarters_location = 1; - * @param \Google\Cloud\Talent\V4\Location $var - * @return $this - */ - public function setHeadquartersLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Location::class); - $this->headquarters_location = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DerivedInfo::class, \Google\Cloud\Talent\V4\Company_DerivedInfo::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php deleted file mode 100644 index d2e4f10c43d3..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompanySize.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.talent.v4.CompanySize - */ -class CompanySize -{ - /** - * Default value if the size isn't specified. - * - * Generated from protobuf enum COMPANY_SIZE_UNSPECIFIED = 0; - */ - const COMPANY_SIZE_UNSPECIFIED = 0; - /** - * The company has less than 50 employees. - * - * Generated from protobuf enum MINI = 1; - */ - const MINI = 1; - /** - * The company has between 50 and 99 employees. - * - * Generated from protobuf enum SMALL = 2; - */ - const SMALL = 2; - /** - * The company has between 100 and 499 employees. - * - * Generated from protobuf enum SMEDIUM = 3; - */ - const SMEDIUM = 3; - /** - * The company has between 500 and 999 employees. - * - * Generated from protobuf enum MEDIUM = 4; - */ - const MEDIUM = 4; - /** - * The company has between 1,000 and 4,999 employees. - * - * Generated from protobuf enum BIG = 5; - */ - const BIG = 5; - /** - * The company has between 5,000 and 9,999 employees. - * - * Generated from protobuf enum BIGGER = 6; - */ - const BIGGER = 6; - /** - * The company has 10,000 or more employees. - * - * Generated from protobuf enum GIANT = 7; - */ - const GIANT = 7; - - private static $valueToName = [ - self::COMPANY_SIZE_UNSPECIFIED => 'COMPANY_SIZE_UNSPECIFIED', - self::MINI => 'MINI', - self::SMALL => 'SMALL', - self::SMEDIUM => 'SMEDIUM', - self::MEDIUM => 'MEDIUM', - self::BIG => 'BIG', - self::BIGGER => 'BIGGER', - self::GIANT => 'GIANT', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php deleted file mode 100644 index e2e1dcfd8e48..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.talent.v4.CompensationFilter - */ -class CompensationFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Type of filter. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. Specify desired `base compensation entry's` - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $units; - /** - * Compensation range. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; - */ - protected $range = null; - /** - * If set to true, jobs with unspecified compensation range fields are - * included. - * - * Generated from protobuf field bool include_jobs_with_unspecified_compensation_range = 4; - */ - protected $include_jobs_with_unspecified_compensation_range = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. Type of filter. - * @type array|\Google\Protobuf\Internal\RepeatedField $units - * Required. Specify desired `base compensation entry's` - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. - * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $range - * Compensation range. - * @type bool $include_jobs_with_unspecified_compensation_range - * If set to true, jobs with unspecified compensation range fields are - * included. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); - parent::__construct($data); - } - - /** - * Required. Type of filter. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of filter. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter.FilterType type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompensationFilter\FilterType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Specify desired `base compensation entry's` - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnits() - { - return $this->units; - } - - /** - * Required. Specify desired `base compensation entry's` - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationUnit units = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\CompensationInfo\CompensationUnit::class); - $this->units = $arr; - - return $this; - } - - /** - * Compensation range. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; - * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null - */ - public function getRange() - { - return $this->range; - } - - public function hasRange() - { - return isset($this->range); - } - - public function clearRange() - { - unset($this->range); - } - - /** - * Compensation range. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 3; - * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var - * @return $this - */ - public function setRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); - $this->range = $var; - - return $this; - } - - /** - * If set to true, jobs with unspecified compensation range fields are - * included. - * - * Generated from protobuf field bool include_jobs_with_unspecified_compensation_range = 4; - * @return bool - */ - public function getIncludeJobsWithUnspecifiedCompensationRange() - { - return $this->include_jobs_with_unspecified_compensation_range; - } - - /** - * If set to true, jobs with unspecified compensation range fields are - * included. - * - * Generated from protobuf field bool include_jobs_with_unspecified_compensation_range = 4; - * @param bool $var - * @return $this - */ - public function setIncludeJobsWithUnspecifiedCompensationRange($var) - { - GPBUtil::checkBool($var); - $this->include_jobs_with_unspecified_compensation_range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php deleted file mode 100644 index 25b0d592143e..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationFilter/FilterType.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.talent.v4.CompensationFilter.FilterType - */ -class FilterType -{ - /** - * Filter type unspecified. Position holder, INVALID, should never be used. - * - * Generated from protobuf enum FILTER_TYPE_UNSPECIFIED = 0; - */ - const FILTER_TYPE_UNSPECIFIED = 0; - /** - * Filter by `base compensation entry's` unit. A job is a match if and - * only if the job contains a base CompensationEntry and the base - * CompensationEntry's unit matches provided - * [units][google.cloud.talent.v4.CompensationFilter.units]. Populate one or - * more [units][google.cloud.talent.v4.CompensationFilter.units]. - * See - * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for definition of base compensation entry. - * - * Generated from protobuf enum UNIT_ONLY = 1; - */ - const UNIT_ONLY = 1; - /** - * Filter by `base compensation entry's` unit and amount / range. A job - * is a match if and only if the job contains a base CompensationEntry, and - * the base entry's unit matches provided - * [CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] - * and amount or range overlaps with provided - * [CompensationRange][google.cloud.talent.v4.CompensationInfo.CompensationRange]. - * See - * [CompensationInfo.CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for definition of base compensation entry. - * Set exactly one [units][google.cloud.talent.v4.CompensationFilter.units] - * and populate [range][google.cloud.talent.v4.CompensationFilter.range]. - * - * Generated from protobuf enum UNIT_AND_AMOUNT = 2; - */ - const UNIT_AND_AMOUNT = 2; - /** - * Filter by annualized base compensation amount and `base compensation - * entry's` unit. Populate - * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more - * [units][google.cloud.talent.v4.CompensationFilter.units]. - * - * Generated from protobuf enum ANNUALIZED_BASE_AMOUNT = 3; - */ - const ANNUALIZED_BASE_AMOUNT = 3; - /** - * Filter by annualized total compensation amount and `base compensation - * entry's` unit . Populate - * [range][google.cloud.talent.v4.CompensationFilter.range] and zero or more - * [units][google.cloud.talent.v4.CompensationFilter.units]. - * - * Generated from protobuf enum ANNUALIZED_TOTAL_AMOUNT = 4; - */ - const ANNUALIZED_TOTAL_AMOUNT = 4; - - private static $valueToName = [ - self::FILTER_TYPE_UNSPECIFIED => 'FILTER_TYPE_UNSPECIFIED', - self::UNIT_ONLY => 'UNIT_ONLY', - self::UNIT_AND_AMOUNT => 'UNIT_AND_AMOUNT', - self::ANNUALIZED_BASE_AMOUNT => 'ANNUALIZED_BASE_AMOUNT', - self::ANNUALIZED_TOTAL_AMOUNT => 'ANNUALIZED_TOTAL_AMOUNT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FilterType::class, \Google\Cloud\Talent\V4\CompensationFilter_FilterType::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php deleted file mode 100644 index 53a727ac8e98..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.talent.v4.CompensationInfo - */ -class CompensationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Job compensation information. - * At most one entry can be of type - * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], - * which is referred as **base compensation entry** for the job. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; - */ - private $entries; - /** - * Output only. Annualized base compensation range. Computed as base - * compensation entry's - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $annualized_base_compensation_range = null; - /** - * Output only. Annualized total compensation range. Computed as all - * compensation entries' - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $annualized_total_compensation_range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\CompensationInfo\CompensationEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * Job compensation information. - * At most one entry can be of type - * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], - * which is referred as **base compensation entry** for the job. - * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $annualized_base_compensation_range - * Output only. Annualized base compensation range. Computed as base - * compensation entry's - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $annualized_total_compensation_range - * Output only. Annualized total compensation range. Computed as all - * compensation entries' - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Job compensation information. - * At most one entry can be of type - * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], - * which is referred as **base compensation entry** for the job. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Job compensation information. - * At most one entry can be of type - * [CompensationInfo.CompensationType.BASE][google.cloud.talent.v4.CompensationInfo.CompensationType.BASE], - * which is referred as **base compensation entry** for the job. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompensationInfo.CompensationEntry entries = 1; - * @param array<\Google\Cloud\Talent\V4\CompensationInfo\CompensationEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\CompensationInfo\CompensationEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Output only. Annualized base compensation range. Computed as base - * compensation entry's - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null - */ - public function getAnnualizedBaseCompensationRange() - { - return $this->annualized_base_compensation_range; - } - - public function hasAnnualizedBaseCompensationRange() - { - return isset($this->annualized_base_compensation_range); - } - - public function clearAnnualizedBaseCompensationRange() - { - unset($this->annualized_base_compensation_range); - } - - /** - * Output only. Annualized base compensation range. Computed as base - * compensation entry's - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_base_compensation_range = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var - * @return $this - */ - public function setAnnualizedBaseCompensationRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); - $this->annualized_base_compensation_range = $var; - - return $this; - } - - /** - * Output only. Annualized total compensation range. Computed as all - * compensation entries' - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null - */ - public function getAnnualizedTotalCompensationRange() - { - return $this->annualized_total_compensation_range; - } - - public function hasAnnualizedTotalCompensationRange() - { - return isset($this->annualized_total_compensation_range); - } - - public function clearAnnualizedTotalCompensationRange() - { - unset($this->annualized_total_compensation_range); - } - - /** - * Output only. Annualized total compensation range. Computed as all - * compensation entries' - * [CompensationEntry.amount][google.cloud.talent.v4.CompensationInfo.CompensationEntry.amount] - * times - * [CompensationEntry.expected_units_per_year][google.cloud.talent.v4.CompensationInfo.CompensationEntry.expected_units_per_year]. - * See - * [CompensationEntry][google.cloud.talent.v4.CompensationInfo.CompensationEntry] - * for explanation on compensation annualization. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange annualized_total_compensation_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var - * @return $this - */ - public function setAnnualizedTotalCompensationRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); - $this->annualized_total_compensation_range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php deleted file mode 100644 index 98876afebecc..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationEntry.php +++ /dev/null @@ -1,376 +0,0 @@ -google.cloud.talent.v4.CompensationInfo.CompensationEntry - */ -class CompensationEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Compensation type. - * Default is - * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; - */ - protected $type = 0; - /** - * Frequency of the specified amount. - * Default is - * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; - */ - protected $unit = 0; - /** - * Compensation description. For example, could - * indicate equity terms or provide additional context to an estimated - * bonus. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Expected number of units paid each year. If not specified, when - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is - * FULLTIME, a default value is inferred based on - * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. - * Default values: - * - HOURLY: 2080 - * - DAILY: 260 - * - WEEKLY: 52 - * - MONTHLY: 12 - * - ANNUAL: 1 - * - * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; - */ - protected $expected_units_per_year = null; - protected $compensation_amount; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Compensation type. - * Default is - * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. - * @type int $unit - * Frequency of the specified amount. - * Default is - * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. - * @type \Google\Type\Money $amount - * Compensation amount. - * @type \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $range - * Compensation range. - * @type string $description - * Compensation description. For example, could - * indicate equity terms or provide additional context to an estimated - * bonus. - * @type \Google\Protobuf\DoubleValue $expected_units_per_year - * Expected number of units paid each year. If not specified, when - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is - * FULLTIME, a default value is inferred based on - * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. - * Default values: - * - HOURLY: 2080 - * - DAILY: 260 - * - WEEKLY: 52 - * - MONTHLY: 12 - * - ANNUAL: 1 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Compensation type. - * Default is - * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Compensation type. - * Default is - * [CompensationType.COMPENSATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationType.COMPENSATION_TYPE_UNSPECIFIED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationType::class); - $this->type = $var; - - return $this; - } - - /** - * Frequency of the specified amount. - * Default is - * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; - * @return int - */ - public function getUnit() - { - return $this->unit; - } - - /** - * Frequency of the specified amount. - * Default is - * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationUnit unit = 2; - * @param int $var - * @return $this - */ - public function setUnit($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationUnit::class); - $this->unit = $var; - - return $this; - } - - /** - * Compensation amount. - * - * Generated from protobuf field .google.type.Money amount = 3; - * @return \Google\Type\Money|null - */ - public function getAmount() - { - return $this->readOneof(3); - } - - public function hasAmount() - { - return $this->hasOneof(3); - } - - /** - * Compensation amount. - * - * Generated from protobuf field .google.type.Money amount = 3; - * @param \Google\Type\Money $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Compensation range. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; - * @return \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange|null - */ - public function getRange() - { - return $this->readOneof(4); - } - - public function hasRange() - { - return $this->hasOneof(4); - } - - /** - * Compensation range. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo.CompensationRange range = 4; - * @param \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange $var - * @return $this - */ - public function setRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo\CompensationRange::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Compensation description. For example, could - * indicate equity terms or provide additional context to an estimated - * bonus. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Compensation description. For example, could - * indicate equity terms or provide additional context to an estimated - * bonus. - * - * 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; - } - - /** - * Expected number of units paid each year. If not specified, when - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is - * FULLTIME, a default value is inferred based on - * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. - * Default values: - * - HOURLY: 2080 - * - DAILY: 260 - * - WEEKLY: 52 - * - MONTHLY: 12 - * - ANNUAL: 1 - * - * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getExpectedUnitsPerYear() - { - return $this->expected_units_per_year; - } - - public function hasExpectedUnitsPerYear() - { - return isset($this->expected_units_per_year); - } - - public function clearExpectedUnitsPerYear() - { - unset($this->expected_units_per_year); - } - - /** - * Returns the unboxed value from getExpectedUnitsPerYear() - - * Expected number of units paid each year. If not specified, when - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is - * FULLTIME, a default value is inferred based on - * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. - * Default values: - * - HOURLY: 2080 - * - DAILY: 260 - * - WEEKLY: 52 - * - MONTHLY: 12 - * - ANNUAL: 1 - * - * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; - * @return float|null - */ - public function getExpectedUnitsPerYearUnwrapped() - { - return $this->readWrapperValue("expected_units_per_year"); - } - - /** - * Expected number of units paid each year. If not specified, when - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is - * FULLTIME, a default value is inferred based on - * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. - * Default values: - * - HOURLY: 2080 - * - DAILY: 260 - * - WEEKLY: 52 - * - MONTHLY: 12 - * - ANNUAL: 1 - * - * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setExpectedUnitsPerYear($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->expected_units_per_year = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Expected number of units paid each year. If not specified, when - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types] is - * FULLTIME, a default value is inferred based on - * [unit][google.cloud.talent.v4.CompensationInfo.CompensationEntry.unit]. - * Default values: - * - HOURLY: 2080 - * - DAILY: 260 - * - WEEKLY: 52 - * - MONTHLY: 12 - * - ANNUAL: 1 - * - * Generated from protobuf field .google.protobuf.DoubleValue expected_units_per_year = 6; - * @param float|null $var - * @return $this - */ - public function setExpectedUnitsPerYearUnwrapped($var) - { - $this->writeWrapperValue("expected_units_per_year", $var); - return $this;} - - /** - * @return string - */ - public function getCompensationAmount() - { - return $this->whichOneof("compensation_amount"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompensationEntry::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationEntry::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php deleted file mode 100644 index 55d95d721d98..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationRange.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.talent.v4.CompensationInfo.CompensationRange - */ -class CompensationRange extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum amount of compensation. If left empty, the value is set - * to a maximal compensation value and the currency code is set to - * match the [currency code][google.type.Money.currency_code] of - * min_compensation. - * - * Generated from protobuf field .google.type.Money max_compensation = 2; - */ - protected $max_compensation = null; - /** - * The minimum amount of compensation. If left empty, the value is set - * to zero and the currency code is set to match the - * [currency code][google.type.Money.currency_code] of max_compensation. - * - * Generated from protobuf field .google.type.Money min_compensation = 1; - */ - protected $min_compensation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Money $max_compensation - * The maximum amount of compensation. If left empty, the value is set - * to a maximal compensation value and the currency code is set to - * match the [currency code][google.type.Money.currency_code] of - * min_compensation. - * @type \Google\Type\Money $min_compensation - * The minimum amount of compensation. If left empty, the value is set - * to zero and the currency code is set to match the - * [currency code][google.type.Money.currency_code] of max_compensation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * The maximum amount of compensation. If left empty, the value is set - * to a maximal compensation value and the currency code is set to - * match the [currency code][google.type.Money.currency_code] of - * min_compensation. - * - * Generated from protobuf field .google.type.Money max_compensation = 2; - * @return \Google\Type\Money|null - */ - public function getMaxCompensation() - { - return $this->max_compensation; - } - - public function hasMaxCompensation() - { - return isset($this->max_compensation); - } - - public function clearMaxCompensation() - { - unset($this->max_compensation); - } - - /** - * The maximum amount of compensation. If left empty, the value is set - * to a maximal compensation value and the currency code is set to - * match the [currency code][google.type.Money.currency_code] of - * min_compensation. - * - * Generated from protobuf field .google.type.Money max_compensation = 2; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMaxCompensation($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->max_compensation = $var; - - return $this; - } - - /** - * The minimum amount of compensation. If left empty, the value is set - * to zero and the currency code is set to match the - * [currency code][google.type.Money.currency_code] of max_compensation. - * - * Generated from protobuf field .google.type.Money min_compensation = 1; - * @return \Google\Type\Money|null - */ - public function getMinCompensation() - { - return $this->min_compensation; - } - - public function hasMinCompensation() - { - return isset($this->min_compensation); - } - - public function clearMinCompensation() - { - unset($this->min_compensation); - } - - /** - * The minimum amount of compensation. If left empty, the value is set - * to zero and the currency code is set to match the - * [currency code][google.type.Money.currency_code] of max_compensation. - * - * Generated from protobuf field .google.type.Money min_compensation = 1; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMinCompensation($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->min_compensation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompensationRange::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationRange::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php deleted file mode 100644 index 07c278825c42..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationType.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.talent.v4.CompensationInfo.CompensationType - */ -class CompensationType -{ - /** - * Default value. - * - * Generated from protobuf enum COMPENSATION_TYPE_UNSPECIFIED = 0; - */ - const COMPENSATION_TYPE_UNSPECIFIED = 0; - /** - * Base compensation: Refers to the fixed amount of money paid to an - * employee by an employer in return for work performed. Base compensation - * does not include benefits, bonuses or any other potential compensation - * from an employer. - * - * Generated from protobuf enum BASE = 1; - */ - const BASE = 1; - /** - * Bonus. - * - * Generated from protobuf enum BONUS = 2; - */ - const BONUS = 2; - /** - * Signing bonus. - * - * Generated from protobuf enum SIGNING_BONUS = 3; - */ - const SIGNING_BONUS = 3; - /** - * Equity. - * - * Generated from protobuf enum EQUITY = 4; - */ - const EQUITY = 4; - /** - * Profit sharing. - * - * Generated from protobuf enum PROFIT_SHARING = 5; - */ - const PROFIT_SHARING = 5; - /** - * Commission. - * - * Generated from protobuf enum COMMISSIONS = 6; - */ - const COMMISSIONS = 6; - /** - * Tips. - * - * Generated from protobuf enum TIPS = 7; - */ - const TIPS = 7; - /** - * Other compensation type. - * - * Generated from protobuf enum OTHER_COMPENSATION_TYPE = 8; - */ - const OTHER_COMPENSATION_TYPE = 8; - - private static $valueToName = [ - self::COMPENSATION_TYPE_UNSPECIFIED => 'COMPENSATION_TYPE_UNSPECIFIED', - self::BASE => 'BASE', - self::BONUS => 'BONUS', - self::SIGNING_BONUS => 'SIGNING_BONUS', - self::EQUITY => 'EQUITY', - self::PROFIT_SHARING => 'PROFIT_SHARING', - self::COMMISSIONS => 'COMMISSIONS', - self::TIPS => 'TIPS', - self::OTHER_COMPENSATION_TYPE => 'OTHER_COMPENSATION_TYPE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompensationType::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationType::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php deleted file mode 100644 index d142d9e8cd16..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompensationInfo/CompensationUnit.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.talent.v4.CompensationInfo.CompensationUnit - */ -class CompensationUnit -{ - /** - * Default value. - * - * Generated from protobuf enum COMPENSATION_UNIT_UNSPECIFIED = 0; - */ - const COMPENSATION_UNIT_UNSPECIFIED = 0; - /** - * Hourly. - * - * Generated from protobuf enum HOURLY = 1; - */ - const HOURLY = 1; - /** - * Daily. - * - * Generated from protobuf enum DAILY = 2; - */ - const DAILY = 2; - /** - * Weekly - * - * Generated from protobuf enum WEEKLY = 3; - */ - const WEEKLY = 3; - /** - * Monthly. - * - * Generated from protobuf enum MONTHLY = 4; - */ - const MONTHLY = 4; - /** - * Yearly. - * - * Generated from protobuf enum YEARLY = 5; - */ - const YEARLY = 5; - /** - * One time. - * - * Generated from protobuf enum ONE_TIME = 6; - */ - const ONE_TIME = 6; - /** - * Other compensation units. - * - * Generated from protobuf enum OTHER_COMPENSATION_UNIT = 7; - */ - const OTHER_COMPENSATION_UNIT = 7; - - private static $valueToName = [ - self::COMPENSATION_UNIT_UNSPECIFIED => 'COMPENSATION_UNIT_UNSPECIFIED', - self::HOURLY => 'HOURLY', - self::DAILY => 'DAILY', - self::WEEKLY => 'WEEKLY', - self::MONTHLY => 'MONTHLY', - self::YEARLY => 'YEARLY', - self::ONE_TIME => 'ONE_TIME', - self::OTHER_COMPENSATION_UNIT => 'OTHER_COMPENSATION_UNIT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompensationUnit::class, \Google\Cloud\Talent\V4\CompensationInfo_CompensationUnit::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php deleted file mode 100644 index da12732cd46c..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.talent.v4.CompleteQueryRequest - */ -class CompleteQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of tenant the completion is performed within. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $tenant = ''; - /** - * Required. The query used to generate suggestions. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * The list of languages of the query. This is - * the BCP-47 language code, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field repeated string language_codes = 3; - */ - private $language_codes; - /** - * Required. Completion result count. - * The maximum allowed page size is 10. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_size = 0; - /** - * If provided, restricts completion to specified company. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string company = 5 [(.google.api.resource_reference) = { - */ - protected $company = ''; - /** - * The scope of the completion. The defaults is - * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; - */ - protected $scope = 0; - /** - * The completion topic. The default is - * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tenant - * Required. Resource name of tenant the completion is performed within. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @type string $query - * Required. The query used to generate suggestions. - * The maximum number of allowed characters is 255. - * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes - * The list of languages of the query. This is - * the BCP-47 language code, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * The maximum number of allowed characters is 255. - * @type int $page_size - * Required. Completion result count. - * The maximum allowed page size is 10. - * @type string $company - * If provided, restricts completion to specified company. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * @type int $scope - * The scope of the completion. The defaults is - * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. - * @type int $type - * The completion topic. The default is - * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of tenant the completion is performed within. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTenant() - { - return $this->tenant; - } - - /** - * Required. Resource name of tenant the completion is performed within. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string tenant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTenant($var) - { - GPBUtil::checkString($var, True); - $this->tenant = $var; - - return $this; - } - - /** - * Required. The query used to generate suggestions. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The query used to generate suggestions. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The list of languages of the query. This is - * the BCP-47 language code, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field repeated string language_codes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageCodes() - { - return $this->language_codes; - } - - /** - * The list of languages of the query. This is - * the BCP-47 language code, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field repeated string language_codes = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_codes = $arr; - - return $this; - } - - /** - * Required. Completion result count. - * The maximum allowed page size is 10. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Required. Completion result count. - * The maximum allowed page size is 10. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If provided, restricts completion to specified company. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string company = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getCompany() - { - return $this->company; - } - - /** - * If provided, restricts completion to specified company. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string company = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCompany($var) - { - GPBUtil::checkString($var, True); - $this->company = $var; - - return $this; - } - - /** - * The scope of the completion. The defaults is - * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * The scope of the completion. The defaults is - * [CompletionScope.PUBLIC][google.cloud.talent.v4.CompleteQueryRequest.CompletionScope.PUBLIC]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionScope scope = 6; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionScope::class); - $this->scope = $var; - - return $this; - } - - /** - * The completion topic. The default is - * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The completion topic. The default is - * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED]. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 7; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php deleted file mode 100644 index 397e74019856..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionScope.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.talent.v4.CompleteQueryRequest.CompletionScope - */ -class CompletionScope -{ - /** - * Default value. - * - * Generated from protobuf enum COMPLETION_SCOPE_UNSPECIFIED = 0; - */ - const COMPLETION_SCOPE_UNSPECIFIED = 0; - /** - * Suggestions are based only on the data provided by the client. - * - * Generated from protobuf enum TENANT = 1; - */ - const TENANT = 1; - /** - * Suggestions are based on all jobs data in the system that's visible to - * the client - * - * Generated from protobuf enum PUBLIC = 2; - */ - const PBPUBLIC = 2; - - private static $valueToName = [ - self::COMPLETION_SCOPE_UNSPECIFIED => 'COMPLETION_SCOPE_UNSPECIFIED', - self::TENANT => 'TENANT', - self::PBPUBLIC => 'PUBLIC', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompletionScope::class, \Google\Cloud\Talent\V4\CompleteQueryRequest_CompletionScope::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php deleted file mode 100644 index 79b308f329a0..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryRequest/CompletionType.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.talent.v4.CompleteQueryRequest.CompletionType - */ -class CompletionType -{ - /** - * Default value. - * - * Generated from protobuf enum COMPLETION_TYPE_UNSPECIFIED = 0; - */ - const COMPLETION_TYPE_UNSPECIFIED = 0; - /** - * Suggest job titles for jobs autocomplete. - * For - * [CompletionType.JOB_TITLE][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.JOB_TITLE] - * type, only open jobs with the same - * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] - * are returned. - * - * Generated from protobuf enum JOB_TITLE = 1; - */ - const JOB_TITLE = 1; - /** - * Suggest company names for jobs autocomplete. - * For - * [CompletionType.COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME] - * type, only companies having open jobs with the same - * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] - * are returned. - * - * Generated from protobuf enum COMPANY_NAME = 2; - */ - const COMPANY_NAME = 2; - /** - * Suggest both job titles and company names for jobs autocomplete. - * For - * [CompletionType.COMBINED][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMBINED] - * type, only open jobs with the same - * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] - * or companies having open jobs with the same - * [language_codes][google.cloud.talent.v4.CompleteQueryRequest.language_codes] - * are returned. - * - * Generated from protobuf enum COMBINED = 3; - */ - const COMBINED = 3; - - private static $valueToName = [ - self::COMPLETION_TYPE_UNSPECIFIED => 'COMPLETION_TYPE_UNSPECIFIED', - self::JOB_TITLE => 'JOB_TITLE', - self::COMPANY_NAME => 'COMPANY_NAME', - self::COMBINED => 'COMBINED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompletionType::class, \Google\Cloud\Talent\V4\CompleteQueryRequest_CompletionType::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php deleted file mode 100644 index f82b0fd5713f..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.talent.v4.CompleteQueryResponse - */ -class CompleteQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results of the matching job/company candidates. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; - */ - private $completion_results; - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 2; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\CompleteQueryResponse\CompletionResult>|\Google\Protobuf\Internal\RepeatedField $completion_results - * Results of the matching job/company candidates. - * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata - * Additional information for the API invocation, such as the request - * tracking id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * Results of the matching job/company candidates. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompletionResults() - { - return $this->completion_results; - } - - /** - * Results of the matching job/company candidates. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.CompleteQueryResponse.CompletionResult completion_results = 1; - * @param array<\Google\Cloud\Talent\V4\CompleteQueryResponse\CompletionResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompletionResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\CompleteQueryResponse\CompletionResult::class); - $this->completion_results = $arr; - - return $this; - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 2; - * @return \Google\Cloud\Talent\V4\ResponseMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 2; - * @param \Google\Cloud\Talent\V4\ResponseMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php deleted file mode 100644 index f3642f8857f9..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CompleteQueryResponse/CompletionResult.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.talent.v4.CompleteQueryResponse.CompletionResult - */ -class CompletionResult extends \Google\Protobuf\Internal\Message -{ - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - */ - protected $suggestion = ''; - /** - * The completion topic. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; - */ - protected $type = 0; - /** - * The URI of the company image for - * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. - * - * Generated from protobuf field string image_uri = 3; - */ - protected $image_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $suggestion - * The suggestion for the query. - * @type int $type - * The completion topic. - * @type string $image_uri - * The URI of the company image for - * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompletionService::initOnce(); - parent::__construct($data); - } - - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - * @return string - */ - public function getSuggestion() - { - return $this->suggestion; - } - - /** - * The suggestion for the query. - * - * Generated from protobuf field string suggestion = 1; - * @param string $var - * @return $this - */ - public function setSuggestion($var) - { - GPBUtil::checkString($var, True); - $this->suggestion = $var; - - return $this; - } - - /** - * The completion topic. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The completion topic. - * - * Generated from protobuf field .google.cloud.talent.v4.CompleteQueryRequest.CompletionType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\CompleteQueryRequest\CompletionType::class); - $this->type = $var; - - return $this; - } - - /** - * The URI of the company image for - * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. - * - * Generated from protobuf field string image_uri = 3; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The URI of the company image for - * [COMPANY_NAME][google.cloud.talent.v4.CompleteQueryRequest.CompletionType.COMPANY_NAME]. - * - * Generated from protobuf field string image_uri = 3; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CompletionResult::class, \Google\Cloud\Talent\V4\CompleteQueryResponse_CompletionResult::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php deleted file mode 100644 index 75d74be79c23..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateClientEventRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.talent.v4.CreateClientEventRequest - */ -class CreateClientEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the tenant under which the event is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Events issued when end user interacts with customer's application - * that uses Cloud Talent Solution. - * - * Generated from protobuf field .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_event = null; - - /** - * @param string $parent Required. Resource name of the tenant under which the event is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". Please see - * {@see EventServiceClient::tenantName()} for help formatting this field. - * @param \Google\Cloud\Talent\V4\ClientEvent $clientEvent Required. Events issued when end user interacts with customer's application - * that uses Cloud Talent Solution. - * - * @return \Google\Cloud\Talent\V4\CreateClientEventRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Talent\V4\ClientEvent $clientEvent): self - { - return (new self()) - ->setParent($parent) - ->setClientEvent($clientEvent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the tenant under which the event is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @type \Google\Cloud\Talent\V4\ClientEvent $client_event - * Required. Events issued when end user interacts with customer's application - * that uses Cloud Talent Solution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\EventService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the tenant under which the event is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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. Resource name of the tenant under which the event is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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. Events issued when end user interacts with customer's application - * that uses Cloud Talent Solution. - * - * Generated from protobuf field .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\ClientEvent|null - */ - public function getClientEvent() - { - return $this->client_event; - } - - public function hasClientEvent() - { - return isset($this->client_event); - } - - public function clearClientEvent() - { - unset($this->client_event); - } - - /** - * Required. Events issued when end user interacts with customer's application - * that uses Cloud Talent Solution. - * - * Generated from protobuf field .google.cloud.talent.v4.ClientEvent client_event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\ClientEvent $var - * @return $this - */ - public function setClientEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ClientEvent::class); - $this->client_event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php deleted file mode 100644 index f843da4a2336..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateCompanyRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.talent.v4.CreateCompanyRequest - */ -class CreateCompanyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The company to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $company = null; - - /** - * @param string $parent Required. Resource name of the tenant under which the company is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". Please see - * {@see CompanyServiceClient::tenantName()} for help formatting this field. - * @param \Google\Cloud\Talent\V4\Company $company Required. The company to be created. - * - * @return \Google\Cloud\Talent\V4\CreateCompanyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Talent\V4\Company $company): self - { - return (new self()) - ->setParent($parent) - ->setCompany($company); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @type \Google\Cloud\Talent\V4\Company $company - * Required. The company to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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 company to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\Company|null - */ - public function getCompany() - { - return $this->company; - } - - public function hasCompany() - { - return isset($this->company); - } - - public function clearCompany() - { - unset($this->company); - } - - /** - * Required. The company to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Company company = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\Company $var - * @return $this - */ - public function setCompany($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Company::class); - $this->company = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php deleted file mode 100644 index b5d113855c86..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateJobRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.talent.v4.CreateJobRequest - */ -class CreateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Job to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - - /** - * @param string $parent Required. The resource name of the tenant under which the job is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". Please see - * {@see JobServiceClient::tenantName()} for help formatting this field. - * @param \Google\Cloud\Talent\V4\Job $job Required. The Job to be created. - * - * @return \Google\Cloud\Talent\V4\CreateJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Talent\V4\Job $job): self - { - return (new self()) - ->setParent($parent) - ->setJob($job); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * @type \Google\Cloud\Talent\V4\Job $job - * Required. The Job to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 Job to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The Job to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php deleted file mode 100644 index 961b03af6f54..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CreateTenantRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.talent.v4.CreateTenantRequest - */ -class CreateTenantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The tenant to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenant = null; - - /** - * @param string $parent Required. Resource name of the project under which the tenant is created. - * - * The format is "projects/{project_id}", for example, - * "projects/foo". Please see - * {@see TenantServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Talent\V4\Tenant $tenant Required. The tenant to be created. - * - * @return \Google\Cloud\Talent\V4\CreateTenantRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Talent\V4\Tenant $tenant): self - { - return (new self()) - ->setParent($parent) - ->setTenant($tenant); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * @type \Google\Cloud\Talent\V4\Tenant $tenant - * Required. The tenant to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * - * 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. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * - * 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 tenant to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\Tenant|null - */ - public function getTenant() - { - return $this->tenant; - } - - public function hasTenant() - { - return isset($this->tenant); - } - - public function clearTenant() - { - unset($this->tenant); - } - - /** - * Required. The tenant to be created. - * - * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\Tenant $var - * @return $this - */ - public function setTenant($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Tenant::class); - $this->tenant = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php deleted file mode 100644 index 4075404048e6..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/CustomAttribute.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.talent.v4.CustomAttribute - */ -class CustomAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or - * `CASE_INSENSITIVE_MATCH`) search. - * For filterable `string_value`s, a maximum total number of 200 values - * is allowed, with each `string_value` has a byte size of no more than - * 500B. For unfilterable `string_values`, the maximum total byte size of - * unfilterable `string_values` is 50KB. - * Empty string isn't allowed. - * - * Generated from protobuf field repeated string string_values = 1; - */ - private $string_values; - /** - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform number range search. - * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. - * Currently at most 1 - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is - * supported. - * - * Generated from protobuf field repeated int64 long_values = 2; - */ - private $long_values; - /** - * If the `filterable` flag is true, the custom field values may be used for - * custom attribute filters - * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. - * If false, these values may not be used for custom attribute filters. - * Default is false. - * - * Generated from protobuf field bool filterable = 3; - */ - protected $filterable = false; - /** - * If the `keyword_searchable` flag is true, the keywords in custom fields are - * searchable by keyword match. - * If false, the values are not searchable by keyword match. - * Default is false. - * - * Generated from protobuf field bool keyword_searchable = 4; - */ - protected $keyword_searchable = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $string_values - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or - * `CASE_INSENSITIVE_MATCH`) search. - * For filterable `string_value`s, a maximum total number of 200 values - * is allowed, with each `string_value` has a byte size of no more than - * 500B. For unfilterable `string_values`, the maximum total byte size of - * unfilterable `string_values` is 50KB. - * Empty string isn't allowed. - * @type array|array|\Google\Protobuf\Internal\RepeatedField $long_values - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform number range search. - * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. - * Currently at most 1 - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is - * supported. - * @type bool $filterable - * If the `filterable` flag is true, the custom field values may be used for - * custom attribute filters - * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. - * If false, these values may not be used for custom attribute filters. - * Default is false. - * @type bool $keyword_searchable - * If the `keyword_searchable` flag is true, the keywords in custom fields are - * searchable by keyword match. - * If false, the values are not searchable by keyword match. - * Default is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or - * `CASE_INSENSITIVE_MATCH`) search. - * For filterable `string_value`s, a maximum total number of 200 values - * is allowed, with each `string_value` has a byte size of no more than - * 500B. For unfilterable `string_values`, the maximum total byte size of - * unfilterable `string_values` is 50KB. - * Empty string isn't allowed. - * - * Generated from protobuf field repeated string string_values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStringValues() - { - return $this->string_values; - } - - /** - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform a string match (`CASE_SENSITIVE_MATCH` or - * `CASE_INSENSITIVE_MATCH`) search. - * For filterable `string_value`s, a maximum total number of 200 values - * is allowed, with each `string_value` has a byte size of no more than - * 500B. For unfilterable `string_values`, the maximum total byte size of - * unfilterable `string_values` is 50KB. - * Empty string isn't allowed. - * - * Generated from protobuf field repeated string string_values = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStringValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->string_values = $arr; - - return $this; - } - - /** - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform number range search. - * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. - * Currently at most 1 - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is - * supported. - * - * Generated from protobuf field repeated int64 long_values = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLongValues() - { - return $this->long_values; - } - - /** - * Exactly one of - * [string_values][google.cloud.talent.v4.CustomAttribute.string_values] or - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] must be - * specified. - * This field is used to perform number range search. - * (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. - * Currently at most 1 - * [long_values][google.cloud.talent.v4.CustomAttribute.long_values] is - * supported. - * - * Generated from protobuf field repeated int64 long_values = 2; - * @param array|array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLongValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); - $this->long_values = $arr; - - return $this; - } - - /** - * If the `filterable` flag is true, the custom field values may be used for - * custom attribute filters - * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. - * If false, these values may not be used for custom attribute filters. - * Default is false. - * - * Generated from protobuf field bool filterable = 3; - * @return bool - */ - public function getFilterable() - { - return $this->filterable; - } - - /** - * If the `filterable` flag is true, the custom field values may be used for - * custom attribute filters - * [JobQuery.custom_attribute_filter][google.cloud.talent.v4.JobQuery.custom_attribute_filter]. - * If false, these values may not be used for custom attribute filters. - * Default is false. - * - * Generated from protobuf field bool filterable = 3; - * @param bool $var - * @return $this - */ - public function setFilterable($var) - { - GPBUtil::checkBool($var); - $this->filterable = $var; - - return $this; - } - - /** - * If the `keyword_searchable` flag is true, the keywords in custom fields are - * searchable by keyword match. - * If false, the values are not searchable by keyword match. - * Default is false. - * - * Generated from protobuf field bool keyword_searchable = 4; - * @return bool - */ - public function getKeywordSearchable() - { - return $this->keyword_searchable; - } - - /** - * If the `keyword_searchable` flag is true, the keywords in custom fields are - * searchable by keyword match. - * If false, the values are not searchable by keyword match. - * Default is false. - * - * Generated from protobuf field bool keyword_searchable = 4; - * @param bool $var - * @return $this - */ - public function setKeywordSearchable($var) - { - GPBUtil::checkBool($var); - $this->keyword_searchable = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php deleted file mode 100644 index c52d2d4181cf..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DegreeType.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.talent.v4.DegreeType - */ -class DegreeType -{ - /** - * Default value. Represents no degree, or early childhood education. - * Maps to ISCED code 0. - * Ex) Kindergarten - * - * Generated from protobuf enum DEGREE_TYPE_UNSPECIFIED = 0; - */ - const DEGREE_TYPE_UNSPECIFIED = 0; - /** - * Primary education which is typically the first stage of compulsory - * education. ISCED code 1. - * Ex) Elementary school - * - * Generated from protobuf enum PRIMARY_EDUCATION = 1; - */ - const PRIMARY_EDUCATION = 1; - /** - * Lower secondary education; First stage of secondary education building on - * primary education, typically with a more subject-oriented curriculum. - * ISCED code 2. - * Ex) Middle school - * - * Generated from protobuf enum LOWER_SECONDARY_EDUCATION = 2; - */ - const LOWER_SECONDARY_EDUCATION = 2; - /** - * Middle education; Second/final stage of secondary education preparing for - * tertiary education and/or providing skills relevant to employment. - * Usually with an increased range of subject options and streams. ISCED - * code 3. - * Ex) High school - * - * Generated from protobuf enum UPPER_SECONDARY_EDUCATION = 3; - */ - const UPPER_SECONDARY_EDUCATION = 3; - /** - * Adult Remedial Education; Programmes providing learning experiences that - * build on secondary education and prepare for labour market entry and/or - * tertiary education. The content is broader than secondary but not as - * complex as tertiary education. ISCED code 4. - * - * Generated from protobuf enum ADULT_REMEDIAL_EDUCATION = 4; - */ - const ADULT_REMEDIAL_EDUCATION = 4; - /** - * Associate's or equivalent; Short first tertiary programmes that are - * typically practically-based, occupationally-specific and prepare for - * labour market entry. These programmes may also provide a pathway to other - * tertiary programmes. ISCED code 5. - * - * Generated from protobuf enum ASSOCIATES_OR_EQUIVALENT = 5; - */ - const ASSOCIATES_OR_EQUIVALENT = 5; - /** - * Bachelor's or equivalent; Programmes designed to provide intermediate - * academic and/or professional knowledge, skills and competencies leading - * to a first tertiary degree or equivalent qualification. ISCED code 6. - * - * Generated from protobuf enum BACHELORS_OR_EQUIVALENT = 6; - */ - const BACHELORS_OR_EQUIVALENT = 6; - /** - * Master's or equivalent; Programmes designed to provide advanced academic - * and/or professional knowledge, skills and competencies leading to a - * second tertiary degree or equivalent qualification. ISCED code 7. - * - * Generated from protobuf enum MASTERS_OR_EQUIVALENT = 7; - */ - const MASTERS_OR_EQUIVALENT = 7; - /** - * Doctoral or equivalent; Programmes designed primarily to lead to an - * advanced research qualification, usually concluding with the submission - * and defense of a substantive dissertation of publishable quality based on - * original research. ISCED code 8. - * - * Generated from protobuf enum DOCTORAL_OR_EQUIVALENT = 8; - */ - const DOCTORAL_OR_EQUIVALENT = 8; - - private static $valueToName = [ - self::DEGREE_TYPE_UNSPECIFIED => 'DEGREE_TYPE_UNSPECIFIED', - self::PRIMARY_EDUCATION => 'PRIMARY_EDUCATION', - self::LOWER_SECONDARY_EDUCATION => 'LOWER_SECONDARY_EDUCATION', - self::UPPER_SECONDARY_EDUCATION => 'UPPER_SECONDARY_EDUCATION', - self::ADULT_REMEDIAL_EDUCATION => 'ADULT_REMEDIAL_EDUCATION', - self::ASSOCIATES_OR_EQUIVALENT => 'ASSOCIATES_OR_EQUIVALENT', - self::BACHELORS_OR_EQUIVALENT => 'BACHELORS_OR_EQUIVALENT', - self::MASTERS_OR_EQUIVALENT => 'MASTERS_OR_EQUIVALENT', - self::DOCTORAL_OR_EQUIVALENT => 'DOCTORAL_OR_EQUIVALENT', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php deleted file mode 100644 index bd5bf168ba50..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteCompanyRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.talent.v4.DeleteCompanyRequest - */ -class DeleteCompanyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the company to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * 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 company to be deleted. - * - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". Please see - * {@see CompanyServiceClient::companyName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\DeleteCompanyRequest - * - * @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 company to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the company to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * 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 company to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/foo/tenants/bar/companies/baz". - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php deleted file mode 100644 index ea0db2c4740f..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteJobRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.talent.v4.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the job to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * - * 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 job to be deleted. - * - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". Please see - * {@see JobServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\DeleteJobRequest - * - * @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 job to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the job to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * - * 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 job to be deleted. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php deleted file mode 100644 index 0d9ae5301184..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeleteTenantRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.talent.v4.DeleteTenantRequest - */ -class DeleteTenantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant to be deleted. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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 tenant to be deleted. - * - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". Please see - * {@see TenantServiceClient::tenantName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\DeleteTenantRequest - * - * @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 tenant to be deleted. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant to be deleted. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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 tenant to be deleted. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php deleted file mode 100644 index 4f6270525d02..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.talent.v4.DeviceInfo - */ -class DeviceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the device. - * - * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; - */ - protected $device_type = 0; - /** - * A device-specific ID. The ID must be a unique identifier that - * distinguishes the device from other devices. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $device_type - * Type of the device. - * @type string $id - * A device-specific ID. The ID must be a unique identifier that - * distinguishes the device from other devices. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Type of the device. - * - * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; - * @return int - */ - public function getDeviceType() - { - return $this->device_type; - } - - /** - * Type of the device. - * - * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo.DeviceType device_type = 1; - * @param int $var - * @return $this - */ - public function setDeviceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\DeviceInfo\DeviceType::class); - $this->device_type = $var; - - return $this; - } - - /** - * A device-specific ID. The ID must be a unique identifier that - * distinguishes the device from other devices. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * A device-specific ID. The ID must be a unique identifier that - * distinguishes the device from other devices. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php deleted file mode 100644 index 74f96ca4569b..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/DeviceInfo/DeviceType.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.talent.v4.DeviceInfo.DeviceType - */ -class DeviceType -{ - /** - * The device type isn't specified. - * - * Generated from protobuf enum DEVICE_TYPE_UNSPECIFIED = 0; - */ - const DEVICE_TYPE_UNSPECIFIED = 0; - /** - * A desktop web browser, such as, Chrome, Firefox, Safari, or Internet - * Explorer) - * - * Generated from protobuf enum WEB = 1; - */ - const WEB = 1; - /** - * A mobile device web browser, such as a phone or tablet with a Chrome - * browser. - * - * Generated from protobuf enum MOBILE_WEB = 2; - */ - const MOBILE_WEB = 2; - /** - * An Android device native application. - * - * Generated from protobuf enum ANDROID = 3; - */ - const ANDROID = 3; - /** - * An iOS device native application. - * - * Generated from protobuf enum IOS = 4; - */ - const IOS = 4; - /** - * A bot, as opposed to a device operated by human beings, such as a web - * crawler. - * - * Generated from protobuf enum BOT = 5; - */ - const BOT = 5; - /** - * Other devices types. - * - * Generated from protobuf enum OTHER = 6; - */ - const OTHER = 6; - - private static $valueToName = [ - self::DEVICE_TYPE_UNSPECIFIED => 'DEVICE_TYPE_UNSPECIFIED', - self::WEB => 'WEB', - self::MOBILE_WEB => 'MOBILE_WEB', - self::ANDROID => 'ANDROID', - self::IOS => 'IOS', - self::BOT => 'BOT', - self::OTHER => 'OTHER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeviceType::class, \Google\Cloud\Talent\V4\DeviceInfo_DeviceType::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php deleted file mode 100644 index ce6d8cb77839..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/EmploymentType.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.talent.v4.EmploymentType - */ -class EmploymentType -{ - /** - * The default value if the employment type isn't specified. - * - * Generated from protobuf enum EMPLOYMENT_TYPE_UNSPECIFIED = 0; - */ - const EMPLOYMENT_TYPE_UNSPECIFIED = 0; - /** - * The job requires working a number of hours that constitute full - * time employment, typically 40 or more hours per week. - * - * Generated from protobuf enum FULL_TIME = 1; - */ - const FULL_TIME = 1; - /** - * The job entails working fewer hours than a full time job, - * typically less than 40 hours a week. - * - * Generated from protobuf enum PART_TIME = 2; - */ - const PART_TIME = 2; - /** - * The job is offered as a contracted, as opposed to a salaried employee, - * position. - * - * Generated from protobuf enum CONTRACTOR = 3; - */ - const CONTRACTOR = 3; - /** - * The job is offered as a contracted position with the understanding - * that it's converted into a full-time position at the end of the - * contract. Jobs of this type are also returned by a search for - * [EmploymentType.CONTRACTOR][google.cloud.talent.v4.EmploymentType.CONTRACTOR] - * jobs. - * - * Generated from protobuf enum CONTRACT_TO_HIRE = 4; - */ - const CONTRACT_TO_HIRE = 4; - /** - * The job is offered as a temporary employment opportunity, usually - * a short-term engagement. - * - * Generated from protobuf enum TEMPORARY = 5; - */ - const TEMPORARY = 5; - /** - * The job is a fixed-term opportunity for students or entry-level job - * seekers to obtain on-the-job training, typically offered as a summer - * position. - * - * Generated from protobuf enum INTERN = 6; - */ - const INTERN = 6; - /** - * The is an opportunity for an individual to volunteer, where there's no - * expectation of compensation for the provided services. - * - * Generated from protobuf enum VOLUNTEER = 7; - */ - const VOLUNTEER = 7; - /** - * The job requires an employee to work on an as-needed basis with a - * flexible schedule. - * - * Generated from protobuf enum PER_DIEM = 8; - */ - const PER_DIEM = 8; - /** - * The job involves employing people in remote areas and flying them - * temporarily to the work site instead of relocating employees and their - * families permanently. - * - * Generated from protobuf enum FLY_IN_FLY_OUT = 9; - */ - const FLY_IN_FLY_OUT = 9; - /** - * The job does not fit any of the other listed types. - * - * Generated from protobuf enum OTHER_EMPLOYMENT_TYPE = 10; - */ - const OTHER_EMPLOYMENT_TYPE = 10; - - private static $valueToName = [ - self::EMPLOYMENT_TYPE_UNSPECIFIED => 'EMPLOYMENT_TYPE_UNSPECIFIED', - self::FULL_TIME => 'FULL_TIME', - self::PART_TIME => 'PART_TIME', - self::CONTRACTOR => 'CONTRACTOR', - self::CONTRACT_TO_HIRE => 'CONTRACT_TO_HIRE', - self::TEMPORARY => 'TEMPORARY', - self::INTERN => 'INTERN', - self::VOLUNTEER => 'VOLUNTEER', - self::PER_DIEM => 'PER_DIEM', - self::FLY_IN_FLY_OUT => 'FLY_IN_FLY_OUT', - self::OTHER_EMPLOYMENT_TYPE => 'OTHER_EMPLOYMENT_TYPE', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php deleted file mode 100644 index fe8c26682d2d..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetCompanyRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.talent.v4.GetCompanyRequest - */ -class GetCompanyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the company to be retrieved. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/api-test-project/tenants/foo/companies/bar". - * - * 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 company to be retrieved. - * - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/api-test-project/tenants/foo/companies/bar". Please see - * {@see CompanyServiceClient::companyName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\GetCompanyRequest - * - * @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 company to be retrieved. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/api-test-project/tenants/foo/companies/bar". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the company to be retrieved. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/api-test-project/tenants/foo/companies/bar". - * - * 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 company to be retrieved. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}", for - * example, "projects/api-test-project/tenants/foo/companies/bar". - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php deleted file mode 100644 index 2ab7be1ad0e4..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetJobRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.talent.v4.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the job to retrieve. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * - * 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 job to retrieve. - * - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". Please see - * {@see JobServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\GetJobRequest - * - * @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 job to retrieve. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the job to retrieve. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * - * 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 job to retrieve. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php deleted file mode 100644 index e8abd88ee13f..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/GetTenantRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.talent.v4.GetTenantRequest - */ -class GetTenantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant to be retrieved. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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 tenant to be retrieved. - * - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". Please see - * {@see TenantServiceClient::tenantName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\GetTenantRequest - * - * @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 tenant to be retrieved. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant to be retrieved. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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 tenant to be retrieved. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php deleted file mode 100644 index 3519c85d3beb..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQuery.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.talent.v4.HistogramQuery - */ -class HistogramQuery extends \Google\Protobuf\Internal\Message -{ - /** - * An expression specifies a histogram request against matching jobs for - * searches. - * See - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] - * for details about syntax. - * - * Generated from protobuf field string histogram_query = 1; - */ - protected $histogram_query = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $histogram_query - * An expression specifies a histogram request against matching jobs for - * searches. - * See - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] - * for details about syntax. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Histogram::initOnce(); - parent::__construct($data); - } - - /** - * An expression specifies a histogram request against matching jobs for - * searches. - * See - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] - * for details about syntax. - * - * Generated from protobuf field string histogram_query = 1; - * @return string - */ - public function getHistogramQuery() - { - return $this->histogram_query; - } - - /** - * An expression specifies a histogram request against matching jobs for - * searches. - * See - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries] - * for details about syntax. - * - * Generated from protobuf field string histogram_query = 1; - * @param string $var - * @return $this - */ - public function setHistogramQuery($var) - { - GPBUtil::checkString($var, True); - $this->histogram_query = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php deleted file mode 100644 index 6b47b0078c9b..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HistogramQueryResult.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.talent.v4.HistogramQueryResult - */ -class HistogramQueryResult extends \Google\Protobuf\Internal\Message -{ - /** - * Requested histogram expression. - * - * Generated from protobuf field string histogram_query = 1; - */ - protected $histogram_query = ''; - /** - * A map from the values of the facet associated with distinct values to the - * number of matching entries with corresponding value. - * The key format is: - * * (for string histogram) string values stored in the field. - * * (for named numeric bucket) name specified in `bucket()` function, like - * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. - * * (for anonymous numeric bucket) range formatted as `-`, for - * example, `0-1000`, `MIN-0`, and `0-MAX`. - * - * Generated from protobuf field map histogram = 2; - */ - private $histogram; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $histogram_query - * Requested histogram expression. - * @type array|\Google\Protobuf\Internal\MapField $histogram - * A map from the values of the facet associated with distinct values to the - * number of matching entries with corresponding value. - * The key format is: - * * (for string histogram) string values stored in the field. - * * (for named numeric bucket) name specified in `bucket()` function, like - * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. - * * (for anonymous numeric bucket) range formatted as `-`, for - * example, `0-1000`, `MIN-0`, and `0-MAX`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Histogram::initOnce(); - parent::__construct($data); - } - - /** - * Requested histogram expression. - * - * Generated from protobuf field string histogram_query = 1; - * @return string - */ - public function getHistogramQuery() - { - return $this->histogram_query; - } - - /** - * Requested histogram expression. - * - * Generated from protobuf field string histogram_query = 1; - * @param string $var - * @return $this - */ - public function setHistogramQuery($var) - { - GPBUtil::checkString($var, True); - $this->histogram_query = $var; - - return $this; - } - - /** - * A map from the values of the facet associated with distinct values to the - * number of matching entries with corresponding value. - * The key format is: - * * (for string histogram) string values stored in the field. - * * (for named numeric bucket) name specified in `bucket()` function, like - * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. - * * (for anonymous numeric bucket) range formatted as `-`, for - * example, `0-1000`, `MIN-0`, and `0-MAX`. - * - * Generated from protobuf field map histogram = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHistogram() - { - return $this->histogram; - } - - /** - * A map from the values of the facet associated with distinct values to the - * number of matching entries with corresponding value. - * The key format is: - * * (for string histogram) string values stored in the field. - * * (for named numeric bucket) name specified in `bucket()` function, like - * for `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. - * * (for anonymous numeric bucket) range formatted as `-`, for - * example, `0-1000`, `MIN-0`, and `0-MAX`. - * - * Generated from protobuf field map histogram = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHistogram($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->histogram = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php deleted file mode 100644 index eedac8211001..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/HtmlSanitization.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.talent.v4.HtmlSanitization - */ -class HtmlSanitization -{ - /** - * Default value. - * - * Generated from protobuf enum HTML_SANITIZATION_UNSPECIFIED = 0; - */ - const HTML_SANITIZATION_UNSPECIFIED = 0; - /** - * Disables sanitization on HTML input. - * - * Generated from protobuf enum HTML_SANITIZATION_DISABLED = 1; - */ - const HTML_SANITIZATION_DISABLED = 1; - /** - * Sanitizes HTML input, only accepts bold, italic, ordered list, and - * unordered list markup tags. - * - * Generated from protobuf enum SIMPLE_FORMATTING_ONLY = 2; - */ - const SIMPLE_FORMATTING_ONLY = 2; - - private static $valueToName = [ - self::HTML_SANITIZATION_UNSPECIFIED => 'HTML_SANITIZATION_UNSPECIFIED', - self::HTML_SANITIZATION_DISABLED => 'HTML_SANITIZATION_DISABLED', - self::SIMPLE_FORMATTING_ONLY => 'SIMPLE_FORMATTING_ONLY', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php deleted file mode 100644 index 729131b5fef1..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job.php +++ /dev/null @@ -1,1765 +0,0 @@ -google.cloud.talent.v4.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * Required during job update. - * The resource name for the job. This is generated by the service when a - * job is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * Use of this field in job queries and API calls is preferred over the use of - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this - * value is unique. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The resource name of the company listing the job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $company = ''; - /** - * Required. The requisition ID, also referred to as the posting ID, is - * assigned by the client to identify a job. This field is intended to be used - * by clients for client identification and tracking of postings. A job isn't - * allowed to be created if there is another job with the same - * [company][google.cloud.talent.v4.Job.name], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $requisition_id = ''; - /** - * Required. The title of the job, such as "Software Engineer" - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field string title = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $title = ''; - /** - * Required. The description of the job, which typically includes a - * multi-paragraph description of the company and related information. - * Separate fields are provided on the job object for - * [responsibilities][google.cloud.talent.v4.Job.responsibilities], - * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job - * characteristics. Use of these separate job fields is recommended. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 100,000. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $description = ''; - /** - * Strongly recommended for the best service experience. - * Location(s) where the employer is looking to hire for this job posting. - * Specifying the full street address(es) of the hiring location enables - * better API results, especially job searches by commute time. - * At most 50 locations are allowed for best search performance. If a job has - * more locations, it is suggested to split it into multiple jobs with unique - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' - * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not - * allowed. If the original - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be - * preserved, a custom field should be used for storage. It is also suggested - * to group the locations that close to each other in the same job for better - * search experience. - * Jobs with multiple addresses must have their addresses with the same - * [LocationType][] to allow location filtering to work properly. (For - * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, - * CA, USA" and "London, UK" may not have location filters applied correctly - * at search time since the first is a [LocationType.STREET_ADDRESS][] and the - * second is a [LocationType.LOCALITY][].) If a job needs to have multiple - * addresses, it is suggested to split it into multiple jobs with same - * LocationTypes. - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field repeated string addresses = 6; - */ - private $addresses; - /** - * Job application information. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; - */ - protected $application_info = null; - /** - * The benefits included with the job. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; - */ - private $job_benefits; - /** - * Job compensation information (a.k.a. "pay rate") i.e., the compensation - * that will paid to the employee. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo compensation_info = 9; - */ - protected $compensation_info = null; - /** - * A map of fields to hold both filterable and non-filterable custom job - * attributes that are not covered by the provided structured fields. - * The keys of the map are strings up to 64 bytes and must match the - * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or - * KEY_1_LIKE_THIS. - * At most 100 filterable and at most 100 unfilterable keys are supported. - * For filterable `string_values`, across all keys at most 200 values are - * allowed, with each string no more than 255 characters. For unfilterable - * `string_values`, the maximum total size of `string_values` across all keys - * is 50KB. - * - * Generated from protobuf field map custom_attributes = 10; - */ - private $custom_attributes; - /** - * The desired education degrees for the job, such as Bachelors, Masters. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.DegreeType degree_types = 11; - */ - private $degree_types; - /** - * The department or functional area within the company with the open - * position. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string department = 12; - */ - protected $department = ''; - /** - * The employment type(s) of a job, for example, - * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or - * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; - */ - private $employment_types; - /** - * A description of bonus, commission, and other compensation - * incentives associated with the job not including salary or pay. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string incentives = 14; - */ - protected $incentives = ''; - /** - * The language of the posting. This field is distinct from - * any requirements for fluency that are associated with the job. - * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. - * If this field is unspecified and - * [Job.description][google.cloud.talent.v4.Job.description] is present, - * detected language code based on - * [Job.description][google.cloud.talent.v4.Job.description] is assigned, - * otherwise defaults to 'en_US'. - * - * Generated from protobuf field string language_code = 15; - */ - protected $language_code = ''; - /** - * The experience level associated with the job, such as "Entry Level". - * - * Generated from protobuf field .google.cloud.talent.v4.JobLevel job_level = 16; - */ - protected $job_level = 0; - /** - * A promotion value of the job, as determined by the client. - * The value determines the sort order of the jobs returned when searching for - * jobs using the featured jobs search call, with higher promotional values - * being returned first and ties being resolved by relevance sort. Only the - * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. - * Default value is 0, and negative values are treated as 0. - * - * Generated from protobuf field int32 promotion_value = 17; - */ - protected $promotion_value = 0; - /** - * A description of the qualifications required to perform the - * job. The use of this field is recommended - * as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string qualifications = 18; - */ - protected $qualifications = ''; - /** - * A description of job responsibilities. The use of this field is - * recommended as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string responsibilities = 19; - */ - protected $responsibilities = ''; - /** - * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, - * state, country) throughout which the job is available. If this field is - * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search - * query within the job region finds this job posting if an exact location - * match isn't specified. If this field is set to - * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or - * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], - * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the - * same location level as this field is strongly recommended. - * - * Generated from protobuf field .google.cloud.talent.v4.PostingRegion posting_region = 20; - */ - protected $posting_region = 0; - /** - * Deprecated. The job is only visible to the owner. - * The visibility of the job. - * Defaults to - * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] - * if not specified. - * - * Generated from protobuf field .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; - * @deprecated - */ - protected $visibility = 0; - /** - * The start timestamp of the job in UTC time zone. Typically this field - * is used for contracting engagements. Invalid timestamps are ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp job_start_time = 22; - */ - protected $job_start_time = null; - /** - * The end timestamp of the job. Typically this field is used for contracting - * engagements. Invalid timestamps are ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp job_end_time = 23; - */ - protected $job_end_time = null; - /** - * The timestamp this job posting was most recently published. The default - * value is the time the request arrives at the server. Invalid timestamps are - * ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_publish_time = 24; - */ - protected $posting_publish_time = null; - /** - * Strongly recommended for the best service experience. - * The expiration timestamp of the job. After this timestamp, the - * job is marked as expired, and it no longer appears in search results. The - * expired job can't be listed by the - * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be - * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API - * or updated with the - * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted - * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An - * expired job can be updated and opened again by using a future expiration - * timestamp. Updating an expired job fails if there is another existing open - * job with same [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The expired jobs are retained in our system for 90 days. However, the - * overall expired job count cannot exceed 3 times the maximum number of - * open jobs over previous 7 days. If this threshold is exceeded, - * expired jobs are cleaned out in order of earliest expire time. - * Expired jobs are no longer accessible after they are cleaned - * out. - * Invalid timestamps are ignored, and treated as expire time not provided. - * If the timestamp is before the instant request is made, the job - * is treated as expired immediately on creation. This kind of job can - * not be updated. And when creating a job with past timestamp, the - * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * must be set before - * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The - * purpose of this feature is to allow other objects, such as [Application][], - * to refer a job that didn't exist in the system prior to becoming expired. - * If you want to modify a job that was expired on creation, delete it and - * create a new one. - * If this value isn't provided at the time of job creation or is invalid, - * the job posting expires after 30 days from the job's creation time. For - * example, if the job was created on 2017/01/01 13:00AM UTC with an - * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. - * If this value isn't provided on job update, it depends on the field masks - * set by - * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. - * If the field masks include - * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are - * empty meaning that every field is updated, the job posting expires after 30 - * days from the job's last update time. Otherwise the expiration date isn't - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_expire_time = 25; - */ - protected $posting_expire_time = null; - /** - * Output only. The timestamp when this job posting was created. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $posting_create_time = null; - /** - * Output only. The timestamp when this job posting was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $posting_update_time = null; - /** - * Output only. Display name of the company listing the job. - * - * Generated from protobuf field string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $company_display_name = ''; - /** - * Output only. Derived details about the job posting. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $derived_info = null; - /** - * Options for job processing. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; - */ - protected $processing_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required during job update. - * The resource name for the job. This is generated by the service when a - * job is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * Use of this field in job queries and API calls is preferred over the use of - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this - * value is unique. - * @type string $company - * Required. The resource name of the company listing the job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * @type string $requisition_id - * Required. The requisition ID, also referred to as the posting ID, is - * assigned by the client to identify a job. This field is intended to be used - * by clients for client identification and tracking of postings. A job isn't - * allowed to be created if there is another job with the same - * [company][google.cloud.talent.v4.Job.name], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The maximum number of allowed characters is 255. - * @type string $title - * Required. The title of the job, such as "Software Engineer" - * The maximum number of allowed characters is 500. - * @type string $description - * Required. The description of the job, which typically includes a - * multi-paragraph description of the company and related information. - * Separate fields are provided on the job object for - * [responsibilities][google.cloud.talent.v4.Job.responsibilities], - * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job - * characteristics. Use of these separate job fields is recommended. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 100,000. - * @type array|\Google\Protobuf\Internal\RepeatedField $addresses - * Strongly recommended for the best service experience. - * Location(s) where the employer is looking to hire for this job posting. - * Specifying the full street address(es) of the hiring location enables - * better API results, especially job searches by commute time. - * At most 50 locations are allowed for best search performance. If a job has - * more locations, it is suggested to split it into multiple jobs with unique - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' - * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not - * allowed. If the original - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be - * preserved, a custom field should be used for storage. It is also suggested - * to group the locations that close to each other in the same job for better - * search experience. - * Jobs with multiple addresses must have their addresses with the same - * [LocationType][] to allow location filtering to work properly. (For - * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, - * CA, USA" and "London, UK" may not have location filters applied correctly - * at search time since the first is a [LocationType.STREET_ADDRESS][] and the - * second is a [LocationType.LOCALITY][].) If a job needs to have multiple - * addresses, it is suggested to split it into multiple jobs with same - * LocationTypes. - * The maximum number of allowed characters is 500. - * @type \Google\Cloud\Talent\V4\Job\ApplicationInfo $application_info - * Job application information. - * @type array|\Google\Protobuf\Internal\RepeatedField $job_benefits - * The benefits included with the job. - * @type \Google\Cloud\Talent\V4\CompensationInfo $compensation_info - * Job compensation information (a.k.a. "pay rate") i.e., the compensation - * that will paid to the employee. - * @type array|\Google\Protobuf\Internal\MapField $custom_attributes - * A map of fields to hold both filterable and non-filterable custom job - * attributes that are not covered by the provided structured fields. - * The keys of the map are strings up to 64 bytes and must match the - * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or - * KEY_1_LIKE_THIS. - * At most 100 filterable and at most 100 unfilterable keys are supported. - * For filterable `string_values`, across all keys at most 200 values are - * allowed, with each string no more than 255 characters. For unfilterable - * `string_values`, the maximum total size of `string_values` across all keys - * is 50KB. - * @type array|\Google\Protobuf\Internal\RepeatedField $degree_types - * The desired education degrees for the job, such as Bachelors, Masters. - * @type string $department - * The department or functional area within the company with the open - * position. - * The maximum number of allowed characters is 255. - * @type array|\Google\Protobuf\Internal\RepeatedField $employment_types - * The employment type(s) of a job, for example, - * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or - * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. - * @type string $incentives - * A description of bonus, commission, and other compensation - * incentives associated with the job not including salary or pay. - * The maximum number of allowed characters is 10,000. - * @type string $language_code - * The language of the posting. This field is distinct from - * any requirements for fluency that are associated with the job. - * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. - * If this field is unspecified and - * [Job.description][google.cloud.talent.v4.Job.description] is present, - * detected language code based on - * [Job.description][google.cloud.talent.v4.Job.description] is assigned, - * otherwise defaults to 'en_US'. - * @type int $job_level - * The experience level associated with the job, such as "Entry Level". - * @type int $promotion_value - * A promotion value of the job, as determined by the client. - * The value determines the sort order of the jobs returned when searching for - * jobs using the featured jobs search call, with higher promotional values - * being returned first and ties being resolved by relevance sort. Only the - * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. - * Default value is 0, and negative values are treated as 0. - * @type string $qualifications - * A description of the qualifications required to perform the - * job. The use of this field is recommended - * as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * @type string $responsibilities - * A description of job responsibilities. The use of this field is - * recommended as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * @type int $posting_region - * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, - * state, country) throughout which the job is available. If this field is - * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search - * query within the job region finds this job posting if an exact location - * match isn't specified. If this field is set to - * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or - * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], - * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the - * same location level as this field is strongly recommended. - * @type int $visibility - * Deprecated. The job is only visible to the owner. - * The visibility of the job. - * Defaults to - * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] - * if not specified. - * @type \Google\Protobuf\Timestamp $job_start_time - * The start timestamp of the job in UTC time zone. Typically this field - * is used for contracting engagements. Invalid timestamps are ignored. - * @type \Google\Protobuf\Timestamp $job_end_time - * The end timestamp of the job. Typically this field is used for contracting - * engagements. Invalid timestamps are ignored. - * @type \Google\Protobuf\Timestamp $posting_publish_time - * The timestamp this job posting was most recently published. The default - * value is the time the request arrives at the server. Invalid timestamps are - * ignored. - * @type \Google\Protobuf\Timestamp $posting_expire_time - * Strongly recommended for the best service experience. - * The expiration timestamp of the job. After this timestamp, the - * job is marked as expired, and it no longer appears in search results. The - * expired job can't be listed by the - * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be - * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API - * or updated with the - * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted - * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An - * expired job can be updated and opened again by using a future expiration - * timestamp. Updating an expired job fails if there is another existing open - * job with same [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The expired jobs are retained in our system for 90 days. However, the - * overall expired job count cannot exceed 3 times the maximum number of - * open jobs over previous 7 days. If this threshold is exceeded, - * expired jobs are cleaned out in order of earliest expire time. - * Expired jobs are no longer accessible after they are cleaned - * out. - * Invalid timestamps are ignored, and treated as expire time not provided. - * If the timestamp is before the instant request is made, the job - * is treated as expired immediately on creation. This kind of job can - * not be updated. And when creating a job with past timestamp, the - * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * must be set before - * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The - * purpose of this feature is to allow other objects, such as [Application][], - * to refer a job that didn't exist in the system prior to becoming expired. - * If you want to modify a job that was expired on creation, delete it and - * create a new one. - * If this value isn't provided at the time of job creation or is invalid, - * the job posting expires after 30 days from the job's creation time. For - * example, if the job was created on 2017/01/01 13:00AM UTC with an - * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. - * If this value isn't provided on job update, it depends on the field masks - * set by - * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. - * If the field masks include - * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are - * empty meaning that every field is updated, the job posting expires after 30 - * days from the job's last update time. Otherwise the expiration date isn't - * updated. - * @type \Google\Protobuf\Timestamp $posting_create_time - * Output only. The timestamp when this job posting was created. - * @type \Google\Protobuf\Timestamp $posting_update_time - * Output only. The timestamp when this job posting was last updated. - * @type string $company_display_name - * Output only. Display name of the company listing the job. - * @type \Google\Cloud\Talent\V4\Job\DerivedInfo $derived_info - * Output only. Derived details about the job posting. - * @type \Google\Cloud\Talent\V4\Job\ProcessingOptions $processing_options - * Options for job processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); - parent::__construct($data); - } - - /** - * Required during job update. - * The resource name for the job. This is generated by the service when a - * job is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * Use of this field in job queries and API calls is preferred over the use of - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this - * value is unique. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required during job update. - * The resource name for the job. This is generated by the service when a - * job is created. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For - * example, "projects/foo/tenants/bar/jobs/baz". - * Use of this field in job queries and API calls is preferred over the use of - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] since this - * value is unique. - * - * 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 resource name of the company listing the job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCompany() - { - return $this->company; - } - - /** - * Required. The resource name of the company listing the job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * - * Generated from protobuf field string company = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCompany($var) - { - GPBUtil::checkString($var, True); - $this->company = $var; - - return $this; - } - - /** - * Required. The requisition ID, also referred to as the posting ID, is - * assigned by the client to identify a job. This field is intended to be used - * by clients for client identification and tracking of postings. A job isn't - * allowed to be created if there is another job with the same - * [company][google.cloud.talent.v4.Job.name], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRequisitionId() - { - return $this->requisition_id; - } - - /** - * Required. The requisition ID, also referred to as the posting ID, is - * assigned by the client to identify a job. This field is intended to be used - * by clients for client identification and tracking of postings. A job isn't - * allowed to be created if there is another job with the same - * [company][google.cloud.talent.v4.Job.name], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string requisition_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRequisitionId($var) - { - GPBUtil::checkString($var, True); - $this->requisition_id = $var; - - return $this; - } - - /** - * Required. The title of the job, such as "Software Engineer" - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field string title = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. The title of the job, such as "Software Engineer" - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field string title = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Required. The description of the job, which typically includes a - * multi-paragraph description of the company and related information. - * Separate fields are provided on the job object for - * [responsibilities][google.cloud.talent.v4.Job.responsibilities], - * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job - * characteristics. Use of these separate job fields is recommended. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 100,000. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Required. The description of the job, which typically includes a - * multi-paragraph description of the company and related information. - * Separate fields are provided on the job object for - * [responsibilities][google.cloud.talent.v4.Job.responsibilities], - * [qualifications][google.cloud.talent.v4.Job.qualifications], and other job - * characteristics. Use of these separate job fields is recommended. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 100,000. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Strongly recommended for the best service experience. - * Location(s) where the employer is looking to hire for this job posting. - * Specifying the full street address(es) of the hiring location enables - * better API results, especially job searches by commute time. - * At most 50 locations are allowed for best search performance. If a job has - * more locations, it is suggested to split it into multiple jobs with unique - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' - * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not - * allowed. If the original - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be - * preserved, a custom field should be used for storage. It is also suggested - * to group the locations that close to each other in the same job for better - * search experience. - * Jobs with multiple addresses must have their addresses with the same - * [LocationType][] to allow location filtering to work properly. (For - * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, - * CA, USA" and "London, UK" may not have location filters applied correctly - * at search time since the first is a [LocationType.STREET_ADDRESS][] and the - * second is a [LocationType.LOCALITY][].) If a job needs to have multiple - * addresses, it is suggested to split it into multiple jobs with same - * LocationTypes. - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field repeated string addresses = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAddresses() - { - return $this->addresses; - } - - /** - * Strongly recommended for the best service experience. - * Location(s) where the employer is looking to hire for this job posting. - * Specifying the full street address(es) of the hiring location enables - * better API results, especially job searches by commute time. - * At most 50 locations are allowed for best search performance. If a job has - * more locations, it is suggested to split it into multiple jobs with unique - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]s (e.g. 'ReqA' - * becomes 'ReqA-1', 'ReqA-2', and so on.) as multiple jobs with the same - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] are not - * allowed. If the original - * [requisition_id][google.cloud.talent.v4.Job.requisition_id] must be - * preserved, a custom field should be used for storage. It is also suggested - * to group the locations that close to each other in the same job for better - * search experience. - * Jobs with multiple addresses must have their addresses with the same - * [LocationType][] to allow location filtering to work properly. (For - * example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View, - * CA, USA" and "London, UK" may not have location filters applied correctly - * at search time since the first is a [LocationType.STREET_ADDRESS][] and the - * second is a [LocationType.LOCALITY][].) If a job needs to have multiple - * addresses, it is suggested to split it into multiple jobs with same - * LocationTypes. - * The maximum number of allowed characters is 500. - * - * Generated from protobuf field repeated string addresses = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->addresses = $arr; - - return $this; - } - - /** - * Job application information. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; - * @return \Google\Cloud\Talent\V4\Job\ApplicationInfo|null - */ - public function getApplicationInfo() - { - return $this->application_info; - } - - public function hasApplicationInfo() - { - return isset($this->application_info); - } - - public function clearApplicationInfo() - { - unset($this->application_info); - } - - /** - * Job application information. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.ApplicationInfo application_info = 7; - * @param \Google\Cloud\Talent\V4\Job\ApplicationInfo $var - * @return $this - */ - public function setApplicationInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job\ApplicationInfo::class); - $this->application_info = $var; - - return $this; - } - - /** - * The benefits included with the job. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobBenefits() - { - return $this->job_benefits; - } - - /** - * The benefits included with the job. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobBenefit job_benefits = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobBenefits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\JobBenefit::class); - $this->job_benefits = $arr; - - return $this; - } - - /** - * Job compensation information (a.k.a. "pay rate") i.e., the compensation - * that will paid to the employee. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo compensation_info = 9; - * @return \Google\Cloud\Talent\V4\CompensationInfo|null - */ - public function getCompensationInfo() - { - return $this->compensation_info; - } - - public function hasCompensationInfo() - { - return isset($this->compensation_info); - } - - public function clearCompensationInfo() - { - unset($this->compensation_info); - } - - /** - * Job compensation information (a.k.a. "pay rate") i.e., the compensation - * that will paid to the employee. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationInfo compensation_info = 9; - * @param \Google\Cloud\Talent\V4\CompensationInfo $var - * @return $this - */ - public function setCompensationInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationInfo::class); - $this->compensation_info = $var; - - return $this; - } - - /** - * A map of fields to hold both filterable and non-filterable custom job - * attributes that are not covered by the provided structured fields. - * The keys of the map are strings up to 64 bytes and must match the - * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or - * KEY_1_LIKE_THIS. - * At most 100 filterable and at most 100 unfilterable keys are supported. - * For filterable `string_values`, across all keys at most 200 values are - * allowed, with each string no more than 255 characters. For unfilterable - * `string_values`, the maximum total size of `string_values` across all keys - * is 50KB. - * - * Generated from protobuf field map custom_attributes = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCustomAttributes() - { - return $this->custom_attributes; - } - - /** - * A map of fields to hold both filterable and non-filterable custom job - * attributes that are not covered by the provided structured fields. - * The keys of the map are strings up to 64 bytes and must match the - * pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, key0LikeThis or - * KEY_1_LIKE_THIS. - * At most 100 filterable and at most 100 unfilterable keys are supported. - * For filterable `string_values`, across all keys at most 200 values are - * allowed, with each string no more than 255 characters. For unfilterable - * `string_values`, the maximum total size of `string_values` across all keys - * is 50KB. - * - * Generated from protobuf field map custom_attributes = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCustomAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\CustomAttribute::class); - $this->custom_attributes = $arr; - - return $this; - } - - /** - * The desired education degrees for the job, such as Bachelors, Masters. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.DegreeType degree_types = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDegreeTypes() - { - return $this->degree_types; - } - - /** - * The desired education degrees for the job, such as Bachelors, Masters. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.DegreeType degree_types = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDegreeTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\DegreeType::class); - $this->degree_types = $arr; - - return $this; - } - - /** - * The department or functional area within the company with the open - * position. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string department = 12; - * @return string - */ - public function getDepartment() - { - return $this->department; - } - - /** - * The department or functional area within the company with the open - * position. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string department = 12; - * @param string $var - * @return $this - */ - public function setDepartment($var) - { - GPBUtil::checkString($var, True); - $this->department = $var; - - return $this; - } - - /** - * The employment type(s) of a job, for example, - * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or - * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEmploymentTypes() - { - return $this->employment_types; - } - - /** - * The employment type(s) of a job, for example, - * [full time][google.cloud.talent.v4.EmploymentType.FULL_TIME] or - * [part time][google.cloud.talent.v4.EmploymentType.PART_TIME]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 13; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEmploymentTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\EmploymentType::class); - $this->employment_types = $arr; - - return $this; - } - - /** - * A description of bonus, commission, and other compensation - * incentives associated with the job not including salary or pay. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string incentives = 14; - * @return string - */ - public function getIncentives() - { - return $this->incentives; - } - - /** - * A description of bonus, commission, and other compensation - * incentives associated with the job not including salary or pay. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string incentives = 14; - * @param string $var - * @return $this - */ - public function setIncentives($var) - { - GPBUtil::checkString($var, True); - $this->incentives = $var; - - return $this; - } - - /** - * The language of the posting. This field is distinct from - * any requirements for fluency that are associated with the job. - * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. - * If this field is unspecified and - * [Job.description][google.cloud.talent.v4.Job.description] is present, - * detected language code based on - * [Job.description][google.cloud.talent.v4.Job.description] is assigned, - * otherwise defaults to 'en_US'. - * - * Generated from protobuf field string language_code = 15; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language of the posting. This field is distinct from - * any requirements for fluency that are associated with the job. - * Language codes must be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47){: - * class="external" target="_blank" }. - * If this field is unspecified and - * [Job.description][google.cloud.talent.v4.Job.description] is present, - * detected language code based on - * [Job.description][google.cloud.talent.v4.Job.description] is assigned, - * otherwise defaults to 'en_US'. - * - * Generated from protobuf field string language_code = 15; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The experience level associated with the job, such as "Entry Level". - * - * Generated from protobuf field .google.cloud.talent.v4.JobLevel job_level = 16; - * @return int - */ - public function getJobLevel() - { - return $this->job_level; - } - - /** - * The experience level associated with the job, such as "Entry Level". - * - * Generated from protobuf field .google.cloud.talent.v4.JobLevel job_level = 16; - * @param int $var - * @return $this - */ - public function setJobLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobLevel::class); - $this->job_level = $var; - - return $this; - } - - /** - * A promotion value of the job, as determined by the client. - * The value determines the sort order of the jobs returned when searching for - * jobs using the featured jobs search call, with higher promotional values - * being returned first and ties being resolved by relevance sort. Only the - * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. - * Default value is 0, and negative values are treated as 0. - * - * Generated from protobuf field int32 promotion_value = 17; - * @return int - */ - public function getPromotionValue() - { - return $this->promotion_value; - } - - /** - * A promotion value of the job, as determined by the client. - * The value determines the sort order of the jobs returned when searching for - * jobs using the featured jobs search call, with higher promotional values - * being returned first and ties being resolved by relevance sort. Only the - * jobs with a promotionValue >0 are returned in a FEATURED_JOB_SEARCH. - * Default value is 0, and negative values are treated as 0. - * - * Generated from protobuf field int32 promotion_value = 17; - * @param int $var - * @return $this - */ - public function setPromotionValue($var) - { - GPBUtil::checkInt32($var); - $this->promotion_value = $var; - - return $this; - } - - /** - * A description of the qualifications required to perform the - * job. The use of this field is recommended - * as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string qualifications = 18; - * @return string - */ - public function getQualifications() - { - return $this->qualifications; - } - - /** - * A description of the qualifications required to perform the - * job. The use of this field is recommended - * as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string qualifications = 18; - * @param string $var - * @return $this - */ - public function setQualifications($var) - { - GPBUtil::checkString($var, True); - $this->qualifications = $var; - - return $this; - } - - /** - * A description of job responsibilities. The use of this field is - * recommended as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string responsibilities = 19; - * @return string - */ - public function getResponsibilities() - { - return $this->responsibilities; - } - - /** - * A description of job responsibilities. The use of this field is - * recommended as an alternative to using the more general - * [description][google.cloud.talent.v4.Job.description] field. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 10,000. - * - * Generated from protobuf field string responsibilities = 19; - * @param string $var - * @return $this - */ - public function setResponsibilities($var) - { - GPBUtil::checkString($var, True); - $this->responsibilities = $var; - - return $this; - } - - /** - * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, - * state, country) throughout which the job is available. If this field is - * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search - * query within the job region finds this job posting if an exact location - * match isn't specified. If this field is set to - * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or - * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], - * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the - * same location level as this field is strongly recommended. - * - * Generated from protobuf field .google.cloud.talent.v4.PostingRegion posting_region = 20; - * @return int - */ - public function getPostingRegion() - { - return $this->posting_region; - } - - /** - * The job [PostingRegion][google.cloud.talent.v4.PostingRegion] (for example, - * state, country) throughout which the job is available. If this field is - * set, a [LocationFilter][google.cloud.talent.v4.LocationFilter] in a search - * query within the job region finds this job posting if an exact location - * match isn't specified. If this field is set to - * [PostingRegion.NATION][google.cloud.talent.v4.PostingRegion.NATION] or - * [PostingRegion.ADMINISTRATIVE_AREA][google.cloud.talent.v4.PostingRegion.ADMINISTRATIVE_AREA], - * setting job [Job.addresses][google.cloud.talent.v4.Job.addresses] to the - * same location level as this field is strongly recommended. - * - * Generated from protobuf field .google.cloud.talent.v4.PostingRegion posting_region = 20; - * @param int $var - * @return $this - */ - public function setPostingRegion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\PostingRegion::class); - $this->posting_region = $var; - - return $this; - } - - /** - * Deprecated. The job is only visible to the owner. - * The visibility of the job. - * Defaults to - * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] - * if not specified. - * - * Generated from protobuf field .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; - * @return int - * @deprecated - */ - public function getVisibility() - { - @trigger_error('visibility is deprecated.', E_USER_DEPRECATED); - return $this->visibility; - } - - /** - * Deprecated. The job is only visible to the owner. - * The visibility of the job. - * Defaults to - * [Visibility.ACCOUNT_ONLY][google.cloud.talent.v4.Visibility.ACCOUNT_ONLY] - * if not specified. - * - * Generated from protobuf field .google.cloud.talent.v4.Visibility visibility = 21 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setVisibility($var) - { - @trigger_error('visibility is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\Visibility::class); - $this->visibility = $var; - - return $this; - } - - /** - * The start timestamp of the job in UTC time zone. Typically this field - * is used for contracting engagements. Invalid timestamps are ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp job_start_time = 22; - * @return \Google\Protobuf\Timestamp|null - */ - public function getJobStartTime() - { - return $this->job_start_time; - } - - public function hasJobStartTime() - { - return isset($this->job_start_time); - } - - public function clearJobStartTime() - { - unset($this->job_start_time); - } - - /** - * The start timestamp of the job in UTC time zone. Typically this field - * is used for contracting engagements. Invalid timestamps are ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp job_start_time = 22; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setJobStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->job_start_time = $var; - - return $this; - } - - /** - * The end timestamp of the job. Typically this field is used for contracting - * engagements. Invalid timestamps are ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp job_end_time = 23; - * @return \Google\Protobuf\Timestamp|null - */ - public function getJobEndTime() - { - return $this->job_end_time; - } - - public function hasJobEndTime() - { - return isset($this->job_end_time); - } - - public function clearJobEndTime() - { - unset($this->job_end_time); - } - - /** - * The end timestamp of the job. Typically this field is used for contracting - * engagements. Invalid timestamps are ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp job_end_time = 23; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setJobEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->job_end_time = $var; - - return $this; - } - - /** - * The timestamp this job posting was most recently published. The default - * value is the time the request arrives at the server. Invalid timestamps are - * ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_publish_time = 24; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPostingPublishTime() - { - return $this->posting_publish_time; - } - - public function hasPostingPublishTime() - { - return isset($this->posting_publish_time); - } - - public function clearPostingPublishTime() - { - unset($this->posting_publish_time); - } - - /** - * The timestamp this job posting was most recently published. The default - * value is the time the request arrives at the server. Invalid timestamps are - * ignored. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_publish_time = 24; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPostingPublishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->posting_publish_time = $var; - - return $this; - } - - /** - * Strongly recommended for the best service experience. - * The expiration timestamp of the job. After this timestamp, the - * job is marked as expired, and it no longer appears in search results. The - * expired job can't be listed by the - * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be - * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API - * or updated with the - * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted - * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An - * expired job can be updated and opened again by using a future expiration - * timestamp. Updating an expired job fails if there is another existing open - * job with same [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The expired jobs are retained in our system for 90 days. However, the - * overall expired job count cannot exceed 3 times the maximum number of - * open jobs over previous 7 days. If this threshold is exceeded, - * expired jobs are cleaned out in order of earliest expire time. - * Expired jobs are no longer accessible after they are cleaned - * out. - * Invalid timestamps are ignored, and treated as expire time not provided. - * If the timestamp is before the instant request is made, the job - * is treated as expired immediately on creation. This kind of job can - * not be updated. And when creating a job with past timestamp, the - * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * must be set before - * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The - * purpose of this feature is to allow other objects, such as [Application][], - * to refer a job that didn't exist in the system prior to becoming expired. - * If you want to modify a job that was expired on creation, delete it and - * create a new one. - * If this value isn't provided at the time of job creation or is invalid, - * the job posting expires after 30 days from the job's creation time. For - * example, if the job was created on 2017/01/01 13:00AM UTC with an - * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. - * If this value isn't provided on job update, it depends on the field masks - * set by - * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. - * If the field masks include - * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are - * empty meaning that every field is updated, the job posting expires after 30 - * days from the job's last update time. Otherwise the expiration date isn't - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_expire_time = 25; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPostingExpireTime() - { - return $this->posting_expire_time; - } - - public function hasPostingExpireTime() - { - return isset($this->posting_expire_time); - } - - public function clearPostingExpireTime() - { - unset($this->posting_expire_time); - } - - /** - * Strongly recommended for the best service experience. - * The expiration timestamp of the job. After this timestamp, the - * job is marked as expired, and it no longer appears in search results. The - * expired job can't be listed by the - * [ListJobs][google.cloud.talent.v4.JobService.ListJobs] API, but it can be - * retrieved with the [GetJob][google.cloud.talent.v4.JobService.GetJob] API - * or updated with the - * [UpdateJob][google.cloud.talent.v4.JobService.UpdateJob] API or deleted - * with the [DeleteJob][google.cloud.talent.v4.JobService.DeleteJob] API. An - * expired job can be updated and opened again by using a future expiration - * timestamp. Updating an expired job fails if there is another existing open - * job with same [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id]. - * The expired jobs are retained in our system for 90 days. However, the - * overall expired job count cannot exceed 3 times the maximum number of - * open jobs over previous 7 days. If this threshold is exceeded, - * expired jobs are cleaned out in order of earliest expire time. - * Expired jobs are no longer accessible after they are cleaned - * out. - * Invalid timestamps are ignored, and treated as expire time not provided. - * If the timestamp is before the instant request is made, the job - * is treated as expired immediately on creation. This kind of job can - * not be updated. And when creating a job with past timestamp, the - * [posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * must be set before - * [posting_expire_time][google.cloud.talent.v4.Job.posting_expire_time]. The - * purpose of this feature is to allow other objects, such as [Application][], - * to refer a job that didn't exist in the system prior to becoming expired. - * If you want to modify a job that was expired on creation, delete it and - * create a new one. - * If this value isn't provided at the time of job creation or is invalid, - * the job posting expires after 30 days from the job's creation time. For - * example, if the job was created on 2017/01/01 13:00AM UTC with an - * unspecified expiration date, the job expires after 2017/01/31 13:00AM UTC. - * If this value isn't provided on job update, it depends on the field masks - * set by - * [UpdateJobRequest.update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask]. - * If the field masks include - * [job_end_time][google.cloud.talent.v4.Job.job_end_time], or the masks are - * empty meaning that every field is updated, the job posting expires after 30 - * days from the job's last update time. Otherwise the expiration date isn't - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_expire_time = 25; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPostingExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->posting_expire_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when this job posting was created. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPostingCreateTime() - { - return $this->posting_create_time; - } - - public function hasPostingCreateTime() - { - return isset($this->posting_create_time); - } - - public function clearPostingCreateTime() - { - unset($this->posting_create_time); - } - - /** - * Output only. The timestamp when this job posting was created. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_create_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPostingCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->posting_create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when this job posting was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPostingUpdateTime() - { - return $this->posting_update_time; - } - - public function hasPostingUpdateTime() - { - return isset($this->posting_update_time); - } - - public function clearPostingUpdateTime() - { - unset($this->posting_update_time); - } - - /** - * Output only. The timestamp when this job posting was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp posting_update_time = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPostingUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->posting_update_time = $var; - - return $this; - } - - /** - * Output only. Display name of the company listing the job. - * - * Generated from protobuf field string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCompanyDisplayName() - { - return $this->company_display_name; - } - - /** - * Output only. Display name of the company listing the job. - * - * Generated from protobuf field string company_display_name = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCompanyDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->company_display_name = $var; - - return $this; - } - - /** - * Output only. Derived details about the job posting. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Talent\V4\Job\DerivedInfo|null - */ - public function getDerivedInfo() - { - return $this->derived_info; - } - - public function hasDerivedInfo() - { - return isset($this->derived_info); - } - - public function clearDerivedInfo() - { - unset($this->derived_info); - } - - /** - * Output only. Derived details about the job posting. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.DerivedInfo derived_info = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Talent\V4\Job\DerivedInfo $var - * @return $this - */ - public function setDerivedInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job\DerivedInfo::class); - $this->derived_info = $var; - - return $this; - } - - /** - * Options for job processing. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; - * @return \Google\Cloud\Talent\V4\Job\ProcessingOptions|null - */ - public function getProcessingOptions() - { - return $this->processing_options; - } - - public function hasProcessingOptions() - { - return isset($this->processing_options); - } - - public function clearProcessingOptions() - { - unset($this->processing_options); - } - - /** - * Options for job processing. - * - * Generated from protobuf field .google.cloud.talent.v4.Job.ProcessingOptions processing_options = 30; - * @param \Google\Cloud\Talent\V4\Job\ProcessingOptions $var - * @return $this - */ - public function setProcessingOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job\ProcessingOptions::class); - $this->processing_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php deleted file mode 100644 index 9f16a1f87afa..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ApplicationInfo.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.talent.v4.Job.ApplicationInfo - */ -class ApplicationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Use this field to specify email address(es) to which resumes or - * applications can be sent. - * The maximum number of allowed characters for each entry is 255. - * - * Generated from protobuf field repeated string emails = 1; - */ - private $emails; - /** - * Use this field to provide instructions, such as "Mail your application - * to ...", that a candidate can follow to apply for the job. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 3,000. - * - * Generated from protobuf field string instruction = 2; - */ - protected $instruction = ''; - /** - * Use this URI field to direct an applicant to a website, for example to - * link to an online application form. - * The maximum number of allowed characters for each entry is 2,000. - * - * Generated from protobuf field repeated string uris = 3; - */ - private $uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $emails - * Use this field to specify email address(es) to which resumes or - * applications can be sent. - * The maximum number of allowed characters for each entry is 255. - * @type string $instruction - * Use this field to provide instructions, such as "Mail your application - * to ...", that a candidate can follow to apply for the job. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 3,000. - * @type array|\Google\Protobuf\Internal\RepeatedField $uris - * Use this URI field to direct an applicant to a website, for example to - * link to an online application form. - * The maximum number of allowed characters for each entry is 2,000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); - parent::__construct($data); - } - - /** - * Use this field to specify email address(es) to which resumes or - * applications can be sent. - * The maximum number of allowed characters for each entry is 255. - * - * Generated from protobuf field repeated string emails = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEmails() - { - return $this->emails; - } - - /** - * Use this field to specify email address(es) to which resumes or - * applications can be sent. - * The maximum number of allowed characters for each entry is 255. - * - * Generated from protobuf field repeated string emails = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEmails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->emails = $arr; - - return $this; - } - - /** - * Use this field to provide instructions, such as "Mail your application - * to ...", that a candidate can follow to apply for the job. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 3,000. - * - * Generated from protobuf field string instruction = 2; - * @return string - */ - public function getInstruction() - { - return $this->instruction; - } - - /** - * Use this field to provide instructions, such as "Mail your application - * to ...", that a candidate can follow to apply for the job. - * This field accepts and sanitizes HTML input, and also accepts - * bold, italic, ordered list, and unordered list markup tags. - * The maximum number of allowed characters is 3,000. - * - * Generated from protobuf field string instruction = 2; - * @param string $var - * @return $this - */ - public function setInstruction($var) - { - GPBUtil::checkString($var, True); - $this->instruction = $var; - - return $this; - } - - /** - * Use this URI field to direct an applicant to a website, for example to - * link to an online application form. - * The maximum number of allowed characters for each entry is 2,000. - * - * Generated from protobuf field repeated string uris = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * Use this URI field to direct an applicant to a website, for example to - * link to an online application form. - * The maximum number of allowed characters for each entry is 2,000. - * - * Generated from protobuf field repeated string uris = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ApplicationInfo::class, \Google\Cloud\Talent\V4\Job_ApplicationInfo::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php deleted file mode 100644 index 275a6dd45c07..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/DerivedInfo.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.talent.v4.Job.DerivedInfo - */ -class DerivedInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Structured locations of the job, resolved from - * [Job.addresses][google.cloud.talent.v4.Job.addresses]. - * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly - * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the - * same order. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Location locations = 1; - */ - private $locations; - /** - * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] - * and [Job.description][google.cloud.talent.v4.Job.description]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 3; - */ - private $job_categories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $locations - * Structured locations of the job, resolved from - * [Job.addresses][google.cloud.talent.v4.Job.addresses]. - * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly - * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the - * same order. - * @type array|\Google\Protobuf\Internal\RepeatedField $job_categories - * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] - * and [Job.description][google.cloud.talent.v4.Job.description]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); - parent::__construct($data); - } - - /** - * Structured locations of the job, resolved from - * [Job.addresses][google.cloud.talent.v4.Job.addresses]. - * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly - * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the - * same order. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Location locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * Structured locations of the job, resolved from - * [Job.addresses][google.cloud.talent.v4.Job.addresses]. - * [locations][google.cloud.talent.v4.Job.DerivedInfo.locations] are exactly - * matched to [Job.addresses][google.cloud.talent.v4.Job.addresses] in the - * same order. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Location locations = 1; - * @param array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Location::class); - $this->locations = $arr; - - return $this; - } - - /** - * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] - * and [Job.description][google.cloud.talent.v4.Job.description]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobCategories() - { - return $this->job_categories; - } - - /** - * Job categories derived from [Job.title][google.cloud.talent.v4.Job.title] - * and [Job.description][google.cloud.talent.v4.Job.description]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\JobCategory::class); - $this->job_categories = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DerivedInfo::class, \Google\Cloud\Talent\V4\Job_DerivedInfo::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php deleted file mode 100644 index 405792e5798a..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Job/ProcessingOptions.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.talent.v4.Job.ProcessingOptions - */ -class ProcessingOptions extends \Google\Protobuf\Internal\Message -{ - /** - * If set to `true`, the service does not attempt to resolve a - * more precise address for the job. - * - * Generated from protobuf field bool disable_street_address_resolution = 1; - */ - protected $disable_street_address_resolution = false; - /** - * Option for job HTML content sanitization. Applied fields are: - * * description - * * applicationInfo.instruction - * * incentives - * * qualifications - * * responsibilities - * HTML tags in these fields may be stripped if sanitiazation isn't - * disabled. - * Defaults to - * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. - * - * Generated from protobuf field .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; - */ - protected $html_sanitization = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $disable_street_address_resolution - * If set to `true`, the service does not attempt to resolve a - * more precise address for the job. - * @type int $html_sanitization - * Option for job HTML content sanitization. Applied fields are: - * * description - * * applicationInfo.instruction - * * incentives - * * qualifications - * * responsibilities - * HTML tags in these fields may be stripped if sanitiazation isn't - * disabled. - * Defaults to - * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Job::initOnce(); - parent::__construct($data); - } - - /** - * If set to `true`, the service does not attempt to resolve a - * more precise address for the job. - * - * Generated from protobuf field bool disable_street_address_resolution = 1; - * @return bool - */ - public function getDisableStreetAddressResolution() - { - return $this->disable_street_address_resolution; - } - - /** - * If set to `true`, the service does not attempt to resolve a - * more precise address for the job. - * - * Generated from protobuf field bool disable_street_address_resolution = 1; - * @param bool $var - * @return $this - */ - public function setDisableStreetAddressResolution($var) - { - GPBUtil::checkBool($var); - $this->disable_street_address_resolution = $var; - - return $this; - } - - /** - * Option for job HTML content sanitization. Applied fields are: - * * description - * * applicationInfo.instruction - * * incentives - * * qualifications - * * responsibilities - * HTML tags in these fields may be stripped if sanitiazation isn't - * disabled. - * Defaults to - * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. - * - * Generated from protobuf field .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; - * @return int - */ - public function getHtmlSanitization() - { - return $this->html_sanitization; - } - - /** - * Option for job HTML content sanitization. Applied fields are: - * * description - * * applicationInfo.instruction - * * incentives - * * qualifications - * * responsibilities - * HTML tags in these fields may be stripped if sanitiazation isn't - * disabled. - * Defaults to - * [HtmlSanitization.SIMPLE_FORMATTING_ONLY][google.cloud.talent.v4.HtmlSanitization.SIMPLE_FORMATTING_ONLY]. - * - * Generated from protobuf field .google.cloud.talent.v4.HtmlSanitization html_sanitization = 2; - * @param int $var - * @return $this - */ - public function setHtmlSanitization($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\HtmlSanitization::class); - $this->html_sanitization = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProcessingOptions::class, \Google\Cloud\Talent\V4\Job_ProcessingOptions::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php deleted file mode 100644 index 0dd04d5e8050..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobBenefit.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.talent.v4.JobBenefit - */ -class JobBenefit -{ - /** - * Default value if the type isn't specified. - * - * Generated from protobuf enum JOB_BENEFIT_UNSPECIFIED = 0; - */ - const JOB_BENEFIT_UNSPECIFIED = 0; - /** - * The job includes access to programs that support child care, such - * as daycare. - * - * Generated from protobuf enum CHILD_CARE = 1; - */ - const CHILD_CARE = 1; - /** - * The job includes dental services covered by a dental - * insurance plan. - * - * Generated from protobuf enum DENTAL = 2; - */ - const DENTAL = 2; - /** - * The job offers specific benefits to domestic partners. - * - * Generated from protobuf enum DOMESTIC_PARTNER = 3; - */ - const DOMESTIC_PARTNER = 3; - /** - * The job allows for a flexible work schedule. - * - * Generated from protobuf enum FLEXIBLE_HOURS = 4; - */ - const FLEXIBLE_HOURS = 4; - /** - * The job includes health services covered by a medical insurance plan. - * - * Generated from protobuf enum MEDICAL = 5; - */ - const MEDICAL = 5; - /** - * The job includes a life insurance plan provided by the employer or - * available for purchase by the employee. - * - * Generated from protobuf enum LIFE_INSURANCE = 6; - */ - const LIFE_INSURANCE = 6; - /** - * The job allows for a leave of absence to a parent to care for a newborn - * child. - * - * Generated from protobuf enum PARENTAL_LEAVE = 7; - */ - const PARENTAL_LEAVE = 7; - /** - * The job includes a workplace retirement plan provided by the - * employer or available for purchase by the employee. - * - * Generated from protobuf enum RETIREMENT_PLAN = 8; - */ - const RETIREMENT_PLAN = 8; - /** - * The job allows for paid time off due to illness. - * - * Generated from protobuf enum SICK_DAYS = 9; - */ - const SICK_DAYS = 9; - /** - * The job includes paid time off for vacation. - * - * Generated from protobuf enum VACATION = 10; - */ - const VACATION = 10; - /** - * The job includes vision services covered by a vision - * insurance plan. - * - * Generated from protobuf enum VISION = 11; - */ - const VISION = 11; - - private static $valueToName = [ - self::JOB_BENEFIT_UNSPECIFIED => 'JOB_BENEFIT_UNSPECIFIED', - self::CHILD_CARE => 'CHILD_CARE', - self::DENTAL => 'DENTAL', - self::DOMESTIC_PARTNER => 'DOMESTIC_PARTNER', - self::FLEXIBLE_HOURS => 'FLEXIBLE_HOURS', - self::MEDICAL => 'MEDICAL', - self::LIFE_INSURANCE => 'LIFE_INSURANCE', - self::PARENTAL_LEAVE => 'PARENTAL_LEAVE', - self::RETIREMENT_PLAN => 'RETIREMENT_PLAN', - self::SICK_DAYS => 'SICK_DAYS', - self::VACATION => 'VACATION', - self::VISION => 'VISION', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php deleted file mode 100644 index bd330bfdd433..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobCategory.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.talent.v4.JobCategory - */ -class JobCategory -{ - /** - * The default value if the category isn't specified. - * - * Generated from protobuf enum JOB_CATEGORY_UNSPECIFIED = 0; - */ - const JOB_CATEGORY_UNSPECIFIED = 0; - /** - * An accounting and finance job, such as an Accountant. - * - * Generated from protobuf enum ACCOUNTING_AND_FINANCE = 1; - */ - const ACCOUNTING_AND_FINANCE = 1; - /** - * An administrative and office job, such as an Administrative Assistant. - * - * Generated from protobuf enum ADMINISTRATIVE_AND_OFFICE = 2; - */ - const ADMINISTRATIVE_AND_OFFICE = 2; - /** - * An advertising and marketing job, such as Marketing Manager. - * - * Generated from protobuf enum ADVERTISING_AND_MARKETING = 3; - */ - const ADVERTISING_AND_MARKETING = 3; - /** - * An animal care job, such as Veterinarian. - * - * Generated from protobuf enum ANIMAL_CARE = 4; - */ - const ANIMAL_CARE = 4; - /** - * An art, fashion, or design job, such as Designer. - * - * Generated from protobuf enum ART_FASHION_AND_DESIGN = 5; - */ - const ART_FASHION_AND_DESIGN = 5; - /** - * A business operations job, such as Business Operations Manager. - * - * Generated from protobuf enum BUSINESS_OPERATIONS = 6; - */ - const BUSINESS_OPERATIONS = 6; - /** - * A cleaning and facilities job, such as Custodial Staff. - * - * Generated from protobuf enum CLEANING_AND_FACILITIES = 7; - */ - const CLEANING_AND_FACILITIES = 7; - /** - * A computer and IT job, such as Systems Administrator. - * - * Generated from protobuf enum COMPUTER_AND_IT = 8; - */ - const COMPUTER_AND_IT = 8; - /** - * A construction job, such as General Laborer. - * - * Generated from protobuf enum CONSTRUCTION = 9; - */ - const CONSTRUCTION = 9; - /** - * A customer service job, such s Cashier. - * - * Generated from protobuf enum CUSTOMER_SERVICE = 10; - */ - const CUSTOMER_SERVICE = 10; - /** - * An education job, such as School Teacher. - * - * Generated from protobuf enum EDUCATION = 11; - */ - const EDUCATION = 11; - /** - * An entertainment and travel job, such as Flight Attendant. - * - * Generated from protobuf enum ENTERTAINMENT_AND_TRAVEL = 12; - */ - const ENTERTAINMENT_AND_TRAVEL = 12; - /** - * A farming or outdoor job, such as Park Ranger. - * - * Generated from protobuf enum FARMING_AND_OUTDOORS = 13; - */ - const FARMING_AND_OUTDOORS = 13; - /** - * A healthcare job, such as Registered Nurse. - * - * Generated from protobuf enum HEALTHCARE = 14; - */ - const HEALTHCARE = 14; - /** - * A human resources job, such as Human Resources Director. - * - * Generated from protobuf enum HUMAN_RESOURCES = 15; - */ - const HUMAN_RESOURCES = 15; - /** - * An installation, maintenance, or repair job, such as Electrician. - * - * Generated from protobuf enum INSTALLATION_MAINTENANCE_AND_REPAIR = 16; - */ - const INSTALLATION_MAINTENANCE_AND_REPAIR = 16; - /** - * A legal job, such as Law Clerk. - * - * Generated from protobuf enum LEGAL = 17; - */ - const LEGAL = 17; - /** - * A management job, often used in conjunction with another category, - * such as Store Manager. - * - * Generated from protobuf enum MANAGEMENT = 18; - */ - const MANAGEMENT = 18; - /** - * A manufacturing or warehouse job, such as Assembly Technician. - * - * Generated from protobuf enum MANUFACTURING_AND_WAREHOUSE = 19; - */ - const MANUFACTURING_AND_WAREHOUSE = 19; - /** - * A media, communications, or writing job, such as Media Relations. - * - * Generated from protobuf enum MEDIA_COMMUNICATIONS_AND_WRITING = 20; - */ - const MEDIA_COMMUNICATIONS_AND_WRITING = 20; - /** - * An oil, gas or mining job, such as Offshore Driller. - * - * Generated from protobuf enum OIL_GAS_AND_MINING = 21; - */ - const OIL_GAS_AND_MINING = 21; - /** - * A personal care and services job, such as Hair Stylist. - * - * Generated from protobuf enum PERSONAL_CARE_AND_SERVICES = 22; - */ - const PERSONAL_CARE_AND_SERVICES = 22; - /** - * A protective services job, such as Security Guard. - * - * Generated from protobuf enum PROTECTIVE_SERVICES = 23; - */ - const PROTECTIVE_SERVICES = 23; - /** - * A real estate job, such as Buyer's Agent. - * - * Generated from protobuf enum REAL_ESTATE = 24; - */ - const REAL_ESTATE = 24; - /** - * A restaurant and hospitality job, such as Restaurant Server. - * - * Generated from protobuf enum RESTAURANT_AND_HOSPITALITY = 25; - */ - const RESTAURANT_AND_HOSPITALITY = 25; - /** - * A sales and/or retail job, such Sales Associate. - * - * Generated from protobuf enum SALES_AND_RETAIL = 26; - */ - const SALES_AND_RETAIL = 26; - /** - * A science and engineering job, such as Lab Technician. - * - * Generated from protobuf enum SCIENCE_AND_ENGINEERING = 27; - */ - const SCIENCE_AND_ENGINEERING = 27; - /** - * A social services or non-profit job, such as Case Worker. - * - * Generated from protobuf enum SOCIAL_SERVICES_AND_NON_PROFIT = 28; - */ - const SOCIAL_SERVICES_AND_NON_PROFIT = 28; - /** - * A sports, fitness, or recreation job, such as Personal Trainer. - * - * Generated from protobuf enum SPORTS_FITNESS_AND_RECREATION = 29; - */ - const SPORTS_FITNESS_AND_RECREATION = 29; - /** - * A transportation or logistics job, such as Truck Driver. - * - * Generated from protobuf enum TRANSPORTATION_AND_LOGISTICS = 30; - */ - const TRANSPORTATION_AND_LOGISTICS = 30; - - private static $valueToName = [ - self::JOB_CATEGORY_UNSPECIFIED => 'JOB_CATEGORY_UNSPECIFIED', - self::ACCOUNTING_AND_FINANCE => 'ACCOUNTING_AND_FINANCE', - self::ADMINISTRATIVE_AND_OFFICE => 'ADMINISTRATIVE_AND_OFFICE', - self::ADVERTISING_AND_MARKETING => 'ADVERTISING_AND_MARKETING', - self::ANIMAL_CARE => 'ANIMAL_CARE', - self::ART_FASHION_AND_DESIGN => 'ART_FASHION_AND_DESIGN', - self::BUSINESS_OPERATIONS => 'BUSINESS_OPERATIONS', - self::CLEANING_AND_FACILITIES => 'CLEANING_AND_FACILITIES', - self::COMPUTER_AND_IT => 'COMPUTER_AND_IT', - self::CONSTRUCTION => 'CONSTRUCTION', - self::CUSTOMER_SERVICE => 'CUSTOMER_SERVICE', - self::EDUCATION => 'EDUCATION', - self::ENTERTAINMENT_AND_TRAVEL => 'ENTERTAINMENT_AND_TRAVEL', - self::FARMING_AND_OUTDOORS => 'FARMING_AND_OUTDOORS', - self::HEALTHCARE => 'HEALTHCARE', - self::HUMAN_RESOURCES => 'HUMAN_RESOURCES', - self::INSTALLATION_MAINTENANCE_AND_REPAIR => 'INSTALLATION_MAINTENANCE_AND_REPAIR', - self::LEGAL => 'LEGAL', - self::MANAGEMENT => 'MANAGEMENT', - self::MANUFACTURING_AND_WAREHOUSE => 'MANUFACTURING_AND_WAREHOUSE', - self::MEDIA_COMMUNICATIONS_AND_WRITING => 'MEDIA_COMMUNICATIONS_AND_WRITING', - self::OIL_GAS_AND_MINING => 'OIL_GAS_AND_MINING', - self::PERSONAL_CARE_AND_SERVICES => 'PERSONAL_CARE_AND_SERVICES', - self::PROTECTIVE_SERVICES => 'PROTECTIVE_SERVICES', - self::REAL_ESTATE => 'REAL_ESTATE', - self::RESTAURANT_AND_HOSPITALITY => 'RESTAURANT_AND_HOSPITALITY', - self::SALES_AND_RETAIL => 'SALES_AND_RETAIL', - self::SCIENCE_AND_ENGINEERING => 'SCIENCE_AND_ENGINEERING', - self::SOCIAL_SERVICES_AND_NON_PROFIT => 'SOCIAL_SERVICES_AND_NON_PROFIT', - self::SPORTS_FITNESS_AND_RECREATION => 'SPORTS_FITNESS_AND_RECREATION', - self::TRANSPORTATION_AND_LOGISTICS => 'TRANSPORTATION_AND_LOGISTICS', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php deleted file mode 100644 index cfd7b03e35ef..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.talent.v4.JobEvent - */ -class JobEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of the event (see - * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). - * - * Generated from protobuf field .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated - * with this event. For example, if this is an - * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] - * event, this field contains the identifiers of all jobs shown to the job - * seeker. If this was a - * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field - * contains the identifier of the viewed job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - * example, "projects/foo/tenants/bar/jobs/baz". - * - * Generated from protobuf field repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $jobs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. The type of the event (see - * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). - * @type array|\Google\Protobuf\Internal\RepeatedField $jobs - * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated - * with this event. For example, if this is an - * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] - * event, this field contains the identifiers of all jobs shown to the job - * seeker. If this was a - * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field - * contains the identifier of the viewed job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - * example, "projects/foo/tenants/bar/jobs/baz". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Event::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of the event (see - * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). - * - * Generated from protobuf field .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of the event (see - * [JobEventType][google.cloud.talent.v4.JobEvent.JobEventType]). - * - * Generated from protobuf field .google.cloud.talent.v4.JobEvent.JobEventType type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobEvent\JobEventType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated - * with this event. For example, if this is an - * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] - * event, this field contains the identifiers of all jobs shown to the job - * seeker. If this was a - * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field - * contains the identifier of the viewed job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - * example, "projects/foo/tenants/bar/jobs/baz". - * - * Generated from protobuf field repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * Required. The [job name(s)][google.cloud.talent.v4.Job.name] associated - * with this event. For example, if this is an - * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION] - * event, this field contains the identifiers of all jobs shown to the job - * seeker. If this was a - * [view][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] event, this field - * contains the identifier of the viewed job. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for - * example, "projects/foo/tenants/bar/jobs/baz". - * - * Generated from protobuf field repeated string jobs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->jobs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php deleted file mode 100644 index 9d559eaacdf2..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobEvent/JobEventType.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.talent.v4.JobEvent.JobEventType - */ -class JobEventType -{ - /** - * The event is unspecified by other provided values. - * - * Generated from protobuf enum JOB_EVENT_TYPE_UNSPECIFIED = 0; - */ - const JOB_EVENT_TYPE_UNSPECIFIED = 0; - /** - * The job seeker or other entity interacting with the service has - * had a job rendered in their view, such as in a list of search results in - * a compressed or clipped format. This event is typically associated with - * the viewing of a jobs list on a single page by a job seeker. - * - * Generated from protobuf enum IMPRESSION = 1; - */ - const IMPRESSION = 1; - /** - * The job seeker, or other entity interacting with the service, has - * viewed the details of a job, including the full description. This - * event doesn't apply to the viewing a snippet of a job appearing as a - * part of the job search results. Viewing a snippet is associated with an - * [impression][google.cloud.talent.v4.JobEvent.JobEventType.IMPRESSION]). - * - * Generated from protobuf enum VIEW = 2; - */ - const VIEW = 2; - /** - * The job seeker or other entity interacting with the service - * performed an action to view a job and was redirected to a different - * website for job. - * - * Generated from protobuf enum VIEW_REDIRECT = 3; - */ - const VIEW_REDIRECT = 3; - /** - * The job seeker or other entity interacting with the service - * began the process or demonstrated the intention of applying for a job. - * - * Generated from protobuf enum APPLICATION_START = 4; - */ - const APPLICATION_START = 4; - /** - * The job seeker or other entity interacting with the service - * submitted an application for a job. - * - * Generated from protobuf enum APPLICATION_FINISH = 5; - */ - const APPLICATION_FINISH = 5; - /** - * The job seeker or other entity interacting with the service - * submitted an application for a job with a single click without - * entering information. If a job seeker performs this action, send only - * this event to the service. Do not also send - * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START] - * or - * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH] - * events. - * - * Generated from protobuf enum APPLICATION_QUICK_SUBMISSION = 6; - */ - const APPLICATION_QUICK_SUBMISSION = 6; - /** - * The job seeker or other entity interacting with the service - * performed an action to apply to a job and was redirected to a different - * website to complete the application. - * - * Generated from protobuf enum APPLICATION_REDIRECT = 7; - */ - const APPLICATION_REDIRECT = 7; - /** - * The job seeker or other entity interacting with the service began the - * process or demonstrated the intention of applying for a job from the - * search results page without viewing the details of the job posting. - * If sending this event, JobEventType.VIEW event shouldn't be sent. - * - * Generated from protobuf enum APPLICATION_START_FROM_SEARCH = 8; - */ - const APPLICATION_START_FROM_SEARCH = 8; - /** - * The job seeker, or other entity interacting with the service, performs an - * action with a single click from the search results page to apply to a job - * (without viewing the details of the job posting), and is redirected - * to a different website to complete the application. If a candidate - * performs this action, send only this event to the service. Do not also - * send - * [JobEventType.APPLICATION_START][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_START], - * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4.JobEvent.JobEventType.APPLICATION_FINISH] - * or [JobEventType.VIEW][google.cloud.talent.v4.JobEvent.JobEventType.VIEW] - * events. - * - * Generated from protobuf enum APPLICATION_REDIRECT_FROM_SEARCH = 9; - */ - const APPLICATION_REDIRECT_FROM_SEARCH = 9; - /** - * This event should be used when a company submits an application - * on behalf of a job seeker. This event is intended for use by staffing - * agencies attempting to place candidates. - * - * Generated from protobuf enum APPLICATION_COMPANY_SUBMIT = 10; - */ - const APPLICATION_COMPANY_SUBMIT = 10; - /** - * The job seeker or other entity interacting with the service demonstrated - * an interest in a job by bookmarking or saving it. - * - * Generated from protobuf enum BOOKMARK = 11; - */ - const BOOKMARK = 11; - /** - * The job seeker or other entity interacting with the service was - * sent a notification, such as an email alert or device notification, - * containing one or more jobs listings generated by the service. - * - * Generated from protobuf enum NOTIFICATION = 12; - */ - const NOTIFICATION = 12; - /** - * The job seeker or other entity interacting with the service was - * employed by the hiring entity (employer). Send this event - * only if the job seeker was hired through an application that was - * initiated by a search conducted through the Cloud Talent Solution - * service. - * - * Generated from protobuf enum HIRED = 13; - */ - const HIRED = 13; - /** - * A recruiter or staffing agency submitted an application on behalf of the - * candidate after interacting with the service to identify a suitable job - * posting. - * - * Generated from protobuf enum SENT_CV = 14; - */ - const SENT_CV = 14; - /** - * The entity interacting with the service (for example, the job seeker), - * was granted an initial interview by the hiring entity (employer). This - * event should only be sent if the job seeker was granted an interview as - * part of an application that was initiated by a search conducted through / - * recommendation provided by the Cloud Talent Solution service. - * - * Generated from protobuf enum INTERVIEW_GRANTED = 15; - */ - const INTERVIEW_GRANTED = 15; - - private static $valueToName = [ - self::JOB_EVENT_TYPE_UNSPECIFIED => 'JOB_EVENT_TYPE_UNSPECIFIED', - self::IMPRESSION => 'IMPRESSION', - self::VIEW => 'VIEW', - self::VIEW_REDIRECT => 'VIEW_REDIRECT', - self::APPLICATION_START => 'APPLICATION_START', - self::APPLICATION_FINISH => 'APPLICATION_FINISH', - self::APPLICATION_QUICK_SUBMISSION => 'APPLICATION_QUICK_SUBMISSION', - self::APPLICATION_REDIRECT => 'APPLICATION_REDIRECT', - self::APPLICATION_START_FROM_SEARCH => 'APPLICATION_START_FROM_SEARCH', - self::APPLICATION_REDIRECT_FROM_SEARCH => 'APPLICATION_REDIRECT_FROM_SEARCH', - self::APPLICATION_COMPANY_SUBMIT => 'APPLICATION_COMPANY_SUBMIT', - self::BOOKMARK => 'BOOKMARK', - self::NOTIFICATION => 'NOTIFICATION', - self::HIRED => 'HIRED', - self::SENT_CV => 'SENT_CV', - self::INTERVIEW_GRANTED => 'INTERVIEW_GRANTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JobEventType::class, \Google\Cloud\Talent\V4\JobEvent_JobEventType::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php deleted file mode 100644 index 10222117baa9..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobLevel.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.talent.v4.JobLevel - */ -class JobLevel -{ - /** - * The default value if the level isn't specified. - * - * Generated from protobuf enum JOB_LEVEL_UNSPECIFIED = 0; - */ - const JOB_LEVEL_UNSPECIFIED = 0; - /** - * Entry-level individual contributors, typically with less than 2 years of - * experience in a similar role. Includes interns. - * - * Generated from protobuf enum ENTRY_LEVEL = 1; - */ - const ENTRY_LEVEL = 1; - /** - * Experienced individual contributors, typically with 2+ years of - * experience in a similar role. - * - * Generated from protobuf enum EXPERIENCED = 2; - */ - const EXPERIENCED = 2; - /** - * Entry- to mid-level managers responsible for managing a team of people. - * - * Generated from protobuf enum MANAGER = 3; - */ - const MANAGER = 3; - /** - * Senior-level managers responsible for managing teams of managers. - * - * Generated from protobuf enum DIRECTOR = 4; - */ - const DIRECTOR = 4; - /** - * Executive-level managers and above, including C-level positions. - * - * Generated from protobuf enum EXECUTIVE = 5; - */ - const EXECUTIVE = 5; - - private static $valueToName = [ - self::JOB_LEVEL_UNSPECIFIED => 'JOB_LEVEL_UNSPECIFIED', - self::ENTRY_LEVEL => 'ENTRY_LEVEL', - self::EXPERIENCED => 'EXPERIENCED', - self::MANAGER => 'MANAGER', - self::DIRECTOR => 'DIRECTOR', - self::EXECUTIVE => 'EXECUTIVE', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php deleted file mode 100644 index fec6e751a75f..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobQuery.php +++ /dev/null @@ -1,907 +0,0 @@ -google.cloud.talent.v4.JobQuery - */ -class JobQuery extends \Google\Protobuf\Internal\Message -{ - /** - * The query string that matches against the job title, description, and - * location fields. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For - * example, "en-US". This field helps to better interpret the query. - * If a value isn't specified, the query language code is automatically - * detected, which may not be accurate. - * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * - * Generated from protobuf field string query_language_code = 14; - */ - protected $query_language_code = ''; - /** - * This filter specifies the company entities to search against. - * If a value isn't specified, jobs are searched for against all - * companies. - * If multiple values are specified, jobs are searched against the - * companies specified. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * At most 20 company filters are allowed. - * - * Generated from protobuf field repeated string companies = 2; - */ - private $companies; - /** - * The location filter specifies geo-regions containing the jobs to - * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] - * for more information. - * If a location value isn't specified, jobs fitting the other search - * criteria are retrieved regardless of where they're located. - * If multiple values are specified, jobs are retrieved from any of the - * specified locations. If different values are specified for the - * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] - * parameter, the maximum provided distance is used for all locations. - * At most 5 location filters are allowed. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; - */ - private $location_filters; - /** - * The category filter specifies the categories of jobs to search against. - * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. - * If a value isn't specified, jobs from any category are searched against. - * If multiple values are specified, jobs from any of the specified - * categories are searched against. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 4; - */ - private $job_categories; - /** - * Allows filtering jobs by commute time with different travel methods (for - * example, driving or public transit). - * Note: This only works when you specify a - * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, - * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is - * ignored. - * Currently we don't support sorting by commute time. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter commute_filter = 5; - */ - protected $commute_filter = null; - /** - * This filter specifies the company - * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the - * jobs to search against. The company name must match the value exactly. - * Alternatively, the value being searched for can be wrapped in different - * match operators. - * `SUBSTRING_MATCH([value])` - * The company name must contain a case insensitive substring match of the - * value. Using this function may increase latency. - * Sample Value: `SUBSTRING_MATCH(google)` - * `MULTI_WORD_TOKEN_MATCH([value])` - * The value will be treated as a multi word token and the company name must - * contain a case insensitive match of the value. Using this function may - * increase latency. - * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` - * If a value isn't specified, jobs within the search results are - * associated with any company. - * If multiple values are specified, jobs within the search results may be - * associated with any of the specified companies. - * At most 20 company display name filters are allowed. - * - * Generated from protobuf field repeated string company_display_names = 6; - */ - private $company_display_names; - /** - * This search filter is applied only to - * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For - * example, if the filter is specified as "Hourly job with per-hour - * compensation > $15", only jobs meeting these criteria are searched. If a - * filter isn't defined, all open jobs are searched. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; - */ - protected $compensation_filter = null; - /** - * This filter specifies a structured syntax to match against the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * marked as `filterable`. - * The syntax for this expression is a subset of SQL syntax. - * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the - * left of the operator is a custom field key and the right of the operator - * is a number or a quoted string. You must escape backslash (\\) and - * quote (\") characters. - * Supported functions are `LOWER([field_name])` to - * perform a case insensitive match and `EMPTY([field_name])` to filter on the - * existence of a key. - * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of - * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 - * comparisons or functions are allowed in the expression. The expression - * must be < 10000 bytes in length. - * Sample Query: - * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND - * driving_years > 10` - * - * Generated from protobuf field string custom_attribute_filter = 8; - */ - protected $custom_attribute_filter = ''; - /** - * This flag controls the spell-check feature. If false, the - * service attempts to correct a misspelled query, - * for example, "enginee" is corrected to "engineer". - * Defaults to false: a spell check is performed. - * - * Generated from protobuf field bool disable_spell_check = 9; - */ - protected $disable_spell_check = false; - /** - * The employment type filter specifies the employment type of jobs to - * search against, such as - * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. - * If a value isn't specified, jobs in the search results includes any - * employment type. - * If multiple values are specified, jobs in the search results include - * any of the specified employment types. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; - */ - private $employment_types; - /** - * This filter specifies the locale of jobs to search against, - * for example, "en-US". - * If a value isn't specified, the search results can contain jobs in any - * locale. - * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * At most 10 language code filters are allowed. - * - * Generated from protobuf field repeated string language_codes = 11; - */ - private $language_codes; - /** - * Jobs published within a range specified by this filter are searched - * against. - * - * Generated from protobuf field .google.cloud.talent.v4.TimestampRange publish_time_range = 12; - */ - protected $publish_time_range = null; - /** - * This filter specifies a list of job names to be excluded during search. - * At most 400 excluded job names are allowed. - * - * Generated from protobuf field repeated string excluded_jobs = 13; - */ - private $excluded_jobs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * The query string that matches against the job title, description, and - * location fields. - * The maximum number of allowed characters is 255. - * @type string $query_language_code - * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For - * example, "en-US". This field helps to better interpret the query. - * If a value isn't specified, the query language code is automatically - * detected, which may not be accurate. - * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * @type array|\Google\Protobuf\Internal\RepeatedField $companies - * This filter specifies the company entities to search against. - * If a value isn't specified, jobs are searched for against all - * companies. - * If multiple values are specified, jobs are searched against the - * companies specified. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * At most 20 company filters are allowed. - * @type array<\Google\Cloud\Talent\V4\LocationFilter>|\Google\Protobuf\Internal\RepeatedField $location_filters - * The location filter specifies geo-regions containing the jobs to - * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] - * for more information. - * If a location value isn't specified, jobs fitting the other search - * criteria are retrieved regardless of where they're located. - * If multiple values are specified, jobs are retrieved from any of the - * specified locations. If different values are specified for the - * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] - * parameter, the maximum provided distance is used for all locations. - * At most 5 location filters are allowed. - * @type array|\Google\Protobuf\Internal\RepeatedField $job_categories - * The category filter specifies the categories of jobs to search against. - * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. - * If a value isn't specified, jobs from any category are searched against. - * If multiple values are specified, jobs from any of the specified - * categories are searched against. - * @type \Google\Cloud\Talent\V4\CommuteFilter $commute_filter - * Allows filtering jobs by commute time with different travel methods (for - * example, driving or public transit). - * Note: This only works when you specify a - * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, - * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is - * ignored. - * Currently we don't support sorting by commute time. - * @type array|\Google\Protobuf\Internal\RepeatedField $company_display_names - * This filter specifies the company - * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the - * jobs to search against. The company name must match the value exactly. - * Alternatively, the value being searched for can be wrapped in different - * match operators. - * `SUBSTRING_MATCH([value])` - * The company name must contain a case insensitive substring match of the - * value. Using this function may increase latency. - * Sample Value: `SUBSTRING_MATCH(google)` - * `MULTI_WORD_TOKEN_MATCH([value])` - * The value will be treated as a multi word token and the company name must - * contain a case insensitive match of the value. Using this function may - * increase latency. - * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` - * If a value isn't specified, jobs within the search results are - * associated with any company. - * If multiple values are specified, jobs within the search results may be - * associated with any of the specified companies. - * At most 20 company display name filters are allowed. - * @type \Google\Cloud\Talent\V4\CompensationFilter $compensation_filter - * This search filter is applied only to - * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For - * example, if the filter is specified as "Hourly job with per-hour - * compensation > $15", only jobs meeting these criteria are searched. If a - * filter isn't defined, all open jobs are searched. - * @type string $custom_attribute_filter - * This filter specifies a structured syntax to match against the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * marked as `filterable`. - * The syntax for this expression is a subset of SQL syntax. - * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the - * left of the operator is a custom field key and the right of the operator - * is a number or a quoted string. You must escape backslash (\\) and - * quote (\") characters. - * Supported functions are `LOWER([field_name])` to - * perform a case insensitive match and `EMPTY([field_name])` to filter on the - * existence of a key. - * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of - * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 - * comparisons or functions are allowed in the expression. The expression - * must be < 10000 bytes in length. - * Sample Query: - * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND - * driving_years > 10` - * @type bool $disable_spell_check - * This flag controls the spell-check feature. If false, the - * service attempts to correct a misspelled query, - * for example, "enginee" is corrected to "engineer". - * Defaults to false: a spell check is performed. - * @type array|\Google\Protobuf\Internal\RepeatedField $employment_types - * The employment type filter specifies the employment type of jobs to - * search against, such as - * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. - * If a value isn't specified, jobs in the search results includes any - * employment type. - * If multiple values are specified, jobs in the search results include - * any of the specified employment types. - * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes - * This filter specifies the locale of jobs to search against, - * for example, "en-US". - * If a value isn't specified, the search results can contain jobs in any - * locale. - * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * At most 10 language code filters are allowed. - * @type \Google\Cloud\Talent\V4\TimestampRange $publish_time_range - * Jobs published within a range specified by this filter are searched - * against. - * @type array|\Google\Protobuf\Internal\RepeatedField $excluded_jobs - * This filter specifies a list of job names to be excluded during search. - * At most 400 excluded job names are allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); - parent::__construct($data); - } - - /** - * The query string that matches against the job title, description, and - * location fields. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * The query string that matches against the job title, description, and - * location fields. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For - * example, "en-US". This field helps to better interpret the query. - * If a value isn't specified, the query language code is automatically - * detected, which may not be accurate. - * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * - * Generated from protobuf field string query_language_code = 14; - * @return string - */ - public function getQueryLanguageCode() - { - return $this->query_language_code; - } - - /** - * The language code of [query][google.cloud.talent.v4.JobQuery.query]. For - * example, "en-US". This field helps to better interpret the query. - * If a value isn't specified, the query language code is automatically - * detected, which may not be accurate. - * Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * - * Generated from protobuf field string query_language_code = 14; - * @param string $var - * @return $this - */ - public function setQueryLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->query_language_code = $var; - - return $this; - } - - /** - * This filter specifies the company entities to search against. - * If a value isn't specified, jobs are searched for against all - * companies. - * If multiple values are specified, jobs are searched against the - * companies specified. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * At most 20 company filters are allowed. - * - * Generated from protobuf field repeated string companies = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompanies() - { - return $this->companies; - } - - /** - * This filter specifies the company entities to search against. - * If a value isn't specified, jobs are searched for against all - * companies. - * If multiple values are specified, jobs are searched against the - * companies specified. - * The format is - * "projects/{project_id}/tenants/{tenant_id}/companies/{company_id}". For - * example, "projects/foo/tenants/bar/companies/baz". - * At most 20 company filters are allowed. - * - * Generated from protobuf field repeated string companies = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompanies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->companies = $arr; - - return $this; - } - - /** - * The location filter specifies geo-regions containing the jobs to - * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] - * for more information. - * If a location value isn't specified, jobs fitting the other search - * criteria are retrieved regardless of where they're located. - * If multiple values are specified, jobs are retrieved from any of the - * specified locations. If different values are specified for the - * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] - * parameter, the maximum provided distance is used for all locations. - * At most 5 location filters are allowed. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocationFilters() - { - return $this->location_filters; - } - - /** - * The location filter specifies geo-regions containing the jobs to - * search against. See [LocationFilter][google.cloud.talent.v4.LocationFilter] - * for more information. - * If a location value isn't specified, jobs fitting the other search - * criteria are retrieved regardless of where they're located. - * If multiple values are specified, jobs are retrieved from any of the - * specified locations. If different values are specified for the - * [LocationFilter.distance_in_miles][google.cloud.talent.v4.LocationFilter.distance_in_miles] - * parameter, the maximum provided distance is used for all locations. - * At most 5 location filters are allowed. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.LocationFilter location_filters = 3; - * @param array<\Google\Cloud\Talent\V4\LocationFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocationFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\LocationFilter::class); - $this->location_filters = $arr; - - return $this; - } - - /** - * The category filter specifies the categories of jobs to search against. - * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. - * If a value isn't specified, jobs from any category are searched against. - * If multiple values are specified, jobs from any of the specified - * categories are searched against. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobCategories() - { - return $this->job_categories; - } - - /** - * The category filter specifies the categories of jobs to search against. - * See [JobCategory][google.cloud.talent.v4.JobCategory] for more information. - * If a value isn't specified, jobs from any category are searched against. - * If multiple values are specified, jobs from any of the specified - * categories are searched against. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.JobCategory job_categories = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\JobCategory::class); - $this->job_categories = $arr; - - return $this; - } - - /** - * Allows filtering jobs by commute time with different travel methods (for - * example, driving or public transit). - * Note: This only works when you specify a - * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, - * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is - * ignored. - * Currently we don't support sorting by commute time. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter commute_filter = 5; - * @return \Google\Cloud\Talent\V4\CommuteFilter|null - */ - public function getCommuteFilter() - { - return $this->commute_filter; - } - - public function hasCommuteFilter() - { - return isset($this->commute_filter); - } - - public function clearCommuteFilter() - { - unset($this->commute_filter); - } - - /** - * Allows filtering jobs by commute time with different travel methods (for - * example, driving or public transit). - * Note: This only works when you specify a - * [CommuteMethod][google.cloud.talent.v4.CommuteMethod]. In this case, - * [location_filters][google.cloud.talent.v4.JobQuery.location_filters] is - * ignored. - * Currently we don't support sorting by commute time. - * - * Generated from protobuf field .google.cloud.talent.v4.CommuteFilter commute_filter = 5; - * @param \Google\Cloud\Talent\V4\CommuteFilter $var - * @return $this - */ - public function setCommuteFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CommuteFilter::class); - $this->commute_filter = $var; - - return $this; - } - - /** - * This filter specifies the company - * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the - * jobs to search against. The company name must match the value exactly. - * Alternatively, the value being searched for can be wrapped in different - * match operators. - * `SUBSTRING_MATCH([value])` - * The company name must contain a case insensitive substring match of the - * value. Using this function may increase latency. - * Sample Value: `SUBSTRING_MATCH(google)` - * `MULTI_WORD_TOKEN_MATCH([value])` - * The value will be treated as a multi word token and the company name must - * contain a case insensitive match of the value. Using this function may - * increase latency. - * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` - * If a value isn't specified, jobs within the search results are - * associated with any company. - * If multiple values are specified, jobs within the search results may be - * associated with any of the specified companies. - * At most 20 company display name filters are allowed. - * - * Generated from protobuf field repeated string company_display_names = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompanyDisplayNames() - { - return $this->company_display_names; - } - - /** - * This filter specifies the company - * [Company.display_name][google.cloud.talent.v4.Company.display_name] of the - * jobs to search against. The company name must match the value exactly. - * Alternatively, the value being searched for can be wrapped in different - * match operators. - * `SUBSTRING_MATCH([value])` - * The company name must contain a case insensitive substring match of the - * value. Using this function may increase latency. - * Sample Value: `SUBSTRING_MATCH(google)` - * `MULTI_WORD_TOKEN_MATCH([value])` - * The value will be treated as a multi word token and the company name must - * contain a case insensitive match of the value. Using this function may - * increase latency. - * Sample Value: `MULTI_WORD_TOKEN_MATCH(google)` - * If a value isn't specified, jobs within the search results are - * associated with any company. - * If multiple values are specified, jobs within the search results may be - * associated with any of the specified companies. - * At most 20 company display name filters are allowed. - * - * Generated from protobuf field repeated string company_display_names = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompanyDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->company_display_names = $arr; - - return $this; - } - - /** - * This search filter is applied only to - * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For - * example, if the filter is specified as "Hourly job with per-hour - * compensation > $15", only jobs meeting these criteria are searched. If a - * filter isn't defined, all open jobs are searched. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; - * @return \Google\Cloud\Talent\V4\CompensationFilter|null - */ - public function getCompensationFilter() - { - return $this->compensation_filter; - } - - public function hasCompensationFilter() - { - return isset($this->compensation_filter); - } - - public function clearCompensationFilter() - { - unset($this->compensation_filter); - } - - /** - * This search filter is applied only to - * [Job.compensation_info][google.cloud.talent.v4.Job.compensation_info]. For - * example, if the filter is specified as "Hourly job with per-hour - * compensation > $15", only jobs meeting these criteria are searched. If a - * filter isn't defined, all open jobs are searched. - * - * Generated from protobuf field .google.cloud.talent.v4.CompensationFilter compensation_filter = 7; - * @param \Google\Cloud\Talent\V4\CompensationFilter $var - * @return $this - */ - public function setCompensationFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\CompensationFilter::class); - $this->compensation_filter = $var; - - return $this; - } - - /** - * This filter specifies a structured syntax to match against the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * marked as `filterable`. - * The syntax for this expression is a subset of SQL syntax. - * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the - * left of the operator is a custom field key and the right of the operator - * is a number or a quoted string. You must escape backslash (\\) and - * quote (\") characters. - * Supported functions are `LOWER([field_name])` to - * perform a case insensitive match and `EMPTY([field_name])` to filter on the - * existence of a key. - * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of - * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 - * comparisons or functions are allowed in the expression. The expression - * must be < 10000 bytes in length. - * Sample Query: - * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND - * driving_years > 10` - * - * Generated from protobuf field string custom_attribute_filter = 8; - * @return string - */ - public function getCustomAttributeFilter() - { - return $this->custom_attribute_filter; - } - - /** - * This filter specifies a structured syntax to match against the - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * marked as `filterable`. - * The syntax for this expression is a subset of SQL syntax. - * Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the - * left of the operator is a custom field key and the right of the operator - * is a number or a quoted string. You must escape backslash (\\) and - * quote (\") characters. - * Supported functions are `LOWER([field_name])` to - * perform a case insensitive match and `EMPTY([field_name])` to filter on the - * existence of a key. - * Boolean expressions (AND/OR/NOT) are supported up to 3 levels of - * nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 - * comparisons or functions are allowed in the expression. The expression - * must be < 10000 bytes in length. - * Sample Query: - * `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND - * driving_years > 10` - * - * Generated from protobuf field string custom_attribute_filter = 8; - * @param string $var - * @return $this - */ - public function setCustomAttributeFilter($var) - { - GPBUtil::checkString($var, True); - $this->custom_attribute_filter = $var; - - return $this; - } - - /** - * This flag controls the spell-check feature. If false, the - * service attempts to correct a misspelled query, - * for example, "enginee" is corrected to "engineer". - * Defaults to false: a spell check is performed. - * - * Generated from protobuf field bool disable_spell_check = 9; - * @return bool - */ - public function getDisableSpellCheck() - { - return $this->disable_spell_check; - } - - /** - * This flag controls the spell-check feature. If false, the - * service attempts to correct a misspelled query, - * for example, "enginee" is corrected to "engineer". - * Defaults to false: a spell check is performed. - * - * Generated from protobuf field bool disable_spell_check = 9; - * @param bool $var - * @return $this - */ - public function setDisableSpellCheck($var) - { - GPBUtil::checkBool($var); - $this->disable_spell_check = $var; - - return $this; - } - - /** - * The employment type filter specifies the employment type of jobs to - * search against, such as - * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. - * If a value isn't specified, jobs in the search results includes any - * employment type. - * If multiple values are specified, jobs in the search results include - * any of the specified employment types. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEmploymentTypes() - { - return $this->employment_types; - } - - /** - * The employment type filter specifies the employment type of jobs to - * search against, such as - * [EmploymentType.FULL_TIME][google.cloud.talent.v4.EmploymentType.FULL_TIME]. - * If a value isn't specified, jobs in the search results includes any - * employment type. - * If multiple values are specified, jobs in the search results include - * any of the specified employment types. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.EmploymentType employment_types = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEmploymentTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Talent\V4\EmploymentType::class); - $this->employment_types = $arr; - - return $this; - } - - /** - * This filter specifies the locale of jobs to search against, - * for example, "en-US". - * If a value isn't specified, the search results can contain jobs in any - * locale. - * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * At most 10 language code filters are allowed. - * - * Generated from protobuf field repeated string language_codes = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageCodes() - { - return $this->language_codes; - } - - /** - * This filter specifies the locale of jobs to search against, - * for example, "en-US". - * If a value isn't specified, the search results can contain jobs in any - * locale. - * Language codes should be in BCP-47 format, such as "en-US" or "sr-Latn". - * For more information, see - * [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - * At most 10 language code filters are allowed. - * - * Generated from protobuf field repeated string language_codes = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_codes = $arr; - - return $this; - } - - /** - * Jobs published within a range specified by this filter are searched - * against. - * - * Generated from protobuf field .google.cloud.talent.v4.TimestampRange publish_time_range = 12; - * @return \Google\Cloud\Talent\V4\TimestampRange|null - */ - public function getPublishTimeRange() - { - return $this->publish_time_range; - } - - public function hasPublishTimeRange() - { - return isset($this->publish_time_range); - } - - public function clearPublishTimeRange() - { - unset($this->publish_time_range); - } - - /** - * Jobs published within a range specified by this filter are searched - * against. - * - * Generated from protobuf field .google.cloud.talent.v4.TimestampRange publish_time_range = 12; - * @param \Google\Cloud\Talent\V4\TimestampRange $var - * @return $this - */ - public function setPublishTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\TimestampRange::class); - $this->publish_time_range = $var; - - return $this; - } - - /** - * This filter specifies a list of job names to be excluded during search. - * At most 400 excluded job names are allowed. - * - * Generated from protobuf field repeated string excluded_jobs = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludedJobs() - { - return $this->excluded_jobs; - } - - /** - * This filter specifies a list of job names to be excluded during search. - * At most 400 excluded job names are allowed. - * - * Generated from protobuf field repeated string excluded_jobs = 13; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludedJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->excluded_jobs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php deleted file mode 100644 index eedd9f2185c4..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobResult.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.talent.v4.JobResult - */ -class JobResult extends \Google\Protobuf\Internal\Message -{ - /** - * Here [Job][google.cloud.talent.v4.Job] only contains basic information - * including [name][google.cloud.talent.v4.Job.name], - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob - * method to retrieve detailed information of the created/updated job. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; - */ - protected $job = null; - /** - * The status of the job processed. This field is populated if the - * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. - * - * Generated from protobuf field .google.rpc.Status status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Job $job - * Here [Job][google.cloud.talent.v4.Job] only contains basic information - * including [name][google.cloud.talent.v4.Job.name], - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob - * method to retrieve detailed information of the created/updated job. - * @type \Google\Rpc\Status $status - * The status of the job processed. This field is populated if the - * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Here [Job][google.cloud.talent.v4.Job] only contains basic information - * including [name][google.cloud.talent.v4.Job.name], - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob - * method to retrieve detailed information of the created/updated job. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; - * @return \Google\Cloud\Talent\V4\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Here [Job][google.cloud.talent.v4.Job] only contains basic information - * including [name][google.cloud.talent.v4.Job.name], - * [company][google.cloud.talent.v4.Job.company], - * [language_code][google.cloud.talent.v4.Job.language_code] and - * [requisition_id][google.cloud.talent.v4.Job.requisition_id], use getJob - * method to retrieve detailed information of the created/updated job. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; - * @param \Google\Cloud\Talent\V4\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); - $this->job = $var; - - return $this; - } - - /** - * The status of the job processed. This field is populated if the - * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status of the job processed. This field is populated if the - * processing of the [job][google.cloud.talent.v4.JobResult.job] fails. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php deleted file mode 100644 index c58c917b5b79..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/JobView.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.talent.v4.JobView - */ -class JobView -{ - /** - * Default value. - * - * Generated from protobuf enum JOB_VIEW_UNSPECIFIED = 0; - */ - const JOB_VIEW_UNSPECIFIED = 0; - /** - * A ID only view of job, with following attributes: - * [Job.name][google.cloud.talent.v4.Job.name], - * [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], - * [Job.language_code][google.cloud.talent.v4.Job.language_code]. - * - * Generated from protobuf enum JOB_VIEW_ID_ONLY = 1; - */ - const JOB_VIEW_ID_ONLY = 1; - /** - * A minimal view of the job, with the following attributes: - * [Job.name][google.cloud.talent.v4.Job.name], - * [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.company][google.cloud.talent.v4.Job.company], - * [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], - * [Job.language_code][google.cloud.talent.v4.Job.language_code]. - * - * Generated from protobuf enum JOB_VIEW_MINIMAL = 2; - */ - const JOB_VIEW_MINIMAL = 2; - /** - * A small view of the job, with the following attributes in the search - * results: [Job.name][google.cloud.talent.v4.Job.name], - * [Job.requisition_id][google.cloud.talent.v4.Job.requisition_id], - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.company][google.cloud.talent.v4.Job.company], - * [Job.DerivedInfo.locations][google.cloud.talent.v4.Job.DerivedInfo.locations], - * [Job.visibility][google.cloud.talent.v4.Job.visibility], - * [Job.language_code][google.cloud.talent.v4.Job.language_code], - * [Job.description][google.cloud.talent.v4.Job.description]. - * - * Generated from protobuf enum JOB_VIEW_SMALL = 3; - */ - const JOB_VIEW_SMALL = 3; - /** - * All available attributes are included in the search results. - * - * Generated from protobuf enum JOB_VIEW_FULL = 4; - */ - const JOB_VIEW_FULL = 4; - - private static $valueToName = [ - self::JOB_VIEW_UNSPECIFIED => 'JOB_VIEW_UNSPECIFIED', - self::JOB_VIEW_ID_ONLY => 'JOB_VIEW_ID_ONLY', - self::JOB_VIEW_MINIMAL => 'JOB_VIEW_MINIMAL', - self::JOB_VIEW_SMALL => 'JOB_VIEW_SMALL', - self::JOB_VIEW_FULL => 'JOB_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php deleted file mode 100644 index d7f6a0090dbc..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesRequest.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.talent.v4.ListCompaniesRequest - */ -class ListCompaniesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The starting indicator from which to return results. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of companies to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * Set to true if the companies requested must have open jobs. - * Defaults to false. - * If true, at most - * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of - * companies are fetched, among which only those with open jobs are returned. - * - * Generated from protobuf field bool require_open_jobs = 4; - */ - protected $require_open_jobs = false; - - /** - * @param string $parent Required. Resource name of the tenant under which the company is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". Please see - * {@see CompanyServiceClient::tenantName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\ListCompaniesRequest - * - * @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. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @type string $page_token - * The starting indicator from which to return results. - * @type int $page_size - * The maximum number of companies to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * @type bool $require_open_jobs - * Set to true if the companies requested must have open jobs. - * Defaults to false. - * If true, at most - * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of - * companies are fetched, among which only those with open jobs are returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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. Resource name of the tenant under which the company is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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 starting indicator from which to return results. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The starting indicator from which to return results. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of companies to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of companies to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * - * 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; - } - - /** - * Set to true if the companies requested must have open jobs. - * Defaults to false. - * If true, at most - * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of - * companies are fetched, among which only those with open jobs are returned. - * - * Generated from protobuf field bool require_open_jobs = 4; - * @return bool - */ - public function getRequireOpenJobs() - { - return $this->require_open_jobs; - } - - /** - * Set to true if the companies requested must have open jobs. - * Defaults to false. - * If true, at most - * [page_size][google.cloud.talent.v4.ListCompaniesRequest.page_size] of - * companies are fetched, among which only those with open jobs are returned. - * - * Generated from protobuf field bool require_open_jobs = 4; - * @param bool $var - * @return $this - */ - public function setRequireOpenJobs($var) - { - GPBUtil::checkBool($var); - $this->require_open_jobs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php deleted file mode 100644 index 80503928143c..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListCompaniesResponse.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.talent.v4.ListCompaniesResponse - */ -class ListCompaniesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Companies for the current client. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Company companies = 1; - */ - private $companies; - /** - * A token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\Company>|\Google\Protobuf\Internal\RepeatedField $companies - * Companies for the current client. - * @type string $next_page_token - * A token to retrieve the next page of results. - * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata - * Additional information for the API invocation, such as the request - * tracking id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); - parent::__construct($data); - } - - /** - * Companies for the current client. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Company companies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompanies() - { - return $this->companies; - } - - /** - * Companies for the current client. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Company companies = 1; - * @param array<\Google\Cloud\Talent\V4\Company>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompanies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Company::class); - $this->companies = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. - * - * 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 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; - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - * @return \Google\Cloud\Talent\V4\ResponseMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - * @param \Google\Cloud\Talent\V4\ResponseMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php deleted file mode 100644 index fe9d67a7cf48..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsRequest.php +++ /dev/null @@ -1,348 +0,0 @@ -google.cloud.talent.v4.ListJobsRequest - */ -class ListJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The filter string specifies the jobs to be enumerated. - * Supported operator: =, AND - * The fields eligible for filtering are: - * * `companyName` - * * `requisitionId` - * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - * OPEN if no value is specified. - * At least one of `companyName` and `requisitionId` must present or an - * INVALID_ARGUMENT error is thrown. - * Sample Query: - * * companyName = "projects/foo/tenants/bar/companies/baz" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * requisitionId = "req-1" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * status = "EXPIRED" - * * requisitionId = "req-1" - * * requisitionId = "req-1" AND status = "EXPIRED" - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * The starting point of a query result. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The maximum number of jobs to be returned per page of results. - * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to - * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], - * the maximum allowed page size is 1000. Otherwise, the maximum allowed page - * size is 100. - * Default is 100 if empty or a number < 1 is specified. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * The desired job attributes returned for jobs in the - * search response. Defaults to - * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no - * value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 5; - */ - protected $job_view = 0; - - /** - * @param string $parent Required. The resource name of the tenant under which the job is created. - * - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". Please see - * {@see JobServiceClient::tenantName()} for help formatting this field. - * @param string $filter Required. The filter string specifies the jobs to be enumerated. - * - * Supported operator: =, AND - * - * The fields eligible for filtering are: - * - * * `companyName` - * * `requisitionId` - * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - * OPEN if no value is specified. - * - * At least one of `companyName` and `requisitionId` must present or an - * INVALID_ARGUMENT error is thrown. - * - * Sample Query: - * - * * companyName = "projects/foo/tenants/bar/companies/baz" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * requisitionId = "req-1" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * status = "EXPIRED" - * * requisitionId = "req-1" - * * requisitionId = "req-1" AND status = "EXPIRED" - * - * @return \Google\Cloud\Talent\V4\ListJobsRequest - * - * @experimental - */ - public static function build(string $parent, string $filter): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * @type string $filter - * Required. The filter string specifies the jobs to be enumerated. - * Supported operator: =, AND - * The fields eligible for filtering are: - * * `companyName` - * * `requisitionId` - * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - * OPEN if no value is specified. - * At least one of `companyName` and `requisitionId` must present or an - * INVALID_ARGUMENT error is thrown. - * Sample Query: - * * companyName = "projects/foo/tenants/bar/companies/baz" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * requisitionId = "req-1" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * status = "EXPIRED" - * * requisitionId = "req-1" - * * requisitionId = "req-1" AND status = "EXPIRED" - * @type string $page_token - * The starting point of a query result. - * @type int $page_size - * The maximum number of jobs to be returned per page of results. - * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to - * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], - * the maximum allowed page size is 1000. Otherwise, the maximum allowed page - * size is 100. - * Default is 100 if empty or a number < 1 is specified. - * @type int $job_view - * The desired job attributes returned for jobs in the - * search response. Defaults to - * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no - * value is specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 tenant under which the job is created. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 filter string specifies the jobs to be enumerated. - * Supported operator: =, AND - * The fields eligible for filtering are: - * * `companyName` - * * `requisitionId` - * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - * OPEN if no value is specified. - * At least one of `companyName` and `requisitionId` must present or an - * INVALID_ARGUMENT error is thrown. - * Sample Query: - * * companyName = "projects/foo/tenants/bar/companies/baz" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * requisitionId = "req-1" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * status = "EXPIRED" - * * requisitionId = "req-1" - * * requisitionId = "req-1" AND status = "EXPIRED" - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. The filter string specifies the jobs to be enumerated. - * Supported operator: =, AND - * The fields eligible for filtering are: - * * `companyName` - * * `requisitionId` - * * `status` Available values: OPEN, EXPIRED, ALL. Defaults to - * OPEN if no value is specified. - * At least one of `companyName` and `requisitionId` must present or an - * INVALID_ARGUMENT error is thrown. - * Sample Query: - * * companyName = "projects/foo/tenants/bar/companies/baz" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * requisitionId = "req-1" - * * companyName = "projects/foo/tenants/bar/companies/baz" AND - * status = "EXPIRED" - * * requisitionId = "req-1" - * * requisitionId = "req-1" AND status = "EXPIRED" - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The starting point of a query result. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The starting point of a query result. - * - * 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 maximum number of jobs to be returned per page of results. - * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to - * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], - * the maximum allowed page size is 1000. Otherwise, the maximum allowed page - * size is 100. - * Default is 100 if empty or a number < 1 is specified. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of jobs to be returned per page of results. - * If [job_view][google.cloud.talent.v4.ListJobsRequest.job_view] is set to - * [JobView.JOB_VIEW_ID_ONLY][google.cloud.talent.v4.JobView.JOB_VIEW_ID_ONLY], - * the maximum allowed page size is 1000. Otherwise, the maximum allowed page - * size is 100. - * Default is 100 if empty or a number < 1 is specified. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The desired job attributes returned for jobs in the - * search response. Defaults to - * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no - * value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 5; - * @return int - */ - public function getJobView() - { - return $this->job_view; - } - - /** - * The desired job attributes returned for jobs in the - * search response. Defaults to - * [JobView.JOB_VIEW_FULL][google.cloud.talent.v4.JobView.JOB_VIEW_FULL] if no - * value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 5; - * @param int $var - * @return $this - */ - public function setJobView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobView::class); - $this->job_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php deleted file mode 100644 index 12eeddb8b473..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListJobsResponse.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.talent.v4.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Jobs for a given company. - * The maximum number of items returned is based on the limit field - * provided in the request. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 1; - */ - private $jobs; - /** - * A token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * The Jobs for a given company. - * The maximum number of items returned is based on the limit field - * provided in the request. - * @type string $next_page_token - * A token to retrieve the next page of results. - * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata - * Additional information for the API invocation, such as the request - * tracking id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * The Jobs for a given company. - * The maximum number of items returned is based on the limit field - * provided in the request. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * The Jobs for a given company. - * The maximum number of items returned is based on the limit field - * provided in the request. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Job jobs = 1; - * @param array<\Google\Cloud\Talent\V4\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. - * - * 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 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; - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - * @return \Google\Cloud\Talent\V4\ResponseMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - * @param \Google\Cloud\Talent\V4\ResponseMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php deleted file mode 100644 index 9414420b6aab..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.talent.v4.ListTenantsRequest - */ -class ListTenantsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The starting indicator from which to return results. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - /** - * The maximum number of tenants to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. Resource name of the project under which the tenant is created. - * - * The format is "projects/{project_id}", for example, - * "projects/foo". Please see - * {@see TenantServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Talent\V4\ListTenantsRequest - * - * @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. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * @type string $page_token - * The starting indicator from which to return results. - * @type int $page_size - * The maximum number of tenants to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * - * 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. Resource name of the project under which the tenant is created. - * The format is "projects/{project_id}", for example, - * "projects/foo". - * - * 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 starting indicator from which to return results. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The starting indicator from which to return results. - * - * Generated from protobuf field string page_token = 2; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of tenants to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of tenants to be returned, at most 100. - * Default is 100 if a non-positive number is provided. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php deleted file mode 100644 index e9117cb9d553..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ListTenantsResponse.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.talent.v4.ListTenantsResponse - */ -class ListTenantsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Tenants for the current client. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Tenant tenants = 1; - */ - private $tenants; - /** - * A token to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\Tenant>|\Google\Protobuf\Internal\RepeatedField $tenants - * Tenants for the current client. - * @type string $next_page_token - * A token to retrieve the next page of results. - * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata - * Additional information for the API invocation, such as the request - * tracking id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); - parent::__construct($data); - } - - /** - * Tenants for the current client. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Tenant tenants = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTenants() - { - return $this->tenants; - } - - /** - * Tenants for the current client. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Tenant tenants = 1; - * @param array<\Google\Cloud\Talent\V4\Tenant>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTenants($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Tenant::class); - $this->tenants = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. - * - * 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 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; - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - * @return \Google\Cloud\Talent\V4\ResponseMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 3; - * @param \Google\Cloud\Talent\V4\ResponseMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php deleted file mode 100644 index 53edacaaba94..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.talent.v4.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * The type of a location, which corresponds to the address lines field of - * [google.type.PostalAddress][google.type.PostalAddress]. For example, - * "Downtown, Atlanta, GA, USA" has a type of - * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], - * and "Kansas City, KS, USA" has a type of - * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. - * - * Generated from protobuf field .google.cloud.talent.v4.Location.LocationType location_type = 1; - */ - protected $location_type = 0; - /** - * Postal address of the location that includes human readable information, - * such as postal delivery and payments addresses. Given a postal address, - * a postal service can deliver items to a premises, P.O. Box, or other - * delivery location. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 2; - */ - protected $postal_address = null; - /** - * An object representing a latitude/longitude pair. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 3; - */ - protected $lat_lng = null; - /** - * Radius in miles of the job location. This value is derived from the - * location bounding box in which a circle with the specified radius - * centered from [google.type.LatLng][google.type.LatLng] covers the area - * associated with the job location. For example, currently, "Mountain View, - * CA, USA" has a radius of 6.17 miles. - * - * Generated from protobuf field double radius_miles = 4; - */ - protected $radius_miles = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $location_type - * The type of a location, which corresponds to the address lines field of - * [google.type.PostalAddress][google.type.PostalAddress]. For example, - * "Downtown, Atlanta, GA, USA" has a type of - * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], - * and "Kansas City, KS, USA" has a type of - * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. - * @type \Google\Type\PostalAddress $postal_address - * Postal address of the location that includes human readable information, - * such as postal delivery and payments addresses. Given a postal address, - * a postal service can deliver items to a premises, P.O. Box, or other - * delivery location. - * @type \Google\Type\LatLng $lat_lng - * An object representing a latitude/longitude pair. - * @type float $radius_miles - * Radius in miles of the job location. This value is derived from the - * location bounding box in which a circle with the specified radius - * centered from [google.type.LatLng][google.type.LatLng] covers the area - * associated with the job location. For example, currently, "Mountain View, - * CA, USA" has a radius of 6.17 miles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * The type of a location, which corresponds to the address lines field of - * [google.type.PostalAddress][google.type.PostalAddress]. For example, - * "Downtown, Atlanta, GA, USA" has a type of - * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], - * and "Kansas City, KS, USA" has a type of - * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. - * - * Generated from protobuf field .google.cloud.talent.v4.Location.LocationType location_type = 1; - * @return int - */ - public function getLocationType() - { - return $this->location_type; - } - - /** - * The type of a location, which corresponds to the address lines field of - * [google.type.PostalAddress][google.type.PostalAddress]. For example, - * "Downtown, Atlanta, GA, USA" has a type of - * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD], - * and "Kansas City, KS, USA" has a type of - * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY]. - * - * Generated from protobuf field .google.cloud.talent.v4.Location.LocationType location_type = 1; - * @param int $var - * @return $this - */ - public function setLocationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\Location\LocationType::class); - $this->location_type = $var; - - return $this; - } - - /** - * Postal address of the location that includes human readable information, - * such as postal delivery and payments addresses. Given a postal address, - * a postal service can deliver items to a premises, P.O. Box, or other - * delivery location. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 2; - * @return \Google\Type\PostalAddress|null - */ - public function getPostalAddress() - { - return $this->postal_address; - } - - public function hasPostalAddress() - { - return isset($this->postal_address); - } - - public function clearPostalAddress() - { - unset($this->postal_address); - } - - /** - * Postal address of the location that includes human readable information, - * such as postal delivery and payments addresses. Given a postal address, - * a postal service can deliver items to a premises, P.O. Box, or other - * delivery location. - * - * Generated from protobuf field .google.type.PostalAddress postal_address = 2; - * @param \Google\Type\PostalAddress $var - * @return $this - */ - public function setPostalAddress($var) - { - GPBUtil::checkMessage($var, \Google\Type\PostalAddress::class); - $this->postal_address = $var; - - return $this; - } - - /** - * An object representing a latitude/longitude pair. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 3; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * An object representing a latitude/longitude pair. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - - /** - * Radius in miles of the job location. This value is derived from the - * location bounding box in which a circle with the specified radius - * centered from [google.type.LatLng][google.type.LatLng] covers the area - * associated with the job location. For example, currently, "Mountain View, - * CA, USA" has a radius of 6.17 miles. - * - * Generated from protobuf field double radius_miles = 4; - * @return float - */ - public function getRadiusMiles() - { - return $this->radius_miles; - } - - /** - * Radius in miles of the job location. This value is derived from the - * location bounding box in which a circle with the specified radius - * centered from [google.type.LatLng][google.type.LatLng] covers the area - * associated with the job location. For example, currently, "Mountain View, - * CA, USA" has a radius of 6.17 miles. - * - * Generated from protobuf field double radius_miles = 4; - * @param float $var - * @return $this - */ - public function setRadiusMiles($var) - { - GPBUtil::checkDouble($var); - $this->radius_miles = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php deleted file mode 100644 index d053315740f9..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Location/LocationType.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.talent.v4.Location.LocationType - */ -class LocationType -{ - /** - * Default value if the type isn't specified. - * - * Generated from protobuf enum LOCATION_TYPE_UNSPECIFIED = 0; - */ - const LOCATION_TYPE_UNSPECIFIED = 0; - /** - * A country level location. - * - * Generated from protobuf enum COUNTRY = 1; - */ - const COUNTRY = 1; - /** - * A state or equivalent level location. - * - * Generated from protobuf enum ADMINISTRATIVE_AREA = 2; - */ - const ADMINISTRATIVE_AREA = 2; - /** - * A county or equivalent level location. - * - * Generated from protobuf enum SUB_ADMINISTRATIVE_AREA = 3; - */ - const SUB_ADMINISTRATIVE_AREA = 3; - /** - * A city or equivalent level location. - * - * Generated from protobuf enum LOCALITY = 4; - */ - const LOCALITY = 4; - /** - * A postal code level location. - * - * Generated from protobuf enum POSTAL_CODE = 5; - */ - const POSTAL_CODE = 5; - /** - * A sublocality is a subdivision of a locality, for example a city borough, - * ward, or arrondissement. Sublocalities are usually recognized by a local - * political authority. For example, Manhattan and Brooklyn are recognized - * as boroughs by the City of New York, and are therefore modeled as - * sublocalities. - * - * Generated from protobuf enum SUB_LOCALITY = 6; - */ - const SUB_LOCALITY = 6; - /** - * A district or equivalent level location. - * - * Generated from protobuf enum SUB_LOCALITY_1 = 7; - */ - const SUB_LOCALITY_1 = 7; - /** - * A smaller district or equivalent level display. - * - * Generated from protobuf enum SUB_LOCALITY_2 = 8; - */ - const SUB_LOCALITY_2 = 8; - /** - * A neighborhood level location. - * - * Generated from protobuf enum NEIGHBORHOOD = 9; - */ - const NEIGHBORHOOD = 9; - /** - * A street address level location. - * - * Generated from protobuf enum STREET_ADDRESS = 10; - */ - const STREET_ADDRESS = 10; - - private static $valueToName = [ - self::LOCATION_TYPE_UNSPECIFIED => 'LOCATION_TYPE_UNSPECIFIED', - self::COUNTRY => 'COUNTRY', - self::ADMINISTRATIVE_AREA => 'ADMINISTRATIVE_AREA', - self::SUB_ADMINISTRATIVE_AREA => 'SUB_ADMINISTRATIVE_AREA', - self::LOCALITY => 'LOCALITY', - self::POSTAL_CODE => 'POSTAL_CODE', - self::SUB_LOCALITY => 'SUB_LOCALITY', - self::SUB_LOCALITY_1 => 'SUB_LOCALITY_1', - self::SUB_LOCALITY_2 => 'SUB_LOCALITY_2', - self::NEIGHBORHOOD => 'NEIGHBORHOOD', - self::STREET_ADDRESS => 'STREET_ADDRESS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LocationType::class, \Google\Cloud\Talent\V4\Location_LocationType::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php deleted file mode 100644 index 89caf8af7ac9..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.talent.v4.LocationFilter - */ -class LocationFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The address name, such as "Mountain View" or "Bay Area". - * - * Generated from protobuf field string address = 1; - */ - protected $address = ''; - /** - * CLDR region code of the country/region. This field may be used in two ways: - * 1) If telecommute preference is not set, this field is used address - * ambiguity of the user-input address. For example, "Liverpool" may refer to - * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the - * address resolution toward a specific country or territory. If this field is - * not set, address resolution is biased toward the United States by default. - * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the - * telecommute location filter will be limited to the region specified in this - * field. If this field is not set, the telecommute job locations will not be - * See - * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html - * for details. Example: "CH" for Switzerland. - * - * Generated from protobuf field string region_code = 2; - */ - protected $region_code = ''; - /** - * The latitude and longitude of the geographic center to search from. This - * field is ignored if `address` is provided. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 3; - */ - protected $lat_lng = null; - /** - * The distance_in_miles is applied when the location being searched for is - * identified as a city or smaller. This field is ignored if the location - * being searched for is a state or larger. - * - * Generated from protobuf field double distance_in_miles = 4; - */ - protected $distance_in_miles = 0.0; - /** - * Allows the client to return jobs without a - * set location, specifically, telecommuting jobs (telecommuting is considered - * by the service as a special location). - * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates - * if a job permits telecommuting. If this field is set to - * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], - * telecommuting jobs are searched, and - * [address][google.cloud.talent.v4.LocationFilter.address] and - * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If - * not set or set to - * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], - * the telecommute status of the jobs is ignored. Jobs that have - * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] - * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] - * may still be matched based on other location filters using - * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. - * This filter can be used by itself to search exclusively for telecommuting - * jobs, or it can be combined with another location - * filter to search for a combination of job locations, - * such as "Mountain View" or "telecommuting" jobs. However, when used in - * combination with other location filters, telecommuting jobs can be - * treated as less relevant than other jobs in the search response. - * This field is only used for job search requests. - * - * Generated from protobuf field .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; - */ - protected $telecommute_preference = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * The address name, such as "Mountain View" or "Bay Area". - * @type string $region_code - * CLDR region code of the country/region. This field may be used in two ways: - * 1) If telecommute preference is not set, this field is used address - * ambiguity of the user-input address. For example, "Liverpool" may refer to - * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the - * address resolution toward a specific country or territory. If this field is - * not set, address resolution is biased toward the United States by default. - * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the - * telecommute location filter will be limited to the region specified in this - * field. If this field is not set, the telecommute job locations will not be - * See - * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html - * for details. Example: "CH" for Switzerland. - * @type \Google\Type\LatLng $lat_lng - * The latitude and longitude of the geographic center to search from. This - * field is ignored if `address` is provided. - * @type float $distance_in_miles - * The distance_in_miles is applied when the location being searched for is - * identified as a city or smaller. This field is ignored if the location - * being searched for is a state or larger. - * @type int $telecommute_preference - * Allows the client to return jobs without a - * set location, specifically, telecommuting jobs (telecommuting is considered - * by the service as a special location). - * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates - * if a job permits telecommuting. If this field is set to - * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], - * telecommuting jobs are searched, and - * [address][google.cloud.talent.v4.LocationFilter.address] and - * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If - * not set or set to - * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], - * the telecommute status of the jobs is ignored. Jobs that have - * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] - * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] - * may still be matched based on other location filters using - * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. - * This filter can be used by itself to search exclusively for telecommuting - * jobs, or it can be combined with another location - * filter to search for a combination of job locations, - * such as "Mountain View" or "telecommuting" jobs. However, when used in - * combination with other location filters, telecommuting jobs can be - * treated as less relevant than other jobs in the search response. - * This field is only used for job search requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Filters::initOnce(); - parent::__construct($data); - } - - /** - * The address name, such as "Mountain View" or "Bay Area". - * - * Generated from protobuf field string address = 1; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * The address name, such as "Mountain View" or "Bay Area". - * - * Generated from protobuf field string address = 1; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * CLDR region code of the country/region. This field may be used in two ways: - * 1) If telecommute preference is not set, this field is used address - * ambiguity of the user-input address. For example, "Liverpool" may refer to - * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the - * address resolution toward a specific country or territory. If this field is - * not set, address resolution is biased toward the United States by default. - * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the - * telecommute location filter will be limited to the region specified in this - * field. If this field is not set, the telecommute job locations will not be - * See - * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html - * for details. Example: "CH" for Switzerland. - * - * Generated from protobuf field string region_code = 2; - * @return string - */ - public function getRegionCode() - { - return $this->region_code; - } - - /** - * CLDR region code of the country/region. This field may be used in two ways: - * 1) If telecommute preference is not set, this field is used address - * ambiguity of the user-input address. For example, "Liverpool" may refer to - * "Liverpool, NY, US" or "Liverpool, UK". This region code biases the - * address resolution toward a specific country or territory. If this field is - * not set, address resolution is biased toward the United States by default. - * 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the - * telecommute location filter will be limited to the region specified in this - * field. If this field is not set, the telecommute job locations will not be - * See - * https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html - * for details. Example: "CH" for Switzerland. - * - * Generated from protobuf field string region_code = 2; - * @param string $var - * @return $this - */ - public function setRegionCode($var) - { - GPBUtil::checkString($var, True); - $this->region_code = $var; - - return $this; - } - - /** - * The latitude and longitude of the geographic center to search from. This - * field is ignored if `address` is provided. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 3; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * The latitude and longitude of the geographic center to search from. This - * field is ignored if `address` is provided. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - - /** - * The distance_in_miles is applied when the location being searched for is - * identified as a city or smaller. This field is ignored if the location - * being searched for is a state or larger. - * - * Generated from protobuf field double distance_in_miles = 4; - * @return float - */ - public function getDistanceInMiles() - { - return $this->distance_in_miles; - } - - /** - * The distance_in_miles is applied when the location being searched for is - * identified as a city or smaller. This field is ignored if the location - * being searched for is a state or larger. - * - * Generated from protobuf field double distance_in_miles = 4; - * @param float $var - * @return $this - */ - public function setDistanceInMiles($var) - { - GPBUtil::checkDouble($var); - $this->distance_in_miles = $var; - - return $this; - } - - /** - * Allows the client to return jobs without a - * set location, specifically, telecommuting jobs (telecommuting is considered - * by the service as a special location). - * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates - * if a job permits telecommuting. If this field is set to - * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], - * telecommuting jobs are searched, and - * [address][google.cloud.talent.v4.LocationFilter.address] and - * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If - * not set or set to - * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], - * the telecommute status of the jobs is ignored. Jobs that have - * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] - * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] - * may still be matched based on other location filters using - * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. - * This filter can be used by itself to search exclusively for telecommuting - * jobs, or it can be combined with another location - * filter to search for a combination of job locations, - * such as "Mountain View" or "telecommuting" jobs. However, when used in - * combination with other location filters, telecommuting jobs can be - * treated as less relevant than other jobs in the search response. - * This field is only used for job search requests. - * - * Generated from protobuf field .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; - * @return int - */ - public function getTelecommutePreference() - { - return $this->telecommute_preference; - } - - /** - * Allows the client to return jobs without a - * set location, specifically, telecommuting jobs (telecommuting is considered - * by the service as a special location). - * [Job.posting_region][google.cloud.talent.v4.Job.posting_region] indicates - * if a job permits telecommuting. If this field is set to - * [TelecommutePreference.TELECOMMUTE_ALLOWED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_ALLOWED], - * telecommuting jobs are searched, and - * [address][google.cloud.talent.v4.LocationFilter.address] and - * [lat_lng][google.cloud.talent.v4.LocationFilter.lat_lng] are ignored. If - * not set or set to - * [TelecommutePreference.TELECOMMUTE_EXCLUDED][google.cloud.talent.v4.LocationFilter.TelecommutePreference.TELECOMMUTE_EXCLUDED], - * the telecommute status of the jobs is ignored. Jobs that have - * [PostingRegion.TELECOMMUTE][google.cloud.talent.v4.PostingRegion.TELECOMMUTE] - * and have additional [Job.addresses][google.cloud.talent.v4.Job.addresses] - * may still be matched based on other location filters using - * [address][google.cloud.talent.v4.LocationFilter.address] or [latlng][]. - * This filter can be used by itself to search exclusively for telecommuting - * jobs, or it can be combined with another location - * filter to search for a combination of job locations, - * such as "Mountain View" or "telecommuting" jobs. However, when used in - * combination with other location filters, telecommuting jobs can be - * treated as less relevant than other jobs in the search response. - * This field is only used for job search requests. - * - * Generated from protobuf field .google.cloud.talent.v4.LocationFilter.TelecommutePreference telecommute_preference = 5; - * @param int $var - * @return $this - */ - public function setTelecommutePreference($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\LocationFilter\TelecommutePreference::class); - $this->telecommute_preference = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php deleted file mode 100644 index 703373bcc25c..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/LocationFilter/TelecommutePreference.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.talent.v4.LocationFilter.TelecommutePreference - */ -class TelecommutePreference -{ - /** - * Default value if the telecommute preference isn't specified. - * - * Generated from protobuf enum TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; - */ - const TELECOMMUTE_PREFERENCE_UNSPECIFIED = 0; - /** - * Deprecated: Ignore telecommute status of jobs. Use - * TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs. - * - * Generated from protobuf enum TELECOMMUTE_EXCLUDED = 1 [deprecated = true]; - */ - const TELECOMMUTE_EXCLUDED = 1; - /** - * Allow telecommute jobs. - * - * Generated from protobuf enum TELECOMMUTE_ALLOWED = 2; - */ - const TELECOMMUTE_ALLOWED = 2; - /** - * Exclude telecommute jobs. - * - * Generated from protobuf enum TELECOMMUTE_JOBS_EXCLUDED = 3; - */ - const TELECOMMUTE_JOBS_EXCLUDED = 3; - - private static $valueToName = [ - self::TELECOMMUTE_PREFERENCE_UNSPECIFIED => 'TELECOMMUTE_PREFERENCE_UNSPECIFIED', - self::TELECOMMUTE_EXCLUDED => 'TELECOMMUTE_EXCLUDED', - self::TELECOMMUTE_ALLOWED => 'TELECOMMUTE_ALLOWED', - self::TELECOMMUTE_JOBS_EXCLUDED => 'TELECOMMUTE_JOBS_EXCLUDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TelecommutePreference::class, \Google\Cloud\Talent\V4\LocationFilter_TelecommutePreference::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php deleted file mode 100644 index ca8d7c462f5e..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/PostingRegion.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.talent.v4.PostingRegion - */ -class PostingRegion -{ - /** - * If the region is unspecified, the job is only returned if it - * matches the [LocationFilter][google.cloud.talent.v4.LocationFilter]. - * - * Generated from protobuf enum POSTING_REGION_UNSPECIFIED = 0; - */ - const POSTING_REGION_UNSPECIFIED = 0; - /** - * In addition to exact location matching, job posting is returned when the - * [LocationFilter][google.cloud.talent.v4.LocationFilter] in the search query - * is in the same administrative area as the returned job posting. For - * example, if a `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's - * returned if [LocationFilter][google.cloud.talent.v4.LocationFilter] has - * "Mountain View". - * Administrative area refers to top-level administrative subdivision of this - * country. For example, US state, IT region, UK constituent nation and - * JP prefecture. - * - * Generated from protobuf enum ADMINISTRATIVE_AREA = 1; - */ - const ADMINISTRATIVE_AREA = 1; - /** - * In addition to exact location matching, job is returned when - * [LocationFilter][google.cloud.talent.v4.LocationFilter] in search query is - * in the same country as this job. For example, if a `NATION_WIDE` job is - * posted in "USA", it's returned if - * [LocationFilter][google.cloud.talent.v4.LocationFilter] has 'Mountain - * View'. - * - * Generated from protobuf enum NATION = 2; - */ - const NATION = 2; - /** - * Job allows employees to work remotely (telecommute). - * If locations are provided with this value, the job is - * considered as having a location, but telecommuting is allowed. - * - * Generated from protobuf enum TELECOMMUTE = 3; - */ - const TELECOMMUTE = 3; - - private static $valueToName = [ - self::POSTING_REGION_UNSPECIFIED => 'POSTING_REGION_UNSPECIFIED', - self::ADMINISTRATIVE_AREA => 'ADMINISTRATIVE_AREA', - self::NATION => 'NATION', - self::TELECOMMUTE => 'TELECOMMUTE', - ]; - - 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php deleted file mode 100644 index cbc72199ab2c..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/RequestMetadata.php +++ /dev/null @@ -1,379 +0,0 @@ -google.cloud.talent.v4.RequestMetadata - */ -class RequestMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * The client-defined scope or source of the service call, which typically - * is the domain on - * which the service has been implemented and is currently being run. - * For example, if the service is being run by client Foo, Inc., on - * job board www.foo.com and career site www.bar.com, then this field is - * set to "foo.com" for use on the job board, and "bar.com" for use on the - * career site. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique domain. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string domain = 1; - */ - protected $domain = ''; - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique session identification string. A session is defined as the - * duration of an end user's interaction with the service over a certain - * period. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique session ID. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string session_id = 2; - */ - protected $session_id = ''; - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique user identification string, as determined by the client. - * To have the strongest positive impact on search quality - * make sure the client-level is unique. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique user ID. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string user_id = 3; - */ - protected $user_id = ''; - /** - * Only set when any of - * [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available - * for some reason. It is highly recommended not to set this field and provide - * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best - * service experience. - * - * Generated from protobuf field bool allow_missing_ids = 4; - */ - protected $allow_missing_ids = false; - /** - * The type of device used by the job seeker at the time of the call to the - * service. - * - * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo device_info = 5; - */ - protected $device_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * The client-defined scope or source of the service call, which typically - * is the domain on - * which the service has been implemented and is currently being run. - * For example, if the service is being run by client Foo, Inc., on - * job board www.foo.com and career site www.bar.com, then this field is - * set to "foo.com" for use on the job board, and "bar.com" for use on the - * career site. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique domain. - * The maximum number of allowed characters is 255. - * @type string $session_id - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique session identification string. A session is defined as the - * duration of an end user's interaction with the service over a certain - * period. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique session ID. - * The maximum number of allowed characters is 255. - * @type string $user_id - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique user identification string, as determined by the client. - * To have the strongest positive impact on search quality - * make sure the client-level is unique. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique user ID. - * The maximum number of allowed characters is 255. - * @type bool $allow_missing_ids - * Only set when any of - * [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available - * for some reason. It is highly recommended not to set this field and provide - * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best - * service experience. - * @type \Google\Cloud\Talent\V4\DeviceInfo $device_info - * The type of device used by the job seeker at the time of the call to the - * service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * The client-defined scope or source of the service call, which typically - * is the domain on - * which the service has been implemented and is currently being run. - * For example, if the service is being run by client Foo, Inc., on - * job board www.foo.com and career site www.bar.com, then this field is - * set to "foo.com" for use on the job board, and "bar.com" for use on the - * career site. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique domain. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string domain = 1; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * The client-defined scope or source of the service call, which typically - * is the domain on - * which the service has been implemented and is currently being run. - * For example, if the service is being run by client Foo, Inc., on - * job board www.foo.com and career site www.bar.com, then this field is - * set to "foo.com" for use on the job board, and "bar.com" for use on the - * career site. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique domain. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string domain = 1; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique session identification string. A session is defined as the - * duration of an end user's interaction with the service over a certain - * period. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique session ID. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string session_id = 2; - * @return string - */ - public function getSessionId() - { - return $this->session_id; - } - - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique session identification string. A session is defined as the - * duration of an end user's interaction with the service over a certain - * period. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique session ID. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string session_id = 2; - * @param string $var - * @return $this - */ - public function setSessionId($var) - { - GPBUtil::checkString($var, True); - $this->session_id = $var; - - return $this; - } - - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique user identification string, as determined by the client. - * To have the strongest positive impact on search quality - * make sure the client-level is unique. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique user ID. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string user_id = 3; - * @return string - */ - public function getUserId() - { - return $this->user_id; - } - - /** - * Required if - * [allow_missing_ids][google.cloud.talent.v4.RequestMetadata.allow_missing_ids] - * is unset or `false`. - * A unique user identification string, as determined by the client. - * To have the strongest positive impact on search quality - * make sure the client-level is unique. - * Obfuscate this field for privacy concerns before - * providing it to the service. - * Note that any improvements to the model for a particular tenant site rely - * on this field being set correctly to a unique user ID. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string user_id = 3; - * @param string $var - * @return $this - */ - public function setUserId($var) - { - GPBUtil::checkString($var, True); - $this->user_id = $var; - - return $this; - } - - /** - * Only set when any of - * [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available - * for some reason. It is highly recommended not to set this field and provide - * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best - * service experience. - * - * Generated from protobuf field bool allow_missing_ids = 4; - * @return bool - */ - public function getAllowMissingIds() - { - return $this->allow_missing_ids; - } - - /** - * Only set when any of - * [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] isn't available - * for some reason. It is highly recommended not to set this field and provide - * accurate [domain][google.cloud.talent.v4.RequestMetadata.domain], - * [session_id][google.cloud.talent.v4.RequestMetadata.session_id] and - * [user_id][google.cloud.talent.v4.RequestMetadata.user_id] for the best - * service experience. - * - * Generated from protobuf field bool allow_missing_ids = 4; - * @param bool $var - * @return $this - */ - public function setAllowMissingIds($var) - { - GPBUtil::checkBool($var); - $this->allow_missing_ids = $var; - - return $this; - } - - /** - * The type of device used by the job seeker at the time of the call to the - * service. - * - * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo device_info = 5; - * @return \Google\Cloud\Talent\V4\DeviceInfo|null - */ - public function getDeviceInfo() - { - return $this->device_info; - } - - public function hasDeviceInfo() - { - return isset($this->device_info); - } - - public function clearDeviceInfo() - { - unset($this->device_info); - } - - /** - * The type of device used by the job seeker at the time of the call to the - * service. - * - * Generated from protobuf field .google.cloud.talent.v4.DeviceInfo device_info = 5; - * @param \Google\Cloud\Talent\V4\DeviceInfo $var - * @return $this - */ - public function setDeviceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\DeviceInfo::class); - $this->device_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php deleted file mode 100644 index 35db6db77d32..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/ResponseMetadata.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.talent.v4.ResponseMetadata - */ -class ResponseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * A unique id associated with this call. - * This id is logged for tracking purposes. - * - * Generated from protobuf field string request_id = 1; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $request_id - * A unique id associated with this call. - * This id is logged for tracking purposes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * A unique id associated with this call. - * This id is logged for tracking purposes. - * - * Generated from protobuf field string request_id = 1; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A unique id associated with this call. - * This id is logged for tracking purposes. - * - * Generated from protobuf field string request_id = 1; - * @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/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php deleted file mode 100644 index 640d9d634c4a..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest.php +++ /dev/null @@ -1,1438 +0,0 @@ -google.cloud.talent.v4.SearchJobsRequest - */ -class SearchJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the tenant to search within. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Mode of a search. - * Defaults to - * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; - */ - protected $search_mode = 0; - /** - * Required. The meta information collected about the job searcher, used to - * improve the search quality of the service. The identifiers (such as - * `user_id`) are provided by users, and must be unique and consistent. - * - * Generated from protobuf field .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $request_metadata = null; - /** - * Query used to search against jobs, such as keyword, location filters, etc. - * - * Generated from protobuf field .google.cloud.talent.v4.JobQuery job_query = 4; - */ - protected $job_query = null; - /** - * Controls whether to broaden the search when it produces sparse results. - * Broadened queries append results to the end of the matching results - * list. - * Defaults to false. - * - * Generated from protobuf field bool enable_broadening = 5; - */ - protected $enable_broadening = false; - /** - * An expression specifies a histogram request against matching jobs. - * Expression syntax is an aggregation function call with histogram facets and - * other options. - * Available aggregation function calls are: - * * `count(string_histogram_facet)`: Count the number of matching entities, - * for each distinct attribute value. - * * `count(numeric_histogram_facet, list of buckets)`: Count the number of - * matching entities within each bucket. - * A maximum of 200 histogram buckets are supported. - * Data types: - * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - * * String: string like "any string with backslash escape for quote(\")." - * * Number: whole number and floating point number like 10, -1 and -0.01. - * * List: list of elements with comma(,) separator surrounded by square - * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - * Built-in constants: - * * MIN (minimum number similar to java Double.MIN_VALUE) - * * MAX (maximum number similar to java Double.MAX_VALUE) - * Built-in functions: - * * bucket(start, end[, label]): bucket built-in function creates a bucket - * with range of [start, end). Note that the end is exclusive, for example, - * bucket(1, MAX, "positive number") or bucket(1, 10). - * Job histogram facets: - * * company_display_name: histogram by - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. - * * employment_type: histogram by - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for - * example, - * "FULL_TIME", "PART_TIME". - * * company_size (DEPRECATED): histogram by - * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", - * "MEDIUM", "BIG". - * * publish_time_in_day: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in days. - * Must specify list of numeric buckets in spec. - * * publish_time_in_month: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in months. - * Must specify list of numeric buckets in spec. - * * publish_time_in_year: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in years. - * Must specify list of numeric buckets in spec. - * * degree_types: histogram by the - * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, - * "Bachelors", "Masters". - * * job_level: histogram by the - * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry - * Level". - * * country: histogram by the country code of jobs, for example, "US", "FR". - * * admin1: histogram by the admin1 code of jobs, which is a global - * placeholder referring to the state, province, or the particular term a - * country uses to define the geographic structure below the country level, - * for example, "CA", "IL". - * * city: histogram by a combination of the "city name, admin1 code". For - * example, "Mountain View, CA", "New York, NY". - * * admin1_country: histogram by a combination of the "admin1 code, country", - * for example, "CA, US", "IL, US". - * * city_coordinate: histogram by the city center's GPS coordinates (latitude - * and longitude), for example, 37.4038522,-122.0987765. Since the - * coordinates of a city center can change, customers may need to refresh - * them periodically. - * * locale: histogram by the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, - * "en-US", - * "fr-FR". - * * language: histogram by the language subtag of the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], - * for example, "en", "fr". - * * category: histogram by the - * [JobCategory][google.cloud.talent.v4.JobCategory], for example, - * "COMPUTER_AND_IT", "HEALTHCARE". - * * base_compensation_unit: histogram by the - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] - * of base salary, for example, "WEEKLY", "MONTHLY". - * * base_compensation: histogram by the base salary. Must specify list of - * numeric buckets to group results by. - * * annualized_base_compensation: histogram by the base annualized salary. - * Must specify list of numeric buckets to group results by. - * * annualized_total_compensation: histogram by the total annualized salary. - * Must specify list of numeric buckets to group results by. - * * string_custom_attribute: histogram by string - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * string_custom_attribute["key1"]. - * * numeric_custom_attribute: histogram by numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - * group results by. - * Example expressions: - * * `count(admin1)` - * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - * bucket(100000, MAX)])` - * * `count(string_custom_attribute["some-string-custom-attribute"])` - * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - * - * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; - */ - private $histogram_queries; - /** - * The desired job attributes returned for jobs in the search response. - * Defaults to - * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if - * no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 8; - */ - protected $job_view = 0; - /** - * An integer that specifies the current offset (that is, starting result - * location, amongst the jobs deemed by the API as relevant) in search - * results. This field is only considered if - * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. - * The maximum allowed value is 5000. Otherwise an error is thrown. - * For example, 0 means to return results starting from the first matching - * job, and 10 means to return from the 11th job. This can be used for - * pagination, (for example, pageSize = 10 and offset = 10 means to return - * from the second page). - * - * Generated from protobuf field int32 offset = 9; - */ - protected $offset = 0; - /** - * A limit on the number of jobs returned in the search results. - * Increasing this value above the default value of 10 can increase search - * response time. The value can be between 1 and 100. - * - * Generated from protobuf field int32 max_page_size = 10; - */ - protected $max_page_size = 0; - /** - * The token specifying the current offset within - * search results. See - * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] - * for an explanation of how to obtain the next set of query results. - * - * Generated from protobuf field string page_token = 11; - */ - protected $page_token = ''; - /** - * The criteria determining how search results are sorted. Default is - * `"relevance desc"`. - * Supported options are: - * * `"relevance desc"`: By relevance descending, as determined by the API - * algorithms. Relevance thresholding of query results is only available - * with this ordering. - * * `"posting_publish_time desc"`: By - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * descending. - * * `"posting_update_time desc"`: By - * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] - * descending. - * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. - * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] - * descending. - * * `"annualized_base_compensation"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_base_compensation desc"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"annualized_total_compensation"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_total_compensation desc"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"custom_ranking desc"`: By the relevance score adjusted to the - * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * with weight factor assigned by - * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] - * in descending order. - * * Location sorting: Use the special syntax to order jobs by distance:
- * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - * multiple locations. See details below.
- * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - * multiple locations. See details below.
- * The string can have a maximum of 256 characters. When multiple distance - * centers are provided, a job that is close to any of the distance centers - * would have a high rank. When a job has multiple locations, the job - * location closest to one of the distance centers will be used. Jobs that - * don't have locations will be ranked at the bottom. Distance is calculated - * with a precision of 11.3 meters (37.4 feet). Diversification strategy is - * still applied unless explicitly disabled in - * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. - * - * Generated from protobuf field string order_by = 12; - */ - protected $order_by = ''; - /** - * Controls whether highly similar jobs are returned next to each other in - * the search results. Jobs are identified as highly similar based on - * their titles, job categories, and locations. Highly similar results are - * clustered so that only one representative job of the cluster is - * displayed to the job seeker higher up in the results, with the other jobs - * being displayed lower down in the results. - * Defaults to - * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] - * if no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; - */ - protected $diversification_level = 0; - /** - * Controls over how job documents get ranked on top of existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; - */ - protected $custom_ranking_info = null; - /** - * This field is deprecated. Please use - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * going forward. - * To migrate, disable_keyword_match set to false maps to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], - * and disable_keyword_match set to true maps to - * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. - * If - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * is set, this field is ignored. - * Controls whether to disable exact keyword match on - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.description][google.cloud.talent.v4.Job.description], - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], - * [Job.addresses][google.cloud.talent.v4.Job.addresses], - * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When - * disable keyword match is turned off, a keyword match returns jobs that do - * not match given category filters when there are matching keywords. For - * example, for the query "program manager," a result is returned even if the - * job posting has the title "software developer," which doesn't fall into - * "program manager" ontology, but does have "program manager" appearing in - * its description. - * For queries like "cloud" that don't contain title or - * location specific ontology, jobs with "cloud" keyword matches are returned - * regardless of this flag's value. - * Use - * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] - * if company-specific globally matched custom field/attribute string values - * are needed. Enabling keyword match improves recall of subsequent search - * requests. - * Defaults to false. - * - * Generated from protobuf field bool disable_keyword_match = 16 [deprecated = true]; - * @deprecated - */ - protected $disable_keyword_match = false; - /** - * Controls what keyword match options to use. If both keyword_match_mode and - * disable_keyword_match are set, keyword_match_mode will take precedence. - * Defaults to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] - * if no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode keyword_match_mode = 18; - */ - protected $keyword_match_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the tenant to search within. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * @type int $search_mode - * Mode of a search. - * Defaults to - * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. - * @type \Google\Cloud\Talent\V4\RequestMetadata $request_metadata - * Required. The meta information collected about the job searcher, used to - * improve the search quality of the service. The identifiers (such as - * `user_id`) are provided by users, and must be unique and consistent. - * @type \Google\Cloud\Talent\V4\JobQuery $job_query - * Query used to search against jobs, such as keyword, location filters, etc. - * @type bool $enable_broadening - * Controls whether to broaden the search when it produces sparse results. - * Broadened queries append results to the end of the matching results - * list. - * Defaults to false. - * @type array<\Google\Cloud\Talent\V4\HistogramQuery>|\Google\Protobuf\Internal\RepeatedField $histogram_queries - * An expression specifies a histogram request against matching jobs. - * Expression syntax is an aggregation function call with histogram facets and - * other options. - * Available aggregation function calls are: - * * `count(string_histogram_facet)`: Count the number of matching entities, - * for each distinct attribute value. - * * `count(numeric_histogram_facet, list of buckets)`: Count the number of - * matching entities within each bucket. - * A maximum of 200 histogram buckets are supported. - * Data types: - * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - * * String: string like "any string with backslash escape for quote(\")." - * * Number: whole number and floating point number like 10, -1 and -0.01. - * * List: list of elements with comma(,) separator surrounded by square - * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - * Built-in constants: - * * MIN (minimum number similar to java Double.MIN_VALUE) - * * MAX (maximum number similar to java Double.MAX_VALUE) - * Built-in functions: - * * bucket(start, end[, label]): bucket built-in function creates a bucket - * with range of [start, end). Note that the end is exclusive, for example, - * bucket(1, MAX, "positive number") or bucket(1, 10). - * Job histogram facets: - * * company_display_name: histogram by - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. - * * employment_type: histogram by - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for - * example, - * "FULL_TIME", "PART_TIME". - * * company_size (DEPRECATED): histogram by - * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", - * "MEDIUM", "BIG". - * * publish_time_in_day: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in days. - * Must specify list of numeric buckets in spec. - * * publish_time_in_month: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in months. - * Must specify list of numeric buckets in spec. - * * publish_time_in_year: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in years. - * Must specify list of numeric buckets in spec. - * * degree_types: histogram by the - * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, - * "Bachelors", "Masters". - * * job_level: histogram by the - * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry - * Level". - * * country: histogram by the country code of jobs, for example, "US", "FR". - * * admin1: histogram by the admin1 code of jobs, which is a global - * placeholder referring to the state, province, or the particular term a - * country uses to define the geographic structure below the country level, - * for example, "CA", "IL". - * * city: histogram by a combination of the "city name, admin1 code". For - * example, "Mountain View, CA", "New York, NY". - * * admin1_country: histogram by a combination of the "admin1 code, country", - * for example, "CA, US", "IL, US". - * * city_coordinate: histogram by the city center's GPS coordinates (latitude - * and longitude), for example, 37.4038522,-122.0987765. Since the - * coordinates of a city center can change, customers may need to refresh - * them periodically. - * * locale: histogram by the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, - * "en-US", - * "fr-FR". - * * language: histogram by the language subtag of the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], - * for example, "en", "fr". - * * category: histogram by the - * [JobCategory][google.cloud.talent.v4.JobCategory], for example, - * "COMPUTER_AND_IT", "HEALTHCARE". - * * base_compensation_unit: histogram by the - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] - * of base salary, for example, "WEEKLY", "MONTHLY". - * * base_compensation: histogram by the base salary. Must specify list of - * numeric buckets to group results by. - * * annualized_base_compensation: histogram by the base annualized salary. - * Must specify list of numeric buckets to group results by. - * * annualized_total_compensation: histogram by the total annualized salary. - * Must specify list of numeric buckets to group results by. - * * string_custom_attribute: histogram by string - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * string_custom_attribute["key1"]. - * * numeric_custom_attribute: histogram by numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - * group results by. - * Example expressions: - * * `count(admin1)` - * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - * bucket(100000, MAX)])` - * * `count(string_custom_attribute["some-string-custom-attribute"])` - * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - * @type int $job_view - * The desired job attributes returned for jobs in the search response. - * Defaults to - * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if - * no value is specified. - * @type int $offset - * An integer that specifies the current offset (that is, starting result - * location, amongst the jobs deemed by the API as relevant) in search - * results. This field is only considered if - * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. - * The maximum allowed value is 5000. Otherwise an error is thrown. - * For example, 0 means to return results starting from the first matching - * job, and 10 means to return from the 11th job. This can be used for - * pagination, (for example, pageSize = 10 and offset = 10 means to return - * from the second page). - * @type int $max_page_size - * A limit on the number of jobs returned in the search results. - * Increasing this value above the default value of 10 can increase search - * response time. The value can be between 1 and 100. - * @type string $page_token - * The token specifying the current offset within - * search results. See - * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] - * for an explanation of how to obtain the next set of query results. - * @type string $order_by - * The criteria determining how search results are sorted. Default is - * `"relevance desc"`. - * Supported options are: - * * `"relevance desc"`: By relevance descending, as determined by the API - * algorithms. Relevance thresholding of query results is only available - * with this ordering. - * * `"posting_publish_time desc"`: By - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * descending. - * * `"posting_update_time desc"`: By - * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] - * descending. - * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. - * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] - * descending. - * * `"annualized_base_compensation"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_base_compensation desc"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"annualized_total_compensation"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_total_compensation desc"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"custom_ranking desc"`: By the relevance score adjusted to the - * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * with weight factor assigned by - * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] - * in descending order. - * * Location sorting: Use the special syntax to order jobs by distance:
- * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - * multiple locations. See details below.
- * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - * multiple locations. See details below.
- * The string can have a maximum of 256 characters. When multiple distance - * centers are provided, a job that is close to any of the distance centers - * would have a high rank. When a job has multiple locations, the job - * location closest to one of the distance centers will be used. Jobs that - * don't have locations will be ranked at the bottom. Distance is calculated - * with a precision of 11.3 meters (37.4 feet). Diversification strategy is - * still applied unless explicitly disabled in - * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. - * @type int $diversification_level - * Controls whether highly similar jobs are returned next to each other in - * the search results. Jobs are identified as highly similar based on - * their titles, job categories, and locations. Highly similar results are - * clustered so that only one representative job of the cluster is - * displayed to the job seeker higher up in the results, with the other jobs - * being displayed lower down in the results. - * Defaults to - * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] - * if no value is specified. - * @type \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo $custom_ranking_info - * Controls over how job documents get ranked on top of existing relevance - * score (determined by API algorithm). - * @type bool $disable_keyword_match - * This field is deprecated. Please use - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * going forward. - * To migrate, disable_keyword_match set to false maps to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], - * and disable_keyword_match set to true maps to - * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. - * If - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * is set, this field is ignored. - * Controls whether to disable exact keyword match on - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.description][google.cloud.talent.v4.Job.description], - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], - * [Job.addresses][google.cloud.talent.v4.Job.addresses], - * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When - * disable keyword match is turned off, a keyword match returns jobs that do - * not match given category filters when there are matching keywords. For - * example, for the query "program manager," a result is returned even if the - * job posting has the title "software developer," which doesn't fall into - * "program manager" ontology, but does have "program manager" appearing in - * its description. - * For queries like "cloud" that don't contain title or - * location specific ontology, jobs with "cloud" keyword matches are returned - * regardless of this flag's value. - * Use - * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] - * if company-specific globally matched custom field/attribute string values - * are needed. Enabling keyword match improves recall of subsequent search - * requests. - * Defaults to false. - * @type int $keyword_match_mode - * Controls what keyword match options to use. If both keyword_match_mode and - * disable_keyword_match are set, keyword_match_mode will take precedence. - * Defaults to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] - * if no value is specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the tenant to search within. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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 tenant to search within. - * The format is "projects/{project_id}/tenants/{tenant_id}". For example, - * "projects/foo/tenants/bar". - * - * 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; - } - - /** - * Mode of a search. - * Defaults to - * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; - * @return int - */ - public function getSearchMode() - { - return $this->search_mode; - } - - /** - * Mode of a search. - * Defaults to - * [SearchMode.JOB_SEARCH][google.cloud.talent.v4.SearchJobsRequest.SearchMode.JOB_SEARCH]. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.SearchMode search_mode = 2; - * @param int $var - * @return $this - */ - public function setSearchMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\SearchMode::class); - $this->search_mode = $var; - - return $this; - } - - /** - * Required. The meta information collected about the job searcher, used to - * improve the search quality of the service. The identifiers (such as - * `user_id`) are provided by users, and must be unique and consistent. - * - * Generated from protobuf field .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\RequestMetadata|null - */ - public function getRequestMetadata() - { - return $this->request_metadata; - } - - public function hasRequestMetadata() - { - return isset($this->request_metadata); - } - - public function clearRequestMetadata() - { - unset($this->request_metadata); - } - - /** - * Required. The meta information collected about the job searcher, used to - * improve the search quality of the service. The identifiers (such as - * `user_id`) are provided by users, and must be unique and consistent. - * - * Generated from protobuf field .google.cloud.talent.v4.RequestMetadata request_metadata = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\RequestMetadata $var - * @return $this - */ - public function setRequestMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\RequestMetadata::class); - $this->request_metadata = $var; - - return $this; - } - - /** - * Query used to search against jobs, such as keyword, location filters, etc. - * - * Generated from protobuf field .google.cloud.talent.v4.JobQuery job_query = 4; - * @return \Google\Cloud\Talent\V4\JobQuery|null - */ - public function getJobQuery() - { - return $this->job_query; - } - - public function hasJobQuery() - { - return isset($this->job_query); - } - - public function clearJobQuery() - { - unset($this->job_query); - } - - /** - * Query used to search against jobs, such as keyword, location filters, etc. - * - * Generated from protobuf field .google.cloud.talent.v4.JobQuery job_query = 4; - * @param \Google\Cloud\Talent\V4\JobQuery $var - * @return $this - */ - public function setJobQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\JobQuery::class); - $this->job_query = $var; - - return $this; - } - - /** - * Controls whether to broaden the search when it produces sparse results. - * Broadened queries append results to the end of the matching results - * list. - * Defaults to false. - * - * Generated from protobuf field bool enable_broadening = 5; - * @return bool - */ - public function getEnableBroadening() - { - return $this->enable_broadening; - } - - /** - * Controls whether to broaden the search when it produces sparse results. - * Broadened queries append results to the end of the matching results - * list. - * Defaults to false. - * - * Generated from protobuf field bool enable_broadening = 5; - * @param bool $var - * @return $this - */ - public function setEnableBroadening($var) - { - GPBUtil::checkBool($var); - $this->enable_broadening = $var; - - return $this; - } - - /** - * An expression specifies a histogram request against matching jobs. - * Expression syntax is an aggregation function call with histogram facets and - * other options. - * Available aggregation function calls are: - * * `count(string_histogram_facet)`: Count the number of matching entities, - * for each distinct attribute value. - * * `count(numeric_histogram_facet, list of buckets)`: Count the number of - * matching entities within each bucket. - * A maximum of 200 histogram buckets are supported. - * Data types: - * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - * * String: string like "any string with backslash escape for quote(\")." - * * Number: whole number and floating point number like 10, -1 and -0.01. - * * List: list of elements with comma(,) separator surrounded by square - * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - * Built-in constants: - * * MIN (minimum number similar to java Double.MIN_VALUE) - * * MAX (maximum number similar to java Double.MAX_VALUE) - * Built-in functions: - * * bucket(start, end[, label]): bucket built-in function creates a bucket - * with range of [start, end). Note that the end is exclusive, for example, - * bucket(1, MAX, "positive number") or bucket(1, 10). - * Job histogram facets: - * * company_display_name: histogram by - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. - * * employment_type: histogram by - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for - * example, - * "FULL_TIME", "PART_TIME". - * * company_size (DEPRECATED): histogram by - * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", - * "MEDIUM", "BIG". - * * publish_time_in_day: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in days. - * Must specify list of numeric buckets in spec. - * * publish_time_in_month: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in months. - * Must specify list of numeric buckets in spec. - * * publish_time_in_year: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in years. - * Must specify list of numeric buckets in spec. - * * degree_types: histogram by the - * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, - * "Bachelors", "Masters". - * * job_level: histogram by the - * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry - * Level". - * * country: histogram by the country code of jobs, for example, "US", "FR". - * * admin1: histogram by the admin1 code of jobs, which is a global - * placeholder referring to the state, province, or the particular term a - * country uses to define the geographic structure below the country level, - * for example, "CA", "IL". - * * city: histogram by a combination of the "city name, admin1 code". For - * example, "Mountain View, CA", "New York, NY". - * * admin1_country: histogram by a combination of the "admin1 code, country", - * for example, "CA, US", "IL, US". - * * city_coordinate: histogram by the city center's GPS coordinates (latitude - * and longitude), for example, 37.4038522,-122.0987765. Since the - * coordinates of a city center can change, customers may need to refresh - * them periodically. - * * locale: histogram by the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, - * "en-US", - * "fr-FR". - * * language: histogram by the language subtag of the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], - * for example, "en", "fr". - * * category: histogram by the - * [JobCategory][google.cloud.talent.v4.JobCategory], for example, - * "COMPUTER_AND_IT", "HEALTHCARE". - * * base_compensation_unit: histogram by the - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] - * of base salary, for example, "WEEKLY", "MONTHLY". - * * base_compensation: histogram by the base salary. Must specify list of - * numeric buckets to group results by. - * * annualized_base_compensation: histogram by the base annualized salary. - * Must specify list of numeric buckets to group results by. - * * annualized_total_compensation: histogram by the total annualized salary. - * Must specify list of numeric buckets to group results by. - * * string_custom_attribute: histogram by string - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * string_custom_attribute["key1"]. - * * numeric_custom_attribute: histogram by numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - * group results by. - * Example expressions: - * * `count(admin1)` - * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - * bucket(100000, MAX)])` - * * `count(string_custom_attribute["some-string-custom-attribute"])` - * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - * - * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHistogramQueries() - { - return $this->histogram_queries; - } - - /** - * An expression specifies a histogram request against matching jobs. - * Expression syntax is an aggregation function call with histogram facets and - * other options. - * Available aggregation function calls are: - * * `count(string_histogram_facet)`: Count the number of matching entities, - * for each distinct attribute value. - * * `count(numeric_histogram_facet, list of buckets)`: Count the number of - * matching entities within each bucket. - * A maximum of 200 histogram buckets are supported. - * Data types: - * * Histogram facet: facet names with format `[a-zA-Z][a-zA-Z0-9_]+`. - * * String: string like "any string with backslash escape for quote(\")." - * * Number: whole number and floating point number like 10, -1 and -0.01. - * * List: list of elements with comma(,) separator surrounded by square - * brackets, for example, [1, 2, 3] and ["one", "two", "three"]. - * Built-in constants: - * * MIN (minimum number similar to java Double.MIN_VALUE) - * * MAX (maximum number similar to java Double.MAX_VALUE) - * Built-in functions: - * * bucket(start, end[, label]): bucket built-in function creates a bucket - * with range of [start, end). Note that the end is exclusive, for example, - * bucket(1, MAX, "positive number") or bucket(1, 10). - * Job histogram facets: - * * company_display_name: histogram by - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name]. - * * employment_type: histogram by - * [Job.employment_types][google.cloud.talent.v4.Job.employment_types], for - * example, - * "FULL_TIME", "PART_TIME". - * * company_size (DEPRECATED): histogram by - * [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL", - * "MEDIUM", "BIG". - * * publish_time_in_day: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in days. - * Must specify list of numeric buckets in spec. - * * publish_time_in_month: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in months. - * Must specify list of numeric buckets in spec. - * * publish_time_in_year: histogram by the - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * in years. - * Must specify list of numeric buckets in spec. - * * degree_types: histogram by the - * [Job.degree_types][google.cloud.talent.v4.Job.degree_types], for example, - * "Bachelors", "Masters". - * * job_level: histogram by the - * [Job.job_level][google.cloud.talent.v4.Job.job_level], for example, "Entry - * Level". - * * country: histogram by the country code of jobs, for example, "US", "FR". - * * admin1: histogram by the admin1 code of jobs, which is a global - * placeholder referring to the state, province, or the particular term a - * country uses to define the geographic structure below the country level, - * for example, "CA", "IL". - * * city: histogram by a combination of the "city name, admin1 code". For - * example, "Mountain View, CA", "New York, NY". - * * admin1_country: histogram by a combination of the "admin1 code, country", - * for example, "CA, US", "IL, US". - * * city_coordinate: histogram by the city center's GPS coordinates (latitude - * and longitude), for example, 37.4038522,-122.0987765. Since the - * coordinates of a city center can change, customers may need to refresh - * them periodically. - * * locale: histogram by the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], for example, - * "en-US", - * "fr-FR". - * * language: histogram by the language subtag of the - * [Job.language_code][google.cloud.talent.v4.Job.language_code], - * for example, "en", "fr". - * * category: histogram by the - * [JobCategory][google.cloud.talent.v4.JobCategory], for example, - * "COMPUTER_AND_IT", "HEALTHCARE". - * * base_compensation_unit: histogram by the - * [CompensationInfo.CompensationUnit][google.cloud.talent.v4.CompensationInfo.CompensationUnit] - * of base salary, for example, "WEEKLY", "MONTHLY". - * * base_compensation: histogram by the base salary. Must specify list of - * numeric buckets to group results by. - * * annualized_base_compensation: histogram by the base annualized salary. - * Must specify list of numeric buckets to group results by. - * * annualized_total_compensation: histogram by the total annualized salary. - * Must specify list of numeric buckets to group results by. - * * string_custom_attribute: histogram by string - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * string_custom_attribute["key1"]. - * * numeric_custom_attribute: histogram by numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]. - * Values can be accessed via square bracket notations like - * numeric_custom_attribute["key1"]. Must specify list of numeric buckets to - * group results by. - * Example expressions: - * * `count(admin1)` - * * `count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000), - * bucket(100000, MAX)])` - * * `count(string_custom_attribute["some-string-custom-attribute"])` - * * `count(numeric_custom_attribute["some-numeric-custom-attribute"], - * [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])` - * - * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQuery histogram_queries = 7; - * @param array<\Google\Cloud\Talent\V4\HistogramQuery>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHistogramQueries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\HistogramQuery::class); - $this->histogram_queries = $arr; - - return $this; - } - - /** - * The desired job attributes returned for jobs in the search response. - * Defaults to - * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if - * no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 8; - * @return int - */ - public function getJobView() - { - return $this->job_view; - } - - /** - * The desired job attributes returned for jobs in the search response. - * Defaults to - * [JobView.JOB_VIEW_SMALL][google.cloud.talent.v4.JobView.JOB_VIEW_SMALL] if - * no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.JobView job_view = 8; - * @param int $var - * @return $this - */ - public function setJobView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\JobView::class); - $this->job_view = $var; - - return $this; - } - - /** - * An integer that specifies the current offset (that is, starting result - * location, amongst the jobs deemed by the API as relevant) in search - * results. This field is only considered if - * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. - * The maximum allowed value is 5000. Otherwise an error is thrown. - * For example, 0 means to return results starting from the first matching - * job, and 10 means to return from the 11th job. This can be used for - * pagination, (for example, pageSize = 10 and offset = 10 means to return - * from the second page). - * - * Generated from protobuf field int32 offset = 9; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * An integer that specifies the current offset (that is, starting result - * location, amongst the jobs deemed by the API as relevant) in search - * results. This field is only considered if - * [page_token][google.cloud.talent.v4.SearchJobsRequest.page_token] is unset. - * The maximum allowed value is 5000. Otherwise an error is thrown. - * For example, 0 means to return results starting from the first matching - * job, and 10 means to return from the 11th job. This can be used for - * pagination, (for example, pageSize = 10 and offset = 10 means to return - * from the second page). - * - * Generated from protobuf field int32 offset = 9; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - - /** - * A limit on the number of jobs returned in the search results. - * Increasing this value above the default value of 10 can increase search - * response time. The value can be between 1 and 100. - * - * Generated from protobuf field int32 max_page_size = 10; - * @return int - */ - public function getMaxPageSize() - { - return $this->max_page_size; - } - - /** - * A limit on the number of jobs returned in the search results. - * Increasing this value above the default value of 10 can increase search - * response time. The value can be between 1 and 100. - * - * Generated from protobuf field int32 max_page_size = 10; - * @param int $var - * @return $this - */ - public function setMaxPageSize($var) - { - GPBUtil::checkInt32($var); - $this->max_page_size = $var; - - return $this; - } - - /** - * The token specifying the current offset within - * search results. See - * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] - * for an explanation of how to obtain the next set of query results. - * - * Generated from protobuf field string page_token = 11; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The token specifying the current offset within - * search results. See - * [SearchJobsResponse.next_page_token][google.cloud.talent.v4.SearchJobsResponse.next_page_token] - * for an explanation of how to obtain the next set of query results. - * - * Generated from protobuf field string page_token = 11; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The criteria determining how search results are sorted. Default is - * `"relevance desc"`. - * Supported options are: - * * `"relevance desc"`: By relevance descending, as determined by the API - * algorithms. Relevance thresholding of query results is only available - * with this ordering. - * * `"posting_publish_time desc"`: By - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * descending. - * * `"posting_update_time desc"`: By - * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] - * descending. - * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. - * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] - * descending. - * * `"annualized_base_compensation"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_base_compensation desc"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"annualized_total_compensation"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_total_compensation desc"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"custom_ranking desc"`: By the relevance score adjusted to the - * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * with weight factor assigned by - * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] - * in descending order. - * * Location sorting: Use the special syntax to order jobs by distance:
- * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - * multiple locations. See details below.
- * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - * multiple locations. See details below.
- * The string can have a maximum of 256 characters. When multiple distance - * centers are provided, a job that is close to any of the distance centers - * would have a high rank. When a job has multiple locations, the job - * location closest to one of the distance centers will be used. Jobs that - * don't have locations will be ranked at the bottom. Distance is calculated - * with a precision of 11.3 meters (37.4 feet). Diversification strategy is - * still applied unless explicitly disabled in - * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. - * - * Generated from protobuf field string order_by = 12; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The criteria determining how search results are sorted. Default is - * `"relevance desc"`. - * Supported options are: - * * `"relevance desc"`: By relevance descending, as determined by the API - * algorithms. Relevance thresholding of query results is only available - * with this ordering. - * * `"posting_publish_time desc"`: By - * [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time] - * descending. - * * `"posting_update_time desc"`: By - * [Job.posting_update_time][google.cloud.talent.v4.Job.posting_update_time] - * descending. - * * `"title"`: By [Job.title][google.cloud.talent.v4.Job.title] ascending. - * * `"title desc"`: By [Job.title][google.cloud.talent.v4.Job.title] - * descending. - * * `"annualized_base_compensation"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_base_compensation desc"`: By job's - * [CompensationInfo.annualized_base_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_base_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"annualized_total_compensation"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * ascending. Jobs whose annualized base compensation is unspecified are put - * at the end of search results. - * * `"annualized_total_compensation desc"`: By job's - * [CompensationInfo.annualized_total_compensation_range][google.cloud.talent.v4.CompensationInfo.annualized_total_compensation_range] - * descending. Jobs whose annualized base compensation is unspecified are - * put at the end of search results. - * * `"custom_ranking desc"`: By the relevance score adjusted to the - * [SearchJobsRequest.CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * with weight factor assigned by - * [SearchJobsRequest.CustomRankingInfo.importance_level][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.importance_level] - * in descending order. - * * Location sorting: Use the special syntax to order jobs by distance:
- * `"distance_from('Hawaii')"`: Order by distance from Hawaii.
- * `"distance_from(19.89, 155.5)"`: Order by distance from a coordinate.
- * `"distance_from('Hawaii'), distance_from('Puerto Rico')"`: Order by - * multiple locations. See details below.
- * `"distance_from('Hawaii'), distance_from(19.89, 155.5)"`: Order by - * multiple locations. See details below.
- * The string can have a maximum of 256 characters. When multiple distance - * centers are provided, a job that is close to any of the distance centers - * would have a high rank. When a job has multiple locations, the job - * location closest to one of the distance centers will be used. Jobs that - * don't have locations will be ranked at the bottom. Distance is calculated - * with a precision of 11.3 meters (37.4 feet). Diversification strategy is - * still applied unless explicitly disabled in - * [diversification_level][google.cloud.talent.v4.SearchJobsRequest.diversification_level]. - * - * Generated from protobuf field string order_by = 12; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Controls whether highly similar jobs are returned next to each other in - * the search results. Jobs are identified as highly similar based on - * their titles, job categories, and locations. Highly similar results are - * clustered so that only one representative job of the cluster is - * displayed to the job seeker higher up in the results, with the other jobs - * being displayed lower down in the results. - * Defaults to - * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] - * if no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; - * @return int - */ - public function getDiversificationLevel() - { - return $this->diversification_level; - } - - /** - * Controls whether highly similar jobs are returned next to each other in - * the search results. Jobs are identified as highly similar based on - * their titles, job categories, and locations. Highly similar results are - * clustered so that only one representative job of the cluster is - * displayed to the job seeker higher up in the results, with the other jobs - * being displayed lower down in the results. - * Defaults to - * [DiversificationLevel.SIMPLE][google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel.SIMPLE] - * if no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel diversification_level = 13; - * @param int $var - * @return $this - */ - public function setDiversificationLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\DiversificationLevel::class); - $this->diversification_level = $var; - - return $this; - } - - /** - * Controls over how job documents get ranked on top of existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; - * @return \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo|null - */ - public function getCustomRankingInfo() - { - return $this->custom_ranking_info; - } - - public function hasCustomRankingInfo() - { - return isset($this->custom_ranking_info); - } - - public function clearCustomRankingInfo() - { - unset($this->custom_ranking_info); - } - - /** - * Controls over how job documents get ranked on top of existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo custom_ranking_info = 14; - * @param \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo $var - * @return $this - */ - public function setCustomRankingInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo::class); - $this->custom_ranking_info = $var; - - return $this; - } - - /** - * This field is deprecated. Please use - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * going forward. - * To migrate, disable_keyword_match set to false maps to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], - * and disable_keyword_match set to true maps to - * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. - * If - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * is set, this field is ignored. - * Controls whether to disable exact keyword match on - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.description][google.cloud.talent.v4.Job.description], - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], - * [Job.addresses][google.cloud.talent.v4.Job.addresses], - * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When - * disable keyword match is turned off, a keyword match returns jobs that do - * not match given category filters when there are matching keywords. For - * example, for the query "program manager," a result is returned even if the - * job posting has the title "software developer," which doesn't fall into - * "program manager" ontology, but does have "program manager" appearing in - * its description. - * For queries like "cloud" that don't contain title or - * location specific ontology, jobs with "cloud" keyword matches are returned - * regardless of this flag's value. - * Use - * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] - * if company-specific globally matched custom field/attribute string values - * are needed. Enabling keyword match improves recall of subsequent search - * requests. - * Defaults to false. - * - * Generated from protobuf field bool disable_keyword_match = 16 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getDisableKeywordMatch() - { - @trigger_error('disable_keyword_match is deprecated.', E_USER_DEPRECATED); - return $this->disable_keyword_match; - } - - /** - * This field is deprecated. Please use - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * going forward. - * To migrate, disable_keyword_match set to false maps to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], - * and disable_keyword_match set to true maps to - * [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. - * If - * [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] - * is set, this field is ignored. - * Controls whether to disable exact keyword match on - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.description][google.cloud.talent.v4.Job.description], - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], - * [Job.addresses][google.cloud.talent.v4.Job.addresses], - * [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When - * disable keyword match is turned off, a keyword match returns jobs that do - * not match given category filters when there are matching keywords. For - * example, for the query "program manager," a result is returned even if the - * job posting has the title "software developer," which doesn't fall into - * "program manager" ontology, but does have "program manager" appearing in - * its description. - * For queries like "cloud" that don't contain title or - * location specific ontology, jobs with "cloud" keyword matches are returned - * regardless of this flag's value. - * Use - * [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] - * if company-specific globally matched custom field/attribute string values - * are needed. Enabling keyword match improves recall of subsequent search - * requests. - * Defaults to false. - * - * Generated from protobuf field bool disable_keyword_match = 16 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setDisableKeywordMatch($var) - { - @trigger_error('disable_keyword_match is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->disable_keyword_match = $var; - - return $this; - } - - /** - * Controls what keyword match options to use. If both keyword_match_mode and - * disable_keyword_match are set, keyword_match_mode will take precedence. - * Defaults to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] - * if no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode keyword_match_mode = 18; - * @return int - */ - public function getKeywordMatchMode() - { - return $this->keyword_match_mode; - } - - /** - * Controls what keyword match options to use. If both keyword_match_mode and - * disable_keyword_match are set, keyword_match_mode will take precedence. - * Defaults to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] - * if no value is specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode keyword_match_mode = 18; - * @param int $var - * @return $this - */ - public function setKeywordMatchMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\KeywordMatchMode::class); - $this->keyword_match_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php deleted file mode 100644 index 36cf85ca6dae..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo - */ -class CustomRankingInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Controls over how important the score of - * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * gets applied to job's final ranking position. - * An error is thrown if not specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $importance_level = 0; - /** - * Required. Controls over how job documents get ranked on top of existing - * relevance score (determined by API algorithm). A combination of the - * ranking expression and relevance score is used to determine job's final - * ranking position. - * The syntax for this expression is a subset of Google SQL syntax. - * Supported operators are: +, -, *, /, where the left and right side of - * the operator is either a numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * key, integer/double value or an expression that can be evaluated to a - * number. - * Parenthesis are supported to adjust calculation precedence. The - * expression must be < 200 characters in length. - * The expression is considered invalid for a job if the expression - * references custom attributes that are not populated on the job or if the - * expression results in a divide by zero. If an expression is invalid for a - * job, that job is demoted to the end of the results. - * Sample ranking expression - * (year + 25) * 0.25 - (freshness / 0.5) - * - * Generated from protobuf field string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ranking_expression = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $importance_level - * Required. Controls over how important the score of - * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * gets applied to job's final ranking position. - * An error is thrown if not specified. - * @type string $ranking_expression - * Required. Controls over how job documents get ranked on top of existing - * relevance score (determined by API algorithm). A combination of the - * ranking expression and relevance score is used to determine job's final - * ranking position. - * The syntax for this expression is a subset of Google SQL syntax. - * Supported operators are: +, -, *, /, where the left and right side of - * the operator is either a numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * key, integer/double value or an expression that can be evaluated to a - * number. - * Parenthesis are supported to adjust calculation precedence. The - * expression must be < 200 characters in length. - * The expression is considered invalid for a job if the expression - * references custom attributes that are not populated on the job or if the - * expression results in a divide by zero. If an expression is invalid for a - * job, that job is demoted to the end of the results. - * Sample ranking expression - * (year + 25) * 0.25 - (freshness / 0.5) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Controls over how important the score of - * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * gets applied to job's final ranking position. - * An error is thrown if not specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getImportanceLevel() - { - return $this->importance_level; - } - - /** - * Required. Controls over how important the score of - * [CustomRankingInfo.ranking_expression][google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ranking_expression] - * gets applied to job's final ranking position. - * An error is thrown if not specified. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel importance_level = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setImportanceLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4\SearchJobsRequest\CustomRankingInfo\ImportanceLevel::class); - $this->importance_level = $var; - - return $this; - } - - /** - * Required. Controls over how job documents get ranked on top of existing - * relevance score (determined by API algorithm). A combination of the - * ranking expression and relevance score is used to determine job's final - * ranking position. - * The syntax for this expression is a subset of Google SQL syntax. - * Supported operators are: +, -, *, /, where the left and right side of - * the operator is either a numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * key, integer/double value or an expression that can be evaluated to a - * number. - * Parenthesis are supported to adjust calculation precedence. The - * expression must be < 200 characters in length. - * The expression is considered invalid for a job if the expression - * references custom attributes that are not populated on the job or if the - * expression results in a divide by zero. If an expression is invalid for a - * job, that job is demoted to the end of the results. - * Sample ranking expression - * (year + 25) * 0.25 - (freshness / 0.5) - * - * Generated from protobuf field string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRankingExpression() - { - return $this->ranking_expression; - } - - /** - * Required. Controls over how job documents get ranked on top of existing - * relevance score (determined by API algorithm). A combination of the - * ranking expression and relevance score is used to determine job's final - * ranking position. - * The syntax for this expression is a subset of Google SQL syntax. - * Supported operators are: +, -, *, /, where the left and right side of - * the operator is either a numeric - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * key, integer/double value or an expression that can be evaluated to a - * number. - * Parenthesis are supported to adjust calculation precedence. The - * expression must be < 200 characters in length. - * The expression is considered invalid for a job if the expression - * references custom attributes that are not populated on the job or if the - * expression results in a divide by zero. If an expression is invalid for a - * job, that job is demoted to the end of the results. - * Sample ranking expression - * (year + 25) * 0.25 - (freshness / 0.5) - * - * Generated from protobuf field string ranking_expression = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRankingExpression($var) - { - GPBUtil::checkString($var, True); - $this->ranking_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomRankingInfo::class, \Google\Cloud\Talent\V4\SearchJobsRequest_CustomRankingInfo::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php deleted file mode 100644 index 7f7fe32881a3..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/CustomRankingInfo/ImportanceLevel.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.talent.v4.SearchJobsRequest.CustomRankingInfo.ImportanceLevel - */ -class ImportanceLevel -{ - /** - * Default value if the importance level isn't specified. - * - * Generated from protobuf enum IMPORTANCE_LEVEL_UNSPECIFIED = 0; - */ - const IMPORTANCE_LEVEL_UNSPECIFIED = 0; - /** - * The given ranking expression is of None importance, existing relevance - * score (determined by API algorithm) dominates job's final ranking - * position. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * The given ranking expression is of Low importance in terms of job's - * final ranking position compared to existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf enum LOW = 2; - */ - const LOW = 2; - /** - * The given ranking expression is of Mild importance in terms of job's - * final ranking position compared to existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf enum MILD = 3; - */ - const MILD = 3; - /** - * The given ranking expression is of Medium importance in terms of job's - * final ranking position compared to existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf enum MEDIUM = 4; - */ - const MEDIUM = 4; - /** - * The given ranking expression is of High importance in terms of job's - * final ranking position compared to existing relevance - * score (determined by API algorithm). - * - * Generated from protobuf enum HIGH = 5; - */ - const HIGH = 5; - /** - * The given ranking expression is of Extreme importance, and dominates - * job's final ranking position with existing relevance - * score (determined by API algorithm) ignored. - * - * Generated from protobuf enum EXTREME = 6; - */ - const EXTREME = 6; - - private static $valueToName = [ - self::IMPORTANCE_LEVEL_UNSPECIFIED => 'IMPORTANCE_LEVEL_UNSPECIFIED', - self::NONE => 'NONE', - self::LOW => 'LOW', - self::MILD => 'MILD', - self::MEDIUM => 'MEDIUM', - self::HIGH => 'HIGH', - self::EXTREME => 'EXTREME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImportanceLevel::class, \Google\Cloud\Talent\V4\SearchJobsRequest_CustomRankingInfo_ImportanceLevel::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php deleted file mode 100644 index fcedc3640958..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/DiversificationLevel.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.talent.v4.SearchJobsRequest.DiversificationLevel - */ -class DiversificationLevel -{ - /** - * The diversification level isn't specified. - * - * Generated from protobuf enum DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; - */ - const DIVERSIFICATION_LEVEL_UNSPECIFIED = 0; - /** - * Disables diversification. Jobs that would normally be pushed to the last - * page would not have their positions altered. This may result in highly - * similar jobs appearing in sequence in the search results. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Default diversifying behavior. The result list is ordered so that - * highly similar results are pushed to the end of the last page of search - * results. - * - * Generated from protobuf enum SIMPLE = 2; - */ - const SIMPLE = 2; - /** - * Only one job from the same company will be shown at once, other jobs - * under same company are pushed to the end of the last page of search - * result. - * - * Generated from protobuf enum ONE_PER_COMPANY = 3; - */ - const ONE_PER_COMPANY = 3; - /** - * Similar to ONE_PER_COMPANY, but it allows at most two jobs in the - * same company to be shown at once, the other jobs under same company are - * pushed to the end of the last page of search result. - * - * Generated from protobuf enum TWO_PER_COMPANY = 4; - */ - const TWO_PER_COMPANY = 4; - /** - * Similar to ONE_PER_COMPANY, but it allows at most three jobs in the - * same company to be shown at once, the other jobs under same company are - * dropped. - * - * Generated from protobuf enum MAX_THREE_PER_COMPANY = 6; - */ - const MAX_THREE_PER_COMPANY = 6; - /** - * The result list is ordered such that somewhat similar results are pushed - * to the end of the last page of the search results. This option is - * recommended if SIMPLE diversification does not diversify enough. - * - * Generated from protobuf enum DIVERSIFY_BY_LOOSER_SIMILARITY = 5; - */ - const DIVERSIFY_BY_LOOSER_SIMILARITY = 5; - - private static $valueToName = [ - self::DIVERSIFICATION_LEVEL_UNSPECIFIED => 'DIVERSIFICATION_LEVEL_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::SIMPLE => 'SIMPLE', - self::ONE_PER_COMPANY => 'ONE_PER_COMPANY', - self::TWO_PER_COMPANY => 'TWO_PER_COMPANY', - self::MAX_THREE_PER_COMPANY => 'MAX_THREE_PER_COMPANY', - self::DIVERSIFY_BY_LOOSER_SIMILARITY => 'DIVERSIFY_BY_LOOSER_SIMILARITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiversificationLevel::class, \Google\Cloud\Talent\V4\SearchJobsRequest_DiversificationLevel::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php deleted file mode 100644 index 16211225deb8..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/KeywordMatchMode.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode - */ -class KeywordMatchMode -{ - /** - * The keyword match option isn't specified. Defaults to - * [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] - * behavior. - * - * Generated from protobuf enum KEYWORD_MATCH_MODE_UNSPECIFIED = 0; - */ - const KEYWORD_MATCH_MODE_UNSPECIFIED = 0; - /** - * Disables keyword matching. - * - * Generated from protobuf enum KEYWORD_MATCH_DISABLED = 1; - */ - const KEYWORD_MATCH_DISABLED = 1; - /** - * Enable keyword matching over - * [Job.title][google.cloud.talent.v4.Job.title], - * [Job.description][google.cloud.talent.v4.Job.description], - * [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], - * [Job.addresses][google.cloud.talent.v4.Job.addresses], - * [Job.qualifications][google.cloud.talent.v4.Job.qualifications], and - * keyword searchable - * [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes] - * fields. - * - * Generated from protobuf enum KEYWORD_MATCH_ALL = 2; - */ - const KEYWORD_MATCH_ALL = 2; - /** - * Only enable keyword matching over - * [Job.title][google.cloud.talent.v4.Job.title]. - * - * Generated from protobuf enum KEYWORD_MATCH_TITLE_ONLY = 3; - */ - const KEYWORD_MATCH_TITLE_ONLY = 3; - - private static $valueToName = [ - self::KEYWORD_MATCH_MODE_UNSPECIFIED => 'KEYWORD_MATCH_MODE_UNSPECIFIED', - self::KEYWORD_MATCH_DISABLED => 'KEYWORD_MATCH_DISABLED', - self::KEYWORD_MATCH_ALL => 'KEYWORD_MATCH_ALL', - self::KEYWORD_MATCH_TITLE_ONLY => 'KEYWORD_MATCH_TITLE_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KeywordMatchMode::class, \Google\Cloud\Talent\V4\SearchJobsRequest_KeywordMatchMode::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php deleted file mode 100644 index 6ffe99fb7d5e..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsRequest/SearchMode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.talent.v4.SearchJobsRequest.SearchMode - */ -class SearchMode -{ - /** - * The mode of the search method isn't specified. The default search - * behavior is identical to JOB_SEARCH search behavior. - * - * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; - */ - const SEARCH_MODE_UNSPECIFIED = 0; - /** - * The job search matches against all jobs, and featured jobs - * (jobs with promotionValue > 0) are not specially handled. - * - * Generated from protobuf enum JOB_SEARCH = 1; - */ - const JOB_SEARCH = 1; - /** - * The job search matches only against featured jobs (jobs with a - * promotionValue > 0). This method doesn't return any jobs having a - * promotionValue <= 0. The search results order is determined by the - * promotionValue (jobs with a higher promotionValue are returned higher up - * in the search results), with relevance being used as a tiebreaker. - * - * Generated from protobuf enum FEATURED_JOB_SEARCH = 2; - */ - const FEATURED_JOB_SEARCH = 2; - - private static $valueToName = [ - self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', - self::JOB_SEARCH => 'JOB_SEARCH', - self::FEATURED_JOB_SEARCH => 'FEATURED_JOB_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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchMode::class, \Google\Cloud\Talent\V4\SearchJobsRequest_SearchMode::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php deleted file mode 100644 index e643af367644..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse.php +++ /dev/null @@ -1,381 +0,0 @@ -google.cloud.talent.v4.SearchJobsResponse - */ -class SearchJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Job entities that match the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; - */ - private $matching_jobs; - /** - * The histogram results that match with specified - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; - */ - private $histogram_query_results; - /** - * The token that specifies the starting position of the next page of results. - * This field is empty if there are no more results. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - /** - * The location filters that the service applied to the specified query. If - * any filters are lat-lng based, the - * [Location.location_type][google.cloud.talent.v4.Location.location_type] is - * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Location location_filters = 4; - */ - private $location_filters; - /** - * Number of jobs that match the specified query. - * Note: This size is precise only if the total is less than 100,000. - * - * Generated from protobuf field int32 total_size = 6; - */ - protected $total_size = 0; - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 7; - */ - protected $metadata = null; - /** - * If query broadening is enabled, we may append additional results from the - * broadened query. This number indicates how many of the jobs returned in the - * jobs field are from the broadened query. These results are always at the - * end of the jobs list. In particular, a value of 0, or if the field isn't - * set, all the jobs in the jobs list are from the original - * (without broadening) query. If this field is non-zero, subsequent requests - * with offset after this result set should contain all broadened results. - * - * Generated from protobuf field int32 broadened_query_jobs_count = 8; - */ - protected $broadened_query_jobs_count = 0; - /** - * The spell checking result, and correction. - * - * Generated from protobuf field .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; - */ - protected $spell_correction = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Talent\V4\SearchJobsResponse\MatchingJob>|\Google\Protobuf\Internal\RepeatedField $matching_jobs - * The Job entities that match the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * @type array<\Google\Cloud\Talent\V4\HistogramQueryResult>|\Google\Protobuf\Internal\RepeatedField $histogram_query_results - * The histogram results that match with specified - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. - * @type string $next_page_token - * The token that specifies the starting position of the next page of results. - * This field is empty if there are no more results. - * @type array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $location_filters - * The location filters that the service applied to the specified query. If - * any filters are lat-lng based, the - * [Location.location_type][google.cloud.talent.v4.Location.location_type] is - * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. - * @type int $total_size - * Number of jobs that match the specified query. - * Note: This size is precise only if the total is less than 100,000. - * @type \Google\Cloud\Talent\V4\ResponseMetadata $metadata - * Additional information for the API invocation, such as the request - * tracking id. - * @type int $broadened_query_jobs_count - * If query broadening is enabled, we may append additional results from the - * broadened query. This number indicates how many of the jobs returned in the - * jobs field are from the broadened query. These results are always at the - * end of the jobs list. In particular, a value of 0, or if the field isn't - * set, all the jobs in the jobs list are from the original - * (without broadening) query. If this field is non-zero, subsequent requests - * with offset after this result set should contain all broadened results. - * @type \Google\Cloud\Talent\V4\SpellingCorrection $spell_correction - * The spell checking result, and correction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * The Job entities that match the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMatchingJobs() - { - return $this->matching_jobs; - } - - /** - * The Job entities that match the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.SearchJobsResponse.MatchingJob matching_jobs = 1; - * @param array<\Google\Cloud\Talent\V4\SearchJobsResponse\MatchingJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMatchingJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\SearchJobsResponse\MatchingJob::class); - $this->matching_jobs = $arr; - - return $this; - } - - /** - * The histogram results that match with specified - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHistogramQueryResults() - { - return $this->histogram_query_results; - } - - /** - * The histogram results that match with specified - * [SearchJobsRequest.histogram_queries][google.cloud.talent.v4.SearchJobsRequest.histogram_queries]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.HistogramQueryResult histogram_query_results = 2; - * @param array<\Google\Cloud\Talent\V4\HistogramQueryResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHistogramQueryResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\HistogramQueryResult::class); - $this->histogram_query_results = $arr; - - return $this; - } - - /** - * The token that specifies the starting position of the next page of results. - * This field is empty if there are no more results. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token that specifies the starting position of the next page of results. - * This field is empty if there are no more results. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The location filters that the service applied to the specified query. If - * any filters are lat-lng based, the - * [Location.location_type][google.cloud.talent.v4.Location.location_type] is - * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Location location_filters = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocationFilters() - { - return $this->location_filters; - } - - /** - * The location filters that the service applied to the specified query. If - * any filters are lat-lng based, the - * [Location.location_type][google.cloud.talent.v4.Location.location_type] is - * [Location.LocationType.LOCATION_TYPE_UNSPECIFIED][google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED]. - * - * Generated from protobuf field repeated .google.cloud.talent.v4.Location location_filters = 4; - * @param array<\Google\Cloud\Talent\V4\Location>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocationFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Talent\V4\Location::class); - $this->location_filters = $arr; - - return $this; - } - - /** - * Number of jobs that match the specified query. - * Note: This size is precise only if the total is less than 100,000. - * - * Generated from protobuf field int32 total_size = 6; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * Number of jobs that match the specified query. - * Note: This size is precise only if the total is less than 100,000. - * - * Generated from protobuf field int32 total_size = 6; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 7; - * @return \Google\Cloud\Talent\V4\ResponseMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Additional information for the API invocation, such as the request - * tracking id. - * - * Generated from protobuf field .google.cloud.talent.v4.ResponseMetadata metadata = 7; - * @param \Google\Cloud\Talent\V4\ResponseMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\ResponseMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * If query broadening is enabled, we may append additional results from the - * broadened query. This number indicates how many of the jobs returned in the - * jobs field are from the broadened query. These results are always at the - * end of the jobs list. In particular, a value of 0, or if the field isn't - * set, all the jobs in the jobs list are from the original - * (without broadening) query. If this field is non-zero, subsequent requests - * with offset after this result set should contain all broadened results. - * - * Generated from protobuf field int32 broadened_query_jobs_count = 8; - * @return int - */ - public function getBroadenedQueryJobsCount() - { - return $this->broadened_query_jobs_count; - } - - /** - * If query broadening is enabled, we may append additional results from the - * broadened query. This number indicates how many of the jobs returned in the - * jobs field are from the broadened query. These results are always at the - * end of the jobs list. In particular, a value of 0, or if the field isn't - * set, all the jobs in the jobs list are from the original - * (without broadening) query. If this field is non-zero, subsequent requests - * with offset after this result set should contain all broadened results. - * - * Generated from protobuf field int32 broadened_query_jobs_count = 8; - * @param int $var - * @return $this - */ - public function setBroadenedQueryJobsCount($var) - { - GPBUtil::checkInt32($var); - $this->broadened_query_jobs_count = $var; - - return $this; - } - - /** - * The spell checking result, and correction. - * - * Generated from protobuf field .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; - * @return \Google\Cloud\Talent\V4\SpellingCorrection|null - */ - public function getSpellCorrection() - { - return $this->spell_correction; - } - - public function hasSpellCorrection() - { - return isset($this->spell_correction); - } - - public function clearSpellCorrection() - { - unset($this->spell_correction); - } - - /** - * The spell checking result, and correction. - * - * Generated from protobuf field .google.cloud.talent.v4.SpellingCorrection spell_correction = 9; - * @param \Google\Cloud\Talent\V4\SpellingCorrection $var - * @return $this - */ - public function setSpellCorrection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\SpellingCorrection::class); - $this->spell_correction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php deleted file mode 100644 index 95ec4e8c8266..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/CommuteInfo.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.talent.v4.SearchJobsResponse.CommuteInfo - */ -class CommuteInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Location used as the destination in the commute calculation. - * - * Generated from protobuf field .google.cloud.talent.v4.Location job_location = 1; - */ - protected $job_location = null; - /** - * The number of seconds required to travel to the job location from the - * query location. A duration of 0 seconds indicates that the job isn't - * reachable within the requested duration, but was returned as part of an - * expanded query. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - */ - protected $travel_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Location $job_location - * Location used as the destination in the commute calculation. - * @type \Google\Protobuf\Duration $travel_duration - * The number of seconds required to travel to the job location from the - * query location. A duration of 0 seconds indicates that the job isn't - * reachable within the requested duration, but was returned as part of an - * expanded query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Location used as the destination in the commute calculation. - * - * Generated from protobuf field .google.cloud.talent.v4.Location job_location = 1; - * @return \Google\Cloud\Talent\V4\Location|null - */ - public function getJobLocation() - { - return $this->job_location; - } - - public function hasJobLocation() - { - return isset($this->job_location); - } - - public function clearJobLocation() - { - unset($this->job_location); - } - - /** - * Location used as the destination in the commute calculation. - * - * Generated from protobuf field .google.cloud.talent.v4.Location job_location = 1; - * @param \Google\Cloud\Talent\V4\Location $var - * @return $this - */ - public function setJobLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Location::class); - $this->job_location = $var; - - return $this; - } - - /** - * The number of seconds required to travel to the job location from the - * query location. A duration of 0 seconds indicates that the job isn't - * reachable within the requested duration, but was returned as part of an - * expanded query. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * The number of seconds required to travel to the job location from the - * query location. A duration of 0 seconds indicates that the job isn't - * reachable within the requested duration, but was returned as part of an - * expanded query. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CommuteInfo::class, \Google\Cloud\Talent\V4\SearchJobsResponse_CommuteInfo::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php deleted file mode 100644 index e0144a2c4ed7..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SearchJobsResponse/MatchingJob.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.talent.v4.SearchJobsResponse.MatchingJob - */ -class MatchingJob extends \Google\Protobuf\Internal\Message -{ - /** - * Job resource that matches the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; - */ - protected $job = null; - /** - * A summary of the job with core information that's displayed on the search - * results listing page. - * - * Generated from protobuf field string job_summary = 2; - */ - protected $job_summary = ''; - /** - * Contains snippets of text from the - * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching - * a search query's keywords, if available. The matching query keywords are - * enclosed in HTML bold tags. - * - * Generated from protobuf field string job_title_snippet = 3; - */ - protected $job_title_snippet = ''; - /** - * Contains snippets of text from the - * [Job.description][google.cloud.talent.v4.Job.description] and similar - * fields that most closely match a search query's keywords, if available. - * All HTML tags in the original fields are stripped when returned in this - * field, and matching query keywords are enclosed in HTML bold tags. - * - * Generated from protobuf field string search_text_snippet = 4; - */ - protected $search_text_snippet = ''; - /** - * Commute information which is generated based on specified - * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; - */ - protected $commute_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Job $job - * Job resource that matches the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * @type string $job_summary - * A summary of the job with core information that's displayed on the search - * results listing page. - * @type string $job_title_snippet - * Contains snippets of text from the - * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching - * a search query's keywords, if available. The matching query keywords are - * enclosed in HTML bold tags. - * @type string $search_text_snippet - * Contains snippets of text from the - * [Job.description][google.cloud.talent.v4.Job.description] and similar - * fields that most closely match a search query's keywords, if available. - * All HTML tags in the original fields are stripped when returned in this - * field, and matching query keywords are enclosed in HTML bold tags. - * @type \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo $commute_info - * Commute information which is generated based on specified - * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Job resource that matches the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; - * @return \Google\Cloud\Talent\V4\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Job resource that matches the specified - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1; - * @param \Google\Cloud\Talent\V4\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); - $this->job = $var; - - return $this; - } - - /** - * A summary of the job with core information that's displayed on the search - * results listing page. - * - * Generated from protobuf field string job_summary = 2; - * @return string - */ - public function getJobSummary() - { - return $this->job_summary; - } - - /** - * A summary of the job with core information that's displayed on the search - * results listing page. - * - * Generated from protobuf field string job_summary = 2; - * @param string $var - * @return $this - */ - public function setJobSummary($var) - { - GPBUtil::checkString($var, True); - $this->job_summary = $var; - - return $this; - } - - /** - * Contains snippets of text from the - * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching - * a search query's keywords, if available. The matching query keywords are - * enclosed in HTML bold tags. - * - * Generated from protobuf field string job_title_snippet = 3; - * @return string - */ - public function getJobTitleSnippet() - { - return $this->job_title_snippet; - } - - /** - * Contains snippets of text from the - * [Job.title][google.cloud.talent.v4.Job.title] field most closely matching - * a search query's keywords, if available. The matching query keywords are - * enclosed in HTML bold tags. - * - * Generated from protobuf field string job_title_snippet = 3; - * @param string $var - * @return $this - */ - public function setJobTitleSnippet($var) - { - GPBUtil::checkString($var, True); - $this->job_title_snippet = $var; - - return $this; - } - - /** - * Contains snippets of text from the - * [Job.description][google.cloud.talent.v4.Job.description] and similar - * fields that most closely match a search query's keywords, if available. - * All HTML tags in the original fields are stripped when returned in this - * field, and matching query keywords are enclosed in HTML bold tags. - * - * Generated from protobuf field string search_text_snippet = 4; - * @return string - */ - public function getSearchTextSnippet() - { - return $this->search_text_snippet; - } - - /** - * Contains snippets of text from the - * [Job.description][google.cloud.talent.v4.Job.description] and similar - * fields that most closely match a search query's keywords, if available. - * All HTML tags in the original fields are stripped when returned in this - * field, and matching query keywords are enclosed in HTML bold tags. - * - * Generated from protobuf field string search_text_snippet = 4; - * @param string $var - * @return $this - */ - public function setSearchTextSnippet($var) - { - GPBUtil::checkString($var, True); - $this->search_text_snippet = $var; - - return $this; - } - - /** - * Commute information which is generated based on specified - * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; - * @return \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo|null - */ - public function getCommuteInfo() - { - return $this->commute_info; - } - - public function hasCommuteInfo() - { - return isset($this->commute_info); - } - - public function clearCommuteInfo() - { - unset($this->commute_info); - } - - /** - * Commute information which is generated based on specified - * [CommuteFilter][google.cloud.talent.v4.CommuteFilter]. - * - * Generated from protobuf field .google.cloud.talent.v4.SearchJobsResponse.CommuteInfo commute_info = 5; - * @param \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo $var - * @return $this - */ - public function setCommuteInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\SearchJobsResponse\CommuteInfo::class); - $this->commute_info = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchingJob::class, \Google\Cloud\Talent\V4\SearchJobsResponse_MatchingJob::class); - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php deleted file mode 100644 index e756ab94e1b8..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/SpellingCorrection.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.talent.v4.SpellingCorrection - */ -class SpellingCorrection extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates if the query was corrected by the spell checker. - * - * Generated from protobuf field bool corrected = 1; - */ - protected $corrected = false; - /** - * Correction output consisting of the corrected keyword string. - * - * Generated from protobuf field string corrected_text = 2; - */ - protected $corrected_text = ''; - /** - * Corrected output with html tags to highlight the corrected words. - * Corrected words are called out with the "..." html tags. - * For example, the user input query is "software enginear", where the second - * word, "enginear," is incorrect. It should be "engineer". When spelling - * correction is enabled, this value is - * "software engineer". - * - * Generated from protobuf field string corrected_html = 3; - */ - protected $corrected_html = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $corrected - * Indicates if the query was corrected by the spell checker. - * @type string $corrected_text - * Correction output consisting of the corrected keyword string. - * @type string $corrected_html - * Corrected output with html tags to highlight the corrected words. - * Corrected words are called out with the "..." html tags. - * For example, the user input query is "software enginear", where the second - * word, "enginear," is incorrect. It should be "engineer". When spelling - * correction is enabled, this value is - * "software engineer". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Indicates if the query was corrected by the spell checker. - * - * Generated from protobuf field bool corrected = 1; - * @return bool - */ - public function getCorrected() - { - return $this->corrected; - } - - /** - * Indicates if the query was corrected by the spell checker. - * - * Generated from protobuf field bool corrected = 1; - * @param bool $var - * @return $this - */ - public function setCorrected($var) - { - GPBUtil::checkBool($var); - $this->corrected = $var; - - return $this; - } - - /** - * Correction output consisting of the corrected keyword string. - * - * Generated from protobuf field string corrected_text = 2; - * @return string - */ - public function getCorrectedText() - { - return $this->corrected_text; - } - - /** - * Correction output consisting of the corrected keyword string. - * - * Generated from protobuf field string corrected_text = 2; - * @param string $var - * @return $this - */ - public function setCorrectedText($var) - { - GPBUtil::checkString($var, True); - $this->corrected_text = $var; - - return $this; - } - - /** - * Corrected output with html tags to highlight the corrected words. - * Corrected words are called out with the "..." html tags. - * For example, the user input query is "software enginear", where the second - * word, "enginear," is incorrect. It should be "engineer". When spelling - * correction is enabled, this value is - * "software engineer". - * - * Generated from protobuf field string corrected_html = 3; - * @return string - */ - public function getCorrectedHtml() - { - return $this->corrected_html; - } - - /** - * Corrected output with html tags to highlight the corrected words. - * Corrected words are called out with the "..." html tags. - * For example, the user input query is "software enginear", where the second - * word, "enginear," is incorrect. It should be "engineer". When spelling - * correction is enabled, this value is - * "software engineer". - * - * Generated from protobuf field string corrected_html = 3; - * @param string $var - * @return $this - */ - public function setCorrectedHtml($var) - { - GPBUtil::checkString($var, True); - $this->corrected_html = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php deleted file mode 100644 index a10c2defe55c..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Tenant.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.talent.v4.Tenant - */ -class Tenant extends \Google\Protobuf\Internal\Message -{ - /** - * Required during tenant update. - * The resource name for a tenant. This is generated by the service when a - * tenant is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Client side tenant identifier, used to uniquely identify the - * tenant. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required during tenant update. - * The resource name for a tenant. This is generated by the service when a - * tenant is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * @type string $external_id - * Required. Client side tenant identifier, used to uniquely identify the - * tenant. - * The maximum number of allowed characters is 255. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Tenant::initOnce(); - parent::__construct($data); - } - - /** - * Required during tenant update. - * The resource name for a tenant. This is generated by the service when a - * tenant is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required during tenant update. - * The resource name for a tenant. This is generated by the service when a - * tenant is created. - * The format is "projects/{project_id}/tenants/{tenant_id}", for example, - * "projects/foo/tenants/bar". - * - * 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. Client side tenant identifier, used to uniquely identify the - * tenant. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExternalId() - { - return $this->external_id; - } - - /** - * Required. Client side tenant identifier, used to uniquely identify the - * tenant. - * The maximum number of allowed characters is 255. - * - * Generated from protobuf field string external_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExternalId($var) - { - GPBUtil::checkString($var, True); - $this->external_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php deleted file mode 100644 index 5f006a28cc15..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/TimestampRange.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.talent.v4.TimestampRange - */ -class TimestampRange extends \Google\Protobuf\Internal\Message -{ - /** - * Begin of the period (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * End of the period (exclusive). - * - * 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 - * Begin of the period (inclusive). - * @type \Google\Protobuf\Timestamp $end_time - * End of the period (exclusive). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\Common::initOnce(); - parent::__construct($data); - } - - /** - * Begin of the period (inclusive). - * - * 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); - } - - /** - * Begin of the period (inclusive). - * - * 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 of the period (exclusive). - * - * 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 of the period (exclusive). - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php deleted file mode 100644 index 6e22017636b2..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateCompanyRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.talent.v4.UpdateCompanyRequest - */ -class UpdateCompanyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The company resource to replace the current resource in the - * system. - * - * Generated from protobuf field .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $company = null; - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] - * is provided, only the specified fields in - * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the company fields to be updated. Only - * top level fields of [Company][google.cloud.talent.v4.Company] are - * supported. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Talent\V4\Company $company Required. The company resource to replace the current resource in the - * system. - * @param \Google\Protobuf\FieldMask $updateMask Strongly recommended for the best service experience. - * - * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] - * is provided, only the specified fields in - * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. - * Otherwise all the fields are updated. - * - * A field mask to specify the company fields to be updated. Only - * top level fields of [Company][google.cloud.talent.v4.Company] are - * supported. - * - * @return \Google\Cloud\Talent\V4\UpdateCompanyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Talent\V4\Company $company, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCompany($company) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Company $company - * Required. The company resource to replace the current resource in the - * system. - * @type \Google\Protobuf\FieldMask $update_mask - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] - * is provided, only the specified fields in - * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the company fields to be updated. Only - * top level fields of [Company][google.cloud.talent.v4.Company] are - * supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\CompanyService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The company resource to replace the current resource in the - * system. - * - * Generated from protobuf field .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\Company|null - */ - public function getCompany() - { - return $this->company; - } - - public function hasCompany() - { - return isset($this->company); - } - - public function clearCompany() - { - unset($this->company); - } - - /** - * Required. The company resource to replace the current resource in the - * system. - * - * Generated from protobuf field .google.cloud.talent.v4.Company company = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\Company $var - * @return $this - */ - public function setCompany($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Company::class); - $this->company = $var; - - return $this; - } - - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] - * is provided, only the specified fields in - * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the company fields to be updated. Only - * top level fields of [Company][google.cloud.talent.v4.Company] are - * supported. - * - * 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); - } - - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateCompanyRequest.update_mask] - * is provided, only the specified fields in - * [company][google.cloud.talent.v4.UpdateCompanyRequest.company] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the company fields to be updated. Only - * top level fields of [Company][google.cloud.talent.v4.Company] are - * supported. - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php deleted file mode 100644 index 38ee2ed5227f..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateJobRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.talent.v4.UpdateJobRequest - */ -class UpdateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Job to be updated. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is - * provided, only the specified fields in - * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise - * all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Talent\V4\Job $job Required. The Job to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Strongly recommended for the best service experience. - * - * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is - * provided, only the specified fields in - * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise - * all the fields are updated. - * - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * - * @return \Google\Cloud\Talent\V4\UpdateJobRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Talent\V4\Job $job, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setJob($job) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Job $job - * Required. The Job to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is - * provided, only the specified fields in - * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise - * all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\JobService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Job to be updated. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. The Job to be updated. - * - * Generated from protobuf field .google.cloud.talent.v4.Job job = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Job::class); - $this->job = $var; - - return $this; - } - - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is - * provided, only the specified fields in - * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise - * all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * - * 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); - } - - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateJobRequest.update_mask] is - * provided, only the specified fields in - * [job][google.cloud.talent.v4.UpdateJobRequest.job] are updated. Otherwise - * all the fields are updated. - * A field mask to restrict the fields that are updated. Only - * top level fields of [Job][google.cloud.talent.v4.Job] are supported. - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php deleted file mode 100644 index a26ad78333d2..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/UpdateTenantRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.talent.v4.UpdateTenantRequest - */ -class UpdateTenantRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The tenant resource to replace the current resource in the - * system. - * - * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tenant = null; - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is - * provided, only the specified fields in - * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the tenant fields to be updated. Only - * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Talent\V4\Tenant $tenant Required. The tenant resource to replace the current resource in the - * system. - * @param \Google\Protobuf\FieldMask $updateMask Strongly recommended for the best service experience. - * - * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is - * provided, only the specified fields in - * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. - * Otherwise all the fields are updated. - * - * A field mask to specify the tenant fields to be updated. Only - * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. - * - * @return \Google\Cloud\Talent\V4\UpdateTenantRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Talent\V4\Tenant $tenant, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTenant($tenant) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Talent\V4\Tenant $tenant - * Required. The tenant resource to replace the current resource in the - * system. - * @type \Google\Protobuf\FieldMask $update_mask - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is - * provided, only the specified fields in - * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the tenant fields to be updated. Only - * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Talent\V4\TenantService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The tenant resource to replace the current resource in the - * system. - * - * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Talent\V4\Tenant|null - */ - public function getTenant() - { - return $this->tenant; - } - - public function hasTenant() - { - return isset($this->tenant); - } - - public function clearTenant() - { - unset($this->tenant); - } - - /** - * Required. The tenant resource to replace the current resource in the - * system. - * - * Generated from protobuf field .google.cloud.talent.v4.Tenant tenant = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Talent\V4\Tenant $var - * @return $this - */ - public function setTenant($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4\Tenant::class); - $this->tenant = $var; - - return $this; - } - - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is - * provided, only the specified fields in - * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the tenant fields to be updated. Only - * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. - * - * 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); - } - - /** - * Strongly recommended for the best service experience. - * If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is - * provided, only the specified fields in - * [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. - * Otherwise all the fields are updated. - * A field mask to specify the tenant fields to be updated. Only - * top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported. - * - * 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/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php b/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php deleted file mode 100644 index 3633e1ed9f97..000000000000 --- a/owl-bot-staging/Talent/v4/proto/src/Google/Cloud/Talent/V4/Visibility.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.talent.v4.Visibility - */ -class Visibility -{ - /** - * Default value. - * - * Generated from protobuf enum VISIBILITY_UNSPECIFIED = 0; - */ - const VISIBILITY_UNSPECIFIED = 0; - /** - * The resource is only visible to the GCP account who owns it. - * - * Generated from protobuf enum ACCOUNT_ONLY = 1; - */ - const ACCOUNT_ONLY = 1; - /** - * The resource is visible to the owner and may be visible to other - * applications and processes at Google. - * - * Generated from protobuf enum SHARED_WITH_GOOGLE = 2; - */ - const SHARED_WITH_GOOGLE = 2; - /** - * The resource is visible to the owner and may be visible to all other API - * clients. - * - * Generated from protobuf enum SHARED_WITH_PUBLIC = 3; - */ - const SHARED_WITH_PUBLIC = 3; - - private static $valueToName = [ - self::VISIBILITY_UNSPECIFIED => 'VISIBILITY_UNSPECIFIED', - self::ACCOUNT_ONLY => 'ACCOUNT_ONLY', - self::SHARED_WITH_GOOGLE => 'SHARED_WITH_GOOGLE', - self::SHARED_WITH_PUBLIC => 'SHARED_WITH_PUBLIC', - ]; - - 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/Talent/v4/samples/V4/CompanyServiceClient/create_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/create_company.php deleted file mode 100644 index 99bbc2e48e35..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/create_company.php +++ /dev/null @@ -1,88 +0,0 @@ -setDisplayName($companyDisplayName) - ->setExternalId($companyExternalId); - $request = (new CreateCompanyRequest()) - ->setParent($formattedParent) - ->setCompany($company); - - // Call the API and handle any network failures. - try { - /** @var Company $response */ - $response = $companyServiceClient->createCompany($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 = CompanyServiceClient::tenantName('[PROJECT]', '[TENANT]'); - $companyDisplayName = '[DISPLAY_NAME]'; - $companyExternalId = '[EXTERNAL_ID]'; - - create_company_sample($formattedParent, $companyDisplayName, $companyExternalId); -} -// [END jobs_v4_generated_CompanyService_CreateCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php deleted file mode 100644 index 7e007396804b..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/delete_company.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $companyServiceClient->deleteCompany($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 = CompanyServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - - delete_company_sample($formattedName); -} -// [END jobs_v4_generated_CompanyService_DeleteCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php deleted file mode 100644 index 34cbfba1d106..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/get_company.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Company $response */ - $response = $companyServiceClient->getCompany($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 = CompanyServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - - get_company_sample($formattedName); -} -// [END jobs_v4_generated_CompanyService_GetCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php deleted file mode 100644 index 0c4d187146ab..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/list_companies.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $companyServiceClient->listCompanies($request); - - /** @var Company $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 = CompanyServiceClient::tenantName('[PROJECT]', '[TENANT]'); - - list_companies_sample($formattedParent); -} -// [END jobs_v4_generated_CompanyService_ListCompanies_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php b/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php deleted file mode 100644 index 14026efd7541..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/CompanyServiceClient/update_company.php +++ /dev/null @@ -1,78 +0,0 @@ -setDisplayName($companyDisplayName) - ->setExternalId($companyExternalId); - $request = (new UpdateCompanyRequest()) - ->setCompany($company); - - // Call the API and handle any network failures. - try { - /** @var Company $response */ - $response = $companyServiceClient->updateCompany($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 -{ - $companyDisplayName = '[DISPLAY_NAME]'; - $companyExternalId = '[EXTERNAL_ID]'; - - update_company_sample($companyDisplayName, $companyExternalId); -} -// [END jobs_v4_generated_CompanyService_UpdateCompany_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php b/owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php deleted file mode 100644 index 1d7e54e1013f..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/CompletionClient/complete_query.php +++ /dev/null @@ -1,85 +0,0 @@ -setTenant($formattedTenant) - ->setQuery($query) - ->setPageSize($pageSize); - - // Call the API and handle any network failures. - try { - /** @var CompleteQueryResponse $response */ - $response = $completionClient->completeQuery($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedTenant = CompletionClient::tenantName('[PROJECT]', '[TENANT]'); - $query = '[QUERY]'; - $pageSize = 0; - - complete_query_sample($formattedTenant, $query, $pageSize); -} -// [END jobs_v4_generated_Completion_CompleteQuery_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php b/owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php deleted file mode 100644 index 091159468189..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/EventServiceClient/create_client_event.php +++ /dev/null @@ -1,88 +0,0 @@ -setEventId($clientEventEventId) - ->setCreateTime($clientEventCreateTime); - $request = (new CreateClientEventRequest()) - ->setParent($formattedParent) - ->setClientEvent($clientEvent); - - // Call the API and handle any network failures. - try { - /** @var ClientEvent $response */ - $response = $eventServiceClient->createClientEvent($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 = EventServiceClient::tenantName('[PROJECT]', '[TENANT]'); - $clientEventEventId = '[EVENT_ID]'; - - create_client_event_sample($formattedParent, $clientEventEventId); -} -// [END jobs_v4_generated_EventService_CreateClientEvent_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php deleted file mode 100644 index 2dab5061db3b..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_create_jobs.php +++ /dev/null @@ -1,138 +0,0 @@ -setCompany($formattedJobsCompany) - ->setRequisitionId($jobsRequisitionId) - ->setTitle($jobsTitle) - ->setDescription($jobsDescription); - $jobs = [$job,]; - $request = (new BatchCreateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobServiceClient->batchCreateJobs($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchCreateJobsResponse $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - $formattedJobsCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $jobsRequisitionId = '[REQUISITION_ID]'; - $jobsTitle = '[TITLE]'; - $jobsDescription = '[DESCRIPTION]'; - - batch_create_jobs_sample( - $formattedParent, - $formattedJobsCompany, - $jobsRequisitionId, - $jobsTitle, - $jobsDescription - ); -} -// [END jobs_v4_generated_JobService_BatchCreateJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php deleted file mode 100644 index b5ee25b26e8f..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_delete_jobs.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobServiceClient->batchDeleteJobs($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchDeleteJobsResponse $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - - batch_delete_jobs_sample($formattedParent); -} -// [END jobs_v4_generated_JobService_BatchDeleteJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php deleted file mode 100644 index 739e32f47c61..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/batch_update_jobs.php +++ /dev/null @@ -1,138 +0,0 @@ -setCompany($formattedJobsCompany) - ->setRequisitionId($jobsRequisitionId) - ->setTitle($jobsTitle) - ->setDescription($jobsDescription); - $jobs = [$job,]; - $request = (new BatchUpdateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $jobServiceClient->batchUpdateJobs($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchUpdateJobsResponse $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - $formattedJobsCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $jobsRequisitionId = '[REQUISITION_ID]'; - $jobsTitle = '[TITLE]'; - $jobsDescription = '[DESCRIPTION]'; - - batch_update_jobs_sample( - $formattedParent, - $formattedJobsCompany, - $jobsRequisitionId, - $jobsTitle, - $jobsDescription - ); -} -// [END jobs_v4_generated_JobService_BatchUpdateJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php deleted file mode 100644 index e0424209c11d..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/create_job.php +++ /dev/null @@ -1,127 +0,0 @@ -setCompany($formattedJobCompany) - ->setRequisitionId($jobRequisitionId) - ->setTitle($jobTitle) - ->setDescription($jobDescription); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobServiceClient->createJob($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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - $formattedJobCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $jobRequisitionId = '[REQUISITION_ID]'; - $jobTitle = '[TITLE]'; - $jobDescription = '[DESCRIPTION]'; - - create_job_sample( - $formattedParent, - $formattedJobCompany, - $jobRequisitionId, - $jobTitle, - $jobDescription - ); -} -// [END jobs_v4_generated_JobService_CreateJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php deleted file mode 100644 index f9d99c25b971..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/delete_job.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $jobServiceClient->deleteJob($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 = JobServiceClient::jobName('[PROJECT]', '[TENANT]', '[JOB]'); - - delete_job_sample($formattedName); -} -// [END jobs_v4_generated_JobService_DeleteJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php deleted file mode 100644 index 408230f56898..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/get_job.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobServiceClient->getJob($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 = JobServiceClient::jobName('[PROJECT]', '[TENANT]', '[JOB]'); - - get_job_sample($formattedName); -} -// [END jobs_v4_generated_JobService_GetJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php deleted file mode 100644 index 62b3b4e094c9..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/list_jobs.php +++ /dev/null @@ -1,104 +0,0 @@ -setParent($formattedParent) - ->setFilter($filter); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $jobServiceClient->listJobs($request); - - /** @var Job $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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - $filter = '[FILTER]'; - - list_jobs_sample($formattedParent, $filter); -} -// [END jobs_v4_generated_JobService_ListJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php deleted file mode 100644 index 7429a9370b8e..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setRequestMetadata($requestMetadata); - - // Call the API and handle any network failures. - try { - /** @var SearchJobsResponse $response */ - $response = $jobServiceClient->searchJobs($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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - - search_jobs_sample($formattedParent); -} -// [END jobs_v4_generated_JobService_SearchJobs_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php deleted file mode 100644 index 7ce6e89f416a..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/search_jobs_for_alert.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setRequestMetadata($requestMetadata); - - // Call the API and handle any network failures. - try { - /** @var SearchJobsResponse $response */ - $response = $jobServiceClient->searchJobsForAlert($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 = JobServiceClient::tenantName('[PROJECT]', '[TENANT]'); - - search_jobs_for_alert_sample($formattedParent); -} -// [END jobs_v4_generated_JobService_SearchJobsForAlert_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php b/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php deleted file mode 100644 index 33c541c7cad8..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/JobServiceClient/update_job.php +++ /dev/null @@ -1,113 +0,0 @@ -setCompany($formattedJobCompany) - ->setRequisitionId($jobRequisitionId) - ->setTitle($jobTitle) - ->setDescription($jobDescription); - $request = (new UpdateJobRequest()) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $jobServiceClient->updateJob($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 -{ - $formattedJobCompany = JobServiceClient::companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $jobRequisitionId = '[REQUISITION_ID]'; - $jobTitle = '[TITLE]'; - $jobDescription = '[DESCRIPTION]'; - - update_job_sample($formattedJobCompany, $jobRequisitionId, $jobTitle, $jobDescription); -} -// [END jobs_v4_generated_JobService_UpdateJob_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php deleted file mode 100644 index a72cc1503173..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/create_tenant.php +++ /dev/null @@ -1,82 +0,0 @@ -setExternalId($tenantExternalId); - $request = (new CreateTenantRequest()) - ->setParent($formattedParent) - ->setTenant($tenant); - - // Call the API and handle any network failures. - try { - /** @var Tenant $response */ - $response = $tenantServiceClient->createTenant($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 = TenantServiceClient::projectName('[PROJECT]'); - $tenantExternalId = '[EXTERNAL_ID]'; - - create_tenant_sample($formattedParent, $tenantExternalId); -} -// [END jobs_v4_generated_TenantService_CreateTenant_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php deleted file mode 100644 index 5b78525b235b..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/delete_tenant.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $tenantServiceClient->deleteTenant($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 = TenantServiceClient::tenantName('[PROJECT]', '[TENANT]'); - - delete_tenant_sample($formattedName); -} -// [END jobs_v4_generated_TenantService_DeleteTenant_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php deleted file mode 100644 index 1055eb132719..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/get_tenant.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Tenant $response */ - $response = $tenantServiceClient->getTenant($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 = TenantServiceClient::tenantName('[PROJECT]', '[TENANT]'); - - get_tenant_sample($formattedName); -} -// [END jobs_v4_generated_TenantService_GetTenant_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php deleted file mode 100644 index 52d7c37f2d42..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/list_tenants.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $tenantServiceClient->listTenants($request); - - /** @var Tenant $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 = TenantServiceClient::projectName('[PROJECT]'); - - list_tenants_sample($formattedParent); -} -// [END jobs_v4_generated_TenantService_ListTenants_sync] diff --git a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php b/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php deleted file mode 100644 index b6636d96de6b..000000000000 --- a/owl-bot-staging/Talent/v4/samples/V4/TenantServiceClient/update_tenant.php +++ /dev/null @@ -1,75 +0,0 @@ -setExternalId($tenantExternalId); - $request = (new UpdateTenantRequest()) - ->setTenant($tenant); - - // Call the API and handle any network failures. - try { - /** @var Tenant $response */ - $response = $tenantServiceClient->updateTenant($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 -{ - $tenantExternalId = '[EXTERNAL_ID]'; - - update_tenant_sample($tenantExternalId); -} -// [END jobs_v4_generated_TenantService_UpdateTenant_sync] diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php deleted file mode 100644 index 63c14c67a5c3..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/Client/CompanyServiceClient.php +++ /dev/null @@ -1,370 +0,0 @@ - createCompanyAsync(CreateCompanyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCompanyAsync(DeleteCompanyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCompanyAsync(GetCompanyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCompaniesAsync(ListCompaniesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCompanyAsync(UpdateCompanyRequest $request, array $optionalArgs = []) - */ -final class CompanyServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.talent.v4.CompanyService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'jobs.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/company_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/company_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/company_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/company_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a company - * resource. - * - * @param string $project - * @param string $tenant - * @param string $company - * - * @return string The formatted company resource. - */ - public static function companyName(string $project, string $tenant, string $company): string - { - return self::getPathTemplate('company')->render([ - 'project' => $project, - 'tenant' => $tenant, - 'company' => $company, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tenant - * resource. - * - * @param string $project - * @param string $tenant - * - * @return string The formatted tenant resource. - */ - public static function tenantName(string $project, string $tenant): string - { - return self::getPathTemplate('tenant')->render([ - 'project' => $project, - 'tenant' => $tenant, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - company: projects/{project}/tenants/{tenant}/companies/{company} - * - tenant: projects/{project}/tenants/{tenant} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'jobs.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new company entity. - * - * The async variant is {@see CompanyServiceClient::createCompanyAsync()} . - * - * @example samples/V4/CompanyServiceClient/create_company.php - * - * @param CreateCompanyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Company - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCompany(CreateCompanyRequest $request, array $callOptions = []): Company - { - return $this->startApiCall('CreateCompany', $request, $callOptions)->wait(); - } - - /** - * Deletes specified company. - * Prerequisite: The company has no jobs associated with it. - * - * The async variant is {@see CompanyServiceClient::deleteCompanyAsync()} . - * - * @example samples/V4/CompanyServiceClient/delete_company.php - * - * @param DeleteCompanyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteCompany(DeleteCompanyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteCompany', $request, $callOptions)->wait(); - } - - /** - * Retrieves specified company. - * - * The async variant is {@see CompanyServiceClient::getCompanyAsync()} . - * - * @example samples/V4/CompanyServiceClient/get_company.php - * - * @param GetCompanyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Company - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCompany(GetCompanyRequest $request, array $callOptions = []): Company - { - return $this->startApiCall('GetCompany', $request, $callOptions)->wait(); - } - - /** - * Lists all companies associated with the project. - * - * The async variant is {@see CompanyServiceClient::listCompaniesAsync()} . - * - * @example samples/V4/CompanyServiceClient/list_companies.php - * - * @param ListCompaniesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCompanies(ListCompaniesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCompanies', $request, $callOptions); - } - - /** - * Updates specified company. - * - * The async variant is {@see CompanyServiceClient::updateCompanyAsync()} . - * - * @example samples/V4/CompanyServiceClient/update_company.php - * - * @param UpdateCompanyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Company - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCompany(UpdateCompanyRequest $request, array $callOptions = []): Company - { - return $this->startApiCall('UpdateCompany', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php deleted file mode 100644 index 7a5b0f9a965a..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/Client/CompletionClient.php +++ /dev/null @@ -1,259 +0,0 @@ - completeQueryAsync(CompleteQueryRequest $request, array $optionalArgs = []) - */ -final class CompletionClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.talent.v4.Completion'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'jobs.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/completion_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/completion_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/completion_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/completion_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a company - * resource. - * - * @param string $project - * @param string $tenant - * @param string $company - * - * @return string The formatted company resource. - */ - public static function companyName(string $project, string $tenant, string $company): string - { - return self::getPathTemplate('company')->render([ - 'project' => $project, - 'tenant' => $tenant, - 'company' => $company, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tenant - * resource. - * - * @param string $project - * @param string $tenant - * - * @return string The formatted tenant resource. - */ - public static function tenantName(string $project, string $tenant): string - { - return self::getPathTemplate('tenant')->render([ - 'project' => $project, - 'tenant' => $tenant, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - company: projects/{project}/tenants/{tenant}/companies/{company} - * - tenant: projects/{project}/tenants/{tenant} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'jobs.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Completes the specified prefix with keyword suggestions. - * Intended for use by a job search auto-complete search box. - * - * The async variant is {@see CompletionClient::completeQueryAsync()} . - * - * @example samples/V4/CompletionClient/complete_query.php - * - * @param CompleteQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CompleteQueryResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function completeQuery(CompleteQueryRequest $request, array $callOptions = []): CompleteQueryResponse - { - return $this->startApiCall('CompleteQuery', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php deleted file mode 100644 index 0b6fb7a5b45a..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/Client/EventServiceClient.php +++ /dev/null @@ -1,244 +0,0 @@ - createClientEventAsync(CreateClientEventRequest $request, array $optionalArgs = []) - */ -final class EventServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.talent.v4.EventService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'jobs.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/event_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/event_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/event_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/event_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a tenant - * resource. - * - * @param string $project - * @param string $tenant - * - * @return string The formatted tenant resource. - */ - public static function tenantName(string $project, string $tenant): string - { - return self::getPathTemplate('tenant')->render([ - 'project' => $project, - 'tenant' => $tenant, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - tenant: projects/{project}/tenants/{tenant} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'jobs.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Report events issued when end user interacts with customer's application - * that uses Cloud Talent Solution. You may inspect the created events in - * [self service - * tools](https://console.cloud.google.com/talent-solution/overview). - * [Learn - * more](https://cloud.google.com/talent-solution/docs/management-tools) - * about self service tools. - * - * The async variant is {@see EventServiceClient::createClientEventAsync()} . - * - * @example samples/V4/EventServiceClient/create_client_event.php - * - * @param CreateClientEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ClientEvent - * - * @throws ApiException Thrown if the API call fails. - */ - public function createClientEvent(CreateClientEventRequest $request, array $callOptions = []): ClientEvent - { - return $this->startApiCall('CreateClientEvent', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php deleted file mode 100644 index a3c40cfd9cc0..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/Client/JobServiceClient.php +++ /dev/null @@ -1,610 +0,0 @@ - batchCreateJobsAsync(BatchCreateJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchDeleteJobsAsync(BatchDeleteJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchUpdateJobsAsync(BatchUpdateJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchJobsAsync(SearchJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchJobsForAlertAsync(SearchJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateJobAsync(UpdateJobRequest $request, array $optionalArgs = []) - */ -final class JobServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.talent.v4.JobService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'jobs.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/job_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/job_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/job_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/job_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 company - * resource. - * - * @param string $project - * @param string $tenant - * @param string $company - * - * @return string The formatted company resource. - */ - public static function companyName(string $project, string $tenant, string $company): string - { - return self::getPathTemplate('company')->render([ - 'project' => $project, - 'tenant' => $tenant, - 'company' => $company, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $tenant - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $tenant, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'tenant' => $tenant, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tenant - * resource. - * - * @param string $project - * @param string $tenant - * - * @return string The formatted tenant resource. - */ - public static function tenantName(string $project, string $tenant): string - { - return self::getPathTemplate('tenant')->render([ - 'project' => $project, - 'tenant' => $tenant, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - company: projects/{project}/tenants/{tenant}/companies/{company} - * - job: projects/{project}/tenants/{tenant}/jobs/{job} - * - tenant: projects/{project}/tenants/{tenant} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'jobs.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Begins executing a batch create jobs operation. - * - * The async variant is {@see JobServiceClient::batchCreateJobsAsync()} . - * - * @example samples/V4/JobServiceClient/batch_create_jobs.php - * - * @param BatchCreateJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 batchCreateJobs(BatchCreateJobsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchCreateJobs', $request, $callOptions)->wait(); - } - - /** - * Begins executing a batch delete jobs operation. - * - * The async variant is {@see JobServiceClient::batchDeleteJobsAsync()} . - * - * @example samples/V4/JobServiceClient/batch_delete_jobs.php - * - * @param BatchDeleteJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 batchDeleteJobs(BatchDeleteJobsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchDeleteJobs', $request, $callOptions)->wait(); - } - - /** - * Begins executing a batch update jobs operation. - * - * The async variant is {@see JobServiceClient::batchUpdateJobsAsync()} . - * - * @example samples/V4/JobServiceClient/batch_update_jobs.php - * - * @param BatchUpdateJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 batchUpdateJobs(BatchUpdateJobsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchUpdateJobs', $request, $callOptions)->wait(); - } - - /** - * Creates a new job. - * - * Typically, the job becomes searchable within 10 seconds, but it may take - * up to 5 minutes. - * - * The async variant is {@see JobServiceClient::createJobAsync()} . - * - * @example samples/V4/JobServiceClient/create_job.php - * - * @param CreateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJob(CreateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified job. - * - * Typically, the job becomes unsearchable within 10 seconds, but it may take - * up to 5 minutes. - * - * The async variant is {@see JobServiceClient::deleteJobAsync()} . - * - * @example samples/V4/JobServiceClient/delete_job.php - * - * @param DeleteJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteJob(DeleteJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); - } - - /** - * Retrieves the specified job, whose status is OPEN or recently EXPIRED - * within the last 90 days. - * - * The async variant is {@see JobServiceClient::getJobAsync()} . - * - * @example samples/V4/JobServiceClient/get_job.php - * - * @param GetJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Lists jobs by filter. - * - * The async variant is {@see JobServiceClient::listJobsAsync()} . - * - * @example samples/V4/JobServiceClient/list_jobs.php - * - * @param ListJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } - - /** - * Searches for jobs using the provided - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * This call constrains the - * [visibility][google.cloud.talent.v4.Job.visibility] of jobs present in the - * database, and only returns jobs that the caller has permission to search - * against. - * - * The async variant is {@see JobServiceClient::searchJobsAsync()} . - * - * @example samples/V4/JobServiceClient/search_jobs.php - * - * @param SearchJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SearchJobsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function searchJobs(SearchJobsRequest $request, array $callOptions = []): SearchJobsResponse - { - return $this->startApiCall('SearchJobs', $request, $callOptions)->wait(); - } - - /** - * Searches for jobs using the provided - * [SearchJobsRequest][google.cloud.talent.v4.SearchJobsRequest]. - * - * This API call is intended for the use case of targeting passive job - * seekers (for example, job seekers who have signed up to receive email - * alerts about potential job opportunities), it has different algorithmic - * adjustments that are designed to specifically target passive job seekers. - * - * This call constrains the - * [visibility][google.cloud.talent.v4.Job.visibility] of jobs present in the - * database, and only returns jobs the caller has permission to search - * against. - * - * The async variant is {@see JobServiceClient::searchJobsForAlertAsync()} . - * - * @example samples/V4/JobServiceClient/search_jobs_for_alert.php - * - * @param SearchJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SearchJobsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function searchJobsForAlert(SearchJobsRequest $request, array $callOptions = []): SearchJobsResponse - { - return $this->startApiCall('SearchJobsForAlert', $request, $callOptions)->wait(); - } - - /** - * Updates specified job. - * - * Typically, updated contents become visible in search results within 10 - * seconds, but it may take up to 5 minutes. - * - * The async variant is {@see JobServiceClient::updateJobAsync()} . - * - * @example samples/V4/JobServiceClient/update_job.php - * - * @param UpdateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateJob(UpdateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('UpdateJob', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php b/owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php deleted file mode 100644 index 70c200a761fd..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/Client/TenantServiceClient.php +++ /dev/null @@ -1,365 +0,0 @@ - createTenantAsync(CreateTenantRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTenantAsync(DeleteTenantRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTenantAsync(GetTenantRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTenantsAsync(ListTenantsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTenantAsync(UpdateTenantRequest $request, array $optionalArgs = []) - */ -final class TenantServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.talent.v4.TenantService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'jobs.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'jobs.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/jobs', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/tenant_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/tenant_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/tenant_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/tenant_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 tenant - * resource. - * - * @param string $project - * @param string $tenant - * - * @return string The formatted tenant resource. - */ - public static function tenantName(string $project, string $tenant): string - { - return self::getPathTemplate('tenant')->render([ - 'project' => $project, - 'tenant' => $tenant, - ]); - } - - /** - * 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} - * - tenant: projects/{project}/tenants/{tenant} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'jobs.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new tenant entity. - * - * The async variant is {@see TenantServiceClient::createTenantAsync()} . - * - * @example samples/V4/TenantServiceClient/create_tenant.php - * - * @param CreateTenantRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Tenant - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTenant(CreateTenantRequest $request, array $callOptions = []): Tenant - { - return $this->startApiCall('CreateTenant', $request, $callOptions)->wait(); - } - - /** - * Deletes specified tenant. - * - * The async variant is {@see TenantServiceClient::deleteTenantAsync()} . - * - * @example samples/V4/TenantServiceClient/delete_tenant.php - * - * @param DeleteTenantRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteTenant(DeleteTenantRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTenant', $request, $callOptions)->wait(); - } - - /** - * Retrieves specified tenant. - * - * The async variant is {@see TenantServiceClient::getTenantAsync()} . - * - * @example samples/V4/TenantServiceClient/get_tenant.php - * - * @param GetTenantRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Tenant - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTenant(GetTenantRequest $request, array $callOptions = []): Tenant - { - return $this->startApiCall('GetTenant', $request, $callOptions)->wait(); - } - - /** - * Lists all tenants associated with the project. - * - * The async variant is {@see TenantServiceClient::listTenantsAsync()} . - * - * @example samples/V4/TenantServiceClient/list_tenants.php - * - * @param ListTenantsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTenants(ListTenantsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTenants', $request, $callOptions); - } - - /** - * Updates specified tenant. - * - * The async variant is {@see TenantServiceClient::updateTenantAsync()} . - * - * @example samples/V4/TenantServiceClient/update_tenant.php - * - * @param UpdateTenantRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Tenant - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTenant(UpdateTenantRequest $request, array $callOptions = []): Tenant - { - return $this->startApiCall('UpdateTenant', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json b/owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json deleted file mode 100644 index 433483108c71..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/gapic_metadata.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.talent.v4", - "libraryPackage": "Google\\Cloud\\Talent\\V4", - "services": { - "CompanyService": { - "clients": { - "grpc": { - "libraryClient": "CompanyServiceGapicClient", - "rpcs": { - "CreateCompany": { - "methods": [ - "createCompany" - ] - }, - "DeleteCompany": { - "methods": [ - "deleteCompany" - ] - }, - "GetCompany": { - "methods": [ - "getCompany" - ] - }, - "ListCompanies": { - "methods": [ - "listCompanies" - ] - }, - "UpdateCompany": { - "methods": [ - "updateCompany" - ] - } - } - } - } - }, - "Completion": { - "clients": { - "grpc": { - "libraryClient": "CompletionGapicClient", - "rpcs": { - "CompleteQuery": { - "methods": [ - "completeQuery" - ] - } - } - } - } - }, - "EventService": { - "clients": { - "grpc": { - "libraryClient": "EventServiceGapicClient", - "rpcs": { - "CreateClientEvent": { - "methods": [ - "createClientEvent" - ] - } - } - } - } - }, - "JobService": { - "clients": { - "grpc": { - "libraryClient": "JobServiceGapicClient", - "rpcs": { - "BatchCreateJobs": { - "methods": [ - "batchCreateJobs" - ] - }, - "BatchDeleteJobs": { - "methods": [ - "batchDeleteJobs" - ] - }, - "BatchUpdateJobs": { - "methods": [ - "batchUpdateJobs" - ] - }, - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "ListJobs": { - "methods": [ - "listJobs" - ] - }, - "SearchJobs": { - "methods": [ - "searchJobs" - ] - }, - "SearchJobsForAlert": { - "methods": [ - "searchJobsForAlert" - ] - }, - "UpdateJob": { - "methods": [ - "updateJob" - ] - } - } - } - } - }, - "TenantService": { - "clients": { - "grpc": { - "libraryClient": "TenantServiceGapicClient", - "rpcs": { - "CreateTenant": { - "methods": [ - "createTenant" - ] - }, - "DeleteTenant": { - "methods": [ - "deleteTenant" - ] - }, - "GetTenant": { - "methods": [ - "getTenant" - ] - }, - "ListTenants": { - "methods": [ - "listTenants" - ] - }, - "UpdateTenant": { - "methods": [ - "updateTenant" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json deleted file mode 100644 index b379984200f4..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_client_config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "interfaces": { - "google.cloud.talent.v4.CompanyService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_4_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "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_4_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateCompany": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" - }, - "DeleteCompany": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetCompany": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListCompanies": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateCompany": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" - } - } - } - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php deleted file mode 100644 index 0748ac2fda3f..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_descriptor_config.php +++ /dev/null @@ -1,101 +0,0 @@ - [ - 'google.cloud.talent.v4.CompanyService' => [ - 'CreateCompany' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Company', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCompany' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCompany' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Company', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCompanies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCompanies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\ListCompaniesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCompany' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Company', - 'headerParams' => [ - [ - 'keyName' => 'company.name', - 'fieldAccessors' => [ - 'getCompany', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'company' => 'projects/{project}/tenants/{tenant}/companies/{company}', - 'tenant' => 'projects/{project}/tenants/{tenant}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php deleted file mode 100644 index 04130c8e4313..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/company_service_rest_client_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.cloud.talent.v4.CompanyService' => [ - 'CreateCompany' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/companies', - 'body' => 'company', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCompany' => [ - 'method' => 'delete', - 'uriTemplate' => '/v4/{name=projects/*/tenants/*/companies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCompany' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/tenants/*/companies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCompanies' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/companies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCompany' => [ - 'method' => 'patch', - 'uriTemplate' => '/v4/{company.name=projects/*/tenants/*/companies/*}', - 'body' => 'company', - 'placeholders' => [ - 'company.name' => [ - 'getters' => [ - 'getCompany', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json deleted file mode 100644 index 604238850955..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/completion_client_config.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "interfaces": { - "google.cloud.talent.v4.Completion": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "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_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CompleteQuery": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - } - } - } - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php deleted file mode 100644 index 195e93d58e2e..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/completion_descriptor_config.php +++ /dev/null @@ -1,44 +0,0 @@ - [ - 'google.cloud.talent.v4.Completion' => [ - 'CompleteQuery' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\CompleteQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'tenant', - 'fieldAccessors' => [ - 'getTenant', - ], - ], - ], - ], - 'templateMap' => [ - 'company' => 'projects/{project}/tenants/{tenant}/companies/{company}', - 'tenant' => 'projects/{project}/tenants/{tenant}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php deleted file mode 100644 index cb4150f00a18..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/completion_rest_client_config.php +++ /dev/null @@ -1,53 +0,0 @@ - [ - 'google.cloud.talent.v4.Completion' => [ - 'CompleteQuery' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{tenant=projects/*/tenants/*}:completeQuery', - 'placeholders' => [ - 'tenant' => [ - 'getters' => [ - 'getTenant', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json deleted file mode 100644 index ec9ad3a2cf9a..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.talent.v4.EventService": { - "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": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateClientEvent": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php deleted file mode 100644 index 8b689666ef00..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_descriptor_config.php +++ /dev/null @@ -1,43 +0,0 @@ - [ - 'google.cloud.talent.v4.EventService' => [ - 'CreateClientEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\ClientEvent', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'tenant' => 'projects/{project}/tenants/{tenant}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php deleted file mode 100644 index 1d1280916dc6..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/event_service_rest_client_config.php +++ /dev/null @@ -1,54 +0,0 @@ - [ - 'google.cloud.talent.v4.EventService' => [ - 'CreateClientEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/clientEvents', - 'body' => 'client_event', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json deleted file mode 100644 index 98d69d223e8e..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_client_config.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "interfaces": { - "google.cloud.talent.v4.JobService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "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_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "BatchCreateJobs": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "BatchDeleteJobs": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "BatchUpdateJobs": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateJob": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteJob": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "GetJob": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListJobs": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "SearchJobs": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "SearchJobsForAlert": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateJob": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php deleted file mode 100644 index f524e9c3e98b..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_descriptor_config.php +++ /dev/null @@ -1,183 +0,0 @@ - [ - 'google.cloud.talent.v4.JobService' => [ - 'BatchCreateJobs' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Talent\V4\BatchCreateJobsResponse', - 'metadataReturnType' => '\Google\Cloud\Talent\V4\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteJobs' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Talent\V4\BatchDeleteJobsResponse', - 'metadataReturnType' => '\Google\Cloud\Talent\V4\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateJobs' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Talent\V4\BatchUpdateJobsResponse', - 'metadataReturnType' => '\Google\Cloud\Talent\V4\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Job', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchJobs' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\SearchJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchJobsForAlert' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\SearchJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Job', - 'headerParams' => [ - [ - 'keyName' => 'job.name', - 'fieldAccessors' => [ - 'getJob', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'company' => 'projects/{project}/tenants/{tenant}/companies/{company}', - 'job' => 'projects/{project}/tenants/{tenant}/jobs/{job}', - 'tenant' => 'projects/{project}/tenants/{tenant}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php deleted file mode 100644 index a5894278fd9a..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/job_service_rest_client_config.php +++ /dev/null @@ -1,163 +0,0 @@ - [ - 'google.cloud.talent.v4.JobService' => [ - 'BatchCreateJobs' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:batchCreate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteJobs' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:batchDelete', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateJobs' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:batchUpdate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs', - 'body' => 'job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v4/{name=projects/*/tenants/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/tenants/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'filter', - ], - ], - 'SearchJobs' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:search', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchJobsForAlert' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*/tenants/*}/jobs:searchForAlert', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateJob' => [ - 'method' => 'patch', - 'uriTemplate' => '/v4/{job.name=projects/*/tenants/*/jobs/*}', - 'body' => 'job', - 'placeholders' => [ - 'job.name' => [ - 'getters' => [ - 'getJob', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json deleted file mode 100644 index 2263de20cbcc..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_client_config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "interfaces": { - "google.cloud.talent.v4.TenantService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "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": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateTenant": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteTenant": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTenant": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTenants": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateTenant": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php deleted file mode 100644 index cefb9eb0aac1..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_descriptor_config.php +++ /dev/null @@ -1,101 +0,0 @@ - [ - 'google.cloud.talent.v4.TenantService' => [ - 'CreateTenant' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Tenant', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTenant' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTenant' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Tenant', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListTenants' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTenants', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\ListTenantsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateTenant' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Talent\V4\Tenant', - 'headerParams' => [ - [ - 'keyName' => 'tenant.name', - 'fieldAccessors' => [ - 'getTenant', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - 'tenant' => 'projects/{project}/tenants/{tenant}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php b/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php deleted file mode 100644 index a6c00dacfa9b..000000000000 --- a/owl-bot-staging/Talent/v4/src/V4/resources/tenant_service_rest_client_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.cloud.talent.v4.TenantService' => [ - 'CreateTenant' => [ - 'method' => 'post', - 'uriTemplate' => '/v4/{parent=projects/*}/tenants', - 'body' => 'tenant', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteTenant' => [ - 'method' => 'delete', - 'uriTemplate' => '/v4/{name=projects/*/tenants/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTenant' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/tenants/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListTenants' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{parent=projects/*}/tenants', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateTenant' => [ - 'method' => 'patch', - 'uriTemplate' => '/v4/{tenant.name=projects/*/tenants/*}', - 'body' => 'tenant', - 'placeholders' => [ - 'tenant.name' => [ - 'getters' => [ - 'getTenant', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v4/{name=projects/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php deleted file mode 100644 index f498fa3aa3a2..000000000000 --- a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompanyServiceClientTest.php +++ /dev/null @@ -1,524 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CompanyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CompanyServiceClient($options); - } - - /** @test */ - public function createCompanyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $externalId = 'externalId-1153075697'; - $headquartersAddress = 'headquartersAddress-1879520036'; - $hiringAgency = false; - $eeoText = 'eeoText-1652097123'; - $websiteUri = 'websiteUri-2118185016'; - $careerSiteUri = 'careerSiteUri1223331861'; - $imageUri = 'imageUri-877823864'; - $suspended = false; - $expectedResponse = new Company(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setHeadquartersAddress($headquartersAddress); - $expectedResponse->setHiringAgency($hiringAgency); - $expectedResponse->setEeoText($eeoText); - $expectedResponse->setWebsiteUri($websiteUri); - $expectedResponse->setCareerSiteUri($careerSiteUri); - $expectedResponse->setImageUri($imageUri); - $expectedResponse->setSuspended($suspended); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $company = new Company(); - $companyDisplayName = 'companyDisplayName-686915152'; - $company->setDisplayName($companyDisplayName); - $companyExternalId = 'companyExternalId855180963'; - $company->setExternalId($companyExternalId); - $request = (new CreateCompanyRequest()) - ->setParent($formattedParent) - ->setCompany($company); - $response = $gapicClient->createCompany($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.talent.v4.CompanyService/CreateCompany', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCompany(); - $this->assertProtobufEquals($company, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCompanyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $company = new Company(); - $companyDisplayName = 'companyDisplayName-686915152'; - $company->setDisplayName($companyDisplayName); - $companyExternalId = 'companyExternalId855180963'; - $company->setExternalId($companyExternalId); - $request = (new CreateCompanyRequest()) - ->setParent($formattedParent) - ->setCompany($company); - try { - $gapicClient->createCompany($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCompanyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $request = (new DeleteCompanyRequest()) - ->setName($formattedName); - $gapicClient->deleteCompany($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.CompanyService/DeleteCompany', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCompanyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $request = (new DeleteCompanyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteCompany($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCompanyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $externalId = 'externalId-1153075697'; - $headquartersAddress = 'headquartersAddress-1879520036'; - $hiringAgency = false; - $eeoText = 'eeoText-1652097123'; - $websiteUri = 'websiteUri-2118185016'; - $careerSiteUri = 'careerSiteUri1223331861'; - $imageUri = 'imageUri-877823864'; - $suspended = false; - $expectedResponse = new Company(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setHeadquartersAddress($headquartersAddress); - $expectedResponse->setHiringAgency($hiringAgency); - $expectedResponse->setEeoText($eeoText); - $expectedResponse->setWebsiteUri($websiteUri); - $expectedResponse->setCareerSiteUri($careerSiteUri); - $expectedResponse->setImageUri($imageUri); - $expectedResponse->setSuspended($suspended); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $request = (new GetCompanyRequest()) - ->setName($formattedName); - $response = $gapicClient->getCompany($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.talent.v4.CompanyService/GetCompany', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCompanyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $request = (new GetCompanyRequest()) - ->setName($formattedName); - try { - $gapicClient->getCompany($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCompaniesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $companiesElement = new Company(); - $companies = [ - $companiesElement, - ]; - $expectedResponse = new ListCompaniesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCompanies($companies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $request = (new ListCompaniesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCompanies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCompanies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.CompanyService/ListCompanies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCompaniesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $request = (new ListCompaniesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCompanies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCompanyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $externalId = 'externalId-1153075697'; - $headquartersAddress = 'headquartersAddress-1879520036'; - $hiringAgency = false; - $eeoText = 'eeoText-1652097123'; - $websiteUri = 'websiteUri-2118185016'; - $careerSiteUri = 'careerSiteUri1223331861'; - $imageUri = 'imageUri-877823864'; - $suspended = false; - $expectedResponse = new Company(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setHeadquartersAddress($headquartersAddress); - $expectedResponse->setHiringAgency($hiringAgency); - $expectedResponse->setEeoText($eeoText); - $expectedResponse->setWebsiteUri($websiteUri); - $expectedResponse->setCareerSiteUri($careerSiteUri); - $expectedResponse->setImageUri($imageUri); - $expectedResponse->setSuspended($suspended); - $transport->addResponse($expectedResponse); - // Mock request - $company = new Company(); - $companyDisplayName = 'companyDisplayName-686915152'; - $company->setDisplayName($companyDisplayName); - $companyExternalId = 'companyExternalId855180963'; - $company->setExternalId($companyExternalId); - $request = (new UpdateCompanyRequest()) - ->setCompany($company); - $response = $gapicClient->updateCompany($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.talent.v4.CompanyService/UpdateCompany', $actualFuncCall); - $actualValue = $actualRequestObject->getCompany(); - $this->assertProtobufEquals($company, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCompanyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $company = new Company(); - $companyDisplayName = 'companyDisplayName-686915152'; - $company->setDisplayName($companyDisplayName); - $companyExternalId = 'companyExternalId855180963'; - $company->setExternalId($companyExternalId); - $request = (new UpdateCompanyRequest()) - ->setCompany($company); - try { - $gapicClient->updateCompany($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCompanyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $externalId = 'externalId-1153075697'; - $headquartersAddress = 'headquartersAddress-1879520036'; - $hiringAgency = false; - $eeoText = 'eeoText-1652097123'; - $websiteUri = 'websiteUri-2118185016'; - $careerSiteUri = 'careerSiteUri1223331861'; - $imageUri = 'imageUri-877823864'; - $suspended = false; - $expectedResponse = new Company(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalId($externalId); - $expectedResponse->setHeadquartersAddress($headquartersAddress); - $expectedResponse->setHiringAgency($hiringAgency); - $expectedResponse->setEeoText($eeoText); - $expectedResponse->setWebsiteUri($websiteUri); - $expectedResponse->setCareerSiteUri($careerSiteUri); - $expectedResponse->setImageUri($imageUri); - $expectedResponse->setSuspended($suspended); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $company = new Company(); - $companyDisplayName = 'companyDisplayName-686915152'; - $company->setDisplayName($companyDisplayName); - $companyExternalId = 'companyExternalId855180963'; - $company->setExternalId($companyExternalId); - $request = (new CreateCompanyRequest()) - ->setParent($formattedParent) - ->setCompany($company); - $response = $gapicClient->createCompanyAsync($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.talent.v4.CompanyService/CreateCompany', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCompany(); - $this->assertProtobufEquals($company, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php deleted file mode 100644 index 26299d23bb09..000000000000 --- a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/CompletionClientTest.php +++ /dev/null @@ -1,171 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CompletionClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CompletionClient($options); - } - - /** @test */ - public function completeQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CompleteQueryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTenant = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $query = 'query107944136'; - $pageSize = 883849137; - $request = (new CompleteQueryRequest()) - ->setTenant($formattedTenant) - ->setQuery($query) - ->setPageSize($pageSize); - $response = $gapicClient->completeQuery($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.Completion/CompleteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getTenant(); - $this->assertProtobufEquals($formattedTenant, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $actualValue = $actualRequestObject->getPageSize(); - $this->assertProtobufEquals($pageSize, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedTenant = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $query = 'query107944136'; - $pageSize = 883849137; - $request = (new CompleteQueryRequest()) - ->setTenant($formattedTenant) - ->setQuery($query) - ->setPageSize($pageSize); - try { - $gapicClient->completeQuery($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeQueryAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CompleteQueryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTenant = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $query = 'query107944136'; - $pageSize = 883849137; - $request = (new CompleteQueryRequest()) - ->setTenant($formattedTenant) - ->setQuery($query) - ->setPageSize($pageSize); - $response = $gapicClient->completeQueryAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.Completion/CompleteQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getTenant(); - $this->assertProtobufEquals($formattedTenant, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $actualValue = $actualRequestObject->getPageSize(); - $this->assertProtobufEquals($pageSize, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php deleted file mode 100644 index 4782f5e3836e..000000000000 --- a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/EventServiceClientTest.php +++ /dev/null @@ -1,186 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EventServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EventServiceClient($options); - } - - /** @test */ - public function createClientEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $requestId = 'requestId37109963'; - $eventId = 'eventId278118624'; - $eventNotes = 'eventNotes445073628'; - $expectedResponse = new ClientEvent(); - $expectedResponse->setRequestId($requestId); - $expectedResponse->setEventId($eventId); - $expectedResponse->setEventNotes($eventNotes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $clientEvent = new ClientEvent(); - $clientEventEventId = 'clientEventEventId319230150'; - $clientEvent->setEventId($clientEventEventId); - $clientEventCreateTime = new Timestamp(); - $clientEvent->setCreateTime($clientEventCreateTime); - $request = (new CreateClientEventRequest()) - ->setParent($formattedParent) - ->setClientEvent($clientEvent); - $response = $gapicClient->createClientEvent($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.talent.v4.EventService/CreateClientEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getClientEvent(); - $this->assertProtobufEquals($clientEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createClientEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $clientEvent = new ClientEvent(); - $clientEventEventId = 'clientEventEventId319230150'; - $clientEvent->setEventId($clientEventEventId); - $clientEventCreateTime = new Timestamp(); - $clientEvent->setCreateTime($clientEventCreateTime); - $request = (new CreateClientEventRequest()) - ->setParent($formattedParent) - ->setClientEvent($clientEvent); - try { - $gapicClient->createClientEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createClientEventAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $requestId = 'requestId37109963'; - $eventId = 'eventId278118624'; - $eventNotes = 'eventNotes445073628'; - $expectedResponse = new ClientEvent(); - $expectedResponse->setRequestId($requestId); - $expectedResponse->setEventId($eventId); - $expectedResponse->setEventNotes($eventNotes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $clientEvent = new ClientEvent(); - $clientEventEventId = 'clientEventEventId319230150'; - $clientEvent->setEventId($clientEventEventId); - $clientEventCreateTime = new Timestamp(); - $clientEvent->setCreateTime($clientEventCreateTime); - $request = (new CreateClientEventRequest()) - ->setParent($formattedParent) - ->setClientEvent($clientEvent); - $response = $gapicClient->createClientEventAsync($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.talent.v4.EventService/CreateClientEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getClientEvent(); - $this->assertProtobufEquals($clientEvent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php deleted file mode 100644 index 7b0e0e2e710e..000000000000 --- a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/JobServiceClientTest.php +++ /dev/null @@ -1,1107 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return JobServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new JobServiceClient($options); - } - - /** @test */ - public function batchCreateJobsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchCreateJobsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchCreateJobsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchCreateJobsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $jobs = []; - $request = (new BatchCreateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - $response = $gapicClient->batchCreateJobs($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.talent.v4.JobService/BatchCreateJobs', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getJobs(); - $this->assertProtobufEquals($jobs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreateJobsTest'); - $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 batchCreateJobsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchCreateJobsTest'); - $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->tenantName('[PROJECT]', '[TENANT]'); - $jobs = []; - $request = (new BatchCreateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - $response = $gapicClient->batchCreateJobs($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreateJobsTest'); - 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 batchDeleteJobsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchDeleteJobsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchDeleteJobsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchDeleteJobsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $request = (new BatchDeleteJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->batchDeleteJobs($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.talent.v4.JobService/BatchDeleteJobs', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteJobsTest'); - $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 batchDeleteJobsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchDeleteJobsTest'); - $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->tenantName('[PROJECT]', '[TENANT]'); - $request = (new BatchDeleteJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->batchDeleteJobs($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchDeleteJobsTest'); - 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 batchUpdateJobsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchUpdateJobsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchUpdateJobsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchUpdateJobsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $jobs = []; - $request = (new BatchUpdateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - $response = $gapicClient->batchUpdateJobs($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.talent.v4.JobService/BatchUpdateJobs', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getJobs(); - $this->assertProtobufEquals($jobs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateJobsTest'); - $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 batchUpdateJobsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchUpdateJobsTest'); - $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->tenantName('[PROJECT]', '[TENANT]'); - $jobs = []; - $request = (new BatchUpdateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - $response = $gapicClient->batchUpdateJobs($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchUpdateJobsTest'); - 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 createJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $company = 'company950484093'; - $requisitionId = 'requisitionId980224926'; - $title = 'title110371416'; - $description = 'description-1724546052'; - $department = 'department848184146'; - $incentives = 'incentives-1262874520'; - $languageCode = 'languageCode-412800396'; - $promotionValue = 353413845; - $qualifications = 'qualifications1903501412'; - $responsibilities = 'responsibilities-926952660'; - $companyDisplayName = 'companyDisplayName1982424170'; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setCompany($company); - $expectedResponse->setRequisitionId($requisitionId); - $expectedResponse->setTitle($title); - $expectedResponse->setDescription($description); - $expectedResponse->setDepartment($department); - $expectedResponse->setIncentives($incentives); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setPromotionValue($promotionValue); - $expectedResponse->setQualifications($qualifications); - $expectedResponse->setResponsibilities($responsibilities); - $expectedResponse->setCompanyDisplayName($companyDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $job = new Job(); - $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $job->setCompany($jobCompany); - $jobRequisitionId = 'jobRequisitionId-1718160870'; - $job->setRequisitionId($jobRequisitionId); - $jobTitle = 'jobTitle-1625529189'; - $job->setTitle($jobTitle); - $jobDescription = 'jobDescription-549074945'; - $job->setDescription($jobDescription); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJob($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.talent.v4.JobService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $job = new Job(); - $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $job->setCompany($jobCompany); - $jobRequisitionId = 'jobRequisitionId-1718160870'; - $job->setRequisitionId($jobRequisitionId); - $jobTitle = 'jobTitle-1625529189'; - $job->setTitle($jobTitle); - $jobDescription = 'jobDescription-549074945'; - $job->setDescription($jobDescription); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - try { - $gapicClient->createJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[TENANT]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - $gapicClient->deleteJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.JobService/DeleteJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[TENANT]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $company = 'company950484093'; - $requisitionId = 'requisitionId980224926'; - $title = 'title110371416'; - $description = 'description-1724546052'; - $department = 'department848184146'; - $incentives = 'incentives-1262874520'; - $languageCode = 'languageCode-412800396'; - $promotionValue = 353413845; - $qualifications = 'qualifications1903501412'; - $responsibilities = 'responsibilities-926952660'; - $companyDisplayName = 'companyDisplayName1982424170'; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setCompany($company); - $expectedResponse->setRequisitionId($requisitionId); - $expectedResponse->setTitle($title); - $expectedResponse->setDescription($description); - $expectedResponse->setDepartment($department); - $expectedResponse->setIncentives($incentives); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setPromotionValue($promotionValue); - $expectedResponse->setQualifications($qualifications); - $expectedResponse->setResponsibilities($responsibilities); - $expectedResponse->setCompanyDisplayName($companyDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[TENANT]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getJob($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.talent.v4.JobService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[TENANT]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $filter = 'filter-1274492040'; - $request = (new ListJobsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.JobService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $filter = 'filter-1274492040'; - $request = (new ListJobsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - try { - $gapicClient->listJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $totalSize = 705419236; - $broadenedQueryJobsCount = 1432104658; - $expectedResponse = new SearchJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setBroadenedQueryJobsCount($broadenedQueryJobsCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $requestMetadata = new RequestMetadata(); - $request = (new SearchJobsRequest()) - ->setParent($formattedParent) - ->setRequestMetadata($requestMetadata); - $response = $gapicClient->searchJobs($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.talent.v4.JobService/SearchJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequestMetadata(); - $this->assertProtobufEquals($requestMetadata, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $requestMetadata = new RequestMetadata(); - $request = (new SearchJobsRequest()) - ->setParent($formattedParent) - ->setRequestMetadata($requestMetadata); - try { - $gapicClient->searchJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchJobsForAlertTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $totalSize = 705419236; - $broadenedQueryJobsCount = 1432104658; - $expectedResponse = new SearchJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setBroadenedQueryJobsCount($broadenedQueryJobsCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $requestMetadata = new RequestMetadata(); - $request = (new SearchJobsRequest()) - ->setParent($formattedParent) - ->setRequestMetadata($requestMetadata); - $response = $gapicClient->searchJobsForAlert($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.talent.v4.JobService/SearchJobsForAlert', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequestMetadata(); - $this->assertProtobufEquals($requestMetadata, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchJobsForAlertExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $requestMetadata = new RequestMetadata(); - $request = (new SearchJobsRequest()) - ->setParent($formattedParent) - ->setRequestMetadata($requestMetadata); - try { - $gapicClient->searchJobsForAlert($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $company = 'company950484093'; - $requisitionId = 'requisitionId980224926'; - $title = 'title110371416'; - $description = 'description-1724546052'; - $department = 'department848184146'; - $incentives = 'incentives-1262874520'; - $languageCode = 'languageCode-412800396'; - $promotionValue = 353413845; - $qualifications = 'qualifications1903501412'; - $responsibilities = 'responsibilities-926952660'; - $companyDisplayName = 'companyDisplayName1982424170'; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setCompany($company); - $expectedResponse->setRequisitionId($requisitionId); - $expectedResponse->setTitle($title); - $expectedResponse->setDescription($description); - $expectedResponse->setDepartment($department); - $expectedResponse->setIncentives($incentives); - $expectedResponse->setLanguageCode($languageCode); - $expectedResponse->setPromotionValue($promotionValue); - $expectedResponse->setQualifications($qualifications); - $expectedResponse->setResponsibilities($responsibilities); - $expectedResponse->setCompanyDisplayName($companyDisplayName); - $transport->addResponse($expectedResponse); - // Mock request - $job = new Job(); - $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $job->setCompany($jobCompany); - $jobRequisitionId = 'jobRequisitionId-1718160870'; - $job->setRequisitionId($jobRequisitionId); - $jobTitle = 'jobTitle-1625529189'; - $job->setTitle($jobTitle); - $jobDescription = 'jobDescription-549074945'; - $job->setDescription($jobDescription); - $request = (new UpdateJobRequest()) - ->setJob($job); - $response = $gapicClient->updateJob($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.talent.v4.JobService/UpdateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $job = new Job(); - $jobCompany = $gapicClient->companyName('[PROJECT]', '[TENANT]', '[COMPANY]'); - $job->setCompany($jobCompany); - $jobRequisitionId = 'jobRequisitionId-1718160870'; - $job->setRequisitionId($jobRequisitionId); - $jobTitle = 'jobTitle-1625529189'; - $job->setTitle($jobTitle); - $jobDescription = 'jobDescription-549074945'; - $job->setDescription($jobDescription); - $request = (new UpdateJobRequest()) - ->setJob($job); - try { - $gapicClient->updateJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateJobsAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchCreateJobsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchCreateJobsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchCreateJobsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $jobs = []; - $request = (new BatchCreateJobsRequest()) - ->setParent($formattedParent) - ->setJobs($jobs); - $response = $gapicClient->batchCreateJobsAsync($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.talent.v4.JobService/BatchCreateJobs', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getJobs(); - $this->assertProtobufEquals($jobs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreateJobsTest'); - $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/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php b/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php deleted file mode 100644 index 40ed45c1a39c..000000000000 --- a/owl-bot-staging/Talent/v4/tests/Unit/V4/Client/TenantServiceClientTest.php +++ /dev/null @@ -1,450 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TenantServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TenantServiceClient($options); - } - - /** @test */ - public function createTenantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $externalId = 'externalId-1153075697'; - $expectedResponse = new Tenant(); - $expectedResponse->setName($name); - $expectedResponse->setExternalId($externalId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $tenant = new Tenant(); - $tenantExternalId = 'tenantExternalId-300736880'; - $tenant->setExternalId($tenantExternalId); - $request = (new CreateTenantRequest()) - ->setParent($formattedParent) - ->setTenant($tenant); - $response = $gapicClient->createTenant($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.talent.v4.TenantService/CreateTenant', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTenant(); - $this->assertProtobufEquals($tenant, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTenantExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $tenant = new Tenant(); - $tenantExternalId = 'tenantExternalId-300736880'; - $tenant->setExternalId($tenantExternalId); - $request = (new CreateTenantRequest()) - ->setParent($formattedParent) - ->setTenant($tenant); - try { - $gapicClient->createTenant($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTenantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $request = (new DeleteTenantRequest()) - ->setName($formattedName); - $gapicClient->deleteTenant($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.TenantService/DeleteTenant', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTenantExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $request = (new DeleteTenantRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTenant($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTenantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $externalId = 'externalId-1153075697'; - $expectedResponse = new Tenant(); - $expectedResponse->setName($name2); - $expectedResponse->setExternalId($externalId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tenantName('[PROJECT]', '[TENANT]'); - $request = (new GetTenantRequest()) - ->setName($formattedName); - $response = $gapicClient->getTenant($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.talent.v4.TenantService/GetTenant', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTenantExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tenantName('[PROJECT]', '[TENANT]'); - $request = (new GetTenantRequest()) - ->setName($formattedName); - try { - $gapicClient->getTenant($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTenantsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tenantsElement = new Tenant(); - $tenants = [ - $tenantsElement, - ]; - $expectedResponse = new ListTenantsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTenants($tenants); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListTenantsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTenants($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTenants()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.talent.v4.TenantService/ListTenants', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTenantsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListTenantsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTenants($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTenantTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $externalId = 'externalId-1153075697'; - $expectedResponse = new Tenant(); - $expectedResponse->setName($name); - $expectedResponse->setExternalId($externalId); - $transport->addResponse($expectedResponse); - // Mock request - $tenant = new Tenant(); - $tenantExternalId = 'tenantExternalId-300736880'; - $tenant->setExternalId($tenantExternalId); - $request = (new UpdateTenantRequest()) - ->setTenant($tenant); - $response = $gapicClient->updateTenant($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.talent.v4.TenantService/UpdateTenant', $actualFuncCall); - $actualValue = $actualRequestObject->getTenant(); - $this->assertProtobufEquals($tenant, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTenantExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $tenant = new Tenant(); - $tenantExternalId = 'tenantExternalId-300736880'; - $tenant->setExternalId($tenantExternalId); - $request = (new UpdateTenantRequest()) - ->setTenant($tenant); - try { - $gapicClient->updateTenant($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTenantAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $externalId = 'externalId-1153075697'; - $expectedResponse = new Tenant(); - $expectedResponse->setName($name); - $expectedResponse->setExternalId($externalId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $tenant = new Tenant(); - $tenantExternalId = 'tenantExternalId-300736880'; - $tenant->setExternalId($tenantExternalId); - $request = (new CreateTenantRequest()) - ->setParent($formattedParent) - ->setTenant($tenant); - $response = $gapicClient->createTenantAsync($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.talent.v4.TenantService/CreateTenant', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTenant(); - $this->assertProtobufEquals($tenant, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php deleted file mode 100644 index ff8f3bff9a15..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Cloudtasks.php +++ /dev/null @@ -1,114 +0,0 @@ -internalAddGeneratedFile( - ' -˜% -&google/cloud/tasks/v2/cloudtasks.protogoogle.cloud.tasks.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto!google/cloud/tasks/v2/queue.proto google/cloud/tasks/v2/task.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"ƒ -ListQueuesRequest7 -parent ( B\'àAúA!cloudtasks.googleapis.com/Queue -filter (  - page_size ( - -page_token ( "[ -ListQueuesResponse, -queues ( 2.google.cloud.tasks.v2.Queue -next_page_token ( "H -GetQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue" -CreateQueueRequest7 -parent ( B\'àAúA!cloudtasks.googleapis.com/Queue0 -queue ( 2.google.cloud.tasks.v2.QueueBàA"w -UpdateQueueRequest0 -queue ( 2.google.cloud.tasks.v2.QueueBàA/ - update_mask ( 2.google.protobuf.FieldMask"K -DeleteQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"J -PurgeQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"J -PauseQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"K -ResumeQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"ª -ListTasksRequest6 -parent ( B&àAúA cloudtasks.googleapis.com/Task7 - response_view (2 .google.cloud.tasks.v2.Task.View - page_size ( - -page_token ( "X -ListTasksResponse* -tasks ( 2.google.cloud.tasks.v2.Task -next_page_token ( " -GetTaskRequest4 -name ( B&àAúA -cloudtasks.googleapis.com/Task7 - response_view (2 .google.cloud.tasks.v2.Task.View"´ -CreateTaskRequest6 -parent ( B&àAúA cloudtasks.googleapis.com/Task. -task ( 2.google.cloud.tasks.v2.TaskBàA7 - response_view (2 .google.cloud.tasks.v2.Task.View"I -DeleteTaskRequest4 -name ( B&àAúA -cloudtasks.googleapis.com/Task" -RunTaskRequest4 -name ( B&àAúA -cloudtasks.googleapis.com/Task7 - response_view (2 .google.cloud.tasks.v2.Task.View2Ý - -CloudTasksž - -ListQueues(.google.cloud.tasks.v2.ListQueuesRequest).google.cloud.tasks.v2.ListQueuesResponse";ÚAparent‚Óä“,*/v2/{parent=projects/*/locations/*}/queues‹ -GetQueue&.google.cloud.tasks.v2.GetQueueRequest.google.cloud.tasks.v2.Queue"9ÚAname‚Óä“,*/v2/{name=projects/*/locations/*/queues/*}  - CreateQueue).google.cloud.tasks.v2.CreateQueueRequest.google.cloud.tasks.v2.Queue"HÚA parent,queue‚Óä“3"*/v2/{parent=projects/*/locations/*}/queues:queue« - UpdateQueue).google.cloud.tasks.v2.UpdateQueueRequest.google.cloud.tasks.v2.Queue"SÚAqueue,update_mask‚Óä“920/v2/{queue.name=projects/*/locations/*/queues/*}:queue‹ - DeleteQueue).google.cloud.tasks.v2.DeleteQueueRequest.google.protobuf.Empty"9ÚAname‚Óä“,**/v2/{name=projects/*/locations/*/queues/*}˜ - -PurgeQueue(.google.cloud.tasks.v2.PurgeQueueRequest.google.cloud.tasks.v2.Queue"BÚAname‚Óä“5"0/v2/{name=projects/*/locations/*/queues/*}:purge:*˜ - -PauseQueue(.google.cloud.tasks.v2.PauseQueueRequest.google.cloud.tasks.v2.Queue"BÚAname‚Óä“5"0/v2/{name=projects/*/locations/*/queues/*}:pause:*› - ResumeQueue).google.cloud.tasks.v2.ResumeQueueRequest.google.cloud.tasks.v2.Queue"CÚAname‚Óä“6"1/v2/{name=projects/*/locations/*/queues/*}:resume:*œ - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"QÚAresource‚Óä“@";/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy:*£ - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"XÚAresource,policy‚Óä“@";/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy:*Î -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"cÚAresource,permissions‚Óä“F"A/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions:*£ - ListTasks\'.google.cloud.tasks.v2.ListTasksRequest(.google.cloud.tasks.v2.ListTasksResponse"CÚAparent‚Óä“42/v2/{parent=projects/*/locations/*/queues/*}/tasks -GetTask%.google.cloud.tasks.v2.GetTaskRequest.google.cloud.tasks.v2.Task"AÚAname‚Óä“42/v2/{name=projects/*/locations/*/queues/*/tasks/*}  - -CreateTask(.google.cloud.tasks.v2.CreateTaskRequest.google.cloud.tasks.v2.Task"KÚA parent,task‚Óä“7"2/v2/{parent=projects/*/locations/*/queues/*}/tasks:*‘ - -DeleteTask(.google.cloud.tasks.v2.DeleteTaskRequest.google.protobuf.Empty"AÚAname‚Óä“4*2/v2/{name=projects/*/locations/*/queues/*/tasks/*}— -RunTask%.google.cloud.tasks.v2.RunTaskRequest.google.cloud.tasks.v2.Task"HÚAname‚Óä“;"6/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run:*MÊAcloudtasks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBv -com.google.cloud.tasks.v2BCloudTasksProtoPZ>cloud.google.com/go/cloudtasks/apiv2/cloudtaskspb;cloudtaskspb¢TASKSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Queue.php b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Queue.php deleted file mode 100644 index 7934457c1550ea983a9692c5f7e75c7193348064..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1983 zcmbVN;cgp65XNmB$T(ExM356Cx-pgFN^llNRLCJkPV7dOLSk$O33Srwe7C-Ad%oN5 z?nRW!FU4P;g4f_FnBBc|9O_Vn|M+h2`*vr(`F7^J@A(yn&&erGsR$H}$n-T)SCnv( zsVvMAGRDuZK@_OKJ2gb_L=(MHT1uu@noo*j^>%DVnl{Ex=dB=*h!QznJ)ICi zRW8y)6Sv-Av3&B@2-W4x8_`1c&P_r${B^9`@}kZHbLjkM`cjf!jy^#p{|9x#u>2~R z^YvU)g)g76Li27EEhT=A)@v?B(GnfNA6u~hPR}_z7UCLPy2h67b$hR|o~eu~)~ z6&Pb)bVDmDQZK$g`sa65=4Szo-#4IY?CWg9hW38FLMqKI=L|j#IQMB9vy}QG%N0vw zKf9(vu!z?0A*j~&4&1e&yIs!vhB>lC=PA_m)%6oLXG+%Z8~Xko>=7c*4AA)&w$XUv zwI62bjK%d0Lu}kd)X)=ybiRVB_BX9pk@BE@7scf6jy2M80eFs<^R-CzO>@*ILby7);JqgZhn>XzZRO8)KQ>Jv-indRBI8-1wSXm;SE@uWNH`$!L{;nVS6O5ywa_1(Rcx{Ql)*^od>`A z5yQr*!Ye9$j(SLnMT?A|D$XbHKtravkjj_X3yp=UPC-Rvmw4LEw$x~04Yg->_OA}otob_lF_ZO&4Eiq*(wv%;9~!0S8; zy!GS1;CJ9dBTc5qLK;hB$7-Vu^}8IPrIOfyG~73R%u0C7U>6HlrgGa)$6)F?)I(ud z`Q@4YT3${pcbwU&XNMlT0O#I~Ir#K&^<}zgg!=km+0MSO6Jce5p!0FStr;E$Y5V*F H765+(Bg%xr diff --git a/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Target.php b/owl-bot-staging/Tasks/v2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2/Target.php deleted file mode 100644 index 54926fb36dd67b638443466bc250c6cb509b8833..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1761 zcmb7F|8Cnh5UzhDu20@72&d~eJWj3mhpfL(1Ni=M0!EQvaly`dXe_lefh!{ zM3{LvfEcexn&5z-Q)l#w2pnR8z0=&&J64{at3188{X>8t!fA@!JOX?GB%dUkMKnOE zz(W2!qp440DkzTVd&&I>&2f|x>3S18&*DH(79-_g#{ua+M@3A9eU>m;>k<0M#Zl$U z(!FUc2#;~(jY%4Cnh3@n2^|b%RhyC`Zx-U%g9I3i2Dri>2;*Hv8y$&32#B`r%BhT(?siPW;Y$)Pgt!*5OK z+%KZ>xWJgX&}J^Qx$bxVtb#TXB6&@I%}6Q?9cmem+7(pkHb=EThE?MS(3TS5uZUQ( zuw9j3KJ7m>Zw+UvP;x*d(D(@&OM*kf({>Hjx>~>YFFs{@b5eL%vEY|R3+gi#UbgEp zWy?4Kjp0lzeZekB+}@E!?M@!{P$FFgoIH>f0Ha}0I_~C<=ngWr1eShZn9%wg9}Q|3 zp~A3ccnEcT1~JHJ<9Z?hcuRFSZ<24AUQ=#mWq6e znw0;Pj;)_9*V1>4ChRyv_jsc38X7cg$DP_|=XzuG3w$oGfZG)uX~mAtm!?yB_p(?G z9}hNL^%ktS7m8~ECsf`HIVd+Iv%~E_v)%l*_6BjelxbnI%r6LMG zPq_?v!WAbm{}bN5g(oDI41kwyCwW2@PZO*G`w3<3=h*txwogS0ac<%AB_ka=gdGeM z#j=FNL7z#QaiP*|1g5?}WvU`f@3fy6*J^isg4_0uzJKYFTUcc|yLdas8B=+dY?^m# z2lHwbT)|UU@Zf+Ir2FRqo#U@UEwT$VXApybYj{OTKL?cnlm7#H#3B2NoQT_F4+ISk zA>FyW8e=l|?Q34-sT)OAT6RFJ?TScE>ofFM1Kp@n=L@T2*XY#ghLt%+dC0*OlO`pt`Q2W)0Wc4QCHM zB0_{Lnev2%Go?hBvEOr`xp@~1mOC$8>+yqV+^!G<19}6P0}FX`$MMn1f|E~-lh!p( z7O^kULrG^W%3~JlxSDkXUN6BVDQ=|$$3x3BW6*UhVChD{EA&~!p@S$o3nNCN7{YGe zGqA^(?kT0}e2G>o6ixF)HSYstN$+RSkJ3c4(C$Al``@F76P`&G5~bLQP|b$9VWYfZ zQ5kO6S~;)K3UsV<6uK44MfFq8{%9_P^=b!SbBE5odkl81m#D74&gW?DcsTeue7AQv z8f*`DhJ*gv9jAeodfmg}_FBz(fa*K%-o9PC>(Bn}GPGe{ZRKn=K?IjBv~|x2Ya8hI%vf7$_?b7M0Lz zXeLK`dW>qnytapB{Q=L@)DB0J1P|zk@pzsUG2XoRXME2T%y-YK9`=nL9Tz5zel4e0 OOc`To2f`f95&94G5|j!6 diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php deleted file mode 100644 index ad547996af2e..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineHttpRequest.php +++ /dev/null @@ -1,469 +0,0 @@ -google.cloud.tasks.v2.AppEngineHttpRequest - */ -class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1; - */ - protected $http_method = 0; - /** - * Task-level setting for App Engine routing. - * * If [app_engine_routing_override is set on the - * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this - * value is used for all tasks in the queue, no matter what the setting is - * for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; - */ - protected $app_engine_routing = null; - /** - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_uri = 3; - */ - protected $relative_uri = ''; - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], - * Cloud Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. - * - * Generated from protobuf field map headers = 4; - */ - private $headers; - /** - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * - * Generated from protobuf field bytes body = 5; - */ - protected $body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $http_method - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * @type \Google\Cloud\Tasks\V2\AppEngineRouting $app_engine_routing - * Task-level setting for App Engine routing. - * * If [app_engine_routing_override is set on the - * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this - * value is used for all tasks in the queue, no matter what the setting is - * for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * @type string $relative_uri - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * @type array|\Google\Protobuf\Internal\MapField $headers - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], - * Cloud Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. - * @type string $body - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * Task-level setting for App Engine routing. - * * If [app_engine_routing_override is set on the - * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this - * value is used for all tasks in the queue, no matter what the setting is - * for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; - * @return \Google\Cloud\Tasks\V2\AppEngineRouting|null - */ - public function getAppEngineRouting() - { - return $this->app_engine_routing; - } - - public function hasAppEngineRouting() - { - return isset($this->app_engine_routing); - } - - public function clearAppEngineRouting() - { - unset($this->app_engine_routing); - } - - /** - * Task-level setting for App Engine routing. - * * If [app_engine_routing_override is set on the - * queue][google.cloud.tasks.v2.Queue.app_engine_routing_override], this - * value is used for all tasks in the queue, no matter what the setting is - * for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2; - * @param \Google\Cloud\Tasks\V2\AppEngineRouting $var - * @return $this - */ - public function setAppEngineRouting($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineRouting::class); - $this->app_engine_routing = $var; - - return $this; - } - - /** - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_uri = 3; - * @return string - */ - public function getRelativeUri() - { - return $this->relative_uri; - } - - /** - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_uri = 3; - * @param string $var - * @return $this - */ - public function setRelativeUri($var) - { - GPBUtil::checkString($var, True); - $this->relative_uri = $var; - - return $this; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], - * Cloud Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. - * - * Generated from protobuf field map headers = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], - * Cloud Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation. - * - * Generated from protobuf field map headers = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * - * Generated from protobuf field bytes body = 5; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * - * Generated from protobuf field bytes body = 5; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, False); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php deleted file mode 100644 index 265cf9515609..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/AppEngineRouting.php +++ /dev/null @@ -1,373 +0,0 @@ -google.cloud.tasks.v2.AppEngineRouting - */ -class AppEngineRouting extends \Google\Protobuf\Internal\Message -{ - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * - * Generated from protobuf field string service = 1; - */ - protected $service = ''; - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - */ - protected $instance = ''; - /** - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which - * were created using the App Engine SDK might have a custom domain name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * Generated from protobuf field string host = 4; - */ - protected $host = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * @type string $version - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * @type string $instance - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * @type string $host - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which - * were created using the App Engine SDK might have a custom domain name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); - parent::__construct($data); - } - - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * - * Generated from protobuf field string service = 1; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * - * Generated from protobuf field string service = 1; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2.AppEngineRouting.host] is not - * parsable into [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. For example, - * some tasks which were created using the App Engine SDK use a custom domain - * name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2.AppEngineRouting.host] is not parsable, then - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance] are the empty - * string. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which - * were created using the App Engine SDK might have a custom domain name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * Generated from protobuf field string host = 4; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2.AppEngineRouting.instance]. Tasks which - * were created using the App Engine SDK might have a custom domain name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * Generated from protobuf field string host = 4; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php deleted file mode 100644 index 880d0b5b6f34..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Attempt.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.tasks.v2.Attempt - */ -class Attempt extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - */ - protected $schedule_time = null; - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - */ - protected $dispatch_time = null; - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - */ - protected $response_time = null; - /** - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - */ - protected $response_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $schedule_time - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $dispatch_time - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $response_time - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * @type \Google\Rpc\Status $response_status - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDispatchTime() - { - return $this->dispatch_time; - } - - public function hasDispatchTime() - { - return isset($this->dispatch_time); - } - - public function clearDispatchTime() - { - unset($this->dispatch_time); - } - - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDispatchTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dispatch_time = $var; - - return $this; - } - - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getResponseTime() - { - return $this->response_time; - } - - public function hasResponseTime() - { - return isset($this->response_time); - } - - public function clearResponseTime() - { - unset($this->response_time); - } - - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setResponseTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->response_time = $var; - - return $this; - } - - /** - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - * @return \Google\Rpc\Status|null - */ - public function getResponseStatus() - { - return $this->response_status; - } - - public function hasResponseStatus() - { - return isset($this->response_status); - } - - public function clearResponseStatus() - { - unset($this->response_status); - } - - /** - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setResponseStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->response_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php deleted file mode 100644 index 0efd1e6fd83c..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateQueueRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.tasks.v2.CreateQueueRequest - */ -class CreateQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - * existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $queue = null; - - /** - * @param string $parent Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. Please see - * {@see CloudTasksClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Tasks\V2\Queue $queue Required. The queue to create. - * - * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - * existing queue. - * - * @return \Google\Cloud\Tasks\V2\CreateQueueRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Tasks\V2\Queue $queue): self - { - return (new self()) - ->setParent($parent) - ->setQueue($queue); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * @type \Google\Cloud\Tasks\V2\Queue $queue - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - * existing queue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * 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 name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * 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 queue to create. - * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - * existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2\Queue|null - */ - public function getQueue() - { - return $this->queue; - } - - public function hasQueue() - { - return isset($this->queue); - } - - public function clearQueue() - { - unset($this->queue); - } - - /** - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - * existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2\Queue $var - * @return $this - */ - public function setQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Queue::class); - $this->queue = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php deleted file mode 100644 index 5b1c36712fe2..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/CreateTaskRequest.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.tasks.v2.CreateTaskRequest - */ -class CreateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then - * the system will generate a random unique task id, which will be set in the - * task returned in the [response][google.cloud.tasks.v2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or - * is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 3; - */ - protected $response_view = 0; - - /** - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. Please see - * {@see CloudTasksClient::queueName()} for help formatting this field. - * @param \Google\Cloud\Tasks\V2\Task $task Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then - * the system will generate a random unique task id, which will be set in the - * task returned in the [response][google.cloud.tasks.v2.Task.name]. - * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or - * is in the past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * @return \Google\Cloud\Tasks\V2\CreateTaskRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Tasks\V2\Task $task): self - { - return (new self()) - ->setParent($parent) - ->setTask($task); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * @type \Google\Cloud\Tasks\V2\Task $task - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then - * the system will generate a random unique task id, which will be set in the - * task returned in the [response][google.cloud.tasks.v2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or - * is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * 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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * 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 task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then - * the system will generate a random unique task id, which will be set in the - * task returned in the [response][google.cloud.tasks.v2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or - * is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then - * the system will generate a random unique task id, which will be set in the - * task returned in the [response][google.cloud.tasks.v2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or - * is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Task::class); - $this->task = $var; - - return $this; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 3; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 3; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php deleted file mode 100644 index 9d6a391711c7..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteQueueRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.tasks.v2.DeleteQueueRequest - */ -class DeleteQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * Please see {@see CloudTasksClient::queueName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\DeleteQueueRequest - * - * @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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php deleted file mode 100644 index 8b4e795d4dcf..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/DeleteTaskRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.tasks.v2.DeleteTaskRequest - */ -class DeleteTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * Please see {@see CloudTasksClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\DeleteTaskRequest - * - * @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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php deleted file mode 100644 index bf492cc9817b..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetQueueRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.tasks.v2.GetQueueRequest - */ -class GetQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * Please see {@see CloudTasksClient::queueName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\GetQueueRequest - * - * @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 queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php deleted file mode 100644 index 7ec071973327..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/GetTaskRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.tasks.v2.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - */ - protected $response_view = 0; - - /** - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * Please see {@see CloudTasksClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\GetTaskRequest - * - * @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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php deleted file mode 100644 index f545f185d4a0..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpMethod.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.tasks.v2.HttpMethod - */ -class HttpMethod -{ - /** - * HTTP method unspecified - * - * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; - */ - const HTTP_METHOD_UNSPECIFIED = 0; - /** - * HTTP POST - * - * Generated from protobuf enum POST = 1; - */ - const POST = 1; - /** - * HTTP GET - * - * Generated from protobuf enum GET = 2; - */ - const GET = 2; - /** - * HTTP HEAD - * - * Generated from protobuf enum HEAD = 3; - */ - const HEAD = 3; - /** - * HTTP PUT - * - * Generated from protobuf enum PUT = 4; - */ - const PUT = 4; - /** - * HTTP DELETE - * - * Generated from protobuf enum DELETE = 5; - */ - const DELETE = 5; - /** - * HTTP PATCH - * - * Generated from protobuf enum PATCH = 6; - */ - const PATCH = 6; - /** - * HTTP OPTIONS - * - * Generated from protobuf enum OPTIONS = 7; - */ - const OPTIONS = 7; - - private static $valueToName = [ - self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', - self::POST => 'POST', - self::GET => 'GET', - self::HEAD => 'HEAD', - self::PUT => 'PUT', - self::DELETE => 'DELETE', - self::PATCH => 'PATCH', - self::OPTIONS => 'OPTIONS', - ]; - - 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php deleted file mode 100644 index 5d4f5a2be77e..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/HttpRequest.php +++ /dev/null @@ -1,421 +0,0 @@ -google.cloud.tasks.v2.HttpRequest - */ -class HttpRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $url = ''; - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 2; - */ - protected $http_method = 0; - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - */ - private $headers; - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, - * or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - */ - protected $body = ''; - protected $authorization_header; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * @type int $http_method - * The HTTP method to use for the request. The default is POST. - * @type array|\Google\Protobuf\Internal\MapField $headers - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * @type string $body - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, - * or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * @type \Google\Cloud\Tasks\V2\OAuthToken $oauth_token - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * @type \Google\Cloud\Tasks\V2\OidcToken $oidc_token - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 2; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 2; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, - * or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2.HttpRequest.http_method] is POST, PUT, - * or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, False); - $this->body = $var; - - return $this; - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2.OAuthToken oauth_token = 5; - * @return \Google\Cloud\Tasks\V2\OAuthToken|null - */ - public function getOauthToken() - { - return $this->readOneof(5); - } - - public function hasOauthToken() - { - return $this->hasOneof(5); - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2.OAuthToken oauth_token = 5; - * @param \Google\Cloud\Tasks\V2\OAuthToken $var - * @return $this - */ - public function setOauthToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\OAuthToken::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2.OidcToken oidc_token = 6; - * @return \Google\Cloud\Tasks\V2\OidcToken|null - */ - public function getOidcToken() - { - return $this->readOneof(6); - } - - public function hasOidcToken() - { - return $this->hasOneof(6); - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2.OidcToken oidc_token = 6; - * @param \Google\Cloud\Tasks\V2\OidcToken $var - * @return $this - */ - public function setOidcToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\OidcToken::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthorizationHeader() - { - return $this->whichOneof("authorization_header"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php deleted file mode 100644 index 74ace2efa6b0..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesRequest.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.tasks.v2.ListQueuesRequest - */ -class ListQueuesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an - * error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating - * through pages. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * Please see {@see CloudTasksClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\ListQueuesRequest - * - * @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 name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * @type string $filter - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * @type int $page_size - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * @type string $page_token - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an - * error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating - * through pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_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 location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_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; - } - - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * 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; - } - - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * 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 token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an - * error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating - * through pages. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] method. It is an - * error to switch the value of the - * [filter][google.cloud.tasks.v2.ListQueuesRequest.filter] while iterating - * through pages. - * - * 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php deleted file mode 100644 index 35df0c08229f..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListQueuesResponse.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.tasks.v2.ListQueuesResponse - */ -class ListQueuesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2.Queue queues = 1; - */ - private $queues; - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value - * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Tasks\V2\Queue>|\Google\Protobuf\Internal\RepeatedField $queues - * The list of queues. - * @type string $next_page_token - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value - * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2.Queue queues = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQueues() - { - return $this->queues; - } - - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2.Queue queues = 1; - * @param array<\Google\Cloud\Tasks\V2\Queue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQueues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2\Queue::class); - $this->queues = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value - * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * 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. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues] with this value - * as the [page_token][google.cloud.tasks.v2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php deleted file mode 100644 index 1919c39be9d2..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksRequest.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.tasks.v2.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - */ - protected $response_view = 0; - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * Please see {@see CloudTasksClient::queueName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\ListTasksRequest - * - * @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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * @type int $page_size - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * @type string $page_token - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); - $this->response_view = $var; - - return $this; - } - - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * 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 token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php deleted file mode 100644 index 4aa25374a944..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ListTasksResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.tasks.v2.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2.Task tasks = 1; - */ - private $tasks; - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as - * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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 array<\Google\Cloud\Tasks\V2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The list of tasks. - * @type string $next_page_token - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as - * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2.Task tasks = 1; - * @param array<\Google\Cloud\Tasks\V2\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as - * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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 token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks] with this value as - * the [page_token][google.cloud.tasks.v2.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php deleted file mode 100644 index a4533a9aaf28..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OAuthToken.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.tasks.v2.OAuthToken - */ -class OAuthToken extends \Google\Protobuf\Internal\Message -{ - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - */ - protected $service_account_email = ''; - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - */ - protected $scope = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_email - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * @type string $scope - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); - parent::__construct($data); - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php deleted file mode 100644 index 5754271fc809..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/OidcToken.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.tasks.v2.OidcToken - */ -class OidcToken extends \Google\Protobuf\Internal\Message -{ - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - */ - protected $service_account_email = ''; - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - */ - protected $audience = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_email - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * @type string $audience - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce(); - parent::__construct($data); - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php deleted file mode 100644 index 64db439c96ab..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PauseQueueRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.tasks.v2.PauseQueueRequest - */ -class PauseQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * Please see {@see CloudTasksClient::queueName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\PauseQueueRequest - * - * @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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php deleted file mode 100644 index 2e24c8a7f5c3..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/PurgeQueueRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.tasks.v2.PurgeQueueRequest - */ -class PurgeQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * Please see {@see CloudTasksClient::queueName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\PurgeQueueRequest - * - * @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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php deleted file mode 100644 index d620fdefd4b3..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue.php +++ /dev/null @@ -1,611 +0,0 @@ -google.cloud.tasks.v2.Queue - */ -class Queue extends \Google\Protobuf\Internal\Message -{ - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it - * becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Overrides for - * [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * These settings apply only to - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this - * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. - * If set, `app_engine_routing_override` is used for all - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the - * queue, no matter what the setting is for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing_override = 2; - */ - protected $app_engine_routing_override = null; - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total - * rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what - * happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task - * retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * Generated from protobuf field .google.cloud.tasks.v2.RateLimits rate_limits = 3; - */ - protected $rate_limits = null; - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2.RetryConfig retry_config = 4; - */ - protected $retry_config = null; - /** - * Output only. The state of the queue. - * `state` can only be changed by calling - * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used - * to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue.State state = 5; - */ - protected $state = 0; - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine - * Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 6; - */ - protected $purge_time = null; - /** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * Generated from protobuf field .google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9; - */ - protected $stackdriver_logging_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it - * becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * @type \Google\Cloud\Tasks\V2\AppEngineRouting $app_engine_routing_override - * Overrides for - * [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * These settings apply only to - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this - * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. - * If set, `app_engine_routing_override` is used for all - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the - * queue, no matter what the setting is for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * @type \Google\Cloud\Tasks\V2\RateLimits $rate_limits - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total - * rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what - * happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task - * retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * @type \Google\Cloud\Tasks\V2\RetryConfig $retry_config - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * @type int $state - * Output only. The state of the queue. - * `state` can only be changed by calling - * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used - * to change `state`. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine - * Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * @type \Google\Cloud\Tasks\V2\StackdriverLoggingConfig $stackdriver_logging_config - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it - * becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue], after which it - * becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * 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; - } - - /** - * Overrides for - * [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * These settings apply only to - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this - * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. - * If set, `app_engine_routing_override` is used for all - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the - * queue, no matter what the setting is for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing_override = 2; - * @return \Google\Cloud\Tasks\V2\AppEngineRouting|null - */ - public function getAppEngineRoutingOverride() - { - return $this->app_engine_routing_override; - } - - public function hasAppEngineRoutingOverride() - { - return isset($this->app_engine_routing_override); - } - - public function clearAppEngineRoutingOverride() - { - unset($this->app_engine_routing_override); - } - - /** - * Overrides for - * [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * These settings apply only to - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in this - * queue. [Http tasks][google.cloud.tasks.v2.HttpRequest] are not affected. - * If set, `app_engine_routing_override` is used for all - * [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest] in the - * queue, no matter what the setting is for the [task-level - * app_engine_routing][google.cloud.tasks.v2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing_override = 2; - * @param \Google\Cloud\Tasks\V2\AppEngineRouting $var - * @return $this - */ - public function setAppEngineRoutingOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineRouting::class); - $this->app_engine_routing_override = $var; - - return $this; - } - - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total - * rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what - * happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task - * retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * Generated from protobuf field .google.cloud.tasks.v2.RateLimits rate_limits = 3; - * @return \Google\Cloud\Tasks\V2\RateLimits|null - */ - public function getRateLimits() - { - return $this->rate_limits; - } - - public function hasRateLimits() - { - return isset($this->rate_limits); - } - - public function clearRateLimits() - { - unset($this->rate_limits); - } - - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits] controls the total - * rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls what - * happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2.Queue.retry_config] controls task - * retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * Generated from protobuf field .google.cloud.tasks.v2.RateLimits rate_limits = 3; - * @param \Google\Cloud\Tasks\V2\RateLimits $var - * @return $this - */ - public function setRateLimits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\RateLimits::class); - $this->rate_limits = $var; - - return $this; - } - - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2.RetryConfig retry_config = 4; - * @return \Google\Cloud\Tasks\V2\RetryConfig|null - */ - public function getRetryConfig() - { - return $this->retry_config; - } - - public function hasRetryConfig() - { - return isset($this->retry_config); - } - - public function clearRetryConfig() - { - unset($this->retry_config); - } - - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2.RetryConfig retry_config = 4; - * @param \Google\Cloud\Tasks\V2\RetryConfig $var - * @return $this - */ - public function setRetryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\RetryConfig::class); - $this->retry_config = $var; - - return $this; - } - - /** - * Output only. The state of the queue. - * `state` can only be changed by calling - * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used - * to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue.State state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the queue. - * `state` can only be changed by calling - * [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue], or uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] cannot be used - * to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue.State state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Queue\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine - * Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue], the [App Engine - * Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - - /** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * Generated from protobuf field .google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9; - * @return \Google\Cloud\Tasks\V2\StackdriverLoggingConfig|null - */ - public function getStackdriverLoggingConfig() - { - return $this->stackdriver_logging_config; - } - - public function hasStackdriverLoggingConfig() - { - return isset($this->stackdriver_logging_config); - } - - public function clearStackdriverLoggingConfig() - { - unset($this->stackdriver_logging_config); - } - - /** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * Generated from protobuf field .google.cloud.tasks.v2.StackdriverLoggingConfig stackdriver_logging_config = 9; - * @param \Google\Cloud\Tasks\V2\StackdriverLoggingConfig $var - * @return $this - */ - public function setStackdriverLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\StackdriverLoggingConfig::class); - $this->stackdriver_logging_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php deleted file mode 100644 index 2c4722b35ec5..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Queue/State.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.tasks.v2.Queue.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The queue is running. Tasks can be dispatched. - * If the queue was created using Cloud Tasks and the queue has - * had no activity (method calls or task dispatches) for 30 days, - * the queue may take a few minutes to re-activate. Some method - * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and - * tasks may not be dispatched for a few minutes until the queue - * has been re-activated. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * Tasks are paused by the user. If the queue is paused then Cloud - * Tasks will stop delivering tasks from it, but more tasks can - * still be added to it by the user. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * The queue is disabled. - * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - * or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - * is uploaded which does not contain the queue. You cannot directly disable - * a queue. - * When a queue is disabled, tasks can still be added to a queue - * but the tasks are not dispatched. - * To permanently delete this queue and all of its tasks, call - * [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. - * - * Generated from protobuf enum DISABLED = 3; - */ - const DISABLED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Tasks\V2\Queue_State::class); - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php deleted file mode 100644 index 27f254540e19..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RateLimits.php +++ /dev/null @@ -1,308 +0,0 @@ -google.cloud.tasks.v2.RateLimits - */ -class RateLimits extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * The maximum allowed value is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_dispatches_per_second = 1; - */ - protected $max_dispatches_per_second = 0.0; - /** - * Output only. The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * For queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * Since `max_burst_size` is output only, if - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a - * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on - * the value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], - * regardless of whether - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] - * is updated. - * - * Generated from protobuf field int32 max_burst_size = 2; - */ - protected $max_burst_size = 0; - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_dispatches = 3; - */ - protected $max_concurrent_dispatches = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $max_dispatches_per_second - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * The maximum allowed value is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * @type int $max_burst_size - * Output only. The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * For queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * Since `max_burst_size` is output only, if - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a - * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on - * the value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], - * regardless of whether - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] - * is updated. - * @type int $max_concurrent_dispatches - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * The maximum allowed value is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_dispatches_per_second = 1; - * @return float - */ - public function getMaxDispatchesPerSecond() - { - return $this->max_dispatches_per_second; - } - - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * The maximum allowed value is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_dispatches_per_second = 1; - * @param float $var - * @return $this - */ - public function setMaxDispatchesPerSecond($var) - { - GPBUtil::checkDouble($var); - $this->max_dispatches_per_second = $var; - - return $this; - } - - /** - * Output only. The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * For queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * Since `max_burst_size` is output only, if - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a - * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on - * the value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], - * regardless of whether - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] - * is updated. - * - * Generated from protobuf field int32 max_burst_size = 2; - * @return int - */ - public function getMaxBurstSize() - { - return $this->max_burst_size; - } - - /** - * Output only. The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * Cloud Tasks will pick the value of `max_burst_size` based on the - * value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second]. - * For queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * Since `max_burst_size` is output only, if - * [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue] is called on a - * queue created by `queue.yaml/xml`, `max_burst_size` will be reset based on - * the value of - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second], - * regardless of whether - * [max_dispatches_per_second][google.cloud.tasks.v2.RateLimits.max_dispatches_per_second] - * is updated. - * - * Generated from protobuf field int32 max_burst_size = 2; - * @param int $var - * @return $this - */ - public function setMaxBurstSize($var) - { - GPBUtil::checkInt32($var); - $this->max_burst_size = $var; - - return $this; - } - - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_dispatches = 3; - * @return int - */ - public function getMaxConcurrentDispatches() - { - return $this->max_concurrent_dispatches; - } - - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_dispatches = 3; - * @param int $var - * @return $this - */ - public function setMaxConcurrentDispatches($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_dispatches = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php deleted file mode 100644 index 9d16294a8e1e..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/ResumeQueueRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.tasks.v2.ResumeQueueRequest - */ -class ResumeQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * Please see {@see CloudTasksClient::queueName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\ResumeQueueRequest - * - * @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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php deleted file mode 100644 index 64252afa351d..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RetryConfig.php +++ /dev/null @@ -1,490 +0,0 @@ -google.cloud.tasks.v2.RetryConfig - */ -class RetryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_attempts = 1; - */ - protected $max_attempts = 0; - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no - * further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; - */ - protected $max_retry_duration = null; - /** - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; - */ - protected $min_backoff = null; - /** - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; - */ - protected $max_backoff = null; - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles - * `max_doublings` times, then increases linearly, and finally - * retries at intervals of - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] - * until the task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, - * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 5; - */ - protected $max_doublings = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_attempts - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $max_retry_duration - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no - * further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $min_backoff - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $max_backoff - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type int $max_doublings - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles - * `max_doublings` times, then increases linearly, and finally - * retries at intervals of - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] - * until the task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, - * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_attempts = 1; - * @return int - */ - public function getMaxAttempts() - { - return $this->max_attempts; - } - - /** - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_attempts = 1; - * @param int $var - * @return $this - */ - public function setMaxAttempts($var) - { - GPBUtil::checkInt32($var); - $this->max_attempts = $var; - - return $this; - } - - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no - * further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxRetryDuration() - { - return $this->max_retry_duration; - } - - public function hasMaxRetryDuration() - { - return isset($this->max_retry_duration); - } - - public function clearMaxRetryDuration() - { - unset($this->max_retry_duration); - } - - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no - * further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxRetryDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_retry_duration = $var; - - return $this; - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBackoff() - { - return $this->min_backoff; - } - - public function hasMinBackoff() - { - return isset($this->min_backoff); - } - - public function clearMinBackoff() - { - unset($this->min_backoff); - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBackoff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_backoff = $var; - - return $this; - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxBackoff() - { - return $this->max_backoff; - } - - public function hasMaxBackoff() - { - return isset($this->max_backoff); - } - - public function clearMaxBackoff() - { - unset($this->max_backoff); - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for - * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] - * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task - * should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxBackoff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_backoff = $var; - - return $this; - } - - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles - * `max_doublings` times, then increases linearly, and finally - * retries at intervals of - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] - * until the task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, - * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 5; - * @return int - */ - public function getMaxDoublings() - { - return $this->max_doublings; - } - - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles - * `max_doublings` times, then increases linearly, and finally - * retries at intervals of - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and - * `max_doublings` is 3, then the a task will first be retried in - * 10s. The retry interval will double three times, and then - * increase linearly by 2^3 * 10s. Finally, the task will retry at - * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] - * until the task has been attempted - * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, - * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 5; - * @param int $var - * @return $this - */ - public function setMaxDoublings($var) - { - GPBUtil::checkInt32($var); - $this->max_doublings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php deleted file mode 100644 index bcdf65c9a418..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/RunTaskRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.tasks.v2.RunTaskRequest - */ -class RunTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - */ - protected $response_view = 0; - - /** - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * Please see {@see CloudTasksClient::taskName()} for help formatting this field. - * - * @return \Google\Cloud\Tasks\V2\RunTaskRequest - * - * @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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php deleted file mode 100644 index 67e03f8a8ae6..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/StackdriverLoggingConfig.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.tasks.v2.StackdriverLoggingConfig - */ -class StackdriverLoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * Generated from protobuf field double sampling_ratio = 1; - */ - protected $sampling_ratio = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_ratio - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * Generated from protobuf field double sampling_ratio = 1; - * @return float - */ - public function getSamplingRatio() - { - return $this->sampling_ratio; - } - - /** - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * Generated from protobuf field double sampling_ratio = 1; - * @param float $var - * @return $this - */ - public function setSamplingRatio($var) - { - GPBUtil::checkDouble($var); - $this->sampling_ratio = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php deleted file mode 100644 index 6606b429e387..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task.php +++ /dev/null @@ -1,684 +0,0 @@ -google.cloud.tasks.v2.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time when the task is scheduled to be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; - */ - protected $schedule_time = null; - /** - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 - * minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 - * indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 6; - */ - protected $dispatch_deadline = null; - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 dispatch_count = 7; - */ - protected $dispatch_count = 0; - /** - * Output only. The number of attempts which have received a response. - * - * Generated from protobuf field int32 response_count = 8; - */ - protected $response_count = 0; - /** - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be - * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not - * retained by Cloud Tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2.Attempt first_attempt = 9; - */ - protected $first_attempt = null; - /** - * Output only. The status of the task's last attempt. - * - * Generated from protobuf field .google.cloud.tasks.v2.Attempt last_attempt = 10; - */ - protected $last_attempt = null; - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View view = 11; - */ - protected $view = 0; - protected $message_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * @type \Google\Cloud\Tasks\V2\AppEngineHttpRequest $app_engine_http_request - * HTTP request that is sent to the App Engine app handler. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. - * @type \Google\Cloud\Tasks\V2\HttpRequest $http_request - * HTTP request that is sent to the worker. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. - * @type \Google\Protobuf\Timestamp $schedule_time - * The time when the task is scheduled to be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * @type \Google\Protobuf\Duration $dispatch_deadline - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 - * minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 - * indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * @type int $dispatch_count - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * @type int $response_count - * Output only. The number of attempts which have received a response. - * @type \Google\Cloud\Tasks\V2\Attempt $first_attempt - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be - * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not - * retained by Cloud Tasks. - * @type \Google\Cloud\Tasks\V2\Attempt $last_attempt - * Output only. The status of the task's last attempt. - * @type int $view - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] has been returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * 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; - } - - /** - * HTTP request that is sent to the App Engine app handler. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2; - * @return \Google\Cloud\Tasks\V2\AppEngineHttpRequest|null - */ - public function getAppEngineHttpRequest() - { - return $this->readOneof(2); - } - - public function hasAppEngineHttpRequest() - { - return $this->hasOneof(2); - } - - /** - * HTTP request that is sent to the App Engine app handler. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2; - * @param \Google\Cloud\Tasks\V2\AppEngineHttpRequest $var - * @return $this - */ - public function setAppEngineHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineHttpRequest::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * HTTP request that is sent to the worker. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpRequest http_request = 3; - * @return \Google\Cloud\Tasks\V2\HttpRequest|null - */ - public function getHttpRequest() - { - return $this->readOneof(3); - } - - public function hasHttpRequest() - { - return $this->hasOneof(3); - } - - /** - * HTTP request that is sent to the worker. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2.HttpRequest http_request = 3; - * @param \Google\Cloud\Tasks\V2\HttpRequest $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\HttpRequest::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The time when the task is scheduled to be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * The time when the task is scheduled to be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @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 that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @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 deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 - * minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 - * indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getDispatchDeadline() - { - return $this->dispatch_deadline; - } - - public function hasDispatchDeadline() - { - return isset($this->dispatch_deadline); - } - - public function clearDispatchDeadline() - { - unset($this->dispatch_deadline); - } - - /** - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10 - * minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 - * indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDispatchDeadline($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->dispatch_deadline = $var; - - return $this; - } - - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 dispatch_count = 7; - * @return int - */ - public function getDispatchCount() - { - return $this->dispatch_count; - } - - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 dispatch_count = 7; - * @param int $var - * @return $this - */ - public function setDispatchCount($var) - { - GPBUtil::checkInt32($var); - $this->dispatch_count = $var; - - return $this; - } - - /** - * Output only. The number of attempts which have received a response. - * - * Generated from protobuf field int32 response_count = 8; - * @return int - */ - public function getResponseCount() - { - return $this->response_count; - } - - /** - * Output only. The number of attempts which have received a response. - * - * Generated from protobuf field int32 response_count = 8; - * @param int $var - * @return $this - */ - public function setResponseCount($var) - { - GPBUtil::checkInt32($var); - $this->response_count = $var; - - return $this; - } - - /** - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be - * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not - * retained by Cloud Tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2.Attempt first_attempt = 9; - * @return \Google\Cloud\Tasks\V2\Attempt|null - */ - public function getFirstAttempt() - { - return $this->first_attempt; - } - - public function hasFirstAttempt() - { - return isset($this->first_attempt); - } - - public function clearFirstAttempt() - { - unset($this->first_attempt); - } - - /** - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be - * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not - * retained by Cloud Tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2.Attempt first_attempt = 9; - * @param \Google\Cloud\Tasks\V2\Attempt $var - * @return $this - */ - public function setFirstAttempt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Attempt::class); - $this->first_attempt = $var; - - return $this; - } - - /** - * Output only. The status of the task's last attempt. - * - * Generated from protobuf field .google.cloud.tasks.v2.Attempt last_attempt = 10; - * @return \Google\Cloud\Tasks\V2\Attempt|null - */ - public function getLastAttempt() - { - return $this->last_attempt; - } - - public function hasLastAttempt() - { - return isset($this->last_attempt); - } - - public function clearLastAttempt() - { - unset($this->last_attempt); - } - - /** - * Output only. The status of the task's last attempt. - * - * Generated from protobuf field .google.cloud.tasks.v2.Attempt last_attempt = 10; - * @param \Google\Cloud\Tasks\V2\Attempt $var - * @return $this - */ - public function setLastAttempt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Attempt::class); - $this->last_attempt = $var; - - return $this; - } - - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View view = 11; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2.Task.View view = 11; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\Task\View::class); - $this->view = $var; - - return $this; - } - - /** - * @return string - */ - public function getMessageType() - { - return $this->whichOneof("message_type"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php deleted file mode 100644 index 14abd3e680ee..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/Task/View.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.tasks.v2.Task.View - */ -class View -{ - /** - * Unspecified. Defaults to BASIC. - * - * Generated from protobuf enum VIEW_UNSPECIFIED = 0; - */ - const VIEW_UNSPECIFIED = 0; - /** - * The basic view omits fields which can be large or can contain - * sensitive data. - * This view does not include the - * [body in - * AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body]. - * Bodies are desirable to return only when needed, because they - * can be large and because of the sensitivity of the data that you - * choose to store in it. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * All information is returned. - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Queue][google.cloud.tasks.v2.Queue] resource. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(View::class, \Google\Cloud\Tasks\V2\Task_View::class); - diff --git a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php b/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php deleted file mode 100644 index 7a609a96f605..000000000000 --- a/owl-bot-staging/Tasks/v2/proto/src/Google/Cloud/Tasks/V2/UpdateQueueRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.tasks.v2.UpdateQueueRequest - */ -class UpdateQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $queue = null; - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Tasks\V2\Queue $queue Required. The queue to create or update. - * - * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - * @param \Google\Protobuf\FieldMask $updateMask A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * - * @return \Google\Cloud\Tasks\V2\UpdateQueueRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Tasks\V2\Queue $queue, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setQueue($queue) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2\Queue $queue - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2\Queue|null - */ - public function getQueue() - { - return $this->queue; - } - - public function hasQueue() - { - return isset($this->queue); - } - - public function clearQueue() - { - unset($this->queue); - } - - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - * - * Generated from protobuf field .google.cloud.tasks.v2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2\Queue $var - * @return $this - */ - public function setQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\Queue::class); - $this->queue = $var; - - return $this; - } - - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will 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); - } - - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will 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/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php deleted file mode 100644 index 80a4a56b620e..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_queue.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setQueue($queue); - - // Call the API and handle any network failures. - try { - /** @var Queue $response */ - $response = $cloudTasksClient->createQueue($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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); - - create_queue_sample($formattedParent); -} -// [END cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php deleted file mode 100644 index aa2e0fce0bdb..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/create_task.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setTask($task); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $cloudTasksClient->createTask($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - create_task_sample($formattedParent); -} -// [END cloudtasks_v2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php deleted file mode 100644 index 74fe50d44f70..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_queue.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $cloudTasksClient->deleteQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - delete_queue_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php deleted file mode 100644 index b61653507f6b..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/delete_task.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $cloudTasksClient->deleteTask($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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - delete_task_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php deleted file mode 100644 index 4dc02aa93c2a..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_iam_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $cloudTasksClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_location.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_location.php deleted file mode 100644 index 195480970c8c..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/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 cloudtasks_v2_generated_CloudTasks_GetLocation_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php deleted file mode 100644 index 4d61129ad1a5..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_queue.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Queue $response */ - $response = $cloudTasksClient->getQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - get_queue_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php deleted file mode 100644 index da3d8cf9ba56..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/get_task.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $cloudTasksClient->getTask($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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_locations.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_locations.php deleted file mode 100644 index 469efba56cde..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/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 cloudtasks_v2_generated_CloudTasks_ListLocations_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php deleted file mode 100644 index c542b08e9048..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_queues.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudTasksClient->listQueues($request); - - /** @var Queue $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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); - - list_queues_sample($formattedParent); -} -// [END cloudtasks_v2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php deleted file mode 100644 index 860cd25ca38a..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/list_tasks.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudTasksClient->listTasks($request); - - /** @var Task $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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - list_tasks_sample($formattedParent); -} -// [END cloudtasks_v2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php deleted file mode 100644 index e83e2a958bd3..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/pause_queue.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Queue $response */ - $response = $cloudTasksClient->pauseQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - pause_queue_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php deleted file mode 100644 index 592b7e9758d8..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/purge_queue.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Queue $response */ - $response = $cloudTasksClient->purgeQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - purge_queue_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php deleted file mode 100644 index 17f2fa3b1e61..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/resume_queue.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Queue $response */ - $response = $cloudTasksClient->resumeQueue($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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - resume_queue_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php deleted file mode 100644 index 59e8bfc56383..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/run_task.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $cloudTasksClient->runTask($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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - run_task_sample($formattedName); -} -// [END cloudtasks_v2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php deleted file mode 100644 index dcc4a9703774..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/set_iam_policy.php +++ /dev/null @@ -1,83 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $cloudTasksClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php deleted file mode 100644 index 9f07c46f31ae..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/test_iam_permissions.php +++ /dev/null @@ -1,85 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $cloudTasksClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php b/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php deleted file mode 100644 index 0fb29ecda689..000000000000 --- a/owl-bot-staging/Tasks/v2/samples/V2/CloudTasksClient/update_queue.php +++ /dev/null @@ -1,73 +0,0 @@ -setQueue($queue); - - // Call the API and handle any network failures. - try { - /** @var Queue $response */ - $response = $cloudTasksClient->updateQueue($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php b/owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php deleted file mode 100644 index dfc84b3f611d..000000000000 --- a/owl-bot-staging/Tasks/v2/src/V2/Client/CloudTasksClient.php +++ /dev/null @@ -1,887 +0,0 @@ - createQueueAsync(CreateQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTaskAsync(CreateTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteQueueAsync(DeleteQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTaskAsync(DeleteTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getQueueAsync(GetQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface listQueuesAsync(ListQueuesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseQueueAsync(PauseQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface purgeQueueAsync(PurgeQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeQueueAsync(ResumeQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface runTaskAsync(RunTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateQueueAsync(UpdateQueueRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class CloudTasksClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.tasks.v2.CloudTasks'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.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/cloud_tasks_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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 queue - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * - * @return string The formatted queue resource. - */ - public static function queueName(string $project, string $location, string $queue): string - { - return self::getPathTemplate('queue')->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $project, string $location, string $queue, string $task): string - { - return self::getPathTemplate('task')->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - 'task' => $task, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - queue: projects/{project}/locations/{location}/queues/{queue} - * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtasks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a queue. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * The async variant is {@see CloudTasksClient::createQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/create_queue.php - * - * @param CreateQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Queue - * - * @throws ApiException Thrown if the API call fails. - */ - public function createQueue(CreateQueueRequest $request, array $callOptions = []): Queue - { - return $this->startApiCall('CreateQueue', $request, $callOptions)->wait(); - } - - /** - * Creates a task and adds it to a queue. - * - * Tasks cannot be updated after creation; there is no UpdateTask command. - * - * * The maximum task size is 100KB. - * - * The async variant is {@see CloudTasksClient::createTaskAsync()} . - * - * @example samples/V2/CloudTasksClient/create_task.php - * - * @param CreateTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTask(CreateTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); - } - - /** - * Deletes a queue. - * - * This command will delete the queue even if it has tasks in it. - * - * Note: If you delete a queue, a queue with the same name can't be created - * for 7 days. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * The async variant is {@see CloudTasksClient::deleteQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/delete_queue.php - * - * @param DeleteQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteQueue(DeleteQueueRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteQueue', $request, $callOptions)->wait(); - } - - /** - * Deletes a task. - * - * A task can be deleted if it is scheduled or dispatched. A task - * cannot be deleted if it has executed successfully or permanently - * failed. - * - * The async variant is {@see CloudTasksClient::deleteTaskAsync()} . - * - * @example samples/V2/CloudTasksClient/delete_task.php - * - * @param DeleteTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteTask(DeleteTaskRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTask', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.getIamPolicy` - * - * The async variant is {@see CloudTasksClient::getIamPolicyAsync()} . - * - * @example samples/V2/CloudTasksClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a queue. - * - * The async variant is {@see CloudTasksClient::getQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/get_queue.php - * - * @param GetQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Queue - * - * @throws ApiException Thrown if the API call fails. - */ - public function getQueue(GetQueueRequest $request, array $callOptions = []): Queue - { - return $this->startApiCall('GetQueue', $request, $callOptions)->wait(); - } - - /** - * Gets a task. - * - * The async variant is {@see CloudTasksClient::getTaskAsync()} . - * - * @example samples/V2/CloudTasksClient/get_task.php - * - * @param GetTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTask(GetTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('GetTask', $request, $callOptions)->wait(); - } - - /** - * Lists queues. - * - * Queues are returned in lexicographical order. - * - * The async variant is {@see CloudTasksClient::listQueuesAsync()} . - * - * @example samples/V2/CloudTasksClient/list_queues.php - * - * @param ListQueuesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listQueues(ListQueuesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListQueues', $request, $callOptions); - } - - /** - * Lists the tasks in a queue. - * - * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is - * retrieved due to performance considerations; - * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] - * controls the subset of information which is returned. - * - * The tasks may be returned in any order. The ordering may change at any - * time. - * - * The async variant is {@see CloudTasksClient::listTasksAsync()} . - * - * @example samples/V2/CloudTasksClient/list_tasks.php - * - * @param ListTasksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTasks', $request, $callOptions); - } - - /** - * Pauses the queue. - * - * If a queue is paused then the system will stop dispatching tasks - * until the queue is resumed via - * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can - * still be added when the queue is paused. A queue is paused if its - * [state][google.cloud.tasks.v2.Queue.state] is - * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. - * - * The async variant is {@see CloudTasksClient::pauseQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/pause_queue.php - * - * @param PauseQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Queue - * - * @throws ApiException Thrown if the API call fails. - */ - public function pauseQueue(PauseQueueRequest $request, array $callOptions = []): Queue - { - return $this->startApiCall('PauseQueue', $request, $callOptions)->wait(); - } - - /** - * Purges a queue by deleting all of its tasks. - * - * All tasks created before this method is called are permanently deleted. - * - * Purge operations can take up to one minute to take effect. Tasks - * might be dispatched before the purge takes effect. A purge is irreversible. - * - * The async variant is {@see CloudTasksClient::purgeQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/purge_queue.php - * - * @param PurgeQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Queue - * - * @throws ApiException Thrown if the API call fails. - */ - public function purgeQueue(PurgeQueueRequest $request, array $callOptions = []): Queue - { - return $this->startApiCall('PurgeQueue', $request, $callOptions)->wait(); - } - - /** - * Resume a queue. - * - * This method resumes a queue after it has been - * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a - * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; - * after calling this method it will be set to - * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. - * - * WARNING: Resuming many high-QPS queues at the same time can - * lead to target overloading. If you are resuming high-QPS - * queues, follow the 500/50/5 pattern described in - * [Managing Cloud Tasks Scaling - * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - * - * The async variant is {@see CloudTasksClient::resumeQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/resume_queue.php - * - * @param ResumeQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Queue - * - * @throws ApiException Thrown if the API call fails. - */ - public function resumeQueue(ResumeQueueRequest $request, array $callOptions = []): Queue - { - return $this->startApiCall('ResumeQueue', $request, $callOptions)->wait(); - } - - /** - * Forces a task to run now. - * - * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its - * [RateLimits][google.cloud.tasks.v2.RateLimits] or is - * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. - * - * This command is meant to be used for manual debugging. For - * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to - * retry a failed task after a fix has been made or to manually force a task - * to be dispatched now. - * - * The dispatched task is returned. That is, the task that is returned - * contains the [status][Task.status] after the task is dispatched but - * before the task is received by its target. - * - * If Cloud Tasks receives a successful response from the task's - * target, then the task will be deleted; otherwise the task's - * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to - * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was - * called plus the retry delay specified in the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - * - * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - * task that has already succeeded or permanently failed. - * - * The async variant is {@see CloudTasksClient::runTaskAsync()} . - * - * @example samples/V2/CloudTasksClient/run_task.php - * - * @param RunTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function runTask(RunTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('RunTask', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. - * Replaces any existing policy. - * - * Note: The Cloud Console does not check queue-level IAM permissions yet. - * Project-level permissions are required to use the Cloud Console. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.setIamPolicy` - * - * The async variant is {@see CloudTasksClient::setIamPolicyAsync()} . - * - * @example samples/V2/CloudTasksClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on a - * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this - * will return an empty set of permissions, not a - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * The async variant is {@see CloudTasksClient::testIamPermissionsAsync()} . - * - * @example samples/V2/CloudTasksClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates a queue. - * - * This method creates the queue if it does not exist and updates - * the queue if it does exist. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * The async variant is {@see CloudTasksClient::updateQueueAsync()} . - * - * @example samples/V2/CloudTasksClient/update_queue.php - * - * @param UpdateQueueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Queue - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateQueue(UpdateQueueRequest $request, array $callOptions = []): Queue - { - return $this->startApiCall('UpdateQueue', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see CloudTasksClient::getLocationAsync()} . - * - * @example samples/V2/CloudTasksClient/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 CloudTasksClient::listLocationsAsync()} . - * - * @example samples/V2/CloudTasksClient/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/Tasks/v2/src/V2/CloudTasksClient.php b/owl-bot-staging/Tasks/v2/src/V2/CloudTasksClient.php deleted file mode 100644 index e34ca4466502..000000000000 --- a/owl-bot-staging/Tasks/v2/src/V2/CloudTasksClient.php +++ /dev/null @@ -1,34 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $queue = new Queue(); - * $response = $cloudTasksClient->createQueue($formattedParent, $queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Tasks\V2\Client\CloudTasksClient}. - */ -class CloudTasksGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.tasks.v2.CloudTasks'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $locationNameTemplate; - - private static $queueNameTemplate; - - private static $taskNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_tasks_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getQueueNameTemplate() - { - if (self::$queueNameTemplate == null) { - self::$queueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}'); - } - - return self::$queueNameTemplate; - } - - private static function getTaskNameTemplate() - { - if (self::$taskNameTemplate == null) { - self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}/tasks/{task}'); - } - - return self::$taskNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'queue' => self::getQueueNameTemplate(), - 'task' => self::getTaskNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a queue - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * - * @return string The formatted queue resource. - */ - public static function queueName($project, $location, $queue) - { - return self::getQueueNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName($project, $location, $queue, $task) - { - return self::getTaskNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - 'task' => $task, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - queue: projects/{project}/locations/{location}/queues/{queue} - * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtasks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a queue. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * $queue = new Queue(); - * $response = $cloudTasksClient->createQueue($formattedParent, $queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * @param Queue $queue Required. The queue to create. - * - * [Queue's name][google.cloud.tasks.v2.Queue.name] cannot be the same as an - * existing queue. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Queue - * - * @throws ApiException if the remote call fails - */ - public function createQueue($parent, $queue, array $optionalArgs = []) - { - $request = new CreateQueueRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setQueue($queue); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a task and adds it to a queue. - * - * Tasks cannot be updated after creation; there is no UpdateTask command. - * - * * The maximum task size is 100KB. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $task = new Task(); - * $response = $cloudTasksClient->createTask($formattedParent, $task); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. - * @param Task $task Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2.Task.name]. If a name is not specified then - * the system will generate a random unique task id, which will be set in the - * task returned in the [response][google.cloud.tasks.v2.Task.name]. - * - * If [schedule_time][google.cloud.tasks.v2.Task.schedule_time] is not set or - * is in the past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9days after the original task was deleted or executed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Task - * - * @throws ApiException if the remote call fails - */ - public function createTask($parent, $task, array $optionalArgs = []) - { - $request = new CreateTaskRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTask($task); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a queue. - * - * This command will delete the queue even if it has tasks in it. - * - * Note: If you delete a queue, a queue with the same name can't be created - * for 7 days. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $cloudTasksClient->deleteQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteQueue($name, array $optionalArgs = []) - { - $request = new DeleteQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteQueue', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a task. - * - * A task can be deleted if it is scheduled or dispatched. A task - * cannot be deleted if it has executed successfully or permanently - * failed. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $cloudTasksClient->deleteTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteTask($name, array $optionalArgs = []) - { - $request = new DeleteTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTask', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. - * Returns an empty policy if the resource exists and does not have a policy - * set. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.getIamPolicy` - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $response = $cloudTasksClient->getIamPolicy($resource); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a queue. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->getQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Queue - * - * @throws ApiException if the remote call fails - */ - public function getQueue($name, array $optionalArgs = []) - { - $request = new GetQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a task. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $response = $cloudTasksClient->getTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Task - * - * @throws ApiException if the remote call fails - */ - public function getTask($name, array $optionalArgs = []) - { - $request = new GetTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists queues. - * - * Queues are returned in lexicographical order. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * - * Sample filter "state: PAUSED". - * - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listQueues($parent, array $optionalArgs = []) - { - $request = new ListQueuesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListQueues', $optionalArgs, ListQueuesResponse::class, $request); - } - - /** - * Lists the tasks in a queue. - * - * By default, only the [BASIC][google.cloud.tasks.v2.Task.View.BASIC] view is - * retrieved due to performance considerations; - * [response_view][google.cloud.tasks.v2.ListTasksRequest.response_view] - * controls the subset of information which is returned. - * - * The tasks may be returned in any order. The ordering may change at any - * time. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTasks($parent, array $optionalArgs = []) - { - $request = new ListTasksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); - } - - /** - * Pauses the queue. - * - * If a queue is paused then the system will stop dispatching tasks - * until the queue is resumed via - * [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. Tasks can - * still be added when the queue is paused. A queue is paused if its - * [state][google.cloud.tasks.v2.Queue.state] is - * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->pauseQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Queue - * - * @throws ApiException if the remote call fails - */ - public function pauseQueue($name, array $optionalArgs = []) - { - $request = new PauseQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PauseQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Purges a queue by deleting all of its tasks. - * - * All tasks created before this method is called are permanently deleted. - * - * Purge operations can take up to one minute to take effect. Tasks - * might be dispatched before the purge takes effect. A purge is irreversible. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->purgeQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Queue - * - * @throws ApiException if the remote call fails - */ - public function purgeQueue($name, array $optionalArgs = []) - { - $request = new PurgeQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PurgeQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Resume a queue. - * - * This method resumes a queue after it has been - * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2.Queue.State.DISABLED]. The state of a - * queue is stored in the queue's [state][google.cloud.tasks.v2.Queue.state]; - * after calling this method it will be set to - * [RUNNING][google.cloud.tasks.v2.Queue.State.RUNNING]. - * - * WARNING: Resuming many high-QPS queues at the same time can - * lead to target overloading. If you are resuming high-QPS - * queues, follow the 500/50/5 pattern described in - * [Managing Cloud Tasks Scaling - * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->resumeQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Queue - * - * @throws ApiException if the remote call fails - */ - public function resumeQueue($name, array $optionalArgs = []) - { - $request = new ResumeQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ResumeQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Forces a task to run now. - * - * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its - * [RateLimits][google.cloud.tasks.v2.RateLimits] or is - * [PAUSED][google.cloud.tasks.v2.Queue.State.PAUSED]. - * - * This command is meant to be used for manual debugging. For - * example, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] can be used to - * retry a failed task after a fix has been made or to manually force a task - * to be dispatched now. - * - * The dispatched task is returned. That is, the task that is returned - * contains the [status][Task.status] after the task is dispatched but - * before the task is received by its target. - * - * If Cloud Tasks receives a successful response from the task's - * target, then the task will be deleted; otherwise the task's - * [schedule_time][google.cloud.tasks.v2.Task.schedule_time] will be reset to - * the time that [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] was - * called plus the retry delay specified in the queue's - * [RetryConfig][google.cloud.tasks.v2.RetryConfig]. - * - * [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask] returns - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - * task that has already succeeded or permanently failed. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $response = $cloudTasksClient->runTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2.Task] will be returned. - * - * By default response_view is [BASIC][google.cloud.tasks.v2.Task.View.BASIC]; - * not all information is retrieved by default because some data, such as - * payloads, might be desirable to return only when needed because - * of its large size or because of the sensitivity of data that it - * contains. - * - * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires - * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) - * permission on the [Task][google.cloud.tasks.v2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Task - * - * @throws ApiException if the remote call fails - */ - public function runTask($name, array $optionalArgs = []) - { - $request = new RunTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Sets the access control policy for a [Queue][google.cloud.tasks.v2.Queue]. - * Replaces any existing policy. - * - * Note: The Cloud Console does not check queue-level IAM permissions yet. - * Project-level permissions are required to use the Cloud Console. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.setIamPolicy` - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $cloudTasksClient->setIamPolicy($resource, $policy); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns permissions that a caller has on a - * [Queue][google.cloud.tasks.v2.Queue]. If the resource does not exist, this - * will return an empty set of permissions, not a - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $cloudTasksClient->testIamPermissions($resource, $permissions); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a queue. - * - * This method creates the queue if it does not exist and updates - * the queue if it does exist. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $queue = new Queue(); - * $response = $cloudTasksClient->updateQueue($queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param Queue $queue Required. The queue to create or update. - * - * The queue's [name][google.cloud.tasks.v2.Queue.name] must be specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2.Queue.name] cannot be changed. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2\Queue - * - * @throws ApiException if the remote call fails - */ - public function updateQueue($queue, array $optionalArgs = []) - { - $request = new UpdateQueueRequest(); - $requestParamHeaders = []; - $request->setQueue($queue); - $requestParamHeaders['queue.name'] = $queue->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $response = $cloudTasksClient->getLocation(); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 1081b788279a..000000000000 --- a/owl-bot-staging/Tasks/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.tasks.v2", - "libraryPackage": "Google\\Cloud\\Tasks\\V2", - "services": { - "CloudTasks": { - "clients": { - "grpc": { - "libraryClient": "CloudTasksGapicClient", - "rpcs": { - "CreateQueue": { - "methods": [ - "createQueue" - ] - }, - "CreateTask": { - "methods": [ - "createTask" - ] - }, - "DeleteQueue": { - "methods": [ - "deleteQueue" - ] - }, - "DeleteTask": { - "methods": [ - "deleteTask" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetQueue": { - "methods": [ - "getQueue" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "ListQueues": { - "methods": [ - "listQueues" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - }, - "PauseQueue": { - "methods": [ - "pauseQueue" - ] - }, - "PurgeQueue": { - "methods": [ - "purgeQueue" - ] - }, - "ResumeQueue": { - "methods": [ - "resumeQueue" - ] - }, - "RunTask": { - "methods": [ - "runTask" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateQueue": { - "methods": [ - "updateQueue" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json deleted file mode 100644 index 8f9b26e3639f..000000000000 --- a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_client_config.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "interfaces": { - "google.cloud.tasks.v2.CloudTasks": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - } - }, - "methods": { - "CreateQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteQueue": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTask": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetQueue": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListQueues": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTasks": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PauseQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PurgeQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResumeQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RunTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_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/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php deleted file mode 100644 index b0486c1dd561..000000000000 --- a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_descriptor_config.php +++ /dev/null @@ -1,276 +0,0 @@ - [ - 'google.cloud.tasks.v2.CloudTasks' => [ - 'CreateQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Queue', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Task', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Queue', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListQueues' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getQueues', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\ListQueuesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PauseQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Queue', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'PurgeQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Queue', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResumeQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Queue', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RunTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Task', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateQueue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tasks\V2\Queue', - 'headerParams' => [ - [ - 'keyName' => 'queue.name', - 'fieldAccessors' => [ - 'getQueue', - 'getName', - ], - ], - ], - ], - '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' => [ - 'location' => 'projects/{project}/locations/{location}', - 'queue' => 'projects/{project}/locations/{location}/queues/{queue}', - 'task' => 'projects/{project}/locations/{location}/queues/{queue}/tasks/{task}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php b/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php deleted file mode 100644 index 6ab177ae9a8f..000000000000 --- a/owl-bot-staging/Tasks/v2/src/V2/resources/cloud_tasks_rest_client_config.php +++ /dev/null @@ -1,240 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.tasks.v2.CloudTasks' => [ - 'CreateQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/queues', - 'body' => 'queue', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/queues/*}/tasks', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteQueue' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/queues/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetQueue' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListQueues' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/queues', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/queues/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PauseQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}:pause', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'PurgeQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}:purge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResumeQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*}:resume', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RunTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/queues/*/tasks/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/queues/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/queues/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateQueue' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{queue.name=projects/*/locations/*/queues/*}', - 'body' => 'queue', - 'placeholders' => [ - 'queue.name' => [ - 'getters' => [ - 'getQueue', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php deleted file mode 100644 index 71034c96e057..000000000000 --- a/owl-bot-staging/Tasks/v2/tests/Unit/V2/Client/CloudTasksClientTest.php +++ /dev/null @@ -1,1316 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudTasksClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudTasksClient($options); - } - - /** @test */ - public function createQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queue = new Queue(); - $request = (new CreateQueueRequest()) - ->setParent($formattedParent) - ->setQueue($queue); - $response = $gapicClient->createQueue($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.tasks.v2.CloudTasks/CreateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $queue = new Queue(); - $request = (new CreateQueueRequest()) - ->setParent($formattedParent) - ->setQueue($queue); - try { - $gapicClient->createQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTask($task); - $response = $gapicClient->createTask($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.tasks.v2.CloudTasks/CreateTask', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - $request = (new CreateTaskRequest()) - ->setParent($formattedParent) - ->setTask($task); - try { - $gapicClient->createTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new DeleteQueueRequest()) - ->setName($formattedName); - $gapicClient->deleteQueue($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new DeleteQueueRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $request = (new DeleteTaskRequest()) - ->setName($formattedName); - $gapicClient->deleteTask($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $request = (new DeleteTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new GetQueueRequest()) - ->setName($formattedName); - $response = $gapicClient->getQueue($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.tasks.v2.CloudTasks/GetQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new GetQueueRequest()) - ->setName($formattedName); - try { - $gapicClient->getQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getTask($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.tasks.v2.CloudTasks/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->getTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $queuesElement = new Queue(); - $queues = [ - $queuesElement, - ]; - $expectedResponse = new ListQueuesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setQueues($queues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListQueuesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listQueues($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListQueues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListQueuesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listQueues($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTasks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTasks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new PauseQueueRequest()) - ->setName($formattedName); - $response = $gapicClient->pauseQueue($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.tasks.v2.CloudTasks/PauseQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new PauseQueueRequest()) - ->setName($formattedName); - try { - $gapicClient->pauseQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new PurgeQueueRequest()) - ->setName($formattedName); - $response = $gapicClient->purgeQueue($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.tasks.v2.CloudTasks/PurgeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new PurgeQueueRequest()) - ->setName($formattedName); - try { - $gapicClient->purgeQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new ResumeQueueRequest()) - ->setName($formattedName); - $response = $gapicClient->resumeQueue($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.tasks.v2.CloudTasks/ResumeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $request = (new ResumeQueueRequest()) - ->setName($formattedName); - try { - $gapicClient->resumeQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $request = (new RunTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->runTask($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.tasks.v2.CloudTasks/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $request = (new RunTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->runTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $queue = new Queue(); - $request = (new UpdateQueueRequest()) - ->setQueue($queue); - $response = $gapicClient->updateQueue($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.tasks.v2.CloudTasks/UpdateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $queue = new Queue(); - $request = (new UpdateQueueRequest()) - ->setQueue($queue); - try { - $gapicClient->updateQueue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 createQueueAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queue = new Queue(); - $request = (new CreateQueueRequest()) - ->setParent($formattedParent) - ->setQueue($queue); - $response = $gapicClient->createQueueAsync($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.tasks.v2.CloudTasks/CreateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php deleted file mode 100644 index a662ec4fc05f..000000000000 --- a/owl-bot-staging/Tasks/v2/tests/Unit/V2/CloudTasksClientTest.php +++ /dev/null @@ -1,1189 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudTasksClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudTasksClient($options); - } - - /** @test */ - public function createQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queue = new Queue(); - $response = $gapicClient->createQueue($formattedParent, $queue); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/CreateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $queue = new Queue(); - try { - $gapicClient->createQueue($formattedParent, $queue); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - $response = $gapicClient->createTask($formattedParent, $task); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/CreateTask', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - try { - $gapicClient->createTask($formattedParent, $task); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $gapicClient->deleteQueue($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->deleteQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $gapicClient->deleteTask($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/DeleteTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->deleteTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->getQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->getQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $response = $gapicClient->getTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->getTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $queuesElement = new Queue(); - $queues = [ - $queuesElement, - ]; - $expectedResponse = new ListQueuesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setQueues($queues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listQueues($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListQueues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listQueues($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->listTasks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->listTasks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->pauseQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/PauseQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->pauseQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->purgeQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/PurgeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->purgeQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->resumeQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/ResumeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->resumeQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $response = $gapicClient->runTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->runTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $queue = new Queue(); - $response = $gapicClient->updateQueue($queue); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2.CloudTasks/UpdateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $queue = new Queue(); - try { - $gapicClient->updateQueue($queue); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Cloudtasks.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Cloudtasks.php deleted file mode 100644 index 5545835cb278fdd74354758ff5bc761b75ac0dac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8540 zcmc&)&2QYs70=3+8jTz)nkJ5{q7Kb`SXSgEw27T`Wx3``w(L5pRa-HVVuKBLcO)_9 zk_SSQS@H)k{*io&;|j500D{uJrqUJQ-K0SbK6r6IrSeX&{N+V&XC+ME_a>O zx=7%>dHlWKyw9O7f7ji2$#cpkvzccEtf|yLP=bA?xSkU@4aZXI;qET;l!nuCO^bO& zMcKHmeE;^2a&6=0&RN*%JE7NLWo6HC_AI6~EGKMgf#KixwS!Wf1x6`)#vc{AUP5f6 z#eCOjFlBSQvIRm-BQUC)Tt#&qRaAFSMfF~(f+|)CX;_BuD}0TsA`gfHKWQS}EQ3t9db_fvs>nP0p$IfQ`3uzt|dyqImC)2}vO^T5f;HJR&b#F-838&1M{K z*C916#sPxia*llV8hL4ioJ1EQ;bH@`Pch0?B7rSDBNQ2~3CRqjB}!xq&!!f3F(hhr z5feh-bV^`fIDVfcPk6UjdQt4+Sh|wwd+5SK?u86Fv_OcR5n`s%(hgQM_*HYcH;Q#( zIxgUP$C}*hiu|WFg)&Buz8}z6$&_n&a1QeYrLZ_%sh;~npZKqSmOjfVi%u^>2506Mp?qmv13gKmc1;UX z`1}O!q;q82HTGD|hk7x83?5BVN(g@xIQN-7f1Hbz$h60dW(}dwPr{>_(n2wMK?D>^ zLos&#%CRr>g8B}jY2>~OnVHcQGR2S32k6H@%~`3YkK+|1%+HWno4p^@Qm8n1^~Yp( zlSR}>W-gNBSX{e!AwzlTFc7upFz}}ZLf3(ofN`7>!uW@CkxX)K_}S#428o^k8t5A? zbP$~|VrA$exs_3k%!FK7bk;+uP;U{s!7SGE_OZ@E{T`Xy4!yl@Q^r?jg#K5f4D5s= z9Jan1Z6-POhHE)Sle^AaM$3}!^Gz~kxNgmC3LnNJrpsg+(`OAE2jLx0$-sdKFJesd&$ded|Sh?d2a;YnWyvP%XLeC6NAh@4iCQm@J=Am3WFxepo zbF%b;1k*2yabxiw2zO>1%q-p622;zl`gWA_1YnUkG%^{W1tM=K!`?^-rVWVOlaM!1 zy(ImWjYpLCN9iMtWZZ*!nH)!YgmVmKhi8u7)5Hpp_cYa;WG;&QH2$%e zRKLVB#|)pLs)u$`C~7U^{TlM&b3!KRC34b2{WV#?d9j-*otADSD{xUZjsqA%ug%L) zs@g`5eGN)t%E~c4Tm4yqoYEWjZRgNp%{|W9!#VOL@`T^mXU))JHS9oy7xk9-xJQjD z&wt?9?!fGP$gO%L7#_{Zs(-=SZ@|=SJwnralJQ94i)rvqXg_rD_GS@m8uG?S=?~u~ zWF3bN9{Ti?0wGD;NH56v>{nP4IpKN>#k}HC=&4uRy6B{T^7)s)m{_4&d~5R{>af=! zF}%wffv+uTmeYtX7__A$jdyB3{jfkDmrW>rDeLu8N@5+}`KnjiI`4dX!C{j-0GdDs z7%7zgnN){LGwDeQjsS71t)GaPTIP&!sIRG`@>q^KU-~CNoN8vX5vK%4K>TJ~pW{%M zQ;jZ%eWi3UIesou%*C?=|4RU$>V>nxrvxSVQ__9nV#Mzuy4+wX#ceKl^!E@`Nmrd6 zQ;D2JmBUXr(|%f3Q!M5JSaz}HFBg^~q;bnW1Zgby|3r!}MWi3YS*PZK?6Xb@j)3(> zn$=bHQsSHWScOI%#uWrxBePx81}#Zn>z7!&geB%d{`naFO@W+%{05hH(S;pVrFytj zDITm8(~DBw(_J#rR`p(6e;lCmdvzX`*VL2hUg^1}=17!Q*05n#NVde(z6y*LEp z+iiVTB3X_uj2;H6pMr%@KZovO2QGRLKl56q@8h*LUF;&PS46@-pF>iV!2P!VRANf< zHg3-?_4+u}2R+!)s?Q2!IvzynvV_>r0b?;~(9k|W3=YC52%U6Y{|f-gIFXZx2W6p7K9^DeN8|G!*n!4VS~j{wPNK_fvC`tgQ{QRp zPYZUfjscbPTv6A?blfu6hHU?}KxVt9#q8|gB`hr)#CxNyQ)GC#V}#`JZ>Z}D{E<$f zY$Wq78u3p!lw{J(K9odGLLVNC@3r-_y+$neIg(AaGOkTb_bCX z%x~1!b25ztGn(-`NRVQT%ubM+kw$UTZLm`689e z&m;fRi+E$|mo@G1@UUx9Gs0j$`iy_UwTxib@mdw|$TRR=C8H!%X4m7nb{oGRZ5MvH z9#uQ>=>)&a>^Z4_5YPZm@4pSW_0LF@Ir=o8`jS8JD?XQuzP2BcBSQWMe~4+= diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php deleted file mode 100644 index e407dce1a21c..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/OldTarget.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - ' -Ê -+google/cloud/tasks/v2beta2/old_target.protogoogle.cloud.tasks.v2beta2Bw -com.google.cloud.tasks.v2beta2BOldTargetProtoPZCcloud.google.com/go/cloudtasks/apiv2beta2/cloudtaskspb;cloudtaskspbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Queue.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Queue.php deleted file mode 100644 index 2bcab1231d847ca2cc6823db1ba869ce269cec23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2576 zcmbVOVNcse7;Z{K=^H@QT9M1Ta${XdwauO~tslbJl#oCpb&x`sw8@g?*q3m_v9Ie#PFqvqLtrfQA%d`<~~0@80)$?(UoK_!);!$N`OL;t3j%{v{D- zl<*`Lu^)$|pA7~yA$~mKEToA=Nb86k9`#7O)#-hV)HKc#pVrARj)x(&{V>h~TX^Yt zYG2g)RCqP}ZALR{sgMAXH=-%`d`b?w&F^tM@Py|aD7LdF*-lTgogZpV$=(6*LoZFq z8yN-O1HnI@^+V>9RCogaJ!7fMA|{v@vR`lwyJX;nDMjXW>>!JL!QzNW!cpYY>I7{^WNQ> zHKRS)tORRt`^=M)wlY*4cH)0fdki%syb+(xRbBkzTbB2%5d@PK?W2gRlcLHJZ^Q2^ z@cee_H8wQPQYyEU%B@`G8;|oC9%puvmsX2@!`Yq_U#J4+$fr3_nFWPs2YHq9@y&ma zi=q@7u=U#_l$BGAWwmKJWjfO0u?wJtW)rrjo9Iw=DOGloyG^@dR zTM=I&PdEJ49b*?NJPX4j&OH_9`Mfw?giq6_r}6M+`aiPoKt=9YZpcPVq-ObM`Z2;^ zD>P1h8LgIFx_%rD*w9>5Y-fAk$TsWMlH(0riKkFTK%BN<=9iik)3RK(a~$$*;}b-j+%TvN!o z%~Q*et4Ny*e>4`h+ECVOdIS$odW~M&Jv}_>w)Z;wopx*Oj!}X8$ESyfox_8*k^!*T zZJeIqz+DvPQmb>)Xuig`g}USX)%X!Mm7}zwv=GrosfEXmt=0Szi}N$}MQXp#pT>3= z`)UWlZ^h$SA2#^qtvoKq%@wF0~m1)_m!?Hws zLeLRM(MoHU(MeCh$RZ_V%sm;E8J2MLYcM2B3%1w~a@)>Pg9Vili`>5FpT~oNsqJ|K zUM?}mYeUV!KY|rGtss_XaWqVoiOS7YSdOyMWEER~mH@7#W0Mh_Hss4IW){?7DEe^G54Uu{oLwa@j%V(K0u_bTSkxPvI9 KzA21h4DdHY0Ydfw diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Target.php b/owl-bot-staging/Tasks/v2beta2/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta2/Target.php deleted file mode 100644 index ebd1a9fff9ae2f8e4d134e88d0f56c536425c5a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3089 zcmc&$-EP}96t3;Wu8*BeRkJQ@w?Xro#o1a1@K#`Onil?1VgpU&#!B}C0|G5GHc?sB zC@O$E^nP!!_t-P+L3XiM*!@URRh+i*TI^!EvB;d??|kR*JbWBX1Ng!?#6D(-KUWx>&{kc#LX~bOIFea2vJiP0AG#c-6 z6h04k&+8-1QC*za1oK*K6Tn9^90th6#$ms8Bm~BYqv2t!K5R?%p)J*i&+09yz6aoX zC=3ldHUqzaA^w7BCvhvyku#&J zVr(?t2y)-xEW(T44TE7GF@Gh^kgoAJXGC{C*RL+wWLU{k9UU#f7iMg|8)ruap7$k>{zxRlbIjJRRXM zL=&uk0EGa}J&MMg86#6I>m|r>G}+9GL$NZ2o6R6F{R#1Lm-9f`(4WE`6a)^A?;S=X zPW*{O&oN_UjAKKk`n}rKG1XG5CrY{UM;12HOX=za{~Y0v>w8d|ilZ~bd`eZ2>-8^} z*_PUZ(L!49g8pWpac=J!pS}TQhCM;^bL>RS+ssLP^kXPYF&bkQZmt-)YN@`zEU>rb zSL-T$)8}lySdCR#joURSUlI`2d5-5X!bN=zR?m?aVO6X~_Pb2Q1}*iHKr4-gn4J?> zRi-E}M5#j2eM(c;;5zX|gNQav5-Y>Xl!jbnC283L^~gAZ!HVU64HtC`&O-W3pQk^l#v&LVbpgNsVbj9xsUkNN*YTS83y94fUj)9 z+S3TLdHQd`QPDGO?gWUTS(u3ZwgRP7MpCIZqQpvim*B>pjwur#Ox2en=2`iNckXP8~w?H4XyXKMUoE{JQX1jOL zGdtQf{W`34ZM&~!^dhXvuYs1WjNsPW4eC3vb$ZfstY_xQNv~r%=JA1b(l(tVOB^m+ zz5#2!14pa^j`>4xU=M@~fPC}G_st)Lk5&;1j;eO60IQDd>G(rds`6J3Kz36y)%T&i zh*V6UQhm7nj_CZi8DN2?NS{_J6ikvM^}#a#7vU$fAf@^L+5dMTuco$qO|P2Qw=Gy# zQVTKX6$lCT_unh^E5}F!;9|DvpTdX9bKoG?rIF7aJVPWI=kierT^b~hO64IG)5-R4 zs^S?z(U@TQjKqWCt56Xvd5!PDN0R%_k!g3W&TB*#Ez-9Jw%~68a)+j^W#g_fn;k7D zullF9wj#ORF`t;WsjbRZ>No9nSIY~S3s&FmS;qsd(Bkl!Sd^DQ*D5K-$6IAT^HW=G zO|RA!I@_I4wL+^68U^Il5*kp+hx0}js&I6QB(4R{YB8WW|k`HC(PhD&6F zm{Y7Y(QtdlRm2mnIf?lnaDsh2BC%osycs*n5~_KcU;{W#D68*c$7y1pi4;z}kBfBr zMg$Nb>?NAXgv8+iQ&e)HQ`v{mW^>GRDV_OJ-_5r*bbN&CF2`o`Mw0tj%Z$zMjT<@Rn3_z*-LWTvhNn=t zOfAOP8hraB&lPVCho!)WV8D7Qi4kZA{fW@?J2}tWa$&wTsBaDG=LX#hcb0M(b)0{< zKFT+3zS4h+|Gc!4$)ov>jRv&e{4Td@>dMGl36erX~vK z3NG`fSrDfbdRv;nx8iXYfGfZk!KJ;=@*aC>h-d9bP;qh*r(_uE3&FPkt{^mb;HT&_ zqBWZe9Su3OUri?wO|wK>7p{17>k`^CY|QfY`ykPZcZ42~xKuhSSaR8&MR%78*mC>k z${(Unp_|{}aR$9R&-Pyxv~ivJhTqKpwcc3fH-MCCSc{s&-U=xNvJj`hvR%GLpOlbX zHg{aFkPUi;@APR)uuD2E78cmJy=KbVH4Gt4Bi+QAp&3H|0e@Y)`2YX_ diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php deleted file mode 100644 index 5bc989f652e1..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AcknowledgeTaskRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.tasks.v2beta2.AcknowledgeTaskRequest - */ -class AcknowledgeTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schedule_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type \Google\Protobuf\Timestamp $schedule_time - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php deleted file mode 100644 index b6c1deb04396..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpRequest.php +++ /dev/null @@ -1,484 +0,0 @@ -google.cloud.tasks.v2beta2.AppEngineHttpRequest - */ -class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; - */ - protected $http_method = 0; - /** - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; - */ - protected $app_engine_routing = null; - /** - * The relative URL. - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path and query string arguments. - * If the relative URL is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_url = 3; - */ - protected $relative_url = ''; - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud - * Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * documentation. - * - * Generated from protobuf field map headers = 4; - */ - private $headers; - /** - * Payload. - * The payload will be sent as the HTTP message body. A message - * body, and thus a payload, is allowed only if the HTTP method is - * POST or PUT. It is an error to set a data payload on a task with - * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * - * Generated from protobuf field bytes payload = 5; - */ - protected $payload = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $http_method - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * @type \Google\Cloud\Tasks\V2beta2\AppEngineRouting $app_engine_routing - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * @type string $relative_url - * The relative URL. - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path and query string arguments. - * If the relative URL is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * @type array|\Google\Protobuf\Internal\MapField $headers - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud - * Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * documentation. - * @type string $payload - * Payload. - * The payload will be sent as the HTTP message body. A message - * body, and thus a payload, is allowed only if the HTTP method is - * POST or PUT. It is an error to set a data payload on a task with - * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; - * @return \Google\Cloud\Tasks\V2beta2\AppEngineRouting|null - */ - public function getAppEngineRouting() - { - return $this->app_engine_routing; - } - - public function hasAppEngineRouting() - { - return isset($this->app_engine_routing); - } - - public function clearAppEngineRouting() - { - unset($this->app_engine_routing); - } - - /** - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; - * @param \Google\Cloud\Tasks\V2beta2\AppEngineRouting $var - * @return $this - */ - public function setAppEngineRouting($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineRouting::class); - $this->app_engine_routing = $var; - - return $this; - } - - /** - * The relative URL. - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path and query string arguments. - * If the relative URL is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_url = 3; - * @return string - */ - public function getRelativeUrl() - { - return $this->relative_url; - } - - /** - * The relative URL. - * The relative URL must begin with "/" and must be a valid HTTP relative URL. - * It can contain a path and query string arguments. - * If the relative URL is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_url = 3; - * @param string $var - * @return $this - */ - public function setRelativeUrl($var) - { - GPBUtil::checkString($var, True); - $this->relative_url = $var; - - return $this; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud - * Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * documentation. - * - * Generated from protobuf field map headers = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud - * Tasks sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta2.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * documentation. - * - * Generated from protobuf field map headers = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * Payload. - * The payload will be sent as the HTTP message body. A message - * body, and thus a payload, is allowed only if the HTTP method is - * POST or PUT. It is an error to set a data payload on a task with - * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * - * Generated from protobuf field bytes payload = 5; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * Payload. - * The payload will be sent as the HTTP message body. A message - * body, and thus a payload, is allowed only if the HTTP method is - * POST or PUT. It is an error to set a data payload on a task with - * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * - * Generated from protobuf field bytes payload = 5; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php deleted file mode 100644 index 17f72796c02a..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineHttpTarget.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.tasks.v2beta2.AppEngineHttpTarget - */ -class AppEngineHttpTarget extends \Google\Protobuf\Internal\Message -{ - /** - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; - */ - protected $app_engine_routing_override = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta2\AppEngineRouting $app_engine_routing_override - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; - * @return \Google\Cloud\Tasks\V2beta2\AppEngineRouting|null - */ - public function getAppEngineRoutingOverride() - { - return $this->app_engine_routing_override; - } - - public function hasAppEngineRoutingOverride() - { - return isset($this->app_engine_routing_override); - } - - public function clearAppEngineRoutingOverride() - { - unset($this->app_engine_routing_override); - } - - /** - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; - * @param \Google\Cloud\Tasks\V2beta2\AppEngineRouting $var - * @return $this - */ - public function setAppEngineRoutingOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineRouting::class); - $this->app_engine_routing_override = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php deleted file mode 100644 index cb35bc64c659..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AppEngineRouting.php +++ /dev/null @@ -1,536 +0,0 @@ -google.cloud.tasks.v2beta2.AppEngineRouting - */ -class AppEngineRouting extends \Google\Protobuf\Internal\Message -{ - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string service = 1; - */ - protected $service = ''; - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - */ - protected $instance = ''; - /** - * Output only. The host that the task is sent to. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * The host is constructed as: - * * `host = [application_domain_name]`
- * `| [service] + '.' + [application_domain_name]`
- * `| [version] + '.' + [application_domain_name]`
- * `| [version_dot_service]+ '.' + [application_domain_name]`
- * `| [instance] + '.' + [application_domain_name]`
- * `| [instance_dot_service] + '.' + [application_domain_name]`
- * `| [instance_dot_version] + '.' + [application_domain_name]`
- * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - * * `application_domain_name` = The domain name of the app, for - * example .appspot.com, which is associated with the - * queue's project ID. Some tasks which were created using the App Engine - * SDK use a custom domain name. - * * `service =` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `version =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `version_dot_service =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] - * * `instance_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance_dot_version =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `instance_dot_version_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, - * then the task will be sent to the service which is the default service when - * the task is attempted. - * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, - * then the task will be sent to the version which is the default version when - * the task is attempted. - * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * empty, then the task will be sent to an instance which is available when - * the task is attempted. - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * invalid, then the task will be sent to the default version of the default - * service when the task is attempted. - * - * Generated from protobuf field string host = 4; - */ - protected $host = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * @type string $version - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * @type string $instance - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * @type string $host - * Output only. The host that the task is sent to. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * The host is constructed as: - * * `host = [application_domain_name]`
- * `| [service] + '.' + [application_domain_name]`
- * `| [version] + '.' + [application_domain_name]`
- * `| [version_dot_service]+ '.' + [application_domain_name]`
- * `| [instance] + '.' + [application_domain_name]`
- * `| [instance_dot_service] + '.' + [application_domain_name]`
- * `| [instance_dot_version] + '.' + [application_domain_name]`
- * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - * * `application_domain_name` = The domain name of the app, for - * example .appspot.com, which is associated with the - * queue's project ID. Some tasks which were created using the App Engine - * SDK use a custom domain name. - * * `service =` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `version =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `version_dot_service =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] - * * `instance_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance_dot_version =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `instance_dot_version_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, - * then the task will be sent to the service which is the default service when - * the task is attempted. - * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, - * then the task will be sent to the version which is the default version when - * the task is attempted. - * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * empty, then the task will be sent to an instance which is available when - * the task is attempted. - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * invalid, then the task will be sent to the default version of the default - * service when the task is attempted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string service = 1; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string service = 1; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Output only. The host that the task is sent to. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * The host is constructed as: - * * `host = [application_domain_name]`
- * `| [service] + '.' + [application_domain_name]`
- * `| [version] + '.' + [application_domain_name]`
- * `| [version_dot_service]+ '.' + [application_domain_name]`
- * `| [instance] + '.' + [application_domain_name]`
- * `| [instance_dot_service] + '.' + [application_domain_name]`
- * `| [instance_dot_version] + '.' + [application_domain_name]`
- * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - * * `application_domain_name` = The domain name of the app, for - * example .appspot.com, which is associated with the - * queue's project ID. Some tasks which were created using the App Engine - * SDK use a custom domain name. - * * `service =` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `version =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `version_dot_service =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] - * * `instance_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance_dot_version =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `instance_dot_version_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, - * then the task will be sent to the service which is the default service when - * the task is attempted. - * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, - * then the task will be sent to the version which is the default version when - * the task is attempted. - * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * empty, then the task will be sent to an instance which is available when - * the task is attempted. - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * invalid, then the task will be sent to the default version of the default - * service when the task is attempted. - * - * Generated from protobuf field string host = 4; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Output only. The host that the task is sent to. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * The host is constructed as: - * * `host = [application_domain_name]`
- * `| [service] + '.' + [application_domain_name]`
- * `| [version] + '.' + [application_domain_name]`
- * `| [version_dot_service]+ '.' + [application_domain_name]`
- * `| [instance] + '.' + [application_domain_name]`
- * `| [instance_dot_service] + '.' + [application_domain_name]`
- * `| [instance_dot_version] + '.' + [application_domain_name]`
- * `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` - * * `application_domain_name` = The domain name of the app, for - * example .appspot.com, which is associated with the - * queue's project ID. Some tasks which were created using the App Engine - * SDK use a custom domain name. - * * `service =` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `version =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `version_dot_service =` - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` - * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] - * * `instance_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * * `instance_dot_version =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] - * * `instance_dot_version_dot_service =` - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' - * +` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' - * +` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, - * then the task will be sent to the service which is the default service when - * the task is attempted. - * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, - * then the task will be sent to the version which is the default version when - * the task is attempted. - * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * empty, then the task will be sent to an instance which is available when - * the task is attempted. - * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or - * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is - * invalid, then the task will be sent to the default version of the default - * service when the task is attempted. - * - * Generated from protobuf field string host = 4; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php deleted file mode 100644 index f249c75a16f2..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/AttemptStatus.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.tasks.v2beta2.AttemptStatus - */ -class AttemptStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - */ - protected $schedule_time = null; - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - */ - protected $dispatch_time = null; - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - */ - protected $response_time = null; - /** - * Output only. The response from the target for this attempt. - * If the task has not been attempted or the task is currently running - * then the response status is unset. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - */ - protected $response_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $schedule_time - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $dispatch_time - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $response_time - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * @type \Google\Rpc\Status $response_status - * Output only. The response from the target for this attempt. - * If the task has not been attempted or the task is currently running - * then the response status is unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDispatchTime() - { - return $this->dispatch_time; - } - - public function hasDispatchTime() - { - return isset($this->dispatch_time); - } - - public function clearDispatchTime() - { - unset($this->dispatch_time); - } - - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDispatchTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dispatch_time = $var; - - return $this; - } - - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getResponseTime() - { - return $this->response_time; - } - - public function hasResponseTime() - { - return isset($this->response_time); - } - - public function clearResponseTime() - { - unset($this->response_time); - } - - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setResponseTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->response_time = $var; - - return $this; - } - - /** - * Output only. The response from the target for this attempt. - * If the task has not been attempted or the task is currently running - * then the response status is unset. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - * @return \Google\Rpc\Status|null - */ - public function getResponseStatus() - { - return $this->response_status; - } - - public function hasResponseStatus() - { - return isset($this->response_status); - } - - public function clearResponseStatus() - { - unset($this->response_status); - } - - /** - * Output only. The response from the target for this attempt. - * If the task has not been attempted or the task is currently running - * then the response status is unset. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setResponseStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->response_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php deleted file mode 100644 index a07ba30cb995..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CancelLeaseRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.tasks.v2beta2.CancelLeaseRequest - */ -class CancelLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schedule_time = null; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type \Google\Protobuf\Timestamp $schedule_time - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php deleted file mode 100644 index 0eeb5944f56e..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateQueueRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.tasks.v2beta2.CreateQueueRequest - */ -class CreateQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - * an existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $queue = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * @type \Google\Cloud\Tasks\V2beta2\Queue $queue - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - * an existing queue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * 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 name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * 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 queue to create. - * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - * an existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2beta2\Queue|null - */ - public function getQueue() - { - return $this->queue; - } - - public function hasQueue() - { - return isset($this->queue); - } - - public function clearQueue() - { - unset($this->queue); - } - - /** - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - * an existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2beta2\Queue $var - * @return $this - */ - public function setQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\Queue::class); - $this->queue = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php deleted file mode 100644 index ccf05e0c56db..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/CreateTaskRequest.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.tasks.v2beta2.CreateTaskRequest - */ -class CreateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or completed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or completed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or completed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * @type \Google\Cloud\Tasks\V2beta2\Task $task - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or completed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or completed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or completed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * 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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * 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 task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or completed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or completed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or completed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2beta2\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or completed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or completed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or completed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2beta2\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\Task::class); - $this->task = $var; - - return $this; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 3; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php deleted file mode 100644 index 204cb50c0a33..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta2.DeleteQueueRequest - */ -class DeleteQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php deleted file mode 100644 index 90e1ae6db930..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/DeleteTaskRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta2.DeleteTaskRequest - */ -class DeleteTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php deleted file mode 100644 index 06c2a0ecd5ce..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetQueueRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.tasks.v2beta2.GetQueueRequest - */ -class GetQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @type \Google\Protobuf\FieldMask $read_mask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php deleted file mode 100644 index e1c29520dd88..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/GetTaskRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.tasks.v2beta2.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php deleted file mode 100644 index b70a89dc91d7..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpMethod.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.tasks.v2beta2.HttpMethod - */ -class HttpMethod -{ - /** - * HTTP method unspecified - * - * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; - */ - const HTTP_METHOD_UNSPECIFIED = 0; - /** - * HTTP POST - * - * Generated from protobuf enum POST = 1; - */ - const POST = 1; - /** - * HTTP GET - * - * Generated from protobuf enum GET = 2; - */ - const GET = 2; - /** - * HTTP HEAD - * - * Generated from protobuf enum HEAD = 3; - */ - const HEAD = 3; - /** - * HTTP PUT - * - * Generated from protobuf enum PUT = 4; - */ - const PUT = 4; - /** - * HTTP DELETE - * - * Generated from protobuf enum DELETE = 5; - */ - const DELETE = 5; - /** - * HTTP PATCH - * - * Generated from protobuf enum PATCH = 6; - */ - const PATCH = 6; - /** - * HTTP OPTIONS - * - * Generated from protobuf enum OPTIONS = 7; - */ - const OPTIONS = 7; - - private static $valueToName = [ - self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', - self::POST => 'POST', - self::GET => 'GET', - self::HEAD => 'HEAD', - self::PUT => 'PUT', - self::DELETE => 'DELETE', - self::PATCH => 'PATCH', - self::OPTIONS => 'OPTIONS', - ]; - - 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php deleted file mode 100644 index 28eb2b523d6d..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpRequest.php +++ /dev/null @@ -1,416 +0,0 @@ -google.cloud.tasks.v2beta2.HttpRequest - */ -class HttpRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $url = ''; - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; - */ - protected $http_method = 0; - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - */ - private $headers; - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - */ - protected $body = ''; - protected $authorization_header; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * @type int $http_method - * The HTTP method to use for the request. The default is POST. - * @type array|\Google\Protobuf\Internal\MapField $headers - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * @type string $body - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * @type \Google\Cloud\Tasks\V2beta2\OAuthToken $oauth_token - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * @type \Google\Cloud\Tasks\V2beta2\OidcToken $oidc_token - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta2.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, False); - $this->body = $var; - - return $this; - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; - * @return \Google\Cloud\Tasks\V2beta2\OAuthToken|null - */ - public function getOauthToken() - { - return $this->readOneof(5); - } - - public function hasOauthToken() - { - return $this->hasOneof(5); - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; - * @param \Google\Cloud\Tasks\V2beta2\OAuthToken $var - * @return $this - */ - public function setOauthToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OAuthToken::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; - * @return \Google\Cloud\Tasks\V2beta2\OidcToken|null - */ - public function getOidcToken() - { - return $this->readOneof(6); - } - - public function hasOidcToken() - { - return $this->hasOneof(6); - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; - * @param \Google\Cloud\Tasks\V2beta2\OidcToken $var - * @return $this - */ - public function setOidcToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OidcToken::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthorizationHeader() - { - return $this->whichOneof("authorization_header"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php deleted file mode 100644 index 7b156261f564..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget.php +++ /dev/null @@ -1,375 +0,0 @@ -google.cloud.tasks.v2beta2.HttpTarget - */ -class HttpTarget extends \Google\Protobuf\Internal\Message -{ - /** - * Uri override. - * When specified, overrides the execution Uri for all the tasks in the queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; - */ - protected $uri_override = null; - /** - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; - */ - protected $http_method = 0; - /** - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-CloudTasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; - */ - private $header_overrides; - protected $authorization_header; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta2\UriOverride $uri_override - * Uri override. - * When specified, overrides the execution Uri for all the tasks in the queue. - * @type int $http_method - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * @type array<\Google\Cloud\Tasks\V2beta2\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $header_overrides - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-CloudTasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * @type \Google\Cloud\Tasks\V2beta2\OAuthToken $oauth_token - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * @type \Google\Cloud\Tasks\V2beta2\OidcToken $oidc_token - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * Uri override. - * When specified, overrides the execution Uri for all the tasks in the queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; - * @return \Google\Cloud\Tasks\V2beta2\UriOverride|null - */ - public function getUriOverride() - { - return $this->uri_override; - } - - public function hasUriOverride() - { - return isset($this->uri_override); - } - - public function clearUriOverride() - { - unset($this->uri_override); - } - - /** - * Uri override. - * When specified, overrides the execution Uri for all the tasks in the queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride uri_override = 1; - * @param \Google\Cloud\Tasks\V2beta2\UriOverride $var - * @return $this - */ - public function setUriOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\UriOverride::class); - $this->uri_override = $var; - - return $this; - } - - /** - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta2.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpMethod http_method = 2; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-CloudTasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaderOverrides() - { - return $this->header_overrides; - } - - /** - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] and/or - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta2.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-CloudTasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride header_overrides = 3; - * @param array<\Google\Cloud\Tasks\V2beta2\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaderOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\HttpTarget\HeaderOverride::class); - $this->header_overrides = $arr; - - return $this; - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; - * @return \Google\Cloud\Tasks\V2beta2\OAuthToken|null - */ - public function getOauthToken() - { - return $this->readOneof(5); - } - - public function hasOauthToken() - { - return $this->hasOneof(5); - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OAuthToken oauth_token = 5; - * @param \Google\Cloud\Tasks\V2beta2\OAuthToken $var - * @return $this - */ - public function setOauthToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OAuthToken::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; - * @return \Google\Cloud\Tasks\V2beta2\OidcToken|null - */ - public function getOidcToken() - { - return $this->readOneof(6); - } - - public function hasOidcToken() - { - return $this->hasOneof(6); - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.OidcToken oidc_token = 6; - * @param \Google\Cloud\Tasks\V2beta2\OidcToken $var - * @return $this - */ - public function setOidcToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\OidcToken::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthorizationHeader() - { - return $this->whichOneof("authorization_header"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php deleted file mode 100644 index 9ef84f7b4c64..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/Header.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.tasks.v2beta2.HttpTarget.Header - */ -class Header extends \Google\Protobuf\Internal\Message -{ - /** - * The key of the header. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The value of the header. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The key of the header. - * @type string $value - * The value of the header. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * The key of the header. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The key of the header. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The value of the header. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the header. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Header::class, \Google\Cloud\Tasks\V2beta2\HttpTarget_Header::class); - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php deleted file mode 100644 index 1581e46bffbb..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/HttpTarget/HeaderOverride.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.tasks.v2beta2.HttpTarget.HeaderOverride - */ -class HeaderOverride extends \Google\Protobuf\Internal\Message -{ - /** - * header embodying a key and a value. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; - */ - protected $header = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta2\HttpTarget\Header $header - * header embodying a key and a value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * header embodying a key and a value. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; - * @return \Google\Cloud\Tasks\V2beta2\HttpTarget\Header|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * header embodying a key and a value. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget.Header header = 1; - * @param \Google\Cloud\Tasks\V2beta2\HttpTarget\Header $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\HttpTarget\Header::class); - $this->header = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HeaderOverride::class, \Google\Cloud\Tasks\V2beta2\HttpTarget_HeaderOverride::class); - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php deleted file mode 100644 index 2d91df19985e..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksRequest.php +++ /dev/null @@ -1,442 +0,0 @@ -google.cloud.tasks.v2beta2.LeaseTasksRequest - */ -class LeaseTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of tasks to lease. - * The system will make a best effort to return as close to as - * `max_tasks` as possible. - * The largest that `max_tasks` can be is 1000. - * The maximum total size of a [lease tasks - * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - * sum of all task sizes requested reaches this limit, fewer tasks than - * requested are returned. - * - * Generated from protobuf field int32 max_tasks = 2; - */ - protected $max_tasks = 0; - /** - * Required. The duration of the lease. - * Each task returned in the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the - * current time plus the `lease_duration`. The task is leased until its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the - * task will not be returned to another - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before - * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * After the worker has successfully finished the work associated - * with the task, the worker must call via - * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * Otherwise the task will be returned to a later - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that - * another worker can retry it. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lease_duration = null; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; - */ - protected $response_view = 0; - /** - * `filter` can be used to specify a subset of tasks to lease. - * When `filter` is set to `tag=` then the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only - * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to - * ``. `` must be less than 500 characters. - * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - * the same tag as the task with the oldest - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - * returned. - * Grammar Syntax: - * * `filter = "tag=" tag | "tag_function=" function` - * * `tag = string` - * * `function = "oldest_tag()"` - * The `oldest_tag()` function returns tasks which have the same tag as the - * oldest task (ordered by schedule time). - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - * aren't UTF-8 encoded can't be used in the - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the - * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed - * as empty in Cloud Tasks. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @type int $max_tasks - * The maximum number of tasks to lease. - * The system will make a best effort to return as close to as - * `max_tasks` as possible. - * The largest that `max_tasks` can be is 1000. - * The maximum total size of a [lease tasks - * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - * sum of all task sizes requested reaches this limit, fewer tasks than - * requested are returned. - * @type \Google\Protobuf\Duration $lease_duration - * Required. The duration of the lease. - * Each task returned in the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the - * current time plus the `lease_duration`. The task is leased until its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the - * task will not be returned to another - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before - * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * After the worker has successfully finished the work associated - * with the task, the worker must call via - * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * Otherwise the task will be returned to a later - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that - * another worker can retry it. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * @type string $filter - * `filter` can be used to specify a subset of tasks to lease. - * When `filter` is set to `tag=` then the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only - * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to - * ``. `` must be less than 500 characters. - * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - * the same tag as the task with the oldest - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - * returned. - * Grammar Syntax: - * * `filter = "tag=" tag | "tag_function=" function` - * * `tag = string` - * * `function = "oldest_tag()"` - * The `oldest_tag()` function returns tasks which have the same tag as the - * oldest task (ordered by schedule time). - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - * aren't UTF-8 encoded can't be used in the - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the - * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed - * as empty in Cloud Tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 tasks to lease. - * The system will make a best effort to return as close to as - * `max_tasks` as possible. - * The largest that `max_tasks` can be is 1000. - * The maximum total size of a [lease tasks - * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - * sum of all task sizes requested reaches this limit, fewer tasks than - * requested are returned. - * - * Generated from protobuf field int32 max_tasks = 2; - * @return int - */ - public function getMaxTasks() - { - return $this->max_tasks; - } - - /** - * The maximum number of tasks to lease. - * The system will make a best effort to return as close to as - * `max_tasks` as possible. - * The largest that `max_tasks` can be is 1000. - * The maximum total size of a [lease tasks - * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - * sum of all task sizes requested reaches this limit, fewer tasks than - * requested are returned. - * - * Generated from protobuf field int32 max_tasks = 2; - * @param int $var - * @return $this - */ - public function setMaxTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_tasks = $var; - - return $this; - } - - /** - * Required. The duration of the lease. - * Each task returned in the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the - * current time plus the `lease_duration`. The task is leased until its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the - * task will not be returned to another - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before - * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * After the worker has successfully finished the work associated - * with the task, the worker must call via - * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * Otherwise the task will be returned to a later - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that - * another worker can retry it. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getLeaseDuration() - { - return $this->lease_duration; - } - - public function hasLeaseDuration() - { - return isset($this->lease_duration); - } - - public function clearLeaseDuration() - { - unset($this->lease_duration); - } - - /** - * Required. The duration of the lease. - * Each task returned in the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the - * current time plus the `lease_duration`. The task is leased until its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the - * task will not be returned to another - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before - * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * After the worker has successfully finished the work associated - * with the task, the worker must call via - * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * Otherwise the task will be returned to a later - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that - * another worker can retry it. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLeaseDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lease_duration = $var; - - return $this; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - - /** - * `filter` can be used to specify a subset of tasks to lease. - * When `filter` is set to `tag=` then the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only - * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to - * ``. `` must be less than 500 characters. - * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - * the same tag as the task with the oldest - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - * returned. - * Grammar Syntax: - * * `filter = "tag=" tag | "tag_function=" function` - * * `tag = string` - * * `function = "oldest_tag()"` - * The `oldest_tag()` function returns tasks which have the same tag as the - * oldest task (ordered by schedule time). - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - * aren't UTF-8 encoded can't be used in the - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the - * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed - * as empty in Cloud Tasks. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * `filter` can be used to specify a subset of tasks to lease. - * When `filter` is set to `tag=` then the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only - * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to - * ``. `` must be less than 500 characters. - * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - * the same tag as the task with the oldest - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - * returned. - * Grammar Syntax: - * * `filter = "tag=" tag | "tag_function=" function` - * * `tag = string` - * * `function = "oldest_tag()"` - * The `oldest_tag()` function returns tasks which have the same tag as the - * oldest task (ordered by schedule time). - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - * aren't UTF-8 encoded can't be used in the - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the - * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed - * as empty in Cloud Tasks. - * - * 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php deleted file mode 100644 index fabd60efa760..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/LeaseTasksResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.tasks.v2beta2.LeaseTasksResponse - */ -class LeaseTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The leased tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; - */ - private $tasks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The leased tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The leased tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The leased tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; - * @param array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\Task::class); - $this->tasks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php deleted file mode 100644 index 4122c329b917..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesRequest.php +++ /dev/null @@ -1,310 +0,0 @@ -google.cloud.tasks.v2beta2.ListQueuesRequest - */ -class ListQueuesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "app_engine_http_target: *". - * Note that using filters might cause fewer queues than the - * requested_page size to be returned. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while - * iterating through pages. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * @type string $filter - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "app_engine_http_target: *". - * Note that using filters might cause fewer queues than the - * requested_page size to be returned. - * @type int $page_size - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * @type string $page_token - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while - * iterating through pages. - * @type \Google\Protobuf\FieldMask $read_mask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_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 location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_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; - } - - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "app_engine_http_target: *". - * Note that using filters might cause fewer queues than the - * requested_page size to be returned. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "app_engine_http_target: *". - * Note that using filters might cause fewer queues than the - * requested_page size to be returned. - * - * 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; - } - - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * 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 token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while - * iterating through pages. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while - * iterating through pages. - * - * 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; - } - - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php deleted file mode 100644 index 921cdffddec0..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListQueuesResponse.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.tasks.v2beta2.ListQueuesResponse - */ -class ListQueuesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Queue queues = 1; - */ - private $queues; - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Tasks\V2beta2\Queue>|\Google\Protobuf\Internal\RepeatedField $queues - * The list of queues. - * @type string $next_page_token - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Queue queues = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQueues() - { - return $this->queues; - } - - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Queue queues = 1; - * @param array<\Google\Cloud\Tasks\V2beta2\Queue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQueues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\Queue::class); - $this->queues = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * 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. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php deleted file mode 100644 index 493471606cf7..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.tasks.v2beta2.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - */ - protected $response_view = 0; - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * @type int $page_size - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * @type string $page_token - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php deleted file mode 100644 index 1b085c352083..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ListTasksResponse.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.tasks.v2beta2.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; - */ - private $tasks; - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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 array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The list of tasks. - * @type string $next_page_token - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta2.Task tasks = 1; - * @param array<\Google\Cloud\Tasks\V2beta2\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta2\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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 token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php deleted file mode 100644 index 2753f9fc25ca..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OAuthToken.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.tasks.v2beta2.OAuthToken - */ -class OAuthToken extends \Google\Protobuf\Internal\Message -{ - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - */ - protected $service_account_email = ''; - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - */ - protected $scope = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_email - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * @type string $scope - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php deleted file mode 100644 index 91cdd96f6482..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/OidcToken.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.tasks.v2beta2.OidcToken - */ -class OidcToken extends \Google\Protobuf\Internal\Message -{ - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - */ - protected $service_account_email = ''; - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - */ - protected $audience = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_email - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * @type string $audience - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php deleted file mode 100644 index 28b7445fa458..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PathOverride.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.tasks.v2beta2.PathOverride - */ -class PathOverride extends \Google\Protobuf\Internal\Message -{ - /** - * The URI path (e.g., /users/1234). Default is an empty string. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * The URI path (e.g., /users/1234). Default is an empty string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * The URI path (e.g., /users/1234). Default is an empty string. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * The URI path (e.g., /users/1234). Default is an empty string. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php deleted file mode 100644 index 564bea2de0a6..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PauseQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta2.PauseQueueRequest - */ -class PauseQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php deleted file mode 100644 index 06bfe1eb2054..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullMessage.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.tasks.v2beta2.PullMessage - */ -class PullMessage extends \Google\Protobuf\Internal\Message -{ - /** - * A data payload consumed by the worker to execute the task. - * - * Generated from protobuf field bytes payload = 1; - */ - protected $payload = ''; - /** - * The task's tag. - * Tags allow similar tasks to be processed in a batch. If you label - * tasks with a tag, your worker can - * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the - * same tag using - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, - * if you want to aggregate the events associated with a specific user once a - * day, you could tag tasks with the user ID. - * The task's tag can only be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The tag must be less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * - * Generated from protobuf field string tag = 2; - */ - protected $tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $payload - * A data payload consumed by the worker to execute the task. - * @type string $tag - * The task's tag. - * Tags allow similar tasks to be processed in a batch. If you label - * tasks with a tag, your worker can - * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the - * same tag using - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, - * if you want to aggregate the events associated with a specific user once a - * day, you could tag tasks with the user ID. - * The task's tag can only be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The tag must be less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * A data payload consumed by the worker to execute the task. - * - * Generated from protobuf field bytes payload = 1; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * A data payload consumed by the worker to execute the task. - * - * Generated from protobuf field bytes payload = 1; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - - /** - * The task's tag. - * Tags allow similar tasks to be processed in a batch. If you label - * tasks with a tag, your worker can - * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the - * same tag using - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, - * if you want to aggregate the events associated with a specific user once a - * day, you could tag tasks with the user ID. - * The task's tag can only be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The tag must be less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * - * Generated from protobuf field string tag = 2; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * The task's tag. - * Tags allow similar tasks to be processed in a batch. If you label - * tasks with a tag, your worker can - * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the - * same tag using - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, - * if you want to aggregate the events associated with a specific user once a - * day, you could tag tasks with the user ID. - * The task's tag can only be set when the - * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The tag must be less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * - * Generated from protobuf field string tag = 2; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php deleted file mode 100644 index 32baa5104df5..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PullTarget.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.tasks.v2beta2.PullTarget - */ -class PullTarget extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php deleted file mode 100644 index 0b46a038df4b..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/PurgeQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta2.PurgeQueueRequest - */ -class PurgeQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php deleted file mode 100644 index 2bbe1049c6e7..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueryOverride.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta2.QueryOverride - */ -class QueryOverride extends \Google\Protobuf\Internal\Message -{ - /** - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * - * Generated from protobuf field string query_params = 1; - */ - protected $query_params = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_params - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * - * Generated from protobuf field string query_params = 1; - * @return string - */ - public function getQueryParams() - { - return $this->query_params; - } - - /** - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * - * Generated from protobuf field string query_params = 1; - * @param string $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkString($var, True); - $this->query_params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php deleted file mode 100644 index 405393e6f812..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue.php +++ /dev/null @@ -1,771 +0,0 @@ -google.cloud.tasks.v2beta2.Queue - */ -class Queue extends \Google\Protobuf\Internal\Message -{ - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related - * because they both control task attempts however they control how tasks are - * attempted in different ways: - * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; - */ - protected $rate_limits = null; - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; - */ - protected $retry_config = null; - /** - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue.State state = 7; - */ - protected $state = 0; - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8; - */ - protected $purge_time = null; - /** - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * - * Generated from protobuf field .google.protobuf.Duration task_ttl = 9; - */ - protected $task_ttl = null; - /** - * The task tombstone time to live (TTL). - * After a task is deleted or completed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 10; - */ - protected $tombstone_ttl = null; - /** - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stats = null; - protected $target_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * @type \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget $app_engine_http_target - * App Engine HTTP target. - * An App Engine queue is a queue that has an - * [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. - * @type \Google\Cloud\Tasks\V2beta2\PullTarget $pull_target - * Pull target. - * A pull queue is a queue that has a - * [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. - * @type \Google\Cloud\Tasks\V2beta2\HttpTarget $http_target - * An http_target is used to override the target values for HTTP tasks. - * @type \Google\Cloud\Tasks\V2beta2\RateLimits $rate_limits - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related - * because they both control task attempts however they control how tasks are - * attempted in different ways: - * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * @type \Google\Cloud\Tasks\V2beta2\RetryConfig $retry_config - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * @type int $state - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * @type \Google\Protobuf\Duration $task_ttl - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * @type \Google\Protobuf\Duration $tombstone_ttl - * The task tombstone time to live (TTL). - * After a task is deleted or completed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * @type \Google\Cloud\Tasks\V2beta2\QueueStats $stats - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * 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; - } - - /** - * App Engine HTTP target. - * An App Engine queue is a queue that has an - * [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; - * @return \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget|null - */ - public function getAppEngineHttpTarget() - { - return $this->readOneof(3); - } - - public function hasAppEngineHttpTarget() - { - return $this->hasOneof(3); - } - - /** - * App Engine HTTP target. - * An App Engine queue is a queue that has an - * [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; - * @param \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget $var - * @return $this - */ - public function setAppEngineHttpTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineHttpTarget::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Pull target. - * A pull queue is a queue that has a - * [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; - * @return \Google\Cloud\Tasks\V2beta2\PullTarget|null - */ - public function getPullTarget() - { - return $this->readOneof(4); - } - - public function hasPullTarget() - { - return $this->hasOneof(4); - } - - /** - * Pull target. - * A pull queue is a queue that has a - * [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; - * @param \Google\Cloud\Tasks\V2beta2\PullTarget $var - * @return $this - */ - public function setPullTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\PullTarget::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * An http_target is used to override the target values for HTTP tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; - * @return \Google\Cloud\Tasks\V2beta2\HttpTarget|null - */ - public function getHttpTarget() - { - return $this->readOneof(17); - } - - public function hasHttpTarget() - { - return $this->hasOneof(17); - } - - /** - * An http_target is used to override the target values for HTTP tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpTarget http_target = 17; - * @param \Google\Cloud\Tasks\V2beta2\HttpTarget $var - * @return $this - */ - public function setHttpTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\HttpTarget::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related - * because they both control task attempts however they control how tasks are - * attempted in different ways: - * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; - * @return \Google\Cloud\Tasks\V2beta2\RateLimits|null - */ - public function getRateLimits() - { - return $this->rate_limits; - } - - public function hasRateLimits() - { - return isset($this->rate_limits); - } - - public function clearRateLimits() - { - unset($this->rate_limits); - } - - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related - * because they both control task attempts however they control how tasks are - * attempted in different ways: - * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; - * @param \Google\Cloud\Tasks\V2beta2\RateLimits $var - * @return $this - */ - public function setRateLimits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\RateLimits::class); - $this->rate_limits = $var; - - return $this; - } - - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; - * @return \Google\Cloud\Tasks\V2beta2\RetryConfig|null - */ - public function getRetryConfig() - { - return $this->retry_config; - } - - public function hasRetryConfig() - { - return isset($this->retry_config); - } - - public function clearRetryConfig() - { - unset($this->retry_config); - } - - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; - * @param \Google\Cloud\Tasks\V2beta2\RetryConfig $var - * @return $this - */ - public function setRetryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\RetryConfig::class); - $this->retry_config = $var; - - return $this; - } - - /** - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue.State state = 7; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue.State state = 7; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Queue\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - - /** - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * - * Generated from protobuf field .google.protobuf.Duration task_ttl = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getTaskTtl() - { - return $this->task_ttl; - } - - public function hasTaskTtl() - { - return isset($this->task_ttl); - } - - public function clearTaskTtl() - { - unset($this->task_ttl); - } - - /** - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * - * Generated from protobuf field .google.protobuf.Duration task_ttl = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTaskTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->task_ttl = $var; - - return $this; - } - - /** - * The task tombstone time to live (TTL). - * After a task is deleted or completed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getTombstoneTtl() - { - return $this->tombstone_ttl; - } - - public function hasTombstoneTtl() - { - return isset($this->tombstone_ttl); - } - - public function clearTombstoneTtl() - { - unset($this->tombstone_ttl); - } - - /** - * The task tombstone time to live (TTL). - * After a task is deleted or completed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta2.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTombstoneTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->tombstone_ttl = $var; - - return $this; - } - - /** - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Tasks\V2beta2\QueueStats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.QueueStats stats = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Tasks\V2beta2\QueueStats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\QueueStats::class); - $this->stats = $var; - - return $this; - } - - /** - * @return string - */ - public function getTargetType() - { - return $this->whichOneof("target_type"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php deleted file mode 100644 index f7bded4c9833..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Queue/State.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.tasks.v2beta2.Queue.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The queue is running. Tasks can be dispatched. - * If the queue was created using Cloud Tasks and the queue has - * had no activity (method calls or task dispatches) for 30 days, - * the queue may take a few minutes to re-activate. Some method - * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and - * tasks may not be dispatched for a few minutes until the queue - * has been re-activated. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * Tasks are paused by the user. If the queue is paused then Cloud - * Tasks will stop delivering tasks from it, but more tasks can - * still be added to it by the user. When a pull queue is paused, - * all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls - * will return a [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * The queue is disabled. - * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - * or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - * is uploaded which does not contain the queue. You cannot directly disable - * a queue. - * When a queue is disabled, tasks can still be added to a queue - * but the tasks are not dispatched and - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls - * return a `FAILED_PRECONDITION` error. - * To permanently delete this queue and all of its tasks, call - * [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. - * - * Generated from protobuf enum DISABLED = 3; - */ - const DISABLED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Tasks\V2beta2\Queue_State::class); - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php deleted file mode 100644 index 2088ee83cf4e..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/QueueStats.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.tasks.v2beta2.QueueStats - */ -class QueueStats extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * - * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tasks_count = 0; - /** - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * - * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $oldest_estimated_arrival_time = null; - /** - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * - * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $executed_last_minute_count = 0; - /** - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * - * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $concurrent_dispatches_count = 0; - /** - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * - * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_execution_rate = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $tasks_count - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * @type \Google\Protobuf\Timestamp $oldest_estimated_arrival_time - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * @type int|string $executed_last_minute_count - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * @type int|string $concurrent_dispatches_count - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * @type float $effective_execution_rate - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * - * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTasksCount() - { - return $this->tasks_count; - } - - /** - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * - * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTasksCount($var) - { - GPBUtil::checkInt64($var); - $this->tasks_count = $var; - - return $this; - } - - /** - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * - * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getOldestEstimatedArrivalTime() - { - return $this->oldest_estimated_arrival_time; - } - - public function hasOldestEstimatedArrivalTime() - { - return isset($this->oldest_estimated_arrival_time); - } - - public function clearOldestEstimatedArrivalTime() - { - unset($this->oldest_estimated_arrival_time); - } - - /** - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * - * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setOldestEstimatedArrivalTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->oldest_estimated_arrival_time = $var; - - return $this; - } - - /** - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * - * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getExecutedLastMinuteCount() - { - return $this->executed_last_minute_count; - } - - /** - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * - * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setExecutedLastMinuteCount($var) - { - GPBUtil::checkInt64($var); - $this->executed_last_minute_count = $var; - - return $this; - } - - /** - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * - * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getConcurrentDispatchesCount() - { - return $this->concurrent_dispatches_count; - } - - /** - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * - * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setConcurrentDispatchesCount($var) - { - GPBUtil::checkInt64($var); - $this->concurrent_dispatches_count = $var; - - return $this; - } - - /** - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * - * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getEffectiveExecutionRate() - { - return $this->effective_execution_rate; - } - - /** - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * - * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setEffectiveExecutionRate($var) - { - GPBUtil::checkDouble($var); - $this->effective_execution_rate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php deleted file mode 100644 index 1607a1fb59c4..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RateLimits.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.tasks.v2beta2.RateLimits - */ -class RateLimits extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - * the maximum allowed value - * is 500. - * * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the - * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests - * are allowed per pull queue. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_tasks_dispatched_per_second = 1; - */ - protected $max_tasks_dispatched_per_second = 0.0; - /** - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is - * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * - * Generated from protobuf field int32 max_burst_size = 2; - */ - protected $max_burst_size = 0; - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field is output only for - * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which - * indicates no limit. No other queue types can have `max_concurrent_tasks` - * set to -1. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_tasks = 3; - */ - protected $max_concurrent_tasks = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $max_tasks_dispatched_per_second - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - * the maximum allowed value - * is 500. - * * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the - * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests - * are allowed per pull queue. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * @type int $max_burst_size - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is - * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * @type int $max_concurrent_tasks - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field is output only for - * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which - * indicates no limit. No other queue types can have `max_concurrent_tasks` - * set to -1. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - * the maximum allowed value - * is 500. - * * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the - * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests - * are allowed per pull queue. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_tasks_dispatched_per_second = 1; - * @return float - */ - public function getMaxTasksDispatchedPerSecond() - { - return $this->max_tasks_dispatched_per_second; - } - - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - * the maximum allowed value - * is 500. - * * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the - * `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests - * are allowed per pull queue. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_tasks_dispatched_per_second = 1; - * @param float $var - * @return $this - */ - public function setMaxTasksDispatchedPerSecond($var) - { - GPBUtil::checkDouble($var); - $this->max_tasks_dispatched_per_second = $var; - - return $this; - } - - /** - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is - * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * - * Generated from protobuf field int32 max_burst_size = 2; - * @return int - */ - public function getMaxBurstSize() - { - return $this->max_burst_size; - } - - /** - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is - * updating [max_dispatches_per_second][RateLimits.max_dispatches_per_second]. - * - * Generated from protobuf field int32 max_burst_size = 2; - * @param int $var - * @return $this - */ - public function setMaxBurstSize($var) - { - GPBUtil::checkInt32($var); - $this->max_burst_size = $var; - - return $this; - } - - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field is output only for - * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which - * indicates no limit. No other queue types can have `max_concurrent_tasks` - * set to -1. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_tasks = 3; - * @return int - */ - public function getMaxConcurrentTasks() - { - return $this->max_concurrent_tasks; - } - - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field is output only for - * [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which - * indicates no limit. No other queue types can have `max_concurrent_tasks` - * set to -1. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_tasks = 3; - * @param int $var - * @return $this - */ - public function setMaxConcurrentTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_tasks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php deleted file mode 100644 index dd4bae70caa0..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RenewLeaseRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.tasks.v2beta2.RenewLeaseRequest - */ -class RenewLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schedule_time = null; - /** - * Required. The desired new lease duration, starting from now. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lease_duration = null; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type \Google\Protobuf\Timestamp $schedule_time - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * @type \Google\Protobuf\Duration $lease_duration - * Required. The desired new lease duration, starting from now. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Required. The desired new lease duration, starting from now. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getLeaseDuration() - { - return $this->lease_duration; - } - - public function hasLeaseDuration() - { - return isset($this->lease_duration); - } - - public function clearLeaseDuration() - { - unset($this->lease_duration); - } - - /** - * Required. The desired new lease duration, starting from now. - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Duration lease_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLeaseDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lease_duration = $var; - - return $this; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 4; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php deleted file mode 100644 index 2313b11ba861..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/ResumeQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta2.ResumeQueueRequest - */ -class ResumeQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php deleted file mode 100644 index 72adfcb1e3c1..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RetryConfig.php +++ /dev/null @@ -1,548 +0,0 @@ -google.cloud.tasks.v2beta2.RetryConfig - */ -class RetryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 3; - */ - protected $max_retry_duration = null; - /** - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 4; - */ - protected $min_backoff = null; - /** - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 5; - */ - protected $max_backoff = null; - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 6; - */ - protected $max_doublings = 0; - protected $num_attempts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_attempts - * The maximum number of attempts for a task. - * Cloud Tasks will attempt the task `max_attempts` times (that - * is, if the first attempt fails, then there will be - * `max_attempts - 1` retries). Must be > 0. - * @type bool $unlimited_attempts - * If true, then the number of attempts is unlimited. - * @type \Google\Protobuf\Duration $max_retry_duration - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $min_backoff - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $max_backoff - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type int $max_doublings - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Queue::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of attempts for a task. - * Cloud Tasks will attempt the task `max_attempts` times (that - * is, if the first attempt fails, then there will be - * `max_attempts - 1` retries). Must be > 0. - * - * Generated from protobuf field int32 max_attempts = 1; - * @return int - */ - public function getMaxAttempts() - { - return $this->readOneof(1); - } - - public function hasMaxAttempts() - { - return $this->hasOneof(1); - } - - /** - * The maximum number of attempts for a task. - * Cloud Tasks will attempt the task `max_attempts` times (that - * is, if the first attempt fails, then there will be - * `max_attempts - 1` retries). Must be > 0. - * - * Generated from protobuf field int32 max_attempts = 1; - * @param int $var - * @return $this - */ - public function setMaxAttempts($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If true, then the number of attempts is unlimited. - * - * Generated from protobuf field bool unlimited_attempts = 2; - * @return bool - */ - public function getUnlimitedAttempts() - { - return $this->readOneof(2); - } - - public function hasUnlimitedAttempts() - { - return $this->hasOneof(2); - } - - /** - * If true, then the number of attempts is unlimited. - * - * Generated from protobuf field bool unlimited_attempts = 2; - * @param bool $var - * @return $this - */ - public function setUnlimitedAttempts($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxRetryDuration() - { - return $this->max_retry_duration; - } - - public function hasMaxRetryDuration() - { - return isset($this->max_retry_duration); - } - - public function clearMaxRetryDuration() - { - unset($this->max_retry_duration); - } - - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxRetryDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_retry_duration = $var; - - return $this; - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBackoff() - { - return $this->min_backoff; - } - - public function hasMinBackoff() - { - return isset($this->min_backoff); - } - - public function clearMinBackoff() - { - unset($this->min_backoff); - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBackoff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_backoff = $var; - - return $this; - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxBackoff() - { - return $this->max_backoff; - } - - public function hasMaxBackoff() - { - return isset($this->max_backoff); - } - - public function clearMaxBackoff() - { - unset($this->max_backoff); - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxBackoff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_backoff = $var; - - return $this; - } - - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 6; - * @return int - */ - public function getMaxDoublings() - { - return $this->max_doublings; - } - - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field is output only for [pull - * queues][google.cloud.tasks.v2beta2.PullTarget]. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 6; - * @param int $var - * @return $this - */ - public function setMaxDoublings($var) - { - GPBUtil::checkInt32($var); - $this->max_doublings = $var; - - return $this; - } - - /** - * @return string - */ - public function getNumAttempts() - { - return $this->whichOneof("num_attempts"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php deleted file mode 100644 index 43840ad89f47..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/RunTaskRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.tasks.v2beta2.RunTaskRequest - */ -class RunTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php deleted file mode 100644 index 820e2333cf67..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task.php +++ /dev/null @@ -1,484 +0,0 @@ -google.cloud.tasks.v2beta2.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * For pull queues, this is the time when the task is available to - * be leased; if a task is currently leased, this is the time when - * the current lease expires, that is, the time that the task was - * leased plus the - * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 5; - */ - protected $schedule_time = null; - /** - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - */ - protected $create_time = null; - /** - * Output only. The task status. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.TaskStatus status = 7; - */ - protected $status = null; - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View view = 8; - */ - protected $view = 0; - protected $payload_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * @type \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest $app_engine_http_request - * App Engine HTTP request that is sent to the task's target. Can - * be set only if - * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] - * is set on the queue. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - * set. - * @type \Google\Cloud\Tasks\V2beta2\PullMessage $pull_message - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process - * the task. Can be set only if - * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the - * queue. - * A pull task is a task that has - * [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. - * @type \Google\Cloud\Tasks\V2beta2\HttpRequest $http_request - * HTTP request that is sent to the task's target. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. - * @type \Google\Protobuf\Timestamp $schedule_time - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * For pull queues, this is the time when the task is available to - * be leased; if a task is currently leased, this is the time when - * the current lease expires, that is, the time that the task was - * leased plus the - * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. - * `schedule_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * @type \Google\Cloud\Tasks\V2beta2\TaskStatus $status - * Output only. The task status. - * @type int $view - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] has been returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * 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; - } - - /** - * App Engine HTTP request that is sent to the task's target. Can - * be set only if - * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] - * is set on the queue. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - * set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; - * @return \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest|null - */ - public function getAppEngineHttpRequest() - { - return $this->readOneof(3); - } - - public function hasAppEngineHttpRequest() - { - return $this->hasOneof(3); - } - - /** - * App Engine HTTP request that is sent to the task's target. Can - * be set only if - * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] - * is set on the queue. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - * set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; - * @param \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest $var - * @return $this - */ - public function setAppEngineHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AppEngineHttpRequest::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process - * the task. Can be set only if - * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the - * queue. - * A pull task is a task that has - * [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; - * @return \Google\Cloud\Tasks\V2beta2\PullMessage|null - */ - public function getPullMessage() - { - return $this->readOneof(4); - } - - public function hasPullMessage() - { - return $this->hasOneof(4); - } - - /** - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process - * the task. Can be set only if - * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the - * queue. - * A pull task is a task that has - * [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; - * @param \Google\Cloud\Tasks\V2beta2\PullMessage $var - * @return $this - */ - public function setPullMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\PullMessage::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * HTTP request that is sent to the task's target. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; - * @return \Google\Cloud\Tasks\V2beta2\HttpRequest|null - */ - public function getHttpRequest() - { - return $this->readOneof(13); - } - - public function hasHttpRequest() - { - return $this->hasOneof(13); - } - - /** - * HTTP request that is sent to the task's target. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2beta2.HttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.HttpRequest http_request = 13; - * @param \Google\Cloud\Tasks\V2beta2\HttpRequest $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\HttpRequest::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * For pull queues, this is the time when the task is available to - * be leased; if a task is currently leased, this is the time when - * the current lease expires, that is, the time that the task was - * leased plus the - * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * For pull queues, this is the time when the task is available to - * be leased; if a task is currently leased, this is the time when - * the current lease expires, that is, the time that the task was - * leased plus the - * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; - * @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 task status. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.TaskStatus status = 7; - * @return \Google\Cloud\Tasks\V2beta2\TaskStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. The task status. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.TaskStatus status = 7; - * @param \Google\Cloud\Tasks\V2beta2\TaskStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\TaskStatus::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View view = 8; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Task.View view = 8; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\Task\View::class); - $this->view = $var; - - return $this; - } - - /** - * @return string - */ - public function getPayloadType() - { - return $this->whichOneof("payload_type"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php deleted file mode 100644 index d3d0db2c9c71..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/Task/View.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.tasks.v2beta2.Task.View - */ -class View -{ - /** - * Unspecified. Defaults to BASIC. - * - * Generated from protobuf enum VIEW_UNSPECIFIED = 0; - */ - const VIEW_UNSPECIFIED = 0; - /** - * The basic view omits fields which can be large or can contain - * sensitive data. - * This view does not include the - * ([payload in - * AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - * and [payload in - * PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These - * payloads are desirable to return only when needed, because they can be - * large and because of the sensitivity of the data that you choose to store - * in it. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * All information is returned. - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Queue][google.cloud.tasks.v2beta2.Queue] resource. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(View::class, \Google\Cloud\Tasks\V2beta2\Task_View::class); - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php deleted file mode 100644 index 9b7ced73522f..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/TaskStatus.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.tasks.v2beta2.TaskStatus - */ -class TaskStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 attempt_dispatch_count = 1; - */ - protected $attempt_dispatch_count = 0; - /** - * Output only. The number of attempts which have received a response. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field int32 attempt_response_count = 2; - */ - protected $attempt_response_count = 0; - /** - * Output only. The status of the task's first attempt. - * Only - * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] - * will be set. The other - * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is - * not retained by Cloud Tasks. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; - */ - protected $first_attempt_status = null; - /** - * Output only. The status of the task's last attempt. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; - */ - protected $last_attempt_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $attempt_dispatch_count - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * @type int $attempt_response_count - * Output only. The number of attempts which have received a response. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * @type \Google\Cloud\Tasks\V2beta2\AttemptStatus $first_attempt_status - * Output only. The status of the task's first attempt. - * Only - * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] - * will be set. The other - * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is - * not retained by Cloud Tasks. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * @type \Google\Cloud\Tasks\V2beta2\AttemptStatus $last_attempt_status - * Output only. The status of the task's last attempt. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Task::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 attempt_dispatch_count = 1; - * @return int - */ - public function getAttemptDispatchCount() - { - return $this->attempt_dispatch_count; - } - - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 attempt_dispatch_count = 1; - * @param int $var - * @return $this - */ - public function setAttemptDispatchCount($var) - { - GPBUtil::checkInt32($var); - $this->attempt_dispatch_count = $var; - - return $this; - } - - /** - * Output only. The number of attempts which have received a response. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field int32 attempt_response_count = 2; - * @return int - */ - public function getAttemptResponseCount() - { - return $this->attempt_response_count; - } - - /** - * Output only. The number of attempts which have received a response. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field int32 attempt_response_count = 2; - * @param int $var - * @return $this - */ - public function setAttemptResponseCount($var) - { - GPBUtil::checkInt32($var); - $this->attempt_response_count = $var; - - return $this; - } - - /** - * Output only. The status of the task's first attempt. - * Only - * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] - * will be set. The other - * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is - * not retained by Cloud Tasks. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; - * @return \Google\Cloud\Tasks\V2beta2\AttemptStatus|null - */ - public function getFirstAttemptStatus() - { - return $this->first_attempt_status; - } - - public function hasFirstAttemptStatus() - { - return isset($this->first_attempt_status); - } - - public function clearFirstAttemptStatus() - { - unset($this->first_attempt_status); - } - - /** - * Output only. The status of the task's first attempt. - * Only - * [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] - * will be set. The other - * [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is - * not retained by Cloud Tasks. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; - * @param \Google\Cloud\Tasks\V2beta2\AttemptStatus $var - * @return $this - */ - public function setFirstAttemptStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AttemptStatus::class); - $this->first_attempt_status = $var; - - return $this; - } - - /** - * Output only. The status of the task's last attempt. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; - * @return \Google\Cloud\Tasks\V2beta2\AttemptStatus|null - */ - public function getLastAttemptStatus() - { - return $this->last_attempt_status; - } - - public function hasLastAttemptStatus() - { - return isset($this->last_attempt_status); - } - - public function clearLastAttemptStatus() - { - unset($this->last_attempt_status); - } - - /** - * Output only. The status of the task's last attempt. - * This field is not calculated for [pull - * tasks][google.cloud.tasks.v2beta2.PullMessage]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; - * @param \Google\Cloud\Tasks\V2beta2\AttemptStatus $var - * @return $this - */ - public function setLastAttemptStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\AttemptStatus::class); - $this->last_attempt_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php deleted file mode 100644 index c32717481e98..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UpdateQueueRequest.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.tasks.v2beta2.UpdateQueueRequest - */ -class UpdateQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be - * changed. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $queue = null; - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta2\Queue $queue - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be - * changed. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be - * changed. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2beta2\Queue|null - */ - public function getQueue() - { - return $this->queue; - } - - public function hasQueue() - { - return isset($this->queue); - } - - public function clearQueue() - { - unset($this->queue); - } - - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be - * changed. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2beta2\Queue $var - * @return $this - */ - public function setQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\Queue::class); - $this->queue = $var; - - return $this; - } - - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will 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); - } - - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will 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/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php deleted file mode 100644 index 1d8bc2fa466d..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UploadQueueYamlRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.tasks.v2beta2.UploadQueueYamlRequest - */ -class UploadQueueYamlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The App ID is supplied as an HTTP parameter. Unlike internal - * usage of App ID, it does not include a region prefix. Rather, the App ID - * represents the Project ID against which to make the request. - * - * Generated from protobuf field string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_id = ''; - /** - * The http body contains the queue.yaml file which used to update queue lists - * - * Generated from protobuf field optional .google.api.HttpBody http_body = 2; - */ - protected $http_body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $app_id - * Required. The App ID is supplied as an HTTP parameter. Unlike internal - * usage of App ID, it does not include a region prefix. Rather, the App ID - * represents the Project ID against which to make the request. - * @type \Google\Api\HttpBody $http_body - * The http body contains the queue.yaml file which used to update queue lists - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The App ID is supplied as an HTTP parameter. Unlike internal - * usage of App ID, it does not include a region prefix. Rather, the App ID - * represents the Project ID against which to make the request. - * - * Generated from protobuf field string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAppId() - { - return $this->app_id; - } - - /** - * Required. The App ID is supplied as an HTTP parameter. Unlike internal - * usage of App ID, it does not include a region prefix. Rather, the App ID - * represents the Project ID against which to make the request. - * - * Generated from protobuf field string app_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAppId($var) - { - GPBUtil::checkString($var, True); - $this->app_id = $var; - - return $this; - } - - /** - * The http body contains the queue.yaml file which used to update queue lists - * - * Generated from protobuf field optional .google.api.HttpBody http_body = 2; - * @return \Google\Api\HttpBody|null - */ - public function getHttpBody() - { - return $this->http_body; - } - - public function hasHttpBody() - { - return isset($this->http_body); - } - - public function clearHttpBody() - { - unset($this->http_body); - } - - /** - * The http body contains the queue.yaml file which used to update queue lists - * - * Generated from protobuf field optional .google.api.HttpBody http_body = 2; - * @param \Google\Api\HttpBody $var - * @return $this - */ - public function setHttpBody($var) - { - GPBUtil::checkMessage($var, \Google\Api\HttpBody::class); - $this->http_body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php deleted file mode 100644 index 7d21cb8e089e..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.tasks.v2beta2.UriOverride - */ -class UriOverride extends \Google\Protobuf\Internal\Message -{ - /** - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * - * Generated from protobuf field optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; - */ - protected $scheme = null; - /** - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * - * Generated from protobuf field optional string host = 2; - */ - protected $host = null; - /** - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * - * Generated from protobuf field optional int64 port = 3; - */ - protected $port = null; - /** - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PathOverride path_override = 4; - */ - protected $path_override = null; - /** - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; - */ - protected $query_override = null; - /** - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; - */ - protected $uri_override_enforce_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $scheme - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * @type string $host - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * @type int|string $port - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * @type \Google\Cloud\Tasks\V2beta2\PathOverride $path_override - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * @type \Google\Cloud\Tasks\V2beta2\QueryOverride $query_override - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * @type int $uri_override_enforce_mode - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta2\Target::initOnce(); - parent::__construct($data); - } - - /** - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * - * Generated from protobuf field optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; - * @return int - */ - public function getScheme() - { - return isset($this->scheme) ? $this->scheme : 0; - } - - public function hasScheme() - { - return isset($this->scheme); - } - - public function clearScheme() - { - unset($this->scheme); - } - - /** - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * - * Generated from protobuf field optional .google.cloud.tasks.v2beta2.UriOverride.Scheme scheme = 1; - * @param int $var - * @return $this - */ - public function setScheme($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\UriOverride\Scheme::class); - $this->scheme = $var; - - return $this; - } - - /** - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * - * Generated from protobuf field optional string host = 2; - * @return string - */ - public function getHost() - { - return isset($this->host) ? $this->host : ''; - } - - public function hasHost() - { - return isset($this->host); - } - - public function clearHost() - { - unset($this->host); - } - - /** - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * - * Generated from protobuf field optional string host = 2; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * - * Generated from protobuf field optional int64 port = 3; - * @return int|string - */ - public function getPort() - { - return isset($this->port) ? $this->port : 0; - } - - public function hasPort() - { - return isset($this->port); - } - - public function clearPort() - { - unset($this->port); - } - - /** - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * - * Generated from protobuf field optional int64 port = 3; - * @param int|string $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt64($var); - $this->port = $var; - - return $this; - } - - /** - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PathOverride path_override = 4; - * @return \Google\Cloud\Tasks\V2beta2\PathOverride|null - */ - public function getPathOverride() - { - return $this->path_override; - } - - public function hasPathOverride() - { - return isset($this->path_override); - } - - public function clearPathOverride() - { - unset($this->path_override); - } - - /** - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.PathOverride path_override = 4; - * @param \Google\Cloud\Tasks\V2beta2\PathOverride $var - * @return $this - */ - public function setPathOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\PathOverride::class); - $this->path_override = $var; - - return $this; - } - - /** - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; - * @return \Google\Cloud\Tasks\V2beta2\QueryOverride|null - */ - public function getQueryOverride() - { - return $this->query_override; - } - - public function hasQueryOverride() - { - return isset($this->query_override); - } - - public function clearQueryOverride() - { - unset($this->query_override); - } - - /** - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.QueryOverride query_override = 5; - * @param \Google\Cloud\Tasks\V2beta2\QueryOverride $var - * @return $this - */ - public function setQueryOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta2\QueryOverride::class); - $this->query_override = $var; - - return $this; - } - - /** - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; - * @return int - */ - public function getUriOverrideEnforceMode() - { - return $this->uri_override_enforce_mode; - } - - /** - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * - * Generated from protobuf field .google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; - * @param int $var - * @return $this - */ - public function setUriOverrideEnforceMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta2\UriOverride\UriOverrideEnforceMode::class); - $this->uri_override_enforce_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php deleted file mode 100644 index d27231a2038d..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/Scheme.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.tasks.v2beta2.UriOverride.Scheme - */ -class Scheme -{ - /** - * Scheme unspecified. Defaults to HTTPS. - * - * Generated from protobuf enum SCHEME_UNSPECIFIED = 0; - */ - const SCHEME_UNSPECIFIED = 0; - /** - * Convert the scheme to HTTP, e.g., https://www.google.ca will change to - * http://www.google.ca. - * - * Generated from protobuf enum HTTP = 1; - */ - const HTTP = 1; - /** - * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to - * https://www.google.ca. - * - * Generated from protobuf enum HTTPS = 2; - */ - const HTTPS = 2; - - private static $valueToName = [ - self::SCHEME_UNSPECIFIED => 'SCHEME_UNSPECIFIED', - self::HTTP => 'HTTP', - self::HTTPS => 'HTTPS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scheme::class, \Google\Cloud\Tasks\V2beta2\UriOverride_Scheme::class); - diff --git a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php b/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php deleted file mode 100644 index 16736bffe052..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/proto/src/Google/Cloud/Tasks/V2beta2/UriOverride/UriOverrideEnforceMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tasks.v2beta2.UriOverride.UriOverrideEnforceMode - */ -class UriOverrideEnforceMode -{ - /** - * OverrideMode Unspecified. Defaults to ALWAYS. - * - * Generated from protobuf enum URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; - */ - const URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; - /** - * In the IF_NOT_EXISTS mode, queue-level configuration is only - * applied where task-level configuration does not exist. - * - * Generated from protobuf enum IF_NOT_EXISTS = 1; - */ - const IF_NOT_EXISTS = 1; - /** - * In the ALWAYS mode, queue-level configuration overrides all - * task-level configuration - * - * Generated from protobuf enum ALWAYS = 2; - */ - const ALWAYS = 2; - - private static $valueToName = [ - self::URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED => 'URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED', - self::IF_NOT_EXISTS => 'IF_NOT_EXISTS', - self::ALWAYS => 'ALWAYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UriOverrideEnforceMode::class, \Google\Cloud\Tasks\V2beta2\UriOverride_UriOverrideEnforceMode::class); - diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php deleted file mode 100644 index dfa44bea000a..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/acknowledge_task.php +++ /dev/null @@ -1,82 +0,0 @@ -acknowledgeTask($formattedName, $scheduleTime); - 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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - acknowledge_task_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php deleted file mode 100644 index fa0956fddef3..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/cancel_lease.php +++ /dev/null @@ -1,76 +0,0 @@ -cancelLease($formattedName, $scheduleTime); - 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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - cancel_lease_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php deleted file mode 100644 index b427abdbd306..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_queue.php +++ /dev/null @@ -1,85 +0,0 @@ -createQueue($formattedParent, $queue); - 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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); - - create_queue_sample($formattedParent); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php deleted file mode 100644 index e5e238114b44..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/create_task.php +++ /dev/null @@ -1,80 +0,0 @@ -createTask($formattedParent, $task); - 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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - create_task_sample($formattedParent); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php deleted file mode 100644 index 84fb02ab903b..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_queue.php +++ /dev/null @@ -1,77 +0,0 @@ -deleteQueue($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - delete_queue_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php deleted file mode 100644 index 06124f19250e..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/delete_task.php +++ /dev/null @@ -1,69 +0,0 @@ -deleteTask($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - delete_task_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php deleted file mode 100644 index 1e41025e96ff..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php deleted file mode 100644 index 4aaddcc22a3d..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudtasks_v2beta2_generated_CloudTasks_GetLocation_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php deleted file mode 100644 index 5fb478085e54..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_queue.php +++ /dev/null @@ -1,67 +0,0 @@ -getQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - get_queue_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php deleted file mode 100644 index 780914b39107..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/get_task.php +++ /dev/null @@ -1,67 +0,0 @@ -getTask($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php deleted file mode 100644 index ff53bf1ceb01..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/lease_tasks.php +++ /dev/null @@ -1,93 +0,0 @@ -leaseTasks($formattedParent, $leaseDuration); - 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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - lease_tasks_sample($formattedParent); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php deleted file mode 100644 index 4b8b6f73d3fe..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 cloudtasks_v2beta2_generated_CloudTasks_ListLocations_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php deleted file mode 100644 index e0d3bf4d4cff..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_queues.php +++ /dev/null @@ -1,74 +0,0 @@ -listQueues($formattedParent); - - /** @var Queue $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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); - - list_queues_sample($formattedParent); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php deleted file mode 100644 index 47ab73268ce6..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/list_tasks.php +++ /dev/null @@ -1,80 +0,0 @@ -listTasks($formattedParent); - - /** @var Task $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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - list_tasks_sample($formattedParent); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php deleted file mode 100644 index dd98a7e55fc3..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/pause_queue.php +++ /dev/null @@ -1,74 +0,0 @@ -pauseQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - pause_queue_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php deleted file mode 100644 index 3a1827680371..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/purge_queue.php +++ /dev/null @@ -1,72 +0,0 @@ -purgeQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - purge_queue_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php deleted file mode 100644 index 59ff5f7d8ba2..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/renew_lease.php +++ /dev/null @@ -1,78 +0,0 @@ -renewLease($formattedName, $scheduleTime, $leaseDuration); - 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 = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - renew_lease_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php deleted file mode 100644 index d787c841efa8..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/resume_queue.php +++ /dev/null @@ -1,81 +0,0 @@ -resumeQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - resume_queue_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php deleted file mode 100644 index 10dddc23c693..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/run_task.php +++ /dev/null @@ -1,96 +0,0 @@ -runTask($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - run_task_sample($formattedName); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php deleted file mode 100644 index cb9b2123bea6..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/set_iam_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php deleted file mode 100644 index a5e276e15c38..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/test_iam_permissions.php +++ /dev/null @@ -1,81 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php deleted file mode 100644 index 4e20bc98ab2c..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/update_queue.php +++ /dev/null @@ -1,70 +0,0 @@ -updateQueue($queue); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php b/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php deleted file mode 100644 index 270900884e50..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/samples/V2beta2/CloudTasksClient/upload_queue_yaml.php +++ /dev/null @@ -1,69 +0,0 @@ -uploadQueueYaml($appId); - 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 -{ - $appId = '[APP_ID]'; - - upload_queue_yaml_sample($appId); -} -// [END cloudtasks_v2beta2_generated_CloudTasks_UploadQueueYaml_sync] diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php deleted file mode 100644 index f2e76ac1bacc..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/CloudTasksClient.php +++ /dev/null @@ -1,36 +0,0 @@ -taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $scheduleTime = new Timestamp(); - * $cloudTasksClient->acknowledgeTask($formattedName, $scheduleTime); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - * - * @deprecated This class will be removed in the next major version update. - */ -class CloudTasksGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.tasks.v2beta2.CloudTasks'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $locationNameTemplate; - - private static $queueNameTemplate; - - private static $taskNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_tasks_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getQueueNameTemplate() - { - if (self::$queueNameTemplate == null) { - self::$queueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}'); - } - - return self::$queueNameTemplate; - } - - private static function getTaskNameTemplate() - { - if (self::$taskNameTemplate == null) { - self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}/tasks/{task}'); - } - - return self::$taskNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'queue' => self::getQueueNameTemplate(), - 'task' => self::getTaskNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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. - * - * @experimental - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a queue - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * - * @return string The formatted queue resource. - * - * @experimental - */ - public static function queueName($project, $location, $queue) - { - return self::getQueueNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * @param string $task - * - * @return string The formatted task resource. - * - * @experimental - */ - public static function taskName($project, $location, $queue, $task) - { - return self::getTaskNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - 'task' => $task, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - queue: projects/{project}/locations/{location}/queues/{queue} - * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtasks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Acknowledges a pull task. - * - * The worker, that is, the entity that - * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must - * call this method to indicate that the work associated with the task has - * finished. - * - * The worker must acknowledge a task within the - * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] - * or the lease will expire and the task will become available to be leased - * again. After the task is acknowledged, it will not be returned - * by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], - * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or - * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $scheduleTime = new Timestamp(); - * $cloudTasksClient->acknowledgeTask($formattedName, $scheduleTime); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param Timestamp $scheduleTime Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function acknowledgeTask($name, $scheduleTime, array $optionalArgs = []) - { - $request = new AcknowledgeTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setScheduleTime($scheduleTime); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AcknowledgeTask', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Cancel a pull task's lease. - * - * The worker can use this method to cancel a task's lease by - * setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] - * to now. This will make the task available to be leased to the next caller - * of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $scheduleTime = new Timestamp(); - * $response = $cloudTasksClient->cancelLease($formattedName, $scheduleTime); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param Timestamp $scheduleTime Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function cancelLease($name, $scheduleTime, array $optionalArgs = []) - { - $request = new CancelLeaseRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setScheduleTime($scheduleTime); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CancelLease', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a queue. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * $queue = new Queue(); - * $response = $cloudTasksClient->createQueue($formattedParent, $queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * @param Queue $queue Required. The queue to create. - * - * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as - * an existing queue. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createQueue($parent, $queue, array $optionalArgs = []) - { - $request = new CreateQueueRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setQueue($queue); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a task and adds it to a queue. - * - * Tasks cannot be updated after creation; there is no UpdateTask command. - * - * * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], - * the maximum task size is - * 100KB. - * * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum - * task size is 1MB. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $task = new Task(); - * $response = $cloudTasksClient->createTask($formattedParent, $task); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. - * @param Task $task Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. - * - * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or completed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or completed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or completed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createTask($parent, $task, array $optionalArgs = []) - { - $request = new CreateTaskRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTask($task); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a queue. - * - * This command will delete the queue even if it has tasks in it. - * - * Note: If you delete a queue, a queue with the same name can't be created - * for 7 days. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $cloudTasksClient->deleteQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteQueue($name, array $optionalArgs = []) - { - $request = new DeleteQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteQueue', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a task. - * - * A task can be deleted if it is scheduled or dispatched. A task - * cannot be deleted if it has completed successfully or permanently - * failed. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $cloudTasksClient->deleteTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteTask($name, array $optionalArgs = []) - { - $request = new DeleteTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTask', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a - * [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the - * resource exists and does not have a policy set. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.getIamPolicy` - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $response = $cloudTasksClient->getIamPolicy($resource); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a queue. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->getQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $readMask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getQueue($name, array $optionalArgs = []) - { - $request = new GetQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['readMask'])) { - $request->setReadMask($optionalArgs['readMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a task. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $response = $cloudTasksClient->getTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getTask($name, array $optionalArgs = []) - { - $request = new GetTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Leases tasks from a pull queue for - * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. - * - * This method is invoked by the worker to obtain a lease. The - * worker must acknowledge the task via - * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - * after they have performed the work associated with the task. - * - * The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended - * to store data that the worker needs to perform the work associated with the - * task. To return the payloads in the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set - * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] - * to [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. - * - * A maximum of 10 qps of - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are - * allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - * is returned when this limit is - * exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] - * is also returned when - * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] - * is exceeded. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $leaseDuration = new Duration(); - * $response = $cloudTasksClient->leaseTasks($formattedParent, $leaseDuration); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param Duration $leaseDuration Required. The duration of the lease. - * - * Each task returned in the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will have its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] set to the - * current time plus the `lease_duration`. The task is leased until its - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]; thus, the - * task will not be returned to another - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call before - * its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * - * - * After the worker has successfully finished the work associated - * with the task, the worker must call via - * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] - * before the [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * Otherwise the task will be returned to a later - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so that - * another worker can retry it. - * - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * @param array $optionalArgs { - * Optional. - * - * @type int $maxTasks - * The maximum number of tasks to lease. - * - * The system will make a best effort to return as close to as - * `max_tasks` as possible. - * - * The largest that `max_tasks` can be is 1000. - * - * The maximum total size of a [lease tasks - * response][google.cloud.tasks.v2beta2.LeaseTasksResponse] is 32 MB. If the - * sum of all task sizes requested reaches this limit, fewer tasks than - * requested are returned. - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type string $filter - * `filter` can be used to specify a subset of tasks to lease. - * - * When `filter` is set to `tag=` then the - * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only - * tasks whose [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to - * ``. `` must be less than 500 characters. - * - * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have - * the same tag as the task with the oldest - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - * returned. - * - * Grammar Syntax: - * - * * `filter = "tag=" tag | "tag_function=" function` - * - * * `tag = string` - * - * * `function = "oldest_tag()"` - * - * The `oldest_tag()` function returns tasks which have the same tag as the - * oldest task (ordered by schedule time). - * - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which - * aren't UTF-8 encoded can't be used in the - * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the - * task's [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed - * as empty in Cloud Tasks. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\LeaseTasksResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function leaseTasks($parent, $leaseDuration, array $optionalArgs = []) - { - $request = new LeaseTasksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setLeaseDuration($leaseDuration); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['maxTasks'])) { - $request->setMaxTasks($optionalArgs['maxTasks']); - } - - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('LeaseTasks', LeaseTasksResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists queues. - * - * Queues are returned in lexicographical order. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta2.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * - * Sample filter "app_engine_http_target: *". - * - * Note that using filters might cause fewer queues than the - * requested_page size to be returned. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type FieldMask $readMask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listQueues($parent, array $optionalArgs = []) - { - $request = new ListQueuesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['readMask'])) { - $request->setReadMask($optionalArgs['readMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListQueues', $optionalArgs, ListQueuesResponse::class, $request); - } - - /** - * Lists the tasks in a queue. - * - * By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] - * view is retrieved due to performance considerations; - * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] - * controls the subset of information which is returned. - * - * The tasks may be returned in any order. The ordering may change at any - * time. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listTasks($parent, array $optionalArgs = []) - { - $request = new ListTasksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); - } - - /** - * Pauses the queue. - * - * If a queue is paused then the system will stop dispatching tasks - * until the queue is resumed via - * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can - * still be added when the queue is paused. A queue is paused if its - * [state][google.cloud.tasks.v2beta2.Queue.state] is - * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->pauseQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function pauseQueue($name, array $optionalArgs = []) - { - $request = new PauseQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PauseQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Purges a queue by deleting all of its tasks. - * - * All tasks created before this method is called are permanently deleted. - * - * Purge operations can take up to one minute to take effect. Tasks - * might be dispatched before the purge takes effect. A purge is irreversible. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->purgeQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function purgeQueue($name, array $optionalArgs = []) - { - $request = new PurgeQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PurgeQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Renew the current lease of a pull task. - * - * The worker can use this method to extend the lease by a new - * duration, starting from now. The new task lease will be - * returned in the task's - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $scheduleTime = new Timestamp(); - * $leaseDuration = new Duration(); - * $response = $cloudTasksClient->renewLease($formattedName, $scheduleTime, $leaseDuration); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param Timestamp $scheduleTime Required. The task's current schedule time, available in the - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by - * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or - * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. - * This restriction is to ensure that your worker currently holds the lease. - * @param Duration $leaseDuration Required. The desired new lease duration, starting from now. - * - * - * The maximum lease duration is 1 week. - * `lease_duration` will be truncated to the nearest second. - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function renewLease($name, $scheduleTime, $leaseDuration, array $optionalArgs = []) - { - $request = new RenewLeaseRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setScheduleTime($scheduleTime); - $request->setLeaseDuration($leaseDuration); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RenewLease', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Resume a queue. - * - * This method resumes a queue after it has been - * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a - * queue is stored in the queue's - * [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method - * it will be set to - * [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. - * - * WARNING: Resuming many high-QPS queues at the same time can - * lead to target overloading. If you are resuming high-QPS - * queues, follow the 500/50/5 pattern described in - * [Managing Cloud Tasks Scaling - * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->resumeQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function resumeQueue($name, array $optionalArgs = []) - { - $request = new ResumeQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ResumeQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Forces a task to run now. - * - * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its - * [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is - * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. - * - * This command is meant to be used for manual debugging. For - * example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be - * used to retry a failed task after a fix has been made or to manually force - * a task to be dispatched now. - * - * The dispatched task is returned. That is, the task that is returned - * contains the [status][google.cloud.tasks.v2beta2.Task.status] after the - * task is dispatched but before the task is received by its target. - * - * If Cloud Tasks receives a successful response from the task's - * target, then the task will be deleted; otherwise the task's - * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be - * reset to the time that - * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus - * the retry delay specified in the queue's - * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. - * - * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - * task that has already succeeded or permanently failed. - * - * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called - * on a [pull task][google.cloud.tasks.v2beta2.PullMessage]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $response = $cloudTasksClient->runTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta2.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta2.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta2\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function runTask($name, array $optionalArgs = []) - { - $request = new RunTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Sets the access control policy for a - * [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing policy. - * - * Note: The Cloud Console does not check queue-level IAM permissions yet. - * Project-level permissions are required to use the Cloud Console. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.setIamPolicy` - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $cloudTasksClient->setIamPolicy($resource, $policy); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns permissions that a caller has on a - * [Queue][google.cloud.tasks.v2beta2.Queue]. If the resource does not exist, - * this will return an empty set of permissions, not a - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $cloudTasksClient->testIamPermissions($resource, $permissions); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a queue. - * - * This method creates the queue if it does not exist and updates - * the queue if it does exist. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $queue = new Queue(); - * $response = $cloudTasksClient->updateQueue($queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param Queue $queue Required. The queue to create or update. - * - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be - * specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be - * changed. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta2\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateQueue($queue, array $optionalArgs = []) - { - $request = new UpdateQueueRequest(); - $requestParamHeaders = []; - $request->setQueue($queue); - $requestParamHeaders['queue.name'] = $queue->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Update queue list by uploading a queue.yaml file. - * - * The queue.yaml file is supplied in the request body as a YAML encoded - * string. This method was added to support gcloud clients versions before - * 322.0.0. New clients should use CreateQueue instead of this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $appId = 'app_id'; - * $cloudTasksClient->uploadQueueYaml($appId); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $appId Required. The App ID is supplied as an HTTP parameter. Unlike internal - * usage of App ID, it does not include a region prefix. Rather, the App ID - * represents the Project ID against which to make the request. - * @param array $optionalArgs { - * Optional. - * - * @type HttpBody $httpBody - * The http body contains the queue.yaml file which used to update queue lists - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function uploadQueueYaml($appId, array $optionalArgs = []) - { - $request = new UploadQueueYamlRequest(); - $request->setAppId($appId); - if (isset($optionalArgs['httpBody'])) { - $request->setHttpBody($optionalArgs['httpBody']); - } - - return $this->startCall('UploadQueueYaml', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $response = $cloudTasksClient->getLocation(); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json deleted file mode 100644 index 92458443760a..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/gapic_metadata.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.tasks.v2beta2", - "libraryPackage": "Google\\Cloud\\Tasks\\V2beta2", - "services": { - "CloudTasks": { - "clients": { - "grpc": { - "libraryClient": "CloudTasksGapicClient", - "rpcs": { - "AcknowledgeTask": { - "methods": [ - "acknowledgeTask" - ] - }, - "CancelLease": { - "methods": [ - "cancelLease" - ] - }, - "CreateQueue": { - "methods": [ - "createQueue" - ] - }, - "CreateTask": { - "methods": [ - "createTask" - ] - }, - "DeleteQueue": { - "methods": [ - "deleteQueue" - ] - }, - "DeleteTask": { - "methods": [ - "deleteTask" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetQueue": { - "methods": [ - "getQueue" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "LeaseTasks": { - "methods": [ - "leaseTasks" - ] - }, - "ListQueues": { - "methods": [ - "listQueues" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - }, - "PauseQueue": { - "methods": [ - "pauseQueue" - ] - }, - "PurgeQueue": { - "methods": [ - "purgeQueue" - ] - }, - "RenewLease": { - "methods": [ - "renewLease" - ] - }, - "ResumeQueue": { - "methods": [ - "resumeQueue" - ] - }, - "RunTask": { - "methods": [ - "runTask" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateQueue": { - "methods": [ - "updateQueue" - ] - }, - "UploadQueueYaml": { - "methods": [ - "uploadQueueYaml" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json deleted file mode 100644 index 3e49652fe97e..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_client_config.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "interfaces": { - "google.cloud.tasks.v2beta2.CloudTasks": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - } - }, - "methods": { - "AcknowledgeTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CancelLease": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteQueue": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTask": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetQueue": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "LeaseTasks": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListQueues": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTasks": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PauseQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PurgeQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RenewLease": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResumeQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RunTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UploadQueueYaml": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_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/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php deleted file mode 100644 index fea53dec6f93..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_descriptor_config.php +++ /dev/null @@ -1,62 +0,0 @@ - [ - 'google.cloud.tasks.v2beta2.CloudTasks' => [ - 'ListQueues' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getQueues', - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - ], - 'GetLocation' => [ - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - ], - ], -]; diff --git a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php b/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php deleted file mode 100644 index d145d8f9e126..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/src/V2beta2/resources/cloud_tasks_rest_client_config.php +++ /dev/null @@ -1,288 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.tasks.v2beta2.CloudTasks' => [ - 'AcknowledgeTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CancelLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*}/queues', - 'body' => 'queue', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteQueue' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetQueue' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'LeaseTasks' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListQueues' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*}/queues', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PauseQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}:pause', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'PurgeQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}:purge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RenewLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResumeQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*}:resume', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RunTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateQueue' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta2/{queue.name=projects/*/locations/*/queues/*}', - 'body' => 'queue', - 'placeholders' => [ - 'queue.name' => [ - 'getters' => [ - 'getQueue', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php deleted file mode 100644 index e3fffafd8ee9..000000000000 --- a/owl-bot-staging/Tasks/v2beta2/tests/Unit/V2beta2/CloudTasksClientTest.php +++ /dev/null @@ -1,1492 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudTasksClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudTasksClient($options); - } - - /** @test */ - public function acknowledgeTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $scheduleTime = new Timestamp(); - $gapicClient->acknowledgeTask($formattedName, $scheduleTime); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getScheduleTime(); - $this->assertProtobufEquals($scheduleTime, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acknowledgeTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $scheduleTime = new Timestamp(); - try { - $gapicClient->acknowledgeTask($formattedName, $scheduleTime); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $scheduleTime = new Timestamp(); - $response = $gapicClient->cancelLease($formattedName, $scheduleTime); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/CancelLease', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getScheduleTime(); - $this->assertProtobufEquals($scheduleTime, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelLeaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $scheduleTime = new Timestamp(); - try { - $gapicClient->cancelLease($formattedName, $scheduleTime); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queue = new Queue(); - $response = $gapicClient->createQueue($formattedParent, $queue); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/CreateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $queue = new Queue(); - try { - $gapicClient->createQueue($formattedParent, $queue); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - $response = $gapicClient->createTask($formattedParent, $task); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/CreateTask', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - try { - $gapicClient->createTask($formattedParent, $task); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $gapicClient->deleteQueue($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->deleteQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $gapicClient->deleteTask($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/DeleteTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->deleteTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->getQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/GetQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->getQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $response = $gapicClient->getTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->getTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function leaseTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new LeaseTasksResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $leaseDuration = new Duration(); - $response = $gapicClient->leaseTasks($formattedParent, $leaseDuration); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getLeaseDuration(); - $this->assertProtobufEquals($leaseDuration, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function leaseTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $leaseDuration = new Duration(); - try { - $gapicClient->leaseTasks($formattedParent, $leaseDuration); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $queuesElement = new Queue(); - $queues = [ - $queuesElement, - ]; - $expectedResponse = new ListQueuesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setQueues($queues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listQueues($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/ListQueues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listQueues($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->listTasks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->listTasks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->pauseQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/PauseQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->pauseQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->purgeQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->purgeQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renewLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $scheduleTime = new Timestamp(); - $leaseDuration = new Duration(); - $response = $gapicClient->renewLease($formattedName, $scheduleTime, $leaseDuration); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/RenewLease', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getScheduleTime(); - $this->assertProtobufEquals($scheduleTime, $actualValue); - $actualValue = $actualRequestObject->getLeaseDuration(); - $this->assertProtobufEquals($leaseDuration, $actualValue); - $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); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $scheduleTime = new Timestamp(); - $leaseDuration = new Duration(); - try { - $gapicClient->renewLease($formattedName, $scheduleTime, $leaseDuration); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->resumeQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->resumeQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $response = $gapicClient->runTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->runTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $queue = new Queue(); - $response = $gapicClient->updateQueue($queue); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $queue = new Queue(); - try { - $gapicClient->updateQueue($queue); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function uploadQueueYamlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $appId = 'appId-1411074055'; - $gapicClient->uploadQueueYaml($appId); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta2.CloudTasks/UploadQueueYaml', $actualFuncCall); - $actualValue = $actualRequestObject->getAppId(); - $this->assertProtobufEquals($appId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function uploadQueueYamlExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $appId = 'appId-1411074055'; - try { - $gapicClient->uploadQueueYaml($appId); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php deleted file mode 100644 index adb326f38216..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Cloudtasks.php +++ /dev/null @@ -1,116 +0,0 @@ -internalAddGeneratedFile( - ' -—( -+google/cloud/tasks/v2beta3/cloudtasks.protogoogle.cloud.tasks.v2beta3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/tasks/v2beta3/queue.proto%google/cloud/tasks/v2beta3/task.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"· -ListQueuesRequest7 -parent ( B\'àAúA!cloudtasks.googleapis.com/Queue -filter (  - page_size ( - -page_token ( 2 - read_mask ( 2.google.protobuf.FieldMaskBàA"` -ListQueuesResponse1 -queues ( 2!.google.cloud.tasks.v2beta3.Queue -next_page_token ( "| -GetQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue2 - read_mask ( 2.google.protobuf.FieldMaskBàA"„ -CreateQueueRequest7 -parent ( B\'àAúA!cloudtasks.googleapis.com/Queue5 -queue ( 2!.google.cloud.tasks.v2beta3.QueueBàA"| -UpdateQueueRequest5 -queue ( 2!.google.cloud.tasks.v2beta3.QueueBàA/ - update_mask ( 2.google.protobuf.FieldMask"K -DeleteQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"J -PurgeQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"J -PauseQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"K -ResumeQueueRequest5 -name ( B\'àAúA! -cloudtasks.googleapis.com/Queue"¯ -ListTasksRequest6 -parent ( B&àAúA cloudtasks.googleapis.com/Task< - response_view (2%.google.cloud.tasks.v2beta3.Task.View - page_size ( - -page_token ( "] -ListTasksResponse/ -tasks ( 2 .google.cloud.tasks.v2beta3.Task -next_page_token ( "„ -GetTaskRequest4 -name ( B&àAúA -cloudtasks.googleapis.com/Task< - response_view (2%.google.cloud.tasks.v2beta3.Task.View"¾ -CreateTaskRequest6 -parent ( B&àAúA cloudtasks.googleapis.com/Task3 -task ( 2 .google.cloud.tasks.v2beta3.TaskBàA< - response_view (2%.google.cloud.tasks.v2beta3.Task.View"I -DeleteTaskRequest4 -name ( B&àAúA -cloudtasks.googleapis.com/Task"„ -RunTaskRequest4 -name ( B&àAúA -cloudtasks.googleapis.com/Task< - response_view (2%.google.cloud.tasks.v2beta3.Task.View2¥ - -CloudTasks­ - -ListQueues-.google.cloud.tasks.v2beta3.ListQueuesRequest..google.cloud.tasks.v2beta3.ListQueuesResponse"@ÚAparent‚Óä“1//v2beta3/{parent=projects/*/locations/*}/queuesš -GetQueue+.google.cloud.tasks.v2beta3.GetQueueRequest!.google.cloud.tasks.v2beta3.Queue">ÚAname‚Óä“1//v2beta3/{name=projects/*/locations/*/queues/*}¯ - CreateQueue..google.cloud.tasks.v2beta3.CreateQueueRequest!.google.cloud.tasks.v2beta3.Queue"MÚA parent,queue‚Óä“8"//v2beta3/{parent=projects/*/locations/*}/queues:queueº - UpdateQueue..google.cloud.tasks.v2beta3.UpdateQueueRequest!.google.cloud.tasks.v2beta3.Queue"XÚAqueue,update_mask‚Óä“>25/v2beta3/{queue.name=projects/*/locations/*/queues/*}:queue• - DeleteQueue..google.cloud.tasks.v2beta3.DeleteQueueRequest.google.protobuf.Empty">ÚAname‚Óä“1*//v2beta3/{name=projects/*/locations/*/queues/*}§ - -PurgeQueue-.google.cloud.tasks.v2beta3.PurgeQueueRequest!.google.cloud.tasks.v2beta3.Queue"GÚAname‚Óä“:"5/v2beta3/{name=projects/*/locations/*/queues/*}:purge:*§ - -PauseQueue-.google.cloud.tasks.v2beta3.PauseQueueRequest!.google.cloud.tasks.v2beta3.Queue"GÚAname‚Óä“:"5/v2beta3/{name=projects/*/locations/*/queues/*}:pause:*ª - ResumeQueue..google.cloud.tasks.v2beta3.ResumeQueueRequest!.google.cloud.tasks.v2beta3.Queue"HÚAname‚Óä“;"6/v2beta3/{name=projects/*/locations/*/queues/*}:resume:*¡ - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"VÚAresource‚Óä“E"@/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy:*¨ - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"]ÚAresource,policy‚Óä“E"@/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy:*Ó -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"hÚAresource,permissions‚Óä“K"F/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions:*² - ListTasks,.google.cloud.tasks.v2beta3.ListTasksRequest-.google.cloud.tasks.v2beta3.ListTasksResponse"HÚAparent‚Óä“97/v2beta3/{parent=projects/*/locations/*/queues/*}/tasksŸ -GetTask*.google.cloud.tasks.v2beta3.GetTaskRequest .google.cloud.tasks.v2beta3.Task"FÚAname‚Óä“97/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}¯ - -CreateTask-.google.cloud.tasks.v2beta3.CreateTaskRequest .google.cloud.tasks.v2beta3.Task"PÚA parent,task‚Óä“<"7/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks:*› - -DeleteTask-.google.cloud.tasks.v2beta3.DeleteTaskRequest.google.protobuf.Empty"FÚAname‚Óä“9*7/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}¦ -RunTask*.google.cloud.tasks.v2beta3.RunTaskRequest .google.cloud.tasks.v2beta3.Task"MÚAname‚Óä“@";/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run:*MÊAcloudtasks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB€ -com.google.cloud.tasks.v2beta3BCloudTasksProtoPZCcloud.google.com/go/cloudtasks/apiv2beta3/cloudtaskspb;cloudtaskspb¢TASKSbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Queue.php b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Queue.php deleted file mode 100644 index bb64862a08116894b48971470b8d8d6688147eef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2709 zcmbVOe^1*+7;b<7eFKPDWipx8Uem6m+U8X0R%u~uN=Sf63^Ed?b+TkR_9a~F*sgs> zWmUe(KF+?tzQO*S_9^z>ogJb!4QNOa{_#BT`JVTA?(X{^!;26ekwfa!$mY}~{VT#R zC<&v02TtITeli%)h&aJ0WFCzSLYk-K@M3g6yzbn666c|sg%o%FcLuMW@>bVViVPCQ!s@1M%bzS6R)H9m) z?$)ds?ZIY6sKM<=o=DnE&~ey_|3U3B^bog4;cTw#;@3a0v}bkKowVoxO4 zKR4jX?cA#s70!?@H>Asr)aAwPw1yqBN|Z{gOkXs2=G5m>z!Z5u1T0-B|p)p4Vzh+*n_elc3S)GgLbRAc}FY2%GvqJN&Dn*Gp7M8ck1U|e6fI5 zUv0L#^~N#YEta0alK39&9&GkrcHS?t3QL{y<72EKuewK@3pLaHxBe0yNR3peRT?nL zv4LA(Mb1)tfjxdj9UfQSrB~yM7dUbi!)Mv$SZ#Rt*W7qM zBZ@^g9kC3b&Fo-`6e^|2FF>bw7{lYsCACy>+&;xTsgx!shi=4hA1ym4_YEaQN1Sas zx!?BH(vYqH==Nctj&V|>3Wgv%$Xy2{?C(zB^q1xG_k3rvwSJ{eH&ch9SRU499E2oN K9aqLM2KW!{ENd(P diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Target.php b/owl-bot-staging/Tasks/v2beta3/proto/src/GPBMetadata/Google/Cloud/Tasks/V2Beta3/Target.php deleted file mode 100644 index 60a36d89fa8ad8943c2ca79a34d02d289b79584f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3007 zcmc&$+iu%N5RERDqLJ(>ted({Td-iDShKQb-d==QCzxN1aV>fok6A!Op?9mglJyTefQ zBHB4?j4?wG_#2&IR+lyb0yM)>h#agR4BCfWz(ov=4y5|1Bh*KhP#-;Sw1xUEfa9Ym z(k*EQegmEV!g%a^jvg_@_}^VGvc14#9`e1H+>1T^6!{V6s+VO?plGf&_D!&2Vv9?7^VU8M_n8_)C(D*11{QZa@W%EiIc7ElCw?2D=isFz_mUlF05q_7WT|*G;e8=hSSafVf5gnFq|2MUoh#WO6w zuQclQtKrt?6zfB&)w}U~CZpYg{FFpY;p}CSqmWRxmgCTKy{tHT0?PugO%eyz^88!5 zv9;*NHym!kit;G6up}*PFS77vP!N0;Q!j;JK-#cKs_ZKd&ek+t~<%sm^* z%ptc@dk6&;8|^k|!%ojQH0+b3;lSwh_xnb-dPBPj`JQDBsu`^WOX6u*&DO?n``re$ zZP++D?%U>b-B%G6kC ze6vVfT+VwIm)1#CgpgxJba%81;5^t>S>zqL7AYKCm$m(aImKGW+580 z#lsUC^Vv+U*L09iP|zOogqKQs%q9vSh<9` zpn{OZ{{Es1Uo)4u-o6d1!ec_cm%NXYz*fd;|74*oq>nK#rickpG4&Hr|A{pNit3IF zvc7*G;siqiIWhu9&qZGw6Zc%UhYHWb|BtykR1_x(vIYD#vp;064EY4KRu~$=#0#(p zJ?}{|)}Fx~6o$M7iDR3Rn0dh@P56ZLdy7Jt8a-CZwZF2knjX%R{1&fbx?H~+d!Stg zD$};y_#k{5pGg$^JRQ%l&AW@74khjAb>8GE9)OfV$FhT8p0&5 zVlYRTo_UTMlO=J$r&z?xN|moxg_~Z$w-LVcBwq0}mP1iYxl*kO@VcXDU%)4cJsUX= zi34Wi8S*Zwkhg}&Az{)QYLB3l_LKLiavUgjJuGm@wc*=Hwe_U4-hofW#IX+zt7mrK z8XtTx4a}j%r$!NS2ZmM6%2{Q!y49RG8k|_wyqG9m{&1}&@8s}^`4DVhVT zZypV+#WsU4`C7Yx#&%gXYPkarGQV`xdUUaTklD_JsD)SUyD0Q7R$eJ7Ps8!<{L8o? c*Wd@6>AH4LZGm%3R5U)EYZ5SuZgrW8Fq2tmPaj{KWoqnmZtnk022HM6*(hL{`2sB08++>NB zs18}+SJ+$ZdG;QAiXBNw$!5bdrZ1An``wYh``z95uf#;4$M}RrEFqEwczA{7gkh1y zGNy5ehuLVv5=`T%;2}$FjJv1!-RTAHb^8}z0W^)XgfbV8<9Hl0hlX($IFh8lq|V3Y zkV$f&|7`6Mp@>XbDhOrxWYB&K+X0cpJJDdTqrl#U0(+OuwgMj_L_?CMSgoRKgy9j{ zFys`cl1O+x;i=CfE;$MLZ*YSnJR)Jr061?u$|5Rx9AO1GjVNn8!^WqweIjDG@ewYL zGf*S|0bW0nEQv_yby-RiE@Yexz|?ieOqSHCmBzC?ta8UkxM9xdx^ss-!ZOL&?dTXM zOlC=RsL!n&%*ros0a-14@Inz{_dmPP!|HI$_aAz^8GLWy)O%ja)XDtK_aN5bd{xMWAFEMR8{3+)lgN{ zSG|HOjScG@JtRW-EE@BO`4cIHpRf-Z&|d!p3^tqJ*~a6di`gw9dK&o}fM*8x`i}Jq z)&AjWQ+x9Em${nrAhIy@A^#~Ev-;Kw9tHq-YwY0+&(T&&CoIT9<|~rwRqbN8I77j( zU5dj)s*&8N$vDP7r@V7&JnRn^=29PM28dq4W`-<=P7o&IsZ*WI~eZJ@Pw>%8CDsaW?> z_4xgpH#>LT$zLso9_dS%sxf*af~Pi26i17;1L^viQJFf|`Pa+|W2zeqtQDU#2c!$) zb*}Y$md}`L<#^WKMm0gM!k7fUyb^5h&kDL%5H%+kRUVtoWpV*XnMbX#yQ@IT6l;j7 zv1L)dMxT}tQ_#7Rts)~(>b7Zl?F5L7r^UtsVYD|CodY$q29=*W#-b>2AbT8};jA;^ sKn{xWe3KtBJiPrgT-TL!uwQo0Z_L!XHRRN}IbAT|w56FvGc-f!Zvwo*j{pDw diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php deleted file mode 100644 index 685601b84245..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpQueue.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.tasks.v2beta3.AppEngineHttpQueue - */ -class AppEngineHttpQueue extends \Google\Protobuf\Internal\Message -{ - /** - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing_override = 1; - */ - protected $app_engine_routing_override = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta3\AppEngineRouting $app_engine_routing_override - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing_override = 1; - * @return \Google\Cloud\Tasks\V2beta3\AppEngineRouting|null - */ - public function getAppEngineRoutingOverride() - { - return $this->app_engine_routing_override; - } - - public function hasAppEngineRoutingOverride() - { - return isset($this->app_engine_routing_override); - } - - public function clearAppEngineRoutingOverride() - { - unset($this->app_engine_routing_override); - } - - /** - * Overrides for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * If set, `app_engine_routing_override` is used for all tasks in - * the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing_override = 1; - * @param \Google\Cloud\Tasks\V2beta3\AppEngineRouting $var - * @return $this - */ - public function setAppEngineRoutingOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineRouting::class); - $this->app_engine_routing_override = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php deleted file mode 100644 index 7257325270f2..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineHttpRequest.php +++ /dev/null @@ -1,478 +0,0 @@ -google.cloud.tasks.v2beta3.AppEngineHttpRequest - */ -class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 1; - */ - protected $http_method = 0; - /** - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing = 2; - */ - protected $app_engine_routing = null; - /** - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_uri = 3; - */ - protected $relative_uri = ''; - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks - * sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * documentation. - * - * Generated from protobuf field map headers = 4; - */ - private $headers; - /** - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * - * Generated from protobuf field bytes body = 5; - */ - protected $body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $http_method - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * @type \Google\Cloud\Tasks\V2beta3\AppEngineRouting $app_engine_routing - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * @type string $relative_uri - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * @type array|\Google\Protobuf\Internal\MapField $headers - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks - * sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * documentation. - * @type string $body - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 1; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. The default is POST. - * The app's request handler for the task's target URL must be able to handle - * HTTP requests with this http_method, otherwise the task attempt fails with - * error code 405 (Method Not Allowed). See [Writing a push task request - * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) - * and the App Engine documentation for your runtime on [How Requests are - * Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled). - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 1; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing = 2; - * @return \Google\Cloud\Tasks\V2beta3\AppEngineRouting|null - */ - public function getAppEngineRouting() - { - return $this->app_engine_routing; - } - - public function hasAppEngineRouting() - { - return isset($this->app_engine_routing); - } - - public function clearAppEngineRouting() - { - unset($this->app_engine_routing); - } - - /** - * Task-level setting for App Engine routing. - * If set, - * [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override] - * is used for all tasks in the queue, no matter what the setting is for the - * [task-level - * app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineRouting app_engine_routing = 2; - * @param \Google\Cloud\Tasks\V2beta3\AppEngineRouting $var - * @return $this - */ - public function setAppEngineRouting($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineRouting::class); - $this->app_engine_routing = $var; - - return $this; - } - - /** - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_uri = 3; - * @return string - */ - public function getRelativeUri() - { - return $this->relative_uri; - } - - /** - * The relative URI. - * The relative URI must begin with "/" and must be a valid HTTP relative URI. - * It can contain a path and query string arguments. - * If the relative URI is empty, then the root path "/" will be used. - * No spaces are allowed, and the maximum length allowed is 2083 characters. - * - * Generated from protobuf field string relative_uri = 3; - * @param string $var - * @return $this - */ - public function setRelativeUri($var) - { - GPBUtil::checkString($var, True); - $this->relative_uri = $var; - - return $this; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks - * sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * documentation. - * - * Generated from protobuf field map headers = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * Repeated headers are not supported but a header value can contain commas. - * Cloud Tasks sets some headers to default values: - * * `User-Agent`: By default, this header is - * `"AppEngine-Google; (+http://code.google.com/appengine)"`. - * This header can be modified, but Cloud Tasks will append - * `"AppEngine-Google; (+http://code.google.com/appengine)"` to the - * modified `User-Agent`. - * If the task has a - * [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud Tasks - * sets the following headers: - * * `Content-Type`: By default, the `Content-Type` header is set to - * `"application/octet-stream"`. The default can be overridden by explicitly - * setting `Content-Type` to a particular media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/json"`. - * * `Content-Length`: This is computed by Cloud Tasks. This value is - * output only. It cannot be changed. - * The headers below cannot be set or overridden: - * * `Host` - * * `X-Google-*` - * * `X-AppEngine-*` - * In addition, Cloud Tasks sets some headers when the task is dispatched, - * such as headers containing information about the task; see - * [request - * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). - * These headers are set only when the task is dispatched, so they are not - * visible when the task is returned in a Cloud Tasks response. - * Although there is no specific limit for the maximum number of headers or - * the size, there is a limit on the maximum size of the - * [Task][google.cloud.tasks.v2beta3.Task]. For more information, see the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * documentation. - * - * Generated from protobuf field map headers = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * - * Generated from protobuf field bytes body = 5; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * HTTP request body. - * A request body is allowed only if the HTTP method is POST or PUT. It is - * an error to set a body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * - * Generated from protobuf field bytes body = 5; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, False); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php deleted file mode 100644 index 2546c50f732f..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/AppEngineRouting.php +++ /dev/null @@ -1,380 +0,0 @@ -google.cloud.tasks.v2beta3.AppEngineRouting - */ -class AppEngineRouting extends \Google\Protobuf\Internal\Message -{ - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string service = 1; - */ - protected $service = ''; - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - */ - protected $instance = ''; - /** - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks - * which were created using the App Engine SDK might have a custom domain - * name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * Generated from protobuf field string host = 4; - */ - protected $host = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * @type string $version - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * @type string $instance - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * @type string $host - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks - * which were created using the App Engine SDK might have a custom domain - * name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string service = 1; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * App service. - * By default, the task is sent to the service which is the default - * service when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string service = 1; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * App version. - * By default, the task is sent to the version which is the default - * version when the task is attempted. - * For some queues or tasks which were created using the App Engine - * Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is - * not parsable into - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For - * example, some tasks which were created using the App Engine SDK use a - * custom domain name; custom domains are not parsed by Cloud Tasks. If - * [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, - * then [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the - * empty string. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * App instance. - * By default, the task is sent to an instance which is available when - * the task is attempted. - * Requests can only be sent to a specific instance if - * [manual scaling is used in App Engine - * Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). - * App Engine Flex does not support instances. For more information, see - * [App Engine Standard request - * routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) - * and [App Engine Flex request - * routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). - * - * Generated from protobuf field string instance = 3; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks - * which were created using the App Engine SDK might have a custom domain - * name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * Generated from protobuf field string host = 4; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Output only. The host that the task is sent to. - * The host is constructed from the domain name of the app associated with - * the queue's project ID (for example .appspot.com), and the - * [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], - * [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and - * [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks - * which were created using the App Engine SDK might have a custom domain - * name. - * For more information, see - * [How Requests are - * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). - * - * Generated from protobuf field string host = 4; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php deleted file mode 100644 index e9dc7a0cad3a..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Attempt.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.tasks.v2beta3.Attempt - */ -class Attempt extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - */ - protected $schedule_time = null; - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - */ - protected $dispatch_time = null; - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - */ - protected $response_time = null; - /** - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - */ - protected $response_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $schedule_time - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $dispatch_time - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $response_time - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * @type \Google\Rpc\Status $response_status - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Task::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Output only. The time that this attempt was scheduled. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDispatchTime() - { - return $this->dispatch_time; - } - - public function hasDispatchTime() - { - return isset($this->dispatch_time); - } - - public function clearDispatchTime() - { - unset($this->dispatch_time); - } - - /** - * Output only. The time that this attempt was dispatched. - * `dispatch_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp dispatch_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDispatchTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dispatch_time = $var; - - return $this; - } - - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getResponseTime() - { - return $this->response_time; - } - - public function hasResponseTime() - { - return isset($this->response_time); - } - - public function clearResponseTime() - { - unset($this->response_time); - } - - /** - * Output only. The time that this attempt response was received. - * `response_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp response_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setResponseTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->response_time = $var; - - return $this; - } - - /** - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - * @return \Google\Rpc\Status|null - */ - public function getResponseStatus() - { - return $this->response_status; - } - - public function hasResponseStatus() - { - return isset($this->response_status); - } - - public function clearResponseStatus() - { - unset($this->response_status); - } - - /** - * Output only. The response from the worker for this attempt. - * If `response_time` is unset, then the task has not been attempted or is - * currently running and the `response_status` field is meaningless. - * - * Generated from protobuf field .google.rpc.Status response_status = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setResponseStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->response_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php deleted file mode 100644 index 55733073e210..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateQueueRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.tasks.v2beta3.CreateQueueRequest - */ -class CreateQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - * an existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $queue = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * @type \Google\Cloud\Tasks\V2beta3\Queue $queue - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - * an existing queue. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * 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 name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * - * 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 queue to create. - * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - * an existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2beta3\Queue|null - */ - public function getQueue() - { - return $this->queue; - } - - public function hasQueue() - { - return isset($this->queue); - } - - public function clearQueue() - { - unset($this->queue); - } - - /** - * Required. The queue to create. - * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - * an existing queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2beta3\Queue $var - * @return $this - */ - public function setQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Queue::class); - $this->queue = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php deleted file mode 100644 index 2639a9271c86..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/CreateTaskRequest.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.tasks.v2beta3.CreateTaskRequest - */ -class CreateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 3; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * @type \Google\Cloud\Tasks\V2beta3\Task $task - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * 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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * The queue must already exist. - * - * 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 task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2beta3\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. The task to add. - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * Task De-duplication: - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or executed. - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task task = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2beta3\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Task::class); - $this->task = $var; - - return $this; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 3; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 3; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php deleted file mode 100644 index 0eebfa9c696d..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta3.DeleteQueueRequest - */ -class DeleteQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php deleted file mode 100644 index d9576067cf94..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/DeleteTaskRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta3.DeleteTaskRequest - */ -class DeleteTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php deleted file mode 100644 index 2d6609e8a7f1..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetQueueRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.tasks.v2beta3.GetQueueRequest - */ -class GetQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @type \Google\Protobuf\FieldMask $read_mask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php deleted file mode 100644 index 1f16efccdc25..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/GetTaskRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.tasks.v2beta3.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php deleted file mode 100644 index 0c8164234fca..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpMethod.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.tasks.v2beta3.HttpMethod - */ -class HttpMethod -{ - /** - * HTTP method unspecified - * - * Generated from protobuf enum HTTP_METHOD_UNSPECIFIED = 0; - */ - const HTTP_METHOD_UNSPECIFIED = 0; - /** - * HTTP POST - * - * Generated from protobuf enum POST = 1; - */ - const POST = 1; - /** - * HTTP GET - * - * Generated from protobuf enum GET = 2; - */ - const GET = 2; - /** - * HTTP HEAD - * - * Generated from protobuf enum HEAD = 3; - */ - const HEAD = 3; - /** - * HTTP PUT - * - * Generated from protobuf enum PUT = 4; - */ - const PUT = 4; - /** - * HTTP DELETE - * - * Generated from protobuf enum DELETE = 5; - */ - const DELETE = 5; - /** - * HTTP PATCH - * - * Generated from protobuf enum PATCH = 6; - */ - const PATCH = 6; - /** - * HTTP OPTIONS - * - * Generated from protobuf enum OPTIONS = 7; - */ - const OPTIONS = 7; - - private static $valueToName = [ - self::HTTP_METHOD_UNSPECIFIED => 'HTTP_METHOD_UNSPECIFIED', - self::POST => 'POST', - self::GET => 'GET', - self::HEAD => 'HEAD', - self::PUT => 'PUT', - self::DELETE => 'DELETE', - self::PATCH => 'PATCH', - self::OPTIONS => 'OPTIONS', - ]; - - 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php deleted file mode 100644 index 2177366bab53..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpRequest.php +++ /dev/null @@ -1,433 +0,0 @@ -google.cloud.tasks.v2beta3.HttpRequest - */ -class HttpRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; - */ - protected $http_method = 0; - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - */ - private $headers; - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - */ - protected $body = ''; - protected $authorization_header; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * @type int $http_method - * The HTTP method to use for the request. The default is POST. - * @type array|\Google\Protobuf\Internal\MapField $headers - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * @type string $body - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * @type \Google\Cloud\Tasks\V2beta3\OAuthToken $oauth_token - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * @type \Google\Cloud\Tasks\V2beta3\OidcToken $oidc_token - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Required. The full url path that the request will be sent to. - * This string must begin with either "http://" or "https://". Some examples - * are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will - * encode some characters for safety and compatibility. The maximum allowed - * URL length is 2083 characters after encoding. - * The `Location` header response from a redirect response [`300` - `399`] - * may be followed. The redirect is not counted as a separate attempt. - * - * 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; - } - - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. The default is POST. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * HTTP request headers. - * This map contains the header field names and values. - * Headers can be set when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * These headers represent a subset of the headers that will accompany the - * task's HTTP request. Some HTTP request headers will be ignored or replaced. - * A partial list of headers that will be ignored or replaced is: - * * Any header that is prefixed with "X-CloudTasks-" will be treated - * as service header. Service headers define properties of the task and are - * predefined in CloudTask. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * * `X-Google-*`: Google use only. - * * `X-AppEngine-*`: Google use only. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example, `Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * - * Generated from protobuf field map headers = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * HTTP request body. - * A request body is allowed only if the - * [HTTP method][google.cloud.tasks.v2beta3.HttpRequest.http_method] is POST, - * PUT, or PATCH. It is an error to set body on a task with an incompatible - * [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod]. - * - * Generated from protobuf field bytes body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, False); - $this->body = $var; - - return $this; - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; - * @return \Google\Cloud\Tasks\V2beta3\OAuthToken|null - */ - public function getOauthToken() - { - return $this->readOneof(5); - } - - public function hasOauthToken() - { - return $this->hasOneof(5); - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as an `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; - * @param \Google\Cloud\Tasks\V2beta3\OAuthToken $var - * @return $this - */ - public function setOauthToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OAuthToken::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; - * @return \Google\Cloud\Tasks\V2beta3\OidcToken|null - */ - public function getOidcToken() - { - return $this->readOneof(6); - } - - public function hasOidcToken() - { - return $this->hasOneof(6); - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; - * @param \Google\Cloud\Tasks\V2beta3\OidcToken $var - * @return $this - */ - public function setOidcToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OidcToken::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthorizationHeader() - { - return $this->whichOneof("authorization_header"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php deleted file mode 100644 index 4f15822f4ebc..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget.php +++ /dev/null @@ -1,367 +0,0 @@ -google.cloud.tasks.v2beta3.HttpTarget - */ -class HttpTarget extends \Google\Protobuf\Internal\Message -{ - /** - * URI override. - * When specified, overrides the execution URI for all the tasks in the queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; - */ - protected $uri_override = null; - /** - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; - */ - protected $http_method = 0; - /** - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or - * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will be configured for - * the task's HTTP request. Some HTTP request headers will be ignored or - * replaced. - * A partial list of headers that will be ignored or replaced is: - * * Several predefined headers, prefixed with "X-CloudTasks-", can - * be used to define properties of the task. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example,`Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. The default value is set to `"application/json"`. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; - */ - private $header_overrides; - protected $authorization_header; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta3\UriOverride $uri_override - * URI override. - * When specified, overrides the execution URI for all the tasks in the queue. - * @type int $http_method - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * @type array<\Google\Cloud\Tasks\V2beta3\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $header_overrides - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or - * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will be configured for - * the task's HTTP request. Some HTTP request headers will be ignored or - * replaced. - * A partial list of headers that will be ignored or replaced is: - * * Several predefined headers, prefixed with "X-CloudTasks-", can - * be used to define properties of the task. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example,`Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. The default value is set to `"application/json"`. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * @type \Google\Cloud\Tasks\V2beta3\OAuthToken $oauth_token - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as the `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * @type \Google\Cloud\Tasks\V2beta3\OidcToken $oidc_token - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * URI override. - * When specified, overrides the execution URI for all the tasks in the queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; - * @return \Google\Cloud\Tasks\V2beta3\UriOverride|null - */ - public function getUriOverride() - { - return $this->uri_override; - } - - public function hasUriOverride() - { - return isset($this->uri_override); - } - - public function clearUriOverride() - { - unset($this->uri_override); - } - - /** - * URI override. - * When specified, overrides the execution URI for all the tasks in the queue. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride uri_override = 1; - * @param \Google\Cloud\Tasks\V2beta3\UriOverride $var - * @return $this - */ - public function setUriOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\UriOverride::class); - $this->uri_override = $var; - - return $this; - } - - /** - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; - * @return int - */ - public function getHttpMethod() - { - return $this->http_method; - } - - /** - * The HTTP method to use for the request. - * When specified, it overrides - * [HttpRequest][google.cloud.tasks.v2beta3.HttpTarget.http_method] for the - * task. Note that if the value is set to [HttpMethod][GET] the - * [HttpRequest][body] of the task will be ignored at execution time. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpMethod http_method = 2; - * @param int $var - * @return $this - */ - public function setHttpMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\HttpMethod::class); - $this->http_method = $var; - - return $this; - } - - /** - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or - * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will be configured for - * the task's HTTP request. Some HTTP request headers will be ignored or - * replaced. - * A partial list of headers that will be ignored or replaced is: - * * Several predefined headers, prefixed with "X-CloudTasks-", can - * be used to define properties of the task. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example,`Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. The default value is set to `"application/json"`. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaderOverrides() - { - return $this->header_overrides; - } - - /** - * HTTP target headers. - * This map contains the header field names and values. - * Headers will be set when running the - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] and/or - * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask]. - * These headers represent a subset of the headers that will be configured for - * the task's HTTP request. Some HTTP request headers will be ignored or - * replaced. - * A partial list of headers that will be ignored or replaced is: - * * Several predefined headers, prefixed with "X-CloudTasks-", can - * be used to define properties of the task. - * * Host: This will be computed by Cloud Tasks and derived from - * [HttpRequest.url][google.cloud.tasks.v2beta3.Target.HttpRequest.url]. - * * Content-Length: This will be computed by Cloud Tasks. - * `Content-Type` won't be set by Cloud Tasks. You can explicitly set - * `Content-Type` to a media type when the - * [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * For example,`Content-Type` can be set to `"application/octet-stream"` or - * `"application/json"`. The default value is set to `"application/json"`. - * * User-Agent: This will be set to `"Google-Cloud-Tasks"`. - * Headers which can have multiple values (according to RFC2616) can be - * specified using comma-separated values. - * The size of the headers must be less than 80KB. - * Queue-level headers to override headers of all the tasks in the queue. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride header_overrides = 3; - * @param array<\Google\Cloud\Tasks\V2beta3\HttpTarget\HeaderOverride>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaderOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta3\HttpTarget\HeaderOverride::class); - $this->header_overrides = $arr; - - return $this; - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as the `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; - * @return \Google\Cloud\Tasks\V2beta3\OAuthToken|null - */ - public function getOauthToken() - { - return $this->readOneof(5); - } - - public function hasOauthToken() - { - return $this->hasOneof(5); - } - - /** - * If specified, an - * [OAuth token](https://developers.google.com/identity/protocols/OAuth2) - * will be generated and attached as the `Authorization` header in the HTTP - * request. - * This type of authorization should generally only be used when calling - * Google APIs hosted on *.googleapis.com. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OAuthToken oauth_token = 5; - * @param \Google\Cloud\Tasks\V2beta3\OAuthToken $var - * @return $this - */ - public function setOauthToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OAuthToken::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; - * @return \Google\Cloud\Tasks\V2beta3\OidcToken|null - */ - public function getOidcToken() - { - return $this->readOneof(6); - } - - public function hasOidcToken() - { - return $this->hasOneof(6); - } - - /** - * If specified, an - * [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) - * token will be generated and attached as an `Authorization` header in the - * HTTP request. - * This type of authorization can be used for many scenarios, including - * calling Cloud Run, or endpoints where you intend to validate the token - * yourself. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.OidcToken oidc_token = 6; - * @param \Google\Cloud\Tasks\V2beta3\OidcToken $var - * @return $this - */ - public function setOidcToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\OidcToken::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthorizationHeader() - { - return $this->whichOneof("authorization_header"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php deleted file mode 100644 index ad3499f31d87..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/Header.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.tasks.v2beta3.HttpTarget.Header - */ -class Header extends \Google\Protobuf\Internal\Message -{ - /** - * The Key of the header. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The Value of the header. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The Key of the header. - * @type string $value - * The Value of the header. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * The Key of the header. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The Key of the header. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The Value of the header. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The Value of the header. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Header::class, \Google\Cloud\Tasks\V2beta3\HttpTarget_Header::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php deleted file mode 100644 index 4f9f1eea5497..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/HttpTarget/HeaderOverride.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.tasks.v2beta3.HttpTarget.HeaderOverride - */ -class HeaderOverride extends \Google\Protobuf\Internal\Message -{ - /** - * header embodying a key and a value. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; - */ - protected $header = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta3\HttpTarget\Header $header - * header embodying a key and a value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * header embodying a key and a value. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; - * @return \Google\Cloud\Tasks\V2beta3\HttpTarget\Header|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * header embodying a key and a value. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget.Header header = 1; - * @param \Google\Cloud\Tasks\V2beta3\HttpTarget\Header $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\HttpTarget\Header::class); - $this->header = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HeaderOverride::class, \Google\Cloud\Tasks\V2beta3\HttpTarget_HeaderOverride::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php deleted file mode 100644 index 4bd825aa7a6d..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesRequest.php +++ /dev/null @@ -1,310 +0,0 @@ -google.cloud.tasks.v2beta3.ListQueuesRequest - */ -class ListQueuesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while - * iterating through pages. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * @type string $filter - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * @type int $page_size - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * @type string $page_token - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while - * iterating through pages. - * @type \Google\Protobuf\FieldMask $read_mask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_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 location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_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; - } - - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * Sample filter "state: PAUSED". - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * - * 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; - } - - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. - * The maximum page size is 9800. If unspecified, the page size will - * be the maximum. Fewer queues than requested might be returned, - * even if more queues exist; use the - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * in the response to determine if more queues exist. - * - * 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 token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while - * iterating through pages. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListQueuesResponse.next_page_token] - * returned from the previous call to - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] method. It - * is an error to switch the value of the - * [filter][google.cloud.tasks.v2beta3.ListQueuesRequest.filter] while - * iterating through pages. - * - * 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; - } - - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getReadMask() - { - return $this->read_mask; - } - - public function hasReadMask() - { - return isset($this->read_mask); - } - - public function clearReadMask() - { - unset($this->read_mask); - } - - /** - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * - * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setReadMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->read_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php deleted file mode 100644 index cf56f8b14ac2..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListQueuesResponse.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.tasks.v2beta3.ListQueuesResponse - */ -class ListQueuesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Queue queues = 1; - */ - private $queues; - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Tasks\V2beta3\Queue>|\Google\Protobuf\Internal\RepeatedField $queues - * The list of queues. - * @type string $next_page_token - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Queue queues = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQueues() - { - return $this->queues; - } - - /** - * The list of queues. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Queue queues = 1; - * @param array<\Google\Cloud\Tasks\V2beta3\Queue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQueues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta3\Queue::class); - $this->queues = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * 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. - * To return the next page of results, call - * [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListQueuesRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * The page token is valid for only 2 hours. - * - * 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php deleted file mode 100644 index c3e901881b52..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.tasks.v2beta3.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - */ - protected $response_view = 0; - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * @type int $page_size - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * @type string $page_token - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); - $this->response_view = $var; - - return $this; - } - - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum page size. - * Fewer tasks than requested might be returned, even if more tasks exist; use - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * in the response to determine if more tasks exist. - * The maximum page size is 1000. If unspecified, the page size will be the - * maximum. - * - * 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 token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. - * To request the first page results, page_token must be empty. To - * request the next page of results, page_token must be the value of - * [next_page_token][google.cloud.tasks.v2beta3.ListTasksResponse.next_page_token] - * returned from the previous call to - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] method. - * The page token is valid for only 2 hours. - * - * 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php deleted file mode 100644 index f304ef62c9fa..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ListTasksResponse.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.tasks.v2beta3.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Task tasks = 1; - */ - private $tasks; - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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 array<\Google\Cloud\Tasks\V2beta3\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The list of tasks. - * @type string $next_page_token - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. - * If the next_page_token is empty, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The list of tasks. - * - * Generated from protobuf field repeated .google.cloud.tasks.v2beta3.Task tasks = 1; - * @param array<\Google\Cloud\Tasks\V2beta3\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tasks\V2beta3\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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 token to retrieve next page of results. - * To return the next page of results, call - * [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks] with this - * value as the - * [page_token][google.cloud.tasks.v2beta3.ListTasksRequest.page_token]. - * If the next_page_token is empty, 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php deleted file mode 100644 index 792276e9814c..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OAuthToken.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.tasks.v2beta3.OAuthToken - */ -class OAuthToken extends \Google\Protobuf\Internal\Message -{ - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - */ - protected $service_account_email = ''; - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - */ - protected $scope = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_email - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * @type string $scope - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OAuth token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * OAuth scope to be used for generating OAuth access token. - * If not specified, "https://www.googleapis.com/auth/cloud-platform" - * will be used. - * - * Generated from protobuf field string scope = 2; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php deleted file mode 100644 index 3a02f601f855..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/OidcToken.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.tasks.v2beta3.OidcToken - */ -class OidcToken extends \Google\Protobuf\Internal\Message -{ - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - */ - protected $service_account_email = ''; - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - */ - protected $audience = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_account_email - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * @type string $audience - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @return string - */ - public function getServiceAccountEmail() - { - return $this->service_account_email; - } - - /** - * [Service account email](https://cloud.google.com/iam/docs/service-accounts) - * to be used for generating OIDC token. - * The service account must be within the same project as the queue. The - * caller must have iam.serviceAccounts.actAs permission for the service - * account. - * - * Generated from protobuf field string service_account_email = 1; - * @param string $var - * @return $this - */ - public function setServiceAccountEmail($var) - { - GPBUtil::checkString($var, True); - $this->service_account_email = $var; - - return $this; - } - - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Audience to be used when generating OIDC token. If not specified, the URI - * specified in target will be used. - * - * Generated from protobuf field string audience = 2; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php deleted file mode 100644 index 152a9f931481..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PathOverride.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.tasks.v2beta3.PathOverride - */ -class PathOverride extends \Google\Protobuf\Internal\Message -{ - /** - * The URI path (e.g., /users/1234). Default is an empty string. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * The URI path (e.g., /users/1234). Default is an empty string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * The URI path (e.g., /users/1234). Default is an empty string. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * The URI path (e.g., /users/1234). Default is an empty string. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php deleted file mode 100644 index 574132cc393e..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PauseQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta3.PauseQueueRequest - */ -class PauseQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php deleted file mode 100644 index b6d4df5107a3..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PullMessage.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.tasks.v2beta3.PullMessage - */ -class PullMessage extends \Google\Protobuf\Internal\Message -{ - /** - * A data payload consumed by the worker to execute the task. - * - * Generated from protobuf field bytes payload = 1; - */ - protected $payload = ''; - /** - * The tasks's tag. - * The tag is less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * - * Generated from protobuf field string tag = 2; - */ - protected $tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $payload - * A data payload consumed by the worker to execute the task. - * @type string $tag - * The tasks's tag. - * The tag is less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * A data payload consumed by the worker to execute the task. - * - * Generated from protobuf field bytes payload = 1; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * A data payload consumed by the worker to execute the task. - * - * Generated from protobuf field bytes payload = 1; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - - /** - * The tasks's tag. - * The tag is less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * - * Generated from protobuf field string tag = 2; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * The tasks's tag. - * The tag is less than 500 characters. - * SDK compatibility: Although the SDK allows tags to be either - * string or - * [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), - * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 - * encoded, the tag will be empty when the task is returned by Cloud Tasks. - * - * Generated from protobuf field string tag = 2; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php deleted file mode 100644 index 6ab84bcbdaa0..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/PurgeQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta3.PurgeQueueRequest - */ -class PurgeQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php deleted file mode 100644 index 7614b5722bbb..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueryOverride.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta3.QueryOverride - */ -class QueryOverride extends \Google\Protobuf\Internal\Message -{ - /** - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * - * Generated from protobuf field string query_params = 1; - */ - protected $query_params = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_params - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * - * Generated from protobuf field string query_params = 1; - * @return string - */ - public function getQueryParams() - { - return $this->query_params; - } - - /** - * The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty - * string. - * - * Generated from protobuf field string query_params = 1; - * @param string $var - * @return $this - */ - public function setQueryParams($var) - { - GPBUtil::checkString($var, True); - $this->query_params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php deleted file mode 100644 index f670e0985645..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue.php +++ /dev/null @@ -1,883 +0,0 @@ -google.cloud.tasks.v2beta3.Queue - */ -class Queue extends \Google\Protobuf\Internal\Message -{ - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Modifies HTTP target for HTTP tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; - */ - protected $http_target = null; - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; - */ - protected $rate_limits = null; - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; - */ - protected $retry_config = null; - /** - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.State state = 6; - */ - protected $state = 0; - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 7; - */ - protected $purge_time = null; - /** - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * - * Generated from protobuf field .google.protobuf.Duration task_ttl = 8; - */ - protected $task_ttl = null; - /** - * The task tombstone time to live (TTL). - * After a task is deleted or executed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 9; - */ - protected $tombstone_ttl = null; - /** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriver_logging_config = 10; - */ - protected $stackdriver_logging_config = null; - /** - * Immutable. The type of a queue (push or pull). - * `Queue.type` is an immutable property of the queue that is set at the queue - * creation time. When left unspecified, the default value of `PUSH` is - * selected. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stats = null; - protected $queue_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * @type \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue $app_engine_http_queue - * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] - * settings apply only to [App Engine - * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. - * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by - * this proto. - * @type \Google\Cloud\Tasks\V2beta3\HttpTarget $http_target - * Modifies HTTP target for HTTP tasks. - * @type \Google\Cloud\Tasks\V2beta3\RateLimits $rate_limits - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * @type \Google\Cloud\Tasks\V2beta3\RetryConfig $retry_config - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * @type int $state - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * @type \Google\Protobuf\Duration $task_ttl - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * @type \Google\Protobuf\Duration $tombstone_ttl - * The task tombstone time to live (TTL). - * After a task is deleted or executed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * @type \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig $stackdriver_logging_config - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * @type int $type - * Immutable. The type of a queue (push or pull). - * `Queue.type` is an immutable property of the queue that is set at the queue - * creation time. When left unspecified, the default value of `PUSH` is - * selected. - * @type \Google\Cloud\Tasks\V2beta3\QueueStats $stats - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Caller-specified and required in - * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after - * which it becomes output only. - * The queue name. - * The queue name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the queue's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * - * 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; - } - - /** - * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] - * settings apply only to [App Engine - * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. - * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by - * this proto. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; - * @return \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue|null - */ - public function getAppEngineHttpQueue() - { - return $this->readOneof(3); - } - - public function hasAppEngineHttpQueue() - { - return $this->hasOneof(3); - } - - /** - * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] - * settings apply only to [App Engine - * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. - * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by - * this proto. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3; - * @param \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue $var - * @return $this - */ - public function setAppEngineHttpQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineHttpQueue::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Modifies HTTP target for HTTP tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; - * @return \Google\Cloud\Tasks\V2beta3\HttpTarget|null - */ - public function getHttpTarget() - { - return $this->http_target; - } - - public function hasHttpTarget() - { - return isset($this->http_target); - } - - public function clearHttpTarget() - { - unset($this->http_target); - } - - /** - * Modifies HTTP target for HTTP tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpTarget http_target = 13; - * @param \Google\Cloud\Tasks\V2beta3\HttpTarget $var - * @return $this - */ - public function setHttpTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\HttpTarget::class); - $this->http_target = $var; - - return $this; - } - - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; - * @return \Google\Cloud\Tasks\V2beta3\RateLimits|null - */ - public function getRateLimits() - { - return $this->rate_limits; - } - - public function hasRateLimits() - { - return isset($this->rate_limits); - } - - public function clearRateLimits() - { - unset($this->rate_limits); - } - - /** - * Rate limits for task dispatches. - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related - * because they both control task attempts. However they control task attempts - * in different ways: - * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the - * total rate of - * dispatches from a queue (i.e. all traffic dispatched from the - * queue, regardless of whether the dispatch is from a first - * attempt or a retry). - * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * what happens to - * particular a task after its first attempt fails. That is, - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls - * task retries (the second attempt, third attempt, etc). - * The queue's actual dispatch rate is the result of: - * * Number of tasks in the queue - * * User-specified throttling: - * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits], - * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config], and the - * [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - * * System throttling due to `429` (Too Many Requests) or `503` (Service - * Unavailable) responses from the worker, high error rates, or to smooth - * sudden large traffic spikes. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.RateLimits rate_limits = 4; - * @param \Google\Cloud\Tasks\V2beta3\RateLimits $var - * @return $this - */ - public function setRateLimits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\RateLimits::class); - $this->rate_limits = $var; - - return $this; - } - - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; - * @return \Google\Cloud\Tasks\V2beta3\RetryConfig|null - */ - public function getRetryConfig() - { - return $this->retry_config; - } - - public function hasRetryConfig() - { - return isset($this->retry_config); - } - - public function clearRetryConfig() - { - unset($this->retry_config); - } - - /** - * Settings that determine the retry behavior. - * * For tasks created using Cloud Tasks: the queue-level retry settings - * apply to all tasks in the queue that were created using Cloud Tasks. - * Retry settings cannot be set on individual tasks. - * * For tasks created using the App Engine SDK: the queue-level retry - * settings apply to all tasks in the queue which do not have retry settings - * explicitly set on the task and were created by the App Engine SDK. See - * [App Engine - * documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks). - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.RetryConfig retry_config = 5; - * @param \Google\Cloud\Tasks\V2beta3\RetryConfig $var - * @return $this - */ - public function setRetryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\RetryConfig::class); - $this->retry_config = $var; - - return $this; - } - - /** - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.State state = 6; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the queue. - * `state` can only be changed by called - * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue], - * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or - * uploading - * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref). - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be - * used to change `state`. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.State state = 6; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Queue\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The last time this queue was purged. - * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] - * before this time were purged. - * A queue can be purged using - * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App - * Engine Task Queue SDK, or the Cloud - * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). - * Purge time will be truncated to the nearest microsecond. Purge - * time will be unset if the queue has never been purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - - /** - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * - * Generated from protobuf field .google.protobuf.Duration task_ttl = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getTaskTtl() - { - return $this->task_ttl; - } - - public function hasTaskTtl() - { - return isset($this->task_ttl); - } - - public function clearTaskTtl() - { - unset($this->task_ttl); - } - - /** - * The maximum amount of time that a task will be retained in - * this queue. - * Queues created by Cloud Tasks have a default `task_ttl` of 31 days. - * After a task has lived for `task_ttl`, the task will be deleted - * regardless of whether it was dispatched or not. - * The `task_ttl` for queues created via queue.yaml/xml is equal to the - * maximum duration because there is a - * [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for - * these queues. To view the maximum valid duration, see the documentation for - * [Duration][google.protobuf.Duration]. - * - * Generated from protobuf field .google.protobuf.Duration task_ttl = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTaskTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->task_ttl = $var; - - return $this; - } - - /** - * The task tombstone time to live (TTL). - * After a task is deleted or executed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getTombstoneTtl() - { - return $this->tombstone_ttl; - } - - public function hasTombstoneTtl() - { - return isset($this->tombstone_ttl); - } - - public function clearTombstoneTtl() - { - unset($this->tombstone_ttl); - } - - /** - * The task tombstone time to live (TTL). - * After a task is deleted or executed, the task's tombstone is - * retained for the length of time specified by `tombstone_ttl`. - * The tombstone is used by task de-duplication; another task with the same - * name can't be created until the tombstone has expired. For more information - * about task de-duplication, see the documentation for - * [CreateTaskRequest][google.cloud.tasks.v2beta3.CreateTaskRequest.task]. - * Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration tombstone_ttl = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTombstoneTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->tombstone_ttl = $var; - - return $this; - } - - /** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriver_logging_config = 10; - * @return \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig|null - */ - public function getStackdriverLoggingConfig() - { - return $this->stackdriver_logging_config; - } - - public function hasStackdriverLoggingConfig() - { - return isset($this->stackdriver_logging_config); - } - - public function clearStackdriverLoggingConfig() - { - unset($this->stackdriver_logging_config); - } - - /** - * Configuration options for writing logs to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this - * field is unset, then no logs are written. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.StackdriverLoggingConfig stackdriver_logging_config = 10; - * @param \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig $var - * @return $this - */ - public function setStackdriverLoggingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\StackdriverLoggingConfig::class); - $this->stackdriver_logging_config = $var; - - return $this; - } - - /** - * Immutable. The type of a queue (push or pull). - * `Queue.type` is an immutable property of the queue that is set at the queue - * creation time. When left unspecified, the default value of `PUSH` is - * selected. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Immutable. The type of a queue (push or pull). - * `Queue.type` is an immutable property of the queue that is set at the queue - * creation time. When left unspecified, the default value of `PUSH` is - * selected. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue.Type type = 11 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Queue\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Tasks\V2beta3\QueueStats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Output only. The realtime, informational statistics for a queue. In order - * to receive the statistics the caller should include this field in the - * FieldMask. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.QueueStats stats = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Tasks\V2beta3\QueueStats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\QueueStats::class); - $this->stats = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueueType() - { - return $this->whichOneof("queue_type"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php deleted file mode 100644 index 74d486e2a300..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/State.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.tasks.v2beta3.Queue.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The queue is running. Tasks can be dispatched. - * If the queue was created using Cloud Tasks and the queue has - * had no activity (method calls or task dispatches) for 30 days, - * the queue may take a few minutes to re-activate. Some method - * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and - * tasks may not be dispatched for a few minutes until the queue - * has been re-activated. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * Tasks are paused by the user. If the queue is paused then Cloud - * Tasks will stop delivering tasks from it, but more tasks can - * still be added to it by the user. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * The queue is disabled. - * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) - * or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) - * is uploaded which does not contain the queue. You cannot directly disable - * a queue. - * When a queue is disabled, tasks can still be added to a queue - * but the tasks are not dispatched. - * To permanently delete this queue and all of its tasks, call - * [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. - * - * Generated from protobuf enum DISABLED = 3; - */ - const DISABLED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Tasks\V2beta3\Queue_State::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php deleted file mode 100644 index 289c58b4f926..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Queue/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.tasks.v2beta3.Queue.Type - */ -class Type -{ - /** - * Default value. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A pull queue. - * - * Generated from protobuf enum PULL = 1; - */ - const PULL = 1; - /** - * A push queue. - * - * Generated from protobuf enum PUSH = 2; - */ - const PUSH = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PULL => 'PULL', - self::PUSH => 'PUSH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Tasks\V2beta3\Queue_Type::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php deleted file mode 100644 index a02919639558..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/QueueStats.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.tasks.v2beta3.QueueStats - */ -class QueueStats extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * - * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tasks_count = 0; - /** - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * - * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $oldest_estimated_arrival_time = null; - /** - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * - * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $executed_last_minute_count = 0; - /** - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * - * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $concurrent_dispatches_count = 0; - /** - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * - * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_execution_rate = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $tasks_count - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * @type \Google\Protobuf\Timestamp $oldest_estimated_arrival_time - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * @type int|string $executed_last_minute_count - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * @type int|string $concurrent_dispatches_count - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * @type float $effective_execution_rate - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * - * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTasksCount() - { - return $this->tasks_count; - } - - /** - * Output only. An estimation of the number of tasks in the queue, that is, - * the tasks in the queue that haven't been executed, the tasks in the queue - * which the queue has dispatched but has not yet received a reply for, and - * the failed tasks that the queue is retrying. - * - * Generated from protobuf field int64 tasks_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTasksCount($var) - { - GPBUtil::checkInt64($var); - $this->tasks_count = $var; - - return $this; - } - - /** - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * - * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getOldestEstimatedArrivalTime() - { - return $this->oldest_estimated_arrival_time; - } - - public function hasOldestEstimatedArrivalTime() - { - return isset($this->oldest_estimated_arrival_time); - } - - public function clearOldestEstimatedArrivalTime() - { - unset($this->oldest_estimated_arrival_time); - } - - /** - * Output only. An estimation of the nearest time in the future where a task - * in the queue is scheduled to be executed. - * - * Generated from protobuf field .google.protobuf.Timestamp oldest_estimated_arrival_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setOldestEstimatedArrivalTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->oldest_estimated_arrival_time = $var; - - return $this; - } - - /** - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * - * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getExecutedLastMinuteCount() - { - return $this->executed_last_minute_count; - } - - /** - * Output only. The number of tasks that the queue has dispatched and received - * a reply for during the last minute. This variable counts both successful - * and non-successful executions. - * - * Generated from protobuf field int64 executed_last_minute_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setExecutedLastMinuteCount($var) - { - GPBUtil::checkInt64($var); - $this->executed_last_minute_count = $var; - - return $this; - } - - /** - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * - * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getConcurrentDispatchesCount() - { - return $this->concurrent_dispatches_count; - } - - /** - * Output only. The number of requests that the queue has dispatched but has - * not received a reply for yet. - * - * Generated from protobuf field int64 concurrent_dispatches_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setConcurrentDispatchesCount($var) - { - GPBUtil::checkInt64($var); - $this->concurrent_dispatches_count = $var; - - return $this; - } - - /** - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * - * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getEffectiveExecutionRate() - { - return $this->effective_execution_rate; - } - - /** - * Output only. The current maximum number of tasks per second executed by the - * queue. The maximum value of this variable is controlled by the RateLimits - * of the Queue. However, this value could be less to avoid overloading the - * endpoints tasks in the queue are targeting. - * - * Generated from protobuf field double effective_execution_rate = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setEffectiveExecutionRate($var) - { - GPBUtil::checkDouble($var); - $this->effective_execution_rate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php deleted file mode 100644 index 9e87d52e942a..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RateLimits.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.tasks.v2beta3.RateLimits - */ -class RateLimits extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], - * the maximum allowed value - * is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_dispatches_per_second = 1; - */ - protected $max_dispatches_per_second = 0.0; - /** - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is - * updating - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * - * Generated from protobuf field int32 max_burst_size = 2; - */ - protected $max_burst_size = 0; - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_dispatches = 3; - */ - protected $max_concurrent_dispatches = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $max_dispatches_per_second - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], - * the maximum allowed value - * is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * @type int $max_burst_size - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is - * updating - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * @type int $max_concurrent_dispatches - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); - parent::__construct($data); - } - - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], - * the maximum allowed value - * is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_dispatches_per_second = 1; - * @return float - */ - public function getMaxDispatchesPerSecond() - { - return $this->max_dispatches_per_second; - } - - /** - * The maximum rate at which tasks are dispatched from this queue. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], - * the maximum allowed value - * is 500. - * This field has the same meaning as - * [rate in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate). - * - * Generated from protobuf field double max_dispatches_per_second = 1; - * @param float $var - * @return $this - */ - public function setMaxDispatchesPerSecond($var) - { - GPBUtil::checkDouble($var); - $this->max_dispatches_per_second = $var; - - return $this; - } - - /** - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is - * updating - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * - * Generated from protobuf field int32 max_burst_size = 2; - * @return int - */ - public function getMaxBurstSize() - { - return $this->max_burst_size; - } - - /** - * The max burst size. - * Max burst size limits how fast tasks in queue are processed when - * many tasks are in the queue and the rate is high. This field - * allows the queue to have a high rate so processing starts shortly - * after a task is enqueued, but still limits resource usage when - * many tasks are enqueued in a short period of time. - * The [token bucket](https://wikipedia.org/wiki/Token_Bucket) - * algorithm is used to control the rate of task dispatches. Each - * queue has a token bucket that holds tokens, up to the maximum - * specified by `max_burst_size`. Each time a task is dispatched, a - * token is removed from the bucket. Tasks will be dispatched until - * the queue's bucket runs out of tokens. The bucket will be - * continuously refilled with new tokens based on - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The default value of `max_burst_size` is picked by Cloud Tasks - * based on the value of - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * The maximum value of `max_burst_size` is 500. - * For App Engine queues that were created or updated using - * `queue.yaml/xml`, `max_burst_size` is equal to - * [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size). - * If - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called - * on a queue without explicitly setting a value for `max_burst_size`, - * `max_burst_size` value will get updated if - * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is - * updating - * [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]. - * - * Generated from protobuf field int32 max_burst_size = 2; - * @param int $var - * @return $this - */ - public function setMaxBurstSize($var) - { - GPBUtil::checkInt32($var); - $this->max_burst_size = $var; - - return $this; - } - - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_dispatches = 3; - * @return int - */ - public function getMaxConcurrentDispatches() - { - return $this->max_concurrent_dispatches; - } - - /** - * The maximum number of concurrent tasks that Cloud Tasks allows - * to be dispatched for this queue. After this threshold has been - * reached, Cloud Tasks stops dispatching tasks until the number of - * concurrent requests decreases. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * The maximum allowed value is 5,000. - * This field has the same meaning as - * [max_concurrent_requests in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests). - * - * Generated from protobuf field int32 max_concurrent_dispatches = 3; - * @param int $var - * @return $this - */ - public function setMaxConcurrentDispatches($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_dispatches = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php deleted file mode 100644 index c1b61275d139..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/ResumeQueueRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.tasks.v2beta3.ResumeQueueRequest - */ -class ResumeQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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 queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php deleted file mode 100644 index 39fa65ea3b58..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RetryConfig.php +++ /dev/null @@ -1,502 +0,0 @@ -google.cloud.tasks.v2beta3.RetryConfig - */ -class RetryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_attempts = 1; - */ - protected $max_attempts = 0; - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; - */ - protected $max_retry_duration = null; - /** - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; - */ - protected $min_backoff = null; - /** - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; - */ - protected $max_backoff = null; - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 5; - */ - protected $max_doublings = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_attempts - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $max_retry_duration - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $min_backoff - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type \Google\Protobuf\Duration $max_backoff - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * @type int $max_doublings - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_attempts = 1; - * @return int - */ - public function getMaxAttempts() - { - return $this->max_attempts; - } - - /** - * Number of attempts per task. - * Cloud Tasks will attempt the task `max_attempts` times (that is, if the - * first attempt fails, then there will be `max_attempts - 1` retries). Must - * be >= -1. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * -1 indicates unlimited attempts. - * This field has the same meaning as - * [task_retry_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_attempts = 1; - * @param int $var - * @return $this - */ - public function setMaxAttempts($var) - { - GPBUtil::checkInt32($var); - $this->max_attempts = $var; - - return $this; - } - - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxRetryDuration() - { - return $this->max_retry_duration; - } - - public function hasMaxRetryDuration() - { - return isset($this->max_retry_duration); - } - - public function clearMaxRetryDuration() - { - unset($this->max_retry_duration); - } - - /** - * If positive, `max_retry_duration` specifies the time limit for - * retrying a failed task, measured from when the task was first - * attempted. Once `max_retry_duration` time has passed *and* the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times, - * no further attempts will be made and the task will be deleted. - * If zero, then the task age is unlimited. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_retry_duration` will be truncated to the nearest second. - * This field has the same meaning as - * [task_age_limit in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_retry_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxRetryDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_retry_duration = $var; - - return $this; - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBackoff() - { - return $this->min_backoff; - } - - public function hasMinBackoff() - { - return isset($this->min_backoff); - } - - public function clearMinBackoff() - { - unset($this->min_backoff); - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `min_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [min_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration min_backoff = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBackoff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_backoff = $var; - - return $this; - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxBackoff() - { - return $this->max_backoff; - } - - public function hasMaxBackoff() - { - return isset($this->max_backoff); - } - - public function clearMaxBackoff() - { - unset($this->max_backoff); - } - - /** - * A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] - * for retry between - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration - * after it fails, if the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the - * task should be retried. - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * `max_backoff` will be truncated to the nearest second. - * This field has the same meaning as - * [max_backoff_seconds in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field .google.protobuf.Duration max_backoff = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxBackoff($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_backoff = $var; - - return $this; - } - - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 5; - * @return int - */ - public function getMaxDoublings() - { - return $this->max_doublings; - } - - /** - * The time between retries will double `max_doublings` times. - * A task's retry interval starts at - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then - * doubles `max_doublings` times, then increases linearly, and finally retries - * at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * For example, if - * [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s, - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, - * and `max_doublings` is 3, then the a task will first be retried in 10s. The - * retry interval will double three times, and then increase linearly by 2^3 * - * 10s. Finally, the task will retry at intervals of - * [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the - * task has been attempted - * [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times. - * Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, - * 300s, .... - * If unspecified when the queue is created, Cloud Tasks will pick the - * default. - * This field has the same meaning as - * [max_doublings in - * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * - * Generated from protobuf field int32 max_doublings = 5; - * @param int $var - * @return $this - */ - public function setMaxDoublings($var) - { - GPBUtil::checkInt32($var); - $this->max_doublings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php deleted file mode 100644 index 01e52b93e151..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/RunTaskRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.tasks.v2beta3.RunTaskRequest - */ -class RunTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - */ - protected $response_view = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @type int $response_view - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_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 response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - * @return int - */ - public function getResponseView() - { - return $this->response_view; - } - - /** - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View response_view = 2; - * @param int $var - * @return $this - */ - public function setResponseView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); - $this->response_view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php deleted file mode 100644 index 77ae9bd3407e..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/StackdriverLoggingConfig.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.tasks.v2beta3.StackdriverLoggingConfig - */ -class StackdriverLoggingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * Generated from protobuf field double sampling_ratio = 1; - */ - protected $sampling_ratio = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $sampling_ratio - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Queue::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * Generated from protobuf field double sampling_ratio = 1; - * @return float - */ - public function getSamplingRatio() - { - return $this->sampling_ratio; - } - - /** - * Specifies the fraction of operations to write to - * [Stackdriver Logging](https://cloud.google.com/logging/docs/). - * This field may contain any value between 0.0 and 1.0, inclusive. - * 0.0 is the default and means that no operations are logged. - * - * Generated from protobuf field double sampling_ratio = 1; - * @param float $var - * @return $this - */ - public function setSamplingRatio($var) - { - GPBUtil::checkDouble($var); - $this->sampling_ratio = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php deleted file mode 100644 index 5663cef6459a..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task.php +++ /dev/null @@ -1,746 +0,0 @@ -google.cloud.tasks.v2beta3.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; - */ - protected $schedule_time = null; - /** - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is - * 10 minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], - * 0 indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 12; - */ - protected $dispatch_deadline = null; - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 dispatch_count = 6; - */ - protected $dispatch_count = 0; - /** - * Output only. The number of attempts which have received a response. - * - * Generated from protobuf field int32 response_count = 7; - */ - protected $response_count = 0; - /** - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will - * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information - * is not retained by Cloud Tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt first_attempt = 8; - */ - protected $first_attempt = null; - /** - * Output only. The status of the task's last attempt. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt last_attempt = 9; - */ - protected $last_attempt = null; - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View view = 10; - */ - protected $view = 0; - protected $payload_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * @type \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest $app_engine_http_request - * HTTP request that is sent to the App Engine app handler. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] - * set. - * @type \Google\Cloud\Tasks\V2beta3\HttpRequest $http_request - * HTTP request that is sent to the task's target. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. - * @type \Google\Cloud\Tasks\V2beta3\PullMessage $pull_message - * Pull Message contained in a task in a - * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload - * type cannot be explicitly set through Cloud Tasks API. Its purpose, - * currently is to provide backward compatibility with App Engine Task Queue - * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) - * queues to provide a way to inspect contents of pull tasks through the - * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. - * @type \Google\Protobuf\Timestamp $schedule_time - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * @type \Google\Protobuf\Duration $dispatch_deadline - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is - * 10 minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], - * 0 indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * @type int $dispatch_count - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * @type int $response_count - * Output only. The number of attempts which have received a response. - * @type \Google\Cloud\Tasks\V2beta3\Attempt $first_attempt - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will - * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information - * is not retained by Cloud Tasks. - * @type \Google\Cloud\Tasks\V2beta3\Attempt $last_attempt - * Output only. The status of the task's last attempt. - * @type int $view - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] has been returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Task::initOnce(); - parent::__construct($data); - } - - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Optionally caller-specified in - * [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - * The task name. - * The task name must have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), colons (:), or periods (.). - * For more information, see - * [Identifying - * projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) - * * `LOCATION_ID` is the canonical ID for the task's location. - * The list of available locations can be obtained by calling - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * For more information, see https://cloud.google.com/about/locations/. - * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or - * hyphens (-). The maximum length is 100 characters. - * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), - * hyphens (-), or underscores (_). The maximum length is 500 characters. - * - * 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; - } - - /** - * HTTP request that is sent to the App Engine app handler. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] - * set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3; - * @return \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest|null - */ - public function getAppEngineHttpRequest() - { - return $this->readOneof(3); - } - - public function hasAppEngineHttpRequest() - { - return $this->hasOneof(3); - } - - /** - * HTTP request that is sent to the App Engine app handler. - * An App Engine task is a task that has - * [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] - * set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.AppEngineHttpRequest app_engine_http_request = 3; - * @param \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest $var - * @return $this - */ - public function setAppEngineHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\AppEngineHttpRequest::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * HTTP request that is sent to the task's target. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; - * @return \Google\Cloud\Tasks\V2beta3\HttpRequest|null - */ - public function getHttpRequest() - { - return $this->readOneof(11); - } - - public function hasHttpRequest() - { - return $this->hasOneof(11); - } - - /** - * HTTP request that is sent to the task's target. - * An HTTP task is a task that has - * [HttpRequest][google.cloud.tasks.v2beta3.HttpRequest] set. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.HttpRequest http_request = 11; - * @param \Google\Cloud\Tasks\V2beta3\HttpRequest $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\HttpRequest::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Pull Message contained in a task in a - * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload - * type cannot be explicitly set through Cloud Tasks API. Its purpose, - * currently is to provide backward compatibility with App Engine Task Queue - * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) - * queues to provide a way to inspect contents of pull tasks through the - * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; - * @return \Google\Cloud\Tasks\V2beta3\PullMessage|null - */ - public function getPullMessage() - { - return $this->readOneof(13); - } - - public function hasPullMessage() - { - return $this->hasOneof(13); - } - - /** - * Pull Message contained in a task in a - * [PULL][google.cloud.tasks.v2beta3.Queue.type] queue type. This payload - * type cannot be explicitly set through Cloud Tasks API. Its purpose, - * currently is to provide backward compatibility with App Engine Task Queue - * [pull](https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/) - * queues to provide a way to inspect contents of pull tasks through the - * [CloudTasks.GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.PullMessage pull_message = 13; - * @param \Google\Cloud\Tasks\V2beta3\PullMessage $var - * @return $this - */ - public function setPullMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\PullMessage::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * The time when the task is scheduled to be attempted. - * For App Engine queues, this is when the task will be attempted or retried. - * `schedule_time` will be truncated to the nearest microsecond. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - - /** - * Output only. The time that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @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 that the task was created. - * `create_time` will be truncated to the nearest second. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @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 deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is - * 10 minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], - * 0 indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 12; - * @return \Google\Protobuf\Duration|null - */ - public function getDispatchDeadline() - { - return $this->dispatch_deadline; - } - - public function hasDispatchDeadline() - { - return isset($this->dispatch_deadline); - } - - public function clearDispatchDeadline() - { - unset($this->dispatch_deadline); - } - - /** - * The deadline for requests sent to the worker. If the worker does not - * respond by this deadline then the request is cancelled and the attempt - * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the - * task according to the - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. - * Note that when the request is cancelled, Cloud Tasks will stop listening - * for the response, but whether the worker stops processing depends on the - * worker. For example, if the worker is stuck, it may not react to cancelled - * requests. - * The default and maximum values depend on the type of request: - * * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is - * 10 minutes. The deadline - * must be in the interval [15 seconds, 30 minutes]. - * * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], - * 0 indicates that the - * request has the default deadline. The default deadline depends on the - * [scaling - * type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) - * of the service: 10 minutes for standard apps with automatic scaling, 24 - * hours for standard apps with manual and basic scaling, and 60 minutes for - * flex apps. If the request deadline is set, it must be in the interval [15 - * seconds, 24 hours 15 seconds]. Regardless of the task's - * `dispatch_deadline`, the app handler will not run for longer than than - * the service's timeout. We recommend setting the `dispatch_deadline` to - * at most a few seconds more than the app handler's timeout. For more - * information see - * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). - * `dispatch_deadline` will be truncated to the nearest millisecond. The - * deadline is an approximate deadline. - * - * Generated from protobuf field .google.protobuf.Duration dispatch_deadline = 12; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDispatchDeadline($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->dispatch_deadline = $var; - - return $this; - } - - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 dispatch_count = 6; - * @return int - */ - public function getDispatchCount() - { - return $this->dispatch_count; - } - - /** - * Output only. The number of attempts dispatched. - * This count includes attempts which have been dispatched but haven't - * received a response. - * - * Generated from protobuf field int32 dispatch_count = 6; - * @param int $var - * @return $this - */ - public function setDispatchCount($var) - { - GPBUtil::checkInt32($var); - $this->dispatch_count = $var; - - return $this; - } - - /** - * Output only. The number of attempts which have received a response. - * - * Generated from protobuf field int32 response_count = 7; - * @return int - */ - public function getResponseCount() - { - return $this->response_count; - } - - /** - * Output only. The number of attempts which have received a response. - * - * Generated from protobuf field int32 response_count = 7; - * @param int $var - * @return $this - */ - public function setResponseCount($var) - { - GPBUtil::checkInt32($var); - $this->response_count = $var; - - return $this; - } - - /** - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will - * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information - * is not retained by Cloud Tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt first_attempt = 8; - * @return \Google\Cloud\Tasks\V2beta3\Attempt|null - */ - public function getFirstAttempt() - { - return $this->first_attempt; - } - - public function hasFirstAttempt() - { - return isset($this->first_attempt); - } - - public function clearFirstAttempt() - { - unset($this->first_attempt); - } - - /** - * Output only. The status of the task's first attempt. - * Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will - * be set. The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information - * is not retained by Cloud Tasks. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt first_attempt = 8; - * @param \Google\Cloud\Tasks\V2beta3\Attempt $var - * @return $this - */ - public function setFirstAttempt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Attempt::class); - $this->first_attempt = $var; - - return $this; - } - - /** - * Output only. The status of the task's last attempt. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt last_attempt = 9; - * @return \Google\Cloud\Tasks\V2beta3\Attempt|null - */ - public function getLastAttempt() - { - return $this->last_attempt; - } - - public function hasLastAttempt() - { - return isset($this->last_attempt); - } - - public function clearLastAttempt() - { - unset($this->last_attempt); - } - - /** - * Output only. The status of the task's last attempt. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Attempt last_attempt = 9; - * @param \Google\Cloud\Tasks\V2beta3\Attempt $var - * @return $this - */ - public function setLastAttempt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Attempt::class); - $this->last_attempt = $var; - - return $this; - } - - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View view = 10; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Output only. The view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] has been returned. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Task.View view = 10; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\Task\View::class); - $this->view = $var; - - return $this; - } - - /** - * @return string - */ - public function getPayloadType() - { - return $this->whichOneof("payload_type"); - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php deleted file mode 100644 index 7c45c3bd5ac8..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/Task/View.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.tasks.v2beta3.Task.View - */ -class View -{ - /** - * Unspecified. Defaults to BASIC. - * - * Generated from protobuf enum VIEW_UNSPECIFIED = 0; - */ - const VIEW_UNSPECIFIED = 0; - /** - * The basic view omits fields which can be large or can contain - * sensitive data. - * This view does not include the - * [body in - * AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body]. - * Bodies are desirable to return only when needed, because they - * can be large and because of the sensitivity of the data that you - * choose to store in it. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * All information is returned. - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Queue][google.cloud.tasks.v2beta3.Queue] resource. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(View::class, \Google\Cloud\Tasks\V2beta3\Task_View::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php deleted file mode 100644 index 8fa7fdcb2fdd..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UpdateQueueRequest.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.tasks.v2beta3.UpdateQueueRequest - */ -class UpdateQueueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be - * changed. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $queue = null; - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tasks\V2beta3\Queue $queue - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be - * changed. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce(); - parent::__construct($data); - } - - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be - * changed. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tasks\V2beta3\Queue|null - */ - public function getQueue() - { - return $this->queue; - } - - public function hasQueue() - { - return isset($this->queue); - } - - public function clearQueue() - { - unset($this->queue); - } - - /** - * Required. The queue to create or update. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be - * specified. - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be - * changed. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.Queue queue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tasks\V2beta3\Queue $var - * @return $this - */ - public function setQueue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Queue::class); - $this->queue = $var; - - return $this; - } - - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will 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); - } - - /** - * A mask used to specify which fields of the queue are being updated. - * If empty, then all fields will 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/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php deleted file mode 100644 index 99ef21814b14..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.tasks.v2beta3.UriOverride - */ -class UriOverride extends \Google\Protobuf\Internal\Message -{ - /** - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * - * Generated from protobuf field optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; - */ - protected $scheme = null; - /** - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * - * Generated from protobuf field optional string host = 2; - */ - protected $host = null; - /** - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * - * Generated from protobuf field optional int64 port = 3; - */ - protected $port = null; - /** - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.PathOverride path_override = 4; - */ - protected $path_override = null; - /** - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; - */ - protected $query_override = null; - /** - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; - */ - protected $uri_override_enforce_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $scheme - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * @type string $host - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * @type int|string $port - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * @type \Google\Cloud\Tasks\V2beta3\PathOverride $path_override - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * @type \Google\Cloud\Tasks\V2beta3\QueryOverride $query_override - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * @type int $uri_override_enforce_mode - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Target::initOnce(); - parent::__construct($data); - } - - /** - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * - * Generated from protobuf field optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; - * @return int - */ - public function getScheme() - { - return isset($this->scheme) ? $this->scheme : 0; - } - - public function hasScheme() - { - return isset($this->scheme); - } - - public function clearScheme() - { - unset($this->scheme); - } - - /** - * Scheme override. - * When specified, the task URI scheme is replaced by the provided value (HTTP - * or HTTPS). - * - * Generated from protobuf field optional .google.cloud.tasks.v2beta3.UriOverride.Scheme scheme = 1; - * @param int $var - * @return $this - */ - public function setScheme($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\UriOverride\Scheme::class); - $this->scheme = $var; - - return $this; - } - - /** - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * - * Generated from protobuf field optional string host = 2; - * @return string - */ - public function getHost() - { - return isset($this->host) ? $this->host : ''; - } - - public function hasHost() - { - return isset($this->host); - } - - public function clearHost() - { - unset($this->host); - } - - /** - * Host override. - * When specified, replaces the host part of the task URL. For example, - * if the task URL is "https://www.google.com," and host value is set to - * "example.net", the overridden URI will be changed to "https://example.net." - * Host value cannot be an empty string (INVALID_ARGUMENT). - * - * Generated from protobuf field optional string host = 2; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * - * Generated from protobuf field optional int64 port = 3; - * @return int|string - */ - public function getPort() - { - return isset($this->port) ? $this->port : 0; - } - - public function hasPort() - { - return isset($this->port); - } - - public function clearPort() - { - unset($this->port); - } - - /** - * Port override. - * When specified, replaces the port part of the task URI. For instance, - * for a URI http://www.google.com/foo and port=123, the overridden URI - * becomes http://www.google.com:123/foo. Note that the port value must be a - * positive integer. Setting the port to 0 (Zero) clears the URI port. - * - * Generated from protobuf field optional int64 port = 3; - * @param int|string $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt64($var); - $this->port = $var; - - return $this; - } - - /** - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.PathOverride path_override = 4; - * @return \Google\Cloud\Tasks\V2beta3\PathOverride|null - */ - public function getPathOverride() - { - return $this->path_override; - } - - public function hasPathOverride() - { - return isset($this->path_override); - } - - public function clearPathOverride() - { - unset($this->path_override); - } - - /** - * URI path. - * When specified, replaces the existing path of the task URL. Setting the - * path value to an empty string clears the URI path segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.PathOverride path_override = 4; - * @param \Google\Cloud\Tasks\V2beta3\PathOverride $var - * @return $this - */ - public function setPathOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\PathOverride::class); - $this->path_override = $var; - - return $this; - } - - /** - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; - * @return \Google\Cloud\Tasks\V2beta3\QueryOverride|null - */ - public function getQueryOverride() - { - return $this->query_override; - } - - public function hasQueryOverride() - { - return isset($this->query_override); - } - - public function clearQueryOverride() - { - unset($this->query_override); - } - - /** - * URI Query. - * When specified, replaces the query part of the task URI. Setting the - * query value to an empty string clears the URI query segment. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.QueryOverride query_override = 5; - * @param \Google\Cloud\Tasks\V2beta3\QueryOverride $var - * @return $this - */ - public function setQueryOverride($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\QueryOverride::class); - $this->query_override = $var; - - return $this; - } - - /** - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; - * @return int - */ - public function getUriOverrideEnforceMode() - { - return $this->uri_override_enforce_mode; - } - - /** - * URI Override Enforce Mode - * When specified, determines the Target UriOverride mode. If not specified, - * it defaults to ALWAYS. - * - * Generated from protobuf field .google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode uri_override_enforce_mode = 6; - * @param int $var - * @return $this - */ - public function setUriOverrideEnforceMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2beta3\UriOverride\UriOverrideEnforceMode::class); - $this->uri_override_enforce_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php deleted file mode 100644 index 1711330bfdfb..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/Scheme.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.tasks.v2beta3.UriOverride.Scheme - */ -class Scheme -{ - /** - * Scheme unspecified. Defaults to HTTPS. - * - * Generated from protobuf enum SCHEME_UNSPECIFIED = 0; - */ - const SCHEME_UNSPECIFIED = 0; - /** - * Convert the scheme to HTTP, e.g., https://www.google.ca will change to - * http://www.google.ca. - * - * Generated from protobuf enum HTTP = 1; - */ - const HTTP = 1; - /** - * Convert the scheme to HTTPS, e.g., http://www.google.ca will change to - * https://www.google.ca. - * - * Generated from protobuf enum HTTPS = 2; - */ - const HTTPS = 2; - - private static $valueToName = [ - self::SCHEME_UNSPECIFIED => 'SCHEME_UNSPECIFIED', - self::HTTP => 'HTTP', - self::HTTPS => 'HTTPS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scheme::class, \Google\Cloud\Tasks\V2beta3\UriOverride_Scheme::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php b/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php deleted file mode 100644 index be36cdfbe464..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/proto/src/Google/Cloud/Tasks/V2beta3/UriOverride/UriOverrideEnforceMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tasks.v2beta3.UriOverride.UriOverrideEnforceMode - */ -class UriOverrideEnforceMode -{ - /** - * OverrideMode Unspecified. Defaults to ALWAYS. - * - * Generated from protobuf enum URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; - */ - const URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED = 0; - /** - * In the IF_NOT_EXISTS mode, queue-level configuration is only - * applied where task-level configuration does not exist. - * - * Generated from protobuf enum IF_NOT_EXISTS = 1; - */ - const IF_NOT_EXISTS = 1; - /** - * In the ALWAYS mode, queue-level configuration overrides all - * task-level configuration - * - * Generated from protobuf enum ALWAYS = 2; - */ - const ALWAYS = 2; - - private static $valueToName = [ - self::URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED => 'URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED', - self::IF_NOT_EXISTS => 'IF_NOT_EXISTS', - self::ALWAYS => 'ALWAYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UriOverrideEnforceMode::class, \Google\Cloud\Tasks\V2beta3\UriOverride_UriOverrideEnforceMode::class); - diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php deleted file mode 100644 index a550d82cc75c..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_queue.php +++ /dev/null @@ -1,85 +0,0 @@ -createQueue($formattedParent, $queue); - 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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); - - create_queue_sample($formattedParent); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php deleted file mode 100644 index 4210d260bed5..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/create_task.php +++ /dev/null @@ -1,76 +0,0 @@ -createTask($formattedParent, $task); - 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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - create_task_sample($formattedParent); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php deleted file mode 100644 index a2468d76a522..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_queue.php +++ /dev/null @@ -1,77 +0,0 @@ -deleteQueue($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - delete_queue_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php deleted file mode 100644 index a131ad410095..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/delete_task.php +++ /dev/null @@ -1,69 +0,0 @@ -deleteTask($formattedName); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - delete_task_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php deleted file mode 100644 index 287e8a4b9401..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_iam_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -getIamPolicy($resource); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php deleted file mode 100644 index c87c50e29e10..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudtasks_v2beta3_generated_CloudTasks_GetLocation_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php deleted file mode 100644 index b7bb947057e2..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_queue.php +++ /dev/null @@ -1,67 +0,0 @@ -getQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - get_queue_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php deleted file mode 100644 index 679006068828..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/get_task.php +++ /dev/null @@ -1,67 +0,0 @@ -getTask($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php deleted file mode 100644 index f5495e55af5d..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 cloudtasks_v2beta3_generated_CloudTasks_ListLocations_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php deleted file mode 100644 index 5158c1b76ade..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_queues.php +++ /dev/null @@ -1,74 +0,0 @@ -listQueues($formattedParent); - - /** @var Queue $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 = CloudTasksClient::locationName('[PROJECT]', '[LOCATION]'); - - list_queues_sample($formattedParent); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php deleted file mode 100644 index 63228c12a8cc..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/list_tasks.php +++ /dev/null @@ -1,80 +0,0 @@ -listTasks($formattedParent); - - /** @var Task $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 = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - list_tasks_sample($formattedParent); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php deleted file mode 100644 index ec9dc04545e2..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/pause_queue.php +++ /dev/null @@ -1,74 +0,0 @@ -pauseQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - pause_queue_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php deleted file mode 100644 index 3b2d46dd6ac7..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/purge_queue.php +++ /dev/null @@ -1,72 +0,0 @@ -purgeQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - purge_queue_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php deleted file mode 100644 index 7c944dd8e591..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/resume_queue.php +++ /dev/null @@ -1,81 +0,0 @@ -resumeQueue($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - - resume_queue_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php deleted file mode 100644 index 2ada5904ec08..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/run_task.php +++ /dev/null @@ -1,93 +0,0 @@ -runTask($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudTasksClient::taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - - run_task_sample($formattedName); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php deleted file mode 100644 index 547643a9d362..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/set_iam_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -setIamPolicy($resource, $policy); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php deleted file mode 100644 index fcf085d532b7..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/test_iam_permissions.php +++ /dev/null @@ -1,81 +0,0 @@ -testIamPermissions($resource, $permissions); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php b/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php deleted file mode 100644 index d793d7f4046f..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/samples/V2beta3/CloudTasksClient/update_queue.php +++ /dev/null @@ -1,70 +0,0 @@ -updateQueue($queue); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php deleted file mode 100644 index 59762f56ffc9..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/CloudTasksClient.php +++ /dev/null @@ -1,36 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $queue = new Queue(); - * $response = $cloudTasksClient->createQueue($formattedParent, $queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @experimental - * - * @deprecated This class will be removed in the next major version update. - */ -class CloudTasksGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.tasks.v2beta3.CloudTasks'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'cloudtasks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudtasks.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $locationNameTemplate; - - private static $queueNameTemplate; - - private static $taskNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_tasks_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_tasks_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_tasks_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_tasks_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getQueueNameTemplate() - { - if (self::$queueNameTemplate == null) { - self::$queueNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}'); - } - - return self::$queueNameTemplate; - } - - private static function getTaskNameTemplate() - { - if (self::$taskNameTemplate == null) { - self::$taskNameTemplate = new PathTemplate('projects/{project}/locations/{location}/queues/{queue}/tasks/{task}'); - } - - return self::$taskNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'queue' => self::getQueueNameTemplate(), - 'task' => self::getTaskNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * 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. - * - * @experimental - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a queue - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * - * @return string The formatted queue resource. - * - * @experimental - */ - public static function queueName($project, $location, $queue) - { - return self::getQueueNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $project - * @param string $location - * @param string $queue - * @param string $task - * - * @return string The formatted task resource. - * - * @experimental - */ - public static function taskName($project, $location, $queue, $task) - { - return self::getTaskNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'queue' => $queue, - 'task' => $task, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - queue: projects/{project}/locations/{location}/queues/{queue} - * - task: projects/{project}/locations/{location}/queues/{queue}/tasks/{task} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtasks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a queue. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * $queue = new Queue(); - * $response = $cloudTasksClient->createQueue($formattedParent, $queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The location name in which the queue will be created. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * - * The list of allowed locations can be obtained by calling Cloud - * Tasks' implementation of - * [ListLocations][google.cloud.location.Locations.ListLocations]. - * @param Queue $queue Required. The queue to create. - * - * [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as - * an existing queue. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createQueue($parent, $queue, array $optionalArgs = []) - { - $request = new CreateQueueRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setQueue($queue); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a task and adds it to a queue. - * - * Tasks cannot be updated after creation; there is no UpdateTask command. - * - * * The maximum task size is 100KB. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $task = new Task(); - * $response = $cloudTasksClient->createTask($formattedParent, $task); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * - * The queue must already exist. - * @param Task $task Required. The task to add. - * - * Task names have the following format: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. - * The user can optionally specify a task - * [name][google.cloud.tasks.v2beta3.Task.name]. If a name is not specified - * then the system will generate a random unique task id, which will be set in - * the task returned in the [response][google.cloud.tasks.v2beta3.Task.name]. - * - * If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not - * set or is in the past then Cloud Tasks will set it to the current time. - * - * Task De-duplication: - * - * Explicitly specifying a task ID enables task de-duplication. If - * a task's ID is identical to that of an existing task or a task - * that was deleted or executed recently then the call will fail - * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. - * If the task's queue was created using Cloud Tasks, then another task with - * the same name can't be created for ~1 hour after the original task was - * deleted or executed. If the task's queue was created using queue.yaml or - * queue.xml, then another task with the same name can't be created - * for ~9 days after the original task was deleted or executed. - * - * Because there is an extra lookup cost to identify duplicate task - * names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] - * calls have significantly increased latency. Using hashed strings for the - * task id or for the prefix of the task id is recommended. Choosing task ids - * that are sequential or have sequential prefixes, for example using a - * timestamp, causes an increase in latency and error rates in all - * task commands. The infrastructure relies on an approximately - * uniform distribution of task ids to store and serve tasks - * efficiently. - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function createTask($parent, $task, array $optionalArgs = []) - { - $request = new CreateTaskRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTask($task); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a queue. - * - * This command will delete the queue even if it has tasks in it. - * - * Note: If you delete a queue, a queue with the same name can't be created - * for 7 days. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $cloudTasksClient->deleteQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteQueue($name, array $optionalArgs = []) - { - $request = new DeleteQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteQueue', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a task. - * - * A task can be deleted if it is scheduled or dispatched. A task - * cannot be deleted if it has executed successfully or permanently - * failed. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $cloudTasksClient->deleteTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function deleteTask($name, array $optionalArgs = []) - { - $request = new DeleteTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTask', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a - * [Queue][google.cloud.tasks.v2beta3.Queue]. Returns an empty policy if the - * resource exists and does not have a policy set. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.getIamPolicy` - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $response = $cloudTasksClient->getIamPolicy($resource); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a queue. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->getQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the queue. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $readMask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getQueue($name, array $optionalArgs = []) - { - $request = new GetQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['readMask'])) { - $request->setReadMask($optionalArgs['readMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a task. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $response = $cloudTasksClient->getTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getTask($name, array $optionalArgs = []) - { - $request = new GetTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists queues. - * - * Queues are returned in lexicographical order. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listQueues($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The location name. - * For example: `projects/PROJECT_ID/locations/LOCATION_ID` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * `filter` can be used to specify a subset of queues. Any - * [Queue][google.cloud.tasks.v2beta3.Queue] field can be used as a filter and - * several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The - * filter syntax is the same as described in [Stackdriver's Advanced Logs - * Filters](https://cloud.google.com/logging/docs/view/advanced_filters). - * - * Sample filter "state: PAUSED". - * - * Note that using filters might cause fewer queues than the - * requested page_size to be returned. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type FieldMask $readMask - * Optional. Read mask is used for a more granular control over what the API - * returns. If the mask is not present all fields will be returned except - * [Queue.stats]. [Queue.stats] will be returned only if it was explicitly - * specified in the mask. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listQueues($parent, array $optionalArgs = []) - { - $request = new ListQueuesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['readMask'])) { - $request->setReadMask($optionalArgs['readMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListQueues', $optionalArgs, ListQueuesResponse::class, $request); - } - - /** - * Lists the tasks in a queue. - * - * By default, only the [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC] - * view is retrieved due to performance considerations; - * [response_view][google.cloud.tasks.v2beta3.ListTasksRequest.response_view] - * controls the subset of information which is returned. - * - * The tasks may be returned in any order. The ordering may change at any - * time. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedParent = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listTasks($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $parent Required. The queue name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listTasks($parent, array $optionalArgs = []) - { - $request = new ListTasksRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTasks', $optionalArgs, ListTasksResponse::class, $request); - } - - /** - * Pauses the queue. - * - * If a queue is paused then the system will stop dispatching tasks - * until the queue is resumed via - * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can - * still be added when the queue is paused. A queue is paused if its - * [state][google.cloud.tasks.v2beta3.Queue.state] is - * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->pauseQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function pauseQueue($name, array $optionalArgs = []) - { - $request = new PauseQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PauseQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Purges a queue by deleting all of its tasks. - * - * All tasks created before this method is called are permanently deleted. - * - * Purge operations can take up to one minute to take effect. Tasks - * might be dispatched before the purge takes effect. A purge is irreversible. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->purgeQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function purgeQueue($name, array $optionalArgs = []) - { - $request = new PurgeQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PurgeQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Resume a queue. - * - * This method resumes a queue after it has been - * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED] or - * [DISABLED][google.cloud.tasks.v2beta3.Queue.State.DISABLED]. The state of a - * queue is stored in the queue's - * [state][google.cloud.tasks.v2beta3.Queue.state]; after calling this method - * it will be set to - * [RUNNING][google.cloud.tasks.v2beta3.Queue.State.RUNNING]. - * - * WARNING: Resuming many high-QPS queues at the same time can - * lead to target overloading. If you are resuming high-QPS - * queues, follow the 500/50/5 pattern described in - * [Managing Cloud Tasks Scaling - * Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling). - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - * $response = $cloudTasksClient->resumeQueue($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The queue name. For example: - * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function resumeQueue($name, array $optionalArgs = []) - { - $request = new ResumeQueueRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ResumeQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Forces a task to run now. - * - * When this method is called, Cloud Tasks will dispatch the task, even if - * the task is already running, the queue has reached its - * [RateLimits][google.cloud.tasks.v2beta3.RateLimits] or is - * [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED]. - * - * This command is meant to be used for manual debugging. For - * example, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] can be - * used to retry a failed task after a fix has been made or to manually force - * a task to be dispatched now. - * - * The dispatched task is returned. That is, the task that is returned - * contains the [status][Task.status] after the task is dispatched but - * before the task is received by its target. - * - * If Cloud Tasks receives a successful response from the task's - * target, then the task will be deleted; otherwise the task's - * [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] will be - * reset to the time that - * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] was called plus - * the retry delay specified in the queue's - * [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. - * - * [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a - * task that has already succeeded or permanently failed. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $formattedName = $cloudTasksClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - * $response = $cloudTasksClient->runTask($formattedName); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $name Required. The task name. For example: - * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $responseView - * The response_view specifies which subset of the - * [Task][google.cloud.tasks.v2beta3.Task] will be returned. - * - * By default response_view is - * [BASIC][google.cloud.tasks.v2beta3.Task.View.BASIC]; not all information is - * retrieved by default because some data, such as payloads, might be - * desirable to return only when needed because of its large size or because - * of the sensitivity of data that it contains. - * - * Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] - * requires `cloudtasks.tasks.fullView` [Google - * IAM](https://cloud.google.com/iam/) permission on the - * [Task][google.cloud.tasks.v2beta3.Task] resource. - * For allowed values, use constants defined on {@see \Google\Cloud\Tasks\V2beta3\Task\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Task - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function runTask($name, array $optionalArgs = []) - { - $request = new RunTaskRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['responseView'])) { - $request->setResponseView($optionalArgs['responseView']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RunTask', Task::class, $optionalArgs, $request)->wait(); - } - - /** - * Sets the access control policy for a - * [Queue][google.cloud.tasks.v2beta3.Queue]. Replaces any existing policy. - * - * Note: The Cloud Console does not check queue-level IAM permissions yet. - * Project-level permissions are required to use the Cloud Console. - * - * Authorization requires the following - * [Google IAM](https://cloud.google.com/iam) permission on the specified - * resource parent: - * - * * `cloudtasks.queues.setIamPolicy` - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $cloudTasksClient->setIamPolicy($resource, $policy); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns permissions that a caller has on a - * [Queue][google.cloud.tasks.v2beta3.Queue]. If the resource does not exist, - * this will return an empty set of permissions, not a - * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. - * - * Note: This operation is designed to be used for building permission-aware - * UIs and command-line tools, not for authorization checking. This operation - * may "fail open" without warning. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $cloudTasksClient->testIamPermissions($resource, $permissions); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a queue. - * - * This method creates the queue if it does not exist and updates - * the queue if it does exist. - * - * Queues created with this method allow tasks to live for a maximum of 31 - * days. After a task is 31 days old, the task will be deleted regardless of - * whether it was dispatched or not. - * - * WARNING: Using this method may have unintended side effects if you are - * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. - * Read - * [Overview of Queue Management and - * queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using - * this method. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $queue = new Queue(); - * $response = $cloudTasksClient->updateQueue($queue); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param Queue $queue Required. The queue to create or update. - * - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] must be - * specified. - * - * Output only fields cannot be modified using UpdateQueue. - * Any value specified for an output only field will be ignored. - * The queue's [name][google.cloud.tasks.v2beta3.Queue.name] cannot be - * changed. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A mask used to specify which fields of the queue are being updated. - * - * If empty, then all fields will be updated. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tasks\V2beta3\Queue - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function updateQueue($queue, array $optionalArgs = []) - { - $request = new UpdateQueueRequest(); - $requestParamHeaders = []; - $request->setQueue($queue); - $requestParamHeaders['queue.name'] = $queue->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateQueue', Queue::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * $response = $cloudTasksClient->getLocation(); - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $cloudTasksClient = new CloudTasksClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $cloudTasksClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $cloudTasksClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $cloudTasksClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json deleted file mode 100644 index 91fdac01bfc2..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/gapic_metadata.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.tasks.v2beta3", - "libraryPackage": "Google\\Cloud\\Tasks\\V2beta3", - "services": { - "CloudTasks": { - "clients": { - "grpc": { - "libraryClient": "CloudTasksGapicClient", - "rpcs": { - "CreateQueue": { - "methods": [ - "createQueue" - ] - }, - "CreateTask": { - "methods": [ - "createTask" - ] - }, - "DeleteQueue": { - "methods": [ - "deleteQueue" - ] - }, - "DeleteTask": { - "methods": [ - "deleteTask" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetQueue": { - "methods": [ - "getQueue" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "ListQueues": { - "methods": [ - "listQueues" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - }, - "PauseQueue": { - "methods": [ - "pauseQueue" - ] - }, - "PurgeQueue": { - "methods": [ - "purgeQueue" - ] - }, - "ResumeQueue": { - "methods": [ - "resumeQueue" - ] - }, - "RunTask": { - "methods": [ - "runTask" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateQueue": { - "methods": [ - "updateQueue" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json deleted file mode 100644 index d68dd2e3a24f..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_client_config.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "interfaces": { - "google.cloud.tasks.v2beta3.CloudTasks": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "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": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 20000 - } - }, - "methods": { - "CreateQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteQueue": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteTask": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetQueue": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListQueues": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTasks": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PauseQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PurgeQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResumeQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RunTask": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 20000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateQueue": { - "timeout_millis": 20000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_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/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php deleted file mode 100644 index af3d8e7b96d1..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_descriptor_config.php +++ /dev/null @@ -1,62 +0,0 @@ - [ - 'google.cloud.tasks.v2beta3.CloudTasks' => [ - 'ListQueues' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getQueues', - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - ], - 'GetLocation' => [ - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - ], - ], -]; diff --git a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php b/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php deleted file mode 100644 index 228b1f2c978e..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/src/V2beta3/resources/cloud_tasks_rest_client_config.php +++ /dev/null @@ -1,240 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.tasks.v2beta3.CloudTasks' => [ - 'CreateQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*}/queues', - 'body' => 'queue', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteQueue' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTask' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{resource=projects/*/locations/*/queues/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetQueue' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListQueues' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*}/queues', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PauseQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}:pause', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'PurgeQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}:purge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResumeQueue' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*}:resume', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RunTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{name=projects/*/locations/*/queues/*/tasks/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{resource=projects/*/locations/*/queues/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta3/{resource=projects/*/locations/*/queues/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateQueue' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta3/{queue.name=projects/*/locations/*/queues/*}', - 'body' => 'queue', - 'placeholders' => [ - 'queue.name' => [ - 'getters' => [ - 'getQueue', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php b/owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php deleted file mode 100644 index 539258bf1eb2..000000000000 --- a/owl-bot-staging/Tasks/v2beta3/tests/Unit/V2beta3/CloudTasksClientTest.php +++ /dev/null @@ -1,1189 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudTasksClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudTasksClient($options); - } - - /** @test */ - public function createQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queue = new Queue(); - $response = $gapicClient->createQueue($formattedParent, $queue); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/CreateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $queue = new Queue(); - try { - $gapicClient->createQueue($formattedParent, $queue); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - $response = $gapicClient->createTask($formattedParent, $task); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/CreateTask', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $task = new Task(); - try { - $gapicClient->createTask($formattedParent, $task); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $gapicClient->deleteQueue($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/DeleteQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->deleteQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $gapicClient->deleteTask($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/DeleteTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->deleteTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->getQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/GetQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->getQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $response = $gapicClient->getTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->getTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $queuesElement = new Queue(); - $queues = [ - $queuesElement, - ]; - $expectedResponse = new ListQueuesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setQueues($queues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listQueues($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getQueues()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/ListQueues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listQueuesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listQueues($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->listTasks($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->listTasks($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->pauseQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/PauseQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->pauseQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->purgeQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/PurgeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->purgeQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - $response = $gapicClient->resumeQueue($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/ResumeQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->queueName('[PROJECT]', '[LOCATION]', '[QUEUE]'); - try { - $gapicClient->resumeQueue($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dispatchCount = 1217252086; - $responseCount = 424727441; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setDispatchCount($dispatchCount); - $expectedResponse->setResponseCount($responseCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - $response = $gapicClient->runTask($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/RunTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->taskName('[PROJECT]', '[LOCATION]', '[QUEUE]', '[TASK]'); - try { - $gapicClient->runTask($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Queue(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $queue = new Queue(); - $response = $gapicClient->updateQueue($queue); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tasks.v2beta3.CloudTasks/UpdateQueue', $actualFuncCall); - $actualValue = $actualRequestObject->getQueue(); - $this->assertProtobufEquals($queue, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateQueueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $queue = new Queue(); - try { - $gapicClient->updateQueue($queue); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/GPBMetadata/Google/Cloud/Telcoautomation/V1/Telcoautomation.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/GPBMetadata/Google/Cloud/Telcoautomation/V1/Telcoautomation.php deleted file mode 100644 index 01a27db9624c1e248b8b3238b23121e87a3c5f3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24410 zcmeG^TWlOzR$JY15+5gybK^LUlSw)?J3AR~rakF-Fw>b#rfs(!&vassUzv=&^t8Ln zc9V8jPgS*NO)xC`F@RXmY7uB95D4+X;{(J)XnANQBpxDsAi)PHAXpw>BUlOXUL?f1 z&w6x~tGey1<^zAVtM0k?ywADko?EZqYHhXP>CCLrG^~na)H3V48E4DLv@Fvxt7ap! z-rm?StW4G1Zq*xxmCaM%Ape z9doo)+Z zjf!n&0&N?Q*?Ycj}c!{kxIEo0*MD!!~e^&aoTqW|bnG zp#byEs&VzX44;#Z{dCJjj@-;h^cE8jfNu zeRB0Vu`HdgzLB}gam?pCki403thV7@J(IBvr)@QFFudsmd+OI(2=fZ9`dXpcG$|L% zrk&5bG`Ukm0ZujQM$_pIW~Od5YLmuRWv6ah-GMF|LX8q5Su&fOR=e4(H#gVjTU2?w zBT~r@Ial0nIlIXbR-laFI~Dsu53tL1)O)A0-3o_gs`mUFb)i^=T21NE4BFvUC3&g` z&%*EjrUozfWP#)|2g@?U%?1oNyK{Z)oS3)Ls-tyNwcxfpCLky1iw!FK^12Yd7;xSL zX$c97S5J#q4Ofg4rV^tVbU_Sat^)0B!k~f@FQvm#FF6X^C=M|~;-^M9lIMJY{%d_O zJa1LEP!L>yrW$P23y<*M1-sBez;;j4k%^(;p* zl6%=Z3UZ18l9ynhY8mKj%M_i_6q{#E&LeTnD*c#Df1{A5Q0*4FMgf&h2K5dcZB*8c zhCO;DlSXt4a+xS$XT#W$EwMR@O~=|LqcGq!E9D)-veDp1k5UeC6z8FjdNX767(N@! z-RNztB{~J0aO`;)@UA=n=?BKHkjY8t+o?3#oPYiK)T^4l2z?BgoQ2a%%Z24)dFAfX zLUC$tX0A9r^eGhT@u|gPVR`QE?2twPjuxht=T?hDDf(u*SSqqNY5HcSFjqpDBl$0D z9~Zu)!HYq&;8I7$x3d@-C&IW!R#2ATWmFw|;-UDpH_Y8->1a6<+R*m~W@n&IPpgrC3c8{O~F& zRUvI3ZJqRMYc}y3u7Z;H;p~T|^`K!^YEnLBXSZdH9%mNtdg3|niCKjIS;jdS{+|F7 z(C6Vy2zulhxN>iP@$J%lVY)n3T3K2yE|!E$k{Xf0O#NJwGcd$cl=8X+AEjQHjY#1jaubFXxYxt;ND=GdS75NxLTb^imAN0K zzI8D7YOEG1da?yEfk#Kr!--nmZZ#^qWfsz?b7l@(Bj*4tqh;E4OjmcA&I(Wd8uV>o zl3|bbv#9Y*ECw_s;Rg4%vRz=Xuf)Q-*n6BkpDf^X1`zduTr494q4GpBsEcq)$d}5X zUNfxGlaf_wG7m#Fqt!5XSqjiFc8td8Aif^Vy%0;_v;r(qI7(WYJOx9R*=Vd+st?L` zyVWu+XY>?Kc$~fN*6vr~q)+tZ5{wlV78d7M3#D>cEbNEA>BYj#GTJ2uKODF)zk~sg zg+dO9|E2T4j^XcDG`JdLtV)EWk7^sQ;8%=GPb(6P3B!8qg$)mw_=oobl{W02*|2Y)H&uGw* zoCmUyAkA+j6$algD`p{+`IE9_-`@C8a7^x0;EDdtV*swM2ROd3Z~Y9M5Bk=!bfv<{ zqS2%xJuH<+0>@C4A)hjRFhTC_Qj^`sqpB1*=uwrcO%vr&k9X}+OUk2iZ~PryIGoOe zDBw~d8Rr5nHK8L8ajDc9iy(smHJCgJkIO@@_DOfT(=q!EkB=RIW9U^&bRQDfZREd( zw*4C#JQw3)T~#E_q-NcnkFBXNh4%0Mvp0@TQAR#H2kt-mM@N9%-mS5^;j|h?LPO`{X zwQsLDC$>5yhVqsV%dU9$#?Q#7u5j%f>3pbvO@mCSZaec~8`(wUgEkge2xf+@iiH&v zzJsUR(G+e+Nl$z0)6n0-f=t=QiY`mk`v~sa*(1k%V94M-2uCrI#flErKWLmCg5#!z zsa<(}mv4&oU(n#nKB(I*tehHT1x9?vBzJo@(n9MhFUKl$7;9)g&@?{pls$N>Or+h! zB2jg#vfeN-1g5X{>kr`4tP#p%$>KSmT6MKccmoW2v}E^S=UvPbf0}_2KD_K4EqrjHgp5}<<4B1&DB`55oC60Deu5(v=jj= zIrO^EI0S!^)*aUT?a%?#|`jV>R8moww(FkN_57bCoodTNJoyrpJUm~ z6R>#=koo2hU?hm3@O^K9r&J+whAwm^(*5c8;T$jg7>X^DD+lE_PQ756SROq5sZmK5 z4SFqP37Pi}&z-PFM*ec8%H7aVibmG|J>qOoo67>AFa{Mk8RG&Pr)>T+_c@>D<2UQw zwjGaSqDN3|3}xs);r>>Tr*F^JVj59cyn$B!RDd!hj(6g^>2@4&D;KJlEi$h7&zSR3k` zJ37ezGUCG%!cHhDn-x%JJRW@50nI?J7j#%I+GD0zhfB;I5~(I`B~FdSseLYXm=Rd1vSxK&M}+!a5Jp+zfHk# zm_YuY!-vJ;KSYneza&T%yXlo$N=G_(K>22;aLP%l=uFaMx1e7=A;E@9>KKF(VP)7w z#$!nO+8P|8J(9FHqE&IWT+2&QZ9(O9=)t%urD^nOjU71Fn60rWtYK$69tqVQb|_3O zj6c?YF9n1CtSHcZH3mfGThx5mg)6=s!A|;3%WSu}O_Nh_O!oFO8>TZos5fgoV<2;I zQq9C#oq3b$^RXP4_{rYpG?g~Hvd8Yb1G_{UQti7LA6ViG}E-yiKpW=Y^ufQRBo))nI^N?=~8!8HX9#9)shJ1 zMdvRyAf4~10@3+h1!AqFEleEoA{251&!}ndBE?8#ZnvSI=N$AoKO>K?&+!=reGc36r$i;K|p6G1%%%hudDlk8??F1!D<(E9#UW?VLB?MaKS5cT0Ssdd^rHm=9 zFT;RmAe9|z&JOa-w7iU@k#U1J@VmhDSd)$B_g&O+Pg-xnpr5)YOU3v)oK%HsTEU`C zzLTYu;=mgc6g=l2|(3A~wEDV2s&;~OyO?w{Bqm*K*6 zaiKJS|4uP{mGf{mI6y9g2n1h=b-oi$cpU;Zz@A?$F3qnjP8Gv$5sXkav-O} zvw(V$8prE!N4d(Ov=2+|IV;BDMcOj!44f)VmWo3I<6qX`lq&(&FplZb zMGuvw;%c!Jpyed=-@cCx-OF?Hcaa2o0SZ?t6$Q(v=&_+zOX3%$yXilJk{=Eh#xs6F=<2mLVFY%2r z!-tOw7v1ZnVR~~x7#_urwx(T^KcsoRs&^%XylQeIe~LtMJ4jBXZ+t=`w|X{}>^P?_ zso4Gnqd6CY%G^l&{fz*Gq^gUCA$|98;VB^~bvl1d{gR?u(r4oBB{FJwZe``&MmzGa zNOPcLE&vmc4S9UKIa1a{+2 z-uJ57l75$2(t%YiUt!mkjl4F_hzqtGCLk^d@(CgiHJ&z4QsVvsO)Ajvn7}0lAbKIK z?3LT1e&>+nX0hf?O4+K{Z`-SKr8FZWZUzlR>-G^&{38HWi zL{iaBx1hfFxNuqcDc6*)xj*HmWksKjmr`^>+*hXkx}dp>1prcg4=ZS;wAo1aOaK6=%GBmyx<$(6WOa?m7OD8tox~K)UM1= z8Np-YpGqNf7Y3`xNW`a#@f-)dLWcW@n;`j%fRv=hD|zGuLb#XS+3$vAY1ALl1%7I-bn8dwc%@)`>i*&CtA^Yh42szTz=Y%ivPdy-YUk*&aOrhpS^~{ zNvh*}OFGxo8(wLb$>$D7+Myp6!F-acK6SF4h}a2KKLS$HAFuk66S%7HJs_6s=qa#G z_{~3zBjgXz)ANL}lOYK_eH5r~8{^Z42*?9*vF$ahExr0g%}RxqvBgJ)OZ$Iv=+6q-Eyrou`H6`S zKm1VaNY!_1X{RjzV*B&>g-B<^w6-VzU4y65cgJmBCx=;22+kmSLa-F;m{V3LK9rML!)yK83@sF^3zS(YLb6LF_^1XI8 Ml7Cly5B3254<56}bN~PV diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php deleted file mode 100644 index 7a6a464b778d..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyDeploymentRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.telcoautomation.v1.ApplyDeploymentRequest - */ -class ApplyDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment to apply to orchestration cluster. - * - * 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 deployment to apply to orchestration cluster. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ApplyDeploymentRequest - * - * @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 deployment to apply to orchestration cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment to apply to orchestration cluster. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the deployment to apply to orchestration cluster. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php deleted file mode 100644 index bd968a50653a..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApplyHydratedDeploymentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.ApplyHydratedDeploymentRequest - */ -class ApplyHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hydrated deployment to apply. - * - * 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 hydrated deployment to apply. Please see - * {@see TelcoAutomationClient::hydratedDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ApplyHydratedDeploymentRequest - * - * @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 hydrated deployment to apply. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hydrated deployment to apply. - * - * 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 hydrated deployment to apply. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php deleted file mode 100644 index c75363cccf22..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ApproveBlueprintRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.telcoautomation.v1.ApproveBlueprintRequest - */ -class ApproveBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the blueprint to approve. The blueprint must be in - * Proposed state. A new revision is committed on approval. - * - * 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 blueprint to approve. The blueprint must be in - * Proposed state. A new revision is committed on approval. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ApproveBlueprintRequest - * - * @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 blueprint to approve. The blueprint must be in - * Proposed state. A new revision is committed on approval. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the blueprint to approve. The blueprint must be in - * Proposed state. A new revision is committed on approval. - * - * 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 blueprint to approve. The blueprint must be in - * Proposed state. A new revision is committed on approval. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php deleted file mode 100644 index 17a778e9c60f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint.php +++ /dev/null @@ -1,586 +0,0 @@ -google.cloud.telcoautomation.v1.Blueprint - */ -class Blueprint extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the blueprint. If unspecified, the name will be autogenerated - * from server side. Name of the blueprint must not contain `@` character. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Immutable. The revision ID of the blueprint. - * A new revision is committed whenever a blueprint is approved. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Required. Immutable. The public blueprint ID from which this blueprint was - * created. - * - * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $source_blueprint = ''; - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $approval_state = 0; - /** - * Optional. Human readable name of a Blueprint. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. Name of the repository where the blueprint files are stored. - * - * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $repository = ''; - /** - * Optional. Files present in a blueprint. - * When invoking UpdateBlueprint API, only the modified files should be - * included in this. Files that are not included in the update of a blueprint - * will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $files; - /** - * Optional. Labels are key-value attributes that can be set on a blueprint - * resource by the user. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Blueprint creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the blueprint was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Source provider is the author of a public blueprint, from - * which this blueprint is created. - * - * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_provider = ''; - /** - * Output only. DeploymentLevel of a blueprint signifies where the blueprint - * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deployment_level = 0; - /** - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rollback_support = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the blueprint. If unspecified, the name will be autogenerated - * from server side. Name of the blueprint must not contain `@` character. - * @type string $revision_id - * Output only. Immutable. The revision ID of the blueprint. - * A new revision is committed whenever a blueprint is approved. - * @type string $source_blueprint - * Required. Immutable. The public blueprint ID from which this blueprint was - * created. - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp that the revision was created. - * @type int $approval_state - * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) - * @type string $display_name - * Optional. Human readable name of a Blueprint. - * @type string $repository - * Output only. Name of the repository where the blueprint files are stored. - * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files - * Optional. Files present in a blueprint. - * When invoking UpdateBlueprint API, only the modified files should be - * included in this. Files that are not included in the update of a blueprint - * will not be changed. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels are key-value attributes that can be set on a blueprint - * resource by the user. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Blueprint creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the blueprint was updated. - * @type string $source_provider - * Output only. Source provider is the author of a public blueprint, from - * which this blueprint is created. - * @type int $deployment_level - * Output only. DeploymentLevel of a blueprint signifies where the blueprint - * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * @type bool $rollback_support - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The name of the blueprint. If unspecified, the name will be autogenerated - * from server side. Name of the blueprint must not contain `@` character. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the blueprint. If unspecified, the name will be autogenerated - * from server side. Name of the blueprint must not contain `@` character. - * - * 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. Immutable. The revision ID of the blueprint. - * A new revision is committed whenever a blueprint is approved. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. Immutable. The revision ID of the blueprint. - * A new revision is committed whenever a blueprint is approved. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Required. Immutable. The public blueprint ID from which this blueprint was - * created. - * - * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getSourceBlueprint() - { - return $this->source_blueprint; - } - - /** - * Required. Immutable. The public blueprint ID from which this blueprint was - * created. - * - * Generated from protobuf field string source_blueprint = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setSourceBlueprint($var) - { - GPBUtil::checkString($var, True); - $this->source_blueprint = $var; - - return $this; - } - - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getApprovalState() - { - return $this->approval_state; - } - - /** - * Output only. Approval state of the blueprint (DRAFT, PROPOSED, APPROVED) - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint.ApprovalState approval_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setApprovalState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Blueprint\ApprovalState::class); - $this->approval_state = $var; - - return $this; - } - - /** - * Optional. Human readable name of a Blueprint. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Human readable name of a Blueprint. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Name of the repository where the blueprint files are stored. - * - * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Output only. Name of the repository where the blueprint files are stored. - * - * Generated from protobuf field string repository = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkString($var, True); - $this->repository = $var; - - return $this; - } - - /** - * Optional. Files present in a blueprint. - * When invoking UpdateBlueprint API, only the modified files should be - * included in this. Files that are not included in the update of a blueprint - * will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFiles() - { - return $this->files; - } - - /** - * Optional. Files present in a blueprint. - * When invoking UpdateBlueprint API, only the modified files should be - * included in this. Files that are not included in the update of a blueprint - * will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); - $this->files = $arr; - - return $this; - } - - /** - * Optional. Labels are key-value attributes that can be set on a blueprint - * resource by the user. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels are key-value attributes that can be set on a blueprint - * resource by the user. - * - * Generated from protobuf field map labels = 10 [(.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. Blueprint creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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. Blueprint creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.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 when the blueprint was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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 when the blueprint was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.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. Source provider is the author of a public blueprint, from - * which this blueprint is created. - * - * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceProvider() - { - return $this->source_provider; - } - - /** - * Output only. Source provider is the author of a public blueprint, from - * which this blueprint is created. - * - * Generated from protobuf field string source_provider = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceProvider($var) - { - GPBUtil::checkString($var, True); - $this->source_provider = $var; - - return $this; - } - - /** - * Output only. DeploymentLevel of a blueprint signifies where the blueprint - * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDeploymentLevel() - { - return $this->deployment_level; - } - - /** - * Output only. DeploymentLevel of a blueprint signifies where the blueprint - * will be applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDeploymentLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); - $this->deployment_level = $var; - - return $this; - } - - /** - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRollbackSupport() - { - return $this->rollback_support; - } - - /** - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRollbackSupport($var) - { - GPBUtil::checkBool($var); - $this->rollback_support = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php deleted file mode 100644 index 1a1fe828d0a8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Blueprint/ApprovalState.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.telcoautomation.v1.Blueprint.ApprovalState - */ -class ApprovalState -{ - /** - * Unspecified state. - * - * Generated from protobuf enum APPROVAL_STATE_UNSPECIFIED = 0; - */ - const APPROVAL_STATE_UNSPECIFIED = 0; - /** - * A blueprint starts in DRAFT state once it is created. All edits are made - * to the blueprint in DRAFT state. - * - * Generated from protobuf enum DRAFT = 1; - */ - const DRAFT = 1; - /** - * When the edits are ready for review, blueprint can be proposed and moves - * to PROPOSED state. Edits cannot be made to a blueprint in PROPOSED state. - * - * Generated from protobuf enum PROPOSED = 2; - */ - const PROPOSED = 2; - /** - * When a proposed blueprint is approved, it moves to APPROVED state. A new - * revision is committed. The latest committed revision can be used to - * create a deployment on Orchestration or Workload Cluster. Edits to an - * APPROVED blueprint changes its state back to DRAFT. The last committed - * revision of a blueprint represents its latest APPROVED state. - * - * Generated from protobuf enum APPROVED = 3; - */ - const APPROVED = 3; - - private static $valueToName = [ - self::APPROVAL_STATE_UNSPECIFIED => 'APPROVAL_STATE_UNSPECIFIED', - self::DRAFT => 'DRAFT', - self::PROPOSED => 'PROPOSED', - self::APPROVED => 'APPROVED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ApprovalState::class, \Google\Cloud\TelcoAutomation\V1\Blueprint_ApprovalState::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php deleted file mode 100644 index d7586bd49f05..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/BlueprintView.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.telcoautomation.v1.BlueprintView - */ -class BlueprintView -{ - /** - * Unspecified enum value. - * - * Generated from protobuf enum BLUEPRINT_VIEW_UNSPECIFIED = 0; - */ - const BLUEPRINT_VIEW_UNSPECIFIED = 0; - /** - * View which only contains metadata. - * - * Generated from protobuf enum BLUEPRINT_VIEW_BASIC = 1; - */ - const BLUEPRINT_VIEW_BASIC = 1; - /** - * View which contains metadata and files it encapsulates. - * - * Generated from protobuf enum BLUEPRINT_VIEW_FULL = 2; - */ - const BLUEPRINT_VIEW_FULL = 2; - - private static $valueToName = [ - self::BLUEPRINT_VIEW_UNSPECIFIED => 'BLUEPRINT_VIEW_UNSPECIFIED', - self::BLUEPRINT_VIEW_BASIC => 'BLUEPRINT_VIEW_BASIC', - self::BLUEPRINT_VIEW_FULL => 'BLUEPRINT_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php deleted file mode 100644 index c517f57b7d9c..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.ComputeDeploymentStatusRequest - */ -class ComputeDeploymentStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment without revisionID. - * - * 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 deployment without revisionID. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ComputeDeploymentStatusRequest - * - * @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 deployment without revisionID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment without revisionID. - * - * 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 deployment without revisionID. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php deleted file mode 100644 index 0822acdbd981..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ComputeDeploymentStatusResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.telcoautomation.v1.ComputeDeploymentStatusResponse - */ -class ComputeDeploymentStatusResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the deployment. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Aggregated status of a deployment. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $aggregated_status = 0; - /** - * Output only. Resource level status details in deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $resource_statuses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the deployment. - * @type int $aggregated_status - * Output only. Aggregated status of a deployment. - * @type array<\Google\Cloud\TelcoAutomation\V1\ResourceStatus>|\Google\Protobuf\Internal\RepeatedField $resource_statuses - * Output only. Resource level status details in deployments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The name of the deployment. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the deployment. - * - * 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. Aggregated status of a deployment. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAggregatedStatus() - { - return $this->aggregated_status; - } - - /** - * Output only. Aggregated status of a deployment. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Status aggregated_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAggregatedStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Status::class); - $this->aggregated_status = $var; - - return $this; - } - - /** - * Output only. Resource level status details in deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceStatuses() - { - return $this->resource_statuses; - } - - /** - * Output only. Resource level status details in deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.ResourceStatus resource_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\TelcoAutomation\V1\ResourceStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\ResourceStatus::class); - $this->resource_statuses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php deleted file mode 100644 index 358159e75a04..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateBlueprintRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.telcoautomation.v1.CreateBlueprintRequest - */ -class CreateBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The name of the blueprint. - * - * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $blueprint_id = ''; - /** - * Required. The `Blueprint` to create. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $blueprint = null; - - /** - * @param string $parent Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see - * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint Required. The `Blueprint` to create. - * @param string $blueprintId Optional. The name of the blueprint. - * - * @return \Google\Cloud\TelcoAutomation\V1\CreateBlueprintRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint, string $blueprintId): self - { - return (new self()) - ->setParent($parent) - ->setBlueprint($blueprint) - ->setBlueprintId($blueprintId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * @type string $blueprint_id - * Optional. The name of the blueprint. - * @type \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint - * Required. The `Blueprint` to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The name of the blueprint. - * - * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBlueprintId() - { - return $this->blueprint_id; - } - - /** - * Optional. The name of the blueprint. - * - * Generated from protobuf field string blueprint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBlueprintId($var) - { - GPBUtil::checkString($var, True); - $this->blueprint_id = $var; - - return $this; - } - - /** - * Required. The `Blueprint` to create. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\Blueprint|null - */ - public function getBlueprint() - { - return $this->blueprint; - } - - public function hasBlueprint() - { - return isset($this->blueprint); - } - - public function clearBlueprint() - { - unset($this->blueprint); - } - - /** - * Required. The `Blueprint` to create. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $var - * @return $this - */ - public function setBlueprint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); - $this->blueprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php deleted file mode 100644 index c479894e6802..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateDeploymentRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.telcoautomation.v1.CreateDeploymentRequest - */ -class CreateDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The name of the deployment. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deployment_id = ''; - /** - * Required. The `Deployment` to create. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - - /** - * @param string $parent Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see - * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * @param \Google\Cloud\TelcoAutomation\V1\Deployment $deployment Required. The `Deployment` to create. - * @param string $deploymentId Optional. The name of the deployment. - * - * @return \Google\Cloud\TelcoAutomation\V1\CreateDeploymentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\Deployment $deployment, string $deploymentId): self - { - return (new self()) - ->setParent($parent) - ->setDeployment($deployment) - ->setDeploymentId($deploymentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * @type string $deployment_id - * Optional. The name of the deployment. - * @type \Google\Cloud\TelcoAutomation\V1\Deployment $deployment - * Required. The `Deployment` to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of parent resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The name of the deployment. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDeploymentId() - { - return $this->deployment_id; - } - - /** - * Optional. The name of the deployment. - * - * Generated from protobuf field string deployment_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDeploymentId($var) - { - GPBUtil::checkString($var, True); - $this->deployment_id = $var; - - return $this; - } - - /** - * Required. The `Deployment` to create. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. The `Deployment` to create. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php deleted file mode 100644 index 12291acdb971..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateEdgeSlmRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.telcoautomation.v1.CreateEdgeSlmRequest - */ -class CreateEdgeSlmRequest 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 - * If auto-generating Id server-side, remove this field and - * edge_slm_id from the method_signature of Create RPC - * - * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $edge_slm_id = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $edge_slm = 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 TelcoAutomationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edgeSlm Required. The resource being created - * @param string $edgeSlmId Required. Id of the requesting object - * If auto-generating Id server-side, remove this field and - * edge_slm_id from the method_signature of Create RPC - * - * @return \Google\Cloud\TelcoAutomation\V1\CreateEdgeSlmRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edgeSlm, string $edgeSlmId): self - { - return (new self()) - ->setParent($parent) - ->setEdgeSlm($edgeSlm) - ->setEdgeSlmId($edgeSlmId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $edge_slm_id - * Required. Id of the requesting object - * If auto-generating Id server-side, remove this field and - * edge_slm_id from the method_signature of Create RPC - * @type \Google\Cloud\TelcoAutomation\V1\EdgeSlm $edge_slm - * 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\Telcoautomation\V1\Telcoautomation::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 - * If auto-generating Id server-side, remove this field and - * edge_slm_id from the method_signature of Create RPC - * - * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEdgeSlmId() - { - return $this->edge_slm_id; - } - - /** - * Required. Id of the requesting object - * If auto-generating Id server-side, remove this field and - * edge_slm_id from the method_signature of Create RPC - * - * Generated from protobuf field string edge_slm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEdgeSlmId($var) - { - GPBUtil::checkString($var, True); - $this->edge_slm_id = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\EdgeSlm|null - */ - public function getEdgeSlm() - { - return $this->edge_slm; - } - - public function hasEdgeSlm() - { - return isset($this->edge_slm); - } - - public function clearEdgeSlm() - { - unset($this->edge_slm); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm edge_slm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\EdgeSlm $var - * @return $this - */ - public function setEdgeSlm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm::class); - $this->edge_slm = $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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php deleted file mode 100644 index 8c98f3f758d4..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/CreateOrchestrationClusterRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.telcoautomation.v1.CreateOrchestrationClusterRequest - */ -class CreateOrchestrationClusterRequest 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 - * If auto-generating Id server-side, remove this field and - * orchestration_cluster_id from the method_signature of Create RPC - * - * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $orchestration_cluster_id = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $orchestration_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 TelcoAutomationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestrationCluster Required. The resource being created - * @param string $orchestrationClusterId Required. Id of the requesting object - * If auto-generating Id server-side, remove this field and - * orchestration_cluster_id from the method_signature of Create RPC - * - * @return \Google\Cloud\TelcoAutomation\V1\CreateOrchestrationClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestrationCluster, string $orchestrationClusterId): self - { - return (new self()) - ->setParent($parent) - ->setOrchestrationCluster($orchestrationCluster) - ->setOrchestrationClusterId($orchestrationClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $orchestration_cluster_id - * Required. Id of the requesting object - * If auto-generating Id server-side, remove this field and - * orchestration_cluster_id from the method_signature of Create RPC - * @type \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $orchestration_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\Telcoautomation\V1\Telcoautomation::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 - * If auto-generating Id server-side, remove this field and - * orchestration_cluster_id from the method_signature of Create RPC - * - * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOrchestrationClusterId() - { - return $this->orchestration_cluster_id; - } - - /** - * Required. Id of the requesting object - * If auto-generating Id server-side, remove this field and - * orchestration_cluster_id from the method_signature of Create RPC - * - * Generated from protobuf field string orchestration_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOrchestrationClusterId($var) - { - GPBUtil::checkString($var, True); - $this->orchestration_cluster_id = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster|null - */ - public function getOrchestrationCluster() - { - return $this->orchestration_cluster; - } - - public function hasOrchestrationCluster() - { - return isset($this->orchestration_cluster); - } - - public function clearOrchestrationCluster() - { - unset($this->orchestration_cluster); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster $var - * @return $this - */ - public function setOrchestrationCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster::class); - $this->orchestration_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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php deleted file mode 100644 index 8bd4fde06229..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteBlueprintRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.telcoautomation.v1.DeleteBlueprintRequest - */ -class DeleteBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of blueprint to delete. - * Blueprint name should be in the format {blueprint_id}, if - * {blueprint_id}@{revision_id} is passed then the API throws invalid - * argument. - * - * 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 blueprint to delete. - * Blueprint name should be in the format {blueprint_id}, if - * {blueprint_id}@{revision_id} is passed then the API throws invalid - * argument. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\DeleteBlueprintRequest - * - * @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 blueprint to delete. - * Blueprint name should be in the format {blueprint_id}, if - * {blueprint_id}@{revision_id} is passed then the API throws invalid - * argument. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of blueprint to delete. - * Blueprint name should be in the format {blueprint_id}, if - * {blueprint_id}@{revision_id} is passed then the API throws invalid - * argument. - * - * 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 blueprint to delete. - * Blueprint name should be in the format {blueprint_id}, if - * {blueprint_id}@{revision_id} is passed then the API throws invalid - * argument. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php deleted file mode 100644 index fb80f6e26235..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteEdgeSlmRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.telcoautomation.v1.DeleteEdgeSlmRequest - */ -class DeleteEdgeSlmRequest 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 TelcoAutomationClient::edgeSlmName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\DeleteEdgeSlmRequest - * - * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php deleted file mode 100644 index a7b6698f204a..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeleteOrchestrationClusterRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.telcoautomation.v1.DeleteOrchestrationClusterRequest - */ -class DeleteOrchestrationClusterRequest 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 TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\DeleteOrchestrationClusterRequest - * - * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php deleted file mode 100644 index 57440dc2eacb..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment.php +++ /dev/null @@ -1,623 +0,0 @@ -google.cloud.telcoautomation.v1.Deployment - */ -class Deployment extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the deployment. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Immutable. The revision ID of the deployment. - * A new revision is committed whenever a change in deployment is applied. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Required. The blueprint revision from which this deployment was created. - * - * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_blueprint_revision = ''; - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * Output only. State of the deployment (DRAFT, APPLIED, DELETING). - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Human readable name of a Deployment. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. Name of the repository where the deployment package files are - * stored. - * - * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $repository = ''; - /** - * Optional. Files present in a deployment. - * When invoking UpdateDeployment API, only the modified files should be - * included in this. Files that are not included in the update of a deployment - * will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $files; - /** - * Optional. Labels are key-value attributes that can be set on a deployment - * resource by the user. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Deployment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the deployment was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Source provider is the author of a public blueprint, from - * which this deployment is created. - * - * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_provider = ''; - /** - * Optional. Immutable. The WorkloadCluster on which to create the Deployment. - * This field should only be passed when the deployment_level of the source - * blueprint specifies deployments on workload clusters e.g. - * WORKLOAD_CLUSTER_DEPLOYMENT. - * - * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $workload_cluster = ''; - /** - * Output only. Attributes to where the deployment can inflict changes. The - * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deployment_level = 0; - /** - * Output only. Indicates if the deployment can be rolled back, exported from - * public blueprint. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rollback_support = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the deployment. - * @type string $revision_id - * Output only. Immutable. The revision ID of the deployment. - * A new revision is committed whenever a change in deployment is applied. - * @type string $source_blueprint_revision - * Required. The blueprint revision from which this deployment was created. - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp that the revision was created. - * @type int $state - * Output only. State of the deployment (DRAFT, APPLIED, DELETING). - * @type string $display_name - * Optional. Human readable name of a Deployment. - * @type string $repository - * Output only. Name of the repository where the deployment package files are - * stored. - * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files - * Optional. Files present in a deployment. - * When invoking UpdateDeployment API, only the modified files should be - * included in this. Files that are not included in the update of a deployment - * will not be changed. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels are key-value attributes that can be set on a deployment - * resource by the user. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Deployment creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the deployment was updated. - * @type string $source_provider - * Output only. Source provider is the author of a public blueprint, from - * which this deployment is created. - * @type string $workload_cluster - * Optional. Immutable. The WorkloadCluster on which to create the Deployment. - * This field should only be passed when the deployment_level of the source - * blueprint specifies deployments on workload clusters e.g. - * WORKLOAD_CLUSTER_DEPLOYMENT. - * @type int $deployment_level - * Output only. Attributes to where the deployment can inflict changes. The - * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. - * @type bool $rollback_support - * Output only. Indicates if the deployment can be rolled back, exported from - * public blueprint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The name of the deployment. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the deployment. - * - * 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. Immutable. The revision ID of the deployment. - * A new revision is committed whenever a change in deployment is applied. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. Immutable. The revision ID of the deployment. - * A new revision is committed whenever a change in deployment is applied. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Required. The blueprint revision from which this deployment was created. - * - * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceBlueprintRevision() - { - return $this->source_blueprint_revision; - } - - /** - * Required. The blueprint revision from which this deployment was created. - * - * Generated from protobuf field string source_blueprint_revision = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceBlueprintRevision($var) - { - GPBUtil::checkString($var, True); - $this->source_blueprint_revision = $var; - - return $this; - } - - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * Output only. State of the deployment (DRAFT, APPLIED, DELETING). - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the deployment (DRAFT, APPLIED, DELETING). - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Deployment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Human readable name of a Deployment. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Human readable name of a Deployment. - * - * Generated from protobuf field string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Name of the repository where the deployment package files are - * stored. - * - * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Output only. Name of the repository where the deployment package files are - * stored. - * - * Generated from protobuf field string repository = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkString($var, True); - $this->repository = $var; - - return $this; - } - - /** - * Optional. Files present in a deployment. - * When invoking UpdateDeployment API, only the modified files should be - * included in this. Files that are not included in the update of a deployment - * will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFiles() - { - return $this->files; - } - - /** - * Optional. Files present in a deployment. - * When invoking UpdateDeployment API, only the modified files should be - * included in this. Files that are not included in the update of a deployment - * will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); - $this->files = $arr; - - return $this; - } - - /** - * Optional. Labels are key-value attributes that can be set on a deployment - * resource by the user. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels are key-value attributes that can be set on a deployment - * resource by the user. - * - * Generated from protobuf field map labels = 9 [(.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. Deployment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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. Deployment creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.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 when the deployment was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.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 when the deployment was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.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. Source provider is the author of a public blueprint, from - * which this deployment is created. - * - * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceProvider() - { - return $this->source_provider; - } - - /** - * Output only. Source provider is the author of a public blueprint, from - * which this deployment is created. - * - * Generated from protobuf field string source_provider = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceProvider($var) - { - GPBUtil::checkString($var, True); - $this->source_provider = $var; - - return $this; - } - - /** - * Optional. Immutable. The WorkloadCluster on which to create the Deployment. - * This field should only be passed when the deployment_level of the source - * blueprint specifies deployments on workload clusters e.g. - * WORKLOAD_CLUSTER_DEPLOYMENT. - * - * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getWorkloadCluster() - { - return $this->workload_cluster; - } - - /** - * Optional. Immutable. The WorkloadCluster on which to create the Deployment. - * This field should only be passed when the deployment_level of the source - * blueprint specifies deployments on workload clusters e.g. - * WORKLOAD_CLUSTER_DEPLOYMENT. - * - * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setWorkloadCluster($var) - { - GPBUtil::checkString($var, True); - $this->workload_cluster = $var; - - return $this; - } - - /** - * Output only. Attributes to where the deployment can inflict changes. The - * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDeploymentLevel() - { - return $this->deployment_level; - } - - /** - * Output only. Attributes to where the deployment can inflict changes. The - * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDeploymentLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); - $this->deployment_level = $var; - - return $this; - } - - /** - * Output only. Indicates if the deployment can be rolled back, exported from - * public blueprint. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRollbackSupport() - { - return $this->rollback_support; - } - - /** - * Output only. Indicates if the deployment can be rolled back, exported from - * public blueprint. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRollbackSupport($var) - { - GPBUtil::checkBool($var); - $this->rollback_support = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php deleted file mode 100644 index 0b3b8df63823..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Deployment/State.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.telcoautomation.v1.Deployment.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A deployment starts in DRAFT state. All edits are made in DRAFT state. A - * deployment opened for editing after applying will be in draft state, - * while its prevision revision will be its current applied version. - * - * Generated from protobuf enum DRAFT = 1; - */ - const DRAFT = 1; - /** - * This state means that the contents (YAML files containing kubernetes - * resources) of the deployment have been applied to an Orchestration or - * Workload Cluster. A revision is created when a deployment is applied. - * This revision will represent the latest view of what is applied on the - * cluster until the deployment is modified and applied again, which will - * create a new revision. - * - * Generated from protobuf enum APPLIED = 2; - */ - const APPLIED = 2; - /** - * A deployment in DELETING state has been marked for deletion. Its - * deletion status can be queried using `ComputeDeploymentStatus` API. No - * updates are allowed to a deployment in DELETING state. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::DRAFT => 'DRAFT', - self::APPLIED => 'APPLIED', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\Deployment_State::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php deleted file mode 100644 index f30a5e1284f6..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentLevel.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.telcoautomation.v1.DeploymentLevel - */ -class DeploymentLevel -{ - /** - * Default unspecified deployment level. - * - * Generated from protobuf enum DEPLOYMENT_LEVEL_UNSPECIFIED = 0; - */ - const DEPLOYMENT_LEVEL_UNSPECIFIED = 0; - /** - * Blueprints at HYDRATION level cannot be used to create a Deployment - * (A user cannot manually initate deployment of these blueprints on - * orchestration or workload cluster). - * These blueprints stay in a user's private catalog and are configured and - * deployed by TNA automation. - * - * Generated from protobuf enum HYDRATION = 1; - */ - const HYDRATION = 1; - /** - * Blueprints at SINGLE_DEPLOYMENT level can be - * a) Modified in private catalog. - * b) Used to create a deployment on orchestration cluster by the user, once - * approved. - * - * Generated from protobuf enum SINGLE_DEPLOYMENT = 2; - */ - const SINGLE_DEPLOYMENT = 2; - /** - * Blueprints at MULTI_DEPLOYMENT level can be - * a) Modified in private catalog. - * b) Used to create a deployment on orchestration cluster which will create - * further hydrated deployments. - * - * Generated from protobuf enum MULTI_DEPLOYMENT = 3; - */ - const MULTI_DEPLOYMENT = 3; - /** - * Blueprints at WORKLOAD_CLUSTER_DEPLOYMENT level can be - * a) Modified in private catalog. - * b) Used to create a deployment on workload cluster by the user, once - * approved. - * - * Generated from protobuf enum WORKLOAD_CLUSTER_DEPLOYMENT = 4; - */ - const WORKLOAD_CLUSTER_DEPLOYMENT = 4; - - private static $valueToName = [ - self::DEPLOYMENT_LEVEL_UNSPECIFIED => 'DEPLOYMENT_LEVEL_UNSPECIFIED', - self::HYDRATION => 'HYDRATION', - self::SINGLE_DEPLOYMENT => 'SINGLE_DEPLOYMENT', - self::MULTI_DEPLOYMENT => 'MULTI_DEPLOYMENT', - self::WORKLOAD_CLUSTER_DEPLOYMENT => 'WORKLOAD_CLUSTER_DEPLOYMENT', - ]; - - 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php deleted file mode 100644 index 22be9d27a288..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DeploymentView.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.telcoautomation.v1.DeploymentView - */ -class DeploymentView -{ - /** - * Unspecified enum value. - * - * Generated from protobuf enum DEPLOYMENT_VIEW_UNSPECIFIED = 0; - */ - const DEPLOYMENT_VIEW_UNSPECIFIED = 0; - /** - * View which only contains metadata. - * - * Generated from protobuf enum DEPLOYMENT_VIEW_BASIC = 1; - */ - const DEPLOYMENT_VIEW_BASIC = 1; - /** - * View which contains metadata and files it encapsulates. - * - * Generated from protobuf enum DEPLOYMENT_VIEW_FULL = 2; - */ - const DEPLOYMENT_VIEW_FULL = 2; - - private static $valueToName = [ - self::DEPLOYMENT_VIEW_UNSPECIFIED => 'DEPLOYMENT_VIEW_UNSPECIFIED', - self::DEPLOYMENT_VIEW_BASIC => 'DEPLOYMENT_VIEW_BASIC', - self::DEPLOYMENT_VIEW_FULL => 'DEPLOYMENT_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php deleted file mode 100644 index 7b4d9258c0eb..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.DiscardBlueprintChangesRequest - */ -class DiscardBlueprintChangesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the blueprint of which changes are being discarded. - * - * 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 blueprint of which changes are being discarded. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\DiscardBlueprintChangesRequest - * - * @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 blueprint of which changes are being discarded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the blueprint of which changes are being discarded. - * - * 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 blueprint of which changes are being discarded. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php deleted file mode 100644 index 3fa79c1c86ed..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardBlueprintChangesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.telcoautomation.v1.DiscardBlueprintChangesResponse - */ -class DiscardBlueprintChangesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php deleted file mode 100644 index 43f2d7329008..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.DiscardDeploymentChangesRequest - */ -class DiscardDeploymentChangesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment of which changes are being discarded. - * - * 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 deployment of which changes are being discarded. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\DiscardDeploymentChangesRequest - * - * @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 deployment of which changes are being discarded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment of which changes are being discarded. - * - * 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 deployment of which changes are being discarded. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php deleted file mode 100644 index 7699c38576c8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/DiscardDeploymentChangesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.telcoautomation.v1.DiscardDeploymentChangesResponse - */ -class DiscardDeploymentChangesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php deleted file mode 100644 index 39267d98f3dc..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm.php +++ /dev/null @@ -1,343 +0,0 @@ -google.cloud.telcoautomation.v1.EdgeSlm - */ -class EdgeSlm extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the EdgeSlm resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Immutable. Reference to the orchestration cluster on which templates for - * this resources will be applied. This should be of format - * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. - * - * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $orchestration_cluster = ''; - /** - * Output only. [Output only] Create time stamp. - * - * 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 time stamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels as key value pairs. The key and value should contain - * characters which are UTF-8 compliant and less than 50 characters. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Provides the active TNA version for this resource. - * - * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tna_version = ''; - /** - * Output only. State of the EdgeSlm resource. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. Type of workload cluster for which an EdgeSLM resource is - * created. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $workload_cluster_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the EdgeSlm resource. - * @type string $orchestration_cluster - * Immutable. Reference to the orchestration cluster on which templates for - * this resources will be applied. This should be of format - * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs. The key and value should contain - * characters which are UTF-8 compliant and less than 50 characters. - * @type string $tna_version - * Output only. Provides the active TNA version for this resource. - * @type int $state - * Output only. State of the EdgeSlm resource. - * @type int $workload_cluster_type - * Optional. Type of workload cluster for which an EdgeSLM resource is - * created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Name of the EdgeSlm resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the EdgeSlm 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; - } - - /** - * Immutable. Reference to the orchestration cluster on which templates for - * this resources will be applied. This should be of format - * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. - * - * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getOrchestrationCluster() - { - return $this->orchestration_cluster; - } - - /** - * Immutable. Reference to the orchestration cluster on which templates for - * this resources will be applied. This should be of format - * projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}. - * - * Generated from protobuf field string orchestration_cluster = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOrchestrationCluster($var) - { - GPBUtil::checkString($var, True); - $this->orchestration_cluster = $var; - - return $this; - } - - /** - * Output only. [Output only] Create time stamp. - * - * 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 time stamp. - * - * 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 time stamp. - * - * 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 time stamp. - * - * 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; - } - - /** - * Optional. Labels as key value pairs. The key and value should contain - * characters which are UTF-8 compliant and less than 50 characters. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs. The key and value should contain - * characters which are UTF-8 compliant and less than 50 characters. - * - * Generated from protobuf field map labels = 4 [(.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. Provides the active TNA version for this resource. - * - * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTnaVersion() - { - return $this->tna_version; - } - - /** - * Output only. Provides the active TNA version for this resource. - * - * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTnaVersion($var) - { - GPBUtil::checkString($var, True); - $this->tna_version = $var; - - return $this; - } - - /** - * Output only. State of the EdgeSlm resource. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the EdgeSlm resource. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. Type of workload cluster for which an EdgeSLM resource is - * created. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWorkloadClusterType() - { - return $this->workload_cluster_type; - } - - /** - * Optional. Type of workload cluster for which an EdgeSLM resource is - * created. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType workload_cluster_type = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWorkloadClusterType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\EdgeSlm\WorkloadClusterType::class); - $this->workload_cluster_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php deleted file mode 100644 index 82fcd65e0ab5..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.telcoautomation.v1.EdgeSlm.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * EdgeSlm is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * EdgeSlm has been created and is ready for use. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * EdgeSlm is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * EdgeSlm encountered an error and is in an indeterministic - * state. User can still initiate a delete operation on this state. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\EdgeSlm_State::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php deleted file mode 100644 index 41f286b4ac3b..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/EdgeSlm/WorkloadClusterType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.telcoautomation.v1.EdgeSlm.WorkloadClusterType - */ -class WorkloadClusterType -{ - /** - * Unspecified workload cluster. - * - * Generated from protobuf enum WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0; - */ - const WORKLOAD_CLUSTER_TYPE_UNSPECIFIED = 0; - /** - * Workload cluster is a GDCE cluster. - * - * Generated from protobuf enum GDCE = 1; - */ - const GDCE = 1; - /** - * Workload cluster is a GKE cluster. - * - * Generated from protobuf enum GKE = 2; - */ - const GKE = 2; - - private static $valueToName = [ - self::WORKLOAD_CLUSTER_TYPE_UNSPECIFIED => 'WORKLOAD_CLUSTER_TYPE_UNSPECIFIED', - self::GDCE => 'GDCE', - self::GKE => 'GKE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WorkloadClusterType::class, \Google\Cloud\TelcoAutomation\V1\EdgeSlm_WorkloadClusterType::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php deleted file mode 100644 index d5b01324ed6c..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/File.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.telcoautomation.v1.File - */ -class File extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Path of the file in package. - * e.g. `gdce/v1/cluster.yaml` - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $path = ''; - /** - * Optional. The contents of a file in string format. - * - * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $content = ''; - /** - * Optional. Signifies whether a file is marked for deletion. - * - * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deleted = false; - /** - * Optional. Indicates whether changes are allowed to a file. If the field is - * not set, the file cannot be edited. - * - * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $editable = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Required. Path of the file in package. - * e.g. `gdce/v1/cluster.yaml` - * @type string $content - * Optional. The contents of a file in string format. - * @type bool $deleted - * Optional. Signifies whether a file is marked for deletion. - * @type bool $editable - * Optional. Indicates whether changes are allowed to a file. If the field is - * not set, the file cannot be edited. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Path of the file in package. - * e.g. `gdce/v1/cluster.yaml` - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Required. Path of the file in package. - * e.g. `gdce/v1/cluster.yaml` - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Optional. The contents of a file in string format. - * - * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Optional. The contents of a file in string format. - * - * Generated from protobuf field string content = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * Optional. Signifies whether a file is marked for deletion. - * - * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDeleted() - { - return $this->deleted; - } - - /** - * Optional. Signifies whether a file is marked for deletion. - * - * Generated from protobuf field bool deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDeleted($var) - { - GPBUtil::checkBool($var); - $this->deleted = $var; - - return $this; - } - - /** - * Optional. Indicates whether changes are allowed to a file. If the field is - * not set, the file cannot be edited. - * - * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEditable() - { - return $this->editable; - } - - /** - * Optional. Indicates whether changes are allowed to a file. If the field is - * not set, the file cannot be edited. - * - * Generated from protobuf field bool editable = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEditable($var) - { - GPBUtil::checkBool($var); - $this->editable = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php deleted file mode 100644 index 9a1138aa7425..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/FullManagementConfig.php +++ /dev/null @@ -1,383 +0,0 @@ -google.cloud.telcoautomation.v1.FullManagementConfig - */ -class FullManagementConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet = ''; - /** - * Optional. The /28 network that the masters will use. - * - * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_ipv4_cidr_block = ''; - /** - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_cidr_block = ''; - /** - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $services_cidr_block = ''; - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_named_range = ''; - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $services_named_range = ''; - /** - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_authorized_networks_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * @type string $subnet - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * @type string $master_ipv4_cidr_block - * Optional. The /28 network that the masters will use. - * @type string $cluster_cidr_block - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * @type string $services_cidr_block - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * @type string $cluster_named_range - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * @type string $services_named_range - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * @type \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - - /** - * Optional. The /28 network that the masters will use. - * - * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMasterIpv4CidrBlock() - { - return $this->master_ipv4_cidr_block; - } - - /** - * Optional. The /28 network that the masters will use. - * - * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMasterIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->master_ipv4_cidr_block = $var; - - return $this; - } - - /** - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterCidrBlock() - { - return $this->cluster_cidr_block; - } - - /** - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cluster_cidr_block = $var; - - return $this; - } - - /** - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServicesCidrBlock() - { - return $this->services_cidr_block; - } - - /** - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServicesCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->services_cidr_block = $var; - - return $this; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterNamedRange() - { - return $this->cluster_named_range; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterNamedRange($var) - { - GPBUtil::checkString($var, True); - $this->cluster_named_range = $var; - - return $this; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServicesNamedRange() - { - return $this->services_named_range; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServicesNamedRange($var) - { - GPBUtil::checkString($var, True); - $this->services_named_range = $var; - - return $this; - } - - /** - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig|null - */ - public function getMasterAuthorizedNetworksConfig() - { - return $this->master_authorized_networks_config; - } - - public function hasMasterAuthorizedNetworksConfig() - { - return isset($this->master_authorized_networks_config); - } - - public function clearMasterAuthorizedNetworksConfig() - { - unset($this->master_authorized_networks_config); - } - - /** - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $var - * @return $this - */ - public function setMasterAuthorizedNetworksConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig::class); - $this->master_authorized_networks_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php deleted file mode 100644 index 5ff49a3cb1b2..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetBlueprintRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.telcoautomation.v1.GetBlueprintRequest - */ -class GetBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the blueprint. - * Case 1: If the name provided in the request is - * {blueprint_id}@{revision_id}, then the revision with revision_id will be - * returned. Case 2: If the name provided in the request is {blueprint}, then - * the current state of the blueprint is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Defines the type of view of the blueprint. - * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the blueprint. - * Case 1: If the name provided in the request is - * {blueprint_id}@{revision_id}, then the revision with revision_id will be - * returned. Case 2: If the name provided in the request is {blueprint}, then - * the current state of the blueprint is returned. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\GetBlueprintRequest - * - * @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 blueprint. - * Case 1: If the name provided in the request is - * {blueprint_id}@{revision_id}, then the revision with revision_id will be - * returned. Case 2: If the name provided in the request is {blueprint}, then - * the current state of the blueprint is returned. - * @type int $view - * Optional. Defines the type of view of the blueprint. - * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the blueprint. - * Case 1: If the name provided in the request is - * {blueprint_id}@{revision_id}, then the revision with revision_id will be - * returned. Case 2: If the name provided in the request is {blueprint}, then - * the current state of the blueprint is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the blueprint. - * Case 1: If the name provided in the request is - * {blueprint_id}@{revision_id}, then the revision with revision_id will be - * returned. Case 2: If the name provided in the request is {blueprint}, then - * the current state of the blueprint is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Defines the type of view of the blueprint. - * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Defines the type of view of the blueprint. - * When field is not present BLUEPRINT_VIEW_BASIC is considered as default. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.BlueprintView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\BlueprintView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php deleted file mode 100644 index 246d68fc20e7..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetDeploymentRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.telcoautomation.v1.GetDeploymentRequest - */ -class GetDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment. - * Case 1: If the name provided in the request is - * {deployment_id}@{revision_id}, then the revision with revision_id will be - * returned. - * Case 2: If the name provided in the request is {deployment}, then - * the current state of the deployment is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Defines the type of view of the deployment. - * When field is not present VIEW_BASIC is considered as default. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the deployment. - * Case 1: If the name provided in the request is - * {deployment_id}@{revision_id}, then the revision with revision_id will be - * returned. - * Case 2: If the name provided in the request is {deployment}, then - * the current state of the deployment is returned. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\GetDeploymentRequest - * - * @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 deployment. - * Case 1: If the name provided in the request is - * {deployment_id}@{revision_id}, then the revision with revision_id will be - * returned. - * Case 2: If the name provided in the request is {deployment}, then - * the current state of the deployment is returned. - * @type int $view - * Optional. Defines the type of view of the deployment. - * When field is not present VIEW_BASIC is considered as default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment. - * Case 1: If the name provided in the request is - * {deployment_id}@{revision_id}, then the revision with revision_id will be - * returned. - * Case 2: If the name provided in the request is {deployment}, then - * the current state of the deployment is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the deployment. - * Case 1: If the name provided in the request is - * {deployment_id}@{revision_id}, then the revision with revision_id will be - * returned. - * Case 2: If the name provided in the request is {deployment}, then - * the current state of the deployment is returned. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Defines the type of view of the deployment. - * When field is not present VIEW_BASIC is considered as default. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Defines the type of view of the deployment. - * When field is not present VIEW_BASIC is considered as default. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php deleted file mode 100644 index 64848428d743..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetEdgeSlmRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.GetEdgeSlmRequest - */ -class GetEdgeSlmRequest 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 TelcoAutomationClient::edgeSlmName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\GetEdgeSlmRequest - * - * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php deleted file mode 100644 index 895c91bcdec2..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetHydratedDeploymentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.GetHydratedDeploymentRequest - */ -class GetHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the hydrated deployment. - * - * 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 hydrated deployment. Please see - * {@see TelcoAutomationClient::hydratedDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\GetHydratedDeploymentRequest - * - * @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 hydrated deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the hydrated deployment. - * - * 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 hydrated deployment. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php deleted file mode 100644 index 4fc7dcd45bee..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetOrchestrationClusterRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.GetOrchestrationClusterRequest - */ -class GetOrchestrationClusterRequest 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 TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\GetOrchestrationClusterRequest - * - * @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\Telcoautomation\V1\Telcoautomation::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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php deleted file mode 100644 index 825d020fa884..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/GetPublicBlueprintRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.GetPublicBlueprintRequest - */ -class GetPublicBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the public blueprint. - * - * 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 public blueprint. Please see - * {@see TelcoAutomationClient::publicBlueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\GetPublicBlueprintRequest - * - * @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 public blueprint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the public blueprint. - * - * 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 public blueprint. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php deleted file mode 100644 index efc74725b2e4..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.telcoautomation.v1.HydratedDeployment - */ -class HydratedDeployment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the hydrated deployment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. State of the hydrated deployment (DRAFT, APPLIED). - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. File contents of a hydrated deployment. - * When invoking UpdateHydratedBlueprint API, only the modified files should - * be included in this. Files that are not included in the update of a - * hydrated deployment will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $files; - /** - * Output only. WorkloadCluster identifies which workload cluster will the - * hydrated deployment will be deployed on. - * - * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the hydrated deployment. - * @type int $state - * Output only. State of the hydrated deployment (DRAFT, APPLIED). - * @type array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $files - * Optional. File contents of a hydrated deployment. - * When invoking UpdateHydratedBlueprint API, only the modified files should - * be included in this. Files that are not included in the update of a - * hydrated deployment will not be changed. - * @type string $workload_cluster - * Output only. WorkloadCluster identifies which workload cluster will the - * hydrated deployment will be deployed on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the hydrated deployment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the hydrated deployment. - * - * 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. State of the hydrated deployment (DRAFT, APPLIED). - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the hydrated deployment (DRAFT, APPLIED). - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. File contents of a hydrated deployment. - * When invoking UpdateHydratedBlueprint API, only the modified files should - * be included in this. Files that are not included in the update of a - * hydrated deployment will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFiles() - { - return $this->files; - } - - /** - * Optional. File contents of a hydrated deployment. - * When invoking UpdateHydratedBlueprint API, only the modified files should - * be included in this. Files that are not included in the update of a - * hydrated deployment will not be changed. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.File files = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\TelcoAutomation\V1\File>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\File::class); - $this->files = $arr; - - return $this; - } - - /** - * Output only. WorkloadCluster identifies which workload cluster will the - * hydrated deployment will be deployed on. - * - * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkloadCluster() - { - return $this->workload_cluster; - } - - /** - * Output only. WorkloadCluster identifies which workload cluster will the - * hydrated deployment will be deployed on. - * - * Generated from protobuf field string workload_cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkloadCluster($var) - { - GPBUtil::checkString($var, True); - $this->workload_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php deleted file mode 100644 index 8e9287c16123..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydratedDeployment/State.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.telcoautomation.v1.HydratedDeployment.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * A hydrated deployment starts in DRAFT state. All edits are made in DRAFT - * state. - * - * Generated from protobuf enum DRAFT = 1; - */ - const DRAFT = 1; - /** - * When the edit is applied, the hydrated deployment moves to APPLIED - * state. No changes can be made once a hydrated deployment is applied. - * - * Generated from protobuf enum APPLIED = 2; - */ - const APPLIED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::DRAFT => 'DRAFT', - self::APPLIED => 'APPLIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment_State::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php deleted file mode 100644 index 46c4cdb1c2c8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/HydrationStatus.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.telcoautomation.v1.HydrationStatus - */ -class HydrationStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. SiteVersion Hydration is targeting. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $site_version = null; - /** - * Output only. Status. - * - * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TelcoAutomation\V1\SiteVersion $site_version - * Output only. SiteVersion Hydration is targeting. - * @type string $status - * Output only. Status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. SiteVersion Hydration is targeting. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\TelcoAutomation\V1\SiteVersion|null - */ - public function getSiteVersion() - { - return $this->site_version; - } - - public function hasSiteVersion() - { - return isset($this->site_version); - } - - public function clearSiteVersion() - { - unset($this->site_version); - } - - /** - * Output only. SiteVersion Hydration is targeting. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\TelcoAutomation\V1\SiteVersion $var - * @return $this - */ - public function setSiteVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\SiteVersion::class); - $this->site_version = $var; - - return $this; - } - - /** - * Output only. Status. - * - * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Output only. Status. - * - * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkString($var, True); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php deleted file mode 100644 index baedb5d45cad..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.telcoautomation.v1.ListBlueprintRevisionsRequest - */ -class ListBlueprintRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the blueprint to list revisions for. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The maximum number of revisions to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token, received from a previous ListBlueprintRevisions call - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The name of the blueprint to list revisions for. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListBlueprintRevisionsRequest - * - * @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 blueprint to list revisions for. - * @type int $page_size - * The maximum number of revisions to return per page. - * @type string $page_token - * The page token, received from a previous ListBlueprintRevisions call - * It can be provided to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the blueprint to list revisions for. - * - * 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 blueprint to list revisions for. - * - * 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 maximum number of revisions to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of revisions to return per page. - * - * 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 page token, received from a previous ListBlueprintRevisions call - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token, received from a previous ListBlueprintRevisions call - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php deleted file mode 100644 index c935afeb4fe9..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.ListBlueprintRevisionsResponse - */ -class ListBlueprintRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The revisions of the blueprint. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - */ - private $blueprints; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints - * The revisions of the blueprint. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The revisions of the blueprint. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBlueprints() - { - return $this->blueprints; - } - - /** - * The revisions of the blueprint. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBlueprints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); - $this->blueprints = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php deleted file mode 100644 index 2b9f18e3d3cd..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsRequest.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.telcoautomation.v1.ListBlueprintsRequest - */ -class ListBlueprintsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filtering only supports equality on blueprint state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The maximum number of blueprints to return per page. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, received from a previous ListBlueprints call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see - * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListBlueprintsRequest - * - * @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 parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * @type string $filter - * Optional. Filtering only supports equality on blueprint state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - * @type int $page_size - * Optional. The maximum number of blueprints to return per page. - * @type string $page_token - * Optional. The page token, received from a previous ListBlueprints call. - * It can be provided to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Filtering only supports equality on blueprint state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering only supports equality on blueprint state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = PROPOSED". - * - * 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; - } - - /** - * Optional. The maximum number of blueprints to return per page. - * - * 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 blueprints to return per page. - * - * 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. The page token, received from a previous ListBlueprints call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, received from a previous ListBlueprints call. - * It can be provided to retrieve the subsequent page. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php deleted file mode 100644 index 98af4e8efc40..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListBlueprintsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.ListBlueprintsResponse - */ -class ListBlueprintsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested blueprints. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - */ - private $blueprints; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints - * The list of requested blueprints. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested blueprints. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBlueprints() - { - return $this->blueprints; - } - - /** - * The list of requested blueprints. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBlueprints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); - $this->blueprints = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php deleted file mode 100644 index a5b6236e0de4..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.telcoautomation.v1.ListDeploymentRevisionsRequest - */ -class ListDeploymentRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the deployment to list revisions for. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The maximum number of revisions to return per page. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, received from a previous ListDeploymentRevisions - * call Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The name of the deployment to list revisions for. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListDeploymentRevisionsRequest - * - * @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 deployment to list revisions for. - * @type int $page_size - * Optional. The maximum number of revisions to return per page. - * @type string $page_token - * Optional. The page token, received from a previous ListDeploymentRevisions - * call Provide this to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the deployment to list revisions for. - * - * 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 deployment to list revisions for. - * - * 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 maximum number of revisions to return per page. - * - * 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 revisions to return per page. - * - * 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. The page token, received from a previous ListDeploymentRevisions - * call Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, received from a previous ListDeploymentRevisions - * call Provide this to retrieve the subsequent page. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php deleted file mode 100644 index 977b44de59c2..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.ListDeploymentRevisionsResponse - */ -class ListDeploymentRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The revisions of the deployment. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - */ - private $deployments; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * The revisions of the deployment. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The revisions of the deployment. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * The revisions of the deployment. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); - $this->deployments = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php deleted file mode 100644 index 6b3f2db56d61..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsRequest.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.telcoautomation.v1.ListDeploymentsRequest - */ -class ListDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filtering only supports equality on deployment state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The maximum number of deployments to return per page. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, received from a previous ListDeployments call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see - * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListDeploymentsRequest - * - * @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 parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * @type string $filter - * Optional. Filtering only supports equality on deployment state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - * @type int $page_size - * Optional. The maximum number of deployments to return per page. - * @type string $page_token - * Optional. The page token, received from a previous ListDeployments call. - * It can be provided to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Filtering only supports equality on deployment state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering only supports equality on deployment state. - * It should be in the form: "state = DRAFT". `OR` operator can be used to - * get response for multiple states. e.g. "state = DRAFT OR state = APPLIED". - * - * 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; - } - - /** - * Optional. The maximum number of deployments to return per page. - * - * 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 deployments to return per page. - * - * 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. The page token, received from a previous ListDeployments call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, received from a previous ListDeployments call. - * It can be provided to retrieve the subsequent page. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php deleted file mode 100644 index 451c88afd295..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListDeploymentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.ListDeploymentsResponse - */ -class ListDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - */ - private $deployments; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * The list of requested deployments. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * The list of requested deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); - $this->deployments = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php deleted file mode 100644 index 3fd5a27fa80a..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.telcoautomation.v1.ListEdgeSlmsRequest - */ -class ListEdgeSlmsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListEdgeSlmsRequest - * - * 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 ListEdgeSlmsRequest - * Please see {@see TelcoAutomationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListEdgeSlmsRequest - * - * @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 ListEdgeSlmsRequest - * @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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListEdgeSlmsRequest - * - * 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 ListEdgeSlmsRequest - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php deleted file mode 100644 index 381a04774e22..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListEdgeSlmsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.telcoautomation.v1.ListEdgeSlmsResponse - */ -class ListEdgeSlmsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of EdgeSlm - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; - */ - private $edge_slms; - /** - * 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 array<\Google\Cloud\TelcoAutomation\V1\EdgeSlm>|\Google\Protobuf\Internal\RepeatedField $edge_slms - * The list of EdgeSlm - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of EdgeSlm - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEdgeSlms() - { - return $this->edge_slms; - } - - /** - * The list of EdgeSlm - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.EdgeSlm edge_slms = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\EdgeSlm>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEdgeSlms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\EdgeSlm::class); - $this->edge_slms = $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php deleted file mode 100644 index c25e8a018545..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.telcoautomation.v1.ListHydratedDeploymentsRequest - */ -class ListHydratedDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The deployment managing the hydrated deployments. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of hydrated deployments to return. The service - * may return fewer than this value. If unspecified, at most 50 hydrated - * deployments will be returned. The maximum value is 1000. Values above 1000 - * will be set to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, received from a previous ListHydratedDeployments - * call. Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The deployment managing the hydrated deployments. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListHydratedDeploymentsRequest - * - * @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 deployment managing the hydrated deployments. - * @type int $page_size - * Optional. The maximum number of hydrated deployments to return. The service - * may return fewer than this value. If unspecified, at most 50 hydrated - * deployments will be returned. The maximum value is 1000. Values above 1000 - * will be set to 1000. - * @type string $page_token - * Optional. The page token, received from a previous ListHydratedDeployments - * call. Provide this to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The deployment managing the hydrated deployments. - * - * 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 deployment managing the hydrated deployments. - * - * 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 maximum number of hydrated deployments to return. The service - * may return fewer than this value. If unspecified, at most 50 hydrated - * deployments will be returned. The maximum value is 1000. Values above 1000 - * will be set 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. The maximum number of hydrated deployments to return. The service - * may return fewer than this value. If unspecified, at most 50 hydrated - * deployments will be returned. The maximum value is 1000. Values above 1000 - * will be set 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. The page token, received from a previous ListHydratedDeployments - * call. Provide this to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, received from a previous ListHydratedDeployments - * call. Provide this to retrieve the subsequent page. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php deleted file mode 100644 index bebff355c6f6..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListHydratedDeploymentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.ListHydratedDeploymentsResponse - */ -class ListHydratedDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of hydrated deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; - */ - private $hydrated_deployments; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\HydratedDeployment>|\Google\Protobuf\Internal\RepeatedField $hydrated_deployments - * The list of hydrated deployments. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of hydrated deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHydratedDeployments() - { - return $this->hydrated_deployments; - } - - /** - * The list of hydrated deployments. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployments = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\HydratedDeployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHydratedDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment::class); - $this->hydrated_deployments = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php deleted file mode 100644 index 9577ff201170..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.telcoautomation.v1.ListOrchestrationClustersRequest - */ -class ListOrchestrationClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListOrchestrationClustersRequest - * - * 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 ListOrchestrationClustersRequest - * Please see {@see TelcoAutomationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListOrchestrationClustersRequest - * - * @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 ListOrchestrationClustersRequest - * @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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListOrchestrationClustersRequest - * - * 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 ListOrchestrationClustersRequest - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php deleted file mode 100644 index 762548d5a74b..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListOrchestrationClustersResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.telcoautomation.v1.ListOrchestrationClustersResponse - */ -class ListOrchestrationClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of OrchestrationCluster - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; - */ - private $orchestration_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 array<\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster>|\Google\Protobuf\Internal\RepeatedField $orchestration_clusters - * The list of OrchestrationCluster - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of OrchestrationCluster - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOrchestrationClusters() - { - return $this->orchestration_clusters; - } - - /** - * The list of OrchestrationCluster - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.OrchestrationCluster orchestration_clusters = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOrchestrationClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster::class); - $this->orchestration_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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php deleted file mode 100644 index 29491797f726..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.telcoautomation.v1.ListPublicBlueprintsRequest - */ -class ListPublicBlueprintsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value of public blueprint. - * Format should be - - * "projects/{project_id}/locations/{location_name}". - * - * 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. If unspecified, server will pick an appropriate default. - * - * 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 = ''; - - /** - * @param string $parent Required. Parent value of public blueprint. - * Format should be - - * "projects/{project_id}/locations/{location_name}". Please see - * {@see TelcoAutomationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ListPublicBlueprintsRequest - * - * @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 of public blueprint. - * Format should be - - * "projects/{project_id}/locations/{location_name}". - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value of public blueprint. - * Format should be - - * "projects/{project_id}/locations/{location_name}". - * - * 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 of public blueprint. - * Format should be - - * "projects/{project_id}/locations/{location_name}". - * - * 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. If unspecified, server will pick an appropriate default. - * - * 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. If unspecified, server will pick an appropriate default. - * - * 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; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php deleted file mode 100644 index 8c788b83b9f3..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ListPublicBlueprintsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.ListPublicBlueprintsResponse - */ -class ListPublicBlueprintsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of public blueprints to return. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; - */ - private $public_blueprints; - /** - * Output only. A token identifying a page of results the server should - * return. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\TelcoAutomation\V1\PublicBlueprint>|\Google\Protobuf\Internal\RepeatedField $public_blueprints - * The list of public blueprints to return. - * @type string $next_page_token - * Output only. A token identifying a page of results the server should - * return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of public blueprints to return. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPublicBlueprints() - { - return $this->public_blueprints; - } - - /** - * The list of public blueprints to return. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.PublicBlueprint public_blueprints = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\PublicBlueprint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPublicBlueprints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\PublicBlueprint::class); - $this->public_blueprints = $arr; - - return $this; - } - - /** - * Output only. A token identifying a page of results the server should - * return. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token identifying a page of results the server should - * return. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php deleted file mode 100644 index b4f1b49bdefe..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ManagementConfig.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.telcoautomation.v1.ManagementConfig - */ -class ManagementConfig extends \Google\Protobuf\Internal\Message -{ - protected $oneof_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig $standard_management_config - * Configuration of the standard (GKE) cluster management - * @type \Google\Cloud\TelcoAutomation\V1\FullManagementConfig $full_management_config - * Configuration of the full (Autopilot) cluster management. Full cluster - * management is a preview feature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Configuration of the standard (GKE) cluster management - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.StandardManagementConfig standard_management_config = 1; - * @return \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig|null - */ - public function getStandardManagementConfig() - { - return $this->readOneof(1); - } - - public function hasStandardManagementConfig() - { - return $this->hasOneof(1); - } - - /** - * Configuration of the standard (GKE) cluster management - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.StandardManagementConfig standard_management_config = 1; - * @param \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig $var - * @return $this - */ - public function setStandardManagementConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\StandardManagementConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Configuration of the full (Autopilot) cluster management. Full cluster - * management is a preview feature. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.FullManagementConfig full_management_config = 2; - * @return \Google\Cloud\TelcoAutomation\V1\FullManagementConfig|null - */ - public function getFullManagementConfig() - { - return $this->readOneof(2); - } - - public function hasFullManagementConfig() - { - return $this->hasOneof(2); - } - - /** - * Configuration of the full (Autopilot) cluster management. Full cluster - * management is a preview feature. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.FullManagementConfig full_management_config = 2; - * @param \Google\Cloud\TelcoAutomation\V1\FullManagementConfig $var - * @return $this - */ - public function setFullManagementConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\FullManagementConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getOneofConfig() - { - return $this->whichOneof("oneof_config"); - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php deleted file mode 100644 index fb7c70431adc..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig - */ -class MasterAuthorizedNetworksConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. cidr_blocks define up to 50 external networks that could access - * Kubernetes master through HTTPS. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $cidr_blocks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $cidr_blocks - * Optional. cidr_blocks define up to 50 external networks that could access - * Kubernetes master through HTTPS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Optional. cidr_blocks define up to 50 external networks that could access - * Kubernetes master through HTTPS. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCidrBlocks() - { - return $this->cidr_blocks; - } - - /** - * Optional. cidr_blocks define up to 50 external networks that could access - * Kubernetes master through HTTPS. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig\CidrBlock::class); - $this->cidr_blocks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php deleted file mode 100644 index d6bb751fb2ba..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/MasterAuthorizedNetworksConfig/CidrBlock.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig.CidrBlock - */ -class CidrBlock extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. display_name is an optional field for users to identify CIDR - * blocks. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. cidr_block must be specified in CIDR notation when using - * master_authorized_networks_config. Currently, the user could still use - * the deprecated man_block field, so this field is currently optional, but - * will be required in the future. - * - * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cidr_block = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Optional. display_name is an optional field for users to identify CIDR - * blocks. - * @type string $cidr_block - * Optional. cidr_block must be specified in CIDR notation when using - * master_authorized_networks_config. Currently, the user could still use - * the deprecated man_block field, so this field is currently optional, but - * will be required in the future. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Optional. display_name is an optional field for users to identify CIDR - * blocks. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. display_name is an optional field for users to identify CIDR - * blocks. - * - * Generated from protobuf field string display_name = 1 [(.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. cidr_block must be specified in CIDR notation when using - * master_authorized_networks_config. Currently, the user could still use - * the deprecated man_block field, so this field is currently optional, but - * will be required in the future. - * - * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCidrBlock() - { - return $this->cidr_block; - } - - /** - * Optional. cidr_block must be specified in CIDR notation when using - * master_authorized_networks_config. Currently, the user could still use - * the deprecated man_block field, so this field is currently optional, but - * will be required in the future. - * - * Generated from protobuf field string cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cidr_block = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CidrBlock::class, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig_CidrBlock::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php deleted file mode 100644 index 34b67fa12bcd..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeploySiteStatus.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.telcoautomation.v1.NFDeploySiteStatus - */ -class NFDeploySiteStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Site id. - * - * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $site = ''; - /** - * Output only. If true, the Site Deletion is in progress. - * - * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_deletion = false; - /** - * Output only. Hydration status. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hydration = null; - /** - * Output only. Workload status. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $site - * Output only. Site id. - * @type bool $pending_deletion - * Output only. If true, the Site Deletion is in progress. - * @type \Google\Cloud\TelcoAutomation\V1\HydrationStatus $hydration - * Output only. Hydration status. - * @type \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $workload - * Output only. Workload status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Site id. - * - * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSite() - { - return $this->site; - } - - /** - * Output only. Site id. - * - * Generated from protobuf field string site = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSite($var) - { - GPBUtil::checkString($var, True); - $this->site = $var; - - return $this; - } - - /** - * Output only. If true, the Site Deletion is in progress. - * - * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getPendingDeletion() - { - return $this->pending_deletion; - } - - /** - * Output only. If true, the Site Deletion is in progress. - * - * Generated from protobuf field bool pending_deletion = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setPendingDeletion($var) - { - GPBUtil::checkBool($var); - $this->pending_deletion = $var; - - return $this; - } - - /** - * Output only. Hydration status. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\TelcoAutomation\V1\HydrationStatus|null - */ - public function getHydration() - { - return $this->hydration; - } - - public function hasHydration() - { - return isset($this->hydration); - } - - public function clearHydration() - { - unset($this->hydration); - } - - /** - * Output only. Hydration status. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydrationStatus hydration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\TelcoAutomation\V1\HydrationStatus $var - * @return $this - */ - public function setHydration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydrationStatus::class); - $this->hydration = $var; - - return $this; - } - - /** - * Output only. Workload status. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\TelcoAutomation\V1\WorkloadStatus|null - */ - public function getWorkload() - { - return $this->workload; - } - - public function hasWorkload() - { - return isset($this->workload); - } - - public function clearWorkload() - { - unset($this->workload); - } - - /** - * Output only. Workload status. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.WorkloadStatus workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\TelcoAutomation\V1\WorkloadStatus $var - * @return $this - */ - public function setWorkload($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\WorkloadStatus::class); - $this->workload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php deleted file mode 100644 index 8bfc09183fbf..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/NFDeployStatus.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.telcoautomation.v1.NFDeployStatus - */ -class NFDeployStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Total number of NFs targeted by this deployment - * - * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $targeted_nfs = 0; - /** - * Output only. Total number of NFs targeted by this deployment with a Ready - * Condition set. - * - * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ready_nfs = 0; - /** - * Output only. Per-Site Status. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $sites; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $targeted_nfs - * Output only. Total number of NFs targeted by this deployment - * @type int $ready_nfs - * Output only. Total number of NFs targeted by this deployment with a Ready - * Condition set. - * @type array<\Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus>|\Google\Protobuf\Internal\RepeatedField $sites - * Output only. Per-Site Status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Total number of NFs targeted by this deployment - * - * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTargetedNfs() - { - return $this->targeted_nfs; - } - - /** - * Output only. Total number of NFs targeted by this deployment - * - * Generated from protobuf field int32 targeted_nfs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTargetedNfs($var) - { - GPBUtil::checkInt32($var); - $this->targeted_nfs = $var; - - return $this; - } - - /** - * Output only. Total number of NFs targeted by this deployment with a Ready - * Condition set. - * - * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReadyNfs() - { - return $this->ready_nfs; - } - - /** - * Output only. Total number of NFs targeted by this deployment with a Ready - * Condition set. - * - * Generated from protobuf field int32 ready_nfs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReadyNfs($var) - { - GPBUtil::checkInt32($var); - $this->ready_nfs = $var; - - return $this; - } - - /** - * Output only. Per-Site Status. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSites() - { - return $this->sites; - } - - /** - * Output only. Per-Site Status. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.NFDeploySiteStatus sites = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\NFDeploySiteStatus::class); - $this->sites = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php deleted file mode 100644 index c01fc50eab26..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.telcoautomation.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 been cancelled successfully - * 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 been cancelled successfully - * 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\Telcoautomation\V1\Telcoautomation::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 been cancelled successfully - * 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 been cancelled successfully - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php deleted file mode 100644 index 997a97f6304f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.telcoautomation.v1.OrchestrationCluster - */ -class OrchestrationCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the orchestration cluster. The name of orchestration cluster cannot - * be more than 24 characters. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Management configuration of the underlying GKE cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; - */ - protected $management_config = null; - /** - * Output only. [Output only] Create time stamp. - * - * 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 time stamp. - * - * 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; - /** - * Output only. Provides the TNA version installed on the cluster. - * - * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tna_version = ''; - /** - * Output only. State of the Orchestration Cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the orchestration cluster. The name of orchestration cluster cannot - * be more than 24 characters. - * @type \Google\Cloud\TelcoAutomation\V1\ManagementConfig $management_config - * Management configuration of the underlying GKE cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type string $tna_version - * Output only. Provides the TNA version installed on the cluster. - * @type int $state - * Output only. State of the Orchestration Cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Name of the orchestration cluster. The name of orchestration cluster cannot - * be more than 24 characters. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the orchestration cluster. The name of orchestration cluster cannot - * be more than 24 characters. - * - * 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; - } - - /** - * Management configuration of the underlying GKE cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; - * @return \Google\Cloud\TelcoAutomation\V1\ManagementConfig|null - */ - public function getManagementConfig() - { - return $this->management_config; - } - - public function hasManagementConfig() - { - return isset($this->management_config); - } - - public function clearManagementConfig() - { - unset($this->management_config); - } - - /** - * Management configuration of the underlying GKE cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.ManagementConfig management_config = 5; - * @param \Google\Cloud\TelcoAutomation\V1\ManagementConfig $var - * @return $this - */ - public function setManagementConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\ManagementConfig::class); - $this->management_config = $var; - - return $this; - } - - /** - * Output only. [Output only] Create time stamp. - * - * 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 time stamp. - * - * 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 time stamp. - * - * 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 time stamp. - * - * 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; - } - - /** - * Output only. Provides the TNA version installed on the cluster. - * - * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTnaVersion() - { - return $this->tna_version; - } - - /** - * Output only. Provides the TNA version installed on the cluster. - * - * Generated from protobuf field string tna_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTnaVersion($var) - { - GPBUtil::checkString($var, True); - $this->tna_version = $var; - - return $this; - } - - /** - * Output only. State of the Orchestration Cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the Orchestration Cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.OrchestrationCluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php deleted file mode 100644 index 37e6dbd18bb0..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/OrchestrationCluster/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.telcoautomation.v1.OrchestrationCluster.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * OrchestrationCluster is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * OrchestrationCluster has been created and is ready for use. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * OrchestrationCluster is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * OrchestrationCluster encountered an error and is in an indeterministic - * state. User can still initiate a delete operation on this state. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => '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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\TelcoAutomation\V1\OrchestrationCluster_State::class); - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php deleted file mode 100644 index 55d600ee30af..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ProposeBlueprintRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.ProposeBlueprintRequest - */ -class ProposeBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the blueprint being proposed. - * - * 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 blueprint being proposed. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\ProposeBlueprintRequest - * - * @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 blueprint being proposed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the blueprint being proposed. - * - * 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 blueprint being proposed. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php deleted file mode 100644 index 0f344f29b8ca..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/PublicBlueprint.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.telcoautomation.v1.PublicBlueprint - */ -class PublicBlueprint extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the public blueprint. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The display name of the public blueprint. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The description of the public blueprint. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * DeploymentLevel of a blueprint signifies where the blueprint will be - * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; - */ - protected $deployment_level = 0; - /** - * Source provider is the author of a public blueprint. e.g. Google, vendors - * - * Generated from protobuf field string source_provider = 5; - */ - protected $source_provider = ''; - /** - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rollback_support = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the public blueprint. - * @type string $display_name - * The display name of the public blueprint. - * @type string $description - * The description of the public blueprint. - * @type int $deployment_level - * DeploymentLevel of a blueprint signifies where the blueprint will be - * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * @type string $source_provider - * Source provider is the author of a public blueprint. e.g. Google, vendors - * @type bool $rollback_support - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Name of the public blueprint. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the public blueprint. - * - * 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 display name of the public blueprint. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the public blueprint. - * - * 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 description of the public blueprint. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the public blueprint. - * - * 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; - } - - /** - * DeploymentLevel of a blueprint signifies where the blueprint will be - * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; - * @return int - */ - public function getDeploymentLevel() - { - return $this->deployment_level; - } - - /** - * DeploymentLevel of a blueprint signifies where the blueprint will be - * applied. e.g. [HYDRATION, SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT] - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.DeploymentLevel deployment_level = 4; - * @param int $var - * @return $this - */ - public function setDeploymentLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\DeploymentLevel::class); - $this->deployment_level = $var; - - return $this; - } - - /** - * Source provider is the author of a public blueprint. e.g. Google, vendors - * - * Generated from protobuf field string source_provider = 5; - * @return string - */ - public function getSourceProvider() - { - return $this->source_provider; - } - - /** - * Source provider is the author of a public blueprint. e.g. Google, vendors - * - * Generated from protobuf field string source_provider = 5; - * @param string $var - * @return $this - */ - public function setSourceProvider($var) - { - GPBUtil::checkString($var, True); - $this->source_provider = $var; - - return $this; - } - - /** - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRollbackSupport() - { - return $this->rollback_support; - } - - /** - * Output only. Indicates if the deployment created from this blueprint can be - * rolled back. - * - * Generated from protobuf field bool rollback_support = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRollbackSupport($var) - { - GPBUtil::checkBool($var); - $this->rollback_support = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php deleted file mode 100644 index 7222716ce547..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RejectBlueprintRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.RejectBlueprintRequest - */ -class RejectBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the blueprint being rejected. - * - * 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 blueprint being rejected. Please see - * {@see TelcoAutomationClient::blueprintName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\RejectBlueprintRequest - * - * @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 blueprint being rejected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the blueprint being rejected. - * - * 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 blueprint being rejected. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php deleted file mode 100644 index adae44ce3934..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RemoveDeploymentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.telcoautomation.v1.RemoveDeploymentRequest - */ -class RemoveDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of deployment to initiate delete. - * - * 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 deployment to initiate delete. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * - * @return \Google\Cloud\TelcoAutomation\V1\RemoveDeploymentRequest - * - * @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 deployment to initiate delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of deployment to initiate 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 name of deployment to initiate 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php deleted file mode 100644 index d9beabf366fe..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceStatus.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.telcoautomation.v1.ResourceStatus - */ -class ResourceStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Namespace of the resource. - * - * Generated from protobuf field string resource_namespace = 2; - */ - protected $resource_namespace = ''; - /** - * Group to which the resource belongs to. - * - * Generated from protobuf field string group = 3; - */ - protected $group = ''; - /** - * Version of the resource. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Kind of the resource. - * - * Generated from protobuf field string kind = 5; - */ - protected $kind = ''; - /** - * Output only. Resource type. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resource_type = 0; - /** - * Output only. Status of the resource. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = 0; - /** - * Output only. Detailed status of NFDeploy. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nf_deploy_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the resource. - * @type string $resource_namespace - * Namespace of the resource. - * @type string $group - * Group to which the resource belongs to. - * @type string $version - * Version of the resource. - * @type string $kind - * Kind of the resource. - * @type int $resource_type - * Output only. Resource type. - * @type int $status - * Output only. Status of the resource. - * @type \Google\Cloud\TelcoAutomation\V1\NFDeployStatus $nf_deploy_status - * Output only. Detailed status of NFDeploy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::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; - } - - /** - * Namespace of the resource. - * - * Generated from protobuf field string resource_namespace = 2; - * @return string - */ - public function getResourceNamespace() - { - return $this->resource_namespace; - } - - /** - * Namespace of the resource. - * - * Generated from protobuf field string resource_namespace = 2; - * @param string $var - * @return $this - */ - public function setResourceNamespace($var) - { - GPBUtil::checkString($var, True); - $this->resource_namespace = $var; - - return $this; - } - - /** - * Group to which the resource belongs to. - * - * Generated from protobuf field string group = 3; - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Group to which the resource belongs to. - * - * Generated from protobuf field string group = 3; - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Version of the resource. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the resource. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Kind of the resource. - * - * Generated from protobuf field string kind = 5; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Kind of the resource. - * - * Generated from protobuf field string kind = 5; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Output only. Resource type. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Output only. Resource type. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.ResourceType resource_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\ResourceType::class); - $this->resource_type = $var; - - return $this; - } - - /** - * Output only. Status of the resource. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStatus() - { - return $this->status; - } - - /** - * Output only. Status of the resource. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Status status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TelcoAutomation\V1\Status::class); - $this->status = $var; - - return $this; - } - - /** - * Output only. Detailed status of NFDeploy. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\TelcoAutomation\V1\NFDeployStatus|null - */ - public function getNfDeployStatus() - { - return $this->nf_deploy_status; - } - - public function hasNfDeployStatus() - { - return isset($this->nf_deploy_status); - } - - public function clearNfDeployStatus() - { - unset($this->nf_deploy_status); - } - - /** - * Output only. Detailed status of NFDeploy. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.NFDeployStatus nf_deploy_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\TelcoAutomation\V1\NFDeployStatus $var - * @return $this - */ - public function setNfDeployStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\NFDeployStatus::class); - $this->nf_deploy_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php deleted file mode 100644 index e6f0ba0d7f44..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/ResourceType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.telcoautomation.v1.ResourceType - */ -class ResourceType -{ - /** - * Unspecified resource type. - * - * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; - */ - const RESOURCE_TYPE_UNSPECIFIED = 0; - /** - * User specified NF Deploy CR. - * - * Generated from protobuf enum NF_DEPLOY_RESOURCE = 1; - */ - const NF_DEPLOY_RESOURCE = 1; - /** - * CRs that are part of a blueprint. - * - * Generated from protobuf enum DEPLOYMENT_RESOURCE = 2; - */ - const DEPLOYMENT_RESOURCE = 2; - - private static $valueToName = [ - self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', - self::NF_DEPLOY_RESOURCE => 'NF_DEPLOY_RESOURCE', - self::DEPLOYMENT_RESOURCE => 'DEPLOYMENT_RESOURCE', - ]; - - 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php deleted file mode 100644 index 378f43cd394f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/RollbackDeploymentRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.telcoautomation.v1.RollbackDeploymentRequest - */ -class RollbackDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the deployment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The revision id of deployment to roll back to. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $revision_id = ''; - - /** - * @param string $name Required. Name of the deployment. Please see - * {@see TelcoAutomationClient::deploymentName()} for help formatting this field. - * @param string $revisionId Required. The revision id of deployment to roll back to. - * - * @return \Google\Cloud\TelcoAutomation\V1\RollbackDeploymentRequest - * - * @experimental - */ - public static function build(string $name, string $revisionId): self - { - return (new self()) - ->setName($name) - ->setRevisionId($revisionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the deployment. - * @type string $revision_id - * Required. The revision id of deployment to roll back to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the deployment. - * - * 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 deployment. - * - * 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 revision id of deployment to roll back to. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Required. The revision id of deployment to roll back to. - * - * Generated from protobuf field string revision_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php deleted file mode 100644 index def3ca0e6efe..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.telcoautomation.v1.SearchBlueprintRevisionsRequest - */ -class SearchBlueprintRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Supported queries: - * 1. "" : Lists all revisions across all blueprints. - * 2. "latest=true" : Lists latest revisions across all blueprints. - * 3. "name={name}" : Lists all revisions of blueprint with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of blueprint with name - * {name} - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Optional. The maximum number of blueprints revisions to return per page. - * max page size = 100, default page size = 20. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see - * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * @param string $query Required. Supported queries: - * 1. "" : Lists all revisions across all blueprints. - * 2. "latest=true" : Lists latest revisions across all blueprints. - * 3. "name={name}" : Lists all revisions of blueprint with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of blueprint with name - * {name} - * - * @return \Google\Cloud\TelcoAutomation\V1\SearchBlueprintRevisionsRequest - * - * @experimental - */ - public static function build(string $parent, string $query): self - { - return (new self()) - ->setParent($parent) - ->setQuery($query); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * @type string $query - * Required. Supported queries: - * 1. "" : Lists all revisions across all blueprints. - * 2. "latest=true" : Lists latest revisions across all blueprints. - * 3. "name={name}" : Lists all revisions of blueprint with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of blueprint with name - * {name} - * @type int $page_size - * Optional. The maximum number of blueprints revisions to return per page. - * max page size = 100, default page size = 20. - * @type string $page_token - * Optional. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Supported queries: - * 1. "" : Lists all revisions across all blueprints. - * 2. "latest=true" : Lists latest revisions across all blueprints. - * 3. "name={name}" : Lists all revisions of blueprint with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of blueprint with name - * {name} - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. Supported queries: - * 1. "" : Lists all revisions across all blueprints. - * 2. "latest=true" : Lists latest revisions across all blueprints. - * 3. "name={name}" : Lists all revisions of blueprint with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of blueprint with name - * {name} - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. The maximum number of blueprints revisions to return per page. - * max page size = 100, default page size = 20. - * - * 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 blueprints revisions to return per page. - * max page size = 100, default page size = 20. - * - * 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. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * - * 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; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php deleted file mode 100644 index 34ea86345a84..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchBlueprintRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.SearchBlueprintRevisionsResponse - */ -class SearchBlueprintRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested blueprint revisions. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - */ - private $blueprints; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $blueprints - * The list of requested blueprint revisions. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested blueprint revisions. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBlueprints() - { - return $this->blueprints; - } - - /** - * The list of requested blueprint revisions. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Blueprint blueprints = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\Blueprint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBlueprints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); - $this->blueprints = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php deleted file mode 100644 index 1e5ecd13bc64..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.telcoautomation.v1.SearchDeploymentRevisionsRequest - */ -class SearchDeploymentRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Supported queries: - * 1. "" : Lists all revisions across all deployments. - * 2. "latest=true" : Lists latest revisions across all - * deployments. - * 3. "name={name}" : Lists all revisions of deployment with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of deployment with name - * {name} - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Optional. The maximum number of deployment revisions to return per page. - * max page size = 100, default page size = 20. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". Please see - * {@see TelcoAutomationClient::orchestrationClusterName()} for help formatting this field. - * @param string $query Required. Supported queries: - * 1. "" : Lists all revisions across all deployments. - * 2. "latest=true" : Lists latest revisions across all - * deployments. - * 3. "name={name}" : Lists all revisions of deployment with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of deployment with name - * {name} - * - * @return \Google\Cloud\TelcoAutomation\V1\SearchDeploymentRevisionsRequest - * - * @experimental - */ - public static function build(string $parent, string $query): self - { - return (new self()) - ->setParent($parent) - ->setQuery($query); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * @type string $query - * Required. Supported queries: - * 1. "" : Lists all revisions across all deployments. - * 2. "latest=true" : Lists latest revisions across all - * deployments. - * 3. "name={name}" : Lists all revisions of deployment with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of deployment with name - * {name} - * @type int $page_size - * Optional. The maximum number of deployment revisions to return per page. - * max page size = 100, default page size = 20. - * @type string $page_token - * Optional. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of parent orchestration cluster resource. - * Format should be - - * "projects/{project_id}/locations/{location_name}/orchestrationClusters/{orchestration_cluster}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Supported queries: - * 1. "" : Lists all revisions across all deployments. - * 2. "latest=true" : Lists latest revisions across all - * deployments. - * 3. "name={name}" : Lists all revisions of deployment with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of deployment with name - * {name} - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. Supported queries: - * 1. "" : Lists all revisions across all deployments. - * 2. "latest=true" : Lists latest revisions across all - * deployments. - * 3. "name={name}" : Lists all revisions of deployment with name - * {name}. - * 4. "name={name} latest=true": Lists latest revision of deployment with name - * {name} - * - * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. The maximum number of deployment revisions to return per page. - * max page size = 100, default page size = 20. - * - * 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 deployment revisions to return per page. - * max page size = 100, default page size = 20. - * - * 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. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token, received from a previous search call. - * It can be provided to retrieve the subsequent page. - * - * 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; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php deleted file mode 100644 index 430cb0ea2a8d..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SearchDeploymentRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.telcoautomation.v1.SearchDeploymentRevisionsResponse - */ -class SearchDeploymentRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested deployment revisions. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - */ - private $deployments; - /** - * A token that 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 array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $deployments - * The list of requested deployment revisions. - * @type string $next_page_token - * A token that 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\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested deployment revisions. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeployments() - { - return $this->deployments; - } - - /** - * The list of requested deployment revisions. - * - * Generated from protobuf field repeated .google.cloud.telcoautomation.v1.Deployment deployments = 1; - * @param array<\Google\Cloud\TelcoAutomation\V1\Deployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TelcoAutomation\V1\Deployment::class); - $this->deployments = $arr; - - return $this; - } - - /** - * A token that 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 that 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php deleted file mode 100644 index cd8bed6849c2..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/SiteVersion.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.telcoautomation.v1.SiteVersion - */ -class SiteVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. NF vendor. - * - * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nf_vendor = ''; - /** - * Output only. NF vendor type. - * - * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nf_type = ''; - /** - * Output only. NF version. - * - * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nf_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $nf_vendor - * Output only. NF vendor. - * @type string $nf_type - * Output only. NF vendor type. - * @type string $nf_version - * Output only. NF version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. NF vendor. - * - * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNfVendor() - { - return $this->nf_vendor; - } - - /** - * Output only. NF vendor. - * - * Generated from protobuf field string nf_vendor = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNfVendor($var) - { - GPBUtil::checkString($var, True); - $this->nf_vendor = $var; - - return $this; - } - - /** - * Output only. NF vendor type. - * - * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNfType() - { - return $this->nf_type; - } - - /** - * Output only. NF vendor type. - * - * Generated from protobuf field string nf_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNfType($var) - { - GPBUtil::checkString($var, True); - $this->nf_type = $var; - - return $this; - } - - /** - * Output only. NF version. - * - * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNfVersion() - { - return $this->nf_version; - } - - /** - * Output only. NF version. - * - * Generated from protobuf field string nf_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNfVersion($var) - { - GPBUtil::checkString($var, True); - $this->nf_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php deleted file mode 100644 index 915ac6f9e4dc..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/StandardManagementConfig.php +++ /dev/null @@ -1,387 +0,0 @@ -google.cloud.telcoautomation.v1.StandardManagementConfig - */ -class StandardManagementConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet = ''; - /** - * Optional. The /28 network that the masters will use. It should be free - * within the network. - * - * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_ipv4_cidr_block = ''; - /** - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_cidr_block = ''; - /** - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $services_cidr_block = ''; - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_named_range = ''; - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $services_named_range = ''; - /** - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_authorized_networks_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * @type string $subnet - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * @type string $master_ipv4_cidr_block - * Optional. The /28 network that the masters will use. It should be free - * within the network. - * @type string $cluster_cidr_block - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * @type string $services_cidr_block - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * @type string $cluster_named_range - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * @type string $services_named_range - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * @type \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. Name of the VPC Network to put the GKE cluster and nodes in. The - * VPC will be created if it doesn't exist. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * Optional. Specifies the subnet that the interface will be part of. Network - * key must be specified and the subnet must be a subnetwork of the specified - * network. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - - /** - * Optional. The /28 network that the masters will use. It should be free - * within the network. - * - * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMasterIpv4CidrBlock() - { - return $this->master_ipv4_cidr_block; - } - - /** - * Optional. The /28 network that the masters will use. It should be free - * within the network. - * - * Generated from protobuf field string master_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMasterIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->master_ipv4_cidr_block = $var; - - return $this; - } - - /** - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterCidrBlock() - { - return $this->cluster_cidr_block; - } - - /** - * Optional. The IP address range for the cluster pod IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation - * (e.g. 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string cluster_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cluster_cidr_block = $var; - - return $this; - } - - /** - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServicesCidrBlock() - { - return $this->services_cidr_block; - } - - /** - * Optional. The IP address range for the cluster service IPs. Set to blank to - * have a range chosen with the default size. Set to /netmask (e.g. /14) to - * have a range chosen with a specific netmask. Set to a CIDR notation (e.g. - * 10.96.0.0/14) from the RFC-1918 private networks (e.g. 10.0.0.0/8, - * 172.16.0.0/12, 192.168.0.0/16) to pick a specific range to use. - * - * Generated from protobuf field string services_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServicesCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->services_cidr_block = $var; - - return $this; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterNamedRange() - { - return $this->cluster_named_range; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for pod IP addresses. Alternatively, cluster_cidr_block - * can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string cluster_named_range = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterNamedRange($var) - { - GPBUtil::checkString($var, True); - $this->cluster_named_range = $var; - - return $this; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServicesNamedRange() - { - return $this->services_named_range; - } - - /** - * Optional. The name of the existing secondary range in the cluster's - * subnetwork to use for service ClusterIPs. Alternatively, - * services_cidr_block can be used to automatically create a GKE-managed one. - * - * Generated from protobuf field string services_named_range = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServicesNamedRange($var) - { - GPBUtil::checkString($var, True); - $this->services_named_range = $var; - - return $this; - } - - /** - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig|null - */ - public function getMasterAuthorizedNetworksConfig() - { - return $this->master_authorized_networks_config; - } - - public function hasMasterAuthorizedNetworksConfig() - { - return isset($this->master_authorized_networks_config); - } - - public function clearMasterAuthorizedNetworksConfig() - { - unset($this->master_authorized_networks_config); - } - - /** - * Optional. Master Authorized Network that supports multiple CIDR blocks. - * Allows access to the k8s master from multiple blocks. It cannot be set at - * the same time with the field man_block. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig $var - * @return $this - */ - public function setMasterAuthorizedNetworksConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\MasterAuthorizedNetworksConfig::class); - $this->master_authorized_networks_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php deleted file mode 100644 index 19c10628daa4..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/Status.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.telcoautomation.v1.Status - */ -class Status -{ - /** - * Unknown state. - * - * Generated from protobuf enum STATUS_UNSPECIFIED = 0; - */ - const STATUS_UNSPECIFIED = 0; - /** - * Under progress. - * - * Generated from protobuf enum STATUS_IN_PROGRESS = 1; - */ - const STATUS_IN_PROGRESS = 1; - /** - * Running and ready to serve traffic. - * - * Generated from protobuf enum STATUS_ACTIVE = 2; - */ - const STATUS_ACTIVE = 2; - /** - * Failed or stalled. - * - * Generated from protobuf enum STATUS_FAILED = 3; - */ - const STATUS_FAILED = 3; - /** - * Delete in progress. - * - * Generated from protobuf enum STATUS_DELETING = 4; - */ - const STATUS_DELETING = 4; - /** - * Deleted deployment. - * - * Generated from protobuf enum STATUS_DELETED = 5; - */ - const STATUS_DELETED = 5; - /** - * NFDeploy specific status. Peering in progress. - * - * Generated from protobuf enum STATUS_PEERING = 10; - */ - const STATUS_PEERING = 10; - /** - * K8s objects such as NetworkAttachmentDefinition don't have a defined - * status. - * - * Generated from protobuf enum STATUS_NOT_APPLICABLE = 11; - */ - const STATUS_NOT_APPLICABLE = 11; - - private static $valueToName = [ - self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', - self::STATUS_IN_PROGRESS => 'STATUS_IN_PROGRESS', - self::STATUS_ACTIVE => 'STATUS_ACTIVE', - self::STATUS_FAILED => 'STATUS_FAILED', - self::STATUS_DELETING => 'STATUS_DELETING', - self::STATUS_DELETED => 'STATUS_DELETED', - self::STATUS_PEERING => 'STATUS_PEERING', - self::STATUS_NOT_APPLICABLE => 'STATUS_NOT_APPLICABLE', - ]; - - 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php deleted file mode 100644 index c57a0a7dc882..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateBlueprintRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.telcoautomation.v1.UpdateBlueprintRequest - */ -class UpdateBlueprintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `blueprint` to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $blueprint = null; - /** - * Required. Update mask is used to specify the fields to be overwritten in - * the `blueprint` resource by the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint Required. The `blueprint` to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask is used to specify the fields to be overwritten in - * the `blueprint` resource by the update. - * - * @return \Google\Cloud\TelcoAutomation\V1\UpdateBlueprintRequest - * - * @experimental - */ - public static function build(\Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBlueprint($blueprint) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TelcoAutomation\V1\Blueprint $blueprint - * Required. The `blueprint` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Update mask is used to specify the fields to be overwritten in - * the `blueprint` resource by the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `blueprint` to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\Blueprint|null - */ - public function getBlueprint() - { - return $this->blueprint; - } - - public function hasBlueprint() - { - return isset($this->blueprint); - } - - public function clearBlueprint() - { - unset($this->blueprint); - } - - /** - * Required. The `blueprint` to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Blueprint blueprint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\Blueprint $var - * @return $this - */ - public function setBlueprint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Blueprint::class); - $this->blueprint = $var; - - return $this; - } - - /** - * Required. Update mask is used to specify the fields to be overwritten in - * the `blueprint` resource by the update. - * - * 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. Update mask is used to specify the fields to be overwritten in - * the `blueprint` resource by the update. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php deleted file mode 100644 index f36906a99d3d..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateDeploymentRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.telcoautomation.v1.UpdateDeploymentRequest - */ -class UpdateDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `deployment` to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployment = null; - /** - * Required. Update mask is used to specify the fields to be overwritten in - * the `deployment` resource by the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\TelcoAutomation\V1\Deployment $deployment Required. The `deployment` to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Update mask is used to specify the fields to be overwritten in - * the `deployment` resource by the update. - * - * @return \Google\Cloud\TelcoAutomation\V1\UpdateDeploymentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\TelcoAutomation\V1\Deployment $deployment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDeployment($deployment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TelcoAutomation\V1\Deployment $deployment - * Required. The `deployment` to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Update mask is used to specify the fields to be overwritten in - * the `deployment` resource by the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `deployment` to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\Deployment|null - */ - public function getDeployment() - { - return $this->deployment; - } - - public function hasDeployment() - { - return isset($this->deployment); - } - - public function clearDeployment() - { - unset($this->deployment); - } - - /** - * Required. The `deployment` to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.Deployment deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\Deployment $var - * @return $this - */ - public function setDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\Deployment::class); - $this->deployment = $var; - - return $this; - } - - /** - * Required. Update mask is used to specify the fields to be overwritten in - * the `deployment` resource by the update. - * - * 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. Update mask is used to specify the fields to be overwritten in - * the `deployment` resource by the update. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php deleted file mode 100644 index 69f410fff00c..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/UpdateHydratedDeploymentRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.telcoautomation.v1.UpdateHydratedDeploymentRequest - */ -class UpdateHydratedDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The hydrated deployment to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hydrated_deployment = null; - /** - * Required. The list of fields to update. Update mask supports a special - * value `*` which fully replaces (equivalent to PUT) the resource provided. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydratedDeployment Required. The hydrated deployment to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. Update mask supports a special - * value `*` which fully replaces (equivalent to PUT) the resource provided. - * - * @return \Google\Cloud\TelcoAutomation\V1\UpdateHydratedDeploymentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydratedDeployment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setHydratedDeployment($hydratedDeployment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $hydrated_deployment - * Required. The hydrated deployment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to update. Update mask supports a special - * value `*` which fully replaces (equivalent to PUT) the resource provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The hydrated deployment to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TelcoAutomation\V1\HydratedDeployment|null - */ - public function getHydratedDeployment() - { - return $this->hydrated_deployment; - } - - public function hasHydratedDeployment() - { - return isset($this->hydrated_deployment); - } - - public function clearHydratedDeployment() - { - unset($this->hydrated_deployment); - } - - /** - * Required. The hydrated deployment to update. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.HydratedDeployment hydrated_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TelcoAutomation\V1\HydratedDeployment $var - * @return $this - */ - public function setHydratedDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\HydratedDeployment::class); - $this->hydrated_deployment = $var; - - return $this; - } - - /** - * Required. The list of fields to update. Update mask supports a special - * value `*` which fully replaces (equivalent to PUT) the resource provided. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The list of fields to update. Update mask supports a special - * value `*` which fully replaces (equivalent to PUT) the resource provided. - * - * 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/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php b/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php deleted file mode 100644 index 50a5b9606b9e..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/proto/src/Google/Cloud/TelcoAutomation/V1/WorkloadStatus.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.telcoautomation.v1.WorkloadStatus - */ -class WorkloadStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. SiteVersion running in the workload cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $site_version = null; - /** - * Output only. Status. - * - * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TelcoAutomation\V1\SiteVersion $site_version - * Output only. SiteVersion running in the workload cluster. - * @type string $status - * Output only. Status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Telcoautomation\V1\Telcoautomation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. SiteVersion running in the workload cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\TelcoAutomation\V1\SiteVersion|null - */ - public function getSiteVersion() - { - return $this->site_version; - } - - public function hasSiteVersion() - { - return isset($this->site_version); - } - - public function clearSiteVersion() - { - unset($this->site_version); - } - - /** - * Output only. SiteVersion running in the workload cluster. - * - * Generated from protobuf field .google.cloud.telcoautomation.v1.SiteVersion site_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\TelcoAutomation\V1\SiteVersion $var - * @return $this - */ - public function setSiteVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TelcoAutomation\V1\SiteVersion::class); - $this->site_version = $var; - - return $this; - } - - /** - * Output only. Status. - * - * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * Output only. Status. - * - * Generated from protobuf field string status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkString($var, True); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php deleted file mode 100644 index 3f3337659fcd..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_deployment.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $telcoAutomationClient->applyDeployment($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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - apply_deployment_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ApplyDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php deleted file mode 100644 index 70c4f8ff1851..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var HydratedDeployment $response */ - $response = $telcoAutomationClient->applyHydratedDeployment($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 = TelcoAutomationClient::hydratedDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]', - '[HYDRATED_DEPLOYMENT]' - ); - - apply_hydrated_deployment_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ApplyHydratedDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php deleted file mode 100644 index bfcee4cead38..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/approve_blueprint.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Blueprint $response */ - $response = $telcoAutomationClient->approveBlueprint($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 = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - approve_blueprint_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ApproveBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php deleted file mode 100644 index d8fa92cb908c..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/compute_deployment_status.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ComputeDeploymentStatusResponse $response */ - $response = $telcoAutomationClient->computeDeploymentStatus($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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - compute_deployment_status_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ComputeDeploymentStatus_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php deleted file mode 100644 index 8f11e1f704f1..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_blueprint.php +++ /dev/null @@ -1,83 +0,0 @@ -setSourceBlueprint($blueprintSourceBlueprint); - $request = (new CreateBlueprintRequest()) - ->setParent($formattedParent) - ->setBlueprint($blueprint); - - // Call the API and handle any network failures. - try { - /** @var Blueprint $response */ - $response = $telcoAutomationClient->createBlueprint($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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - $blueprintSourceBlueprint = '[SOURCE_BLUEPRINT]'; - - create_blueprint_sample($formattedParent, $blueprintSourceBlueprint); -} -// [END telcoautomation_v1_generated_TelcoAutomation_CreateBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php deleted file mode 100644 index ae143d080eb3..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_deployment.php +++ /dev/null @@ -1,84 +0,0 @@ -setSourceBlueprintRevision($deploymentSourceBlueprintRevision); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeployment($deployment); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $telcoAutomationClient->createDeployment($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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - $deploymentSourceBlueprintRevision = '[SOURCE_BLUEPRINT_REVISION]'; - - create_deployment_sample($formattedParent, $deploymentSourceBlueprintRevision); -} -// [END telcoautomation_v1_generated_TelcoAutomation_CreateDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php deleted file mode 100644 index 1c0b15c35e8d..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_edge_slm.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($formattedParent) - ->setEdgeSlmId($edgeSlmId) - ->setEdgeSlm($edgeSlm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $telcoAutomationClient->createEdgeSlm($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EdgeSlm $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); - $edgeSlmId = '[EDGE_SLM_ID]'; - - create_edge_slm_sample($formattedParent, $edgeSlmId); -} -// [END telcoautomation_v1_generated_TelcoAutomation_CreateEdgeSlm_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php deleted file mode 100644 index db7993ab7935..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/create_orchestration_cluster.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setOrchestrationClusterId($orchestrationClusterId) - ->setOrchestrationCluster($orchestrationCluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $telcoAutomationClient->createOrchestrationCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var OrchestrationCluster $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); - $orchestrationClusterId = '[ORCHESTRATION_CLUSTER_ID]'; - - create_orchestration_cluster_sample($formattedParent, $orchestrationClusterId); -} -// [END telcoautomation_v1_generated_TelcoAutomation_CreateOrchestrationCluster_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php deleted file mode 100644 index b0814ab1aa07..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_blueprint.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $telcoAutomationClient->deleteBlueprint($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 = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - delete_blueprint_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_DeleteBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php deleted file mode 100644 index 951a7f4616e1..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_edge_slm.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $telcoAutomationClient->deleteEdgeSlm($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 = TelcoAutomationClient::edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); - - delete_edge_slm_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_DeleteEdgeSlm_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php deleted file mode 100644 index ae8882dc2f5c..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $telcoAutomationClient->deleteOrchestrationCluster($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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - - delete_orchestration_cluster_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_DeleteOrchestrationCluster_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php deleted file mode 100644 index 5c5ac4d25531..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_blueprint_changes.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DiscardBlueprintChangesResponse $response */ - $response = $telcoAutomationClient->discardBlueprintChanges($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 = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - discard_blueprint_changes_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_DiscardBlueprintChanges_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php deleted file mode 100644 index c1760b1b5385..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/discard_deployment_changes.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DiscardDeploymentChangesResponse $response */ - $response = $telcoAutomationClient->discardDeploymentChanges($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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - discard_deployment_changes_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_DiscardDeploymentChanges_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php deleted file mode 100644 index 26e0e1a8e429..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_blueprint.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Blueprint $response */ - $response = $telcoAutomationClient->getBlueprint($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 = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - get_blueprint_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_GetBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php deleted file mode 100644 index ac86606f3b5e..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_deployment.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $telcoAutomationClient->getDeployment($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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - get_deployment_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_GetDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php deleted file mode 100644 index 323089bd54f8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_edge_slm.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EdgeSlm $response */ - $response = $telcoAutomationClient->getEdgeSlm($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 = TelcoAutomationClient::edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); - - get_edge_slm_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_GetEdgeSlm_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php deleted file mode 100644 index 40bd87f814fe..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_hydrated_deployment.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var HydratedDeployment $response */ - $response = $telcoAutomationClient->getHydratedDeployment($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 = TelcoAutomationClient::hydratedDeploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]', - '[HYDRATED_DEPLOYMENT]' - ); - - get_hydrated_deployment_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_GetHydratedDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_location.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_location.php deleted file mode 100644 index 5b9a69497043..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/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 telcoautomation_v1_generated_TelcoAutomation_GetLocation_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php deleted file mode 100644 index 887522d54c52..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_orchestration_cluster.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OrchestrationCluster $response */ - $response = $telcoAutomationClient->getOrchestrationCluster($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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - - get_orchestration_cluster_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_GetOrchestrationCluster_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php deleted file mode 100644 index e7a9a0ea86e5..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/get_public_blueprint.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PublicBlueprint $response */ - $response = $telcoAutomationClient->getPublicBlueprint($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 = TelcoAutomationClient::publicBlueprintName( - '[PROJECT]', - '[LOCATION]', - '[PUBLIC_LUEPRINT]' - ); - - get_public_blueprint_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_GetPublicBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php deleted file mode 100644 index 9f05628c6f38..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprint_revisions.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listBlueprintRevisions($request); - - /** @var Blueprint $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 -{ - $formattedName = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - list_blueprint_revisions_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprintRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php deleted file mode 100644 index 0d3c8d771851..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_blueprints.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listBlueprints($request); - - /** @var Blueprint $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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - - list_blueprints_sample($formattedParent); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListBlueprints_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php deleted file mode 100644 index 69dbdb9d6b63..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployment_revisions.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listDeploymentRevisions($request); - - /** @var Deployment $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 -{ - $formattedName = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - list_deployment_revisions_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListDeploymentRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php deleted file mode 100644 index 1b468e2e94e3..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_deployments.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listDeployments($request); - - /** @var Deployment $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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - - list_deployments_sample($formattedParent); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListDeployments_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php deleted file mode 100644 index 5200d6d13c89..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_edge_slms.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listEdgeSlms($request); - - /** @var EdgeSlm $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); - - list_edge_slms_sample($formattedParent); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListEdgeSlms_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php deleted file mode 100644 index 6d493233c952..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_hydrated_deployments.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listHydratedDeployments($request); - - /** @var HydratedDeployment $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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - list_hydrated_deployments_sample($formattedParent); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListHydratedDeployments_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_locations.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_locations.php deleted file mode 100644 index db9114a3decd..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/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 telcoautomation_v1_generated_TelcoAutomation_ListLocations_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php deleted file mode 100644 index 33934470433f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_orchestration_clusters.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listOrchestrationClusters($request); - - /** @var OrchestrationCluster $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); - - list_orchestration_clusters_sample($formattedParent); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListOrchestrationClusters_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php deleted file mode 100644 index 1f6d121c7b6f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/list_public_blueprints.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->listPublicBlueprints($request); - - /** @var PublicBlueprint $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 = TelcoAutomationClient::locationName('[PROJECT]', '[LOCATION]'); - - list_public_blueprints_sample($formattedParent); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ListPublicBlueprints_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php deleted file mode 100644 index 255f8c5c9504..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/propose_blueprint.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Blueprint $response */ - $response = $telcoAutomationClient->proposeBlueprint($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 = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - propose_blueprint_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_ProposeBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php deleted file mode 100644 index f3d3718e2218..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/reject_blueprint.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Blueprint $response */ - $response = $telcoAutomationClient->rejectBlueprint($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 = TelcoAutomationClient::blueprintName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[BLUEPRINT]' - ); - - reject_blueprint_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_RejectBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php deleted file mode 100644 index 19eebc49d413..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/remove_deployment.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $telcoAutomationClient->removeDeployment($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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - - remove_deployment_sample($formattedName); -} -// [END telcoautomation_v1_generated_TelcoAutomation_RemoveDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php deleted file mode 100644 index db6c7bf104d7..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/rollback_deployment.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName) - ->setRevisionId($revisionId); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $telcoAutomationClient->rollbackDeployment($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 = TelcoAutomationClient::deploymentName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]', - '[DEPLOYMENT]' - ); - $revisionId = '[REVISION_ID]'; - - rollback_deployment_sample($formattedName, $revisionId); -} -// [END telcoautomation_v1_generated_TelcoAutomation_RollbackDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php deleted file mode 100644 index 3e4903ebf15c..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_blueprint_revisions.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->searchBlueprintRevisions($request); - - /** @var Blueprint $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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - $query = '[QUERY]'; - - search_blueprint_revisions_sample($formattedParent, $query); -} -// [END telcoautomation_v1_generated_TelcoAutomation_SearchBlueprintRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php deleted file mode 100644 index 29a233d8254f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/search_deployment_revisions.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $telcoAutomationClient->searchDeploymentRevisions($request); - - /** @var Deployment $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 = TelcoAutomationClient::orchestrationClusterName( - '[PROJECT]', - '[LOCATION]', - '[ORCHESTRATION_CLUSTER]' - ); - $query = '[QUERY]'; - - search_deployment_revisions_sample($formattedParent, $query); -} -// [END telcoautomation_v1_generated_TelcoAutomation_SearchDeploymentRevisions_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php deleted file mode 100644 index 552fd5df70e8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_blueprint.php +++ /dev/null @@ -1,76 +0,0 @@ -setSourceBlueprint($blueprintSourceBlueprint); - $updateMask = new FieldMask(); - $request = (new UpdateBlueprintRequest()) - ->setBlueprint($blueprint) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Blueprint $response */ - $response = $telcoAutomationClient->updateBlueprint($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 -{ - $blueprintSourceBlueprint = '[SOURCE_BLUEPRINT]'; - - update_blueprint_sample($blueprintSourceBlueprint); -} -// [END telcoautomation_v1_generated_TelcoAutomation_UpdateBlueprint_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php deleted file mode 100644 index f9ae960386b8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_deployment.php +++ /dev/null @@ -1,75 +0,0 @@ -setSourceBlueprintRevision($deploymentSourceBlueprintRevision); - $updateMask = new FieldMask(); - $request = (new UpdateDeploymentRequest()) - ->setDeployment($deployment) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Deployment $response */ - $response = $telcoAutomationClient->updateDeployment($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 -{ - $deploymentSourceBlueprintRevision = '[SOURCE_BLUEPRINT_REVISION]'; - - update_deployment_sample($deploymentSourceBlueprintRevision); -} -// [END telcoautomation_v1_generated_TelcoAutomation_UpdateDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php b/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php deleted file mode 100644 index 0b9649b16d6f..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/samples/V1/TelcoAutomationClient/update_hydrated_deployment.php +++ /dev/null @@ -1,62 +0,0 @@ -setHydratedDeployment($hydratedDeployment) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var HydratedDeployment $response */ - $response = $telcoAutomationClient->updateHydratedDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END telcoautomation_v1_generated_TelcoAutomation_UpdateHydratedDeployment_sync] diff --git a/owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php b/owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php deleted file mode 100644 index 7416153d9b3d..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/src/V1/Client/TelcoAutomationClient.php +++ /dev/null @@ -1,1487 +0,0 @@ - applyDeploymentAsync(ApplyDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface applyHydratedDeploymentAsync(ApplyHydratedDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface approveBlueprintAsync(ApproveBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface computeDeploymentStatusAsync(ComputeDeploymentStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBlueprintAsync(CreateBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDeploymentAsync(CreateDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEdgeSlmAsync(CreateEdgeSlmRequest $request, array $optionalArgs = []) - * @method PromiseInterface createOrchestrationClusterAsync(CreateOrchestrationClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBlueprintAsync(DeleteBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEdgeSlmAsync(DeleteEdgeSlmRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOrchestrationClusterAsync(DeleteOrchestrationClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface discardBlueprintChangesAsync(DiscardBlueprintChangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface discardDeploymentChangesAsync(DiscardDeploymentChangesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBlueprintAsync(GetBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDeploymentAsync(GetDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEdgeSlmAsync(GetEdgeSlmRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHydratedDeploymentAsync(GetHydratedDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOrchestrationClusterAsync(GetOrchestrationClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPublicBlueprintAsync(GetPublicBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBlueprintRevisionsAsync(ListBlueprintRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBlueprintsAsync(ListBlueprintsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentRevisionsAsync(ListDeploymentRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeploymentsAsync(ListDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEdgeSlmsAsync(ListEdgeSlmsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHydratedDeploymentsAsync(ListHydratedDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOrchestrationClustersAsync(ListOrchestrationClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPublicBlueprintsAsync(ListPublicBlueprintsRequest $request, array $optionalArgs = []) - * @method PromiseInterface proposeBlueprintAsync(ProposeBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface rejectBlueprintAsync(RejectBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeDeploymentAsync(RemoveDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackDeploymentAsync(RollbackDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchBlueprintRevisionsAsync(SearchBlueprintRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchDeploymentRevisionsAsync(SearchDeploymentRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBlueprintAsync(UpdateBlueprintRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDeploymentAsync(UpdateDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateHydratedDeploymentAsync(UpdateHydratedDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class TelcoAutomationClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.telcoautomation.v1.TelcoAutomation'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'telcoautomation.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'telcoautomation.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/telco_automation_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/telco_automation_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/telco_automation_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/telco_automation_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 blueprint - * resource. - * - * @param string $project - * @param string $location - * @param string $orchestrationCluster - * @param string $blueprint - * - * @return string The formatted blueprint resource. - */ - public static function blueprintName(string $project, string $location, string $orchestrationCluster, string $blueprint): string - { - return self::getPathTemplate('blueprint')->render([ - 'project' => $project, - 'location' => $location, - 'orchestration_cluster' => $orchestrationCluster, - 'blueprint' => $blueprint, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a deployment - * resource. - * - * @param string $project - * @param string $location - * @param string $orchestrationCluster - * @param string $deployment - * - * @return string The formatted deployment resource. - */ - public static function deploymentName(string $project, string $location, string $orchestrationCluster, string $deployment): string - { - return self::getPathTemplate('deployment')->render([ - 'project' => $project, - 'location' => $location, - 'orchestration_cluster' => $orchestrationCluster, - 'deployment' => $deployment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a edge_slm - * resource. - * - * @param string $project - * @param string $location - * @param string $edgeSlm - * - * @return string The formatted edge_slm resource. - */ - public static function edgeSlmName(string $project, string $location, string $edgeSlm): string - { - return self::getPathTemplate('edgeSlm')->render([ - 'project' => $project, - 'location' => $location, - 'edge_slm' => $edgeSlm, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * hydrated_deployment resource. - * - * @param string $project - * @param string $location - * @param string $orchestrationCluster - * @param string $deployment - * @param string $hydratedDeployment - * - * @return string The formatted hydrated_deployment resource. - */ - public static function hydratedDeploymentName(string $project, string $location, string $orchestrationCluster, string $deployment, string $hydratedDeployment): string - { - return self::getPathTemplate('hydratedDeployment')->render([ - 'project' => $project, - 'location' => $location, - 'orchestration_cluster' => $orchestrationCluster, - 'deployment' => $deployment, - 'hydrated_deployment' => $hydratedDeployment, - ]); - } - - /** - * 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 - * orchestration_cluster resource. - * - * @param string $project - * @param string $location - * @param string $orchestrationCluster - * - * @return string The formatted orchestration_cluster resource. - */ - public static function orchestrationClusterName(string $project, string $location, string $orchestrationCluster): string - { - return self::getPathTemplate('orchestrationCluster')->render([ - 'project' => $project, - 'location' => $location, - 'orchestration_cluster' => $orchestrationCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * public_blueprint resource. - * - * @param string $project - * @param string $location - * @param string $publicLueprint - * - * @return string The formatted public_blueprint resource. - */ - public static function publicBlueprintName(string $project, string $location, string $publicLueprint): string - { - return self::getPathTemplate('publicBlueprint')->render([ - 'project' => $project, - 'location' => $location, - 'public_lueprint' => $publicLueprint, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - blueprint: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint} - * - deployment: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment} - * - edgeSlm: projects/{project}/locations/{location}/edgeSlms/{edge_slm} - * - hydratedDeployment: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment} - * - location: projects/{project}/locations/{location} - * - orchestrationCluster: projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster} - * - publicBlueprint: projects/{project}/locations/{location}/publicBlueprints/{public_lueprint} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'telcoautomation.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Applies the deployment's YAML files to the parent orchestration cluster. - * - * The async variant is {@see TelcoAutomationClient::applyDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/apply_deployment.php - * - * @param ApplyDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function applyDeployment(ApplyDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('ApplyDeployment', $request, $callOptions)->wait(); - } - - /** - * Applies a hydrated deployment to a workload cluster. - * - * The async variant is - * {@see TelcoAutomationClient::applyHydratedDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/apply_hydrated_deployment.php - * - * @param ApplyHydratedDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HydratedDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function applyHydratedDeployment(ApplyHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment - { - return $this->startApiCall('ApplyHydratedDeployment', $request, $callOptions)->wait(); - } - - /** - * Approves a blueprint and commits a new revision. - * - * The async variant is {@see TelcoAutomationClient::approveBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/approve_blueprint.php - * - * @param ApproveBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Blueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function approveBlueprint(ApproveBlueprintRequest $request, array $callOptions = []): Blueprint - { - return $this->startApiCall('ApproveBlueprint', $request, $callOptions)->wait(); - } - - /** - * Returns the requested deployment status. - * - * The async variant is - * {@see TelcoAutomationClient::computeDeploymentStatusAsync()} . - * - * @example samples/V1/TelcoAutomationClient/compute_deployment_status.php - * - * @param ComputeDeploymentStatusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ComputeDeploymentStatusResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function computeDeploymentStatus(ComputeDeploymentStatusRequest $request, array $callOptions = []): ComputeDeploymentStatusResponse - { - return $this->startApiCall('ComputeDeploymentStatus', $request, $callOptions)->wait(); - } - - /** - * Creates a blueprint. - * - * The async variant is {@see TelcoAutomationClient::createBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/create_blueprint.php - * - * @param CreateBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Blueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBlueprint(CreateBlueprintRequest $request, array $callOptions = []): Blueprint - { - return $this->startApiCall('CreateBlueprint', $request, $callOptions)->wait(); - } - - /** - * Creates a deployment. - * - * The async variant is {@see TelcoAutomationClient::createDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/create_deployment.php - * - * @param CreateDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDeployment(CreateDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('CreateDeployment', $request, $callOptions)->wait(); - } - - /** - * Creates a new EdgeSlm in a given project and location. - * - * The async variant is {@see TelcoAutomationClient::createEdgeSlmAsync()} . - * - * @example samples/V1/TelcoAutomationClient/create_edge_slm.php - * - * @param CreateEdgeSlmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createEdgeSlm(CreateEdgeSlmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEdgeSlm', $request, $callOptions)->wait(); - } - - /** - * Creates a new OrchestrationCluster in a given project and location. - * - * The async variant is - * {@see TelcoAutomationClient::createOrchestrationClusterAsync()} . - * - * @example samples/V1/TelcoAutomationClient/create_orchestration_cluster.php - * - * @param CreateOrchestrationClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createOrchestrationCluster(CreateOrchestrationClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateOrchestrationCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a blueprint and all its revisions. - * - * The async variant is {@see TelcoAutomationClient::deleteBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/delete_blueprint.php - * - * @param DeleteBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteBlueprint(DeleteBlueprintRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBlueprint', $request, $callOptions)->wait(); - } - - /** - * Deletes a single EdgeSlm. - * - * The async variant is {@see TelcoAutomationClient::deleteEdgeSlmAsync()} . - * - * @example samples/V1/TelcoAutomationClient/delete_edge_slm.php - * - * @param DeleteEdgeSlmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteEdgeSlm(DeleteEdgeSlmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEdgeSlm', $request, $callOptions)->wait(); - } - - /** - * Deletes a single OrchestrationCluster. - * - * The async variant is - * {@see TelcoAutomationClient::deleteOrchestrationClusterAsync()} . - * - * @example samples/V1/TelcoAutomationClient/delete_orchestration_cluster.php - * - * @param DeleteOrchestrationClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteOrchestrationCluster(DeleteOrchestrationClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteOrchestrationCluster', $request, $callOptions)->wait(); - } - - /** - * Discards the changes in a blueprint and reverts the blueprint to the last - * approved blueprint revision. No changes take place if a blueprint does not - * have revisions. - * - * The async variant is - * {@see TelcoAutomationClient::discardBlueprintChangesAsync()} . - * - * @example samples/V1/TelcoAutomationClient/discard_blueprint_changes.php - * - * @param DiscardBlueprintChangesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DiscardBlueprintChangesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function discardBlueprintChanges(DiscardBlueprintChangesRequest $request, array $callOptions = []): DiscardBlueprintChangesResponse - { - return $this->startApiCall('DiscardBlueprintChanges', $request, $callOptions)->wait(); - } - - /** - * Discards the changes in a deployment and reverts the deployment to the last - * approved deployment revision. No changes take place if a deployment does - * not have revisions. - * - * The async variant is - * {@see TelcoAutomationClient::discardDeploymentChangesAsync()} . - * - * @example samples/V1/TelcoAutomationClient/discard_deployment_changes.php - * - * @param DiscardDeploymentChangesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DiscardDeploymentChangesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function discardDeploymentChanges(DiscardDeploymentChangesRequest $request, array $callOptions = []): DiscardDeploymentChangesResponse - { - return $this->startApiCall('DiscardDeploymentChanges', $request, $callOptions)->wait(); - } - - /** - * Returns the requested blueprint. - * - * The async variant is {@see TelcoAutomationClient::getBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/get_blueprint.php - * - * @param GetBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Blueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBlueprint(GetBlueprintRequest $request, array $callOptions = []): Blueprint - { - return $this->startApiCall('GetBlueprint', $request, $callOptions)->wait(); - } - - /** - * Returns the requested deployment. - * - * The async variant is {@see TelcoAutomationClient::getDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/get_deployment.php - * - * @param GetDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDeployment(GetDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('GetDeployment', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single EdgeSlm. - * - * The async variant is {@see TelcoAutomationClient::getEdgeSlmAsync()} . - * - * @example samples/V1/TelcoAutomationClient/get_edge_slm.php - * - * @param GetEdgeSlmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EdgeSlm - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEdgeSlm(GetEdgeSlmRequest $request, array $callOptions = []): EdgeSlm - { - return $this->startApiCall('GetEdgeSlm', $request, $callOptions)->wait(); - } - - /** - * Returns the requested hydrated deployment. - * - * The async variant is {@see TelcoAutomationClient::getHydratedDeploymentAsync()} - * . - * - * @example samples/V1/TelcoAutomationClient/get_hydrated_deployment.php - * - * @param GetHydratedDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HydratedDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getHydratedDeployment(GetHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment - { - return $this->startApiCall('GetHydratedDeployment', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single OrchestrationCluster. - * - * The async variant is - * {@see TelcoAutomationClient::getOrchestrationClusterAsync()} . - * - * @example samples/V1/TelcoAutomationClient/get_orchestration_cluster.php - * - * @param GetOrchestrationClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OrchestrationCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOrchestrationCluster(GetOrchestrationClusterRequest $request, array $callOptions = []): OrchestrationCluster - { - return $this->startApiCall('GetOrchestrationCluster', $request, $callOptions)->wait(); - } - - /** - * Returns the requested public blueprint. - * - * The async variant is {@see TelcoAutomationClient::getPublicBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/get_public_blueprint.php - * - * @param GetPublicBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PublicBlueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPublicBlueprint(GetPublicBlueprintRequest $request, array $callOptions = []): PublicBlueprint - { - return $this->startApiCall('GetPublicBlueprint', $request, $callOptions)->wait(); - } - - /** - * List blueprint revisions of a given blueprint. - * - * The async variant is {@see TelcoAutomationClient::listBlueprintRevisionsAsync()} - * . - * - * @example samples/V1/TelcoAutomationClient/list_blueprint_revisions.php - * - * @param ListBlueprintRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBlueprintRevisions(ListBlueprintRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBlueprintRevisions', $request, $callOptions); - } - - /** - * List all blueprints. - * - * The async variant is {@see TelcoAutomationClient::listBlueprintsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_blueprints.php - * - * @param ListBlueprintsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listBlueprints(ListBlueprintsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBlueprints', $request, $callOptions); - } - - /** - * List deployment revisions of a given deployment. - * - * The async variant is - * {@see TelcoAutomationClient::listDeploymentRevisionsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_deployment_revisions.php - * - * @param ListDeploymentRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDeploymentRevisions(ListDeploymentRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDeploymentRevisions', $request, $callOptions); - } - - /** - * List all deployments. - * - * The async variant is {@see TelcoAutomationClient::listDeploymentsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_deployments.php - * - * @param ListDeploymentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDeployments(ListDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDeployments', $request, $callOptions); - } - - /** - * Lists EdgeSlms in a given project and location. - * - * The async variant is {@see TelcoAutomationClient::listEdgeSlmsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_edge_slms.php - * - * @param ListEdgeSlmsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listEdgeSlms(ListEdgeSlmsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEdgeSlms', $request, $callOptions); - } - - /** - * List all hydrated deployments present under a deployment. - * - * The async variant is - * {@see TelcoAutomationClient::listHydratedDeploymentsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_hydrated_deployments.php - * - * @param ListHydratedDeploymentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listHydratedDeployments(ListHydratedDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHydratedDeployments', $request, $callOptions); - } - - /** - * Lists OrchestrationClusters in a given project and location. - * - * The async variant is - * {@see TelcoAutomationClient::listOrchestrationClustersAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_orchestration_clusters.php - * - * @param ListOrchestrationClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listOrchestrationClusters(ListOrchestrationClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOrchestrationClusters', $request, $callOptions); - } - - /** - * Lists the blueprints in TNA's public catalog. Default page size = 20, - * Max Page Size = 100. - * - * The async variant is {@see TelcoAutomationClient::listPublicBlueprintsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/list_public_blueprints.php - * - * @param ListPublicBlueprintsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPublicBlueprints(ListPublicBlueprintsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPublicBlueprints', $request, $callOptions); - } - - /** - * Proposes a blueprint for approval of changes. - * - * The async variant is {@see TelcoAutomationClient::proposeBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/propose_blueprint.php - * - * @param ProposeBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Blueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function proposeBlueprint(ProposeBlueprintRequest $request, array $callOptions = []): Blueprint - { - return $this->startApiCall('ProposeBlueprint', $request, $callOptions)->wait(); - } - - /** - * Rejects a blueprint revision proposal and flips it back to Draft state. - * - * The async variant is {@see TelcoAutomationClient::rejectBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/reject_blueprint.php - * - * @param RejectBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Blueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function rejectBlueprint(RejectBlueprintRequest $request, array $callOptions = []): Blueprint - { - return $this->startApiCall('RejectBlueprint', $request, $callOptions)->wait(); - } - - /** - * Removes the deployment by marking it as DELETING. Post which deployment and - * it's revisions gets deleted. - * - * The async variant is {@see TelcoAutomationClient::removeDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/remove_deployment.php - * - * @param RemoveDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 removeDeployment(RemoveDeploymentRequest $request, array $callOptions = []): void - { - $this->startApiCall('RemoveDeployment', $request, $callOptions)->wait(); - } - - /** - * Rollback the active deployment to the given past approved deployment - * revision. - * - * The async variant is {@see TelcoAutomationClient::rollbackDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/rollback_deployment.php - * - * @param RollbackDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function rollbackDeployment(RollbackDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('RollbackDeployment', $request, $callOptions)->wait(); - } - - /** - * Searches across blueprint revisions. - * - * The async variant is - * {@see TelcoAutomationClient::searchBlueprintRevisionsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/search_blueprint_revisions.php - * - * @param SearchBlueprintRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchBlueprintRevisions(SearchBlueprintRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchBlueprintRevisions', $request, $callOptions); - } - - /** - * Searches across deployment revisions. - * - * The async variant is - * {@see TelcoAutomationClient::searchDeploymentRevisionsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/search_deployment_revisions.php - * - * @param SearchDeploymentRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchDeploymentRevisions(SearchDeploymentRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchDeploymentRevisions', $request, $callOptions); - } - - /** - * Updates a blueprint. - * - * The async variant is {@see TelcoAutomationClient::updateBlueprintAsync()} . - * - * @example samples/V1/TelcoAutomationClient/update_blueprint.php - * - * @param UpdateBlueprintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Blueprint - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBlueprint(UpdateBlueprintRequest $request, array $callOptions = []): Blueprint - { - return $this->startApiCall('UpdateBlueprint', $request, $callOptions)->wait(); - } - - /** - * Updates a deployment. - * - * The async variant is {@see TelcoAutomationClient::updateDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/update_deployment.php - * - * @param UpdateDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Deployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDeployment(UpdateDeploymentRequest $request, array $callOptions = []): Deployment - { - return $this->startApiCall('UpdateDeployment', $request, $callOptions)->wait(); - } - - /** - * Updates a hydrated deployment. - * - * The async variant is - * {@see TelcoAutomationClient::updateHydratedDeploymentAsync()} . - * - * @example samples/V1/TelcoAutomationClient/update_hydrated_deployment.php - * - * @param UpdateHydratedDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HydratedDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateHydratedDeployment(UpdateHydratedDeploymentRequest $request, array $callOptions = []): HydratedDeployment - { - return $this->startApiCall('UpdateHydratedDeployment', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see TelcoAutomationClient::getLocationAsync()} . - * - * @example samples/V1/TelcoAutomationClient/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 TelcoAutomationClient::listLocationsAsync()} . - * - * @example samples/V1/TelcoAutomationClient/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/TelcoAutomation/v1/src/V1/gapic_metadata.json b/owl-bot-staging/TelcoAutomation/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 920267ed1b4b..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.telcoautomation.v1", - "libraryPackage": "Google\\Cloud\\TelcoAutomation\\V1", - "services": { - "TelcoAutomation": { - "clients": { - "grpc": { - "libraryClient": "TelcoAutomationGapicClient", - "rpcs": { - "ApplyDeployment": { - "methods": [ - "applyDeployment" - ] - }, - "ApplyHydratedDeployment": { - "methods": [ - "applyHydratedDeployment" - ] - }, - "ApproveBlueprint": { - "methods": [ - "approveBlueprint" - ] - }, - "ComputeDeploymentStatus": { - "methods": [ - "computeDeploymentStatus" - ] - }, - "CreateBlueprint": { - "methods": [ - "createBlueprint" - ] - }, - "CreateDeployment": { - "methods": [ - "createDeployment" - ] - }, - "CreateEdgeSlm": { - "methods": [ - "createEdgeSlm" - ] - }, - "CreateOrchestrationCluster": { - "methods": [ - "createOrchestrationCluster" - ] - }, - "DeleteBlueprint": { - "methods": [ - "deleteBlueprint" - ] - }, - "DeleteEdgeSlm": { - "methods": [ - "deleteEdgeSlm" - ] - }, - "DeleteOrchestrationCluster": { - "methods": [ - "deleteOrchestrationCluster" - ] - }, - "DiscardBlueprintChanges": { - "methods": [ - "discardBlueprintChanges" - ] - }, - "DiscardDeploymentChanges": { - "methods": [ - "discardDeploymentChanges" - ] - }, - "GetBlueprint": { - "methods": [ - "getBlueprint" - ] - }, - "GetDeployment": { - "methods": [ - "getDeployment" - ] - }, - "GetEdgeSlm": { - "methods": [ - "getEdgeSlm" - ] - }, - "GetHydratedDeployment": { - "methods": [ - "getHydratedDeployment" - ] - }, - "GetOrchestrationCluster": { - "methods": [ - "getOrchestrationCluster" - ] - }, - "GetPublicBlueprint": { - "methods": [ - "getPublicBlueprint" - ] - }, - "ListBlueprintRevisions": { - "methods": [ - "listBlueprintRevisions" - ] - }, - "ListBlueprints": { - "methods": [ - "listBlueprints" - ] - }, - "ListDeploymentRevisions": { - "methods": [ - "listDeploymentRevisions" - ] - }, - "ListDeployments": { - "methods": [ - "listDeployments" - ] - }, - "ListEdgeSlms": { - "methods": [ - "listEdgeSlms" - ] - }, - "ListHydratedDeployments": { - "methods": [ - "listHydratedDeployments" - ] - }, - "ListOrchestrationClusters": { - "methods": [ - "listOrchestrationClusters" - ] - }, - "ListPublicBlueprints": { - "methods": [ - "listPublicBlueprints" - ] - }, - "ProposeBlueprint": { - "methods": [ - "proposeBlueprint" - ] - }, - "RejectBlueprint": { - "methods": [ - "rejectBlueprint" - ] - }, - "RemoveDeployment": { - "methods": [ - "removeDeployment" - ] - }, - "RollbackDeployment": { - "methods": [ - "rollbackDeployment" - ] - }, - "SearchBlueprintRevisions": { - "methods": [ - "searchBlueprintRevisions" - ] - }, - "SearchDeploymentRevisions": { - "methods": [ - "searchDeploymentRevisions" - ] - }, - "UpdateBlueprint": { - "methods": [ - "updateBlueprint" - ] - }, - "UpdateDeployment": { - "methods": [ - "updateDeployment" - ] - }, - "UpdateHydratedDeployment": { - "methods": [ - "updateHydratedDeployment" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json deleted file mode 100644 index 596ed5133dc8..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_client_config.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "interfaces": { - "google.cloud.telcoautomation.v1.TelcoAutomation": { - "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": { - "ApplyDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ApplyHydratedDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ApproveBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ComputeDeploymentStatus": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateEdgeSlm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateOrchestrationCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteEdgeSlm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteOrchestrationCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DiscardBlueprintChanges": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DiscardDeploymentChanges": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetEdgeSlm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetHydratedDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetOrchestrationCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetPublicBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBlueprintRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBlueprints": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDeploymentRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListEdgeSlms": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListHydratedDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListOrchestrationClusters": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListPublicBlueprints": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ProposeBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RejectBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RemoveDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RollbackDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SearchBlueprintRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SearchDeploymentRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBlueprint": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateHydratedDeployment": { - "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/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php deleted file mode 100644 index 67b54f6c288d..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_descriptor_config.php +++ /dev/null @@ -1,614 +0,0 @@ - [ - 'google.cloud.telcoautomation.v1.TelcoAutomation' => [ - 'CreateEdgeSlm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\TelcoAutomation\V1\EdgeSlm', - 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateOrchestrationCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\TelcoAutomation\V1\OrchestrationCluster', - 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEdgeSlm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOrchestrationCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\TelcoAutomation\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ApplyDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ApplyHydratedDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ApproveBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ComputeDeploymentStatus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ComputeDeploymentStatusResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DiscardBlueprintChanges' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\DiscardBlueprintChangesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DiscardDeploymentChanges' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\DiscardDeploymentChangesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEdgeSlm' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\EdgeSlm', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetHydratedDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOrchestrationCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\OrchestrationCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPublicBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\PublicBlueprint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBlueprintRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBlueprints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListBlueprintRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBlueprints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBlueprints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListBlueprintsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDeploymentRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListDeploymentRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEdgeSlms' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEdgeSlms', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListEdgeSlmsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHydratedDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHydratedDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListHydratedDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrchestrationClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOrchestrationClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListOrchestrationClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPublicBlueprints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPublicBlueprints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\ListPublicBlueprintsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ProposeBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RejectBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RollbackDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SearchBlueprintRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBlueprints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\SearchBlueprintRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchDeploymentRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\SearchDeploymentRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBlueprint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Blueprint', - 'headerParams' => [ - [ - 'keyName' => 'blueprint.name', - 'fieldAccessors' => [ - 'getBlueprint', - 'getName', - ], - ], - ], - ], - 'UpdateDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\Deployment', - 'headerParams' => [ - [ - 'keyName' => 'deployment.name', - 'fieldAccessors' => [ - 'getDeployment', - 'getName', - ], - ], - ], - ], - 'UpdateHydratedDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TelcoAutomation\V1\HydratedDeployment', - 'headerParams' => [ - [ - 'keyName' => 'hydrated_deployment.name', - 'fieldAccessors' => [ - 'getHydratedDeployment', - 'getName', - ], - ], - ], - ], - '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' => [ - 'blueprint' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/blueprints/{blueprint}', - 'deployment' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}', - 'edgeSlm' => 'projects/{project}/locations/{location}/edgeSlms/{edge_slm}', - 'hydratedDeployment' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}/deployments/{deployment}/hydratedDeployments/{hydrated_deployment}', - 'location' => 'projects/{project}/locations/{location}', - 'orchestrationCluster' => 'projects/{project}/locations/{location}/orchestrationClusters/{orchestration_cluster}', - 'publicBlueprint' => 'projects/{project}/locations/{location}/publicBlueprints/{public_lueprint}', - ], - ], - ], -]; diff --git a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php b/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php deleted file mode 100644 index c30e914f633e..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/src/V1/resources/telco_automation_rest_client_config.php +++ /dev/null @@ -1,530 +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.telcoautomation.v1.TelcoAutomation' => [ - 'ApplyDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:apply', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ApplyHydratedDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}:apply', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ApproveBlueprint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:approve', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ComputeDeploymentStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:computeDeploymentStatus', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateBlueprint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints', - 'body' => 'blueprint', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments', - 'body' => 'deployment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEdgeSlm' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/edgeSlms', - 'body' => 'edge_slm', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'edge_slm_id', - ], - ], - 'CreateOrchestrationCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/orchestrationClusters', - 'body' => 'orchestration_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'orchestration_cluster_id', - ], - ], - 'DeleteBlueprint' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEdgeSlm' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/edgeSlms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOrchestrationCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DiscardBlueprintChanges' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:discard', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DiscardDeploymentChanges' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:discard', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBlueprint' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEdgeSlm' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/edgeSlms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetHydratedDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOrchestrationCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPublicBlueprint' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/publicBlueprints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBlueprintRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:listRevisions', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBlueprints' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDeploymentRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:listRevisions', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEdgeSlms' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/edgeSlms', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHydratedDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*/deployments/*}/hydratedDeployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOrchestrationClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/orchestrationClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPublicBlueprints' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/publicBlueprints', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ProposeBlueprint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:propose', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RejectBlueprint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}:reject', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RemoveDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:remove', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RollbackDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/orchestrationClusters/*/deployments/*}:rollback', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SearchBlueprintRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/blueprints:searchRevisions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchDeploymentRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/orchestrationClusters/*}/deployments:searchRevisions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBlueprint' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{blueprint.name=projects/*/locations/*/orchestrationClusters/*/blueprints/*}', - 'body' => 'blueprint', - 'placeholders' => [ - 'blueprint.name' => [ - 'getters' => [ - 'getBlueprint', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDeployment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*}', - 'body' => 'deployment', - 'placeholders' => [ - 'deployment.name' => [ - 'getters' => [ - 'getDeployment', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateHydratedDeployment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{hydrated_deployment.name=projects/*/locations/*/orchestrationClusters/*/deployments/*/hydratedDeployments/*}', - 'body' => 'hydrated_deployment', - 'placeholders' => [ - 'hydrated_deployment.name' => [ - 'getters' => [ - 'getHydratedDeployment', - '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/*}', - '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/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php b/owl-bot-staging/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php deleted file mode 100644 index c9fb4832eaff..000000000000 --- a/owl-bot-staging/TelcoAutomation/v1/tests/Unit/V1/Client/TelcoAutomationClientTest.php +++ /dev/null @@ -1,3154 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TelcoAutomationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TelcoAutomationClient($options); - } - - /** @test */ - public function applyDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $workloadCluster = 'workloadCluster531492146'; - $rollbackSupport = true; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setWorkloadCluster($workloadCluster); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ApplyDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->applyDeployment($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.telcoautomation.v1.TelcoAutomation/ApplyDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function applyDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ApplyDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->applyDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function applyHydratedDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $workloadCluster = 'workloadCluster531492146'; - $expectedResponse = new HydratedDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setWorkloadCluster($workloadCluster); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); - $request = (new ApplyHydratedDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->applyHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/ApplyHydratedDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function applyHydratedDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); - $request = (new ApplyHydratedDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->applyHydratedDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function approveBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprint = 'sourceBlueprint-1884166289'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new Blueprint(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprint($sourceBlueprint); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new ApproveBlueprintRequest()) - ->setName($formattedName); - $response = $gapicClient->approveBlueprint($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.telcoautomation.v1.TelcoAutomation/ApproveBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function approveBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new ApproveBlueprintRequest()) - ->setName($formattedName); - try { - $gapicClient->approveBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function computeDeploymentStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new ComputeDeploymentStatusResponse(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ComputeDeploymentStatusRequest()) - ->setName($formattedName); - $response = $gapicClient->computeDeploymentStatus($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.telcoautomation.v1.TelcoAutomation/ComputeDeploymentStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function computeDeploymentStatusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ComputeDeploymentStatusRequest()) - ->setName($formattedName); - try { - $gapicClient->computeDeploymentStatus($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $sourceBlueprint = 'sourceBlueprint-1884166289'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new Blueprint(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprint($sourceBlueprint); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $blueprint = new Blueprint(); - $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; - $blueprint->setSourceBlueprint($blueprintSourceBlueprint); - $request = (new CreateBlueprintRequest()) - ->setParent($formattedParent) - ->setBlueprint($blueprint); - $response = $gapicClient->createBlueprint($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.telcoautomation.v1.TelcoAutomation/CreateBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBlueprint(); - $this->assertProtobufEquals($blueprint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $blueprint = new Blueprint(); - $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; - $blueprint->setSourceBlueprint($blueprintSourceBlueprint); - $request = (new CreateBlueprintRequest()) - ->setParent($formattedParent) - ->setBlueprint($blueprint); - try { - $gapicClient->createBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $workloadCluster = 'workloadCluster531492146'; - $rollbackSupport = true; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setWorkloadCluster($workloadCluster); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $deployment = new Deployment(); - $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; - $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeployment($deployment); - $response = $gapicClient->createDeployment($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.telcoautomation.v1.TelcoAutomation/CreateDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $deployment = new Deployment(); - $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; - $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); - $request = (new CreateDeploymentRequest()) - ->setParent($formattedParent) - ->setDeployment($deployment); - try { - $gapicClient->createDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEdgeSlmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEdgeSlmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $orchestrationCluster = 'orchestrationCluster-1006439940'; - $tnaVersion = 'tnaVersion1050832320'; - $expectedResponse = new EdgeSlm(); - $expectedResponse->setName($name); - $expectedResponse->setOrchestrationCluster($orchestrationCluster); - $expectedResponse->setTnaVersion($tnaVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEdgeSlmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $edgeSlmId = 'edgeSlmId974932168'; - $edgeSlm = new EdgeSlm(); - $request = (new CreateEdgeSlmRequest()) - ->setParent($formattedParent) - ->setEdgeSlmId($edgeSlmId) - ->setEdgeSlm($edgeSlm); - $response = $gapicClient->createEdgeSlm($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.telcoautomation.v1.TelcoAutomation/CreateEdgeSlm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEdgeSlmId(); - $this->assertProtobufEquals($edgeSlmId, $actualValue); - $actualValue = $actualApiRequestObject->getEdgeSlm(); - $this->assertProtobufEquals($edgeSlm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEdgeSlmTest'); - $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 createEdgeSlmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEdgeSlmTest'); - $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]'); - $edgeSlmId = 'edgeSlmId974932168'; - $edgeSlm = new EdgeSlm(); - $request = (new CreateEdgeSlmRequest()) - ->setParent($formattedParent) - ->setEdgeSlmId($edgeSlmId) - ->setEdgeSlm($edgeSlm); - $response = $gapicClient->createEdgeSlm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEdgeSlmTest'); - 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 createOrchestrationClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createOrchestrationClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $tnaVersion = 'tnaVersion1050832320'; - $expectedResponse = new OrchestrationCluster(); - $expectedResponse->setName($name); - $expectedResponse->setTnaVersion($tnaVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createOrchestrationClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $orchestrationClusterId = 'orchestrationClusterId314535486'; - $orchestrationCluster = new OrchestrationCluster(); - $request = (new CreateOrchestrationClusterRequest()) - ->setParent($formattedParent) - ->setOrchestrationClusterId($orchestrationClusterId) - ->setOrchestrationCluster($orchestrationCluster); - $response = $gapicClient->createOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/CreateOrchestrationCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getOrchestrationClusterId(); - $this->assertProtobufEquals($orchestrationClusterId, $actualValue); - $actualValue = $actualApiRequestObject->getOrchestrationCluster(); - $this->assertProtobufEquals($orchestrationCluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOrchestrationClusterTest'); - $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 createOrchestrationClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createOrchestrationClusterTest'); - $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]'); - $orchestrationClusterId = 'orchestrationClusterId314535486'; - $orchestrationCluster = new OrchestrationCluster(); - $request = (new CreateOrchestrationClusterRequest()) - ->setParent($formattedParent) - ->setOrchestrationClusterId($orchestrationClusterId) - ->setOrchestrationCluster($orchestrationCluster); - $response = $gapicClient->createOrchestrationCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOrchestrationClusterTest'); - 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 deleteBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new DeleteBlueprintRequest()) - ->setName($formattedName); - $gapicClient->deleteBlueprint($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/DeleteBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new DeleteBlueprintRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEdgeSlmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEdgeSlmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEdgeSlmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); - $request = (new DeleteEdgeSlmRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEdgeSlm($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.telcoautomation.v1.TelcoAutomation/DeleteEdgeSlm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEdgeSlmTest'); - $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 deleteEdgeSlmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEdgeSlmTest'); - $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->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); - $request = (new DeleteEdgeSlmRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEdgeSlm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEdgeSlmTest'); - 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 deleteOrchestrationClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteOrchestrationClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteOrchestrationClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new DeleteOrchestrationClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/DeleteOrchestrationCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteOrchestrationClusterTest'); - $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 deleteOrchestrationClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteOrchestrationClusterTest'); - $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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new DeleteOrchestrationClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteOrchestrationCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteOrchestrationClusterTest'); - 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 discardBlueprintChangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DiscardBlueprintChangesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new DiscardBlueprintChangesRequest()) - ->setName($formattedName); - $response = $gapicClient->discardBlueprintChanges($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.telcoautomation.v1.TelcoAutomation/DiscardBlueprintChanges', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function discardBlueprintChangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new DiscardBlueprintChangesRequest()) - ->setName($formattedName); - try { - $gapicClient->discardBlueprintChanges($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function discardDeploymentChangesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DiscardDeploymentChangesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new DiscardDeploymentChangesRequest()) - ->setName($formattedName); - $response = $gapicClient->discardDeploymentChanges($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.telcoautomation.v1.TelcoAutomation/DiscardDeploymentChanges', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function discardDeploymentChangesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new DiscardDeploymentChangesRequest()) - ->setName($formattedName); - try { - $gapicClient->discardDeploymentChanges($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprint = 'sourceBlueprint-1884166289'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new Blueprint(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprint($sourceBlueprint); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new GetBlueprintRequest()) - ->setName($formattedName); - $response = $gapicClient->getBlueprint($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.telcoautomation.v1.TelcoAutomation/GetBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new GetBlueprintRequest()) - ->setName($formattedName); - try { - $gapicClient->getBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $workloadCluster = 'workloadCluster531492146'; - $rollbackSupport = true; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setWorkloadCluster($workloadCluster); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getDeployment($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.telcoautomation.v1.TelcoAutomation/GetDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new GetDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->getDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEdgeSlmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $orchestrationCluster = 'orchestrationCluster-1006439940'; - $tnaVersion = 'tnaVersion1050832320'; - $expectedResponse = new EdgeSlm(); - $expectedResponse->setName($name2); - $expectedResponse->setOrchestrationCluster($orchestrationCluster); - $expectedResponse->setTnaVersion($tnaVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); - $request = (new GetEdgeSlmRequest()) - ->setName($formattedName); - $response = $gapicClient->getEdgeSlm($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.telcoautomation.v1.TelcoAutomation/GetEdgeSlm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEdgeSlmExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->edgeSlmName('[PROJECT]', '[LOCATION]', '[EDGE_SLM]'); - $request = (new GetEdgeSlmRequest()) - ->setName($formattedName); - try { - $gapicClient->getEdgeSlm($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHydratedDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $workloadCluster = 'workloadCluster531492146'; - $expectedResponse = new HydratedDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setWorkloadCluster($workloadCluster); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); - $request = (new GetHydratedDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/GetHydratedDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHydratedDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->hydratedDeploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]', '[HYDRATED_DEPLOYMENT]'); - $request = (new GetHydratedDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->getHydratedDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrchestrationClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $tnaVersion = 'tnaVersion1050832320'; - $expectedResponse = new OrchestrationCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setTnaVersion($tnaVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new GetOrchestrationClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getOrchestrationCluster($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.telcoautomation.v1.TelcoAutomation/GetOrchestrationCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrchestrationClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new GetOrchestrationClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getOrchestrationCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPublicBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new PublicBlueprint(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->publicBlueprintName('[PROJECT]', '[LOCATION]', '[PUBLIC_LUEPRINT]'); - $request = (new GetPublicBlueprintRequest()) - ->setName($formattedName); - $response = $gapicClient->getPublicBlueprint($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.telcoautomation.v1.TelcoAutomation/GetPublicBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPublicBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->publicBlueprintName('[PROJECT]', '[LOCATION]', '[PUBLIC_LUEPRINT]'); - $request = (new GetPublicBlueprintRequest()) - ->setName($formattedName); - try { - $gapicClient->getPublicBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBlueprintRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $blueprintsElement = new Blueprint(); - $blueprints = [ - $blueprintsElement, - ]; - $expectedResponse = new ListBlueprintRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBlueprints($blueprints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new ListBlueprintRevisionsRequest()) - ->setName($formattedName); - $response = $gapicClient->listBlueprintRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprintRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBlueprintRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new ListBlueprintRevisionsRequest()) - ->setName($formattedName); - try { - $gapicClient->listBlueprintRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBlueprintsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $blueprintsElement = new Blueprint(); - $blueprints = [ - $blueprintsElement, - ]; - $expectedResponse = new ListBlueprintsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBlueprints($blueprints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new ListBlueprintsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBlueprints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListBlueprints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBlueprintsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new ListBlueprintsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBlueprints($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deploymentsElement = new Deployment(); - $deployments = [ - $deploymentsElement, - ]; - $expectedResponse = new ListDeploymentRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeployments($deployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ListDeploymentRevisionsRequest()) - ->setName($formattedName); - $response = $gapicClient->listDeploymentRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListDeploymentRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ListDeploymentRevisionsRequest()) - ->setName($formattedName); - try { - $gapicClient->listDeploymentRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deploymentsElement = new Deployment(); - $deployments = [ - $deploymentsElement, - ]; - $expectedResponse = new ListDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeployments($deployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new ListDeploymentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDeployments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeploymentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $request = (new ListDeploymentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDeployments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEdgeSlmsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $edgeSlmsElement = new EdgeSlm(); - $edgeSlms = [ - $edgeSlmsElement, - ]; - $expectedResponse = new ListEdgeSlmsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEdgeSlms($edgeSlms); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEdgeSlmsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEdgeSlms($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEdgeSlms()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListEdgeSlms', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEdgeSlmsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListEdgeSlmsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEdgeSlms($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHydratedDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hydratedDeploymentsElement = new HydratedDeployment(); - $hydratedDeployments = [ - $hydratedDeploymentsElement, - ]; - $expectedResponse = new ListHydratedDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHydratedDeployments($hydratedDeployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ListHydratedDeploymentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHydratedDeployments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHydratedDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListHydratedDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHydratedDeploymentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ListHydratedDeploymentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHydratedDeployments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrchestrationClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $orchestrationClustersElement = new OrchestrationCluster(); - $orchestrationClusters = [ - $orchestrationClustersElement, - ]; - $expectedResponse = new ListOrchestrationClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOrchestrationClusters($orchestrationClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListOrchestrationClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOrchestrationClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOrchestrationClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListOrchestrationClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOrchestrationClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListOrchestrationClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOrchestrationClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPublicBlueprintsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $publicBlueprintsElement = new PublicBlueprint(); - $publicBlueprints = [ - $publicBlueprintsElement, - ]; - $expectedResponse = new ListPublicBlueprintsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPublicBlueprints($publicBlueprints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPublicBlueprintsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPublicBlueprints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPublicBlueprints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/ListPublicBlueprints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPublicBlueprintsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListPublicBlueprintsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPublicBlueprints($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function proposeBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprint = 'sourceBlueprint-1884166289'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new Blueprint(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprint($sourceBlueprint); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new ProposeBlueprintRequest()) - ->setName($formattedName); - $response = $gapicClient->proposeBlueprint($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.telcoautomation.v1.TelcoAutomation/ProposeBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function proposeBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new ProposeBlueprintRequest()) - ->setName($formattedName); - try { - $gapicClient->proposeBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rejectBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprint = 'sourceBlueprint-1884166289'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new Blueprint(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprint($sourceBlueprint); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new RejectBlueprintRequest()) - ->setName($formattedName); - $response = $gapicClient->rejectBlueprint($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.telcoautomation.v1.TelcoAutomation/RejectBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rejectBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->blueprintName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[BLUEPRINT]'); - $request = (new RejectBlueprintRequest()) - ->setName($formattedName); - try { - $gapicClient->rejectBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new RemoveDeploymentRequest()) - ->setName($formattedName); - $gapicClient->removeDeployment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/RemoveDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new RemoveDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->removeDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId2 = 'revisionId2-100208654'; - $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $workloadCluster = 'workloadCluster531492146'; - $rollbackSupport = true; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId2); - $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setWorkloadCluster($workloadCluster); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $revisionId = 'revisionId513861631'; - $request = (new RollbackDeploymentRequest()) - ->setName($formattedName) - ->setRevisionId($revisionId); - $response = $gapicClient->rollbackDeployment($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.telcoautomation.v1.TelcoAutomation/RollbackDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getRevisionId(); - $this->assertProtobufEquals($revisionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $revisionId = 'revisionId513861631'; - $request = (new RollbackDeploymentRequest()) - ->setName($formattedName) - ->setRevisionId($revisionId); - try { - $gapicClient->rollbackDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchBlueprintRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $blueprintsElement = new Blueprint(); - $blueprints = [ - $blueprintsElement, - ]; - $expectedResponse = new SearchBlueprintRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBlueprints($blueprints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $query = 'query107944136'; - $request = (new SearchBlueprintRevisionsRequest()) - ->setParent($formattedParent) - ->setQuery($query); - $response = $gapicClient->searchBlueprintRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBlueprints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/SearchBlueprintRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchBlueprintRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $query = 'query107944136'; - $request = (new SearchBlueprintRevisionsRequest()) - ->setParent($formattedParent) - ->setQuery($query); - try { - $gapicClient->searchBlueprintRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDeploymentRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $deploymentsElement = new Deployment(); - $deployments = [ - $deploymentsElement, - ]; - $expectedResponse = new SearchDeploymentRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDeployments($deployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $query = 'query107944136'; - $request = (new SearchDeploymentRevisionsRequest()) - ->setParent($formattedParent) - ->setQuery($query); - $response = $gapicClient->searchDeploymentRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.telcoautomation.v1.TelcoAutomation/SearchDeploymentRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDeploymentRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->orchestrationClusterName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]'); - $query = 'query107944136'; - $request = (new SearchDeploymentRevisionsRequest()) - ->setParent($formattedParent) - ->setQuery($query); - try { - $gapicClient->searchDeploymentRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBlueprintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $sourceBlueprint = 'sourceBlueprint-1884166289'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $rollbackSupport = true; - $expectedResponse = new Blueprint(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprint($sourceBlueprint); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $blueprint = new Blueprint(); - $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; - $blueprint->setSourceBlueprint($blueprintSourceBlueprint); - $updateMask = new FieldMask(); - $request = (new UpdateBlueprintRequest()) - ->setBlueprint($blueprint) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBlueprint($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.telcoautomation.v1.TelcoAutomation/UpdateBlueprint', $actualFuncCall); - $actualValue = $actualRequestObject->getBlueprint(); - $this->assertProtobufEquals($blueprint, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBlueprintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $blueprint = new Blueprint(); - $blueprintSourceBlueprint = 'blueprintSourceBlueprint115443109'; - $blueprint->setSourceBlueprint($blueprintSourceBlueprint); - $updateMask = new FieldMask(); - $request = (new UpdateBlueprintRequest()) - ->setBlueprint($blueprint) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateBlueprint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $revisionId = 'revisionId513861631'; - $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $workloadCluster = 'workloadCluster531492146'; - $rollbackSupport = true; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setWorkloadCluster($workloadCluster); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $deployment = new Deployment(); - $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; - $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); - $updateMask = new FieldMask(); - $request = (new UpdateDeploymentRequest()) - ->setDeployment($deployment) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDeployment($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.telcoautomation.v1.TelcoAutomation/UpdateDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getDeployment(); - $this->assertProtobufEquals($deployment, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $deployment = new Deployment(); - $deploymentSourceBlueprintRevision = 'deploymentSourceBlueprintRevision-1529084882'; - $deployment->setSourceBlueprintRevision($deploymentSourceBlueprintRevision); - $updateMask = new FieldMask(); - $request = (new UpdateDeploymentRequest()) - ->setDeployment($deployment) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateHydratedDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $workloadCluster = 'workloadCluster531492146'; - $expectedResponse = new HydratedDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setWorkloadCluster($workloadCluster); - $transport->addResponse($expectedResponse); - // Mock request - $hydratedDeployment = new HydratedDeployment(); - $updateMask = new FieldMask(); - $request = (new UpdateHydratedDeploymentRequest()) - ->setHydratedDeployment($hydratedDeployment) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateHydratedDeployment($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.telcoautomation.v1.TelcoAutomation/UpdateHydratedDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getHydratedDeployment(); - $this->assertProtobufEquals($hydratedDeployment, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateHydratedDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $hydratedDeployment = new HydratedDeployment(); - $updateMask = new FieldMask(); - $request = (new UpdateHydratedDeploymentRequest()) - ->setHydratedDeployment($hydratedDeployment) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateHydratedDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 applyDeploymentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $revisionId = 'revisionId513861631'; - $sourceBlueprintRevision = 'sourceBlueprintRevision-1372328277'; - $displayName = 'displayName1615086568'; - $repository = 'repository1950800714'; - $sourceProvider = 'sourceProvider2074918293'; - $workloadCluster = 'workloadCluster531492146'; - $rollbackSupport = true; - $expectedResponse = new Deployment(); - $expectedResponse->setName($name2); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setSourceBlueprintRevision($sourceBlueprintRevision); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRepository($repository); - $expectedResponse->setSourceProvider($sourceProvider); - $expectedResponse->setWorkloadCluster($workloadCluster); - $expectedResponse->setRollbackSupport($rollbackSupport); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deploymentName('[PROJECT]', '[LOCATION]', '[ORCHESTRATION_CLUSTER]', '[DEPLOYMENT]'); - $request = (new ApplyDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->applyDeploymentAsync($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.telcoautomation.v1.TelcoAutomation/ApplyDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTts.php b/owl-bot-staging/TextToSpeech/v1/proto/src/GPBMetadata/Google/Cloud/Texttospeech/V1/CloudTts.php deleted file mode 100644 index 6d6a89bd79873be88fbb9d20cbd0fb45ad7189e0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4912 zcmcIo&u`oI6*pzev7c;BW}HS=>Xc;))X5yFR=R9amTiM@@p4u)kjCO%yv|D2s?bCy&0Ggq?uE4&wJQrSrfPePz%+NK#^;8f4eWbgJZt9+{ z8u}{?=b6w|4VR$uv}|{1YMySH0#&G)8ri!q_?T4oBiq98p9!H;b(#^(M!RBq#4%N) zT_mpN=(cA$brj9zdc?cRBYm@XKQK$-^scby`X zub$d7QYP7YTQW_HX2CMuTy7N82;yyu1w$vM_ij3eIx#wV(pS%Q%Xv4|1_^3rrjso1 z4}YTvS(ZATtE3)c1@2v?fhOf+_@@B-?^1gF`@VFV6>56CP}AoJsoMdTYU^0EG%bF` zral<^(50~}XF>3Rz|NR}6GZ5L5;L%Mq`Tg!rEA1(kUtKI>+vbrG*q)URC`3xtPV+X z0=KuGU;a+w#0v1^3a*VyO87^xdd?tFba^k9y_cRBN}8Dy|HeU-J@M~Be8Qm1VAlB! zSfRTy8KL(1Jj7ggU?@Fec8HT)#+UKz!}*q)sK9LCN}&?}A?%ncRYS^%={iiaX0y8GAHc3*y;Ka8H?<4pb0im&Tqy2^iLB)6)MsvQ zt-SOXj>`*hSD7m;{wD&rn}O;p(qwcL=KpsP)lGZoF~nGQe?f?$0~M-6S1H0DLiC)j z2g_V6o1Krq!fXgnT;&IiNH=_=z7)w+0jHg)fxTx!SOd?)$Tj08_brnkSu422R!28`EP?TCd49xiHI%LgfO3FW=CC~I2E%4E@`~kky&S=Bq6LZT zN?5hK^>Xc4ZdD43d|ap%E5{|}9KQ=Y)1UsJG^Hwj zj^x+jhTvKKwL5x`o=THd7f`p+ER-xPdbPwZV2BW4j2y1uK+>eF9<% z;`bcH!;R~*Eyu?LDMpj!CHk8Zm9K@r>##kbK`4O*Wx&El3y^C*5B6#pK9?OE(Fr$t2m53DW2Mi8#gYLuvB+06XJ`B5_O zgI!;Sm`^|0U`>*YGL-au6sC`Jok>Q#$cg{sAT~yGd>P_CPhRl`t%Z2@=kviCL`V%j zSMI_ls}kfM)|yxmarxEnq!nBs{uV@S-P8JPp+~RpLj2q^h6AGXRNYiMXRNlyzi&;q zI~sqKtvfFQPjHylJeL+!7l#=|?<7~Tm#>GWY0O*GIn6?JfFptt?3#PneSVO3;f^{) z>NSG!ab$7RIHzZ-RFrSGA?^^{a&W3whAxg7ESz}u+5B`(Sx+|tloJY)k0v=fqWm5< zC*JdSA=QxUwMI)WDkn{;Bwyps4OnZ)(ow5Ym60xEaHDp3cvLx-6A>{BiR%@Ba9g7? zqU-d6T#S*1cmT%!8Qj(S6K67gSYUko8%v?^2H>t~XM98^U#&g^Q9tW43GYX9V)dE+-T{QA3 zO!JeUpc&+QX^;DaOVz%T?o6C1{Uch)&EH7rzUSF)E|Yor@?~Hw{Fp&H@B3FJ4{baF zbuDL*|1tvf@@1}H`K|F)8KjDUFL~IN_Yw}_S4F`!0?`rI`r{mt+Xa9(- z6k4t3zasCK*xgJTyY#S=9=Df1J@_j8+z#$;*yT-F{B69w`9AW250J|-gj{YMB9}u6 z>12LGdyGxinternalAddGeneratedFile( - ' -ü - -0google/cloud/texttospeech/v1/cloud_tts_lrs.protogoogle.cloud.texttospeech.v1google/api/client.protogoogle/api/field_behavior.proto,google/cloud/texttospeech/v1/cloud_tts.proto#google/longrunning/operations.protogoogle/protobuf/timestamp.proto"™ -SynthesizeLongAudioRequest -parent ( @ -input ( 2,.google.cloud.texttospeech.v1.SynthesisInputBàAD - audio_config ( 2).google.cloud.texttospeech.v1.AudioConfigBàA -output_gcs_uri ( BàAF -voice ( 22.google.cloud.texttospeech.v1.VoiceSelectionParamsBàA" -SynthesizeLongAudioResponse"¤ -SynthesizeLongAudioMetadata. - -start_time ( 2.google.protobuf.Timestamp8 -last_update_time ( 2.google.protobuf.TimestampB -progress_percentage (2Ÿ -TextToSpeechLongAudioSynthesizeª -SynthesizeLongAudio8.google.cloud.texttospeech.v1.SynthesizeLongAudioRequest.google.longrunning.Operation"¹ÊAt -8google.cloud.texttospeech.v1.SynthesizeLongAudioResponse8google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata‚Óä“<"7/v1/{parent=projects/*/locations/*}:synthesizeLongAudio:*OÊAtexttospeech.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBï - com.google.cloud.texttospeech.v1B#TextToSpeechLongAudioSynthesisProtoPZDcloud.google.com/go/texttospeech/apiv1/texttospeechpb;texttospeechpbªGoogle.Cloud.TextToSpeech.V1ÊGoogle\\Cloud\\TextToSpeech\\V1êGoogle::Cloud::TextToSpeech::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php deleted file mode 100644 index 2222ba2fcb32..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AdvancedVoiceOptions.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.texttospeech.v1.AdvancedVoiceOptions - */ -class AdvancedVoiceOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Only for Journey voices. If false, the synthesis will be context aware - * and have higher latency. - * - * Generated from protobuf field optional bool low_latency_journey_synthesis = 1; - */ - protected $low_latency_journey_synthesis = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $low_latency_journey_synthesis - * Only for Journey voices. If false, the synthesis will be context aware - * and have higher latency. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Only for Journey voices. If false, the synthesis will be context aware - * and have higher latency. - * - * Generated from protobuf field optional bool low_latency_journey_synthesis = 1; - * @return bool - */ - public function getLowLatencyJourneySynthesis() - { - return isset($this->low_latency_journey_synthesis) ? $this->low_latency_journey_synthesis : false; - } - - public function hasLowLatencyJourneySynthesis() - { - return isset($this->low_latency_journey_synthesis); - } - - public function clearLowLatencyJourneySynthesis() - { - unset($this->low_latency_journey_synthesis); - } - - /** - * Only for Journey voices. If false, the synthesis will be context aware - * and have higher latency. - * - * Generated from protobuf field optional bool low_latency_journey_synthesis = 1; - * @param bool $var - * @return $this - */ - public function setLowLatencyJourneySynthesis($var) - { - GPBUtil::checkBool($var); - $this->low_latency_journey_synthesis = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php deleted file mode 100644 index 7d299d36de5a..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioConfig.php +++ /dev/null @@ -1,329 +0,0 @@ -google.cloud.texttospeech.v1.AudioConfig - */ -class AudioConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The format of the audio byte stream. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_encoding = 0; - /** - * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is - * the normal native speed supported by the specific voice. 2.0 is twice as - * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - * speed. Any other values < 0.25 or > 4.0 will return an error. - * - * Generated from protobuf field double speaking_rate = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $speaking_rate = 0.0; - /** - * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means - * increase 20 semitones from the original pitch. -20 means decrease 20 - * semitones from the original pitch. - * - * Generated from protobuf field double pitch = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $pitch = 0.0; - /** - * Optional. Input only. Volume gain (in dB) of the normal native volume - * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or - * set to a value of 0.0 (dB), will play at normal native signal amplitude. A - * value of -6.0 (dB) will play at approximately half the amplitude of the - * normal native signal amplitude. A value of +6.0 (dB) will play at - * approximately twice the amplitude of the normal native signal amplitude. - * Strongly recommend not to exceed +10 (dB) as there's usually no effective - * increase in loudness for any value greater than that. - * - * Generated from protobuf field double volume_gain_db = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $volume_gain_db = 0.0; - /** - * Optional. The synthesis sample rate (in hertz) for this audio. When this is - * specified in SynthesizeSpeechRequest, if this is different from the voice's - * natural sample rate, then the synthesizer will honor this request by - * converting to the desired sample rate (which might result in worse audio - * quality), unless the specified sample rate is not supported for the - * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sample_rate_hertz = 0; - /** - * Optional. Input only. An identifier which selects 'audio effects' profiles - * that are applied on (post synthesized) text to speech. Effects are applied - * on top of each other in the order they are given. See - * [audio - * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for - * current supported profile ids. - * - * Generated from protobuf field repeated string effects_profile_id = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - private $effects_profile_id; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $audio_encoding - * Required. The format of the audio byte stream. - * @type float $speaking_rate - * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is - * the normal native speed supported by the specific voice. 2.0 is twice as - * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - * speed. Any other values < 0.25 or > 4.0 will return an error. - * @type float $pitch - * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means - * increase 20 semitones from the original pitch. -20 means decrease 20 - * semitones from the original pitch. - * @type float $volume_gain_db - * Optional. Input only. Volume gain (in dB) of the normal native volume - * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or - * set to a value of 0.0 (dB), will play at normal native signal amplitude. A - * value of -6.0 (dB) will play at approximately half the amplitude of the - * normal native signal amplitude. A value of +6.0 (dB) will play at - * approximately twice the amplitude of the normal native signal amplitude. - * Strongly recommend not to exceed +10 (dB) as there's usually no effective - * increase in loudness for any value greater than that. - * @type int $sample_rate_hertz - * Optional. The synthesis sample rate (in hertz) for this audio. When this is - * specified in SynthesizeSpeechRequest, if this is different from the voice's - * natural sample rate, then the synthesizer will honor this request by - * converting to the desired sample rate (which might result in worse audio - * quality), unless the specified sample rate is not supported for the - * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * @type array|\Google\Protobuf\Internal\RepeatedField $effects_profile_id - * Optional. Input only. An identifier which selects 'audio effects' profiles - * that are applied on (post synthesized) text to speech. Effects are applied - * on top of each other in the order they are given. See - * [audio - * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for - * current supported profile ids. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. The format of the audio byte stream. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAudioEncoding() - { - return $this->audio_encoding; - } - - /** - * Required. The format of the audio byte stream. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioEncoding audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAudioEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\AudioEncoding::class); - $this->audio_encoding = $var; - - return $this; - } - - /** - * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is - * the normal native speed supported by the specific voice. 2.0 is twice as - * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - * speed. Any other values < 0.25 or > 4.0 will return an error. - * - * Generated from protobuf field double speaking_rate = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSpeakingRate() - { - return $this->speaking_rate; - } - - /** - * Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is - * the normal native speed supported by the specific voice. 2.0 is twice as - * fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 - * speed. Any other values < 0.25 or > 4.0 will return an error. - * - * Generated from protobuf field double speaking_rate = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSpeakingRate($var) - { - GPBUtil::checkDouble($var); - $this->speaking_rate = $var; - - return $this; - } - - /** - * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means - * increase 20 semitones from the original pitch. -20 means decrease 20 - * semitones from the original pitch. - * - * Generated from protobuf field double pitch = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getPitch() - { - return $this->pitch; - } - - /** - * Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means - * increase 20 semitones from the original pitch. -20 means decrease 20 - * semitones from the original pitch. - * - * Generated from protobuf field double pitch = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setPitch($var) - { - GPBUtil::checkDouble($var); - $this->pitch = $var; - - return $this; - } - - /** - * Optional. Input only. Volume gain (in dB) of the normal native volume - * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or - * set to a value of 0.0 (dB), will play at normal native signal amplitude. A - * value of -6.0 (dB) will play at approximately half the amplitude of the - * normal native signal amplitude. A value of +6.0 (dB) will play at - * approximately twice the amplitude of the normal native signal amplitude. - * Strongly recommend not to exceed +10 (dB) as there's usually no effective - * increase in loudness for any value greater than that. - * - * Generated from protobuf field double volume_gain_db = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getVolumeGainDb() - { - return $this->volume_gain_db; - } - - /** - * Optional. Input only. Volume gain (in dB) of the normal native volume - * supported by the specific voice, in the range [-96.0, 16.0]. If unset, or - * set to a value of 0.0 (dB), will play at normal native signal amplitude. A - * value of -6.0 (dB) will play at approximately half the amplitude of the - * normal native signal amplitude. A value of +6.0 (dB) will play at - * approximately twice the amplitude of the normal native signal amplitude. - * Strongly recommend not to exceed +10 (dB) as there's usually no effective - * increase in loudness for any value greater than that. - * - * Generated from protobuf field double volume_gain_db = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setVolumeGainDb($var) - { - GPBUtil::checkDouble($var); - $this->volume_gain_db = $var; - - return $this; - } - - /** - * Optional. The synthesis sample rate (in hertz) for this audio. When this is - * specified in SynthesizeSpeechRequest, if this is different from the voice's - * natural sample rate, then the synthesizer will honor this request by - * converting to the desired sample rate (which might result in worse audio - * quality), unless the specified sample rate is not supported for the - * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * Optional. The synthesis sample rate (in hertz) for this audio. When this is - * specified in SynthesizeSpeechRequest, if this is different from the voice's - * natural sample rate, then the synthesizer will honor this request by - * converting to the desired sample rate (which might result in worse audio - * quality), unless the specified sample rate is not supported for the - * encoding chosen, in which case it will fail the request and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf field int32 sample_rate_hertz = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * Optional. Input only. An identifier which selects 'audio effects' profiles - * that are applied on (post synthesized) text to speech. Effects are applied - * on top of each other in the order they are given. See - * [audio - * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for - * current supported profile ids. - * - * Generated from protobuf field repeated string effects_profile_id = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEffectsProfileId() - { - return $this->effects_profile_id; - } - - /** - * Optional. Input only. An identifier which selects 'audio effects' profiles - * that are applied on (post synthesized) text to speech. Effects are applied - * on top of each other in the order they are given. See - * [audio - * profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for - * current supported profile ids. - * - * Generated from protobuf field repeated string effects_profile_id = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEffectsProfileId($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->effects_profile_id = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php deleted file mode 100644 index 1a3ee8800a95..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/AudioEncoding.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.texttospeech.v1.AudioEncoding - */ -class AudioEncoding -{ - /** - * Not specified. Will return result - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. - * - * Generated from protobuf enum AUDIO_ENCODING_UNSPECIFIED = 0; - */ - const AUDIO_ENCODING_UNSPECIFIED = 0; - /** - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * Audio content returned as LINEAR16 also contains a WAV header. - * - * Generated from protobuf enum LINEAR16 = 1; - */ - const LINEAR16 = 1; - /** - * MP3 audio at 32kbps. - * - * Generated from protobuf enum MP3 = 2; - */ - const MP3 = 2; - /** - * Opus encoded audio wrapped in an ogg container. The result will be a - * file which can be played natively on Android, and in browsers (at least - * Chrome and Firefox). The quality of the encoding is considerably higher - * than MP3 while using approximately the same bitrate. - * - * Generated from protobuf enum OGG_OPUS = 3; - */ - const OGG_OPUS = 3; - /** - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * Audio content returned as MULAW also contains a WAV header. - * - * Generated from protobuf enum MULAW = 5; - */ - const MULAW = 5; - /** - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. - * Audio content returned as ALAW also contains a WAV header. - * - * Generated from protobuf enum ALAW = 6; - */ - const ALAW = 6; - - private static $valueToName = [ - self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED', - self::LINEAR16 => 'LINEAR16', - self::MP3 => 'MP3', - self::OGG_OPUS => 'OGG_OPUS', - self::MULAW => 'MULAW', - self::ALAW => 'ALAW', - ]; - - 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/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php deleted file mode 100644 index 2a2283ce0dea..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.texttospeech.v1.CustomPronunciationParams - */ -class CustomPronunciationParams extends \Google\Protobuf\Internal\Message -{ - /** - * The phrase to which the customization will be applied. - * The phrase can be multiple words (in the case of proper nouns etc), but - * should not span to a whole sentence. - * - * Generated from protobuf field optional string phrase = 1; - */ - protected $phrase = null; - /** - * The phonetic encoding of the phrase. - * - * Generated from protobuf field optional .google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding phonetic_encoding = 2; - */ - protected $phonetic_encoding = null; - /** - * The pronunciation of the phrase. This must be in the phonetic encoding - * specified above. - * - * Generated from protobuf field optional string pronunciation = 3; - */ - protected $pronunciation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $phrase - * The phrase to which the customization will be applied. - * The phrase can be multiple words (in the case of proper nouns etc), but - * should not span to a whole sentence. - * @type int $phonetic_encoding - * The phonetic encoding of the phrase. - * @type string $pronunciation - * The pronunciation of the phrase. This must be in the phonetic encoding - * specified above. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The phrase to which the customization will be applied. - * The phrase can be multiple words (in the case of proper nouns etc), but - * should not span to a whole sentence. - * - * Generated from protobuf field optional string phrase = 1; - * @return string - */ - public function getPhrase() - { - return isset($this->phrase) ? $this->phrase : ''; - } - - public function hasPhrase() - { - return isset($this->phrase); - } - - public function clearPhrase() - { - unset($this->phrase); - } - - /** - * The phrase to which the customization will be applied. - * The phrase can be multiple words (in the case of proper nouns etc), but - * should not span to a whole sentence. - * - * Generated from protobuf field optional string phrase = 1; - * @param string $var - * @return $this - */ - public function setPhrase($var) - { - GPBUtil::checkString($var, True); - $this->phrase = $var; - - return $this; - } - - /** - * The phonetic encoding of the phrase. - * - * Generated from protobuf field optional .google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding phonetic_encoding = 2; - * @return int - */ - public function getPhoneticEncoding() - { - return isset($this->phonetic_encoding) ? $this->phonetic_encoding : 0; - } - - public function hasPhoneticEncoding() - { - return isset($this->phonetic_encoding); - } - - public function clearPhoneticEncoding() - { - unset($this->phonetic_encoding); - } - - /** - * The phonetic encoding of the phrase. - * - * Generated from protobuf field optional .google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding phonetic_encoding = 2; - * @param int $var - * @return $this - */ - public function setPhoneticEncoding($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\CustomPronunciationParams\PhoneticEncoding::class); - $this->phonetic_encoding = $var; - - return $this; - } - - /** - * The pronunciation of the phrase. This must be in the phonetic encoding - * specified above. - * - * Generated from protobuf field optional string pronunciation = 3; - * @return string - */ - public function getPronunciation() - { - return isset($this->pronunciation) ? $this->pronunciation : ''; - } - - public function hasPronunciation() - { - return isset($this->pronunciation); - } - - public function clearPronunciation() - { - unset($this->pronunciation); - } - - /** - * The pronunciation of the phrase. This must be in the phonetic encoding - * specified above. - * - * Generated from protobuf field optional string pronunciation = 3; - * @param string $var - * @return $this - */ - public function setPronunciation($var) - { - GPBUtil::checkString($var, True); - $this->pronunciation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php deleted file mode 100644 index d7631a1efee4..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciationParams/PhoneticEncoding.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.texttospeech.v1.CustomPronunciationParams.PhoneticEncoding - */ -class PhoneticEncoding -{ - /** - * Not specified. - * - * Generated from protobuf enum PHONETIC_ENCODING_UNSPECIFIED = 0; - */ - const PHONETIC_ENCODING_UNSPECIFIED = 0; - /** - * IPA. (e.g. apple -> ˈæpÉ™l ) - * https://en.wikipedia.org/wiki/International_Phonetic_Alphabet - * - * Generated from protobuf enum PHONETIC_ENCODING_IPA = 1; - */ - const PHONETIC_ENCODING_IPA = 1; - /** - * X-SAMPA (e.g. apple -> "{p@l" ) - * https://en.wikipedia.org/wiki/X-SAMPA - * - * Generated from protobuf enum PHONETIC_ENCODING_X_SAMPA = 2; - */ - const PHONETIC_ENCODING_X_SAMPA = 2; - - private static $valueToName = [ - self::PHONETIC_ENCODING_UNSPECIFIED => 'PHONETIC_ENCODING_UNSPECIFIED', - self::PHONETIC_ENCODING_IPA => 'PHONETIC_ENCODING_IPA', - self::PHONETIC_ENCODING_X_SAMPA => 'PHONETIC_ENCODING_X_SAMPA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PhoneticEncoding::class, \Google\Cloud\TextToSpeech\V1\CustomPronunciationParams_PhoneticEncoding::class); - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php deleted file mode 100644 index fffc75dae4d1..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomPronunciations.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.texttospeech.v1.CustomPronunciations - */ -class CustomPronunciations extends \Google\Protobuf\Internal\Message -{ - /** - * The pronunciation customizations to be applied. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.CustomPronunciationParams pronunciations = 1; - */ - private $pronunciations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\TextToSpeech\V1\CustomPronunciationParams>|\Google\Protobuf\Internal\RepeatedField $pronunciations - * The pronunciation customizations to be applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The pronunciation customizations to be applied. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.CustomPronunciationParams pronunciations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPronunciations() - { - return $this->pronunciations; - } - - /** - * The pronunciation customizations to be applied. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.CustomPronunciationParams pronunciations = 1; - * @param array<\Google\Cloud\TextToSpeech\V1\CustomPronunciationParams>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPronunciations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\CustomPronunciationParams::class); - $this->pronunciations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php deleted file mode 100644 index bc208aa890c7..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.texttospeech.v1.CustomVoiceParams - */ -class CustomVoiceParams extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the AutoML model that synthesizes the custom voice. - * - * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $model = ''; - /** - * Optional. Deprecated. The usage of the synthesized audio to be reported. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $reported_usage = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model - * Required. The name of the AutoML model that synthesizes the custom voice. - * @type int $reported_usage - * Optional. Deprecated. The usage of the synthesized audio to be reported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the AutoML model that synthesizes the custom voice. - * - * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Required. The name of the AutoML model that synthesizes the custom voice. - * - * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * Optional. Deprecated. The usage of the synthesized audio to be reported. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return int - * @deprecated - */ - public function getReportedUsage() - { - @trigger_error('reported_usage is deprecated.', E_USER_DEPRECATED); - return $this->reported_usage; - } - - /** - * Optional. Deprecated. The usage of the synthesized audio to be reported. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage reported_usage = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - * @deprecated - */ - public function setReportedUsage($var) - { - @trigger_error('reported_usage is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\CustomVoiceParams\ReportedUsage::class); - $this->reported_usage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php deleted file mode 100644 index 6e8d93d63f04..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/CustomVoiceParams/ReportedUsage.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.texttospeech.v1.CustomVoiceParams.ReportedUsage - */ -class ReportedUsage -{ - /** - * Request with reported usage unspecified will be rejected. - * - * Generated from protobuf enum REPORTED_USAGE_UNSPECIFIED = 0; - */ - const REPORTED_USAGE_UNSPECIFIED = 0; - /** - * For scenarios where the synthesized audio is not downloadable and can - * only be used once. For example, real-time request in IVR system. - * - * Generated from protobuf enum REALTIME = 1; - */ - const REALTIME = 1; - /** - * For scenarios where the synthesized audio is downloadable and can be - * reused. For example, the synthesized audio is downloaded, stored in - * customer service system and played repeatedly. - * - * Generated from protobuf enum OFFLINE = 2; - */ - const OFFLINE = 2; - - private static $valueToName = [ - self::REPORTED_USAGE_UNSPECIFIED => 'REPORTED_USAGE_UNSPECIFIED', - self::REALTIME => 'REALTIME', - self::OFFLINE => 'OFFLINE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReportedUsage::class, \Google\Cloud\TextToSpeech\V1\CustomVoiceParams_ReportedUsage::class); - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php deleted file mode 100644 index a1f5971ee7a9..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.texttospeech.v1.ListVoicesRequest - */ -class ListVoicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Recommended. - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * If not specified, the API will return all supported voices. - * If specified, the ListVoices call will only return voices that can be used - * to synthesize this language_code. For example, if you specify `"en-NZ"`, - * all `"en-NZ"` voices will be returned. If you specify `"no"`, both - * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - * returned. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $language_code = ''; - - /** - * @param string $languageCode Optional. Recommended. - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * If not specified, the API will return all supported voices. - * If specified, the ListVoices call will only return voices that can be used - * to synthesize this language_code. For example, if you specify `"en-NZ"`, - * all `"en-NZ"` voices will be returned. If you specify `"no"`, both - * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - * returned. - * - * @return \Google\Cloud\TextToSpeech\V1\ListVoicesRequest - * - * @experimental - */ - public static function build(string $languageCode): self - { - return (new self()) - ->setLanguageCode($languageCode); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * Optional. Recommended. - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * If not specified, the API will return all supported voices. - * If specified, the ListVoices call will only return voices that can be used - * to synthesize this language_code. For example, if you specify `"en-NZ"`, - * all `"en-NZ"` voices will be returned. If you specify `"no"`, both - * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - * returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Recommended. - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * If not specified, the API will return all supported voices. - * If specified, the ListVoices call will only return voices that can be used - * to synthesize this language_code. For example, if you specify `"en-NZ"`, - * all `"en-NZ"` voices will be returned. If you specify `"no"`, both - * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - * returned. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Optional. Recommended. - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * If not specified, the API will return all supported voices. - * If specified, the ListVoices call will only return voices that can be used - * to synthesize this language_code. For example, if you specify `"en-NZ"`, - * all `"en-NZ"` voices will be returned. If you specify `"no"`, both - * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - * returned. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php deleted file mode 100644 index d28b7ae0e154..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/ListVoicesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.texttospeech.v1.ListVoicesResponse - */ -class ListVoicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of voices. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.Voice voices = 1; - */ - private $voices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\TextToSpeech\V1\Voice>|\Google\Protobuf\Internal\RepeatedField $voices - * The list of voices. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The list of voices. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.Voice voices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVoices() - { - return $this->voices; - } - - /** - * The list of voices. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.Voice voices = 1; - * @param array<\Google\Cloud\TextToSpeech\V1\Voice>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVoices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\Voice::class); - $this->voices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php deleted file mode 100644 index bb7faf68acc0..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.texttospeech.v1.MultiSpeakerMarkup - */ -class MultiSpeakerMarkup extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Speaker turns. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn turns = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $turns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup\Turn>|\Google\Protobuf\Internal\RepeatedField $turns - * Required. Speaker turns. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. Speaker turns. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn turns = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTurns() - { - return $this->turns; - } - - /** - * Required. Speaker turns. - * - * Generated from protobuf field repeated .google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn turns = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup\Turn>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTurns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup\Turn::class); - $this->turns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php deleted file mode 100644 index c2ad106a5e69..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/MultiSpeakerMarkup/Turn.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn - */ -class Turn extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer - * to documentation for available speakers. - * - * Generated from protobuf field string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $speaker = ''; - /** - * Required. The text to speak. - * - * Generated from protobuf field string text = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $speaker - * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer - * to documentation for available speakers. - * @type string $text - * Required. The text to speak. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer - * to documentation for available speakers. - * - * Generated from protobuf field string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSpeaker() - { - return $this->speaker; - } - - /** - * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer - * to documentation for available speakers. - * - * Generated from protobuf field string speaker = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSpeaker($var) - { - GPBUtil::checkString($var, True); - $this->speaker = $var; - - return $this; - } - - /** - * Required. The text to speak. - * - * Generated from protobuf field string text = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. The text to speak. - * - * Generated from protobuf field string text = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Turn::class, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup_Turn::class); - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php deleted file mode 100644 index ca9b5bfd29a5..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SsmlVoiceGender.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.texttospeech.v1.SsmlVoiceGender - */ -class SsmlVoiceGender -{ - /** - * An unspecified gender. - * In VoiceSelectionParams, this means that the client doesn't care which - * gender the selected voice will have. In the Voice field of - * ListVoicesResponse, this may mean that the voice doesn't fit any of the - * other categories in this enum, or that the gender of the voice isn't known. - * - * Generated from protobuf enum SSML_VOICE_GENDER_UNSPECIFIED = 0; - */ - const SSML_VOICE_GENDER_UNSPECIFIED = 0; - /** - * A male voice. - * - * Generated from protobuf enum MALE = 1; - */ - const MALE = 1; - /** - * A female voice. - * - * Generated from protobuf enum FEMALE = 2; - */ - const FEMALE = 2; - /** - * A gender-neutral voice. This voice is not yet supported. - * - * Generated from protobuf enum NEUTRAL = 3; - */ - const NEUTRAL = 3; - - private static $valueToName = [ - self::SSML_VOICE_GENDER_UNSPECIFIED => 'SSML_VOICE_GENDER_UNSPECIFIED', - self::MALE => 'MALE', - self::FEMALE => 'FEMALE', - self::NEUTRAL => 'NEUTRAL', - ]; - - 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/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php deleted file mode 100644 index c533cb8c4c2a..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesisInput.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.texttospeech.v1.StreamingSynthesisInput - */ -class StreamingSynthesisInput extends \Google\Protobuf\Internal\Message -{ - protected $input_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The raw text to be synthesized. It is recommended that each input - * contains complete, terminating sentences, as this will likely result in - * better prosody in the output audio. That being said, users are free to - * input text however they please. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The raw text to be synthesized. It is recommended that each input - * contains complete, terminating sentences, as this will likely result in - * better prosody in the output audio. That being said, users are free to - * input text however they please. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * The raw text to be synthesized. It is recommended that each input - * contains complete, terminating sentences, as this will likely result in - * better prosody in the output audio. That being said, users are free to - * input text however they please. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getInputSource() - { - return $this->whichOneof("input_source"); - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php deleted file mode 100644 index 85db9a292704..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.texttospeech.v1.StreamingSynthesizeConfig - */ -class StreamingSynthesizeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $voice = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice - * Required. The desired voice of the synthesized audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null - */ - public function getVoice() - { - return $this->voice; - } - - public function hasVoice() - { - return isset($this->voice); - } - - public function clearVoice() - { - unset($this->voice); - } - - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php deleted file mode 100644 index a6eed7b698ac..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.texttospeech.v1.StreamingSynthesizeRequest - */ -class StreamingSynthesizeRequest extends \Google\Protobuf\Internal\Message -{ - protected $streaming_request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig $streaming_config - * StreamingSynthesizeConfig to be used in this streaming attempt. Only - * specified in the first message sent in a `StreamingSynthesize` call. - * @type \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput $input - * Input to synthesize. Specified in all messages but the first in a - * `StreamingSynthesize` call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * StreamingSynthesizeConfig to be used in this streaming attempt. Only - * specified in the first message sent in a `StreamingSynthesize` call. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesizeConfig streaming_config = 1; - * @return \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig|null - */ - public function getStreamingConfig() - { - return $this->readOneof(1); - } - - public function hasStreamingConfig() - { - return $this->hasOneof(1); - } - - /** - * StreamingSynthesizeConfig to be used in this streaming attempt. Only - * specified in the first message sent in a `StreamingSynthesize` call. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesizeConfig streaming_config = 1; - * @param \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig $var - * @return $this - */ - public function setStreamingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\StreamingSynthesizeConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Input to synthesize. Specified in all messages but the first in a - * `StreamingSynthesize` call. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesisInput input = 2; - * @return \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput|null - */ - public function getInput() - { - return $this->readOneof(2); - } - - public function hasInput() - { - return $this->hasOneof(2); - } - - /** - * Input to synthesize. Specified in all messages but the first in a - * `StreamingSynthesize` call. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.StreamingSynthesisInput input = 2; - * @param \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\StreamingSynthesisInput::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getStreamingRequest() - { - return $this->whichOneof("streaming_request"); - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php deleted file mode 100644 index 34eb029802fd..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/StreamingSynthesizeResponse.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.texttospeech.v1.StreamingSynthesizeResponse - */ -class StreamingSynthesizeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The audio data bytes encoded as specified in the request. This is - * headerless LINEAR16 audio with a sample rate of 24000. - * - * Generated from protobuf field bytes audio_content = 1; - */ - protected $audio_content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $audio_content - * The audio data bytes encoded as specified in the request. This is - * headerless LINEAR16 audio with a sample rate of 24000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The audio data bytes encoded as specified in the request. This is - * headerless LINEAR16 audio with a sample rate of 24000. - * - * Generated from protobuf field bytes audio_content = 1; - * @return string - */ - public function getAudioContent() - { - return $this->audio_content; - } - - /** - * The audio data bytes encoded as specified in the request. This is - * headerless LINEAR16 audio with a sample rate of 24000. - * - * Generated from protobuf field bytes audio_content = 1; - * @param string $var - * @return $this - */ - public function setAudioContent($var) - { - GPBUtil::checkString($var, False); - $this->audio_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php deleted file mode 100644 index 35aa6a12b35e..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesisInput.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.texttospeech.v1.SynthesisInput - */ -class SynthesisInput extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The pronunciation customizations to be applied to the input. If - * this is set, the input will be synthesized using the given pronunciation - * customizations. - * The initial support will be for EFIGS (English, French, - * Italian, German, Spanish) languages, as provided in - * VoiceSelectionParams. Journey and Instant Clone voices are - * not supported yet. - * In order to customize the pronunciation of a phrase, there must be an exact - * match of the phrase in the input types. If using SSML, the phrase must not - * be inside a phoneme tag (entirely or partially). - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomPronunciations custom_pronunciations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_pronunciations = null; - protected $input_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The raw text to be synthesized. - * @type string $ssml - * The SSML document to be synthesized. The SSML document must be valid - * and well-formed. Otherwise the RPC will fail and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For - * more information, see - * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). - * @type \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup $multi_speaker_markup - * The multi-speaker input to be synthesized. Only applicable for - * multi-speaker synthesis. - * @type \Google\Cloud\TextToSpeech\V1\CustomPronunciations $custom_pronunciations - * Optional. The pronunciation customizations to be applied to the input. If - * this is set, the input will be synthesized using the given pronunciation - * customizations. - * The initial support will be for EFIGS (English, French, - * Italian, German, Spanish) languages, as provided in - * VoiceSelectionParams. Journey and Instant Clone voices are - * not supported yet. - * In order to customize the pronunciation of a phrase, there must be an exact - * match of the phrase in the input types. If using SSML, the phrase must not - * be inside a phoneme tag (entirely or partially). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The raw text to be synthesized. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * The raw text to be synthesized. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The SSML document to be synthesized. The SSML document must be valid - * and well-formed. Otherwise the RPC will fail and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For - * more information, see - * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). - * - * Generated from protobuf field string ssml = 2; - * @return string - */ - public function getSsml() - { - return $this->readOneof(2); - } - - public function hasSsml() - { - return $this->hasOneof(2); - } - - /** - * The SSML document to be synthesized. The SSML document must be valid - * and well-formed. Otherwise the RPC will fail and return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For - * more information, see - * [SSML](https://cloud.google.com/text-to-speech/docs/ssml). - * - * Generated from protobuf field string ssml = 2; - * @param string $var - * @return $this - */ - public function setSsml($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The multi-speaker input to be synthesized. Only applicable for - * multi-speaker synthesis. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.MultiSpeakerMarkup multi_speaker_markup = 4; - * @return \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup|null - */ - public function getMultiSpeakerMarkup() - { - return $this->readOneof(4); - } - - public function hasMultiSpeakerMarkup() - { - return $this->hasOneof(4); - } - - /** - * The multi-speaker input to be synthesized. Only applicable for - * multi-speaker synthesis. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.MultiSpeakerMarkup multi_speaker_markup = 4; - * @param \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup $var - * @return $this - */ - public function setMultiSpeakerMarkup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. The pronunciation customizations to be applied to the input. If - * this is set, the input will be synthesized using the given pronunciation - * customizations. - * The initial support will be for EFIGS (English, French, - * Italian, German, Spanish) languages, as provided in - * VoiceSelectionParams. Journey and Instant Clone voices are - * not supported yet. - * In order to customize the pronunciation of a phrase, there must be an exact - * match of the phrase in the input types. If using SSML, the phrase must not - * be inside a phoneme tag (entirely or partially). - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomPronunciations custom_pronunciations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\TextToSpeech\V1\CustomPronunciations|null - */ - public function getCustomPronunciations() - { - return $this->custom_pronunciations; - } - - public function hasCustomPronunciations() - { - return isset($this->custom_pronunciations); - } - - public function clearCustomPronunciations() - { - unset($this->custom_pronunciations); - } - - /** - * Optional. The pronunciation customizations to be applied to the input. If - * this is set, the input will be synthesized using the given pronunciation - * customizations. - * The initial support will be for EFIGS (English, French, - * Italian, German, Spanish) languages, as provided in - * VoiceSelectionParams. Journey and Instant Clone voices are - * not supported yet. - * In order to customize the pronunciation of a phrase, there must be an exact - * match of the phrase in the input types. If using SSML, the phrase must not - * be inside a phoneme tag (entirely or partially). - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomPronunciations custom_pronunciations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\TextToSpeech\V1\CustomPronunciations $var - * @return $this - */ - public function setCustomPronunciations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\CustomPronunciations::class); - $this->custom_pronunciations = $var; - - return $this; - } - - /** - * @return string - */ - public function getInputSource() - { - return $this->whichOneof("input_source"); - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php deleted file mode 100644 index ab9407b4e614..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioMetadata.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.texttospeech.v1.SynthesizeLongAudioMetadata - */ -class SynthesizeLongAudioMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Time when the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Deprecated. Do not use. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [deprecated = true]; - * @deprecated - */ - protected $last_update_time = null; - /** - * The progress of the most recent processing update in percentage, ie. 70.0%. - * - * Generated from protobuf field double progress_percentage = 3; - */ - protected $progress_percentage = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Time when the request was received. - * @type \Google\Protobuf\Timestamp $last_update_time - * Deprecated. Do not use. - * @type float $progress_percentage - * The progress of the most recent processing update in percentage, ie. 70.0%. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); - parent::__construct($data); - } - - /** - * Time when the request was received. - * - * 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); - } - - /** - * Time when the request was received. - * - * 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; - } - - /** - * Deprecated. Do not use. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [deprecated = true]; - * @return \Google\Protobuf\Timestamp|null - * @deprecated - */ - public function getLastUpdateTime() - { - @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); - unset($this->last_update_time); - } - - /** - * Deprecated. Do not use. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [deprecated = true]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - * @deprecated - */ - public function setLastUpdateTime($var) - { - @trigger_error('last_update_time is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - - /** - * The progress of the most recent processing update in percentage, ie. 70.0%. - * - * Generated from protobuf field double progress_percentage = 3; - * @return float - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - /** - * The progress of the most recent processing update in percentage, ie. 70.0%. - * - * Generated from protobuf field double progress_percentage = 3; - * @param float $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkDouble($var); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php deleted file mode 100644 index 951eaaae4f4d..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.texttospeech.v1.SynthesizeLongAudioRequest - */ -class SynthesizeLongAudioRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource states of the request in the form of - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * Required. The Synthesizer requires either plain text or SSML as input. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input = null; - /** - * Required. The configuration of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_config = null; - /** - * Required. Specifies a Cloud Storage URI for the synthesis results. Must be - * specified in the format: `gs://bucket_name/object_name`, and the bucket - * must already exist. - * - * Generated from protobuf field string output_gcs_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_gcs_uri = ''; - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $voice = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The resource states of the request in the form of - * `projects/*/locations/*`. - * @type \Google\Cloud\TextToSpeech\V1\SynthesisInput $input - * Required. The Synthesizer requires either plain text or SSML as input. - * @type \Google\Cloud\TextToSpeech\V1\AudioConfig $audio_config - * Required. The configuration of the synthesized audio. - * @type string $output_gcs_uri - * Required. Specifies a Cloud Storage URI for the synthesis results. Must be - * specified in the format: `gs://bucket_name/object_name`, and the bucket - * must already exist. - * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice - * Required. The desired voice of the synthesized audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); - parent::__construct($data); - } - - /** - * The resource states of the request in the form of - * `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The resource states of the request in the form of - * `projects/*/locations/*`. - * - * 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; - } - - /** - * Required. The Synthesizer requires either plain text or SSML as input. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\SynthesisInput|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Required. The Synthesizer requires either plain text or SSML as input. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); - $this->input = $var; - - return $this; - } - - /** - * Required. The configuration of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\AudioConfig|null - */ - public function getAudioConfig() - { - return $this->audio_config; - } - - public function hasAudioConfig() - { - return isset($this->audio_config); - } - - public function clearAudioConfig() - { - unset($this->audio_config); - } - - /** - * Required. The configuration of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $var - * @return $this - */ - public function setAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); - $this->audio_config = $var; - - return $this; - } - - /** - * Required. Specifies a Cloud Storage URI for the synthesis results. Must be - * specified in the format: `gs://bucket_name/object_name`, and the bucket - * must already exist. - * - * Generated from protobuf field string output_gcs_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOutputGcsUri() - { - return $this->output_gcs_uri; - } - - /** - * Required. Specifies a Cloud Storage URI for the synthesis results. Must be - * specified in the format: `gs://bucket_name/object_name`, and the bucket - * must already exist. - * - * Generated from protobuf field string output_gcs_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOutputGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->output_gcs_uri = $var; - - return $this; - } - - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null - */ - public function getVoice() - { - return $this->voice; - } - - public function hasVoice() - { - return isset($this->voice); - } - - public function clearVoice() - { - unset($this->voice); - } - - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); - $this->voice = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php deleted file mode 100644 index e1a3d25b4131..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeLongAudioResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.texttospeech.v1.SynthesizeLongAudioResponse - */ -class SynthesizeLongAudioResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTtsLrs::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php deleted file mode 100644 index ee0e47f31fe5..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.texttospeech.v1.SynthesizeSpeechRequest - */ -class SynthesizeSpeechRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Synthesizer requires either plain text or SSML as input. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input = null; - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $voice = null; - /** - * Required. The configuration of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_config = null; - /** - * Advanced voice options. - * - * Generated from protobuf field optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; - */ - protected $advanced_voice_options = null; - - /** - * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. - * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice Required. The desired voice of the synthesized audio. - * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $audioConfig Required. The configuration of the synthesized audio. - * - * @return \Google\Cloud\TextToSpeech\V1\SynthesizeSpeechRequest - * - * @experimental - */ - public static function build(\Google\Cloud\TextToSpeech\V1\SynthesisInput $input, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice, \Google\Cloud\TextToSpeech\V1\AudioConfig $audioConfig): self - { - return (new self()) - ->setInput($input) - ->setVoice($voice) - ->setAudioConfig($audioConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\TextToSpeech\V1\SynthesisInput $input - * Required. The Synthesizer requires either plain text or SSML as input. - * @type \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $voice - * Required. The desired voice of the synthesized audio. - * @type \Google\Cloud\TextToSpeech\V1\AudioConfig $audio_config - * Required. The configuration of the synthesized audio. - * @type \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions $advanced_voice_options - * Advanced voice options. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Synthesizer requires either plain text or SSML as input. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\SynthesisInput|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Required. The Synthesizer requires either plain text or SSML as input. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SynthesisInput input = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\SynthesisInput $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\SynthesisInput::class); - $this->input = $var; - - return $this; - } - - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams|null - */ - public function getVoice() - { - return $this->voice; - } - - public function hasVoice() - { - return isset($this->voice); - } - - public function clearVoice() - { - unset($this->voice); - } - - /** - * Required. The desired voice of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceSelectionParams voice = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams $var - * @return $this - */ - public function setVoice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceSelectionParams::class); - $this->voice = $var; - - return $this; - } - - /** - * Required. The configuration of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\TextToSpeech\V1\AudioConfig|null - */ - public function getAudioConfig() - { - return $this->audio_config; - } - - public function hasAudioConfig() - { - return isset($this->audio_config); - } - - public function clearAudioConfig() - { - unset($this->audio_config); - } - - /** - * Required. The configuration of the synthesized audio. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.AudioConfig audio_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\TextToSpeech\V1\AudioConfig $var - * @return $this - */ - public function setAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AudioConfig::class); - $this->audio_config = $var; - - return $this; - } - - /** - * Advanced voice options. - * - * Generated from protobuf field optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; - * @return \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions|null - */ - public function getAdvancedVoiceOptions() - { - return $this->advanced_voice_options; - } - - public function hasAdvancedVoiceOptions() - { - return isset($this->advanced_voice_options); - } - - public function clearAdvancedVoiceOptions() - { - unset($this->advanced_voice_options); - } - - /** - * Advanced voice options. - * - * Generated from protobuf field optional .google.cloud.texttospeech.v1.AdvancedVoiceOptions advanced_voice_options = 8; - * @param \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions $var - * @return $this - */ - public function setAdvancedVoiceOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\AdvancedVoiceOptions::class); - $this->advanced_voice_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php deleted file mode 100644 index bfe3329eb5e2..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/SynthesizeSpeechResponse.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.texttospeech.v1.SynthesizeSpeechResponse - */ -class SynthesizeSpeechResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The audio data bytes encoded as specified in the request, including the - * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). - * For LINEAR16 audio, we include the WAV header. Note: as - * with all bytes fields, protobuffers use a pure binary representation, - * whereas JSON representations use base64. - * - * Generated from protobuf field bytes audio_content = 1; - */ - protected $audio_content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $audio_content - * The audio data bytes encoded as specified in the request, including the - * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). - * For LINEAR16 audio, we include the WAV header. Note: as - * with all bytes fields, protobuffers use a pure binary representation, - * whereas JSON representations use base64. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The audio data bytes encoded as specified in the request, including the - * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). - * For LINEAR16 audio, we include the WAV header. Note: as - * with all bytes fields, protobuffers use a pure binary representation, - * whereas JSON representations use base64. - * - * Generated from protobuf field bytes audio_content = 1; - * @return string - */ - public function getAudioContent() - { - return $this->audio_content; - } - - /** - * The audio data bytes encoded as specified in the request, including the - * header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). - * For LINEAR16 audio, we include the WAV header. Note: as - * with all bytes fields, protobuffers use a pure binary representation, - * whereas JSON representations use base64. - * - * Generated from protobuf field bytes audio_content = 1; - * @param string $var - * @return $this - */ - public function setAudioContent($var) - { - GPBUtil::checkString($var, False); - $this->audio_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php deleted file mode 100644 index f53642965390..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/Voice.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.texttospeech.v1.Voice - */ -class Voice extends \Google\Protobuf\Internal\Message -{ - /** - * The languages that this voice supports, expressed as - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. - * "en-US", "es-419", "cmn-tw"). - * - * Generated from protobuf field repeated string language_codes = 1; - */ - private $language_codes; - /** - * The name of this voice. Each distinct voice has a unique name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The gender of this voice. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; - */ - protected $ssml_gender = 0; - /** - * The natural sample rate (in hertz) for this voice. - * - * Generated from protobuf field int32 natural_sample_rate_hertz = 4; - */ - protected $natural_sample_rate_hertz = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes - * The languages that this voice supports, expressed as - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. - * "en-US", "es-419", "cmn-tw"). - * @type string $name - * The name of this voice. Each distinct voice has a unique name. - * @type int $ssml_gender - * The gender of this voice. - * @type int $natural_sample_rate_hertz - * The natural sample rate (in hertz) for this voice. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * The languages that this voice supports, expressed as - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. - * "en-US", "es-419", "cmn-tw"). - * - * Generated from protobuf field repeated string language_codes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageCodes() - { - return $this->language_codes; - } - - /** - * The languages that this voice supports, expressed as - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. - * "en-US", "es-419", "cmn-tw"). - * - * Generated from protobuf field repeated string language_codes = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_codes = $arr; - - return $this; - } - - /** - * The name of this voice. Each distinct voice has a unique name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this voice. Each distinct voice has a unique name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The gender of this voice. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; - * @return int - */ - public function getSsmlGender() - { - return $this->ssml_gender; - } - - /** - * The gender of this voice. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; - * @param int $var - * @return $this - */ - public function setSsmlGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\SsmlVoiceGender::class); - $this->ssml_gender = $var; - - return $this; - } - - /** - * The natural sample rate (in hertz) for this voice. - * - * Generated from protobuf field int32 natural_sample_rate_hertz = 4; - * @return int - */ - public function getNaturalSampleRateHertz() - { - return $this->natural_sample_rate_hertz; - } - - /** - * The natural sample rate (in hertz) for this voice. - * - * Generated from protobuf field int32 natural_sample_rate_hertz = 4; - * @param int $var - * @return $this - */ - public function setNaturalSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->natural_sample_rate_hertz = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php deleted file mode 100644 index 83d52d421f52..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceCloneParams.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.texttospeech.v1.VoiceCloneParams - */ -class VoiceCloneParams extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Created by GenerateVoiceCloningKey. - * - * Generated from protobuf field string voice_cloning_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $voice_cloning_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $voice_cloning_key - * Required. Created by GenerateVoiceCloningKey. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. Created by GenerateVoiceCloningKey. - * - * Generated from protobuf field string voice_cloning_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVoiceCloningKey() - { - return $this->voice_cloning_key; - } - - /** - * Required. Created by GenerateVoiceCloningKey. - * - * Generated from protobuf field string voice_cloning_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVoiceCloningKey($var) - { - GPBUtil::checkString($var, True); - $this->voice_cloning_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php b/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php deleted file mode 100644 index 5ccf9c11db9b..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/proto/src/Google/Cloud/TextToSpeech/V1/VoiceSelectionParams.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.texttospeech.v1.VoiceSelectionParams - */ -class VoiceSelectionParams extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The language (and potentially also the region) of the voice - * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag, e.g. "en-US". This should not include a script tag (e.g. use - * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred - * from the input provided in the SynthesisInput. The TTS service - * will use this parameter to help choose an appropriate voice. Note that - * the TTS service may choose a voice with a slightly different language code - * than the one selected; it may substitute a different region - * (e.g. using en-US rather than en-CA if there isn't a Canadian voice - * available), or even a different language, e.g. using "nb" (Norwegian - * Bokmal) instead of "no" (Norwegian)". - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - /** - * The name of the voice. If both the name and the gender are not set, - * the service will choose a voice based on the other parameters such as - * language_code. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * name. Note that this is only a preference, not requirement; if a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; - */ - protected $ssml_gender = 0; - /** - * The configuration for a custom voice. If [CustomVoiceParams.model] is set, - * the service will choose the custom voice matching the specified - * configuration. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4; - */ - protected $custom_voice = null; - /** - * Optional. The configuration for a voice clone. If - * [VoiceCloneParams.voice_clone_key] is set, the service will choose the - * voice clone matching the specified configuration. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $voice_clone = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * Required. The language (and potentially also the region) of the voice - * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag, e.g. "en-US". This should not include a script tag (e.g. use - * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred - * from the input provided in the SynthesisInput. The TTS service - * will use this parameter to help choose an appropriate voice. Note that - * the TTS service may choose a voice with a slightly different language code - * than the one selected; it may substitute a different region - * (e.g. using en-US rather than en-CA if there isn't a Canadian voice - * available), or even a different language, e.g. using "nb" (Norwegian - * Bokmal) instead of "no" (Norwegian)". - * @type string $name - * The name of the voice. If both the name and the gender are not set, - * the service will choose a voice based on the other parameters such as - * language_code. - * @type int $ssml_gender - * The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * name. Note that this is only a preference, not requirement; if a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. - * @type \Google\Cloud\TextToSpeech\V1\CustomVoiceParams $custom_voice - * The configuration for a custom voice. If [CustomVoiceParams.model] is set, - * the service will choose the custom voice matching the specified - * configuration. - * @type \Google\Cloud\TextToSpeech\V1\VoiceCloneParams $voice_clone - * Optional. The configuration for a voice clone. If - * [VoiceCloneParams.voice_clone_key] is set, the service will choose the - * voice clone matching the specified configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce(); - parent::__construct($data); - } - - /** - * Required. The language (and potentially also the region) of the voice - * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag, e.g. "en-US". This should not include a script tag (e.g. use - * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred - * from the input provided in the SynthesisInput. The TTS service - * will use this parameter to help choose an appropriate voice. Note that - * the TTS service may choose a voice with a slightly different language code - * than the one selected; it may substitute a different region - * (e.g. using en-US rather than en-CA if there isn't a Canadian voice - * available), or even a different language, e.g. using "nb" (Norwegian - * Bokmal) instead of "no" (Norwegian)". - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. The language (and potentially also the region) of the voice - * expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag, e.g. "en-US". This should not include a script tag (e.g. use - * "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred - * from the input provided in the SynthesisInput. The TTS service - * will use this parameter to help choose an appropriate voice. Note that - * the TTS service may choose a voice with a slightly different language code - * than the one selected; it may substitute a different region - * (e.g. using en-US rather than en-CA if there isn't a Canadian voice - * available), or even a different language, e.g. using "nb" (Norwegian - * Bokmal) instead of "no" (Norwegian)". - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The name of the voice. If both the name and the gender are not set, - * the service will choose a voice based on the other parameters such as - * language_code. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the voice. If both the name and the gender are not set, - * the service will choose a voice based on the other parameters such as - * language_code. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * name. Note that this is only a preference, not requirement; if a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; - * @return int - */ - public function getSsmlGender() - { - return $this->ssml_gender; - } - - /** - * The preferred gender of the voice. If not set, the service will - * choose a voice based on the other parameters such as language_code and - * name. Note that this is only a preference, not requirement; if a - * voice of the appropriate gender is not available, the synthesizer should - * substitute a voice with a different gender rather than failing the request. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3; - * @param int $var - * @return $this - */ - public function setSsmlGender($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\SsmlVoiceGender::class); - $this->ssml_gender = $var; - - return $this; - } - - /** - * The configuration for a custom voice. If [CustomVoiceParams.model] is set, - * the service will choose the custom voice matching the specified - * configuration. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4; - * @return \Google\Cloud\TextToSpeech\V1\CustomVoiceParams|null - */ - public function getCustomVoice() - { - return $this->custom_voice; - } - - public function hasCustomVoice() - { - return isset($this->custom_voice); - } - - public function clearCustomVoice() - { - unset($this->custom_voice); - } - - /** - * The configuration for a custom voice. If [CustomVoiceParams.model] is set, - * the service will choose the custom voice matching the specified - * configuration. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.CustomVoiceParams custom_voice = 4; - * @param \Google\Cloud\TextToSpeech\V1\CustomVoiceParams $var - * @return $this - */ - public function setCustomVoice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\CustomVoiceParams::class); - $this->custom_voice = $var; - - return $this; - } - - /** - * Optional. The configuration for a voice clone. If - * [VoiceCloneParams.voice_clone_key] is set, the service will choose the - * voice clone matching the specified configuration. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\TextToSpeech\V1\VoiceCloneParams|null - */ - public function getVoiceClone() - { - return $this->voice_clone; - } - - public function hasVoiceClone() - { - return isset($this->voice_clone); - } - - public function clearVoiceClone() - { - unset($this->voice_clone); - } - - /** - * Optional. The configuration for a voice clone. If - * [VoiceCloneParams.voice_clone_key] is set, the service will choose the - * voice clone matching the specified configuration. - * - * Generated from protobuf field .google.cloud.texttospeech.v1.VoiceCloneParams voice_clone = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\TextToSpeech\V1\VoiceCloneParams $var - * @return $this - */ - public function setVoiceClone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\TextToSpeech\V1\VoiceCloneParams::class); - $this->voice_clone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php deleted file mode 100644 index 2a4357540ab2..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/list_voices.php +++ /dev/null @@ -1,57 +0,0 @@ -listVoices($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END texttospeech_v1_generated_TextToSpeech_ListVoices_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php deleted file mode 100644 index 47a97cf434aa..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/streaming_synthesize.php +++ /dev/null @@ -1,64 +0,0 @@ -streamingSynthesize(); - $stream->writeAll([$request,]); - - /** @var StreamingSynthesizeResponse $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 texttospeech_v1_generated_TextToSpeech_StreamingSynthesize_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php deleted file mode 100644 index f6bac9ae2c38..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechClient/synthesize_speech.php +++ /dev/null @@ -1,94 +0,0 @@ -setLanguageCode($voiceLanguageCode); - $audioConfig = (new AudioConfig()) - ->setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeSpeechRequest()) - ->setInput($input) - ->setVoice($voice) - ->setAudioConfig($audioConfig); - - // Call the API and handle any network failures. - try { - /** @var SynthesizeSpeechResponse $response */ - $response = $textToSpeechClient->synthesizeSpeech($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 -{ - $voiceLanguageCode = '[LANGUAGE_CODE]'; - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - - synthesize_speech_sample($voiceLanguageCode, $audioConfigAudioEncoding); -} -// [END texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php b/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php deleted file mode 100644 index cf9eaa3f258c..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php +++ /dev/null @@ -1,89 +0,0 @@ -setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeLongAudioRequest()) - ->setInput($input) - ->setAudioConfig($audioConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var SynthesizeLongAudioResponse $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 -{ - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - - synthesize_long_audio_sample($audioConfigAudioEncoding); -} -// [END texttospeech_v1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php deleted file mode 100644 index f3436bc8dc84..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechClient.php +++ /dev/null @@ -1,292 +0,0 @@ - listVoicesAsync(ListVoicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface synthesizeSpeechAsync(SynthesizeSpeechRequest $request, array $optionalArgs = []) - */ -final class TextToSpeechClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeech'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.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/text_to_speech_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a model - * resource. - * - * @param string $project - * @param string $location - * @param string $model - * - * @return string The formatted model resource. - */ - public static function modelName(string $project, string $location, string $model): string - { - return self::getPathTemplate('model')->render([ - 'project' => $project, - 'location' => $location, - 'model' => $model, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - model: projects/{project}/locations/{location}/models/{model} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'texttospeech.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Returns a list of Voice supported for synthesis. - * - * The async variant is {@see TextToSpeechClient::listVoicesAsync()} . - * - * @example samples/V1/TextToSpeechClient/list_voices.php - * - * @param ListVoicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListVoicesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVoices(ListVoicesRequest $request, array $callOptions = []): ListVoicesResponse - { - return $this->startApiCall('ListVoices', $request, $callOptions)->wait(); - } - - /** - * Performs bidirectional streaming speech synthesis: receive audio while - * sending text. - * - * @example samples/V1/TextToSpeechClient/streaming_synthesize.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 streamingSynthesize(array $callOptions = []): BidiStream - { - return $this->startApiCall('StreamingSynthesize', null, $callOptions); - } - - /** - * Synthesizes speech synchronously: receive results after all text input - * has been processed. - * - * The async variant is {@see TextToSpeechClient::synthesizeSpeechAsync()} . - * - * @example samples/V1/TextToSpeechClient/synthesize_speech.php - * - * @param SynthesizeSpeechRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SynthesizeSpeechResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function synthesizeSpeech(SynthesizeSpeechRequest $request, array $callOptions = []): SynthesizeSpeechResponse - { - return $this->startApiCall('SynthesizeSpeech', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php deleted file mode 100644 index 63a91697a5d0..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/Client/TextToSpeechLongAudioSynthesizeClient.php +++ /dev/null @@ -1,274 +0,0 @@ - synthesizeLongAudioAsync(SynthesizeLongAudioRequest $request, array $optionalArgs = []) - */ -final class TextToSpeechLongAudioSynthesizeClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.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/text_to_speech_long_audio_synthesize_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a model - * resource. - * - * @param string $project - * @param string $location - * @param string $model - * - * @return string The formatted model resource. - */ - public static function modelName(string $project, string $location, string $model): string - { - return self::getPathTemplate('model')->render([ - 'project' => $project, - 'location' => $location, - 'model' => $model, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - model: projects/{project}/locations/{location}/models/{model} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'texttospeech.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Synthesizes long form text asynchronously. - * - * The async variant is - * {@see TextToSpeechLongAudioSynthesizeClient::synthesizeLongAudioAsync()} . - * - * @example samples/V1/TextToSpeechLongAudioSynthesizeClient/synthesize_long_audio.php - * - * @param SynthesizeLongAudioRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 synthesizeLongAudio(SynthesizeLongAudioRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SynthesizeLongAudio', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php deleted file mode 100644 index 755f6b2fc575..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechGapicClient.php +++ /dev/null @@ -1,412 +0,0 @@ -listVoices(); - * } finally { - * $textToSpeechClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\TextToSpeech\V1\Client\TextToSpeechClient}. - */ -class TextToSpeechGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeech'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $modelNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/text_to_speech_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_rest_client_config.php', - ], - ], - ]; - } - - private static function getModelNameTemplate() - { - if (self::$modelNameTemplate == null) { - self::$modelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/models/{model}'); - } - - return self::$modelNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'model' => self::getModelNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a model - * resource. - * - * @param string $project - * @param string $location - * @param string $model - * - * @return string The formatted model resource. - */ - public static function modelName($project, $location, $model) - { - return self::getModelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'model' => $model, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - model: projects/{project}/locations/{location}/models/{model} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'texttospeech.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Returns a list of Voice supported for synthesis. - * - * Sample code: - * ``` - * $textToSpeechClient = new TextToSpeechClient(); - * try { - * $response = $textToSpeechClient->listVoices(); - * } finally { - * $textToSpeechClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $languageCode - * Optional. Recommended. - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * If not specified, the API will return all supported voices. - * If specified, the ListVoices call will only return voices that can be used - * to synthesize this language_code. For example, if you specify `"en-NZ"`, - * all `"en-NZ"` voices will be returned. If you specify `"no"`, both - * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be - * returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\TextToSpeech\V1\ListVoicesResponse - * - * @throws ApiException if the remote call fails - */ - public function listVoices(array $optionalArgs = []) - { - $request = new ListVoicesRequest(); - if (isset($optionalArgs['languageCode'])) { - $request->setLanguageCode($optionalArgs['languageCode']); - } - - return $this->startCall('ListVoices', ListVoicesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Performs bidirectional streaming speech synthesis: receive audio while - * sending text. - * - * Sample code: - * ``` - * $textToSpeechClient = new TextToSpeechClient(); - * try { - * $request = new StreamingSynthesizeRequest(); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $textToSpeechClient->streamingSynthesize(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $textToSpeechClient->streamingSynthesize(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $textToSpeechClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - */ - public function streamingSynthesize(array $optionalArgs = []) - { - return $this->startCall('StreamingSynthesize', StreamingSynthesizeResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } - - /** - * Synthesizes speech synchronously: receive results after all text input - * has been processed. - * - * Sample code: - * ``` - * $textToSpeechClient = new TextToSpeechClient(); - * try { - * $input = new SynthesisInput(); - * $voice = new VoiceSelectionParams(); - * $audioConfig = new AudioConfig(); - * $response = $textToSpeechClient->synthesizeSpeech($input, $voice, $audioConfig); - * } finally { - * $textToSpeechClient->close(); - * } - * ``` - * - * @param SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. - * @param VoiceSelectionParams $voice Required. The desired voice of the synthesized audio. - * @param AudioConfig $audioConfig Required. The configuration of the synthesized audio. - * @param array $optionalArgs { - * Optional. - * - * @type AdvancedVoiceOptions $advancedVoiceOptions - * Advanced voice options. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\TextToSpeech\V1\SynthesizeSpeechResponse - * - * @throws ApiException if the remote call fails - */ - public function synthesizeSpeech($input, $voice, $audioConfig, array $optionalArgs = []) - { - $request = new SynthesizeSpeechRequest(); - $request->setInput($input); - $request->setVoice($voice); - $request->setAudioConfig($audioConfig); - if (isset($optionalArgs['advancedVoiceOptions'])) { - $request->setAdvancedVoiceOptions($optionalArgs['advancedVoiceOptions']); - } - - return $this->startCall('SynthesizeSpeech', SynthesizeSpeechResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php deleted file mode 100644 index 17fc72e734fa..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/Gapic/TextToSpeechLongAudioSynthesizeGapicClient.php +++ /dev/null @@ -1,403 +0,0 @@ -synthesizeLongAudio($input, $audioConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $textToSpeechLongAudioSynthesizeClient->resumeOperation($operationName, 'synthesizeLongAudio'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $textToSpeechLongAudioSynthesizeClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\TextToSpeech\V1\Client\TextToSpeechLongAudioSynthesizeClient}. - */ -class TextToSpeechLongAudioSynthesizeGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'texttospeech.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'texttospeech.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $modelNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/text_to_speech_long_audio_synthesize_rest_client_config.php', - ], - ], - ]; - } - - private static function getModelNameTemplate() - { - if (self::$modelNameTemplate == null) { - self::$modelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/models/{model}'); - } - - return self::$modelNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'model' => self::getModelNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a model - * resource. - * - * @param string $project - * @param string $location - * @param string $model - * - * @return string The formatted model resource. - */ - public static function modelName($project, $location, $model) - { - return self::getModelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'model' => $model, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - model: projects/{project}/locations/{location}/models/{model} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'texttospeech.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Synthesizes long form text asynchronously. - * - * Sample code: - * ``` - * $textToSpeechLongAudioSynthesizeClient = new TextToSpeechLongAudioSynthesizeClient(); - * try { - * $input = new SynthesisInput(); - * $audioConfig = new AudioConfig(); - * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $textToSpeechLongAudioSynthesizeClient->synthesizeLongAudio($input, $audioConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $textToSpeechLongAudioSynthesizeClient->resumeOperation($operationName, 'synthesizeLongAudio'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $textToSpeechLongAudioSynthesizeClient->close(); - * } - * ``` - * - * @param SynthesisInput $input Required. The Synthesizer requires either plain text or SSML as input. - * @param AudioConfig $audioConfig Required. The configuration of the synthesized audio. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * The resource states of the request in the form of - * `projects/*/locations/*`. - * @type string $outputGcsUri - * Required. Specifies a Cloud Storage URI for the synthesis results. Must be - * specified in the format: `gs://bucket_name/object_name`, and the bucket - * must already exist. - * @type VoiceSelectionParams $voice - * Required. The desired voice of the synthesized audio. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function synthesizeLongAudio($input, $audioConfig, array $optionalArgs = []) - { - $request = new SynthesizeLongAudioRequest(); - $requestParamHeaders = []; - $request->setInput($input); - $request->setAudioConfig($audioConfig); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['outputGcsUri'])) { - $request->setOutputGcsUri($optionalArgs['outputGcsUri']); - } - - if (isset($optionalArgs['voice'])) { - $request->setVoice($optionalArgs['voice']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('SynthesizeLongAudio', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php b/owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php deleted file mode 100644 index 0942280d0856..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/TextToSpeechClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.texttospeech.v1.TextToSpeech' => [ - 'ListVoices' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TextToSpeech\V1\ListVoicesResponse', - ], - 'StreamingSynthesize' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\TextToSpeech\V1\StreamingSynthesizeResponse', - ], - 'SynthesizeSpeech' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\TextToSpeech\V1\SynthesizeSpeechResponse', - ], - 'templateMap' => [ - 'model' => 'projects/{project}/locations/{location}/models/{model}', - ], - ], - ], -]; diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json deleted file mode 100644 index 1f2cda4e7cf5..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize": { - "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": 5000000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 5000000, - "total_timeout_millis": 5000000 - } - }, - "methods": { - "SynthesizeLongAudio": { - "timeout_millis": 5000000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php deleted file mode 100644 index 63aa9b8d0232..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php +++ /dev/null @@ -1,50 +0,0 @@ - [ - 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' => [ - 'SynthesizeLongAudio' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\TextToSpeech\V1\SynthesizeLongAudioResponse', - 'metadataReturnType' => '\Google\Cloud\TextToSpeech\V1\SynthesizeLongAudioMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'model' => 'projects/{project}/locations/{location}/models/{model}', - ], - ], - ], -]; diff --git a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php deleted file mode 100644 index 690fa540c6d7..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php +++ /dev/null @@ -1,65 +0,0 @@ - [ - 'google.cloud.texttospeech.v1.TextToSpeechLongAudioSynthesize' => [ - 'SynthesizeLongAudio' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:synthesizeLongAudio', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php b/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php deleted file mode 100644 index 7014d6557556..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/src/V1/resources/text_to_speech_rest_client_config.php +++ /dev/null @@ -1,62 +0,0 @@ - [ - 'google.cloud.texttospeech.v1.TextToSpeech' => [ - 'ListVoices' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/voices', - ], - 'SynthesizeSpeech' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/text:synthesize', - 'body' => '*', - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php deleted file mode 100644 index f2e456c2a51a..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechClientTest.php +++ /dev/null @@ -1,325 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TextToSpeechClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TextToSpeechClient($options); - } - - /** @test */ - public function listVoicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListVoicesResponse(); - $transport->addResponse($expectedResponse); - $request = new ListVoicesRequest(); - $response = $gapicClient->listVoices($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.texttospeech.v1.TextToSpeech/ListVoices', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVoicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 ListVoicesRequest(); - try { - $gapicClient->listVoices($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function streamingSynthesizeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $audioContent = '16'; - $expectedResponse = new StreamingSynthesizeResponse(); - $expectedResponse->setAudioContent($audioContent); - $transport->addResponse($expectedResponse); - $audioContent2 = '-61'; - $expectedResponse2 = new StreamingSynthesizeResponse(); - $expectedResponse2->setAudioContent($audioContent2); - $transport->addResponse($expectedResponse2); - $audioContent3 = '-60'; - $expectedResponse3 = new StreamingSynthesizeResponse(); - $expectedResponse3->setAudioContent($audioContent3); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new StreamingSynthesizeRequest(); - $request2 = new StreamingSynthesizeRequest(); - $request3 = new StreamingSynthesizeRequest(); - $bidi = $gapicClient->streamingSynthesize(); - $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.texttospeech.v1.TextToSpeech/StreamingSynthesize', $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 streamingSynthesizeExceptionTest() - { - $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->streamingSynthesize(); - $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 synthesizeSpeechTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $audioContent = '16'; - $expectedResponse = new SynthesizeSpeechResponse(); - $expectedResponse->setAudioContent($audioContent); - $transport->addResponse($expectedResponse); - // Mock request - $input = new SynthesisInput(); - $voice = new VoiceSelectionParams(); - $voiceLanguageCode = 'voiceLanguageCode-686472265'; - $voice->setLanguageCode($voiceLanguageCode); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeSpeechRequest()) - ->setInput($input) - ->setVoice($voice) - ->setAudioConfig($audioConfig); - $response = $gapicClient->synthesizeSpeech($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.texttospeech.v1.TextToSpeech/SynthesizeSpeech', $actualFuncCall); - $actualValue = $actualRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualRequestObject->getVoice(); - $this->assertProtobufEquals($voice, $actualValue); - $actualValue = $actualRequestObject->getAudioConfig(); - $this->assertProtobufEquals($audioConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function synthesizeSpeechExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $input = new SynthesisInput(); - $voice = new VoiceSelectionParams(); - $voiceLanguageCode = 'voiceLanguageCode-686472265'; - $voice->setLanguageCode($voiceLanguageCode); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeSpeechRequest()) - ->setInput($input) - ->setVoice($voice) - ->setAudioConfig($audioConfig); - try { - $gapicClient->synthesizeSpeech($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVoicesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListVoicesResponse(); - $transport->addResponse($expectedResponse); - $request = new ListVoicesRequest(); - $response = $gapicClient->listVoicesAsync($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.texttospeech.v1.TextToSpeech/ListVoices', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php deleted file mode 100644 index ca56e0e2c179..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/Client/TextToSpeechLongAudioSynthesizeClientTest.php +++ /dev/null @@ -1,270 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TextToSpeechLongAudioSynthesizeClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TextToSpeechLongAudioSynthesizeClient($options); - } - - /** @test */ - public function synthesizeLongAudioTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/synthesizeLongAudioTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new SynthesizeLongAudioResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/synthesizeLongAudioTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $input = new SynthesisInput(); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeLongAudioRequest()) - ->setInput($input) - ->setAudioConfig($audioConfig); - $response = $gapicClient->synthesizeLongAudio($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.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualApiRequestObject->getAudioConfig(); - $this->assertProtobufEquals($audioConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); - $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 synthesizeLongAudioExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/synthesizeLongAudioTest'); - $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 - $input = new SynthesisInput(); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeLongAudioRequest()) - ->setInput($input) - ->setAudioConfig($audioConfig); - $response = $gapicClient->synthesizeLongAudio($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); - 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 synthesizeLongAudioAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/synthesizeLongAudioTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new SynthesizeLongAudioResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/synthesizeLongAudioTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $input = new SynthesisInput(); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $request = (new SynthesizeLongAudioRequest()) - ->setInput($input) - ->setAudioConfig($audioConfig); - $response = $gapicClient->synthesizeLongAudioAsync($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.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualApiRequestObject->getAudioConfig(); - $this->assertProtobufEquals($audioConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); - $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/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php deleted file mode 100644 index 5692c96e6075..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechClientTest.php +++ /dev/null @@ -1,291 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TextToSpeechClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TextToSpeechClient($options); - } - - /** @test */ - public function listVoicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListVoicesResponse(); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listVoices(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.texttospeech.v1.TextToSpeech/ListVoices', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVoicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listVoices(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function streamingSynthesizeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $audioContent = '16'; - $expectedResponse = new StreamingSynthesizeResponse(); - $expectedResponse->setAudioContent($audioContent); - $transport->addResponse($expectedResponse); - $audioContent2 = '-61'; - $expectedResponse2 = new StreamingSynthesizeResponse(); - $expectedResponse2->setAudioContent($audioContent2); - $transport->addResponse($expectedResponse2); - $audioContent3 = '-60'; - $expectedResponse3 = new StreamingSynthesizeResponse(); - $expectedResponse3->setAudioContent($audioContent3); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new StreamingSynthesizeRequest(); - $request2 = new StreamingSynthesizeRequest(); - $request3 = new StreamingSynthesizeRequest(); - $bidi = $gapicClient->streamingSynthesize(); - $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.texttospeech.v1.TextToSpeech/StreamingSynthesize', $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 streamingSynthesizeExceptionTest() - { - $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->streamingSynthesize(); - $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 synthesizeSpeechTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $audioContent = '16'; - $expectedResponse = new SynthesizeSpeechResponse(); - $expectedResponse->setAudioContent($audioContent); - $transport->addResponse($expectedResponse); - // Mock request - $input = new SynthesisInput(); - $voice = new VoiceSelectionParams(); - $voiceLanguageCode = 'voiceLanguageCode-686472265'; - $voice->setLanguageCode($voiceLanguageCode); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $response = $gapicClient->synthesizeSpeech($input, $voice, $audioConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.texttospeech.v1.TextToSpeech/SynthesizeSpeech', $actualFuncCall); - $actualValue = $actualRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualRequestObject->getVoice(); - $this->assertProtobufEquals($voice, $actualValue); - $actualValue = $actualRequestObject->getAudioConfig(); - $this->assertProtobufEquals($audioConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function synthesizeSpeechExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $input = new SynthesisInput(); - $voice = new VoiceSelectionParams(); - $voiceLanguageCode = 'voiceLanguageCode-686472265'; - $voice->setLanguageCode($voiceLanguageCode); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - try { - $gapicClient->synthesizeSpeech($input, $voice, $audioConfig); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php b/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php deleted file mode 100644 index 0b386e4c2de0..000000000000 --- a/owl-bot-staging/TextToSpeech/v1/tests/Unit/V1/TextToSpeechLongAudioSynthesizeClientTest.php +++ /dev/null @@ -1,193 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TextToSpeechLongAudioSynthesizeClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TextToSpeechLongAudioSynthesizeClient($options); - } - - /** @test */ - public function synthesizeLongAudioTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/synthesizeLongAudioTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new SynthesizeLongAudioResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/synthesizeLongAudioTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $input = new SynthesisInput(); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $response = $gapicClient->synthesizeLongAudio($input, $audioConfig); - $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.texttospeech.v1.TextToSpeechLongAudioSynthesize/SynthesizeLongAudio', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualApiRequestObject->getAudioConfig(); - $this->assertProtobufEquals($audioConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); - $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 synthesizeLongAudioExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/synthesizeLongAudioTest'); - $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 - $input = new SynthesisInput(); - $audioConfig = new AudioConfig(); - $audioConfigAudioEncoding = AudioEncoding::AUDIO_ENCODING_UNSPECIFIED; - $audioConfig->setAudioEncoding($audioConfigAudioEncoding); - $response = $gapicClient->synthesizeLongAudio($input, $audioConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/synthesizeLongAudioTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Tpu/v1/proto/src/GPBMetadata/Google/Cloud/Tpu/V1/CloudTpu.php b/owl-bot-staging/Tpu/v1/proto/src/GPBMetadata/Google/Cloud/Tpu/V1/CloudTpu.php deleted file mode 100644 index e088051a70f0d11c816eb162605a04d233d6f390..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6967 zcmb_h&2QVt6|ba7v7TdFo_xtpvSFDtaoj{&+i8$0o1~OP+iGn|kYsmL7$9hAY;!}C zT#|Cu4SZ=&J@m9d|A4kA&{Ho3dh20bUfiUv z+EHC~XN@o2DY2zHEvvh;z4Q#At*eeB@If4dw;5nrR4ZLCt8>g$IJClgZw-Of>en5MZe@`_cBDis4e*Q1zWM zb=tOOxu#u5(L!OLx;?M4k%b5TwoIM2CoFgv3xy$&&jr`+((vwrU{kki8_zgyrr@Oa zZ70H0lBMlPhG8-^IBQ`^*Qnu+w`NtNdZ$Pa)FaKb$6MNF$C z?XF>H#{N#tVsSa1k-f8PX&7y;dT2!>=4bxsh322I)ampNbQNQLp?3uAK<>jgdAKt| zkdw=vP>yFpjs^eG()@LQrD|!I73=`Kl$gIAn%HArR(5?i`vP+z0o(VbKNY~y`wq*S zJ%QtA+|6H8PVaD)Hb33$EMNP*U~M>1b3>s} zhFKrFLj6N_vR8!!?tV8?!$3rMI6j4x=fdnY+?dx4rZ93|WB* z=NR+CJan=<_c^kgk+w8FDZXm{5ln_bPD0`}J@&I>3X(^v-laS}(uMfbnE3A)BzgRi zt1#PaNiA8~sy6F#sj^y;%bD+BMop9&vec?n*D^7Zh9v$dzskhPG(bbf6%9U>AXAWT z$dyfLjY(c$>&o(m%qNrHWL>H>*kp=K!o_B*RkEu8Ydm*r|^nkm_;`ZF`)uVN_X9rZOJ>$0@bS|6|y z0eR!E(8w%YDa*KRiS2@d!AzXtZdEqr+Ey!*U}C*Fr6pIJwZ`g3?Wbt_99-?sY)X|X z&PvsioJoo`fc`m?8*p8!SCnnJ(X7;}1DMeE?IlIpsIN;)h$;o~?IrX(8(t2E6NSb{ zsRq|s?f2>nhMbc_4wdJH?=fcU7qsm<`M3VJlRVY|ug~S*247F|21XzXv5yn+3&?C} zj>|MS4fsd%!>OSTN@+Gexvr@!|T=O;c>#g`2 zW zM!8*qS&vS22H&VN{VD!32D2qz8`FXD`d~xLAbQ zGIl7JhCz&J$qOJ2svY79g_U6c>^Dj>4tw#QU(O`l!M085shBnc$5n;Wm3BzJePV zKSMhOaZm_DFFxcMa&I)S;vZsgizUL4@?HjhHjsg1=_jM5BUaedo~GkP#3Mb7iJ5kX zB7Hc{rdVQ$U&r8+vw-^PTY}4;`@-I16pbbGy~t!9GJDL-{#^`aq&{zJA#EFoB#bLg z=DaX+KT2PM7!gK;N`5kG5FwEYSR>mVLnt)DdE|+>1#=ib16u^q^Ym2oEb{2NI|@ee zw=uZEj$}Y_FLDY4ku!$w|6knvItDkRLHbei5@rWI7Q{?6YZ@?j%!v6XR-fLTFL*$J zZSEBJW!I5&xi41k2_&l?Q)Z!czBHy6)GRG*zCBO;_qWH8D4V}vdvdW@oJk&>s5V_fFkEZR;6sp zo3#dGXR|Pc{7b2=219X1UFFZ^(iW0eM$gKMN6;?A%%$A7+#f1f;HPqW^7RO@-K_AG{2+oI3b2$GSDKAjt5AjIOM#?l9qHSd7e&EJa zSL=|-h;TnY4=(rY6LE=$<|sG|wnr@su|W2|T7d2fD1sN3HP^|6>A2PzV3hV@+xuCZb=M4KG492pVO!hsblW3BN^*V^gQ z^^`mrrF8X)p-=c7@|PG~!Adn`3;8q>R+MO9NObiX(k#m1au*;!FS3VW=dt#EgUFd@ z2bhR+2J$G;0Qpj+tg@GQJ@&H)UV#lB;^G6AeUra@!X2<y8r+H diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php deleted file mode 100644 index a83457de33c6..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/AcceleratorType.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v1.AcceleratorType - */ -class AcceleratorType extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * the accelerator type. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * @type string $type - * the accelerator type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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 accelerator type. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * the accelerator 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php deleted file mode 100644 index c64762275f5f..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/CreateNodeRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.tpu.v1.CreateNodeRequest - */ -class CreateNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The unqualified resource name. - * - * Generated from protobuf field string node_id = 2; - */ - protected $node_id = ''; - /** - * Required. The node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * @type string $node_id - * The unqualified resource name. - * @type \Google\Cloud\Tpu\V1\Node $node - * Required. The node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 unqualified resource name. - * - * Generated from protobuf field string node_id = 2; - * @return string - */ - public function getNodeId() - { - return $this->node_id; - } - - /** - * The unqualified resource name. - * - * Generated from protobuf field string node_id = 2; - * @param string $var - * @return $this - */ - public function setNodeId($var) - { - GPBUtil::checkString($var, True); - $this->node_id = $var; - - return $this; - } - - /** - * Required. The node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tpu\V1\Node|null - */ - public function getNode() - { - return $this->node; - } - - public function hasNode() - { - return isset($this->node); - } - - public function clearNode() - { - unset($this->node); - } - - /** - * Required. The node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tpu\V1\Node $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V1\Node::class); - $this->node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php deleted file mode 100644 index 3eb256de47f8..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/DeleteNodeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v1.DeleteNodeRequest - */ -class DeleteNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php deleted file mode 100644 index 30719823c9a2..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetAcceleratorTypeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v1.GetAcceleratorTypeRequest - */ -class GetAcceleratorTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php deleted file mode 100644 index baaa8d1d81c0..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetNodeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v1.GetNodeRequest - */ -class GetNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php deleted file mode 100644 index f0347012a607..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/GetTensorFlowVersionRequest.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.tpu.v1.GetTensorFlowVersionRequest - */ -class GetTensorFlowVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php deleted file mode 100644 index 606cdb3ac2bd..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.tpu.v1.ListAcceleratorTypesRequest - */ -class ListAcceleratorTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * List filter. - * @type string $order_by - * Sort results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * 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; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php deleted file mode 100644 index cae7e8f79e10..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListAcceleratorTypesResponse.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.tpu.v1.ListAcceleratorTypesResponse - */ -class ListAcceleratorTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; - */ - private $accelerator_types; - /** - * The next page token or empty if none. - * - * 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 array<\Google\Cloud\Tpu\V1\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $accelerator_types - * The listed nodes. - * @type string $next_page_token - * The next page token or empty if none. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAcceleratorTypes() - { - return $this->accelerator_types; - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.AcceleratorType accelerator_types = 1; - * @param array<\Google\Cloud\Tpu\V1\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAcceleratorTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\AcceleratorType::class); - $this->accelerator_types = $arr; - - return $this; - } - - /** - * The next page token or empty if none. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next page token or empty if none. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php deleted file mode 100644 index 95228886da71..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.tpu.v1.ListNodesRequest - */ -class ListNodesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php deleted file mode 100644 index e2c5a0b7462a..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListNodesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.tpu.v1.ListNodesResponse - */ -class ListNodesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.Node nodes = 1; - */ - private $nodes; - /** - * The next page token or empty if none. - * - * 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 array<\Google\Cloud\Tpu\V1\Node>|\Google\Protobuf\Internal\RepeatedField $nodes - * The listed nodes. - * @type string $next_page_token - * The next page token or empty if none. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.Node nodes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.Node nodes = 1; - * @param array<\Google\Cloud\Tpu\V1\Node>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\Node::class); - $this->nodes = $arr; - - return $this; - } - - /** - * The next page token or empty if none. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next page token or empty if none. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php deleted file mode 100644 index c5f8aee08320..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.tpu.v1.ListTensorFlowVersionsRequest - */ -class ListTensorFlowVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * List filter. - * @type string $order_by - * Sort results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * 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; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php deleted file mode 100644 index 0d01cd3d2c6e..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ListTensorFlowVersionsResponse.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.tpu.v1.ListTensorFlowVersionsResponse - */ -class ListTensorFlowVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; - */ - private $tensorflow_versions; - /** - * The next page token or empty if none. - * - * 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 array<\Google\Cloud\Tpu\V1\TensorFlowVersion>|\Google\Protobuf\Internal\RepeatedField $tensorflow_versions - * The listed nodes. - * @type string $next_page_token - * The next page token or empty if none. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTensorflowVersions() - { - return $this->tensorflow_versions; - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.TensorFlowVersion tensorflow_versions = 1; - * @param array<\Google\Cloud\Tpu\V1\TensorFlowVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTensorflowVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\TensorFlowVersion::class); - $this->tensorflow_versions = $arr; - - return $this; - } - - /** - * The next page token or empty if none. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next page token or empty if none. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php deleted file mode 100644 index 815d81fd007a..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/NetworkEndpoint.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v1.NetworkEndpoint - */ -class NetworkEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * The IP address of this network endpoint. - * - * Generated from protobuf field string ip_address = 1; - */ - protected $ip_address = ''; - /** - * The port of this network endpoint. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * The IP address of this network endpoint. - * @type int $port - * The port of this network endpoint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The IP address of this network endpoint. - * - * Generated from protobuf field string ip_address = 1; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The IP address of this network endpoint. - * - * Generated from protobuf field string ip_address = 1; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * The port of this network endpoint. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * The port of this network endpoint. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php deleted file mode 100644 index a2b4917aa1e5..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node.php +++ /dev/null @@ -1,797 +0,0 @@ -google.cloud.tpu.v1.Node - */ -class Node extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Immutable. The name of the TPU - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The user-supplied description of the TPU. Maximum of 512 characters. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Required. The type of hardware accelerators associated with this node. - * - * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $accelerator_type = ''; - /** - * Output only. DEPRECATED! Use network_endpoints instead. - * The network address for the TPU Node as visible to Compute Engine - * instances. - * - * Generated from protobuf field string ip_address = 8 [deprecated = true]; - * @deprecated - */ - protected $ip_address = ''; - /** - * Output only. DEPRECATED! Use network_endpoints instead. - * The network port for the TPU Node as visible to Compute Engine instances. - * - * Generated from protobuf field string port = 14 [deprecated = true]; - * @deprecated - */ - protected $port = ''; - /** - * Output only. The current state for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * - * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_description = ''; - /** - * Required. The version of Tensorflow running in the Node. - * - * Generated from protobuf field string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tensorflow_version = ''; - /** - * The name of a network they wish to peer the TPU node to. It must be a - * preexisting Compute Engine network inside of the project on which this API - * has been activated. If none is provided, "default" will be used. - * - * Generated from protobuf field string network = 12; - */ - protected $network = ''; - /** - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * - * Generated from protobuf field string cidr_block = 13; - */ - protected $cidr_block = ''; - /** - * Output only. The service account used to run the tensor flow services - * within the node. To share resources, including Google Cloud Storage data, - * with the Tensorflow job running in the Node, this account must have - * permissions to that data. - * - * Generated from protobuf field string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account = ''; - /** - * Output only. The time when the node was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The scheduling options for this node. - * - * Generated from protobuf field .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - */ - protected $scheduling_config = null; - /** - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that Tensorflow clients of the node reach out - * to the 0th entry in this map first. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $network_endpoints; - /** - * The health status of the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.Health health = 22; - */ - protected $health = 0; - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 24; - */ - private $labels; - /** - * Whether the VPC peering for the node is set up through Service Networking - * API. The VPC Peering should be set up before provisioning the node. - * If this field is set, cidr_block field should not be specified. If the - * network, that you want to peer the TPU Node to, is Shared VPC networks, - * the node must be created with this this field enabled. - * - * Generated from protobuf field bool use_service_networking = 27; - */ - protected $use_service_networking = false; - /** - * Output only. The API version that created this Node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = 0; - /** - * Output only. The Symptoms that have occurred to the TPU Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $symptoms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Immutable. The name of the TPU - * @type string $description - * The user-supplied description of the TPU. Maximum of 512 characters. - * @type string $accelerator_type - * Required. The type of hardware accelerators associated with this node. - * @type string $ip_address - * Output only. DEPRECATED! Use network_endpoints instead. - * The network address for the TPU Node as visible to Compute Engine - * instances. - * @type string $port - * Output only. DEPRECATED! Use network_endpoints instead. - * The network port for the TPU Node as visible to Compute Engine instances. - * @type int $state - * Output only. The current state for the TPU Node. - * @type string $health_description - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * @type string $tensorflow_version - * Required. The version of Tensorflow running in the Node. - * @type string $network - * The name of a network they wish to peer the TPU node to. It must be a - * preexisting Compute Engine network inside of the project on which this API - * has been activated. If none is provided, "default" will be used. - * @type string $cidr_block - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * @type string $service_account - * Output only. The service account used to run the tensor flow services - * within the node. To share resources, including Google Cloud Storage data, - * with the Tensorflow job running in the Node, this account must have - * permissions to that data. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the node was created. - * @type \Google\Cloud\Tpu\V1\SchedulingConfig $scheduling_config - * The scheduling options for this node. - * @type array<\Google\Cloud\Tpu\V1\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $network_endpoints - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that Tensorflow clients of the node reach out - * to the 0th entry in this map first. - * @type int $health - * The health status of the TPU node. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user-provided metadata. - * @type bool $use_service_networking - * Whether the VPC peering for the node is set up through Service Networking - * API. The VPC Peering should be set up before provisioning the node. - * If this field is set, cidr_block field should not be specified. If the - * network, that you want to peer the TPU Node to, is Shared VPC networks, - * the node must be created with this this field enabled. - * @type int $api_version - * Output only. The API version that created this Node. - * @type array<\Google\Cloud\Tpu\V1\Symptom>|\Google\Protobuf\Internal\RepeatedField $symptoms - * Output only. The Symptoms that have occurred to the TPU Node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Immutable. The name of the TPU - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Immutable. The name of the TPU - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.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 user-supplied description of the TPU. Maximum of 512 characters. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The user-supplied description of the TPU. Maximum of 512 characters. - * - * 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; - } - - /** - * Required. The type of hardware accelerators associated with this node. - * - * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAcceleratorType() - { - return $this->accelerator_type; - } - - /** - * Required. The type of hardware accelerators associated with this node. - * - * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAcceleratorType($var) - { - GPBUtil::checkString($var, True); - $this->accelerator_type = $var; - - return $this; - } - - /** - * Output only. DEPRECATED! Use network_endpoints instead. - * The network address for the TPU Node as visible to Compute Engine - * instances. - * - * Generated from protobuf field string ip_address = 8 [deprecated = true]; - * @return string - * @deprecated - */ - public function getIpAddress() - { - @trigger_error('ip_address is deprecated.', E_USER_DEPRECATED); - return $this->ip_address; - } - - /** - * Output only. DEPRECATED! Use network_endpoints instead. - * The network address for the TPU Node as visible to Compute Engine - * instances. - * - * Generated from protobuf field string ip_address = 8 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setIpAddress($var) - { - @trigger_error('ip_address is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Output only. DEPRECATED! Use network_endpoints instead. - * The network port for the TPU Node as visible to Compute Engine instances. - * - * Generated from protobuf field string port = 14 [deprecated = true]; - * @return string - * @deprecated - */ - public function getPort() - { - @trigger_error('port is deprecated.', E_USER_DEPRECATED); - return $this->port; - } - - /** - * Output only. DEPRECATED! Use network_endpoints instead. - * The network port for the TPU Node as visible to Compute Engine instances. - * - * Generated from protobuf field string port = 14 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPort($var) - { - @trigger_error('port is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->port = $var; - - return $this; - } - - /** - * Output only. The current state for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Node\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * - * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHealthDescription() - { - return $this->health_description; - } - - /** - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * - * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHealthDescription($var) - { - GPBUtil::checkString($var, True); - $this->health_description = $var; - - return $this; - } - - /** - * Required. The version of Tensorflow running in the Node. - * - * Generated from protobuf field string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTensorflowVersion() - { - return $this->tensorflow_version; - } - - /** - * Required. The version of Tensorflow running in the Node. - * - * Generated from protobuf field string tensorflow_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTensorflowVersion($var) - { - GPBUtil::checkString($var, True); - $this->tensorflow_version = $var; - - return $this; - } - - /** - * The name of a network they wish to peer the TPU node to. It must be a - * preexisting Compute Engine network inside of the project on which this API - * has been activated. If none is provided, "default" will be used. - * - * Generated from protobuf field string network = 12; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The name of a network they wish to peer the TPU node to. It must be a - * preexisting Compute Engine network inside of the project on which this API - * has been activated. If none is provided, "default" will be used. - * - * Generated from protobuf field string network = 12; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * - * Generated from protobuf field string cidr_block = 13; - * @return string - */ - public function getCidrBlock() - { - return $this->cidr_block; - } - - /** - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * - * Generated from protobuf field string cidr_block = 13; - * @param string $var - * @return $this - */ - public function setCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cidr_block = $var; - - return $this; - } - - /** - * Output only. The service account used to run the tensor flow services - * within the node. To share resources, including Google Cloud Storage data, - * with the Tensorflow job running in the Node, this account must have - * permissions to that data. - * - * Generated from protobuf field string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. The service account used to run the tensor flow services - * within the node. To share resources, including Google Cloud Storage data, - * with the Tensorflow job running in the Node, this account must have - * permissions to that data. - * - * Generated from protobuf field string service_account = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Output only. The time when the node was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the node was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The scheduling options for this node. - * - * Generated from protobuf field .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * @return \Google\Cloud\Tpu\V1\SchedulingConfig|null - */ - public function getSchedulingConfig() - { - return $this->scheduling_config; - } - - public function hasSchedulingConfig() - { - return isset($this->scheduling_config); - } - - public function clearSchedulingConfig() - { - unset($this->scheduling_config); - } - - /** - * The scheduling options for this node. - * - * Generated from protobuf field .google.cloud.tpu.v1.SchedulingConfig scheduling_config = 17; - * @param \Google\Cloud\Tpu\V1\SchedulingConfig $var - * @return $this - */ - public function setSchedulingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V1\SchedulingConfig::class); - $this->scheduling_config = $var; - - return $this; - } - - /** - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that Tensorflow clients of the node reach out - * to the 0th entry in this map first. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkEndpoints() - { - return $this->network_endpoints; - } - - /** - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that Tensorflow clients of the node reach out - * to the 0th entry in this map first. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Tpu\V1\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\NetworkEndpoint::class); - $this->network_endpoints = $arr; - - return $this; - } - - /** - * The health status of the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.Health health = 22; - * @return int - */ - public function getHealth() - { - return $this->health; - } - - /** - * The health status of the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.Health health = 22; - * @param int $var - * @return $this - */ - public function setHealth($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Node\Health::class); - $this->health = $var; - - return $this; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 24; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 24; - * @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; - } - - /** - * Whether the VPC peering for the node is set up through Service Networking - * API. The VPC Peering should be set up before provisioning the node. - * If this field is set, cidr_block field should not be specified. If the - * network, that you want to peer the TPU Node to, is Shared VPC networks, - * the node must be created with this this field enabled. - * - * Generated from protobuf field bool use_service_networking = 27; - * @return bool - */ - public function getUseServiceNetworking() - { - return $this->use_service_networking; - } - - /** - * Whether the VPC peering for the node is set up through Service Networking - * API. The VPC Peering should be set up before provisioning the node. - * If this field is set, cidr_block field should not be specified. If the - * network, that you want to peer the TPU Node to, is Shared VPC networks, - * the node must be created with this this field enabled. - * - * Generated from protobuf field bool use_service_networking = 27; - * @param bool $var - * @return $this - */ - public function setUseServiceNetworking($var) - { - GPBUtil::checkBool($var); - $this->use_service_networking = $var; - - return $this; - } - - /** - * Output only. The API version that created this Node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. The API version that created this Node. - * - * Generated from protobuf field .google.cloud.tpu.v1.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Node\ApiVersion::class); - $this->api_version = $var; - - return $this; - } - - /** - * Output only. The Symptoms that have occurred to the TPU Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSymptoms() - { - return $this->symptoms; - } - - /** - * Output only. The Symptoms that have occurred to the TPU Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v1.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Tpu\V1\Symptom>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSymptoms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V1\Symptom::class); - $this->symptoms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php deleted file mode 100644 index 9554026fddf2..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/ApiVersion.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.tpu.v1.Node.ApiVersion - */ -class ApiVersion -{ - /** - * API version is unknown. - * - * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; - */ - const API_VERSION_UNSPECIFIED = 0; - /** - * TPU API V1Alpha1 version. - * - * Generated from protobuf enum V1_ALPHA1 = 1; - */ - const V1_ALPHA1 = 1; - /** - * TPU API V1 version. - * - * Generated from protobuf enum V1 = 2; - */ - const V1 = 2; - /** - * TPU API V2Alpha1 version. - * - * Generated from protobuf enum V2_ALPHA1 = 3; - */ - const V2_ALPHA1 = 3; - - private static $valueToName = [ - self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', - self::V1_ALPHA1 => 'V1_ALPHA1', - self::V1 => 'V1', - self::V2_ALPHA1 => 'V2_ALPHA1', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ApiVersion::class, \Google\Cloud\Tpu\V1\Node_ApiVersion::class); - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php deleted file mode 100644 index 3ecf7cbae531..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/Health.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.tpu.v1.Node.Health - */ -class Health -{ - /** - * Health status is unknown: not initialized or failed to retrieve. - * - * Generated from protobuf enum HEALTH_UNSPECIFIED = 0; - */ - const HEALTH_UNSPECIFIED = 0; - /** - * The resource is healthy. - * - * Generated from protobuf enum HEALTHY = 1; - */ - const HEALTHY = 1; - /** - * The resource is unhealthy. - * - * Generated from protobuf enum DEPRECATED_UNHEALTHY = 2; - */ - const DEPRECATED_UNHEALTHY = 2; - /** - * The resource is unresponsive. - * - * Generated from protobuf enum TIMEOUT = 3; - */ - const TIMEOUT = 3; - /** - * The in-guest ML stack is unhealthy. - * - * Generated from protobuf enum UNHEALTHY_TENSORFLOW = 4; - */ - const UNHEALTHY_TENSORFLOW = 4; - /** - * The node is under maintenance/priority boost caused rescheduling and - * will resume running once rescheduled. - * - * Generated from protobuf enum UNHEALTHY_MAINTENANCE = 5; - */ - const UNHEALTHY_MAINTENANCE = 5; - - private static $valueToName = [ - self::HEALTH_UNSPECIFIED => 'HEALTH_UNSPECIFIED', - self::HEALTHY => 'HEALTHY', - self::DEPRECATED_UNHEALTHY => 'DEPRECATED_UNHEALTHY', - self::TIMEOUT => 'TIMEOUT', - self::UNHEALTHY_TENSORFLOW => 'UNHEALTHY_TENSORFLOW', - self::UNHEALTHY_MAINTENANCE => 'UNHEALTHY_MAINTENANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Health::class, \Google\Cloud\Tpu\V1\Node_Health::class); - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php deleted file mode 100644 index de2ffa8f5e33..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Node/State.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.tpu.v1.Node.State - */ -class State -{ - /** - * TPU node state is not known/set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * TPU node is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * TPU node has been created. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * TPU node is restarting. - * - * Generated from protobuf enum RESTARTING = 3; - */ - const RESTARTING = 3; - /** - * TPU node is undergoing reimaging. - * - * Generated from protobuf enum REIMAGING = 4; - */ - const REIMAGING = 4; - /** - * TPU node is being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - /** - * TPU node is being repaired and may be unusable. Details can be - * found in the `help_description` field. - * - * Generated from protobuf enum REPAIRING = 6; - */ - const REPAIRING = 6; - /** - * TPU node is stopped. - * - * Generated from protobuf enum STOPPED = 8; - */ - const STOPPED = 8; - /** - * TPU node is currently stopping. - * - * Generated from protobuf enum STOPPING = 9; - */ - const STOPPING = 9; - /** - * TPU node is currently starting. - * - * Generated from protobuf enum STARTING = 10; - */ - const STARTING = 10; - /** - * TPU node has been preempted. Only applies to Preemptible TPU Nodes. - * - * Generated from protobuf enum PREEMPTED = 11; - */ - const PREEMPTED = 11; - /** - * TPU node has been terminated due to maintenance or has reached the end of - * its life cycle (for preemptible nodes). - * - * Generated from protobuf enum TERMINATED = 12; - */ - const TERMINATED = 12; - /** - * TPU node is currently hiding. - * - * Generated from protobuf enum HIDING = 13; - */ - const HIDING = 13; - /** - * TPU node has been hidden. - * - * Generated from protobuf enum HIDDEN = 14; - */ - const HIDDEN = 14; - /** - * TPU node is currently unhiding. - * - * Generated from protobuf enum UNHIDING = 15; - */ - const UNHIDING = 15; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::RESTARTING => 'RESTARTING', - self::REIMAGING => 'REIMAGING', - self::DELETING => 'DELETING', - self::REPAIRING => 'REPAIRING', - self::STOPPED => 'STOPPED', - self::STOPPING => 'STOPPING', - self::STARTING => 'STARTING', - self::PREEMPTED => 'PREEMPTED', - self::TERMINATED => 'TERMINATED', - self::HIDING => 'HIDING', - self::HIDDEN => 'HIDDEN', - self::UNHIDING => 'UNHIDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Tpu\V1\Node_State::class); - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php deleted file mode 100644 index eaff85524679..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/OperationMetadata.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.tpu.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - */ - protected $status_detail = ''; - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - */ - protected $cancel_requested = false; - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Specifies if cancellation was requested for the operation. - * @type string $api_version - * API version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * 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 operation finished running. - * - * 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; - } - - /** - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php deleted file mode 100644 index 7223eed48da8..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/ReimageNodeRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v1.ReimageNodeRequest - */ -class ReimageNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The version for reimage to create. - * - * Generated from protobuf field string tensorflow_version = 2; - */ - protected $tensorflow_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * @type string $tensorflow_version - * The version for reimage to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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 version for reimage to create. - * - * Generated from protobuf field string tensorflow_version = 2; - * @return string - */ - public function getTensorflowVersion() - { - return $this->tensorflow_version; - } - - /** - * The version for reimage to create. - * - * Generated from protobuf field string tensorflow_version = 2; - * @param string $var - * @return $this - */ - public function setTensorflowVersion($var) - { - GPBUtil::checkString($var, True); - $this->tensorflow_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php deleted file mode 100644 index 5d8d5689861e..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/SchedulingConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v1.SchedulingConfig - */ -class SchedulingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defines whether the node is preemptible. - * - * Generated from protobuf field bool preemptible = 1; - */ - protected $preemptible = false; - /** - * Whether the node is created under a reservation. - * - * Generated from protobuf field bool reserved = 2; - */ - protected $reserved = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $preemptible - * Defines whether the node is preemptible. - * @type bool $reserved - * Whether the node is created under a reservation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Defines whether the node is preemptible. - * - * Generated from protobuf field bool preemptible = 1; - * @return bool - */ - public function getPreemptible() - { - return $this->preemptible; - } - - /** - * Defines whether the node is preemptible. - * - * Generated from protobuf field bool preemptible = 1; - * @param bool $var - * @return $this - */ - public function setPreemptible($var) - { - GPBUtil::checkBool($var); - $this->preemptible = $var; - - return $this; - } - - /** - * Whether the node is created under a reservation. - * - * Generated from protobuf field bool reserved = 2; - * @return bool - */ - public function getReserved() - { - return $this->reserved; - } - - /** - * Whether the node is created under a reservation. - * - * Generated from protobuf field bool reserved = 2; - * @param bool $var - * @return $this - */ - public function setReserved($var) - { - GPBUtil::checkBool($var); - $this->reserved = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php deleted file mode 100644 index bcb6fdf73a3c..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StartNodeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v1.StartNodeRequest - */ -class StartNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php deleted file mode 100644 index a1d1c4ac9711..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/StopNodeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v1.StopNodeRequest - */ -class StopNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php deleted file mode 100644 index d3ff773b4c6f..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.tpu.v1.Symptom - */ -class Symptom extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp when the Symptom is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Type of the Symptom. - * - * Generated from protobuf field .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - */ - protected $symptom_type = 0; - /** - * Detailed information of the current Symptom. - * - * Generated from protobuf field string details = 3; - */ - protected $details = ''; - /** - * A string used to uniquely distinguish a worker within a TPU node. - * - * Generated from protobuf field string worker_id = 4; - */ - protected $worker_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the Symptom is created. - * @type int $symptom_type - * Type of the Symptom. - * @type string $details - * Detailed information of the current Symptom. - * @type string $worker_id - * A string used to uniquely distinguish a worker within a TPU node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp when the Symptom is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Timestamp when the Symptom is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Type of the Symptom. - * - * Generated from protobuf field .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * @return int - */ - public function getSymptomType() - { - return $this->symptom_type; - } - - /** - * Type of the Symptom. - * - * Generated from protobuf field .google.cloud.tpu.v1.Symptom.SymptomType symptom_type = 2; - * @param int $var - * @return $this - */ - public function setSymptomType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V1\Symptom\SymptomType::class); - $this->symptom_type = $var; - - return $this; - } - - /** - * Detailed information of the current Symptom. - * - * Generated from protobuf field string details = 3; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Detailed information of the current Symptom. - * - * Generated from protobuf field string details = 3; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - - /** - * A string used to uniquely distinguish a worker within a TPU node. - * - * Generated from protobuf field string worker_id = 4; - * @return string - */ - public function getWorkerId() - { - return $this->worker_id; - } - - /** - * A string used to uniquely distinguish a worker within a TPU node. - * - * Generated from protobuf field string worker_id = 4; - * @param string $var - * @return $this - */ - public function setWorkerId($var) - { - GPBUtil::checkString($var, True); - $this->worker_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php deleted file mode 100644 index 18acc6726915..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/Symptom/SymptomType.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.tpu.v1.Symptom.SymptomType - */ -class SymptomType -{ - /** - * Unspecified symptom. - * - * Generated from protobuf enum SYMPTOM_TYPE_UNSPECIFIED = 0; - */ - const SYMPTOM_TYPE_UNSPECIFIED = 0; - /** - * TPU VM memory is low. - * - * Generated from protobuf enum LOW_MEMORY = 1; - */ - const LOW_MEMORY = 1; - /** - * TPU runtime is out of memory. - * - * Generated from protobuf enum OUT_OF_MEMORY = 2; - */ - const OUT_OF_MEMORY = 2; - /** - * TPU runtime execution has timed out. - * - * Generated from protobuf enum EXECUTE_TIMED_OUT = 3; - */ - const EXECUTE_TIMED_OUT = 3; - /** - * TPU runtime fails to construct a mesh that recognizes each TPU device's - * neighbors. - * - * Generated from protobuf enum MESH_BUILD_FAIL = 4; - */ - const MESH_BUILD_FAIL = 4; - /** - * TPU HBM is out of memory. - * - * Generated from protobuf enum HBM_OUT_OF_MEMORY = 5; - */ - const HBM_OUT_OF_MEMORY = 5; - /** - * Abusive behaviors have been identified on the current project. - * - * Generated from protobuf enum PROJECT_ABUSE = 6; - */ - const PROJECT_ABUSE = 6; - - private static $valueToName = [ - self::SYMPTOM_TYPE_UNSPECIFIED => 'SYMPTOM_TYPE_UNSPECIFIED', - self::LOW_MEMORY => 'LOW_MEMORY', - self::OUT_OF_MEMORY => 'OUT_OF_MEMORY', - self::EXECUTE_TIMED_OUT => 'EXECUTE_TIMED_OUT', - self::MESH_BUILD_FAIL => 'MESH_BUILD_FAIL', - self::HBM_OUT_OF_MEMORY => 'HBM_OUT_OF_MEMORY', - self::PROJECT_ABUSE => 'PROJECT_ABUSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SymptomType::class, \Google\Cloud\Tpu\V1\Symptom_SymptomType::class); - diff --git a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php b/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php deleted file mode 100644 index cf53dab11a8d..000000000000 --- a/owl-bot-staging/Tpu/v1/proto/src/Google/Cloud/Tpu/V1/TensorFlowVersion.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v1.TensorFlowVersion - */ -class TensorFlowVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * the tensorflow version. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * @type string $version - * the tensorflow version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V1\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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 tensorflow version. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * the tensorflow version. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php deleted file mode 100644 index 72e569aa922c..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/create_node.php +++ /dev/null @@ -1,90 +0,0 @@ -setAcceleratorType($nodeAcceleratorType) - ->setTensorflowVersion($nodeTensorflowVersion); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $tpuClient->createNode($formattedParent, $node); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - $nodeAcceleratorType = '[ACCELERATOR_TYPE]'; - $nodeTensorflowVersion = '[TENSORFLOW_VERSION]'; - - create_node_sample($formattedParent, $nodeAcceleratorType, $nodeTensorflowVersion); -} -// [END tpu_v1_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php deleted file mode 100644 index 04740897dad2..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/delete_node.php +++ /dev/null @@ -1,78 +0,0 @@ -deleteNode($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - delete_node_sample($formattedName); -} -// [END tpu_v1_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php deleted file mode 100644 index 1627eafb8dd8..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_accelerator_type.php +++ /dev/null @@ -1,66 +0,0 @@ -getAcceleratorType($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TpuClient::acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - - get_accelerator_type_sample($formattedName); -} -// [END tpu_v1_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php deleted file mode 100644 index ccfd9866cf6b..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_location.php +++ /dev/null @@ -1,53 +0,0 @@ -getLocation(); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END tpu_v1_generated_Tpu_GetLocation_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php deleted file mode 100644 index 483410a2b4a8..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_node.php +++ /dev/null @@ -1,66 +0,0 @@ -getNode($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - get_node_sample($formattedName); -} -// [END tpu_v1_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php deleted file mode 100644 index d041df473c90..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/get_tensor_flow_version.php +++ /dev/null @@ -1,70 +0,0 @@ -getTensorFlowVersion($formattedName); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TpuClient::tensorFlowVersionName( - '[PROJECT]', - '[LOCATION]', - '[TENSOR_FLOW_VERSION]' - ); - - get_tensor_flow_version_sample($formattedName); -} -// [END tpu_v1_generated_Tpu_GetTensorFlowVersion_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php deleted file mode 100644 index c14bff499b71..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_accelerator_types.php +++ /dev/null @@ -1,71 +0,0 @@ -listAcceleratorTypes($formattedParent); - - /** @var AcceleratorType $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 = TpuClient::acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - - list_accelerator_types_sample($formattedParent); -} -// [END tpu_v1_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php deleted file mode 100644 index a9494b94d88c..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_locations.php +++ /dev/null @@ -1,58 +0,0 @@ -listLocations(); - - /** @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 tpu_v1_generated_Tpu_ListLocations_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php deleted file mode 100644 index 20d40dac5991..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_nodes.php +++ /dev/null @@ -1,71 +0,0 @@ -listNodes($formattedParent); - - /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - - list_nodes_sample($formattedParent); -} -// [END tpu_v1_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php deleted file mode 100644 index 3669b40c6b18..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/list_tensor_flow_versions.php +++ /dev/null @@ -1,75 +0,0 @@ -listTensorFlowVersions($formattedParent); - - /** @var TensorFlowVersion $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 = TpuClient::tensorFlowVersionName( - '[PROJECT]', - '[LOCATION]', - '[TENSOR_FLOW_VERSION]' - ); - - list_tensor_flow_versions_sample($formattedParent); -} -// [END tpu_v1_generated_Tpu_ListTensorFlowVersions_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php deleted file mode 100644 index 05fc7269ebb5..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/reimage_node.php +++ /dev/null @@ -1,65 +0,0 @@ -reimageNode(); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 tpu_v1_generated_Tpu_ReimageNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php deleted file mode 100644 index 57b0668e1696..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/start_node.php +++ /dev/null @@ -1,65 +0,0 @@ -startNode(); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 tpu_v1_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php b/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php deleted file mode 100644 index f0cb4284a448..000000000000 --- a/owl-bot-staging/Tpu/v1/samples/V1/TpuClient/stop_node.php +++ /dev/null @@ -1,65 +0,0 @@ -stopNode(); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 tpu_v1_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php b/owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php deleted file mode 100644 index a1cac6eb069e..000000000000 --- a/owl-bot-staging/Tpu/v1/src/V1/Gapic/TpuGapicClient.php +++ /dev/null @@ -1,1237 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $node = new Node(); - * $operationResponse = $tpuClient->createNode($formattedParent, $node); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $tpuClient->createNode($formattedParent, $node); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'createNode'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated This class will be removed in the next major version update. - */ -class TpuGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.tpu.v1.Tpu'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'tpu.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'tpu.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $acceleratorTypeNameTemplate; - - private static $locationNameTemplate; - - private static $nodeNameTemplate; - - private static $tensorFlowVersionNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/tpu_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/tpu_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/tpu_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/tpu_rest_client_config.php', - ], - ], - ]; - } - - private static function getAcceleratorTypeNameTemplate() - { - if (self::$acceleratorTypeNameTemplate == null) { - self::$acceleratorTypeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}'); - } - - return self::$acceleratorTypeNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getNodeNameTemplate() - { - if (self::$nodeNameTemplate == null) { - self::$nodeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/nodes/{node}'); - } - - return self::$nodeNameTemplate; - } - - private static function getTensorFlowVersionNameTemplate() - { - if (self::$tensorFlowVersionNameTemplate == null) { - self::$tensorFlowVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}'); - } - - return self::$tensorFlowVersionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'acceleratorType' => self::getAcceleratorTypeNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'node' => self::getNodeNameTemplate(), - 'tensorFlowVersion' => self::getTensorFlowVersionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * accelerator_type resource. - * - * @param string $project - * @param string $location - * @param string $acceleratorType - * - * @return string The formatted accelerator_type resource. - */ - public static function acceleratorTypeName($project, $location, $acceleratorType) - { - return self::getAcceleratorTypeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'accelerator_type' => $acceleratorType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node - * resource. - * - * @param string $project - * @param string $location - * @param string $node - * - * @return string The formatted node resource. - */ - public static function nodeName($project, $location, $node) - { - return self::getNodeNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'node' => $node, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * tensor_flow_version resource. - * - * @param string $project - * @param string $location - * @param string $tensorFlowVersion - * - * @return string The formatted tensor_flow_version resource. - */ - public static function tensorFlowVersionName($project, $location, $tensorFlowVersion) - { - return self::getTensorFlowVersionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'tensor_flow_version' => $tensorFlowVersion, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - acceleratorType: projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type} - * - location: projects/{project}/locations/{location} - * - node: projects/{project}/locations/{location}/nodes/{node} - * - tensorFlowVersion: projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'tpu.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a node. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedParent = $tpuClient->locationName('[PROJECT]', '[LOCATION]'); - * $node = new Node(); - * $operationResponse = $tpuClient->createNode($formattedParent, $node); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $tpuClient->createNode($formattedParent, $node); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'createNode'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. - * @param Node $node Required. The node. - * @param array $optionalArgs { - * Optional. - * - * @type string $nodeId - * The unqualified resource name. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createNode($parent, $node, array $optionalArgs = []) - { - $request = new CreateNodeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setNode($node); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['nodeId'])) { - $request->setNodeId($optionalArgs['nodeId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a node. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedName = $tpuClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - * $operationResponse = $tpuClient->deleteNode($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $tpuClient->deleteNode($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'deleteNode'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteNode($name, array $optionalArgs = []) - { - $request = new DeleteNodeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets AcceleratorType. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedName = $tpuClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - * $response = $tpuClient->getAcceleratorType($formattedName); - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tpu\V1\AcceleratorType - * - * @throws ApiException if the remote call fails - */ - public function getAcceleratorType($name, array $optionalArgs = []) - { - $request = new GetAcceleratorTypeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAcceleratorType', AcceleratorType::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the details of a node. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedName = $tpuClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - * $response = $tpuClient->getNode($formattedName); - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tpu\V1\Node - * - * @throws ApiException if the remote call fails - */ - public function getNode($name, array $optionalArgs = []) - { - $request = new GetNodeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNode', Node::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets TensorFlow Version. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedName = $tpuClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); - * $response = $tpuClient->getTensorFlowVersion($formattedName); - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Tpu\V1\TensorFlowVersion - * - * @throws ApiException if the remote call fails - */ - public function getTensorFlowVersion($name, array $optionalArgs = []) - { - $request = new GetTensorFlowVersionRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTensorFlowVersion', TensorFlowVersion::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists accelerator types supported by this API. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedParent = $tpuClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - * // Iterate over pages of elements - * $pagedResponse = $tpuClient->listAcceleratorTypes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $tpuClient->listAcceleratorTypes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * List filter. - * @type string $orderBy - * Sort results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAcceleratorTypes($parent, array $optionalArgs = []) - { - $request = new ListAcceleratorTypesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAcceleratorTypes', $optionalArgs, ListAcceleratorTypesResponse::class, $request); - } - - /** - * Lists nodes. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedParent = $tpuClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $tpuClient->listNodes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $tpuClient->listNodes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listNodes($parent, array $optionalArgs = []) - { - $request = new ListNodesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNodes', $optionalArgs, ListNodesResponse::class, $request); - } - - /** - * List TensorFlow versions supported by this API. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $formattedParent = $tpuClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); - * // Iterate over pages of elements - * $pagedResponse = $tpuClient->listTensorFlowVersions($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $tpuClient->listTensorFlowVersions($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource name. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * List filter. - * @type string $orderBy - * Sort results. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTensorFlowVersions($parent, array $optionalArgs = []) - { - $request = new ListTensorFlowVersionsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTensorFlowVersions', $optionalArgs, ListTensorFlowVersionsResponse::class, $request); - } - - /** - * Reimages a node's OS. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $operationResponse = $tpuClient->reimageNode(); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $tpuClient->reimageNode(); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'reimageNode'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource name. - * @type string $tensorflowVersion - * The version for reimage to create. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function reimageNode(array $optionalArgs = []) - { - $request = new ReimageNodeRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['tensorflowVersion'])) { - $request->setTensorflowVersion($optionalArgs['tensorflowVersion']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ReimageNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Starts a node. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $operationResponse = $tpuClient->startNode(); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $tpuClient->startNode(); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'startNode'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource name. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function startNode(array $optionalArgs = []) - { - $request = new StartNodeRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StartNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Stops a node, this operation is only available with single TPU nodes. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $operationResponse = $tpuClient->stopNode(); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $tpuClient->stopNode(); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $tpuClient->resumeOperation($operationName, 'stopNode'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource name. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function stopNode(array $optionalArgs = []) - { - $request = new StopNodeRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('StopNode', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * $response = $tpuClient->getLocation(); - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $tpuClient = new TpuClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $tpuClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $tpuClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $tpuClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } -} diff --git a/owl-bot-staging/Tpu/v1/src/V1/TpuClient.php b/owl-bot-staging/Tpu/v1/src/V1/TpuClient.php deleted file mode 100644 index 085dae53c3e0..000000000000 --- a/owl-bot-staging/Tpu/v1/src/V1/TpuClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.tpu.v1.Tpu' => [ - 'CreateNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'DeleteNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ReimageNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'StartNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'StopNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V1\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - ], - 'ListAcceleratorTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAcceleratorTypes', - ], - ], - 'ListNodes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNodes', - ], - ], - 'ListTensorFlowVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTensorflowVersions', - ], - ], - 'GetLocation' => [ - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - ], - ], -]; diff --git a/owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php b/owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php deleted file mode 100644 index 982ab1004eea..000000000000 --- a/owl-bot-staging/Tpu/v1/src/V1/resources/tpu_rest_client_config.php +++ /dev/null @@ -1,224 +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.tpu.v1.Tpu' => [ - 'CreateNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodes', - 'body' => 'node', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNode' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAcceleratorType' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/acceleratorTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNode' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTensorFlowVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorflowVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAcceleratorTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/acceleratorTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTensorFlowVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tensorflowVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReimageNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}:reimage', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StartNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodes/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - '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/*}', - '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/Tpu/v1/tests/Unit/V1/TpuClientTest.php b/owl-bot-staging/Tpu/v1/tests/Unit/V1/TpuClientTest.php deleted file mode 100644 index 875a5029126e..000000000000 --- a/owl-bot-staging/Tpu/v1/tests/Unit/V1/TpuClientTest.php +++ /dev/null @@ -1,1289 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TpuClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TpuClient($options); - } - - /** @test */ - public function createNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $ipAddress = 'ipAddress1480014044'; - $port = 'port3446913'; - $healthDescription = 'healthDescription-1057342823'; - $tensorflowVersion = 'tensorflowVersion-1353701984'; - $network = 'network1843485230'; - $cidrBlock = 'cidrBlock313022466'; - $serviceAccount = 'serviceAccount-1948028253'; - $useServiceNetworking = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setPort($port); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setTensorflowVersion($tensorflowVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setUseServiceNetworking($useServiceNetworking); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $node = new Node(); - $nodeAcceleratorType = 'nodeAcceleratorType-620315165'; - $node->setAcceleratorType($nodeAcceleratorType); - $nodeTensorflowVersion = 'nodeTensorflowVersion-1950315537'; - $node->setTensorflowVersion($nodeTensorflowVersion); - $response = $gapicClient->createNode($formattedParent, $node); - $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.tpu.v1.Tpu/CreateNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNode(); - $this->assertProtobufEquals($node, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeTest'); - $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 createNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeTest'); - $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]'); - $node = new Node(); - $nodeAcceleratorType = 'nodeAcceleratorType-620315165'; - $node->setAcceleratorType($nodeAcceleratorType); - $nodeTensorflowVersion = 'nodeTensorflowVersion-1950315537'; - $node->setTensorflowVersion($nodeTensorflowVersion); - $response = $gapicClient->createNode($formattedParent, $node); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeTest'); - 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 deleteNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $ipAddress = 'ipAddress1480014044'; - $port = 'port3446913'; - $healthDescription = 'healthDescription-1057342823'; - $tensorflowVersion = 'tensorflowVersion-1353701984'; - $network = 'network1843485230'; - $cidrBlock = 'cidrBlock313022466'; - $serviceAccount = 'serviceAccount-1948028253'; - $useServiceNetworking = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setPort($port); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setTensorflowVersion($tensorflowVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setUseServiceNetworking($useServiceNetworking); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $response = $gapicClient->deleteNode($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/DeleteNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); - $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 deleteNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNodeTest'); - $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $response = $gapicClient->deleteNode($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); - 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 getAcceleratorTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $expectedResponse = new AcceleratorType(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - $response = $gapicClient->getAcceleratorType($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/GetAcceleratorType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAcceleratorTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - try { - $gapicClient->getAcceleratorType($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $ipAddress = 'ipAddress1480014044'; - $port = 'port3446913'; - $healthDescription = 'healthDescription-1057342823'; - $tensorflowVersion = 'tensorflowVersion-1353701984'; - $network = 'network1843485230'; - $cidrBlock = 'cidrBlock313022466'; - $serviceAccount = 'serviceAccount-1948028253'; - $useServiceNetworking = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setPort($port); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setTensorflowVersion($tensorflowVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setUseServiceNetworking($useServiceNetworking); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $response = $gapicClient->getNode($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/GetNode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - try { - $gapicClient->getNode($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTensorFlowVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $expectedResponse = new TensorFlowVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); - $response = $gapicClient->getTensorFlowVersion($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/GetTensorFlowVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTensorFlowVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); - try { - $gapicClient->getTensorFlowVersion($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAcceleratorTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $acceleratorTypesElement = new AcceleratorType(); - $acceleratorTypes = [ - $acceleratorTypesElement, - ]; - $expectedResponse = new ListAcceleratorTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAcceleratorTypes($acceleratorTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - $response = $gapicClient->listAcceleratorTypes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAcceleratorTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/ListAcceleratorTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAcceleratorTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - try { - $gapicClient->listAcceleratorTypes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nodesElement = new Node(); - $nodes = [ - $nodesElement, - ]; - $expectedResponse = new ListNodesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNodes($nodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listNodes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNodes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/ListNodes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listNodes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTensorFlowVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tensorflowVersionsElement = new TensorFlowVersion(); - $tensorflowVersions = [ - $tensorflowVersionsElement, - ]; - $expectedResponse = new ListTensorFlowVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTensorflowVersions($tensorflowVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); - $response = $gapicClient->listTensorFlowVersions($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTensorflowVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v1.Tpu/ListTensorFlowVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTensorFlowVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->tensorFlowVersionName('[PROJECT]', '[LOCATION]', '[TENSOR_FLOW_VERSION]'); - try { - $gapicClient->listTensorFlowVersions($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reimageNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reimageNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $ipAddress = 'ipAddress1480014044'; - $port = 'port3446913'; - $healthDescription = 'healthDescription-1057342823'; - $tensorflowVersion2 = 'tensorflowVersion2467487059'; - $network = 'network1843485230'; - $cidrBlock = 'cidrBlock313022466'; - $serviceAccount = 'serviceAccount-1948028253'; - $useServiceNetworking = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setPort($port); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setTensorflowVersion($tensorflowVersion2); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setUseServiceNetworking($useServiceNetworking); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reimageNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $response = $gapicClient->reimageNode(); - $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.tpu.v1.Tpu/ReimageNode', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reimageNodeTest'); - $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 reimageNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reimageNodeTest'); - $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); - $response = $gapicClient->reimageNode(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reimageNodeTest'); - 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 startNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $ipAddress = 'ipAddress1480014044'; - $port = 'port3446913'; - $healthDescription = 'healthDescription-1057342823'; - $tensorflowVersion = 'tensorflowVersion-1353701984'; - $network = 'network1843485230'; - $cidrBlock = 'cidrBlock313022466'; - $serviceAccount = 'serviceAccount-1948028253'; - $useServiceNetworking = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setPort($port); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setTensorflowVersion($tensorflowVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setUseServiceNetworking($useServiceNetworking); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $response = $gapicClient->startNode(); - $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.tpu.v1.Tpu/StartNode', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startNodeTest'); - $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 startNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startNodeTest'); - $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); - $response = $gapicClient->startNode(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startNodeTest'); - 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 stopNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $ipAddress = 'ipAddress1480014044'; - $port = 'port3446913'; - $healthDescription = 'healthDescription-1057342823'; - $tensorflowVersion = 'tensorflowVersion-1353701984'; - $network = 'network1843485230'; - $cidrBlock = 'cidrBlock313022466'; - $serviceAccount = 'serviceAccount-1948028253'; - $useServiceNetworking = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setIpAddress($ipAddress); - $expectedResponse->setPort($port); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setTensorflowVersion($tensorflowVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setUseServiceNetworking($useServiceNetworking); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $response = $gapicClient->stopNode(); - $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.tpu.v1.Tpu/StopNode', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopNodeTest'); - $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 stopNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopNodeTest'); - $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); - $response = $gapicClient->stopNode(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopNodeTest'); - 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); - $response = $gapicClient->getLocation(); - $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); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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); - $response = $gapicClient->listLocations(); - $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); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Tpu/v2/proto/src/GPBMetadata/Google/Cloud/Tpu/V2/CloudTpu.php b/owl-bot-staging/Tpu/v2/proto/src/GPBMetadata/Google/Cloud/Tpu/V2/CloudTpu.php deleted file mode 100644 index 0e43d7c9ea6ac9f00880d1b92710e73d78912a13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9430 zcmb_i&2JlN8OQmm^Q1|fH~nz4UFuG|+a$ZSw{CXXb+_$KVka>hf5>*S6e5i#_M2oj zj%Rje+!Cr>;D*Eri8BI(ggC&N142k#R-8cM(9kYU?g-rS?uz?jcQCw&|Kpvz^-O?(b7O)ijSSqfPB}DwVIK z%9Tc{kS{iF;#SA(+D)2E9hl}pn`WAAv)jtJRyXrBD;_j_NOO7s9sQU(mfobPjp}NN zx_V1@_1z7=b$5+z-ECOi-JR?MfM#2FoD?6#F?bFs{Ij}yZKIiTT;0Ww+lHeV9m6&B zw(&g#|1h<$w;hU```7MwJ5ARxJ1MrI(rMDgrIet_*50;EWcFdo!%}7ZBk#M#j!W&1 z-rmhqr)e9OYuZ&@n#&zf*OwX_SzMCGGIGX#YEfX!<@!KAOu2TK22W3=Z0dIH&I68{ z5jgd~?M6sSwTxZ0(=nM8%#M@Go$+)=V$jC5wn01Y`Sz?EwB1^zhx${)w9mJ-Mx})e z4RXuu9N67X$LJjFRxD9ZIfnY`G`H1NOIahD*A0^grxv7-;0Ker!eW<)(J` zks%FBZMA$mT1OXK^fk}y;12vtgl%;%nF7p}^kx@Dj@f@^^Vwp5{<^5C@3^pr7uJ;_C{$^G2%(UCHgX+lnV!NQ*u5ROsaa)pP_ zU*UQ}6$=y!vm0F$v+BCGvDbB}LkPfUU230bmhK)VW2xBUBzXi=V(h8j?$YE44o+p4 z(gIwMtkNNJJ8Xkeg-cQ6CZZM$5r7S@XE#X>&uH8KNGE2w$xlUlJ+NW>83B!8}y zx1Jc!;<4%;Wwih=PLy&Wf8?0 zcqU1hqTdyvUo$Lm*y`vP>ZoGCv;-y@nuQA;fmC8boKAPo8)G&%NnV3_+R>3=EkM@c zYKoI9Fw@jKc#gJj+Rt>m#T6D;(lAp;nHWuq*vu}90Ih%?>qc9igpW=WeGl0mMWgub zG>nx|d*l*~F=LXjClK}*>Nt~pOJ*^QsM17UhXfND=5`%(o93P%H72!5#%+w;#}hEk z(BveJ&17#xN|K$KuCrxaMC1mLL#nskLoIk7cvMHpb(qBn&wN^YN^OUsnet{wNDgMC z@H{o%#>uIy5`DOky;KIuzG<{7|1Ruei<6FMR#vI@KhPO8us?&Xbl7~4@3RHT4lf2Bs z&Fx4E zWkHuz_{QBkgU|A6Kd~2`*wqi5d|4{T0yi4z~-(!q#` zu^;oEZ(wh7{s)MT@sCy2jxa`X?0twkCm5zo4D-8p_^H<;IjW0QVpj>0&LPXFw1u@P z`VN+wp8oH0{l67WL~bg|J<^_6fdt*NDZ*Ns6M8d}5QYlRn@3`csi2l+N)oZxPf0w)S;(MNGjY7FzsjY8SK0yXCE1%7j)M6QD)$&>)F|K?9aAwSydakO~qPA10 z)r*yK=wxJY=bol+RX5dpc=iO0?A$})vf->ZJj#c&iLqSmOSJ-5S#c>UDD*EUjlE%p zXPp%chM&@=>tvqGZ>Jdy!=irAJomnyW|)!TBKC2rdWwedk^iXI$iSnqdb0EbsyWyP%31&w!iQY*h{|NA9Kl@REXTs;iIPPa=Ya4m zR?A(B^eP6AT!q;Vrf)1T@hCx8WOvN0-3}&+<{?Y*m|0miehf1kl=J1Wb+;!iOQr_O zQ~6O0=GJ)XVW)dUJ_yNXiOc2|-1Ow@gq5=;b%2re0^?M}@G5Y>jeu}~mjW;2oW+6> zWfkV~7+PE!gmX@wK7!f0Yg%7{f{HbztJ_~iu+Ly_+rpI6!wBa2E+5obAHof9D%+pu z{mzifgm@BU@_e-fQ^>ujM2ao6Zo@r6PYYIb%6H)FUOO0C`PKEWJb@bniA!gA58{S| zCPfgPF+<>#f5u=oka-$dMq(5URH5vN7nj2F)?mIrud#ZVx!{nAE$4ozeg;ZJI0_^A zc-Y7kz{FU&p6aqPxKD=1=qe~LI;jShvW3a^S~vyCwjt#OaH z_mf!hPGf)Ib{%Y!UDnj|z8g!v1l|T<5s&3MFNg3>gn3__HSocX<^p%gKaF59D>{(# zv-1cp${t5_{*0xW>|$gIBo9f;PafjYy##h~l`+Y#vDlpr#tbYn*tOH7@{1Tu1@~Ns zWc>+N)RmIfcv215`&eRQeXErUrAm!e!*ei=m9SP>_l8DTr%?D-VQm|G1y(5MHBlgsmAkeEjM$84`t851! z$wbVIeI^^-jrQ$IGj)rS=Q6~xf-~FZfxMd()!_<^ag(?Ni3qi_#v+T21^c{@dSRa{ zi3`dKT&YKQz6(I)jhRE6U7KoqrYZV?c=q1}MjKX_{3HgGenC&7Zz}wGsmq1v>LRdA zNMFglP-PeL{lEU>$0Ki%CH9-vbJ3VQ^wYy~pvPI3y$$(63@)HzS(!_sgPEN5Kn?CX zl=ok#yr$?u!HSFl7-W03d`f;F12}6SNHpVT3p^~Zd+r~&;ZOUqQ!zeQugQDH{)qZQ zofiUnn>7~vA4UQW{hl(s0CT)AA-_Wg&RUKE44f?(k^%a;x(t`)Zvd!A{!3q)|5QYx zI0{IAS+Fpa^nV${s|4BWkZ6bXriTQ+{W8gO8Q)jZ+(?H3m~#+ZF1Ad5g#g30*{R3LWS?@N$BF+{JiT3DaXkVxaZp(r0kjwhLtdunxdU_~< z3#0yX46Y7n!^nNl^?L4x2dws(TRGn*8Q#`86CWuLhKOqTYqxkoAk_9Tjr=hNmss!& zqzv9Vk#{0tMJ@Fhxp$5ol8ZubkbaM>48cxDKf5CpSbq}(f)P2y14%~$>R;$F5bfn5 zs>)h0pnHg4W(%)77MNJ>NuI1!1nP<a>a_Q=PL<`-WG4k1YW9Py^_(4c%g=`6feGgoogle.cloud.tpu.v2.AcceleratorConfig - */ -class AcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Type of TPU. - * - * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. Topology of TPU in chips. - * - * Generated from protobuf field string topology = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $topology = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. Type of TPU. - * @type string $topology - * Required. Topology of TPU in chips. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. Type of TPU. - * - * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of TPU. - * - * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\AcceleratorConfig\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Topology of TPU in chips. - * - * Generated from protobuf field string topology = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTopology() - { - return $this->topology; - } - - /** - * Required. Topology of TPU in chips. - * - * Generated from protobuf field string topology = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTopology($var) - { - GPBUtil::checkString($var, True); - $this->topology = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php deleted file mode 100644 index acc1fb827c60..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorConfig/Type.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.tpu.v2.AcceleratorConfig.Type - */ -class Type -{ - /** - * Unspecified version. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * TPU v2. - * - * Generated from protobuf enum V2 = 2; - */ - const V2 = 2; - /** - * TPU v3. - * - * Generated from protobuf enum V3 = 4; - */ - const V3 = 4; - /** - * TPU v4. - * - * Generated from protobuf enum V4 = 7; - */ - const V4 = 7; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::V2 => 'V2', - self::V3 => 'V3', - self::V4 => 'V4', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Tpu\V2\AcceleratorConfig_Type::class); - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php deleted file mode 100644 index eeb1b245c88d..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AcceleratorType.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.tpu.v2.AcceleratorType - */ -class AcceleratorType extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The accelerator type. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The accelerator config. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorConfig accelerator_configs = 3; - */ - private $accelerator_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * @type string $type - * The accelerator type. - * @type array<\Google\Cloud\Tpu\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $accelerator_configs - * The accelerator config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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 accelerator type. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The accelerator 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; - } - - /** - * The accelerator config. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorConfig accelerator_configs = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAcceleratorConfigs() - { - return $this->accelerator_configs; - } - - /** - * The accelerator config. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorConfig accelerator_configs = 3; - * @param array<\Google\Cloud\Tpu\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAcceleratorConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\AcceleratorConfig::class); - $this->accelerator_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php deleted file mode 100644 index 3b041666ea5e..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AccessConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v2.AccessConfig - */ -class AccessConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. An external IP address associated with the TPU worker. - * - * Generated from protobuf field string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $external_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $external_ip - * Output only. An external IP address associated with the TPU worker. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Output only. An external IP address associated with the TPU worker. - * - * Generated from protobuf field string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * Output only. An external IP address associated with the TPU worker. - * - * Generated from protobuf field string external_ip = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php deleted file mode 100644 index 246f0f6075c7..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.tpu.v2.AttachedDisk - */ -class AttachedDisk extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the full path to an existing disk. - * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". - * - * Generated from protobuf field string source_disk = 3; - */ - protected $source_disk = ''; - /** - * The mode in which to attach this disk. - * If not specified, the default is READ_WRITE mode. - * Only applicable to data_disks. - * - * Generated from protobuf field .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_disk - * Specifies the full path to an existing disk. - * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". - * @type int $mode - * The mode in which to attach this disk. - * If not specified, the default is READ_WRITE mode. - * Only applicable to data_disks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the full path to an existing disk. - * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". - * - * Generated from protobuf field string source_disk = 3; - * @return string - */ - public function getSourceDisk() - { - return $this->source_disk; - } - - /** - * Specifies the full path to an existing disk. - * For example: "projects/my-project/zones/us-central1-c/disks/my-disk". - * - * Generated from protobuf field string source_disk = 3; - * @param string $var - * @return $this - */ - public function setSourceDisk($var) - { - GPBUtil::checkString($var, True); - $this->source_disk = $var; - - return $this; - } - - /** - * The mode in which to attach this disk. - * If not specified, the default is READ_WRITE mode. - * Only applicable to data_disks. - * - * Generated from protobuf field .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode in which to attach this disk. - * If not specified, the default is READ_WRITE mode. - * Only applicable to data_disks. - * - * Generated from protobuf field .google.cloud.tpu.v2.AttachedDisk.DiskMode mode = 4; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\AttachedDisk\DiskMode::class); - $this->mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php deleted file mode 100644 index eea643e2e00c..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/AttachedDisk/DiskMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.tpu.v2.AttachedDisk.DiskMode - */ -class DiskMode -{ - /** - * The disk mode is not known/set. - * - * Generated from protobuf enum DISK_MODE_UNSPECIFIED = 0; - */ - const DISK_MODE_UNSPECIFIED = 0; - /** - * Attaches the disk in read-write mode. Only one TPU node can attach a disk - * in read-write mode at a time. - * - * Generated from protobuf enum READ_WRITE = 1; - */ - const READ_WRITE = 1; - /** - * Attaches the disk in read-only mode. Multiple TPU nodes can attach - * a disk in read-only mode at a time. - * - * Generated from protobuf enum READ_ONLY = 2; - */ - const READ_ONLY = 2; - - private static $valueToName = [ - self::DISK_MODE_UNSPECIFIED => 'DISK_MODE_UNSPECIFIED', - self::READ_WRITE => 'READ_WRITE', - self::READ_ONLY => 'READ_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiskMode::class, \Google\Cloud\Tpu\V2\AttachedDisk_DiskMode::class); - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php deleted file mode 100644 index 969d7fa4a370..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/CreateNodeRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.tpu.v2.CreateNodeRequest - */ -class CreateNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The unqualified resource name. - * - * Generated from protobuf field string node_id = 2; - */ - protected $node_id = ''; - /** - * Required. The node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node = null; - - /** - * @param string $parent Required. The parent resource name. Please see - * {@see TpuClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Tpu\V2\Node $node Required. The node. - * @param string $nodeId The unqualified resource name. - * - * @return \Google\Cloud\Tpu\V2\CreateNodeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Tpu\V2\Node $node, string $nodeId): self - { - return (new self()) - ->setParent($parent) - ->setNode($node) - ->setNodeId($nodeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * @type string $node_id - * The unqualified resource name. - * @type \Google\Cloud\Tpu\V2\Node $node - * Required. The node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 unqualified resource name. - * - * Generated from protobuf field string node_id = 2; - * @return string - */ - public function getNodeId() - { - return $this->node_id; - } - - /** - * The unqualified resource name. - * - * Generated from protobuf field string node_id = 2; - * @param string $var - * @return $this - */ - public function setNodeId($var) - { - GPBUtil::checkString($var, True); - $this->node_id = $var; - - return $this; - } - - /** - * Required. The node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tpu\V2\Node|null - */ - public function getNode() - { - return $this->node; - } - - public function hasNode() - { - return isset($this->node); - } - - public function clearNode() - { - unset($this->node); - } - - /** - * Required. The node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node node = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tpu\V2\Node $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\Node::class); - $this->node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php deleted file mode 100644 index 44f643988baa..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/DeleteNodeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.tpu.v2.DeleteNodeRequest - */ -class DeleteNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. Please see - * {@see TpuClient::nodeName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\DeleteNodeRequest - * - * @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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php deleted file mode 100644 index 7dd5df7d149d..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityRequest.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.tpu.v2.GenerateServiceIdentityRequest - */ -class GenerateServiceIdentityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php deleted file mode 100644 index 81731c6854a2..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GenerateServiceIdentityResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.tpu.v2.GenerateServiceIdentityResponse - */ -class GenerateServiceIdentityResponse extends \Google\Protobuf\Internal\Message -{ - /** - * ServiceIdentity that was created or retrieved. - * - * Generated from protobuf field .google.cloud.tpu.v2.ServiceIdentity identity = 1; - */ - protected $identity = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Tpu\V2\ServiceIdentity $identity - * ServiceIdentity that was created or retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * ServiceIdentity that was created or retrieved. - * - * Generated from protobuf field .google.cloud.tpu.v2.ServiceIdentity identity = 1; - * @return \Google\Cloud\Tpu\V2\ServiceIdentity|null - */ - public function getIdentity() - { - return $this->identity; - } - - public function hasIdentity() - { - return isset($this->identity); - } - - public function clearIdentity() - { - unset($this->identity); - } - - /** - * ServiceIdentity that was created or retrieved. - * - * Generated from protobuf field .google.cloud.tpu.v2.ServiceIdentity identity = 1; - * @param \Google\Cloud\Tpu\V2\ServiceIdentity $var - * @return $this - */ - public function setIdentity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\ServiceIdentity::class); - $this->identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php deleted file mode 100644 index 55bb38fc7fac..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetAcceleratorTypeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.tpu.v2.GetAcceleratorTypeRequest - */ -class GetAcceleratorTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. Please see - * {@see TpuClient::acceleratorTypeName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\GetAcceleratorTypeRequest - * - * @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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php deleted file mode 100644 index 74e47599eae5..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.tpu.v2.GetGuestAttributesRequest - */ -class GetGuestAttributesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The guest attributes path to be queried. - * - * Generated from protobuf field string query_path = 2; - */ - protected $query_path = ''; - /** - * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be - * returned. - * - * Generated from protobuf field repeated string worker_ids = 3; - */ - private $worker_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name. - * @type string $query_path - * The guest attributes path to be queried. - * @type array|\Google\Protobuf\Internal\RepeatedField $worker_ids - * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be - * returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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 guest attributes path to be queried. - * - * Generated from protobuf field string query_path = 2; - * @return string - */ - public function getQueryPath() - { - return $this->query_path; - } - - /** - * The guest attributes path to be queried. - * - * Generated from protobuf field string query_path = 2; - * @param string $var - * @return $this - */ - public function setQueryPath($var) - { - GPBUtil::checkString($var, True); - $this->query_path = $var; - - return $this; - } - - /** - * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be - * returned. - * - * Generated from protobuf field repeated string worker_ids = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWorkerIds() - { - return $this->worker_ids; - } - - /** - * The 0-based worker ID. If it is empty, all workers' GuestAttributes will be - * returned. - * - * Generated from protobuf field repeated string worker_ids = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWorkerIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->worker_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php deleted file mode 100644 index 7765fae22da7..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetGuestAttributesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.tpu.v2.GetGuestAttributesResponse - */ -class GetGuestAttributesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The guest attributes for the TPU workers. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; - */ - private $guest_attributes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Tpu\V2\GuestAttributes>|\Google\Protobuf\Internal\RepeatedField $guest_attributes - * The guest attributes for the TPU workers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The guest attributes for the TPU workers. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGuestAttributes() - { - return $this->guest_attributes; - } - - /** - * The guest attributes for the TPU workers. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributes guest_attributes = 1; - * @param array<\Google\Cloud\Tpu\V2\GuestAttributes>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGuestAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\GuestAttributes::class); - $this->guest_attributes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php deleted file mode 100644 index 087299e90ca2..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetNodeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.tpu.v2.GetNodeRequest - */ -class GetNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. Please see - * {@see TpuClient::nodeName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\GetNodeRequest - * - * @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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php deleted file mode 100644 index dde6c2194dd2..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GetRuntimeVersionRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.tpu.v2.GetRuntimeVersionRequest - */ -class GetRuntimeVersionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. Please see - * {@see TpuClient::runtimeVersionName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\GetRuntimeVersionRequest - * - * @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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php deleted file mode 100644 index b87b881016a1..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributes.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.tpu.v2.GuestAttributes - */ -class GuestAttributes extends \Google\Protobuf\Internal\Message -{ - /** - * The path to be queried. This can be the default namespace ('/') or a - * nested namespace ('/\/') or a specified key - * ('/\/\') - * - * Generated from protobuf field string query_path = 1; - */ - protected $query_path = ''; - /** - * The value of the requested queried path. - * - * Generated from protobuf field .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; - */ - protected $query_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_path - * The path to be queried. This can be the default namespace ('/') or a - * nested namespace ('/\/') or a specified key - * ('/\/\') - * @type \Google\Cloud\Tpu\V2\GuestAttributesValue $query_value - * The value of the requested queried path. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The path to be queried. This can be the default namespace ('/') or a - * nested namespace ('/\/') or a specified key - * ('/\/\') - * - * Generated from protobuf field string query_path = 1; - * @return string - */ - public function getQueryPath() - { - return $this->query_path; - } - - /** - * The path to be queried. This can be the default namespace ('/') or a - * nested namespace ('/\/') or a specified key - * ('/\/\') - * - * Generated from protobuf field string query_path = 1; - * @param string $var - * @return $this - */ - public function setQueryPath($var) - { - GPBUtil::checkString($var, True); - $this->query_path = $var; - - return $this; - } - - /** - * The value of the requested queried path. - * - * Generated from protobuf field .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; - * @return \Google\Cloud\Tpu\V2\GuestAttributesValue|null - */ - public function getQueryValue() - { - return $this->query_value; - } - - public function hasQueryValue() - { - return isset($this->query_value); - } - - public function clearQueryValue() - { - unset($this->query_value); - } - - /** - * The value of the requested queried path. - * - * Generated from protobuf field .google.cloud.tpu.v2.GuestAttributesValue query_value = 2; - * @param \Google\Cloud\Tpu\V2\GuestAttributesValue $var - * @return $this - */ - public function setQueryValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\GuestAttributesValue::class); - $this->query_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php deleted file mode 100644 index e854d48559e5..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesEntry.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.tpu.v2.GuestAttributesEntry - */ -class GuestAttributesEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Namespace for the guest attribute entry. - * - * Generated from protobuf field string namespace = 1; - */ - protected $namespace = ''; - /** - * Key for the guest attribute entry. - * - * Generated from protobuf field string key = 2; - */ - protected $key = ''; - /** - * Value for the guest attribute entry. - * - * Generated from protobuf field string value = 3; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $namespace - * Namespace for the guest attribute entry. - * @type string $key - * Key for the guest attribute entry. - * @type string $value - * Value for the guest attribute entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Namespace for the guest attribute entry. - * - * Generated from protobuf field string namespace = 1; - * @return string - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * Namespace for the guest attribute entry. - * - * Generated from protobuf field string namespace = 1; - * @param string $var - * @return $this - */ - public function setNamespace($var) - { - GPBUtil::checkString($var, True); - $this->namespace = $var; - - return $this; - } - - /** - * Key for the guest attribute entry. - * - * Generated from protobuf field string key = 2; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Key for the guest attribute entry. - * - * Generated from protobuf field string key = 2; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Value for the guest attribute entry. - * - * Generated from protobuf field string value = 3; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Value for the guest attribute entry. - * - * Generated from protobuf field string value = 3; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php deleted file mode 100644 index 38a060bdb1c3..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/GuestAttributesValue.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v2.GuestAttributesValue - */ -class GuestAttributesValue extends \Google\Protobuf\Internal\Message -{ - /** - * The list of guest attributes entries. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Tpu\V2\GuestAttributesEntry>|\Google\Protobuf\Internal\RepeatedField $items - * The list of guest attributes entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The list of guest attributes entries. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * The list of guest attributes entries. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.GuestAttributesEntry items = 1; - * @param array<\Google\Cloud\Tpu\V2\GuestAttributesEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\GuestAttributesEntry::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php deleted file mode 100644 index e9bc2618b215..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesRequest.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.tpu.v2.ListAcceleratorTypesRequest - */ -class ListAcceleratorTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource name. Please see - * {@see TpuClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\ListAcceleratorTypesRequest - * - * @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 name. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * List filter. - * @type string $order_by - * Sort results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * 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; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php deleted file mode 100644 index da739205691f..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListAcceleratorTypesResponse.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.tpu.v2.ListAcceleratorTypesResponse - */ -class ListAcceleratorTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; - */ - private $accelerator_types; - /** - * The next page token or empty if none. - * - * 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 array<\Google\Cloud\Tpu\V2\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $accelerator_types - * The listed nodes. - * @type string $next_page_token - * The next page token or empty if none. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAcceleratorTypes() - { - return $this->accelerator_types; - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AcceleratorType accelerator_types = 1; - * @param array<\Google\Cloud\Tpu\V2\AcceleratorType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAcceleratorTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\AcceleratorType::class); - $this->accelerator_types = $arr; - - return $this; - } - - /** - * The next page token or empty if none. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next page token or empty if none. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php deleted file mode 100644 index 5c500f37efd3..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.tpu.v2.ListNodesRequest - */ -class ListNodesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource name. Please see - * {@see TpuClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\ListNodesRequest - * - * @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 name. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php deleted file mode 100644 index de31a212e25f..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListNodesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.tpu.v2.ListNodesResponse - */ -class ListNodesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.Node nodes = 1; - */ - private $nodes; - /** - * The next page token or empty if none. - * - * 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 array<\Google\Cloud\Tpu\V2\Node>|\Google\Protobuf\Internal\RepeatedField $nodes - * The listed nodes. - * @type string $next_page_token - * The next page token or empty if none. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.Node nodes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.Node nodes = 1; - * @param array<\Google\Cloud\Tpu\V2\Node>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\Node::class); - $this->nodes = $arr; - - return $this; - } - - /** - * The next page token or empty if none. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next page token or empty if none. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php deleted file mode 100644 index fd9596d6d199..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsRequest.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.tpu.v2.ListRuntimeVersionsRequest - */ -class ListRuntimeVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource name. Please see - * {@see TpuClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Tpu\V2\ListRuntimeVersionsRequest - * - * @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 name. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * List filter. - * @type string $order_by - * Sort results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * 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; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. - * - * Generated from protobuf field string order_by = 6; - * @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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php deleted file mode 100644 index 30b41ec3e8a9..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ListRuntimeVersionsResponse.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.tpu.v2.ListRuntimeVersionsResponse - */ -class ListRuntimeVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; - */ - private $runtime_versions; - /** - * The next page token or empty if none. - * - * 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 array<\Google\Cloud\Tpu\V2\RuntimeVersion>|\Google\Protobuf\Internal\RepeatedField $runtime_versions - * The listed nodes. - * @type string $next_page_token - * The next page token or empty if none. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuntimeVersions() - { - return $this->runtime_versions; - } - - /** - * The listed nodes. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.RuntimeVersion runtime_versions = 1; - * @param array<\Google\Cloud\Tpu\V2\RuntimeVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuntimeVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\RuntimeVersion::class); - $this->runtime_versions = $arr; - - return $this; - } - - /** - * The next page token or empty if none. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next page token or empty if none. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php deleted file mode 100644 index 34fdb30cd9e8..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkConfig.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.tpu.v2.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the network for the TPU node. It must be a preexisting Google - * Compute Engine network. If none is provided, "default" will be used. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * The name of the subnetwork for the TPU node. It must be a preexisting - * Google Compute Engine subnetwork. If none is provided, "default" will be - * used. - * - * Generated from protobuf field string subnetwork = 2; - */ - protected $subnetwork = ''; - /** - * Indicates that external IP addresses would be associated with the TPU - * workers. If set to false, the specified subnetwork or network should have - * Private Google Access enabled. - * - * Generated from protobuf field bool enable_external_ips = 3; - */ - protected $enable_external_ips = false; - /** - * Allows the TPU node to send and receive packets with non-matching - * destination or source IPs. This is required if you plan to use the TPU - * workers to forward routes. - * - * Generated from protobuf field bool can_ip_forward = 4; - */ - protected $can_ip_forward = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The name of the network for the TPU node. It must be a preexisting Google - * Compute Engine network. If none is provided, "default" will be used. - * @type string $subnetwork - * The name of the subnetwork for the TPU node. It must be a preexisting - * Google Compute Engine subnetwork. If none is provided, "default" will be - * used. - * @type bool $enable_external_ips - * Indicates that external IP addresses would be associated with the TPU - * workers. If set to false, the specified subnetwork or network should have - * Private Google Access enabled. - * @type bool $can_ip_forward - * Allows the TPU node to send and receive packets with non-matching - * destination or source IPs. This is required if you plan to use the TPU - * workers to forward routes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The name of the network for the TPU node. It must be a preexisting Google - * Compute Engine network. If none is provided, "default" will be used. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The name of the network for the TPU node. It must be a preexisting Google - * Compute Engine network. If none is provided, "default" will be used. - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The name of the subnetwork for the TPU node. It must be a preexisting - * Google Compute Engine subnetwork. If none is provided, "default" will be - * used. - * - * Generated from protobuf field string subnetwork = 2; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * The name of the subnetwork for the TPU node. It must be a preexisting - * Google Compute Engine subnetwork. If none is provided, "default" will be - * used. - * - * Generated from protobuf field string subnetwork = 2; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * Indicates that external IP addresses would be associated with the TPU - * workers. If set to false, the specified subnetwork or network should have - * Private Google Access enabled. - * - * Generated from protobuf field bool enable_external_ips = 3; - * @return bool - */ - public function getEnableExternalIps() - { - return $this->enable_external_ips; - } - - /** - * Indicates that external IP addresses would be associated with the TPU - * workers. If set to false, the specified subnetwork or network should have - * Private Google Access enabled. - * - * Generated from protobuf field bool enable_external_ips = 3; - * @param bool $var - * @return $this - */ - public function setEnableExternalIps($var) - { - GPBUtil::checkBool($var); - $this->enable_external_ips = $var; - - return $this; - } - - /** - * Allows the TPU node to send and receive packets with non-matching - * destination or source IPs. This is required if you plan to use the TPU - * workers to forward routes. - * - * Generated from protobuf field bool can_ip_forward = 4; - * @return bool - */ - public function getCanIpForward() - { - return $this->can_ip_forward; - } - - /** - * Allows the TPU node to send and receive packets with non-matching - * destination or source IPs. This is required if you plan to use the TPU - * workers to forward routes. - * - * Generated from protobuf field bool can_ip_forward = 4; - * @param bool $var - * @return $this - */ - public function setCanIpForward($var) - { - GPBUtil::checkBool($var); - $this->can_ip_forward = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php deleted file mode 100644 index 96c0447e55ce..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/NetworkEndpoint.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.tpu.v2.NetworkEndpoint - */ -class NetworkEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * The internal IP address of this network endpoint. - * - * Generated from protobuf field string ip_address = 1; - */ - protected $ip_address = ''; - /** - * The port of this network endpoint. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - /** - * The access config for the TPU worker. - * - * Generated from protobuf field .google.cloud.tpu.v2.AccessConfig access_config = 5; - */ - protected $access_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * The internal IP address of this network endpoint. - * @type int $port - * The port of this network endpoint. - * @type \Google\Cloud\Tpu\V2\AccessConfig $access_config - * The access config for the TPU worker. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The internal IP address of this network endpoint. - * - * Generated from protobuf field string ip_address = 1; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The internal IP address of this network endpoint. - * - * Generated from protobuf field string ip_address = 1; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * The port of this network endpoint. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * The port of this network endpoint. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * The access config for the TPU worker. - * - * Generated from protobuf field .google.cloud.tpu.v2.AccessConfig access_config = 5; - * @return \Google\Cloud\Tpu\V2\AccessConfig|null - */ - public function getAccessConfig() - { - return $this->access_config; - } - - public function hasAccessConfig() - { - return isset($this->access_config); - } - - public function clearAccessConfig() - { - unset($this->access_config); - } - - /** - * The access config for the TPU worker. - * - * Generated from protobuf field .google.cloud.tpu.v2.AccessConfig access_config = 5; - * @param \Google\Cloud\Tpu\V2\AccessConfig $var - * @return $this - */ - public function setAccessConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\AccessConfig::class); - $this->access_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php deleted file mode 100644 index d8cb3157b607..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node.php +++ /dev/null @@ -1,965 +0,0 @@ -google.cloud.tpu.v2.Node - */ -class Node extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Immutable. The name of the TPU. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The user-supplied description of the TPU. Maximum of 512 characters. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Optional. The type of hardware accelerators associated with this node. - * - * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $accelerator_type = ''; - /** - * Output only. The current state for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * - * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_description = ''; - /** - * Required. The runtime version running in the Node. - * - * Generated from protobuf field string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $runtime_version = ''; - /** - * Network configurations for the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v2.NetworkConfig network_config = 36; - */ - protected $network_config = null; - /** - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * - * Generated from protobuf field string cidr_block = 13; - */ - protected $cidr_block = ''; - /** - * The Google Cloud Platform Service Account to be used by the TPU node VMs. - * If None is specified, the default compute service account will be used. - * - * Generated from protobuf field .google.cloud.tpu.v2.ServiceAccount service_account = 37; - */ - protected $service_account = null; - /** - * Output only. The time when the node was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The scheduling options for this node. - * - * Generated from protobuf field .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; - */ - protected $scheduling_config = null; - /** - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that runtime clients of the node reach out - * to the 0th entry in this map first. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $network_endpoints; - /** - * The health status of the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.Health health = 22; - */ - protected $health = 0; - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 24; - */ - private $labels; - /** - * Custom metadata to apply to the TPU Node. - * Can set startup-script and shutdown-script - * - * Generated from protobuf field map metadata = 34; - */ - private $metadata; - /** - * Tags to apply to the TPU Node. Tags are used to identify valid sources or - * targets for network firewalls. - * - * Generated from protobuf field repeated string tags = 40; - */ - private $tags; - /** - * Output only. The unique identifier for the TPU Node. - * - * Generated from protobuf field int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = 0; - /** - * The additional data disks for the Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; - */ - private $data_disks; - /** - * Output only. The API version that created this Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = 0; - /** - * Output only. The Symptoms that have occurred to the TPU Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $symptoms; - /** - * Shielded Instance options. - * - * Generated from protobuf field .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; - */ - protected $shielded_instance_config = null; - /** - * The AccleratorConfig for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig accelerator_config = 46; - */ - protected $accelerator_config = null; - /** - * Output only. The qualified name of the QueuedResource that requested this - * Node. - * - * Generated from protobuf field string queued_resource = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $queued_resource = ''; - /** - * Output only. Whether the Node belongs to a Multislice group. - * - * Generated from protobuf field bool multislice_node = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $multislice_node = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Immutable. The name of the TPU. - * @type string $description - * The user-supplied description of the TPU. Maximum of 512 characters. - * @type string $accelerator_type - * Optional. The type of hardware accelerators associated with this node. - * @type int $state - * Output only. The current state for the TPU Node. - * @type string $health_description - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * @type string $runtime_version - * Required. The runtime version running in the Node. - * @type \Google\Cloud\Tpu\V2\NetworkConfig $network_config - * Network configurations for the TPU node. - * @type string $cidr_block - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * @type \Google\Cloud\Tpu\V2\ServiceAccount $service_account - * The Google Cloud Platform Service Account to be used by the TPU node VMs. - * If None is specified, the default compute service account will be used. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the node was created. - * @type \Google\Cloud\Tpu\V2\SchedulingConfig $scheduling_config - * The scheduling options for this node. - * @type array<\Google\Cloud\Tpu\V2\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $network_endpoints - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that runtime clients of the node reach out - * to the 0th entry in this map first. - * @type int $health - * The health status of the TPU node. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user-provided metadata. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Custom metadata to apply to the TPU Node. - * Can set startup-script and shutdown-script - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Tags to apply to the TPU Node. Tags are used to identify valid sources or - * targets for network firewalls. - * @type int|string $id - * Output only. The unique identifier for the TPU Node. - * @type array<\Google\Cloud\Tpu\V2\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $data_disks - * The additional data disks for the Node. - * @type int $api_version - * Output only. The API version that created this Node. - * @type array<\Google\Cloud\Tpu\V2\Symptom>|\Google\Protobuf\Internal\RepeatedField $symptoms - * Output only. The Symptoms that have occurred to the TPU Node. - * @type \Google\Cloud\Tpu\V2\ShieldedInstanceConfig $shielded_instance_config - * Shielded Instance options. - * @type \Google\Cloud\Tpu\V2\AcceleratorConfig $accelerator_config - * The AccleratorConfig for the TPU Node. - * @type string $queued_resource - * Output only. The qualified name of the QueuedResource that requested this - * Node. - * @type bool $multislice_node - * Output only. Whether the Node belongs to a Multislice group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Immutable. The name of the TPU. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Immutable. The name of the TPU. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The user-supplied description of the TPU. Maximum of 512 characters. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The user-supplied description of the TPU. Maximum of 512 characters. - * - * 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; - } - - /** - * Optional. The type of hardware accelerators associated with this node. - * - * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAcceleratorType() - { - return $this->accelerator_type; - } - - /** - * Optional. The type of hardware accelerators associated with this node. - * - * Generated from protobuf field string accelerator_type = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAcceleratorType($var) - { - GPBUtil::checkString($var, True); - $this->accelerator_type = $var; - - return $this; - } - - /** - * Output only. The current state for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Node\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * - * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHealthDescription() - { - return $this->health_description; - } - - /** - * Output only. If this field is populated, it contains a description of why - * the TPU Node is unhealthy. - * - * Generated from protobuf field string health_description = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHealthDescription($var) - { - GPBUtil::checkString($var, True); - $this->health_description = $var; - - return $this; - } - - /** - * Required. The runtime version running in the Node. - * - * Generated from protobuf field string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRuntimeVersion() - { - return $this->runtime_version; - } - - /** - * Required. The runtime version running in the Node. - * - * Generated from protobuf field string runtime_version = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRuntimeVersion($var) - { - GPBUtil::checkString($var, True); - $this->runtime_version = $var; - - return $this; - } - - /** - * Network configurations for the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v2.NetworkConfig network_config = 36; - * @return \Google\Cloud\Tpu\V2\NetworkConfig|null - */ - public function getNetworkConfig() - { - return $this->network_config; - } - - public function hasNetworkConfig() - { - return isset($this->network_config); - } - - public function clearNetworkConfig() - { - unset($this->network_config); - } - - /** - * Network configurations for the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v2.NetworkConfig network_config = 36; - * @param \Google\Cloud\Tpu\V2\NetworkConfig $var - * @return $this - */ - public function setNetworkConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\NetworkConfig::class); - $this->network_config = $var; - - return $this; - } - - /** - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * - * Generated from protobuf field string cidr_block = 13; - * @return string - */ - public function getCidrBlock() - { - return $this->cidr_block; - } - - /** - * The CIDR block that the TPU node will use when selecting an IP address. - * This CIDR block must be a /29 block; the Compute Engine networks API - * forbids a smaller block, and using a larger block would be wasteful (a - * node can only consume one IP address). Errors will occur if the CIDR block - * has already been used for a currently existing TPU node, the CIDR block - * conflicts with any subnetworks in the user's provided network, or the - * provided network is peered with another network that is using that CIDR - * block. - * - * Generated from protobuf field string cidr_block = 13; - * @param string $var - * @return $this - */ - public function setCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cidr_block = $var; - - return $this; - } - - /** - * The Google Cloud Platform Service Account to be used by the TPU node VMs. - * If None is specified, the default compute service account will be used. - * - * Generated from protobuf field .google.cloud.tpu.v2.ServiceAccount service_account = 37; - * @return \Google\Cloud\Tpu\V2\ServiceAccount|null - */ - public function getServiceAccount() - { - return $this->service_account; - } - - public function hasServiceAccount() - { - return isset($this->service_account); - } - - public function clearServiceAccount() - { - unset($this->service_account); - } - - /** - * The Google Cloud Platform Service Account to be used by the TPU node VMs. - * If None is specified, the default compute service account will be used. - * - * Generated from protobuf field .google.cloud.tpu.v2.ServiceAccount service_account = 37; - * @param \Google\Cloud\Tpu\V2\ServiceAccount $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\ServiceAccount::class); - $this->service_account = $var; - - return $this; - } - - /** - * Output only. The time when the node was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the node was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The scheduling options for this node. - * - * Generated from protobuf field .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; - * @return \Google\Cloud\Tpu\V2\SchedulingConfig|null - */ - public function getSchedulingConfig() - { - return $this->scheduling_config; - } - - public function hasSchedulingConfig() - { - return isset($this->scheduling_config); - } - - public function clearSchedulingConfig() - { - unset($this->scheduling_config); - } - - /** - * The scheduling options for this node. - * - * Generated from protobuf field .google.cloud.tpu.v2.SchedulingConfig scheduling_config = 17; - * @param \Google\Cloud\Tpu\V2\SchedulingConfig $var - * @return $this - */ - public function setSchedulingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\SchedulingConfig::class); - $this->scheduling_config = $var; - - return $this; - } - - /** - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that runtime clients of the node reach out - * to the 0th entry in this map first. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkEndpoints() - { - return $this->network_endpoints; - } - - /** - * Output only. The network endpoints where TPU workers can be accessed and - * sent work. It is recommended that runtime clients of the node reach out - * to the 0th entry in this map first. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.NetworkEndpoint network_endpoints = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Tpu\V2\NetworkEndpoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\NetworkEndpoint::class); - $this->network_endpoints = $arr; - - return $this; - } - - /** - * The health status of the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.Health health = 22; - * @return int - */ - public function getHealth() - { - return $this->health; - } - - /** - * The health status of the TPU node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.Health health = 22; - * @param int $var - * @return $this - */ - public function setHealth($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Node\Health::class); - $this->health = $var; - - return $this; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 24; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 24; - * @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; - } - - /** - * Custom metadata to apply to the TPU Node. - * Can set startup-script and shutdown-script - * - * Generated from protobuf field map metadata = 34; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Custom metadata to apply to the TPU Node. - * Can set startup-script and shutdown-script - * - * Generated from protobuf field map metadata = 34; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Tags to apply to the TPU Node. Tags are used to identify valid sources or - * targets for network firewalls. - * - * Generated from protobuf field repeated string tags = 40; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Tags to apply to the TPU Node. Tags are used to identify valid sources or - * targets for network firewalls. - * - * Generated from protobuf field repeated string tags = 40; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Output only. The unique identifier for the TPU Node. - * - * Generated from protobuf field int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. The unique identifier for the TPU Node. - * - * Generated from protobuf field int64 id = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkInt64($var); - $this->id = $var; - - return $this; - } - - /** - * The additional data disks for the Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataDisks() - { - return $this->data_disks; - } - - /** - * The additional data disks for the Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.AttachedDisk data_disks = 41; - * @param array<\Google\Cloud\Tpu\V2\AttachedDisk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\AttachedDisk::class); - $this->data_disks = $arr; - - return $this; - } - - /** - * Output only. The API version that created this Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. The API version that created this Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node.ApiVersion api_version = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Node\ApiVersion::class); - $this->api_version = $var; - - return $this; - } - - /** - * Output only. The Symptoms that have occurred to the TPU Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSymptoms() - { - return $this->symptoms; - } - - /** - * Output only. The Symptoms that have occurred to the TPU Node. - * - * Generated from protobuf field repeated .google.cloud.tpu.v2.Symptom symptoms = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Tpu\V2\Symptom>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSymptoms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Tpu\V2\Symptom::class); - $this->symptoms = $arr; - - return $this; - } - - /** - * Shielded Instance options. - * - * Generated from protobuf field .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; - * @return \Google\Cloud\Tpu\V2\ShieldedInstanceConfig|null - */ - public function getShieldedInstanceConfig() - { - return $this->shielded_instance_config; - } - - public function hasShieldedInstanceConfig() - { - return isset($this->shielded_instance_config); - } - - public function clearShieldedInstanceConfig() - { - unset($this->shielded_instance_config); - } - - /** - * Shielded Instance options. - * - * Generated from protobuf field .google.cloud.tpu.v2.ShieldedInstanceConfig shielded_instance_config = 45; - * @param \Google\Cloud\Tpu\V2\ShieldedInstanceConfig $var - * @return $this - */ - public function setShieldedInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\ShieldedInstanceConfig::class); - $this->shielded_instance_config = $var; - - return $this; - } - - /** - * The AccleratorConfig for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig accelerator_config = 46; - * @return \Google\Cloud\Tpu\V2\AcceleratorConfig|null - */ - public function getAcceleratorConfig() - { - return $this->accelerator_config; - } - - public function hasAcceleratorConfig() - { - return isset($this->accelerator_config); - } - - public function clearAcceleratorConfig() - { - unset($this->accelerator_config); - } - - /** - * The AccleratorConfig for the TPU Node. - * - * Generated from protobuf field .google.cloud.tpu.v2.AcceleratorConfig accelerator_config = 46; - * @param \Google\Cloud\Tpu\V2\AcceleratorConfig $var - * @return $this - */ - public function setAcceleratorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\AcceleratorConfig::class); - $this->accelerator_config = $var; - - return $this; - } - - /** - * Output only. The qualified name of the QueuedResource that requested this - * Node. - * - * Generated from protobuf field string queued_resource = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getQueuedResource() - { - return $this->queued_resource; - } - - /** - * Output only. The qualified name of the QueuedResource that requested this - * Node. - * - * Generated from protobuf field string queued_resource = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setQueuedResource($var) - { - GPBUtil::checkString($var, True); - $this->queued_resource = $var; - - return $this; - } - - /** - * Output only. Whether the Node belongs to a Multislice group. - * - * Generated from protobuf field bool multislice_node = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getMultisliceNode() - { - return $this->multislice_node; - } - - /** - * Output only. Whether the Node belongs to a Multislice group. - * - * Generated from protobuf field bool multislice_node = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setMultisliceNode($var) - { - GPBUtil::checkBool($var); - $this->multislice_node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php deleted file mode 100644 index 61fc55ced296..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/ApiVersion.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.tpu.v2.Node.ApiVersion - */ -class ApiVersion -{ - /** - * API version is unknown. - * - * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; - */ - const API_VERSION_UNSPECIFIED = 0; - /** - * TPU API V1Alpha1 version. - * - * Generated from protobuf enum V1_ALPHA1 = 1; - */ - const V1_ALPHA1 = 1; - /** - * TPU API V1 version. - * - * Generated from protobuf enum V1 = 2; - */ - const V1 = 2; - /** - * TPU API V2Alpha1 version. - * - * Generated from protobuf enum V2_ALPHA1 = 3; - */ - const V2_ALPHA1 = 3; - /** - * TPU API V2 version. - * - * Generated from protobuf enum V2 = 4; - */ - const V2 = 4; - - private static $valueToName = [ - self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', - self::V1_ALPHA1 => 'V1_ALPHA1', - self::V1 => 'V1', - self::V2_ALPHA1 => 'V2_ALPHA1', - self::V2 => 'V2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ApiVersion::class, \Google\Cloud\Tpu\V2\Node_ApiVersion::class); - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php deleted file mode 100644 index 0c29dd2c488a..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/Health.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.tpu.v2.Node.Health - */ -class Health -{ - /** - * Health status is unknown: not initialized or failed to retrieve. - * - * Generated from protobuf enum HEALTH_UNSPECIFIED = 0; - */ - const HEALTH_UNSPECIFIED = 0; - /** - * The resource is healthy. - * - * Generated from protobuf enum HEALTHY = 1; - */ - const HEALTHY = 1; - /** - * The resource is unresponsive. - * - * Generated from protobuf enum TIMEOUT = 3; - */ - const TIMEOUT = 3; - /** - * The in-guest ML stack is unhealthy. - * - * Generated from protobuf enum UNHEALTHY_TENSORFLOW = 4; - */ - const UNHEALTHY_TENSORFLOW = 4; - /** - * The node is under maintenance/priority boost caused rescheduling and - * will resume running once rescheduled. - * - * Generated from protobuf enum UNHEALTHY_MAINTENANCE = 5; - */ - const UNHEALTHY_MAINTENANCE = 5; - - private static $valueToName = [ - self::HEALTH_UNSPECIFIED => 'HEALTH_UNSPECIFIED', - self::HEALTHY => 'HEALTHY', - self::TIMEOUT => 'TIMEOUT', - self::UNHEALTHY_TENSORFLOW => 'UNHEALTHY_TENSORFLOW', - self::UNHEALTHY_MAINTENANCE => 'UNHEALTHY_MAINTENANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Health::class, \Google\Cloud\Tpu\V2\Node_Health::class); - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php deleted file mode 100644 index 79805f3f2f91..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Node/State.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.tpu.v2.Node.State - */ -class State -{ - /** - * TPU node state is not known/set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * TPU node is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * TPU node has been created. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * TPU node is restarting. - * - * Generated from protobuf enum RESTARTING = 3; - */ - const RESTARTING = 3; - /** - * TPU node is undergoing reimaging. - * - * Generated from protobuf enum REIMAGING = 4; - */ - const REIMAGING = 4; - /** - * TPU node is being deleted. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - /** - * TPU node is being repaired and may be unusable. Details can be - * found in the 'help_description' field. - * - * Generated from protobuf enum REPAIRING = 6; - */ - const REPAIRING = 6; - /** - * TPU node is stopped. - * - * Generated from protobuf enum STOPPED = 8; - */ - const STOPPED = 8; - /** - * TPU node is currently stopping. - * - * Generated from protobuf enum STOPPING = 9; - */ - const STOPPING = 9; - /** - * TPU node is currently starting. - * - * Generated from protobuf enum STARTING = 10; - */ - const STARTING = 10; - /** - * TPU node has been preempted. Only applies to Preemptible TPU Nodes. - * - * Generated from protobuf enum PREEMPTED = 11; - */ - const PREEMPTED = 11; - /** - * TPU node has been terminated due to maintenance or has reached the end of - * its life cycle (for preemptible nodes). - * - * Generated from protobuf enum TERMINATED = 12; - */ - const TERMINATED = 12; - /** - * TPU node is currently hiding. - * - * Generated from protobuf enum HIDING = 13; - */ - const HIDING = 13; - /** - * TPU node has been hidden. - * - * Generated from protobuf enum HIDDEN = 14; - */ - const HIDDEN = 14; - /** - * TPU node is currently unhiding. - * - * Generated from protobuf enum UNHIDING = 15; - */ - const UNHIDING = 15; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::RESTARTING => 'RESTARTING', - self::REIMAGING => 'REIMAGING', - self::DELETING => 'DELETING', - self::REPAIRING => 'REPAIRING', - self::STOPPED => 'STOPPED', - self::STOPPING => 'STOPPING', - self::STARTING => 'STARTING', - self::PREEMPTED => 'PREEMPTED', - self::TERMINATED => 'TERMINATED', - self::HIDING => 'HIDING', - self::HIDDEN => 'HIDDEN', - self::UNHIDING => 'UNHIDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Tpu\V2\Node_State::class); - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php deleted file mode 100644 index a379c95e6f14..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/OperationMetadata.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.tpu.v2.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - */ - protected $status_detail = ''; - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - */ - protected $cancel_requested = false; - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Specifies if cancellation was requested for the operation. - * @type string $api_version - * API version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * 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 operation finished running. - * - * 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; - } - - /** - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target of the operation - for example - * projects/project-1/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php deleted file mode 100644 index f22ae02ff60d..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/RuntimeVersion.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v2.RuntimeVersion - */ -class RuntimeVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The runtime version. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name. - * @type string $version - * The runtime version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The resource name. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name. - * - * 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 runtime version. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The runtime version. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php deleted file mode 100644 index b4da318b761c..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/SchedulingConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.tpu.v2.SchedulingConfig - */ -class SchedulingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defines whether the node is preemptible. - * - * Generated from protobuf field bool preemptible = 1; - */ - protected $preemptible = false; - /** - * Whether the node is created under a reservation. - * - * Generated from protobuf field bool reserved = 2; - */ - protected $reserved = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $preemptible - * Defines whether the node is preemptible. - * @type bool $reserved - * Whether the node is created under a reservation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Defines whether the node is preemptible. - * - * Generated from protobuf field bool preemptible = 1; - * @return bool - */ - public function getPreemptible() - { - return $this->preemptible; - } - - /** - * Defines whether the node is preemptible. - * - * Generated from protobuf field bool preemptible = 1; - * @param bool $var - * @return $this - */ - public function setPreemptible($var) - { - GPBUtil::checkBool($var); - $this->preemptible = $var; - - return $this; - } - - /** - * Whether the node is created under a reservation. - * - * Generated from protobuf field bool reserved = 2; - * @return bool - */ - public function getReserved() - { - return $this->reserved; - } - - /** - * Whether the node is created under a reservation. - * - * Generated from protobuf field bool reserved = 2; - * @param bool $var - * @return $this - */ - public function setReserved($var) - { - GPBUtil::checkBool($var); - $this->reserved = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php deleted file mode 100644 index d60a1baef2b7..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceAccount.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.tpu.v2.ServiceAccount - */ -class ServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Email address of the service account. If empty, default Compute service - * account will be used. - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - /** - * The list of scopes to be made available for this service account. If empty, - * access to all Cloud APIs will be allowed. - * - * Generated from protobuf field repeated string scope = 2; - */ - private $scope; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Email address of the service account. If empty, default Compute service - * account will be used. - * @type array|\Google\Protobuf\Internal\RepeatedField $scope - * The list of scopes to be made available for this service account. If empty, - * access to all Cloud APIs will be allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Email address of the service account. If empty, default Compute service - * account will be used. - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Email address of the service account. If empty, default Compute service - * account will be used. - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * The list of scopes to be made available for this service account. If empty, - * access to all Cloud APIs will be allowed. - * - * Generated from protobuf field repeated string scope = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScope() - { - return $this->scope; - } - - /** - * The list of scopes to be made available for this service account. If empty, - * access to all Cloud APIs will be allowed. - * - * Generated from protobuf field repeated string scope = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScope($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scope = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php deleted file mode 100644 index 2e2ead14fdfd..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ServiceIdentity.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v2.ServiceIdentity - */ -class ServiceIdentity extends \Google\Protobuf\Internal\Message -{ - /** - * The email address of the service identity. - * - * Generated from protobuf field string email = 1; - */ - protected $email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * The email address of the service identity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * The email address of the service identity. - * - * Generated from protobuf field string email = 1; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * The email address of the service identity. - * - * Generated from protobuf field string email = 1; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php deleted file mode 100644 index 26d257130719..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/ShieldedInstanceConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v2.ShieldedInstanceConfig - */ -class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defines whether the instance has Secure Boot enabled. - * - * Generated from protobuf field bool enable_secure_boot = 1; - */ - protected $enable_secure_boot = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_secure_boot - * Defines whether the instance has Secure Boot enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Defines whether the instance has Secure Boot enabled. - * - * Generated from protobuf field bool enable_secure_boot = 1; - * @return bool - */ - public function getEnableSecureBoot() - { - return $this->enable_secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * - * Generated from protobuf field bool enable_secure_boot = 1; - * @param bool $var - * @return $this - */ - public function setEnableSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->enable_secure_boot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php deleted file mode 100644 index 31f7c5bc5c13..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StartNodeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v2.StartNodeRequest - */ -class StartNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php deleted file mode 100644 index ffa5a6bf091f..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/StopNodeRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.tpu.v2.StopNodeRequest - */ -class StopNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name. - * - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name. - * - * 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. - * - * 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/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php deleted file mode 100644 index 647e1eb91a08..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.tpu.v2.Symptom - */ -class Symptom extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp when the Symptom is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * Type of the Symptom. - * - * Generated from protobuf field .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; - */ - protected $symptom_type = 0; - /** - * Detailed information of the current Symptom. - * - * Generated from protobuf field string details = 3; - */ - protected $details = ''; - /** - * A string used to uniquely distinguish a worker within a TPU node. - * - * Generated from protobuf field string worker_id = 4; - */ - protected $worker_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Timestamp when the Symptom is created. - * @type int $symptom_type - * Type of the Symptom. - * @type string $details - * Detailed information of the current Symptom. - * @type string $worker_id - * A string used to uniquely distinguish a worker within a TPU node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp when the Symptom is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Timestamp when the Symptom is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Type of the Symptom. - * - * Generated from protobuf field .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; - * @return int - */ - public function getSymptomType() - { - return $this->symptom_type; - } - - /** - * Type of the Symptom. - * - * Generated from protobuf field .google.cloud.tpu.v2.Symptom.SymptomType symptom_type = 2; - * @param int $var - * @return $this - */ - public function setSymptomType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Tpu\V2\Symptom\SymptomType::class); - $this->symptom_type = $var; - - return $this; - } - - /** - * Detailed information of the current Symptom. - * - * Generated from protobuf field string details = 3; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Detailed information of the current Symptom. - * - * Generated from protobuf field string details = 3; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - - /** - * A string used to uniquely distinguish a worker within a TPU node. - * - * Generated from protobuf field string worker_id = 4; - * @return string - */ - public function getWorkerId() - { - return $this->worker_id; - } - - /** - * A string used to uniquely distinguish a worker within a TPU node. - * - * Generated from protobuf field string worker_id = 4; - * @param string $var - * @return $this - */ - public function setWorkerId($var) - { - GPBUtil::checkString($var, True); - $this->worker_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php deleted file mode 100644 index 63ba37fe0b4c..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/Symptom/SymptomType.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.tpu.v2.Symptom.SymptomType - */ -class SymptomType -{ - /** - * Unspecified symptom. - * - * Generated from protobuf enum SYMPTOM_TYPE_UNSPECIFIED = 0; - */ - const SYMPTOM_TYPE_UNSPECIFIED = 0; - /** - * TPU VM memory is low. - * - * Generated from protobuf enum LOW_MEMORY = 1; - */ - const LOW_MEMORY = 1; - /** - * TPU runtime is out of memory. - * - * Generated from protobuf enum OUT_OF_MEMORY = 2; - */ - const OUT_OF_MEMORY = 2; - /** - * TPU runtime execution has timed out. - * - * Generated from protobuf enum EXECUTE_TIMED_OUT = 3; - */ - const EXECUTE_TIMED_OUT = 3; - /** - * TPU runtime fails to construct a mesh that recognizes each TPU device's - * neighbors. - * - * Generated from protobuf enum MESH_BUILD_FAIL = 4; - */ - const MESH_BUILD_FAIL = 4; - /** - * TPU HBM is out of memory. - * - * Generated from protobuf enum HBM_OUT_OF_MEMORY = 5; - */ - const HBM_OUT_OF_MEMORY = 5; - /** - * Abusive behaviors have been identified on the current project. - * - * Generated from protobuf enum PROJECT_ABUSE = 6; - */ - const PROJECT_ABUSE = 6; - - private static $valueToName = [ - self::SYMPTOM_TYPE_UNSPECIFIED => 'SYMPTOM_TYPE_UNSPECIFIED', - self::LOW_MEMORY => 'LOW_MEMORY', - self::OUT_OF_MEMORY => 'OUT_OF_MEMORY', - self::EXECUTE_TIMED_OUT => 'EXECUTE_TIMED_OUT', - self::MESH_BUILD_FAIL => 'MESH_BUILD_FAIL', - self::HBM_OUT_OF_MEMORY => 'HBM_OUT_OF_MEMORY', - self::PROJECT_ABUSE => 'PROJECT_ABUSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SymptomType::class, \Google\Cloud\Tpu\V2\Symptom_SymptomType::class); - diff --git a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php b/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php deleted file mode 100644 index ccf8a1a8a1aa..000000000000 --- a/owl-bot-staging/Tpu/v2/proto/src/Google/Cloud/Tpu/V2/UpdateNodeRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.tpu.v2.UpdateNodeRequest - */ -class UpdateNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields from [Node][Tpu.Node] to update. - * Supported fields: [description, tags, labels, metadata, - * network_config.enable_external_ips]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The node. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node = null; - - /** - * @param \Google\Cloud\Tpu\V2\Node $node Required. The node. Only fields specified in update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields from [Node][Tpu.Node] to update. - * Supported fields: [description, tags, labels, metadata, - * network_config.enable_external_ips]. - * - * @return \Google\Cloud\Tpu\V2\UpdateNodeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Tpu\V2\Node $node, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNode($node) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields from [Node][Tpu.Node] to update. - * Supported fields: [description, tags, labels, metadata, - * network_config.enable_external_ips]. - * @type \Google\Cloud\Tpu\V2\Node $node - * Required. The node. Only fields specified in update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Tpu\V2\CloudTpu::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields from [Node][Tpu.Node] to update. - * Supported fields: [description, tags, labels, metadata, - * network_config.enable_external_ips]. - * - * 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. Mask of fields from [Node][Tpu.Node] to update. - * Supported fields: [description, tags, labels, metadata, - * network_config.enable_external_ips]. - * - * 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 node. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Tpu\V2\Node|null - */ - public function getNode() - { - return $this->node; - } - - public function hasNode() - { - return isset($this->node); - } - - public function clearNode() - { - unset($this->node); - } - - /** - * Required. The node. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.tpu.v2.Node node = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Tpu\V2\Node $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Tpu\V2\Node::class); - $this->node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php deleted file mode 100644 index ce91ceaa31e5..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/create_node.php +++ /dev/null @@ -1,88 +0,0 @@ -setRuntimeVersion($nodeRuntimeVersion); - $request = (new CreateNodeRequest()) - ->setParent($formattedParent) - ->setNode($node); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $tpuClient->createNode($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - $nodeRuntimeVersion = '[RUNTIME_VERSION]'; - - create_node_sample($formattedParent, $nodeRuntimeVersion); -} -// [END tpu_v2_generated_Tpu_CreateNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php deleted file mode 100644 index 5fc7f8ceccef..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/delete_node.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $tpuClient->deleteNode($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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - delete_node_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_DeleteNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php deleted file mode 100644 index d2a38e6cbda0..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/generate_service_identity.php +++ /dev/null @@ -1,71 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var GenerateServiceIdentityResponse $response */ - $response = $tpuClient->generateServiceIdentity($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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - - generate_service_identity_sample($formattedParent); -} -// [END tpu_v2_generated_Tpu_GenerateServiceIdentity_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php deleted file mode 100644 index 72be76c87df1..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_accelerator_type.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AcceleratorType $response */ - $response = $tpuClient->getAcceleratorType($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 = TpuClient::acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - - get_accelerator_type_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_GetAcceleratorType_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php deleted file mode 100644 index b7db1bcc83a1..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_guest_attributes.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GetGuestAttributesResponse $response */ - $response = $tpuClient->getGuestAttributes($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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - get_guest_attributes_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_GetGuestAttributes_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_location.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_location.php deleted file mode 100644 index d646747809a4..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/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 tpu_v2_generated_Tpu_GetLocation_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php deleted file mode 100644 index 62de241f7e9f..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_node.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Node $response */ - $response = $tpuClient->getNode($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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - get_node_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_GetNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php deleted file mode 100644 index 7145700a02ce..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/get_runtime_version.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RuntimeVersion $response */ - $response = $tpuClient->getRuntimeVersion($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 = TpuClient::runtimeVersionName('[PROJECT]', '[LOCATION]', '[RUNTIME_VERSION]'); - - get_runtime_version_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_GetRuntimeVersion_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php deleted file mode 100644 index 050e231be850..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_accelerator_types.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $tpuClient->listAcceleratorTypes($request); - - /** @var AcceleratorType $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - - list_accelerator_types_sample($formattedParent); -} -// [END tpu_v2_generated_Tpu_ListAcceleratorTypes_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_locations.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_locations.php deleted file mode 100644 index 33ac01cf10e0..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/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 tpu_v2_generated_Tpu_ListLocations_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php deleted file mode 100644 index 1aa01332f81e..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_nodes.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $tpuClient->listNodes($request); - - /** @var Node $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - - list_nodes_sample($formattedParent); -} -// [END tpu_v2_generated_Tpu_ListNodes_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php deleted file mode 100644 index 334e1b0a7fe0..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/list_runtime_versions.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $tpuClient->listRuntimeVersions($request); - - /** @var RuntimeVersion $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 = TpuClient::locationName('[PROJECT]', '[LOCATION]'); - - list_runtime_versions_sample($formattedParent); -} -// [END tpu_v2_generated_Tpu_ListRuntimeVersions_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php deleted file mode 100644 index 391c83536ebc..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/start_node.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $tpuClient->startNode($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - start_node_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_StartNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php deleted file mode 100644 index 089b68929429..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/stop_node.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $tpuClient->stopNode($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 = TpuClient::nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - - stop_node_sample($formattedName); -} -// [END tpu_v2_generated_Tpu_StopNode_sync] diff --git a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php b/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php deleted file mode 100644 index 7509f0a2ee48..000000000000 --- a/owl-bot-staging/Tpu/v2/samples/V2/TpuClient/update_node.php +++ /dev/null @@ -1,87 +0,0 @@ -setRuntimeVersion($nodeRuntimeVersion); - $request = (new UpdateNodeRequest()) - ->setUpdateMask($updateMask) - ->setNode($node); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $tpuClient->updateNode($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Node $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 -{ - $nodeRuntimeVersion = '[RUNTIME_VERSION]'; - - update_node_sample($nodeRuntimeVersion); -} -// [END tpu_v2_generated_Tpu_UpdateNode_sync] diff --git a/owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php b/owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php deleted file mode 100644 index 3cac383a4256..000000000000 --- a/owl-bot-staging/Tpu/v2/src/V2/Client/TpuClient.php +++ /dev/null @@ -1,751 +0,0 @@ - createNodeAsync(CreateNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNodeAsync(DeleteNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateServiceIdentityAsync(GenerateServiceIdentityRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAcceleratorTypeAsync(GetAcceleratorTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGuestAttributesAsync(GetGuestAttributesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRuntimeVersionAsync(GetRuntimeVersionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAcceleratorTypesAsync(ListAcceleratorTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRuntimeVersionsAsync(ListRuntimeVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startNodeAsync(StartNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopNodeAsync(StopNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNodeAsync(UpdateNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class TpuClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.tpu.v2.Tpu'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'tpu.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'tpu.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/tpu_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/tpu_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/tpu_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/tpu_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 - * accelerator_type resource. - * - * @param string $project - * @param string $location - * @param string $acceleratorType - * - * @return string The formatted accelerator_type resource. - */ - public static function acceleratorTypeName(string $project, string $location, string $acceleratorType): string - { - return self::getPathTemplate('acceleratorType')->render([ - 'project' => $project, - 'location' => $location, - 'accelerator_type' => $acceleratorType, - ]); - } - - /** - * 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 node - * resource. - * - * @param string $project - * @param string $location - * @param string $node - * - * @return string The formatted node resource. - */ - public static function nodeName(string $project, string $location, string $node): string - { - return self::getPathTemplate('node')->render([ - 'project' => $project, - 'location' => $location, - 'node' => $node, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * runtime_version resource. - * - * @param string $project - * @param string $location - * @param string $runtimeVersion - * - * @return string The formatted runtime_version resource. - */ - public static function runtimeVersionName(string $project, string $location, string $runtimeVersion): string - { - return self::getPathTemplate('runtimeVersion')->render([ - 'project' => $project, - 'location' => $location, - 'runtime_version' => $runtimeVersion, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - acceleratorType: projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type} - * - location: projects/{project}/locations/{location} - * - node: projects/{project}/locations/{location}/nodes/{node} - * - runtimeVersion: projects/{project}/locations/{location}/runtimeVersions/{runtime_version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'tpu.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a node. - * - * The async variant is {@see TpuClient::createNodeAsync()} . - * - * @example samples/V2/TpuClient/create_node.php - * - * @param CreateNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createNode(CreateNodeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateNode', $request, $callOptions)->wait(); - } - - /** - * Deletes a node. - * - * The async variant is {@see TpuClient::deleteNodeAsync()} . - * - * @example samples/V2/TpuClient/delete_node.php - * - * @param DeleteNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteNode(DeleteNodeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteNode', $request, $callOptions)->wait(); - } - - /** - * Generates the Cloud TPU service identity for the project. - * - * The async variant is {@see TpuClient::generateServiceIdentityAsync()} . - * - * @example samples/V2/TpuClient/generate_service_identity.php - * - * @param GenerateServiceIdentityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateServiceIdentityResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateServiceIdentity(GenerateServiceIdentityRequest $request, array $callOptions = []): GenerateServiceIdentityResponse - { - return $this->startApiCall('GenerateServiceIdentity', $request, $callOptions)->wait(); - } - - /** - * Gets AcceleratorType. - * - * The async variant is {@see TpuClient::getAcceleratorTypeAsync()} . - * - * @example samples/V2/TpuClient/get_accelerator_type.php - * - * @param GetAcceleratorTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AcceleratorType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAcceleratorType(GetAcceleratorTypeRequest $request, array $callOptions = []): AcceleratorType - { - return $this->startApiCall('GetAcceleratorType', $request, $callOptions)->wait(); - } - - /** - * Retrieves the guest attributes for the node. - * - * The async variant is {@see TpuClient::getGuestAttributesAsync()} . - * - * @example samples/V2/TpuClient/get_guest_attributes.php - * - * @param GetGuestAttributesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GetGuestAttributesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGuestAttributes(GetGuestAttributesRequest $request, array $callOptions = []): GetGuestAttributesResponse - { - return $this->startApiCall('GetGuestAttributes', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a node. - * - * The async variant is {@see TpuClient::getNodeAsync()} . - * - * @example samples/V2/TpuClient/get_node.php - * - * @param GetNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Node - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNode(GetNodeRequest $request, array $callOptions = []): Node - { - return $this->startApiCall('GetNode', $request, $callOptions)->wait(); - } - - /** - * Gets a runtime version. - * - * The async variant is {@see TpuClient::getRuntimeVersionAsync()} . - * - * @example samples/V2/TpuClient/get_runtime_version.php - * - * @param GetRuntimeVersionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RuntimeVersion - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRuntimeVersion(GetRuntimeVersionRequest $request, array $callOptions = []): RuntimeVersion - { - return $this->startApiCall('GetRuntimeVersion', $request, $callOptions)->wait(); - } - - /** - * Lists accelerator types supported by this API. - * - * The async variant is {@see TpuClient::listAcceleratorTypesAsync()} . - * - * @example samples/V2/TpuClient/list_accelerator_types.php - * - * @param ListAcceleratorTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAcceleratorTypes(ListAcceleratorTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAcceleratorTypes', $request, $callOptions); - } - - /** - * Lists nodes. - * - * The async variant is {@see TpuClient::listNodesAsync()} . - * - * @example samples/V2/TpuClient/list_nodes.php - * - * @param ListNodesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNodes(ListNodesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNodes', $request, $callOptions); - } - - /** - * Lists runtime versions supported by this API. - * - * The async variant is {@see TpuClient::listRuntimeVersionsAsync()} . - * - * @example samples/V2/TpuClient/list_runtime_versions.php - * - * @param ListRuntimeVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listRuntimeVersions(ListRuntimeVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRuntimeVersions', $request, $callOptions); - } - - /** - * Starts a node. - * - * The async variant is {@see TpuClient::startNodeAsync()} . - * - * @example samples/V2/TpuClient/start_node.php - * - * @param StartNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startNode(StartNodeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartNode', $request, $callOptions)->wait(); - } - - /** - * Stops a node. This operation is only available with single TPU nodes. - * - * The async variant is {@see TpuClient::stopNodeAsync()} . - * - * @example samples/V2/TpuClient/stop_node.php - * - * @param StopNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 stopNode(StopNodeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopNode', $request, $callOptions)->wait(); - } - - /** - * Updates the configurations of a node. - * - * The async variant is {@see TpuClient::updateNodeAsync()} . - * - * @example samples/V2/TpuClient/update_node.php - * - * @param UpdateNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateNode(UpdateNodeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateNode', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see TpuClient::getLocationAsync()} . - * - * @example samples/V2/TpuClient/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 TpuClient::listLocationsAsync()} . - * - * @example samples/V2/TpuClient/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/Tpu/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Tpu/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 578c9042f1cc..000000000000 --- a/owl-bot-staging/Tpu/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.tpu.v2", - "libraryPackage": "Google\\Cloud\\Tpu\\V2", - "services": { - "Tpu": { - "clients": { - "grpc": { - "libraryClient": "TpuGapicClient", - "rpcs": { - "CreateNode": { - "methods": [ - "createNode" - ] - }, - "DeleteNode": { - "methods": [ - "deleteNode" - ] - }, - "GenerateServiceIdentity": { - "methods": [ - "generateServiceIdentity" - ] - }, - "GetAcceleratorType": { - "methods": [ - "getAcceleratorType" - ] - }, - "GetGuestAttributes": { - "methods": [ - "getGuestAttributes" - ] - }, - "GetNode": { - "methods": [ - "getNode" - ] - }, - "GetRuntimeVersion": { - "methods": [ - "getRuntimeVersion" - ] - }, - "ListAcceleratorTypes": { - "methods": [ - "listAcceleratorTypes" - ] - }, - "ListNodes": { - "methods": [ - "listNodes" - ] - }, - "ListRuntimeVersions": { - "methods": [ - "listRuntimeVersions" - ] - }, - "StartNode": { - "methods": [ - "startNode" - ] - }, - "StopNode": { - "methods": [ - "stopNode" - ] - }, - "UpdateNode": { - "methods": [ - "updateNode" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json deleted file mode 100644 index 322cbc5f3768..000000000000 --- a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_client_config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "interfaces": { - "google.cloud.tpu.v2.Tpu": { - "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": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateNode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteNode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateServiceIdentity": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAcceleratorType": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGuestAttributes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetNode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetRuntimeVersion": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAcceleratorTypes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListNodes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListRuntimeVersions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartNode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopNode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateNode": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php deleted file mode 100644 index 0ff6e23ea756..000000000000 --- a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_descriptor_config.php +++ /dev/null @@ -1,284 +0,0 @@ - [ - 'google.cloud.tpu.v2.Tpu' => [ - 'CreateNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StartNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateNode' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Tpu\V2\Node', - 'metadataReturnType' => '\Google\Cloud\Tpu\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'node.name', - 'fieldAccessors' => [ - 'getNode', - 'getName', - ], - ], - ], - ], - 'GenerateServiceIdentity' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\GenerateServiceIdentityResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetAcceleratorType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\AcceleratorType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGuestAttributes' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\GetGuestAttributesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNode' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\Node', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRuntimeVersion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\RuntimeVersion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAcceleratorTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAcceleratorTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\ListAcceleratorTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNodes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\ListNodesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuntimeVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRuntimeVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Tpu\V2\ListRuntimeVersionsResponse', - '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' => [ - 'acceleratorType' => 'projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}', - 'location' => 'projects/{project}/locations/{location}', - 'node' => 'projects/{project}/locations/{location}/nodes/{node}', - 'runtimeVersion' => 'projects/{project}/locations/{location}/runtimeVersions/{runtime_version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php b/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php deleted file mode 100644 index ce0a034d715e..000000000000 --- a/owl-bot-staging/Tpu/v2/src/V2/resources/tpu_rest_client_config.php +++ /dev/null @@ -1,252 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.tpu.v2.Tpu' => [ - 'CreateNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nodes', - 'body' => 'node', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteNode' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateServiceIdentity' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}:generateServiceIdentity', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetAcceleratorType' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/acceleratorTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGuestAttributes' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}:getGuestAttributes', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNode' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRuntimeVersion' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/runtimeVersions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAcceleratorTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/acceleratorTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodes' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/nodes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRuntimeVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/runtimeVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopNode' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/nodes/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateNode' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{node.name=projects/*/locations/*/nodes/*}', - 'body' => 'node', - 'placeholders' => [ - 'node.name' => [ - 'getters' => [ - 'getNode', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.php b/owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.php deleted file mode 100644 index cfa3f69120e0..000000000000 --- a/owl-bot-staging/Tpu/v2/tests/Unit/V2/Client/TpuClientTest.php +++ /dev/null @@ -1,1552 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TpuClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TpuClient($options); - } - - /** @test */ - public function createNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $healthDescription = 'healthDescription-1057342823'; - $runtimeVersion = 'runtimeVersion1819622257'; - $cidrBlock = 'cidrBlock313022466'; - $id = 3355; - $queuedResource = 'queuedResource-1642799782'; - $multisliceNode = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setRuntimeVersion($runtimeVersion); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setId($id); - $expectedResponse->setQueuedResource($queuedResource); - $expectedResponse->setMultisliceNode($multisliceNode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $node = new Node(); - $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; - $node->setRuntimeVersion($nodeRuntimeVersion); - $request = (new CreateNodeRequest()) - ->setParent($formattedParent) - ->setNode($node); - $response = $gapicClient->createNode($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.tpu.v2.Tpu/CreateNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNode(); - $this->assertProtobufEquals($node, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeTest'); - $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 createNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeTest'); - $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]'); - $node = new Node(); - $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; - $node->setRuntimeVersion($nodeRuntimeVersion); - $request = (new CreateNodeRequest()) - ->setParent($formattedParent) - ->setNode($node); - $response = $gapicClient->createNode($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeTest'); - 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 deleteNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new DeleteNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNode($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.tpu.v2.Tpu/DeleteNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); - $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 deleteNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNodeTest'); - $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new DeleteNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNode($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNodeTest'); - 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 generateServiceIdentityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateServiceIdentityResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new GenerateServiceIdentityRequest()) - ->setParent($formattedParent); - $response = $gapicClient->generateServiceIdentity($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.tpu.v2.Tpu/GenerateServiceIdentity', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateServiceIdentityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 GenerateServiceIdentityRequest()) - ->setParent($formattedParent); - try { - $gapicClient->generateServiceIdentity($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAcceleratorTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $expectedResponse = new AcceleratorType(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - $request = (new GetAcceleratorTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getAcceleratorType($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.tpu.v2.Tpu/GetAcceleratorType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAcceleratorTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->acceleratorTypeName('[PROJECT]', '[LOCATION]', '[ACCELERATOR_TYPE]'); - $request = (new GetAcceleratorTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getAcceleratorType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGuestAttributesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GetGuestAttributesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new GetGuestAttributesRequest()) - ->setName($formattedName); - $response = $gapicClient->getGuestAttributes($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.tpu.v2.Tpu/GetGuestAttributes', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGuestAttributesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new GetGuestAttributesRequest()) - ->setName($formattedName); - try { - $gapicClient->getGuestAttributes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $healthDescription = 'healthDescription-1057342823'; - $runtimeVersion = 'runtimeVersion1819622257'; - $cidrBlock = 'cidrBlock313022466'; - $id = 3355; - $queuedResource = 'queuedResource-1642799782'; - $multisliceNode = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setRuntimeVersion($runtimeVersion); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setId($id); - $expectedResponse->setQueuedResource($queuedResource); - $expectedResponse->setMultisliceNode($multisliceNode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new GetNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->getNode($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.tpu.v2.Tpu/GetNode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new GetNodeRequest()) - ->setName($formattedName); - try { - $gapicClient->getNode($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRuntimeVersionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $version = 'version351608024'; - $expectedResponse = new RuntimeVersion(); - $expectedResponse->setName($name2); - $expectedResponse->setVersion($version); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->runtimeVersionName('[PROJECT]', '[LOCATION]', '[RUNTIME_VERSION]'); - $request = (new GetRuntimeVersionRequest()) - ->setName($formattedName); - $response = $gapicClient->getRuntimeVersion($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.tpu.v2.Tpu/GetRuntimeVersion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRuntimeVersionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->runtimeVersionName('[PROJECT]', '[LOCATION]', '[RUNTIME_VERSION]'); - $request = (new GetRuntimeVersionRequest()) - ->setName($formattedName); - try { - $gapicClient->getRuntimeVersion($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAcceleratorTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $acceleratorTypesElement = new AcceleratorType(); - $acceleratorTypes = [ - $acceleratorTypesElement, - ]; - $expectedResponse = new ListAcceleratorTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAcceleratorTypes($acceleratorTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAcceleratorTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAcceleratorTypes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAcceleratorTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v2.Tpu/ListAcceleratorTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAcceleratorTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListAcceleratorTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAcceleratorTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nodesElement = new Node(); - $nodes = [ - $nodesElement, - ]; - $expectedResponse = new ListNodesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNodes($nodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNodesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNodes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNodes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v2.Tpu/ListNodes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNodesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNodes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuntimeVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $runtimeVersionsElement = new RuntimeVersion(); - $runtimeVersions = [ - $runtimeVersionsElement, - ]; - $expectedResponse = new ListRuntimeVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRuntimeVersions($runtimeVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRuntimeVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRuntimeVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRuntimeVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.tpu.v2.Tpu/ListRuntimeVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuntimeVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListRuntimeVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRuntimeVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $healthDescription = 'healthDescription-1057342823'; - $runtimeVersion = 'runtimeVersion1819622257'; - $cidrBlock = 'cidrBlock313022466'; - $id = 3355; - $queuedResource = 'queuedResource-1642799782'; - $multisliceNode = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setRuntimeVersion($runtimeVersion); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setId($id); - $expectedResponse->setQueuedResource($queuedResource); - $expectedResponse->setMultisliceNode($multisliceNode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new StartNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->startNode($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.tpu.v2.Tpu/StartNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startNodeTest'); - $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 startNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startNodeTest'); - $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new StartNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->startNode($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startNodeTest'); - 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 stopNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $healthDescription = 'healthDescription-1057342823'; - $runtimeVersion = 'runtimeVersion1819622257'; - $cidrBlock = 'cidrBlock313022466'; - $id = 3355; - $queuedResource = 'queuedResource-1642799782'; - $multisliceNode = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setRuntimeVersion($runtimeVersion); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setId($id); - $expectedResponse->setQueuedResource($queuedResource); - $expectedResponse->setMultisliceNode($multisliceNode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new StopNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->stopNode($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.tpu.v2.Tpu/StopNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopNodeTest'); - $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 stopNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopNodeTest'); - $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->nodeName('[PROJECT]', '[LOCATION]', '[NODE]'); - $request = (new StopNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->stopNode($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopNodeTest'); - 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 updateNodeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $healthDescription = 'healthDescription-1057342823'; - $runtimeVersion = 'runtimeVersion1819622257'; - $cidrBlock = 'cidrBlock313022466'; - $id = 3355; - $queuedResource = 'queuedResource-1642799782'; - $multisliceNode = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setRuntimeVersion($runtimeVersion); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setId($id); - $expectedResponse->setQueuedResource($queuedResource); - $expectedResponse->setMultisliceNode($multisliceNode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $node = new Node(); - $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; - $node->setRuntimeVersion($nodeRuntimeVersion); - $request = (new UpdateNodeRequest()) - ->setUpdateMask($updateMask) - ->setNode($node); - $response = $gapicClient->updateNode($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.tpu.v2.Tpu/UpdateNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getNode(); - $this->assertProtobufEquals($node, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNodeTest'); - $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 updateNodeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNodeTest'); - $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(); - $node = new Node(); - $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; - $node->setRuntimeVersion($nodeRuntimeVersion); - $request = (new UpdateNodeRequest()) - ->setUpdateMask($updateMask) - ->setNode($node); - $response = $gapicClient->updateNode($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNodeTest'); - 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 createNodeAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNodeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $acceleratorType = 'acceleratorType1748643982'; - $healthDescription = 'healthDescription-1057342823'; - $runtimeVersion = 'runtimeVersion1819622257'; - $cidrBlock = 'cidrBlock313022466'; - $id = 3355; - $queuedResource = 'queuedResource-1642799782'; - $multisliceNode = true; - $expectedResponse = new Node(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAcceleratorType($acceleratorType); - $expectedResponse->setHealthDescription($healthDescription); - $expectedResponse->setRuntimeVersion($runtimeVersion); - $expectedResponse->setCidrBlock($cidrBlock); - $expectedResponse->setId($id); - $expectedResponse->setQueuedResource($queuedResource); - $expectedResponse->setMultisliceNode($multisliceNode); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNodeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $node = new Node(); - $nodeRuntimeVersion = 'nodeRuntimeVersion-385109886'; - $node->setRuntimeVersion($nodeRuntimeVersion); - $request = (new CreateNodeRequest()) - ->setParent($formattedParent) - ->setNode($node); - $response = $gapicClient->createNodeAsync($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.tpu.v2.Tpu/CreateNode', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNode(); - $this->assertProtobufEquals($node, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNodeTest'); - $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/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 24aa0ed04f30b1d54422dfae6fc086c09993a7ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4514 zcmbVQTT|Oc6vj3t<`^h!AaR_VLemM%By#Jdos7uMH^2iJ4|d43;~9-CEubPKjU>~d z8Gb-t`r1DA2Xv-?q<^6g>2vzjr@r>=t|aV0g26AgclVqtCr-j2}f&Y-XRsdT&puUSU(n_8qw~2Bv12KcXkkr5(-kDN3GRyVJAv zz;tYh32fRrU09TaPPX>GiyokSWKxp_0|U{i+X3}#%|au6-80?5@tU|)QFdt%hmegd zEQZ@Mb>@z=AZ%2WQ${|Q0 z;FbIakR0uE zcAjJwF1Zv-kr$9fTlIaF^HVOvl`Nj8gh_B7A{EFoFI9SoLG^Rv!yCc;uW>2z6w;Py z@B29zZhPj#IujtB2QVfek;`&f5}A%*ky{)rEWQa+g_}M?M8){))b~}*SNo8Vo8Z!? zvs6Yd+t#ce6Sx#-Pk<2b>{m5+;kvQ-%8pxZZXBR7RYQ^kjo z(5JG+QnrRN+=Bc+34p%*y@AOX1L}e1VhN-Wxvz#%e4^$A5gVFYvjgvlNRTr;2N}vx z;|+XOc+3hao$ta-tRWW5LTaBLi9#gLAbrSU$15;fd~}Xcu{ItwCHXXwe>V!_F;K_? zj54rs?b+h#WU-Zqh69&0urzGjVdtV_huc3rXM0{6@n&)gz_US*z5S>$U3i2+80HQERlP6J!E1TeV89zK!F_@|6&p`Cl;!angNK z0$>mmd=?hddAJ<}4!H+6;>wA$J5W00KHQ3y48ST{#T-xP|4YCqqd77S8BWjaFyluY z`Rs$!jVy%;Vv_`s%ooQYG6*T z0cn=DFh2w1$$X~+X+iMcz^H|GhM8Cx26#MVH{og&VJ061mNVD8KbV% z8`Tf6gNUg&+O@4lX&r3^7;DwGwrg9{N%p(4UT3&UF&6B60i=cO)Iz>aNwf0+vt%%e~y3Sdw3_o9|AmH#ajZp;^x6_|{!HKL2V zWEe;jt~s8$YvM&m9n>i3^um21wn^hV*n$hQSO71>>{lU+SVkqigD&-Qoc_ohOyVuI zcVI`utlvx#1=l*7p&mF!&!RceQGRhw4mS8=MAMYG5vhlGKVfH)=q)eocHV_-e=;kO z=9mbp`N=uva8cf7_CbQ&g4w9D1;F~75>^~zp&PGYEcE`eI4DD=+hg5ccvxK`Y4fjO z=F~NTOh%27U~_Z{@4)OTf#)AP`ubfe|B--uNEV+CRvCDpn(U(9OnfIEA0iP(HM@== zl>(Aa^c>-Kmv~vZ-QSaQEBy6A=8q0|v%yCOdAs;$G~N-f5uFa7>EMIJ`(#dtC<>QR q6h5UW+r{n}Z-O5`h;N(^#U;P*O#rJJ-z?5}58x}st^F8|0saTZv8rSM 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 721cc99ca708..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php +++ /dev/null @@ -1,42 +0,0 @@ -internalAddGeneratedFile( - ' -÷ -+google/devtools/cloudtrace/v2/tracing.protogoogle.devtools.cloudtrace.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/devtools/cloudtrace/v2/trace.protogoogle/protobuf/empty.proto"” -BatchWriteSpansRequestA -name ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project7 -spans ( 2#.google.devtools.cloudtrace.v2.SpanBàA2º - TraceService¡ -BatchWriteSpans5.google.devtools.cloudtrace.v2.BatchWriteSpansRequest.google.protobuf.Empty"?ÚA -name,spans‚Óä“,"\'/v2/{name=projects/*}/traces:batchWrite:*‰ - -CreateSpan#.google.devtools.cloudtrace.v2.Span#.google.devtools.cloudtrace.v2.Span"1‚Óä“+"&/v2/{name=projects/*/traces/*/spans/*}:*zÊAcloudtrace.googleapis.comÒA[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.appendB¯ -!com.google.devtools.cloudtrace.v2B TracingProtoPZ/cloud.google.com/go/trace/apiv2/tracepb;tracepbªGoogle.Cloud.Trace.V2ÊGoogle\\Cloud\\Trace\\V2êGoogle::Cloud::Trace::V2bproto3' - , 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 21c9a6c262c5..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 dc1949df1342..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 array<\Google\Cloud\Trace\V2\Span>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField - */ - 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 array<\Google\Cloud\Trace\V2\Span>|\Google\Protobuf\Internal\RepeatedField $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 030ebe5ab66f..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 b329573dbc89..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 35cf07c116ed..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php +++ /dev/null @@ -1,132 +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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Attributes::class, \Google\Cloud\Trace\V2\Span_Attributes::class); - 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 240cefeafd90..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php +++ /dev/null @@ -1,189 +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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Link::class, \Google\Cloud\Trace\V2\Span_Link::class); - 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 ef405db278e4..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php +++ /dev/null @@ -1,65 +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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Trace\V2\Span_Link_Type::class); - 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 4a02c6c17837..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php +++ /dev/null @@ -1,109 +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 array<\Google\Cloud\Trace\V2\Span\Link>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getLink() - { - return $this->link; - } - - /** - * A collection of links. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; - * @param array<\Google\Cloud\Trace\V2\Span\Link>|\Google\Protobuf\Internal\RepeatedField $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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Links::class, \Google\Cloud\Trace\V2\Span_Links::class); - 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 48d69c458c90..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php +++ /dev/null @@ -1,95 +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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpanKind::class, \Google\Cloud\Trace\V2\Span_SpanKind::class); - 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 56f7b30850fd..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php +++ /dev/null @@ -1,155 +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"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeEvent::class, \Google\Cloud\Trace\V2\Span_TimeEvent::class); - 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 20002e12795f..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php +++ /dev/null @@ -1,132 +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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Annotation::class, \Google\Cloud\Trace\V2\Span_TimeEvent_Annotation::class); - 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 598e46a3e82f..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php +++ /dev/null @@ -1,188 +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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MessageEvent::class, \Google\Cloud\Trace\V2\Span_TimeEvent_MessageEvent::class); - 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 0bac6fac8603..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php +++ /dev/null @@ -1,64 +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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Trace\V2\Span_TimeEvent_MessageEvent_Type::class); - 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 d51a25429d7c..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php +++ /dev/null @@ -1,148 +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 array<\Google\Cloud\Trace\V2\Span\TimeEvent>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField - */ - 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 array<\Google\Cloud\Trace\V2\Span\TimeEvent>|\Google\Protobuf\Internal\RepeatedField $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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeEvents::class, \Google\Cloud\Trace\V2\Span_TimeEvents::class); - 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 63ee036a72e7..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 38450d2d46d7..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php +++ /dev/null @@ -1,348 +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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StackFrame::class, \Google\Cloud\Trace\V2\StackTrace_StackFrame::class); - 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 41cff97de5f5..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php +++ /dev/null @@ -1,112 +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 array<\Google\Cloud\Trace\V2\StackTrace\StackFrame>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField - */ - 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 array<\Google\Cloud\Trace\V2\StackTrace\StackFrame>|\Google\Protobuf\Internal\RepeatedField $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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StackFrames::class, \Google\Cloud\Trace\V2\StackTrace_StackFrames::class); - 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 fdc645b9b14a..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 8366ec42c7d9..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 7cc936cd2be1..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 37eab10f1575..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php +++ /dev/null @@ -1,288 +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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * 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/TraceServiceGapicClient.php b/owl-bot-staging/Trace/v2/src/V2/Gapic/TraceServiceGapicClient.php deleted file mode 100644 index 21fed4d2ee48..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/Gapic/TraceServiceGapicClient.php +++ /dev/null @@ -1,477 +0,0 @@ -projectName('[PROJECT]'); - * $spans = []; - * $traceServiceClient->batchWriteSpans($formattedName, $spans); - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Trace\V2\Client\TraceServiceClient}. - */ -class TraceServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.devtools.cloudtrace.v2.TraceService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - 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. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/trace.append', - ]; - - private static $projectNameTemplate; - - private static $spanNameTemplate; - - private static $pathTemplateMap; - - 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', - ], - ], - ]; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getSpanNameTemplate() - { - if (self::$spanNameTemplate == null) { - self::$spanNameTemplate = new PathTemplate('projects/{project}/traces/{trace}/spans/{span}'); - } - - return self::$spanNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'project' => self::getProjectNameTemplate(), - 'span' => self::getSpanNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * 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($project, $trace, $span) - { - return self::getSpanNameTemplate()->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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtrace.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Batch writes new spans to new or existing traces. You cannot update - * existing spans. - * - * Sample code: - * ``` - * $traceServiceClient = new TraceServiceClient(); - * try { - * $formattedName = $traceServiceClient->projectName('[PROJECT]'); - * $spans = []; - * $traceServiceClient->batchWriteSpans($formattedName, $spans); - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the project where the spans belong. The format is - * `projects/[PROJECT_ID]`. - * @param Span[] $spans Required. A list of new spans. The span names must not match existing - * spans, otherwise the results are undefined. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function batchWriteSpans($name, $spans, array $optionalArgs = []) - { - $request = new BatchWriteSpansRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setSpans($spans); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchWriteSpans', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new span. - * - * Sample code: - * ``` - * $traceServiceClient = new TraceServiceClient(); - * try { - * $name = 'name'; - * $spanId = 'span_id'; - * $displayName = new TruncatableString(); - * $startTime = new Timestamp(); - * $endTime = new Timestamp(); - * $response = $traceServiceClient->createSpan($name, $spanId, $displayName, $startTime, $endTime); - * } finally { - * $traceServiceClient->close(); - * } - * ``` - * - * @param 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. - * . - * @param string $spanId Required. The `[SPAN_ID]` portion of the span's resource name. - * @param TruncatableString $displayName 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. - * @param Timestamp $startTime 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. - * @param Timestamp $endTime 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. - * @param array $optionalArgs { - * Optional. - * - * @type string $parentSpanId - * The `[SPAN_ID]` of this span's parent span. If this is a root span, - * then this field must be empty. - * @type Attributes $attributes - * A set of attributes on the span. You can have up to 32 attributes per - * span. - * @type StackTrace $stackTrace - * Stack trace captured at the start of the span. - * @type TimeEvents $timeEvents - * A set of time events. You can have up to 32 annotations and 128 message - * events per span. - * @type Links $links - * Links associated with the span. You can have up to 128 links per Span. - * @type Status $status - * Optional. The final status for this span. - * @type BoolValue $sameProcessAsParentSpan - * 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 Int32Value $childSpanCount - * 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 $spanKind - * 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. - * For allowed values, use constants defined on {@see \Google\Cloud\Trace\V2\Span\SpanKind} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Trace\V2\Span - * - * @throws ApiException if the remote call fails - */ - public function createSpan($name, $spanId, $displayName, $startTime, $endTime, array $optionalArgs = []) - { - $request = new Span(); - $requestParamHeaders = []; - $request->setName($name); - $request->setSpanId($spanId); - $request->setDisplayName($displayName); - $request->setStartTime($startTime); - $request->setEndTime($endTime); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['parentSpanId'])) { - $request->setParentSpanId($optionalArgs['parentSpanId']); - } - - if (isset($optionalArgs['attributes'])) { - $request->setAttributes($optionalArgs['attributes']); - } - - if (isset($optionalArgs['stackTrace'])) { - $request->setStackTrace($optionalArgs['stackTrace']); - } - - if (isset($optionalArgs['timeEvents'])) { - $request->setTimeEvents($optionalArgs['timeEvents']); - } - - if (isset($optionalArgs['links'])) { - $request->setLinks($optionalArgs['links']); - } - - if (isset($optionalArgs['status'])) { - $request->setStatus($optionalArgs['status']); - } - - if (isset($optionalArgs['sameProcessAsParentSpan'])) { - $request->setSameProcessAsParentSpan($optionalArgs['sameProcessAsParentSpan']); - } - - if (isset($optionalArgs['childSpanCount'])) { - $request->setChildSpanCount($optionalArgs['childSpanCount']); - } - - if (isset($optionalArgs['spanKind'])) { - $request->setSpanKind($optionalArgs['spanKind']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSpan', Span::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Trace/v2/src/V2/TraceServiceClient.php b/owl-bot-staging/Trace/v2/src/V2/TraceServiceClient.php deleted file mode 100644 index 462d412571cb..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/TraceServiceClient.php +++ /dev/null @@ -1,34 +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 6fe09272fd07..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 8ec56307a4bc..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/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php b/owl-bot-staging/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php deleted file mode 100644 index e7898694140e..000000000000 --- a/owl-bot-staging/Trace/v2/tests/Unit/V2/TraceServiceClientTest.php +++ /dev/null @@ -1,205 +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 = []; - $gapicClient->batchWriteSpans($formattedName, $spans); - $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 = []; - try { - $gapicClient->batchWriteSpans($formattedName, $spans); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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(); - $response = $gapicClient->createSpan($name, $spanId, $displayName, $startTime, $endTime); - $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(); - try { - $gapicClient->createSpan($name, $spanId, $displayName, $startTime, $endTime); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AdaptiveMt.php b/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AdaptiveMt.php deleted file mode 100644 index 3519bbd86b75191729b2398fce72d1ec5f870c65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5617 zcmcIo-EY%Y6vqja_7o^Jbfjqk6WC}eBvQLQ%w5Nlc7$$pEl?qCi)1;@O)zt8&%WvS zP~MTYmr48q+tZ{?`$M)Dq&-ZN_QErN!L*m{+-qOw!%k^R=}RNud%n;4opa9z*WLRr zTvW=$CZ0}7O{qRo=zXHNo4bujwu|cZk-cdCnKW)|AtTNLslCUo`8aXZmVjUhT>D5;=fC#ubH+$sp1@Bn;x7sp283tUAr6WA9yX5nwdDaAO+vv4|ywPxvdqop^9W;ivHNsCjedzi_6 zr-%9J6dWfHF-{hvY1uS$1V0~<--U6*BUtMiGc7ZQAIBH7p@M;tXm>seb1D6zm}XQh z7pp#`f;~~Gt(Qe_C@-v`-yaZz`h_RquXe$53`7gZ#&6@^N)WPn9b`b<P!{=|on9Gvi z$3DS5eS~>VlFtC}@6`E<*g;hU2d7}9Zd!=_8D0$hWA1y*i$N;-E@l{!Z^P+?;QE*) z>HS4FjWs-BlZRC6Qj`~WpwqXbknKbz>Y@kWvsF0SotyiGrK5&}SdN8~Mi-1RrBm`Z zFzpeXGYIx!&BsIj125LiMrMQ;!sZ?eq2J>C9l`i+$aj^qy?N-VB*`XBG%UyWb?*^^ z8W(qzi@UL3apjO*Ace=|ri7xh>o65lWlJ|b%(;mWlZE90hOmPWj-vw}=;Ppn3zZcb-9Au_xEltwx~LH*wmRMj zv(F?r(Hls48Ae5>^h5l>t}Ix{85lPkw&P*v#E!xNXOyRgya4Ag?X< zY`toc8poU9a%mQ_T7oxX8iQWGkM$((x+rs80L+!=@nVWg%p`Jq*;JLmqEU?xsS za8L|TZ3B)8YSu_YG+P`ph)Bwuke0J>ymuUl@GOl0Iu#k!Bl9pv(0$0vJxjxhj&*E` zlvjG@tpab}^H8}gBlBP5=5T0X^AgLg*u2Er$?)?M8@*mlrT!wlEdC@7 zVaJyTF)wuuQ_MLyNnz_G?JE;{^nByr7fIMBb2LDV5Wa4I!ONi zVacpFUB~MhSi1R_`Ub@P%=GIpSx1-P8`o`7Eod6yoOpHD+GC2WGorivwSM!ET!xbk zgT0o!II;X3UtHLgQ`zu)7?nn0Bv2&x0A`aN5Q4@ha8kq@R{T=ibeyG4F8*Z{Vn4e&pFHfP)b diff --git a/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AutomlTranslation.php b/owl-bot-staging/Translate/v3/proto/src/GPBMetadata/Google/Cloud/Translate/V3/AutomlTranslation.php deleted file mode 100644 index 674bec987c914bcad7806431600d4cf9f4e47c16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5823 zcmds5PjlN;5Jz#HH0!jPD4|V5X%)BArUO`zbTU+-Fm}?0l%&bDnGOR6k0QS~0$Ea} zr_hq|ffFZg@Flo%LSxr-Bg;YkLDHt9M6tpqs%p`B~%D|VBlYvY|gdl z=u{tK$dkCc43FL$@47Np<$660&0WOwOzKSL+UxMgHJE*VFzc@fnG#QcQWosHb5j?j zLOXQLNcvYK!PK>*ZDG=(6Xm|kavx6}#GXl&r{sq7azhk4CPP;ei-lqWV=K)ti0Be# z*8}o6K?my-FvOBACUjCWw3*>b?)UP5eh)@mKTK%N3H)uhF*$%sg;}#CRCm2wiD^YO zD@<;Yi*a4WUo_AUuj%)pAWUqd?_)HcLkqW_(?W?`W6_)PU^xAu>yS@kyFvKD`JFVq z4A5}mngI1=j^F6Dp7xfVn5%rqsqOujDyLykh!=mwOSPS;C`-2>&s#TL8~KFU7tIPyS6a< zR!=h+IiUvmSP5eM&Ojlfi3hQL+mjQ-`!KOYJVJ@|sLJ(uIK?WhO!OH{^uNnRz&ay~ zv~($wQ(QvMF{OC%nFcR+C_Fi?`T)k32`5CPuH*XYD-Fh1-B_uMmA+dr7}^o>6~*4* zp1%UqUf^&{#|J&XDi`!~FdQO})ne>iI3?s6scQOp0REl^pA(;xnP9nM1136;5Ql*u z6MY^|BULbhR$P0vX9mgGqoGlsJfXFWHC7CUi{EH4vB>%A0LqSWTdQ4+M8)arjH1ji zkanEsHCrG%u*RxMSFEwx(TTP8vD#Q8 z@~E<|_l~1fa5UC_)?i3&8tWi2OoklZrXb34jUrUVmDo#aN7#Rhm+U^n?Y3j7&yXl(AurGZe`;{4VpC^_f4$(R zm1?&!y3&me7{(rvr?1M{&7L{iTVLs*C1q&p6PP?|O+Twz9#J*eZ{b$y=Cr2}?MJts z;>R2eDLNU+Mh~0Mk-8g)p8d4O3lnD+{US`raC)}iNErP&L7fPeW2-W*ovS>e`V^dz zE=HLI88@$RoYM^$$5Q9|way)b?HyO(+%A43V%*4qO+)QXmqDl4RUFuGy1n6MXCpU^ zD}~t}eHr7goQ_i2ZVvjAvh4lxr#--{+;07M@D{(uR#y<~8b-lW`(kpEM3y{Vxz2@mP4&CS%UWJ}rAbkB4O` z+#vFiuzXP|BX+_AOH%>_?u166>rv9|)_$PU9lFvTG&OoqSLi`MLk~_XdjOvAMiHrN z7I*;!e_?#)Gmk{lmH797MGgy?WUkMC#vJy^$n_(N&^K*Iao|bD1EK((z@w!dl5i^9 z2O-Ct_emB{SCs)vFlYsmioo>;2Q=~o3ndp_G_~z9m3i^hPH87~tLWH>l#&>2`;8#? zi4-xN_fCkQG8Vy}j$0AT^3~v)YE?rvIAqix*66u=!ML#P%d9R*-UdCU>D^t6(xv$N zDN7Tt4u^T3hp2>79+`^s5&Q%2@ZBU}ZY6e>mWq{01@FYVsBCVeByPycA`LK+&UOiI zH@&D8gt6>t(V6#PiK$N~7Hr)hMro2-balKUIDi&1o9iGEQGk_D(i9+;oO8rPdD7$+2T#GcPN z+J04lm8Q?5$Q9E@AjQ;NgMuc{1OL!G20)!nA}4g2&;b>9pIHAy2$bU z4YLbN31>v5PNcZI_kSsSR3hU?P#mVu05e}NsN!t?V!&D!Ozz%%3dKZZj*3Coqqw{C zPVNaD|8<6!lMxdoqGH8?(Lw_EMzs$t%T zjjM;flX|_;I6&-zxe52K9v@a)M|ie~Z)@}FS-sk>H;#@Jb>TYd^c>+gYkwGUA8+S+ z)luv^wPG?|bi3~w&-Rkml)XE=*fF1*X?Wc@)^ZVqXM1z&SBCN1!bVfiGfU4itDns? z>$LJ$b~Z?d-Q2XparbiJ(*$bU8f)7**tSnAXSYyDl2;z(-S?|xip&k2w+TW@h0i)O}d+Sotf;oZIVf{yW@{IF1F*fy$J-v^m^vn zzU<80>AiQ7n8-X(6;`cOfp{qJ(iS0v`h-9T38|=+T990+&{70-K?2bSSU#S3sCeRk zzV1Ee&i$G=tae}4nS0Lv{J+ot|2ya2TW_^@+UP=l-e?)N?i%&{=5F5IG4gHOa;=)x z$ZvMGwhTL8vzl$QVc3Oye)e8|`QCbdZgye)6`1N+9lK_f^V^oS-7t!^hSjMTU0ZKC z4Io&2H0Axnv|3fiupgN9|}XR~3}@{X&!@V|?uQ#D(rYw8X2mqEDO`7OQS7(k|b z>{h2$bAeu-Ot{yo8J8~S8BH?wV%q{`+|CQ$R)~H;HyaBr*RWf9V`J8EYPQ*SEqeuq zmdo3Q>uHtza_KT(mXI^I@|PHo<#HF3xAU&uG33?rdE0P1cIzhPn-JLZ{@O^Txs6I) zZ@cCrW63R-eF=SnX~}e4tJ#p$e<*4*ReI%K{>ZfK-j-W6cx0qj_oCI>wmYqs+1lQ?*Cz4Un~jOP)s)|9%a9@H-ha^$bY`zsx2T zXeKI%Oa!VdJenFWMN`zNYggq7G)s-Y8a)TnA~-P1X5(l1IK6Eab>B<*)6>$^8g)hf z;A7H*E#hz0P3~}fz!_ITp>j&4dkq%L7am>6nWcw$XIBC z3-A$wKW~I9?92ve*U%}J5KKsg)M;m|)|R=A&!bVJrEfM2u2k>&SSFvjG^l;)MRZc6 z5@X$X;;tH>?SKp6Q)sYefuFQo2Zr`t8k+9==SmijqM;_NU3GWc##kSapucDEE9fMP zwQ56eZFlr-qgu1-#@LI>5LdS$CkKY~iy>Kj0}Zrw8`c~fq(5GUCI7c_0lm_&YAh5B zOxs{zrvR2OF7gK$qy8o=*cclSFQRbqaHU;?+O1_kWyf;-Qyov@I`liuv#t^7HSGt{o5bW@h-3p6z{#?to zcPX>uS5Qv+4d+nbd&Vxc{tzBP{g3oU#~8~JrIoYSGul@(!j(M2P8$-vf!{>KOloEc z>J_=trBp0J=;L{G%Cm+-sE^8;nvnK~8I%(?B7{$)mjpedUUk8Veesx2Q1M7C)D73D zL5&q~LF%RWoo;s_9)1XS(Y}yDCswVd-h$dkvXbQJEI@j2^oYQW3P374^#tt>8s@xE z3qmX(wK;E!+M@MDiD^HJPO36-2YDNfaC(Y|T#oe+nIr8hS#)ZanrM+{5s{Ak%)rt` z4+`@#gOrPoqa!@KF;}_!LS$xJ^I~#<`stgo;)HU4*r1#qL<20lYPZobwuDg^DuPr! zq9$FE+J_(`BAWE-22|2C!n4{#G#cd4Gv1IO!V-S2bR~tPJ{#I^X3*Jr!(HpN+m;P6 zCiru@ZOAr`9&D(gQ+3m6H}u^=Hx%>l!yZONt)Fo>nR@N>WS{ohj`Z3B7 zC(*EAo-|u5*^=mUn5wGGwsboklz(U2CEY^@wF_uyzUHjaR*yKV*=l#(YR5L22NNA+ zwI<3fkl)#+qWZL?s#^$c*Br4f(O0hYYODslrSHBVdE-@d6dpj^<(e&)Q_iE~R>$R> zRok|)Wj>J^G|=!p`kZrk2XZcOQuj&F(Yey=N$g0g0#73-C(+P82YGkas&$%BOUMcd z#QiYD{h@S$kIVHCOE7-0LiRr?xKO12ndc!j_4??<6;#Pz^rJDcYZ`(p5t=8w!prlL zY-CO6#}^qATGM%zVHU4L=yFQ{5I{VGW~FWF*16KvSUU?oB^y#lhth7;qskqQlO_8@ zuJlGKva(SEN#sK)Bky}V%OKrZDzQ9A*{*AI!57eIt>XYlKmeDj?z*>Z#1?71U;q2&j>v7dKnikZJ(wwnjfB430 zXq=A+godUCFu83*;YD~LB{C!2YiVluF)frq%DM1vUaS2<7M&6Fr9k2Pm-L372Wg|*lmQs4y?GtO+EQW$0Eb%z7iF&>212jN2;6SP& z-PCk!d__u9SR#F;6xIj$IvksQgK6`M54bB7g5gXY&K1|N+2b0Wa5J3f=7Wj6+B!~Gf+R{ z<`h)G>y`Dn>buKpD|0gocNXSmkG%jUIkNih^76v+{ILw+3qxz~&dkis&BC)RG$aFe zDhrG7cOO2A&`f1{W^Qqj41JLd<^P7q{n~dkL4^XC%W#M=VMvPUJA{G)YG9c$Mh$op z4H_-zn$s!m7tjgry1P;u2$Y^|2YHq<{CE4&pr8*s-ix%$U|E-fcK4(Pv8|gn?KEVHT!Gn8a;_sRnnl>!q40)7C6^a;&p_2#GhCnw_=KERxiiM^ ze1c0^tz#$$Wk1FIIshe-wAxQHP9Oe+>g@~+j4?Bt^@e0?f=k8*2%B;y(DDtzG=`Lp zFQa2YjpDNr=qa@!c^bCYu|9HqLZwG^NqR`tK9GE1TPzzNR5sBoUJ~K<_rO%4One&x z|CgX%bBa&-UwcIlf-OE3f9@5xy`87{l>fcEH=UFEYwb4xP@I9v%ryjg(RBEj4)fI> zDui2TP%KB)kSl#Wl`|9TWVK%dmfmf{IcFD3GF=vrJvk{ifJa+G z7!Z@7Ualz->}e&@Y}yJz&l-TAJvWNK4Vqds9l;_L2G7BG0A94o0f7Vk2~`q}&J5tV zi2m+c?-?!mZ~?m0Ewcez9ZfMTjc2 zvJ|b3geGn&<|@!5i%aO$L~~IhfXI!jHhYe=-_M|NNk_YcbQ%*TvQB`do=iwW?&VNc zxXl*OF%i&JgRx0-R<1OWDzK^6NOWf)U549`J|*WH<7zrm6dswAl65kVjw&MT@&wSM z09h!p#?|bkaM-;JOH@5C^FGw9swPCeiHBvE_A6Kt3P}}gI7ME;2Fff_oW^dZA6B*b zC!h*d<(?|8Njpt1J3?<-3t#*rt~KI7YVPv1b_fRwr}z<9#pj`2Q5pBz6;&012w>n& zcZuNjTS}vm953HLg3hUZs6bG~ZWWo}L{aAit3vOH{W-xh?*!2khR%F4HqTR`ge+3A zPYXJ{8iZ0<9~<9_C?vaam7n*}BX;iB3#K9%B#`xLHB!p?40k*d0m~4sZlbY4c5mJ*NSbCHy%7Q1+qck2Iom z9gT)7PDQaou4HVYF~wIU_kV5>g3X~^;aGA!Kx6*@a!B{1EIJ>Rtaw>?0_7NRMXF7L z=?gSV1VWvb>H-3TlU5FavGEN3BK{L2N0cYy{*SCw8>Vwf&#CF}n~f=RyyZI!nvkPAkl z^XJFwHv`q{&~$n@0Z`+dx!tmCxXPzHtW)PFg0G|VaN0_4T6F+a7OfF%FVMS@0ISnR zoeeI1V+LWtBMjk}#qkfbXhi%>4~}sBnXNLGZ>-~KZrTCN!>(SjoTB|Wb5Oa+t{F~- z;cAmqG`RP8P+8!^=rPiyckyvD?5blttzZ4ypZr#KQ+tD4#(&DF`XJkc1g=f&m4!Yj z+vUu}!wK!<;q$u3;{VEcx4f8ELw^-2?tcM5f|aHOf&dMG%DOZ`Rgr1KFj!qq^vP}fS~ z;;34vD>vVW;a}HY4WGDI?i!50443CZ?_c5gGpEowLNCQwy>wlHa^M!&K}Az^BJMsZ zh&0v97XDPYc#2+%{F;<>qwL`%o(P}07cv@uJA;mU=|faFIKJWN8ZR^w-&BN5jm$n2hH8DT#Y<~i#Y70 zBHq-}Shc*_b#s8o*nN;HG=R&3-_YYKRZcM}rL6yu*{{4ERWNy-d_=J-ilBqa68HPm z+k-PHA9y*F%6$N;%(t|18h=rhDWoR~{l^SCs$y~p`B5F5Qh|^6E1Gl$8G$SMn}h&L zc}x^i$S9pPmA%6s{2w5m3Z5m1rw&dj-sizT6!}ytz6YEXf=zb(gCHv8Oz9dGQVb}N zL)wTEKoYeG^?)z!pM$g#iVp35g0$*jA#MC-7o5ZM*INe_{&EJD=PK^eX!!Tx+P-v# zg5$RqX{2B~-BFx&`=CNkz!f%AYa9O^=vamF5_GH%7R)AO*EY?r!KqBuH~=O3?j^}J z!PK8#uJ2^fF-fTuv%#N;&8flRLbe``8nk<|HKy^~GzijiEdoKDTtPJ8AH&sN$wkE@ zd@WX#kQqXn_?Lk~C-RVZM-2%f9oq#`#dc6Y{GTA5nt_?2;-w3jA*AcYR_%kzDZYh? zG(`{Nc4;WBYRq_t5U(6KA;bRz;;OkcjkqB*o<&?}S_1q~IrY*#B~vpMq|VntladS` zSO)(Yxt^|^)Ta?UWQGuXR5-tPV~f6h8i>A$!$;o_GiZc)+bp~$4!3?1x^`u(;5H#Q zes;f-M@IyGetCrd)6a!Rxu?Q44#EdD-8F48O(nsnIOQY!FZ`7ZLXhqFA~^nS5PzT$ z=%P@6Xlcr+YB%LnSip?cxKt?kBx&!Dp|2;oh!b;gd|xjQ6sMYIBMcQkoz{;g>!9Er_gOY*VS?RUbA*2o{wK zR2e3opA7#EGAuO78>_0;aJ&p*Q-lohaBKKX?s>WzO{>~cay=ti#y8hq*$fei_~E}o zoT)KQ?U@i~Av1)y@rnwa$ff-`Ra)VivGElyt@JCC=I^uUw7T?~LB3{D1IVP8eCN#) z(%y>QW?z`7oX9>L6IRKrJp>$A1>p?XIvqa9{x8dm6;C{Z%ZhZ z{eeP%3Dw*e0BL(Ys+_|JLmQ>K9{0^~w37p5m;=;KY1H8d(ibG9v3Ycz-eX1il^w`8`E{A%+Thllu#Q z2G0O@)o{3hQ|z!_dqF(j5bXXXpo^@;rtg#`po`K-!F_^bZtqvlqJBo3BQ*3MzIBFq z$v_W_sRK@F5vNqjVNa1xaLVj;P5gCmI+8{xbtl2;{DDG@cvMv$&rJYbshp7_Pu9YC z#$V0=>TfV!@nmdj6vG6gTI^^ly>>&cTm)xvbu&{XsZF5j&#^*-l1lIgX{6vU!5?<^ zE0a-qieo!;Vc$RergL(F`9&&8#(!nMGUkdKG+b%om7O0{KC|PxZKqr;K7RZ-@URG< z)7oKQ1H1yC&Tz?Pz{zyO#d>gGWBNxKbPhhX6mBj9zUVc5S`@ne^^O(talVzz!#K`XU(cSIXC3|w`68kJiKfE+ zseSQmgMY42`d%S?u<(QISvIv?rgO_>!L3m)-=A7}VI{MY-5j96+0<*^7tkiz7XYOX X29mcp&05IE0_jNh8NWTWhtU5404Myq diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php deleted file mode 100644 index dce6452a2be6..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtDataset.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtDataset - */ -class AdaptiveMtDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 3; - */ - protected $source_language_code = ''; - /** - * The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 4; - */ - protected $target_language_code = ''; - /** - * The number of examples in the dataset. - * - * Generated from protobuf field int32 example_count = 5; - */ - protected $example_count = 0; - /** - * Output only. Timestamp when this dataset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when this dataset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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. The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` - * @type string $display_name - * The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * @type string $source_language_code - * The BCP-47 language code of the source language. - * @type string $target_language_code - * The BCP-47 language code of the target language. - * @type int $example_count - * The number of examples in the dataset. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when this dataset was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when this dataset was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_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 dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_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 name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * 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 BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 3; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 3; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 4; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 4; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - - /** - * The number of examples in the dataset. - * - * Generated from protobuf field int32 example_count = 5; - * @return int - */ - public function getExampleCount() - { - return $this->example_count; - } - - /** - * The number of examples in the dataset. - * - * Generated from protobuf field int32 example_count = 5; - * @param int $var - * @return $this - */ - public function setExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->example_count = $var; - - return $this; - } - - /** - * Output only. Timestamp when this dataset was created. - * - * 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. Timestamp when this dataset was created. - * - * 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. Timestamp when this dataset was last updated. - * - * 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. Timestamp when this dataset was last updated. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php deleted file mode 100644 index fcd6d230e4b7..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtFile.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtFile - */ -class AdaptiveMtFile extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The file's display name. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The number of entries that the file contains. - * - * Generated from protobuf field int32 entry_count = 3; - */ - protected $entry_count = 0; - /** - * Output only. Timestamp when this file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when this file was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * @type string $display_name - * The file's display name. - * @type int $entry_count - * The number of entries that the file contains. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when this file was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when this file was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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 file's display name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The file's display name. - * - * 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 number of entries that the file contains. - * - * Generated from protobuf field int32 entry_count = 3; - * @return int - */ - public function getEntryCount() - { - return $this->entry_count; - } - - /** - * The number of entries that the file contains. - * - * Generated from protobuf field int32 entry_count = 3; - * @param int $var - * @return $this - */ - public function setEntryCount($var) - { - GPBUtil::checkInt32($var); - $this->entry_count = $var; - - return $this; - } - - /** - * Output only. Timestamp when this file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Timestamp when this file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Timestamp when this file was last updated. - * - * 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. Timestamp when this file was last updated. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php deleted file mode 100644 index 72c6dfe743de..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtSentence.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtSentence - */ -class AdaptiveMtSentence extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The source sentence. - * - * Generated from protobuf field string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_sentence = ''; - /** - * Required. The target sentence. - * - * Generated from protobuf field string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_sentence = ''; - /** - * Output only. Timestamp when this sentence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when this sentence was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.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. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` - * @type string $source_sentence - * Required. The source sentence. - * @type string $target_sentence - * Required. The target sentence. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when this sentence was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when this sentence was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` - * - * 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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` - * - * 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 source sentence. - * - * Generated from protobuf field string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceSentence() - { - return $this->source_sentence; - } - - /** - * Required. The source sentence. - * - * Generated from protobuf field string source_sentence = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceSentence($var) - { - GPBUtil::checkString($var, True); - $this->source_sentence = $var; - - return $this; - } - - /** - * Required. The target sentence. - * - * Generated from protobuf field string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetSentence() - { - return $this->target_sentence; - } - - /** - * Required. The target sentence. - * - * Generated from protobuf field string target_sentence = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetSentence($var) - { - GPBUtil::checkString($var, True); - $this->target_sentence = $var; - - return $this; - } - - /** - * Output only. Timestamp when this sentence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Timestamp when this sentence was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Timestamp when this sentence was last updated. - * - * 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. Timestamp when this sentence was last updated. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php deleted file mode 100644 index c58d6cec4b91..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslateRequest - */ -class AdaptiveMtTranslateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The resource name for the dataset to use for adaptive MT. - * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - * - * Generated from protobuf field string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $dataset = ''; - /** - * Required. The content of the input in string format. - * - * Generated from protobuf field repeated string content = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $content; - /** - * Configuration for caller provided reference sentences. - * - * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; - */ - protected $reference_sentence_config = null; - /** - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $glossary_config = null; - - /** - * @param string $parent Required. Location to make a regional call. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}`. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string[] $content Required. The content of the input in string format. - * - * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest - * - * @experimental - */ - public static function build(string $parent, array $content): self - { - return (new self()) - ->setParent($parent) - ->setContent($content); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * @type string $dataset - * Required. The resource name for the dataset to use for adaptive MT. - * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - * @type array|\Google\Protobuf\Internal\RepeatedField $content - * Required. The content of the input in string format. - * @type \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig $reference_sentence_config - * Configuration for caller provided reference sentences. - * @type \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig $glossary_config - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-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. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-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 resource name for the dataset to use for adaptive MT. - * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - * - * Generated from protobuf field string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Required. The resource name for the dataset to use for adaptive MT. - * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - * - * Generated from protobuf field string dataset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Required. The content of the input in string format. - * - * Generated from protobuf field repeated string content = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContent() - { - return $this->content; - } - - /** - * Required. The content of the input in string format. - * - * Generated from protobuf field repeated string content = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContent($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->content = $arr; - - return $this; - } - - /** - * Configuration for caller provided reference sentences. - * - * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; - * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig|null - */ - public function getReferenceSentenceConfig() - { - return $this->reference_sentence_config; - } - - public function hasReferenceSentenceConfig() - { - return isset($this->reference_sentence_config); - } - - public function clearReferenceSentenceConfig() - { - unset($this->reference_sentence_config); - } - - /** - * Configuration for caller provided reference sentences. - * - * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig reference_sentence_config = 6; - * @param \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig $var - * @return $this - */ - public function setReferenceSentenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentenceConfig::class); - $this->reference_sentence_config = $var; - - return $this; - } - - /** - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig|null - */ - public function getGlossaryConfig() - { - return $this->glossary_config; - } - - public function hasGlossaryConfig() - { - return isset($this->glossary_config); - } - - public function clearGlossaryConfig() - { - unset($this->glossary_config); - } - - /** - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field optional .google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig $var - * @return $this - */ - public function setGlossaryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\GlossaryConfig::class); - $this->glossary_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php deleted file mode 100644 index 9f17c5a626f7..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig - */ -class GlossaryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * - * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $glossary = ''; - /** - * Optional. Indicates match is case insensitive. The default value is - * `false` if missing. - * - * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_case = false; - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $contextual_translation_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $glossary - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * @type bool $ignore_case - * Optional. Indicates match is case insensitive. The default value is - * `false` if missing. - * @type bool $contextual_translation_enabled - * Optional. If set to true, the glossary will be used for contextual - * translation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * - * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGlossary() - { - return $this->glossary; - } - - /** - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * - * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGlossary($var) - { - GPBUtil::checkString($var, True); - $this->glossary = $var; - - return $this; - } - - /** - * Optional. Indicates match is case insensitive. The default value is - * `false` if missing. - * - * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreCase() - { - return $this->ignore_case; - } - - /** - * Optional. Indicates match is case insensitive. The default value is - * `false` if missing. - * - * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreCase($var) - { - GPBUtil::checkBool($var); - $this->ignore_case = $var; - - return $this; - } - - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContextualTranslationEnabled() - { - return $this->contextual_translation_enabled; - } - - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContextualTranslationEnabled($var) - { - GPBUtil::checkBool($var); - $this->contextual_translation_enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GlossaryConfig::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_GlossaryConfig::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php deleted file mode 100644 index dc9832691240..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentenceConfig.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig - */ -class ReferenceSentenceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Reference sentences pair lists. Each list will be used as the references - * to translate the sentence under "content" field at the corresponding - * index. Length of the list is required to be equal to the length of - * "content" field. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList reference_sentence_pair_lists = 1; - */ - private $reference_sentence_pair_lists; - /** - * Source language code. - * - * Generated from protobuf field string source_language_code = 2; - */ - protected $source_language_code = ''; - /** - * Target language code. - * - * Generated from protobuf field string target_language_code = 3; - */ - protected $target_language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePairList>|\Google\Protobuf\Internal\RepeatedField $reference_sentence_pair_lists - * Reference sentences pair lists. Each list will be used as the references - * to translate the sentence under "content" field at the corresponding - * index. Length of the list is required to be equal to the length of - * "content" field. - * @type string $source_language_code - * Source language code. - * @type string $target_language_code - * Target language code. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Reference sentences pair lists. Each list will be used as the references - * to translate the sentence under "content" field at the corresponding - * index. Length of the list is required to be equal to the length of - * "content" field. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList reference_sentence_pair_lists = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferenceSentencePairLists() - { - return $this->reference_sentence_pair_lists; - } - - /** - * Reference sentences pair lists. Each list will be used as the references - * to translate the sentence under "content" field at the corresponding - * index. Length of the list is required to be equal to the length of - * "content" field. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList reference_sentence_pair_lists = 1; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePairList>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferenceSentencePairLists($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePairList::class); - $this->reference_sentence_pair_lists = $arr; - - return $this; - } - - /** - * Source language code. - * - * Generated from protobuf field string source_language_code = 2; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Source language code. - * - * Generated from protobuf field string source_language_code = 2; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Target language code. - * - * Generated from protobuf field string target_language_code = 3; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * Target language code. - * - * Generated from protobuf field string target_language_code = 3; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReferenceSentenceConfig::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_ReferenceSentenceConfig::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php deleted file mode 100644 index 2be985f639e7..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePair.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair - */ -class ReferenceSentencePair extends \Google\Protobuf\Internal\Message -{ - /** - * Source sentence in the sentence pair. - * - * Generated from protobuf field string source_sentence = 1; - */ - protected $source_sentence = ''; - /** - * Target sentence in the sentence pair. - * - * Generated from protobuf field string target_sentence = 2; - */ - protected $target_sentence = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_sentence - * Source sentence in the sentence pair. - * @type string $target_sentence - * Target sentence in the sentence pair. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Source sentence in the sentence pair. - * - * Generated from protobuf field string source_sentence = 1; - * @return string - */ - public function getSourceSentence() - { - return $this->source_sentence; - } - - /** - * Source sentence in the sentence pair. - * - * Generated from protobuf field string source_sentence = 1; - * @param string $var - * @return $this - */ - public function setSourceSentence($var) - { - GPBUtil::checkString($var, True); - $this->source_sentence = $var; - - return $this; - } - - /** - * Target sentence in the sentence pair. - * - * Generated from protobuf field string target_sentence = 2; - * @return string - */ - public function getTargetSentence() - { - return $this->target_sentence; - } - - /** - * Target sentence in the sentence pair. - * - * Generated from protobuf field string target_sentence = 2; - * @param string $var - * @return $this - */ - public function setTargetSentence($var) - { - GPBUtil::checkString($var, True); - $this->target_sentence = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReferenceSentencePair::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_ReferenceSentencePair::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php deleted file mode 100644 index 4cf1d0cd0b60..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateRequest/ReferenceSentencePairList.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePairList - */ -class ReferenceSentencePairList extends \Google\Protobuf\Internal\Message -{ - /** - * Reference sentence pairs. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair reference_sentence_pairs = 1; - */ - private $reference_sentence_pairs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePair>|\Google\Protobuf\Internal\RepeatedField $reference_sentence_pairs - * Reference sentence pairs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Reference sentence pairs. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair reference_sentence_pairs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferenceSentencePairs() - { - return $this->reference_sentence_pairs; - } - - /** - * Reference sentence pairs. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentencePair reference_sentence_pairs = 1; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePair>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferenceSentencePairs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest\ReferenceSentencePair::class); - $this->reference_sentence_pairs = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReferenceSentencePairList::class, \Google\Cloud\Translate\V3\AdaptiveMtTranslateRequest_ReferenceSentencePairList::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php deleted file mode 100644 index 23bd73ce8eb5..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslateResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslateResponse - */ -class AdaptiveMtTranslateResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The translation. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation translations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $translations; - /** - * Output only. The translation's language code. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $language_code = ''; - /** - * Text translation response if a glossary is provided in the request. This - * could be the same as 'translation' above if no terms apply. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation glossary_translations = 4; - */ - private $glossary_translations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $translations - * Output only. The translation. - * @type string $language_code - * Output only. The translation's language code. - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $glossary_translations - * Text translation response if a glossary is provided in the request. This - * could be the same as 'translation' above if no terms apply. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The translation. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation translations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTranslations() - { - return $this->translations; - } - - /** - * Output only. The translation. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation translations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTranslations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslation::class); - $this->translations = $arr; - - return $this; - } - - /** - * Output only. The translation's language code. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Output only. The translation's language code. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Text translation response if a glossary is provided in the request. This - * could be the same as 'translation' above if no terms apply. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation glossary_translations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGlossaryTranslations() - { - return $this->glossary_translations; - } - - /** - * Text translation response if a glossary is provided in the request. This - * could be the same as 'translation' above if no terms apply. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtTranslation glossary_translations = 4; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtTranslation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGlossaryTranslations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtTranslation::class); - $this->glossary_translations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php deleted file mode 100644 index 6dd8e9911c65..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/AdaptiveMtTranslation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.translation.v3.AdaptiveMtTranslation - */ -class AdaptiveMtTranslation extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The translated text. - * - * Generated from protobuf field string translated_text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $translated_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $translated_text - * Output only. The translated text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The translated text. - * - * Generated from protobuf field string translated_text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTranslatedText() - { - return $this->translated_text; - } - - /** - * Output only. The translated text. - * - * Generated from protobuf field string translated_text = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTranslatedText($var) - { - GPBUtil::checkString($var, True); - $this->translated_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php deleted file mode 100644 index 43a05b43f1b0..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentInputConfig.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.translation.v3.BatchDocumentInputConfig - */ -class BatchDocumentInputConfig extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source - * Google Cloud Storage location for the source input. - * This can be a single file (for example, - * `gs://translation-test/input.docx`) or a wildcard (for example, - * `gs://translation-test/*`). - * File mime type is determined based on extension. Supported mime type - * includes: - * - `pdf`, application/pdf - * - `docx`, - * application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - `pptx`, - * application/vnd.openxmlformats-officedocument.presentationml.presentation - * - `xlsx`, - * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. - * The max file size to support for `.pdf` is 1GB and the max page limit is - * 1000 pages. - * The max file size to support for all input documents is 1GB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage location for the source input. - * This can be a single file (for example, - * `gs://translation-test/input.docx`) or a wildcard (for example, - * `gs://translation-test/*`). - * File mime type is determined based on extension. Supported mime type - * includes: - * - `pdf`, application/pdf - * - `docx`, - * application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - `pptx`, - * application/vnd.openxmlformats-officedocument.presentationml.presentation - * - `xlsx`, - * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. - * The max file size to support for `.pdf` is 1GB and the max page limit is - * 1000 pages. - * The max file size to support for all input documents is 1GB. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; - * @return \Google\Cloud\Translate\V3\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * Google Cloud Storage location for the source input. - * This can be a single file (for example, - * `gs://translation-test/input.docx`) or a wildcard (for example, - * `gs://translation-test/*`). - * File mime type is determined based on extension. Supported mime type - * includes: - * - `pdf`, application/pdf - * - `docx`, - * application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - `pptx`, - * application/vnd.openxmlformats-officedocument.presentationml.presentation - * - `xlsx`, - * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. - * The max file size to support for `.pdf` is 1GB and the max page limit is - * 1000 pages. - * The max file size to support for all input documents is 1GB. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; - * @param \Google\Cloud\Translate\V3\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php deleted file mode 100644 index 60ecb3217132..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchDocumentOutputConfig.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.translation.v3.BatchDocumentOutputConfig - */ -class BatchDocumentOutputConfig extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GcsDestination $gcs_destination - * Google Cloud Storage destination for output content. - * For every single input document (for example, gs://a/b/c.[extension]), we - * generate at most 2 * n output files. (n is the # of target_language_codes - * in the BatchTranslateDocumentRequest). - * While the input documents are being processed, we write/update an index - * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, - * gs://translation_output/index.csv) The index file is generated/updated as - * new files are being translated. The format is: - * input_document,target_language_code,translation_output,error_output, - * glossary_translation_output,glossary_error_output - * `input_document` is one file we matched using gcs_source.input_uri. - * `target_language_code` is provided in the request. - * `translation_output` contains the translations. (details provided below) - * `error_output` contains the error message during processing of the file. - * Both translations_file and errors_file could be empty strings if we have - * no content to output. - * `glossary_translation_output` and `glossary_error_output` are the - * translated output/error when we apply glossaries. They could also be - * empty if we have no content to output. - * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are - * processed and ready to be consumed (that is, no partial output file is - * written). - * Since index.csv will be keeping updated during the process, please make - * sure there is no custom retention policy applied on the output bucket - * that may avoid file updating. - * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - * The naming format of translation output files follows (for target - * language code [trg]): `translation_output`: - * `gs://translation_output/a_b_c_[trg]_translation.[extension]` - * `glossary_translation_output`: - * `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The - * output document will maintain the same file format as the input document. - * The naming format of error output files follows (for target language code - * [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` - * `glossary_error_output`: - * `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error - * output is a txt file containing error details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage destination for output content. - * For every single input document (for example, gs://a/b/c.[extension]), we - * generate at most 2 * n output files. (n is the # of target_language_codes - * in the BatchTranslateDocumentRequest). - * While the input documents are being processed, we write/update an index - * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, - * gs://translation_output/index.csv) The index file is generated/updated as - * new files are being translated. The format is: - * input_document,target_language_code,translation_output,error_output, - * glossary_translation_output,glossary_error_output - * `input_document` is one file we matched using gcs_source.input_uri. - * `target_language_code` is provided in the request. - * `translation_output` contains the translations. (details provided below) - * `error_output` contains the error message during processing of the file. - * Both translations_file and errors_file could be empty strings if we have - * no content to output. - * `glossary_translation_output` and `glossary_error_output` are the - * translated output/error when we apply glossaries. They could also be - * empty if we have no content to output. - * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are - * processed and ready to be consumed (that is, no partial output file is - * written). - * Since index.csv will be keeping updated during the process, please make - * sure there is no custom retention policy applied on the output bucket - * that may avoid file updating. - * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - * The naming format of translation output files follows (for target - * language code [trg]): `translation_output`: - * `gs://translation_output/a_b_c_[trg]_translation.[extension]` - * `glossary_translation_output`: - * `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The - * output document will maintain the same file format as the input document. - * The naming format of error output files follows (for target language code - * [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` - * `glossary_error_output`: - * `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error - * output is a txt file containing error details. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; - * @return \Google\Cloud\Translate\V3\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * Google Cloud Storage destination for output content. - * For every single input document (for example, gs://a/b/c.[extension]), we - * generate at most 2 * n output files. (n is the # of target_language_codes - * in the BatchTranslateDocumentRequest). - * While the input documents are being processed, we write/update an index - * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, - * gs://translation_output/index.csv) The index file is generated/updated as - * new files are being translated. The format is: - * input_document,target_language_code,translation_output,error_output, - * glossary_translation_output,glossary_error_output - * `input_document` is one file we matched using gcs_source.input_uri. - * `target_language_code` is provided in the request. - * `translation_output` contains the translations. (details provided below) - * `error_output` contains the error message during processing of the file. - * Both translations_file and errors_file could be empty strings if we have - * no content to output. - * `glossary_translation_output` and `glossary_error_output` are the - * translated output/error when we apply glossaries. They could also be - * empty if we have no content to output. - * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are - * processed and ready to be consumed (that is, no partial output file is - * written). - * Since index.csv will be keeping updated during the process, please make - * sure there is no custom retention policy applied on the output bucket - * that may avoid file updating. - * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - * The naming format of translation output files follows (for target - * language code [trg]): `translation_output`: - * `gs://translation_output/a_b_c_[trg]_translation.[extension]` - * `glossary_translation_output`: - * `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The - * output document will maintain the same file format as the input document. - * The naming format of error output files follows (for target language code - * [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` - * `glossary_error_output`: - * `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error - * output is a txt file containing error details. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; - * @param \Google\Cloud\Translate\V3\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php deleted file mode 100644 index 6a158a539946..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.translation.v3.BatchTransferResourcesResponse - */ -class BatchTransferResourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Responses of the transfer for individual resources. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\BatchTransferResourcesResponse\TransferResourceResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * Responses of the transfer for individual resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Responses of the transfer for individual resources. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * Responses of the transfer for individual resources. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse responses = 1; - * @param array<\Google\Cloud\Translate\V3\BatchTransferResourcesResponse\TransferResourceResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\BatchTransferResourcesResponse\TransferResourceResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php deleted file mode 100644 index dbe0d9f6393d..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTransferResourcesResponse/TransferResourceResponse.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.translation.v3.BatchTransferResourcesResponse.TransferResourceResponse - */ -class TransferResourceResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Full name of the resource to transfer as specified in the request. - * - * Generated from protobuf field string source = 1; - */ - protected $source = ''; - /** - * Full name of the new resource successfully transferred from the source - * hosted by Translation API. Target will be empty if the transfer failed. - * - * Generated from protobuf field string target = 2; - */ - protected $target = ''; - /** - * The error result in case of failure. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source - * Full name of the resource to transfer as specified in the request. - * @type string $target - * Full name of the new resource successfully transferred from the source - * hosted by Translation API. Target will be empty if the transfer failed. - * @type \Google\Rpc\Status $error - * The error result in case of failure. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Full name of the resource to transfer as specified in the request. - * - * Generated from protobuf field string source = 1; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Full name of the resource to transfer as specified in the request. - * - * Generated from protobuf field string source = 1; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Full name of the new resource successfully transferred from the source - * hosted by Translation API. Target will be empty if the transfer failed. - * - * Generated from protobuf field string target = 2; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Full name of the new resource successfully transferred from the source - * hosted by Translation API. Target will be empty if the transfer failed. - * - * Generated from protobuf field string target = 2; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * The error result in case of failure. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * The error result in case of failure. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TransferResourceResponse::class, \Google\Cloud\Translate\V3\BatchTransferResourcesResponse_TransferResourceResponse::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php deleted file mode 100644 index 578301767c67..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata.php +++ /dev/null @@ -1,411 +0,0 @@ -google.cloud.translation.v3.BatchTranslateDocumentMetadata - */ -class BatchTranslateDocumentMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1; - */ - protected $state = 0; - /** - * Total number of pages to translate in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 total_pages = 2; - */ - protected $total_pages = 0; - /** - * Number of successfully translated pages in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 translated_pages = 3; - */ - protected $translated_pages = 0; - /** - * Number of pages that failed to process in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 failed_pages = 4; - */ - protected $failed_pages = 0; - /** - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) so far. - * - * Generated from protobuf field int64 total_billable_pages = 5; - */ - protected $total_billable_pages = 0; - /** - * Total number of characters (Unicode codepoints) in all documents so far. - * - * Generated from protobuf field int64 total_characters = 6; - */ - protected $total_characters = 0; - /** - * Number of successfully translated characters (Unicode codepoints) in all - * documents so far. - * - * Generated from protobuf field int64 translated_characters = 7; - */ - protected $translated_characters = 0; - /** - * Number of characters that have failed to process (Unicode codepoints) in - * all documents so far. - * - * Generated from protobuf field int64 failed_characters = 8; - */ - protected $failed_characters = 0; - /** - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition (such as XLSX) so far. - * - * Generated from protobuf field int64 total_billable_characters = 9; - */ - protected $total_billable_characters = 0; - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 10; - */ - protected $submit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the operation. - * @type int|string $total_pages - * Total number of pages to translate in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * @type int|string $translated_pages - * Number of successfully translated pages in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * @type int|string $failed_pages - * Number of pages that failed to process in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * @type int|string $total_billable_pages - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) so far. - * @type int|string $total_characters - * Total number of characters (Unicode codepoints) in all documents so far. - * @type int|string $translated_characters - * Number of successfully translated characters (Unicode codepoints) in all - * documents so far. - * @type int|string $failed_characters - * Number of characters that have failed to process (Unicode codepoints) in - * all documents so far. - * @type int|string $total_billable_characters - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition (such as XLSX) so far. - * @type \Google\Protobuf\Timestamp $submit_time - * Time when the operation was submitted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateDocumentMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\BatchTranslateDocumentMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Total number of pages to translate in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 total_pages = 2; - * @return int|string - */ - public function getTotalPages() - { - return $this->total_pages; - } - - /** - * Total number of pages to translate in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 total_pages = 2; - * @param int|string $var - * @return $this - */ - public function setTotalPages($var) - { - GPBUtil::checkInt64($var); - $this->total_pages = $var; - - return $this; - } - - /** - * Number of successfully translated pages in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 translated_pages = 3; - * @return int|string - */ - public function getTranslatedPages() - { - return $this->translated_pages; - } - - /** - * Number of successfully translated pages in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 translated_pages = 3; - * @param int|string $var - * @return $this - */ - public function setTranslatedPages($var) - { - GPBUtil::checkInt64($var); - $this->translated_pages = $var; - - return $this; - } - - /** - * Number of pages that failed to process in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 failed_pages = 4; - * @return int|string - */ - public function getFailedPages() - { - return $this->failed_pages; - } - - /** - * Number of pages that failed to process in all documents so far. Documents - * without clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 failed_pages = 4; - * @param int|string $var - * @return $this - */ - public function setFailedPages($var) - { - GPBUtil::checkInt64($var); - $this->failed_pages = $var; - - return $this; - } - - /** - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) so far. - * - * Generated from protobuf field int64 total_billable_pages = 5; - * @return int|string - */ - public function getTotalBillablePages() - { - return $this->total_billable_pages; - } - - /** - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) so far. - * - * Generated from protobuf field int64 total_billable_pages = 5; - * @param int|string $var - * @return $this - */ - public function setTotalBillablePages($var) - { - GPBUtil::checkInt64($var); - $this->total_billable_pages = $var; - - return $this; - } - - /** - * Total number of characters (Unicode codepoints) in all documents so far. - * - * Generated from protobuf field int64 total_characters = 6; - * @return int|string - */ - public function getTotalCharacters() - { - return $this->total_characters; - } - - /** - * Total number of characters (Unicode codepoints) in all documents so far. - * - * Generated from protobuf field int64 total_characters = 6; - * @param int|string $var - * @return $this - */ - public function setTotalCharacters($var) - { - GPBUtil::checkInt64($var); - $this->total_characters = $var; - - return $this; - } - - /** - * Number of successfully translated characters (Unicode codepoints) in all - * documents so far. - * - * Generated from protobuf field int64 translated_characters = 7; - * @return int|string - */ - public function getTranslatedCharacters() - { - return $this->translated_characters; - } - - /** - * Number of successfully translated characters (Unicode codepoints) in all - * documents so far. - * - * Generated from protobuf field int64 translated_characters = 7; - * @param int|string $var - * @return $this - */ - public function setTranslatedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->translated_characters = $var; - - return $this; - } - - /** - * Number of characters that have failed to process (Unicode codepoints) in - * all documents so far. - * - * Generated from protobuf field int64 failed_characters = 8; - * @return int|string - */ - public function getFailedCharacters() - { - return $this->failed_characters; - } - - /** - * Number of characters that have failed to process (Unicode codepoints) in - * all documents so far. - * - * Generated from protobuf field int64 failed_characters = 8; - * @param int|string $var - * @return $this - */ - public function setFailedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->failed_characters = $var; - - return $this; - } - - /** - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition (such as XLSX) so far. - * - * Generated from protobuf field int64 total_billable_characters = 9; - * @return int|string - */ - public function getTotalBillableCharacters() - { - return $this->total_billable_characters; - } - - /** - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition (such as XLSX) so far. - * - * Generated from protobuf field int64 total_billable_characters = 9; - * @param int|string $var - * @return $this - */ - public function setTotalBillableCharacters($var) - { - GPBUtil::checkInt64($var); - $this->total_billable_characters = $var; - - return $this; - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php deleted file mode 100644 index 6631a48171fb..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentMetadata/State.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.translation.v3.BatchTranslateDocumentMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The batch is processed, and at least one item was successfully processed. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The batch is done and no item was successfully processed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Request is in the process of being canceled after caller invoked - * longrunning.Operations.CancelOperation on the request id. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The batch is done after the user has called the - * longrunning.Operations.CancelOperation. Any records processed before the - * cancel command are output as specified in the request. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Translate\V3\BatchTranslateDocumentMetadata_State::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php deleted file mode 100644 index 6b8310ad887c..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentRequest.php +++ /dev/null @@ -1,595 +0,0 @@ -google.cloud.translation.v3.BatchTranslateDocumentRequest - */ -class BatchTranslateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * [Language Support](https://cloud.google.com/translate/docs/languages). - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_language_code = ''; - /** - * Required. The ISO-639 language code to use for translation of the input - * document. Specify up to 10 language codes here. - * - * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $target_language_codes; - /** - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size to translate should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $input_configs; - /** - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - /** - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is the model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * - * Generated from protobuf field map models = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $models; - /** - * Optional. Glossaries to be applied. It's keyed by target language code. - * - * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $glossaries; - /** - * Optional. The file format conversion map that is applied to all input - * files. The map key is the original mime_type. The map value is the target - * mime_type of translated documents. - * Supported file format conversion includes: - * - `application/pdf` to - * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - * If nothing specified, output files will be in the same format as the - * original file. - * - * Generated from protobuf field map format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $format_conversions; - /** - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * - * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $customized_attribution = ''; - /** - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * - * Generated from protobuf field bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_shadow_removal_native_pdf = false; - /** - * Optional. If true, enable auto rotation correction in DVS. - * - * Generated from protobuf field bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_rotation_correction = false; - - /** - * @param string $parent Required. Location to make a regional call. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * - * The `global` location is not supported for batch translation. - * - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string $sourceLanguageCode Required. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * [Language Support](https://cloud.google.com/translate/docs/languages). - * @param string[] $targetLanguageCodes Required. The ISO-639 language code to use for translation of the input - * document. Specify up to 10 language codes here. - * @param \Google\Cloud\Translate\V3\BatchDocumentInputConfig[] $inputConfigs Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size to translate should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * @param \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $outputConfig Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * @return \Google\Cloud\Translate\V3\BatchTranslateDocumentRequest - * - * @experimental - */ - public static function build(string $parent, string $sourceLanguageCode, array $targetLanguageCodes, array $inputConfigs, \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $outputConfig): self - { - return (new self()) - ->setParent($parent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * @type string $source_language_code - * Required. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * [Language Support](https://cloud.google.com/translate/docs/languages). - * @type array|\Google\Protobuf\Internal\RepeatedField $target_language_codes - * Required. The ISO-639 language code to use for translation of the input - * document. Specify up to 10 language codes here. - * @type array<\Google\Cloud\Translate\V3\BatchDocumentInputConfig>|\Google\Protobuf\Internal\RepeatedField $input_configs - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size to translate should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * @type \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $output_config - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * @type array|\Google\Protobuf\Internal\MapField $models - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is the model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * @type array|\Google\Protobuf\Internal\MapField $glossaries - * Optional. Glossaries to be applied. It's keyed by target language code. - * @type array|\Google\Protobuf\Internal\MapField $format_conversions - * Optional. The file format conversion map that is applied to all input - * files. The map key is the original mime_type. The map value is the target - * mime_type of translated documents. - * Supported file format conversion includes: - * - `application/pdf` to - * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - * If nothing specified, output files will be in the same format as the - * original file. - * @type string $customized_attribution - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * @type bool $enable_shadow_removal_native_pdf - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * @type bool $enable_rotation_correction - * Optional. If true, enable auto rotation correction in DVS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * [Language Support](https://cloud.google.com/translate/docs/languages). - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Required. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * [Language Support](https://cloud.google.com/translate/docs/languages). - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Required. The ISO-639 language code to use for translation of the input - * document. Specify up to 10 language codes here. - * - * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetLanguageCodes() - { - return $this->target_language_codes; - } - - /** - * Required. The ISO-639 language code to use for translation of the input - * document. Specify up to 10 language codes here. - * - * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_language_codes = $arr; - - return $this; - } - - /** - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size to translate should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputConfigs() - { - return $this->input_configs; - } - - /** - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size to translate should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Translate\V3\BatchDocumentInputConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\BatchDocumentInputConfig::class); - $this->input_configs = $arr; - - return $this; - } - - /** - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\BatchDocumentOutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\BatchDocumentOutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\BatchDocumentOutputConfig::class); - $this->output_config = $var; - - return $this; - } - - /** - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is the model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * - * Generated from protobuf field map models = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getModels() - { - return $this->models; - } - - /** - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is the model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * - * Generated from protobuf field map models = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setModels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->models = $arr; - - return $this; - } - - /** - * Optional. Glossaries to be applied. It's keyed by target language code. - * - * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getGlossaries() - { - return $this->glossaries; - } - - /** - * Optional. Glossaries to be applied. It's keyed by target language code. - * - * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setGlossaries($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); - $this->glossaries = $arr; - - return $this; - } - - /** - * Optional. The file format conversion map that is applied to all input - * files. The map key is the original mime_type. The map value is the target - * mime_type of translated documents. - * Supported file format conversion includes: - * - `application/pdf` to - * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - * If nothing specified, output files will be in the same format as the - * original file. - * - * Generated from protobuf field map format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFormatConversions() - { - return $this->format_conversions; - } - - /** - * Optional. The file format conversion map that is applied to all input - * files. The map key is the original mime_type. The map value is the target - * mime_type of translated documents. - * Supported file format conversion includes: - * - `application/pdf` to - * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - * If nothing specified, output files will be in the same format as the - * original file. - * - * Generated from protobuf field map format_conversions = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFormatConversions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->format_conversions = $arr; - - return $this; - } - - /** - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * - * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCustomizedAttribution() - { - return $this->customized_attribution; - } - - /** - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * - * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCustomizedAttribution($var) - { - GPBUtil::checkString($var, True); - $this->customized_attribution = $var; - - return $this; - } - - /** - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * - * Generated from protobuf field bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableShadowRemovalNativePdf() - { - return $this->enable_shadow_removal_native_pdf; - } - - /** - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * - * Generated from protobuf field bool enable_shadow_removal_native_pdf = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableShadowRemovalNativePdf($var) - { - GPBUtil::checkBool($var); - $this->enable_shadow_removal_native_pdf = $var; - - return $this; - } - - /** - * Optional. If true, enable auto rotation correction in DVS. - * - * Generated from protobuf field bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableRotationCorrection() - { - return $this->enable_rotation_correction; - } - - /** - * Optional. If true, enable auto rotation correction in DVS. - * - * Generated from protobuf field bool enable_rotation_correction = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableRotationCorrection($var) - { - GPBUtil::checkBool($var); - $this->enable_rotation_correction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php deleted file mode 100644 index ac0c68355f78..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateDocumentResponse.php +++ /dev/null @@ -1,432 +0,0 @@ -google.cloud.translation.v3.BatchTranslateDocumentResponse - */ -class BatchTranslateDocumentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of pages to translate in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 total_pages = 1; - */ - protected $total_pages = 0; - /** - * Number of successfully translated pages in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 translated_pages = 2; - */ - protected $translated_pages = 0; - /** - * Number of pages that failed to process in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 failed_pages = 3; - */ - protected $failed_pages = 0; - /** - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) - * - * Generated from protobuf field int64 total_billable_pages = 4; - */ - protected $total_billable_pages = 0; - /** - * Total number of characters (Unicode codepoints) in all documents. - * - * Generated from protobuf field int64 total_characters = 5; - */ - protected $total_characters = 0; - /** - * Number of successfully translated characters (Unicode codepoints) in all - * documents. - * - * Generated from protobuf field int64 translated_characters = 6; - */ - protected $translated_characters = 0; - /** - * Number of characters that have failed to process (Unicode codepoints) in - * all documents. - * - * Generated from protobuf field int64 failed_characters = 7; - */ - protected $failed_characters = 0; - /** - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition, such as XLSX. - * - * Generated from protobuf field int64 total_billable_characters = 8; - */ - protected $total_billable_characters = 0; - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 9; - */ - protected $submit_time = null; - /** - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 10; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $total_pages - * Total number of pages to translate in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * @type int|string $translated_pages - * Number of successfully translated pages in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * @type int|string $failed_pages - * Number of pages that failed to process in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * @type int|string $total_billable_pages - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) - * @type int|string $total_characters - * Total number of characters (Unicode codepoints) in all documents. - * @type int|string $translated_characters - * Number of successfully translated characters (Unicode codepoints) in all - * documents. - * @type int|string $failed_characters - * Number of characters that have failed to process (Unicode codepoints) in - * all documents. - * @type int|string $total_billable_characters - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition, such as XLSX. - * @type \Google\Protobuf\Timestamp $submit_time - * Time when the operation was submitted. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Total number of pages to translate in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 total_pages = 1; - * @return int|string - */ - public function getTotalPages() - { - return $this->total_pages; - } - - /** - * Total number of pages to translate in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 total_pages = 1; - * @param int|string $var - * @return $this - */ - public function setTotalPages($var) - { - GPBUtil::checkInt64($var); - $this->total_pages = $var; - - return $this; - } - - /** - * Number of successfully translated pages in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 translated_pages = 2; - * @return int|string - */ - public function getTranslatedPages() - { - return $this->translated_pages; - } - - /** - * Number of successfully translated pages in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 translated_pages = 2; - * @param int|string $var - * @return $this - */ - public function setTranslatedPages($var) - { - GPBUtil::checkInt64($var); - $this->translated_pages = $var; - - return $this; - } - - /** - * Number of pages that failed to process in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 failed_pages = 3; - * @return int|string - */ - public function getFailedPages() - { - return $this->failed_pages; - } - - /** - * Number of pages that failed to process in all documents. Documents without - * clear page definition (such as XLSX) are not counted. - * - * Generated from protobuf field int64 failed_pages = 3; - * @param int|string $var - * @return $this - */ - public function setFailedPages($var) - { - GPBUtil::checkInt64($var); - $this->failed_pages = $var; - - return $this; - } - - /** - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) - * - * Generated from protobuf field int64 total_billable_pages = 4; - * @return int|string - */ - public function getTotalBillablePages() - { - return $this->total_billable_pages; - } - - /** - * Number of billable pages in documents with clear page definition (such as - * PDF, DOCX, PPTX) - * - * Generated from protobuf field int64 total_billable_pages = 4; - * @param int|string $var - * @return $this - */ - public function setTotalBillablePages($var) - { - GPBUtil::checkInt64($var); - $this->total_billable_pages = $var; - - return $this; - } - - /** - * Total number of characters (Unicode codepoints) in all documents. - * - * Generated from protobuf field int64 total_characters = 5; - * @return int|string - */ - public function getTotalCharacters() - { - return $this->total_characters; - } - - /** - * Total number of characters (Unicode codepoints) in all documents. - * - * Generated from protobuf field int64 total_characters = 5; - * @param int|string $var - * @return $this - */ - public function setTotalCharacters($var) - { - GPBUtil::checkInt64($var); - $this->total_characters = $var; - - return $this; - } - - /** - * Number of successfully translated characters (Unicode codepoints) in all - * documents. - * - * Generated from protobuf field int64 translated_characters = 6; - * @return int|string - */ - public function getTranslatedCharacters() - { - return $this->translated_characters; - } - - /** - * Number of successfully translated characters (Unicode codepoints) in all - * documents. - * - * Generated from protobuf field int64 translated_characters = 6; - * @param int|string $var - * @return $this - */ - public function setTranslatedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->translated_characters = $var; - - return $this; - } - - /** - * Number of characters that have failed to process (Unicode codepoints) in - * all documents. - * - * Generated from protobuf field int64 failed_characters = 7; - * @return int|string - */ - public function getFailedCharacters() - { - return $this->failed_characters; - } - - /** - * Number of characters that have failed to process (Unicode codepoints) in - * all documents. - * - * Generated from protobuf field int64 failed_characters = 7; - * @param int|string $var - * @return $this - */ - public function setFailedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->failed_characters = $var; - - return $this; - } - - /** - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition, such as XLSX. - * - * Generated from protobuf field int64 total_billable_characters = 8; - * @return int|string - */ - public function getTotalBillableCharacters() - { - return $this->total_billable_characters; - } - - /** - * Number of billable characters (Unicode codepoints) in documents without - * clear page definition, such as XLSX. - * - * Generated from protobuf field int64 total_billable_characters = 8; - * @param int|string $var - * @return $this - */ - public function setTotalBillableCharacters($var) - { - GPBUtil::checkInt64($var); - $this->total_billable_characters = $var; - - return $this; - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - - /** - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 10; - * @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 when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 10; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php deleted file mode 100644 index 088d15ac8a90..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.translation.v3.BatchTranslateMetadata - */ -class BatchTranslateMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateMetadata.State state = 1; - */ - protected $state = 0; - /** - * Number of successfully translated characters so far (Unicode codepoints). - * - * Generated from protobuf field int64 translated_characters = 2; - */ - protected $translated_characters = 0; - /** - * Number of characters that have failed to process so far (Unicode - * codepoints). - * - * Generated from protobuf field int64 failed_characters = 3; - */ - protected $failed_characters = 0; - /** - * Total number of characters (Unicode codepoints). - * This is the total number of codepoints from input files times the number of - * target languages and appears here shortly after the call is submitted. - * - * Generated from protobuf field int64 total_characters = 4; - */ - protected $total_characters = 0; - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 5; - */ - protected $submit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the operation. - * @type int|string $translated_characters - * Number of successfully translated characters so far (Unicode codepoints). - * @type int|string $failed_characters - * Number of characters that have failed to process so far (Unicode - * codepoints). - * @type int|string $total_characters - * Total number of characters (Unicode codepoints). - * This is the total number of codepoints from input files times the number of - * target languages and appears here shortly after the call is submitted. - * @type \Google\Protobuf\Timestamp $submit_time - * Time when the operation was submitted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.BatchTranslateMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\BatchTranslateMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Number of successfully translated characters so far (Unicode codepoints). - * - * Generated from protobuf field int64 translated_characters = 2; - * @return int|string - */ - public function getTranslatedCharacters() - { - return $this->translated_characters; - } - - /** - * Number of successfully translated characters so far (Unicode codepoints). - * - * Generated from protobuf field int64 translated_characters = 2; - * @param int|string $var - * @return $this - */ - public function setTranslatedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->translated_characters = $var; - - return $this; - } - - /** - * Number of characters that have failed to process so far (Unicode - * codepoints). - * - * Generated from protobuf field int64 failed_characters = 3; - * @return int|string - */ - public function getFailedCharacters() - { - return $this->failed_characters; - } - - /** - * Number of characters that have failed to process so far (Unicode - * codepoints). - * - * Generated from protobuf field int64 failed_characters = 3; - * @param int|string $var - * @return $this - */ - public function setFailedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->failed_characters = $var; - - return $this; - } - - /** - * Total number of characters (Unicode codepoints). - * This is the total number of codepoints from input files times the number of - * target languages and appears here shortly after the call is submitted. - * - * Generated from protobuf field int64 total_characters = 4; - * @return int|string - */ - public function getTotalCharacters() - { - return $this->total_characters; - } - - /** - * Total number of characters (Unicode codepoints). - * This is the total number of codepoints from input files times the number of - * target languages and appears here shortly after the call is submitted. - * - * Generated from protobuf field int64 total_characters = 4; - * @param int|string $var - * @return $this - */ - public function setTotalCharacters($var) - { - GPBUtil::checkInt64($var); - $this->total_characters = $var; - - return $this; - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php deleted file mode 100644 index 287dfff03890..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateMetadata/State.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.translation.v3.BatchTranslateMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The batch is processed, and at least one item was successfully - * processed. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The batch is done and no item was successfully processed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Request is in the process of being canceled after caller invoked - * longrunning.Operations.CancelOperation on the request id. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The batch is done after the user has called the - * longrunning.Operations.CancelOperation. Any records processed before the - * cancel command are output as specified in the request. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Translate\V3\BatchTranslateMetadata_State::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php deleted file mode 100644 index dfd33736f5e8..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateResponse.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.translation.v3.BatchTranslateResponse - */ -class BatchTranslateResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of characters (Unicode codepoints). - * - * Generated from protobuf field int64 total_characters = 1; - */ - protected $total_characters = 0; - /** - * Number of successfully translated characters (Unicode codepoints). - * - * Generated from protobuf field int64 translated_characters = 2; - */ - protected $translated_characters = 0; - /** - * Number of characters that have failed to process (Unicode codepoints). - * - * Generated from protobuf field int64 failed_characters = 3; - */ - protected $failed_characters = 0; - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; - */ - protected $submit_time = null; - /** - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $total_characters - * Total number of characters (Unicode codepoints). - * @type int|string $translated_characters - * Number of successfully translated characters (Unicode codepoints). - * @type int|string $failed_characters - * Number of characters that have failed to process (Unicode codepoints). - * @type \Google\Protobuf\Timestamp $submit_time - * Time when the operation was submitted. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Total number of characters (Unicode codepoints). - * - * Generated from protobuf field int64 total_characters = 1; - * @return int|string - */ - public function getTotalCharacters() - { - return $this->total_characters; - } - - /** - * Total number of characters (Unicode codepoints). - * - * Generated from protobuf field int64 total_characters = 1; - * @param int|string $var - * @return $this - */ - public function setTotalCharacters($var) - { - GPBUtil::checkInt64($var); - $this->total_characters = $var; - - return $this; - } - - /** - * Number of successfully translated characters (Unicode codepoints). - * - * Generated from protobuf field int64 translated_characters = 2; - * @return int|string - */ - public function getTranslatedCharacters() - { - return $this->translated_characters; - } - - /** - * Number of successfully translated characters (Unicode codepoints). - * - * Generated from protobuf field int64 translated_characters = 2; - * @param int|string $var - * @return $this - */ - public function setTranslatedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->translated_characters = $var; - - return $this; - } - - /** - * Number of characters that have failed to process (Unicode codepoints). - * - * Generated from protobuf field int64 failed_characters = 3; - * @return int|string - */ - public function getFailedCharacters() - { - return $this->failed_characters; - } - - /** - * Number of characters that have failed to process (Unicode codepoints). - * - * Generated from protobuf field int64 failed_characters = 3; - * @param int|string $var - * @return $this - */ - public function setFailedCharacters($var) - { - GPBUtil::checkInt64($var); - $this->failed_characters = $var; - - return $this; - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * Time when the operation was submitted. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - - /** - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * 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); - } - - /** - * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php deleted file mode 100644 index 79d9d7031130..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/BatchTranslateTextRequest.php +++ /dev/null @@ -1,419 +0,0 @@ -google.cloud.translation.v3.BatchTranslateTextRequest - */ -class BatchTranslateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Source language code. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_language_code = ''; - /** - * Required. Specify up to 10 language codes here. - * - * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $target_language_codes; - /** - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * - * Generated from protobuf field map models = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $models; - /** - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $input_configs; - /** - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * Generated from protobuf field .google.cloud.translation.v3.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - /** - * Optional. Glossaries to be applied for translation. - * It's keyed by target language code. - * - * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $glossaries; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * @type string $source_language_code - * Required. Source language code. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_language_codes - * Required. Specify up to 10 language codes here. - * @type array|\Google\Protobuf\Internal\MapField $models - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * @type array<\Google\Cloud\Translate\V3\InputConfig>|\Google\Protobuf\Internal\RepeatedField $input_configs - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * @type \Google\Cloud\Translate\V3\OutputConfig $output_config - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * @type array|\Google\Protobuf\Internal\MapField $glossaries - * Optional. Glossaries to be applied for translation. - * It's keyed by target language code. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * The `global` location is not supported for batch translation. - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Source language code. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Required. Source language code. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Required. Specify up to 10 language codes here. - * - * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetLanguageCodes() - { - return $this->target_language_codes; - } - - /** - * Required. Specify up to 10 language codes here. - * - * Generated from protobuf field repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_language_codes = $arr; - - return $this; - } - - /** - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * - * Generated from protobuf field map models = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getModels() - { - return $this->models; - } - - /** - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, - * or an AutoML Translation model. - * The value format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * - * Generated from protobuf field map models = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setModels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->models = $arr; - - return $this; - } - - /** - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputConfigs() - { - return $this->input_configs; - } - - /** - * Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Translate\V3\InputConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\InputConfig::class); - $this->input_configs = $arr; - - return $this; - } - - /** - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * Generated from protobuf field .google.cloud.translation.v3.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * - * Generated from protobuf field .google.cloud.translation.v3.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - - /** - * Optional. Glossaries to be applied for translation. - * It's keyed by target language code. - * - * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getGlossaries() - { - return $this->glossaries; - } - - /** - * Optional. Glossaries to be applied for translation. - * It's keyed by target language code. - * - * Generated from protobuf field map glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setGlossaries($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); - $this->glossaries = $arr; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 9 [(.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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php deleted file mode 100644 index 4fe3a22800c2..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateAdaptiveMtDatasetRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.translation.v3.CreateAdaptiveMtDatasetRequest - */ -class CreateAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The AdaptiveMtDataset to be created. - * - * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $adaptive_mt_dataset = null; - - /** - * @param string $parent Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptiveMtDataset Required. The AdaptiveMtDataset to be created. - * - * @return \Google\Cloud\Translate\V3\CreateAdaptiveMtDatasetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptiveMtDataset): self - { - return (new self()) - ->setParent($parent) - ->setAdaptiveMtDataset($adaptiveMtDataset); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * @type \Google\Cloud\Translate\V3\AdaptiveMtDataset $adaptive_mt_dataset - * Required. The AdaptiveMtDataset to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-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. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-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 AdaptiveMtDataset to be created. - * - * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset|null - */ - public function getAdaptiveMtDataset() - { - return $this->adaptive_mt_dataset; - } - - public function hasAdaptiveMtDataset() - { - return isset($this->adaptive_mt_dataset); - } - - public function clearAdaptiveMtDataset() - { - unset($this->adaptive_mt_dataset); - } - - /** - * Required. The AdaptiveMtDataset to be created. - * - * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\AdaptiveMtDataset $var - * @return $this - */ - public function setAdaptiveMtDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtDataset::class); - $this->adaptive_mt_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php deleted file mode 100644 index 181ae224ce41..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.translation.v3.CreateDatasetMetadata - */ -class CreateDatasetMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - */ - protected $state = 0; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Rpc\Status $error - * Only populated when operation doesn't succeed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The creation time of the 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 creation time of the 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 last 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 last 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; - } - - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Only populated when operation doesn't succeed. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php deleted file mode 100644 index cba93978545d..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateDatasetRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.translation.v3.CreateDatasetRequest - */ -class CreateDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Dataset to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset = null; - - /** - * @param string $parent Required. The project name. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Translate\V3\Dataset $dataset Required. The Dataset to create. - * - * @return \Google\Cloud\Translate\V3\CreateDatasetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Translate\V3\Dataset $dataset): self - { - return (new self()) - ->setParent($parent) - ->setDataset($dataset); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project name. - * @type \Google\Cloud\Translate\V3\Dataset $dataset - * Required. The Dataset to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project name. - * - * 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 name. - * - * 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 Dataset to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\Dataset|null - */ - public function getDataset() - { - return $this->dataset; - } - - public function hasDataset() - { - return isset($this->dataset); - } - - public function clearDataset() - { - unset($this->dataset); - } - - /** - * Required. The Dataset to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\Dataset $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Dataset::class); - $this->dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php deleted file mode 100644 index d4c38b6d0acb..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryEntryRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.translation.v3.CreateGlossaryEntryRequest - */ -class CreateGlossaryEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the glossary to create the entry under. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The glossary entry to create - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $glossary_entry = null; - - /** - * @param string $parent Required. The resource name of the glossary to create the entry under. Please see - * {@see TranslationServiceClient::glossaryName()} for help formatting this field. - * @param \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry Required. The glossary entry to create - * - * @return \Google\Cloud\Translate\V3\CreateGlossaryEntryRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry): self - { - return (new self()) - ->setParent($parent) - ->setGlossaryEntry($glossaryEntry); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the glossary to create the entry under. - * @type \Google\Cloud\Translate\V3\GlossaryEntry $glossary_entry - * Required. The glossary entry to create - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the glossary to create the entry under. - * - * 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 glossary to create the entry under. - * - * 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 glossary entry to create - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\GlossaryEntry|null - */ - public function getGlossaryEntry() - { - return $this->glossary_entry; - } - - public function hasGlossaryEntry() - { - return isset($this->glossary_entry); - } - - public function clearGlossaryEntry() - { - unset($this->glossary_entry); - } - - /** - * Required. The glossary entry to create - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\GlossaryEntry $var - * @return $this - */ - public function setGlossaryEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry::class); - $this->glossary_entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php deleted file mode 100644 index cf902834a451..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.translation.v3.CreateGlossaryMetadata - */ -class CreateGlossaryMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the glossary that is being created. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The current state of the glossary creation operation. - * - * Generated from protobuf field .google.cloud.translation.v3.CreateGlossaryMetadata.State state = 2; - */ - protected $state = 0; - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - */ - protected $submit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the glossary that is being created. - * @type int $state - * The current state of the glossary creation operation. - * @type \Google\Protobuf\Timestamp $submit_time - * The time when the operation was submitted to the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the glossary that is being created. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the glossary that is being created. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The current state of the glossary creation operation. - * - * Generated from protobuf field .google.cloud.translation.v3.CreateGlossaryMetadata.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the glossary creation operation. - * - * Generated from protobuf field .google.cloud.translation.v3.CreateGlossaryMetadata.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\CreateGlossaryMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php deleted file mode 100644 index 3aed3689d193..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryMetadata/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.CreateGlossaryMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The glossary was successfully created. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Failed to create the glossary. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Request is in the process of being canceled after caller invoked - * longrunning.Operations.CancelOperation on the request id. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The glossary creation request was successfully canceled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Translate\V3\CreateGlossaryMetadata_State::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php deleted file mode 100644 index d56a13da90c0..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateGlossaryRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.translation.v3.CreateGlossaryRequest - */ -class CreateGlossaryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The glossary to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $glossary = null; - - /** - * @param string $parent Required. The project name. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Translate\V3\Glossary $glossary Required. The glossary to create. - * - * @return \Google\Cloud\Translate\V3\CreateGlossaryRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Translate\V3\Glossary $glossary): self - { - return (new self()) - ->setParent($parent) - ->setGlossary($glossary); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project name. - * @type \Google\Cloud\Translate\V3\Glossary $glossary - * Required. The glossary to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project name. - * - * 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 name. - * - * 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 glossary to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\Glossary|null - */ - public function getGlossary() - { - return $this->glossary; - } - - public function hasGlossary() - { - return isset($this->glossary); - } - - public function clearGlossary() - { - unset($this->glossary); - } - - /** - * Required. The glossary to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\Glossary $var - * @return $this - */ - public function setGlossary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary::class); - $this->glossary = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php deleted file mode 100644 index 1cce1eadfba5..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.translation.v3.CreateModelMetadata - */ -class CreateModelMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - */ - protected $state = 0; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Rpc\Status $error - * Only populated when operation doesn't succeed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The creation time of the 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 creation time of the 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 last 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 last 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; - } - - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Only populated when operation doesn't succeed. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php deleted file mode 100644 index 1084dfbed001..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/CreateModelRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.translation.v3.CreateModelRequest - */ -class CreateModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project name, in form of - * `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Model to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $model = null; - - /** - * @param string $parent Required. The project name, in form of - * `projects/{project}/locations/{location}` - * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Translate\V3\Model $model Required. The Model to create. - * - * @return \Google\Cloud\Translate\V3\CreateModelRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Translate\V3\Model $model): self - { - return (new self()) - ->setParent($parent) - ->setModel($model); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project name, in form of - * `projects/{project}/locations/{location}` - * @type \Google\Cloud\Translate\V3\Model $model - * Required. The Model to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project name, in form of - * `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. The project name, in form of - * `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; - } - - /** - * Required. The Model to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\Model|null - */ - public function getModel() - { - return $this->model; - } - - public function hasModel() - { - return isset($this->model); - } - - public function clearModel() - { - unset($this->model); - } - - /** - * Required. The Model to create. - * - * Generated from protobuf field .google.cloud.translation.v3.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\Model $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Model::class); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php deleted file mode 100644 index 4705c6e85305..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Dataset.php +++ /dev/null @@ -1,406 +0,0 @@ -google.cloud.translation.v3.Dataset - */ -class Dataset extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 3; - */ - protected $source_language_code = ''; - /** - * The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 4; - */ - protected $target_language_code = ''; - /** - * Output only. The number of examples in the dataset. - * - * Generated from protobuf field int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $example_count = 0; - /** - * Output only. Number of training examples (sentence pairs). - * - * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $train_example_count = 0; - /** - * Output only. Number of validation examples (sentence pairs). - * - * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $validate_example_count = 0; - /** - * Output only. Number of test examples (sentence pairs). - * - * Generated from protobuf field int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $test_example_count = 0; - /** - * Output only. Timestamp when this dataset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when this dataset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * @type string $display_name - * The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * @type string $source_language_code - * The BCP-47 language code of the source language. - * @type string $target_language_code - * The BCP-47 language code of the target language. - * @type int $example_count - * Output only. The number of examples in the dataset. - * @type int $train_example_count - * Output only. Number of training examples (sentence pairs). - * @type int $validate_example_count - * Output only. Number of validation examples (sentence pairs). - * @type int $test_example_count - * Output only. Number of test examples (sentence pairs). - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when this dataset was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when this dataset was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the dataset, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_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 name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name of the dataset to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * 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 BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 3; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 3; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 4; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 4; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - - /** - * Output only. The number of examples in the dataset. - * - * Generated from protobuf field int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getExampleCount() - { - return $this->example_count; - } - - /** - * Output only. The number of examples in the dataset. - * - * Generated from protobuf field int32 example_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->example_count = $var; - - return $this; - } - - /** - * Output only. Number of training examples (sentence pairs). - * - * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTrainExampleCount() - { - return $this->train_example_count; - } - - /** - * Output only. Number of training examples (sentence pairs). - * - * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTrainExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->train_example_count = $var; - - return $this; - } - - /** - * Output only. Number of validation examples (sentence pairs). - * - * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getValidateExampleCount() - { - return $this->validate_example_count; - } - - /** - * Output only. Number of validation examples (sentence pairs). - * - * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setValidateExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->validate_example_count = $var; - - return $this; - } - - /** - * Output only. Number of test examples (sentence pairs). - * - * Generated from protobuf field int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTestExampleCount() - { - return $this->test_example_count; - } - - /** - * Output only. Number of test examples (sentence pairs). - * - * Generated from protobuf field int32 test_example_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTestExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->test_example_count = $var; - - return $this; - } - - /** - * Output only. Timestamp when this dataset was created. - * - * 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. Timestamp when this dataset was created. - * - * 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. Timestamp when this dataset was last updated. - * - * 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. Timestamp when this dataset was last updated. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php deleted file mode 100644 index 638e7c4fb111..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.translation.v3.DatasetInputConfig - */ -class DatasetInputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Files containing the sentence pairs to be imported to the dataset. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.DatasetInputConfig.InputFile input_files = 1; - */ - private $input_files; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\DatasetInputConfig\InputFile>|\Google\Protobuf\Internal\RepeatedField $input_files - * Files containing the sentence pairs to be imported to the dataset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Files containing the sentence pairs to be imported to the dataset. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.DatasetInputConfig.InputFile input_files = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputFiles() - { - return $this->input_files; - } - - /** - * Files containing the sentence pairs to be imported to the dataset. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.DatasetInputConfig.InputFile input_files = 1; - * @param array<\Google\Cloud\Translate\V3\DatasetInputConfig\InputFile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\DatasetInputConfig\InputFile::class); - $this->input_files = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php deleted file mode 100644 index 42eba94de6ca..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetInputConfig/InputFile.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.translation.v3.DatasetInputConfig.InputFile - */ -class InputFile extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, - * or UNASSIGNED (by default) for auto split. - * - * Generated from protobuf field string usage = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $usage = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $usage - * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, - * or UNASSIGNED (by default) for auto split. - * @type \Google\Cloud\Translate\V3\GcsInputSource $gcs_source - * Google Cloud Storage file source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, - * or UNASSIGNED (by default) for auto split. - * - * Generated from protobuf field string usage = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUsage() - { - return $this->usage; - } - - /** - * Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, - * or UNASSIGNED (by default) for auto split. - * - * Generated from protobuf field string usage = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUsage($var) - { - GPBUtil::checkString($var, True); - $this->usage = $var; - - return $this; - } - - /** - * Google Cloud Storage file source. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_source = 3; - * @return \Google\Cloud\Translate\V3\GcsInputSource|null - */ - public function getGcsSource() - { - return $this->readOneof(3); - } - - public function hasGcsSource() - { - return $this->hasOneof(3); - } - - /** - * Google Cloud Storage file source. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_source = 3; - * @param \Google\Cloud\Translate\V3\GcsInputSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsInputSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InputFile::class, \Google\Cloud\Translate\V3\DatasetInputConfig_InputFile::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php deleted file mode 100644 index 876f96a2bbcd..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DatasetOutputConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.translation.v3.DatasetOutputConfig - */ -class DatasetOutputConfig extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GcsOutputDestination $gcs_destination - * Google Cloud Storage destination to write the output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage destination to write the output. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsOutputDestination gcs_destination = 1; - * @return \Google\Cloud\Translate\V3\GcsOutputDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * Google Cloud Storage destination to write the output. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsOutputDestination gcs_destination = 1; - * @param \Google\Cloud\Translate\V3\GcsOutputDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsOutputDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php deleted file mode 100644 index c0dbe46bc86c..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtDatasetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.DeleteAdaptiveMtDatasetRequest - */ -class DeleteAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * - * 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 dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\DeleteAdaptiveMtDatasetRequest - * - * @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 dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php deleted file mode 100644 index 4f3599a6c258..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteAdaptiveMtFileRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.DeleteAdaptiveMtFileRequest - */ -class DeleteAdaptiveMtFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the file to delete, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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 file to delete, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * Please see {@see TranslationServiceClient::adaptiveMtFileName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\DeleteAdaptiveMtFileRequest - * - * @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 file to delete, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the file to delete, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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 file to delete, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php deleted file mode 100644 index df3810c11948..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.translation.v3.DeleteDatasetMetadata - */ -class DeleteDatasetMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - */ - protected $state = 0; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Rpc\Status $error - * Only populated when operation doesn't succeed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The creation time of the 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 creation time of the 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 last 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 last 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; - } - - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Only populated when operation doesn't succeed. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php deleted file mode 100644 index 633edd278b4a..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteDatasetRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.DeleteDatasetRequest - */ -class DeleteDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the dataset 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 name of the dataset to delete. Please see - * {@see TranslationServiceClient::datasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\DeleteDatasetRequest - * - * @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 dataset to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the dataset 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 name of the dataset 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php deleted file mode 100644 index eb176da675a8..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryEntryRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.DeleteGlossaryEntryRequest - */ -class DeleteGlossaryEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the glossary entry 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 glossary entry to delete - * Please see {@see TranslationServiceClient::glossaryEntryName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\DeleteGlossaryEntryRequest - * - * @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 glossary entry to delete - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the glossary entry 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 glossary entry 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php deleted file mode 100644 index 4c4c6c924c29..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.translation.v3.DeleteGlossaryMetadata - */ -class DeleteGlossaryMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the glossary that is being deleted. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The current state of the glossary deletion operation. - * - * Generated from protobuf field .google.cloud.translation.v3.DeleteGlossaryMetadata.State state = 2; - */ - protected $state = 0; - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - */ - protected $submit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the glossary that is being deleted. - * @type int $state - * The current state of the glossary deletion operation. - * @type \Google\Protobuf\Timestamp $submit_time - * The time when the operation was submitted to the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the glossary that is being deleted. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the glossary that is being 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; - } - - /** - * The current state of the glossary deletion operation. - * - * Generated from protobuf field .google.cloud.translation.v3.DeleteGlossaryMetadata.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the glossary deletion operation. - * - * Generated from protobuf field .google.cloud.translation.v3.DeleteGlossaryMetadata.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\DeleteGlossaryMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php deleted file mode 100644 index 65fe6b5df28c..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryMetadata/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.DeleteGlossaryMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The glossary was successfully deleted. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Failed to delete the glossary. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Request is in the process of being canceled after caller invoked - * longrunning.Operations.CancelOperation on the request id. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The glossary deletion request was successfully canceled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Translate\V3\DeleteGlossaryMetadata_State::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php deleted file mode 100644 index 58522ba2b1df..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.DeleteGlossaryRequest - */ -class DeleteGlossaryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the glossary 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 name of the glossary to delete. Please see - * {@see TranslationServiceClient::glossaryName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\DeleteGlossaryRequest - * - * @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 glossary to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the glossary 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 name of the glossary 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php deleted file mode 100644 index d3bc457df686..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteGlossaryResponse.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.translation.v3.DeleteGlossaryResponse - */ -class DeleteGlossaryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the deleted glossary. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - */ - protected $submit_time = null; - /** - * The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the deleted glossary. - * @type \Google\Protobuf\Timestamp $submit_time - * The time when the operation was submitted to the server. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the deleted glossary. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the deleted glossary. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - - /** - * The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php deleted file mode 100644 index e60ed41d67f9..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.translation.v3.DeleteModelMetadata - */ -class DeleteModelMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - */ - protected $state = 0; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Rpc\Status $error - * Only populated when operation doesn't succeed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The creation time of the 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 creation time of the 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 last 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 last 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; - } - - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Only populated when operation doesn't succeed. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php deleted file mode 100644 index 5b76ab3676fd..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DeleteModelRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.DeleteModelRequest - */ -class DeleteModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the model 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 name of the model to delete. Please see - * {@see TranslationServiceClient::modelName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\DeleteModelRequest - * - * @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 model to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the model 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 name of the model 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php deleted file mode 100644 index 99ceeed57cdc..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageRequest.php +++ /dev/null @@ -1,326 +0,0 @@ -google.cloud.translation.v3.DetectLanguageRequest - */ -class DetectLanguageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Only models within the same region (has same location-id) can be used. - * Otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language detection model to be used. - * Format: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - * Only one language detection model is currently supported: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - * If not specified, the default model is used. - * - * Generated from protobuf field string model = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $model = ''; - /** - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mime_type = ''; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - protected $source; - - /** - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Only models within the same region (has same location-id) can be used. - * Otherwise an INVALID_ARGUMENT (400) error is returned. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string $model Optional. The language detection model to be used. - * - * Format: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - * - * Only one language detection model is currently supported: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - * - * If not specified, the default model is used. - * @param string $mimeType Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * @param string $content The content of the input stored as a string. - * - * @return \Google\Cloud\Translate\V3\DetectLanguageRequest - * - * @experimental - */ - public static function build(string $parent, string $model, string $mimeType, string $content): self - { - return (new self()) - ->setParent($parent) - ->setModel($model) - ->setMimeType($mimeType) - ->setContent($content); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Only models within the same region (has same location-id) can be used. - * Otherwise an INVALID_ARGUMENT (400) error is returned. - * @type string $model - * Optional. The language detection model to be used. - * Format: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - * Only one language detection model is currently supported: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - * If not specified, the default model is used. - * @type string $content - * The content of the input stored as a string. - * @type string $mime_type - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Only models within the same region (has same location-id) can be used. - * Otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Only models within the same region (has same location-id) can be used. - * Otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 5 [(.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 language detection model to be used. - * Format: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - * Only one language detection model is currently supported: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - * If not specified, the default model is used. - * - * Generated from protobuf field string model = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Optional. The language detection model to be used. - * Format: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - * Only one language detection model is currently supported: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - * If not specified, the default model is used. - * - * Generated from protobuf field string model = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * The content of the input stored as a string. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->readOneof(1); - } - - public function hasContent() - { - return $this->hasOneof(1); - } - - /** - * The content of the input stored as a string. - * - * Generated from protobuf field string content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * 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 with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * 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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php deleted file mode 100644 index 7bcf6ef7f395..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectLanguageResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.translation.v3.DetectLanguageResponse - */ -class DetectLanguageResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The most probable language detected by the Translation API. For each - * request, the Translation API will always return only one result. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.DetectedLanguage languages = 1; - */ - private $languages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $languages - * The most probable language detected by the Translation API. For each - * request, the Translation API will always return only one result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The most probable language detected by the Translation API. For each - * request, the Translation API will always return only one result. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.DetectedLanguage languages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguages() - { - return $this->languages; - } - - /** - * The most probable language detected by the Translation API. For each - * request, the Translation API will always return only one result. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.DetectedLanguage languages = 1; - * @param array<\Google\Cloud\Translate\V3\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\DetectedLanguage::class); - $this->languages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php deleted file mode 100644 index b0e30fd6ed85..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DetectedLanguage.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.translation.v3.DetectedLanguage - */ -class DetectedLanguage extends \Google\Protobuf\Internal\Message -{ - /** - * The ISO-639 language code of the source content in the request, detected - * automatically. - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * The confidence of the detection result for this language. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * The ISO-639 language code of the source content in the request, detected - * automatically. - * @type float $confidence - * The confidence of the detection result for this language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The ISO-639 language code of the source content in the request, detected - * automatically. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The ISO-639 language code of the source content in the request, detected - * automatically. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The confidence of the detection result for this language. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The confidence of the detection result for this language. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php deleted file mode 100644 index 2285639ebfcf..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentInputConfig.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.translation.v3.DocumentInputConfig - */ -class DocumentInputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the input document's mime_type. - * If not specified it will be determined using the file extension for - * gcs_source provided files. For a file provided through bytes content the - * mime_type must be provided. - * Currently supported mime types are: - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * - * Generated from protobuf field string mime_type = 4; - */ - protected $mime_type = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Document's content represented as a stream of bytes. - * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source - * Google Cloud Storage location. This must be a single file. - * For example: gs://example_bucket/example_file.pdf - * @type string $mime_type - * Specifies the input document's mime_type. - * If not specified it will be determined using the file extension for - * gcs_source provided files. For a file provided through bytes content the - * mime_type must be provided. - * Currently supported mime types are: - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Document's content represented as a stream of bytes. - * - * Generated from protobuf field bytes content = 1; - * @return string - */ - public function getContent() - { - return $this->readOneof(1); - } - - public function hasContent() - { - return $this->hasOneof(1); - } - - /** - * Document's content represented as a stream of bytes. - * - * Generated from protobuf field bytes content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Google Cloud Storage location. This must be a single file. - * For example: gs://example_bucket/example_file.pdf - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; - * @return \Google\Cloud\Translate\V3\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(2); - } - - public function hasGcsSource() - { - return $this->hasOneof(2); - } - - /** - * Google Cloud Storage location. This must be a single file. - * For example: gs://example_bucket/example_file.pdf - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; - * @param \Google\Cloud\Translate\V3\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Specifies the input document's mime_type. - * If not specified it will be determined using the file extension for - * gcs_source provided files. For a file provided through bytes content the - * mime_type must be provided. - * Currently supported mime types are: - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * - * Generated from protobuf field string mime_type = 4; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Specifies the input document's mime_type. - * If not specified it will be determined using the file extension for - * gcs_source provided files. For a file provided through bytes content the - * mime_type must be provided. - * Currently supported mime types are: - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * - * Generated from protobuf field string mime_type = 4; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php deleted file mode 100644 index 96a6346c7240..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentOutputConfig.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.translation.v3.DocumentOutputConfig - */ -class DocumentOutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Specifies the translated document's mime_type. - * If not specified, the translated file's mime type will be the same as the - * input file's mime type. - * Currently only support the output mime type to be the same as input mime - * type. - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mime_type = ''; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GcsDestination $gcs_destination - * Optional. Google Cloud Storage destination for the translation output, - * e.g., `gs://my_bucket/my_directory/`. - * The destination directory provided does not have to be empty, but the - * bucket must exist. If a file with the same name as the output file - * already exists in the destination an error will be returned. - * For a DocumentInputConfig.contents provided document, the output file - * will have the name "output_[trg]_translations.[ext]", where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * For a DocumentInputConfig.gcs_uri provided document, the output file will - * have a name according to its URI. For example: an input file with URI: - * `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name - * "my_bucket" will have an output URI: - * `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * If the document was directly provided through the request, then the - * output document will have the format: - * `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * If a glossary was provided, then the output URI for the glossary - * translation will be equal to the default output URI but have - * `glossary_translations` instead of `translations`. For the previous - * example, its glossary URI would be: - * `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. - * Thus the max number of output files will be 2 (Translated document, - * Glossary translated document). - * Callers should expect no partial outputs. If there is any error during - * document translation, no output will be stored in the Cloud Storage - * bucket. - * @type string $mime_type - * Optional. Specifies the translated document's mime_type. - * If not specified, the translated file's mime type will be the same as the - * input file's mime type. - * Currently only support the output mime type to be the same as input mime - * type. - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Google Cloud Storage destination for the translation output, - * e.g., `gs://my_bucket/my_directory/`. - * The destination directory provided does not have to be empty, but the - * bucket must exist. If a file with the same name as the output file - * already exists in the destination an error will be returned. - * For a DocumentInputConfig.contents provided document, the output file - * will have the name "output_[trg]_translations.[ext]", where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * For a DocumentInputConfig.gcs_uri provided document, the output file will - * have a name according to its URI. For example: an input file with URI: - * `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name - * "my_bucket" will have an output URI: - * `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * If the document was directly provided through the request, then the - * output document will have the format: - * `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * If a glossary was provided, then the output URI for the glossary - * translation will be equal to the default output URI but have - * `glossary_translations` instead of `translations`. For the previous - * example, its glossary URI would be: - * `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. - * Thus the max number of output files will be 2 (Translated document, - * Glossary translated document). - * Callers should expect no partial outputs. If there is any error during - * document translation, no output will be stored in the Cloud Storage - * bucket. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Translate\V3\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * Optional. Google Cloud Storage destination for the translation output, - * e.g., `gs://my_bucket/my_directory/`. - * The destination directory provided does not have to be empty, but the - * bucket must exist. If a file with the same name as the output file - * already exists in the destination an error will be returned. - * For a DocumentInputConfig.contents provided document, the output file - * will have the name "output_[trg]_translations.[ext]", where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * For a DocumentInputConfig.gcs_uri provided document, the output file will - * have a name according to its URI. For example: an input file with URI: - * `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name - * "my_bucket" will have an output URI: - * `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * If the document was directly provided through the request, then the - * output document will have the format: - * `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - * - [trg] corresponds to the translated file's language code, - * - [ext] corresponds to the translated file's extension according to its - * mime type. - * If a glossary was provided, then the output URI for the glossary - * translation will be equal to the default output URI but have - * `glossary_translations` instead of `translations`. For the previous - * example, its glossary URI would be: - * `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. - * Thus the max number of output files will be 2 (Translated document, - * Glossary translated document). - * Callers should expect no partial outputs. If there is any error during - * document translation, no output will be stored in the Cloud Storage - * bucket. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Translate\V3\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Specifies the translated document's mime_type. - * If not specified, the translated file's mime type will be the same as the - * input file's mime type. - * Currently only support the output mime type to be the same as input mime - * type. - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Optional. Specifies the translated document's mime_type. - * If not specified, the translated file's mime type will be the same as the - * input file's mime type. - * Currently only support the output mime type to be the same as input mime - * type. - * - application/pdf - * - application/vnd.openxmlformats-officedocument.wordprocessingml.document - * - application/vnd.openxmlformats-officedocument.presentationml.presentation - * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php deleted file mode 100644 index a03fe5adad20..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/DocumentTranslation.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.translation.v3.DocumentTranslation - */ -class DocumentTranslation extends \Google\Protobuf\Internal\Message -{ - /** - * The array of translated documents. It is expected to be size 1 for now. We - * may produce multiple translated documents in the future for other type of - * file formats. - * - * Generated from protobuf field repeated bytes byte_stream_outputs = 1; - */ - private $byte_stream_outputs; - /** - * The translated document's mime type. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - /** - * The detected language for the input document. - * If the user did not provide the source language for the input document, - * this field will have the language code automatically detected. If the - * source language was passed, auto-detection of the language does not occur - * and this field is empty. - * - * Generated from protobuf field string detected_language_code = 3; - */ - protected $detected_language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $byte_stream_outputs - * The array of translated documents. It is expected to be size 1 for now. We - * may produce multiple translated documents in the future for other type of - * file formats. - * @type string $mime_type - * The translated document's mime type. - * @type string $detected_language_code - * The detected language for the input document. - * If the user did not provide the source language for the input document, - * this field will have the language code automatically detected. If the - * source language was passed, auto-detection of the language does not occur - * and this field is empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The array of translated documents. It is expected to be size 1 for now. We - * may produce multiple translated documents in the future for other type of - * file formats. - * - * Generated from protobuf field repeated bytes byte_stream_outputs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getByteStreamOutputs() - { - return $this->byte_stream_outputs; - } - - /** - * The array of translated documents. It is expected to be size 1 for now. We - * may produce multiple translated documents in the future for other type of - * file formats. - * - * Generated from protobuf field repeated bytes byte_stream_outputs = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setByteStreamOutputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->byte_stream_outputs = $arr; - - return $this; - } - - /** - * The translated document's mime type. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The translated document's mime type. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * The detected language for the input document. - * If the user did not provide the source language for the input document, - * this field will have the language code automatically detected. If the - * source language was passed, auto-detection of the language does not occur - * and this field is empty. - * - * Generated from protobuf field string detected_language_code = 3; - * @return string - */ - public function getDetectedLanguageCode() - { - return $this->detected_language_code; - } - - /** - * The detected language for the input document. - * If the user did not provide the source language for the input document, - * this field will have the language code automatically detected. If the - * source language was passed, auto-detection of the language does not occur - * and this field is empty. - * - * Generated from protobuf field string detected_language_code = 3; - * @param string $var - * @return $this - */ - public function setDetectedLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->detected_language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php deleted file mode 100644 index 65ddb1da9f12..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Example.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.translation.v3.Example - */ -class Example extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the example, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Sentence in source language. - * - * Generated from protobuf field string source_text = 2; - */ - protected $source_text = ''; - /** - * Sentence in target language. - * - * Generated from protobuf field string target_text = 3; - */ - protected $target_text = ''; - /** - * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. - * - * Generated from protobuf field string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $usage = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the example, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` - * @type string $source_text - * Sentence in source language. - * @type string $target_text - * Sentence in target language. - * @type string $usage - * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the example, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}` - * - * 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 example, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_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; - } - - /** - * Sentence in source language. - * - * Generated from protobuf field string source_text = 2; - * @return string - */ - public function getSourceText() - { - return $this->source_text; - } - - /** - * Sentence in source language. - * - * Generated from protobuf field string source_text = 2; - * @param string $var - * @return $this - */ - public function setSourceText($var) - { - GPBUtil::checkString($var, True); - $this->source_text = $var; - - return $this; - } - - /** - * Sentence in target language. - * - * Generated from protobuf field string target_text = 3; - * @return string - */ - public function getTargetText() - { - return $this->target_text; - } - - /** - * Sentence in target language. - * - * Generated from protobuf field string target_text = 3; - * @param string $var - * @return $this - */ - public function setTargetText($var) - { - GPBUtil::checkString($var, True); - $this->target_text = $var; - - return $this; - } - - /** - * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. - * - * Generated from protobuf field string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUsage() - { - return $this->usage; - } - - /** - * Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST. - * - * Generated from protobuf field string usage = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUsage($var) - { - GPBUtil::checkString($var, True); - $this->usage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php deleted file mode 100644 index 71e5abba7065..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.translation.v3.ExportDataMetadata - */ -class ExportDataMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - */ - protected $state = 0; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Rpc\Status $error - * Only populated when operation doesn't succeed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The creation time of the 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 creation time of the 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 last 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 last 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; - } - - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Only populated when operation doesn't succeed. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php deleted file mode 100644 index a2871613aba5..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ExportDataRequest.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.translation.v3.ExportDataRequest - */ -class ExportDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset = ''; - /** - * Required. The config for the output content. - * - * Generated from protobuf field .google.cloud.translation.v3.DatasetOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - - /** - * @param string $dataset Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @param \Google\Cloud\Translate\V3\DatasetOutputConfig $outputConfig Required. The config for the output content. - * - * @return \Google\Cloud\Translate\V3\ExportDataRequest - * - * @experimental - */ - public static function build(string $dataset, \Google\Cloud\Translate\V3\DatasetOutputConfig $outputConfig): self - { - return (new self()) - ->setDataset($dataset) - ->setOutputConfig($outputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @type \Google\Cloud\Translate\V3\DatasetOutputConfig $output_config - * Required. The config for the output content. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Required. The config for the output content. - * - * Generated from protobuf field .google.cloud.translation.v3.DatasetOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\DatasetOutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The config for the output content. - * - * Generated from protobuf field .google.cloud.translation.v3.DatasetOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\DatasetOutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DatasetOutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php deleted file mode 100644 index 2faf57ac7171..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/FileInputSource.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.translation.v3.FileInputSource - */ -class FileInputSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The file's mime type. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mime_type = ''; - /** - * Required. The file's byte contents. - * - * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $content = ''; - /** - * Required. The file's display name. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mime_type - * Required. The file's mime type. - * @type string $content - * Required. The file's byte contents. - * @type string $display_name - * Required. The file's display name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The file's mime type. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Required. The file's mime type. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Required. The file's byte contents. - * - * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Required. The file's byte contents. - * - * Generated from protobuf field bytes content = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Required. The file's display name. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The file's display name. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php deleted file mode 100644 index 6294ede95c7d..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsDestination.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.translation.v3.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket used in 'output_uri_prefix' must exist and there must - * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with - * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one - * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error - * is returned. - * - * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri_prefix - * Required. The bucket used in 'output_uri_prefix' must exist and there must - * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with - * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one - * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error - * is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket used in 'output_uri_prefix' must exist and there must - * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with - * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one - * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error - * is returned. - * - * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Required. The bucket used in 'output_uri_prefix' must exist and there must - * be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with - * "/" and start with "gs://". One 'output_uri_prefix' can only be used by one - * batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error - * is returned. - * - * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php deleted file mode 100644 index e4f5d74d11d3..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsInputSource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.translation.v3.GcsInputSource - */ -class GcsInputSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * - * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_uri - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * - * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * - * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php deleted file mode 100644 index 81e9d86f3077..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsOutputDestination.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.translation.v3.GcsOutputDestination - */ -class GcsOutputDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Storage URI to output directory. For example, - * `gs://bucket/directory`. The requesting user must have write permission to - * the bucket. The directory will be created if it doesn't exist. - * - * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri_prefix - * Required. Google Cloud Storage URI to output directory. For example, - * `gs://bucket/directory`. The requesting user must have write permission to - * the bucket. The directory will be created if it doesn't exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Storage URI to output directory. For example, - * `gs://bucket/directory`. The requesting user must have write permission to - * the bucket. The directory will be created if it doesn't exist. - * - * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Required. Google Cloud Storage URI to output directory. For example, - * `gs://bucket/directory`. The requesting user must have write permission to - * the bucket. The directory will be created if it doesn't exist. - * - * Generated from protobuf field string output_uri_prefix = 1 [(.google.api.field_behavior) = REQUIRED]; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php deleted file mode 100644 index 9dfda6fc818a..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GcsSource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.translation.v3.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * - * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_uri - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * - * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Required. Source data URI. For example, `gs://my_bucket/my_object`. - * - * Generated from protobuf field string input_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php deleted file mode 100644 index 4107de1639f4..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtDatasetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.GetAdaptiveMtDatasetRequest - */ -class GetAdaptiveMtDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * - * 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 dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\GetAdaptiveMtDatasetRequest - * - * @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 dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php deleted file mode 100644 index 4020332cc0ce..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetAdaptiveMtFileRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.GetAdaptiveMtFileRequest - */ -class GetAdaptiveMtFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * Please see {@see TranslationServiceClient::adaptiveMtFileName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\GetAdaptiveMtFileRequest - * - * @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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php deleted file mode 100644 index 5b6d6b170012..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetDatasetRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.GetDatasetRequest - */ -class GetDatasetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the dataset 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 dataset to retrieve. Please see - * {@see TranslationServiceClient::datasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\GetDatasetRequest - * - * @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 dataset to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the dataset 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 dataset 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php deleted file mode 100644 index bcc45b5ca1f6..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryEntryRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.GetGlossaryEntryRequest - */ -class GetGlossaryEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the glossary entry to get - * - * 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 glossary entry to get - * Please see {@see TranslationServiceClient::glossaryEntryName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\GetGlossaryEntryRequest - * - * @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 glossary entry to get - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the glossary entry to get - * - * 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 glossary entry to get - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php deleted file mode 100644 index c4b68b01391c..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetGlossaryRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.GetGlossaryRequest - */ -class GetGlossaryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the glossary 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 name of the glossary to retrieve. Please see - * {@see TranslationServiceClient::glossaryName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\GetGlossaryRequest - * - * @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 glossary to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the glossary 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 name of the glossary 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php deleted file mode 100644 index 9484ddb5b7ce..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetModelRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.translation.v3.GetModelRequest - */ -class GetModelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the model 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 model to retrieve. Please see - * {@see TranslationServiceClient::modelName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\GetModelRequest - * - * @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 model to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the model 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 model 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php deleted file mode 100644 index 86dc2cda5a39..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GetSupportedLanguagesRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.translation.v3.GetSupportedLanguagesRequest - */ -class GetSupportedLanguagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for AutoML models. - * Only models within the same region (have same location-id) can be used, - * otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The language to use to return localized, human readable names - * of supported languages. If missing, then display names are not returned - * in a response. - * - * Generated from protobuf field string display_language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_language_code = ''; - /** - * Optional. Get supported languages of this model. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general NMT model. - * - * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $model = ''; - - /** - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Non-global location is required for AutoML models. - * - * Only models within the same region (have same location-id) can be used, - * otherwise an INVALID_ARGUMENT (400) error is returned. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string $model Optional. Get supported languages of this model. - * - * The format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general NMT model. - * @param string $displayLanguageCode Optional. The language to use to return localized, human readable names - * of supported languages. If missing, then display names are not returned - * in a response. - * - * @return \Google\Cloud\Translate\V3\GetSupportedLanguagesRequest - * - * @experimental - */ - public static function build(string $parent, string $model, string $displayLanguageCode): self - { - return (new self()) - ->setParent($parent) - ->setModel($model) - ->setDisplayLanguageCode($displayLanguageCode); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for AutoML models. - * Only models within the same region (have same location-id) can be used, - * otherwise an INVALID_ARGUMENT (400) error is returned. - * @type string $display_language_code - * Optional. The language to use to return localized, human readable names - * of supported languages. If missing, then display names are not returned - * in a response. - * @type string $model - * Optional. Get supported languages of this model. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general NMT model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for AutoML models. - * Only models within the same region (have same location-id) can be used, - * otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for AutoML models. - * Only models within the same region (have same location-id) can be used, - * otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 3 [(.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 language to use to return localized, human readable names - * of supported languages. If missing, then display names are not returned - * in a response. - * - * Generated from protobuf field string display_language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayLanguageCode() - { - return $this->display_language_code; - } - - /** - * Optional. The language to use to return localized, human readable names - * of supported languages. If missing, then display names are not returned - * in a response. - * - * Generated from protobuf field string display_language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->display_language_code = $var; - - return $this; - } - - /** - * Optional. Get supported languages of this model. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general NMT model. - * - * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Optional. Get supported languages of this model. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general NMT model. - * - * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php deleted file mode 100644 index dac3eb5708c2..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary.php +++ /dev/null @@ -1,350 +0,0 @@ -google.cloud.translation.v3.Glossary - */ -class Glossary extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Provides examples to build the glossary from. - * Total glossary must not exceed 10M Unicode codepoints. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryInputConfig input_config = 5; - */ - protected $input_config = null; - /** - * Output only. The number of entries defined in the glossary. - * - * Generated from protobuf field int32 entry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $entry_count = 0; - /** - * Output only. When CreateGlossary was called. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $submit_time = null; - /** - * Output only. When the glossary creation was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Optional. The display name of the glossary. - * - * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - protected $languages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. - * @type \Google\Cloud\Translate\V3\Glossary\LanguageCodePair $language_pair - * Used with unidirectional glossaries. - * @type \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet $language_codes_set - * Used with equivalent term set glossaries. - * @type \Google\Cloud\Translate\V3\GlossaryInputConfig $input_config - * Required. Provides examples to build the glossary from. - * Total glossary must not exceed 10M Unicode codepoints. - * @type int $entry_count - * Output only. The number of entries defined in the glossary. - * @type \Google\Protobuf\Timestamp $submit_time - * Output only. When CreateGlossary was called. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. When the glossary creation was finished. - * @type string $display_name - * Optional. The display name of the glossary. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. - * - * 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 glossary. Glossary names have the form - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. - * - * 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; - } - - /** - * Used with unidirectional glossaries. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodePair language_pair = 3; - * @return \Google\Cloud\Translate\V3\Glossary\LanguageCodePair|null - */ - public function getLanguagePair() - { - return $this->readOneof(3); - } - - public function hasLanguagePair() - { - return $this->hasOneof(3); - } - - /** - * Used with unidirectional glossaries. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodePair language_pair = 3; - * @param \Google\Cloud\Translate\V3\Glossary\LanguageCodePair $var - * @return $this - */ - public function setLanguagePair($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary\LanguageCodePair::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used with equivalent term set glossaries. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodesSet language_codes_set = 4; - * @return \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet|null - */ - public function getLanguageCodesSet() - { - return $this->readOneof(4); - } - - public function hasLanguageCodesSet() - { - return $this->hasOneof(4); - } - - /** - * Used with equivalent term set glossaries. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary.LanguageCodesSet language_codes_set = 4; - * @param \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet $var - * @return $this - */ - public function setLanguageCodesSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary\LanguageCodesSet::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Required. Provides examples to build the glossary from. - * Total glossary must not exceed 10M Unicode codepoints. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryInputConfig input_config = 5; - * @return \Google\Cloud\Translate\V3\GlossaryInputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Provides examples to build the glossary from. - * Total glossary must not exceed 10M Unicode codepoints. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryInputConfig input_config = 5; - * @param \Google\Cloud\Translate\V3\GlossaryInputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryInputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Output only. The number of entries defined in the glossary. - * - * Generated from protobuf field int32 entry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEntryCount() - { - return $this->entry_count; - } - - /** - * Output only. The number of entries defined in the glossary. - * - * Generated from protobuf field int32 entry_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEntryCount($var) - { - GPBUtil::checkInt32($var); - $this->entry_count = $var; - - return $this; - } - - /** - * Output only. When CreateGlossary was called. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * Output only. When CreateGlossary was called. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - - /** - * Output only. When the glossary creation was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.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. When the glossary creation was finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 8 [(.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; - } - - /** - * Optional. The display name of the glossary. - * - * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The display name of the glossary. - * - * Generated from protobuf field string display_name = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getLanguages() - { - return $this->whichOneof("languages"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php deleted file mode 100644 index 4b228dd3f157..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodePair.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.translation.v3.Glossary.LanguageCodePair - */ -class LanguageCodePair extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ISO-639 language code of the input text, for example, - * "en-US". Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field string source_language_code = 1; - */ - protected $source_language_code = ''; - /** - * Required. The ISO-639 language code for translation output, for example, - * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field string target_language_code = 2; - */ - protected $target_language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_language_code - * Required. The ISO-639 language code of the input text, for example, - * "en-US". Expected to be an exact match for GlossaryTerm.language_code. - * @type string $target_language_code - * Required. The ISO-639 language code for translation output, for example, - * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ISO-639 language code of the input text, for example, - * "en-US". Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field string source_language_code = 1; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Required. The ISO-639 language code of the input text, for example, - * "en-US". Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field string source_language_code = 1; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Required. The ISO-639 language code for translation output, for example, - * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field string target_language_code = 2; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * Required. The ISO-639 language code for translation output, for example, - * "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field string target_language_code = 2; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LanguageCodePair::class, \Google\Cloud\Translate\V3\Glossary_LanguageCodePair::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php deleted file mode 100644 index 164d340406c0..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Glossary/LanguageCodesSet.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.translation.v3.Glossary.LanguageCodesSet - */ -class LanguageCodesSet extends \Google\Protobuf\Internal\Message -{ - /** - * The ISO-639 language code(s) for terms defined in the glossary. - * All entries are unique. The list contains at least two entries. - * Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field repeated string language_codes = 1; - */ - private $language_codes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes - * The ISO-639 language code(s) for terms defined in the glossary. - * All entries are unique. The list contains at least two entries. - * Expected to be an exact match for GlossaryTerm.language_code. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The ISO-639 language code(s) for terms defined in the glossary. - * All entries are unique. The list contains at least two entries. - * Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field repeated string language_codes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageCodes() - { - return $this->language_codes; - } - - /** - * The ISO-639 language code(s) for terms defined in the glossary. - * All entries are unique. The list contains at least two entries. - * Expected to be an exact match for GlossaryTerm.language_code. - * - * Generated from protobuf field repeated string language_codes = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_codes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LanguageCodesSet::class, \Google\Cloud\Translate\V3\Glossary_LanguageCodesSet::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php deleted file mode 100644 index 334518294710..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.translation.v3.GlossaryEntry - */ -class GlossaryEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the entry. - * Format: - * `projects/*/locations/*/glossaries/*/glossaryEntries/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Describes the glossary entry. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the entry. - * Format: - * `projects/*/locations/*/glossaries/*/glossaryEntries/*` - * @type \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair $terms_pair - * Used for an unidirectional glossary. - * @type \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet $terms_set - * Used for an equivalent term sets glossary. - * @type string $description - * Describes the glossary entry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the entry. - * Format: - * `projects/*/locations/*/glossaries/*/glossaryEntries/*` - * - * 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 entry. - * Format: - * `projects/*/locations/*/glossaries/*/glossaryEntries/*` - * - * 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; - } - - /** - * Used for an unidirectional glossary. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair terms_pair = 2; - * @return \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair|null - */ - public function getTermsPair() - { - return $this->readOneof(2); - } - - public function hasTermsPair() - { - return $this->hasOneof(2); - } - - /** - * Used for an unidirectional glossary. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair terms_pair = 2; - * @param \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair $var - * @return $this - */ - public function setTermsPair($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsPair::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used for an equivalent term sets glossary. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet terms_set = 3; - * @return \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet|null - */ - public function getTermsSet() - { - return $this->readOneof(3); - } - - public function hasTermsSet() - { - return $this->hasOneof(3); - } - - /** - * Used for an equivalent term sets glossary. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet terms_set = 3; - * @param \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet $var - * @return $this - */ - public function setTermsSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry\GlossaryTermsSet::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Describes the glossary entry. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes the glossary entry. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php deleted file mode 100644 index 4d4839f22722..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsPair.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.translation.v3.GlossaryEntry.GlossaryTermsPair - */ -class GlossaryTermsPair extends \Google\Protobuf\Internal\Message -{ - /** - * The source term is the term that will get match in the text, - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm source_term = 1; - */ - protected $source_term = null; - /** - * The term that will replace the match source term. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm target_term = 2; - */ - protected $target_term = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GlossaryTerm $source_term - * The source term is the term that will get match in the text, - * @type \Google\Cloud\Translate\V3\GlossaryTerm $target_term - * The term that will replace the match source term. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * The source term is the term that will get match in the text, - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm source_term = 1; - * @return \Google\Cloud\Translate\V3\GlossaryTerm|null - */ - public function getSourceTerm() - { - return $this->source_term; - } - - public function hasSourceTerm() - { - return isset($this->source_term); - } - - public function clearSourceTerm() - { - unset($this->source_term); - } - - /** - * The source term is the term that will get match in the text, - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm source_term = 1; - * @param \Google\Cloud\Translate\V3\GlossaryTerm $var - * @return $this - */ - public function setSourceTerm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryTerm::class); - $this->source_term = $var; - - return $this; - } - - /** - * The term that will replace the match source term. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm target_term = 2; - * @return \Google\Cloud\Translate\V3\GlossaryTerm|null - */ - public function getTargetTerm() - { - return $this->target_term; - } - - public function hasTargetTerm() - { - return isset($this->target_term); - } - - public function clearTargetTerm() - { - unset($this->target_term); - } - - /** - * The term that will replace the match source term. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryTerm target_term = 2; - * @param \Google\Cloud\Translate\V3\GlossaryTerm $var - * @return $this - */ - public function setTargetTerm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryTerm::class); - $this->target_term = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GlossaryTermsPair::class, \Google\Cloud\Translate\V3\GlossaryEntry_GlossaryTermsPair::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php deleted file mode 100644 index a6c6e89c53d8..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryEntry/GlossaryTermsSet.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet - */ -class GlossaryTermsSet extends \Google\Protobuf\Internal\Message -{ - /** - * Each term in the set represents a term that can be replaced by the other - * terms. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryTerm terms = 1; - */ - private $terms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\GlossaryTerm>|\Google\Protobuf\Internal\RepeatedField $terms - * Each term in the set represents a term that can be replaced by the other - * terms. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * Each term in the set represents a term that can be replaced by the other - * terms. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryTerm terms = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTerms() - { - return $this->terms; - } - - /** - * Each term in the set represents a term that can be replaced by the other - * terms. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryTerm terms = 1; - * @param array<\Google\Cloud\Translate\V3\GlossaryTerm>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTerms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\GlossaryTerm::class); - $this->terms = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GlossaryTermsSet::class, \Google\Cloud\Translate\V3\GlossaryEntry_GlossaryTermsSet::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php deleted file mode 100644 index a58008342231..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryInputConfig.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.translation.v3.GlossaryInputConfig - */ -class GlossaryInputConfig extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source - * Required. Google Cloud Storage location of glossary data. - * File format is determined based on the filename extension. API returns - * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file - * formats. Wildcards are not allowed. This must be a single file in one of - * the following formats: - * For unidirectional glossaries: - * - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. - * The first column is source text. The second column is target text. - * No headers in this file. The first row contains data and not column - * names. - * - TMX (`.tmx`): TMX file with parallel data defining source/target term - * pairs. - * For equivalent term sets glossaries: - * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms - * in multiple languages. See documentation for more information - - * [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Storage location of glossary data. - * File format is determined based on the filename extension. API returns - * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file - * formats. Wildcards are not allowed. This must be a single file in one of - * the following formats: - * For unidirectional glossaries: - * - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. - * The first column is source text. The second column is target text. - * No headers in this file. The first row contains data and not column - * names. - * - TMX (`.tmx`): TMX file with parallel data defining source/target term - * pairs. - * For equivalent term sets glossaries: - * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms - * in multiple languages. See documentation for more information - - * [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; - * @return \Google\Cloud\Translate\V3\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * Required. Google Cloud Storage location of glossary data. - * File format is determined based on the filename extension. API returns - * [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file - * formats. Wildcards are not allowed. This must be a single file in one of - * the following formats: - * For unidirectional glossaries: - * - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. - * The first column is source text. The second column is target text. - * No headers in this file. The first row contains data and not column - * names. - * - TMX (`.tmx`): TMX file with parallel data defining source/target term - * pairs. - * For equivalent term sets glossaries: - * - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms - * in multiple languages. See documentation for more information - - * [glossaries](https://cloud.google.com/translate/docs/advanced/glossary). - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 1; - * @param \Google\Cloud\Translate\V3\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php deleted file mode 100644 index b0579a657ab5..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/GlossaryTerm.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.translation.v3.GlossaryTerm - */ -class GlossaryTerm extends \Google\Protobuf\Internal\Message -{ - /** - * The language for this glossary term. - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * The text for the glossary term. - * - * Generated from protobuf field string text = 2; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * The language for this glossary term. - * @type string $text - * The text for the glossary term. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * The language for this glossary term. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language for this glossary term. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The text for the glossary term. - * - * Generated from protobuf field string text = 2; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The text for the glossary term. - * - * Generated from protobuf field string text = 2; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php deleted file mode 100644 index 59bf3d43f5a8..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.translation.v3.ImportAdaptiveMtFileRequest - */ -class ImportAdaptiveMtFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $source; - - /** - * @param string $parent Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ImportAdaptiveMtFileRequest - * - * @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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - * @type \Google\Cloud\Translate\V3\FileInputSource $file_input_source - * Inline file source. - * @type \Google\Cloud\Translate\V3\GcsInputSource $gcs_input_source - * Google Cloud Storage file source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - * - * 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 file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - * - * 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; - } - - /** - * Inline file source. - * - * Generated from protobuf field .google.cloud.translation.v3.FileInputSource file_input_source = 2; - * @return \Google\Cloud\Translate\V3\FileInputSource|null - */ - public function getFileInputSource() - { - return $this->readOneof(2); - } - - public function hasFileInputSource() - { - return $this->hasOneof(2); - } - - /** - * Inline file source. - * - * Generated from protobuf field .google.cloud.translation.v3.FileInputSource file_input_source = 2; - * @param \Google\Cloud\Translate\V3\FileInputSource $var - * @return $this - */ - public function setFileInputSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\FileInputSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Google Cloud Storage file source. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_input_source = 3; - * @return \Google\Cloud\Translate\V3\GcsInputSource|null - */ - public function getGcsInputSource() - { - return $this->readOneof(3); - } - - public function hasGcsInputSource() - { - return $this->hasOneof(3); - } - - /** - * Google Cloud Storage file source. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsInputSource gcs_input_source = 3; - * @param \Google\Cloud\Translate\V3\GcsInputSource $var - * @return $this - */ - public function setGcsInputSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsInputSource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php deleted file mode 100644 index 807aa40206d0..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportAdaptiveMtFileResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.translation.v3.ImportAdaptiveMtFileResponse - */ -class ImportAdaptiveMtFileResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Adaptive MT file that was imported. - * - * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $adaptive_mt_file = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\AdaptiveMtFile $adaptive_mt_file - * Output only. The Adaptive MT file that was imported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Adaptive MT file that was imported. - * - * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Translate\V3\AdaptiveMtFile|null - */ - public function getAdaptiveMtFile() - { - return $this->adaptive_mt_file; - } - - public function hasAdaptiveMtFile() - { - return isset($this->adaptive_mt_file); - } - - public function clearAdaptiveMtFile() - { - unset($this->adaptive_mt_file); - } - - /** - * Output only. The Adaptive MT file that was imported. - * - * Generated from protobuf field .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Translate\V3\AdaptiveMtFile $var - * @return $this - */ - public function setAdaptiveMtFile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\AdaptiveMtFile::class); - $this->adaptive_mt_file = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php deleted file mode 100644 index da2332653b27..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataMetadata.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.translation.v3.ImportDataMetadata - */ -class ImportDataMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - */ - protected $state = 0; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The current state of the operation. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * @type \Google\Rpc\Status $error - * Only populated when operation doesn't succeed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the operation. - * - * Generated from protobuf field .google.cloud.translation.v3.OperationState state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The creation time of the 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 creation time of the 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 last 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 last 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; - } - - /** - * Only populated when operation doesn't succeed. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Only populated when operation doesn't succeed. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php deleted file mode 100644 index 2511822eb678..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ImportDataRequest.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.translation.v3.ImportDataRequest - */ -class ImportDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dataset = ''; - /** - * Required. The config for the input content. - * - * Generated from protobuf field .google.cloud.translation.v3.DatasetInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - - /** - * @param string $dataset Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @param \Google\Cloud\Translate\V3\DatasetInputConfig $inputConfig Required. The config for the input content. - * - * @return \Google\Cloud\Translate\V3\ImportDataRequest - * - * @experimental - */ - public static function build(string $dataset, \Google\Cloud\Translate\V3\DatasetInputConfig $inputConfig): self - { - return (new self()) - ->setDataset($dataset) - ->setInputConfig($inputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @type \Google\Cloud\Translate\V3\DatasetInputConfig $input_config - * Required. The config for the input content. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Required. The config for the input content. - * - * Generated from protobuf field .google.cloud.translation.v3.DatasetInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\DatasetInputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. The config for the input content. - * - * Generated from protobuf field .google.cloud.translation.v3.DatasetInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\DatasetInputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DatasetInputConfig::class); - $this->input_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php deleted file mode 100644 index ced50d3a94bb..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/InputConfig.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.translation.v3.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Can be "text/plain" or "text/html". - * For `.tsv`, "text/html" is used if mime_type is missing. - * For `.html`, this field must be "text/html" or empty. - * For `.txt`, this field must be "text/plain" or empty. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mime_type = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mime_type - * Optional. Can be "text/plain" or "text/html". - * For `.tsv`, "text/html" is used if mime_type is missing. - * For `.html`, this field must be "text/html" or empty. - * For `.txt`, this field must be "text/plain" or empty. - * @type \Google\Cloud\Translate\V3\GcsSource $gcs_source - * Required. Google Cloud Storage location for the source input. - * This can be a single file (for example, - * `gs://translation-test/input.tsv`) or a wildcard (for example, - * `gs://translation-test/*`). If a file extension is `.tsv`, it can - * contain either one or two columns. The first column (optional) is the id - * of the text request. If the first column is missing, we use the row - * number (0-based) from the input file as the ID in the output file. The - * second column is the actual text to be - * translated. We recommend each row be <= 10K Unicode codepoints, - * otherwise an error might be returned. - * Note that the input tsv must be RFC 4180 compliant. - * You could use https://github.com/Clever/csvlint to check potential - * formatting errors in your tsv file. - * csvlint --delimiter='\t' your_input_file.tsv - * The other supported file extensions are `.txt` or `.html`, which is - * treated as a single large chunk of text. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Can be "text/plain" or "text/html". - * For `.tsv`, "text/html" is used if mime_type is missing. - * For `.html`, this field must be "text/html" or empty. - * For `.txt`, this field must be "text/plain" or empty. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Optional. Can be "text/plain" or "text/html". - * For `.tsv`, "text/html" is used if mime_type is missing. - * For `.html`, this field must be "text/html" or empty. - * For `.txt`, this field must be "text/plain" or empty. - * - * Generated from protobuf field string mime_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Required. Google Cloud Storage location for the source input. - * This can be a single file (for example, - * `gs://translation-test/input.tsv`) or a wildcard (for example, - * `gs://translation-test/*`). If a file extension is `.tsv`, it can - * contain either one or two columns. The first column (optional) is the id - * of the text request. If the first column is missing, we use the row - * number (0-based) from the input file as the ID in the output file. The - * second column is the actual text to be - * translated. We recommend each row be <= 10K Unicode codepoints, - * otherwise an error might be returned. - * Note that the input tsv must be RFC 4180 compliant. - * You could use https://github.com/Clever/csvlint to check potential - * formatting errors in your tsv file. - * csvlint --delimiter='\t' your_input_file.tsv - * The other supported file extensions are `.txt` or `.html`, which is - * treated as a single large chunk of text. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; - * @return \Google\Cloud\Translate\V3\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(2); - } - - public function hasGcsSource() - { - return $this->hasOneof(2); - } - - /** - * Required. Google Cloud Storage location for the source input. - * This can be a single file (for example, - * `gs://translation-test/input.tsv`) or a wildcard (for example, - * `gs://translation-test/*`). If a file extension is `.tsv`, it can - * contain either one or two columns. The first column (optional) is the id - * of the text request. If the first column is missing, we use the row - * number (0-based) from the input file as the ID in the output file. The - * second column is the actual text to be - * translated. We recommend each row be <= 10K Unicode codepoints, - * otherwise an error might be returned. - * Note that the input tsv must be RFC 4180 compliant. - * You could use https://github.com/Clever/csvlint to check potential - * formatting errors in your tsv file. - * csvlint --delimiter='\t' your_input_file.tsv - * The other supported file extensions are `.txt` or `.html`, which is - * treated as a single large chunk of text. - * - * Generated from protobuf field .google.cloud.translation.v3.GcsSource gcs_source = 2; - * @param \Google\Cloud\Translate\V3\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsSource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php deleted file mode 100644 index d056833ac952..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsRequest.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.translation.v3.ListAdaptiveMtDatasetsRequest - */ -class ListAdaptiveMtDatasetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project from which to list the Adaptive - * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. The server may return fewer results than - * requested. If unspecified, the server picks an appropriate default. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtDatasetsResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtDatasets` method. The first page is - * returned if `page_token`is empty or missing. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. An expression for filtering the results of the request. - * Filter is not supported yet. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the project from which to list the Adaptive - * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListAdaptiveMtDatasetsRequest - * - * @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 the Adaptive - * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - * @type int $page_size - * Optional. Requested page size. The server may return fewer results than - * requested. If unspecified, the server picks an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Typically, this is the value of - * ListAdaptiveMtDatasetsResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtDatasets` method. The first page is - * returned if `page_token`is empty or missing. - * @type string $filter - * Optional. An expression for filtering the results of the request. - * Filter is not supported yet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project from which to list the Adaptive - * MT datasets. `projects/{project-number-or-id}/locations/{location-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 of the project from which to list the Adaptive - * MT datasets. `projects/{project-number-or-id}/locations/{location-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. Requested page size. The server may return fewer results than - * requested. If unspecified, the server picks an appropriate default. - * - * 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. The server may return fewer results than - * requested. If unspecified, the server picks an appropriate default. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtDatasetsResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtDatasets` method. The first page is - * returned if `page_token`is empty or missing. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtDatasetsResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtDatasets` method. The first page is - * returned if `page_token`is empty or missing. - * - * 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. An expression for filtering the results of the request. - * Filter is not supported yet. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the request. - * Filter is not supported yet. - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php deleted file mode 100644 index 6aa796807558..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtDatasetsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse - */ -class ListAdaptiveMtDatasetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A list of Adaptive MT datasets. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_datasets = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $adaptive_mt_datasets; - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to - * `ListAdaptiveMtDatasets` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtDataset>|\Google\Protobuf\Internal\RepeatedField $adaptive_mt_datasets - * Output only. A list of Adaptive MT datasets. - * @type string $next_page_token - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to - * `ListAdaptiveMtDatasets` method to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A list of Adaptive MT datasets. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_datasets = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdaptiveMtDatasets() - { - return $this->adaptive_mt_datasets; - } - - /** - * Output only. A list of Adaptive MT datasets. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtDataset adaptive_mt_datasets = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtDataset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdaptiveMtDatasets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtDataset::class); - $this->adaptive_mt_datasets = $arr; - - return $this; - } - - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to - * `ListAdaptiveMtDatasets` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to - * `ListAdaptiveMtDatasets` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php deleted file mode 100644 index 414b8a8f221e..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.translation.v3.ListAdaptiveMtFilesRequest - */ -class ListAdaptiveMtFilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project from which to list the Adaptive - * MT files. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtFilesResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtFiles` method. The first page is - * returned if `page_token`is empty or missing. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the project from which to list the Adaptive - * MT files. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * Please see {@see TranslationServiceClient::adaptiveMtDatasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListAdaptiveMtFilesRequest - * - * @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 the Adaptive - * MT files. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * @type int $page_size - * Optional. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Typically, this is the value of - * ListAdaptiveMtFilesResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtFiles` method. The first page is - * returned if `page_token`is empty or missing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project from which to list the Adaptive - * MT files. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * - * 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 from which to list the Adaptive - * MT files. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * - * 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. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtFilesResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtFiles` method. The first page is - * returned if `page_token`is empty or missing. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtFilesResponse.next_page_token returned from the - * previous call to `ListAdaptiveMtFiles` method. The first page is - * returned if `page_token`is empty or missing. - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php deleted file mode 100644 index 8f62be3dc154..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtFilesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.translation.v3.ListAdaptiveMtFilesResponse - */ -class ListAdaptiveMtFilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Adaptive MT files. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_files = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $adaptive_mt_files; - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to - * `ListAdaptiveMtFiles` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtFile>|\Google\Protobuf\Internal\RepeatedField $adaptive_mt_files - * Output only. The Adaptive MT files. - * @type string $next_page_token - * Optional. A token to retrieve a page of results. Pass this value in the - * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to - * `ListAdaptiveMtFiles` method to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Adaptive MT files. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_files = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdaptiveMtFiles() - { - return $this->adaptive_mt_files; - } - - /** - * Output only. The Adaptive MT files. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtFile adaptive_mt_files = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtFile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdaptiveMtFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtFile::class); - $this->adaptive_mt_files = $arr; - - return $this; - } - - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to - * `ListAdaptiveMtFiles` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * ListAdaptiveMtFilesRequest.page_token field in the subsequent call to - * `ListAdaptiveMtFiles` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php deleted file mode 100644 index dc0a5b6eca60..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.translation.v3.ListAdaptiveMtSentencesRequest - */ -class ListAdaptiveMtSentencesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project from which to list the Adaptive - * MT files. The following format lists all sentences under a file. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * The following format lists all sentences within a dataset. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * Typically, this is the value of - * ListAdaptiveMtSentencesRequest.next_page_token returned from the - * previous call to `ListTranslationMemories` method. The first page is - * returned if `page_token` is empty or missing. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the project from which to list the Adaptive - * MT files. The following format lists all sentences under a file. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * The following format lists all sentences within a dataset. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * Please see {@see TranslationServiceClient::adaptiveMtFileName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListAdaptiveMtSentencesRequest - * - * @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 the Adaptive - * MT files. The following format lists all sentences under a file. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * The following format lists all sentences within a dataset. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * @type int $page_size - * @type string $page_token - * A token identifying a page of results the server should return. - * Typically, this is the value of - * ListAdaptiveMtSentencesRequest.next_page_token returned from the - * previous call to `ListTranslationMemories` method. The first page is - * returned if `page_token` is empty or missing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project from which to list the Adaptive - * MT files. The following format lists all sentences under a file. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * The following format lists all sentences within a dataset. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * - * 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 from which to list the Adaptive - * MT files. The following format lists all sentences under a file. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * The following format lists all sentences within a dataset. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * - * 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; - } - - /** - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->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; - } - - /** - * A token identifying a page of results the server should return. - * Typically, this is the value of - * ListAdaptiveMtSentencesRequest.next_page_token returned from the - * previous call to `ListTranslationMemories` method. The first page is - * returned if `page_token` is empty or missing. - * - * 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. - * Typically, this is the value of - * ListAdaptiveMtSentencesRequest.next_page_token returned from the - * previous call to `ListTranslationMemories` method. The first page is - * returned if `page_token` is empty or missing. - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php deleted file mode 100644 index 86d22bc4b9e1..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListAdaptiveMtSentencesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.translation.v3.ListAdaptiveMtSentencesResponse - */ -class ListAdaptiveMtSentencesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of AdaptiveMtSentences. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtSentence adaptive_mt_sentences = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $adaptive_mt_sentences; - /** - * Optional. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\AdaptiveMtSentence>|\Google\Protobuf\Internal\RepeatedField $adaptive_mt_sentences - * Output only. The list of AdaptiveMtSentences. - * @type string $next_page_token - * Optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AdaptiveMt::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of AdaptiveMtSentences. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtSentence adaptive_mt_sentences = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdaptiveMtSentences() - { - return $this->adaptive_mt_sentences; - } - - /** - * Output only. The list of AdaptiveMtSentences. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.AdaptiveMtSentence adaptive_mt_sentences = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Translate\V3\AdaptiveMtSentence>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdaptiveMtSentences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\AdaptiveMtSentence::class); - $this->adaptive_mt_sentences = $arr; - - return $this; - } - - /** - * Optional. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Optional. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php deleted file mode 100644 index 9fec40ecfcc6..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.translation.v3.ListDatasetsRequest - */ -class ListDatasetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. The server can return fewer results than - * requested. - * - * 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 for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListDatasets call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListDatasetsRequest - * - * @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. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * @type int $page_size - * Optional. Requested page size. The server can return fewer results than - * requested. - * @type string $page_token - * Optional. A token identifying a page of results for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListDatasets call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-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. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-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. Requested page size. The server can return fewer results than - * requested. - * - * 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. The server can return fewer results than - * requested. - * - * 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 for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListDatasets call. - * - * 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 for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListDatasets 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php deleted file mode 100644 index eabcc76ff92e..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListDatasetsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.translation.v3.ListDatasetsResponse - */ -class ListDatasetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The datasets read. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Dataset datasets = 1; - */ - private $datasets; - /** - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListDatasetsRequest to - * obtain the corresponding page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\Dataset>|\Google\Protobuf\Internal\RepeatedField $datasets - * The datasets read. - * @type string $next_page_token - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListDatasetsRequest to - * obtain the corresponding page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The datasets read. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Dataset datasets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatasets() - { - return $this->datasets; - } - - /** - * The datasets read. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Dataset datasets = 1; - * @param array<\Google\Cloud\Translate\V3\Dataset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatasets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Dataset::class); - $this->datasets = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListDatasetsRequest to - * obtain the corresponding 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 this token to the page_token field in the ListDatasetsRequest to - * obtain the corresponding 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php deleted file mode 100644 index 3f4dee718cd0..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.translation.v3.ListExamplesRequest - */ -class ListExamplesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. An expression for filtering the examples that will be returned. - * Example filter: - * * `usage=TRAIN` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Requested page size. The server can return fewer results than - * requested. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListExamples call. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of the parent dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * Please see {@see TranslationServiceClient::datasetName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListExamplesRequest - * - * @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. Name of the parent dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @type string $filter - * Optional. An expression for filtering the examples that will be returned. - * Example filter: - * * `usage=TRAIN` - * @type int $page_size - * Optional. Requested page size. The server can return fewer results than - * requested. - * @type string $page_token - * Optional. A token identifying a page of results for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListExamples call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-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. Name of the parent dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-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. An expression for filtering the examples that will be returned. - * Example filter: - * * `usage=TRAIN` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the examples that will be returned. - * Example filter: - * * `usage=TRAIN` - * - * 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. Requested page size. The server can return fewer results than - * requested. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. The server can return fewer results than - * requested. - * - * 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 token identifying a page of results for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListExamples call. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListExamples call. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php deleted file mode 100644 index b4ce65bbb934..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListExamplesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.translation.v3.ListExamplesResponse - */ -class ListExamplesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The sentence pairs. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Example examples = 1; - */ - private $examples; - /** - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListExamplesRequest to - * obtain the corresponding page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\Example>|\Google\Protobuf\Internal\RepeatedField $examples - * The sentence pairs. - * @type string $next_page_token - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListExamplesRequest to - * obtain the corresponding page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The sentence pairs. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Example examples = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExamples() - { - return $this->examples; - } - - /** - * The sentence pairs. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Example examples = 1; - * @param array<\Google\Cloud\Translate\V3\Example>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExamples($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Example::class); - $this->examples = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListExamplesRequest to - * obtain the corresponding 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 this token to the page_token field in the ListExamplesRequest to - * obtain the corresponding 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php deleted file mode 100644 index 732d892af976..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesRequest.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.translation.v3.ListGlossariesRequest - */ -class ListGlossariesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project from which to list all of the glossaries. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. The server may return fewer glossaries than - * requested. If unspecified, the server picks an appropriate default. - * - * 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. - * Typically, this is the value of [ListGlossariesResponse.next_page_token] - * returned from the previous call to `ListGlossaries` method. - * The first page is returned if `page_token`is empty or missing. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter specifying constraints of a list operation. - * Specify the constraint by the format of "key=value", where key must be - * "src" or "tgt", and the value must be a valid language code. - * For multiple restrictions, concatenate them by "AND" (uppercase only), - * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - * here, which means using 'en-US' and 'en' can lead to different results, - * which depends on the language code you used when you create the glossary. - * For the unidirectional glossaries, the "src" and "tgt" add restrictions - * on the source and target language code separately. - * For the equivalent term set glossaries, the "src" and/or "tgt" add - * restrictions on the term set. - * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - * glossaries which exactly match the source language code as "en-US" and the - * target language code "zh-CN", but all equivalent term set glossaries which - * contain "en-US" and "zh-CN" in their language set will be picked. - * If missing, no filtering is performed. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The name of the project from which to list all of the glossaries. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListGlossariesRequest - * - * @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 from which to list all of the glossaries. - * @type int $page_size - * Optional. Requested page size. The server may return fewer glossaries than - * requested. If unspecified, the server picks an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Typically, this is the value of [ListGlossariesResponse.next_page_token] - * returned from the previous call to `ListGlossaries` method. - * The first page is returned if `page_token`is empty or missing. - * @type string $filter - * Optional. Filter specifying constraints of a list operation. - * Specify the constraint by the format of "key=value", where key must be - * "src" or "tgt", and the value must be a valid language code. - * For multiple restrictions, concatenate them by "AND" (uppercase only), - * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - * here, which means using 'en-US' and 'en' can lead to different results, - * which depends on the language code you used when you create the glossary. - * For the unidirectional glossaries, the "src" and "tgt" add restrictions - * on the source and target language code separately. - * For the equivalent term set glossaries, the "src" and/or "tgt" add - * restrictions on the term set. - * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - * glossaries which exactly match the source language code as "en-US" and the - * target language code "zh-CN", but all equivalent term set glossaries which - * contain "en-US" and "zh-CN" in their language set will be picked. - * If missing, no filtering is performed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project from which to list all of the glossaries. - * - * 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 from which to list all of the glossaries. - * - * 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. The server may return fewer glossaries than - * requested. If unspecified, the server picks an appropriate default. - * - * 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. The server may return fewer glossaries than - * requested. If unspecified, the server picks an appropriate default. - * - * 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. - * Typically, this is the value of [ListGlossariesResponse.next_page_token] - * returned from the previous call to `ListGlossaries` method. - * The first page is returned if `page_token`is empty or missing. - * - * 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. - * Typically, this is the value of [ListGlossariesResponse.next_page_token] - * returned from the previous call to `ListGlossaries` method. - * The first page is returned if `page_token`is empty or missing. - * - * 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. Filter specifying constraints of a list operation. - * Specify the constraint by the format of "key=value", where key must be - * "src" or "tgt", and the value must be a valid language code. - * For multiple restrictions, concatenate them by "AND" (uppercase only), - * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - * here, which means using 'en-US' and 'en' can lead to different results, - * which depends on the language code you used when you create the glossary. - * For the unidirectional glossaries, the "src" and "tgt" add restrictions - * on the source and target language code separately. - * For the equivalent term set glossaries, the "src" and/or "tgt" add - * restrictions on the term set. - * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - * glossaries which exactly match the source language code as "en-US" and the - * target language code "zh-CN", but all equivalent term set glossaries which - * contain "en-US" and "zh-CN" in their language set will be picked. - * If missing, no filtering is performed. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter specifying constraints of a list operation. - * Specify the constraint by the format of "key=value", where key must be - * "src" or "tgt", and the value must be a valid language code. - * For multiple restrictions, concatenate them by "AND" (uppercase only), - * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - * here, which means using 'en-US' and 'en' can lead to different results, - * which depends on the language code you used when you create the glossary. - * For the unidirectional glossaries, the "src" and "tgt" add restrictions - * on the source and target language code separately. - * For the equivalent term set glossaries, the "src" and/or "tgt" add - * restrictions on the term set. - * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - * glossaries which exactly match the source language code as "en-US" and the - * target language code "zh-CN", but all equivalent term set glossaries which - * contain "en-US" and "zh-CN" in their language set will be picked. - * If missing, no filtering is performed. - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php deleted file mode 100644 index 4671da068fa9..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossariesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.translation.v3.ListGlossariesResponse - */ -class ListGlossariesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of glossaries for a project. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Glossary glossaries = 1; - */ - private $glossaries; - /** - * A token to retrieve a page of results. Pass this value in the - * [ListGlossariesRequest.page_token] field in the subsequent call to - * `ListGlossaries` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\Glossary>|\Google\Protobuf\Internal\RepeatedField $glossaries - * The list of glossaries for a project. - * @type string $next_page_token - * A token to retrieve a page of results. Pass this value in the - * [ListGlossariesRequest.page_token] field in the subsequent call to - * `ListGlossaries` method to retrieve the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The list of glossaries for a project. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Glossary glossaries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGlossaries() - { - return $this->glossaries; - } - - /** - * The list of glossaries for a project. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Glossary glossaries = 1; - * @param array<\Google\Cloud\Translate\V3\Glossary>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGlossaries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Glossary::class); - $this->glossaries = $arr; - - return $this; - } - - /** - * A token to retrieve a page of results. Pass this value in the - * [ListGlossariesRequest.page_token] field in the subsequent call to - * `ListGlossaries` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve a page of results. Pass this value in the - * [ListGlossariesRequest.page_token] field in the subsequent call to - * `ListGlossaries` method to retrieve the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php deleted file mode 100644 index ee2cc959c6b2..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.translation.v3.ListGlossaryEntriesRequest - */ -class ListGlossaryEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent glossary resource name for listing the glossary's - * entries. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. The server may return fewer glossary entries - * than requested. If unspecified, the server picks an appropriate default. - * - * 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. - * Typically, this is the value of - * [ListGlossaryEntriesResponse.next_page_token] returned from the previous - * call. The first page is returned if `page_token`is empty or missing. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent glossary resource name for listing the glossary's - * entries. Please see - * {@see TranslationServiceClient::glossaryName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListGlossaryEntriesRequest - * - * @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 glossary resource name for listing the glossary's - * entries. - * @type int $page_size - * Optional. Requested page size. The server may return fewer glossary entries - * than requested. If unspecified, the server picks an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * Typically, this is the value of - * [ListGlossaryEntriesResponse.next_page_token] returned from the previous - * call. The first page is returned if `page_token`is empty or missing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent glossary resource name for listing the glossary's - * entries. - * - * 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 glossary resource name for listing the glossary's - * entries. - * - * 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. The server may return fewer glossary entries - * than requested. If unspecified, the server picks an appropriate default. - * - * 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. The server may return fewer glossary entries - * than requested. If unspecified, the server picks an appropriate default. - * - * 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. - * Typically, this is the value of - * [ListGlossaryEntriesResponse.next_page_token] returned from the previous - * call. The first page is returned if `page_token`is empty or missing. - * - * 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. - * Typically, this is the value of - * [ListGlossaryEntriesResponse.next_page_token] returned from the previous - * call. The first page is returned if `page_token`is empty or missing. - * - * 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php deleted file mode 100644 index fb54f7a450c5..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListGlossaryEntriesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.translation.v3.ListGlossaryEntriesResponse - */ -class ListGlossaryEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Glossary Entries - * - * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryEntry glossary_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $glossary_entries; - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\GlossaryEntry>|\Google\Protobuf\Internal\RepeatedField $glossary_entries - * Optional. The Glossary Entries - * @type string $next_page_token - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Glossary Entries - * - * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryEntry glossary_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGlossaryEntries() - { - return $this->glossary_entries; - } - - /** - * Optional. The Glossary Entries - * - * Generated from protobuf field repeated .google.cloud.translation.v3.GlossaryEntry glossary_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Translate\V3\GlossaryEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGlossaryEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\GlossaryEntry::class); - $this->glossary_entries = $arr; - - return $this; - } - - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Optional. A token to retrieve a page of results. Pass this value in the - * [ListGLossaryEntriesRequest.page_token] field in the subsequent calls. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php deleted file mode 100644 index 0ecd1f15ed6e..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.translation.v3.ListModelsRequest - */ -class ListModelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. An expression for filtering the models that will be returned. - * Supported filter: - * `dataset_id=${dataset_id}` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Requested page size. The server can return fewer results than - * requested. - * - * 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 for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListModels call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * Please see {@see TranslationServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Translate\V3\ListModelsRequest - * - * @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. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * @type string $filter - * Optional. An expression for filtering the models that will be returned. - * Supported filter: - * `dataset_id=${dataset_id}` - * @type int $page_size - * Optional. Requested page size. The server can return fewer results than - * requested. - * @type string $page_token - * Optional. A token identifying a page of results for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListModels call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-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. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-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. An expression for filtering the models that will be returned. - * Supported filter: - * `dataset_id=${dataset_id}` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the models that will be returned. - * Supported filter: - * `dataset_id=${dataset_id}` - * - * 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; - } - - /** - * Optional. Requested page size. The server can return fewer results than - * requested. - * - * 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. The server can return fewer results than - * requested. - * - * 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 for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListModels call. - * - * 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 for the server to return. - * Typically obtained from next_page_token field in the response of a - * ListModels 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php deleted file mode 100644 index 6b412ee82d54..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/ListModelsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.translation.v3.ListModelsResponse - */ -class ListModelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The models read. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Model models = 1; - */ - private $models; - /** - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListModelsRequest to - * obtain the corresponding page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\Model>|\Google\Protobuf\Internal\RepeatedField $models - * The models read. - * @type string $next_page_token - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListModelsRequest to - * obtain the corresponding page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The models read. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Model models = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModels() - { - return $this->models; - } - - /** - * The models read. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Model models = 1; - * @param array<\Google\Cloud\Translate\V3\Model>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Model::class); - $this->models = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * Pass this token to the page_token field in the ListModelsRequest to - * obtain the corresponding 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 this token to the page_token field in the ListModelsRequest to - * obtain the corresponding 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php deleted file mode 100644 index a71a45c1b211..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Model.php +++ /dev/null @@ -1,417 +0,0 @@ -google.cloud.translation.v3.Model - */ -class Model extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the model, in form of - * `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The name of the model to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The dataset from which the model is trained, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * - * Generated from protobuf field string dataset = 3; - */ - protected $dataset = ''; - /** - * Output only. The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_language_code = ''; - /** - * Output only. The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_language_code = ''; - /** - * Output only. Number of examples (sentence pairs) used to train the model. - * - * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $train_example_count = 0; - /** - * Output only. Number of examples (sentence pairs) used to validate the - * model. - * - * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $validate_example_count = 0; - /** - * Output only. Number of examples (sentence pairs) used to test the model. - * - * Generated from protobuf field int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $test_example_count = 0; - /** - * Output only. Timestamp when the model resource was created, which is also - * when the training started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp when this model was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the model, in form of - * `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` - * @type string $display_name - * The name of the model to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * @type string $dataset - * The dataset from which the model is trained, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * @type string $source_language_code - * Output only. The BCP-47 language code of the source language. - * @type string $target_language_code - * Output only. The BCP-47 language code of the target language. - * @type int $train_example_count - * Output only. Number of examples (sentence pairs) used to train the model. - * @type int $validate_example_count - * Output only. Number of examples (sentence pairs) used to validate the - * model. - * @type int $test_example_count - * Output only. Number of examples (sentence pairs) used to test the model. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp when the model resource was created, which is also - * when the training started. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp when this model was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\AutomlTranslation::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the model, in form of - * `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the model, in form of - * `projects/{project-number-or-id}/locations/{location_id}/models/{model_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 name of the model to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name of the model to show in the interface. The name can be - * up to 32 characters long and can consist only of ASCII Latin letters A-Z - * and a-z, underscores (_), and ASCII digits 0-9. - * - * 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 dataset from which the model is trained, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * - * Generated from protobuf field string dataset = 3; - * @return string - */ - public function getDataset() - { - return $this->dataset; - } - - /** - * The dataset from which the model is trained, in form of - * `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` - * - * Generated from protobuf field string dataset = 3; - * @param string $var - * @return $this - */ - public function setDataset($var) - { - GPBUtil::checkString($var, True); - $this->dataset = $var; - - return $this; - } - - /** - * Output only. The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Output only. The BCP-47 language code of the source language. - * - * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Output only. The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * Output only. The BCP-47 language code of the target language. - * - * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - - /** - * Output only. Number of examples (sentence pairs) used to train the model. - * - * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTrainExampleCount() - { - return $this->train_example_count; - } - - /** - * Output only. Number of examples (sentence pairs) used to train the model. - * - * Generated from protobuf field int32 train_example_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTrainExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->train_example_count = $var; - - return $this; - } - - /** - * Output only. Number of examples (sentence pairs) used to validate the - * model. - * - * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getValidateExampleCount() - { - return $this->validate_example_count; - } - - /** - * Output only. Number of examples (sentence pairs) used to validate the - * model. - * - * Generated from protobuf field int32 validate_example_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setValidateExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->validate_example_count = $var; - - return $this; - } - - /** - * Output only. Number of examples (sentence pairs) used to test the model. - * - * Generated from protobuf field int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTestExampleCount() - { - return $this->test_example_count; - } - - /** - * Output only. Number of examples (sentence pairs) used to test the model. - * - * Generated from protobuf field int32 test_example_count = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTestExampleCount($var) - { - GPBUtil::checkInt32($var); - $this->test_example_count = $var; - - return $this; - } - - /** - * Output only. Timestamp when the model resource was created, which is also - * when the training started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when the model resource was created, which is also - * when the training started. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.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. Timestamp when this model was last updated. - * - * 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. Timestamp when this model was last updated. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php deleted file mode 100644 index b4365124c6c9..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OperationState.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.translation.v3.OperationState - */ -class OperationState -{ - /** - * Invalid. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum OPERATION_STATE_RUNNING = 1; - */ - const OPERATION_STATE_RUNNING = 1; - /** - * The operation was successful. - * - * Generated from protobuf enum OPERATION_STATE_SUCCEEDED = 2; - */ - const OPERATION_STATE_SUCCEEDED = 2; - /** - * Failed to process operation. - * - * Generated from protobuf enum OPERATION_STATE_FAILED = 3; - */ - const OPERATION_STATE_FAILED = 3; - /** - * Request is in the process of being canceled after caller invoked - * longrunning.Operations.CancelOperation on the request id. - * - * Generated from protobuf enum OPERATION_STATE_CANCELLING = 4; - */ - const OPERATION_STATE_CANCELLING = 4; - /** - * The operation request was successfully canceled. - * - * Generated from protobuf enum OPERATION_STATE_CANCELLED = 5; - */ - const OPERATION_STATE_CANCELLED = 5; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::OPERATION_STATE_RUNNING => 'OPERATION_STATE_RUNNING', - self::OPERATION_STATE_SUCCEEDED => 'OPERATION_STATE_SUCCEEDED', - self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', - self::OPERATION_STATE_CANCELLING => 'OPERATION_STATE_CANCELLING', - 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/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php deleted file mode 100644 index 700e61927867..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/OutputConfig.php +++ /dev/null @@ -1,249 +0,0 @@ -google.cloud.translation.v3.OutputConfig - */ -class OutputConfig extends \Google\Protobuf\Internal\Message -{ - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GcsDestination $gcs_destination - * Google Cloud Storage destination for output content. - * For every single input file (for example, gs://a/b/c.[extension]), we - * generate at most 2 * n output files. (n is the # of target_language_codes - * in the BatchTranslateTextRequest). - * Output files (tsv) generated are compliant with RFC 4180 except that - * record delimiters are '\n' instead of '\r\n'. We don't provide any way to - * change record delimiters. - * While the input files are being processed, we write/update an index file - * 'index.csv' under 'output_uri_prefix' (for example, - * gs://translation-test/index.csv) The index file is generated/updated as - * new files are being translated. The format is: - * input_file,target_language_code,translations_file,errors_file, - * glossary_translations_file,glossary_errors_file - * input_file is one file we matched using gcs_source.input_uri. - * target_language_code is provided in the request. - * translations_file contains the translations. (details provided below) - * errors_file contains the errors during processing of the file. (details - * below). Both translations_file and errors_file could be empty - * strings if we have no content to output. - * glossary_translations_file and glossary_errors_file are always empty - * strings if the input_file is tsv. They could also be empty if we have no - * content to output. - * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are - * processed and ready to be consumed (that is, no partial output file is - * written). - * Since index.csv will be keeping updated during the process, please make - * sure there is no custom retention policy applied on the output bucket - * that may avoid file updating. - * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - * The format of translations_file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_translations.[extension]` - * If the input file extension is tsv, the output has the following - * columns: - * Column 1: ID of the request provided in the input, if it's not - * provided in the input, then the input row number is used (0-based). - * Column 2: source sentence. - * Column 3: translation without applying a glossary. Empty string if there - * is an error. - * Column 4 (only present if a glossary is provided in the request): - * translation after applying the glossary. Empty string if there is an - * error applying the glossary. Could be same string as column 3 if there is - * no glossary applied. - * If input file extension is a txt or html, the translation is directly - * written to the output file. If glossary is requested, a separate - * glossary_translations_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` - * The format of errors file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_errors.[extension]` - * If the input file extension is tsv, errors_file contains the following: - * Column 1: ID of the request provided in the input, if it's not - * provided in the input, then the input row number is used (0-based). - * Column 2: source sentence. - * Column 3: Error detail for the translation. Could be empty. - * Column 4 (only present if a glossary is provided in the request): - * Error when applying the glossary. - * If the input file extension is txt or html, glossary_error_file will be - * generated that contains error details. glossary_error_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage destination for output content. - * For every single input file (for example, gs://a/b/c.[extension]), we - * generate at most 2 * n output files. (n is the # of target_language_codes - * in the BatchTranslateTextRequest). - * Output files (tsv) generated are compliant with RFC 4180 except that - * record delimiters are '\n' instead of '\r\n'. We don't provide any way to - * change record delimiters. - * While the input files are being processed, we write/update an index file - * 'index.csv' under 'output_uri_prefix' (for example, - * gs://translation-test/index.csv) The index file is generated/updated as - * new files are being translated. The format is: - * input_file,target_language_code,translations_file,errors_file, - * glossary_translations_file,glossary_errors_file - * input_file is one file we matched using gcs_source.input_uri. - * target_language_code is provided in the request. - * translations_file contains the translations. (details provided below) - * errors_file contains the errors during processing of the file. (details - * below). Both translations_file and errors_file could be empty - * strings if we have no content to output. - * glossary_translations_file and glossary_errors_file are always empty - * strings if the input_file is tsv. They could also be empty if we have no - * content to output. - * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are - * processed and ready to be consumed (that is, no partial output file is - * written). - * Since index.csv will be keeping updated during the process, please make - * sure there is no custom retention policy applied on the output bucket - * that may avoid file updating. - * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - * The format of translations_file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_translations.[extension]` - * If the input file extension is tsv, the output has the following - * columns: - * Column 1: ID of the request provided in the input, if it's not - * provided in the input, then the input row number is used (0-based). - * Column 2: source sentence. - * Column 3: translation without applying a glossary. Empty string if there - * is an error. - * Column 4 (only present if a glossary is provided in the request): - * translation after applying the glossary. Empty string if there is an - * error applying the glossary. Could be same string as column 3 if there is - * no glossary applied. - * If input file extension is a txt or html, the translation is directly - * written to the output file. If glossary is requested, a separate - * glossary_translations_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` - * The format of errors file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_errors.[extension]` - * If the input file extension is tsv, errors_file contains the following: - * Column 1: ID of the request provided in the input, if it's not - * provided in the input, then the input row number is used (0-based). - * Column 2: source sentence. - * Column 3: Error detail for the translation. Could be empty. - * Column 4 (only present if a glossary is provided in the request): - * Error when applying the glossary. - * If the input file extension is txt or html, glossary_error_file will be - * generated that contains error details. glossary_error_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` - * - * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; - * @return \Google\Cloud\Translate\V3\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * Google Cloud Storage destination for output content. - * For every single input file (for example, gs://a/b/c.[extension]), we - * generate at most 2 * n output files. (n is the # of target_language_codes - * in the BatchTranslateTextRequest). - * Output files (tsv) generated are compliant with RFC 4180 except that - * record delimiters are '\n' instead of '\r\n'. We don't provide any way to - * change record delimiters. - * While the input files are being processed, we write/update an index file - * 'index.csv' under 'output_uri_prefix' (for example, - * gs://translation-test/index.csv) The index file is generated/updated as - * new files are being translated. The format is: - * input_file,target_language_code,translations_file,errors_file, - * glossary_translations_file,glossary_errors_file - * input_file is one file we matched using gcs_source.input_uri. - * target_language_code is provided in the request. - * translations_file contains the translations. (details provided below) - * errors_file contains the errors during processing of the file. (details - * below). Both translations_file and errors_file could be empty - * strings if we have no content to output. - * glossary_translations_file and glossary_errors_file are always empty - * strings if the input_file is tsv. They could also be empty if we have no - * content to output. - * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are - * processed and ready to be consumed (that is, no partial output file is - * written). - * Since index.csv will be keeping updated during the process, please make - * sure there is no custom retention policy applied on the output bucket - * that may avoid file updating. - * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) - * The format of translations_file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_translations.[extension]` - * If the input file extension is tsv, the output has the following - * columns: - * Column 1: ID of the request provided in the input, if it's not - * provided in the input, then the input row number is used (0-based). - * Column 2: source sentence. - * Column 3: translation without applying a glossary. Empty string if there - * is an error. - * Column 4 (only present if a glossary is provided in the request): - * translation after applying the glossary. Empty string if there is an - * error applying the glossary. Could be same string as column 3 if there is - * no glossary applied. - * If input file extension is a txt or html, the translation is directly - * written to the output file. If glossary is requested, a separate - * glossary_translations_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` - * The format of errors file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_errors.[extension]` - * If the input file extension is tsv, errors_file contains the following: - * Column 1: ID of the request provided in the input, if it's not - * provided in the input, then the input row number is used (0-based). - * Column 2: source sentence. - * Column 3: Error detail for the translation. Could be empty. - * Column 4 (only present if a glossary is provided in the request): - * Error when applying the glossary. - * If the input file extension is txt or html, glossary_error_file will be - * generated that contains error details. glossary_error_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` - * - * Generated from protobuf field .google.cloud.translation.v3.GcsDestination gcs_destination = 1; - * @param \Google\Cloud\Translate\V3\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GcsDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php deleted file mode 100644 index 1e749df25547..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Romanization.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.translation.v3.Romanization - */ -class Romanization extends \Google\Protobuf\Internal\Message -{ - /** - * Romanized text. - * If an error occurs during romanization, this field might be excluded from - * the response. - * - * Generated from protobuf field string romanized_text = 1; - */ - protected $romanized_text = ''; - /** - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * - * Generated from protobuf field string detected_language_code = 2; - */ - protected $detected_language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $romanized_text - * Romanized text. - * If an error occurs during romanization, this field might be excluded from - * the response. - * @type string $detected_language_code - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Romanized text. - * If an error occurs during romanization, this field might be excluded from - * the response. - * - * Generated from protobuf field string romanized_text = 1; - * @return string - */ - public function getRomanizedText() - { - return $this->romanized_text; - } - - /** - * Romanized text. - * If an error occurs during romanization, this field might be excluded from - * the response. - * - * Generated from protobuf field string romanized_text = 1; - * @param string $var - * @return $this - */ - public function setRomanizedText($var) - { - GPBUtil::checkString($var, True); - $this->romanized_text = $var; - - return $this; - } - - /** - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * - * Generated from protobuf field string detected_language_code = 2; - * @return string - */ - public function getDetectedLanguageCode() - { - return $this->detected_language_code; - } - - /** - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * - * Generated from protobuf field string detected_language_code = 2; - * @param string $var - * @return $this - */ - public function setDetectedLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->detected_language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php deleted file mode 100644 index 597960eb3d1f..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.translation.v3.RomanizeTextRequest - */ -class RomanizeTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The content of the input in string format. - * - * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $contents; - /** - * Optional. The ISO-639 language code of the input text if - * known, for example, "hi" or "zh". If the source language isn't specified, - * the API attempts to identify the source language automatically and returns - * the source language for each content in the response. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $source_language_code = ''; - - /** - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string[] $contents Required. The content of the input in string format. - * - * @return \Google\Cloud\Translate\V3\RomanizeTextRequest - * - * @experimental - */ - public static function build(string $parent, array $contents): self - { - return (new self()) - ->setParent($parent) - ->setContents($contents); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $contents - * Required. The content of the input in string format. - * @type string $source_language_code - * Optional. The ISO-639 language code of the input text if - * known, for example, "hi" or "zh". If the source language isn't specified, - * the API attempts to identify the source language automatically and returns - * the source language for each content in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Generated from protobuf field string parent = 4 [(.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 content of the input in string format. - * - * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContents() - { - return $this->contents; - } - - /** - * Required. The content of the input in string format. - * - * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->contents = $arr; - - return $this; - } - - /** - * Optional. The ISO-639 language code of the input text if - * known, for example, "hi" or "zh". If the source language isn't specified, - * the API attempts to identify the source language automatically and returns - * the source language for each content in the response. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Optional. The ISO-639 language code of the input text if - * known, for example, "hi" or "zh". If the source language isn't specified, - * the API attempts to identify the source language automatically and returns - * the source language for each content in the response. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php deleted file mode 100644 index 2adecb7ca04f..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/RomanizeTextResponse.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.translation.v3.RomanizeTextResponse - */ -class RomanizeTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Text romanization responses. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Romanization romanizations = 1; - */ - private $romanizations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\Romanization>|\Google\Protobuf\Internal\RepeatedField $romanizations - * Text romanization responses. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Text romanization responses. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Romanization romanizations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRomanizations() - { - return $this->romanizations; - } - - /** - * Text romanization responses. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.RomanizeTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Romanization romanizations = 1; - * @param array<\Google\Cloud\Translate\V3\Romanization>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRomanizations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Romanization::class); - $this->romanizations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php deleted file mode 100644 index cfb8756c2c13..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguage.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.translation.v3.SupportedLanguage - */ -class SupportedLanguage extends \Google\Protobuf\Internal\Message -{ - /** - * Supported language code, generally consisting of its ISO 639-1 - * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes - * including language and region identifiers are returned (for example, - * 'zh-TW' and 'zh-CN'). - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * Human-readable name of the language localized in the display language - * specified in the request. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Can be used as a source language. - * - * Generated from protobuf field bool support_source = 3; - */ - protected $support_source = false; - /** - * Can be used as a target language. - * - * Generated from protobuf field bool support_target = 4; - */ - protected $support_target = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * Supported language code, generally consisting of its ISO 639-1 - * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes - * including language and region identifiers are returned (for example, - * 'zh-TW' and 'zh-CN'). - * @type string $display_name - * Human-readable name of the language localized in the display language - * specified in the request. - * @type bool $support_source - * Can be used as a source language. - * @type bool $support_target - * Can be used as a target language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Supported language code, generally consisting of its ISO 639-1 - * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes - * including language and region identifiers are returned (for example, - * 'zh-TW' and 'zh-CN'). - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Supported language code, generally consisting of its ISO 639-1 - * identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes - * including language and region identifiers are returned (for example, - * 'zh-TW' and 'zh-CN'). - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Human-readable name of the language localized in the display language - * specified in the request. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Human-readable name of the language localized in the display language - * specified in the request. - * - * 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; - } - - /** - * Can be used as a source language. - * - * Generated from protobuf field bool support_source = 3; - * @return bool - */ - public function getSupportSource() - { - return $this->support_source; - } - - /** - * Can be used as a source language. - * - * Generated from protobuf field bool support_source = 3; - * @param bool $var - * @return $this - */ - public function setSupportSource($var) - { - GPBUtil::checkBool($var); - $this->support_source = $var; - - return $this; - } - - /** - * Can be used as a target language. - * - * Generated from protobuf field bool support_target = 4; - * @return bool - */ - public function getSupportTarget() - { - return $this->support_target; - } - - /** - * Can be used as a target language. - * - * Generated from protobuf field bool support_target = 4; - * @param bool $var - * @return $this - */ - public function setSupportTarget($var) - { - GPBUtil::checkBool($var); - $this->support_target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php deleted file mode 100644 index 1bfb36123e52..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/SupportedLanguages.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.translation.v3.SupportedLanguages - */ -class SupportedLanguages extends \Google\Protobuf\Internal\Message -{ - /** - * A list of supported language responses. This list contains an entry - * for each language the Translation API supports. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.SupportedLanguage languages = 1; - */ - private $languages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\SupportedLanguage>|\Google\Protobuf\Internal\RepeatedField $languages - * A list of supported language responses. This list contains an entry - * for each language the Translation API supports. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * A list of supported language responses. This list contains an entry - * for each language the Translation API supports. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.SupportedLanguage languages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguages() - { - return $this->languages; - } - - /** - * A list of supported language responses. This list contains an entry - * for each language the Translation API supports. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.SupportedLanguage languages = 1; - * @param array<\Google\Cloud\Translate\V3\SupportedLanguage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\SupportedLanguage::class); - $this->languages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php deleted file mode 100644 index ed1a08a279ba..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentRequest.php +++ /dev/null @@ -1,631 +0,0 @@ -google.cloud.translation.v3.TranslateDocumentRequest - */ -class TranslateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or custom - * glossaries. - * Models and glossaries must be within the same region (have the same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * Language Support. If the source language isn't specified, the API attempts - * to identify the source language automatically and returns the source - * language within the response. Source language must be specified if the - * request contains a glossary or a custom model. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $source_language_code = ''; - /** - * Required. The ISO-639 language code to use for translation of the input - * document, set to one of the language codes listed in Language Support. - * - * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_language_code = ''; - /** - * Required. Input configurations. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document_input_config = null; - /** - * Optional. Output configurations. - * Defines if the output file should be stored within Cloud Storage as well - * as the desired output format. If not provided the translated file will - * only be returned through a byte-stream and its output mime type will be - * the same as the input file's mime type. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $document_output_config = null; - /** - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If not provided, the default Google model (NMT) will be used for - * translation. - * - * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $model = ''; - /** - * Optional. Glossary to be applied. The glossary must be within the same - * region (have the same location-id) as the model, otherwise an - * INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $glossary_config = null; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters (Unicode - * codepoints), can only contain lowercase letters, numeric characters, - * underscores and dashes. International characters are allowed. Label values - * are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * - * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $customized_attribution = ''; - /** - * Optional. is_translate_native_pdf_only field for external customers. - * If true, the page limit of online native pdf translation is 300 and only - * native pdf pages will be translated. - * - * Generated from protobuf field bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_translate_native_pdf_only = false; - /** - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * - * Generated from protobuf field bool enable_shadow_removal_native_pdf = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_shadow_removal_native_pdf = false; - /** - * Optional. If true, enable auto rotation correction in DVS. - * - * Generated from protobuf field bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_rotation_correction = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or custom - * glossaries. - * Models and glossaries must be within the same region (have the same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * @type string $source_language_code - * Optional. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * Language Support. If the source language isn't specified, the API attempts - * to identify the source language automatically and returns the source - * language within the response. Source language must be specified if the - * request contains a glossary or a custom model. - * @type string $target_language_code - * Required. The ISO-639 language code to use for translation of the input - * document, set to one of the language codes listed in Language Support. - * @type \Google\Cloud\Translate\V3\DocumentInputConfig $document_input_config - * Required. Input configurations. - * @type \Google\Cloud\Translate\V3\DocumentOutputConfig $document_output_config - * Optional. Output configurations. - * Defines if the output file should be stored within Cloud Storage as well - * as the desired output format. If not provided the translated file will - * only be returned through a byte-stream and its output mime type will be - * the same as the input file's mime type. - * @type string $model - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If not provided, the default Google model (NMT) will be used for - * translation. - * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config - * Optional. Glossary to be applied. The glossary must be within the same - * region (have the same location-id) as the model, otherwise an - * INVALID_ARGUMENT (400) error is returned. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters (Unicode - * codepoints), can only contain lowercase letters, numeric characters, - * underscores and dashes. International characters are allowed. Label values - * are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * @type string $customized_attribution - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * @type bool $is_translate_native_pdf_only - * Optional. is_translate_native_pdf_only field for external customers. - * If true, the page limit of online native pdf translation is 300 and only - * native pdf pages will be translated. - * @type bool $enable_shadow_removal_native_pdf - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * @type bool $enable_rotation_correction - * Optional. If true, enable auto rotation correction in DVS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or custom - * glossaries. - * Models and glossaries must be within the same region (have the same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Location to make a regional call. - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or custom - * glossaries. - * Models and glossaries must be within the same region (have the same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * - * 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 ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * Language Support. If the source language isn't specified, the API attempts - * to identify the source language automatically and returns the source - * language within the response. Source language must be specified if the - * request contains a glossary or a custom model. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Optional. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * Language Support. If the source language isn't specified, the API attempts - * to identify the source language automatically and returns the source - * language within the response. Source language must be specified if the - * request contains a glossary or a custom model. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Required. The ISO-639 language code to use for translation of the input - * document, set to one of the language codes listed in Language Support. - * - * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * Required. The ISO-639 language code to use for translation of the input - * document, set to one of the language codes listed in Language Support. - * - * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - - /** - * Required. Input configurations. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\DocumentInputConfig|null - */ - public function getDocumentInputConfig() - { - return $this->document_input_config; - } - - public function hasDocumentInputConfig() - { - return isset($this->document_input_config); - } - - public function clearDocumentInputConfig() - { - unset($this->document_input_config); - } - - /** - * Required. Input configurations. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\DocumentInputConfig $var - * @return $this - */ - public function setDocumentInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentInputConfig::class); - $this->document_input_config = $var; - - return $this; - } - - /** - * Optional. Output configurations. - * Defines if the output file should be stored within Cloud Storage as well - * as the desired output format. If not provided the translated file will - * only be returned through a byte-stream and its output mime type will be - * the same as the input file's mime type. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Translate\V3\DocumentOutputConfig|null - */ - public function getDocumentOutputConfig() - { - return $this->document_output_config; - } - - public function hasDocumentOutputConfig() - { - return isset($this->document_output_config); - } - - public function clearDocumentOutputConfig() - { - unset($this->document_output_config); - } - - /** - * Optional. Output configurations. - * Defines if the output file should be stored within Cloud Storage as well - * as the desired output format. If not provided the translated file will - * only be returned through a byte-stream and its output mime type will be - * the same as the input file's mime type. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Translate\V3\DocumentOutputConfig $var - * @return $this - */ - public function setDocumentOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentOutputConfig::class); - $this->document_output_config = $var; - - return $this; - } - - /** - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If not provided, the default Google model (NMT) will be used for - * translation. - * - * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * If not provided, the default Google model (NMT) will be used for - * translation. - * - * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * Optional. Glossary to be applied. The glossary must be within the same - * region (have the same location-id) as the model, otherwise an - * INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null - */ - public function getGlossaryConfig() - { - return $this->glossary_config; - } - - public function hasGlossaryConfig() - { - return isset($this->glossary_config); - } - - public function clearGlossaryConfig() - { - unset($this->glossary_config); - } - - /** - * Optional. Glossary to be applied. The glossary must be within the same - * region (have the same location-id) as the model, otherwise an - * INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var - * @return $this - */ - public function setGlossaryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); - $this->glossary_config = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters (Unicode - * codepoints), can only contain lowercase letters, numeric characters, - * underscores and dashes. International characters are allowed. Label values - * are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters (Unicode - * codepoints), can only contain lowercase letters, numeric characters, - * underscores and dashes. International characters are allowed. Label values - * are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 8 [(.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. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * - * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCustomizedAttribution() - { - return $this->customized_attribution; - } - - /** - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * - * Generated from protobuf field string customized_attribution = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCustomizedAttribution($var) - { - GPBUtil::checkString($var, True); - $this->customized_attribution = $var; - - return $this; - } - - /** - * Optional. is_translate_native_pdf_only field for external customers. - * If true, the page limit of online native pdf translation is 300 and only - * native pdf pages will be translated. - * - * Generated from protobuf field bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsTranslateNativePdfOnly() - { - return $this->is_translate_native_pdf_only; - } - - /** - * Optional. is_translate_native_pdf_only field for external customers. - * If true, the page limit of online native pdf translation is 300 and only - * native pdf pages will be translated. - * - * Generated from protobuf field bool is_translate_native_pdf_only = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsTranslateNativePdfOnly($var) - { - GPBUtil::checkBool($var); - $this->is_translate_native_pdf_only = $var; - - return $this; - } - - /** - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * - * Generated from protobuf field bool enable_shadow_removal_native_pdf = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableShadowRemovalNativePdf() - { - return $this->enable_shadow_removal_native_pdf; - } - - /** - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * - * Generated from protobuf field bool enable_shadow_removal_native_pdf = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableShadowRemovalNativePdf($var) - { - GPBUtil::checkBool($var); - $this->enable_shadow_removal_native_pdf = $var; - - return $this; - } - - /** - * Optional. If true, enable auto rotation correction in DVS. - * - * Generated from protobuf field bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableRotationCorrection() - { - return $this->enable_rotation_correction; - } - - /** - * Optional. If true, enable auto rotation correction in DVS. - * - * Generated from protobuf field bool enable_rotation_correction = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableRotationCorrection($var) - { - GPBUtil::checkBool($var); - $this->enable_rotation_correction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php deleted file mode 100644 index cb03652f9530..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateDocumentResponse.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.translation.v3.TranslateDocumentResponse - */ -class TranslateDocumentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Translated document. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation document_translation = 1; - */ - protected $document_translation = null; - /** - * The document's translation output if a glossary is provided in the request. - * This can be the same as [TranslateDocumentResponse.document_translation] - * if no glossary terms apply. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; - */ - protected $glossary_document_translation = null; - /** - * Only present when 'model' is present in the request. - * 'model' is normalized to have a project number. - * For example: - * If the 'model' field in TranslateDocumentRequest is: - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * - * Generated from protobuf field string model = 3; - */ - protected $model = ''; - /** - * The `glossary_config` used for this translation. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; - */ - protected $glossary_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\DocumentTranslation $document_translation - * Translated document. - * @type \Google\Cloud\Translate\V3\DocumentTranslation $glossary_document_translation - * The document's translation output if a glossary is provided in the request. - * This can be the same as [TranslateDocumentResponse.document_translation] - * if no glossary terms apply. - * @type string $model - * Only present when 'model' is present in the request. - * 'model' is normalized to have a project number. - * For example: - * If the 'model' field in TranslateDocumentRequest is: - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config - * The `glossary_config` used for this translation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Translated document. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation document_translation = 1; - * @return \Google\Cloud\Translate\V3\DocumentTranslation|null - */ - public function getDocumentTranslation() - { - return $this->document_translation; - } - - public function hasDocumentTranslation() - { - return isset($this->document_translation); - } - - public function clearDocumentTranslation() - { - unset($this->document_translation); - } - - /** - * Translated document. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation document_translation = 1; - * @param \Google\Cloud\Translate\V3\DocumentTranslation $var - * @return $this - */ - public function setDocumentTranslation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentTranslation::class); - $this->document_translation = $var; - - return $this; - } - - /** - * The document's translation output if a glossary is provided in the request. - * This can be the same as [TranslateDocumentResponse.document_translation] - * if no glossary terms apply. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; - * @return \Google\Cloud\Translate\V3\DocumentTranslation|null - */ - public function getGlossaryDocumentTranslation() - { - return $this->glossary_document_translation; - } - - public function hasGlossaryDocumentTranslation() - { - return isset($this->glossary_document_translation); - } - - public function clearGlossaryDocumentTranslation() - { - unset($this->glossary_document_translation); - } - - /** - * The document's translation output if a glossary is provided in the request. - * This can be the same as [TranslateDocumentResponse.document_translation] - * if no glossary terms apply. - * - * Generated from protobuf field .google.cloud.translation.v3.DocumentTranslation glossary_document_translation = 2; - * @param \Google\Cloud\Translate\V3\DocumentTranslation $var - * @return $this - */ - public function setGlossaryDocumentTranslation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\DocumentTranslation::class); - $this->glossary_document_translation = $var; - - return $this; - } - - /** - * Only present when 'model' is present in the request. - * 'model' is normalized to have a project number. - * For example: - * If the 'model' field in TranslateDocumentRequest is: - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * - * Generated from protobuf field string model = 3; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Only present when 'model' is present in the request. - * 'model' is normalized to have a project number. - * For example: - * If the 'model' field in TranslateDocumentRequest is: - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * - * Generated from protobuf field string model = 3; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * The `glossary_config` used for this translation. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; - * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null - */ - public function getGlossaryConfig() - { - return $this->glossary_config; - } - - public function hasGlossaryConfig() - { - return isset($this->glossary_config); - } - - public function clearGlossaryConfig() - { - unset($this->glossary_config); - } - - /** - * The `glossary_config` used for this translation. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 4; - * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var - * @return $this - */ - public function setGlossaryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); - $this->glossary_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php deleted file mode 100644 index ce2fa4f3fce8..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextGlossaryConfig.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.translation.v3.TranslateTextGlossaryConfig - */ -class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * - * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $glossary = ''; - /** - * Optional. Indicates match is case insensitive. The default value is `false` - * if missing. - * - * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_case = false; - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $contextual_translation_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $glossary - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * @type bool $ignore_case - * Optional. Indicates match is case insensitive. The default value is `false` - * if missing. - * @type bool $contextual_translation_enabled - * Optional. If set to true, the glossary will be used for contextual - * translation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * - * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGlossary() - { - return $this->glossary; - } - - /** - * Required. The `glossary` to be applied for this translation. - * The format depends on the glossary: - * - User-provided custom glossary: - * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}` - * - * Generated from protobuf field string glossary = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGlossary($var) - { - GPBUtil::checkString($var, True); - $this->glossary = $var; - - return $this; - } - - /** - * Optional. Indicates match is case insensitive. The default value is `false` - * if missing. - * - * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreCase() - { - return $this->ignore_case; - } - - /** - * Optional. Indicates match is case insensitive. The default value is `false` - * if missing. - * - * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreCase($var) - { - GPBUtil::checkBool($var); - $this->ignore_case = $var; - - return $this; - } - - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContextualTranslationEnabled() - { - return $this->contextual_translation_enabled; - } - - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContextualTranslationEnabled($var) - { - GPBUtil::checkBool($var); - $this->contextual_translation_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php deleted file mode 100644 index d916d70eb688..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextRequest.php +++ /dev/null @@ -1,599 +0,0 @@ -google.cloud.translation.v3.TranslateTextRequest - */ -class TranslateTextRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * - * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $contents; - /** - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mime_type = ''; - /** - * Optional. The ISO-639 language code of the input text if - * known, for example, "en-US" or "sr-Latn". Supported language codes are - * listed in Language Support. If the source language isn't specified, the API - * attempts to identify the source language automatically and returns the - * source language within the response. - * - * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $source_language_code = ''; - /** - * Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * - * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_language_code = ''; - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - Translation LLM models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - * For global (non-regionalized) requests, use `location-id` `global`. - * For example, - * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - * If not provided, the default Google model (NMT) will be used - * - * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $model = ''; - /** - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $glossary_config = null; - /** - * Optional. Transliteration to be applied. - * - * Generated from protobuf field .google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $transliteration_config = null; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * @param string[] $contents Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * - * @return \Google\Cloud\Translate\V3\TranslateTextRequest - * - * @experimental - */ - public static function build(string $parent, string $targetLanguageCode, array $contents): self - { - return (new self()) - ->setParent($parent) - ->setTargetLanguageCode($targetLanguageCode) - ->setContents($contents); - } - - /** - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. Please see - * {@see TranslationServiceClient::locationName()} for help formatting this field. - * @param string $model Optional. The `model` type requested for this translation. - * - * The format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - Translation LLM models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - * - * For global (non-regionalized) requests, use `location-id` `global`. - * For example, - * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - * - * If not provided, the default Google model (NMT) will be used - * @param string $mimeType Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * @param string $sourceLanguageCode Optional. The ISO-639 language code of the input text if - * known, for example, "en-US" or "sr-Latn". Supported language codes are - * listed in Language Support. If the source language isn't specified, the API - * attempts to identify the source language automatically and returns the - * source language within the response. - * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * @param string[] $contents Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * - * @return \Google\Cloud\Translate\V3\TranslateTextRequest - * - * @experimental - */ - public static function buildFromParentModelMimeTypeSourceLanguageCodeTargetLanguageCodeContents(string $parent, string $model, string $mimeType, string $sourceLanguageCode, string $targetLanguageCode, array $contents): self - { - return (new self()) - ->setParent($parent) - ->setModel($model) - ->setMimeType($mimeType) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCode($targetLanguageCode) - ->setContents($contents); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $contents - * Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * @type string $mime_type - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * @type string $source_language_code - * Optional. The ISO-639 language code of the input text if - * known, for example, "en-US" or "sr-Latn". Supported language codes are - * listed in Language Support. If the source language isn't specified, the API - * attempts to identify the source language automatically and returns the - * source language within the response. - * @type string $target_language_code - * Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * @type string $parent - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * @type string $model - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - Translation LLM models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - * For global (non-regionalized) requests, use `location-id` `global`. - * For example, - * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - * If not provided, the default Google model (NMT) will be used - * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * @type \Google\Cloud\Translate\V3\TransliterationConfig $transliteration_config - * Optional. Transliteration to be applied. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * - * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContents() - { - return $this->contents; - } - - /** - * Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * - * Generated from protobuf field repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->contents = $arr; - - return $this; - } - - /** - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * - * Generated from protobuf field string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Optional. The ISO-639 language code of the input text if - * known, for example, "en-US" or "sr-Latn". Supported language codes are - * listed in Language Support. If the source language isn't specified, the API - * attempts to identify the source language automatically and returns the - * source language within the response. - * - * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Optional. The ISO-639 language code of the input text if - * known, for example, "en-US" or "sr-Latn". Supported language codes are - * listed in Language Support. If the source language isn't specified, the API - * attempts to identify the source language automatically and returns the - * source language within the response. - * - * Generated from protobuf field string source_language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * - * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * - * Generated from protobuf field string target_language_code = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Project or location to make a call. Must refer to a caller's - * project. - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field string parent = 8 [(.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 `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - Translation LLM models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - * For global (non-regionalized) requests, use `location-id` `global`. - * For example, - * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - * If not provided, the default Google model (NMT) will be used - * - * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Optional. The `model` type requested for this translation. - * The format depends on model type: - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - Translation LLM models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - * For global (non-regionalized) requests, use `location-id` `global`. - * For example, - * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - * If not provided, the default Google model (NMT) will be used - * - * Generated from protobuf field string model = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null - */ - public function getGlossaryConfig() - { - return $this->glossary_config; - } - - public function hasGlossaryConfig() - { - return isset($this->glossary_config); - } - - public function clearGlossaryConfig() - { - unset($this->glossary_config); - } - - /** - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var - * @return $this - */ - public function setGlossaryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); - $this->glossary_config = $var; - - return $this; - } - - /** - * Optional. Transliteration to be applied. - * - * Generated from protobuf field .google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Translate\V3\TransliterationConfig|null - */ - public function getTransliterationConfig() - { - return $this->transliteration_config; - } - - public function hasTransliterationConfig() - { - return isset($this->transliteration_config); - } - - public function clearTransliterationConfig() - { - unset($this->transliteration_config); - } - - /** - * Optional. Transliteration to be applied. - * - * Generated from protobuf field .google.cloud.translation.v3.TransliterationConfig transliteration_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Translate\V3\TransliterationConfig $var - * @return $this - */ - public function setTransliterationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TransliterationConfig::class); - $this->transliteration_config = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * - * Generated from protobuf field map labels = 10 [(.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; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php deleted file mode 100644 index 421453b69591..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TranslateTextResponse.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.translation.v3.TranslateTextResponse - */ -class TranslateTextResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Text translation responses with no glossary applied. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Translation translations = 1; - */ - private $translations; - /** - * Text translation responses if a glossary is provided in the request. - * This can be the same as - * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] - * if no terms apply. This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Translation glossary_translations = 3; - */ - private $glossary_translations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $translations - * Text translation responses with no glossary applied. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * @type array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $glossary_translations - * Text translation responses if a glossary is provided in the request. - * This can be the same as - * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] - * if no terms apply. This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Text translation responses with no glossary applied. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Translation translations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTranslations() - { - return $this->translations; - } - - /** - * Text translation responses with no glossary applied. - * This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Translation translations = 1; - * @param array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTranslations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Translation::class); - $this->translations = $arr; - - return $this; - } - - /** - * Text translation responses if a glossary is provided in the request. - * This can be the same as - * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] - * if no terms apply. This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Translation glossary_translations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGlossaryTranslations() - { - return $this->glossary_translations; - } - - /** - * Text translation responses if a glossary is provided in the request. - * This can be the same as - * [`translations`][google.cloud.translation.v3.TranslateTextResponse.translations] - * if no terms apply. This field has the same length as - * [`contents`][google.cloud.translation.v3.TranslateTextRequest.contents]. - * - * Generated from protobuf field repeated .google.cloud.translation.v3.Translation glossary_translations = 3; - * @param array<\Google\Cloud\Translate\V3\Translation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGlossaryTranslations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\Translation::class); - $this->glossary_translations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php deleted file mode 100644 index f57fa9baac73..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/Translation.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.translation.v3.Translation - */ -class Translation extends \Google\Protobuf\Internal\Message -{ - /** - * Text translated into the target language. - * If an error occurs during translation, this field might be excluded from - * the response. - * - * Generated from protobuf field string translated_text = 1; - */ - protected $translated_text = ''; - /** - * Only present when `model` is present in the request. - * `model` here is normalized to have project number. - * For example: - * If the `model` requested in TranslationTextRequest is - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * - * Generated from protobuf field string model = 2; - */ - protected $model = ''; - /** - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * - * Generated from protobuf field string detected_language_code = 4; - */ - protected $detected_language_code = ''; - /** - * The `glossary_config` used for this translation. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 3; - */ - protected $glossary_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $translated_text - * Text translated into the target language. - * If an error occurs during translation, this field might be excluded from - * the response. - * @type string $model - * Only present when `model` is present in the request. - * `model` here is normalized to have project number. - * For example: - * If the `model` requested in TranslationTextRequest is - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * @type string $detected_language_code - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * @type \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $glossary_config - * The `glossary_config` used for this translation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Text translated into the target language. - * If an error occurs during translation, this field might be excluded from - * the response. - * - * Generated from protobuf field string translated_text = 1; - * @return string - */ - public function getTranslatedText() - { - return $this->translated_text; - } - - /** - * Text translated into the target language. - * If an error occurs during translation, this field might be excluded from - * the response. - * - * Generated from protobuf field string translated_text = 1; - * @param string $var - * @return $this - */ - public function setTranslatedText($var) - { - GPBUtil::checkString($var, True); - $this->translated_text = $var; - - return $this; - } - - /** - * Only present when `model` is present in the request. - * `model` here is normalized to have project number. - * For example: - * If the `model` requested in TranslationTextRequest is - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * - * Generated from protobuf field string model = 2; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Only present when `model` is present in the request. - * `model` here is normalized to have project number. - * For example: - * If the `model` requested in TranslationTextRequest is - * `projects/{project-id}/locations/{location-id}/models/general/nmt` then - * `model` here would be normalized to - * `projects/{project-number}/locations/{location-id}/models/general/nmt`. - * - * Generated from protobuf field string model = 2; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * - * Generated from protobuf field string detected_language_code = 4; - * @return string - */ - public function getDetectedLanguageCode() - { - return $this->detected_language_code; - } - - /** - * The ISO-639 language code of source text in the initial request, detected - * automatically, if no source language was passed within the initial - * request. If the source language was passed, auto-detection of the language - * does not occur and this field is empty. - * - * Generated from protobuf field string detected_language_code = 4; - * @param string $var - * @return $this - */ - public function setDetectedLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->detected_language_code = $var; - - return $this; - } - - /** - * The `glossary_config` used for this translation. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 3; - * @return \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig|null - */ - public function getGlossaryConfig() - { - return $this->glossary_config; - } - - public function hasGlossaryConfig() - { - return isset($this->glossary_config); - } - - public function clearGlossaryConfig() - { - unset($this->glossary_config); - } - - /** - * The `glossary_config` used for this translation. - * - * Generated from protobuf field .google.cloud.translation.v3.TranslateTextGlossaryConfig glossary_config = 3; - * @param \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig $var - * @return $this - */ - public function setGlossaryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\TranslateTextGlossaryConfig::class); - $this->glossary_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php deleted file mode 100644 index 3d511df97dc9..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/TransliterationConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.translation.v3.TransliterationConfig - */ -class TransliterationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * If true, source text in romanized form can be translated to the target - * language. - * - * Generated from protobuf field bool enable_transliteration = 1; - */ - protected $enable_transliteration = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_transliteration - * If true, source text in romanized form can be translated to the target - * language. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * If true, source text in romanized form can be translated to the target - * language. - * - * Generated from protobuf field bool enable_transliteration = 1; - * @return bool - */ - public function getEnableTransliteration() - { - return $this->enable_transliteration; - } - - /** - * If true, source text in romanized form can be translated to the target - * language. - * - * Generated from protobuf field bool enable_transliteration = 1; - * @param bool $var - * @return $this - */ - public function setEnableTransliteration($var) - { - GPBUtil::checkBool($var); - $this->enable_transliteration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php deleted file mode 100644 index 992f570f73b9..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryEntryRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.translation.v3.UpdateGlossaryEntryRequest - */ -class UpdateGlossaryEntryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The glossary entry to update. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $glossary_entry = null; - - /** - * @param \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry Required. The glossary entry to update. - * - * @return \Google\Cloud\Translate\V3\UpdateGlossaryEntryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry): self - { - return (new self()) - ->setGlossaryEntry($glossaryEntry); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\GlossaryEntry $glossary_entry - * Required. The glossary entry to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The glossary entry to update. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\GlossaryEntry|null - */ - public function getGlossaryEntry() - { - return $this->glossary_entry; - } - - public function hasGlossaryEntry() - { - return isset($this->glossary_entry); - } - - public function clearGlossaryEntry() - { - unset($this->glossary_entry); - } - - /** - * Required. The glossary entry to update. - * - * Generated from protobuf field .google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\GlossaryEntry $var - * @return $this - */ - public function setGlossaryEntry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry::class); - $this->glossary_entry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php deleted file mode 100644 index 14698a198d91..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.translation.v3.UpdateGlossaryMetadata - */ -class UpdateGlossaryMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The updated glossary object. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1; - */ - protected $glossary = null; - /** - * The current state of the glossary update operation. If the glossary input - * file was not updated this will be completed immediately - * - * Generated from protobuf field .google.cloud.translation.v3.UpdateGlossaryMetadata.State state = 2; - */ - protected $state = 0; - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - */ - protected $submit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\Glossary $glossary - * The updated glossary object. - * @type int $state - * The current state of the glossary update operation. If the glossary input - * file was not updated this will be completed immediately - * @type \Google\Protobuf\Timestamp $submit_time - * The time when the operation was submitted to the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * The updated glossary object. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1; - * @return \Google\Cloud\Translate\V3\Glossary|null - */ - public function getGlossary() - { - return $this->glossary; - } - - public function hasGlossary() - { - return isset($this->glossary); - } - - public function clearGlossary() - { - unset($this->glossary); - } - - /** - * The updated glossary object. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1; - * @param \Google\Cloud\Translate\V3\Glossary $var - * @return $this - */ - public function setGlossary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary::class); - $this->glossary = $var; - - return $this; - } - - /** - * The current state of the glossary update operation. If the glossary input - * file was not updated this will be completed immediately - * - * Generated from protobuf field .google.cloud.translation.v3.UpdateGlossaryMetadata.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the glossary update operation. If the glossary input - * file was not updated this will be completed immediately - * - * Generated from protobuf field .google.cloud.translation.v3.UpdateGlossaryMetadata.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Translate\V3\UpdateGlossaryMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * The time when the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php deleted file mode 100644 index af62f118b6c5..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryMetadata/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.translation.v3.UpdateGlossaryMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The glossary was successfully updated. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Failed to update the glossary. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Request is in the process of being canceled after caller invoked - * longrunning.Operations.CancelOperation on the request id. - * - * Generated from protobuf enum CANCELLING = 4; - */ - const CANCELLING = 4; - /** - * The glossary update request was successfully canceled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Translate\V3\UpdateGlossaryMetadata_State::class); - diff --git a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php b/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php deleted file mode 100644 index d4ad17b260d3..000000000000 --- a/owl-bot-staging/Translate/v3/proto/src/Google/Cloud/Translate/V3/UpdateGlossaryRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.translation.v3.UpdateGlossaryRequest - */ -class UpdateGlossaryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The glossary entry to update. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $glossary = null; - /** - * The list of fields to be updated. Currently only `display_name` and - * 'input_config' - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Translate\V3\Glossary $glossary Required. The glossary entry to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. Currently only `display_name` and - * 'input_config' - * - * @return \Google\Cloud\Translate\V3\UpdateGlossaryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Translate\V3\Glossary $glossary, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGlossary($glossary) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Translate\V3\Glossary $glossary - * Required. The glossary entry to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. Currently only `display_name` and - * 'input_config' - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The glossary entry to update. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Translate\V3\Glossary|null - */ - public function getGlossary() - { - return $this->glossary; - } - - public function hasGlossary() - { - return isset($this->glossary); - } - - public function clearGlossary() - { - unset($this->glossary); - } - - /** - * Required. The glossary entry to update. - * - * Generated from protobuf field .google.cloud.translation.v3.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Translate\V3\Glossary $var - * @return $this - */ - public function setGlossary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\Glossary::class); - $this->glossary = $var; - - return $this; - } - - /** - * The list of fields to be updated. Currently only `display_name` and - * 'input_config' - * - * 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. Currently only `display_name` and - * 'input_config' - * - * 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/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php deleted file mode 100644 index 445fcc3c00bd..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/adaptive_mt_translate.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setDataset($formattedDataset) - ->setContent($content); - - // Call the API and handle any network failures. - try { - /** @var AdaptiveMtTranslateResponse $response */ - $response = $translationServiceClient->adaptiveMtTranslate($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedDataset = TranslationServiceClient::adaptiveMtDatasetName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - $contentElement = '[CONTENT]'; - - adaptive_mt_translate_sample($formattedParent, $formattedDataset, $contentElement); -} -// [END translate_v3_generated_TranslationService_AdaptiveMtTranslate_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php deleted file mode 100644 index 7d14ea9bc116..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_document.php +++ /dev/null @@ -1,116 +0,0 @@ -setParent($formattedParent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->batchTranslateDocument($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchTranslateDocumentResponse $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $sourceLanguageCode = '[SOURCE_LANGUAGE_CODE]'; - $targetLanguageCodesElement = '[TARGET_LANGUAGE_CODES]'; - - batch_translate_document_sample($formattedParent, $sourceLanguageCode, $targetLanguageCodesElement); -} -// [END translate_v3_generated_TranslationService_BatchTranslateDocument_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php deleted file mode 100644 index 17f600ae7a25..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/batch_translate_text.php +++ /dev/null @@ -1,113 +0,0 @@ -setParent($formattedParent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->batchTranslateText($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchTranslateResponse $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $sourceLanguageCode = '[SOURCE_LANGUAGE_CODE]'; - $targetLanguageCodesElement = '[TARGET_LANGUAGE_CODES]'; - - batch_translate_text_sample($formattedParent, $sourceLanguageCode, $targetLanguageCodesElement); -} -// [END translate_v3_generated_TranslationService_BatchTranslateText_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php deleted file mode 100644 index 98a77eeaf05c..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedAdaptiveMtDatasetName); - $request = (new CreateAdaptiveMtDatasetRequest()) - ->setParent($formattedParent) - ->setAdaptiveMtDataset($adaptiveMtDataset); - - // Call the API and handle any network failures. - try { - /** @var AdaptiveMtDataset $response */ - $response = $translationServiceClient->createAdaptiveMtDataset($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedAdaptiveMtDatasetName = TranslationServiceClient::adaptiveMtDatasetName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - - create_adaptive_mt_dataset_sample($formattedParent, $formattedAdaptiveMtDatasetName); -} -// [END translate_v3_generated_TranslationService_CreateAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php deleted file mode 100644 index 158e8454a694..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_dataset.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setDataset($dataset); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->createDataset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Dataset $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_dataset_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_CreateDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php deleted file mode 100644 index c6779a21048a..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($glossaryName); - $request = (new CreateGlossaryRequest()) - ->setParent($formattedParent) - ->setGlossary($glossary); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->createGlossary($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Glossary $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $glossaryName = '[NAME]'; - - create_glossary_sample($formattedParent, $glossaryName); -} -// [END translate_v3_generated_TranslationService_CreateGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php deleted file mode 100644 index 760e1aeb893c..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_glossary_entry.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent) - ->setGlossaryEntry($glossaryEntry); - - // Call the API and handle any network failures. - try { - /** @var GlossaryEntry $response */ - $response = $translationServiceClient->createGlossaryEntry($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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - - create_glossary_entry_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_CreateGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php deleted file mode 100644 index 79accf9238f0..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/create_model.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent) - ->setModel($model); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->createModel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Model $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_model_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_CreateModel_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php deleted file mode 100644 index 5a4e58077d9c..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $translationServiceClient->deleteAdaptiveMtDataset($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 = TranslationServiceClient::adaptiveMtDatasetName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - - delete_adaptive_mt_dataset_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_DeleteAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php deleted file mode 100644 index 83d86f0d8558..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $translationServiceClient->deleteAdaptiveMtFile($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 = TranslationServiceClient::adaptiveMtFileName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[FILE]' - ); - - delete_adaptive_mt_file_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_DeleteAdaptiveMtFile_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php deleted file mode 100644 index 9333f0d2d005..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_dataset.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->deleteDataset($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 = TranslationServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - - delete_dataset_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_DeleteDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php deleted file mode 100644 index 00eecc233830..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->deleteGlossary($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DeleteGlossaryResponse $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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - - delete_glossary_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_DeleteGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php deleted file mode 100644 index cbda6919ebdc..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_glossary_entry.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $translationServiceClient->deleteGlossaryEntry($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 = TranslationServiceClient::glossaryEntryName( - '[PROJECT]', - '[LOCATION]', - '[GLOSSARY]', - '[GLOSSARY_ENTRY]' - ); - - delete_glossary_entry_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_DeleteGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php deleted file mode 100644 index fbc46fca7be1..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/delete_model.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->deleteModel($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 = TranslationServiceClient::modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - - delete_model_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_DeleteModel_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php deleted file mode 100644 index 20caef711ee4..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/detect_language.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var DetectLanguageResponse $response */ - $response = $translationServiceClient->detectLanguage($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - detect_language_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_DetectLanguage_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php deleted file mode 100644 index 523e203272f4..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/export_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setDataset($dataset) - ->setOutputConfig($outputConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->exportData($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 -{ - $dataset = '[DATASET]'; - - export_data_sample($dataset); -} -// [END translate_v3_generated_TranslationService_ExportData_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php deleted file mode 100644 index 053180b3888b..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AdaptiveMtDataset $response */ - $response = $translationServiceClient->getAdaptiveMtDataset($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 = TranslationServiceClient::adaptiveMtDatasetName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - - get_adaptive_mt_dataset_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_GetAdaptiveMtDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php deleted file mode 100644 index 1e9347c31212..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_adaptive_mt_file.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AdaptiveMtFile $response */ - $response = $translationServiceClient->getAdaptiveMtFile($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 = TranslationServiceClient::adaptiveMtFileName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[FILE]' - ); - - get_adaptive_mt_file_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_GetAdaptiveMtFile_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php deleted file mode 100644 index cae6165e6dad..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_dataset.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Dataset $response */ - $response = $translationServiceClient->getDataset($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 = TranslationServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - - get_dataset_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_GetDataset_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php deleted file mode 100644 index 5f2c564c7f25..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Glossary $response */ - $response = $translationServiceClient->getGlossary($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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - - get_glossary_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_GetGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php deleted file mode 100644 index 02897ea75a5f..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_glossary_entry.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GlossaryEntry $response */ - $response = $translationServiceClient->getGlossaryEntry($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 = TranslationServiceClient::glossaryEntryName( - '[PROJECT]', - '[LOCATION]', - '[GLOSSARY]', - '[GLOSSARY_ENTRY]' - ); - - get_glossary_entry_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_GetGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php deleted file mode 100644 index 3d282873ecef..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_model.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Model $response */ - $response = $translationServiceClient->getModel($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 = TranslationServiceClient::modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - - get_model_sample($formattedName); -} -// [END translate_v3_generated_TranslationService_GetModel_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php deleted file mode 100644 index d7e7c8b08c47..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/get_supported_languages.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var SupportedLanguages $response */ - $response = $translationServiceClient->getSupportedLanguages($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - get_supported_languages_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_GetSupportedLanguages_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php deleted file mode 100644 index 2e0dfadb8f7c..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_adaptive_mt_file.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ImportAdaptiveMtFileResponse $response */ - $response = $translationServiceClient->importAdaptiveMtFile($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 = TranslationServiceClient::adaptiveMtDatasetName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - - import_adaptive_mt_file_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ImportAdaptiveMtFile_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php deleted file mode 100644 index f25383c46759..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/import_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setDataset($dataset) - ->setInputConfig($inputConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->importData($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 -{ - $dataset = '[DATASET]'; - - import_data_sample($dataset); -} -// [END translate_v3_generated_TranslationService_ImportData_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php deleted file mode 100644 index 51627d5ae774..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listAdaptiveMtDatasets($request); - - /** @var AdaptiveMtDataset $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_adaptive_mt_datasets_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListAdaptiveMtDatasets_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php deleted file mode 100644 index 4653eb47c8dc..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_files.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listAdaptiveMtFiles($request); - - /** @var AdaptiveMtFile $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 = TranslationServiceClient::adaptiveMtDatasetName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]' - ); - - list_adaptive_mt_files_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListAdaptiveMtFiles_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php deleted file mode 100644 index d0ee81cae69b..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listAdaptiveMtSentences($request); - - /** @var AdaptiveMtSentence $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 = TranslationServiceClient::adaptiveMtFileName( - '[PROJECT]', - '[LOCATION]', - '[DATASET]', - '[FILE]' - ); - - list_adaptive_mt_sentences_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListAdaptiveMtSentences_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php deleted file mode 100644 index 97ab036f8c18..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_datasets.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listDatasets($request); - - /** @var Dataset $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_datasets_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListDatasets_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php deleted file mode 100644 index a0f0a9942933..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_examples.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listExamples($request); - - /** @var Example $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 = TranslationServiceClient::datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - - list_examples_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListExamples_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php deleted file mode 100644 index 62ea546ca194..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossaries.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listGlossaries($request); - - /** @var Glossary $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_glossaries_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListGlossaries_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php deleted file mode 100644 index e5e3af640d52..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_glossary_entries.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listGlossaryEntries($request); - - /** @var GlossaryEntry $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 = TranslationServiceClient::glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - - list_glossary_entries_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListGlossaryEntries_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php deleted file mode 100644 index 79c3fffdaf6e..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/list_models.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $translationServiceClient->listModels($request); - - /** @var Model $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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_models_sample($formattedParent); -} -// [END translate_v3_generated_TranslationService_ListModels_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php deleted file mode 100644 index 3e917c5cc2c8..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/romanize_text.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setContents($contents); - - // Call the API and handle any network failures. - try { - /** @var RomanizeTextResponse $response */ - $response = $translationServiceClient->romanizeText($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 = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $contentsElement = '[CONTENTS]'; - - romanize_text_sample($formattedParent, $contentsElement); -} -// [END translate_v3_generated_TranslationService_RomanizeText_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php deleted file mode 100644 index 977188613c2f..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_document.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($parent) - ->setTargetLanguageCode($targetLanguageCode) - ->setDocumentInputConfig($documentInputConfig); - - // Call the API and handle any network failures. - try { - /** @var TranslateDocumentResponse $response */ - $response = $translationServiceClient->translateDocument($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]'; - $targetLanguageCode = '[TARGET_LANGUAGE_CODE]'; - - translate_document_sample($parent, $targetLanguageCode); -} -// [END translate_v3_generated_TranslationService_TranslateDocument_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php deleted file mode 100644 index 95af91345fbc..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/translate_text.php +++ /dev/null @@ -1,97 +0,0 @@ -setContents($contents) - ->setTargetLanguageCode($targetLanguageCode) - ->setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var TranslateTextResponse $response */ - $response = $translationServiceClient->translateText($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 -{ - $contentsElement = '[CONTENTS]'; - $targetLanguageCode = '[TARGET_LANGUAGE_CODE]'; - $formattedParent = TranslationServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - translate_text_sample($contentsElement, $targetLanguageCode, $formattedParent); -} -// [END translate_v3_generated_TranslationService_TranslateText_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php deleted file mode 100644 index 46c2c779b051..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($glossaryName); - $request = (new UpdateGlossaryRequest()) - ->setGlossary($glossary); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $translationServiceClient->updateGlossary($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Glossary $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 -{ - $glossaryName = '[NAME]'; - - update_glossary_sample($glossaryName); -} -// [END translate_v3_generated_TranslationService_UpdateGlossary_sync] diff --git a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php b/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php deleted file mode 100644 index 5b79eabe9838..000000000000 --- a/owl-bot-staging/Translate/v3/samples/V3/TranslationServiceClient/update_glossary_entry.php +++ /dev/null @@ -1,59 +0,0 @@ -setGlossaryEntry($glossaryEntry); - - // Call the API and handle any network failures. - try { - /** @var GlossaryEntry $response */ - $response = $translationServiceClient->updateGlossaryEntry($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END translate_v3_generated_TranslationService_UpdateGlossaryEntry_sync] diff --git a/owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php b/owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php deleted file mode 100644 index ebd285fe56c9..000000000000 --- a/owl-bot-staging/Translate/v3/src/V3/Client/TranslationServiceClient.php +++ /dev/null @@ -1,1476 +0,0 @@ - adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) - */ -final class TranslationServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.translation.v3.TranslationService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'translate.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'translate.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-translation', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/translation_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/translation_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/translation_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/translation_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * adaptive_mt_dataset resource. - * - * @param string $project - * @param string $location - * @param string $dataset - * - * @return string The formatted adaptive_mt_dataset resource. - */ - public static function adaptiveMtDatasetName(string $project, string $location, string $dataset): string - { - return self::getPathTemplate('adaptiveMtDataset')->render([ - 'project' => $project, - 'location' => $location, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * adaptive_mt_file resource. - * - * @param string $project - * @param string $location - * @param string $dataset - * @param string $file - * - * @return string The formatted adaptive_mt_file resource. - */ - public static function adaptiveMtFileName(string $project, string $location, string $dataset, string $file): string - { - return self::getPathTemplate('adaptiveMtFile')->render([ - 'project' => $project, - 'location' => $location, - 'dataset' => $dataset, - 'file' => $file, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a dataset - * resource. - * - * @param string $project - * @param string $location - * @param string $dataset - * - * @return string The formatted dataset resource. - */ - public static function datasetName(string $project, string $location, string $dataset): string - { - return self::getPathTemplate('dataset')->render([ - 'project' => $project, - 'location' => $location, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a glossary - * resource. - * - * @param string $project - * @param string $location - * @param string $glossary - * - * @return string The formatted glossary resource. - */ - public static function glossaryName(string $project, string $location, string $glossary): string - { - return self::getPathTemplate('glossary')->render([ - 'project' => $project, - 'location' => $location, - 'glossary' => $glossary, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * glossary_entry resource. - * - * @param string $project - * @param string $location - * @param string $glossary - * @param string $glossaryEntry - * - * @return string The formatted glossary_entry resource. - */ - public static function glossaryEntryName(string $project, string $location, string $glossary, string $glossaryEntry): string - { - return self::getPathTemplate('glossaryEntry')->render([ - 'project' => $project, - 'location' => $location, - 'glossary' => $glossary, - 'glossary_entry' => $glossaryEntry, - ]); - } - - /** - * 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 model - * resource. - * - * @param string $project - * @param string $location - * @param string $model - * - * @return string The formatted model resource. - */ - public static function modelName(string $project, string $location, string $model): string - { - return self::getPathTemplate('model')->render([ - 'project' => $project, - 'location' => $location, - 'model' => $model, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - adaptiveMtDataset: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset} - * - adaptiveMtFile: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file} - * - dataset: projects/{project}/locations/{location}/datasets/{dataset} - * - glossary: projects/{project}/locations/{location}/glossaries/{glossary} - * - glossaryEntry: projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry} - * - location: projects/{project}/locations/{location} - * - model: projects/{project}/locations/{location}/models/{model} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'translate.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Translate text using Adaptive MT. - * - * The async variant is {@see TranslationServiceClient::adaptiveMtTranslateAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/adaptive_mt_translate.php - * - * @param AdaptiveMtTranslateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AdaptiveMtTranslateResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function adaptiveMtTranslate(AdaptiveMtTranslateRequest $request, array $callOptions = []): AdaptiveMtTranslateResponse - { - return $this->startApiCall('AdaptiveMtTranslate', $request, $callOptions)->wait(); - } - - /** - * Translates a large volume of document in asynchronous batch mode. - * This function provides real-time output as the inputs are being processed. - * If caller cancels a request, the partial results (for an input file, it's - * all or nothing) may still be available on the specified output location. - * - * This call returns immediately and you can use - * google.longrunning.Operation.name to poll the status of the call. - * - * The async variant is - * {@see TranslationServiceClient::batchTranslateDocumentAsync()} . - * - * @example samples/V3/TranslationServiceClient/batch_translate_document.php - * - * @param BatchTranslateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 batchTranslateDocument(BatchTranslateDocumentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchTranslateDocument', $request, $callOptions)->wait(); - } - - /** - * Translates a large volume of text in asynchronous batch mode. - * This function provides real-time output as the inputs are being processed. - * If caller cancels a request, the partial results (for an input file, it's - * all or nothing) may still be available on the specified output location. - * - * This call returns immediately and you can - * use google.longrunning.Operation.name to poll the status of the call. - * - * The async variant is {@see TranslationServiceClient::batchTranslateTextAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/batch_translate_text.php - * - * @param BatchTranslateTextRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 batchTranslateText(BatchTranslateTextRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchTranslateText', $request, $callOptions)->wait(); - } - - /** - * Creates an Adaptive MT dataset. - * - * The async variant is - * {@see TranslationServiceClient::createAdaptiveMtDatasetAsync()} . - * - * @example samples/V3/TranslationServiceClient/create_adaptive_mt_dataset.php - * - * @param CreateAdaptiveMtDatasetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AdaptiveMtDataset - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAdaptiveMtDataset(CreateAdaptiveMtDatasetRequest $request, array $callOptions = []): AdaptiveMtDataset - { - return $this->startApiCall('CreateAdaptiveMtDataset', $request, $callOptions)->wait(); - } - - /** - * Creates a Dataset. - * - * The async variant is {@see TranslationServiceClient::createDatasetAsync()} . - * - * @example samples/V3/TranslationServiceClient/create_dataset.php - * - * @param CreateDatasetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createDataset(CreateDatasetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDataset', $request, $callOptions)->wait(); - } - - /** - * Creates a glossary and returns the long-running operation. Returns - * NOT_FOUND, if the project doesn't exist. - * - * The async variant is {@see TranslationServiceClient::createGlossaryAsync()} . - * - * @example samples/V3/TranslationServiceClient/create_glossary.php - * - * @param CreateGlossaryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createGlossary(CreateGlossaryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGlossary', $request, $callOptions)->wait(); - } - - /** - * Creates a glossary entry. - * - * The async variant is {@see TranslationServiceClient::createGlossaryEntryAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/create_glossary_entry.php - * - * @param CreateGlossaryEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GlossaryEntry - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGlossaryEntry(CreateGlossaryEntryRequest $request, array $callOptions = []): GlossaryEntry - { - return $this->startApiCall('CreateGlossaryEntry', $request, $callOptions)->wait(); - } - - /** - * Creates a Model. - * - * The async variant is {@see TranslationServiceClient::createModelAsync()} . - * - * @example samples/V3/TranslationServiceClient/create_model.php - * - * @param CreateModelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createModel(CreateModelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateModel', $request, $callOptions)->wait(); - } - - /** - * Deletes an Adaptive MT dataset, including all its entries and associated - * metadata. - * - * The async variant is - * {@see TranslationServiceClient::deleteAdaptiveMtDatasetAsync()} . - * - * @example samples/V3/TranslationServiceClient/delete_adaptive_mt_dataset.php - * - * @param DeleteAdaptiveMtDatasetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAdaptiveMtDataset(DeleteAdaptiveMtDatasetRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAdaptiveMtDataset', $request, $callOptions)->wait(); - } - - /** - * Deletes an AdaptiveMtFile along with its sentences. - * - * The async variant is - * {@see TranslationServiceClient::deleteAdaptiveMtFileAsync()} . - * - * @example samples/V3/TranslationServiceClient/delete_adaptive_mt_file.php - * - * @param DeleteAdaptiveMtFileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteAdaptiveMtFile(DeleteAdaptiveMtFileRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAdaptiveMtFile', $request, $callOptions)->wait(); - } - - /** - * Deletes a dataset and all of its contents. - * - * The async variant is {@see TranslationServiceClient::deleteDatasetAsync()} . - * - * @example samples/V3/TranslationServiceClient/delete_dataset.php - * - * @param DeleteDatasetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteDataset(DeleteDatasetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDataset', $request, $callOptions)->wait(); - } - - /** - * Deletes a glossary, or cancels glossary construction - * if the glossary isn't created yet. - * Returns NOT_FOUND, if the glossary doesn't exist. - * - * The async variant is {@see TranslationServiceClient::deleteGlossaryAsync()} . - * - * @example samples/V3/TranslationServiceClient/delete_glossary.php - * - * @param DeleteGlossaryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteGlossary(DeleteGlossaryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGlossary', $request, $callOptions)->wait(); - } - - /** - * Deletes a single entry from the glossary - * - * The async variant is {@see TranslationServiceClient::deleteGlossaryEntryAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/delete_glossary_entry.php - * - * @param DeleteGlossaryEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteGlossaryEntry(DeleteGlossaryEntryRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteGlossaryEntry', $request, $callOptions)->wait(); - } - - /** - * Deletes a model. - * - * The async variant is {@see TranslationServiceClient::deleteModelAsync()} . - * - * @example samples/V3/TranslationServiceClient/delete_model.php - * - * @param DeleteModelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteModel(DeleteModelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteModel', $request, $callOptions)->wait(); - } - - /** - * Detects the language of text within a request. - * - * The async variant is {@see TranslationServiceClient::detectLanguageAsync()} . - * - * @example samples/V3/TranslationServiceClient/detect_language.php - * - * @param DetectLanguageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DetectLanguageResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function detectLanguage(DetectLanguageRequest $request, array $callOptions = []): DetectLanguageResponse - { - return $this->startApiCall('DetectLanguage', $request, $callOptions)->wait(); - } - - /** - * Exports dataset's data to the provided output location. - * - * The async variant is {@see TranslationServiceClient::exportDataAsync()} . - * - * @example samples/V3/TranslationServiceClient/export_data.php - * - * @param ExportDataRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportData', $request, $callOptions)->wait(); - } - - /** - * Gets the Adaptive MT dataset. - * - * The async variant is - * {@see TranslationServiceClient::getAdaptiveMtDatasetAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_adaptive_mt_dataset.php - * - * @param GetAdaptiveMtDatasetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AdaptiveMtDataset - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAdaptiveMtDataset(GetAdaptiveMtDatasetRequest $request, array $callOptions = []): AdaptiveMtDataset - { - return $this->startApiCall('GetAdaptiveMtDataset', $request, $callOptions)->wait(); - } - - /** - * Gets and AdaptiveMtFile - * - * The async variant is {@see TranslationServiceClient::getAdaptiveMtFileAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_adaptive_mt_file.php - * - * @param GetAdaptiveMtFileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AdaptiveMtFile - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAdaptiveMtFile(GetAdaptiveMtFileRequest $request, array $callOptions = []): AdaptiveMtFile - { - return $this->startApiCall('GetAdaptiveMtFile', $request, $callOptions)->wait(); - } - - /** - * Gets a Dataset. - * - * The async variant is {@see TranslationServiceClient::getDatasetAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_dataset.php - * - * @param GetDatasetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Dataset - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataset(GetDatasetRequest $request, array $callOptions = []): Dataset - { - return $this->startApiCall('GetDataset', $request, $callOptions)->wait(); - } - - /** - * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - * exist. - * - * The async variant is {@see TranslationServiceClient::getGlossaryAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_glossary.php - * - * @param GetGlossaryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Glossary - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGlossary(GetGlossaryRequest $request, array $callOptions = []): Glossary - { - return $this->startApiCall('GetGlossary', $request, $callOptions)->wait(); - } - - /** - * Gets a single glossary entry by the given id. - * - * The async variant is {@see TranslationServiceClient::getGlossaryEntryAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_glossary_entry.php - * - * @param GetGlossaryEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GlossaryEntry - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGlossaryEntry(GetGlossaryEntryRequest $request, array $callOptions = []): GlossaryEntry - { - return $this->startApiCall('GetGlossaryEntry', $request, $callOptions)->wait(); - } - - /** - * Gets a model. - * - * The async variant is {@see TranslationServiceClient::getModelAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_model.php - * - * @param GetModelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Model - * - * @throws ApiException Thrown if the API call fails. - */ - public function getModel(GetModelRequest $request, array $callOptions = []): Model - { - return $this->startApiCall('GetModel', $request, $callOptions)->wait(); - } - - /** - * Returns a list of supported languages for translation. - * - * The async variant is - * {@see TranslationServiceClient::getSupportedLanguagesAsync()} . - * - * @example samples/V3/TranslationServiceClient/get_supported_languages.php - * - * @param GetSupportedLanguagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SupportedLanguages - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSupportedLanguages(GetSupportedLanguagesRequest $request, array $callOptions = []): SupportedLanguages - { - return $this->startApiCall('GetSupportedLanguages', $request, $callOptions)->wait(); - } - - /** - * Imports an AdaptiveMtFile and adds all of its sentences into the - * AdaptiveMtDataset. - * - * The async variant is - * {@see TranslationServiceClient::importAdaptiveMtFileAsync()} . - * - * @example samples/V3/TranslationServiceClient/import_adaptive_mt_file.php - * - * @param ImportAdaptiveMtFileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportAdaptiveMtFileResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importAdaptiveMtFile(ImportAdaptiveMtFileRequest $request, array $callOptions = []): ImportAdaptiveMtFileResponse - { - return $this->startApiCall('ImportAdaptiveMtFile', $request, $callOptions)->wait(); - } - - /** - * Import sentence pairs into translation Dataset. - * - * The async variant is {@see TranslationServiceClient::importDataAsync()} . - * - * @example samples/V3/TranslationServiceClient/import_data.php - * - * @param ImportDataRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 importData(ImportDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportData', $request, $callOptions)->wait(); - } - - /** - * Lists all Adaptive MT datasets for which the caller has read permission. - * - * The async variant is - * {@see TranslationServiceClient::listAdaptiveMtDatasetsAsync()} . - * - * @example samples/V3/TranslationServiceClient/list_adaptive_mt_datasets.php - * - * @param ListAdaptiveMtDatasetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAdaptiveMtDatasets(ListAdaptiveMtDatasetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAdaptiveMtDatasets', $request, $callOptions); - } - - /** - * Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. - * - * The async variant is {@see TranslationServiceClient::listAdaptiveMtFilesAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/list_adaptive_mt_files.php - * - * @param ListAdaptiveMtFilesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAdaptiveMtFiles(ListAdaptiveMtFilesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAdaptiveMtFiles', $request, $callOptions); - } - - /** - * Lists all AdaptiveMtSentences under a given file/dataset. - * - * The async variant is - * {@see TranslationServiceClient::listAdaptiveMtSentencesAsync()} . - * - * @example samples/V3/TranslationServiceClient/list_adaptive_mt_sentences.php - * - * @param ListAdaptiveMtSentencesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAdaptiveMtSentences(ListAdaptiveMtSentencesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAdaptiveMtSentences', $request, $callOptions); - } - - /** - * Lists datasets. - * - * The async variant is {@see TranslationServiceClient::listDatasetsAsync()} . - * - * @example samples/V3/TranslationServiceClient/list_datasets.php - * - * @param ListDatasetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDatasets(ListDatasetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDatasets', $request, $callOptions); - } - - /** - * Lists sentence pairs in the dataset. - * - * The async variant is {@see TranslationServiceClient::listExamplesAsync()} . - * - * @example samples/V3/TranslationServiceClient/list_examples.php - * - * @param ListExamplesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listExamples(ListExamplesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExamples', $request, $callOptions); - } - - /** - * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - * exist. - * - * The async variant is {@see TranslationServiceClient::listGlossariesAsync()} . - * - * @example samples/V3/TranslationServiceClient/list_glossaries.php - * - * @param ListGlossariesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listGlossaries(ListGlossariesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGlossaries', $request, $callOptions); - } - - /** - * List the entries for the glossary. - * - * The async variant is {@see TranslationServiceClient::listGlossaryEntriesAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/list_glossary_entries.php - * - * @param ListGlossaryEntriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listGlossaryEntries(ListGlossaryEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGlossaryEntries', $request, $callOptions); - } - - /** - * Lists models. - * - * The async variant is {@see TranslationServiceClient::listModelsAsync()} . - * - * @example samples/V3/TranslationServiceClient/list_models.php - * - * @param ListModelsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listModels(ListModelsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListModels', $request, $callOptions); - } - - /** - * Romanize input text written in non-Latin scripts to Latin text. - * - * The async variant is {@see TranslationServiceClient::romanizeTextAsync()} . - * - * @example samples/V3/TranslationServiceClient/romanize_text.php - * - * @param RomanizeTextRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RomanizeTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function romanizeText(RomanizeTextRequest $request, array $callOptions = []): RomanizeTextResponse - { - return $this->startApiCall('RomanizeText', $request, $callOptions)->wait(); - } - - /** - * Translates documents in synchronous mode. - * - * The async variant is {@see TranslationServiceClient::translateDocumentAsync()} . - * - * @example samples/V3/TranslationServiceClient/translate_document.php - * - * @param TranslateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TranslateDocumentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function translateDocument(TranslateDocumentRequest $request, array $callOptions = []): TranslateDocumentResponse - { - return $this->startApiCall('TranslateDocument', $request, $callOptions)->wait(); - } - - /** - * Translates input text and returns translated text. - * - * The async variant is {@see TranslationServiceClient::translateTextAsync()} . - * - * @example samples/V3/TranslationServiceClient/translate_text.php - * - * @param TranslateTextRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TranslateTextResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function translateText(TranslateTextRequest $request, array $callOptions = []): TranslateTextResponse - { - return $this->startApiCall('TranslateText', $request, $callOptions)->wait(); - } - - /** - * Updates a glossary. A LRO is used since the update can be async if the - * glossary's entry file is updated. - * - * The async variant is {@see TranslationServiceClient::updateGlossaryAsync()} . - * - * @example samples/V3/TranslationServiceClient/update_glossary.php - * - * @param UpdateGlossaryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateGlossary(UpdateGlossaryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGlossary', $request, $callOptions)->wait(); - } - - /** - * Updates a glossary entry. - * - * The async variant is {@see TranslationServiceClient::updateGlossaryEntryAsync()} - * . - * - * @example samples/V3/TranslationServiceClient/update_glossary_entry.php - * - * @param UpdateGlossaryEntryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GlossaryEntry - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGlossaryEntry(UpdateGlossaryEntryRequest $request, array $callOptions = []): GlossaryEntry - { - return $this->startApiCall('UpdateGlossaryEntry', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php b/owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php deleted file mode 100644 index 817db729f027..000000000000 --- a/owl-bot-staging/Translate/v3/src/V3/Gapic/TranslationServiceGapicClient.php +++ /dev/null @@ -1,3147 +0,0 @@ -locationName('[PROJECT]', '[LOCATION]'); - * $formattedDataset = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $content = []; - * $response = $translationServiceClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Translate\V3\Client\TranslationServiceClient}. - */ -class TranslationServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.translation.v3.TranslationService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'translate.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'translate.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-translation', - ]; - - private static $adaptiveMtDatasetNameTemplate; - - private static $adaptiveMtFileNameTemplate; - - private static $datasetNameTemplate; - - private static $glossaryNameTemplate; - - private static $glossaryEntryNameTemplate; - - private static $locationNameTemplate; - - private static $modelNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/translation_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/translation_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/translation_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/translation_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAdaptiveMtDatasetNameTemplate() - { - if (self::$adaptiveMtDatasetNameTemplate == null) { - self::$adaptiveMtDatasetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}'); - } - - return self::$adaptiveMtDatasetNameTemplate; - } - - private static function getAdaptiveMtFileNameTemplate() - { - if (self::$adaptiveMtFileNameTemplate == null) { - self::$adaptiveMtFileNameTemplate = new PathTemplate('projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}'); - } - - return self::$adaptiveMtFileNameTemplate; - } - - private static function getDatasetNameTemplate() - { - if (self::$datasetNameTemplate == null) { - self::$datasetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/datasets/{dataset}'); - } - - return self::$datasetNameTemplate; - } - - private static function getGlossaryNameTemplate() - { - if (self::$glossaryNameTemplate == null) { - self::$glossaryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/glossaries/{glossary}'); - } - - return self::$glossaryNameTemplate; - } - - private static function getGlossaryEntryNameTemplate() - { - if (self::$glossaryEntryNameTemplate == null) { - self::$glossaryEntryNameTemplate = new PathTemplate('projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}'); - } - - return self::$glossaryEntryNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getModelNameTemplate() - { - if (self::$modelNameTemplate == null) { - self::$modelNameTemplate = new PathTemplate('projects/{project}/locations/{location}/models/{model}'); - } - - return self::$modelNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'adaptiveMtDataset' => self::getAdaptiveMtDatasetNameTemplate(), - 'adaptiveMtFile' => self::getAdaptiveMtFileNameTemplate(), - 'dataset' => self::getDatasetNameTemplate(), - 'glossary' => self::getGlossaryNameTemplate(), - 'glossaryEntry' => self::getGlossaryEntryNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'model' => self::getModelNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * adaptive_mt_dataset resource. - * - * @param string $project - * @param string $location - * @param string $dataset - * - * @return string The formatted adaptive_mt_dataset resource. - */ - public static function adaptiveMtDatasetName($project, $location, $dataset) - { - return self::getAdaptiveMtDatasetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * adaptive_mt_file resource. - * - * @param string $project - * @param string $location - * @param string $dataset - * @param string $file - * - * @return string The formatted adaptive_mt_file resource. - */ - public static function adaptiveMtFileName($project, $location, $dataset, $file) - { - return self::getAdaptiveMtFileNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataset' => $dataset, - 'file' => $file, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a dataset - * resource. - * - * @param string $project - * @param string $location - * @param string $dataset - * - * @return string The formatted dataset resource. - */ - public static function datasetName($project, $location, $dataset) - { - return self::getDatasetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'dataset' => $dataset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a glossary - * resource. - * - * @param string $project - * @param string $location - * @param string $glossary - * - * @return string The formatted glossary resource. - */ - public static function glossaryName($project, $location, $glossary) - { - return self::getGlossaryNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'glossary' => $glossary, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * glossary_entry resource. - * - * @param string $project - * @param string $location - * @param string $glossary - * @param string $glossaryEntry - * - * @return string The formatted glossary_entry resource. - */ - public static function glossaryEntryName($project, $location, $glossary, $glossaryEntry) - { - return self::getGlossaryEntryNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'glossary' => $glossary, - 'glossary_entry' => $glossaryEntry, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a model - * resource. - * - * @param string $project - * @param string $location - * @param string $model - * - * @return string The formatted model resource. - */ - public static function modelName($project, $location, $model) - { - return self::getModelNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'model' => $model, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - adaptiveMtDataset: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset} - * - adaptiveMtFile: projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file} - * - dataset: projects/{project}/locations/{location}/datasets/{dataset} - * - glossary: projects/{project}/locations/{location}/glossaries/{glossary} - * - glossaryEntry: projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry} - * - location: projects/{project}/locations/{location} - * - model: projects/{project}/locations/{location}/models/{model} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'translate.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Translate text using Adaptive MT. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $formattedDataset = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $content = []; - * $response = $translationServiceClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Location to make a regional call. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * @param string $dataset Required. The resource name for the dataset to use for adaptive MT. - * `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` - * @param string[] $content Required. The content of the input in string format. - * @param array $optionalArgs { - * Optional. - * - * @type ReferenceSentenceConfig $referenceSentenceConfig - * Configuration for caller provided reference sentences. - * @type GlossaryConfig $glossaryConfig - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\AdaptiveMtTranslateResponse - * - * @throws ApiException if the remote call fails - */ - public function adaptiveMtTranslate($parent, $dataset, $content, array $optionalArgs = []) - { - $request = new AdaptiveMtTranslateRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataset($dataset); - $request->setContent($content); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['referenceSentenceConfig'])) { - $request->setReferenceSentenceConfig($optionalArgs['referenceSentenceConfig']); - } - - if (isset($optionalArgs['glossaryConfig'])) { - $request->setGlossaryConfig($optionalArgs['glossaryConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AdaptiveMtTranslate', AdaptiveMtTranslateResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Translates a large volume of document in asynchronous batch mode. - * This function provides real-time output as the inputs are being processed. - * If caller cancels a request, the partial results (for an input file, it's - * all or nothing) may still be available on the specified output location. - * - * This call returns immediately and you can use - * google.longrunning.Operation.name to poll the status of the call. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $sourceLanguageCode = 'source_language_code'; - * $targetLanguageCodes = []; - * $inputConfigs = []; - * $outputConfig = new BatchDocumentOutputConfig(); - * $operationResponse = $translationServiceClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'batchTranslateDocument'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Location to make a regional call. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * - * The `global` location is not supported for batch translation. - * - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * @param string $sourceLanguageCode Required. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * [Language Support](https://cloud.google.com/translate/docs/languages). - * @param string[] $targetLanguageCodes Required. The ISO-639 language code to use for translation of the input - * document. Specify up to 10 language codes here. - * @param BatchDocumentInputConfig[] $inputConfigs Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size to translate should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * @param BatchDocumentOutputConfig $outputConfig Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * @param array $optionalArgs { - * Optional. - * - * @type array $models - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is the model name. Value can be a built-in general model, - * or an AutoML Translation model. - * - * The value format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * @type array $glossaries - * Optional. Glossaries to be applied. It's keyed by target language code. - * @type array $formatConversions - * Optional. The file format conversion map that is applied to all input - * files. The map key is the original mime_type. The map value is the target - * mime_type of translated documents. - * - * Supported file format conversion includes: - * - `application/pdf` to - * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - * - * If nothing specified, output files will be in the same format as the - * original file. - * @type string $customizedAttribution - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * @type bool $enableShadowRemovalNativePdf - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * @type bool $enableRotationCorrection - * Optional. If true, enable auto rotation correction in DVS. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function batchTranslateDocument($parent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig, array $optionalArgs = []) - { - $request = new BatchTranslateDocumentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSourceLanguageCode($sourceLanguageCode); - $request->setTargetLanguageCodes($targetLanguageCodes); - $request->setInputConfigs($inputConfigs); - $request->setOutputConfig($outputConfig); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['models'])) { - $request->setModels($optionalArgs['models']); - } - - if (isset($optionalArgs['glossaries'])) { - $request->setGlossaries($optionalArgs['glossaries']); - } - - if (isset($optionalArgs['formatConversions'])) { - $request->setFormatConversions($optionalArgs['formatConversions']); - } - - if (isset($optionalArgs['customizedAttribution'])) { - $request->setCustomizedAttribution($optionalArgs['customizedAttribution']); - } - - if (isset($optionalArgs['enableShadowRemovalNativePdf'])) { - $request->setEnableShadowRemovalNativePdf($optionalArgs['enableShadowRemovalNativePdf']); - } - - if (isset($optionalArgs['enableRotationCorrection'])) { - $request->setEnableRotationCorrection($optionalArgs['enableRotationCorrection']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchTranslateDocument', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Translates a large volume of text in asynchronous batch mode. - * This function provides real-time output as the inputs are being processed. - * If caller cancels a request, the partial results (for an input file, it's - * all or nothing) may still be available on the specified output location. - * - * This call returns immediately and you can - * use google.longrunning.Operation.name to poll the status of the call. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $sourceLanguageCode = 'source_language_code'; - * $targetLanguageCodes = []; - * $inputConfigs = []; - * $outputConfig = new OutputConfig(); - * $operationResponse = $translationServiceClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'batchTranslateText'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Location to make a call. Must refer to a caller's project. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * - * The `global` location is not supported for batch translation. - * - * Only AutoML Translation models or glossaries within the same region (have - * the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) - * error is returned. - * @param string $sourceLanguageCode Required. Source language code. - * @param string[] $targetLanguageCodes Required. Specify up to 10 language codes here. - * @param InputConfig[] $inputConfigs Required. Input configurations. - * The total number of files matched should be <= 100. - * The total content size should be <= 100M Unicode codepoints. - * The files must use UTF-8 encoding. - * @param OutputConfig $outputConfig Required. Output configuration. - * If 2 input configs match to the same file (that is, same input path), - * we don't generate output for duplicate inputs. - * @param array $optionalArgs { - * Optional. - * - * @type array $models - * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, - * or an AutoML Translation model. - * - * The value format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - * If the map is empty or a specific model is - * not requested for a language pair, then default google model (nmt) is used. - * @type array $glossaries - * Optional. Glossaries to be applied for translation. - * It's keyed by target language code. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function batchTranslateText($parent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig, array $optionalArgs = []) - { - $request = new BatchTranslateTextRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSourceLanguageCode($sourceLanguageCode); - $request->setTargetLanguageCodes($targetLanguageCodes); - $request->setInputConfigs($inputConfigs); - $request->setOutputConfig($outputConfig); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['models'])) { - $request->setModels($optionalArgs['models']); - } - - if (isset($optionalArgs['glossaries'])) { - $request->setGlossaries($optionalArgs['glossaries']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('BatchTranslateText', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates an Adaptive MT dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $adaptiveMtDataset = new AdaptiveMtDataset(); - * $response = $translationServiceClient->createAdaptiveMtDataset($formattedParent, $adaptiveMtDataset); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * @param AdaptiveMtDataset $adaptiveMtDataset Required. The AdaptiveMtDataset to be created. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset - * - * @throws ApiException if the remote call fails - */ - public function createAdaptiveMtDataset($parent, $adaptiveMtDataset, array $optionalArgs = []) - { - $request = new CreateAdaptiveMtDatasetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAdaptiveMtDataset($adaptiveMtDataset); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAdaptiveMtDataset', AdaptiveMtDataset::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a Dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $dataset = new Dataset(); - * $operationResponse = $translationServiceClient->createDataset($formattedParent, $dataset); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->createDataset($formattedParent, $dataset); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'createDataset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project name. - * @param Dataset $dataset Required. The Dataset to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createDataset($parent, $dataset, array $optionalArgs = []) - { - $request = new CreateDatasetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setDataset($dataset); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a glossary and returns the long-running operation. Returns - * NOT_FOUND, if the project doesn't exist. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $glossary = new Glossary(); - * $operationResponse = $translationServiceClient->createGlossary($formattedParent, $glossary); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->createGlossary($formattedParent, $glossary); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'createGlossary'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project name. - * @param Glossary $glossary Required. The glossary to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createGlossary($parent, $glossary, array $optionalArgs = []) - { - $request = new CreateGlossaryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGlossary($glossary); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateGlossary', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a glossary entry. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - * $glossaryEntry = new GlossaryEntry(); - * $response = $translationServiceClient->createGlossaryEntry($formattedParent, $glossaryEntry); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the glossary to create the entry under. - * @param GlossaryEntry $glossaryEntry Required. The glossary entry to create - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\GlossaryEntry - * - * @throws ApiException if the remote call fails - */ - public function createGlossaryEntry($parent, $glossaryEntry, array $optionalArgs = []) - { - $request = new CreateGlossaryEntryRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setGlossaryEntry($glossaryEntry); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateGlossaryEntry', GlossaryEntry::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a Model. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $model = new Model(); - * $operationResponse = $translationServiceClient->createModel($formattedParent, $model); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->createModel($formattedParent, $model); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'createModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The project name, in form of - * `projects/{project}/locations/{location}` - * @param Model $model Required. The Model to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createModel($parent, $model, array $optionalArgs = []) - { - $request = new CreateModelRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setModel($model); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an Adaptive MT dataset, including all its entries and associated - * metadata. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $translationServiceClient->deleteAdaptiveMtDataset($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteAdaptiveMtDataset($name, array $optionalArgs = []) - { - $request = new DeleteAdaptiveMtDatasetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAdaptiveMtDataset', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an AdaptiveMtFile along with its sentences. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - * $translationServiceClient->deleteAdaptiveMtFile($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the file to delete, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteAdaptiveMtFile($name, array $optionalArgs = []) - { - $request = new DeleteAdaptiveMtFileRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAdaptiveMtFile', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a dataset and all of its contents. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $operationResponse = $translationServiceClient->deleteDataset($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->deleteDataset($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'deleteDataset'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the dataset to delete. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteDataset($name, array $optionalArgs = []) - { - $request = new DeleteDatasetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteDataset', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a glossary, or cancels glossary construction - * if the glossary isn't created yet. - * Returns NOT_FOUND, if the glossary doesn't exist. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - * $operationResponse = $translationServiceClient->deleteGlossary($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->deleteGlossary($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'deleteGlossary'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the glossary to delete. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteGlossary($name, array $optionalArgs = []) - { - $request = new DeleteGlossaryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteGlossary', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a single entry from the glossary - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - * $translationServiceClient->deleteGlossaryEntry($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the glossary entry to delete - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteGlossaryEntry($name, array $optionalArgs = []) - { - $request = new DeleteGlossaryEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteGlossaryEntry', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a model. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - * $operationResponse = $translationServiceClient->deleteModel($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->deleteModel($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'deleteModel'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the model to delete. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteModel($name, array $optionalArgs = []) - { - $request = new DeleteModelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteModel', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Detects the language of text within a request. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $translationServiceClient->detectLanguage($formattedParent); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Only models within the same region (has same location-id) can be used. - * Otherwise an INVALID_ARGUMENT (400) error is returned. - * @param array $optionalArgs { - * Optional. - * - * @type string $model - * Optional. The language detection model to be used. - * - * Format: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` - * - * Only one language detection model is currently supported: - * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. - * - * If not specified, the default model is used. - * @type string $content - * The content of the input stored as a string. - * @type string $mimeType - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\DetectLanguageResponse - * - * @throws ApiException if the remote call fails - */ - public function detectLanguage($parent, array $optionalArgs = []) - { - $request = new DetectLanguageRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['model'])) { - $request->setModel($optionalArgs['model']); - } - - if (isset($optionalArgs['content'])) { - $request->setContent($optionalArgs['content']); - } - - if (isset($optionalArgs['mimeType'])) { - $request->setMimeType($optionalArgs['mimeType']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DetectLanguage', DetectLanguageResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Exports dataset's data to the provided output location. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $dataset = 'dataset'; - * $outputConfig = new DatasetOutputConfig(); - * $operationResponse = $translationServiceClient->exportData($dataset, $outputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->exportData($dataset, $outputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'exportData'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $dataset Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @param DatasetOutputConfig $outputConfig Required. The config for the output content. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function exportData($dataset, $outputConfig, array $optionalArgs = []) - { - $request = new ExportDataRequest(); - $requestParamHeaders = []; - $request->setDataset($dataset); - $request->setOutputConfig($outputConfig); - $requestParamHeaders['dataset'] = $dataset; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ExportData', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the Adaptive MT dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $response = $translationServiceClient->getAdaptiveMtDataset($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the dataset. In the form of - * `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\AdaptiveMtDataset - * - * @throws ApiException if the remote call fails - */ - public function getAdaptiveMtDataset($name, array $optionalArgs = []) - { - $request = new GetAdaptiveMtDatasetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAdaptiveMtDataset', AdaptiveMtDataset::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets and AdaptiveMtFile - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - * $response = $translationServiceClient->getAdaptiveMtFile($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\AdaptiveMtFile - * - * @throws ApiException if the remote call fails - */ - public function getAdaptiveMtFile($name, array $optionalArgs = []) - { - $request = new GetAdaptiveMtFileRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAdaptiveMtFile', AdaptiveMtFile::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a Dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $response = $translationServiceClient->getDataset($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the dataset to retrieve. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\Dataset - * - * @throws ApiException if the remote call fails - */ - public function getDataset($name, array $optionalArgs = []) - { - $request = new GetDatasetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetDataset', Dataset::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - * exist. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - * $response = $translationServiceClient->getGlossary($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The name of the glossary to retrieve. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\Glossary - * - * @throws ApiException if the remote call fails - */ - public function getGlossary($name, array $optionalArgs = []) - { - $request = new GetGlossaryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGlossary', Glossary::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single glossary entry by the given id. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - * $response = $translationServiceClient->getGlossaryEntry($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the glossary entry to get - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\GlossaryEntry - * - * @throws ApiException if the remote call fails - */ - public function getGlossaryEntry($name, array $optionalArgs = []) - { - $request = new GetGlossaryEntryRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGlossaryEntry', GlossaryEntry::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a model. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedName = $translationServiceClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - * $response = $translationServiceClient->getModel($formattedName); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the model to retrieve. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\Model - * - * @throws ApiException if the remote call fails - */ - public function getModel($name, array $optionalArgs = []) - { - $request = new GetModelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetModel', Model::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns a list of supported languages for translation. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $translationServiceClient->getSupportedLanguages($formattedParent); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Non-global location is required for AutoML models. - * - * Only models within the same region (have same location-id) can be used, - * otherwise an INVALID_ARGUMENT (400) error is returned. - * @param array $optionalArgs { - * Optional. - * - * @type string $displayLanguageCode - * Optional. The language to use to return localized, human readable names - * of supported languages. If missing, then display names are not returned - * in a response. - * @type string $model - * Optional. Get supported languages of this model. - * - * The format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general NMT model. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\SupportedLanguages - * - * @throws ApiException if the remote call fails - */ - public function getSupportedLanguages($parent, array $optionalArgs = []) - { - $request = new GetSupportedLanguagesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['displayLanguageCode'])) { - $request->setDisplayLanguageCode($optionalArgs['displayLanguageCode']); - } - - if (isset($optionalArgs['model'])) { - $request->setModel($optionalArgs['model']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSupportedLanguages', SupportedLanguages::class, $optionalArgs, $request)->wait(); - } - - /** - * Imports an AdaptiveMtFile and adds all of its sentences into the - * AdaptiveMtDataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * $response = $translationServiceClient->importAdaptiveMtFile($formattedParent); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the file, in form of - * `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}` - * @param array $optionalArgs { - * Optional. - * - * @type FileInputSource $fileInputSource - * Inline file source. - * @type GcsInputSource $gcsInputSource - * Google Cloud Storage file source. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\ImportAdaptiveMtFileResponse - * - * @throws ApiException if the remote call fails - */ - public function importAdaptiveMtFile($parent, array $optionalArgs = []) - { - $request = new ImportAdaptiveMtFileRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['fileInputSource'])) { - $request->setFileInputSource($optionalArgs['fileInputSource']); - } - - if (isset($optionalArgs['gcsInputSource'])) { - $request->setGcsInputSource($optionalArgs['gcsInputSource']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ImportAdaptiveMtFile', ImportAdaptiveMtFileResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Import sentence pairs into translation Dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $dataset = 'dataset'; - * $inputConfig = new DatasetInputConfig(); - * $operationResponse = $translationServiceClient->importData($dataset, $inputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->importData($dataset, $inputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'importData'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $dataset Required. Name of the dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @param DatasetInputConfig $inputConfig Required. The config for the input content. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importData($dataset, $inputConfig, array $optionalArgs = []) - { - $request = new ImportDataRequest(); - $requestParamHeaders = []; - $request->setDataset($dataset); - $request->setInputConfig($inputConfig); - $requestParamHeaders['dataset'] = $dataset; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportData', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists all Adaptive MT datasets for which the caller has read permission. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listAdaptiveMtDatasets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listAdaptiveMtDatasets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the project from which to list the Adaptive - * MT datasets. `projects/{project-number-or-id}/locations/{location-id}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. An expression for filtering the results of the request. - * Filter is not supported yet. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAdaptiveMtDatasets($parent, array $optionalArgs = []) - { - $request = new ListAdaptiveMtDatasetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAdaptiveMtDatasets', $optionalArgs, ListAdaptiveMtDatasetsResponse::class, $request); - } - - /** - * Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listAdaptiveMtFiles($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listAdaptiveMtFiles($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the project from which to list the Adaptive - * MT files. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAdaptiveMtFiles($parent, array $optionalArgs = []) - { - $request = new ListAdaptiveMtFilesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAdaptiveMtFiles', $optionalArgs, ListAdaptiveMtFilesResponse::class, $request); - } - - /** - * Lists all AdaptiveMtSentences under a given file/dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listAdaptiveMtSentences($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listAdaptiveMtSentences($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The resource name of the project from which to list the Adaptive - * MT files. The following format lists all sentences under a file. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` - * The following format lists all sentences within a dataset. - * `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAdaptiveMtSentences($parent, array $optionalArgs = []) - { - $request = new ListAdaptiveMtSentencesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAdaptiveMtSentences', $optionalArgs, ListAdaptiveMtSentencesResponse::class, $request); - } - - /** - * Lists datasets. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listDatasets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listDatasets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listDatasets($parent, array $optionalArgs = []) - { - $request = new ListDatasetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListDatasets', $optionalArgs, ListDatasetsResponse::class, $request); - } - - /** - * Lists sentence pairs in the dataset. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listExamples($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listExamples($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the parent dataset. In form of - * `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. An expression for filtering the examples that will be returned. - * Example filter: - * * `usage=TRAIN` - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listExamples($parent, array $optionalArgs = []) - { - $request = new ListExamplesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListExamples', $optionalArgs, ListExamplesResponse::class, $request); - } - - /** - * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - * exist. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listGlossaries($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listGlossaries($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the project from which to list all of the glossaries. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Optional. Filter specifying constraints of a list operation. - * Specify the constraint by the format of "key=value", where key must be - * "src" or "tgt", and the value must be a valid language code. - * For multiple restrictions, concatenate them by "AND" (uppercase only), - * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used - * here, which means using 'en-US' and 'en' can lead to different results, - * which depends on the language code you used when you create the glossary. - * For the unidirectional glossaries, the "src" and "tgt" add restrictions - * on the source and target language code separately. - * For the equivalent term set glossaries, the "src" and/or "tgt" add - * restrictions on the term set. - * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional - * glossaries which exactly match the source language code as "en-US" and the - * target language code "zh-CN", but all equivalent term set glossaries which - * contain "en-US" and "zh-CN" in their language set will be picked. - * If missing, no filtering is performed. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listGlossaries($parent, array $optionalArgs = []) - { - $request = new ListGlossariesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGlossaries', $optionalArgs, ListGlossariesResponse::class, $request); - } - - /** - * List the entries for the glossary. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listGlossaryEntries($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listGlossaryEntries($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent glossary resource name for listing the glossary's - * entries. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listGlossaryEntries($parent, array $optionalArgs = []) - { - $request = new ListGlossaryEntriesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGlossaryEntries', $optionalArgs, ListGlossaryEntriesResponse::class, $request); - } - - /** - * Lists models. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $translationServiceClient->listModels($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $translationServiceClient->listModels($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Name of the parent project. In form of - * `projects/{project-number-or-id}/locations/{location-id}` - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. An expression for filtering the models that will be returned. - * Supported filter: - * `dataset_id=${dataset_id}` - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listModels($parent, array $optionalArgs = []) - { - $request = new ListModelsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListModels', $optionalArgs, ListModelsResponse::class, $request); - } - - /** - * Romanize input text written in non-Latin scripts to Latin text. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $contents = []; - * $response = $translationServiceClient->romanizeText($formattedParent, $contents); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}` or - * `projects/{project-number-or-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * @param string[] $contents Required. The content of the input in string format. - * @param array $optionalArgs { - * Optional. - * - * @type string $sourceLanguageCode - * Optional. The ISO-639 language code of the input text if - * known, for example, "hi" or "zh". If the source language isn't specified, - * the API attempts to identify the source language automatically and returns - * the source language for each content in the response. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\RomanizeTextResponse - * - * @throws ApiException if the remote call fails - */ - public function romanizeText($parent, $contents, array $optionalArgs = []) - { - $request = new RomanizeTextRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setContents($contents); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['sourceLanguageCode'])) { - $request->setSourceLanguageCode($optionalArgs['sourceLanguageCode']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RomanizeText', RomanizeTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Translates documents in synchronous mode. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $parent = 'parent'; - * $targetLanguageCode = 'target_language_code'; - * $documentInputConfig = new DocumentInputConfig(); - * $response = $translationServiceClient->translateDocument($parent, $targetLanguageCode, $documentInputConfig); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Location to make a regional call. - * - * Format: `projects/{project-number-or-id}/locations/{location-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Non-global location is required for requests using AutoML models or custom - * glossaries. - * - * Models and glossaries must be within the same region (have the same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input - * document, set to one of the language codes listed in Language Support. - * @param DocumentInputConfig $documentInputConfig Required. Input configurations. - * @param array $optionalArgs { - * Optional. - * - * @type string $sourceLanguageCode - * Optional. The ISO-639 language code of the input document if known, for - * example, "en-US" or "sr-Latn". Supported language codes are listed in - * Language Support. If the source language isn't specified, the API attempts - * to identify the source language automatically and returns the source - * language within the response. Source language must be specified if the - * request contains a glossary or a custom model. - * @type DocumentOutputConfig $documentOutputConfig - * Optional. Output configurations. - * Defines if the output file should be stored within Cloud Storage as well - * as the desired output format. If not provided the translated file will - * only be returned through a byte-stream and its output mime type will be - * the same as the input file's mime type. - * @type string $model - * Optional. The `model` type requested for this translation. - * - * The format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - * If not provided, the default Google model (NMT) will be used for - * translation. - * @type TranslateTextGlossaryConfig $glossaryConfig - * Optional. Glossary to be applied. The glossary must be within the same - * region (have the same location-id) as the model, otherwise an - * INVALID_ARGUMENT (400) error is returned. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters (Unicode - * codepoints), can only contain lowercase letters, numeric characters, - * underscores and dashes. International characters are allowed. Label values - * are optional. Label keys must start with a letter. - * - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * @type string $customizedAttribution - * Optional. This flag is to support user customized attribution. - * If not provided, the default is `Machine Translated by Google`. - * Customized attribution should follow rules in - * https://cloud.google.com/translate/attribution#attribution_and_logos - * @type bool $isTranslateNativePdfOnly - * Optional. is_translate_native_pdf_only field for external customers. - * If true, the page limit of online native pdf translation is 300 and only - * native pdf pages will be translated. - * @type bool $enableShadowRemovalNativePdf - * Optional. If true, use the text removal server to remove the shadow text on - * background image for native pdf translation. - * Shadow removal feature can only be enabled when - * is_translate_native_pdf_only: false && pdf_native_only: false - * @type bool $enableRotationCorrection - * Optional. If true, enable auto rotation correction in DVS. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\TranslateDocumentResponse - * - * @throws ApiException if the remote call fails - */ - public function translateDocument($parent, $targetLanguageCode, $documentInputConfig, array $optionalArgs = []) - { - $request = new TranslateDocumentRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTargetLanguageCode($targetLanguageCode); - $request->setDocumentInputConfig($documentInputConfig); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['sourceLanguageCode'])) { - $request->setSourceLanguageCode($optionalArgs['sourceLanguageCode']); - } - - if (isset($optionalArgs['documentOutputConfig'])) { - $request->setDocumentOutputConfig($optionalArgs['documentOutputConfig']); - } - - if (isset($optionalArgs['model'])) { - $request->setModel($optionalArgs['model']); - } - - if (isset($optionalArgs['glossaryConfig'])) { - $request->setGlossaryConfig($optionalArgs['glossaryConfig']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - if (isset($optionalArgs['customizedAttribution'])) { - $request->setCustomizedAttribution($optionalArgs['customizedAttribution']); - } - - if (isset($optionalArgs['isTranslateNativePdfOnly'])) { - $request->setIsTranslateNativePdfOnly($optionalArgs['isTranslateNativePdfOnly']); - } - - if (isset($optionalArgs['enableShadowRemovalNativePdf'])) { - $request->setEnableShadowRemovalNativePdf($optionalArgs['enableShadowRemovalNativePdf']); - } - - if (isset($optionalArgs['enableRotationCorrection'])) { - $request->setEnableRotationCorrection($optionalArgs['enableRotationCorrection']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TranslateDocument', TranslateDocumentResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Translates input text and returns translated text. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $contents = []; - * $targetLanguageCode = 'target_language_code'; - * $formattedParent = $translationServiceClient->locationName('[PROJECT]', '[LOCATION]'); - * $response = $translationServiceClient->translateText($contents, $targetLanguageCode, $formattedParent); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param string[] $contents Required. The content of the input in string format. - * We recommend the total content be less than 30,000 codepoints. The max - * length of this field is 1024. Use BatchTranslateText for larger text. - * @param string $targetLanguageCode Required. The ISO-639 language code to use for translation of the input - * text, set to one of the language codes listed in Language Support. - * @param string $parent Required. Project or location to make a call. Must refer to a caller's - * project. - * - * Format: `projects/{project-number-or-id}` or - * `projects/{project-number-or-id}/locations/{location-id}`. - * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. - * - * Non-global location is required for requests using AutoML models or - * custom glossaries. - * - * Models and glossaries must be within the same region (have same - * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. - * @param array $optionalArgs { - * Optional. - * - * @type string $mimeType - * Optional. The format of the source text, for example, "text/html", - * "text/plain". If left blank, the MIME type defaults to "text/html". - * @type string $sourceLanguageCode - * Optional. The ISO-639 language code of the input text if - * known, for example, "en-US" or "sr-Latn". Supported language codes are - * listed in Language Support. If the source language isn't specified, the API - * attempts to identify the source language automatically and returns the - * source language within the response. - * @type string $model - * Optional. The `model` type requested for this translation. - * - * The format depends on model type: - * - * - AutoML Translation models: - * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - * - * - General (built-in) models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * - * - Translation LLM models: - * `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, - * - * For global (non-regionalized) requests, use `location-id` `global`. - * For example, - * `projects/{project-number-or-id}/locations/global/models/general/nmt`. - * - * If not provided, the default Google model (NMT) will be used - * @type TranslateTextGlossaryConfig $glossaryConfig - * Optional. Glossary to be applied. The glossary must be - * within the same region (have the same location-id) as the model, otherwise - * an INVALID_ARGUMENT (400) error is returned. - * @type TransliterationConfig $transliterationConfig - * Optional. Transliteration to be applied. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * See https://cloud.google.com/translate/docs/advanced/labels for more - * information. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\TranslateTextResponse - * - * @throws ApiException if the remote call fails - */ - public function translateText($contents, $targetLanguageCode, $parent, array $optionalArgs = []) - { - $request = new TranslateTextRequest(); - $requestParamHeaders = []; - $request->setContents($contents); - $request->setTargetLanguageCode($targetLanguageCode); - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['mimeType'])) { - $request->setMimeType($optionalArgs['mimeType']); - } - - if (isset($optionalArgs['sourceLanguageCode'])) { - $request->setSourceLanguageCode($optionalArgs['sourceLanguageCode']); - } - - if (isset($optionalArgs['model'])) { - $request->setModel($optionalArgs['model']); - } - - if (isset($optionalArgs['glossaryConfig'])) { - $request->setGlossaryConfig($optionalArgs['glossaryConfig']); - } - - if (isset($optionalArgs['transliterationConfig'])) { - $request->setTransliterationConfig($optionalArgs['transliterationConfig']); - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TranslateText', TranslateTextResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a glossary. A LRO is used since the update can be async if the - * glossary's entry file is updated. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $glossary = new Glossary(); - * $operationResponse = $translationServiceClient->updateGlossary($glossary); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $translationServiceClient->updateGlossary($glossary); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $translationServiceClient->resumeOperation($operationName, 'updateGlossary'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param Glossary $glossary Required. The glossary entry to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The list of fields to be updated. Currently only `display_name` and - * 'input_config' - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateGlossary($glossary, array $optionalArgs = []) - { - $request = new UpdateGlossaryRequest(); - $requestParamHeaders = []; - $request->setGlossary($glossary); - $requestParamHeaders['glossary.name'] = $glossary->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateGlossary', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a glossary entry. - * - * Sample code: - * ``` - * $translationServiceClient = new TranslationServiceClient(); - * try { - * $glossaryEntry = new GlossaryEntry(); - * $response = $translationServiceClient->updateGlossaryEntry($glossaryEntry); - * } finally { - * $translationServiceClient->close(); - * } - * ``` - * - * @param GlossaryEntry $glossaryEntry Required. The glossary entry to update. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Translate\V3\GlossaryEntry - * - * @throws ApiException if the remote call fails - */ - public function updateGlossaryEntry($glossaryEntry, array $optionalArgs = []) - { - $request = new UpdateGlossaryEntryRequest(); - $requestParamHeaders = []; - $request->setGlossaryEntry($glossaryEntry); - $requestParamHeaders['glossary_entry.name'] = $glossaryEntry->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGlossaryEntry', GlossaryEntry::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php b/owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php deleted file mode 100644 index b1cacbc0fe42..000000000000 --- a/owl-bot-staging/Translate/v3/src/V3/TranslationServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.translation.v3.TranslationService' => [ - 'BatchTranslateDocument' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateDocumentResponse', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateDocumentMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchTranslateText' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateResponse', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\BatchTranslateMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\Dataset', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\CreateDatasetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGlossary' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\Glossary', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\CreateGlossaryMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\Model', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\CreateModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\DeleteDatasetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGlossary' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\DeleteGlossaryResponse', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\DeleteGlossaryMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteModel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\DeleteModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\ExportDataMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'dataset', - 'fieldAccessors' => [ - 'getDataset', - ], - ], - ], - ], - 'ImportData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\ImportDataMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'dataset', - 'fieldAccessors' => [ - 'getDataset', - ], - ], - ], - ], - 'UpdateGlossary' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Translate\V3\Glossary', - 'metadataReturnType' => '\Google\Cloud\Translate\V3\UpdateGlossaryMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'glossary.name', - 'fieldAccessors' => [ - 'getGlossary', - 'getName', - ], - ], - ], - ], - 'AdaptiveMtTranslate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtTranslateResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAdaptiveMtDataset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtDataset', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGlossaryEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\GlossaryEntry', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAdaptiveMtDataset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAdaptiveMtFile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGlossaryEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DetectLanguage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\DetectLanguageResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetAdaptiveMtDataset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtDataset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAdaptiveMtFile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\AdaptiveMtFile', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\Dataset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGlossary' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\Glossary', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGlossaryEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\GlossaryEntry', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetModel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\Model', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportedLanguages' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\SupportedLanguages', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ImportAdaptiveMtFile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ImportAdaptiveMtFileResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAdaptiveMtDatasets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAdaptiveMtDatasets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListAdaptiveMtDatasetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAdaptiveMtFiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAdaptiveMtFiles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListAdaptiveMtFilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAdaptiveMtSentences' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAdaptiveMtSentences', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListAdaptiveMtSentencesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatasets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDatasets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListDatasetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListExamples' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExamples', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListExamplesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGlossaries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGlossaries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListGlossariesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGlossaryEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGlossaryEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListGlossaryEntriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListModels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getModels', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\ListModelsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RomanizeText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\RomanizeTextResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'TranslateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\TranslateDocumentResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'TranslateText' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\TranslateTextResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateGlossaryEntry' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Translate\V3\GlossaryEntry', - 'headerParams' => [ - [ - 'keyName' => 'glossary_entry.name', - 'fieldAccessors' => [ - 'getGlossaryEntry', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'adaptiveMtDataset' => 'projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}', - 'adaptiveMtFile' => 'projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}', - 'dataset' => 'projects/{project}/locations/{location}/datasets/{dataset}', - 'glossary' => 'projects/{project}/locations/{location}/glossaries/{glossary}', - 'glossaryEntry' => 'projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}', - 'location' => 'projects/{project}/locations/{location}', - 'model' => 'projects/{project}/locations/{location}/models/{model}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php b/owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php deleted file mode 100644 index b2b9af836e85..000000000000 --- a/owl-bot-staging/Translate/v3/src/V3/resources/translation_service_rest_client_config.php +++ /dev/null @@ -1,582 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.translation.v3.TranslationService' => [ - 'AdaptiveMtTranslate' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:adaptiveMtTranslate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchTranslateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:batchTranslateDocument', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchTranslateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:batchTranslateText', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAdaptiveMtDataset' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets', - 'body' => 'adaptive_mt_dataset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataset' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/datasets', - 'body' => 'dataset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGlossary' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/glossaries', - 'body' => 'glossary', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGlossaryEntry' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries', - 'body' => 'glossary_entry', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateModel' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/models', - 'body' => 'model', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAdaptiveMtDataset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAdaptiveMtFile' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/datasets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGlossary' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGlossaryEntry' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteModel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/models/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DetectLanguage' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:detectLanguage', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*}:detectLanguage', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ExportData' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{dataset=projects/*/locations/*/datasets/*}:exportData', - 'body' => '*', - 'placeholders' => [ - 'dataset' => [ - 'getters' => [ - 'getDataset', - ], - ], - ], - ], - 'GetAdaptiveMtDataset' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAdaptiveMtFile' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataset' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/datasets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGlossary' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGlossaryEntry' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/glossaries/*/glossaryEntries/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetModel' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/models/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportedLanguages' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/supportedLanguages', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*}/supportedLanguages', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ImportAdaptiveMtFile' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}:importAdaptiveMtFile', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ImportData' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{dataset=projects/*/locations/*/datasets/*}:importData', - 'body' => '*', - 'placeholders' => [ - 'dataset' => [ - 'getters' => [ - 'getDataset', - ], - ], - ], - ], - 'ListAdaptiveMtDatasets' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/adaptiveMtDatasets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAdaptiveMtFiles' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtFiles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAdaptiveMtSentences' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*/adaptiveMtFiles/*}/adaptiveMtSentences', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/adaptiveMtDatasets/*}/adaptiveMtSentences', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatasets' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/datasets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListExamples' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/datasets/*}/examples', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGlossaries' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/glossaries', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGlossaryEntries' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*/glossaries/*}/glossaryEntries', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListModels' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}/models', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RomanizeText' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:romanizeText', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*}:romanizeText', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'TranslateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:translateDocument', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'TranslateText' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*/locations/*}:translateText', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*}:translateText', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateGlossary' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{glossary.name=projects/*/locations/*/glossaries/*}', - 'body' => 'glossary', - 'placeholders' => [ - 'glossary.name' => [ - 'getters' => [ - 'getGlossary', - 'getName', - ], - ], - ], - ], - 'UpdateGlossaryEntry' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{glossary_entry.name=projects/*/locations/*/glossaries/*/glossaryEntries/*}', - 'body' => 'glossary_entry', - 'placeholders' => [ - 'glossary_entry.name' => [ - 'getters' => [ - 'getGlossaryEntry', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/locations/*/operations/*}:wait', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php b/owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php deleted file mode 100644 index 269995c17d9a..000000000000 --- a/owl-bot-staging/Translate/v3/tests/Unit/V3/Client/TranslationServiceClientTest.php +++ /dev/null @@ -1,3545 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TranslationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TranslationServiceClient($options); - } - - /** @test */ - public function adaptiveMtTranslateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $expectedResponse = new AdaptiveMtTranslateResponse(); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $content = []; - $request = (new AdaptiveMtTranslateRequest()) - ->setParent($formattedParent) - ->setDataset($formattedDataset) - ->setContent($content); - $response = $gapicClient->adaptiveMtTranslate($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.translation.v3.TranslationService/AdaptiveMtTranslate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataset(); - $this->assertProtobufEquals($formattedDataset, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function adaptiveMtTranslateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $content = []; - $request = (new AdaptiveMtTranslateRequest()) - ->setParent($formattedParent) - ->setDataset($formattedDataset) - ->setContent($content); - try { - $gapicClient->adaptiveMtTranslate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchTranslateDocumentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $totalPages = 396186871; - $translatedPages = 1652747493; - $failedPages = 2002254526; - $totalBillablePages = 1292117569; - $totalCharacters = 1368640955; - $translatedCharacters = 1337326221; - $failedCharacters = 1723028396; - $totalBillableCharacters = 1242495501; - $expectedResponse = new BatchTranslateDocumentResponse(); - $expectedResponse->setTotalPages($totalPages); - $expectedResponse->setTranslatedPages($translatedPages); - $expectedResponse->setFailedPages($failedPages); - $expectedResponse->setTotalBillablePages($totalBillablePages); - $expectedResponse->setTotalCharacters($totalCharacters); - $expectedResponse->setTranslatedCharacters($translatedCharacters); - $expectedResponse->setFailedCharacters($failedCharacters); - $expectedResponse->setTotalBillableCharacters($totalBillableCharacters); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchTranslateDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new BatchDocumentOutputConfig(); - $request = (new BatchTranslateDocumentRequest()) - ->setParent($formattedParent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - $response = $gapicClient->batchTranslateDocument($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.translation.v3.TranslationService/BatchTranslateDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceLanguageCode(); - $this->assertProtobufEquals($sourceLanguageCode, $actualValue); - $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); - $this->assertProtobufEquals($targetLanguageCodes, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfigs(); - $this->assertProtobufEquals($inputConfigs, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); - $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 batchTranslateDocumentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateDocumentTest'); - $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]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new BatchDocumentOutputConfig(); - $request = (new BatchTranslateDocumentRequest()) - ->setParent($formattedParent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - $response = $gapicClient->batchTranslateDocument($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); - 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 batchTranslateTextTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateTextTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $totalCharacters = 1368640955; - $translatedCharacters = 1337326221; - $failedCharacters = 1723028396; - $expectedResponse = new BatchTranslateResponse(); - $expectedResponse->setTotalCharacters($totalCharacters); - $expectedResponse->setTranslatedCharacters($translatedCharacters); - $expectedResponse->setFailedCharacters($failedCharacters); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchTranslateTextTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new OutputConfig(); - $request = (new BatchTranslateTextRequest()) - ->setParent($formattedParent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - $response = $gapicClient->batchTranslateText($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.translation.v3.TranslationService/BatchTranslateText', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceLanguageCode(); - $this->assertProtobufEquals($sourceLanguageCode, $actualValue); - $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); - $this->assertProtobufEquals($targetLanguageCodes, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfigs(); - $this->assertProtobufEquals($inputConfigs, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); - $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 batchTranslateTextExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateTextTest'); - $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]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new OutputConfig(); - $request = (new BatchTranslateTextRequest()) - ->setParent($formattedParent) - ->setSourceLanguageCode($sourceLanguageCode) - ->setTargetLanguageCodes($targetLanguageCodes) - ->setInputConfigs($inputConfigs) - ->setOutputConfig($outputConfig); - $response = $gapicClient->batchTranslateText($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); - 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 createAdaptiveMtDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $expectedResponse = new AdaptiveMtDataset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $adaptiveMtDataset = new AdaptiveMtDataset(); - $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $adaptiveMtDataset->setName($adaptiveMtDatasetName); - $request = (new CreateAdaptiveMtDatasetRequest()) - ->setParent($formattedParent) - ->setAdaptiveMtDataset($adaptiveMtDataset); - $response = $gapicClient->createAdaptiveMtDataset($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.translation.v3.TranslationService/CreateAdaptiveMtDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAdaptiveMtDataset(); - $this->assertProtobufEquals($adaptiveMtDataset, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAdaptiveMtDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $adaptiveMtDataset = new AdaptiveMtDataset(); - $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $adaptiveMtDataset->setName($adaptiveMtDatasetName); - $request = (new CreateAdaptiveMtDatasetRequest()) - ->setParent($formattedParent) - ->setAdaptiveMtDataset($adaptiveMtDataset); - try { - $gapicClient->createAdaptiveMtDataset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDatasetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatasetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Dataset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatasetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataset = new Dataset(); - $request = (new CreateDatasetRequest()) - ->setParent($formattedParent) - ->setDataset($dataset); - $response = $gapicClient->createDataset($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.translation.v3.TranslationService/CreateDataset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataset(); - $this->assertProtobufEquals($dataset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatasetTest'); - $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 createDatasetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatasetTest'); - $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]'); - $dataset = new Dataset(); - $request = (new CreateDatasetRequest()) - ->setParent($formattedParent) - ->setDataset($dataset); - $response = $gapicClient->createDataset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatasetTest'); - 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 createGlossaryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGlossaryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $entryCount = 811131134; - $displayName = 'displayName1615086568'; - $expectedResponse = new Glossary(); - $expectedResponse->setName($name); - $expectedResponse->setEntryCount($entryCount); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGlossaryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $request = (new CreateGlossaryRequest()) - ->setParent($formattedParent) - ->setGlossary($glossary); - $response = $gapicClient->createGlossary($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.translation.v3.TranslationService/CreateGlossary', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGlossary(); - $this->assertProtobufEquals($glossary, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); - $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 createGlossaryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGlossaryTest'); - $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]'); - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $request = (new CreateGlossaryRequest()) - ->setParent($formattedParent) - ->setGlossary($glossary); - $response = $gapicClient->createGlossary($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); - 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 createGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new GlossaryEntry(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $glossaryEntry = new GlossaryEntry(); - $request = (new CreateGlossaryEntryRequest()) - ->setParent($formattedParent) - ->setGlossaryEntry($glossaryEntry); - $response = $gapicClient->createGlossaryEntry($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.translation.v3.TranslationService/CreateGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGlossaryEntry(); - $this->assertProtobufEquals($glossaryEntry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $glossaryEntry = new GlossaryEntry(); - $request = (new CreateGlossaryEntryRequest()) - ->setParent($formattedParent) - ->setGlossaryEntry($glossaryEntry); - try { - $gapicClient->createGlossaryEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createModelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $dataset = 'dataset1443214456'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Model(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataset($dataset); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $model = new Model(); - $request = (new CreateModelRequest()) - ->setParent($formattedParent) - ->setModel($model); - $response = $gapicClient->createModel($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.translation.v3.TranslationService/CreateModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getModel(); - $this->assertProtobufEquals($model, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createModelTest'); - $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 createModelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createModelTest'); - $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]'); - $model = new Model(); - $request = (new CreateModelRequest()) - ->setParent($formattedParent) - ->setModel($model); - $response = $gapicClient->createModel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createModelTest'); - 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 deleteAdaptiveMtDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new DeleteAdaptiveMtDatasetRequest()) - ->setName($formattedName); - $gapicClient->deleteAdaptiveMtDataset($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdaptiveMtDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new DeleteAdaptiveMtDatasetRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAdaptiveMtDataset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdaptiveMtFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $request = (new DeleteAdaptiveMtFileRequest()) - ->setName($formattedName); - $gapicClient->deleteAdaptiveMtFile($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtFile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdaptiveMtFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $request = (new DeleteAdaptiveMtFileRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAdaptiveMtFile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDatasetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatasetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatasetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new DeleteDatasetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataset($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.translation.v3.TranslationService/DeleteDataset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); - $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 deleteDatasetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatasetTest'); - $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new DeleteDatasetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDataset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); - 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 deleteGlossaryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGlossaryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new DeleteGlossaryResponse(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGlossaryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $request = (new DeleteGlossaryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGlossary($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.translation.v3.TranslationService/DeleteGlossary', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); - $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 deleteGlossaryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGlossaryTest'); - $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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $request = (new DeleteGlossaryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGlossary($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); - 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 deleteGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - $request = (new DeleteGlossaryEntryRequest()) - ->setName($formattedName); - $gapicClient->deleteGlossaryEntry($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - $request = (new DeleteGlossaryEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteGlossaryEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteModelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $request = (new DeleteModelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteModel($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.translation.v3.TranslationService/DeleteModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteModelTest'); - $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 deleteModelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteModelTest'); - $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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $request = (new DeleteModelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteModel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteModelTest'); - 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 detectLanguageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DetectLanguageResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new DetectLanguageRequest()) - ->setParent($formattedParent); - $response = $gapicClient->detectLanguage($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.translation.v3.TranslationService/DetectLanguage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function detectLanguageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 DetectLanguageRequest()) - ->setParent($formattedParent); - try { - $gapicClient->detectLanguage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataset = 'dataset1443214456'; - $outputConfig = new DatasetOutputConfig(); - $request = (new ExportDataRequest()) - ->setDataset($dataset) - ->setOutputConfig($outputConfig); - $response = $gapicClient->exportData($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.translation.v3.TranslationService/ExportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataset(); - $this->assertProtobufEquals($dataset, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - $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 exportDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $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 - $dataset = 'dataset1443214456'; - $outputConfig = new DatasetOutputConfig(); - $request = (new ExportDataRequest()) - ->setDataset($dataset) - ->setOutputConfig($outputConfig); - $response = $gapicClient->exportData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - 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 getAdaptiveMtDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $expectedResponse = new AdaptiveMtDataset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new GetAdaptiveMtDatasetRequest()) - ->setName($formattedName); - $response = $gapicClient->getAdaptiveMtDataset($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.translation.v3.TranslationService/GetAdaptiveMtDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdaptiveMtDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new GetAdaptiveMtDatasetRequest()) - ->setName($formattedName); - try { - $gapicClient->getAdaptiveMtDataset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdaptiveMtFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $entryCount = 811131134; - $expectedResponse = new AdaptiveMtFile(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEntryCount($entryCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $request = (new GetAdaptiveMtFileRequest()) - ->setName($formattedName); - $response = $gapicClient->getAdaptiveMtFile($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.translation.v3.TranslationService/GetAdaptiveMtFile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdaptiveMtFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $request = (new GetAdaptiveMtFileRequest()) - ->setName($formattedName); - try { - $gapicClient->getAdaptiveMtFile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Dataset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new GetDatasetRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataset($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.translation.v3.TranslationService/GetDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new GetDatasetRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryCount = 811131134; - $displayName = 'displayName1615086568'; - $expectedResponse = new Glossary(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryCount($entryCount); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $request = (new GetGlossaryRequest()) - ->setName($formattedName); - $response = $gapicClient->getGlossary($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.translation.v3.TranslationService/GetGlossary', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $request = (new GetGlossaryRequest()) - ->setName($formattedName); - try { - $gapicClient->getGlossary($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new GlossaryEntry(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - $request = (new GetGlossaryEntryRequest()) - ->setName($formattedName); - $response = $gapicClient->getGlossaryEntry($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.translation.v3.TranslationService/GetGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - $request = (new GetGlossaryEntryRequest()) - ->setName($formattedName); - try { - $gapicClient->getGlossaryEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $dataset = 'dataset1443214456'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Model(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataset($dataset); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $request = (new GetModelRequest()) - ->setName($formattedName); - $response = $gapicClient->getModel($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.translation.v3.TranslationService/GetModel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getModelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $request = (new GetModelRequest()) - ->setName($formattedName); - try { - $gapicClient->getModel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportedLanguagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SupportedLanguages(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new GetSupportedLanguagesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->getSupportedLanguages($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.translation.v3.TranslationService/GetSupportedLanguages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportedLanguagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 GetSupportedLanguagesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->getSupportedLanguages($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importAdaptiveMtFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ImportAdaptiveMtFileResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new ImportAdaptiveMtFileRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importAdaptiveMtFile($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.translation.v3.TranslationService/ImportAdaptiveMtFile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importAdaptiveMtFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new ImportAdaptiveMtFileRequest()) - ->setParent($formattedParent); - try { - $gapicClient->importAdaptiveMtFile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataset = 'dataset1443214456'; - $inputConfig = new DatasetInputConfig(); - $request = (new ImportDataRequest()) - ->setDataset($dataset) - ->setInputConfig($inputConfig); - $response = $gapicClient->importData($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.translation.v3.TranslationService/ImportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataset(); - $this->assertProtobufEquals($dataset, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfig(); - $this->assertProtobufEquals($inputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - $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 importDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $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 - $dataset = 'dataset1443214456'; - $inputConfig = new DatasetInputConfig(); - $request = (new ImportDataRequest()) - ->setDataset($dataset) - ->setInputConfig($inputConfig); - $response = $gapicClient->importData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - 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 listAdaptiveMtDatasetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adaptiveMtDatasetsElement = new AdaptiveMtDataset(); - $adaptiveMtDatasets = [ - $adaptiveMtDatasetsElement, - ]; - $expectedResponse = new ListAdaptiveMtDatasetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdaptiveMtDatasets($adaptiveMtDatasets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAdaptiveMtDatasetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAdaptiveMtDatasets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdaptiveMtDatasets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtDatasets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtDatasetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListAdaptiveMtDatasetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAdaptiveMtDatasets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtFilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adaptiveMtFilesElement = new AdaptiveMtFile(); - $adaptiveMtFiles = [ - $adaptiveMtFilesElement, - ]; - $expectedResponse = new ListAdaptiveMtFilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdaptiveMtFiles($adaptiveMtFiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new ListAdaptiveMtFilesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAdaptiveMtFiles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdaptiveMtFiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtFiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtFilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new ListAdaptiveMtFilesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAdaptiveMtFiles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtSentencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adaptiveMtSentencesElement = new AdaptiveMtSentence(); - $adaptiveMtSentences = [ - $adaptiveMtSentencesElement, - ]; - $expectedResponse = new ListAdaptiveMtSentencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdaptiveMtSentences($adaptiveMtSentences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $request = (new ListAdaptiveMtSentencesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAdaptiveMtSentences($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdaptiveMtSentences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtSentences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtSentencesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $request = (new ListAdaptiveMtSentencesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAdaptiveMtSentences($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatasetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $datasetsElement = new Dataset(); - $datasets = [ - $datasetsElement, - ]; - $expectedResponse = new ListDatasetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDatasets($datasets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDatasetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDatasets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDatasets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListDatasets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatasetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListDatasetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDatasets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExamplesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $examplesElement = new Example(); - $examples = [ - $examplesElement, - ]; - $expectedResponse = new ListExamplesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExamples($examples); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new ListExamplesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExamples($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExamples()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListExamples', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExamplesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $request = (new ListExamplesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExamples($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossariesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $glossariesElement = new Glossary(); - $glossaries = [ - $glossariesElement, - ]; - $expectedResponse = new ListGlossariesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGlossaries($glossaries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGlossariesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGlossaries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGlossaries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossariesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListGlossariesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGlossaries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossaryEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $glossaryEntriesElement = new GlossaryEntry(); - $glossaryEntries = [ - $glossaryEntriesElement, - ]; - $expectedResponse = new ListGlossaryEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGlossaryEntries($glossaryEntries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $request = (new ListGlossaryEntriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGlossaryEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGlossaryEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaryEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossaryEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $request = (new ListGlossaryEntriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGlossaryEntries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listModelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $modelsElement = new Model(); - $models = [ - $modelsElement, - ]; - $expectedResponse = new ListModelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setModels($models); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListModelsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listModels($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getModels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListModels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listModelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListModelsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listModels($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function romanizeTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RomanizeTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $contents = []; - $request = (new RomanizeTextRequest()) - ->setParent($formattedParent) - ->setContents($contents); - $response = $gapicClient->romanizeText($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.translation.v3.TranslationService/RomanizeText', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContents(); - $this->assertProtobufEquals($contents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function romanizeTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $contents = []; - $request = (new RomanizeTextRequest()) - ->setParent($formattedParent) - ->setContents($contents); - try { - $gapicClient->romanizeText($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $model2 = 'model21226956956'; - $expectedResponse = new TranslateDocumentResponse(); - $expectedResponse->setModel($model2); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $documentInputConfig = new DocumentInputConfig(); - $request = (new TranslateDocumentRequest()) - ->setParent($parent) - ->setTargetLanguageCode($targetLanguageCode) - ->setDocumentInputConfig($documentInputConfig); - $response = $gapicClient->translateDocument($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.translation.v3.TranslationService/TranslateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getTargetLanguageCode(); - $this->assertProtobufEquals($targetLanguageCode, $actualValue); - $actualValue = $actualRequestObject->getDocumentInputConfig(); - $this->assertProtobufEquals($documentInputConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $documentInputConfig = new DocumentInputConfig(); - $request = (new TranslateDocumentRequest()) - ->setParent($parent) - ->setTargetLanguageCode($targetLanguageCode) - ->setDocumentInputConfig($documentInputConfig); - try { - $gapicClient->translateDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TranslateTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $contents = []; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new TranslateTextRequest()) - ->setContents($contents) - ->setTargetLanguageCode($targetLanguageCode) - ->setParent($formattedParent); - $response = $gapicClient->translateText($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.translation.v3.TranslationService/TranslateText', $actualFuncCall); - $actualValue = $actualRequestObject->getContents(); - $this->assertProtobufEquals($contents, $actualValue); - $actualValue = $actualRequestObject->getTargetLanguageCode(); - $this->assertProtobufEquals($targetLanguageCode, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $contents = []; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new TranslateTextRequest()) - ->setContents($contents) - ->setTargetLanguageCode($targetLanguageCode) - ->setParent($formattedParent); - try { - $gapicClient->translateText($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGlossaryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGlossaryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $entryCount = 811131134; - $displayName = 'displayName1615086568'; - $expectedResponse = new Glossary(); - $expectedResponse->setName($name); - $expectedResponse->setEntryCount($entryCount); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGlossaryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $request = (new UpdateGlossaryRequest()) - ->setGlossary($glossary); - $response = $gapicClient->updateGlossary($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.translation.v3.TranslationService/UpdateGlossary', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGlossary(); - $this->assertProtobufEquals($glossary, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); - $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 updateGlossaryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGlossaryTest'); - $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 - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $request = (new UpdateGlossaryRequest()) - ->setGlossary($glossary); - $response = $gapicClient->updateGlossary($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); - 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 updateGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new GlossaryEntry(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $glossaryEntry = new GlossaryEntry(); - $request = (new UpdateGlossaryEntryRequest()) - ->setGlossaryEntry($glossaryEntry); - $response = $gapicClient->updateGlossaryEntry($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.translation.v3.TranslationService/UpdateGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getGlossaryEntry(); - $this->assertProtobufEquals($glossaryEntry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $glossaryEntry = new GlossaryEntry(); - $request = (new UpdateGlossaryEntryRequest()) - ->setGlossaryEntry($glossaryEntry); - try { - $gapicClient->updateGlossaryEntry($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function adaptiveMtTranslateAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $expectedResponse = new AdaptiveMtTranslateResponse(); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $content = []; - $request = (new AdaptiveMtTranslateRequest()) - ->setParent($formattedParent) - ->setDataset($formattedDataset) - ->setContent($content); - $response = $gapicClient->adaptiveMtTranslateAsync($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.translation.v3.TranslationService/AdaptiveMtTranslate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataset(); - $this->assertProtobufEquals($formattedDataset, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php b/owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php deleted file mode 100644 index 5c87249486a6..000000000000 --- a/owl-bot-staging/Translate/v3/tests/Unit/V3/TranslationServiceClientTest.php +++ /dev/null @@ -1,3274 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TranslationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TranslationServiceClient($options); - } - - /** @test */ - public function adaptiveMtTranslateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $languageCode = 'languageCode-412800396'; - $expectedResponse = new AdaptiveMtTranslateResponse(); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $content = []; - $response = $gapicClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/AdaptiveMtTranslate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataset(); - $this->assertProtobufEquals($formattedDataset, $actualValue); - $actualValue = $actualRequestObject->getContent(); - $this->assertProtobufEquals($content, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function adaptiveMtTranslateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $formattedDataset = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $content = []; - try { - $gapicClient->adaptiveMtTranslate($formattedParent, $formattedDataset, $content); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchTranslateDocumentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateDocumentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $totalPages = 396186871; - $translatedPages = 1652747493; - $failedPages = 2002254526; - $totalBillablePages = 1292117569; - $totalCharacters = 1368640955; - $translatedCharacters = 1337326221; - $failedCharacters = 1723028396; - $totalBillableCharacters = 1242495501; - $expectedResponse = new BatchTranslateDocumentResponse(); - $expectedResponse->setTotalPages($totalPages); - $expectedResponse->setTranslatedPages($translatedPages); - $expectedResponse->setFailedPages($failedPages); - $expectedResponse->setTotalBillablePages($totalBillablePages); - $expectedResponse->setTotalCharacters($totalCharacters); - $expectedResponse->setTranslatedCharacters($translatedCharacters); - $expectedResponse->setFailedCharacters($failedCharacters); - $expectedResponse->setTotalBillableCharacters($totalBillableCharacters); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchTranslateDocumentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new BatchDocumentOutputConfig(); - $response = $gapicClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - $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.translation.v3.TranslationService/BatchTranslateDocument', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceLanguageCode(); - $this->assertProtobufEquals($sourceLanguageCode, $actualValue); - $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); - $this->assertProtobufEquals($targetLanguageCodes, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfigs(); - $this->assertProtobufEquals($inputConfigs, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); - $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 batchTranslateDocumentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateDocumentTest'); - $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]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new BatchDocumentOutputConfig(); - $response = $gapicClient->batchTranslateDocument($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateDocumentTest'); - 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 batchTranslateTextTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateTextTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $totalCharacters = 1368640955; - $translatedCharacters = 1337326221; - $failedCharacters = 1723028396; - $expectedResponse = new BatchTranslateResponse(); - $expectedResponse->setTotalCharacters($totalCharacters); - $expectedResponse->setTranslatedCharacters($translatedCharacters); - $expectedResponse->setFailedCharacters($failedCharacters); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchTranslateTextTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new OutputConfig(); - $response = $gapicClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - $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.translation.v3.TranslationService/BatchTranslateText', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceLanguageCode(); - $this->assertProtobufEquals($sourceLanguageCode, $actualValue); - $actualValue = $actualApiRequestObject->getTargetLanguageCodes(); - $this->assertProtobufEquals($targetLanguageCodes, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfigs(); - $this->assertProtobufEquals($inputConfigs, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); - $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 batchTranslateTextExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchTranslateTextTest'); - $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]'); - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCodes = []; - $inputConfigs = []; - $outputConfig = new OutputConfig(); - $response = $gapicClient->batchTranslateText($formattedParent, $sourceLanguageCode, $targetLanguageCodes, $inputConfigs, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchTranslateTextTest'); - 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 createAdaptiveMtDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $expectedResponse = new AdaptiveMtDataset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $adaptiveMtDataset = new AdaptiveMtDataset(); - $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $adaptiveMtDataset->setName($adaptiveMtDatasetName); - $response = $gapicClient->createAdaptiveMtDataset($formattedParent, $adaptiveMtDataset); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/CreateAdaptiveMtDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAdaptiveMtDataset(); - $this->assertProtobufEquals($adaptiveMtDataset, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAdaptiveMtDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $adaptiveMtDataset = new AdaptiveMtDataset(); - $adaptiveMtDatasetName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $adaptiveMtDataset->setName($adaptiveMtDatasetName); - try { - $gapicClient->createAdaptiveMtDataset($formattedParent, $adaptiveMtDataset); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDatasetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatasetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Dataset(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatasetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $dataset = new Dataset(); - $response = $gapicClient->createDataset($formattedParent, $dataset); - $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.translation.v3.TranslationService/CreateDataset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDataset(); - $this->assertProtobufEquals($dataset, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatasetTest'); - $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 createDatasetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatasetTest'); - $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]'); - $dataset = new Dataset(); - $response = $gapicClient->createDataset($formattedParent, $dataset); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatasetTest'); - 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 createGlossaryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGlossaryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $entryCount = 811131134; - $displayName = 'displayName1615086568'; - $expectedResponse = new Glossary(); - $expectedResponse->setName($name); - $expectedResponse->setEntryCount($entryCount); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGlossaryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $response = $gapicClient->createGlossary($formattedParent, $glossary); - $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.translation.v3.TranslationService/CreateGlossary', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGlossary(); - $this->assertProtobufEquals($glossary, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); - $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 createGlossaryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGlossaryTest'); - $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]'); - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $response = $gapicClient->createGlossary($formattedParent, $glossary); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGlossaryTest'); - 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 createGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new GlossaryEntry(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $glossaryEntry = new GlossaryEntry(); - $response = $gapicClient->createGlossaryEntry($formattedParent, $glossaryEntry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/CreateGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getGlossaryEntry(); - $this->assertProtobufEquals($glossaryEntry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $glossaryEntry = new GlossaryEntry(); - try { - $gapicClient->createGlossaryEntry($formattedParent, $glossaryEntry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createModelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $dataset = 'dataset1443214456'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Model(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataset($dataset); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $model = new Model(); - $response = $gapicClient->createModel($formattedParent, $model); - $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.translation.v3.TranslationService/CreateModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getModel(); - $this->assertProtobufEquals($model, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createModelTest'); - $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 createModelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createModelTest'); - $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]'); - $model = new Model(); - $response = $gapicClient->createModel($formattedParent, $model); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createModelTest'); - 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 deleteAdaptiveMtDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $gapicClient->deleteAdaptiveMtDataset($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdaptiveMtDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - try { - $gapicClient->deleteAdaptiveMtDataset($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdaptiveMtFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $gapicClient->deleteAdaptiveMtFile($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteAdaptiveMtFile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAdaptiveMtFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - try { - $gapicClient->deleteAdaptiveMtFile($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDatasetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatasetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatasetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->deleteDataset($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteDataset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); - $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 deleteDatasetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatasetTest'); - $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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->deleteDataset($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatasetTest'); - 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 deleteGlossaryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGlossaryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new DeleteGlossaryResponse(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGlossaryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $response = $gapicClient->deleteGlossary($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteGlossary', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); - $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 deleteGlossaryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGlossaryTest'); - $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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $response = $gapicClient->deleteGlossary($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGlossaryTest'); - 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 deleteGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - $gapicClient->deleteGlossaryEntry($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - try { - $gapicClient->deleteGlossaryEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteModelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteModelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteModelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $response = $gapicClient->deleteModel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DeleteModel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteModelTest'); - $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 deleteModelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteModelTest'); - $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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $response = $gapicClient->deleteModel($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteModelTest'); - 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 detectLanguageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DetectLanguageResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->detectLanguage($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/DetectLanguage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function detectLanguageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->detectLanguage($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataset = 'dataset1443214456'; - $outputConfig = new DatasetOutputConfig(); - $response = $gapicClient->exportData($dataset, $outputConfig); - $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.translation.v3.TranslationService/ExportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataset(); - $this->assertProtobufEquals($dataset, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - $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 exportDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $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 - $dataset = 'dataset1443214456'; - $outputConfig = new DatasetOutputConfig(); - $response = $gapicClient->exportData($dataset, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - 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 getAdaptiveMtDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $expectedResponse = new AdaptiveMtDataset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->getAdaptiveMtDataset($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetAdaptiveMtDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdaptiveMtDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - try { - $gapicClient->getAdaptiveMtDataset($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdaptiveMtFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $entryCount = 811131134; - $expectedResponse = new AdaptiveMtFile(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEntryCount($entryCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $response = $gapicClient->getAdaptiveMtFile($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetAdaptiveMtFile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAdaptiveMtFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - try { - $gapicClient->getAdaptiveMtFile($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatasetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $exampleCount = 1517063674; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Dataset(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setExampleCount($exampleCount); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->getDataset($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetDataset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatasetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - try { - $gapicClient->getDataset($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $entryCount = 811131134; - $displayName = 'displayName1615086568'; - $expectedResponse = new Glossary(); - $expectedResponse->setName($name2); - $expectedResponse->setEntryCount($entryCount); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $response = $gapicClient->getGlossary($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetGlossary', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - try { - $gapicClient->getGlossary($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new GlossaryEntry(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - $response = $gapicClient->getGlossaryEntry($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryEntryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]', '[GLOSSARY_ENTRY]'); - try { - $gapicClient->getGlossaryEntry($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getModelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $dataset = 'dataset1443214456'; - $sourceLanguageCode = 'sourceLanguageCode1687263568'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $trainExampleCount = 1755438077; - $validateExampleCount = 159308433; - $testExampleCount = 483147021; - $expectedResponse = new Model(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDataset($dataset); - $expectedResponse->setSourceLanguageCode($sourceLanguageCode); - $expectedResponse->setTargetLanguageCode($targetLanguageCode); - $expectedResponse->setTrainExampleCount($trainExampleCount); - $expectedResponse->setValidateExampleCount($validateExampleCount); - $expectedResponse->setTestExampleCount($testExampleCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - $response = $gapicClient->getModel($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetModel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getModelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->modelName('[PROJECT]', '[LOCATION]', '[MODEL]'); - try { - $gapicClient->getModel($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportedLanguagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SupportedLanguages(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->getSupportedLanguages($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/GetSupportedLanguages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportedLanguagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->getSupportedLanguages($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importAdaptiveMtFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ImportAdaptiveMtFileResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->importAdaptiveMtFile($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ImportAdaptiveMtFile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importAdaptiveMtFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - try { - $gapicClient->importAdaptiveMtFile($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dataset = 'dataset1443214456'; - $inputConfig = new DatasetInputConfig(); - $response = $gapicClient->importData($dataset, $inputConfig); - $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.translation.v3.TranslationService/ImportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDataset(); - $this->assertProtobufEquals($dataset, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfig(); - $this->assertProtobufEquals($inputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - $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 importDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $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 - $dataset = 'dataset1443214456'; - $inputConfig = new DatasetInputConfig(); - $response = $gapicClient->importData($dataset, $inputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - 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 listAdaptiveMtDatasetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adaptiveMtDatasetsElement = new AdaptiveMtDataset(); - $adaptiveMtDatasets = [ - $adaptiveMtDatasetsElement, - ]; - $expectedResponse = new ListAdaptiveMtDatasetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdaptiveMtDatasets($adaptiveMtDatasets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listAdaptiveMtDatasets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdaptiveMtDatasets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtDatasets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtDatasetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listAdaptiveMtDatasets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtFilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adaptiveMtFilesElement = new AdaptiveMtFile(); - $adaptiveMtFiles = [ - $adaptiveMtFilesElement, - ]; - $expectedResponse = new ListAdaptiveMtFilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdaptiveMtFiles($adaptiveMtFiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->listAdaptiveMtFiles($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdaptiveMtFiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtFiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtFilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtDatasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - try { - $gapicClient->listAdaptiveMtFiles($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtSentencesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $adaptiveMtSentencesElement = new AdaptiveMtSentence(); - $adaptiveMtSentences = [ - $adaptiveMtSentencesElement, - ]; - $expectedResponse = new ListAdaptiveMtSentencesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAdaptiveMtSentences($adaptiveMtSentences); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - $response = $gapicClient->listAdaptiveMtSentences($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAdaptiveMtSentences()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListAdaptiveMtSentences', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAdaptiveMtSentencesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->adaptiveMtFileName('[PROJECT]', '[LOCATION]', '[DATASET]', '[FILE]'); - try { - $gapicClient->listAdaptiveMtSentences($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatasetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $datasetsElement = new Dataset(); - $datasets = [ - $datasetsElement, - ]; - $expectedResponse = new ListDatasetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDatasets($datasets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listDatasets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDatasets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListDatasets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatasetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listDatasets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExamplesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $examplesElement = new Example(); - $examples = [ - $examplesElement, - ]; - $expectedResponse = new ListExamplesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExamples($examples); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - $response = $gapicClient->listExamples($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExamples()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListExamples', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExamplesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->datasetName('[PROJECT]', '[LOCATION]', '[DATASET]'); - try { - $gapicClient->listExamples($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossariesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $glossariesElement = new Glossary(); - $glossaries = [ - $glossariesElement, - ]; - $expectedResponse = new ListGlossariesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGlossaries($glossaries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listGlossaries($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGlossaries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossariesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listGlossaries($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossaryEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $glossaryEntriesElement = new GlossaryEntry(); - $glossaryEntries = [ - $glossaryEntriesElement, - ]; - $expectedResponse = new ListGlossaryEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGlossaryEntries($glossaryEntries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - $response = $gapicClient->listGlossaryEntries($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGlossaryEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListGlossaryEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGlossaryEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->glossaryName('[PROJECT]', '[LOCATION]', '[GLOSSARY]'); - try { - $gapicClient->listGlossaryEntries($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listModelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $modelsElement = new Model(); - $models = [ - $modelsElement, - ]; - $expectedResponse = new ListModelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setModels($models); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listModels($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getModels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/ListModels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listModelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listModels($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function romanizeTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RomanizeTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $contents = []; - $response = $gapicClient->romanizeText($formattedParent, $contents); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/RomanizeText', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getContents(); - $this->assertProtobufEquals($contents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function romanizeTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $contents = []; - try { - $gapicClient->romanizeText($formattedParent, $contents); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $model2 = 'model21226956956'; - $expectedResponse = new TranslateDocumentResponse(); - $expectedResponse->setModel($model2); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $documentInputConfig = new DocumentInputConfig(); - $response = $gapicClient->translateDocument($parent, $targetLanguageCode, $documentInputConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/TranslateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getTargetLanguageCode(); - $this->assertProtobufEquals($targetLanguageCode, $actualValue); - $actualValue = $actualRequestObject->getDocumentInputConfig(); - $this->assertProtobufEquals($documentInputConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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'; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $documentInputConfig = new DocumentInputConfig(); - try { - $gapicClient->translateDocument($parent, $targetLanguageCode, $documentInputConfig); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateTextTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TranslateTextResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $contents = []; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->translateText($contents, $targetLanguageCode, $formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/TranslateText', $actualFuncCall); - $actualValue = $actualRequestObject->getContents(); - $this->assertProtobufEquals($contents, $actualValue); - $actualValue = $actualRequestObject->getTargetLanguageCode(); - $this->assertProtobufEquals($targetLanguageCode, $actualValue); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function translateTextExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $contents = []; - $targetLanguageCode = 'targetLanguageCode1323228230'; - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - try { - $gapicClient->translateText($contents, $targetLanguageCode, $formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGlossaryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGlossaryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $entryCount = 811131134; - $displayName = 'displayName1615086568'; - $expectedResponse = new Glossary(); - $expectedResponse->setName($name); - $expectedResponse->setEntryCount($entryCount); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGlossaryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $response = $gapicClient->updateGlossary($glossary); - $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.translation.v3.TranslationService/UpdateGlossary', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGlossary(); - $this->assertProtobufEquals($glossary, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); - $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 updateGlossaryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGlossaryTest'); - $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 - $glossary = new Glossary(); - $glossaryName = 'glossaryName-297469495'; - $glossary->setName($glossaryName); - $response = $gapicClient->updateGlossary($glossary); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGlossaryTest'); - 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 updateGlossaryEntryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new GlossaryEntry(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $glossaryEntry = new GlossaryEntry(); - $response = $gapicClient->updateGlossaryEntry($glossaryEntry); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.translation.v3.TranslationService/UpdateGlossaryEntry', $actualFuncCall); - $actualValue = $actualRequestObject->getGlossaryEntry(); - $this->assertProtobufEquals($glossaryEntry, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGlossaryEntryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $glossaryEntry = new GlossaryEntry(); - try { - $gapicClient->updateGlossaryEntry($glossaryEntry); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php deleted file mode 100644 index 8f9939b79853..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/GPBMetadata/Google/Cloud/Videointelligence/V1/VideoIntelligence.php +++ /dev/null @@ -1,271 +0,0 @@ -internalAddGeneratedFile( - ' -ÙJ -:google/cloud/videointelligence/v1/video_intelligence.proto!google.cloud.videointelligence.v1google/api/client.protogoogle/api/field_behavior.proto#google/longrunning/operations.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.protogoogle/rpc/status.proto"þ -AnnotateVideoRequest - input_uri (  - input_content ( A -features (2*.google.cloud.videointelligence.v1.FeatureBàAF - video_context ( 2/.google.cloud.videointelligence.v1.VideoContext - -output_uri ( BàA - location_id ( BàA"Á - VideoContextA -segments ( 2/.google.cloud.videointelligence.v1.VideoSegmentW -label_detection_config ( 27.google.cloud.videointelligence.v1.LabelDetectionConfigb -shot_change_detection_config ( 2<.google.cloud.videointelligence.v1.ShotChangeDetectionConfigl -!explicit_content_detection_config ( 2A.google.cloud.videointelligence.v1.ExplicitContentDetectionConfigU -face_detection_config ( 26.google.cloud.videointelligence.v1.FaceDetectionConfiga -speech_transcription_config ( 2<.google.cloud.videointelligence.v1.SpeechTranscriptionConfigU -text_detection_config ( 26.google.cloud.videointelligence.v1.TextDetectionConfigY -person_detection_config ( 28.google.cloud.videointelligence.v1.PersonDetectionConfigW -object_tracking_config ( 27.google.cloud.videointelligence.v1.ObjectTrackingConfig"Ý -LabelDetectionConfigS -label_detection_mode (25.google.cloud.videointelligence.v1.LabelDetectionMode -stationary_camera ( -model ( " -frame_confidence_threshold (" -video_confidence_threshold ("* -ShotChangeDetectionConfig -model ( "% -ObjectTrackingConfig -model ( "` -FaceDetectionConfig -model (  -include_bounding_boxes ( -include_attributes ("s -PersonDetectionConfig -include_bounding_boxes ( -include_pose_landmarks ( -include_attributes ("/ -ExplicitContentDetectionConfig -model ( "< -TextDetectionConfig -language_hints (  -model ( "x - VideoSegment4 -start_time_offset ( 2.google.protobuf.Duration2 -end_time_offset ( 2.google.protobuf.Duration"d - LabelSegment@ -segment ( 2/.google.cloud.videointelligence.v1.VideoSegment - -confidence ("P - -LabelFrame. - time_offset ( 2.google.protobuf.Duration - -confidence ("G -Entity - entity_id (  - description (  - language_code ( "¥ -LabelAnnotation9 -entity ( 2).google.cloud.videointelligence.v1.EntityD -category_entities ( 2).google.cloud.videointelligence.v1.EntityA -segments ( 2/.google.cloud.videointelligence.v1.LabelSegment= -frames ( 2-.google.cloud.videointelligence.v1.LabelFrame -version ( "• -ExplicitContentFrame. - time_offset ( 2.google.protobuf.DurationM -pornography_likelihood (2-.google.cloud.videointelligence.v1.Likelihood"u -ExplicitContentAnnotationG -frames ( 27.google.cloud.videointelligence.v1.ExplicitContentFrame -version ( "Q -NormalizedBoundingBox -left ( -top ( -right ( -bottom ("w -FaceDetectionAnnotation8 -tracks ( 2(.google.cloud.videointelligence.v1.Track - thumbnail (  -version ( "f -PersonDetectionAnnotation8 -tracks ( 2(.google.cloud.videointelligence.v1.Track -version ( "O - FaceSegment@ -segment ( 2/.google.cloud.videointelligence.v1.VideoSegment"œ - FaceFrame[ -normalized_bounding_boxes ( 28.google.cloud.videointelligence.v1.NormalizedBoundingBox. - time_offset ( 2.google.protobuf.Duration:"§ -FaceAnnotation - thumbnail ( @ -segments ( 2..google.cloud.videointelligence.v1.FaceSegment< -frames ( 2,.google.cloud.videointelligence.v1.FaceFrame:"º -TimestampedObjectY -normalized_bounding_box ( 28.google.cloud.videointelligence.v1.NormalizedBoundingBox. - time_offset ( 2.google.protobuf.DurationM - -attributes ( 24.google.cloud.videointelligence.v1.DetectedAttributeBàAK - landmarks ( 23.google.cloud.videointelligence.v1.DetectedLandmarkBàA"„ -Track@ -segment ( 2/.google.cloud.videointelligence.v1.VideoSegmentQ -timestamped_objects ( 24.google.cloud.videointelligence.v1.TimestampedObjectM - -attributes ( 24.google.cloud.videointelligence.v1.DetectedAttributeBàA - -confidence (BàA"D -DetectedAttribute -name (  - -confidence ( -value ( "x -DetectedLandmark -name ( B -point ( 23.google.cloud.videointelligence.v1.NormalizedVertex - -confidence ("é - -VideoAnnotationResults - input_uri ( @ -segment - ( 2/.google.cloud.videointelligence.v1.VideoSegmentU -segment_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotation^ -"segment_presence_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotationR -shot_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotation[ -shot_presence_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotationS -frame_label_annotations ( 22.google.cloud.videointelligence.v1.LabelAnnotationO -face_annotations ( 21.google.cloud.videointelligence.v1.FaceAnnotationB^ -face_detection_annotations ( 2:.google.cloud.videointelligence.v1.FaceDetectionAnnotationI -shot_annotations ( 2/.google.cloud.videointelligence.v1.VideoSegmentY -explicit_annotation ( 2<.google.cloud.videointelligence.v1.ExplicitContentAnnotationU -speech_transcriptions ( 26.google.cloud.videointelligence.v1.SpeechTranscriptionK -text_annotations ( 21.google.cloud.videointelligence.v1.TextAnnotationW -object_annotations ( 2;.google.cloud.videointelligence.v1.ObjectTrackingAnnotationb -logo_recognition_annotations ( 2<.google.cloud.videointelligence.v1.LogoRecognitionAnnotationb -person_detection_annotations ( 2<.google.cloud.videointelligence.v1.PersonDetectionAnnotation! -error ( 2.google.rpc.Status"n -AnnotateVideoResponseU -annotation_results ( 29.google.cloud.videointelligence.v1.VideoAnnotationResults"¦ -VideoAnnotationProgress - input_uri (  -progress_percent (. - -start_time ( 2.google.protobuf.Timestamp/ - update_time ( 2.google.protobuf.Timestamp; -feature (2*.google.cloud.videointelligence.v1.Feature@ -segment ( 2/.google.cloud.videointelligence.v1.VideoSegment"p -AnnotateVideoProgressW -annotation_progress ( 2:.google.cloud.videointelligence.v1.VideoAnnotationProgress" -SpeechTranscriptionConfig - language_code ( BàA -max_alternatives (BàA -filter_profanity (BàAN -speech_contexts ( 20.google.cloud.videointelligence.v1.SpeechContextBàA) -enable_automatic_punctuation (BàA - audio_tracks (BàA\' -enable_speaker_diarization (BàA& -diarization_speaker_count (BàA# -enable_word_confidence (BàA"% - SpeechContext -phrases ( BàA"ˆ -SpeechTranscriptionU - alternatives ( 2?.google.cloud.videointelligence.v1.SpeechRecognitionAlternative - language_code ( BàA"Œ -SpeechRecognitionAlternative - -transcript (  - -confidence (BàA? -words ( 2+.google.cloud.videointelligence.v1.WordInfoBàA"§ -WordInfo- - -start_time ( 2.google.protobuf.Duration+ -end_time ( 2.google.protobuf.Duration -word (  - -confidence (BàA - speaker_tag (BàA"( -NormalizedVertex -x ( -y ("_ -NormalizedBoundingPolyE -vertices ( 23.google.cloud.videointelligence.v1.NormalizedVertex"¡ - TextSegment@ -segment ( 2/.google.cloud.videointelligence.v1.VideoSegment - -confidence (< -frames ( 2,.google.cloud.videointelligence.v1.TextFrame"” - TextFrameW -rotated_bounding_box ( 29.google.cloud.videointelligence.v1.NormalizedBoundingPoly. - time_offset ( 2.google.protobuf.Duration"q -TextAnnotation -text ( @ -segments ( 2..google.cloud.videointelligence.v1.TextSegment -version ( "  -ObjectTrackingFrameY -normalized_bounding_box ( 28.google.cloud.videointelligence.v1.NormalizedBoundingBox. - time_offset ( 2.google.protobuf.Duration"¨ -ObjectTrackingAnnotationB -segment ( 2/.google.cloud.videointelligence.v1.VideoSegmentH -track_id (H9 -entity ( 2).google.cloud.videointelligence.v1.Entity - -confidence (F -frames ( 26.google.cloud.videointelligence.v1.ObjectTrackingFrame -version ( B - -track_info"Ó -LogoRecognitionAnnotation9 -entity ( 2).google.cloud.videointelligence.v1.Entity8 -tracks ( 2(.google.cloud.videointelligence.v1.TrackA -segments ( 2/.google.cloud.videointelligence.v1.VideoSegment*õ -Feature -FEATURE_UNSPECIFIED -LABEL_DETECTION -SHOT_CHANGE_DETECTION -EXPLICIT_CONTENT_DETECTION -FACE_DETECTION -SPEECH_TRANSCRIPTION -TEXT_DETECTION -OBJECT_TRACKING  -LOGO_RECOGNITION  -PERSON_DETECTION*r -LabelDetectionMode$ - LABEL_DETECTION_MODE_UNSPECIFIED - SHOT_MODE - -FRAME_MODE -SHOT_AND_FRAME_MODE*t - -Likelihood -LIKELIHOOD_UNSPECIFIED - VERY_UNLIKELY -UNLIKELY -POSSIBLE - -LIKELY - VERY_LIKELY2À -VideoIntelligenceServiceÍ - AnnotateVideo7.google.cloud.videointelligence.v1.AnnotateVideoRequest.google.longrunning.Operation"dÊA. -AnnotateVideoResponseAnnotateVideoProgressÚAinput_uri,features‚Óä“"/v1/videos:annotate:*TÊA videointelligence.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBŒ -%com.google.cloud.videointelligence.v1BVideoIntelligenceServiceProtoPZScloud.google.com/go/videointelligence/apiv1/videointelligencepb;videointelligencepbª!Google.Cloud.VideoIntelligence.V1Ê!Google\\Cloud\\VideoIntelligence\\V1ê$Google::Cloud::VideoIntelligence::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php deleted file mode 100644 index 9018fd0c861f..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoProgress.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.videointelligence.v1.AnnotateVideoProgress - */ -class AnnotateVideoProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Progress metadata for all videos specified in `AnnotateVideoRequest`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationProgress annotation_progress = 1; - */ - private $annotation_progress; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationProgress>|\Google\Protobuf\Internal\RepeatedField $annotation_progress - * Progress metadata for all videos specified in `AnnotateVideoRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Progress metadata for all videos specified in `AnnotateVideoRequest`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationProgress annotation_progress = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnnotationProgress() - { - return $this->annotation_progress; - } - - /** - * Progress metadata for all videos specified in `AnnotateVideoRequest`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationProgress annotation_progress = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationProgress>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnnotationProgress($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoAnnotationProgress::class); - $this->annotation_progress = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php deleted file mode 100644 index a83044c1c487..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoRequest.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.videointelligence.v1.AnnotateVideoRequest - */ -class AnnotateVideoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Input video location. Currently, only - * [Cloud Storage](https://cloud.google.com/storage/) URIs are - * supported. URIs must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - * multiple videos, a video URI may include wildcards in the `object-id`. - * Supported wildcards: '*' to match 0 or more characters; - * '?' to match 1 character. If unset, the input video should be embedded - * in the request as `input_content`. If set, `input_content` must be unset. - * - * Generated from protobuf field string input_uri = 1; - */ - protected $input_uri = ''; - /** - * The video data bytes. - * If unset, the input video(s) should be specified via the `input_uri`. - * If set, `input_uri` must be unset. - * - * Generated from protobuf field bytes input_content = 6; - */ - protected $input_content = ''; - /** - * Required. Requested video annotation features. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $features; - /** - * Additional video context and/or feature-specific parameters. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoContext video_context = 3; - */ - protected $video_context = null; - /** - * Optional. Location where the output (in JSON format) should be stored. - * Currently, only [Cloud Storage](https://cloud.google.com/storage/) - * URIs are supported. These must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). - * - * Generated from protobuf field string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_uri = ''; - /** - * Optional. Cloud region where annotation should take place. Supported cloud - * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - * region is specified, the region will be determined based on video file - * location. - * - * Generated from protobuf field string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $location_id = ''; - - /** - * @param string $inputUri Input video location. Currently, only - * [Cloud Storage](https://cloud.google.com/storage/) URIs are - * supported. URIs must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - * multiple videos, a video URI may include wildcards in the `object-id`. - * Supported wildcards: '*' to match 0 or more characters; - * '?' to match 1 character. If unset, the input video should be embedded - * in the request as `input_content`. If set, `input_content` must be unset. - * @param int[] $features Required. Requested video annotation features. - * For allowed values, use constants defined on {@see \Google\Cloud\VideoIntelligence\V1\Feature} - * - * @return \Google\Cloud\VideoIntelligence\V1\AnnotateVideoRequest - * - * @experimental - */ - public static function build(string $inputUri, array $features): self - { - return (new self()) - ->setInputUri($inputUri) - ->setFeatures($features); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_uri - * Input video location. Currently, only - * [Cloud Storage](https://cloud.google.com/storage/) URIs are - * supported. URIs must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - * multiple videos, a video URI may include wildcards in the `object-id`. - * Supported wildcards: '*' to match 0 or more characters; - * '?' to match 1 character. If unset, the input video should be embedded - * in the request as `input_content`. If set, `input_content` must be unset. - * @type string $input_content - * The video data bytes. - * If unset, the input video(s) should be specified via the `input_uri`. - * If set, `input_uri` must be unset. - * @type array|\Google\Protobuf\Internal\RepeatedField $features - * Required. Requested video annotation features. - * @type \Google\Cloud\VideoIntelligence\V1\VideoContext $video_context - * Additional video context and/or feature-specific parameters. - * @type string $output_uri - * Optional. Location where the output (in JSON format) should be stored. - * Currently, only [Cloud Storage](https://cloud.google.com/storage/) - * URIs are supported. These must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). - * @type string $location_id - * Optional. Cloud region where annotation should take place. Supported cloud - * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - * region is specified, the region will be determined based on video file - * location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Input video location. Currently, only - * [Cloud Storage](https://cloud.google.com/storage/) URIs are - * supported. URIs must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - * multiple videos, a video URI may include wildcards in the `object-id`. - * Supported wildcards: '*' to match 0 or more characters; - * '?' to match 1 character. If unset, the input video should be embedded - * in the request as `input_content`. If set, `input_content` must be unset. - * - * Generated from protobuf field string input_uri = 1; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Input video location. Currently, only - * [Cloud Storage](https://cloud.google.com/storage/) URIs are - * supported. URIs must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify - * multiple videos, a video URI may include wildcards in the `object-id`. - * Supported wildcards: '*' to match 0 or more characters; - * '?' to match 1 character. If unset, the input video should be embedded - * in the request as `input_content`. If set, `input_content` must be unset. - * - * Generated from protobuf field string input_uri = 1; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - - /** - * The video data bytes. - * If unset, the input video(s) should be specified via the `input_uri`. - * If set, `input_uri` must be unset. - * - * Generated from protobuf field bytes input_content = 6; - * @return string - */ - public function getInputContent() - { - return $this->input_content; - } - - /** - * The video data bytes. - * If unset, the input video(s) should be specified via the `input_uri`. - * If set, `input_uri` must be unset. - * - * Generated from protobuf field bytes input_content = 6; - * @param string $var - * @return $this - */ - public function setInputContent($var) - { - GPBUtil::checkString($var, False); - $this->input_content = $var; - - return $this; - } - - /** - * Required. Requested video annotation features. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Required. Requested video annotation features. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Feature features = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VideoIntelligence\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional video context and/or feature-specific parameters. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoContext video_context = 3; - * @return \Google\Cloud\VideoIntelligence\V1\VideoContext|null - */ - public function getVideoContext() - { - return $this->video_context; - } - - public function hasVideoContext() - { - return isset($this->video_context); - } - - public function clearVideoContext() - { - unset($this->video_context); - } - - /** - * Additional video context and/or feature-specific parameters. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoContext video_context = 3; - * @param \Google\Cloud\VideoIntelligence\V1\VideoContext $var - * @return $this - */ - public function setVideoContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoContext::class); - $this->video_context = $var; - - return $this; - } - - /** - * Optional. Location where the output (in JSON format) should be stored. - * Currently, only [Cloud Storage](https://cloud.google.com/storage/) - * URIs are supported. These must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). - * - * Generated from protobuf field string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Optional. Location where the output (in JSON format) should be stored. - * Currently, only [Cloud Storage](https://cloud.google.com/storage/) - * URIs are supported. These must be specified in the following format: - * `gs://bucket-id/object-id` (other URI formats return - * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For - * more information, see [Request - * URIs](https://cloud.google.com/storage/docs/request-endpoints). - * - * Generated from protobuf field string output_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - - /** - * Optional. Cloud region where annotation should take place. Supported cloud - * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - * region is specified, the region will be determined based on video file - * location. - * - * Generated from protobuf field string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLocationId() - { - return $this->location_id; - } - - /** - * Optional. Cloud region where annotation should take place. Supported cloud - * regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no - * region is specified, the region will be determined based on video file - * location. - * - * Generated from protobuf field string location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLocationId($var) - { - GPBUtil::checkString($var, True); - $this->location_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php deleted file mode 100644 index 25d2c7cf89de..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/AnnotateVideoResponse.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.videointelligence.v1.AnnotateVideoResponse - */ -class AnnotateVideoResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Annotation results for all videos specified in `AnnotateVideoRequest`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationResults annotation_results = 1; - */ - private $annotation_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationResults>|\Google\Protobuf\Internal\RepeatedField $annotation_results - * Annotation results for all videos specified in `AnnotateVideoRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Annotation results for all videos specified in `AnnotateVideoRequest`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationResults annotation_results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnnotationResults() - { - return $this->annotation_results; - } - - /** - * Annotation results for all videos specified in `AnnotateVideoRequest`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoAnnotationResults annotation_results = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\VideoAnnotationResults>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnnotationResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoAnnotationResults::class); - $this->annotation_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php deleted file mode 100644 index a3869d67c043..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedAttribute.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.videointelligence.v1.DetectedAttribute - */ -class DetectedAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the attribute, for example, glasses, dark_glasses, mouth_open. - * A full list of supported type names will be provided in the document. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Detected attribute confidence. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * Text value of the detection result. For example, the value for "HairColor" - * can be "black", "blonde", etc. - * - * Generated from protobuf field string value = 3; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the attribute, for example, glasses, dark_glasses, mouth_open. - * A full list of supported type names will be provided in the document. - * @type float $confidence - * Detected attribute confidence. Range [0, 1]. - * @type string $value - * Text value of the detection result. For example, the value for "HairColor" - * can be "black", "blonde", etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * The name of the attribute, for example, glasses, dark_glasses, mouth_open. - * A full list of supported type names will be provided in the document. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the attribute, for example, glasses, dark_glasses, mouth_open. - * A full list of supported type names will be provided in the document. - * - * 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; - } - - /** - * Detected attribute confidence. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Detected attribute confidence. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Text value of the detection result. For example, the value for "HairColor" - * can be "black", "blonde", etc. - * - * Generated from protobuf field string value = 3; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Text value of the detection result. For example, the value for "HairColor" - * can be "black", "blonde", etc. - * - * Generated from protobuf field string value = 3; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php deleted file mode 100644 index 50f56b1a634b..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/DetectedLandmark.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.videointelligence.v1.DetectedLandmark - */ -class DetectedLandmark extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this landmark, for example, left_hand, right_shoulder. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The 2D point of the detected landmark using the normalized image - * coordindate system. The normalized coordinates have the range from 0 to 1. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedVertex point = 2; - */ - protected $point = null; - /** - * The confidence score of the detected landmark. Range [0, 1]. - * - * Generated from protobuf field float confidence = 3; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of this landmark, for example, left_hand, right_shoulder. - * @type \Google\Cloud\VideoIntelligence\V1\NormalizedVertex $point - * The 2D point of the detected landmark using the normalized image - * coordindate system. The normalized coordinates have the range from 0 to 1. - * @type float $confidence - * The confidence score of the detected landmark. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * The name of this landmark, for example, left_hand, right_shoulder. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this landmark, for example, left_hand, right_shoulder. - * - * 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 2D point of the detected landmark using the normalized image - * coordindate system. The normalized coordinates have the range from 0 to 1. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedVertex point = 2; - * @return \Google\Cloud\VideoIntelligence\V1\NormalizedVertex|null - */ - public function getPoint() - { - return $this->point; - } - - public function hasPoint() - { - return isset($this->point); - } - - public function clearPoint() - { - unset($this->point); - } - - /** - * The 2D point of the detected landmark using the normalized image - * coordindate system. The normalized coordinates have the range from 0 to 1. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedVertex point = 2; - * @param \Google\Cloud\VideoIntelligence\V1\NormalizedVertex $var - * @return $this - */ - public function setPoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedVertex::class); - $this->point = $var; - - return $this; - } - - /** - * The confidence score of the detected landmark. Range [0, 1]. - * - * Generated from protobuf field float confidence = 3; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The confidence score of the detected landmark. Range [0, 1]. - * - * 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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php deleted file mode 100644 index d62bc773e7d4..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Entity.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.videointelligence.v1.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string entity_id = 1; - */ - protected $entity_id = ''; - /** - * Textual description, e.g., `Fixed-gear bicycle`. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Language code for `description` in BCP-47 format. - * - * Generated from protobuf field string language_code = 3; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity_id - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * @type string $description - * Textual description, e.g., `Fixed-gear bicycle`. - * @type string $language_code - * Language code for `description` in BCP-47 format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string entity_id = 1; - * @return string - */ - public function getEntityId() - { - return $this->entity_id; - } - - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string entity_id = 1; - * @param string $var - * @return $this - */ - public function setEntityId($var) - { - GPBUtil::checkString($var, True); - $this->entity_id = $var; - - return $this; - } - - /** - * Textual description, e.g., `Fixed-gear bicycle`. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Textual description, e.g., `Fixed-gear bicycle`. - * - * 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; - } - - /** - * Language code for `description` in BCP-47 format. - * - * Generated from protobuf field string language_code = 3; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Language code for `description` in BCP-47 format. - * - * Generated from protobuf field string language_code = 3; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php deleted file mode 100644 index dabb7a061483..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentAnnotation.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.videointelligence.v1.ExplicitContentAnnotation - */ -class ExplicitContentAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * All video frames where explicit content was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ExplicitContentFrame frames = 1; - */ - private $frames; - /** - * Feature version. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\ExplicitContentFrame>|\Google\Protobuf\Internal\RepeatedField $frames - * All video frames where explicit content was detected. - * @type string $version - * Feature version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * All video frames where explicit content was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ExplicitContentFrame frames = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrames() - { - return $this->frames; - } - - /** - * All video frames where explicit content was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ExplicitContentFrame frames = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\ExplicitContentFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\ExplicitContentFrame::class); - $this->frames = $arr; - - return $this; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php deleted file mode 100644 index 582cd1808f9f..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentDetectionConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.videointelligence.v1.ExplicitContentDetectionConfig - */ -class ExplicitContentDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Model to use for explicit content detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model - * Model to use for explicit content detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Model to use for explicit content detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for explicit content detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php deleted file mode 100644 index 9d249b46301c..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ExplicitContentFrame.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.videointelligence.v1.ExplicitContentFrame - */ -class ExplicitContentFrame extends \Google\Protobuf\Internal\Message -{ - /** - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - */ - protected $time_offset = null; - /** - * Likelihood of the pornography content.. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Likelihood pornography_likelihood = 2; - */ - protected $pornography_likelihood = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $time_offset - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * @type int $pornography_likelihood - * Likelihood of the pornography content.. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - - /** - * Likelihood of the pornography content.. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Likelihood pornography_likelihood = 2; - * @return int - */ - public function getPornographyLikelihood() - { - return $this->pornography_likelihood; - } - - /** - * Likelihood of the pornography content.. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Likelihood pornography_likelihood = 2; - * @param int $var - * @return $this - */ - public function setPornographyLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\Likelihood::class); - $this->pornography_likelihood = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php deleted file mode 100644 index 6c8796da5c58..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceAnnotation.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.videointelligence.v1.FaceAnnotation - */ -class FaceAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Thumbnail of a representative face view (in JPEG format). - * - * Generated from protobuf field bytes thumbnail = 1; - */ - protected $thumbnail = ''; - /** - * All video segments where a face was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceSegment segments = 2; - */ - private $segments; - /** - * All video frames where a face was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceFrame frames = 3; - */ - private $frames; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $thumbnail - * Thumbnail of a representative face view (in JPEG format). - * @type array<\Google\Cloud\VideoIntelligence\V1\FaceSegment>|\Google\Protobuf\Internal\RepeatedField $segments - * All video segments where a face was detected. - * @type array<\Google\Cloud\VideoIntelligence\V1\FaceFrame>|\Google\Protobuf\Internal\RepeatedField $frames - * All video frames where a face was detected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Thumbnail of a representative face view (in JPEG format). - * - * Generated from protobuf field bytes thumbnail = 1; - * @return string - */ - public function getThumbnail() - { - return $this->thumbnail; - } - - /** - * Thumbnail of a representative face view (in JPEG format). - * - * Generated from protobuf field bytes thumbnail = 1; - * @param string $var - * @return $this - */ - public function setThumbnail($var) - { - GPBUtil::checkString($var, False); - $this->thumbnail = $var; - - return $this; - } - - /** - * All video segments where a face was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceSegment segments = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegments() - { - return $this->segments; - } - - /** - * All video segments where a face was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceSegment segments = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\FaceSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceSegment::class); - $this->segments = $arr; - - return $this; - } - - /** - * All video frames where a face was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceFrame frames = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrames() - { - return $this->frames; - } - - /** - * All video frames where a face was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceFrame frames = 3; - * @param array<\Google\Cloud\VideoIntelligence\V1\FaceFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceFrame::class); - $this->frames = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php deleted file mode 100644 index ebbbbc2c5152..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionAnnotation.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.videointelligence.v1.FaceDetectionAnnotation - */ -class FaceDetectionAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The face tracks with attributes. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 3; - */ - private $tracks; - /** - * The thumbnail of a person's face. - * - * Generated from protobuf field bytes thumbnail = 4; - */ - protected $thumbnail = ''; - /** - * Feature version. - * - * Generated from protobuf field string version = 5; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $tracks - * The face tracks with attributes. - * @type string $thumbnail - * The thumbnail of a person's face. - * @type string $version - * Feature version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * The face tracks with attributes. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTracks() - { - return $this->tracks; - } - - /** - * The face tracks with attributes. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 3; - * @param array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTracks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Track::class); - $this->tracks = $arr; - - return $this; - } - - /** - * The thumbnail of a person's face. - * - * Generated from protobuf field bytes thumbnail = 4; - * @return string - */ - public function getThumbnail() - { - return $this->thumbnail; - } - - /** - * The thumbnail of a person's face. - * - * Generated from protobuf field bytes thumbnail = 4; - * @param string $var - * @return $this - */ - public function setThumbnail($var) - { - GPBUtil::checkString($var, False); - $this->thumbnail = $var; - - return $this; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 5; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 5; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php deleted file mode 100644 index 4ff17755b38e..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceDetectionConfig.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.videointelligence.v1.FaceDetectionConfig - */ -class FaceDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Model to use for face detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - */ - protected $model = ''; - /** - * Whether bounding boxes are included in the face annotation output. - * - * Generated from protobuf field bool include_bounding_boxes = 2; - */ - protected $include_bounding_boxes = false; - /** - * Whether to enable face attributes detection, such as glasses, dark_glasses, - * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_attributes = 5; - */ - protected $include_attributes = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model - * Model to use for face detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * @type bool $include_bounding_boxes - * Whether bounding boxes are included in the face annotation output. - * @type bool $include_attributes - * Whether to enable face attributes detection, such as glasses, dark_glasses, - * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Model to use for face detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for face detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * Whether bounding boxes are included in the face annotation output. - * - * Generated from protobuf field bool include_bounding_boxes = 2; - * @return bool - */ - public function getIncludeBoundingBoxes() - { - return $this->include_bounding_boxes; - } - - /** - * Whether bounding boxes are included in the face annotation output. - * - * Generated from protobuf field bool include_bounding_boxes = 2; - * @param bool $var - * @return $this - */ - public function setIncludeBoundingBoxes($var) - { - GPBUtil::checkBool($var); - $this->include_bounding_boxes = $var; - - return $this; - } - - /** - * Whether to enable face attributes detection, such as glasses, dark_glasses, - * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_attributes = 5; - * @return bool - */ - public function getIncludeAttributes() - { - return $this->include_attributes; - } - - /** - * Whether to enable face attributes detection, such as glasses, dark_glasses, - * mouth_open etc. Ignored if 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_attributes = 5; - * @param bool $var - * @return $this - */ - public function setIncludeAttributes($var) - { - GPBUtil::checkBool($var); - $this->include_attributes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php deleted file mode 100644 index 32de97e8e348..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceFrame.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.videointelligence.v1.FaceFrame - */ -class FaceFrame extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized Bounding boxes in a frame. - * There can be more than one boxes if the same face is detected in multiple - * locations within the current frame. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1; - */ - private $normalized_bounding_boxes; - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - */ - protected $time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox>|\Google\Protobuf\Internal\RepeatedField $normalized_bounding_boxes - * Normalized Bounding boxes in a frame. - * There can be more than one boxes if the same face is detected in multiple - * locations within the current frame. - * @type \Google\Protobuf\Duration $time_offset - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Normalized Bounding boxes in a frame. - * There can be more than one boxes if the same face is detected in multiple - * locations within the current frame. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNormalizedBoundingBoxes() - { - return $this->normalized_bounding_boxes; - } - - /** - * Normalized Bounding boxes in a frame. - * There can be more than one boxes if the same face is detected in multiple - * locations within the current frame. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNormalizedBoundingBoxes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class); - $this->normalized_bounding_boxes = $arr; - - return $this; - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php deleted file mode 100644 index 66e742d5504b..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/FaceSegment.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.videointelligence.v1.FaceSegment - */ -class FaceSegment extends \Google\Protobuf\Internal\Message -{ - /** - * Video segment where a face was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - */ - protected $segment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Video segment where a face was detected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video segment where a face was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * Video segment where a face was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php deleted file mode 100644 index 6a3a2b4518c5..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Feature.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.videointelligence.v1.Feature - */ -class Feature -{ - /** - * Unspecified. - * - * Generated from protobuf enum FEATURE_UNSPECIFIED = 0; - */ - const FEATURE_UNSPECIFIED = 0; - /** - * Label detection. Detect objects, such as dog or flower. - * - * Generated from protobuf enum LABEL_DETECTION = 1; - */ - const LABEL_DETECTION = 1; - /** - * Shot change detection. - * - * Generated from protobuf enum SHOT_CHANGE_DETECTION = 2; - */ - const SHOT_CHANGE_DETECTION = 2; - /** - * Explicit content detection. - * - * Generated from protobuf enum EXPLICIT_CONTENT_DETECTION = 3; - */ - const EXPLICIT_CONTENT_DETECTION = 3; - /** - * Human face detection. - * - * Generated from protobuf enum FACE_DETECTION = 4; - */ - const FACE_DETECTION = 4; - /** - * Speech transcription. - * - * Generated from protobuf enum SPEECH_TRANSCRIPTION = 6; - */ - const SPEECH_TRANSCRIPTION = 6; - /** - * OCR text detection and tracking. - * - * Generated from protobuf enum TEXT_DETECTION = 7; - */ - const TEXT_DETECTION = 7; - /** - * Object detection and tracking. - * - * Generated from protobuf enum OBJECT_TRACKING = 9; - */ - const OBJECT_TRACKING = 9; - /** - * Logo detection, tracking, and recognition. - * - * Generated from protobuf enum LOGO_RECOGNITION = 12; - */ - const LOGO_RECOGNITION = 12; - /** - * Person detection. - * - * Generated from protobuf enum PERSON_DETECTION = 14; - */ - const PERSON_DETECTION = 14; - - private static $valueToName = [ - self::FEATURE_UNSPECIFIED => 'FEATURE_UNSPECIFIED', - self::LABEL_DETECTION => 'LABEL_DETECTION', - self::SHOT_CHANGE_DETECTION => 'SHOT_CHANGE_DETECTION', - self::EXPLICIT_CONTENT_DETECTION => 'EXPLICIT_CONTENT_DETECTION', - self::FACE_DETECTION => 'FACE_DETECTION', - self::SPEECH_TRANSCRIPTION => 'SPEECH_TRANSCRIPTION', - self::TEXT_DETECTION => 'TEXT_DETECTION', - self::OBJECT_TRACKING => 'OBJECT_TRACKING', - self::LOGO_RECOGNITION => 'LOGO_RECOGNITION', - self::PERSON_DETECTION => 'PERSON_DETECTION', - ]; - - 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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php deleted file mode 100644 index 5c9afbaef898..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelAnnotation.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.videointelligence.v1.LabelAnnotation - */ -class LabelAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Detected entity. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - */ - protected $entity = null; - /** - * Common categories for the detected entity. - * For example, when the label is `Terrier`, the category is likely `dog`. And - * in some cases there might be more than one categories e.g., `Terrier` could - * also be a `pet`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Entity category_entities = 2; - */ - private $category_entities; - /** - * All video segments where a label was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelSegment segments = 3; - */ - private $segments; - /** - * All video frames where a label was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4; - */ - private $frames; - /** - * Feature version. - * - * Generated from protobuf field string version = 5; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\Entity $entity - * Detected entity. - * @type array<\Google\Cloud\VideoIntelligence\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $category_entities - * Common categories for the detected entity. - * For example, when the label is `Terrier`, the category is likely `dog`. And - * in some cases there might be more than one categories e.g., `Terrier` could - * also be a `pet`. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelSegment>|\Google\Protobuf\Internal\RepeatedField $segments - * All video segments where a label was detected. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelFrame>|\Google\Protobuf\Internal\RepeatedField $frames - * All video frames where a label was detected. - * @type string $version - * Feature version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Detected entity. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - * @return \Google\Cloud\VideoIntelligence\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Detected entity. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - * @param \Google\Cloud\VideoIntelligence\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Common categories for the detected entity. - * For example, when the label is `Terrier`, the category is likely `dog`. And - * in some cases there might be more than one categories e.g., `Terrier` could - * also be a `pet`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Entity category_entities = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategoryEntities() - { - return $this->category_entities; - } - - /** - * Common categories for the detected entity. - * For example, when the label is `Terrier`, the category is likely `dog`. And - * in some cases there might be more than one categories e.g., `Terrier` could - * also be a `pet`. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Entity category_entities = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\Entity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategoryEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Entity::class); - $this->category_entities = $arr; - - return $this; - } - - /** - * All video segments where a label was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelSegment segments = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegments() - { - return $this->segments; - } - - /** - * All video segments where a label was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelSegment segments = 3; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelSegment::class); - $this->segments = $arr; - - return $this; - } - - /** - * All video frames where a label was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrames() - { - return $this->frames; - } - - /** - * All video frames where a label was detected. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelFrame frames = 4; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelFrame::class); - $this->frames = $arr; - - return $this; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 5; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 5; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php deleted file mode 100644 index b51b3128785f..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionConfig.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.videointelligence.v1.LabelDetectionConfig - */ -class LabelDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * What labels should be detected with LABEL_DETECTION, in addition to - * video-level labels or segment-level labels. - * If unspecified, defaults to `SHOT_MODE`. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1; - */ - protected $label_detection_mode = 0; - /** - * Whether the video has been shot from a stationary (i.e., non-moving) - * camera. When set to true, might improve detection accuracy for moving - * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. - * - * Generated from protobuf field bool stationary_camera = 2; - */ - protected $stationary_camera = false; - /** - * Model to use for label detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 3; - */ - protected $model = ''; - /** - * The confidence threshold we perform filtering on the labels from - * frame-level detection. If not set, it is set to 0.4 by default. The valid - * range for this threshold is [0.1, 0.9]. Any value set outside of this - * range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * - * Generated from protobuf field float frame_confidence_threshold = 4; - */ - protected $frame_confidence_threshold = 0.0; - /** - * The confidence threshold we perform filtering on the labels from - * video-level and shot-level detections. If not set, it's set to 0.3 by - * default. The valid range for this threshold is [0.1, 0.9]. Any value set - * outside of this range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * - * Generated from protobuf field float video_confidence_threshold = 5; - */ - protected $video_confidence_threshold = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $label_detection_mode - * What labels should be detected with LABEL_DETECTION, in addition to - * video-level labels or segment-level labels. - * If unspecified, defaults to `SHOT_MODE`. - * @type bool $stationary_camera - * Whether the video has been shot from a stationary (i.e., non-moving) - * camera. When set to true, might improve detection accuracy for moving - * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. - * @type string $model - * Model to use for label detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * @type float $frame_confidence_threshold - * The confidence threshold we perform filtering on the labels from - * frame-level detection. If not set, it is set to 0.4 by default. The valid - * range for this threshold is [0.1, 0.9]. Any value set outside of this - * range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * @type float $video_confidence_threshold - * The confidence threshold we perform filtering on the labels from - * video-level and shot-level detections. If not set, it's set to 0.3 by - * default. The valid range for this threshold is [0.1, 0.9]. Any value set - * outside of this range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * What labels should be detected with LABEL_DETECTION, in addition to - * video-level labels or segment-level labels. - * If unspecified, defaults to `SHOT_MODE`. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1; - * @return int - */ - public function getLabelDetectionMode() - { - return $this->label_detection_mode; - } - - /** - * What labels should be detected with LABEL_DETECTION, in addition to - * video-level labels or segment-level labels. - * If unspecified, defaults to `SHOT_MODE`. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionMode label_detection_mode = 1; - * @param int $var - * @return $this - */ - public function setLabelDetectionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\LabelDetectionMode::class); - $this->label_detection_mode = $var; - - return $this; - } - - /** - * Whether the video has been shot from a stationary (i.e., non-moving) - * camera. When set to true, might improve detection accuracy for moving - * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. - * - * Generated from protobuf field bool stationary_camera = 2; - * @return bool - */ - public function getStationaryCamera() - { - return $this->stationary_camera; - } - - /** - * Whether the video has been shot from a stationary (i.e., non-moving) - * camera. When set to true, might improve detection accuracy for moving - * objects. Should be used with `SHOT_AND_FRAME_MODE` enabled. - * - * Generated from protobuf field bool stationary_camera = 2; - * @param bool $var - * @return $this - */ - public function setStationaryCamera($var) - { - GPBUtil::checkBool($var); - $this->stationary_camera = $var; - - return $this; - } - - /** - * Model to use for label detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 3; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for label detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 3; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - - /** - * The confidence threshold we perform filtering on the labels from - * frame-level detection. If not set, it is set to 0.4 by default. The valid - * range for this threshold is [0.1, 0.9]. Any value set outside of this - * range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * - * Generated from protobuf field float frame_confidence_threshold = 4; - * @return float - */ - public function getFrameConfidenceThreshold() - { - return $this->frame_confidence_threshold; - } - - /** - * The confidence threshold we perform filtering on the labels from - * frame-level detection. If not set, it is set to 0.4 by default. The valid - * range for this threshold is [0.1, 0.9]. Any value set outside of this - * range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * - * Generated from protobuf field float frame_confidence_threshold = 4; - * @param float $var - * @return $this - */ - public function setFrameConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->frame_confidence_threshold = $var; - - return $this; - } - - /** - * The confidence threshold we perform filtering on the labels from - * video-level and shot-level detections. If not set, it's set to 0.3 by - * default. The valid range for this threshold is [0.1, 0.9]. Any value set - * outside of this range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * - * Generated from protobuf field float video_confidence_threshold = 5; - * @return float - */ - public function getVideoConfidenceThreshold() - { - return $this->video_confidence_threshold; - } - - /** - * The confidence threshold we perform filtering on the labels from - * video-level and shot-level detections. If not set, it's set to 0.3 by - * default. The valid range for this threshold is [0.1, 0.9]. Any value set - * outside of this range will be clipped. - * Note: For best results, follow the default threshold. We will update - * the default threshold everytime when we release a new model. - * - * Generated from protobuf field float video_confidence_threshold = 5; - * @param float $var - * @return $this - */ - public function setVideoConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->video_confidence_threshold = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php deleted file mode 100644 index 0f2117f3fd5c..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelDetectionMode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.videointelligence.v1.LabelDetectionMode - */ -class LabelDetectionMode -{ - /** - * Unspecified. - * - * Generated from protobuf enum LABEL_DETECTION_MODE_UNSPECIFIED = 0; - */ - const LABEL_DETECTION_MODE_UNSPECIFIED = 0; - /** - * Detect shot-level labels. - * - * Generated from protobuf enum SHOT_MODE = 1; - */ - const SHOT_MODE = 1; - /** - * Detect frame-level labels. - * - * Generated from protobuf enum FRAME_MODE = 2; - */ - const FRAME_MODE = 2; - /** - * Detect both shot-level and frame-level labels. - * - * Generated from protobuf enum SHOT_AND_FRAME_MODE = 3; - */ - const SHOT_AND_FRAME_MODE = 3; - - private static $valueToName = [ - self::LABEL_DETECTION_MODE_UNSPECIFIED => 'LABEL_DETECTION_MODE_UNSPECIFIED', - self::SHOT_MODE => 'SHOT_MODE', - self::FRAME_MODE => 'FRAME_MODE', - self::SHOT_AND_FRAME_MODE => 'SHOT_AND_FRAME_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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php deleted file mode 100644 index 4d84657a20c0..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelFrame.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.videointelligence.v1.LabelFrame - */ -class LabelFrame extends \Google\Protobuf\Internal\Message -{ - /** - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - */ - protected $time_offset = null; - /** - * Confidence that the label is accurate. Range: [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $time_offset - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * @type float $confidence - * Confidence that the label is accurate. Range: [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * Time-offset, relative to the beginning of the video, corresponding to the - * video frame for this location. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - - /** - * Confidence that the label is accurate. Range: [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence that the label is accurate. Range: [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php deleted file mode 100644 index c605883d7957..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LabelSegment.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.videointelligence.v1.LabelSegment - */ -class LabelSegment extends \Google\Protobuf\Internal\Message -{ - /** - * Video segment where a label was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - */ - protected $segment = null; - /** - * Confidence that the label is accurate. Range: [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Video segment where a label was detected. - * @type float $confidence - * Confidence that the label is accurate. Range: [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video segment where a label was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * Video segment where a label was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segment = $var; - - return $this; - } - - /** - * Confidence that the label is accurate. Range: [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence that the label is accurate. Range: [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php deleted file mode 100644 index 605525be5d52..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Likelihood.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.videointelligence.v1.Likelihood - */ -class Likelihood -{ - /** - * Unspecified likelihood. - * - * Generated from protobuf enum LIKELIHOOD_UNSPECIFIED = 0; - */ - const LIKELIHOOD_UNSPECIFIED = 0; - /** - * Very unlikely. - * - * Generated from protobuf enum VERY_UNLIKELY = 1; - */ - const VERY_UNLIKELY = 1; - /** - * Unlikely. - * - * Generated from protobuf enum UNLIKELY = 2; - */ - const UNLIKELY = 2; - /** - * Possible. - * - * Generated from protobuf enum POSSIBLE = 3; - */ - const POSSIBLE = 3; - /** - * Likely. - * - * Generated from protobuf enum LIKELY = 4; - */ - const LIKELY = 4; - /** - * Very likely. - * - * Generated from protobuf enum VERY_LIKELY = 5; - */ - const VERY_LIKELY = 5; - - private static $valueToName = [ - self::LIKELIHOOD_UNSPECIFIED => 'LIKELIHOOD_UNSPECIFIED', - self::VERY_UNLIKELY => 'VERY_UNLIKELY', - self::UNLIKELY => 'UNLIKELY', - self::POSSIBLE => 'POSSIBLE', - self::LIKELY => 'LIKELY', - self::VERY_LIKELY => 'VERY_LIKELY', - ]; - - 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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php deleted file mode 100644 index 2745490b4b1f..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/LogoRecognitionAnnotation.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.videointelligence.v1.LogoRecognitionAnnotation - */ -class LogoRecognitionAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Entity category information to specify the logo class that all the logo - * tracks within this LogoRecognitionAnnotation are recognized as. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - */ - protected $entity = null; - /** - * All logo tracks where the recognized logo appears. Each track corresponds - * to one logo instance appearing in consecutive frames. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 2; - */ - private $tracks; - /** - * All video segments where the recognized logo appears. There might be - * multiple instances of the same logo class appearing in one VideoSegment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 3; - */ - private $segments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\Entity $entity - * Entity category information to specify the logo class that all the logo - * tracks within this LogoRecognitionAnnotation are recognized as. - * @type array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $tracks - * All logo tracks where the recognized logo appears. Each track corresponds - * to one logo instance appearing in consecutive frames. - * @type array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $segments - * All video segments where the recognized logo appears. There might be - * multiple instances of the same logo class appearing in one VideoSegment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Entity category information to specify the logo class that all the logo - * tracks within this LogoRecognitionAnnotation are recognized as. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - * @return \Google\Cloud\VideoIntelligence\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity category information to specify the logo class that all the logo - * tracks within this LogoRecognitionAnnotation are recognized as. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - * @param \Google\Cloud\VideoIntelligence\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * All logo tracks where the recognized logo appears. Each track corresponds - * to one logo instance appearing in consecutive frames. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTracks() - { - return $this->tracks; - } - - /** - * All logo tracks where the recognized logo appears. Each track corresponds - * to one logo instance appearing in consecutive frames. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTracks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Track::class); - $this->tracks = $arr; - - return $this; - } - - /** - * All video segments where the recognized logo appears. There might be - * multiple instances of the same logo class appearing in one VideoSegment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegments() - { - return $this->segments; - } - - /** - * All video segments where the recognized logo appears. There might be - * multiple instances of the same logo class appearing in one VideoSegment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 3; - * @param array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php deleted file mode 100644 index 8f33cb0d7cb5..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingBox.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.videointelligence.v1.NormalizedBoundingBox - */ -class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message -{ - /** - * Left X coordinate. - * - * Generated from protobuf field float left = 1; - */ - protected $left = 0.0; - /** - * Top Y coordinate. - * - * Generated from protobuf field float top = 2; - */ - protected $top = 0.0; - /** - * Right X coordinate. - * - * Generated from protobuf field float right = 3; - */ - protected $right = 0.0; - /** - * Bottom Y coordinate. - * - * Generated from protobuf field float bottom = 4; - */ - protected $bottom = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $left - * Left X coordinate. - * @type float $top - * Top Y coordinate. - * @type float $right - * Right X coordinate. - * @type float $bottom - * Bottom Y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Left X coordinate. - * - * Generated from protobuf field float left = 1; - * @return float - */ - public function getLeft() - { - return $this->left; - } - - /** - * Left X coordinate. - * - * Generated from protobuf field float left = 1; - * @param float $var - * @return $this - */ - public function setLeft($var) - { - GPBUtil::checkFloat($var); - $this->left = $var; - - return $this; - } - - /** - * Top Y coordinate. - * - * Generated from protobuf field float top = 2; - * @return float - */ - public function getTop() - { - return $this->top; - } - - /** - * Top Y coordinate. - * - * Generated from protobuf field float top = 2; - * @param float $var - * @return $this - */ - public function setTop($var) - { - GPBUtil::checkFloat($var); - $this->top = $var; - - return $this; - } - - /** - * Right X coordinate. - * - * Generated from protobuf field float right = 3; - * @return float - */ - public function getRight() - { - return $this->right; - } - - /** - * Right X coordinate. - * - * Generated from protobuf field float right = 3; - * @param float $var - * @return $this - */ - public function setRight($var) - { - GPBUtil::checkFloat($var); - $this->right = $var; - - return $this; - } - - /** - * Bottom Y coordinate. - * - * Generated from protobuf field float bottom = 4; - * @return float - */ - public function getBottom() - { - return $this->bottom; - } - - /** - * Bottom Y coordinate. - * - * Generated from protobuf field float bottom = 4; - * @param float $var - * @return $this - */ - public function setBottom($var) - { - GPBUtil::checkFloat($var); - $this->bottom = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php deleted file mode 100644 index f69adf5d9169..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedBoundingPoly.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.videointelligence.v1.NormalizedBoundingPoly - */ -class NormalizedBoundingPoly extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized vertices of the bounding polygon. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedVertex vertices = 1; - */ - private $vertices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $vertices - * Normalized vertices of the bounding polygon. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Normalized vertices of the bounding polygon. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedVertex vertices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVertices() - { - return $this->vertices; - } - - /** - * Normalized vertices of the bounding polygon. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.NormalizedVertex vertices = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\NormalizedVertex::class); - $this->vertices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php deleted file mode 100644 index a30850203838..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/NormalizedVertex.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.videointelligence.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\Videointelligence\V1\VideoIntelligence::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/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php deleted file mode 100644 index 8ba52ba7fbb1..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingAnnotation.php +++ /dev/null @@ -1,284 +0,0 @@ -google.cloud.videointelligence.v1.ObjectTrackingAnnotation - */ -class ObjectTrackingAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Entity to specify the object category that this track is labeled as. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - */ - protected $entity = null; - /** - * Object category's labeling confidence of this track. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - /** - * Information corresponding to all frames where this object track appears. - * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - * messages in frames. - * Streaming mode: it can only be one ObjectTrackingFrame message in frames. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingFrame frames = 2; - */ - private $frames; - /** - * Feature version. - * - * Generated from protobuf field string version = 6; - */ - protected $version = ''; - protected $track_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Non-streaming batch mode ONLY. - * Each object track corresponds to one video segment where it appears. - * @type int|string $track_id - * Streaming mode ONLY. - * In streaming mode, we do not know the end time of a tracked object - * before it is completed. Hence, there is no VideoSegment info returned. - * Instead, we provide a unique identifiable integer track_id so that - * the customers can correlate the results of the ongoing - * ObjectTrackAnnotation of the same track_id over time. - * @type \Google\Cloud\VideoIntelligence\V1\Entity $entity - * Entity to specify the object category that this track is labeled as. - * @type float $confidence - * Object category's labeling confidence of this track. - * @type array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingFrame>|\Google\Protobuf\Internal\RepeatedField $frames - * Information corresponding to all frames where this object track appears. - * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - * messages in frames. - * Streaming mode: it can only be one ObjectTrackingFrame message in frames. - * @type string $version - * Feature version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Non-streaming batch mode ONLY. - * Each object track corresponds to one video segment where it appears. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 3; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->readOneof(3); - } - - public function hasSegment() - { - return $this->hasOneof(3); - } - - /** - * Non-streaming batch mode ONLY. - * Each object track corresponds to one video segment where it appears. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 3; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Streaming mode ONLY. - * In streaming mode, we do not know the end time of a tracked object - * before it is completed. Hence, there is no VideoSegment info returned. - * Instead, we provide a unique identifiable integer track_id so that - * the customers can correlate the results of the ongoing - * ObjectTrackAnnotation of the same track_id over time. - * - * Generated from protobuf field int64 track_id = 5; - * @return int|string - */ - public function getTrackId() - { - return $this->readOneof(5); - } - - public function hasTrackId() - { - return $this->hasOneof(5); - } - - /** - * Streaming mode ONLY. - * In streaming mode, we do not know the end time of a tracked object - * before it is completed. Hence, there is no VideoSegment info returned. - * Instead, we provide a unique identifiable integer track_id so that - * the customers can correlate the results of the ongoing - * ObjectTrackAnnotation of the same track_id over time. - * - * Generated from protobuf field int64 track_id = 5; - * @param int|string $var - * @return $this - */ - public function setTrackId($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Entity to specify the object category that this track is labeled as. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - * @return \Google\Cloud\VideoIntelligence\V1\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity to specify the object category that this track is labeled as. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Entity entity = 1; - * @param \Google\Cloud\VideoIntelligence\V1\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Object category's labeling confidence of this track. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Object category's labeling confidence of this track. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Information corresponding to all frames where this object track appears. - * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - * messages in frames. - * Streaming mode: it can only be one ObjectTrackingFrame message in frames. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingFrame frames = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrames() - { - return $this->frames; - } - - /** - * Information corresponding to all frames where this object track appears. - * Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame - * messages in frames. - * Streaming mode: it can only be one ObjectTrackingFrame message in frames. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingFrame frames = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\ObjectTrackingFrame::class); - $this->frames = $arr; - - return $this; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 6; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 6; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * @return string - */ - public function getTrackInfo() - { - return $this->whichOneof("track_info"); - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php deleted file mode 100644 index 25de54434f6e..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.videointelligence.v1.ObjectTrackingConfig - */ -class ObjectTrackingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Model to use for object tracking. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model - * Model to use for object tracking. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Model to use for object tracking. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for object tracking. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php deleted file mode 100644 index 88cc134fb3c3..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ObjectTrackingFrame.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.videointelligence.v1.ObjectTrackingFrame - */ -class ObjectTrackingFrame extends \Google\Protobuf\Internal\Message -{ - /** - * The normalized bounding box location of this object track for the frame. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; - */ - protected $normalized_bounding_box = null; - /** - * The timestamp of the frame in microseconds. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - */ - protected $time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $normalized_bounding_box - * The normalized bounding box location of this object track for the frame. - * @type \Google\Protobuf\Duration $time_offset - * The timestamp of the frame in microseconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * The normalized bounding box location of this object track for the frame. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; - * @return \Google\Cloud\VideoIntelligence\V1\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); - } - - /** - * The normalized bounding box location of this object track for the frame. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; - * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $var - * @return $this - */ - public function setNormalizedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class); - $this->normalized_bounding_box = $var; - - return $this; - } - - /** - * The timestamp of the frame in microseconds. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * The timestamp of the frame in microseconds. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php deleted file mode 100644 index 6d98140dbbef..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionAnnotation.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.videointelligence.v1.PersonDetectionAnnotation - */ -class PersonDetectionAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The detected tracks of a person. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 1; - */ - private $tracks; - /** - * Feature version. - * - * Generated from protobuf field string version = 2; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $tracks - * The detected tracks of a person. - * @type string $version - * Feature version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * The detected tracks of a person. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTracks() - { - return $this->tracks; - } - - /** - * The detected tracks of a person. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.Track tracks = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\Track>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTracks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\Track::class); - $this->tracks = $arr; - - return $this; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 2; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 2; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php deleted file mode 100644 index d3bb4963b47c..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/PersonDetectionConfig.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.videointelligence.v1.PersonDetectionConfig - */ -class PersonDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether bounding boxes are included in the person detection annotation - * output. - * - * Generated from protobuf field bool include_bounding_boxes = 1; - */ - protected $include_bounding_boxes = false; - /** - * Whether to enable pose landmarks detection. Ignored if - * 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_pose_landmarks = 2; - */ - protected $include_pose_landmarks = false; - /** - * Whether to enable person attributes detection, such as cloth color (black, - * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, - * etc. - * Ignored if 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_attributes = 3; - */ - protected $include_attributes = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $include_bounding_boxes - * Whether bounding boxes are included in the person detection annotation - * output. - * @type bool $include_pose_landmarks - * Whether to enable pose landmarks detection. Ignored if - * 'include_bounding_boxes' is set to false. - * @type bool $include_attributes - * Whether to enable person attributes detection, such as cloth color (black, - * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, - * etc. - * Ignored if 'include_bounding_boxes' is set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Whether bounding boxes are included in the person detection annotation - * output. - * - * Generated from protobuf field bool include_bounding_boxes = 1; - * @return bool - */ - public function getIncludeBoundingBoxes() - { - return $this->include_bounding_boxes; - } - - /** - * Whether bounding boxes are included in the person detection annotation - * output. - * - * Generated from protobuf field bool include_bounding_boxes = 1; - * @param bool $var - * @return $this - */ - public function setIncludeBoundingBoxes($var) - { - GPBUtil::checkBool($var); - $this->include_bounding_boxes = $var; - - return $this; - } - - /** - * Whether to enable pose landmarks detection. Ignored if - * 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_pose_landmarks = 2; - * @return bool - */ - public function getIncludePoseLandmarks() - { - return $this->include_pose_landmarks; - } - - /** - * Whether to enable pose landmarks detection. Ignored if - * 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_pose_landmarks = 2; - * @param bool $var - * @return $this - */ - public function setIncludePoseLandmarks($var) - { - GPBUtil::checkBool($var); - $this->include_pose_landmarks = $var; - - return $this; - } - - /** - * Whether to enable person attributes detection, such as cloth color (black, - * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, - * etc. - * Ignored if 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_attributes = 3; - * @return bool - */ - public function getIncludeAttributes() - { - return $this->include_attributes; - } - - /** - * Whether to enable person attributes detection, such as cloth color (black, - * blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, - * etc. - * Ignored if 'include_bounding_boxes' is set to false. - * - * Generated from protobuf field bool include_attributes = 3; - * @param bool $var - * @return $this - */ - public function setIncludeAttributes($var) - { - GPBUtil::checkBool($var); - $this->include_attributes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php deleted file mode 100644 index 48f8998705f7..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/ShotChangeDetectionConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.videointelligence.v1.ShotChangeDetectionConfig - */ -class ShotChangeDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Model to use for shot change detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model - * Model to use for shot change detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Model to use for shot change detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for shot change detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 1; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php deleted file mode 100644 index e8e49aff263a..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechContext.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.videointelligence.v1.SpeechContext - */ -class SpeechContext extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of strings containing words and phrases "hints" so that - * the speech recognition is more likely to recognize them. This can be used - * to improve the accuracy for specific words and phrases, for example, if - * specific commands are typically spoken by the user. This can also be used - * to add additional words to the vocabulary of the recognizer. See - * [usage limits](https://cloud.google.com/speech/limits#content). - * - * Generated from protobuf field repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $phrases; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $phrases - * Optional. A list of strings containing words and phrases "hints" so that - * the speech recognition is more likely to recognize them. This can be used - * to improve the accuracy for specific words and phrases, for example, if - * specific commands are typically spoken by the user. This can also be used - * to add additional words to the vocabulary of the recognizer. See - * [usage limits](https://cloud.google.com/speech/limits#content). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of strings containing words and phrases "hints" so that - * the speech recognition is more likely to recognize them. This can be used - * to improve the accuracy for specific words and phrases, for example, if - * specific commands are typically spoken by the user. This can also be used - * to add additional words to the vocabulary of the recognizer. See - * [usage limits](https://cloud.google.com/speech/limits#content). - * - * Generated from protobuf field repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPhrases() - { - return $this->phrases; - } - - /** - * Optional. A list of strings containing words and phrases "hints" so that - * the speech recognition is more likely to recognize them. This can be used - * to improve the accuracy for specific words and phrases, for example, if - * specific commands are typically spoken by the user. This can also be used - * to add additional words to the vocabulary of the recognizer. See - * [usage limits](https://cloud.google.com/speech/limits#content). - * - * Generated from protobuf field repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPhrases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->phrases = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php deleted file mode 100644 index 38d349c1b07b..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechRecognitionAlternative.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.videointelligence.v1.SpeechRecognitionAlternative - */ -class SpeechRecognitionAlternative extends \Google\Protobuf\Internal\Message -{ - /** - * Transcript text representing the words that the user spoke. - * - * Generated from protobuf field string transcript = 1; - */ - protected $transcript = ''; - /** - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * - * Generated from protobuf field float confidence = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $confidence = 0.0; - /** - * Output only. A list of word-specific information for each recognized word. - * Note: When `enable_speaker_diarization` is set to true, you will see all - * the words from the beginning of the audio. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.WordInfo words = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $words; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transcript - * Transcript text representing the words that the user spoke. - * @type float $confidence - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * @type array<\Google\Cloud\VideoIntelligence\V1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words - * Output only. A list of word-specific information for each recognized word. - * Note: When `enable_speaker_diarization` is set to true, you will see all - * the words from the beginning of the audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Transcript text representing the words that the user spoke. - * - * Generated from protobuf field string transcript = 1; - * @return string - */ - public function getTranscript() - { - return $this->transcript; - } - - /** - * Transcript text representing the words that the user spoke. - * - * Generated from protobuf field string transcript = 1; - * @param string $var - * @return $this - */ - public function setTranscript($var) - { - GPBUtil::checkString($var, True); - $this->transcript = $var; - - return $this; - } - - /** - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * - * Generated from protobuf field float confidence = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * - * Generated from protobuf field float confidence = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Output only. A list of word-specific information for each recognized word. - * Note: When `enable_speaker_diarization` is set to true, you will see all - * the words from the beginning of the audio. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.WordInfo words = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWords() - { - return $this->words; - } - - /** - * Output only. A list of word-specific information for each recognized word. - * Note: When `enable_speaker_diarization` is set to true, you will see all - * the words from the beginning of the audio. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.WordInfo words = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VideoIntelligence\V1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\WordInfo::class); - $this->words = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php deleted file mode 100644 index b42482f5ddf1..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscription.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.videointelligence.v1.SpeechTranscription - */ -class SpeechTranscription extends \Google\Protobuf\Internal\Message -{ - /** - * May contain one or more recognition hypotheses (up to the maximum specified - * in `max_alternatives`). These alternatives are ordered in terms of - * accuracy, with the top (first) alternative being the most probable, as - * ranked by the recognizer. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1; - */ - private $alternatives; - /** - * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag of the language in this result. This language code was - * detected to have the most likelihood of being spoken in the audio. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives - * May contain one or more recognition hypotheses (up to the maximum specified - * in `max_alternatives`). These alternatives are ordered in terms of - * accuracy, with the top (first) alternative being the most probable, as - * ranked by the recognizer. - * @type string $language_code - * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag of the language in this result. This language code was - * detected to have the most likelihood of being spoken in the audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * May contain one or more recognition hypotheses (up to the maximum specified - * in `max_alternatives`). These alternatives are ordered in terms of - * accuracy, with the top (first) alternative being the most probable, as - * ranked by the recognizer. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAlternatives() - { - return $this->alternatives; - } - - /** - * May contain one or more recognition hypotheses (up to the maximum specified - * in `max_alternatives`). These alternatives are ordered in terms of - * accuracy, with the top (first) alternative being the most probable, as - * ranked by the recognizer. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechRecognitionAlternative alternatives = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAlternatives($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\SpeechRecognitionAlternative::class); - $this->alternatives = $arr; - - return $this; - } - - /** - * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag of the language in this result. This language code was - * detected to have the most likelihood of being spoken in the audio. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) - * language tag of the language in this result. This language code was - * detected to have the most likelihood of being spoken in the audio. - * - * Generated from protobuf field string language_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php deleted file mode 100644 index 1c0f54e6f1b2..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/SpeechTranscriptionConfig.php +++ /dev/null @@ -1,447 +0,0 @@ -google.cloud.videointelligence.v1.SpeechTranscriptionConfig - */ -class SpeechTranscriptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. *Required* The language of the supplied audio as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * See [Language Support](https://cloud.google.com/speech/docs/languages) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $language_code = ''; - /** - * Optional. Maximum number of recognition hypotheses to be returned. - * Specifically, the maximum number of `SpeechRecognitionAlternative` messages - * within each `SpeechTranscription`. The server may return fewer than - * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - * return a maximum of one. If omitted, will return a maximum of one. - * - * Generated from protobuf field int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_alternatives = 0; - /** - * Optional. If set to `true`, the server will attempt to filter out - * profanities, replacing all but the initial character in each filtered word - * with asterisks, e.g. "f***". If set to `false` or omitted, profanities - * won't be filtered out. - * - * Generated from protobuf field bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter_profanity = false; - /** - * Optional. A means to provide context to assist the speech recognition. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $speech_contexts; - /** - * Optional. If 'true', adds punctuation to recognition result hypotheses. - * This feature is only available in select languages. Setting this for - * requests in other languages has no effect at all. The default 'false' value - * does not add punctuation to result hypotheses. NOTE: "This is currently - * offered as an experimental service, complimentary to all users. In the - * future this may be exclusively available as a premium feature." - * - * Generated from protobuf field bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_automatic_punctuation = false; - /** - * Optional. For file formats, such as MXF or MKV, supporting multiple audio - * tracks, specify up to two tracks. Default: track 0. - * - * Generated from protobuf field repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $audio_tracks; - /** - * Optional. If 'true', enables speaker detection for each recognized word in - * the top alternative of the recognition result using a speaker_tag provided - * in the WordInfo. - * Note: When this is true, we send all the words from the beginning of the - * audio for the top alternative in every consecutive response. - * This is done in order to improve our speaker tags as our models learn to - * identify the speakers in the conversation over time. - * - * Generated from protobuf field bool enable_speaker_diarization = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_speaker_diarization = false; - /** - * Optional. If set, specifies the estimated number of speakers in the - * conversation. If not set, defaults to '2'. Ignored unless - * enable_speaker_diarization is set to true. - * - * Generated from protobuf field int32 diarization_speaker_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $diarization_speaker_count = 0; - /** - * Optional. If `true`, the top result includes a list of words and the - * confidence for those words. If `false`, no word-level confidence - * information is returned. The default is `false`. - * - * Generated from protobuf field bool enable_word_confidence = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_word_confidence = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * Required. *Required* The language of the supplied audio as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * See [Language Support](https://cloud.google.com/speech/docs/languages) - * for a list of the currently supported language codes. - * @type int $max_alternatives - * Optional. Maximum number of recognition hypotheses to be returned. - * Specifically, the maximum number of `SpeechRecognitionAlternative` messages - * within each `SpeechTranscription`. The server may return fewer than - * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - * return a maximum of one. If omitted, will return a maximum of one. - * @type bool $filter_profanity - * Optional. If set to `true`, the server will attempt to filter out - * profanities, replacing all but the initial character in each filtered word - * with asterisks, e.g. "f***". If set to `false` or omitted, profanities - * won't be filtered out. - * @type array<\Google\Cloud\VideoIntelligence\V1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $speech_contexts - * Optional. A means to provide context to assist the speech recognition. - * @type bool $enable_automatic_punctuation - * Optional. If 'true', adds punctuation to recognition result hypotheses. - * This feature is only available in select languages. Setting this for - * requests in other languages has no effect at all. The default 'false' value - * does not add punctuation to result hypotheses. NOTE: "This is currently - * offered as an experimental service, complimentary to all users. In the - * future this may be exclusively available as a premium feature." - * @type array|\Google\Protobuf\Internal\RepeatedField $audio_tracks - * Optional. For file formats, such as MXF or MKV, supporting multiple audio - * tracks, specify up to two tracks. Default: track 0. - * @type bool $enable_speaker_diarization - * Optional. If 'true', enables speaker detection for each recognized word in - * the top alternative of the recognition result using a speaker_tag provided - * in the WordInfo. - * Note: When this is true, we send all the words from the beginning of the - * audio for the top alternative in every consecutive response. - * This is done in order to improve our speaker tags as our models learn to - * identify the speakers in the conversation over time. - * @type int $diarization_speaker_count - * Optional. If set, specifies the estimated number of speakers in the - * conversation. If not set, defaults to '2'. Ignored unless - * enable_speaker_diarization is set to true. - * @type bool $enable_word_confidence - * Optional. If `true`, the top result includes a list of words and the - * confidence for those words. If `false`, no word-level confidence - * information is returned. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Required. *Required* The language of the supplied audio as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * See [Language Support](https://cloud.google.com/speech/docs/languages) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * Required. *Required* The language of the supplied audio as a - * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. - * Example: "en-US". - * See [Language Support](https://cloud.google.com/speech/docs/languages) - * for a list of the currently supported language codes. - * - * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Optional. Maximum number of recognition hypotheses to be returned. - * Specifically, the maximum number of `SpeechRecognitionAlternative` messages - * within each `SpeechTranscription`. The server may return fewer than - * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - * return a maximum of one. If omitted, will return a maximum of one. - * - * Generated from protobuf field int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxAlternatives() - { - return $this->max_alternatives; - } - - /** - * Optional. Maximum number of recognition hypotheses to be returned. - * Specifically, the maximum number of `SpeechRecognitionAlternative` messages - * within each `SpeechTranscription`. The server may return fewer than - * `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will - * return a maximum of one. If omitted, will return a maximum of one. - * - * Generated from protobuf field int32 max_alternatives = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxAlternatives($var) - { - GPBUtil::checkInt32($var); - $this->max_alternatives = $var; - - return $this; - } - - /** - * Optional. If set to `true`, the server will attempt to filter out - * profanities, replacing all but the initial character in each filtered word - * with asterisks, e.g. "f***". If set to `false` or omitted, profanities - * won't be filtered out. - * - * Generated from protobuf field bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getFilterProfanity() - { - return $this->filter_profanity; - } - - /** - * Optional. If set to `true`, the server will attempt to filter out - * profanities, replacing all but the initial character in each filtered word - * with asterisks, e.g. "f***". If set to `false` or omitted, profanities - * won't be filtered out. - * - * Generated from protobuf field bool filter_profanity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setFilterProfanity($var) - { - GPBUtil::checkBool($var); - $this->filter_profanity = $var; - - return $this; - } - - /** - * Optional. A means to provide context to assist the speech recognition. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpeechContexts() - { - return $this->speech_contexts; - } - - /** - * Optional. A means to provide context to assist the speech recognition. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechContext speech_contexts = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\VideoIntelligence\V1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechContexts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\SpeechContext::class); - $this->speech_contexts = $arr; - - return $this; - } - - /** - * Optional. If 'true', adds punctuation to recognition result hypotheses. - * This feature is only available in select languages. Setting this for - * requests in other languages has no effect at all. The default 'false' value - * does not add punctuation to result hypotheses. NOTE: "This is currently - * offered as an experimental service, complimentary to all users. In the - * future this may be exclusively available as a premium feature." - * - * Generated from protobuf field bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableAutomaticPunctuation() - { - return $this->enable_automatic_punctuation; - } - - /** - * Optional. If 'true', adds punctuation to recognition result hypotheses. - * This feature is only available in select languages. Setting this for - * requests in other languages has no effect at all. The default 'false' value - * does not add punctuation to result hypotheses. NOTE: "This is currently - * offered as an experimental service, complimentary to all users. In the - * future this may be exclusively available as a premium feature." - * - * Generated from protobuf field bool enable_automatic_punctuation = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableAutomaticPunctuation($var) - { - GPBUtil::checkBool($var); - $this->enable_automatic_punctuation = $var; - - return $this; - } - - /** - * Optional. For file formats, such as MXF or MKV, supporting multiple audio - * tracks, specify up to two tracks. Default: track 0. - * - * Generated from protobuf field repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAudioTracks() - { - return $this->audio_tracks; - } - - /** - * Optional. For file formats, such as MXF or MKV, supporting multiple audio - * tracks, specify up to two tracks. Default: track 0. - * - * Generated from protobuf field repeated int32 audio_tracks = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAudioTracks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->audio_tracks = $arr; - - return $this; - } - - /** - * Optional. If 'true', enables speaker detection for each recognized word in - * the top alternative of the recognition result using a speaker_tag provided - * in the WordInfo. - * Note: When this is true, we send all the words from the beginning of the - * audio for the top alternative in every consecutive response. - * This is done in order to improve our speaker tags as our models learn to - * identify the speakers in the conversation over time. - * - * Generated from protobuf field bool enable_speaker_diarization = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableSpeakerDiarization() - { - return $this->enable_speaker_diarization; - } - - /** - * Optional. If 'true', enables speaker detection for each recognized word in - * the top alternative of the recognition result using a speaker_tag provided - * in the WordInfo. - * Note: When this is true, we send all the words from the beginning of the - * audio for the top alternative in every consecutive response. - * This is done in order to improve our speaker tags as our models learn to - * identify the speakers in the conversation over time. - * - * Generated from protobuf field bool enable_speaker_diarization = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableSpeakerDiarization($var) - { - GPBUtil::checkBool($var); - $this->enable_speaker_diarization = $var; - - return $this; - } - - /** - * Optional. If set, specifies the estimated number of speakers in the - * conversation. If not set, defaults to '2'. Ignored unless - * enable_speaker_diarization is set to true. - * - * Generated from protobuf field int32 diarization_speaker_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiarizationSpeakerCount() - { - return $this->diarization_speaker_count; - } - - /** - * Optional. If set, specifies the estimated number of speakers in the - * conversation. If not set, defaults to '2'. Ignored unless - * enable_speaker_diarization is set to true. - * - * Generated from protobuf field int32 diarization_speaker_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiarizationSpeakerCount($var) - { - GPBUtil::checkInt32($var); - $this->diarization_speaker_count = $var; - - return $this; - } - - /** - * Optional. If `true`, the top result includes a list of words and the - * confidence for those words. If `false`, no word-level confidence - * information is returned. The default is `false`. - * - * Generated from protobuf field bool enable_word_confidence = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableWordConfidence() - { - return $this->enable_word_confidence; - } - - /** - * Optional. If `true`, the top result includes a list of words and the - * confidence for those words. If `false`, no word-level confidence - * information is returned. The default is `false`. - * - * Generated from protobuf field bool enable_word_confidence = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableWordConfidence($var) - { - GPBUtil::checkBool($var); - $this->enable_word_confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php deleted file mode 100644 index da9a3b3e6f89..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextAnnotation.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.videointelligence.v1.TextAnnotation - */ -class TextAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The detected text. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * All video segments where OCR detected text appears. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextSegment segments = 2; - */ - private $segments; - /** - * Feature version. - * - * Generated from protobuf field string version = 3; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The detected text. - * @type array<\Google\Cloud\VideoIntelligence\V1\TextSegment>|\Google\Protobuf\Internal\RepeatedField $segments - * All video segments where OCR detected text appears. - * @type string $version - * Feature version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * The detected text. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The detected text. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * All video segments where OCR detected text appears. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextSegment segments = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegments() - { - return $this->segments; - } - - /** - * All video segments where OCR detected text appears. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextSegment segments = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\TextSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TextSegment::class); - $this->segments = $arr; - - return $this; - } - - /** - * Feature version. - * - * Generated from protobuf field string version = 3; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Feature version. - * - * 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; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php deleted file mode 100644 index 4b5eadb6e3bd..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextDetectionConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.videointelligence.v1.TextDetectionConfig - */ -class TextDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Language hint can be specified if the language to be detected is known a - * priori. It can increase the accuracy of the detection. Language hint must - * be language code in BCP-47 format. - * Automatic language detection is performed if no hint is provided. - * - * Generated from protobuf field repeated string language_hints = 1; - */ - private $language_hints; - /** - * Model to use for text detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 2; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $language_hints - * Language hint can be specified if the language to be detected is known a - * priori. It can increase the accuracy of the detection. Language hint must - * be language code in BCP-47 format. - * Automatic language detection is performed if no hint is provided. - * @type string $model - * Model to use for text detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Language hint can be specified if the language to be detected is known a - * priori. It can increase the accuracy of the detection. Language hint must - * be language code in BCP-47 format. - * Automatic language detection is performed if no hint is provided. - * - * Generated from protobuf field repeated string language_hints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageHints() - { - return $this->language_hints; - } - - /** - * Language hint can be specified if the language to be detected is known a - * priori. It can increase the accuracy of the detection. Language hint must - * be language code in BCP-47 format. - * Automatic language detection is performed if no hint is provided. - * - * Generated from protobuf field repeated string language_hints = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_hints = $arr; - - return $this; - } - - /** - * Model to use for text detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 2; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for text detection. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". - * - * Generated from protobuf field string model = 2; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php deleted file mode 100644 index eb2062c90da5..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextFrame.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.videointelligence.v1.TextFrame - */ -class TextFrame extends \Google\Protobuf\Internal\Message -{ - /** - * Bounding polygon of the detected text for this frame. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingPoly rotated_bounding_box = 1; - */ - protected $rotated_bounding_box = null; - /** - * Timestamp of this frame. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - */ - protected $time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly $rotated_bounding_box - * Bounding polygon of the detected text for this frame. - * @type \Google\Protobuf\Duration $time_offset - * Timestamp of this frame. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Bounding polygon of the detected text for this frame. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingPoly rotated_bounding_box = 1; - * @return \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly|null - */ - public function getRotatedBoundingBox() - { - return $this->rotated_bounding_box; - } - - public function hasRotatedBoundingBox() - { - return isset($this->rotated_bounding_box); - } - - public function clearRotatedBoundingBox() - { - unset($this->rotated_bounding_box); - } - - /** - * Bounding polygon of the detected text for this frame. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingPoly rotated_bounding_box = 1; - * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly $var - * @return $this - */ - public function setRotatedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingPoly::class); - $this->rotated_bounding_box = $var; - - return $this; - } - - /** - * Timestamp of this frame. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * Timestamp of this frame. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php deleted file mode 100644 index 8c0f1485df06..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TextSegment.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.videointelligence.v1.TextSegment - */ -class TextSegment extends \Google\Protobuf\Internal\Message -{ - /** - * Video segment where a text snippet was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - */ - protected $segment = null; - /** - * Confidence for the track of detected text. It is calculated as the highest - * over all frames where OCR detected text appears. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * Information related to the frames where OCR detected text appears. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextFrame frames = 3; - */ - private $frames; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Video segment where a text snippet was detected. - * @type float $confidence - * Confidence for the track of detected text. It is calculated as the highest - * over all frames where OCR detected text appears. - * @type array<\Google\Cloud\VideoIntelligence\V1\TextFrame>|\Google\Protobuf\Internal\RepeatedField $frames - * Information related to the frames where OCR detected text appears. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video segment where a text snippet was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * Video segment where a text snippet was detected. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segment = $var; - - return $this; - } - - /** - * Confidence for the track of detected text. It is calculated as the highest - * over all frames where OCR detected text appears. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence for the track of detected text. It is calculated as the highest - * over all frames where OCR detected text appears. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Information related to the frames where OCR detected text appears. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextFrame frames = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrames() - { - return $this->frames; - } - - /** - * Information related to the frames where OCR detected text appears. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextFrame frames = 3; - * @param array<\Google\Cloud\VideoIntelligence\V1\TextFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TextFrame::class); - $this->frames = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php deleted file mode 100644 index 44afbfdf9242..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/TimestampedObject.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.videointelligence.v1.TimestampedObject - */ -class TimestampedObject extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized Bounding box in a frame, where the object is located. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; - */ - protected $normalized_bounding_box = null; - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this object. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - */ - protected $time_offset = null; - /** - * Optional. The attributes of the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $attributes; - /** - * Optional. The detected landmarks. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedLandmark landmarks = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $landmarks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $normalized_bounding_box - * Normalized Bounding box in a frame, where the object is located. - * @type \Google\Protobuf\Duration $time_offset - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this object. - * @type array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes - * Optional. The attributes of the object in the bounding box. - * @type array<\Google\Cloud\VideoIntelligence\V1\DetectedLandmark>|\Google\Protobuf\Internal\RepeatedField $landmarks - * Optional. The detected landmarks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Normalized Bounding box in a frame, where the object is located. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; - * @return \Google\Cloud\VideoIntelligence\V1\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); - } - - /** - * Normalized Bounding box in a frame, where the object is located. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_box = 1; - * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox $var - * @return $this - */ - public function setNormalizedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class); - $this->normalized_bounding_box = $var; - - return $this; - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this object. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the video frame for this object. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - - /** - * Optional. The attributes of the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. The attributes of the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\DetectedAttribute::class); - $this->attributes = $arr; - - return $this; - } - - /** - * Optional. The detected landmarks. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedLandmark landmarks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLandmarks() - { - return $this->landmarks; - } - - /** - * Optional. The detected landmarks. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedLandmark landmarks = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\VideoIntelligence\V1\DetectedLandmark>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLandmarks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\DetectedLandmark::class); - $this->landmarks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php deleted file mode 100644 index e4ac51167e87..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/Track.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.videointelligence.v1.Track - */ -class Track extends \Google\Protobuf\Internal\Message -{ - /** - * Video segment of a track. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - */ - protected $segment = null; - /** - * The object with timestamp and attributes per frame in the track. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TimestampedObject timestamped_objects = 2; - */ - private $timestamped_objects; - /** - * Optional. Attributes in the track level. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $attributes; - /** - * Optional. The confidence score of the tracked object. - * - * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Video segment of a track. - * @type array<\Google\Cloud\VideoIntelligence\V1\TimestampedObject>|\Google\Protobuf\Internal\RepeatedField $timestamped_objects - * The object with timestamp and attributes per frame in the track. - * @type array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes - * Optional. Attributes in the track level. - * @type float $confidence - * Optional. The confidence score of the tracked object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video segment of a track. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * Video segment of a track. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 1; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segment = $var; - - return $this; - } - - /** - * The object with timestamp and attributes per frame in the track. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TimestampedObject timestamped_objects = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimestampedObjects() - { - return $this->timestamped_objects; - } - - /** - * The object with timestamp and attributes per frame in the track. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TimestampedObject timestamped_objects = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\TimestampedObject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimestampedObjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TimestampedObject::class); - $this->timestamped_objects = $arr; - - return $this; - } - - /** - * Optional. Attributes in the track level. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Optional. Attributes in the track level. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.DetectedAttribute attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\VideoIntelligence\V1\DetectedAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\DetectedAttribute::class); - $this->attributes = $arr; - - return $this; - } - - /** - * Optional. The confidence score of the tracked object. - * - * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Optional. The confidence score of the tracked object. - * - * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php deleted file mode 100644 index e9502cd96acb..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationProgress.php +++ /dev/null @@ -1,283 +0,0 @@ -google.cloud.videointelligence.v1.VideoAnnotationProgress - */ -class VideoAnnotationProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * - * Generated from protobuf field string input_uri = 1; - */ - protected $input_uri = ''; - /** - * Approximate percentage processed thus far. Guaranteed to be - * 100 when fully processed. - * - * Generated from protobuf field int32 progress_percent = 2; - */ - protected $progress_percent = 0; - /** - * Time when the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * Time of the most recent update. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * Specifies which feature is being tracked if the request contains more than - * one feature. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Feature feature = 5; - */ - protected $feature = 0; - /** - * Specifies which segment is being tracked if the request contains more than - * one segment. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 6; - */ - protected $segment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_uri - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * @type int $progress_percent - * Approximate percentage processed thus far. Guaranteed to be - * 100 when fully processed. - * @type \Google\Protobuf\Timestamp $start_time - * Time when the request was received. - * @type \Google\Protobuf\Timestamp $update_time - * Time of the most recent update. - * @type int $feature - * Specifies which feature is being tracked if the request contains more than - * one feature. - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Specifies which segment is being tracked if the request contains more than - * one segment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * - * Generated from protobuf field string input_uri = 1; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * - * Generated from protobuf field string input_uri = 1; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - - /** - * Approximate percentage processed thus far. Guaranteed to be - * 100 when fully processed. - * - * Generated from protobuf field int32 progress_percent = 2; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Approximate percentage processed thus far. Guaranteed to be - * 100 when fully processed. - * - * Generated from protobuf field int32 progress_percent = 2; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * Time when the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Time when the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Time of the most recent update. - * - * 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); - } - - /** - * Time of the most recent update. - * - * 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; - } - - /** - * Specifies which feature is being tracked if the request contains more than - * one feature. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Feature feature = 5; - * @return int - */ - public function getFeature() - { - return $this->feature; - } - - /** - * Specifies which feature is being tracked if the request contains more than - * one feature. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.Feature feature = 5; - * @param int $var - * @return $this - */ - public function setFeature($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\Feature::class); - $this->feature = $var; - - return $this; - } - - /** - * Specifies which segment is being tracked if the request contains more than - * one segment. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 6; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * Specifies which segment is being tracked if the request contains more than - * one segment. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 6; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php deleted file mode 100644 index e97685870f14..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoAnnotationResults.php +++ /dev/null @@ -1,710 +0,0 @@ -google.cloud.videointelligence.v1.VideoAnnotationResults - */ -class VideoAnnotationResults extends \Google\Protobuf\Internal\Message -{ - /** - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * - * Generated from protobuf field string input_uri = 1; - */ - protected $input_uri = ''; - /** - * Video segment on which the annotation is run. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 10; - */ - protected $segment = null; - /** - * Topical label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_label_annotations = 2; - */ - private $segment_label_annotations; - /** - * Presence label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. Compared to the - * existing topical `segment_label_annotations`, this field presents more - * fine-grained, segment-level labels detected in video content and is made - * available only when the client sets `LabelDetectionConfig.model` to - * "builtin/latest" in the request. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_presence_label_annotations = 23; - */ - private $segment_presence_label_annotations; - /** - * Topical label annotations on shot level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_label_annotations = 3; - */ - private $shot_label_annotations; - /** - * Presence label annotations on shot level. There is exactly one element for - * each unique label. Compared to the existing topical - * `shot_label_annotations`, this field presents more fine-grained, shot-level - * labels detected in video content and is made available only when the client - * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_presence_label_annotations = 24; - */ - private $shot_presence_label_annotations; - /** - * Label annotations on frame level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation frame_label_annotations = 4; - */ - private $frame_label_annotations; - /** - * Deprecated. Please use `face_detection_annotations` instead. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceAnnotation face_annotations = 5 [deprecated = true]; - * @deprecated - */ - private $face_annotations; - /** - * Face detection annotations. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceDetectionAnnotation face_detection_annotations = 13; - */ - private $face_detection_annotations; - /** - * Shot annotations. Each shot is represented as a video segment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment shot_annotations = 6; - */ - private $shot_annotations; - /** - * Explicit content annotation. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentAnnotation explicit_annotation = 7; - */ - protected $explicit_annotation = null; - /** - * Speech transcription. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechTranscription speech_transcriptions = 11; - */ - private $speech_transcriptions; - /** - * OCR text detection and tracking. - * Annotations for list of detected text snippets. Each will have list of - * frame information associated with it. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextAnnotation text_annotations = 12; - */ - private $text_annotations; - /** - * Annotations for list of objects detected and tracked in video. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingAnnotation object_annotations = 14; - */ - private $object_annotations; - /** - * Annotations for list of logos detected, tracked and recognized in video. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LogoRecognitionAnnotation logo_recognition_annotations = 19; - */ - private $logo_recognition_annotations; - /** - * Person detection annotations. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.PersonDetectionAnnotation person_detection_annotations = 20; - */ - private $person_detection_annotations; - /** - * If set, indicates an error. Note that for a single `AnnotateVideoRequest` - * some videos may succeed and some may fail. - * - * Generated from protobuf field .google.rpc.Status error = 9; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_uri - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * @type \Google\Cloud\VideoIntelligence\V1\VideoSegment $segment - * Video segment on which the annotation is run. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $segment_label_annotations - * Topical label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $segment_presence_label_annotations - * Presence label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. Compared to the - * existing topical `segment_label_annotations`, this field presents more - * fine-grained, segment-level labels detected in video content and is made - * available only when the client sets `LabelDetectionConfig.model` to - * "builtin/latest" in the request. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $shot_label_annotations - * Topical label annotations on shot level. - * There is exactly one element for each unique label. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $shot_presence_label_annotations - * Presence label annotations on shot level. There is exactly one element for - * each unique label. Compared to the existing topical - * `shot_label_annotations`, this field presents more fine-grained, shot-level - * labels detected in video content and is made available only when the client - * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. - * @type array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $frame_label_annotations - * Label annotations on frame level. - * There is exactly one element for each unique label. - * @type array<\Google\Cloud\VideoIntelligence\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_annotations - * Deprecated. Please use `face_detection_annotations` instead. - * @type array<\Google\Cloud\VideoIntelligence\V1\FaceDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_detection_annotations - * Face detection annotations. - * @type array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $shot_annotations - * Shot annotations. Each shot is represented as a video segment. - * @type \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation $explicit_annotation - * Explicit content annotation. - * @type array<\Google\Cloud\VideoIntelligence\V1\SpeechTranscription>|\Google\Protobuf\Internal\RepeatedField $speech_transcriptions - * Speech transcription. - * @type array<\Google\Cloud\VideoIntelligence\V1\TextAnnotation>|\Google\Protobuf\Internal\RepeatedField $text_annotations - * OCR text detection and tracking. - * Annotations for list of detected text snippets. Each will have list of - * frame information associated with it. - * @type array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingAnnotation>|\Google\Protobuf\Internal\RepeatedField $object_annotations - * Annotations for list of objects detected and tracked in video. - * @type array<\Google\Cloud\VideoIntelligence\V1\LogoRecognitionAnnotation>|\Google\Protobuf\Internal\RepeatedField $logo_recognition_annotations - * Annotations for list of logos detected, tracked and recognized in video. - * @type array<\Google\Cloud\VideoIntelligence\V1\PersonDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $person_detection_annotations - * Person detection annotations. - * @type \Google\Rpc\Status $error - * If set, indicates an error. Note that for a single `AnnotateVideoRequest` - * some videos may succeed and some may fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * - * Generated from protobuf field string input_uri = 1; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Video file location in - * [Cloud Storage](https://cloud.google.com/storage/). - * - * Generated from protobuf field string input_uri = 1; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - - /** - * Video segment on which the annotation is run. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 10; - * @return \Google\Cloud\VideoIntelligence\V1\VideoSegment|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * Video segment on which the annotation is run. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.VideoSegment segment = 10; - * @param \Google\Cloud\VideoIntelligence\V1\VideoSegment $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segment = $var; - - return $this; - } - - /** - * Topical label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_label_annotations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegmentLabelAnnotations() - { - return $this->segment_label_annotations; - } - - /** - * Topical label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_label_annotations = 2; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegmentLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); - $this->segment_label_annotations = $arr; - - return $this; - } - - /** - * Presence label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. Compared to the - * existing topical `segment_label_annotations`, this field presents more - * fine-grained, segment-level labels detected in video content and is made - * available only when the client sets `LabelDetectionConfig.model` to - * "builtin/latest" in the request. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_presence_label_annotations = 23; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegmentPresenceLabelAnnotations() - { - return $this->segment_presence_label_annotations; - } - - /** - * Presence label annotations on video level or user-specified segment level. - * There is exactly one element for each unique label. Compared to the - * existing topical `segment_label_annotations`, this field presents more - * fine-grained, segment-level labels detected in video content and is made - * available only when the client sets `LabelDetectionConfig.model` to - * "builtin/latest" in the request. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation segment_presence_label_annotations = 23; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegmentPresenceLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); - $this->segment_presence_label_annotations = $arr; - - return $this; - } - - /** - * Topical label annotations on shot level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_label_annotations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShotLabelAnnotations() - { - return $this->shot_label_annotations; - } - - /** - * Topical label annotations on shot level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_label_annotations = 3; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShotLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); - $this->shot_label_annotations = $arr; - - return $this; - } - - /** - * Presence label annotations on shot level. There is exactly one element for - * each unique label. Compared to the existing topical - * `shot_label_annotations`, this field presents more fine-grained, shot-level - * labels detected in video content and is made available only when the client - * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_presence_label_annotations = 24; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShotPresenceLabelAnnotations() - { - return $this->shot_presence_label_annotations; - } - - /** - * Presence label annotations on shot level. There is exactly one element for - * each unique label. Compared to the existing topical - * `shot_label_annotations`, this field presents more fine-grained, shot-level - * labels detected in video content and is made available only when the client - * sets `LabelDetectionConfig.model` to "builtin/latest" in the request. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation shot_presence_label_annotations = 24; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShotPresenceLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); - $this->shot_presence_label_annotations = $arr; - - return $this; - } - - /** - * Label annotations on frame level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation frame_label_annotations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrameLabelAnnotations() - { - return $this->frame_label_annotations; - } - - /** - * Label annotations on frame level. - * There is exactly one element for each unique label. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LabelAnnotation frame_label_annotations = 4; - * @param array<\Google\Cloud\VideoIntelligence\V1\LabelAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrameLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LabelAnnotation::class); - $this->frame_label_annotations = $arr; - - return $this; - } - - /** - * Deprecated. Please use `face_detection_annotations` instead. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceAnnotation face_annotations = 5 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getFaceAnnotations() - { - @trigger_error('face_annotations is deprecated.', E_USER_DEPRECATED); - return $this->face_annotations; - } - - /** - * Deprecated. Please use `face_detection_annotations` instead. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceAnnotation face_annotations = 5 [deprecated = true]; - * @param array<\Google\Cloud\VideoIntelligence\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setFaceAnnotations($var) - { - @trigger_error('face_annotations is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceAnnotation::class); - $this->face_annotations = $arr; - - return $this; - } - - /** - * Face detection annotations. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceDetectionAnnotation face_detection_annotations = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFaceDetectionAnnotations() - { - return $this->face_detection_annotations; - } - - /** - * Face detection annotations. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.FaceDetectionAnnotation face_detection_annotations = 13; - * @param array<\Google\Cloud\VideoIntelligence\V1\FaceDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFaceDetectionAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\FaceDetectionAnnotation::class); - $this->face_detection_annotations = $arr; - - return $this; - } - - /** - * Shot annotations. Each shot is represented as a video segment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment shot_annotations = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShotAnnotations() - { - return $this->shot_annotations; - } - - /** - * Shot annotations. Each shot is represented as a video segment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment shot_annotations = 6; - * @param array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShotAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->shot_annotations = $arr; - - return $this; - } - - /** - * Explicit content annotation. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentAnnotation explicit_annotation = 7; - * @return \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation|null - */ - public function getExplicitAnnotation() - { - return $this->explicit_annotation; - } - - public function hasExplicitAnnotation() - { - return isset($this->explicit_annotation); - } - - public function clearExplicitAnnotation() - { - unset($this->explicit_annotation); - } - - /** - * Explicit content annotation. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentAnnotation explicit_annotation = 7; - * @param \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation $var - * @return $this - */ - public function setExplicitAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation::class); - $this->explicit_annotation = $var; - - return $this; - } - - /** - * Speech transcription. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechTranscription speech_transcriptions = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpeechTranscriptions() - { - return $this->speech_transcriptions; - } - - /** - * Speech transcription. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.SpeechTranscription speech_transcriptions = 11; - * @param array<\Google\Cloud\VideoIntelligence\V1\SpeechTranscription>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpeechTranscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\SpeechTranscription::class); - $this->speech_transcriptions = $arr; - - return $this; - } - - /** - * OCR text detection and tracking. - * Annotations for list of detected text snippets. Each will have list of - * frame information associated with it. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextAnnotation text_annotations = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextAnnotations() - { - return $this->text_annotations; - } - - /** - * OCR text detection and tracking. - * Annotations for list of detected text snippets. Each will have list of - * frame information associated with it. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.TextAnnotation text_annotations = 12; - * @param array<\Google\Cloud\VideoIntelligence\V1\TextAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\TextAnnotation::class); - $this->text_annotations = $arr; - - return $this; - } - - /** - * Annotations for list of objects detected and tracked in video. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingAnnotation object_annotations = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getObjectAnnotations() - { - return $this->object_annotations; - } - - /** - * Annotations for list of objects detected and tracked in video. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.ObjectTrackingAnnotation object_annotations = 14; - * @param array<\Google\Cloud\VideoIntelligence\V1\ObjectTrackingAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setObjectAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\ObjectTrackingAnnotation::class); - $this->object_annotations = $arr; - - return $this; - } - - /** - * Annotations for list of logos detected, tracked and recognized in video. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LogoRecognitionAnnotation logo_recognition_annotations = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogoRecognitionAnnotations() - { - return $this->logo_recognition_annotations; - } - - /** - * Annotations for list of logos detected, tracked and recognized in video. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.LogoRecognitionAnnotation logo_recognition_annotations = 19; - * @param array<\Google\Cloud\VideoIntelligence\V1\LogoRecognitionAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogoRecognitionAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\LogoRecognitionAnnotation::class); - $this->logo_recognition_annotations = $arr; - - return $this; - } - - /** - * Person detection annotations. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.PersonDetectionAnnotation person_detection_annotations = 20; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPersonDetectionAnnotations() - { - return $this->person_detection_annotations; - } - - /** - * Person detection annotations. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.PersonDetectionAnnotation person_detection_annotations = 20; - * @param array<\Google\Cloud\VideoIntelligence\V1\PersonDetectionAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPersonDetectionAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\PersonDetectionAnnotation::class); - $this->person_detection_annotations = $arr; - - return $this; - } - - /** - * If set, indicates an error. Note that for a single `AnnotateVideoRequest` - * some videos may succeed and some may fail. - * - * Generated from protobuf field .google.rpc.Status error = 9; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * If set, indicates an error. Note that for a single `AnnotateVideoRequest` - * some videos may succeed and some may fail. - * - * Generated from protobuf field .google.rpc.Status error = 9; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php deleted file mode 100644 index b74187dab46d..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoContext.php +++ /dev/null @@ -1,427 +0,0 @@ -google.cloud.videointelligence.v1.VideoContext - */ -class VideoContext extends \Google\Protobuf\Internal\Message -{ - /** - * Video segments to annotate. The segments may overlap and are not required - * to be contiguous or span the whole video. If unspecified, each video is - * treated as a single segment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 1; - */ - private $segments; - /** - * Config for LABEL_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionConfig label_detection_config = 2; - */ - protected $label_detection_config = null; - /** - * Config for SHOT_CHANGE_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ShotChangeDetectionConfig shot_change_detection_config = 3; - */ - protected $shot_change_detection_config = null; - /** - * Config for EXPLICIT_CONTENT_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; - */ - protected $explicit_content_detection_config = null; - /** - * Config for FACE_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.FaceDetectionConfig face_detection_config = 5; - */ - protected $face_detection_config = null; - /** - * Config for SPEECH_TRANSCRIPTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.SpeechTranscriptionConfig speech_transcription_config = 6; - */ - protected $speech_transcription_config = null; - /** - * Config for TEXT_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.TextDetectionConfig text_detection_config = 8; - */ - protected $text_detection_config = null; - /** - * Config for PERSON_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.PersonDetectionConfig person_detection_config = 11; - */ - protected $person_detection_config = null; - /** - * Config for OBJECT_TRACKING. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ObjectTrackingConfig object_tracking_config = 13; - */ - protected $object_tracking_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $segments - * Video segments to annotate. The segments may overlap and are not required - * to be contiguous or span the whole video. If unspecified, each video is - * treated as a single segment. - * @type \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig $label_detection_config - * Config for LABEL_DETECTION. - * @type \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig $shot_change_detection_config - * Config for SHOT_CHANGE_DETECTION. - * @type \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig $explicit_content_detection_config - * Config for EXPLICIT_CONTENT_DETECTION. - * @type \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig $face_detection_config - * Config for FACE_DETECTION. - * @type \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig $speech_transcription_config - * Config for SPEECH_TRANSCRIPTION. - * @type \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig $text_detection_config - * Config for TEXT_DETECTION. - * @type \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig $person_detection_config - * Config for PERSON_DETECTION. - * @type \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig $object_tracking_config - * Config for OBJECT_TRACKING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Video segments to annotate. The segments may overlap and are not required - * to be contiguous or span the whole video. If unspecified, each video is - * treated as a single segment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSegments() - { - return $this->segments; - } - - /** - * Video segments to annotate. The segments may overlap and are not required - * to be contiguous or span the whole video. If unspecified, each video is - * treated as a single segment. - * - * Generated from protobuf field repeated .google.cloud.videointelligence.v1.VideoSegment segments = 1; - * @param array<\Google\Cloud\VideoIntelligence\V1\VideoSegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\VideoSegment::class); - $this->segments = $arr; - - return $this; - } - - /** - * Config for LABEL_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionConfig label_detection_config = 2; - * @return \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig|null - */ - public function getLabelDetectionConfig() - { - return $this->label_detection_config; - } - - public function hasLabelDetectionConfig() - { - return isset($this->label_detection_config); - } - - public function clearLabelDetectionConfig() - { - unset($this->label_detection_config); - } - - /** - * Config for LABEL_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.LabelDetectionConfig label_detection_config = 2; - * @param \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig $var - * @return $this - */ - public function setLabelDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\LabelDetectionConfig::class); - $this->label_detection_config = $var; - - return $this; - } - - /** - * Config for SHOT_CHANGE_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ShotChangeDetectionConfig shot_change_detection_config = 3; - * @return \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig|null - */ - public function getShotChangeDetectionConfig() - { - return $this->shot_change_detection_config; - } - - public function hasShotChangeDetectionConfig() - { - return isset($this->shot_change_detection_config); - } - - public function clearShotChangeDetectionConfig() - { - unset($this->shot_change_detection_config); - } - - /** - * Config for SHOT_CHANGE_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ShotChangeDetectionConfig shot_change_detection_config = 3; - * @param \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig $var - * @return $this - */ - public function setShotChangeDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ShotChangeDetectionConfig::class); - $this->shot_change_detection_config = $var; - - return $this; - } - - /** - * Config for EXPLICIT_CONTENT_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; - * @return \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig|null - */ - public function getExplicitContentDetectionConfig() - { - return $this->explicit_content_detection_config; - } - - public function hasExplicitContentDetectionConfig() - { - return isset($this->explicit_content_detection_config); - } - - public function clearExplicitContentDetectionConfig() - { - unset($this->explicit_content_detection_config); - } - - /** - * Config for EXPLICIT_CONTENT_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ExplicitContentDetectionConfig explicit_content_detection_config = 4; - * @param \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig $var - * @return $this - */ - public function setExplicitContentDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentDetectionConfig::class); - $this->explicit_content_detection_config = $var; - - return $this; - } - - /** - * Config for FACE_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.FaceDetectionConfig face_detection_config = 5; - * @return \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig|null - */ - public function getFaceDetectionConfig() - { - return $this->face_detection_config; - } - - public function hasFaceDetectionConfig() - { - return isset($this->face_detection_config); - } - - public function clearFaceDetectionConfig() - { - unset($this->face_detection_config); - } - - /** - * Config for FACE_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.FaceDetectionConfig face_detection_config = 5; - * @param \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig $var - * @return $this - */ - public function setFaceDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\FaceDetectionConfig::class); - $this->face_detection_config = $var; - - return $this; - } - - /** - * Config for SPEECH_TRANSCRIPTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.SpeechTranscriptionConfig speech_transcription_config = 6; - * @return \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig|null - */ - public function getSpeechTranscriptionConfig() - { - return $this->speech_transcription_config; - } - - public function hasSpeechTranscriptionConfig() - { - return isset($this->speech_transcription_config); - } - - public function clearSpeechTranscriptionConfig() - { - unset($this->speech_transcription_config); - } - - /** - * Config for SPEECH_TRANSCRIPTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.SpeechTranscriptionConfig speech_transcription_config = 6; - * @param \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig $var - * @return $this - */ - public function setSpeechTranscriptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\SpeechTranscriptionConfig::class); - $this->speech_transcription_config = $var; - - return $this; - } - - /** - * Config for TEXT_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.TextDetectionConfig text_detection_config = 8; - * @return \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig|null - */ - public function getTextDetectionConfig() - { - return $this->text_detection_config; - } - - public function hasTextDetectionConfig() - { - return isset($this->text_detection_config); - } - - public function clearTextDetectionConfig() - { - unset($this->text_detection_config); - } - - /** - * Config for TEXT_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.TextDetectionConfig text_detection_config = 8; - * @param \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig $var - * @return $this - */ - public function setTextDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\TextDetectionConfig::class); - $this->text_detection_config = $var; - - return $this; - } - - /** - * Config for PERSON_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.PersonDetectionConfig person_detection_config = 11; - * @return \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig|null - */ - public function getPersonDetectionConfig() - { - return $this->person_detection_config; - } - - public function hasPersonDetectionConfig() - { - return isset($this->person_detection_config); - } - - public function clearPersonDetectionConfig() - { - unset($this->person_detection_config); - } - - /** - * Config for PERSON_DETECTION. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.PersonDetectionConfig person_detection_config = 11; - * @param \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig $var - * @return $this - */ - public function setPersonDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\PersonDetectionConfig::class); - $this->person_detection_config = $var; - - return $this; - } - - /** - * Config for OBJECT_TRACKING. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ObjectTrackingConfig object_tracking_config = 13; - * @return \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig|null - */ - public function getObjectTrackingConfig() - { - return $this->object_tracking_config; - } - - public function hasObjectTrackingConfig() - { - return isset($this->object_tracking_config); - } - - public function clearObjectTrackingConfig() - { - unset($this->object_tracking_config); - } - - /** - * Config for OBJECT_TRACKING. - * - * Generated from protobuf field .google.cloud.videointelligence.v1.ObjectTrackingConfig object_tracking_config = 13; - * @param \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig $var - * @return $this - */ - public function setObjectTrackingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ObjectTrackingConfig::class); - $this->object_tracking_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php deleted file mode 100644 index 5153eebff212..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/VideoSegment.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.videointelligence.v1.VideoSegment - */ -class VideoSegment extends \Google\Protobuf\Internal\Message -{ - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the start of the segment (inclusive). - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - */ - protected $start_time_offset = null; - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the end of the segment (inclusive). - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 2; - */ - protected $end_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_time_offset - * Time-offset, relative to the beginning of the video, - * corresponding to the start of the segment (inclusive). - * @type \Google\Protobuf\Duration $end_time_offset - * Time-offset, relative to the beginning of the video, - * corresponding to the end of the segment (inclusive). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the start of the segment (inclusive). - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the start of the segment (inclusive). - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the end of the segment (inclusive). - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * Time-offset, relative to the beginning of the video, - * corresponding to the end of the segment (inclusive). - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php b/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php deleted file mode 100644 index 9e83ca0bd3d6..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/proto/src/Google/Cloud/VideoIntelligence/V1/WordInfo.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.videointelligence.v1.WordInfo - */ -class WordInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Time offset relative to the beginning of the audio, and - * corresponding to the start of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration start_time = 1; - */ - protected $start_time = null; - /** - * Time offset relative to the beginning of the audio, and - * corresponding to the end of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration end_time = 2; - */ - protected $end_time = null; - /** - * The word corresponding to this set of information. - * - * Generated from protobuf field string word = 3; - */ - protected $word = ''; - /** - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * - * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $confidence = 0.0; - /** - * Output only. A distinct integer value is assigned for every speaker within - * the audio. This field specifies which one of those speakers was detected to - * have spoken this word. Value ranges from 1 up to diarization_speaker_count, - * and is only set if speaker diarization is enabled. - * - * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $speaker_tag = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_time - * Time offset relative to the beginning of the audio, and - * corresponding to the start of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * @type \Google\Protobuf\Duration $end_time - * Time offset relative to the beginning of the audio, and - * corresponding to the end of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * @type string $word - * The word corresponding to this set of information. - * @type float $confidence - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * @type int $speaker_tag - * Output only. A distinct integer value is assigned for every speaker within - * the audio. This field specifies which one of those speakers was detected to - * have spoken this word. Value ranges from 1 up to diarization_speaker_count, - * and is only set if speaker diarization is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce(); - parent::__construct($data); - } - - /** - * Time offset relative to the beginning of the audio, and - * corresponding to the start of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration start_time = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Time offset relative to the beginning of the audio, and - * corresponding to the start of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration start_time = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time = $var; - - return $this; - } - - /** - * Time offset relative to the beginning of the audio, and - * corresponding to the end of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration end_time = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Time offset relative to the beginning of the audio, and - * corresponding to the end of the spoken word. This field is only set if - * `enable_word_time_offsets=true` and only in the top hypothesis. This is an - * experimental feature and the accuracy of the time offset can vary. - * - * Generated from protobuf field .google.protobuf.Duration end_time = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time = $var; - - return $this; - } - - /** - * The word corresponding to this set of information. - * - * Generated from protobuf field string word = 3; - * @return string - */ - public function getWord() - { - return $this->word; - } - - /** - * The word corresponding to this set of information. - * - * Generated from protobuf field string word = 3; - * @param string $var - * @return $this - */ - public function setWord($var) - { - GPBUtil::checkString($var, True); - $this->word = $var; - - return $this; - } - - /** - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * - * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Output only. The confidence estimate between 0.0 and 1.0. A higher number - * indicates an estimated greater likelihood that the recognized words are - * correct. This field is set only for the top alternative. - * This field is not guaranteed to be accurate and users should not rely on it - * to be always provided. - * The default of 0.0 is a sentinel value indicating `confidence` was not set. - * - * Generated from protobuf field float confidence = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Output only. A distinct integer value is assigned for every speaker within - * the audio. This field specifies which one of those speakers was detected to - * have spoken this word. Value ranges from 1 up to diarization_speaker_count, - * and is only set if speaker diarization is enabled. - * - * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSpeakerTag() - { - return $this->speaker_tag; - } - - /** - * Output only. A distinct integer value is assigned for every speaker within - * the audio. This field specifies which one of those speakers was detected to - * have spoken this word. Value ranges from 1 up to diarization_speaker_count, - * and is only set if speaker diarization is enabled. - * - * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSpeakerTag($var) - { - GPBUtil::checkInt32($var); - $this->speaker_tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php b/owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php deleted file mode 100644 index db898623b6b9..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/samples/V1/VideoIntelligenceServiceClient/annotate_video.php +++ /dev/null @@ -1,72 +0,0 @@ -annotateVideo($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AnnotateVideoResponse $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 videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php b/owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php deleted file mode 100644 index dd4523ab4809..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/src/V1/Client/VideoIntelligenceServiceClient.php +++ /dev/null @@ -1,248 +0,0 @@ - annotateVideoAsync(AnnotateVideoRequest $request, array $optionalArgs = []) - */ -final class VideoIntelligenceServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.videointelligence.v1.VideoIntelligenceService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'videointelligence.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'videointelligence.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/video_intelligence_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/video_intelligence_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/video_intelligence_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/video_intelligence_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'videointelligence.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Performs asynchronous video annotation. Progress and results can be - * retrieved through the `google.longrunning.Operations` interface. - * `Operation.metadata` contains `AnnotateVideoProgress` (progress). - * `Operation.response` contains `AnnotateVideoResponse` (results). - * - * The async variant is {@see VideoIntelligenceServiceClient::annotateVideoAsync()} - * . - * - * @example samples/V1/VideoIntelligenceServiceClient/annotate_video.php - * - * @param AnnotateVideoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 annotateVideo(AnnotateVideoRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AnnotateVideo', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 021ecaf93127..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.videointelligence.v1", - "libraryPackage": "Google\\Cloud\\VideoIntelligence\\V1", - "services": { - "VideoIntelligenceService": { - "clients": { - "grpc": { - "libraryClient": "VideoIntelligenceServiceGapicClient", - "rpcs": { - "AnnotateVideo": { - "methods": [ - "annotateVideo" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json deleted file mode 100644 index 7bf68af5fc25..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_client_config.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "interfaces": { - "google.cloud.videointelligence.v1.VideoIntelligenceService": { - "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": 1000, - "retry_delay_multiplier": 2.5, - "max_retry_delay_millis": 120000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "AnnotateVideo": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php deleted file mode 100644 index a02a6c5b3c81..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_descriptor_config.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - 'google.cloud.videointelligence.v1.VideoIntelligenceService' => [ - 'AnnotateVideo' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VideoIntelligence\V1\AnnotateVideoResponse', - 'metadataReturnType' => '\Google\Cloud\VideoIntelligence\V1\AnnotateVideoProgress', - 'initialPollDelayMillis' => '20000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '45000', - 'totalPollTimeoutMillis' => '86400000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php b/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php deleted file mode 100644 index 9dfb17be6a1e..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/src/V1/resources/video_intelligence_service_rest_client_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.cloud.videointelligence.v1.VideoIntelligenceService' => [ - 'AnnotateVideo' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/videos:annotate', - 'body' => '*', - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/operations/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1/operations/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/operations/{name=projects/*/locations/*/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/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php b/owl-bot-staging/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php deleted file mode 100644 index 7047bc74a24a..000000000000 --- a/owl-bot-staging/VideoIntelligence/v1/tests/Unit/V1/Client/VideoIntelligenceServiceClientTest.php +++ /dev/null @@ -1,238 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VideoIntelligenceServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VideoIntelligenceServiceClient($options); - } - - /** @test */ - public function annotateVideoTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/annotateVideoTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AnnotateVideoResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/annotateVideoTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new AnnotateVideoRequest(); - $response = $gapicClient->annotateVideo($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.videointelligence.v1.VideoIntelligenceService/AnnotateVideo', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/annotateVideoTest'); - $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 annotateVideoExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/annotateVideoTest'); - $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); - $request = new AnnotateVideoRequest(); - $response = $gapicClient->annotateVideo($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/annotateVideoTest'); - 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 annotateVideoAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/annotateVideoTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AnnotateVideoResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/annotateVideoTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new AnnotateVideoRequest(); - $response = $gapicClient->annotateVideoAsync($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.videointelligence.v1.VideoIntelligenceService/AnnotateVideo', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/annotateVideoTest'); - $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/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/GPBMetadata/Google/Cloud/Video/Livestream/V1/Outputs.php deleted file mode 100644 index 9191ca26bfc92841e2fb67d1561213b39fe55dd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3877 zcmcIn-EJF26prmUv5ynS*)+v*1#C^ErqHgH6!GIwApXe@)QyGRN))5jdOfyRUGHvp zXVbW-*GPyb0p0>}!v)WP#1)8lfHO0@Yo|$?P>I~cJ2U5-bH4e`nK>VQ;tU;lOWq?E zaWzVMa(67#A(0)|rnYXIa@X(oi7V^&$T3XfDzaQVl1eZL`_%ENr*LQhOB)f-(R3p3H7gB5wVp<`&K^hU zR2fR=Aw%ihi%>cbH@5+FQ}aCeP@us#Amg9ocTGc=J*rXsw{CcC~_-nHd~fI@!1>3rx0l-La8_yK?APlhJ~dbPg;^TuU=MHR9>6;ZWOc z;?icPo{U5WtULjwYIt64B&b6t8)fxJC4!W zHHg`(kfC;D*lxKziE09JmT44N%|{&|AD1_6j~&vfp?IhCf0L6G$WP(&Q@H$;iTsqK&B7Z2B9|W?VW}5HDg;?51oITbDWMj5 zIAX5&Z5(oSlZ=Q(HFwc&unM5%MP{ki(kZ$>4sz)d_tbvzLaz{5WcC;ldTY;gp z3X8u?9yl)7m zgg==0D~aEC;!++mBmX$y$wLA#NHMbp%OeeEf@pQywzT4U$_!EU|P zR@+}T>*|C1t!BM?uzOIis283CECmr%I`^G|%dD(E<$V%Ei9 z60p*A36ic8&qHNaZL4n#P%cTHok4bQho^IH(NWGoQFy9K`!K7!w!q7t_ip|Qm&7L*b2VkG z?4xBBQ%w)6&i+i{`vfeX8fTH75P8JaNns1FUIXa6Sdvus{^F+?iwa8Dplnp_I;?6U zvts5dWHr-7$=eRG)B&o9sXisG!4iI`0#0NI6MqsfmQ7e-Q&D|kLVsCOpb4JsQTIso z@Cl`&BVInuuyB)QHr)43)57c!Q^2Qq6{e`kF(zXVZ-ERB^NXRYI%5nH3-baFrMPZR z__@ddP&e8WUP7$_9pTblMm_kY|4@)&q_LQ^;Np3T#VAHJgGZL(0box-UEMf+wM#vfuBOErhF+Osm z`)z)tISy72EanL$`w}@m<*6tW4S~Q&_q36Nw-?vLkht_2KlEhbyBI8RyKwDQNE;Tu zv{m*x;rC#qCozr$=#P2f3G`HeMKKcuGF_FgK~_B6)o^l3h0kkw~4%9F_>v$Yx)8TQcN8$80v{h8v|6aRzl z-h^xIgGRl2SgWh8!v|kfU%Zf4V5xy^*N)1Twc0z4CSJ~~uv~9c>a|+E#>bg?E?!y0 zCm?f0IA8fQ2J6_vh0dINV^tP{#;VCWoo4J&O)M3UV+A2f1N(G)r#S|8c#{XW)7_r_ z_#rOu@y1T6vc^t4dKK2#iHD@}aP!x2NhfIjg6@yEe_~Y!`@g^9>jJ4<=1}D_FVW@l j1Pq5ZyL0@-bmvCYS=Nhj39j#}H&NV3xuDhQgow%JG| zK~hfKfj8ZB+dt5Cfms&)0bLbE|3iVUT@>h|s{so1oO>^+M{J9l4lt+}7De6j@tkwd z`|`8Tog)X{&TTS_xw_A~x&4!zf5dW*Yx}lg_j3D#g9GN~47=}`J?0j2xk^2^Q*Y<0 zm0J52l6v;QHCQosXxoQ9wr2F~L3i!g>@s_;XC5=pcbVQ_JHEf>GO^SvaBu)i?=#QQ z4VK$%l(w0#cXeOyY;v4VnQ%ILgwxpyaXNeV9|9OX-ScwI01v)|9R4|j{hn#$JYVk?vFA?o;6IQy98W;rM>`ro_}8Gjt{4N!h~G$Jt^lzPNsHZTtOOe3hw z9NtW?2Yd@q{N??;7bBMqlDnVVUfkrru`6^IX9Gm}Kplu$wot~)NntumPB znbx6Z*w%r0m`QPMd^DZ2#wc}}6DwP=My*;|c}=+rsb+h- zp*40}PgY`R#S5)wTYQ_#e}ts8Nkm$!HYZ4vFxRRe4SqhUtjsA_Aij$i@nWZQraptW zM%-Dr4|=j!z{I-7rB^;iwf&MAzPI+JygFU$*#-}UcrUm-UE{jOJN)xB|NBL_Qa;ix zi}k)kud7aYT?E6FOpp297F^?EX}a(0#!;VHzL#0yetbWoZK@%qauXJH%VMNpKEbZPR9wciq8Rhb{I5Q z`Qixr+_Dd4sI0*<$CPc_7pl88` z!KGUZ_T|FDhVPbX)CC=f%ie&ba54p>IpsrMMa&xMzly=qxDhFD!5gi1v#M^_b~d$E zTWy~c|HB0s%N1BspQ^PsEwAk~cH0=&S7A9^qE(yCdUIu7`5q|4n>%&6ID!0MX|?N( z1}2vz&n9iPNoXrq#5eqjzAY5@&r}U=U7RC=2w#kvB@B@gFi*&<)BMM9eaCkDq9ZEX zw%au=bS-5GVlTOhV`4Y)`w6en#P@MJ>JWMZG999OF+q1UO81`_TqR!&cUSos64<&i zUu0oc`r=gIMVtU8@MW#)*nq5W&}x8tSyeRjUf47 zz%u`NcuTnjKj0>-wVu}650twQaTe3~e7ExvlQ( zs#`1Z{GVcw8ivGeSfrThG4xrIn7ngo{gdeugb)S1YDw~Z7Yn%ISLOSV*{Y*=R*|b( z``JX5g;iC3V*}YsL84ME?QX7g@p8Vlvr%993l(fvo~q3q@~Pj(QG|qW(0|ACby%JV zUCL*0a~KC-m{!+*p#`lF7b?AeGY|^hj(7cqpf}B*#b8zFe5`I&K7m!7Pxu;2$smG&M zGNIgnt4GW{Jo1Cv58Ue4Ug8 zd6tnGbMU|t+Dc$1Sqg4r9>p3J!xOeS`M<@ai;vW|W4+D;l7OmQQc0?GdrDm8rmJY6 z=mX!z&BEM$pqo9)-!dSU1KYnicXN;-Lj^U!+K^D$&KQ_@fha&1N2idHHc7N3y5u`kq8w?4lItb!i9>`fsw@(b~%+qS;aE_CC)dn z2eRxJygyt})?rE9q?(xzv4B6~k|CC&qEdM8lg6b>>k;ChRLZd7`5`1kn$I`N& zz(TO!Gcl1}1Q>4eteu1n394fm=9z03bq(bw)ynP`*7-3i`kT8uya<`2iBfB~T&`9t z_#2fZNh-PUdY;xbsyh`bR>nJpqJ5_JE-Q+;ohUVQ;YbssS9^gqMs|hHKx3dc_gUgkvbd=hgkZa)s( zm8P$ehQ1tvTZZ5QcUKIRG-_I}AWTXLJy;BEFY;h4Mw1?%U*T9&OphYW1;pctNNHfz zfbwXQqn`-FZ;nF$w&e_nWSPrakfQNLi^H$sSW0)Fn=vJ8)q47eB}$4_1(lSYQS*%B;{N=HM%Kuc79h`N%?th_$9eKbbScKWiko7{v z?Y9KE2y1mn>dd>p{wZ&P(@|zkBWNlo9o~2n!|^_Nc*Ndg8sbX7no)L6j?fdhslLN- zTF)#)dYU?uO1F`^Z1?-NHHw?nVf7qkD?j0?He#Ie_6tQICgn z4Nfm}UWB>NP{=~?a00?Uo(MO~sEQN9tPll9Rn&50ag-TOk zWzrm}Q)sImamLTj_Ydt?Ux>png73r)i#cci;pmsI z=5m|-MYuwlUW6;~internalAddGeneratedFile( - ' -êO -.google/cloud/video/livestream/v1/service.proto google.cloud.video.livestream.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.proto0google/cloud/video/livestream/v1/resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"µ -CreateAssetRequest7 -parent ( B\'àAúA!livestream.googleapis.com/Asset; -asset ( 2\'.google.cloud.video.livestream.v1.AssetBàA -asset_id ( BàA - -request_id ( "_ -DeleteAssetRequest5 -name ( B\'àAúA! -livestream.googleapis.com/Asset - -request_id ( "• -ListAssetsRequest7 -parent ( B\'àAúA!livestream.googleapis.com/Asset - page_size ( - -page_token (  -filter (  -order_by ( "{ -ListAssetsResponse7 -assets ( 2\'.google.cloud.video.livestream.v1.Asset -next_page_token (  - unreachable ( "H -GetAssetRequest5 -name ( B\'àAúA! -livestream.googleapis.com/Asset"¿ -CreateChannelRequest9 -parent ( B)àAúA#!livestream.googleapis.com/Channel? -channel ( 2).google.cloud.video.livestream.v1.ChannelBàA - -channel_id ( BàA - -request_id ( "™ -ListChannelsRequest9 -parent ( B)àAúA#!livestream.googleapis.com/Channel - page_size ( - -page_token (  -filter (  -order_by ( " -ListChannelsResponse; -channels ( 2).google.cloud.video.livestream.v1.Channel -next_page_token (  - unreachable ( "L -GetChannelRequest7 -name ( B)àAúA# -!livestream.googleapis.com/Channel"r -DeleteChannelRequest7 -name ( B)àAúA# -!livestream.googleapis.com/Channel - -request_id (  -force ("œ -UpdateChannelRequest/ - update_mask ( 2.google.protobuf.FieldMask? -channel ( 2).google.cloud.video.livestream.v1.ChannelBàA - -request_id ( "b -StartChannelRequest7 -name ( B)àAúA# -!livestream.googleapis.com/Channel - -request_id ( "a -StopChannelRequest7 -name ( B)àAúA# -!livestream.googleapis.com/Channel - -request_id ( "µ -CreateInputRequest7 -parent ( B\'àAúA!livestream.googleapis.com/Input; -input ( 2\'.google.cloud.video.livestream.v1.InputBàA -input_id ( BàA - -request_id ( "• -ListInputsRequest7 -parent ( B\'àAúA!livestream.googleapis.com/Input - page_size ( - -page_token (  -filter (  -order_by ( "{ -ListInputsResponse7 -inputs ( 2\'.google.cloud.video.livestream.v1.Input -next_page_token (  - unreachable ( "H -GetInputRequest5 -name ( B\'àAúA! -livestream.googleapis.com/Input"_ -DeleteInputRequest5 -name ( B\'àAúA! -livestream.googleapis.com/Input - -request_id ( "– -UpdateInputRequest/ - update_mask ( 2.google.protobuf.FieldMask; -input ( 2\'.google.cloud.video.livestream.v1.InputBàA - -request_id ( "µ -CreateEventRequest7 -parent ( B\'àAúA!livestream.googleapis.com/Event; -event ( 2\'.google.cloud.video.livestream.v1.EventBàA -event_id ( BàA - -request_id ( "• -ListEventsRequest7 -parent ( B\'àAúA!livestream.googleapis.com/Event - page_size ( - -page_token (  -filter (  -order_by ( "{ -ListEventsResponse7 -events ( 2\'.google.cloud.video.livestream.v1.Event -next_page_token (  - unreachable ( "H -GetEventRequest5 -name ( B\'àAúA! -livestream.googleapis.com/Event"_ -DeleteEventRequest5 -name ( B\'àAúA! -livestream.googleapis.com/Event - -request_id ( " -ChannelOperationResponse"“ -ListClipsRequest6 -parent ( B&àAúA livestream.googleapis.com/Clip - page_size ( - -page_token (  -filter (  -order_by ( "x -ListClipsResponse5 -clips ( 2&.google.cloud.video.livestream.v1.Clip -next_page_token (  - unreachable ( "F -GetClipRequest4 -name ( B&àAúA -livestream.googleapis.com/Clip"µ -CreateClipRequest6 -parent ( B&àAúA livestream.googleapis.com/Clip -clip_id ( BàA9 -clip ( 2&.google.cloud.video.livestream.v1.ClipBàA - -request_id ( BàA"j -DeleteClipRequest4 -name ( B&àAúA -livestream.googleapis.com/Clip - -request_id ( B àAâŒÏ×"ã -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA# -requested_cancellation (BàA - api_version ( BàA"F -GetPoolRequest4 -name ( B&àAúA -livestream.googleapis.com/Pool"“ -UpdatePoolRequest/ - update_mask ( 2.google.protobuf.FieldMask9 -pool ( 2&.google.cloud.video.livestream.v1.PoolBàA - -request_id ( 2Ù( -LivestreamServiceà - CreateChannel6.google.cloud.video.livestream.v1.CreateChannelRequest.google.longrunning.Operation"xÊA -ChannelOperationMetadataÚAparent,channel,channel_id‚Óä“7",/v1/{parent=projects/*/locations/*}/channels:channel¼ - ListChannels5.google.cloud.video.livestream.v1.ListChannelsRequest6.google.cloud.video.livestream.v1.ListChannelsResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/channels© - -GetChannel3.google.cloud.video.livestream.v1.GetChannelRequest).google.cloud.video.livestream.v1.Channel";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/channels/*}Ð - DeleteChannel6.google.cloud.video.livestream.v1.DeleteChannelRequest.google.longrunning.Operation"hÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/channels/*}â - UpdateChannel6.google.cloud.video.livestream.v1.UpdateChannelRequest.google.longrunning.Operation"zÊA -ChannelOperationMetadataÚAchannel,update_mask‚Óä“?24/v1/{channel.name=projects/*/locations/*/channels/*}:channelÚ - StartChannel5.google.cloud.video.livestream.v1.StartChannelRequest.google.longrunning.Operation"tÊA- -ChannelOperationResponseOperationMetadataÚAname‚Óä“7"2/v1/{name=projects/*/locations/*/channels/*}:start:*× - StopChannel4.google.cloud.video.livestream.v1.StopChannelRequest.google.longrunning.Operation"sÊA- -ChannelOperationResponseOperationMetadataÚAname‚Óä“6"1/v1/{name=projects/*/locations/*/channels/*}:stop:*Ò - CreateInput4.google.cloud.video.livestream.v1.CreateInputRequest.google.longrunning.Operation"nÊA -InputOperationMetadataÚAparent,input,input_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/inputs:input´ - -ListInputs3.google.cloud.video.livestream.v1.ListInputsRequest4.google.cloud.video.livestream.v1.ListInputsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/inputs¡ -GetInput1.google.cloud.video.livestream.v1.GetInputRequest\'.google.cloud.video.livestream.v1.Input"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/inputs/*}Ê - DeleteInput4.google.cloud.video.livestream.v1.DeleteInputRequest.google.longrunning.Operation"fÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/inputs/*}Ô - UpdateInput4.google.cloud.video.livestream.v1.UpdateInputRequest.google.longrunning.Operation"pÊA -InputOperationMetadataÚAinput,update_mask‚Óä“920/v1/{input.name=projects/*/locations/*/inputs/*}:inputÊ - CreateEvent4.google.cloud.video.livestream.v1.CreateEventRequest\'.google.cloud.video.livestream.v1.Event"\\ÚAparent,event,event_id‚Óä“>"5/v1/{parent=projects/*/locations/*/channels/*}/events:event¿ - -ListEvents3.google.cloud.video.livestream.v1.ListEventsRequest4.google.cloud.video.livestream.v1.ListEventsResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*/channels/*}/events¬ -GetEvent1.google.cloud.video.livestream.v1.GetEventRequest\'.google.cloud.video.livestream.v1.Event"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/channels/*/events/*}¡ - DeleteEvent4.google.cloud.video.livestream.v1.DeleteEventRequest.google.protobuf.Empty"DÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/channels/*/events/*}» - ListClips2.google.cloud.video.livestream.v1.ListClipsRequest3.google.cloud.video.livestream.v1.ListClipsResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*/channels/*}/clips¨ -GetClip0.google.cloud.video.livestream.v1.GetClipRequest&.google.cloud.video.livestream.v1.Clip"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/channels/*/clips/*}Ö - -CreateClip3.google.cloud.video.livestream.v1.CreateClipRequest.google.longrunning.Operation"tÊA -ClipOperationMetadataÚAparent,clip,clip_id‚Óä“<"4/v1/{parent=projects/*/locations/*/channels/*}/clips:clipÒ - -DeleteClip3.google.cloud.video.livestream.v1.DeleteClipRequest.google.longrunning.Operation"pÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“6*4/v1/{name=projects/*/locations/*/channels/*/clips/*}Ò - CreateAsset4.google.cloud.video.livestream.v1.CreateAssetRequest.google.longrunning.Operation"nÊA -AssetOperationMetadataÚAparent,asset,asset_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/assets:assetÊ - DeleteAsset4.google.cloud.video.livestream.v1.DeleteAssetRequest.google.longrunning.Operation"fÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/assets/*}¡ -GetAsset1.google.cloud.video.livestream.v1.GetAssetRequest\'.google.cloud.video.livestream.v1.Asset"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/assets/*}´ - -ListAssets3.google.cloud.video.livestream.v1.ListAssetsRequest4.google.cloud.video.livestream.v1.ListAssetsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/assets -GetPool0.google.cloud.video.livestream.v1.GetPoolRequest&.google.cloud.video.livestream.v1.Pool"8ÚAname‚Óä“+)/v1/{name=projects/*/locations/*/pools/*}Í - -UpdatePool3.google.cloud.video.livestream.v1.UpdatePoolRequest.google.longrunning.Operation"kÊA -PoolOperationMetadataÚApool,update_mask‚Óä“62./v1/{pool.name=projects/*/locations/*/pools/*}:poolMÊAlivestream.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¡ -$com.google.cloud.video.livestream.v1B ServiceProtoPZDcloud.google.com/go/video/livestream/apiv1/livestreampb;livestreampbª Google.Cloud.Video.LiveStream.V1Ê Google\\Cloud\\Video\\LiveStream\\V1ê$Google::Cloud::Video::LiveStream::V1êAd -*secretmanager.googleapis.com/SecretVersion6projects/{project}/secrets/{secret}/versions/{version}êAN -compute.googleapis.com/Network,projects/{project}/global/networks/{network}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php deleted file mode 100644 index bf34809341f8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset.php +++ /dev/null @@ -1,424 +0,0 @@ -google.cloud.video.livestream.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the asset, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Based64-encoded CRC32c checksum of the asset file. For more information, - * see the crc32c checksum of the [Cloud Storage Objects - * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). - * If crc32c is omitted or left empty when the asset is created, this field is - * filled by the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If - * crc32c is set, the asset can't be created if the crc32c value does not - * match with the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. - * - * Generated from protobuf field string crc32c = 7; - */ - protected $crc32c = ''; - /** - * Output only. The state of the asset resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Only present when `state` is `ERROR`. The reason for the error - * state of the asset. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - protected $resource; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the asset, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset $video - * VideoAsset represents a video. - * @type \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset $image - * ImageAsset represents an image. - * @type string $crc32c - * Based64-encoded CRC32c checksum of the asset file. For more information, - * see the crc32c checksum of the [Cloud Storage Objects - * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). - * If crc32c is omitted or left empty when the asset is created, this field is - * filled by the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If - * crc32c is set, the asset can't be created if the crc32c value does not - * match with the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. - * @type int $state - * Output only. The state of the asset resource. - * @type \Google\Rpc\Status $error - * Output only. Only present when `state` is `ERROR`. The reason for the error - * state of the asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the asset, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the asset, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * 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 creation time. - * - * 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 creation time. - * - * 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 time. - * - * 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 time. - * - * 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; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * 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; - } - - /** - * VideoAsset represents a video. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.VideoAsset video = 5; - * @return \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset|null - */ - public function getVideo() - { - return $this->readOneof(5); - } - - public function hasVideo() - { - return $this->hasOneof(5); - } - - /** - * VideoAsset represents a video. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.VideoAsset video = 5; - * @param \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset $var - * @return $this - */ - public function setVideo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Asset\VideoAsset::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * ImageAsset represents an image. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.ImageAsset image = 6; - * @return \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset|null - */ - public function getImage() - { - return $this->readOneof(6); - } - - public function hasImage() - { - return $this->hasOneof(6); - } - - /** - * ImageAsset represents an image. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.ImageAsset image = 6; - * @param \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Asset\ImageAsset::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Based64-encoded CRC32c checksum of the asset file. For more information, - * see the crc32c checksum of the [Cloud Storage Objects - * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). - * If crc32c is omitted or left empty when the asset is created, this field is - * filled by the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If - * crc32c is set, the asset can't be created if the crc32c value does not - * match with the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. - * - * Generated from protobuf field string crc32c = 7; - * @return string - */ - public function getCrc32C() - { - return $this->crc32c; - } - - /** - * Based64-encoded CRC32c checksum of the asset file. For more information, - * see the crc32c checksum of the [Cloud Storage Objects - * resource](https://cloud.google.com/storage/docs/json_api/v1/objects). - * If crc32c is omitted or left empty when the asset is created, this field is - * filled by the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. If - * crc32c is set, the asset can't be created if the crc32c value does not - * match with the crc32c checksum of the Cloud Storage object indicated by - * [VideoAsset.uri][google.cloud.video.livestream.v1.Asset.VideoAsset.uri] or - * [ImageAsset.uri][google.cloud.video.livestream.v1.Asset.ImageAsset.uri]. - * - * Generated from protobuf field string crc32c = 7; - * @param string $var - * @return $this - */ - public function setCrc32C($var) - { - GPBUtil::checkString($var, True); - $this->crc32c = $var; - - return $this; - } - - /** - * Output only. The state of the asset resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the asset resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Asset\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Only present when `state` is `ERROR`. The reason for the error - * state of the asset. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Only present when `state` is `ERROR`. The reason for the error - * state of the asset. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * @return string - */ - public function getResource() - { - return $this->whichOneof("resource"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php deleted file mode 100644 index c4c6f34514b4..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/ImageAsset.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.video.livestream.v1.Asset.ImageAsset - */ -class ImageAsset extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImageAsset::class, \Google\Cloud\Video\LiveStream\V1\Asset_ImageAsset::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php deleted file mode 100644 index 4e41f6461532..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.video.livestream.v1.Asset.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The asset is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The asset is ready for use. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The asset is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The asset has an error. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Asset_State::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php deleted file mode 100644 index 31acfd1216f6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Asset/VideoAsset.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.video.livestream.v1.Asset.VideoAsset - */ -class VideoAsset extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VideoAsset::class, \Google\Cloud\Video\LiveStream\V1\Asset_VideoAsset::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php deleted file mode 100644 index 183a21001565..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioFormat.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.livestream.v1.AudioFormat - */ -class AudioFormat extends \Google\Protobuf\Internal\Message -{ - /** - * Audio codec used in this audio stream. - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * The number of audio channels. - * - * Generated from protobuf field int32 channel_count = 2; - */ - protected $channel_count = 0; - /** - * A list of channel names specifying the layout of the audio channels. - * - * Generated from protobuf field repeated string channel_layout = 3; - */ - private $channel_layout; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * Audio codec used in this audio stream. - * @type int $channel_count - * The number of audio channels. - * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout - * A list of channel names specifying the layout of the audio channels. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Audio codec used in this audio stream. - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Audio codec used in this audio stream. - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * The number of audio channels. - * - * Generated from protobuf field int32 channel_count = 2; - * @return int - */ - public function getChannelCount() - { - return $this->channel_count; - } - - /** - * The number of audio channels. - * - * Generated from protobuf field int32 channel_count = 2; - * @param int $var - * @return $this - */ - public function setChannelCount($var) - { - GPBUtil::checkInt32($var); - $this->channel_count = $var; - - return $this; - } - - /** - * A list of channel names specifying the layout of the audio channels. - * - * Generated from protobuf field repeated string channel_layout = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelLayout() - { - return $this->channel_layout; - } - - /** - * A list of channel names specifying the layout of the audio channels. - * - * Generated from protobuf field repeated string channel_layout = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelLayout($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->channel_layout = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php deleted file mode 100644 index 004559384953..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream.php +++ /dev/null @@ -1,327 +0,0 @@ -google.cloud.video.livestream.v1.AudioStream - */ -class AudioStream extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * - * Generated from protobuf field bool transmux = 8; - */ - protected $transmux = false; - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - */ - protected $channel_count = 0; - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - */ - private $channel_layout; - /** - * The mapping for the input streams and audio channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; - */ - private $mapping; - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - */ - protected $sample_rate_hertz = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $transmux - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * @type string $codec - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * @type int $bitrate_bps - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * @type int $channel_count - * Number of audio channels. Must be between 1 and 6. The default is 2. - * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping - * The mapping for the input streams and audio channels. - * @type int $sample_rate_hertz - * The audio sample rate in Hertz. The default is 48000 Hertz. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * - * Generated from protobuf field bool transmux = 8; - * @return bool - */ - public function getTransmux() - { - return $this->transmux; - } - - /** - * Specifies whether pass through (transmuxing) is enabled or not. - * If set to `true`, the rest of the settings, other than `mapping`, will be - * ignored. The default is `false`. - * - * Generated from protobuf field bool transmux = 8; - * @param bool $var - * @return $this - */ - public function setTransmux($var) - { - GPBUtil::checkBool($var); - $this->transmux = $var; - - return $this; - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @return int - */ - public function getChannelCount() - { - return $this->channel_count; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @param int $var - * @return $this - */ - public function setChannelCount($var) - { - GPBUtil::checkInt32($var); - $this->channel_count = $var; - - return $this; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelLayout() - { - return $this->channel_layout; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `[fl, fr]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelLayout($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->channel_layout = $arr; - - return $this; - } - - /** - * The mapping for the input streams and audio channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * The mapping for the input streams and audio channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStream.AudioMapping mapping = 5; - * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStream\AudioMapping::class); - $this->mapping = $arr; - - return $this; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php deleted file mode 100644 index 032ef41bd53a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStream/AudioMapping.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.video.livestream.v1.AudioStream.AudioMapping - */ -class AudioMapping extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * - * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_key = ''; - /** - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * - * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_track = 0; - /** - * Required. The zero-based index of the channel in the input stream. - * - * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_channel = 0; - /** - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * - * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_channel = 0; - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 5; - */ - protected $gain_db = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_key - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * @type int $input_track - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * @type int $input_channel - * Required. The zero-based index of the channel in the input stream. - * @type int $output_channel - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * @type float $gain_db - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * - * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * Required. The `Channel` - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that identifies the input that this audio mapping applies to. If an - * active input doesn't have an audio mapping, the primary audio track in - * the input stream will be selected. - * - * Generated from protobuf field string input_key = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - - /** - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * - * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputTrack() - { - return $this->input_track; - } - - /** - * Required. The zero-based index of the track in the input stream. - * All [mapping][google.cloud.video.livestream.v1.AudioStream.mapping]s in - * the same [AudioStream][google.cloud.video.livestream.v1.AudioStream] must - * have the same input track. - * - * Generated from protobuf field int32 input_track = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputTrack($var) - { - GPBUtil::checkInt32($var); - $this->input_track = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the input stream. - * - * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputChannel() - { - return $this->input_channel; - } - - /** - * Required. The zero-based index of the channel in the input stream. - * - * Generated from protobuf field int32 input_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputChannel($var) - { - GPBUtil::checkInt32($var); - $this->input_channel = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * - * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOutputChannel() - { - return $this->output_channel; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * Must be consistent with the - * [input_channel][google.cloud.video.livestream.v1.AudioStream.AudioMapping.input_channel]. - * - * Generated from protobuf field int32 output_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOutputChannel($var) - { - GPBUtil::checkInt32($var); - $this->output_channel = $var; - - return $this; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 5; - * @return float - */ - public function getGainDb() - { - return $this->gain_db; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 5; - * @param float $var - * @return $this - */ - public function setGainDb($var) - { - GPBUtil::checkDouble($var); - $this->gain_db = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudioMapping::class, \Google\Cloud\Video\LiveStream\V1\AudioStream_AudioMapping::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php deleted file mode 100644 index 320aecc20086..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/AudioStreamProperty.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.livestream.v1.AudioStreamProperty - */ -class AudioStreamProperty extends \Google\Protobuf\Internal\Message -{ - /** - * Index of this audio stream. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Properties of the audio format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; - */ - protected $audio_format = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * Index of this audio stream. - * @type \Google\Cloud\Video\LiveStream\V1\AudioFormat $audio_format - * Properties of the audio format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Index of this audio stream. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Index of this audio stream. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Properties of the audio format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; - * @return \Google\Cloud\Video\LiveStream\V1\AudioFormat|null - */ - public function getAudioFormat() - { - return $this->audio_format; - } - - public function hasAudioFormat() - { - return isset($this->audio_format); - } - - public function clearAudioFormat() - { - unset($this->audio_format); - } - - /** - * Properties of the audio format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioFormat audio_format = 2; - * @param \Google\Cloud\Video\LiveStream\V1\AudioFormat $var - * @return $this - */ - public function setAudioFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioFormat::class); - $this->audio_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php deleted file mode 100644 index 6218cc4acbdf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel.php +++ /dev/null @@ -1,827 +0,0 @@ -google.cloud.video.livestream.v1.Channel - */ -class Channel extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; - */ - private $input_attachments; - /** - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * - * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $active_input = ''; - /** - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output = null; - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; - */ - private $elementary_streams; - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; - */ - private $mux_streams; - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; - */ - private $manifests; - /** - * List of output sprite sheets. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; - */ - private $sprite_sheets; - /** - * Output only. State of the streaming operation. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $streaming_state = 0; - /** - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * - * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $streaming_error = null; - /** - * Configuration of platform logs for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; - */ - protected $log_config = null; - /** - * Configuration of timecode for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; - */ - protected $timecode_config = null; - /** - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; - */ - private $encryptions; - /** - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; - */ - protected $input_config = null; - /** - * Optional. Configuration for retention of output files for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.RetentionConfig retention_config = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retention_config = null; - /** - * Optional. List of static overlay images. Those images display over the - * output content for the whole duration of the live stream. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.StaticOverlay static_overlays = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $static_overlays; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $input_attachments - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * @type string $active_input - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * @type \Google\Cloud\Video\LiveStream\V1\Channel\Output $output - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * @type array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of elementary streams. - * @type array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams - * List of multiplexing settings for output streams. - * @type array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests - * List of output manifests. - * @type array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets - * List of output sprite sheets. - * @type int $streaming_state - * Output only. State of the streaming operation. - * @type \Google\Rpc\Status $streaming_error - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * @type \Google\Cloud\Video\LiveStream\V1\LogConfig $log_config - * Configuration of platform logs for this channel. - * @type \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $timecode_config - * Configuration of timecode for this channel. - * @type array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $encryptions - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * @type \Google\Cloud\Video\LiveStream\V1\InputConfig $input_config - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * @type \Google\Cloud\Video\LiveStream\V1\RetentionConfig $retention_config - * Optional. Configuration for retention of output files for this channel. - * @type array<\Google\Cloud\Video\LiveStream\V1\StaticOverlay>|\Google\Protobuf\Internal\RepeatedField $static_overlays - * Optional. List of static overlay images. Those images display over the - * output content for the whole duration of the live stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the channel, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 creation time. - * - * 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 creation time. - * - * 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 time. - * - * 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 time. - * - * 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; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * 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; - } - - /** - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputAttachments() - { - return $this->input_attachments; - } - - /** - * A list of input attachments that this channel uses. - * One channel can have multiple inputs as the input sources. Only one - * input can be selected as the input source at one time. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.InputAttachment input_attachments = 16; - * @param array<\Google\Cloud\Video\LiveStream\V1\InputAttachment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\InputAttachment::class); - $this->input_attachments = $arr; - - return $this; - } - - /** - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * - * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getActiveInput() - { - return $this->active_input; - } - - /** - * Output only. The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * that serves as the current input source. The first input in the - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments] - * is the initial input source. - * - * Generated from protobuf field string active_input = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setActiveInput($var) - { - GPBUtil::checkString($var, True); - $this->active_input = $var; - - return $this; - } - - /** - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Channel\Output|null - */ - public function getOutput() - { - return $this->output; - } - - public function hasOutput() - { - return isset($this->output); - } - - public function clearOutput() - { - unset($this->output); - } - - /** - * Required. Information about the output (that is, the Cloud Storage bucket - * to store the generated live stream). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.Output output = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Channel\Output $var - * @return $this - */ - public function setOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel\Output::class); - $this->output = $var; - - return $this; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.ElementaryStream elementary_streams = 10; - * @param array<\Google\Cloud\Video\LiveStream\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\ElementaryStream::class); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.MuxStream mux_streams = 11; - * @param array<\Google\Cloud\Video\LiveStream\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\MuxStream::class); - $this->mux_streams = $arr; - - return $this; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifests() - { - return $this->manifests; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Manifest manifests = 12; - * @param array<\Google\Cloud\Video\LiveStream\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Manifest::class); - $this->manifests = $arr; - - return $this; - } - - /** - * List of output sprite sheets. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpriteSheets() - { - return $this->sprite_sheets; - } - - /** - * List of output sprite sheets. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.SpriteSheet sprite_sheets = 13; - * @param array<\Google\Cloud\Video\LiveStream\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpriteSheets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\SpriteSheet::class); - $this->sprite_sheets = $arr; - - return $this; - } - - /** - * Output only. State of the streaming operation. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStreamingState() - { - return $this->streaming_state; - } - - /** - * Output only. State of the streaming operation. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel.StreamingState streaming_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStreamingState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Channel\StreamingState::class); - $this->streaming_state = $var; - - return $this; - } - - /** - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * - * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getStreamingError() - { - return $this->streaming_error; - } - - public function hasStreamingError() - { - return isset($this->streaming_error); - } - - public function clearStreamingError() - { - unset($this->streaming_error); - } - - /** - * Output only. A description of the reason for the streaming error. This - * property is always present when - * [streaming_state][google.cloud.video.livestream.v1.Channel.streaming_state] - * is - * [STREAMING_ERROR][google.cloud.video.livestream.v1.Channel.StreamingState.STREAMING_ERROR]. - * - * Generated from protobuf field .google.rpc.Status streaming_error = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStreamingError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->streaming_error = $var; - - return $this; - } - - /** - * Configuration of platform logs for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; - * @return \Google\Cloud\Video\LiveStream\V1\LogConfig|null - */ - public function getLogConfig() - { - return $this->log_config; - } - - public function hasLogConfig() - { - return isset($this->log_config); - } - - public function clearLogConfig() - { - unset($this->log_config); - } - - /** - * Configuration of platform logs for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig log_config = 19; - * @param \Google\Cloud\Video\LiveStream\V1\LogConfig $var - * @return $this - */ - public function setLogConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\LogConfig::class); - $this->log_config = $var; - - return $this; - } - - /** - * Configuration of timecode for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; - * @return \Google\Cloud\Video\LiveStream\V1\TimecodeConfig|null - */ - public function getTimecodeConfig() - { - return $this->timecode_config; - } - - public function hasTimecodeConfig() - { - return isset($this->timecode_config); - } - - public function clearTimecodeConfig() - { - unset($this->timecode_config); - } - - /** - * Configuration of timecode for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig timecode_config = 21; - * @param \Google\Cloud\Video\LiveStream\V1\TimecodeConfig $var - * @return $this - */ - public function setTimecodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig::class); - $this->timecode_config = $var; - - return $this; - } - - /** - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEncryptions() - { - return $this->encryptions; - } - - /** - * Encryption configurations for this channel. Each configuration has an ID - * which is referred to by each MuxStream to indicate which configuration is - * used for that output. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Encryption encryptions = 24; - * @param array<\Google\Cloud\Video\LiveStream\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEncryptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Encryption::class); - $this->encryptions = $arr; - - return $this; - } - - /** - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; - * @return \Google\Cloud\Video\LiveStream\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * The configuration for input sources defined in - * [input_attachments][google.cloud.video.livestream.v1.Channel.input_attachments]. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig input_config = 25; - * @param \Google\Cloud\Video\LiveStream\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Optional. Configuration for retention of output files for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.RetentionConfig retention_config = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Video\LiveStream\V1\RetentionConfig|null - */ - public function getRetentionConfig() - { - return $this->retention_config; - } - - public function hasRetentionConfig() - { - return isset($this->retention_config); - } - - public function clearRetentionConfig() - { - unset($this->retention_config); - } - - /** - * Optional. Configuration for retention of output files for this channel. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.RetentionConfig retention_config = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Video\LiveStream\V1\RetentionConfig $var - * @return $this - */ - public function setRetentionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\RetentionConfig::class); - $this->retention_config = $var; - - return $this; - } - - /** - * Optional. List of static overlay images. Those images display over the - * output content for the whole duration of the live stream. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.StaticOverlay static_overlays = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStaticOverlays() - { - return $this->static_overlays; - } - - /** - * Optional. List of static overlay images. Those images display over the - * output content for the whole duration of the live stream. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.StaticOverlay static_overlays = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Video\LiveStream\V1\StaticOverlay>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStaticOverlays($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\StaticOverlay::class); - $this->static_overlays = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php deleted file mode 100644 index 1124a8488084..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/Output.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.video.livestream.v1.Channel.Output - */ -class Output extends \Google\Protobuf\Internal\Message -{ - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Output::class, \Google\Cloud\Video\LiveStream\V1\Channel_Output::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php deleted file mode 100644 index 87b538780fb8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Channel/StreamingState.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.video.livestream.v1.Channel.StreamingState - */ -class StreamingState -{ - /** - * Streaming state is not specified. - * - * Generated from protobuf enum STREAMING_STATE_UNSPECIFIED = 0; - */ - const STREAMING_STATE_UNSPECIFIED = 0; - /** - * Channel is getting the input stream, generating the live streams to the - * specified output location. - * - * Generated from protobuf enum STREAMING = 1; - */ - const STREAMING = 1; - /** - * Channel is waiting for the input stream through the input. - * - * Generated from protobuf enum AWAITING_INPUT = 2; - */ - const AWAITING_INPUT = 2; - /** - * Channel is running, but has trouble publishing the live streams onto the - * specified output location (for example, the specified Cloud Storage - * bucket is not writable). - * - * Generated from protobuf enum STREAMING_ERROR = 4; - */ - const STREAMING_ERROR = 4; - /** - * Channel is generating live streams with no input stream. Live streams are - * filled out with black screen, while input stream is missing. - * Not supported yet. - * - * Generated from protobuf enum STREAMING_NO_INPUT = 5; - */ - const STREAMING_NO_INPUT = 5; - /** - * Channel is stopped, finishing live streams. - * - * Generated from protobuf enum STOPPED = 6; - */ - const STOPPED = 6; - /** - * Channel is starting. - * - * Generated from protobuf enum STARTING = 7; - */ - const STARTING = 7; - /** - * Channel is stopping. - * - * Generated from protobuf enum STOPPING = 8; - */ - const STOPPING = 8; - - private static $valueToName = [ - self::STREAMING_STATE_UNSPECIFIED => 'STREAMING_STATE_UNSPECIFIED', - self::STREAMING => 'STREAMING', - self::AWAITING_INPUT => 'AWAITING_INPUT', - self::STREAMING_ERROR => 'STREAMING_ERROR', - self::STREAMING_NO_INPUT => 'STREAMING_NO_INPUT', - self::STOPPED => 'STOPPED', - self::STARTING => 'STARTING', - self::STOPPING => 'STOPPING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StreamingState::class, \Google\Cloud\Video\LiveStream\V1\Channel_StreamingState::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php deleted file mode 100644 index df5cc4567242..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ChannelOperationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.video.livestream.v1.ChannelOperationResponse - */ -class ChannelOperationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php deleted file mode 100644 index 105269ba8790..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip.php +++ /dev/null @@ -1,471 +0,0 @@ -google.cloud.video.livestream.v1.Clip - */ -class Clip extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the clip, in the following format: - * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. - * `{clipId}` is a user-specified resource id that conforms to the following - * criteria: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation timestamp of the clip resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the clip request starts to be processed. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The update timestamp of the clip resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels associated with this resource. Each label is a key-value pair. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Output only. The state of the clip. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Specify the `output_uri` to determine where to place the clip segments and - * clip manifest files in Cloud Storage. The manifests specified in - * `clip_manifests` fields will be placed under this URI. The exact URI of the - * generated manifests will be provided in `clip_manifests.output_uri` for - * each manifest. - * Example: - * "output_uri": "gs://my-bucket/clip-outputs" - * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" - * - * Generated from protobuf field string output_uri = 7; - */ - protected $output_uri = ''; - /** - * Output only. An error object that describes the reason for the failure. - * This property only presents when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * The specified ranges of segments to generate a clip. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.Slice slices = 10; - */ - private $slices; - /** - * Required. A list of clip manifests. Currently only one clip manifest is - * allowed. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.ClipManifest clip_manifests = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - private $clip_manifests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the clip, in the following format: - * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. - * `{clipId}` is a user-specified resource id that conforms to the following - * criteria: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the clip resource. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The timestamp when the clip request starts to be processed. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp of the clip resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this resource. Each label is a key-value pair. - * @type int $state - * Output only. The state of the clip. - * @type string $output_uri - * Specify the `output_uri` to determine where to place the clip segments and - * clip manifest files in Cloud Storage. The manifests specified in - * `clip_manifests` fields will be placed under this URI. The exact URI of the - * generated manifests will be provided in `clip_manifests.output_uri` for - * each manifest. - * Example: - * "output_uri": "gs://my-bucket/clip-outputs" - * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" - * @type \Google\Rpc\Status $error - * Output only. An error object that describes the reason for the failure. - * This property only presents when `state` is `FAILED`. - * @type array<\Google\Cloud\Video\LiveStream\V1\Clip\Slice>|\Google\Protobuf\Internal\RepeatedField $slices - * The specified ranges of segments to generate a clip. - * @type array<\Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest>|\Google\Protobuf\Internal\RepeatedField $clip_manifests - * Required. A list of clip manifests. Currently only one clip manifest is - * allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the clip, in the following format: - * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. - * `{clipId}` is a user-specified resource id that conforms to the following - * criteria: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the clip, in the following format: - * `projects/{project}/locations/{location}/channels/{c}/clips/{clipId}`. - * `{clipId}` is a user-specified resource id that conforms to the following - * criteria: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * 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 creation timestamp of the clip resource. - * - * 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 creation timestamp of the clip resource. - * - * 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 timestamp when the clip request starts to be processed. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The timestamp when the clip request starts to be processed. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp of the clip resource. - * - * 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 of the clip resource. - * - * 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; - } - - /** - * The labels associated with this resource. Each label is a key-value pair. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this resource. Each label is a key-value pair. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The state of the clip. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the clip. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Clip\State::class); - $this->state = $var; - - return $this; - } - - /** - * Specify the `output_uri` to determine where to place the clip segments and - * clip manifest files in Cloud Storage. The manifests specified in - * `clip_manifests` fields will be placed under this URI. The exact URI of the - * generated manifests will be provided in `clip_manifests.output_uri` for - * each manifest. - * Example: - * "output_uri": "gs://my-bucket/clip-outputs" - * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" - * - * Generated from protobuf field string output_uri = 7; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Specify the `output_uri` to determine where to place the clip segments and - * clip manifest files in Cloud Storage. The manifests specified in - * `clip_manifests` fields will be placed under this URI. The exact URI of the - * generated manifests will be provided in `clip_manifests.output_uri` for - * each manifest. - * Example: - * "output_uri": "gs://my-bucket/clip-outputs" - * "clip_manifests.output_uri": "gs://my-bucket/clip-outputs/main.m3u8" - * - * Generated from protobuf field string output_uri = 7; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property only presents when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property only presents when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The specified ranges of segments to generate a clip. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.Slice slices = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSlices() - { - return $this->slices; - } - - /** - * The specified ranges of segments to generate a clip. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.Slice slices = 10; - * @param array<\Google\Cloud\Video\LiveStream\V1\Clip\Slice>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSlices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Clip\Slice::class); - $this->slices = $arr; - - return $this; - } - - /** - * Required. A list of clip manifests. Currently only one clip manifest is - * allowed. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.ClipManifest clip_manifests = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClipManifests() - { - return $this->clip_manifests; - } - - /** - * Required. A list of clip manifests. Currently only one clip manifest is - * allowed. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip.ClipManifest clip_manifests = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClipManifests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Clip\ClipManifest::class); - $this->clip_manifests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php deleted file mode 100644 index 7837bde82c67..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/ClipManifest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.livestream.v1.Clip.ClipManifest - */ -class ClipManifest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A unique key that identifies a manifest config in the parent - * channel. This key is the same as `channel.manifests.key` for the selected - * manifest. - * - * Generated from protobuf field string manifest_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $manifest_key = ''; - /** - * Output only. The output URI of the generated clip manifest. This field - * will be populated when the CreateClip request is accepted. Current output - * format is provided below but may change in the future. Please read this - * field to get the uri to the generated clip manifest. Format: - * {clip.output_uri}/{channel.manifest.fileName} Example: - * gs://my-bucket/clip-outputs/main.m3u8 - * - * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $output_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $manifest_key - * Required. A unique key that identifies a manifest config in the parent - * channel. This key is the same as `channel.manifests.key` for the selected - * manifest. - * @type string $output_uri - * Output only. The output URI of the generated clip manifest. This field - * will be populated when the CreateClip request is accepted. Current output - * format is provided below but may change in the future. Please read this - * field to get the uri to the generated clip manifest. Format: - * {clip.output_uri}/{channel.manifest.fileName} Example: - * gs://my-bucket/clip-outputs/main.m3u8 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. A unique key that identifies a manifest config in the parent - * channel. This key is the same as `channel.manifests.key` for the selected - * manifest. - * - * Generated from protobuf field string manifest_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getManifestKey() - { - return $this->manifest_key; - } - - /** - * Required. A unique key that identifies a manifest config in the parent - * channel. This key is the same as `channel.manifests.key` for the selected - * manifest. - * - * Generated from protobuf field string manifest_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setManifestKey($var) - { - GPBUtil::checkString($var, True); - $this->manifest_key = $var; - - return $this; - } - - /** - * Output only. The output URI of the generated clip manifest. This field - * will be populated when the CreateClip request is accepted. Current output - * format is provided below but may change in the future. Please read this - * field to get the uri to the generated clip manifest. Format: - * {clip.output_uri}/{channel.manifest.fileName} Example: - * gs://my-bucket/clip-outputs/main.m3u8 - * - * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Output only. The output URI of the generated clip manifest. This field - * will be populated when the CreateClip request is accepted. Current output - * format is provided below but may change in the future. Please read this - * field to get the uri to the generated clip manifest. Format: - * {clip.output_uri}/{channel.manifest.fileName} Example: - * gs://my-bucket/clip-outputs/main.m3u8 - * - * Generated from protobuf field string output_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClipManifest::class, \Google\Cloud\Video\LiveStream\V1\Clip_ClipManifest::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php deleted file mode 100644 index 772ffb023629..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/Slice.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.video.livestream.v1.Clip.Slice - */ -class Slice extends \Google\Protobuf\Internal\Message -{ - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice $time_slice - * A slice in form of a tuple of Unix epoch time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A slice in form of a tuple of Unix epoch time. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.TimeSlice time_slice = 1; - * @return \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice|null - */ - public function getTimeSlice() - { - return $this->readOneof(1); - } - - public function hasTimeSlice() - { - return $this->hasOneof(1); - } - - /** - * A slice in form of a tuple of Unix epoch time. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip.TimeSlice time_slice = 1; - * @param \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice $var - * @return $this - */ - public function setTimeSlice($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Clip\TimeSlice::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Slice::class, \Google\Cloud\Video\LiveStream\V1\Clip_Slice::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php deleted file mode 100644 index 4fcadc9db8e8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/State.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.video.livestream.v1.Clip.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The operation is pending to be picked up by the server. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The server admitted this create clip request, and - * outputs are under processing. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Outputs are available in the specified Cloud Storage bucket. For - * additional information, see the `outputs` field. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The operation has failed. For additional information, see the `error` - * field. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::CREATING => 'CREATING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Clip_State::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php deleted file mode 100644 index ac88f0b4d794..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Clip/TimeSlice.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.video.livestream.v1.Clip.TimeSlice - */ -class TimeSlice extends \Google\Protobuf\Internal\Message -{ - /** - * The mark-in Unix epoch time in the original live stream manifest. - * - * Generated from protobuf field .google.protobuf.Timestamp markin_time = 1; - */ - protected $markin_time = null; - /** - * The mark-out Unix epoch time in the original live stream manifest. - * - * Generated from protobuf field .google.protobuf.Timestamp markout_time = 2; - */ - protected $markout_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $markin_time - * The mark-in Unix epoch time in the original live stream manifest. - * @type \Google\Protobuf\Timestamp $markout_time - * The mark-out Unix epoch time in the original live stream manifest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The mark-in Unix epoch time in the original live stream manifest. - * - * Generated from protobuf field .google.protobuf.Timestamp markin_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMarkinTime() - { - return $this->markin_time; - } - - public function hasMarkinTime() - { - return isset($this->markin_time); - } - - public function clearMarkinTime() - { - unset($this->markin_time); - } - - /** - * The mark-in Unix epoch time in the original live stream manifest. - * - * Generated from protobuf field .google.protobuf.Timestamp markin_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMarkinTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->markin_time = $var; - - return $this; - } - - /** - * The mark-out Unix epoch time in the original live stream manifest. - * - * Generated from protobuf field .google.protobuf.Timestamp markout_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMarkoutTime() - { - return $this->markout_time; - } - - public function hasMarkoutTime() - { - return isset($this->markout_time); - } - - public function clearMarkoutTime() - { - unset($this->markout_time); - } - - /** - * The mark-out Unix epoch time in the original live stream manifest. - * - * Generated from protobuf field .google.protobuf.Timestamp markout_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMarkoutTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->markout_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeSlice::class, \Google\Cloud\Video\LiveStream\V1\Clip_TimeSlice::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php deleted file mode 100644 index 101635a63526..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateAssetRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateAssetRequest - */ -class CreateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The asset resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Required. The ID of the asset resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string asset_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Asset $asset Required. The asset resource to be created. - * @param string $assetId Required. The ID of the asset resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateAssetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\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 location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type \Google\Cloud\Video\LiveStream\V1\Asset $asset - * Required. The asset resource to be created. - * @type string $asset_id - * Required. The ID of the asset resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `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. The parent location for the resource, in the form of: - * `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; - } - - /** - * Required. The asset resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\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 resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Required. The ID of the asset resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string asset_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * Required. The ID of the asset resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string asset_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php deleted file mode 100644 index 6945278c5aa1..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateChannelRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateChannelRequest - */ -class CreateChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The channel resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel = null; - /** - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be created. - * @param string $channelId Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateChannelRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\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. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel - * Required. The channel resource to be created. - * @type string $channel_id - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `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. The parent location for the resource, in the form of: - * `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; - } - - /** - * Required. The channel resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * Required. The channel resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getChannelId() - { - return $this->channel_id; - } - - /** - * Required. The ID of the channel resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string channel_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setChannelId($var) - { - GPBUtil::checkString($var, True); - $this->channel_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php deleted file mode 100644 index bb1d6b657ceb..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateClipRequest.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.video.livestream.v1.CreateClipRequest - */ -class CreateClipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object in the following form: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * Generated from protobuf field string clip_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $clip_id = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip clip = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $clip = 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. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Clip $clip Required. The resource being created - * @param string $clipId Required. Id of the requesting object in the following form: - * - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateClipRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Clip $clip, string $clipId): self - { - return (new self()) - ->setParent($parent) - ->setClip($clip) - ->setClipId($clipId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}`. - * @type string $clip_id - * Required. Id of the requesting object in the following form: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * @type \Google\Cloud\Video\LiveStream\V1\Clip $clip - * 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}`. - * - * 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 in the following form: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * Generated from protobuf field string clip_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClipId() - { - return $this->clip_id; - } - - /** - * Required. Id of the requesting object in the following form: - * 1. 1 character minimum, 63 characters maximum - * 2. Only contains letters, digits, underscores, and hyphens - * - * Generated from protobuf field string clip_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClipId($var) - { - GPBUtil::checkString($var, True); - $this->clip_id = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip clip = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Clip|null - */ - public function getClip() - { - return $this->clip; - } - - public function hasClip() - { - return isset($this->clip); - } - - public function clearClip() - { - unset($this->clip); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Clip clip = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Clip $var - * @return $this - */ - public function setClip($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Clip::class); - $this->clip = $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php deleted file mode 100644 index 821c7f956b9e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateEventRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateEventRequest - */ -class CreateEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The event resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - /** - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Event $event Required. The event resource to be created. - * @param string $eventId Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateEventRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\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. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type \Google\Cloud\Video\LiveStream\V1\Event $event - * Required. The event resource to be created. - * @type string $event_id - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 event resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Event|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The event resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Event $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event::class); - $this->event = $var; - - return $this; - } - - /** - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventId() - { - return $this->event_id; - } - - /** - * Required. The ID of the event resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string event_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventId($var) - { - GPBUtil::checkString($var, True); - $this->event_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php deleted file mode 100644 index 839b2d4d046e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/CreateInputRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.video.livestream.v1.CreateInputRequest - */ -class CreateInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The input resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input = null; - /** - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be created. - * @param string $inputId Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * @return \Google\Cloud\Video\LiveStream\V1\CreateInputRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\LiveStream\V1\Input $input, string $inputId): self - { - return (new self()) - ->setParent($parent) - ->setInput($input) - ->setInputId($inputId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type \Google\Cloud\Video\LiveStream\V1\Input $input - * Required. The input resource to be created. - * @type string $input_id - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `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. The parent location for the resource, in the form of: - * `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; - } - - /** - * Required. The input resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Input|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Required. The input resource to be created. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Input $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); - $this->input = $var; - - return $this; - } - - /** - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputId() - { - return $this->input_id; - } - - /** - * Required. The ID of the input resource to be created. - * This value must be 1-63 characters, begin and end with `[a-z0-9]`, - * could contain dashes (-) in between. - * - * Generated from protobuf field string input_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputId($var) - { - GPBUtil::checkString($var, True); - $this->input_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php deleted file mode 100644 index 6265ac92c35e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteAssetRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.DeleteAssetRequest - */ -class DeleteAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the asset resource, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the asset resource, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. Please see - * {@see LivestreamServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\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 resource, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the asset resource, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * 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 resource, in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php deleted file mode 100644 index e5ad476fe21d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteChannelRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.video.livestream.v1.DeleteChannelRequest - */ -class DeleteChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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; - */ - protected $request_id = ''; - /** - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * - * Generated from protobuf field bool force = 3; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\DeleteChannelRequest - * - * @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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * - * Generated from protobuf field bool force = 3; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If the `force` field is set to the default value of `false`, you must - * delete all of a channel's events before you can delete the channel itself. - * If the field is set to `true`, requests to delete a channel also delete - * associated channel events. - * - * Generated from protobuf field bool force = 3; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php deleted file mode 100644 index 51f4566069c1..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteClipRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.DeleteClipRequest - */ -class DeleteClipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the clip resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the clip resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. Please see - * {@see LivestreamServiceClient::clipName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\DeleteClipRequest - * - * @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 clip resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the clip resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - * - * 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 clip resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/clips/{clipId}`. - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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, (.google.api.field_info) = { - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php deleted file mode 100644 index 870470706fe4..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteEventRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.DeleteEventRequest - */ -class DeleteEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see - * {@see LivestreamServiceClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\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. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * 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 event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php deleted file mode 100644 index 457d3d144f65..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/DeleteInputRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.DeleteInputRequest - */ -class DeleteInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see - * {@see LivestreamServiceClient::inputName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\DeleteInputRequest - * - * @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 input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * 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 input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php deleted file mode 100644 index b5c05a4a2e52..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ElementaryStream.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.video.livestream.v1.ElementaryStream - */ -class ElementaryStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this elementary stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 4; - */ - protected $key = ''; - protected $elementary_stream; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this elementary stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * @type \Google\Cloud\Video\LiveStream\V1\VideoStream $video_stream - * Encoding of a video stream. - * @type \Google\Cloud\Video\LiveStream\V1\AudioStream $audio_stream - * Encoding of an audio stream. - * @type \Google\Cloud\Video\LiveStream\V1\TextStream $text_stream - * Encoding of a text stream. For example, closed captions or subtitles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this elementary stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this elementary stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; - * @return \Google\Cloud\Video\LiveStream\V1\VideoStream|null - */ - public function getVideoStream() - { - return $this->readOneof(1); - } - - public function hasVideoStream() - { - return $this->hasOneof(1); - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream video_stream = 1; - * @param \Google\Cloud\Video\LiveStream\V1\VideoStream $var - * @return $this - */ - public function setVideoStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; - * @return \Google\Cloud\Video\LiveStream\V1\AudioStream|null - */ - public function getAudioStream() - { - return $this->readOneof(2); - } - - public function hasAudioStream() - { - return $this->hasOneof(2); - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.AudioStream audio_stream = 2; - * @param \Google\Cloud\Video\LiveStream\V1\AudioStream $var - * @return $this - */ - public function setAudioStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\AudioStream::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; - * @return \Google\Cloud\Video\LiveStream\V1\TextStream|null - */ - public function getTextStream() - { - return $this->readOneof(3); - } - - public function hasTextStream() - { - return $this->hasOneof(3); - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TextStream text_stream = 3; - * @param \Google\Cloud\Video\LiveStream\V1\TextStream $var - * @return $this - */ - public function setTextStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\TextStream::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getElementaryStream() - { - return $this->whichOneof("elementary_stream"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php deleted file mode 100644 index dd8f1862eecf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.video.livestream.v1.Encryption - */ -class Encryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier for this set of encryption options. The ID must be - * 1-63 characters in length. The ID must begin and end with a letter - * (regardless of case) or a number, but can contain dashes or underscores in - * between. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Required. Configuration for DRM systems. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $drm_systems = null; - protected $secret_source; - protected $encryption_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Identifier for this set of encryption options. The ID must be - * 1-63 characters in length. The ID must begin and end with a letter - * (regardless of case) or a number, but can contain dashes or underscores in - * between. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $secret_manager_key_source - * For keys stored in Google Secret Manager. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $drm_systems - * Required. Configuration for DRM systems. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $aes128 - * Configuration for HLS AES-128 encryption. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $sample_aes - * Configuration for HLS SAMPLE-AES encryption. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $mpeg_cenc - * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier for this set of encryption options. The ID must be - * 1-63 characters in length. The ID must begin and end with a letter - * (regardless of case) or a number, but can contain dashes or underscores in - * between. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Identifier for this set of encryption options. The ID must be - * 1-63 characters in length. The ID must begin and end with a letter - * (regardless of case) or a number, but can contain dashes or underscores in - * between. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * For keys stored in Google Secret Manager. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource|null - */ - public function getSecretManagerKeySource() - { - return $this->readOneof(7); - } - - public function hasSecretManagerKeySource() - { - return $this->hasOneof(7); - } - - /** - * For keys stored in Google Secret Manager. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource $var - * @return $this - */ - public function setSecretManagerKeySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SecretManagerSource::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Required. Configuration for DRM systems. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems|null - */ - public function getDrmSystems() - { - return $this->drm_systems; - } - - public function hasDrmSystems() - { - return isset($this->drm_systems); - } - - public function clearDrmSystems() - { - unset($this->drm_systems); - } - - /** - * Required. Configuration for DRM systems. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.DrmSystems drm_systems = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems $var - * @return $this - */ - public function setDrmSystems($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\DrmSystems::class); - $this->drm_systems = $var; - - return $this; - } - - /** - * Configuration for HLS AES-128 encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption|null - */ - public function getAes128() - { - return $this->readOneof(4); - } - - public function hasAes128() - { - return $this->hasOneof(4); - } - - /** - * Configuration for HLS AES-128 encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Aes128Encryption aes128 = 4; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption $var - * @return $this - */ - public function setAes128($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Aes128Encryption::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Configuration for HLS SAMPLE-AES encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption|null - */ - public function getSampleAes() - { - return $this->readOneof(5); - } - - public function hasSampleAes() - { - return $this->hasOneof(5); - } - - /** - * Configuration for HLS SAMPLE-AES encryption. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.SampleAesEncryption sample_aes = 5; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption $var - * @return $this - */ - public function setSampleAes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\SampleAesEncryption::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption|null - */ - public function getMpegCenc() - { - return $this->readOneof(6); - } - - public function hasMpegCenc() - { - return $this->hasOneof(6); - } - - /** - * Configuration for MPEG-Dash Common Encryption (MPEG-CENC). - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption mpeg_cenc = 6; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption $var - * @return $this - */ - public function setMpegCenc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\MpegCommonEncryption::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getSecretSource() - { - return $this->whichOneof("secret_source"); - } - - /** - * @return string - */ - public function getEncryptionMode() - { - return $this->whichOneof("encryption_mode"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php deleted file mode 100644 index 1903c805f7fb..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Aes128Encryption.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Aes128Encryption - */ -class Aes128Encryption extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aes128Encryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Aes128Encryption::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php deleted file mode 100644 index cf2a3c4ff2de..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Clearkey.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Clearkey - */ -class Clearkey extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Clearkey::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Clearkey::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php deleted file mode 100644 index c0123be1577a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/DrmSystems.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.DrmSystems - */ -class DrmSystems extends \Google\Protobuf\Internal\Message -{ - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; - */ - protected $widevine = null; - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; - */ - protected $fairplay = null; - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; - */ - protected $playready = null; - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; - */ - protected $clearkey = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $widevine - * Widevine configuration. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $fairplay - * Fairplay configuration. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $playready - * Playready configuration. - * @type \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $clearkey - * Clearkey configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine|null - */ - public function getWidevine() - { - return $this->widevine; - } - - public function hasWidevine() - { - return isset($this->widevine); - } - - public function clearWidevine() - { - unset($this->widevine); - } - - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Widevine widevine = 1; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine $var - * @return $this - */ - public function setWidevine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Widevine::class); - $this->widevine = $var; - - return $this; - } - - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay|null - */ - public function getFairplay() - { - return $this->fairplay; - } - - public function hasFairplay() - { - return isset($this->fairplay); - } - - public function clearFairplay() - { - unset($this->fairplay); - } - - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Fairplay fairplay = 2; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay $var - * @return $this - */ - public function setFairplay($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Fairplay::class); - $this->fairplay = $var; - - return $this; - } - - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Playready|null - */ - public function getPlayready() - { - return $this->playready; - } - - public function hasPlayready() - { - return isset($this->playready); - } - - public function clearPlayready() - { - unset($this->playready); - } - - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Playready playready = 3; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Playready $var - * @return $this - */ - public function setPlayready($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Playready::class); - $this->playready = $var; - - return $this; - } - - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; - * @return \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey|null - */ - public function getClearkey() - { - return $this->clearkey; - } - - public function hasClearkey() - { - return isset($this->clearkey); - } - - public function clearClearkey() - { - unset($this->clearkey); - } - - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Encryption.Clearkey clearkey = 4; - * @param \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey $var - * @return $this - */ - public function setClearkey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Encryption\Clearkey::class); - $this->clearkey = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DrmSystems::class, \Google\Cloud\Video\LiveStream\V1\Encryption_DrmSystems::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php deleted file mode 100644 index dc53b5d3a7d9..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Fairplay.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Fairplay - */ -class Fairplay extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Fairplay::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Fairplay::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php deleted file mode 100644 index 828acd25e267..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/MpegCommonEncryption.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.MpegCommonEncryption - */ -class MpegCommonEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * - * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scheme = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scheme - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * - * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Required. Specify the encryption scheme, supported schemes: - * - `cenc` - AES-CTR subsample - * - `cbcs`- AES-CBC subsample pattern - * - * Generated from protobuf field string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScheme($var) - { - GPBUtil::checkString($var, True); - $this->scheme = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MpegCommonEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_MpegCommonEncryption::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php deleted file mode 100644 index a1296c0e2581..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Playready.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Playready - */ -class Playready extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Playready::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Playready::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php deleted file mode 100644 index 566b81c20da9..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SampleAesEncryption.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.SampleAesEncryption - */ -class SampleAesEncryption extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SampleAesEncryption::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SampleAesEncryption::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php deleted file mode 100644 index 0cd575268442..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/SecretManagerSource.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.SecretManagerSource - */ -class SecretManagerSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $secret_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret_version - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSecretVersion() - { - return $this->secret_version; - } - - /** - * Required. The name of the Secret Version containing the encryption key. - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecretVersion($var) - { - GPBUtil::checkString($var, True); - $this->secret_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretManagerSource::class, \Google\Cloud\Video\LiveStream\V1\Encryption_SecretManagerSource::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php deleted file mode 100644 index a14e8b2be44b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Encryption/Widevine.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Encryption.Widevine - */ -class Widevine extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Widevine::class, \Google\Cloud\Video\LiveStream\V1\Encryption_Widevine::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php deleted file mode 100644 index bfd03c15ae6e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event.php +++ /dev/null @@ -1,601 +0,0 @@ -google.cloud.video.livestream.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * - * Generated from protobuf field bool execute_now = 9; - */ - protected $execute_now = false; - /** - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; - */ - protected $execution_time = null; - /** - * Output only. The state of the event. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - protected $task; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $input_switch - * Switches to another input stream. - * @type \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $ad_break - * Inserts a new ad opportunity. - * @type \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $return_to_program - * Stops any running ad break. - * @type \Google\Cloud\Video\LiveStream\V1\Event\SlateTask $slate - * Inserts a slate. - * @type \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $mute - * Mutes the stream. - * @type \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $unmute - * Unmutes the stream. - * @type bool $execute_now - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * @type \Google\Protobuf\Timestamp $execution_time - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * @type int $state - * Output only. The state of the event. - * @type \Google\Rpc\Status $error - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the event, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * 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 creation time. - * - * 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 creation time. - * - * 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 time. - * - * 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 time. - * - * 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; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * 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; - } - - /** - * Switches to another input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5; - * @return \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask|null - */ - public function getInputSwitch() - { - return $this->readOneof(5); - } - - public function hasInputSwitch() - { - return $this->hasOneof(5); - } - - /** - * Switches to another input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.InputSwitchTask input_switch = 5; - * @param \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask $var - * @return $this - */ - public function setInputSwitch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\InputSwitchTask::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Inserts a new ad opportunity. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6; - * @return \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask|null - */ - public function getAdBreak() - { - return $this->readOneof(6); - } - - public function hasAdBreak() - { - return $this->hasOneof(6); - } - - /** - * Inserts a new ad opportunity. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.AdBreakTask ad_break = 6; - * @param \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask $var - * @return $this - */ - public function setAdBreak($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\AdBreakTask::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Stops any running ad break. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13; - * @return \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask|null - */ - public function getReturnToProgram() - { - return $this->readOneof(13); - } - - public function hasReturnToProgram() - { - return $this->hasOneof(13); - } - - /** - * Stops any running ad break. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.ReturnToProgramTask return_to_program = 13; - * @param \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask $var - * @return $this - */ - public function setReturnToProgram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\ReturnToProgramTask::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Inserts a slate. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.SlateTask slate = 14; - * @return \Google\Cloud\Video\LiveStream\V1\Event\SlateTask|null - */ - public function getSlate() - { - return $this->readOneof(14); - } - - public function hasSlate() - { - return $this->hasOneof(14); - } - - /** - * Inserts a slate. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.SlateTask slate = 14; - * @param \Google\Cloud\Video\LiveStream\V1\Event\SlateTask $var - * @return $this - */ - public function setSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\SlateTask::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Mutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15; - * @return \Google\Cloud\Video\LiveStream\V1\Event\MuteTask|null - */ - public function getMute() - { - return $this->readOneof(15); - } - - public function hasMute() - { - return $this->hasOneof(15); - } - - /** - * Mutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.MuteTask mute = 15; - * @param \Google\Cloud\Video\LiveStream\V1\Event\MuteTask $var - * @return $this - */ - public function setMute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\MuteTask::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Unmutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16; - * @return \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask|null - */ - public function getUnmute() - { - return $this->readOneof(16); - } - - public function hasUnmute() - { - return $this->hasOneof(16); - } - - /** - * Unmutes the stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.UnmuteTask unmute = 16; - * @param \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask $var - * @return $this - */ - public function setUnmute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Event\UnmuteTask::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * - * Generated from protobuf field bool execute_now = 9; - * @return bool - */ - public function getExecuteNow() - { - return $this->execute_now; - } - - /** - * When this field is set to true, the event will be executed at the earliest - * time that the server can schedule the event and - * [execution_time][google.cloud.video.livestream.v1.Event.execution_time] - * will be populated with the time that the server actually schedules the - * event. - * - * Generated from protobuf field bool execute_now = 9; - * @param bool $var - * @return $this - */ - public function setExecuteNow($var) - { - GPBUtil::checkBool($var); - $this->execute_now = $var; - - return $this; - } - - /** - * The time to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; - * @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 to execute the event. If you set - * [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `true`, then do not set this field in the `CreateEvent` request. In - * this case, the server schedules the event and populates this field. If you - * set [execute_now][google.cloud.video.livestream.v1.Event.execute_now] to - * `false`, then you must set this field to at least 10 seconds in the future - * or else the event can't be created. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExecutionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->execution_time = $var; - - return $this; - } - - /** - * Output only. The state of the event. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the event. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Event.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Event\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * @return string - */ - public function getTask() - { - return $this->whichOneof("task"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php deleted file mode 100644 index 31d381b2eedf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/AdBreakTask.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.video.livestream.v1.Event.AdBreakTask - */ -class AdBreakTask extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of an ad opportunity. Must be greater than 0. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration of an ad opportunity. Must be greater than 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Duration of an ad opportunity. Must be greater than 0. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @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 an ad opportunity. Must be greater than 0. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AdBreakTask::class, \Google\Cloud\Video\LiveStream\V1\Event_AdBreakTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php deleted file mode 100644 index bae050a14d8b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/InputSwitchTask.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.video.livestream.v1.Event.InputSwitchTask - */ -class InputSwitchTask extends \Google\Protobuf\Internal\Message -{ - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * - * Generated from protobuf field string input_key = 1; - */ - protected $input_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_key - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * - * Generated from protobuf field string input_key = 1; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key] - * of the input to switch to. - * - * Generated from protobuf field string input_key = 1; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InputSwitchTask::class, \Google\Cloud\Video\LiveStream\V1\Event_InputSwitchTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php deleted file mode 100644 index f080a8603fb6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/MuteTask.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.video.livestream.v1.Event.MuteTask - */ -class MuteTask extends \Google\Protobuf\Internal\Message -{ - /** - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Duration for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @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 for which the stream should be muted. If omitted, the stream - * will be muted until an UnmuteTask event is sent. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_MuteTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php deleted file mode 100644 index f544f6fa571e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/ReturnToProgramTask.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.video.livestream.v1.Event.ReturnToProgramTask - */ -class ReturnToProgramTask extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReturnToProgramTask::class, \Google\Cloud\Video\LiveStream\V1\Event_ReturnToProgramTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php deleted file mode 100644 index 5338379a6c45..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/SlateTask.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.video.livestream.v1.Event.SlateTask - */ -class SlateTask extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Duration of the slate. Must be greater than 0 if specified. - * Omit this field for a long running slate. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - /** - * Slate asset to use for the duration. If its duration is less than the - * duration of the SlateTask, then the slate loops. The slate must be - * represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { - */ - protected $asset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Optional. Duration of the slate. Must be greater than 0 if specified. - * Omit this field for a long running slate. - * @type string $asset - * Slate asset to use for the duration. If its duration is less than the - * duration of the SlateTask, then the slate loops. The slate must be - * represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Duration of the slate. Must be greater than 0 if specified. - * Omit this field for a long running slate. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Optional. Duration of the slate. Must be greater than 0 if specified. - * Omit this field for a long running slate. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Slate asset to use for the duration. If its duration is less than the - * duration of the SlateTask, then the slate loops. The slate must be - * represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Slate asset to use for the duration. If its duration is less than the - * duration of the SlateTask, then the slate loops. The slate must be - * represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * - * 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->asset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SlateTask::class, \Google\Cloud\Video\LiveStream\V1\Event_SlateTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php deleted file mode 100644 index fd2043aa0168..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.video.livestream.v1.Event.State - */ -class State -{ - /** - * Event state is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Event is scheduled but not executed yet. - * - * Generated from protobuf enum SCHEDULED = 1; - */ - const SCHEDULED = 1; - /** - * Event is being executed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * Event has been successfully executed. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * Event fails to be executed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * Event has been created but not scheduled yet. - * - * Generated from protobuf enum PENDING = 5; - */ - const PENDING = 5; - /** - * Event was stopped before running for its full duration. - * - * Generated from protobuf enum STOPPED = 6; - */ - const STOPPED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::SCHEDULED => 'SCHEDULED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::PENDING => 'PENDING', - self::STOPPED => 'STOPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\LiveStream\V1\Event_State::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php deleted file mode 100644 index e1994b1a8638..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Event/UnmuteTask.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.livestream.v1.Event.UnmuteTask - */ -class UnmuteTask extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnmuteTask::class, \Google\Cloud\Video\LiveStream\V1\Event_UnmuteTask::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php deleted file mode 100644 index 9077122dea4c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetAssetRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetAssetRequest - */ -class GetAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource, in the following form: - * `projects/{project}/locations/{location}/assets/{asset}`. - * - * 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, in the following form: - * `projects/{project}/locations/{location}/assets/{asset}`. Please see - * {@see LivestreamServiceClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\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. Name of the resource, in the following form: - * `projects/{project}/locations/{location}/assets/{asset}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource, in the following form: - * `projects/{project}/locations/{location}/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. Name of the resource, in the following form: - * `projects/{project}/locations/{location}/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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php deleted file mode 100644 index 2050793dd1f3..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetChannelRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetChannelRequest - */ -class GetChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetChannelRequest - * - * @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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php deleted file mode 100644 index 196bd5fc919d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetClipRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetClipRequest - */ -class GetClipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - * - * 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, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. Please see - * {@see LivestreamServiceClient::clipName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetClipRequest - * - * @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, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - * - * 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, in the following form: - * `projects/{project}/locations/{location}/channels/{channel}/clips/{clip}`. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php deleted file mode 100644 index cc2a65775439..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetEventRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetEventRequest - */ -class GetEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * 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 event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. Please see - * {@see LivestreamServiceClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\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. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * 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 event resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}/events/{eventId}`. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php deleted file mode 100644 index da3712d40ecf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetInputRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetInputRequest - */ -class GetInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * 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 input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. Please see - * {@see LivestreamServiceClient::inputName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetInputRequest - * - * @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 input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * 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 input resource, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php deleted file mode 100644 index 413d850b4b53..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/GetPoolRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.livestream.v1.GetPoolRequest - */ -class GetPoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the pool resource, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * - * 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 pool resource, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. Please see - * {@see LivestreamServiceClient::poolName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\GetPoolRequest - * - * @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 pool resource, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the pool resource, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * - * 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 pool resource, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php deleted file mode 100644 index 804f7b0d808c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input.php +++ /dev/null @@ -1,460 +0,0 @@ -google.cloud.video.livestream.v1.Input - */ -class Input extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Source type. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; - */ - protected $type = 0; - /** - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; - */ - protected $tier = 0; - /** - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * - * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; - */ - protected $preprocessing_config = null; - /** - * Security rule for access control. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; - */ - protected $security_rules = null; - /** - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $input_stream_property = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type int $type - * Source type. - * @type int $tier - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * @type string $uri - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $preprocessing_config - * Preprocessing configurations. - * @type \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $security_rules - * Security rule for access control. - * @type \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $input_stream_property - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * 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 creation time. - * - * 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 creation time. - * - * 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 time. - * - * 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 time. - * - * 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; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * 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; - } - - /** - * Source type. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Source type. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Type type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; - * @return int - */ - public function getTier() - { - return $this->tier; - } - - /** - * Tier defines the maximum input specification that is accepted by the - * video pipeline. The billing is charged based on the tier specified here. - * See [Pricing](https://cloud.google.com/livestream/pricing) for more detail. - * The default is `HD`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.Tier tier = 14; - * @param int $var - * @return $this - */ - public function setTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Input\Tier::class); - $this->tier = $var; - - return $this; - } - - /** - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * - * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. URI to push the input stream to. - * Its format depends on the input - * [type][google.cloud.video.livestream.v1.Input.type], for example: - * * `RTMP_PUSH`: `rtmp://1.2.3.4/live/{STREAM-ID}` - * * `SRT_PUSH`: `srt://1.2.3.4:4201?streamid={STREAM-ID}` - * - * Generated from protobuf field string uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig|null - */ - public function getPreprocessingConfig() - { - return $this->preprocessing_config; - } - - public function hasPreprocessingConfig() - { - return isset($this->preprocessing_config); - } - - public function clearPreprocessingConfig() - { - unset($this->preprocessing_config); - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig preprocessing_config = 9; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig $var - * @return $this - */ - public function setPreprocessingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig::class); - $this->preprocessing_config = $var; - - return $this; - } - - /** - * Security rule for access control. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; - * @return \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule|null - */ - public function getSecurityRules() - { - return $this->security_rules; - } - - public function hasSecurityRules() - { - return isset($this->security_rules); - } - - public function clearSecurityRules() - { - unset($this->security_rules); - } - - /** - * Security rule for access control. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input.SecurityRule security_rules = 12; - * @param \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule $var - * @return $this - */ - public function setSecurityRules($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input\SecurityRule::class); - $this->security_rules = $var; - - return $this; - } - - /** - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Video\LiveStream\V1\InputStreamProperty|null - */ - public function getInputStreamProperty() - { - return $this->input_stream_property; - } - - public function hasInputStreamProperty() - { - return isset($this->input_stream_property); - } - - public function clearInputStreamProperty() - { - unset($this->input_stream_property); - } - - /** - * Output only. The information for the input stream. This field will be - * present only when this input receives the input stream. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputStreamProperty input_stream_property = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Video\LiveStream\V1\InputStreamProperty $var - * @return $this - */ - public function setInputStreamProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputStreamProperty::class); - $this->input_stream_property = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php deleted file mode 100644 index c5c7244181e5..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/SecurityRule.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.video.livestream.v1.Input.SecurityRule - */ -class SecurityRule extends \Google\Protobuf\Internal\Message -{ - /** - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * - * Generated from protobuf field repeated string ip_ranges = 1; - */ - private $ip_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_ranges - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpRanges() - { - return $this->ip_ranges; - } - - /** - * At least one ip range must match unless none specified. The IP range is - * defined by CIDR block: for example, `192.0.1.0/24` for a range and - * `192.0.1.0/32` for a single IP address. - * - * Generated from protobuf field repeated string ip_ranges = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_ranges = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecurityRule::class, \Google\Cloud\Video\LiveStream\V1\Input_SecurityRule::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php deleted file mode 100644 index e1cc73c68de0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Tier.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.livestream.v1.Input.Tier - */ -class Tier -{ - /** - * Tier is not specified. - * - * Generated from protobuf enum TIER_UNSPECIFIED = 0; - */ - const TIER_UNSPECIFIED = 0; - /** - * Resolution < 1280x720. Bitrate <= 6 Mbps. FPS <= 60. - * - * Generated from protobuf enum SD = 1; - */ - const SD = 1; - /** - * Resolution <= 1920x1080. Bitrate <= 25 Mbps. FPS <= 60. - * - * Generated from protobuf enum HD = 2; - */ - const HD = 2; - /** - * Resolution <= 4096x2160. Not supported yet. - * - * Generated from protobuf enum UHD = 3; - */ - const UHD = 3; - - private static $valueToName = [ - self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', - self::SD => 'SD', - self::HD => 'HD', - self::UHD => 'UHD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tier::class, \Google\Cloud\Video\LiveStream\V1\Input_Tier::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php deleted file mode 100644 index 2008bef32975..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Input/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.livestream.v1.Input.Type - */ -class Type -{ - /** - * Input type is not specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Input will take an rtmp input stream. - * - * Generated from protobuf enum RTMP_PUSH = 1; - */ - const RTMP_PUSH = 1; - /** - * Input will take an srt (Secure Reliable Transport) input stream. - * - * Generated from protobuf enum SRT_PUSH = 2; - */ - const SRT_PUSH = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::RTMP_PUSH => 'RTMP_PUSH', - self::SRT_PUSH => 'SRT_PUSH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Video\LiveStream\V1\Input_Type::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php deleted file mode 100644 index 51845017da34..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.video.livestream.v1.InputAttachment - */ -class InputAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this input attachment. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { - */ - protected $input = ''; - /** - * Automatic failover configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; - */ - protected $automatic_failover = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this input attachment. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * @type string $input - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * @type \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $automatic_failover - * Automatic failover configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this input attachment. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this input attachment. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getInput() - { - return $this->input; - } - - /** - * The resource name of an existing input, in the form of: - * `projects/{project}/locations/{location}/inputs/{inputId}`. - * - * Generated from protobuf field string input = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkString($var, True); - $this->input = $var; - - return $this; - } - - /** - * Automatic failover configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; - * @return \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover|null - */ - public function getAutomaticFailover() - { - return $this->automatic_failover; - } - - public function hasAutomaticFailover() - { - return isset($this->automatic_failover); - } - - public function clearAutomaticFailover() - { - unset($this->automatic_failover); - } - - /** - * Automatic failover configurations. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover automatic_failover = 3; - * @param \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover $var - * @return $this - */ - public function setAutomaticFailover($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\InputAttachment\AutomaticFailover::class); - $this->automatic_failover = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php deleted file mode 100644 index d9ae8181935d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputAttachment/AutomaticFailover.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover - */ -class AutomaticFailover extends \Google\Protobuf\Internal\Message -{ - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * - * Generated from protobuf field repeated string input_keys = 1; - */ - private $input_keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $input_keys - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * - * Generated from protobuf field repeated string input_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputKeys() - { - return $this->input_keys; - } - - /** - * The - * [InputAttachment.key][google.cloud.video.livestream.v1.InputAttachment.key]s - * of inputs to failover to when this input is disconnected. Currently, only - * up to one backup input is supported. - * - * Generated from protobuf field repeated string input_keys = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_keys = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AutomaticFailover::class, \Google\Cloud\Video\LiveStream\V1\InputAttachment_AutomaticFailover::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php deleted file mode 100644 index fc6b529049d0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.livestream.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; - */ - protected $input_switch_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $input_switch_mode - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; - * @return int - */ - public function getInputSwitchMode() - { - return $this->input_switch_mode; - } - - /** - * Input switch mode. Default mode is `FAILOVER_PREFER_PRIMARY`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.InputConfig.InputSwitchMode input_switch_mode = 1; - * @param int $var - * @return $this - */ - public function setInputSwitchMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\InputConfig\InputSwitchMode::class); - $this->input_switch_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php deleted file mode 100644 index 0a991af82491..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputConfig/InputSwitchMode.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.video.livestream.v1.InputConfig.InputSwitchMode - */ -class InputSwitchMode -{ - /** - * The input switch mode is not specified. - * - * Generated from protobuf enum INPUT_SWITCH_MODE_UNSPECIFIED = 0; - */ - const INPUT_SWITCH_MODE_UNSPECIFIED = 0; - /** - * Automatic failover is enabled. The primary input stream is always - * preferred over its backup input streams configured using the - * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] - * field. - * - * Generated from protobuf enum FAILOVER_PREFER_PRIMARY = 1; - */ - const FAILOVER_PREFER_PRIMARY = 1; - /** - * Automatic failover is disabled. You must use the - * [inputSwitch][google.cloud.video.livestream.v1.Event.input_switch] event - * to switch the active input source for the channel to stream from. When - * this mode is chosen, the - * [AutomaticFailover][google.cloud.video.livestream.v1.InputAttachment.AutomaticFailover] - * field is ignored. - * - * Generated from protobuf enum MANUAL = 3; - */ - const MANUAL = 3; - - private static $valueToName = [ - self::INPUT_SWITCH_MODE_UNSPECIFIED => 'INPUT_SWITCH_MODE_UNSPECIFIED', - self::FAILOVER_PREFER_PRIMARY => 'FAILOVER_PREFER_PRIMARY', - self::MANUAL => 'MANUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InputSwitchMode::class, \Google\Cloud\Video\LiveStream\V1\InputConfig_InputSwitchMode::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php deleted file mode 100644 index 42b27a630665..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/InputStreamProperty.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.video.livestream.v1.InputStreamProperty - */ -class InputStreamProperty extends \Google\Protobuf\Internal\Message -{ - /** - * The time that the current input stream is accepted and the connection is - * established. - * - * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; - */ - protected $last_establish_time = null; - /** - * Properties of the video streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; - */ - private $video_streams; - /** - * Properties of the audio streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; - */ - private $audio_streams; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $last_establish_time - * The time that the current input stream is accepted and the connection is - * established. - * @type array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $video_streams - * Properties of the video streams. - * @type array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $audio_streams - * Properties of the audio streams. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The time that the current input stream is accepted and the connection is - * established. - * - * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastEstablishTime() - { - return $this->last_establish_time; - } - - public function hasLastEstablishTime() - { - return isset($this->last_establish_time); - } - - public function clearLastEstablishTime() - { - unset($this->last_establish_time); - } - - /** - * The time that the current input stream is accepted and the connection is - * established. - * - * Generated from protobuf field .google.protobuf.Timestamp last_establish_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastEstablishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_establish_time = $var; - - return $this; - } - - /** - * Properties of the video streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVideoStreams() - { - return $this->video_streams; - } - - /** - * Properties of the video streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.VideoStreamProperty video_streams = 2; - * @param array<\Google\Cloud\Video\LiveStream\V1\VideoStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVideoStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\VideoStreamProperty::class); - $this->video_streams = $arr; - - return $this; - } - - /** - * Properties of the audio streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAudioStreams() - { - return $this->audio_streams; - } - - /** - * Properties of the audio streams. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.AudioStreamProperty audio_streams = 3; - * @param array<\Google\Cloud\Video\LiveStream\V1\AudioStreamProperty>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAudioStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\AudioStreamProperty::class); - $this->audio_streams = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php deleted file mode 100644 index ed3d44e9986b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.video.livestream.v1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * 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. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\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 location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `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. The parent location for the resource, in the form of: - * `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; - } - - /** - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php deleted file mode 100644 index ec154d7bbafc..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListAssetsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.livestream.v1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Assets - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Asset assets = 1; - */ - private $assets; - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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 array<\Google\Cloud\Video\LiveStream\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets - * The list of Assets - * @type string $next_page_token - * The next_page_token value returned from a previous List request, if any. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of Assets - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Asset assets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssets() - { - return $this->assets; - } - - /** - * The list of Assets - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Asset assets = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Asset::class); - $this->assets = $arr; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php deleted file mode 100644 index 2dbfdfd1b10c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.livestream.v1.ListChannelsRequest - */ -class ListChannelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\ListChannelsRequest - * - * @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 location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * The filter to apply to list results. - * @type string $order_by - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `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. The parent location for the resource, in the form of: - * `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; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListChannelsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * 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 next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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 to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list 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; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php deleted file mode 100644 index c535a18d3457..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListChannelsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.video.livestream.v1.ListChannelsResponse - */ -class ListChannelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; - */ - private $channels; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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 array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $channels - * A list of channels. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannels() - { - return $this->channels; - } - - /** - * A list of channels. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Channel channels = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Channel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Channel::class); - $this->channels = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php deleted file mode 100644 index a6584a676cd5..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.video.livestream.v1.ListClipsRequest - */ -class ListClipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListClipsRequest - * - * 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 ListClipsRequest - * Please see {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\ListClipsRequest - * - * @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 ListClipsRequest - * @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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListClipsRequest - * - * 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 ListClipsRequest - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php deleted file mode 100644 index ec817a73deef..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListClipsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.livestream.v1.ListClipsResponse - */ -class ListClipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Clip - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip clips = 1; - */ - private $clips; - /** - * 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 array<\Google\Cloud\Video\LiveStream\V1\Clip>|\Google\Protobuf\Internal\RepeatedField $clips - * The list of Clip - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The list of Clip - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip clips = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClips() - { - return $this->clips; - } - - /** - * The list of Clip - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Clip clips = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Clip>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClips($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Clip::class); - $this->clips = $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php deleted file mode 100644 index 2e459d167a5c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.livestream.v1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\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. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type int $page_size - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * The filter to apply to list results. - * @type string $order_by - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel for the resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListEventsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * 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 next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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 to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list 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; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the ordering of results following syntax at - * https://cloud.google.com/apis/design/design_patterns#sorting_order. - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php deleted file mode 100644 index 9c30220fcb35..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListEventsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.video.livestream.v1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of events. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; - */ - private $events; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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 array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * A list of events. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of events. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * A list of events. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Event events = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php deleted file mode 100644 index 95a3d958d8f5..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.livestream.v1.ListInputsRequest - */ -class ListInputsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location for the resource, in the form of: - * `projects/{project}/locations/{location}`. Please see - * {@see LivestreamServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\ListInputsRequest - * - * @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 location for the resource, in the form of: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * The filter to apply to list results. - * @type string $order_by - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location for the resource, in the form of: - * `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. The parent location for the resource, in the form of: - * `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; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. If unspecified, server - * will pick an appropriate default. Server may return fewer items than - * requested. A caller should only rely on response's - * [next_page_token][google.cloud.video.livestream.v1.ListInputsResponse.next_page_token] - * to determine if there are more items left to be queried. - * - * 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 next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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 to apply to list results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list 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; - } - - /** - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Specifies the ordering of results following syntax at [Sorting - * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * 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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php deleted file mode 100644 index a996747b4e20..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/ListInputsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.video.livestream.v1.ListInputsResponse - */ -class ListInputsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of inputs. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; - */ - private $inputs; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * 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 array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs - * A list of inputs. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of inputs. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * A list of inputs. - * - * Generated from protobuf field repeated .google.cloud.video.livestream.v1.Input inputs = 1; - * @param array<\Google\Cloud\Video\LiveStream\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\LiveStream\V1\Input::class); - $this->inputs = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php deleted file mode 100644 index 24c7138b5826..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.video.livestream.v1.LogConfig - */ -class LogConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The severity level of platform logging for this resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; - */ - protected $log_severity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $log_severity - * The severity level of platform logging for this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The severity level of platform logging for this resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; - * @return int - */ - public function getLogSeverity() - { - return $this->log_severity; - } - - /** - * The severity level of platform logging for this resource. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.LogConfig.LogSeverity log_severity = 1; - * @param int $var - * @return $this - */ - public function setLogSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\LogConfig\LogSeverity::class); - $this->log_severity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php deleted file mode 100644 index f8a3b5c54235..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/LogConfig/LogSeverity.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.video.livestream.v1.LogConfig.LogSeverity - */ -class LogSeverity -{ - /** - * Log severity is not specified. This is the same as log severity is OFF. - * - * Generated from protobuf enum LOG_SEVERITY_UNSPECIFIED = 0; - */ - const LOG_SEVERITY_UNSPECIFIED = 0; - /** - * Log is turned off. - * - * Generated from protobuf enum OFF = 1; - */ - const OFF = 1; - /** - * Log with severity higher than or equal to DEBUG are logged. - * - * Generated from protobuf enum DEBUG = 100; - */ - const DEBUG = 100; - /** - * Logs with severity higher than or equal to INFO are logged. - * - * Generated from protobuf enum INFO = 200; - */ - const INFO = 200; - /** - * Logs with severity higher than or equal to WARNING are logged. - * - * Generated from protobuf enum WARNING = 400; - */ - const WARNING = 400; - /** - * Logs with severity higher than or equal to ERROR are logged. - * - * Generated from protobuf enum ERROR = 500; - */ - const ERROR = 500; - - private static $valueToName = [ - self::LOG_SEVERITY_UNSPECIFIED => 'LOG_SEVERITY_UNSPECIFIED', - self::OFF => 'OFF', - self::DEBUG => 'DEBUG', - self::INFO => 'INFO', - self::WARNING => 'WARNING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogSeverity::class, \Google\Cloud\Video\LiveStream\V1\LogConfig_LogSeverity::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php deleted file mode 100644 index 80243c16f9e8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest.php +++ /dev/null @@ -1,381 +0,0 @@ -google.cloud.video.livestream.v1.Manifest - */ -class Manifest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * - * Generated from protobuf field string file_name = 1; - */ - protected $file_name = ''; - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mux_streams; - /** - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * - * Generated from protobuf field int32 max_segment_count = 4; - */ - protected $max_segment_count = 0; - /** - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * If both segment_keep_duration and - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * are set, - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * is used and segment_keep_duration is ignored. - * - * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; - */ - protected $segment_keep_duration = null; - /** - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * - * Generated from protobuf field bool use_timecode_as_timeline = 6; - */ - protected $use_timecode_as_timeline = false; - /** - * Optional. A unique key for this manifest. - * - * Generated from protobuf field string key = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_name - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * @type int $type - * Required. Type of the manifest, can be `HLS` or `DASH`. - * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * @type int $max_segment_count - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * @type \Google\Protobuf\Duration $segment_keep_duration - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * If both segment_keep_duration and - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * are set, - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * is used and segment_keep_duration is ignored. - * @type bool $use_timecode_as_timeline - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * @type string $key - * Optional. A unique key for this manifest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * - * Generated from protobuf field string file_name = 1; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest` - * [type][google.cloud.video.livestream.v1.Manifest.type]. If multiple - * manifests are added to the channel, each must have a unique file name. - * - * Generated from protobuf field string file_name = 1; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of the manifest, can be `HLS` or `DASH`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\Manifest\ManifestType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * Required. List of `MuxStream` - * [key][google.cloud.video.livestream.v1.MuxStream.key]s that should appear - * in this manifest. - * - For HLS, either `fmp4` or `ts` mux streams can be specified but not - * mixed. - * - For DASH, only `fmp4` mux streams can be specified. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mux_streams = $arr; - - return $this; - } - - /** - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * - * Generated from protobuf field int32 max_segment_count = 4; - * @return int - */ - public function getMaxSegmentCount() - { - return $this->max_segment_count; - } - - /** - * Maximum number of segments that this manifest holds. Once the manifest - * reaches this maximum number of segments, whenever a new segment is added to - * the manifest, the oldest segment will be removed from the manifest. - * The minimum value is 3 and the default value is 5. - * - * Generated from protobuf field int32 max_segment_count = 4; - * @param int $var - * @return $this - */ - public function setMaxSegmentCount($var) - { - GPBUtil::checkInt32($var); - $this->max_segment_count = $var; - - return $this; - } - - /** - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * If both segment_keep_duration and - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * are set, - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * is used and segment_keep_duration is ignored. - * - * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getSegmentKeepDuration() - { - return $this->segment_keep_duration; - } - - public function hasSegmentKeepDuration() - { - return isset($this->segment_keep_duration); - } - - public function clearSegmentKeepDuration() - { - unset($this->segment_keep_duration); - } - - /** - * How long to keep a segment on the output Google Cloud Storage bucket after - * it is removed from the manifest. This field should be large enough to cover - * the manifest propagation delay. Otherwise, a player could receive 404 - * errors while accessing segments which are listed in the manifest that the - * player has, but were already deleted from the output Google Cloud Storage - * bucket. Default value is `60s`. - * If both segment_keep_duration and - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * are set, - * [RetentionConfig.retention_window_duration][google.cloud.video.livestream.v1.RetentionConfig.retention_window_duration] - * is used and segment_keep_duration is ignored. - * - * Generated from protobuf field .google.protobuf.Duration segment_keep_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSegmentKeepDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->segment_keep_duration = $var; - - return $this; - } - - /** - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * - * Generated from protobuf field bool use_timecode_as_timeline = 6; - * @return bool - */ - public function getUseTimecodeAsTimeline() - { - return $this->use_timecode_as_timeline; - } - - /** - * Whether to use the timecode, as specified in timecode config, when setting: - * - `availabilityStartTime` attribute in DASH manifests. - * - `#EXT-X-PROGRAM-DATE-TIME` tag in HLS manifests. - * If false, ignore the input timecode and use the time from system clock - * when the manifest is first generated. This is the default behavior. - * - * Generated from protobuf field bool use_timecode_as_timeline = 6; - * @param bool $var - * @return $this - */ - public function setUseTimecodeAsTimeline($var) - { - GPBUtil::checkBool($var); - $this->use_timecode_as_timeline = $var; - - return $this; - } - - /** - * Optional. A unique key for this manifest. - * - * Generated from protobuf field string key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Optional. A unique key for this manifest. - * - * Generated from protobuf field string key = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php deleted file mode 100644 index f3c9bee3a916..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Manifest/ManifestType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.livestream.v1.Manifest.ManifestType - */ -class ManifestType -{ - /** - * The manifest type is not specified. - * - * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; - */ - const MANIFEST_TYPE_UNSPECIFIED = 0; - /** - * Create an `HLS` manifest. The corresponding file extension is `.m3u8`. - * - * Generated from protobuf enum HLS = 1; - */ - const HLS = 1; - /** - * Create a `DASH` manifest. The corresponding file extension is `.mpd`. - * - * Generated from protobuf enum DASH = 2; - */ - const DASH = 2; - - private static $valueToName = [ - self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', - self::HLS => 'HLS', - self::DASH => 'DASH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManifestType::class, \Google\Cloud\Video\LiveStream\V1\Manifest_ManifestType::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php deleted file mode 100644 index 63c319904ce2..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/MuxStream.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.video.livestream.v1.MuxStream - */ -class MuxStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this multiplexed stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * - * Generated from protobuf field string container = 3; - */ - protected $container = ''; - /** - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - */ - private $elementary_streams; - /** - * Segment settings for `fmp4` and `ts`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; - */ - protected $segment_settings = null; - /** - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * - * Generated from protobuf field string encryption_id = 6; - */ - protected $encryption_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this multiplexed stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * @type string $container - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * @type \Google\Cloud\Video\LiveStream\V1\SegmentSettings $segment_settings - * Segment settings for `fmp4` and `ts`. - * @type string $encryption_id - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this multiplexed stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this multiplexed stream. The key must be 1-63 - * characters in length. The key must begin and end with a letter (regardless - * of case) or a number, but can contain dashes or underscores in between. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * - * Generated from protobuf field string container = 3; - * @return string - */ - public function getContainer() - { - return $this->container; - } - - /** - * The container format. The default is `fmp4`. - * Supported container formats: - * - `fmp4` - the corresponding file extension is `.m4s` - * - `ts` - the corresponding file extension is `.ts` - * - * Generated from protobuf field string container = 3; - * @param string $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkString($var, True); - $this->container = $var; - - return $this; - } - - /** - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of `ElementaryStream` - * [key][google.cloud.video.livestream.v1.ElementaryStream.key]s multiplexed - * in this stream. - * - For `fmp4` container, must contain either one video or one audio stream. - * - For `ts` container, must contain exactly one audio stream and up to one - * video stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * Segment settings for `fmp4` and `ts`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; - * @return \Google\Cloud\Video\LiveStream\V1\SegmentSettings|null - */ - public function getSegmentSettings() - { - return $this->segment_settings; - } - - public function hasSegmentSettings() - { - return isset($this->segment_settings); - } - - public function clearSegmentSettings() - { - unset($this->segment_settings); - } - - /** - * Segment settings for `fmp4` and `ts`. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.SegmentSettings segment_settings = 5; - * @param \Google\Cloud\Video\LiveStream\V1\SegmentSettings $var - * @return $this - */ - public function setSegmentSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\SegmentSettings::class); - $this->segment_settings = $var; - - return $this; - } - - /** - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * - * Generated from protobuf field string encryption_id = 6; - * @return string - */ - public function getEncryptionId() - { - return $this->encryption_id; - } - - /** - * Identifier of the encryption configuration to use. If omitted, output - * will be unencrypted. - * - * Generated from protobuf field string encryption_id = 6; - * @param string $var - * @return $this - */ - public function setEncryptionId($var) - { - GPBUtil::checkString($var, True); - $this->encryption_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php deleted file mode 100644 index e5146c57d91c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedCoordinate.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.livestream.v1.NormalizedCoordinate - */ -class NormalizedCoordinate extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double x = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $x = 0.0; - /** - * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double y = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $y = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. - * @type float $y - * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double x = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * Optional. Normalized x coordinate. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double x = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkDouble($var); - $this->x = $var; - - return $this; - } - - /** - * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double y = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Optional. Normalized y coordinate. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double y = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkDouble($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php deleted file mode 100644 index d1b3eeb82c97..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/NormalizedResolution.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.livestream.v1.NormalizedResolution - */ -class NormalizedResolution extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double w = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $w = 0.0; - /** - * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double h = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $h = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $w - * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. - * @type float $h - * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double w = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getW() - { - return $this->w; - } - - /** - * Optional. Normalized width. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double w = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setW($var) - { - GPBUtil::checkDouble($var); - $this->w = $var; - - return $this; - } - - /** - * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double h = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getH() - { - return $this->h; - } - - /** - * Optional. Normalized height. Valid range is [0.0, 1.0]. Default is 0. - * - * Generated from protobuf field double h = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setH($var) - { - GPBUtil::checkDouble($var); - $this->h = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php deleted file mode 100644 index ccb892bc11cf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/OperationMetadata.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.video.livestream.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. 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 = 5 [(.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 = 6 [(.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 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\Video\Livestream\V1\Service::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. 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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 6 [(.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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php deleted file mode 100644 index 83f7a3a308a7..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.video.livestream.v1.Pool - */ -class Pool extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the pool, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Network configuration for the pool. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Pool.NetworkConfig network_config = 5; - */ - protected $network_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the pool, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined key/value metadata. - * @type \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig $network_config - * Network configuration for the pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the pool, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the pool, in the form of: - * `projects/{project}/locations/{location}/pools/{poolId}`. - * - * 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 creation time. - * - * 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 creation time. - * - * 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 time. - * - * 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 time. - * - * 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; - } - - /** - * User-defined key/value metadata. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined key/value metadata. - * - * 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; - } - - /** - * Network configuration for the pool. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Pool.NetworkConfig network_config = 5; - * @return \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig|null - */ - public function getNetworkConfig() - { - return $this->network_config; - } - - public function hasNetworkConfig() - { - return isset($this->network_config); - } - - public function clearNetworkConfig() - { - unset($this->network_config); - } - - /** - * Network configuration for the pool. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Pool.NetworkConfig network_config = 5; - * @param \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig $var - * @return $this - */ - public function setNetworkConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Pool\NetworkConfig::class); - $this->network_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php deleted file mode 100644 index 55b3f9770e0d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/Pool/NetworkConfig.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.video.livestream.v1.Pool.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * peered_network is the network resource URL of the network that is peered - * to the service provider network. Must be of the format - * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where - * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that - * holds your VPC network and NETWORK_NAME is the name of your VPC network. - * If peered_network is omitted or empty, the pool will use endpoints that - * are publicly available. - * - * Generated from protobuf field string peered_network = 1 [(.google.api.resource_reference) = { - */ - protected $peered_network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $peered_network - * peered_network is the network resource URL of the network that is peered - * to the service provider network. Must be of the format - * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where - * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that - * holds your VPC network and NETWORK_NAME is the name of your VPC network. - * If peered_network is omitted or empty, the pool will use endpoints that - * are publicly available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * peered_network is the network resource URL of the network that is peered - * to the service provider network. Must be of the format - * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where - * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that - * holds your VPC network and NETWORK_NAME is the name of your VPC network. - * If peered_network is omitted or empty, the pool will use endpoints that - * are publicly available. - * - * Generated from protobuf field string peered_network = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getPeeredNetwork() - { - return $this->peered_network; - } - - /** - * peered_network is the network resource URL of the network that is peered - * to the service provider network. Must be of the format - * projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where - * NETWORK_PROJECT_NUMBER is the project number of the Cloud project that - * holds your VPC network and NETWORK_NAME is the name of your VPC network. - * If peered_network is omitted or empty, the pool will use endpoints that - * are publicly available. - * - * Generated from protobuf field string peered_network = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPeeredNetwork($var) - { - GPBUtil::checkString($var, True); - $this->peered_network = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkConfig::class, \Google\Cloud\Video\LiveStream\V1\Pool_NetworkConfig::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php deleted file mode 100644 index 3f4966135443..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig - */ -class PreprocessingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; - */ - protected $audio = null; - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; - */ - protected $crop = null; - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; - */ - protected $pad = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $audio - * Audio preprocessing configuration. - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $crop - * Specify the video cropping configuration. - * @type \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $pad - * Specify the video pad filter configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio|null - */ - public function getAudio() - { - return $this->audio; - } - - public function hasAudio() - { - return isset($this->audio); - } - - public function clearAudio() - { - unset($this->audio); - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Audio audio = 1; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Audio::class); - $this->audio = $var; - - return $this; - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop|null - */ - public function getCrop() - { - return $this->crop; - } - - public function hasCrop() - { - return isset($this->crop); - } - - public function clearCrop() - { - unset($this->crop); - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Crop crop = 2; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop $var - * @return $this - */ - public function setCrop($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Crop::class); - $this->crop = $var; - - return $this; - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; - * @return \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad|null - */ - public function getPad() - { - return $this->pad; - } - - public function hasPad() - { - return isset($this->pad); - } - - public function clearPad() - { - unset($this->pad); - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.PreprocessingConfig.Pad pad = 3; - * @param \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad $var - * @return $this - */ - public function setPad($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig\Pad::class); - $this->pad = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php deleted file mode 100644 index 5e62f61a0530..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Audio.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig.Audio - */ -class Audio extends \Google\Protobuf\Internal\Message -{ - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * - * Generated from protobuf field double lufs = 1; - */ - protected $lufs = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $lufs - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * - * Generated from protobuf field double lufs = 1; - * @return float - */ - public function getLufs() - { - return $this->lufs; - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 according to the following: - * - -24 is the Advanced Television Systems Committee (ATSC A/85) - * - -23 is the EU R128 broadcast standard - * - -19 is the prior standard for online mono audio - * - -18 is the ReplayGain standard - * - -16 is the prior standard for stereo audio - * - -14 is the new online audio standard recommended by Spotify, as well as - * Amazon Echo - * - 0 disables normalization. The default is 0. - * - * Generated from protobuf field double lufs = 1; - * @param float $var - * @return $this - */ - public function setLufs($var) - { - GPBUtil::checkDouble($var); - $this->lufs = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Audio::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Audio::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php deleted file mode 100644 index 71c8d4b86cde..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Crop.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig.Crop - */ -class Crop extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to crop from the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to crop from the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to crop from the left. The default is 0. - * @type int $right_pixels - * The number of pixels to crop from the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Crop::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Crop::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php deleted file mode 100644 index ee40c165846e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/PreprocessingConfig/Pad.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.livestream.v1.PreprocessingConfig.Pad - */ -class Pad extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to add to the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to add to the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to add to the left. The default is 0. - * @type int $right_pixels - * The number of pixels to add to the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Pad::class, \Google\Cloud\Video\LiveStream\V1\PreprocessingConfig_Pad::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php deleted file mode 100644 index d2a87def8c4d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/RetentionConfig.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.video.livestream.v1.RetentionConfig - */ -class RetentionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The minimum duration for which the output files from the channel will - * remain in the output bucket. After this duration, output files are - * deleted asynchronously. - * When the channel is deleted, all output files are deleted from the output - * bucket asynchronously. - * If omitted or set to zero, output files will remain in the output bucket - * based on - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], - * which defaults to 60s. - * If both retention_window_duration and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * are set, retention_window_duration is used and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * is ignored. - * - * Generated from protobuf field .google.protobuf.Duration retention_window_duration = 1; - */ - protected $retention_window_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $retention_window_duration - * The minimum duration for which the output files from the channel will - * remain in the output bucket. After this duration, output files are - * deleted asynchronously. - * When the channel is deleted, all output files are deleted from the output - * bucket asynchronously. - * If omitted or set to zero, output files will remain in the output bucket - * based on - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], - * which defaults to 60s. - * If both retention_window_duration and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * are set, retention_window_duration is used and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The minimum duration for which the output files from the channel will - * remain in the output bucket. After this duration, output files are - * deleted asynchronously. - * When the channel is deleted, all output files are deleted from the output - * bucket asynchronously. - * If omitted or set to zero, output files will remain in the output bucket - * based on - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], - * which defaults to 60s. - * If both retention_window_duration and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * are set, retention_window_duration is used and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * is ignored. - * - * Generated from protobuf field .google.protobuf.Duration retention_window_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getRetentionWindowDuration() - { - return $this->retention_window_duration; - } - - public function hasRetentionWindowDuration() - { - return isset($this->retention_window_duration); - } - - public function clearRetentionWindowDuration() - { - unset($this->retention_window_duration); - } - - /** - * The minimum duration for which the output files from the channel will - * remain in the output bucket. After this duration, output files are - * deleted asynchronously. - * When the channel is deleted, all output files are deleted from the output - * bucket asynchronously. - * If omitted or set to zero, output files will remain in the output bucket - * based on - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration], - * which defaults to 60s. - * If both retention_window_duration and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * are set, retention_window_duration is used and - * [Manifest.segment_keep_duration][google.cloud.video.livestream.v1.Manifest.segment_keep_duration] - * is ignored. - * - * Generated from protobuf field .google.protobuf.Duration retention_window_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetentionWindowDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention_window_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php deleted file mode 100644 index 6778ece42f49..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SegmentSettings.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.livestream.v1.SegmentSettings - */ -class SegmentSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - */ - protected $segment_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $segment_duration - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getSegmentDuration() - { - return $this->segment_duration; - } - - public function hasSegmentDuration() - { - return isset($this->segment_duration); - } - - public function clearSegmentDuration() - { - unset($this->segment_duration); - } - - /** - * Duration of the segments in seconds. The default is `6s`. Note that - * `segmentDuration` must be greater than or equal to - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration], - * and `segmentDuration` must be divisible by - * [gop_duration][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_duration]. - * Valid range is [2s, 20s]. - * All [mux_streams][google.cloud.video.livestream.v1.Manifest.mux_streams] in - * the same manifest must have the same segment duration. - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSegmentDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->segment_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php deleted file mode 100644 index 719cf70bff52..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/SpriteSheet.php +++ /dev/null @@ -1,367 +0,0 @@ -google.cloud.video.livestream.v1.SpriteSheet - */ -class SpriteSheet extends \Google\Protobuf\Internal\Message -{ - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_prefix = ''; - /** - * Required. The width of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_width_pixels = 0; - /** - * Required. The height of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_height_pixels = 0; - /** - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * - * Generated from protobuf field int32 column_count = 5; - */ - protected $column_count = 0; - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * - * Generated from protobuf field int32 row_count = 6; - */ - protected $row_count = 0; - /** - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * - * Generated from protobuf field .google.protobuf.Duration interval = 7; - */ - protected $interval = null; - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 8; - */ - protected $quality = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * @type string $file_prefix - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * @type int $sprite_width_pixels - * Required. The width of the sprite in pixels. Must be an even integer. - * @type int $sprite_height_pixels - * Required. The height of the sprite in pixels. Must be an even integer. - * @type int $column_count - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * @type int $row_count - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * @type \Google\Protobuf\Duration $interval - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * @type int $quality - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * 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; - } - - /** - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilePrefix() - { - return $this->file_prefix; - } - - /** - * Required. File name prefix for the generated sprite sheets. If multiple - * sprite sheets are added to the channel, each must have a unique file - * prefix. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilePrefix($var) - { - GPBUtil::checkString($var, True); - $this->file_prefix = $var; - - return $this; - } - - /** - * Required. The width of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteWidthPixels() - { - return $this->sprite_width_pixels; - } - - /** - * Required. The width of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_width_pixels = $var; - - return $this; - } - - /** - * Required. The height of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteHeightPixels() - { - return $this->sprite_height_pixels; - } - - /** - * Required. The height of the sprite in pixels. Must be an even integer. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_height_pixels = $var; - - return $this; - } - - /** - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * - * Generated from protobuf field int32 column_count = 5; - * @return int - */ - public function getColumnCount() - { - return $this->column_count; - } - - /** - * The maximum number of sprites per row in a sprite sheet. Valid range is - * [1, 10] and the default value is 1. - * - * Generated from protobuf field int32 column_count = 5; - * @param int $var - * @return $this - */ - public function setColumnCount($var) - { - GPBUtil::checkInt32($var); - $this->column_count = $var; - - return $this; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * - * Generated from protobuf field int32 row_count = 6; - * @return int - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. Valid range is [1, 10] and the default value - * is 1. - * - * Generated from protobuf field int32 row_count = 6; - * @param int $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt32($var); - $this->row_count = $var; - - return $this; - } - - /** - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * - * Generated from protobuf field .google.protobuf.Duration interval = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * Create sprites at regular intervals. Valid range is [1 second, 1 hour] and - * the default value is `10s`. - * - * Generated from protobuf field .google.protobuf.Duration interval = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->interval = $var; - - return $this; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 8; - * @return int - */ - public function getQuality() - { - return $this->quality; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 8; - * @param int $var - * @return $this - */ - public function setQuality($var) - { - GPBUtil::checkInt32($var); - $this->quality = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php deleted file mode 100644 index d70e8707a2a4..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StartChannelRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.StartChannelRequest - */ -class StartChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\StartChannelRequest - * - * @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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php deleted file mode 100644 index b6a76e5ff6ad..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StaticOverlay.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.video.livestream.v1.StaticOverlay - */ -class StaticOverlay extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Asset to use for the overlaid image. - * The asset must be represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * The asset's resource type must be image. - * - * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $asset = ''; - /** - * Optional. Normalized image resolution, based on output video resolution. - * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, - * set either `w` or `h` to 0. To use the original image resolution, set both - * `w` and `h` to 0. The default is {0, 0}. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resolution = null; - /** - * Optional. Position of the image in terms of normalized coordinates of the - * upper-left corner of the image, based on output video resolution. For - * example, use the x and y coordinates {0, 0} to position the top-left corner - * of the overlay animation in the top-left corner of the output video. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $position = null; - /** - * Optional. Target image opacity. Valid values are from `1.0` (solid, - * default) to `0.0` (transparent), exclusive. Set this to a value greater - * than `0.0`. - * - * Generated from protobuf field double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $opacity = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset - * Required. Asset to use for the overlaid image. - * The asset must be represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * The asset's resource type must be image. - * @type \Google\Cloud\Video\LiveStream\V1\NormalizedResolution $resolution - * Optional. Normalized image resolution, based on output video resolution. - * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, - * set either `w` or `h` to 0. To use the original image resolution, set both - * `w` and `h` to 0. The default is {0, 0}. - * @type \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate $position - * Optional. Position of the image in terms of normalized coordinates of the - * upper-left corner of the image, based on output video resolution. For - * example, use the x and y coordinates {0, 0} to position the top-left corner - * of the overlay animation in the top-left corner of the output video. - * @type float $opacity - * Optional. Target image opacity. Valid values are from `1.0` (solid, - * default) to `0.0` (transparent), exclusive. Set this to a value greater - * than `0.0`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Asset to use for the overlaid image. - * The asset must be represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * The asset's resource type must be image. - * - * 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. Asset to use for the overlaid image. - * The asset must be represented in the form of: - * `projects/{project}/locations/{location}/assets/{assetId}`. - * The asset's resource type must be image. - * - * 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; - } - - /** - * Optional. Normalized image resolution, based on output video resolution. - * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, - * set either `w` or `h` to 0. To use the original image resolution, set both - * `w` and `h` to 0. The default is {0, 0}. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Video\LiveStream\V1\NormalizedResolution|null - */ - public function getResolution() - { - return $this->resolution; - } - - public function hasResolution() - { - return isset($this->resolution); - } - - public function clearResolution() - { - unset($this->resolution); - } - - /** - * Optional. Normalized image resolution, based on output video resolution. - * Valid values are [0.0, 1.0]. To respect the original image aspect ratio, - * set either `w` or `h` to 0. To use the original image resolution, set both - * `w` and `h` to 0. The default is {0, 0}. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedResolution resolution = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Video\LiveStream\V1\NormalizedResolution $var - * @return $this - */ - public function setResolution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\NormalizedResolution::class); - $this->resolution = $var; - - return $this; - } - - /** - * Optional. Position of the image in terms of normalized coordinates of the - * upper-left corner of the image, based on output video resolution. For - * example, use the x and y coordinates {0, 0} to position the top-left corner - * of the overlay animation in the top-left corner of the output video. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate|null - */ - public function getPosition() - { - return $this->position; - } - - public function hasPosition() - { - return isset($this->position); - } - - public function clearPosition() - { - unset($this->position); - } - - /** - * Optional. Position of the image in terms of normalized coordinates of the - * upper-left corner of the image, based on output video resolution. For - * example, use the x and y coordinates {0, 0} to position the top-left corner - * of the overlay animation in the top-left corner of the output video. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.NormalizedCoordinate position = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate $var - * @return $this - */ - public function setPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\NormalizedCoordinate::class); - $this->position = $var; - - return $this; - } - - /** - * Optional. Target image opacity. Valid values are from `1.0` (solid, - * default) to `0.0` (transparent), exclusive. Set this to a value greater - * than `0.0`. - * - * Generated from protobuf field double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getOpacity() - { - return $this->opacity; - } - - /** - * Optional. Target image opacity. Valid values are from `1.0` (solid, - * default) to `0.0` (transparent), exclusive. Set this to a value greater - * than `0.0`. - * - * Generated from protobuf field double opacity = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setOpacity($var) - { - GPBUtil::checkDouble($var); - $this->opacity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php deleted file mode 100644 index 59ed1b5512cf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/StopChannelRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.video.livestream.v1.StopChannelRequest - */ -class StopChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. Please see - * {@see LivestreamServiceClient::channelName()} for help formatting this field. - * - * @return \Google\Cloud\Video\LiveStream\V1\StopChannelRequest - * - * @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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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 channel resource, in the form of: - * `projects/{project}/locations/{location}/channels/{channelId}`. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php deleted file mode 100644 index 65259f395c0a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TextStream.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.livestream.v1.TextStream - */ -class TextStream extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * - * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $codec = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * - * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Required. The codec for this text stream. - * Supported text codecs: - * - `cea608` - * - `cea708` - * - * Generated from protobuf field string codec = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php deleted file mode 100644 index 0bfb38e5aa03..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.video.livestream.v1.TimecodeConfig - */ -class TimecodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; - */ - protected $source = 0; - protected $time_offset; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $source - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * @type \Google\Protobuf\Duration $utc_offset - * UTC offset. Must be whole seconds, between -18 hours and +18 hours. - * @type \Google\Type\TimeZone $time_zone - * Time zone e.g. "America/Los_Angeles". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; - * @return int - */ - public function getSource() - { - return $this->source; - } - - /** - * The source of the timecode that will later be used in outputs/manifests. - * It determines the initial timecode/timestamp (first frame) of output - * streams. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource source = 1; - * @param int $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig\TimecodeSource::class); - $this->source = $var; - - return $this; - } - - /** - * UTC offset. Must be whole seconds, between -18 hours and +18 hours. - * - * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getUtcOffset() - { - return $this->readOneof(2); - } - - public function hasUtcOffset() - { - return $this->hasOneof(2); - } - - /** - * UTC offset. Must be whole seconds, between -18 hours and +18 hours. - * - * Generated from protobuf field .google.protobuf.Duration utc_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setUtcOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Time zone e.g. "America/Los_Angeles". - * - * Generated from protobuf field .google.type.TimeZone time_zone = 3; - * @return \Google\Type\TimeZone|null - */ - public function getTimeZone() - { - return $this->readOneof(3); - } - - public function hasTimeZone() - { - return $this->hasOneof(3); - } - - /** - * Time zone e.g. "America/Los_Angeles". - * - * Generated from protobuf field .google.type.TimeZone time_zone = 3; - * @param \Google\Type\TimeZone $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getTimeOffset() - { - return $this->whichOneof("time_offset"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php deleted file mode 100644 index 143ed3952b6b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/TimecodeConfig/TimecodeSource.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.livestream.v1.TimecodeConfig.TimecodeSource - */ -class TimecodeSource -{ - /** - * The timecode source is not specified. - * - * Generated from protobuf enum TIMECODE_SOURCE_UNSPECIFIED = 0; - */ - const TIMECODE_SOURCE_UNSPECIFIED = 0; - /** - * Use input media timestamp. - * - * Generated from protobuf enum MEDIA_TIMESTAMP = 1; - */ - const MEDIA_TIMESTAMP = 1; - /** - * Use input embedded timecode e.g. picture timing SEI message. - * - * Generated from protobuf enum EMBEDDED_TIMECODE = 2; - */ - const EMBEDDED_TIMECODE = 2; - - private static $valueToName = [ - self::TIMECODE_SOURCE_UNSPECIFIED => 'TIMECODE_SOURCE_UNSPECIFIED', - self::MEDIA_TIMESTAMP => 'MEDIA_TIMESTAMP', - self::EMBEDDED_TIMECODE => 'EMBEDDED_TIMECODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimecodeSource::class, \Google\Cloud\Video\LiveStream\V1\TimecodeConfig_TimecodeSource::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php deleted file mode 100644 index 0d41cb29e8b9..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateChannelRequest.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.video.livestream.v1.UpdateChannelRequest - */ -class UpdateChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The channel resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Video\LiveStream\V1\Channel $channel Required. The channel resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * @return \Google\Cloud\Video\LiveStream\V1\UpdateChannelRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\LiveStream\V1\Channel $channel, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setChannel($channel) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * @type \Google\Cloud\Video\LiveStream\V1\Channel $channel - * Required. The channel resource to be updated. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Channel - * resource by the update. You can only update the following fields: - * * [`inputAttachments`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputattachment) - * * [`inputConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#inputconfig) - * * [`output`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#output) - * * [`elementaryStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#elementarystream) - * * [`muxStreams`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#muxstream) - * * [`manifests`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#manifest) - * * [`spriteSheets`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#spritesheet) - * * [`logConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#logconfig) - * * [`timecodeConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#timecodeconfig) - * * [`encryptions`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.channels#encryption) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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 channel resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * Required. The channel resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Channel channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php deleted file mode 100644 index c68b33c975ce..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdateInputRequest.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.video.livestream.v1.UpdateInputRequest - */ -class UpdateInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The input resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Video\LiveStream\V1\Input $input Required. The input resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * @return \Google\Cloud\Video\LiveStream\V1\UpdateInputRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\LiveStream\V1\Input $input, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInput($input) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * @type \Google\Cloud\Video\LiveStream\V1\Input $input - * Required. The input resource to be updated. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Input - * resource by the update. You can only update the following fields: - * * [`preprocessingConfig`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#PreprocessingConfig) - * * [`securityRules`](https://cloud.google.com/livestream/docs/reference/rest/v1/projects.locations.inputs#SecurityRule) - * 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 mask is not present, then each field from the list above is updated - * if the field appears in the request payload. To unset a field, add the - * field to the update mask and remove it from the request payload. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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 input resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Input|null - */ - public function getInput() - { - return $this->input; - } - - public function hasInput() - { - return isset($this->input); - } - - public function clearInput() - { - unset($this->input); - } - - /** - * Required. The input resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Input input = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Input $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Input::class); - $this->input = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php deleted file mode 100644 index 55b139eecc28..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/UpdatePoolRequest.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.video.livestream.v1.UpdatePoolRequest - */ -class UpdatePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the Pool - * resource by the update. You can only update the following fields: - * * `networkConfig` - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - */ - protected $update_mask = null; - /** - * Required. The pool resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Pool pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pool = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Video\LiveStream\V1\Pool $pool Required. The pool resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the Pool - * resource by the update. You can only update the following fields: - * - * * `networkConfig` - * - * 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. - * - * @return \Google\Cloud\Video\LiveStream\V1\UpdatePoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\LiveStream\V1\Pool $pool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPool($pool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the Pool - * resource by the update. You can only update the following fields: - * * `networkConfig` - * 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. - * @type \Google\Cloud\Video\LiveStream\V1\Pool $pool - * Required. The pool resource to be updated. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Livestream\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Pool - * resource by the update. You can only update the following fields: - * * `networkConfig` - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the Pool - * resource by the update. You can only update the following fields: - * * `networkConfig` - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1; - * @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 pool resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Pool pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\LiveStream\V1\Pool|null - */ - public function getPool() - { - return $this->pool; - } - - public function hasPool() - { - return isset($this->pool); - } - - public function clearPool() - { - unset($this->pool); - } - - /** - * Required. The pool resource to be updated. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.Pool pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\LiveStream\V1\Pool $var - * @return $this - */ - public function setPool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\Pool::class); - $this->pool = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php deleted file mode 100644 index 605d4d41bf8e..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoFormat.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.video.livestream.v1.VideoFormat - */ -class VideoFormat extends \Google\Protobuf\Internal\Message -{ - /** - * Video codec used in this video stream. - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * The width of the video stream in pixels. - * - * Generated from protobuf field int32 width_pixels = 2; - */ - protected $width_pixels = 0; - /** - * The height of the video stream in pixels. - * - * Generated from protobuf field int32 height_pixels = 3; - */ - protected $height_pixels = 0; - /** - * The frame rate of the input video stream. - * - * Generated from protobuf field double frame_rate = 4; - */ - protected $frame_rate = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * Video codec used in this video stream. - * @type int $width_pixels - * The width of the video stream in pixels. - * @type int $height_pixels - * The height of the video stream in pixels. - * @type float $frame_rate - * The frame rate of the input video stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Video codec used in this video stream. - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * Video codec used in this video stream. - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * The width of the video stream in pixels. - * - * Generated from protobuf field int32 width_pixels = 2; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video stream in pixels. - * - * Generated from protobuf field int32 width_pixels = 2; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video stream in pixels. - * - * Generated from protobuf field int32 height_pixels = 3; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video stream in pixels. - * - * Generated from protobuf field int32 height_pixels = 3; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * The frame rate of the input video stream. - * - * Generated from protobuf field double frame_rate = 4; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * The frame rate of the input video stream. - * - * Generated from protobuf field double frame_rate = 4; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php deleted file mode 100644 index 6213a93235f8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.video.livestream.v1.VideoStream - */ -class VideoStream extends \Google\Protobuf\Internal\Message -{ - protected $codec_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $h264 - * H264 codec settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; - * @return \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings|null - */ - public function getH264() - { - return $this->readOneof(20); - } - - public function hasH264() - { - return $this->hasOneof(20); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoStream.H264CodecSettings h264 = 20; - * @param \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings $var - * @return $this - */ - public function setH264($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoStream\H264CodecSettings::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * @return string - */ - public function getCodecSettings() - { - return $this->whichOneof("codec_settings"); - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php deleted file mode 100644 index e6953375134f..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStream/H264CodecSettings.php +++ /dev/null @@ -1,743 +0,0 @@ -google.cloud.video.livestream.v1.VideoStream.H264CodecSettings - */ -class H264CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 6; - */ - protected $allow_open_gop = false; - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * - * Generated from protobuf field int32 vbv_size_bits = 9; - */ - protected $vbv_size_bits = 0; - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * - * Generated from protobuf field int32 vbv_fullness_bits = 10; - */ - protected $vbv_fullness_bits = 0; - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 11; - */ - protected $entropy_coder = ''; - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 12; - */ - protected $b_pyramid = false; - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * - * Generated from protobuf field int32 b_frame_count = 13; - */ - protected $b_frame_count = 0; - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 14; - */ - protected $aq_strength = 0.0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string profile = 15; - */ - protected $profile = ''; - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string tune = 16; - */ - protected $tune = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * @type int $height_pixels - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * @type bool $allow_open_gop - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. - * If GOP frame count is set instead of GOP duration, GOP duration will be - * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - * must satisfy the limitations on `gopDuration` as well. - * Valid range is [60, 600]. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `2s`. Note that `gopDuration` must be less than or equal to - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], - * and - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] - * must be divisible by `gopDuration`. Valid range is [2s, 20s]. - * All video streams in the same channel must have the same GOP size. - * @type int $vbv_size_bits - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * @type int $vbv_fullness_bits - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * @type string $entropy_coder - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * @type bool $b_pyramid - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * @type int $b_frame_count - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * @type float $aq_strength - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * @type string $tune - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Outputs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * Required. The width of the video in pixels. Must be an even integer. - * Valid range is [320, 1920]. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * Required. The height of the video in pixels. Must be an even integer. - * Valid range is [180, 1080]. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 60. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. Minimum value is 10,000. - * - For SD resolution (< 720p), must be <= 3,000,000 (3 Mbps). - * - For HD resolution (<= 1080p), must be <= 15,000,000 (15 Mbps). - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 6; - * @return bool - */ - public function getAllowOpenGop() - { - return $this->allow_open_gop; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 6; - * @param bool $var - * @return $this - */ - public function setAllowOpenGop($var) - { - GPBUtil::checkBool($var); - $this->allow_open_gop = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. - * If GOP frame count is set instead of GOP duration, GOP duration will be - * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - * must satisfy the limitations on `gopDuration` as well. - * Valid range is [60, 600]. - * - * Generated from protobuf field int32 gop_frame_count = 7; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(7); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(7); - } - - /** - * Select the GOP size based on the specified frame count. - * If GOP frame count is set instead of GOP duration, GOP duration will be - * calculated by `gopFrameCount`/`frameRate`. The calculated GOP duration - * must satisfy the limitations on `gopDuration` as well. - * Valid range is [60, 600]. - * - * Generated from protobuf field int32 gop_frame_count = 7; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `2s`. Note that `gopDuration` must be less than or equal to - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], - * and - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] - * must be divisible by `gopDuration`. Valid range is [2s, 20s]. - * All video streams in the same channel must have the same GOP size. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(8); - } - - public function hasGopDuration() - { - return $this->hasOneof(8); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `2s`. Note that `gopDuration` must be less than or equal to - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration], - * and - * [segment_duration][google.cloud.video.livestream.v1.SegmentSettings.segment_duration] - * must be divisible by `gopDuration`. Valid range is [2s, 20s]. - * All video streams in the same channel must have the same GOP size. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * - * Generated from protobuf field int32 vbv_size_bits = 9; - * @return int - */ - public function getVbvSizeBits() - { - return $this->vbv_size_bits; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to - * [bitrate_bps][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.bitrate_bps]. - * - * Generated from protobuf field int32 vbv_size_bits = 9; - * @param int $var - * @return $this - */ - public function setVbvSizeBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_size_bits = $var; - - return $this; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * - * Generated from protobuf field int32 vbv_fullness_bits = 10; - * @return int - */ - public function getVbvFullnessBits() - { - return $this->vbv_fullness_bits; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * [vbv_size_bits][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.vbv_size_bits]. - * - * Generated from protobuf field int32 vbv_fullness_bits = 10; - * @param int $var - * @return $this - */ - public function setVbvFullnessBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_fullness_bits = $var; - - return $this; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 11; - * @return string - */ - public function getEntropyCoder() - { - return $this->entropy_coder; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 11; - * @param string $var - * @return $this - */ - public function setEntropyCoder($var) - { - GPBUtil::checkString($var, True); - $this->entropy_coder = $var; - - return $this; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 12; - * @return bool - */ - public function getBPyramid() - { - return $this->b_pyramid; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 12; - * @param bool $var - * @return $this - */ - public function setBPyramid($var) - { - GPBUtil::checkBool($var); - $this->b_pyramid = $var; - - return $this; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * - * Generated from protobuf field int32 b_frame_count = 13; - * @return int - */ - public function getBFrameCount() - { - return $this->b_frame_count; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than - * [gop_frame_count][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings.gop_frame_count] - * if set. The default is 0. - * - * Generated from protobuf field int32 b_frame_count = 13; - * @param int $var - * @return $this - */ - public function setBFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->b_frame_count = $var; - - return $this; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 14; - * @return float - */ - public function getAqStrength() - { - return $this->aq_strength; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 14; - * @param float $var - * @return $this - */ - public function setAqStrength($var) - { - GPBUtil::checkDouble($var); - $this->aq_strength = $var; - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string profile = 15; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` (default) - * * `high` - * The available options are [FFmpeg-compatible Profile - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Profile). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string profile = 15; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string tune = 16; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible Encode - * Options](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune) - * Note that certain values for this field may cause the transcoder to - * override other fields you set in the - * [H264CodecSettings][google.cloud.video.livestream.v1.VideoStream.H264CodecSettings] - * message. - * - * Generated from protobuf field string tune = 16; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(H264CodecSettings::class, \Google\Cloud\Video\LiveStream\V1\VideoStream_H264CodecSettings::class); - diff --git a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php b/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php deleted file mode 100644 index ffda21dceb46..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/proto/src/Google/Cloud/Video/LiveStream/V1/VideoStreamProperty.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.livestream.v1.VideoStreamProperty - */ -class VideoStreamProperty extends \Google\Protobuf\Internal\Message -{ - /** - * Index of this video stream. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Properties of the video format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; - */ - protected $video_format = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * Index of this video stream. - * @type \Google\Cloud\Video\LiveStream\V1\VideoFormat $video_format - * Properties of the video format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Livestream\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Index of this video stream. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Index of this video stream. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Properties of the video format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; - * @return \Google\Cloud\Video\LiveStream\V1\VideoFormat|null - */ - public function getVideoFormat() - { - return $this->video_format; - } - - public function hasVideoFormat() - { - return isset($this->video_format); - } - - public function clearVideoFormat() - { - unset($this->video_format); - } - - /** - * Properties of the video format. - * - * Generated from protobuf field .google.cloud.video.livestream.v1.VideoFormat video_format = 2; - * @param \Google\Cloud\Video\LiveStream\V1\VideoFormat $var - * @return $this - */ - public function setVideoFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\LiveStream\V1\VideoFormat::class); - $this->video_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php deleted file mode 100644 index d78b185c9aa3..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_asset.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setAsset($asset) - ->setAssetId($assetId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->createAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Asset $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $assetId = '[ASSET_ID]'; - - create_asset_sample($formattedParent, $assetId); -} -// [END livestream_v1_generated_LivestreamService_CreateAsset_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php deleted file mode 100644 index 87c456a7450a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_channel.php +++ /dev/null @@ -1,95 +0,0 @@ -setOutput($channelOutput); - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->createChannel($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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $channelId = '[CHANNEL_ID]'; - - create_channel_sample($formattedParent, $channelId); -} -// [END livestream_v1_generated_LivestreamService_CreateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php deleted file mode 100644 index 500d8f1c317a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_clip.php +++ /dev/null @@ -1,104 +0,0 @@ -setManifestKey($clipClipManifestsManifestKey); - $clipClipManifests = [$clipManifest,]; - $clip = (new Clip()) - ->setClipManifests($clipClipManifests); - $request = (new CreateClipRequest()) - ->setParent($formattedParent) - ->setClipId($clipId) - ->setClip($clip); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->createClip($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Clip $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $clipId = '[CLIP_ID]'; - $clipClipManifestsManifestKey = '[MANIFEST_KEY]'; - - create_clip_sample($formattedParent, $clipId, $clipClipManifestsManifestKey); -} -// [END livestream_v1_generated_LivestreamService_CreateClip_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php deleted file mode 100644 index 9a71176eefb6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_event.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent) - ->setEvent($event) - ->setEventId($eventId); - - // Call the API and handle any network failures. - try { - /** @var Event $response */ - $response = $livestreamServiceClient->createEvent($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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $eventId = '[EVENT_ID]'; - - create_event_sample($formattedParent, $eventId); -} -// [END livestream_v1_generated_LivestreamService_CreateEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php deleted file mode 100644 index cab250d8915f..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/create_input.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setInput($input) - ->setInputId($inputId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->createInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Input $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $inputId = '[INPUT_ID]'; - - create_input_sample($formattedParent, $inputId); -} -// [END livestream_v1_generated_LivestreamService_CreateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php deleted file mode 100644 index 101273b1066b..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_asset.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->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 = LivestreamServiceClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - - delete_asset_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteAsset_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php deleted file mode 100644 index 9e248f5e7f96..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_channel.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->deleteChannel($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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - delete_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php deleted file mode 100644 index f87b491b93aa..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_clip.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->deleteClip($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 = LivestreamServiceClient::clipName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]', - '[CLIP]' - ); - - delete_clip_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteClip_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php deleted file mode 100644 index 1d889cf7cf86..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_event.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $livestreamServiceClient->deleteEvent($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 = LivestreamServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]', - '[EVENT]' - ); - - delete_event_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php deleted file mode 100644 index 90ae3ffb911a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/delete_input.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->deleteInput($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 = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - - delete_input_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_DeleteInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php deleted file mode 100644 index c23945c2c661..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_asset.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $livestreamServiceClient->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 = LivestreamServiceClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - - get_asset_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetAsset_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php deleted file mode 100644 index bc5923b29e28..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_channel.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Channel $response */ - $response = $livestreamServiceClient->getChannel($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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - get_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php deleted file mode 100644 index 8e78a1a75205..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_clip.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Clip $response */ - $response = $livestreamServiceClient->getClip($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 = LivestreamServiceClient::clipName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]', - '[CLIP]' - ); - - get_clip_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetClip_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php deleted file mode 100644 index 96941dc49a25..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_event.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Event $response */ - $response = $livestreamServiceClient->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 = LivestreamServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CHANNEL]', - '[EVENT]' - ); - - get_event_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetEvent_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php deleted file mode 100644 index d4050c30f4f3..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_input.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Input $response */ - $response = $livestreamServiceClient->getInput($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 = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - - get_input_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_location.php deleted file mode 100644 index 74f1b89dcff0..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/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 livestream_v1_generated_LivestreamService_GetLocation_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php deleted file mode 100644 index 2ae26bfe61f6..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/get_pool.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Pool $response */ - $response = $livestreamServiceClient->getPool($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 = LivestreamServiceClient::poolName('[PROJECT]', '[LOCATION]', '[POOL]'); - - get_pool_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_GetPool_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php deleted file mode 100644 index 6cadc6e72784..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_assets.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_assets_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListAssets_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php deleted file mode 100644 index a09d21fad919..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_channels.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->listChannels($request); - - /** @var Channel $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_channels_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListChannels_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php deleted file mode 100644 index 732db92d0790..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_clips.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->listClips($request); - - /** @var Clip $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - list_clips_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListClips_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php deleted file mode 100644 index cdddc296a241..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_events.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - list_events_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListEvents_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php deleted file mode 100644 index b10a4e8637b8..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_inputs.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $livestreamServiceClient->listInputs($request); - - /** @var Input $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 = LivestreamServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_inputs_sample($formattedParent); -} -// [END livestream_v1_generated_LivestreamService_ListInputs_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/list_locations.php deleted file mode 100644 index 44a01d3dfb77..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/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 livestream_v1_generated_LivestreamService_ListLocations_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php deleted file mode 100644 index 764f07e06895..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/start_channel.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->startChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ChannelOperationResponse $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - start_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_StartChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php deleted file mode 100644 index e475b45492ba..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/stop_channel.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->stopChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ChannelOperationResponse $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 = LivestreamServiceClient::channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - - stop_channel_sample($formattedName); -} -// [END livestream_v1_generated_LivestreamService_StopChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php deleted file mode 100644 index 984af23ee27c..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_channel.php +++ /dev/null @@ -1,74 +0,0 @@ -setOutput($channelOutput); - $request = (new UpdateChannelRequest()) - ->setChannel($channel); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->updateChannel($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()); - } -} -// [END livestream_v1_generated_LivestreamService_UpdateChannel_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php deleted file mode 100644 index 679fc2197cda..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_input.php +++ /dev/null @@ -1,71 +0,0 @@ -setInput($input); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->updateInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Input $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 livestream_v1_generated_LivestreamService_UpdateInput_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php b/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php deleted file mode 100644 index 6a271f6dbbdf..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/samples/V1/LivestreamServiceClient/update_pool.php +++ /dev/null @@ -1,71 +0,0 @@ -setPool($pool); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $livestreamServiceClient->updatePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Pool $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 livestream_v1_generated_LivestreamService_UpdatePool_sync] diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php deleted file mode 100644 index 08e7b87ec33d..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/Client/LivestreamServiceClient.php +++ /dev/null @@ -1,1223 +0,0 @@ - createAssetAsync(CreateAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createChannelAsync(CreateChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClipAsync(CreateClipRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEventAsync(CreateEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInputAsync(CreateInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteChannelAsync(DeleteChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClipAsync(DeleteClipRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEventAsync(DeleteEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInputAsync(DeleteInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getChannelAsync(GetChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClipAsync(GetClipRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEventAsync(GetEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInputAsync(GetInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPoolAsync(GetPoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listChannelsAsync(ListChannelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClipsAsync(ListClipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInputsAsync(ListInputsRequest $request, array $optionalArgs = []) - * @method PromiseInterface startChannelAsync(StartChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopChannelAsync(StopChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateChannelAsync(UpdateChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInputAsync(UpdateInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePoolAsync(UpdatePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class LivestreamServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.video.livestream.v1.LivestreamService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'livestream.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'livestream.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/livestream_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/livestream_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/livestream_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/livestream_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 asset - * resource. - * - * @param string $project - * @param string $location - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName(string $project, string $location, string $asset): string - { - return self::getPathTemplate('asset')->render([ - 'project' => $project, - 'location' => $location, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a channel - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * - * @return string The formatted channel resource. - */ - public static function channelName(string $project, string $location, string $channel): string - { - return self::getPathTemplate('channel')->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a clip - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * @param string $clip - * - * @return string The formatted clip resource. - */ - public static function clipName(string $project, string $location, string $channel, string $clip): string - { - return self::getPathTemplate('clip')->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - 'clip' => $clip, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a event - * resource. - * - * @param string $project - * @param string $location - * @param string $channel - * @param string $event - * - * @return string The formatted event resource. - */ - public static function eventName(string $project, string $location, string $channel, string $event): string - { - return self::getPathTemplate('event')->render([ - 'project' => $project, - 'location' => $location, - 'channel' => $channel, - 'event' => $event, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a input - * resource. - * - * @param string $project - * @param string $location - * @param string $input - * - * @return string The formatted input resource. - */ - public static function inputName(string $project, string $location, string $input): string - { - return self::getPathTemplate('input')->render([ - 'project' => $project, - 'location' => $location, - 'input' => $input, - ]); - } - - /** - * 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 network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a pool - * resource. - * - * @param string $project - * @param string $location - * @param string $pool - * - * @return string The formatted pool resource. - */ - public static function poolName(string $project, string $location, string $pool): string - { - return self::getPathTemplate('pool')->render([ - 'project' => $project, - 'location' => $location, - 'pool' => $pool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * secret_version resource. - * - * @param string $project - * @param string $secret - * @param string $version - * - * @return string The formatted secret_version resource. - */ - public static function secretVersionName(string $project, string $secret, string $version): string - { - return self::getPathTemplate('secretVersion')->render([ - 'project' => $project, - 'secret' => $secret, - 'version' => $version, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - asset: projects/{project}/locations/{location}/assets/{asset} - * - channel: projects/{project}/locations/{location}/channels/{channel} - * - clip: projects/{project}/locations/{location}/channels/{channel}/clips/{clip} - * - event: projects/{project}/locations/{location}/channels/{channel}/events/{event} - * - input: projects/{project}/locations/{location}/inputs/{input} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - pool: projects/{project}/locations/{location}/pools/{pool} - * - secretVersion: projects/{project}/secrets/{secret}/versions/{version} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'livestream.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a Asset with the provided unique ID in the specified - * region. - * - * The async variant is {@see LivestreamServiceClient::createAssetAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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 OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAsset(CreateAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); - } - - /** - * Creates a channel with the provided unique ID in the specified - * region. - * - * The async variant is {@see LivestreamServiceClient::createChannelAsync()} . - * - * @example samples/V1/LivestreamServiceClient/create_channel.php - * - * @param CreateChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createChannel(CreateChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateChannel', $request, $callOptions)->wait(); - } - - /** - * Creates a clip with the provided clip ID in the specified channel. - * - * The async variant is {@see LivestreamServiceClient::createClipAsync()} . - * - * @example samples/V1/LivestreamServiceClient/create_clip.php - * - * @param CreateClipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createClip(CreateClipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateClip', $request, $callOptions)->wait(); - } - - /** - * Creates an event with the provided unique ID in the specified channel. - * - * The async variant is {@see LivestreamServiceClient::createEventAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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 Event - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEvent(CreateEventRequest $request, array $callOptions = []): Event - { - return $this->startApiCall('CreateEvent', $request, $callOptions)->wait(); - } - - /** - * Creates an input with the provided unique ID in the specified region. - * - * The async variant is {@see LivestreamServiceClient::createInputAsync()} . - * - * @example samples/V1/LivestreamServiceClient/create_input.php - * - * @param CreateInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createInput(CreateInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInput', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified asset if it is not used. - * - * The async variant is {@see LivestreamServiceClient::deleteAssetAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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 the specified channel. - * - * The async variant is {@see LivestreamServiceClient::deleteChannelAsync()} . - * - * @example samples/V1/LivestreamServiceClient/delete_channel.php - * - * @param DeleteChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteChannel(DeleteChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteChannel', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified clip job resource. This method only deletes the clip - * job and does not delete the VOD clip stored in the GCS. - * - * The async variant is {@see LivestreamServiceClient::deleteClipAsync()} . - * - * @example samples/V1/LivestreamServiceClient/delete_clip.php - * - * @param DeleteClipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteClip(DeleteClipRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteClip', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified event. - * - * The async variant is {@see LivestreamServiceClient::deleteEventAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEvent(DeleteEventRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteEvent', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified input. - * - * The async variant is {@see LivestreamServiceClient::deleteInputAsync()} . - * - * @example samples/V1/LivestreamServiceClient/delete_input.php - * - * @param DeleteInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteInput(DeleteInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInput', $request, $callOptions)->wait(); - } - - /** - * Returns the specified asset. - * - * The async variant is {@see LivestreamServiceClient::getAssetAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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(); - } - - /** - * Returns the specified channel. - * - * The async variant is {@see LivestreamServiceClient::getChannelAsync()} . - * - * @example samples/V1/LivestreamServiceClient/get_channel.php - * - * @param GetChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Channel - * - * @throws ApiException Thrown if the API call fails. - */ - public function getChannel(GetChannelRequest $request, array $callOptions = []): Channel - { - return $this->startApiCall('GetChannel', $request, $callOptions)->wait(); - } - - /** - * Returns the specified clip. - * - * The async variant is {@see LivestreamServiceClient::getClipAsync()} . - * - * @example samples/V1/LivestreamServiceClient/get_clip.php - * - * @param GetClipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Clip - * - * @throws ApiException Thrown if the API call fails. - */ - public function getClip(GetClipRequest $request, array $callOptions = []): Clip - { - return $this->startApiCall('GetClip', $request, $callOptions)->wait(); - } - - /** - * Returns the specified event. - * - * The async variant is {@see LivestreamServiceClient::getEventAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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(); - } - - /** - * Returns the specified input. - * - * The async variant is {@see LivestreamServiceClient::getInputAsync()} . - * - * @example samples/V1/LivestreamServiceClient/get_input.php - * - * @param GetInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Input - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInput(GetInputRequest $request, array $callOptions = []): Input - { - return $this->startApiCall('GetInput', $request, $callOptions)->wait(); - } - - /** - * Returns the specified pool. - * - * The async variant is {@see LivestreamServiceClient::getPoolAsync()} . - * - * @example samples/V1/LivestreamServiceClient/get_pool.php - * - * @param GetPoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Pool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPool(GetPoolRequest $request, array $callOptions = []): Pool - { - return $this->startApiCall('GetPool', $request, $callOptions)->wait(); - } - - /** - * Returns a list of all assets in the specified region. - * - * The async variant is {@see LivestreamServiceClient::listAssetsAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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); - } - - /** - * Returns a list of all channels in the specified region. - * - * The async variant is {@see LivestreamServiceClient::listChannelsAsync()} . - * - * @example samples/V1/LivestreamServiceClient/list_channels.php - * - * @param ListChannelsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listChannels(ListChannelsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListChannels', $request, $callOptions); - } - - /** - * Returns a list of all clips in the specified channel. - * - * The async variant is {@see LivestreamServiceClient::listClipsAsync()} . - * - * @example samples/V1/LivestreamServiceClient/list_clips.php - * - * @param ListClipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listClips(ListClipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClips', $request, $callOptions); - } - - /** - * Returns a list of all events in the specified channel. - * - * The async variant is {@see LivestreamServiceClient::listEventsAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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); - } - - /** - * Returns a list of all inputs in the specified region. - * - * The async variant is {@see LivestreamServiceClient::listInputsAsync()} . - * - * @example samples/V1/LivestreamServiceClient/list_inputs.php - * - * @param ListInputsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listInputs(ListInputsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInputs', $request, $callOptions); - } - - /** - * Starts the specified channel. Part of the video pipeline will be created - * only when the StartChannel request is received by the server. - * - * The async variant is {@see LivestreamServiceClient::startChannelAsync()} . - * - * @example samples/V1/LivestreamServiceClient/start_channel.php - * - * @param StartChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startChannel(StartChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartChannel', $request, $callOptions)->wait(); - } - - /** - * Stops the specified channel. Part of the video pipeline will be released - * when the StopChannel request is received by the server. - * - * The async variant is {@see LivestreamServiceClient::stopChannelAsync()} . - * - * @example samples/V1/LivestreamServiceClient/stop_channel.php - * - * @param StopChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 stopChannel(StopChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopChannel', $request, $callOptions)->wait(); - } - - /** - * Updates the specified channel. - * - * The async variant is {@see LivestreamServiceClient::updateChannelAsync()} . - * - * @example samples/V1/LivestreamServiceClient/update_channel.php - * - * @param UpdateChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateChannel(UpdateChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateChannel', $request, $callOptions)->wait(); - } - - /** - * Updates the specified input. - * - * The async variant is {@see LivestreamServiceClient::updateInputAsync()} . - * - * @example samples/V1/LivestreamServiceClient/update_input.php - * - * @param UpdateInputRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateInput(UpdateInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInput', $request, $callOptions)->wait(); - } - - /** - * Updates the specified pool. - * - * The async variant is {@see LivestreamServiceClient::updatePoolAsync()} . - * - * @example samples/V1/LivestreamServiceClient/update_pool.php - * - * @param UpdatePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updatePool(UpdatePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePool', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see LivestreamServiceClient::getLocationAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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 LivestreamServiceClient::listLocationsAsync()} . - * - * @example samples/V1/LivestreamServiceClient/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/VideoLiveStream/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 375baec444e7..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.video.livestream.v1", - "libraryPackage": "Google\\Cloud\\Video\\LiveStream\\V1", - "services": { - "LivestreamService": { - "clients": { - "grpc": { - "libraryClient": "LivestreamServiceGapicClient", - "rpcs": { - "CreateAsset": { - "methods": [ - "createAsset" - ] - }, - "CreateChannel": { - "methods": [ - "createChannel" - ] - }, - "CreateClip": { - "methods": [ - "createClip" - ] - }, - "CreateEvent": { - "methods": [ - "createEvent" - ] - }, - "CreateInput": { - "methods": [ - "createInput" - ] - }, - "DeleteAsset": { - "methods": [ - "deleteAsset" - ] - }, - "DeleteChannel": { - "methods": [ - "deleteChannel" - ] - }, - "DeleteClip": { - "methods": [ - "deleteClip" - ] - }, - "DeleteEvent": { - "methods": [ - "deleteEvent" - ] - }, - "DeleteInput": { - "methods": [ - "deleteInput" - ] - }, - "GetAsset": { - "methods": [ - "getAsset" - ] - }, - "GetChannel": { - "methods": [ - "getChannel" - ] - }, - "GetClip": { - "methods": [ - "getClip" - ] - }, - "GetEvent": { - "methods": [ - "getEvent" - ] - }, - "GetInput": { - "methods": [ - "getInput" - ] - }, - "GetPool": { - "methods": [ - "getPool" - ] - }, - "ListAssets": { - "methods": [ - "listAssets" - ] - }, - "ListChannels": { - "methods": [ - "listChannels" - ] - }, - "ListClips": { - "methods": [ - "listClips" - ] - }, - "ListEvents": { - "methods": [ - "listEvents" - ] - }, - "ListInputs": { - "methods": [ - "listInputs" - ] - }, - "StartChannel": { - "methods": [ - "startChannel" - ] - }, - "StopChannel": { - "methods": [ - "stopChannel" - ] - }, - "UpdateChannel": { - "methods": [ - "updateChannel" - ] - }, - "UpdateInput": { - "methods": [ - "updateInput" - ] - }, - "UpdatePool": { - "methods": [ - "updatePool" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json deleted file mode 100644 index 10df1dc07eff..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_client_config.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "interfaces": { - "google.cloud.video.livestream.v1.LivestreamService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "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_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 - } - }, - "methods": { - "CreateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateClip": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateInput": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteClip": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteInput": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetChannel": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetClip": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetEvent": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInput": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAssets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListChannels": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListClips": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListEvents": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListInputs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StartChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateInput": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdatePool": { - "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/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php deleted file mode 100644 index ba81fcbde06a..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_descriptor_config.php +++ /dev/null @@ -1,519 +0,0 @@ - [ - 'google.cloud.video.livestream.v1.LivestreamService' => [ - 'CreateAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Asset', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateClip' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Clip', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - '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\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteClip' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StartChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\ChannelOperationResponse', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'channel.name', - 'fieldAccessors' => [ - 'getChannel', - 'getName', - ], - ], - ], - ], - 'UpdateInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Input', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'input.name', - 'fieldAccessors' => [ - 'getInput', - 'getName', - ], - ], - ], - ], - 'UpdatePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\LiveStream\V1\Pool', - 'metadataReturnType' => '\Google\Cloud\Video\LiveStream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'pool.name', - 'fieldAccessors' => [ - 'getPool', - 'getName', - ], - ], - ], - ], - 'CreateEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Channel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetClip' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Clip', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Event', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInput' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Input', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\Pool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListChannels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getChannels', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListChannelsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListClips' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClips', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListClipsResponse', - '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\Video\LiveStream\V1\ListEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInputs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInputs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\LiveStream\V1\ListInputsResponse', - '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' => [ - 'asset' => 'projects/{project}/locations/{location}/assets/{asset}', - 'channel' => 'projects/{project}/locations/{location}/channels/{channel}', - 'clip' => 'projects/{project}/locations/{location}/channels/{channel}/clips/{clip}', - 'event' => 'projects/{project}/locations/{location}/channels/{channel}/events/{event}', - 'input' => 'projects/{project}/locations/{location}/inputs/{input}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - 'pool' => 'projects/{project}/locations/{location}/pools/{pool}', - 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{version}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php b/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php deleted file mode 100644 index be632de59289..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/src/V1/resources/livestream_service_rest_client_config.php +++ /dev/null @@ -1,414 +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.video.livestream.v1.LivestreamService' => [ - 'CreateAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets', - 'body' => 'asset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'asset_id', - ], - ], - 'CreateChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', - 'body' => 'channel', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'channel_id', - ], - ], - 'CreateClip' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/clips', - 'body' => 'clip', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'clip_id', - ], - ], - 'CreateEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', - 'body' => 'event', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'event_id', - ], - ], - 'CreateInput' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', - 'body' => 'input', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'input_id', - ], - ], - 'DeleteAsset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteChannel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteClip' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/clips/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEvent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInput' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetChannel' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetClip' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/clips/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInput' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/inputs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/pools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListChannels' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/channels', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListClips' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/clips', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/channels/*}/events', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInputs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/inputs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'StartChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/channels/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateChannel' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{channel.name=projects/*/locations/*/channels/*}', - 'body' => 'channel', - 'placeholders' => [ - 'channel.name' => [ - 'getters' => [ - 'getChannel', - 'getName', - ], - ], - ], - ], - 'UpdateInput' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{input.name=projects/*/locations/*/inputs/*}', - 'body' => 'input', - 'placeholders' => [ - 'input.name' => [ - 'getters' => [ - 'getInput', - 'getName', - ], - ], - ], - ], - 'UpdatePool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{pool.name=projects/*/locations/*/pools/*}', - 'body' => 'pool', - 'placeholders' => [ - 'pool.name' => [ - 'getters' => [ - 'getPool', - '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/*}', - '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/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php b/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php deleted file mode 100644 index eb2433dd7014..000000000000 --- a/owl-bot-staging/VideoLiveStream/v1/tests/Unit/V1/Client/LivestreamServiceClientTest.php +++ /dev/null @@ -1,2860 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LivestreamServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LivestreamServiceClient($options); - } - - /** @test */ - public function createAssetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $crc32c = 'crc32c-1352399984'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setCrc32c($crc32c); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $asset = new Asset(); - $assetId = 'assetId-373202742'; - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAsset($asset) - ->setAssetId($assetId); - $response = $gapicClient->createAsset($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.video.livestream.v1.LivestreamService/CreateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $actualValue = $actualApiRequestObject->getAssetId(); - $this->assertProtobufEquals($assetId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - $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 createAssetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $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]'); - $asset = new Asset(); - $assetId = 'assetId-373202742'; - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAsset($asset) - ->setAssetId($assetId); - $response = $gapicClient->createAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - 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 createChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - $response = $gapicClient->createChannel($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.video.livestream.v1.LivestreamService/CreateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $actualValue = $actualApiRequestObject->getChannelId(); - $this->assertProtobufEquals($channelId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - $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 createChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createChannelTest'); - $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]'); - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $channelId = 'channelId-1930808873'; - $request = (new CreateChannelRequest()) - ->setParent($formattedParent) - ->setChannel($channel) - ->setChannelId($channelId); - $response = $gapicClient->createChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createChannelTest'); - 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 createClipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $outputUri = 'outputUri-1273518802'; - $expectedResponse = new Clip(); - $expectedResponse->setName($name); - $expectedResponse->setOutputUri($outputUri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $clipId = 'clipId860900458'; - $clip = new Clip(); - $clipClipManifests = []; - $clip->setClipManifests($clipClipManifests); - $request = (new CreateClipRequest()) - ->setParent($formattedParent) - ->setClipId($clipId) - ->setClip($clip); - $response = $gapicClient->createClip($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.video.livestream.v1.LivestreamService/CreateClip', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClipId(); - $this->assertProtobufEquals($clipId, $actualValue); - $actualValue = $actualApiRequestObject->getClip(); - $this->assertProtobufEquals($clip, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClipTest'); - $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 createClipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClipTest'); - $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $clipId = 'clipId860900458'; - $clip = new Clip(); - $clipClipManifests = []; - $clip->setClipManifests($clipClipManifests); - $request = (new CreateClipRequest()) - ->setParent($formattedParent) - ->setClipId($clipId) - ->setClip($clip); - $response = $gapicClient->createClip($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClipTest'); - 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $executeNow = true; - $expectedResponse = new Event(); - $expectedResponse->setName($name); - $expectedResponse->setExecuteNow($executeNow); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $event = new Event(); - $eventId = 'eventId278118624'; - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEvent($event) - ->setEventId($eventId); - $response = $gapicClient->createEvent($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.video.livestream.v1.LivestreamService/CreateEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $actualValue = $actualRequestObject->getEventId(); - $this->assertProtobufEquals($eventId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $event = new Event(); - $eventId = 'eventId278118624'; - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEvent($event) - ->setEventId($eventId); - try { - $gapicClient->createEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $input = new Input(); - $inputId = 'inputId470715824'; - $request = (new CreateInputRequest()) - ->setParent($formattedParent) - ->setInput($input) - ->setInputId($inputId); - $response = $gapicClient->createInput($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.video.livestream.v1.LivestreamService/CreateInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $actualValue = $actualApiRequestObject->getInputId(); - $this->assertProtobufEquals($inputId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInputTest'); - $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 createInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInputTest'); - $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]'); - $input = new Input(); - $inputId = 'inputId470715824'; - $request = (new CreateInputRequest()) - ->setParent($formattedParent) - ->setInput($input) - ->setInputId($inputId); - $response = $gapicClient->createInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInputTest'); - 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 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]', '[LOCATION]', '[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.video.livestream.v1.LivestreamService/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]', '[LOCATION]', '[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 deleteChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new DeleteChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteChannel($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.video.livestream.v1.LivestreamService/DeleteChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - $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 deleteChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteChannelTest'); - $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new DeleteChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteChannelTest'); - 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 deleteClipTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClipTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClipTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); - $request = (new DeleteClipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClip($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.video.livestream.v1.LivestreamService/DeleteClip', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClipTest'); - $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 deleteClipExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClipTest'); - $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->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); - $request = (new DeleteClipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClip($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClipTest'); - 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() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[EVENT]'); - $request = (new DeleteEventRequest()) - ->setName($formattedName); - $gapicClient->deleteEvent($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/DeleteEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[CHANNEL]', '[EVENT]'); - $request = (new DeleteEventRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteEvent($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new DeleteInputRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInput($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.video.livestream.v1.LivestreamService/DeleteInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInputTest'); - $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 deleteInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInputTest'); - $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->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new DeleteInputRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInputTest'); - 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 getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $crc32c = 'crc32c-1352399984'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $expectedResponse->setCrc32c($crc32c); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[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.video.livestream.v1.LivestreamService/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]', '[LOCATION]', '[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 getChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name2); - $expectedResponse->setActiveInput($activeInput); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new GetChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->getChannel($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.video.livestream.v1.LivestreamService/GetChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new GetChannelRequest()) - ->setName($formattedName); - try { - $gapicClient->getChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $outputUri = 'outputUri-1273518802'; - $expectedResponse = new Clip(); - $expectedResponse->setName($name2); - $expectedResponse->setOutputUri($outputUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); - $request = (new GetClipRequest()) - ->setName($formattedName); - $response = $gapicClient->getClip($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.video.livestream.v1.LivestreamService/GetClip', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClipExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->clipName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[CLIP]'); - $request = (new GetClipRequest()) - ->setName($formattedName); - try { - $gapicClient->getClip($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $executeNow = true; - $expectedResponse = new Event(); - $expectedResponse->setName($name2); - $expectedResponse->setExecuteNow($executeNow); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CHANNEL]', '[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.video.livestream.v1.LivestreamService/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]', '[CHANNEL]', '[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 getInputTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new GetInputRequest()) - ->setName($formattedName); - $response = $gapicClient->getInput($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.video.livestream.v1.LivestreamService/GetInput', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInputExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->inputName('[PROJECT]', '[LOCATION]', '[INPUT]'); - $request = (new GetInputRequest()) - ->setName($formattedName); - try { - $gapicClient->getInput($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Pool(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->poolName('[PROJECT]', '[LOCATION]', '[POOL]'); - $request = (new GetPoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getPool($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.video.livestream.v1.LivestreamService/GetPool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->poolName('[PROJECT]', '[LOCATION]', '[POOL]'); - $request = (new GetPoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getPool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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->locationName('[PROJECT]', '[LOCATION]'); - $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.video.livestream.v1.LivestreamService/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->locationName('[PROJECT]', '[LOCATION]'); - $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 listChannelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelsElement = new Channel(); - $channels = [ - $channelsElement, - ]; - $expectedResponse = new ListChannelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannels($channels); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListChannelsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listChannels($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListChannels', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listChannelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListChannelsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listChannels($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clipsElement = new Clip(); - $clips = [ - $clipsElement, - ]; - $expectedResponse = new ListClipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClips($clips); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new ListClipsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClips($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClips()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListClips', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClipsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new ListClipsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClips($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $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.video.livestream.v1.LivestreamService/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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $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 listInputsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $inputsElement = new Input(); - $inputs = [ - $inputsElement, - ]; - $expectedResponse = new ListInputsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInputs($inputs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInputsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInputs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInputs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.livestream.v1.LivestreamService/ListInputs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInputsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListInputsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInputs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ChannelOperationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StartChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->startChannel($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.video.livestream.v1.LivestreamService/StartChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startChannelTest'); - $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 startChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startChannelTest'); - $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StartChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->startChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startChannelTest'); - 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 stopChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ChannelOperationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StopChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->stopChannel($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.video.livestream.v1.LivestreamService/StopChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopChannelTest'); - $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 stopChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopChannelTest'); - $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->channelName('[PROJECT]', '[LOCATION]', '[CHANNEL]'); - $request = (new StopChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->stopChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopChannelTest'); - 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 updateChannelTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activeInput = 'activeInput1758551377'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setActiveInput($activeInput); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $request = (new UpdateChannelRequest()) - ->setChannel($channel); - $response = $gapicClient->updateChannel($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.video.livestream.v1.LivestreamService/UpdateChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - $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 updateChannelExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateChannelTest'); - $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 - $channel = new Channel(); - $channelOutput = new Output(); - $channel->setOutput($channelOutput); - $request = (new UpdateChannelRequest()) - ->setChannel($channel); - $response = $gapicClient->updateChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateChannelTest'); - 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 updateInputTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Input(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $input = new Input(); - $request = (new UpdateInputRequest()) - ->setInput($input); - $response = $gapicClient->updateInput($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.video.livestream.v1.LivestreamService/UpdateInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInput(); - $this->assertProtobufEquals($input, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInputTest'); - $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 updateInputExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInputTest'); - $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 - $input = new Input(); - $request = (new UpdateInputRequest()) - ->setInput($input); - $response = $gapicClient->updateInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInputTest'); - 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 updatePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Pool(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $pool = new Pool(); - $request = (new UpdatePoolRequest()) - ->setPool($pool); - $response = $gapicClient->updatePool($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.video.livestream.v1.LivestreamService/UpdatePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPool(); - $this->assertProtobufEquals($pool, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePoolTest'); - $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 updatePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePoolTest'); - $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 - $pool = new Pool(); - $request = (new UpdatePoolRequest()) - ->setPool($pool); - $response = $gapicClient->updatePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePoolTest'); - 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 createAssetAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $crc32c = 'crc32c-1352399984'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $expectedResponse->setCrc32c($crc32c); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $asset = new Asset(); - $assetId = 'assetId-373202742'; - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAsset($asset) - ->setAssetId($assetId); - $response = $gapicClient->createAssetAsync($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.video.livestream.v1.LivestreamService/CreateAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $actualValue = $actualApiRequestObject->getAssetId(); - $this->assertProtobufEquals($assetId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAssetTest'); - $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/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php deleted file mode 100644 index c8f68cb7b757..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/AdTagDetails.php +++ /dev/null @@ -1,52 +0,0 @@ -internalAddGeneratedFile( - ' -¶ -3google/cloud/video/stitcher/v1/ad_tag_details.protogoogle.cloud.video.stitcher.v1google/protobuf/duration.protogoogle/protobuf/struct.proto"ÿ -LiveAdTagDetail -name ( > - ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:êA™ -,videostitcher.googleapis.com/LiveAdTagDetailiprojects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}"ù -VodAdTagDetail -name ( > - ad_requests ( 2).google.cloud.video.stitcher.v1.AdRequest:˜êA” -+videostitcher.googleapis.com/VodAdTagDetaileprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}"° - AdRequest -uri ( I -request_metadata ( 2/.google.cloud.video.stitcher.v1.RequestMetadataK -response_metadata ( 20.google.cloud.video.stitcher.v1.ResponseMetadata"; -RequestMetadata( -headers ( 2.google.protobuf.Struct"¯ -ResponseMetadata -error ( ( -headers ( 2.google.protobuf.Struct - status_code (  - -size_bytes (+ -duration ( 2.google.protobuf.Duration -body ( By -"com.google.cloud.video.stitcher.v1BAdTagDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/CdnKeys.php deleted file mode 100644 index 7fa721f167f8d88e5a7157482f863a02df5d9356..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1567 zcmb7E&rcIU6t;i}(~4vdrV?YuLZk%P4SFyxf@!H#Vvq(K4rY@&ot?HL+nsfGwh59R z{I~pTJbU-<{MarV0g=7z%gcM;eD8ZdUcZS35m<&z5)zIC@nQE2iUENUXM$lCz;4p( z5e_jMMl>MYhOlu2KOD8;+r~lrsZ5Po!ZC4SpRs;G92~I3cSh7F%!vgRctE%_+H$ZT zc23DzY-?lyLNp|CgfM~4R{f9&M9K$_7d@r%U zIe_wul5RjTj0F<%w?g9%4XL0gpxn8@7AvArb3g0c{*grg9X>KZhdDt0Ae zQh*&eVbxNaNIkrRP!JxXz-y2ga~cW8TQbyj`$S|)Do=GSeOAHI9;_OUu6v2(4ir2g z`PU)jL?k@i*1Q$KIJ3MfG^<6_+ovS(>tujNlyTR+sOkdby3}KmHuB0WEyd<8O$)F2 zepctc9E)nkOz~U=-|vCVTg`*@#Dv>=d~7{F_GEnQ(bm$V6b?ny;VD%!N|oPJVAc$T zwGS3dTqhm3@?BV{7N2j}|Ax1ldhQI$yE_U8ouVP48P4qg;nZ|ihSLD|hs38SgPGGX z>o?IkR7n|13CyT%DHmk&ytN4C1}qlZGow5%{#E-7mbGS?WTsxJR&2}FbqtpEN-p0Q zf<^3{r`FgB7?yj(Lg|~BW3{bn!JKnxsI?u}7r{bmcQ6Zkv|n*SDKDE<2E~Zek-Q=* zL$fW_r+?OF6lLk@Xv$NHa^)E)<)yM7f_cGCiGC}WS@}@_#he(odBZveC4*`BmZ!D$ zFK?l}-Bz6Tbh)aM!qPe@=6u#;@Zf7g_*o}HTy{ua1=A!QTo<4swZGxLddc)A*4L#~ z__S+QU^1|>d42ZxJ(YcxCw0>7sJne(c4uX01$(iYt>lI|ExAi{?G@6I=2ncs7=S;T C&-u9k diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Companions.php deleted file mode 100644 index 8295feed69ccba158eb9cedccdd643e741abc7b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1738 zcmb7_?@!u57{^8Y#e+YvW*gg!c|(nuY-PG^FK}o;(6J~mP!pFXO=%CgthC+rin_%& z`v>>e?ES7+D4^SLyy0?p&*z?>-@e~>+77ItBWz)+F>Ijb4PtGK9BMOLw@uXaS}jbG zZg(7FVk#q4tfETw6qSnQ(-+*-wLPliEV{JqOA}{w)Ao!^ml)X2xQsBpjcKO4o$&#h zMQqEJ1slN9I@onI9iyXK;RG|y(3qwi35;^!W0Z3rqcnOL<$QY=KsPnlMF$}cz60Vv z$7`BIM=sMC|63=nN-V;NW|D6_svK%*ri;1x{ktvC(iwLQ`36->$LTE;F#Wshj?J@> zLw(0;eqwl1l(NMzwKP*HVppfcVK%MttJ&-&W??%0o%B}kSszDQC>{8i&E9h|hZyzn z@aqUs%sguC3cr28ZMae%o;Ib_#TIk3*+GZ{qKNR-9_huCH;mBzLtgT9_@Mv%Cj6X( z%zxHedL9_aqB&&I9CE)o$70ny2q$sdr5Z5ua8wjK;koq_ZR=o+jR%Z=J`{z9#nKAn~8rIS+S zR6VOSYNdnnVYyUHOh~g3%^x2pB4SawNK8s|Fjc8mN{MLdR}^BQ=TZeE(xQAuRL$Ty z2*xZ4JOS~Y*W-LG3(LGw@7aBr@OeSwjqu_R<2A%sjqpA~qRl$y2yI@_SR0eeHdCEzUZqHST1vp&6){-b--(KyC$Pi?0W)=QbxIsO z0|{Sq%`vbsbT%!{9>Zc_6vAf2{!>^EZNj5jaU=ooLb#^QRAMCO_+CtU3o}?uRx&1f zXk%RDVh#%n5Fe^(Y6BKWGa{`(T;#S_bieCksZ~haEvpoVs7FbVuGBk7+^y5d1&OCw zrmb*uoSkYD>Sec`Mej*bAK4^4i|>I($DM4)xSUNPIGs# eY|e-;!JExcVO|CTIHZ?<)k<+Q5V2dh1^5k&5GSkv diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Events.php deleted file mode 100644 index 03acc1702d6098ac4cea9bc04a2c82f73708dc97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1464 zcmb7EU2oeq6kTG+jjxlG5zxZzfPu?8)ImEL>97}P>EOtWL&UZ;Np?SAK#*nH5uiwd zL>cIYJnRqb&+QM5q++L7*ADZ8d_|pmc<#N2{P~ykI)(3WpT#WmIh*6z2h6V-PP2q3 zK@#Cvu~@JS2gywuMl91Y?wNRGx|sB+`>jaLlOhXP2QQOk8L@T{CB?kG3g;|o=RD-W zHOtzolQvtinCH6U1&I9{mZyHeaNjx~GVafP?oa!QVroc==|oaYojZ!@Fa6ocmn-JqvR$j6)v!QTUsv<_s_VC}$$|Q|zLM10E(ZmI-DYu+}jy zIVJX4nuzMp@LH558zP!9r7>q&>_^ic%Y!UTd6HQI+UYDA-?UM#w2tq#m2}|(w@Qtj z&L<+zFwYA1@$MLBj2Bsas&q?&+f6k6mzHhR^$IaYQBbV9rdC2!D{R)-zO?b zT%iM1iwr&Y(l*EaOY~4C+2josVo@18;~_zZGK<)@X(J&BYUHie6_7`zlEI*B3F^ls zwJE};hG5Sah|n9*5$W3Ki4^8sQ42lQ9>HPPFo@-PbTpx^=%whz*GDVZ7tUQ~EYC|{ z=+NNd4fF1XDDCm3A!>KW84H#kI?v%qTxkD+J#Q#YxjI|c*8A5b z=h~{tO?#RA^P=<9P~3HE&!@A~`*2oM9{ln7=8(NCkNrot#Aj~^g)GnUE!+b94M)+c A@c;k- diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php deleted file mode 100644 index fc5cf1667356..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/FetchOptions.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' -ä -2google/cloud/video/stitcher/v1/fetch_options.protogoogle.cloud.video.stitcher.v1"Š - FetchOptionsJ -headers ( 29.google.cloud.video.stitcher.v1.FetchOptions.HeadersEntry. - HeadersEntry -key (  -value ( :8By -"com.google.cloud.video.stitcher.v1BFetchOptionsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/LiveConfigs.php deleted file mode 100644 index e3f3ffe8377e9ae1d61fe9e6b5c0a3f4cac6e0cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2272 zcmb7GQB&JS5H2PVSSP{Jq>V}1&edfGl1ZdM-%Oz+Tf%iqu*Vk6q@x+lSvng9p;M(3 zEzR(o`hWV==l+B~_3k8DhJ-lvi_dqr-|c?8->$#^Av%rVTht*Ti7_J{8eJlGN>CJ2 zMqL`9Q92%z7`gO3@&gj92pK(e)U%Ljbggf=X+qQ3B~3J;bP^EF4QT3V7rsZRmN1{W zrzF-cwza^&AdXAJu|G*vi4G9rbCN{ZC8*PHy(SEMm|?pkf$X*bvQGq%Jlw;0#odjFaw7In;aOjB!+Ej0AtP~!1KS{p8~YKXai3ppHYbEl85KKQ&+=yl zoIgfenUBrpdrs~l7N=zPb%bKV(m33eehYxB>B{~9Z+hh02R;eB7CFTiK8>5rGO7~f zHq!yg6Z*+kwfc~imc#ex^&ApMz82@aWwrfeXU=P5L5@Q+c5<8iIZdjA z*O%ty6lCX(zm@^Ys#hMu9U-9l0$SKwZ7u$-FDj1#vg|o&?AI&BK}Asju;(y5kq3+7 zKskW52|jmbgjv7C52`ya)sM%mcJTR(9|kOmawhd9Zv9~A)jaFcR2>St%yk2*!owK5 zXMQ-TFH5ZF^RRT!$}I#+McIe@9vR~_U``SUpYDoKTlVI^`UW&)2B!(kg5N`Y9d#aPKR3%d zo$?br$`gF8fa*1g_F^8|tRx#IEJ^;A&*9eLpLRaoLbj5oE4I55mZQywffj$tip&t

z8qRztNkN4b^5)-Zu`v*>@}#ik1eNt zJQ$cq7Kaxbz1Mw?YC5`6t2F69dI0w3M^jcZuIOAeZ;8ti?OndQ(gNzr4#M|}CEqN^ z2H!4+(p6&&4{osi2=0;)j{@RJk*yRp_B5X>4zJjl{F;)4IfYiG>Z&{IMJft0t3^L+ zV7Px>Kv6er16mXoDv&A%){$b>;Nw%KZ!2Bhn@G)b$BwTap?1d3$c*f*)EV_Wu3 zP?;j}D)5cB;1S>r_`FBh2gJGdb>eo-yde6ej(yMXo^yWZ{LZ}(9=Rtjd?N2rn|g#% zL++o+?1aj$=P*ZiEV(}(45%mT&d4<_>M63^?8pb5W4YCAAAgLdzBBf8T9b#4Gqk9x zTh7=}C#FFi)n_KtPpGF(HdUYczUkP$5+DQEWJG%2~zV@c;U?o!PneH1QNg5FYs-cq98QYM?F z8v>5Frs@eA!#*pi2|Mw=4!IHrw-XF#K!{kpnXuTxtZRChc3~o7Q3DykUQ!K_+wgn& zw-tbAjv+c+T8ArKDT*mMRmtvT{;p@FHspg;^9*2*`^7YV%T@0xp)-rJqy$YH8HG^q z!8O++XWG~^i&y45NC06k1Rt*Q4-&p3hQ`P+c()R~`wrH`yAjbnM;j5h__mxuXSS1^ znTM# zh)u|G*FB=2n)a}m!!N7V&y&E>Rbj#NmzJKw^&uH)2+t73FXjUu?DsXL!PnNeFe)`MYOQ9OOGKJ$GZX7ZOVRfyi>$9Vl|YO z-iNHuJc_@ibK}M-LPR-$jp86|)gdI`uhEjUUdvY5CU_W!)PyV&+Q*nqee{$U z;pUt3P&anCrSt>}Vh>IOL+usawFDND!41oQq~JPoBO<69(rvgFHG7cDT=hoeVWb91 zq_k24@-uDHh!J)9oycN=7AmvhQ#X9+AruJC_le2Qv{1N;nIJWvCcy-Ar~DY!=Mjjw zmI|Z%OF9k_rFj<$81WFb+K>DSDN7Wwt}qMylfH&bm>N!ZVru50AQ@FCP#YD%98t{~ z46ubUHC#tu!^u5Z$McKF&RKEYe4SPK_Z7(T@hb}9GD(l?@T?m%(h=n2`sx=~0`eXt zkr&%7rmp^CZRNt4t1hjr`xoS|5Wsx7jC*mtLQReh%;FlNWp`B6*_ZWON%F!&4pk6k z^qjP>Bg|6LUivF_UPsS~do#Y6vk;lyy$BXa+9#{EQ?-cUt}@ z1%-H*xMWYSYu~~vU$8Q~ Jm`z~{@Gp@_Aano# diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php deleted file mode 100644 index b64766ec3512..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/Slates.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' -õ -+google/cloud/video/stitcher/v1/slates.protogoogle.cloud.video.stitcher.v1google/api/resource.proto" -Slate -name ( BàA -uri ( A - gam_slate ( 2..google.cloud.video.stitcher.v1.Slate.GamSlate@ -GamSlate - network_code ( BàA - gam_slate_id (BàA:_êA\\ -"videostitcher.googleapis.com/Slate6projects/{project}/locations/{location}/slates/{slate}Bs -"com.google.cloud.video.stitcher.v1B SlatesProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php deleted file mode 100644 index 27b7f5f709f0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/StitchDetails.php +++ /dev/null @@ -1,45 +0,0 @@ -internalAddGeneratedFile( - ' -ä -3google/cloud/video/stitcher/v1/stitch_details.protogoogle.cloud.video.stitcher.v1google/api/resource.protogoogle/protobuf/duration.protogoogle/protobuf/struct.proto"‡ -VodStitchDetail -name ( I -ad_stitch_details ( 2..google.cloud.video.stitcher.v1.AdStitchDetail:šêA– -,videostitcher.googleapis.com/VodStitchDetailfprojects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}"¥ -AdStitchDetail - ad_break_id ( BàA -ad_id ( BàA6 -ad_time_offset ( 2.google.protobuf.DurationBàA - skip_reason ( BàAM -media ( 29.google.cloud.video.stitcher.v1.AdStitchDetail.MediaEntryBàAD - -MediaEntry -key ( % -value ( 2.google.protobuf.Value:8Bz -"com.google.cloud.video.stitcher.v1BStitchDetailsProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php deleted file mode 100644 index 1faef2c46a9d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VideoStitcherService.php +++ /dev/null @@ -1,243 +0,0 @@ -internalAddGeneratedFile( - ' -õc -;google/cloud/video/stitcher/v1/video_stitcher_service.protogoogle.cloud.video.stitcher.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto3google/cloud/video/stitcher/v1/ad_tag_details.proto-google/cloud/video/stitcher/v1/cdn_keys.proto1google/cloud/video/stitcher/v1/live_configs.proto-google/cloud/video/stitcher/v1/sessions.proto+google/cloud/video/stitcher/v1/slates.proto3google/cloud/video/stitcher/v1/stitch_details.proto0google/cloud/video/stitcher/v1/vod_configs.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"© -CreateCdnKeyRequest; -parent ( B+àAúA%#videostitcher.googleapis.com/CdnKey< -cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyBàA - -cdn_key_id ( BàA"š -ListCdnKeysRequest; -parent ( B+àAúA%#videostitcher.googleapis.com/CdnKey - page_size ( - -page_token (  -filter (  -order_by ( "} -ListCdnKeysResponse8 -cdn_keys ( 2&.google.cloud.video.stitcher.v1.CdnKey -next_page_token (  - unreachable ( "M -GetCdnKeyRequest9 -name ( B+àAúA% -#videostitcher.googleapis.com/CdnKey"P -DeleteCdnKeyRequest9 -name ( B+àAúA% -#videostitcher.googleapis.com/CdnKey"‰ -UpdateCdnKeyRequest< -cdn_key ( 2&.google.cloud.video.stitcher.v1.CdnKeyBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"  -CreateVodSessionRequest? -parent ( B/àAúA)\'videostitcher.googleapis.com/VodSessionD - vod_session ( 2*.google.cloud.video.stitcher.v1.VodSessionBàA"U -GetVodSessionRequest= -name ( B/àAúA) -\'videostitcher.googleapis.com/VodSession"Š -ListVodStitchDetailsRequestD -parent ( B4àAúA.,videostitcher.googleapis.com/VodStitchDetail - page_size ( - -page_token ( "„ -ListVodStitchDetailsResponseK -vod_stitch_details ( 2/.google.cloud.video.stitcher.v1.VodStitchDetail -next_page_token ( "_ -GetVodStitchDetailRequestB -name ( B4àAúA. -,videostitcher.googleapis.com/VodStitchDetail"ˆ -ListVodAdTagDetailsRequestC -parent ( B3àAúA-+videostitcher.googleapis.com/VodAdTagDetail - page_size ( - -page_token ( "‚ -ListVodAdTagDetailsResponseJ -vod_ad_tag_details ( 2..google.cloud.video.stitcher.v1.VodAdTagDetail -next_page_token ( "] -GetVodAdTagDetailRequestA -name ( B3àAúA- -+videostitcher.googleapis.com/VodAdTagDetail"Š -ListLiveAdTagDetailsRequestD -parent ( B4àAúA.,videostitcher.googleapis.com/LiveAdTagDetail - page_size ( - -page_token ( "… -ListLiveAdTagDetailsResponseL -live_ad_tag_details ( 2/.google.cloud.video.stitcher.v1.LiveAdTagDetail -next_page_token ( "_ -GetLiveAdTagDetailRequestB -name ( B4àAúA. -,videostitcher.googleapis.com/LiveAdTagDetail"¶ -CreateSlateRequest: -parent ( B*àAúA$"videostitcher.googleapis.com/Slate -slate_id ( BàA9 -slate ( 2%.google.cloud.video.stitcher.v1.SlateBàA - -request_id ( "K -GetSlateRequest8 -name ( B*àAúA$ -"videostitcher.googleapis.com/Slate"˜ -ListSlatesRequest: -parent ( B*àAúA$"videostitcher.googleapis.com/Slate - page_size ( - -page_token (  -filter (  -order_by ( "y -ListSlatesResponse5 -slates ( 2%.google.cloud.video.stitcher.v1.Slate -next_page_token (  - unreachable ( "… -UpdateSlateRequest9 -slate ( 2%.google.cloud.video.stitcher.v1.SlateBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"N -DeleteSlateRequest8 -name ( B*àAúA$ -"videostitcher.googleapis.com/Slate"¤ -CreateLiveSessionRequest@ -parent ( B0àAúA*(videostitcher.googleapis.com/LiveSessionF - live_session ( 2+.google.cloud.video.stitcher.v1.LiveSessionBàA"W -GetLiveSessionRequest> -name ( B0àAúA* -(videostitcher.googleapis.com/LiveSession"Ñ -CreateLiveConfigRequest? -parent ( B/àAúA)\'videostitcher.googleapis.com/LiveConfig -live_config_id ( BàAD - live_config ( 2*.google.cloud.video.stitcher.v1.LiveConfigBàA - -request_id ( "¬ -ListLiveConfigsRequest? -parent ( B/àAúA)\'videostitcher.googleapis.com/LiveConfig - page_size ( - -page_token (  -filter ( BàA -order_by ( BàA"‰ -ListLiveConfigsResponse@ - live_configs ( 2*.google.cloud.video.stitcher.v1.LiveConfig -next_page_token (  - unreachable ( "U -GetLiveConfigRequest= -name ( B/àAúA) -\'videostitcher.googleapis.com/LiveConfig"X -DeleteLiveConfigRequest= -name ( B/àAúA) -\'videostitcher.googleapis.com/LiveConfig"• -UpdateLiveConfigRequestD - live_config ( 2*.google.cloud.video.stitcher.v1.LiveConfigBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA"Ñ -CreateVodConfigRequest> -parent ( B.àAúA(&videostitcher.googleapis.com/VodConfig - vod_config_id ( BàAB - -vod_config ( 2).google.cloud.video.stitcher.v1.VodConfigBàA - -request_id ( BàA"´ -ListVodConfigsRequest> -parent ( B.àAúA(&videostitcher.googleapis.com/VodConfig - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"† -ListVodConfigsResponse> - vod_configs ( 2).google.cloud.video.stitcher.v1.VodConfig -next_page_token (  - unreachable ( "S -GetVodConfigRequest< -name ( B.àAúA( -&videostitcher.googleapis.com/VodConfig"V -DeleteVodConfigRequest< -name ( B.àAúA( -&videostitcher.googleapis.com/VodConfig"’ -UpdateVodConfigRequestB - -vod_config ( 2).google.cloud.video.stitcher.v1.VodConfigBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA" -OperationMetadata/ - create_time ( 2.google.protobuf.Timestamp, -end_time ( 2.google.protobuf.Timestamp -target (  -verb ( 2×6 -VideoStitcherService™ - CreateCdnKey3.google.cloud.video.stitcher.v1.CreateCdnKeyRequest.google.longrunning.Operation"´ÊAY -%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadataÚAparent,cdn_key,cdn_key_id‚Óä“6"+/v1/{parent=projects/*/locations/*}/cdnKeys:cdn_key´ - ListCdnKeys2.google.cloud.video.stitcher.v1.ListCdnKeysRequest3.google.cloud.video.stitcher.v1.ListCdnKeysResponse"<ÚAparent‚Óä“-+/v1/{parent=projects/*/locations/*}/cdnKeys¡ - GetCdnKey0.google.cloud.video.stitcher.v1.GetCdnKeyRequest&.google.cloud.video.stitcher.v1.CdnKey":ÚAname‚Óä“-+/v1/{name=projects/*/locations/*/cdnKeys/*}ë - DeleteCdnKey3.google.cloud.video.stitcher.v1.DeleteCdnKeyRequest.google.longrunning.Operation"†ÊAI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“-*+/v1/{name=projects/*/locations/*/cdnKeys/*}› - UpdateCdnKey3.google.cloud.video.stitcher.v1.UpdateCdnKeyRequest.google.longrunning.Operation"¶ÊAY -%google.cloud.video.stitcher.v1.CdnKey0google.cloud.video.stitcher.v1.OperationMetadataÚAcdn_key,update_mask‚Óä“>23/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}:cdn_keyÒ -CreateVodSession7.google.cloud.video.stitcher.v1.CreateVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession"YÚAparent,vod_session‚Óä“>"//v1/{parent=projects/*/locations/*}/vodSessions: vod_session± - GetVodSession4.google.cloud.video.stitcher.v1.GetVodSessionRequest*.google.cloud.video.stitcher.v1.VodSession">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/vodSessions/*}æ -ListVodStitchDetails;.google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest<.google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse"SÚAparent‚Óä“DB/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetailsÓ -GetVodStitchDetail9.google.cloud.video.stitcher.v1.GetVodStitchDetailRequest/.google.cloud.video.stitcher.v1.VodStitchDetail"QÚAname‚Óä“DB/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}â -ListVodAdTagDetails:.google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest;.google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse"RÚAparent‚Óä“CA/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetailsÏ -GetVodAdTagDetail8.google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest..google.cloud.video.stitcher.v1.VodAdTagDetail"PÚAname‚Óä“CA/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}ç -ListLiveAdTagDetails;.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest<.google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse"TÚAparent‚Óä“EC/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetailsÔ -GetLiveAdTagDetail9.google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest/.google.cloud.video.stitcher.v1.LiveAdTagDetail"RÚAname‚Óä“EC/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*} - CreateSlate2.google.cloud.video.stitcher.v1.CreateSlateRequest.google.longrunning.Operation"¬ÊAX -$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadataÚAparent,slate,slate_id‚Óä“3"*/v1/{parent=projects/*/locations/*}/slates:slate° - -ListSlates1.google.cloud.video.stitcher.v1.ListSlatesRequest2.google.cloud.video.stitcher.v1.ListSlatesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/slates -GetSlate/.google.cloud.video.stitcher.v1.GetSlateRequest%.google.cloud.video.stitcher.v1.Slate"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/slates/*}‘ - UpdateSlate2.google.cloud.video.stitcher.v1.UpdateSlateRequest.google.longrunning.Operation"®ÊAX -$google.cloud.video.stitcher.v1.Slate0google.cloud.video.stitcher.v1.OperationMetadataÚAslate,update_mask‚Óä“920/v1/{slate.name=projects/*/locations/*/slates/*}:slateè - DeleteSlate2.google.cloud.video.stitcher.v1.DeleteSlateRequest.google.longrunning.Operation"…ÊAI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/slates/*}Ø -CreateLiveSession8.google.cloud.video.stitcher.v1.CreateLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"\\ÚAparent,live_session‚Óä“@"0/v1/{parent=projects/*/locations/*}/liveSessions: live_sessionµ -GetLiveSession5.google.cloud.video.stitcher.v1.GetLiveSessionRequest+.google.cloud.video.stitcher.v1.LiveSession"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/liveSessions/*}µ -CreateLiveConfig7.google.cloud.video.stitcher.v1.CreateLiveConfigRequest.google.longrunning.Operation"ÈÊA] -)google.cloud.video.stitcher.v1.LiveConfig0google.cloud.video.stitcher.v1.OperationMetadataÚA!parent,live_config,live_config_id‚Óä“>"//v1/{parent=projects/*/locations/*}/liveConfigs: live_configÄ -ListLiveConfigs6.google.cloud.video.stitcher.v1.ListLiveConfigsRequest7.google.cloud.video.stitcher.v1.ListLiveConfigsResponse"@ÚAparent‚Óä“1//v1/{parent=projects/*/locations/*}/liveConfigs± - GetLiveConfig4.google.cloud.video.stitcher.v1.GetLiveConfigRequest*.google.cloud.video.stitcher.v1.LiveConfig">ÚAname‚Óä“1//v1/{name=projects/*/locations/*/liveConfigs/*}÷ -DeleteLiveConfig7.google.cloud.video.stitcher.v1.DeleteLiveConfigRequest.google.longrunning.Operation"ŠÊAI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“1*//v1/{name=projects/*/locations/*/liveConfigs/*}· -UpdateLiveConfig7.google.cloud.video.stitcher.v1.UpdateLiveConfigRequest.google.longrunning.Operation"ÊÊA] -)google.cloud.video.stitcher.v1.LiveConfig0google.cloud.video.stitcher.v1.OperationMetadataÚAlive_config,update_mask‚Óä“J2;/v1/{live_config.name=projects/*/locations/*/liveConfigs/*}: live_config® -CreateVodConfig6.google.cloud.video.stitcher.v1.CreateVodConfigRequest.google.longrunning.Operation"ÃÊA\\ -(google.cloud.video.stitcher.v1.VodConfig0google.cloud.video.stitcher.v1.OperationMetadataÚAparent,vod_config,vod_config_id‚Óä“<"./v1/{parent=projects/*/locations/*}/vodConfigs: -vod_configÀ -ListVodConfigs5.google.cloud.video.stitcher.v1.ListVodConfigsRequest6.google.cloud.video.stitcher.v1.ListVodConfigsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/vodConfigs­ - GetVodConfig3.google.cloud.video.stitcher.v1.GetVodConfigRequest).google.cloud.video.stitcher.v1.VodConfig"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/vodConfigs/*}ô -DeleteVodConfig6.google.cloud.video.stitcher.v1.DeleteVodConfigRequest.google.longrunning.Operation"‰ÊAI -google.protobuf.Empty0google.cloud.video.stitcher.v1.OperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/vodConfigs/*}° -UpdateVodConfig6.google.cloud.video.stitcher.v1.UpdateVodConfigRequest.google.longrunning.Operation"ÅÊA\\ -(google.cloud.video.stitcher.v1.VodConfig0google.cloud.video.stitcher.v1.OperationMetadataÚAvod_config,update_mask‚Óä“G29/v1/{vod_config.name=projects/*/locations/*/vodConfigs/*}: -vod_configPÊAvideostitcher.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB -"com.google.cloud.video.stitcher.v1BVideoStitcherServiceProtoPZ>cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VodConfigs.php b/owl-bot-staging/VideoStitcher/v1/proto/src/GPBMetadata/Google/Cloud/Video/Stitcher/V1/VodConfigs.php deleted file mode 100644 index 1d96ab610cfad76628b3764f3729d4f0cca4c538..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1571 zcmb7E?@!Y}7bL1e7%tnM`Rwa&kDRInBf@5AD906dvC+MA>lpTt8(`6X{cb<>Y)+^LWkbueacK|6nDXw9 zPlXJ}a5h+5DkD@en;yr^L#|oFfz61|DQk)l>ebw3j?9;Yc5r;u&@Q+K|VP zvk))74k5!lWZqFUw*;7`C-Vl`%04mc1iMZJ57C%Vrt5Q7bCBCw&vCNOdw1QkC$o;l z>RZ0lHMn_(NZ3~=B$2V~IH_uNVYO1qQ?lL#-Ke;={vz_21Og1{$TK$j38E738J!a3L=c)(^G2 z5Yl$FBimvI@4(}P!5;z?R_-^|qAiLB$VbS^6R_Fomb->^an@-Y)n>hE)HWU{Yha~% zZj`&tv&Ke7Sp|9VNA2TARu*c;dm}33boW=8fS1v7)7{46h_wc)h%POqqMVBG`HXEI zXp`hL)m&google.cloud.video.stitcher.v1.AdRequest - */ -class AdRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The ad tag URI processed with integrated macros. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * The request metadata used to make the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; - */ - protected $request_metadata = null; - /** - * The response metadata received from the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; - */ - protected $response_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The ad tag URI processed with integrated macros. - * @type \Google\Cloud\Video\Stitcher\V1\RequestMetadata $request_metadata - * The request metadata used to make the ad request. - * @type \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $response_metadata - * The response metadata received from the ad request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The ad tag URI processed with integrated macros. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The ad tag URI processed with integrated macros. - * - * 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; - } - - /** - * The request metadata used to make the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; - * @return \Google\Cloud\Video\Stitcher\V1\RequestMetadata|null - */ - public function getRequestMetadata() - { - return $this->request_metadata; - } - - public function hasRequestMetadata() - { - return isset($this->request_metadata); - } - - public function clearRequestMetadata() - { - unset($this->request_metadata); - } - - /** - * The request metadata used to make the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.RequestMetadata request_metadata = 2; - * @param \Google\Cloud\Video\Stitcher\V1\RequestMetadata $var - * @return $this - */ - public function setRequestMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\RequestMetadata::class); - $this->request_metadata = $var; - - return $this; - } - - /** - * The response metadata received from the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; - * @return \Google\Cloud\Video\Stitcher\V1\ResponseMetadata|null - */ - public function getResponseMetadata() - { - return $this->response_metadata; - } - - public function hasResponseMetadata() - { - return isset($this->response_metadata); - } - - public function clearResponseMetadata() - { - unset($this->response_metadata); - } - - /** - * The response metadata received from the ad request. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ResponseMetadata response_metadata = 3; - * @param \Google\Cloud\Video\Stitcher\V1\ResponseMetadata $var - * @return $this - */ - public function setResponseMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ResponseMetadata::class); - $this->response_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php deleted file mode 100644 index 33dc179495cb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdStitchDetail.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.video.stitcher.v1.AdStitchDetail - */ -class AdStitchDetail extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ad break ID of the processed ad. - * - * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_break_id = ''; - /** - * Required. The ad ID of the processed ad. - * - * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_id = ''; - /** - * Required. The time offset of the processed ad. - * - * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_time_offset = null; - /** - * Optional. Indicates the reason why the ad has been skipped. - * - * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $skip_reason = ''; - /** - * Optional. The metadata of the chosen media file for the ad. - * - * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $media; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ad_break_id - * Required. The ad break ID of the processed ad. - * @type string $ad_id - * Required. The ad ID of the processed ad. - * @type \Google\Protobuf\Duration $ad_time_offset - * Required. The time offset of the processed ad. - * @type string $skip_reason - * Optional. Indicates the reason why the ad has been skipped. - * @type array|\Google\Protobuf\Internal\MapField $media - * Optional. The metadata of the chosen media file for the ad. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ad break ID of the processed ad. - * - * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAdBreakId() - { - return $this->ad_break_id; - } - - /** - * Required. The ad break ID of the processed ad. - * - * Generated from protobuf field string ad_break_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAdBreakId($var) - { - GPBUtil::checkString($var, True); - $this->ad_break_id = $var; - - return $this; - } - - /** - * Required. The ad ID of the processed ad. - * - * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAdId() - { - return $this->ad_id; - } - - /** - * Required. The ad ID of the processed ad. - * - * Generated from protobuf field string ad_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAdId($var) - { - GPBUtil::checkString($var, True); - $this->ad_id = $var; - - return $this; - } - - /** - * Required. The time offset of the processed ad. - * - * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getAdTimeOffset() - { - return $this->ad_time_offset; - } - - public function hasAdTimeOffset() - { - return isset($this->ad_time_offset); - } - - public function clearAdTimeOffset() - { - unset($this->ad_time_offset); - } - - /** - * Required. The time offset of the processed ad. - * - * Generated from protobuf field .google.protobuf.Duration ad_time_offset = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setAdTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ad_time_offset = $var; - - return $this; - } - - /** - * Optional. Indicates the reason why the ad has been skipped. - * - * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSkipReason() - { - return $this->skip_reason; - } - - /** - * Optional. Indicates the reason why the ad has been skipped. - * - * Generated from protobuf field string skip_reason = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSkipReason($var) - { - GPBUtil::checkString($var, True); - $this->skip_reason = $var; - - return $this; - } - - /** - * Optional. The metadata of the chosen media file for the ad. - * - * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMedia() - { - return $this->media; - } - - /** - * Optional. The metadata of the chosen media file for the ad. - * - * Generated from protobuf field map media = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMedia($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); - $this->media = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php deleted file mode 100644 index aa08c7d30db3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AdTracking.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.video.stitcher.v1.AdTracking - */ -class AdTracking -{ - /** - * The ad tracking policy is not specified. - * - * Generated from protobuf enum AD_TRACKING_UNSPECIFIED = 0; - */ - const AD_TRACKING_UNSPECIFIED = 0; - /** - * Client-side ad tracking is specified. The client player is expected to - * trigger playback and activity events itself. - * - * Generated from protobuf enum CLIENT = 1; - */ - const CLIENT = 1; - /** - * The Video Stitcher API will trigger playback events on behalf of - * the client player. - * - * Generated from protobuf enum SERVER = 2; - */ - const SERVER = 2; - - private static $valueToName = [ - self::AD_TRACKING_UNSPECIFIED => 'AD_TRACKING_UNSPECIFIED', - self::CLIENT => 'CLIENT', - self::SERVER => 'SERVER', - ]; - - 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php deleted file mode 100644 index 910d74fe0864..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/AkamaiCdnKey.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.AkamaiCdnKey - */ -class AkamaiCdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. Token key for the Akamai CDN edge configuration. - * - * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $token_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $token_key - * Input only. Token key for the Akamai CDN edge configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Input only. Token key for the Akamai CDN edge configuration. - * - * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getTokenKey() - { - return $this->token_key; - } - - /** - * Input only. Token key for the Akamai CDN edge configuration. - * - * Generated from protobuf field bytes token_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTokenKey($var) - { - GPBUtil::checkString($var, False); - $this->token_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php deleted file mode 100644 index c5c9fc8a7033..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CdnKey.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.video.stitcher.v1.CdnKey - */ -class CdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The hostname this key applies to. - * - * Generated from protobuf field string hostname = 4; - */ - protected $hostname = ''; - protected $cdn_key_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $google_cdn_key - * The configuration for a Google Cloud CDN key. - * @type \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $akamai_cdn_key - * The configuration for an Akamai CDN key. - * @type \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $media_cdn_key - * The configuration for a Media CDN key. - * @type string $name - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * @type string $hostname - * The hostname this key applies to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * The configuration for a Google Cloud CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; - * @return \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey|null - */ - public function getGoogleCdnKey() - { - return $this->readOneof(5); - } - - public function hasGoogleCdnKey() - { - return $this->hasOneof(5); - } - - /** - * The configuration for a Google Cloud CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GoogleCdnKey google_cdn_key = 5; - * @param \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey $var - * @return $this - */ - public function setGoogleCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GoogleCdnKey::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The configuration for an Akamai CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; - * @return \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey|null - */ - public function getAkamaiCdnKey() - { - return $this->readOneof(6); - } - - public function hasAkamaiCdnKey() - { - return $this->hasOneof(6); - } - - /** - * The configuration for an Akamai CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AkamaiCdnKey akamai_cdn_key = 6; - * @param \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey $var - * @return $this - */ - public function setAkamaiCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\AkamaiCdnKey::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The configuration for a Media CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; - * @return \Google\Cloud\Video\Stitcher\V1\MediaCdnKey|null - */ - public function getMediaCdnKey() - { - return $this->readOneof(8); - } - - public function hasMediaCdnKey() - { - return $this->hasOneof(8); - } - - /** - * The configuration for a Media CDN key. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey media_cdn_key = 8; - * @param \Google\Cloud\Video\Stitcher\V1\MediaCdnKey $var - * @return $this - */ - public function setMediaCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the CDN key, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * The name is ignored when creating a CDN key. - * - * 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 hostname this key applies to. - * - * Generated from protobuf field string hostname = 4; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The hostname this key applies to. - * - * Generated from protobuf field string hostname = 4; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * @return string - */ - public function getCdnKeyConfig() - { - return $this->whichOneof("cdn_key_config"); - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php deleted file mode 100644 index 6acf2dce062b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Companion.php +++ /dev/null @@ -1,455 +0,0 @@ -google.cloud.video.stitcher.v1.Companion - */ -class Companion extends \Google\Protobuf\Internal\Message -{ - /** - * The API necessary to communicate with the creative if available. - * - * Generated from protobuf field string api_framework = 1; - */ - protected $api_framework = ''; - /** - * The pixel height of the placement slot for the intended creative. - * - * Generated from protobuf field int32 height_px = 2; - */ - protected $height_px = 0; - /** - * The pixel width of the placement slot for the intended creative. - * - * Generated from protobuf field int32 width_px = 3; - */ - protected $width_px = 0; - /** - * The pixel height of the creative. - * - * Generated from protobuf field int32 asset_height_px = 4; - */ - protected $asset_height_px = 0; - /** - * The maximum pixel height of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_height_px = 5; - */ - protected $expanded_height_px = 0; - /** - * The pixel width of the creative. - * - * Generated from protobuf field int32 asset_width_px = 6; - */ - protected $asset_width_px = 0; - /** - * The maximum pixel width of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_width_px = 7; - */ - protected $expanded_width_px = 0; - /** - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * - * Generated from protobuf field string ad_slot_id = 8; - */ - protected $ad_slot_id = ''; - /** - * The list of tracking events for the companion. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; - */ - private $events; - protected $ad_resource; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\IframeAdResource $iframe_ad_resource - * The IFrame ad resource associated with the companion ad. - * @type \Google\Cloud\Video\Stitcher\V1\StaticAdResource $static_ad_resource - * The static ad resource associated with the companion ad. - * @type \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $html_ad_resource - * The HTML ad resource associated with the companion ad. - * @type string $api_framework - * The API necessary to communicate with the creative if available. - * @type int $height_px - * The pixel height of the placement slot for the intended creative. - * @type int $width_px - * The pixel width of the placement slot for the intended creative. - * @type int $asset_height_px - * The pixel height of the creative. - * @type int $expanded_height_px - * The maximum pixel height of the creative in its expanded state. - * @type int $asset_width_px - * The pixel width of the creative. - * @type int $expanded_width_px - * The maximum pixel width of the creative in its expanded state. - * @type string $ad_slot_id - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * The list of tracking events for the companion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * The IFrame ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; - * @return \Google\Cloud\Video\Stitcher\V1\IframeAdResource|null - */ - public function getIframeAdResource() - { - return $this->readOneof(10); - } - - public function hasIframeAdResource() - { - return $this->hasOneof(10); - } - - /** - * The IFrame ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.IframeAdResource iframe_ad_resource = 10; - * @param \Google\Cloud\Video\Stitcher\V1\IframeAdResource $var - * @return $this - */ - public function setIframeAdResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\IframeAdResource::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * The static ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; - * @return \Google\Cloud\Video\Stitcher\V1\StaticAdResource|null - */ - public function getStaticAdResource() - { - return $this->readOneof(11); - } - - public function hasStaticAdResource() - { - return $this->hasOneof(11); - } - - /** - * The static ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.StaticAdResource static_ad_resource = 11; - * @param \Google\Cloud\Video\Stitcher\V1\StaticAdResource $var - * @return $this - */ - public function setStaticAdResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\StaticAdResource::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The HTML ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; - * @return \Google\Cloud\Video\Stitcher\V1\HtmlAdResource|null - */ - public function getHtmlAdResource() - { - return $this->readOneof(12); - } - - public function hasHtmlAdResource() - { - return $this->hasOneof(12); - } - - /** - * The HTML ad resource associated with the companion ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.HtmlAdResource html_ad_resource = 12; - * @param \Google\Cloud\Video\Stitcher\V1\HtmlAdResource $var - * @return $this - */ - public function setHtmlAdResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\HtmlAdResource::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * The API necessary to communicate with the creative if available. - * - * Generated from protobuf field string api_framework = 1; - * @return string - */ - public function getApiFramework() - { - return $this->api_framework; - } - - /** - * The API necessary to communicate with the creative if available. - * - * Generated from protobuf field string api_framework = 1; - * @param string $var - * @return $this - */ - public function setApiFramework($var) - { - GPBUtil::checkString($var, True); - $this->api_framework = $var; - - return $this; - } - - /** - * The pixel height of the placement slot for the intended creative. - * - * Generated from protobuf field int32 height_px = 2; - * @return int - */ - public function getHeightPx() - { - return $this->height_px; - } - - /** - * The pixel height of the placement slot for the intended creative. - * - * Generated from protobuf field int32 height_px = 2; - * @param int $var - * @return $this - */ - public function setHeightPx($var) - { - GPBUtil::checkInt32($var); - $this->height_px = $var; - - return $this; - } - - /** - * The pixel width of the placement slot for the intended creative. - * - * Generated from protobuf field int32 width_px = 3; - * @return int - */ - public function getWidthPx() - { - return $this->width_px; - } - - /** - * The pixel width of the placement slot for the intended creative. - * - * Generated from protobuf field int32 width_px = 3; - * @param int $var - * @return $this - */ - public function setWidthPx($var) - { - GPBUtil::checkInt32($var); - $this->width_px = $var; - - return $this; - } - - /** - * The pixel height of the creative. - * - * Generated from protobuf field int32 asset_height_px = 4; - * @return int - */ - public function getAssetHeightPx() - { - return $this->asset_height_px; - } - - /** - * The pixel height of the creative. - * - * Generated from protobuf field int32 asset_height_px = 4; - * @param int $var - * @return $this - */ - public function setAssetHeightPx($var) - { - GPBUtil::checkInt32($var); - $this->asset_height_px = $var; - - return $this; - } - - /** - * The maximum pixel height of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_height_px = 5; - * @return int - */ - public function getExpandedHeightPx() - { - return $this->expanded_height_px; - } - - /** - * The maximum pixel height of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_height_px = 5; - * @param int $var - * @return $this - */ - public function setExpandedHeightPx($var) - { - GPBUtil::checkInt32($var); - $this->expanded_height_px = $var; - - return $this; - } - - /** - * The pixel width of the creative. - * - * Generated from protobuf field int32 asset_width_px = 6; - * @return int - */ - public function getAssetWidthPx() - { - return $this->asset_width_px; - } - - /** - * The pixel width of the creative. - * - * Generated from protobuf field int32 asset_width_px = 6; - * @param int $var - * @return $this - */ - public function setAssetWidthPx($var) - { - GPBUtil::checkInt32($var); - $this->asset_width_px = $var; - - return $this; - } - - /** - * The maximum pixel width of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_width_px = 7; - * @return int - */ - public function getExpandedWidthPx() - { - return $this->expanded_width_px; - } - - /** - * The maximum pixel width of the creative in its expanded state. - * - * Generated from protobuf field int32 expanded_width_px = 7; - * @param int $var - * @return $this - */ - public function setExpandedWidthPx($var) - { - GPBUtil::checkInt32($var); - $this->expanded_width_px = $var; - - return $this; - } - - /** - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * - * Generated from protobuf field string ad_slot_id = 8; - * @return string - */ - public function getAdSlotId() - { - return $this->ad_slot_id; - } - - /** - * The ID used to identify the desired placement on a publisher's page. - * Values to be used should be discussed between publishers and - * advertisers. - * - * Generated from protobuf field string ad_slot_id = 8; - * @param string $var - * @return $this - */ - public function setAdSlotId($var) - { - GPBUtil::checkString($var, True); - $this->ad_slot_id = $var; - - return $this; - } - - /** - * The list of tracking events for the companion. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The list of tracking events for the companion. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 9; - * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * @return string - */ - public function getAdResource() - { - return $this->whichOneof("ad_resource"); - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php deleted file mode 100644 index 19875411f716..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.CompanionAds - */ -class CompanionAds extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates how many of the companions should be displayed with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; - */ - protected $display_requirement = 0; - /** - * List of companion ads. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; - */ - private $companions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $display_requirement - * Indicates how many of the companions should be displayed with the ad. - * @type array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $companions - * List of companion ads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * Indicates how many of the companions should be displayed with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; - * @return int - */ - public function getDisplayRequirement() - { - return $this->display_requirement; - } - - /** - * Indicates how many of the companions should be displayed with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement display_requirement = 1; - * @param int $var - * @return $this - */ - public function setDisplayRequirement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds\DisplayRequirement::class); - $this->display_requirement = $var; - - return $this; - } - - /** - * List of companion ads. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCompanions() - { - return $this->companions; - } - - /** - * List of companion ads. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Companion companions = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\Companion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCompanions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Companion::class); - $this->companions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php deleted file mode 100644 index edcd46145e33..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CompanionAds/DisplayRequirement.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.stitcher.v1.CompanionAds.DisplayRequirement - */ -class DisplayRequirement -{ - /** - * Required companions are not specified. The default is ALL. - * - * Generated from protobuf enum DISPLAY_REQUIREMENT_UNSPECIFIED = 0; - */ - const DISPLAY_REQUIREMENT_UNSPECIFIED = 0; - /** - * All companions are required to be displayed. - * - * Generated from protobuf enum ALL = 1; - */ - const ALL = 1; - /** - * At least one of companions needs to be displayed. - * - * Generated from protobuf enum ANY = 2; - */ - const ANY = 2; - /** - * All companions are optional for display. - * - * Generated from protobuf enum NONE = 3; - */ - const NONE = 3; - - private static $valueToName = [ - self::DISPLAY_REQUIREMENT_UNSPECIFIED => 'DISPLAY_REQUIREMENT_UNSPECIFIED', - self::ALL => 'ALL', - self::ANY => 'ANY', - self::NONE => 'NONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DisplayRequirement::class, \Google\Cloud\Video\Stitcher\V1\CompanionAds_DisplayRequirement::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php deleted file mode 100644 index 86b5b6d68253..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateCdnKeyRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.video.stitcher.v1.CreateCdnKeyRequest - */ -class CreateCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The CDN key resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cdn_key = null; - /** - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cdn_key_id = ''; - - /** - * @param string $parent Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource to create. - * @param string $cdnKeyId Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateCdnKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, string $cdnKeyId): self - { - return (new self()) - ->setParent($parent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/locations/{location}`. - * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key - * Required. The CDN key resource to create. - * @type string $cdn_key_id - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/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. The project in which the CDN key should be created, in the form - * of `projects/{project_number}/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; - } - - /** - * Required. The CDN key resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null - */ - public function getCdnKey() - { - return $this->cdn_key; - } - - public function hasCdnKey() - { - return isset($this->cdn_key); - } - - public function clearCdnKey() - { - unset($this->cdn_key); - } - - /** - * Required. The CDN key resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var - * @return $this - */ - public function setCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); - $this->cdn_key = $var; - - return $this; - } - - /** - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCdnKeyId() - { - return $this->cdn_key_id; - } - - /** - * Required. The ID to use for the CDN key, which will become the final - * component of the CDN key's resource name. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string cdn_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCdnKeyId($var) - { - GPBUtil::checkString($var, True); - $this->cdn_key_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php deleted file mode 100644 index 2e55e807afd3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveConfigRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.stitcher.v1.CreateLiveConfigRequest - */ -class CreateLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The unique identifier ID to use for the live config. - * - * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_config_id = ''; - /** - * Required. The live config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_config = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig Required. The live config resource to create. - * @param string $liveConfigId Required. The unique identifier ID to use for the live config. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig, string $liveConfigId): self - { - return (new self()) - ->setParent($parent) - ->setLiveConfig($liveConfig) - ->setLiveConfigId($liveConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * @type string $live_config_id - * Required. The unique identifier ID to use for the live config. - * @type \Google\Cloud\Video\Stitcher\V1\LiveConfig $live_config - * Required. The live config resource to create. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the live config should be created, in - * the form of `projects/{project_number}/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. The project in which the live config should be created, in - * the form of `projects/{project_number}/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; - } - - /** - * Required. The unique identifier ID to use for the live config. - * - * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLiveConfigId() - { - return $this->live_config_id; - } - - /** - * Required. The unique identifier ID to use for the live config. - * - * Generated from protobuf field string live_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLiveConfigId($var) - { - GPBUtil::checkString($var, True); - $this->live_config_id = $var; - - return $this; - } - - /** - * Required. The live config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig|null - */ - public function getLiveConfig() - { - return $this->live_config; - } - - public function hasLiveConfig() - { - return isset($this->live_config); - } - - public function clearLiveConfig() - { - unset($this->live_config); - } - - /** - * Required. The live config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $var - * @return $this - */ - public function setLiveConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); - $this->live_config = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php deleted file mode 100644 index 76a9ea13ef7d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateLiveSessionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.stitcher.v1.CreateLiveSessionRequest - */ -class CreateLiveSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating a live session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_session = null; - - /** - * @param string $parent Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession Required. Parameters for creating a live session. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateLiveSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\LiveSession $liveSession): self - { - return (new self()) - ->setParent($parent) - ->setLiveSession($liveSession); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * @type \Google\Cloud\Video\Stitcher\V1\LiveSession $live_session - * Required. Parameters for creating a live session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/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. The project and location in which the live session should be - * created, in the form of `projects/{project_number}/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; - } - - /** - * Required. Parameters for creating a live session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\LiveSession|null - */ - public function getLiveSession() - { - return $this->live_session; - } - - public function hasLiveSession() - { - return isset($this->live_session); - } - - public function clearLiveSession() - { - unset($this->live_session); - } - - /** - * Required. Parameters for creating a live session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession live_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\LiveSession $var - * @return $this - */ - public function setLiveSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession::class); - $this->live_session = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php deleted file mode 100644 index f1cd04f9e2da..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateSlateRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.video.stitcher.v1.CreateSlateRequest - */ -class CreateSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $slate_id = ''; - /** - * Required. The slate to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $slate = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The slate to create. - * @param string $slateId Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateSlateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\Slate $slate, string $slateId): self - { - return (new self()) - ->setParent($parent) - ->setSlate($slate) - ->setSlateId($slateId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/locations/{location}`. - * @type string $slate_id - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate - * Required. The slate to create. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the slate should be created, in the form of - * `projects/{project_number}/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. The project in which the slate should be created, in the form of - * `projects/{project_number}/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; - } - - /** - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSlateId() - { - return $this->slate_id; - } - - /** - * Required. The unique identifier for the slate. - * This value should conform to RFC-1034, which restricts to - * lower-case letters, numbers, and hyphen, with the first character a - * letter, the last a letter or a number, and a 63 character maximum. - * - * Generated from protobuf field string slate_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSlateId($var) - { - GPBUtil::checkString($var, True); - $this->slate_id = $var; - - return $this; - } - - /** - * Required. The slate to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\Slate|null - */ - public function getSlate() - { - return $this->slate; - } - - public function hasSlate() - { - return isset($this->slate); - } - - public function clearSlate() - { - unset($this->slate); - } - - /** - * Required. The slate to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\Slate $var - * @return $this - */ - public function setSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); - $this->slate = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php deleted file mode 100644 index 208af090748b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodConfigRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.video.stitcher.v1.CreateVodConfigRequest - */ -class CreateVodConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the VOD config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The unique identifier ID to use for the VOD config. - * - * Generated from protobuf field string vod_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vod_config_id = ''; - /** - * Required. The VOD config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vod_config = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. The project in which the VOD config should be created, in - * the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig Required. The VOD config resource to create. - * @param string $vodConfigId Required. The unique identifier ID to use for the VOD config. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateVodConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig, string $vodConfigId): self - { - return (new self()) - ->setParent($parent) - ->setVodConfig($vodConfig) - ->setVodConfigId($vodConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the VOD config should be created, in - * the form of `projects/{project_number}/locations/{location}`. - * @type string $vod_config_id - * Required. The unique identifier ID to use for the VOD config. - * @type \Google\Cloud\Video\Stitcher\V1\VodConfig $vod_config - * Required. The VOD config resource to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the VOD config should be created, in - * the form of `projects/{project_number}/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. The project in which the VOD config should be created, in - * the form of `projects/{project_number}/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; - } - - /** - * Required. The unique identifier ID to use for the VOD config. - * - * Generated from protobuf field string vod_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVodConfigId() - { - return $this->vod_config_id; - } - - /** - * Required. The unique identifier ID to use for the VOD config. - * - * Generated from protobuf field string vod_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVodConfigId($var) - { - GPBUtil::checkString($var, True); - $this->vod_config_id = $var; - - return $this; - } - - /** - * Required. The VOD config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\VodConfig|null - */ - public function getVodConfig() - { - return $this->vod_config; - } - - public function hasVodConfig() - { - return isset($this->vod_config); - } - - public function clearVodConfig() - { - unset($this->vod_config); - } - - /** - * Required. The VOD config resource to create. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $var - * @return $this - */ - public function setVodConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodConfig::class); - $this->vod_config = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php deleted file mode 100644 index 14e94a02e824..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/CreateVodSessionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.stitcher.v1.CreateVodSessionRequest - */ -class CreateVodSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating a session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vod_session = null; - - /** - * @param string $parent Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession Required. Parameters for creating a session. - * - * @return \Google\Cloud\Video\Stitcher\V1\CreateVodSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Stitcher\V1\VodSession $vodSession): self - { - return (new self()) - ->setParent($parent) - ->setVodSession($vodSession); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/locations/{location}`. - * @type \Google\Cloud\Video\Stitcher\V1\VodSession $vod_session - * Required. Parameters for creating a session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/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. The project and location in which the VOD session should be - * created, in the form of `projects/{project_number}/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; - } - - /** - * Required. Parameters for creating a session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\VodSession|null - */ - public function getVodSession() - { - return $this->vod_session; - } - - public function hasVodSession() - { - return isset($this->vod_session); - } - - public function clearVodSession() - { - unset($this->vod_session); - } - - /** - * Required. Parameters for creating a session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession vod_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\VodSession $var - * @return $this - */ - public function setVodSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession::class); - $this->vod_session = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php deleted file mode 100644 index 7e1f8d4d0f91..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteCdnKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteCdnKeyRequest - */ -class DeleteCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{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 CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. Please see - * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest - * - * @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 CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{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 CDN key to be deleted, in the form of - * `projects/{project_number}/locations/{location}/cdnKeys/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php deleted file mode 100644 index c0b9429e5375..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteLiveConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteLiveConfigRequest - */ -class DeleteLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see - * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest - * - * @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 live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/liveConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php deleted file mode 100644 index 6cdc43bb27e4..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteSlateRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteSlateRequest - */ -class DeleteSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{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 slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. Please see - * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest - * - * @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 slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{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 slate to be deleted, in the form of - * `projects/{project_number}/locations/{location}/slates/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php deleted file mode 100644 index a2432e058c66..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/DeleteVodConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.DeleteVodConfigRequest - */ -class DeleteVodConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the VOD config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/vodConfigs/{id}`. Please see - * {@see VideoStitcherServiceClient::vodConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\DeleteVodConfigRequest - * - * @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 VOD config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/vodConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the VOD config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be deleted, in the form of - * `projects/{project_number}/locations/{location}/vodConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php deleted file mode 100644 index c9ea208c2db7..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.video.stitcher.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Describes the event that occurred. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; - */ - protected $type = 0; - /** - * The URI to trigger for this event. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * The ID of the event. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * The offset in seconds if the event type is `PROGRESS`. - * - * Generated from protobuf field .google.protobuf.Duration offset = 4; - */ - protected $offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Describes the event that occurred. - * @type string $uri - * The URI to trigger for this event. - * @type string $id - * The ID of the event. - * @type \Google\Protobuf\Duration $offset - * The offset in seconds if the event type is `PROGRESS`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); - parent::__construct($data); - } - - /** - * Describes the event that occurred. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Describes the event that occurred. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Event.EventType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\Event\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * The URI to trigger for this event. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI to trigger for this event. - * - * 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; - } - - /** - * The ID of the event. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of the event. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The offset in seconds if the event type is `PROGRESS`. - * - * Generated from protobuf field .google.protobuf.Duration offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * The offset in seconds if the event type is `PROGRESS`. - * - * Generated from protobuf field .google.protobuf.Duration offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php deleted file mode 100644 index 5d323e3ef361..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Event/EventType.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.video.stitcher.v1.Event.EventType - */ -class EventType -{ - /** - * The event type is unspecified. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * First frame of creative ad viewed. - * - * Generated from protobuf enum CREATIVE_VIEW = 1; - */ - const CREATIVE_VIEW = 1; - /** - * Creative ad started. - * - * Generated from protobuf enum START = 2; - */ - const START = 2; - /** - * Start of an ad break. - * - * Generated from protobuf enum BREAK_START = 3; - */ - const BREAK_START = 3; - /** - * End of an ad break. - * - * Generated from protobuf enum BREAK_END = 4; - */ - const BREAK_END = 4; - /** - * Impression. - * - * Generated from protobuf enum IMPRESSION = 5; - */ - const IMPRESSION = 5; - /** - * First quartile progress. - * - * Generated from protobuf enum FIRST_QUARTILE = 6; - */ - const FIRST_QUARTILE = 6; - /** - * Midpoint progress. - * - * Generated from protobuf enum MIDPOINT = 7; - */ - const MIDPOINT = 7; - /** - * Third quartile progress. - * - * Generated from protobuf enum THIRD_QUARTILE = 8; - */ - const THIRD_QUARTILE = 8; - /** - * Ad progress completed. - * - * Generated from protobuf enum COMPLETE = 9; - */ - const COMPLETE = 9; - /** - * Specific progress event with an offset. - * - * Generated from protobuf enum PROGRESS = 10; - */ - const PROGRESS = 10; - /** - * Player muted. - * - * Generated from protobuf enum MUTE = 11; - */ - const MUTE = 11; - /** - * Player unmuted. - * - * Generated from protobuf enum UNMUTE = 12; - */ - const UNMUTE = 12; - /** - * Player paused. - * - * Generated from protobuf enum PAUSE = 13; - */ - const PAUSE = 13; - /** - * Click event. - * - * Generated from protobuf enum CLICK = 14; - */ - const CLICK = 14; - /** - * Click-through event. - * - * Generated from protobuf enum CLICK_THROUGH = 15; - */ - const CLICK_THROUGH = 15; - /** - * Player rewinding. - * - * Generated from protobuf enum REWIND = 16; - */ - const REWIND = 16; - /** - * Player resumed. - * - * Generated from protobuf enum RESUME = 17; - */ - const RESUME = 17; - /** - * Error event. - * - * Generated from protobuf enum ERROR = 18; - */ - const ERROR = 18; - /** - * Ad expanded to a larger size. - * - * Generated from protobuf enum EXPAND = 21; - */ - const EXPAND = 21; - /** - * Ad collapsed to a smaller size. - * - * Generated from protobuf enum COLLAPSE = 22; - */ - const COLLAPSE = 22; - /** - * Non-linear ad closed. - * - * Generated from protobuf enum CLOSE = 24; - */ - const CLOSE = 24; - /** - * Linear ad closed. - * - * Generated from protobuf enum CLOSE_LINEAR = 25; - */ - const CLOSE_LINEAR = 25; - /** - * Ad skipped. - * - * Generated from protobuf enum SKIP = 26; - */ - const SKIP = 26; - /** - * Accept invitation event. - * - * Generated from protobuf enum ACCEPT_INVITATION = 27; - */ - const ACCEPT_INVITATION = 27; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::CREATIVE_VIEW => 'CREATIVE_VIEW', - self::START => 'START', - self::BREAK_START => 'BREAK_START', - self::BREAK_END => 'BREAK_END', - self::IMPRESSION => 'IMPRESSION', - self::FIRST_QUARTILE => 'FIRST_QUARTILE', - self::MIDPOINT => 'MIDPOINT', - self::THIRD_QUARTILE => 'THIRD_QUARTILE', - self::COMPLETE => 'COMPLETE', - self::PROGRESS => 'PROGRESS', - self::MUTE => 'MUTE', - self::UNMUTE => 'UNMUTE', - self::PAUSE => 'PAUSE', - self::CLICK => 'CLICK', - self::CLICK_THROUGH => 'CLICK_THROUGH', - self::REWIND => 'REWIND', - self::RESUME => 'RESUME', - self::ERROR => 'ERROR', - self::EXPAND => 'EXPAND', - self::COLLAPSE => 'COLLAPSE', - self::CLOSE => 'CLOSE', - self::CLOSE_LINEAR => 'CLOSE_LINEAR', - self::SKIP => 'SKIP', - self::ACCEPT_INVITATION => 'ACCEPT_INVITATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Video\Stitcher\V1\Event_EventType::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php deleted file mode 100644 index a74531fbba30..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/FetchOptions.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.stitcher.v1.FetchOptions - */ -class FetchOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Custom headers to pass into fetch request. - * Headers must have a maximum of 3 key value pairs. - * Each key value pair must have a maximum of 256 characters per key and 256 - * characters per value. - * - * Generated from protobuf field map headers = 1; - */ - private $headers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $headers - * Custom headers to pass into fetch request. - * Headers must have a maximum of 3 key value pairs. - * Each key value pair must have a maximum of 256 characters per key and 256 - * characters per value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\FetchOptions::initOnce(); - parent::__construct($data); - } - - /** - * Custom headers to pass into fetch request. - * Headers must have a maximum of 3 key value pairs. - * Each key value pair must have a maximum of 256 characters per key and 256 - * characters per value. - * - * Generated from protobuf field map headers = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Custom headers to pass into fetch request. - * Headers must have a maximum of 3 key value pairs. - * Each key value pair must have a maximum of 256 characters per key and 256 - * characters per value. - * - * Generated from protobuf field map headers = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php deleted file mode 100644 index 74a1dd80906a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamLiveConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.GamLiveConfig - */ -class GamLiveConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - /** - * Output only. The asset key identifier generated for the live config. - * - * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_key = ''; - /** - * Output only. The custom asset key identifier generated for the live config. - * - * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $custom_asset_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code to associate with the live config. - * @type string $asset_key - * Output only. The asset key identifier generated for the live config. - * @type string $custom_asset_key - * Output only. The custom asset key identifier generated for the live config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - - /** - * Output only. The asset key identifier generated for the live config. - * - * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAssetKey() - { - return $this->asset_key; - } - - /** - * Output only. The asset key identifier generated for the live config. - * - * Generated from protobuf field string asset_key = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAssetKey($var) - { - GPBUtil::checkString($var, True); - $this->asset_key = $var; - - return $this; - } - - /** - * Output only. The custom asset key identifier generated for the live config. - * - * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCustomAssetKey() - { - return $this->custom_asset_key; - } - - /** - * Output only. The custom asset key identifier generated for the live config. - * - * Generated from protobuf field string custom_asset_key = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCustomAssetKey($var) - { - GPBUtil::checkString($var, True); - $this->custom_asset_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php deleted file mode 100644 index 9b252aab9008..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GamVodConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.GamVodConfig - */ -class GamVodConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code to associate with the VOD config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code to associate with the VOD config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VodConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code to associate with the VOD config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code to associate with the VOD config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php deleted file mode 100644 index 60883c4c2bcb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetCdnKeyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetCdnKeyRequest - */ -class GetCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{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 CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. Please see - * {@see VideoStitcherServiceClient::cdnKeyName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetCdnKeyRequest - * - * @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 CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{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 CDN key to be retrieved, in the form of - * `projects/{project}/locations/{location}/cdnKeys/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php deleted file mode 100644 index 0bb9510c90d2..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveAdTagDetailRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetLiveAdTagDetailRequest - */ -class GetLiveAdTagDetailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * - * 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 in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. Please see - * {@see VideoStitcherServiceClient::liveAdTagDetailName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetLiveAdTagDetailRequest - * - * @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 in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * - * 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 in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}`. - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php deleted file mode 100644 index 903077856948..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveConfigRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.stitcher.v1.GetLiveConfigRequest - */ -class GetLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. Please see - * {@see VideoStitcherServiceClient::liveConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetLiveConfigRequest - * - * @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 live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{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 live config to be retrieved, in the form - * of - * `projects/{project_number}/locations/{location}/liveConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php deleted file mode 100644 index a3ba9f66b9a9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetLiveSessionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetLiveSessionRequest - */ -class GetLiveSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{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 live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. Please see - * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest - * - * @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 live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{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 live session, in the form of - * `projects/{project_number}/locations/{location}/liveSessions/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php deleted file mode 100644 index 220a34dfa77c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetSlateRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetSlateRequest - */ -class GetSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{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 slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. Please see - * {@see VideoStitcherServiceClient::slateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetSlateRequest - * - * @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 slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{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 slate to be retrieved, of the slate, in the form - * of `projects/{project_number}/locations/{location}/slates/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php deleted file mode 100644 index b3f841410af0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodAdTagDetailRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodAdTagDetailRequest - */ -class GetVodAdTagDetailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * - * 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 ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. Please see - * {@see VideoStitcherServiceClient::vodAdTagDetailName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodAdTagDetailRequest - * - * @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 ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * - * 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 ad tag detail for the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{vod_ad_tag_detail}`. - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php deleted file mode 100644 index 961a43a3606e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodConfigRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodConfigRequest - */ -class GetVodConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the VOD config to be retrieved, in the form - * of `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be retrieved, in the form - * of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. Please see - * {@see VideoStitcherServiceClient::vodConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodConfigRequest - * - * @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 VOD config to be retrieved, in the form - * of `projects/{project_number}/locations/{location}/vodConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the VOD config to be retrieved, in the form - * of `projects/{project_number}/locations/{location}/vodConfigs/{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 VOD config to be retrieved, in the form - * of `projects/{project_number}/locations/{location}/vodConfigs/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php deleted file mode 100644 index 523db81a33c9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodSessionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodSessionRequest - */ -class GetVodSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{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 VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. Please see - * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodSessionRequest - * - * @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 VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{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 VOD session to be retrieved, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php deleted file mode 100644 index 019ccfb7cd94..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GetVodStitchDetailRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.stitcher.v1.GetVodStitchDetailRequest - */ -class GetVodStitchDetailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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 stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. Please see - * {@see VideoStitcherServiceClient::vodStitchDetailName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\GetVodStitchDetailRequest - * - * @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 stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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 stitch detail in the specified VOD session, in - * the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php deleted file mode 100644 index afa7b822bf12..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/GoogleCdnKey.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.GoogleCdnKey - */ -class GoogleCdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. Secret for this Google Cloud CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $private_key = ''; - /** - * The public name of the Google Cloud CDN key. - * - * Generated from protobuf field string key_name = 2; - */ - protected $key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_key - * Input only. Secret for this Google Cloud CDN key. - * @type string $key_name - * The public name of the Google Cloud CDN key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Input only. Secret for this Google Cloud CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPrivateKey() - { - return $this->private_key; - } - - /** - * Input only. Secret for this Google Cloud CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, False); - $this->private_key = $var; - - return $this; - } - - /** - * The public name of the Google Cloud CDN key. - * - * Generated from protobuf field string key_name = 2; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The public name of the Google Cloud CDN key. - * - * Generated from protobuf field string key_name = 2; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php deleted file mode 100644 index 3e45e33af960..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/HtmlAdResource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.HtmlAdResource - */ -class HtmlAdResource extends \Google\Protobuf\Internal\Message -{ - /** - * The HTML to display for the ad resource. - * - * Generated from protobuf field string html_source = 1; - */ - protected $html_source = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $html_source - * The HTML to display for the ad resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * The HTML to display for the ad resource. - * - * Generated from protobuf field string html_source = 1; - * @return string - */ - public function getHtmlSource() - { - return $this->html_source; - } - - /** - * The HTML to display for the ad resource. - * - * Generated from protobuf field string html_source = 1; - * @param string $var - * @return $this - */ - public function setHtmlSource($var) - { - GPBUtil::checkString($var, True); - $this->html_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php deleted file mode 100644 index 3251ce7c39b3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/IframeAdResource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.stitcher.v1.IframeAdResource - */ -class IframeAdResource extends \Google\Protobuf\Internal\Message -{ - /** - * URI source for an IFrame to display for the ad resource. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI source for an IFrame to display for the ad resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * URI source for an IFrame to display for the ad resource. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI source for an IFrame to display for the ad resource. - * - * 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; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php deleted file mode 100644 index 11acfce74a28..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Interstitials.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.stitcher.v1.Interstitials - */ -class Interstitials extends \Google\Protobuf\Internal\Message -{ - /** - * List of ad breaks ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; - */ - private $ad_breaks; - /** - * Information related to the content of the VOD session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; - */ - protected $session_content = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks - * List of ad breaks ordered by time. - * @type \Google\Cloud\Video\Stitcher\V1\VodSessionContent $session_content - * Information related to the content of the VOD session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * List of ad breaks ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdBreaks() - { - return $this->ad_breaks; - } - - /** - * List of ad breaks ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAdBreak ad_breaks = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAdBreak::class); - $this->ad_breaks = $arr; - - return $this; - } - - /** - * Information related to the content of the VOD session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; - * @return \Google\Cloud\Video\Stitcher\V1\VodSessionContent|null - */ - public function getSessionContent() - { - return $this->session_content; - } - - public function hasSessionContent() - { - return isset($this->session_content); - } - - public function clearSessionContent() - { - unset($this->session_content); - } - - /** - * Information related to the content of the VOD session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSessionContent session_content = 2; - * @param \Google\Cloud\Video\Stitcher\V1\VodSessionContent $var - * @return $this - */ - public function setSessionContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSessionContent::class); - $this->session_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php deleted file mode 100644 index 18c76416ec3f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.video.stitcher.v1.ListCdnKeysRequest - */ -class ListCdnKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * - * 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. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest - * - * @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 project that contains the list of CDN keys, in the form of - * `projects/{project_number}/locations/{location}`. - * @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\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/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. The project that contains the list of CDN keys, in the form of - * `projects/{project_number}/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; - } - - /** - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php deleted file mode 100644 index fdb7d35e26a0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListCdnKeysResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListCdnKeysResponse - */ -class ListCdnKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of CDN keys. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; - */ - private $cdn_keys; - /** - * 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 array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $cdn_keys - * List of CDN keys. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * List of CDN keys. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCdnKeys() - { - return $this->cdn_keys; - } - - /** - * List of CDN keys. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.CdnKey cdn_keys = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\CdnKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCdnKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); - $this->cdn_keys = $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php deleted file mode 100644 index d14bea8f5f75..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveAdTagDetailsRequest - */ -class ListLiveAdTagDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The pagination token returned from a previous List request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. Please see - * {@see VideoStitcherServiceClient::liveSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsRequest - * - * @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 parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The pagination token returned from a previous List request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * - * 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 parent in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}`. - * - * 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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The pagination token returned from a previous List request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The pagination token returned from a previous List request. - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php deleted file mode 100644 index 934491dee650..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveAdTagDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveAdTagDetailsResponse - */ -class ListLiveAdTagDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of live session ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; - */ - private $live_ad_tag_details; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $live_ad_tag_details - * A list of live session ad tag details. - * @type string $next_page_token - * The pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * A list of live session ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLiveAdTagDetails() - { - return $this->live_ad_tag_details; - } - - /** - * A list of live session ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveAdTagDetail live_ad_tag_details = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLiveAdTagDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail::class); - $this->live_ad_tag_details = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php deleted file mode 100644 index d45ae42d9d2d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveConfigsRequest - */ -class ListLiveConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest - * - * @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 project that contains the list of live configs, in the - * form of `projects/{project_number}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type string $filter - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * @type string $order_by - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that contains the list of live configs, in the - * form of `projects/{project_number}/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. The project that contains the list of live configs, in the - * form of `projects/{project_number}/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; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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; - } - - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * 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; - } - - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php deleted file mode 100644 index 1eae2969f2b1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListLiveConfigsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListLiveConfigsResponse - */ -class ListLiveConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of live configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; - */ - private $live_configs; - /** - * The pagination token. - * - * 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 array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $live_configs - * List of live configs. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * List of live configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLiveConfigs() - { - return $this->live_configs; - } - - /** - * List of live configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.LiveConfig live_configs = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\LiveConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLiveConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); - $this->live_configs = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php deleted file mode 100644 index 7c24832d2b8a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.video.stitcher.v1.ListSlatesRequest - */ -class ListSlatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * - * 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. The project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListSlatesRequest - * - * @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 project to list slates, in the form of - * `projects/{project_number}/locations/{location}`. - * @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\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to list slates, in the form of - * `projects/{project_number}/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. The project to list slates, in the form of - * `projects/{project_number}/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; - } - - /** - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php deleted file mode 100644 index d66e458e1618..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListSlatesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListSlatesResponse - */ -class ListSlatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of slates - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; - */ - private $slates; - /** - * 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 array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $slates - * The list of slates - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * The list of slates - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSlates() - { - return $this->slates; - } - - /** - * The list of slates - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Slate slates = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\Slate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSlates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Slate::class); - $this->slates = $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 \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php deleted file mode 100644 index a2f4d620fe34..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodAdTagDetailsRequest - */ -class ListVodAdTagDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. Please see - * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsRequest - * - * @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 VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_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 VOD session which the ad tag details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{vod_session_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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php deleted file mode 100644 index 47ccb4edaccb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodAdTagDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodAdTagDetailsResponse - */ -class ListVodAdTagDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A List of ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; - */ - private $vod_ad_tag_details; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $vod_ad_tag_details - * A List of ad tag details. - * @type string $next_page_token - * The pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * A List of ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVodAdTagDetails() - { - return $this->vod_ad_tag_details; - } - - /** - * A List of ad tag details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodAdTagDetail vod_ad_tag_details = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodAdTagDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVodAdTagDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodAdTagDetail::class); - $this->vod_ad_tag_details = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php deleted file mode 100644 index 62a6511ad13d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodConfigsRequest - */ -class ListVodConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project that contains the list of VOD configs, in the - * form of `projects/{project_number}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project that contains the list of VOD configs, in the - * form of `projects/{project_number}/locations/{location}`. Please see - * {@see VideoStitcherServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListVodConfigsRequest - * - * @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 project that contains the list of VOD configs, in the - * form of `projects/{project_number}/locations/{location}`. - * @type int $page_size - * Optional. The maximum number of items to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * @type string $order_by - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project that contains the list of VOD configs, in the - * form of `projects/{project_number}/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. The project that contains the list of VOD configs, in the - * form of `projects/{project_number}/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 maximum number of items to return. - * - * 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 items to return. - * - * 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. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * 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 to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter to apply to list results (see - * [Filtering](https://google.aip.dev/160)). - * - * 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; - } - - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results following - * [Cloud API - * syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). - * - * Generated from protobuf field string order_by = 5 [(.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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php deleted file mode 100644 index 53f656d03a7e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodConfigsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodConfigsResponse - */ -class ListVodConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of VOD configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodConfig vod_configs = 1; - */ - private $vod_configs; - /** - * The pagination token. - * - * 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 array<\Google\Cloud\Video\Stitcher\V1\VodConfig>|\Google\Protobuf\Internal\RepeatedField $vod_configs - * List of VOD configs. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * List of VOD configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodConfig vod_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVodConfigs() - { - return $this->vod_configs; - } - - /** - * List of VOD configs. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodConfig vod_configs = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVodConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodConfig::class); - $this->vod_configs = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php deleted file mode 100644 index 03a33b3b21dc..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodStitchDetailsRequest - */ -class ListVodStitchDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. Please see - * {@see VideoStitcherServiceClient::vodSessionName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsRequest - * - * @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 VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{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 VOD session where the stitch details belong to, in the form - * of `projects/{project}/locations/{location}/vodSessions/{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 items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php deleted file mode 100644 index 202317ab5600..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ListVodStitchDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.ListVodStitchDetailsResponse - */ -class ListVodStitchDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A List of stitch Details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; - */ - private $vod_stitch_details; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $vod_stitch_details - * A List of stitch Details. - * @type string $next_page_token - * The pagination token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * A List of stitch Details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVodStitchDetails() - { - return $this->vod_stitch_details; - } - - /** - * A List of stitch Details. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodStitchDetail vod_stitch_details = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVodStitchDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodStitchDetail::class); - $this->vod_stitch_details = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php deleted file mode 100644 index ec8d74fb88a1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveAdTagDetail.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.video.stitcher.v1.LiveAdTagDetail - */ -class LiveAdTagDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A list of ad requests. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - */ - private $ad_requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests - * A list of ad requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name in the form of - * `projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{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; - } - - /** - * A list of ad requests. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdRequests() - { - return $this->ad_requests; - } - - /** - * A list of ad requests. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); - $this->ad_requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php deleted file mode 100644 index 6428b9a34747..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig.php +++ /dev/null @@ -1,427 +0,0 @@ -google.cloud.video.stitcher.v1.LiveConfig - */ -class LiveConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Source URI for the live stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_uri = ''; - /** - * The default ad tag associated with this live stream config. - * - * Generated from protobuf field string ad_tag_uri = 3; - */ - protected $ad_tag_uri = ''; - /** - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; - */ - protected $gam_live_config = null; - /** - * Output only. State of the live config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Determines how the ads are tracked. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_tracking = 0; - /** - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * - * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { - */ - protected $default_slate = ''; - /** - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; - */ - protected $stitching_policy = 0; - /** - * The configuration for prefetching ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; - */ - protected $prefetch_config = null; - /** - * Options for fetching source manifests and segments. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 16; - */ - protected $source_fetch_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * @type string $source_uri - * Required. Source URI for the live stream manifest. - * @type string $ad_tag_uri - * The default ad tag associated with this live stream config. - * @type \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $gam_live_config - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * @type int $state - * Output only. State of the live config. - * @type int $ad_tracking - * Required. Determines how the ads are tracked. - * @type string $default_slate - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * @type int $stitching_policy - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * @type \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $prefetch_config - * The configuration for prefetching ads. - * @type \Google\Cloud\Video\Stitcher\V1\FetchOptions $source_fetch_options - * Options for fetching source manifests and segments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * 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 live config, in the form of - * `projects/{project}/locations/{location}/liveConfigs/{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; - } - - /** - * Required. Source URI for the live stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceUri() - { - return $this->source_uri; - } - - /** - * Required. Source URI for the live stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->source_uri = $var; - - return $this; - } - - /** - * The default ad tag associated with this live stream config. - * - * Generated from protobuf field string ad_tag_uri = 3; - * @return string - */ - public function getAdTagUri() - { - return $this->ad_tag_uri; - } - - /** - * The default ad tag associated with this live stream config. - * - * Generated from protobuf field string ad_tag_uri = 3; - * @param string $var - * @return $this - */ - public function setAdTagUri($var) - { - GPBUtil::checkString($var, True); - $this->ad_tag_uri = $var; - - return $this; - } - - /** - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; - * @return \Google\Cloud\Video\Stitcher\V1\GamLiveConfig|null - */ - public function getGamLiveConfig() - { - return $this->gam_live_config; - } - - public function hasGamLiveConfig() - { - return isset($this->gam_live_config); - } - - public function clearGamLiveConfig() - { - unset($this->gam_live_config); - } - - /** - * Additional metadata used to register a live stream with Google Ad Manager - * (GAM) - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamLiveConfig gam_live_config = 4; - * @param \Google\Cloud\Video\Stitcher\V1\GamLiveConfig $var - * @return $this - */ - public function setGamLiveConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GamLiveConfig::class); - $this->gam_live_config = $var; - - return $this; - } - - /** - * Output only. State of the live config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the live config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Determines how the ads are tracked. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAdTracking() - { - return $this->ad_tracking; - } - - /** - * Required. Determines how the ads are tracked. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAdTracking($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); - $this->ad_tracking = $var; - - return $this; - } - - /** - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * - * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { - * @return string - */ - public function getDefaultSlate() - { - return $this->default_slate; - } - - /** - * This must refer to a slate in the same - * project. If Google Ad Manager (GAM) is used for ads, this string sets the - * value of `slateCreativeId` in - * https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId - * - * Generated from protobuf field string default_slate = 7 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDefaultSlate($var) - { - GPBUtil::checkString($var, True); - $this->default_slate = $var; - - return $this; - } - - /** - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; - * @return int - */ - public function getStitchingPolicy() - { - return $this->stitching_policy; - } - - /** - * Defines the stitcher behavior in case an ad does not align exactly with - * the ad break boundaries. If not specified, the default is `CUT_CURRENT`. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy stitching_policy = 8; - * @param int $var - * @return $this - */ - public function setStitchingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig\StitchingPolicy::class); - $this->stitching_policy = $var; - - return $this; - } - - /** - * The configuration for prefetching ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; - * @return \Google\Cloud\Video\Stitcher\V1\PrefetchConfig|null - */ - public function getPrefetchConfig() - { - return $this->prefetch_config; - } - - public function hasPrefetchConfig() - { - return isset($this->prefetch_config); - } - - public function clearPrefetchConfig() - { - unset($this->prefetch_config); - } - - /** - * The configuration for prefetching ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.PrefetchConfig prefetch_config = 10; - * @param \Google\Cloud\Video\Stitcher\V1\PrefetchConfig $var - * @return $this - */ - public function setPrefetchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\PrefetchConfig::class); - $this->prefetch_config = $var; - - return $this; - } - - /** - * Options for fetching source manifests and segments. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 16; - * @return \Google\Cloud\Video\Stitcher\V1\FetchOptions|null - */ - public function getSourceFetchOptions() - { - return $this->source_fetch_options; - } - - public function hasSourceFetchOptions() - { - return isset($this->source_fetch_options); - } - - public function clearSourceFetchOptions() - { - unset($this->source_fetch_options); - } - - /** - * Options for fetching source manifests and segments. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 16; - * @param \Google\Cloud\Video\Stitcher\V1\FetchOptions $var - * @return $this - */ - public function setSourceFetchOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\FetchOptions::class); - $this->source_fetch_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php deleted file mode 100644 index 3defb74d973d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.stitcher.v1.LiveConfig.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Live config is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Live config is ready for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Live config is queued up for deletion. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_State::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php deleted file mode 100644 index 02f98376c110..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveConfig/StitchingPolicy.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.video.stitcher.v1.LiveConfig.StitchingPolicy - */ -class StitchingPolicy -{ - /** - * Stitching policy is not specified. - * - * Generated from protobuf enum STITCHING_POLICY_UNSPECIFIED = 0; - */ - const STITCHING_POLICY_UNSPECIFIED = 0; - /** - * Cuts an ad short and returns to content in the middle of the ad. - * - * Generated from protobuf enum CUT_CURRENT = 1; - */ - const CUT_CURRENT = 1; - /** - * Finishes stitching the current ad before returning to content. - * - * Generated from protobuf enum COMPLETE_AD = 2; - */ - const COMPLETE_AD = 2; - - private static $valueToName = [ - self::STITCHING_POLICY_UNSPECIFIED => 'STITCHING_POLICY_UNSPECIFIED', - self::CUT_CURRENT => 'CUT_CURRENT', - self::COMPLETE_AD => 'COMPLETE_AD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StitchingPolicy::class, \Google\Cloud\Video\Stitcher\V1\LiveConfig_StitchingPolicy::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php deleted file mode 100644 index 4d38c6dd0188..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession.php +++ /dev/null @@ -1,340 +0,0 @@ -google.cloud.video.stitcher.v1.LiveSession - */ -class LiveSession extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The URI to play the live session's ad-stitched stream. - * - * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $play_uri = ''; - /** - * Key value pairs for ad tag macro replacement, only available for live - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macros = 6; - */ - private $ad_tag_macros; - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; - */ - protected $manifest_options = null; - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; - */ - protected $gam_settings = null; - /** - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $live_config = ''; - /** - * Determines how the ad should be tracked. This overrides the value set in - * the live config for this session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 17; - */ - protected $ad_tracking = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * @type string $play_uri - * Output only. The URI to play the live session's ad-stitched stream. - * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macros - * Key value pairs for ad tag macro replacement, only available for live - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options - * Additional options that affect the output of the manifest. - * @type \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $gam_settings - * This field should be set with appropriate values if GAM is being used for - * ads. - * @type string $live_config - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * @type int $ad_tracking - * Determines how the ad should be tracked. This overrides the value set in - * the live config for this session. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the live session, in the form of - * `projects/{project}/locations/{location}/liveSessions/{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; - } - - /** - * Output only. The URI to play the live session's ad-stitched stream. - * - * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPlayUri() - { - return $this->play_uri; - } - - /** - * Output only. The URI to play the live session's ad-stitched stream. - * - * Generated from protobuf field string play_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPlayUri($var) - { - GPBUtil::checkString($var, True); - $this->play_uri = $var; - - return $this; - } - - /** - * Key value pairs for ad tag macro replacement, only available for live - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macros = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAdTagMacros() - { - return $this->ad_tag_macros; - } - - /** - * Key value pairs for ad tag macro replacement, only available for live - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: "https://doubleclick.google.com/ad/1?geo_id=[geoId]" - * Ad tag macros: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macros = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAdTagMacros($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->ad_tag_macros = $arr; - - return $this; - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; - * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null - */ - public function getManifestOptions() - { - return $this->manifest_options; - } - - public function hasManifestOptions() - { - return isset($this->manifest_options); - } - - public function clearManifestOptions() - { - unset($this->manifest_options); - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 10; - * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var - * @return $this - */ - public function setManifestOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); - $this->manifest_options = $var; - - return $this; - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; - * @return \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings|null - */ - public function getGamSettings() - { - return $this->gam_settings; - } - - public function hasGamSettings() - { - return isset($this->gam_settings); - } - - public function clearGamSettings() - { - unset($this->gam_settings); - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveSession.GamSettings gam_settings = 15; - * @param \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings $var - * @return $this - */ - public function setGamSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveSession\GamSettings::class); - $this->gam_settings = $var; - - return $this; - } - - /** - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLiveConfig() - { - return $this->live_config; - } - - /** - * Required. The resource name of the live config for this session, in the - * form of `projects/{project}/locations/{location}/liveConfigs/{id}`. - * - * Generated from protobuf field string live_config = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLiveConfig($var) - { - GPBUtil::checkString($var, True); - $this->live_config = $var; - - return $this; - } - - /** - * Determines how the ad should be tracked. This overrides the value set in - * the live config for this session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 17; - * @return int - */ - public function getAdTracking() - { - return $this->ad_tracking; - } - - /** - * Determines how the ad should be tracked. This overrides the value set in - * the live config for this session. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 17; - * @param int $var - * @return $this - */ - public function setAdTracking($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); - $this->ad_tracking = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php deleted file mode 100644 index d9a0ca12220f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/LiveSession/GamSettings.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.video.stitcher.v1.LiveSession.GamSettings - */ -class GamSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The stream ID generated by Ad Manager. This must be set if GAM - * is being used for ads and the session uses client-side ad tracking. - * - * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream_id = ''; - /** - * [Targeting - * parameters](https://support.google.com/admanager/answer/7320899) to send - * to Ad Manager to generate a stream ID. This should only be set if the - * session uses server-side ad tracking. - * - * Generated from protobuf field map targeting_parameters = 4; - */ - private $targeting_parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream_id - * Required. The stream ID generated by Ad Manager. This must be set if GAM - * is being used for ads and the session uses client-side ad tracking. - * @type array|\Google\Protobuf\Internal\MapField $targeting_parameters - * [Targeting - * parameters](https://support.google.com/admanager/answer/7320899) to send - * to Ad Manager to generate a stream ID. This should only be set if the - * session uses server-side ad tracking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. The stream ID generated by Ad Manager. This must be set if GAM - * is being used for ads and the session uses client-side ad tracking. - * - * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * Required. The stream ID generated by Ad Manager. This must be set if GAM - * is being used for ads and the session uses client-side ad tracking. - * - * Generated from protobuf field string stream_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * [Targeting - * parameters](https://support.google.com/admanager/answer/7320899) to send - * to Ad Manager to generate a stream ID. This should only be set if the - * session uses server-side ad tracking. - * - * Generated from protobuf field map targeting_parameters = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTargetingParameters() - { - return $this->targeting_parameters; - } - - /** - * [Targeting - * parameters](https://support.google.com/admanager/answer/7320899) to send - * to Ad Manager to generate a stream ID. This should only be set if the - * session uses server-side ad tracking. - * - * Generated from protobuf field map targeting_parameters = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTargetingParameters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->targeting_parameters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\LiveSession_GamSettings::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php deleted file mode 100644 index 27590ff366b0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.video.stitcher.v1.ManifestOptions - */ -class ManifestOptions extends \Google\Protobuf\Internal\Message -{ - /** - * If specified, the output manifest will only return renditions matching the - * specified filters. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; - */ - private $include_renditions; - /** - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; - */ - protected $bitrate_order = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $include_renditions - * If specified, the output manifest will only return renditions matching the - * specified filters. - * @type int $bitrate_order - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * If specified, the output manifest will only return renditions matching the - * specified filters. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeRenditions() - { - return $this->include_renditions; - } - - /** - * If specified, the output manifest will only return renditions matching the - * specified filters. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.RenditionFilter include_renditions = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\RenditionFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeRenditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\RenditionFilter::class); - $this->include_renditions = $arr; - - return $this; - } - - /** - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; - * @return int - */ - public function getBitrateOrder() - { - return $this->bitrate_order; - } - - /** - * If specified, the output manifest will orders the video and muxed - * renditions by bitrate according to the ordering policy. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy bitrate_order = 2; - * @param int $var - * @return $this - */ - public function setBitrateOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions\OrderPolicy::class); - $this->bitrate_order = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php deleted file mode 100644 index 5808fe871d5b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ManifestOptions/OrderPolicy.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.stitcher.v1.ManifestOptions.OrderPolicy - */ -class OrderPolicy -{ - /** - * Ordering policy is not specified. - * - * Generated from protobuf enum ORDER_POLICY_UNSPECIFIED = 0; - */ - const ORDER_POLICY_UNSPECIFIED = 0; - /** - * Order by ascending. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * Order by descending. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::ORDER_POLICY_UNSPECIFIED => 'ORDER_POLICY_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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OrderPolicy::class, \Google\Cloud\Video\Stitcher\V1\ManifestOptions_OrderPolicy::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php deleted file mode 100644 index 314895c575f6..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.video.stitcher.v1.MediaCdnKey - */ -class MediaCdnKey extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. 64-byte ed25519 private key for this Media CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $private_key = ''; - /** - * The keyset name of the Media CDN key. - * - * Generated from protobuf field string key_name = 2; - */ - protected $key_name = ''; - /** - * Optional. If set, the URL will be signed using the Media CDN token. - * Otherwise, the URL would be signed using the standard Media CDN signature. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig token_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $token_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_key - * Input only. 64-byte ed25519 private key for this Media CDN key. - * @type string $key_name - * The keyset name of the Media CDN key. - * @type \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig $token_config - * Optional. If set, the URL will be signed using the Media CDN token. - * Otherwise, the URL would be signed using the standard Media CDN signature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Input only. 64-byte ed25519 private key for this Media CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPrivateKey() - { - return $this->private_key; - } - - /** - * Input only. 64-byte ed25519 private key for this Media CDN key. - * - * Generated from protobuf field bytes private_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, False); - $this->private_key = $var; - - return $this; - } - - /** - * The keyset name of the Media CDN key. - * - * Generated from protobuf field string key_name = 2; - * @return string - */ - public function getKeyName() - { - return $this->key_name; - } - - /** - * The keyset name of the Media CDN key. - * - * Generated from protobuf field string key_name = 2; - * @param string $var - * @return $this - */ - public function setKeyName($var) - { - GPBUtil::checkString($var, True); - $this->key_name = $var; - - return $this; - } - - /** - * Optional. If set, the URL will be signed using the Media CDN token. - * Otherwise, the URL would be signed using the standard Media CDN signature. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig token_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig|null - */ - public function getTokenConfig() - { - return $this->token_config; - } - - public function hasTokenConfig() - { - return isset($this->token_config); - } - - public function clearTokenConfig() - { - unset($this->token_config); - } - - /** - * Optional. If set, the URL will be signed using the Media CDN token. - * Otherwise, the URL would be signed using the standard Media CDN signature. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig token_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig $var - * @return $this - */ - public function setTokenConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey\TokenConfig::class); - $this->token_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php deleted file mode 100644 index 1b07d967c120..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/MediaCdnKey/TokenConfig.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.video.stitcher.v1.MediaCdnKey.TokenConfig - */ -class TokenConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The query parameter in which to find the token. - * The name must be 1-64 characters long and match - * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the - * first character must be a letter, and all following characters - * must be a dash, underscore, letter or digit. - * Defaults to `edge-cache-token`. - * - * Generated from protobuf field string query_parameter = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $query_parameter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query_parameter - * Optional. The query parameter in which to find the token. - * The name must be 1-64 characters long and match - * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the - * first character must be a letter, and all following characters - * must be a dash, underscore, letter or digit. - * Defaults to `edge-cache-token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\CdnKeys::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The query parameter in which to find the token. - * The name must be 1-64 characters long and match - * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the - * first character must be a letter, and all following characters - * must be a dash, underscore, letter or digit. - * Defaults to `edge-cache-token`. - * - * Generated from protobuf field string query_parameter = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getQueryParameter() - { - return $this->query_parameter; - } - - /** - * Optional. The query parameter in which to find the token. - * The name must be 1-64 characters long and match - * the regular expression `[a-zA-Z]([a-zA-Z0-9_-])*` which means the - * first character must be a letter, and all following characters - * must be a dash, underscore, letter or digit. - * Defaults to `edge-cache-token`. - * - * Generated from protobuf field string query_parameter = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setQueryParameter($var) - { - GPBUtil::checkString($var, True); - $this->query_parameter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TokenConfig::class, \Google\Cloud\Video\Stitcher\V1\MediaCdnKey_TokenConfig::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php deleted file mode 100644 index 59afa335e40b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/OperationMetadata.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.video.stitcher.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * 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 operation finished running. - * - * 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; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php deleted file mode 100644 index 5a3e14be9089..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/PrefetchConfig.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.video.stitcher.v1.PrefetchConfig - */ -class PrefetchConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Indicates whether the option to prefetch ad requests is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $enabled = false; - /** - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * - * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; - */ - protected $initial_ad_request_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Required. Indicates whether the option to prefetch ad requests is enabled. - * @type \Google\Protobuf\Duration $initial_ad_request_duration - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\LiveConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Indicates whether the option to prefetch ad requests is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Required. Indicates whether the option to prefetch ad requests is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * - * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getInitialAdRequestDuration() - { - return $this->initial_ad_request_duration; - } - - public function hasInitialAdRequestDuration() - { - return isset($this->initial_ad_request_duration); - } - - public function clearInitialAdRequestDuration() - { - unset($this->initial_ad_request_duration); - } - - /** - * The duration in seconds of the part of the break to be prefetched. - * This field is only relevant if prefetch is enabled. - * You should set this duration to as long as possible to increase the - * benefits of prefetching, but not longer than the shortest ad break - * expected. For example, for a live event with 30s and 60s ad breaks, the - * initial duration should be set to 30s. - * - * Generated from protobuf field .google.protobuf.Duration initial_ad_request_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInitialAdRequestDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->initial_ad_request_duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php deleted file mode 100644 index e1b9852ccb27..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ProgressEvent.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.video.stitcher.v1.ProgressEvent - */ -class ProgressEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - */ - protected $time_offset = null; - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; - */ - private $events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $time_offset - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $events - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Events::initOnce(); - parent::__construct($data); - } - - /** - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeOffset() - { - return $this->time_offset; - } - - public function hasTimeOffset() - { - return isset($this->time_offset); - } - - public function clearTimeOffset() - { - unset($this->time_offset); - } - - /** - * The time when the following tracking events occurs. The time is in - * seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->time_offset = $var; - - return $this; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `BREAK_START`, `BREAK_END`, `IMPRESSION`, - * `CREATIVE_VIEW`, `START`, `FIRST_QUARTILE`, `MIDPOINT`, `THIRD_QUARTILE`, - * `COMPLETE`, `PROGRESS`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event events = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); - $this->events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php deleted file mode 100644 index 0d12d8ea104e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RenditionFilter.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.video.stitcher.v1.RenditionFilter - */ -class RenditionFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * - * Generated from protobuf field int32 bitrate_bps = 1; - */ - protected $bitrate_bps = 0; - /** - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * - * Generated from protobuf field string codecs = 2; - */ - protected $codecs = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $bitrate_bps - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * @type string $codecs - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * - * Generated from protobuf field int32 bitrate_bps = 1; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Bitrate in bits per second for the rendition. If set, only renditions with - * the exact bitrate will match. - * - * Generated from protobuf field int32 bitrate_bps = 1; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * - * Generated from protobuf field string codecs = 2; - * @return string - */ - public function getCodecs() - { - return $this->codecs; - } - - /** - * Codecs for the rendition. If set, only renditions with the exact value - * will match. - * - * Generated from protobuf field string codecs = 2; - * @param string $var - * @return $this - */ - public function setCodecs($var) - { - GPBUtil::checkString($var, True); - $this->codecs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php deleted file mode 100644 index cf958970e04e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/RequestMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.video.stitcher.v1.RequestMetadata - */ -class RequestMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP headers of the ad request. - * - * Generated from protobuf field .google.protobuf.Struct headers = 1; - */ - protected $headers = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $headers - * The HTTP headers of the ad request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP headers of the ad request. - * - * Generated from protobuf field .google.protobuf.Struct headers = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getHeaders() - { - return $this->headers; - } - - public function hasHeaders() - { - return isset($this->headers); - } - - public function clearHeaders() - { - unset($this->headers); - } - - /** - * The HTTP headers of the ad request. - * - * Generated from protobuf field .google.protobuf.Struct headers = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setHeaders($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->headers = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php deleted file mode 100644 index 9996433d98a0..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/ResponseMetadata.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.video.stitcher.v1.ResponseMetadata - */ -class ResponseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Error message received when making the ad request. - * - * Generated from protobuf field string error = 1; - */ - protected $error = ''; - /** - * Headers from the response. - * - * Generated from protobuf field .google.protobuf.Struct headers = 2; - */ - protected $headers = null; - /** - * Status code for the response. - * - * Generated from protobuf field string status_code = 3; - */ - protected $status_code = ''; - /** - * Size in bytes of the response. - * - * Generated from protobuf field int32 size_bytes = 4; - */ - protected $size_bytes = 0; - /** - * Total time elapsed for the response. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - */ - protected $duration = null; - /** - * The body of the response. - * - * Generated from protobuf field string body = 6; - */ - protected $body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error - * Error message received when making the ad request. - * @type \Google\Protobuf\Struct $headers - * Headers from the response. - * @type string $status_code - * Status code for the response. - * @type int $size_bytes - * Size in bytes of the response. - * @type \Google\Protobuf\Duration $duration - * Total time elapsed for the response. - * @type string $body - * The body of the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * Error message received when making the ad request. - * - * Generated from protobuf field string error = 1; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Error message received when making the ad request. - * - * Generated from protobuf field string error = 1; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - - /** - * Headers from the response. - * - * Generated from protobuf field .google.protobuf.Struct headers = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getHeaders() - { - return $this->headers; - } - - public function hasHeaders() - { - return isset($this->headers); - } - - public function clearHeaders() - { - unset($this->headers); - } - - /** - * Headers from the response. - * - * Generated from protobuf field .google.protobuf.Struct headers = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setHeaders($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->headers = $var; - - return $this; - } - - /** - * Status code for the response. - * - * Generated from protobuf field string status_code = 3; - * @return string - */ - public function getStatusCode() - { - return $this->status_code; - } - - /** - * Status code for the response. - * - * Generated from protobuf field string status_code = 3; - * @param string $var - * @return $this - */ - public function setStatusCode($var) - { - GPBUtil::checkString($var, True); - $this->status_code = $var; - - return $this; - } - - /** - * Size in bytes of the response. - * - * Generated from protobuf field int32 size_bytes = 4; - * @return int - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Size in bytes of the response. - * - * Generated from protobuf field int32 size_bytes = 4; - * @param int $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt32($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Total time elapsed for the response. - * - * 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); - } - - /** - * Total time elapsed for the response. - * - * 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; - } - - /** - * The body of the response. - * - * Generated from protobuf field string body = 6; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The body of the response. - * - * Generated from protobuf field string body = 6; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php deleted file mode 100644 index ffa5a67fc3f1..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.video.stitcher.v1.Slate - */ -class Slate extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * gam_slate has all the GAM-related attributes of slates. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; - */ - protected $gam_slate = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * @type string $uri - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * @type \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $gam_slate - * gam_slate has all the GAM-related attributes of slates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the slate, in the form of - * `projects/{project_number}/locations/{location}/slates/{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; - } - - /** - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI to fetch the source content for the slate. This URI must return an - * MP4 video with at least one audio track. - * - * 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; - } - - /** - * gam_slate has all the GAM-related attributes of slates. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; - * @return \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate|null - */ - public function getGamSlate() - { - return $this->gam_slate; - } - - public function hasGamSlate() - { - return isset($this->gam_slate); - } - - public function clearGamSlate() - { - unset($this->gam_slate); - } - - /** - * gam_slate has all the GAM-related attributes of slates. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate.GamSlate gam_slate = 3; - * @param \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate $var - * @return $this - */ - public function setGamSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate\GamSlate::class); - $this->gam_slate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php deleted file mode 100644 index e4991ab67127..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/Slate/GamSlate.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.Slate.GamSlate - */ -class GamSlate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - /** - * Output only. The identifier generated for the slate by GAM. - * - * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gam_slate_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code to associate with the live config. - * @type int|string $gam_slate_id - * Output only. The identifier generated for the slate by GAM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Slates::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code to associate with the live config. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - - /** - * Output only. The identifier generated for the slate by GAM. - * - * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getGamSlateId() - { - return $this->gam_slate_id; - } - - /** - * Output only. The identifier generated for the slate by GAM. - * - * Generated from protobuf field int64 gam_slate_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setGamSlateId($var) - { - GPBUtil::checkInt64($var); - $this->gam_slate_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GamSlate::class, \Google\Cloud\Video\Stitcher\V1\Slate_GamSlate::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php deleted file mode 100644 index c52ed06d37cf..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/StaticAdResource.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.video.stitcher.v1.StaticAdResource - */ -class StaticAdResource extends \Google\Protobuf\Internal\Message -{ - /** - * URI to the static file for the ad resource. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * Describes the MIME type of the ad resource. - * - * Generated from protobuf field string creative_type = 2; - */ - protected $creative_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI to the static file for the ad resource. - * @type string $creative_type - * Describes the MIME type of the ad resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Companions::initOnce(); - parent::__construct($data); - } - - /** - * URI to the static file for the ad resource. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI to the static file for the ad resource. - * - * 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; - } - - /** - * Describes the MIME type of the ad resource. - * - * Generated from protobuf field string creative_type = 2; - * @return string - */ - public function getCreativeType() - { - return $this->creative_type; - } - - /** - * Describes the MIME type of the ad resource. - * - * Generated from protobuf field string creative_type = 2; - * @param string $var - * @return $this - */ - public function setCreativeType($var) - { - GPBUtil::checkString($var, True); - $this->creative_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php deleted file mode 100644 index b3f90236908c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateCdnKeyRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.video.stitcher.v1.UpdateCdnKeyRequest - */ -class UpdateCdnKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The CDN key resource which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cdn_key = null; - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey Required. The CDN key resource which replaces the resource on the server. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * @return \Google\Cloud\Video\Stitcher\V1\UpdateCdnKeyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\Stitcher\V1\CdnKey $cdnKey, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\CdnKey $cdn_key - * Required. The CDN key resource which replaces the resource on the server. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The CDN key resource which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\CdnKey|null - */ - public function getCdnKey() - { - return $this->cdn_key; - } - - public function hasCdnKey() - { - return isset($this->cdn_key); - } - - public function clearCdnKey() - { - unset($this->cdn_key); - } - - /** - * Required. The CDN key resource which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CdnKey cdn_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\CdnKey $var - * @return $this - */ - public function setCdnKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CdnKey::class); - $this->cdn_key = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php deleted file mode 100644 index 8ac5eda08787..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateLiveConfigRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.video.stitcher.v1.UpdateLiveConfigRequest - */ -class UpdateLiveConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The LiveConfig resource which replaces the resource on the - * server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $live_config = null; - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig Required. The LiveConfig resource which replaces the resource on the - * server. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * @return \Google\Cloud\Video\Stitcher\V1\UpdateLiveConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\Stitcher\V1\LiveConfig $liveConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setLiveConfig($liveConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\LiveConfig $live_config - * Required. The LiveConfig resource which replaces the resource on the - * server. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The LiveConfig resource which replaces the resource on the - * server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\LiveConfig|null - */ - public function getLiveConfig() - { - return $this->live_config; - } - - public function hasLiveConfig() - { - return isset($this->live_config); - } - - public function clearLiveConfig() - { - unset($this->live_config); - } - - /** - * Required. The LiveConfig resource which replaces the resource on the - * server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.LiveConfig live_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\LiveConfig $var - * @return $this - */ - public function setLiveConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\LiveConfig::class); - $this->live_config = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php deleted file mode 100644 index 6e415aa29b8e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateSlateRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.video.stitcher.v1.UpdateSlateRequest - */ -class UpdateSlateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource with updated fields. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $slate = null; - /** - * Required. The update mask which specifies fields which should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Video\Stitcher\V1\Slate $slate Required. The resource with updated fields. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask which specifies fields which should be updated. - * - * @return \Google\Cloud\Video\Stitcher\V1\UpdateSlateRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\Stitcher\V1\Slate $slate, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSlate($slate) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\Slate $slate - * Required. The resource with updated fields. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask which specifies fields which should be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource with updated fields. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\Slate|null - */ - public function getSlate() - { - return $this->slate; - } - - public function hasSlate() - { - return isset($this->slate); - } - - public function clearSlate() - { - unset($this->slate); - } - - /** - * Required. The resource with updated fields. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\Slate $var - * @return $this - */ - public function setSlate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Slate::class); - $this->slate = $var; - - return $this; - } - - /** - * Required. The update mask which specifies fields which should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask which specifies fields which should be updated. - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php deleted file mode 100644 index b85f3bf4d33e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/UpdateVodConfigRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.video.stitcher.v1.UpdateVodConfigRequest - */ -class UpdateVodConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The VOD config resource which replaces the resource on the - * server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vod_config = null; - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig Required. The VOD config resource which replaces the resource on the - * server. - * @param \Google\Protobuf\FieldMask $updateMask Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * @return \Google\Cloud\Video\Stitcher\V1\UpdateVodConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Video\Stitcher\V1\VodConfig $vodConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setVodConfig($vodConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Stitcher\V1\VodConfig $vod_config - * Required. The VOD config resource which replaces the resource on the - * server. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VideoStitcherService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The VOD config resource which replaces the resource on the - * server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Stitcher\V1\VodConfig|null - */ - public function getVodConfig() - { - return $this->vod_config; - } - - public function hasVodConfig() - { - return isset($this->vod_config); - } - - public function clearVodConfig() - { - unset($this->vod_config); - } - - /** - * Required. The VOD config resource which replaces the resource on the - * server. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig vod_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Stitcher\V1\VodConfig $var - * @return $this - */ - public function setVodConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodConfig::class); - $this->vod_config = $var; - - return $this; - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The update mask applies to the resource. - * For the `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - * - * 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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php deleted file mode 100644 index bbeee022d365..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodAdTagDetail.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.video.stitcher.v1.VodAdTagDetail - */ -class VodAdTagDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A list of ad requests for one ad tag. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - */ - private $ad_requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * @type array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $ad_requests - * A list of ad requests for one ad tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\AdTagDetails::initOnce(); - parent::__construct($data); - } - - /** - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the ad tag detail for the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodAdTagDetails/{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; - } - - /** - * A list of ad requests for one ad tag. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdRequests() - { - return $this->ad_requests; - } - - /** - * A list of ad requests for one ad tag. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdRequest ad_requests = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\AdRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdRequest::class); - $this->ad_requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php deleted file mode 100644 index d073063a514d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.video.stitcher.v1.VodConfig - */ -class VodConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the VOD config, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. Source URI for the VOD stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_uri = ''; - /** - * Required. The default ad tag associated with this VOD config. - * - * Generated from protobuf field string ad_tag_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_tag_uri = ''; - /** - * Optional. Google Ad Manager (GAM) metadata. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamVodConfig gam_vod_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gam_vod_config = null; - /** - * Output only. State of the VOD config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Options for fetching source manifests and segments. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 8; - */ - protected $source_fetch_options = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the VOD config, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * @type string $source_uri - * Required. Source URI for the VOD stream manifest. - * @type string $ad_tag_uri - * Required. The default ad tag associated with this VOD config. - * @type \Google\Cloud\Video\Stitcher\V1\GamVodConfig $gam_vod_config - * Optional. Google Ad Manager (GAM) metadata. - * @type int $state - * Output only. State of the VOD config. - * @type \Google\Cloud\Video\Stitcher\V1\FetchOptions $source_fetch_options - * Options for fetching source manifests and segments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\VodConfigs::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the VOD config, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * - * 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 VOD config, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{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; - } - - /** - * Required. Source URI for the VOD stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceUri() - { - return $this->source_uri; - } - - /** - * Required. Source URI for the VOD stream manifest. - * - * Generated from protobuf field string source_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->source_uri = $var; - - return $this; - } - - /** - * Required. The default ad tag associated with this VOD config. - * - * Generated from protobuf field string ad_tag_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAdTagUri() - { - return $this->ad_tag_uri; - } - - /** - * Required. The default ad tag associated with this VOD config. - * - * Generated from protobuf field string ad_tag_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAdTagUri($var) - { - GPBUtil::checkString($var, True); - $this->ad_tag_uri = $var; - - return $this; - } - - /** - * Optional. Google Ad Manager (GAM) metadata. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamVodConfig gam_vod_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Video\Stitcher\V1\GamVodConfig|null - */ - public function getGamVodConfig() - { - return $this->gam_vod_config; - } - - public function hasGamVodConfig() - { - return isset($this->gam_vod_config); - } - - public function clearGamVodConfig() - { - unset($this->gam_vod_config); - } - - /** - * Optional. Google Ad Manager (GAM) metadata. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.GamVodConfig gam_vod_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Video\Stitcher\V1\GamVodConfig $var - * @return $this - */ - public function setGamVodConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\GamVodConfig::class); - $this->gam_vod_config = $var; - - return $this; - } - - /** - * Output only. State of the VOD config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the VOD config. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodConfig.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\VodConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Options for fetching source manifests and segments. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 8; - * @return \Google\Cloud\Video\Stitcher\V1\FetchOptions|null - */ - public function getSourceFetchOptions() - { - return $this->source_fetch_options; - } - - public function hasSourceFetchOptions() - { - return isset($this->source_fetch_options); - } - - public function clearSourceFetchOptions() - { - unset($this->source_fetch_options); - } - - /** - * Options for fetching source manifests and segments. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.FetchOptions source_fetch_options = 8; - * @param \Google\Cloud\Video\Stitcher\V1\FetchOptions $var - * @return $this - */ - public function setSourceFetchOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\FetchOptions::class); - $this->source_fetch_options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php deleted file mode 100644 index 1186f615f327..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodConfig/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.stitcher.v1.VodConfig.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * VOD config is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * VOD config is ready for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * VOD config is queued up for deletion. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Video\Stitcher\V1\VodConfig_State::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php deleted file mode 100644 index e409e1409dcf..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession.php +++ /dev/null @@ -1,497 +0,0 @@ -google.cloud.video.stitcher.v1.VodSession - */ -class VodSession extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Metadata of what was stitched into the content. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $interstitials = null; - /** - * Output only. The playback URI of the stitched content. - * - * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $play_uri = ''; - /** - * URI of the media to stitch. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * - * Generated from protobuf field string source_uri = 5; - */ - protected $source_uri = ''; - /** - * Ad tag URI. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * - * Generated from protobuf field string ad_tag_uri = 6; - */ - protected $ad_tag_uri = ''; - /** - * Key value pairs for ad tag macro replacement, only available for VOD - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macro_map = 7; - */ - private $ad_tag_macro_map; - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; - */ - protected $manifest_options = null; - /** - * Output only. The generated ID of the VodSession's source media. - * - * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_id = ''; - /** - * Required. Determines how the ad should be tracked. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ad_tracking = 0; - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; - */ - protected $gam_settings = null; - /** - * The resource name of the VOD config for this session, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * - * Generated from protobuf field string vod_config = 14 [(.google.api.resource_reference) = { - */ - protected $vod_config = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * @type \Google\Cloud\Video\Stitcher\V1\Interstitials $interstitials - * Output only. Metadata of what was stitched into the content. - * @type string $play_uri - * Output only. The playback URI of the stitched content. - * @type string $source_uri - * URI of the media to stitch. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * @type string $ad_tag_uri - * Ad tag URI. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * @type array|\Google\Protobuf\Internal\MapField $ad_tag_macro_map - * Key value pairs for ad tag macro replacement, only available for VOD - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * @type \Google\Cloud\Video\Stitcher\V1\ManifestOptions $manifest_options - * Additional options that affect the output of the manifest. - * @type string $asset_id - * Output only. The generated ID of the VodSession's source media. - * @type int $ad_tracking - * Required. Determines how the ad should be tracked. - * @type \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $gam_settings - * This field should be set with appropriate values if GAM is being used for - * ads. - * @type string $vod_config - * The resource name of the VOD config for this session, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the VOD session, in the form of - * `projects/{project_number}/locations/{location}/vodSessions/{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; - } - - /** - * Output only. Metadata of what was stitched into the content. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Video\Stitcher\V1\Interstitials|null - */ - public function getInterstitials() - { - return $this->interstitials; - } - - public function hasInterstitials() - { - return isset($this->interstitials); - } - - public function clearInterstitials() - { - unset($this->interstitials); - } - - /** - * Output only. Metadata of what was stitched into the content. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.Interstitials interstitials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Video\Stitcher\V1\Interstitials $var - * @return $this - */ - public function setInterstitials($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\Interstitials::class); - $this->interstitials = $var; - - return $this; - } - - /** - * Output only. The playback URI of the stitched content. - * - * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPlayUri() - { - return $this->play_uri; - } - - /** - * Output only. The playback URI of the stitched content. - * - * Generated from protobuf field string play_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPlayUri($var) - { - GPBUtil::checkString($var, True); - $this->play_uri = $var; - - return $this; - } - - /** - * URI of the media to stitch. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * - * Generated from protobuf field string source_uri = 5; - * @return string - */ - public function getSourceUri() - { - return $this->source_uri; - } - - /** - * URI of the media to stitch. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * - * Generated from protobuf field string source_uri = 5; - * @param string $var - * @return $this - */ - public function setSourceUri($var) - { - GPBUtil::checkString($var, True); - $this->source_uri = $var; - - return $this; - } - - /** - * Ad tag URI. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * - * Generated from protobuf field string ad_tag_uri = 6; - * @return string - */ - public function getAdTagUri() - { - return $this->ad_tag_uri; - } - - /** - * Ad tag URI. For most use cases, you should create a - * [VodConfig][google.cloud.video.stitcher.v1.VodConfig] with this information - * rather than setting this field directly. - * - * Generated from protobuf field string ad_tag_uri = 6; - * @param string $var - * @return $this - */ - public function setAdTagUri($var) - { - GPBUtil::checkString($var, True); - $this->ad_tag_uri = $var; - - return $this; - } - - /** - * Key value pairs for ad tag macro replacement, only available for VOD - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macro_map = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAdTagMacroMap() - { - return $this->ad_tag_macro_map; - } - - /** - * Key value pairs for ad tag macro replacement, only available for VOD - * sessions that do not implement Google Ad manager ad insertion. If the - * specified ad tag URI has macros, this field provides the mapping to the - * value that will replace the macro in the ad tag URI. - * Macros are designated by square brackets, for example: - * Ad tag URI: `"https://doubleclick.google.com/ad/1?geo_id=[geoId]"` - * Ad tag macro map: `{"geoId": "123"}` - * Fully qualified ad tag: - * `"https://doubleclick.google.com/ad/1?geo_id=123"` - * - * Generated from protobuf field map ad_tag_macro_map = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAdTagMacroMap($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->ad_tag_macro_map = $arr; - - return $this; - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; - * @return \Google\Cloud\Video\Stitcher\V1\ManifestOptions|null - */ - public function getManifestOptions() - { - return $this->manifest_options; - } - - public function hasManifestOptions() - { - return isset($this->manifest_options); - } - - public function clearManifestOptions() - { - unset($this->manifest_options); - } - - /** - * Additional options that affect the output of the manifest. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.ManifestOptions manifest_options = 9; - * @param \Google\Cloud\Video\Stitcher\V1\ManifestOptions $var - * @return $this - */ - public function setManifestOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\ManifestOptions::class); - $this->manifest_options = $var; - - return $this; - } - - /** - * Output only. The generated ID of the VodSession's source media. - * - * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAssetId() - { - return $this->asset_id; - } - - /** - * Output only. The generated ID of the VodSession's source media. - * - * Generated from protobuf field string asset_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - - /** - * Required. Determines how the ad should be tracked. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAdTracking() - { - return $this->ad_tracking; - } - - /** - * Required. Determines how the ad should be tracked. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.AdTracking ad_tracking = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAdTracking($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Stitcher\V1\AdTracking::class); - $this->ad_tracking = $var; - - return $this; - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; - * @return \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings|null - */ - public function getGamSettings() - { - return $this->gam_settings; - } - - public function hasGamSettings() - { - return isset($this->gam_settings); - } - - public function clearGamSettings() - { - unset($this->gam_settings); - } - - /** - * This field should be set with appropriate values if GAM is being used for - * ads. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.VodSession.GamSettings gam_settings = 13; - * @param \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings $var - * @return $this - */ - public function setGamSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\VodSession\GamSettings::class); - $this->gam_settings = $var; - - return $this; - } - - /** - * The resource name of the VOD config for this session, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * - * Generated from protobuf field string vod_config = 14 [(.google.api.resource_reference) = { - * @return string - */ - public function getVodConfig() - { - return $this->vod_config; - } - - /** - * The resource name of the VOD config for this session, in the form of - * `projects/{project}/locations/{location}/vodConfigs/{id}`. - * - * Generated from protobuf field string vod_config = 14 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVodConfig($var) - { - GPBUtil::checkString($var, True); - $this->vod_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php deleted file mode 100644 index 8063ccb2beea..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSession/GamSettings.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.video.stitcher.v1.VodSession.GamSettings - */ -class GamSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ad Manager network code. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_code = ''; - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_code - * Required. Ad Manager network code. - * @type string $stream_id - * Required. The stream ID generated by Ad Manager. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ad Manager network code. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkCode() - { - return $this->network_code; - } - - /** - * Required. Ad Manager network code. - * - * Generated from protobuf field string network_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkCode($var) - { - GPBUtil::checkString($var, True); - $this->network_code = $var; - - return $this; - } - - /** - * Required. The stream ID generated by Ad Manager. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * Required. The stream ID generated by Ad Manager. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GamSettings::class, \Google\Cloud\Video\Stitcher\V1\VodSession_GamSettings::class); - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php deleted file mode 100644 index d1b8a1b44103..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAd.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.video.stitcher.v1.VodSessionAd - */ -class VodSessionAd extends \Google\Protobuf\Internal\Message -{ - /** - * Duration in seconds of the ad. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - /** - * Metadata of companion ads associated with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; - */ - protected $companion_ads = null; - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; - */ - private $activity_events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration in seconds of the ad. - * @type \Google\Cloud\Video\Stitcher\V1\CompanionAds $companion_ads - * Metadata of companion ads associated with the ad. - * @type array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $activity_events - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * Duration in seconds of the ad. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @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 in seconds of the ad. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Metadata of companion ads associated with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; - * @return \Google\Cloud\Video\Stitcher\V1\CompanionAds|null - */ - public function getCompanionAds() - { - return $this->companion_ads; - } - - public function hasCompanionAds() - { - return isset($this->companion_ads); - } - - public function clearCompanionAds() - { - unset($this->companion_ads); - } - - /** - * Metadata of companion ads associated with the ad. - * - * Generated from protobuf field .google.cloud.video.stitcher.v1.CompanionAds companion_ads = 2; - * @param \Google\Cloud\Video\Stitcher\V1\CompanionAds $var - * @return $this - */ - public function setCompanionAds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Stitcher\V1\CompanionAds::class); - $this->companion_ads = $var; - - return $this; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActivityEvents() - { - return $this->activity_events; - } - - /** - * The list of progress tracking events for the ad break. These can be of - * the following IAB types: `MUTE`, `UNMUTE`, `PAUSE`, `CLICK`, - * `CLICK_THROUGH`, `REWIND`, `RESUME`, `ERROR`, `FULLSCREEN`, - * `EXIT_FULLSCREEN`, `EXPAND`, `COLLAPSE`, `ACCEPT_INVITATION_LINEAR`, - * `CLOSE_LINEAR`, `SKIP`. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.Event activity_events = 3; - * @param array<\Google\Cloud\Video\Stitcher\V1\Event>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActivityEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\Event::class); - $this->activity_events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php deleted file mode 100644 index 688d8754996b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionAdBreak.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.video.stitcher.v1.VodSessionAdBreak - */ -class VodSessionAdBreak extends \Google\Protobuf\Internal\Message -{ - /** - * List of events that are expected to be triggered, ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; - */ - private $progress_events; - /** - * Ordered list of ads stitched into the ad break. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; - */ - private $ads; - /** - * Ad break end time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - */ - protected $end_time_offset = null; - /** - * Ad break start time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $progress_events - * List of events that are expected to be triggered, ordered by time. - * @type array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $ads - * Ordered list of ads stitched into the ad break. - * @type \Google\Protobuf\Duration $end_time_offset - * Ad break end time in seconds relative to the start of the VOD asset. - * @type \Google\Protobuf\Duration $start_time_offset - * Ad break start time in seconds relative to the start of the VOD asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * List of events that are expected to be triggered, ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProgressEvents() - { - return $this->progress_events; - } - - /** - * List of events that are expected to be triggered, ordered by time. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.ProgressEvent progress_events = 1; - * @param array<\Google\Cloud\Video\Stitcher\V1\ProgressEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProgressEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\ProgressEvent::class); - $this->progress_events = $arr; - - return $this; - } - - /** - * Ordered list of ads stitched into the ad break. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAds() - { - return $this->ads; - } - - /** - * Ordered list of ads stitched into the ad break. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.VodSessionAd ads = 2; - * @param array<\Google\Cloud\Video\Stitcher\V1\VodSessionAd>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\VodSessionAd::class); - $this->ads = $arr; - - return $this; - } - - /** - * Ad break end time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * Ad break end time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - - /** - * Ad break start time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Ad break start time in seconds relative to the start of the VOD asset. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php deleted file mode 100644 index d17cc36f962f..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodSessionContent.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.video.stitcher.v1.VodSessionContent - */ -class VodSessionContent extends \Google\Protobuf\Internal\Message -{ - /** - * The total duration in seconds of the content including the ads stitched - * in. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * The total duration in seconds of the content including the ads stitched - * in. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\Sessions::initOnce(); - parent::__construct($data); - } - - /** - * The total duration in seconds of the content including the ads stitched - * in. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The total duration in seconds of the content including the ads stitched - * in. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @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/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php b/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php deleted file mode 100644 index 8d42eb7d99dd..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/proto/src/Google/Cloud/Video/Stitcher/V1/VodStitchDetail.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.video.stitcher.v1.VodStitchDetail - */ -class VodStitchDetail extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A list of ad processing details for the fetched ad playlist. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; - */ - private $ad_stitch_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * @type array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $ad_stitch_details - * A list of ad processing details for the fetched ad playlist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Stitcher\V1\StitchDetails::initOnce(); - parent::__construct($data); - } - - /** - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the stitch detail in the specified VOD session, in the form of - * `projects/{project}/locations/{location}/vodSessions/{vod_session_id}/vodStitchDetails/{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; - } - - /** - * A list of ad processing details for the fetched ad playlist. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdStitchDetails() - { - return $this->ad_stitch_details; - } - - /** - * A list of ad processing details for the fetched ad playlist. - * - * Generated from protobuf field repeated .google.cloud.video.stitcher.v1.AdStitchDetail ad_stitch_details = 3; - * @param array<\Google\Cloud\Video\Stitcher\V1\AdStitchDetail>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdStitchDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Stitcher\V1\AdStitchDetail::class); - $this->ad_stitch_details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php deleted file mode 100644 index d40238518105..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_cdn_key.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createCdnKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CdnKey $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $cdnKeyId = '[CDN_KEY_ID]'; - - create_cdn_key_sample($formattedParent, $cdnKeyId); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php deleted file mode 100644 index 55b2e46020a6..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_config.php +++ /dev/null @@ -1,106 +0,0 @@ -setSourceUri($liveConfigSourceUri) - ->setAdTracking($liveConfigAdTracking); - $request = (new CreateLiveConfigRequest()) - ->setParent($formattedParent) - ->setLiveConfigId($liveConfigId) - ->setLiveConfig($liveConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createLiveConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LiveConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = '[LIVE_CONFIG_ID]'; - $liveConfigSourceUri = '[SOURCE_URI]'; - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - - create_live_config_sample( - $formattedParent, - $liveConfigId, - $liveConfigSourceUri, - $liveConfigAdTracking - ); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php deleted file mode 100644 index 314ebe4a0f6c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_live_session.php +++ /dev/null @@ -1,85 +0,0 @@ -setLiveConfig($formattedLiveSessionLiveConfig); - $request = (new CreateLiveSessionRequest()) - ->setParent($formattedParent) - ->setLiveSession($liveSession); - - // Call the API and handle any network failures. - try { - /** @var LiveSession $response */ - $response = $videoStitcherServiceClient->createLiveSession($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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedLiveSessionLiveConfig = VideoStitcherServiceClient::liveConfigName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_CONFIG]' - ); - - create_live_session_sample($formattedParent, $formattedLiveSessionLiveConfig); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php deleted file mode 100644 index 6a2ad70bf069..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_slate.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setSlateId($slateId) - ->setSlate($slate); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createSlate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Slate $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $slateId = '[SLATE_ID]'; - - create_slate_sample($formattedParent, $slateId); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php deleted file mode 100644 index 8d040e094024..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_config.php +++ /dev/null @@ -1,100 +0,0 @@ -setSourceUri($vodConfigSourceUri) - ->setAdTagUri($vodConfigAdTagUri); - $request = (new CreateVodConfigRequest()) - ->setParent($formattedParent) - ->setVodConfigId($vodConfigId) - ->setVodConfig($vodConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->createVodConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VodConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $vodConfigId = '[VOD_CONFIG_ID]'; - $vodConfigSourceUri = '[SOURCE_URI]'; - $vodConfigAdTagUri = '[AD_TAG_URI]'; - - create_vod_config_sample($formattedParent, $vodConfigId, $vodConfigSourceUri, $vodConfigAdTagUri); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php deleted file mode 100644 index 935e199e1f68..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/create_vod_session.php +++ /dev/null @@ -1,79 +0,0 @@ -setAdTracking($vodSessionAdTracking); - $request = (new CreateVodSessionRequest()) - ->setParent($formattedParent) - ->setVodSession($vodSession); - - // Call the API and handle any network failures. - try { - /** @var VodSession $response */ - $response = $videoStitcherServiceClient->createVodSession($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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - - create_vod_session_sample($formattedParent, $vodSessionAdTracking); -} -// [END videostitcher_v1_generated_VideoStitcherService_CreateVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php deleted file mode 100644 index c79b4d1fac41..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_cdn_key.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteCdnKey($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 = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - - delete_cdn_key_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php deleted file mode 100644 index e2440ebbe253..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_live_config.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteLiveConfig($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 = VideoStitcherServiceClient::liveConfigName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_CONFIG]' - ); - - delete_live_config_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php deleted file mode 100644 index 72ceafadff7b..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_slate.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteSlate($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 = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - - delete_slate_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php deleted file mode 100644 index daa7531cb39d..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/delete_vod_config.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->deleteVodConfig($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 = VideoStitcherServiceClient::vodConfigName( - '[PROJECT]', - '[LOCATION]', - '[VOD_CONFIG]' - ); - - delete_vod_config_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_DeleteVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php deleted file mode 100644 index 4ce3c6c62e61..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_cdn_key.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CdnKey $response */ - $response = $videoStitcherServiceClient->getCdnKey($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 = VideoStitcherServiceClient::cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - - get_cdn_key_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php deleted file mode 100644 index d0f7dd893ec7..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LiveAdTagDetail $response */ - $response = $videoStitcherServiceClient->getLiveAdTagDetail($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 = VideoStitcherServiceClient::liveAdTagDetailName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]', - '[LIVE_AD_TAG_DETAIL]' - ); - - get_live_ad_tag_detail_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetLiveAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php deleted file mode 100644 index f7382b0689b8..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_config.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LiveConfig $response */ - $response = $videoStitcherServiceClient->getLiveConfig($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 = VideoStitcherServiceClient::liveConfigName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_CONFIG]' - ); - - get_live_config_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php deleted file mode 100644 index 6bba8e76d34e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_live_session.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LiveSession $response */ - $response = $videoStitcherServiceClient->getLiveSession($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 = VideoStitcherServiceClient::liveSessionName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]' - ); - - get_live_session_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetLiveSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php deleted file mode 100644 index 85ec62872a6c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_slate.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Slate $response */ - $response = $videoStitcherServiceClient->getSlate($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 = VideoStitcherServiceClient::slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - - get_slate_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php deleted file mode 100644 index 100e6a83dedf..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodAdTagDetail $response */ - $response = $videoStitcherServiceClient->getVodAdTagDetail($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 = VideoStitcherServiceClient::vodAdTagDetailName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]', - '[VOD_AD_TAG_DETAIL]' - ); - - get_vod_ad_tag_detail_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodAdTagDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php deleted file mode 100644 index bc0f6204365c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_config.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodConfig $response */ - $response = $videoStitcherServiceClient->getVodConfig($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 = VideoStitcherServiceClient::vodConfigName( - '[PROJECT]', - '[LOCATION]', - '[VOD_CONFIG]' - ); - - get_vod_config_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php deleted file mode 100644 index ba90e1e43d50..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_session.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodSession $response */ - $response = $videoStitcherServiceClient->getVodSession($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 = VideoStitcherServiceClient::vodSessionName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]' - ); - - get_vod_session_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodSession_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php deleted file mode 100644 index 41e6cee9bb96..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VodStitchDetail $response */ - $response = $videoStitcherServiceClient->getVodStitchDetail($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 = VideoStitcherServiceClient::vodStitchDetailName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]', - '[VOD_STITCH_DETAIL]' - ); - - get_vod_stitch_detail_sample($formattedName); -} -// [END videostitcher_v1_generated_VideoStitcherService_GetVodStitchDetail_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php deleted file mode 100644 index 7baa8841e2ea..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_cdn_keys.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listCdnKeys($request); - - /** @var CdnKey $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_cdn_keys_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListCdnKeys_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php deleted file mode 100644 index ff2d434ccf4e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listLiveAdTagDetails($request); - - /** @var LiveAdTagDetail $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 = VideoStitcherServiceClient::liveSessionName( - '[PROJECT]', - '[LOCATION]', - '[LIVE_SESSION]' - ); - - list_live_ad_tag_details_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListLiveAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php deleted file mode 100644 index 35e61ee34561..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_live_configs.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listLiveConfigs($request); - - /** @var LiveConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_live_configs_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListLiveConfigs_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php deleted file mode 100644 index 50169af4a1ce..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_slates.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listSlates($request); - - /** @var Slate $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_slates_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListSlates_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php deleted file mode 100644 index fe57aceefba9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listVodAdTagDetails($request); - - /** @var VodAdTagDetail $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 = VideoStitcherServiceClient::vodSessionName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]' - ); - - list_vod_ad_tag_details_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListVodAdTagDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php deleted file mode 100644 index a6e5d2e7918c..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_configs.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listVodConfigs($request); - - /** @var VodConfig $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 = VideoStitcherServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_vod_configs_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListVodConfigs_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php deleted file mode 100644 index a6176994b586..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $videoStitcherServiceClient->listVodStitchDetails($request); - - /** @var VodStitchDetail $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 = VideoStitcherServiceClient::vodSessionName( - '[PROJECT]', - '[LOCATION]', - '[VOD_SESSION]' - ); - - list_vod_stitch_details_sample($formattedParent); -} -// [END videostitcher_v1_generated_VideoStitcherService_ListVodStitchDetails_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php deleted file mode 100644 index 4e4eb987519a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_cdn_key.php +++ /dev/null @@ -1,75 +0,0 @@ -setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->updateCdnKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CdnKey $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 videostitcher_v1_generated_VideoStitcherService_UpdateCdnKey_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php deleted file mode 100644 index 550ceb6ddde9..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_live_config.php +++ /dev/null @@ -1,92 +0,0 @@ -setSourceUri($liveConfigSourceUri) - ->setAdTracking($liveConfigAdTracking); - $updateMask = new FieldMask(); - $request = (new UpdateLiveConfigRequest()) - ->setLiveConfig($liveConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->updateLiveConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LiveConfig $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 -{ - $liveConfigSourceUri = '[SOURCE_URI]'; - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - - update_live_config_sample($liveConfigSourceUri, $liveConfigAdTracking); -} -// [END videostitcher_v1_generated_VideoStitcherService_UpdateLiveConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php deleted file mode 100644 index f2a1f513cf0a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_slate.php +++ /dev/null @@ -1,74 +0,0 @@ -setSlate($slate) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->updateSlate($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Slate $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 videostitcher_v1_generated_VideoStitcherService_UpdateSlate_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php b/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php deleted file mode 100644 index 60fd6fb83de7..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/samples/V1/VideoStitcherServiceClient/update_vod_config.php +++ /dev/null @@ -1,91 +0,0 @@ -setSourceUri($vodConfigSourceUri) - ->setAdTagUri($vodConfigAdTagUri); - $updateMask = new FieldMask(); - $request = (new UpdateVodConfigRequest()) - ->setVodConfig($vodConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $videoStitcherServiceClient->updateVodConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VodConfig $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 -{ - $vodConfigSourceUri = '[SOURCE_URI]'; - $vodConfigAdTagUri = '[AD_TAG_URI]'; - - update_vod_config_sample($vodConfigSourceUri, $vodConfigAdTagUri); -} -// [END videostitcher_v1_generated_VideoStitcherService_UpdateVodConfig_sync] diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php b/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php deleted file mode 100644 index 1da3c06fb85e..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/Client/VideoStitcherServiceClient.php +++ /dev/null @@ -1,1325 +0,0 @@ - createCdnKeyAsync(CreateCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLiveConfigAsync(CreateLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLiveSessionAsync(CreateLiveSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSlateAsync(CreateSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVodConfigAsync(CreateVodConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVodSessionAsync(CreateVodSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCdnKeyAsync(DeleteCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLiveConfigAsync(DeleteLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSlateAsync(DeleteSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVodConfigAsync(DeleteVodConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCdnKeyAsync(GetCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLiveAdTagDetailAsync(GetLiveAdTagDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLiveConfigAsync(GetLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLiveSessionAsync(GetLiveSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSlateAsync(GetSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodAdTagDetailAsync(GetVodAdTagDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodConfigAsync(GetVodConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodSessionAsync(GetVodSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVodStitchDetailAsync(GetVodStitchDetailRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCdnKeysAsync(ListCdnKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLiveAdTagDetailsAsync(ListLiveAdTagDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLiveConfigsAsync(ListLiveConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSlatesAsync(ListSlatesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVodAdTagDetailsAsync(ListVodAdTagDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVodConfigsAsync(ListVodConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVodStitchDetailsAsync(ListVodStitchDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCdnKeyAsync(UpdateCdnKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLiveConfigAsync(UpdateLiveConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSlateAsync(UpdateSlateRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVodConfigAsync(UpdateVodConfigRequest $request, array $optionalArgs = []) - */ -final class VideoStitcherServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.video.stitcher.v1.VideoStitcherService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'videostitcher.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'videostitcher.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/video_stitcher_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/video_stitcher_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/video_stitcher_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/video_stitcher_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 cdn_key - * resource. - * - * @param string $project - * @param string $location - * @param string $cdnKey - * - * @return string The formatted cdn_key resource. - */ - public static function cdnKeyName(string $project, string $location, string $cdnKey): string - { - return self::getPathTemplate('cdnKey')->render([ - 'project' => $project, - 'location' => $location, - 'cdn_key' => $cdnKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * live_ad_tag_detail resource. - * - * @param string $project - * @param string $location - * @param string $liveSession - * @param string $liveAdTagDetail - * - * @return string The formatted live_ad_tag_detail resource. - */ - public static function liveAdTagDetailName(string $project, string $location, string $liveSession, string $liveAdTagDetail): string - { - return self::getPathTemplate('liveAdTagDetail')->render([ - 'project' => $project, - 'location' => $location, - 'live_session' => $liveSession, - 'live_ad_tag_detail' => $liveAdTagDetail, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a live_config - * resource. - * - * @param string $project - * @param string $location - * @param string $liveConfig - * - * @return string The formatted live_config resource. - */ - public static function liveConfigName(string $project, string $location, string $liveConfig): string - { - return self::getPathTemplate('liveConfig')->render([ - 'project' => $project, - 'location' => $location, - 'live_config' => $liveConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a live_session - * resource. - * - * @param string $project - * @param string $location - * @param string $liveSession - * - * @return string The formatted live_session resource. - */ - public static function liveSessionName(string $project, string $location, string $liveSession): string - { - return self::getPathTemplate('liveSession')->render([ - 'project' => $project, - 'location' => $location, - 'live_session' => $liveSession, - ]); - } - - /** - * 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 slate - * resource. - * - * @param string $project - * @param string $location - * @param string $slate - * - * @return string The formatted slate resource. - */ - public static function slateName(string $project, string $location, string $slate): string - { - return self::getPathTemplate('slate')->render([ - 'project' => $project, - 'location' => $location, - 'slate' => $slate, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vod_ad_tag_detail resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * @param string $vodAdTagDetail - * - * @return string The formatted vod_ad_tag_detail resource. - */ - public static function vodAdTagDetailName(string $project, string $location, string $vodSession, string $vodAdTagDetail): string - { - return self::getPathTemplate('vodAdTagDetail')->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - 'vod_ad_tag_detail' => $vodAdTagDetail, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a vod_config - * resource. - * - * @param string $project - * @param string $location - * @param string $vodConfig - * - * @return string The formatted vod_config resource. - */ - public static function vodConfigName(string $project, string $location, string $vodConfig): string - { - return self::getPathTemplate('vodConfig')->render([ - 'project' => $project, - 'location' => $location, - 'vod_config' => $vodConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a vod_session - * resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * - * @return string The formatted vod_session resource. - */ - public static function vodSessionName(string $project, string $location, string $vodSession): string - { - return self::getPathTemplate('vodSession')->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vod_stitch_detail resource. - * - * @param string $project - * @param string $location - * @param string $vodSession - * @param string $vodStitchDetail - * - * @return string The formatted vod_stitch_detail resource. - */ - public static function vodStitchDetailName(string $project, string $location, string $vodSession, string $vodStitchDetail): string - { - return self::getPathTemplate('vodStitchDetail')->render([ - 'project' => $project, - 'location' => $location, - 'vod_session' => $vodSession, - 'vod_stitch_detail' => $vodStitchDetail, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cdnKey: projects/{project}/locations/{location}/cdnKeys/{cdn_key} - * - liveAdTagDetail: projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail} - * - liveConfig: projects/{project}/locations/{location}/liveConfigs/{live_config} - * - liveSession: projects/{project}/locations/{location}/liveSessions/{live_session} - * - location: projects/{project}/locations/{location} - * - slate: projects/{project}/locations/{location}/slates/{slate} - * - vodAdTagDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail} - * - vodConfig: projects/{project}/locations/{location}/vodConfigs/{vod_config} - * - vodSession: projects/{project}/locations/{location}/vodSessions/{vod_session} - * - vodStitchDetail: projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'videostitcher.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new CDN key. - * - * The async variant is {@see VideoStitcherServiceClient::createCdnKeyAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/create_cdn_key.php - * - * @param CreateCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCdnKey(CreateCdnKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCdnKey', $request, $callOptions)->wait(); - } - - /** - * Registers the live config with the provided unique ID in - * the specified region. - * - * The async variant is {@see VideoStitcherServiceClient::createLiveConfigAsync()} - * . - * - * @example samples/V1/VideoStitcherServiceClient/create_live_config.php - * - * @param CreateLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createLiveConfig(CreateLiveConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a new live session. - * - * The async variant is {@see VideoStitcherServiceClient::createLiveSessionAsync()} - * . - * - * @example samples/V1/VideoStitcherServiceClient/create_live_session.php - * - * @param CreateLiveSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLiveSession(CreateLiveSessionRequest $request, array $callOptions = []): LiveSession - { - return $this->startApiCall('CreateLiveSession', $request, $callOptions)->wait(); - } - - /** - * Creates a slate. - * - * The async variant is {@see VideoStitcherServiceClient::createSlateAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/create_slate.php - * - * @param CreateSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createSlate(CreateSlateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSlate', $request, $callOptions)->wait(); - } - - /** - * Registers the VOD config with the provided unique ID in - * the specified region. - * - * The async variant is {@see VideoStitcherServiceClient::createVodConfigAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/create_vod_config.php - * - * @param CreateVodConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createVodConfig(CreateVodConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateVodConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a client side playback VOD session and returns the full - * tracking and playback metadata of the session. - * - * The async variant is {@see VideoStitcherServiceClient::createVodSessionAsync()} - * . - * - * @example samples/V1/VideoStitcherServiceClient/create_vod_session.php - * - * @param CreateVodSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function createVodSession(CreateVodSessionRequest $request, array $callOptions = []): VodSession - { - return $this->startApiCall('CreateVodSession', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified CDN key. - * - * The async variant is {@see VideoStitcherServiceClient::deleteCdnKeyAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/delete_cdn_key.php - * - * @param DeleteCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteCdnKey(DeleteCdnKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCdnKey', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified live config. - * - * The async variant is {@see VideoStitcherServiceClient::deleteLiveConfigAsync()} - * . - * - * @example samples/V1/VideoStitcherServiceClient/delete_live_config.php - * - * @param DeleteLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteLiveConfig(DeleteLiveConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified slate. - * - * The async variant is {@see VideoStitcherServiceClient::deleteSlateAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/delete_slate.php - * - * @param DeleteSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteSlate(DeleteSlateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSlate', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified VOD config. - * - * The async variant is {@see VideoStitcherServiceClient::deleteVodConfigAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/delete_vod_config.php - * - * @param DeleteVodConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteVodConfig(DeleteVodConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteVodConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the specified CDN key. - * - * The async variant is {@see VideoStitcherServiceClient::getCdnKeyAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_cdn_key.php - * - * @param GetCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CdnKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCdnKey(GetCdnKeyRequest $request, array $callOptions = []): CdnKey - { - return $this->startApiCall('GetCdnKey', $request, $callOptions)->wait(); - } - - /** - * Returns the specified ad tag detail for the specified live session. - * - * The async variant is - * {@see VideoStitcherServiceClient::getLiveAdTagDetailAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_live_ad_tag_detail.php - * - * @param GetLiveAdTagDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveAdTagDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLiveAdTagDetail(GetLiveAdTagDetailRequest $request, array $callOptions = []): LiveAdTagDetail - { - return $this->startApiCall('GetLiveAdTagDetail', $request, $callOptions)->wait(); - } - - /** - * Returns the specified live config managed by the Video - * Stitcher service. - * - * The async variant is {@see VideoStitcherServiceClient::getLiveConfigAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_live_config.php - * - * @param GetLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLiveConfig(GetLiveConfigRequest $request, array $callOptions = []): LiveConfig - { - return $this->startApiCall('GetLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the details for the specified live session. - * - * The async variant is {@see VideoStitcherServiceClient::getLiveSessionAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_live_session.php - * - * @param GetLiveSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LiveSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLiveSession(GetLiveSessionRequest $request, array $callOptions = []): LiveSession - { - return $this->startApiCall('GetLiveSession', $request, $callOptions)->wait(); - } - - /** - * Returns the specified slate. - * - * The async variant is {@see VideoStitcherServiceClient::getSlateAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_slate.php - * - * @param GetSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Slate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSlate(GetSlateRequest $request, array $callOptions = []): Slate - { - return $this->startApiCall('GetSlate', $request, $callOptions)->wait(); - } - - /** - * Returns the specified ad tag detail for the specified VOD session. - * - * The async variant is {@see VideoStitcherServiceClient::getVodAdTagDetailAsync()} - * . - * - * @example samples/V1/VideoStitcherServiceClient/get_vod_ad_tag_detail.php - * - * @param GetVodAdTagDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodAdTagDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodAdTagDetail(GetVodAdTagDetailRequest $request, array $callOptions = []): VodAdTagDetail - { - return $this->startApiCall('GetVodAdTagDetail', $request, $callOptions)->wait(); - } - - /** - * Returns the specified VOD config managed by the Video - * Stitcher API service. - * - * The async variant is {@see VideoStitcherServiceClient::getVodConfigAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_vod_config.php - * - * @param GetVodConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodConfig(GetVodConfigRequest $request, array $callOptions = []): VodConfig - { - return $this->startApiCall('GetVodConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the full tracking, playback metadata, and relevant ad-ops - * logs for the specified VOD session. - * - * The async variant is {@see VideoStitcherServiceClient::getVodSessionAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_vod_session.php - * - * @param GetVodSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodSession(GetVodSessionRequest $request, array $callOptions = []): VodSession - { - return $this->startApiCall('GetVodSession', $request, $callOptions)->wait(); - } - - /** - * Returns the specified stitching information for the specified VOD session. - * - * The async variant is - * {@see VideoStitcherServiceClient::getVodStitchDetailAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/get_vod_stitch_detail.php - * - * @param GetVodStitchDetailRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VodStitchDetail - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVodStitchDetail(GetVodStitchDetailRequest $request, array $callOptions = []): VodStitchDetail - { - return $this->startApiCall('GetVodStitchDetail', $request, $callOptions)->wait(); - } - - /** - * Lists all CDN keys in the specified project and location. - * - * The async variant is {@see VideoStitcherServiceClient::listCdnKeysAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_cdn_keys.php - * - * @param ListCdnKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCdnKeys(ListCdnKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCdnKeys', $request, $callOptions); - } - - /** - * Return the list of ad tag details for the specified live session. - * - * The async variant is - * {@see VideoStitcherServiceClient::listLiveAdTagDetailsAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_live_ad_tag_details.php - * - * @param ListLiveAdTagDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listLiveAdTagDetails(ListLiveAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLiveAdTagDetails', $request, $callOptions); - } - - /** - * Lists all live configs managed by the Video Stitcher that - * belong to the specified project and region. - * - * The async variant is {@see VideoStitcherServiceClient::listLiveConfigsAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_live_configs.php - * - * @param ListLiveConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listLiveConfigs(ListLiveConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLiveConfigs', $request, $callOptions); - } - - /** - * Lists all slates in the specified project and location. - * - * The async variant is {@see VideoStitcherServiceClient::listSlatesAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_slates.php - * - * @param ListSlatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSlates(ListSlatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSlates', $request, $callOptions); - } - - /** - * Return the list of ad tag details for the specified VOD session. - * - * The async variant is - * {@see VideoStitcherServiceClient::listVodAdTagDetailsAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_vod_ad_tag_details.php - * - * @param ListVodAdTagDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVodAdTagDetails(ListVodAdTagDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVodAdTagDetails', $request, $callOptions); - } - - /** - * Lists all VOD configs managed by the Video Stitcher API that - * belong to the specified project and region. - * - * The async variant is {@see VideoStitcherServiceClient::listVodConfigsAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_vod_configs.php - * - * @param ListVodConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVodConfigs(ListVodConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVodConfigs', $request, $callOptions); - } - - /** - * Returns a list of detailed stitching information of the specified VOD - * session. - * - * The async variant is - * {@see VideoStitcherServiceClient::listVodStitchDetailsAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/list_vod_stitch_details.php - * - * @param ListVodStitchDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVodStitchDetails(ListVodStitchDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVodStitchDetails', $request, $callOptions); - } - - /** - * Updates the specified CDN key. Only update fields specified - * in the call method body. - * - * The async variant is {@see VideoStitcherServiceClient::updateCdnKeyAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/update_cdn_key.php - * - * @param UpdateCdnKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateCdnKey(UpdateCdnKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCdnKey', $request, $callOptions)->wait(); - } - - /** - * Updates the specified LiveConfig. Only update fields specified - * in the call method body. - * - * The async variant is {@see VideoStitcherServiceClient::updateLiveConfigAsync()} - * . - * - * @example samples/V1/VideoStitcherServiceClient/update_live_config.php - * - * @param UpdateLiveConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateLiveConfig(UpdateLiveConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateLiveConfig', $request, $callOptions)->wait(); - } - - /** - * Updates the specified slate. - * - * The async variant is {@see VideoStitcherServiceClient::updateSlateAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/update_slate.php - * - * @param UpdateSlateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateSlate(UpdateSlateRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSlate', $request, $callOptions)->wait(); - } - - /** - * Updates the specified VOD config. Only update fields specified - * in the call method body. - * - * The async variant is {@see VideoStitcherServiceClient::updateVodConfigAsync()} . - * - * @example samples/V1/VideoStitcherServiceClient/update_vod_config.php - * - * @param UpdateVodConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateVodConfig(UpdateVodConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateVodConfig', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json deleted file mode 100644 index deb3878deaf3..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,168 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.video.stitcher.v1", - "libraryPackage": "Google\\Cloud\\Video\\Stitcher\\V1", - "services": { - "VideoStitcherService": { - "clients": { - "grpc": { - "libraryClient": "VideoStitcherServiceGapicClient", - "rpcs": { - "CreateCdnKey": { - "methods": [ - "createCdnKey" - ] - }, - "CreateLiveConfig": { - "methods": [ - "createLiveConfig" - ] - }, - "CreateLiveSession": { - "methods": [ - "createLiveSession" - ] - }, - "CreateSlate": { - "methods": [ - "createSlate" - ] - }, - "CreateVodConfig": { - "methods": [ - "createVodConfig" - ] - }, - "CreateVodSession": { - "methods": [ - "createVodSession" - ] - }, - "DeleteCdnKey": { - "methods": [ - "deleteCdnKey" - ] - }, - "DeleteLiveConfig": { - "methods": [ - "deleteLiveConfig" - ] - }, - "DeleteSlate": { - "methods": [ - "deleteSlate" - ] - }, - "DeleteVodConfig": { - "methods": [ - "deleteVodConfig" - ] - }, - "GetCdnKey": { - "methods": [ - "getCdnKey" - ] - }, - "GetLiveAdTagDetail": { - "methods": [ - "getLiveAdTagDetail" - ] - }, - "GetLiveConfig": { - "methods": [ - "getLiveConfig" - ] - }, - "GetLiveSession": { - "methods": [ - "getLiveSession" - ] - }, - "GetSlate": { - "methods": [ - "getSlate" - ] - }, - "GetVodAdTagDetail": { - "methods": [ - "getVodAdTagDetail" - ] - }, - "GetVodConfig": { - "methods": [ - "getVodConfig" - ] - }, - "GetVodSession": { - "methods": [ - "getVodSession" - ] - }, - "GetVodStitchDetail": { - "methods": [ - "getVodStitchDetail" - ] - }, - "ListCdnKeys": { - "methods": [ - "listCdnKeys" - ] - }, - "ListLiveAdTagDetails": { - "methods": [ - "listLiveAdTagDetails" - ] - }, - "ListLiveConfigs": { - "methods": [ - "listLiveConfigs" - ] - }, - "ListSlates": { - "methods": [ - "listSlates" - ] - }, - "ListVodAdTagDetails": { - "methods": [ - "listVodAdTagDetails" - ] - }, - "ListVodConfigs": { - "methods": [ - "listVodConfigs" - ] - }, - "ListVodStitchDetails": { - "methods": [ - "listVodStitchDetails" - ] - }, - "UpdateCdnKey": { - "methods": [ - "updateCdnKey" - ] - }, - "UpdateLiveConfig": { - "methods": [ - "updateLiveConfig" - ] - }, - "UpdateSlate": { - "methods": [ - "updateSlate" - ] - }, - "UpdateVodConfig": { - "methods": [ - "updateVodConfig" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json deleted file mode 100644 index 7c6b32e32f55..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_client_config.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "interfaces": { - "google.cloud.video.stitcher.v1.VideoStitcherService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "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_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 - } - }, - "methods": { - "CreateCdnKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateLiveConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateLiveSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSlate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateVodConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateVodSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteCdnKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLiveConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSlate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteVodConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCdnKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLiveAdTagDetail": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLiveConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLiveSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetSlate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetVodAdTagDetail": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetVodConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVodSession": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetVodStitchDetail": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListCdnKeys": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLiveAdTagDetails": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLiveConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListSlates": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListVodAdTagDetails": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListVodConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVodStitchDetails": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateCdnKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateLiveConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSlate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateVodConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php deleted file mode 100644 index e80d4ba18a1a..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_descriptor_config.php +++ /dev/null @@ -1,544 +0,0 @@ - [ - 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ - 'CreateCdnKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLiveConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\LiveConfig', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSlate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVodConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\VodConfig', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCdnKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLiveConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSlate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVodConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCdnKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\CdnKey', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cdn_key.name', - 'fieldAccessors' => [ - 'getCdnKey', - 'getName', - ], - ], - ], - ], - 'UpdateLiveConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\LiveConfig', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'live_config.name', - 'fieldAccessors' => [ - 'getLiveConfig', - 'getName', - ], - ], - ], - ], - 'UpdateSlate' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\Slate', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'slate.name', - 'fieldAccessors' => [ - 'getSlate', - 'getName', - ], - ], - ], - ], - 'UpdateVodConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Video\Stitcher\V1\VodConfig', - 'metadataReturnType' => '\Google\Cloud\Video\Stitcher\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'vod_config.name', - 'fieldAccessors' => [ - 'getVodConfig', - 'getName', - ], - ], - ], - ], - 'CreateLiveSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVodSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetCdnKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\CdnKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveAdTagDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveAdTagDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\LiveSession', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSlate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\Slate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodAdTagDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodAdTagDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodSession', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVodStitchDetail' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\VodStitchDetail', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCdnKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCdnKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListCdnKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveAdTagDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLiveAdTagDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveAdTagDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLiveConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListLiveConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSlates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSlates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListSlatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodAdTagDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVodAdTagDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodAdTagDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVodConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodStitchDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVodStitchDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Stitcher\V1\ListVodStitchDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'cdnKey' => 'projects/{project}/locations/{location}/cdnKeys/{cdn_key}', - 'liveAdTagDetail' => 'projects/{project}/locations/{location}/liveSessions/{live_session}/liveAdTagDetails/{live_ad_tag_detail}', - 'liveConfig' => 'projects/{project}/locations/{location}/liveConfigs/{live_config}', - 'liveSession' => 'projects/{project}/locations/{location}/liveSessions/{live_session}', - 'location' => 'projects/{project}/locations/{location}', - 'slate' => 'projects/{project}/locations/{location}/slates/{slate}', - 'vodAdTagDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodAdTagDetails/{vod_ad_tag_detail}', - 'vodConfig' => 'projects/{project}/locations/{location}/vodConfigs/{vod_config}', - 'vodSession' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}', - 'vodStitchDetail' => 'projects/{project}/locations/{location}/vodSessions/{vod_session}/vodStitchDetails/{vod_stitch_detail}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php b/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php deleted file mode 100644 index bbeb54d103eb..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/src/V1/resources/video_stitcher_service_rest_client_config.php +++ /dev/null @@ -1,444 +0,0 @@ - [ - 'google.cloud.video.stitcher.v1.VideoStitcherService' => [ - 'CreateCdnKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', - 'body' => 'cdn_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cdn_key_id', - ], - ], - 'CreateLiveConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', - 'body' => 'live_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'live_config_id', - ], - ], - 'CreateLiveSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveSessions', - 'body' => 'live_session', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSlate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', - 'body' => 'slate', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'slate_id', - ], - ], - 'CreateVodConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodConfigs', - 'body' => 'vod_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'vod_config_id', - ], - ], - 'CreateVodSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodSessions', - 'body' => 'vod_session', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCdnKey' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLiveConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSlate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVodConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCdnKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cdnKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveAdTagDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*/liveAdTagDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLiveSession' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/liveSessions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSlate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/slates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodAdTagDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodAdTagDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodSession' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVodStitchDetail' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vodSessions/*/vodStitchDetails/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCdnKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cdnKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveAdTagDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/liveSessions/*}/liveAdTagDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLiveConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/liveConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSlates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/slates', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodAdTagDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodAdTagDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vodConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVodStitchDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/vodSessions/*}/vodStitchDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCdnKey' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cdn_key.name=projects/*/locations/*/cdnKeys/*}', - 'body' => 'cdn_key', - 'placeholders' => [ - 'cdn_key.name' => [ - 'getters' => [ - 'getCdnKey', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateLiveConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{live_config.name=projects/*/locations/*/liveConfigs/*}', - 'body' => 'live_config', - 'placeholders' => [ - 'live_config.name' => [ - 'getters' => [ - 'getLiveConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSlate' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{slate.name=projects/*/locations/*/slates/*}', - 'body' => 'slate', - 'placeholders' => [ - 'slate.name' => [ - 'getters' => [ - 'getSlate', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateVodConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{vod_config.name=projects/*/locations/*/vodConfigs/*}', - 'body' => 'vod_config', - 'placeholders' => [ - 'vod_config.name' => [ - 'getters' => [ - 'getVodConfig', - '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/*}', - '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/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php b/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php deleted file mode 100644 index e66f9fa175a8..000000000000 --- a/owl-bot-staging/VideoStitcher/v1/tests/Unit/V1/Client/VideoStitcherServiceClientTest.php +++ /dev/null @@ -1,3059 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VideoStitcherServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VideoStitcherServiceClient($options); - } - - /** @test */ - public function createCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $request = (new CreateCdnKeyRequest()) - ->setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - $response = $gapicClient->createCdnKey($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.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKeyId(); - $this->assertProtobufEquals($cdnKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - $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 createCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $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]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $request = (new CreateCdnKeyRequest()) - ->setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - $response = $gapicClient->createCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - 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 createLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $liveConfigId = 'liveConfigId-558267483'; - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $request = (new CreateLiveConfigRequest()) - ->setParent($formattedParent) - ->setLiveConfigId($liveConfigId) - ->setLiveConfig($liveConfig); - $response = $gapicClient->createLiveConfig($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.video.stitcher.v1.VideoStitcherService/CreateLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLiveConfigId(); - $this->assertProtobufEquals($liveConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getLiveConfig(); - $this->assertProtobufEquals($liveConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); - $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 createLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLiveConfigTest'); - $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]'); - $liveConfigId = 'liveConfigId-558267483'; - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $request = (new CreateLiveConfigRequest()) - ->setParent($formattedParent) - ->setLiveConfigId($liveConfigId) - ->setLiveConfig($liveConfig); - $response = $gapicClient->createLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLiveConfigTest'); - 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 createLiveSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $playUri = 'playUri1879098849'; - $liveConfig = 'liveConfig-1498665483'; - $expectedResponse = new LiveSession(); - $expectedResponse->setName($name); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setLiveConfig($liveConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $liveSession = new LiveSession(); - $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $liveSession->setLiveConfig($liveSessionLiveConfig); - $request = (new CreateLiveSessionRequest()) - ->setParent($formattedParent) - ->setLiveSession($liveSession); - $response = $gapicClient->createLiveSession($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.video.stitcher.v1.VideoStitcherService/CreateLiveSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getLiveSession(); - $this->assertProtobufEquals($liveSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLiveSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $liveSession = new LiveSession(); - $liveSessionLiveConfig = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $liveSession->setLiveConfig($liveSessionLiveConfig); - $request = (new CreateLiveSessionRequest()) - ->setParent($formattedParent) - ->setLiveSession($liveSession); - try { - $gapicClient->createLiveSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $slateId = 'slateId-1486865023'; - $slate = new Slate(); - $request = (new CreateSlateRequest()) - ->setParent($formattedParent) - ->setSlateId($slateId) - ->setSlate($slate); - $response = $gapicClient->createSlate($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.video.stitcher.v1.VideoStitcherService/CreateSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSlateId(); - $this->assertProtobufEquals($slateId, $actualValue); - $actualValue = $actualApiRequestObject->getSlate(); - $this->assertProtobufEquals($slate, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSlateTest'); - $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 createSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSlateTest'); - $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]'); - $slateId = 'slateId-1486865023'; - $slate = new Slate(); - $request = (new CreateSlateRequest()) - ->setParent($formattedParent) - ->setSlateId($slateId) - ->setSlate($slate); - $response = $gapicClient->createSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSlateTest'); - 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 createVodConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVodConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $expectedResponse = new VodConfig(); - $expectedResponse->setName($name); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createVodConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vodConfigId = 'vodConfigId-418410300'; - $vodConfig = new VodConfig(); - $vodConfigSourceUri = 'vodConfigSourceUri538718692'; - $vodConfig->setSourceUri($vodConfigSourceUri); - $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; - $vodConfig->setAdTagUri($vodConfigAdTagUri); - $request = (new CreateVodConfigRequest()) - ->setParent($formattedParent) - ->setVodConfigId($vodConfigId) - ->setVodConfig($vodConfig); - $response = $gapicClient->createVodConfig($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.video.stitcher.v1.VideoStitcherService/CreateVodConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getVodConfigId(); - $this->assertProtobufEquals($vodConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getVodConfig(); - $this->assertProtobufEquals($vodConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVodConfigTest'); - $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 createVodConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVodConfigTest'); - $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]'); - $vodConfigId = 'vodConfigId-418410300'; - $vodConfig = new VodConfig(); - $vodConfigSourceUri = 'vodConfigSourceUri538718692'; - $vodConfig->setSourceUri($vodConfigSourceUri); - $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; - $vodConfig->setAdTagUri($vodConfigAdTagUri); - $request = (new CreateVodConfigRequest()) - ->setParent($formattedParent) - ->setVodConfigId($vodConfigId) - ->setVodConfig($vodConfig); - $response = $gapicClient->createVodConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVodConfigTest'); - 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 createVodSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $playUri = 'playUri1879098849'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $assetId = 'assetId-373202742'; - $vodConfig = 'vodConfig-936686282'; - $expectedResponse = new VodSession(); - $expectedResponse->setName($name); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setAssetId($assetId); - $expectedResponse->setVodConfig($vodConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vodSession = new VodSession(); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $vodSession->setAdTracking($vodSessionAdTracking); - $request = (new CreateVodSessionRequest()) - ->setParent($formattedParent) - ->setVodSession($vodSession); - $response = $gapicClient->createVodSession($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.video.stitcher.v1.VideoStitcherService/CreateVodSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getVodSession(); - $this->assertProtobufEquals($vodSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createVodSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $vodSession = new VodSession(); - $vodSessionAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $vodSession->setAdTracking($vodSessionAdTracking); - $request = (new CreateVodSessionRequest()) - ->setParent($formattedParent) - ->setVodSession($vodSession); - try { - $gapicClient->createVodSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new DeleteCdnKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCdnKey($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.video.stitcher.v1.VideoStitcherService/DeleteCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); - $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 deleteCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCdnKeyTest'); - $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->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new DeleteCdnKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCdnKeyTest'); - 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 deleteLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new DeleteLiveConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLiveConfig($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.video.stitcher.v1.VideoStitcherService/DeleteLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); - $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 deleteLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLiveConfigTest'); - $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->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new DeleteLiveConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLiveConfigTest'); - 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 deleteSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new DeleteSlateRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSlate($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.video.stitcher.v1.VideoStitcherService/DeleteSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); - $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 deleteSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSlateTest'); - $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->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new DeleteSlateRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSlateTest'); - 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 deleteVodConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVodConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteVodConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); - $request = (new DeleteVodConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVodConfig($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.video.stitcher.v1.VideoStitcherService/DeleteVodConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVodConfigTest'); - $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 deleteVodConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVodConfigTest'); - $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->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); - $request = (new DeleteVodConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVodConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVodConfigTest'); - 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 getCdnKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name2); - $expectedResponse->setHostname($hostname); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new GetCdnKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getCdnKey($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.video.stitcher.v1.VideoStitcherService/GetCdnKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCdnKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cdnKeyName('[PROJECT]', '[LOCATION]', '[CDN_KEY]'); - $request = (new GetCdnKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getCdnKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveAdTagDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new LiveAdTagDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - $request = (new GetLiveAdTagDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getLiveAdTagDetail($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.video.stitcher.v1.VideoStitcherService/GetLiveAdTagDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveAdTagDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->liveAdTagDetailName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]', '[LIVE_AD_TAG_DETAIL]'); - $request = (new GetLiveAdTagDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getLiveAdTagDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new GetLiveConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getLiveConfig($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.video.stitcher.v1.VideoStitcherService/GetLiveConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->liveConfigName('[PROJECT]', '[LOCATION]', '[LIVE_CONFIG]'); - $request = (new GetLiveConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getLiveConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $playUri = 'playUri1879098849'; - $liveConfig = 'liveConfig-1498665483'; - $expectedResponse = new LiveSession(); - $expectedResponse->setName($name2); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setLiveConfig($liveConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new GetLiveSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->getLiveSession($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.video.stitcher.v1.VideoStitcherService/GetLiveSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLiveSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new GetLiveSessionRequest()) - ->setName($formattedName); - try { - $gapicClient->getLiveSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSlateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new GetSlateRequest()) - ->setName($formattedName); - $response = $gapicClient->getSlate($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.video.stitcher.v1.VideoStitcherService/GetSlate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSlateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->slateName('[PROJECT]', '[LOCATION]', '[SLATE]'); - $request = (new GetSlateRequest()) - ->setName($formattedName); - try { - $gapicClient->getSlate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodAdTagDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VodAdTagDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - $request = (new GetVodAdTagDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodAdTagDetail($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.video.stitcher.v1.VideoStitcherService/GetVodAdTagDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodAdTagDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vodAdTagDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_AD_TAG_DETAIL]'); - $request = (new GetVodAdTagDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodAdTagDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $expectedResponse = new VodConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); - $request = (new GetVodConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodConfig($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.video.stitcher.v1.VideoStitcherService/GetVodConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vodConfigName('[PROJECT]', '[LOCATION]', '[VOD_CONFIG]'); - $request = (new GetVodConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $playUri = 'playUri1879098849'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $assetId = 'assetId-373202742'; - $vodConfig = 'vodConfig-936686282'; - $expectedResponse = new VodSession(); - $expectedResponse->setName($name2); - $expectedResponse->setPlayUri($playUri); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setAssetId($assetId); - $expectedResponse->setVodConfig($vodConfig); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new GetVodSessionRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodSession($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.video.stitcher.v1.VideoStitcherService/GetVodSession', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new GetVodSessionRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodStitchDetailTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VodStitchDetail(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - $request = (new GetVodStitchDetailRequest()) - ->setName($formattedName); - $response = $gapicClient->getVodStitchDetail($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.video.stitcher.v1.VideoStitcherService/GetVodStitchDetail', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVodStitchDetailExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vodStitchDetailName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]', '[VOD_STITCH_DETAIL]'); - $request = (new GetVodStitchDetailRequest()) - ->setName($formattedName); - try { - $gapicClient->getVodStitchDetail($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCdnKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cdnKeysElement = new CdnKey(); - $cdnKeys = [ - $cdnKeysElement, - ]; - $expectedResponse = new ListCdnKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCdnKeys($cdnKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCdnKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCdnKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCdnKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListCdnKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCdnKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListCdnKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCdnKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveAdTagDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $liveAdTagDetailsElement = new LiveAdTagDetail(); - $liveAdTagDetails = [ - $liveAdTagDetailsElement, - ]; - $expectedResponse = new ListLiveAdTagDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLiveAdTagDetails($liveAdTagDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new ListLiveAdTagDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLiveAdTagDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLiveAdTagDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveAdTagDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveAdTagDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->liveSessionName('[PROJECT]', '[LOCATION]', '[LIVE_SESSION]'); - $request = (new ListLiveAdTagDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLiveAdTagDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $liveConfigsElement = new LiveConfig(); - $liveConfigs = [ - $liveConfigsElement, - ]; - $expectedResponse = new ListLiveConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLiveConfigs($liveConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLiveConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLiveConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLiveConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListLiveConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLiveConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListLiveConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLiveConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSlatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $slatesElement = new Slate(); - $slates = [ - $slatesElement, - ]; - $expectedResponse = new ListSlatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSlates($slates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSlatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSlates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSlates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListSlates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSlatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListSlatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSlates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodAdTagDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodAdTagDetailsElement = new VodAdTagDetail(); - $vodAdTagDetails = [ - $vodAdTagDetailsElement, - ]; - $expectedResponse = new ListVodAdTagDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodAdTagDetails($vodAdTagDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodAdTagDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVodAdTagDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodAdTagDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodAdTagDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodAdTagDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodAdTagDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVodAdTagDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodConfigsElement = new VodConfig(); - $vodConfigs = [ - $vodConfigsElement, - ]; - $expectedResponse = new ListVodConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodConfigs($vodConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVodConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVodConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListVodConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVodConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodStitchDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vodStitchDetailsElement = new VodStitchDetail(); - $vodStitchDetails = [ - $vodStitchDetailsElement, - ]; - $expectedResponse = new ListVodStitchDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVodStitchDetails($vodStitchDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodStitchDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVodStitchDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVodStitchDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.stitcher.v1.VideoStitcherService/ListVodStitchDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVodStitchDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vodSessionName('[PROJECT]', '[LOCATION]', '[VOD_SESSION]'); - $request = (new ListVodStitchDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVodStitchDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCdnKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $cdnKey = new CdnKey(); - $updateMask = new FieldMask(); - $request = (new UpdateCdnKeyRequest()) - ->setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCdnKey($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.video.stitcher.v1.VideoStitcherService/UpdateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); - $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 updateCdnKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateCdnKeyTest'); - $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 - $cdnKey = new CdnKey(); - $updateMask = new FieldMask(); - $request = (new UpdateCdnKeyRequest()) - ->setCdnKey($cdnKey) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateCdnKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCdnKeyTest'); - 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 updateLiveConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLiveConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $defaultSlate = 'defaultSlate1316218395'; - $expectedResponse = new LiveConfig(); - $expectedResponse->setName($name); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $expectedResponse->setDefaultSlate($defaultSlate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLiveConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $updateMask = new FieldMask(); - $request = (new UpdateLiveConfigRequest()) - ->setLiveConfig($liveConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateLiveConfig($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.video.stitcher.v1.VideoStitcherService/UpdateLiveConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getLiveConfig(); - $this->assertProtobufEquals($liveConfig, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLiveConfigTest'); - $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 updateLiveConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLiveConfigTest'); - $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 - $liveConfig = new LiveConfig(); - $liveConfigSourceUri = 'liveConfigSourceUri-20192349'; - $liveConfig->setSourceUri($liveConfigSourceUri); - $liveConfigAdTracking = AdTracking::AD_TRACKING_UNSPECIFIED; - $liveConfig->setAdTracking($liveConfigAdTracking); - $updateMask = new FieldMask(); - $request = (new UpdateLiveConfigRequest()) - ->setLiveConfig($liveConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateLiveConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLiveConfigTest'); - 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 updateSlateTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSlateTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new Slate(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSlateTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $slate = new Slate(); - $updateMask = new FieldMask(); - $request = (new UpdateSlateRequest()) - ->setSlate($slate) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSlate($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.video.stitcher.v1.VideoStitcherService/UpdateSlate', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSlate(); - $this->assertProtobufEquals($slate, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSlateTest'); - $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 updateSlateExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSlateTest'); - $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 - $slate = new Slate(); - $updateMask = new FieldMask(); - $request = (new UpdateSlateRequest()) - ->setSlate($slate) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSlate($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSlateTest'); - 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 updateVodConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVodConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceUri = 'sourceUri-1111107768'; - $adTagUri = 'adTagUri-1429194965'; - $expectedResponse = new VodConfig(); - $expectedResponse->setName($name); - $expectedResponse->setSourceUri($sourceUri); - $expectedResponse->setAdTagUri($adTagUri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateVodConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $vodConfig = new VodConfig(); - $vodConfigSourceUri = 'vodConfigSourceUri538718692'; - $vodConfig->setSourceUri($vodConfigSourceUri); - $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; - $vodConfig->setAdTagUri($vodConfigAdTagUri); - $updateMask = new FieldMask(); - $request = (new UpdateVodConfigRequest()) - ->setVodConfig($vodConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVodConfig($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.video.stitcher.v1.VideoStitcherService/UpdateVodConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVodConfig(); - $this->assertProtobufEquals($vodConfig, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVodConfigTest'); - $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 updateVodConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVodConfigTest'); - $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 - $vodConfig = new VodConfig(); - $vodConfigSourceUri = 'vodConfigSourceUri538718692'; - $vodConfig->setSourceUri($vodConfigSourceUri); - $vodConfigAdTagUri = 'vodConfigAdTagUri-1204642686'; - $vodConfig->setAdTagUri($vodConfigAdTagUri); - $updateMask = new FieldMask(); - $request = (new UpdateVodConfigRequest()) - ->setVodConfig($vodConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVodConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVodConfigTest'); - 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 createCdnKeyAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCdnKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $expectedResponse = new CdnKey(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCdnKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cdnKey = new CdnKey(); - $cdnKeyId = 'cdnKeyId1672586061'; - $request = (new CreateCdnKeyRequest()) - ->setParent($formattedParent) - ->setCdnKey($cdnKey) - ->setCdnKeyId($cdnKeyId); - $response = $gapicClient->createCdnKeyAsync($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.video.stitcher.v1.VideoStitcherService/CreateCdnKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKey(); - $this->assertProtobufEquals($cdnKey, $actualValue); - $actualValue = $actualApiRequestObject->getCdnKeyId(); - $this->assertProtobufEquals($cdnKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCdnKeyTest'); - $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/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/GPBMetadata/Google/Cloud/Video/Transcoder/V1/Resources.php deleted file mode 100644 index ad3639321aeeb3e3639d14c9bae7397c210b8c6c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11097 zcmeHNOLN=S6%Hj)A`kV1Wt*m(gl3#ZZepsY^RVSO31714SQ0Bz?j+F^0}_`a5)eQD zP_~k~+bp`ubUM>+I+L0Hg8qPR`bRqLE?s2NRTrJk)wUdcXS7IQV9>Dks{*6*^cDEWFwqA-AGq?5!Kj)Jv?Z9T>K|wifLw0y&8^5bF3;p*Sjiv>=q? zbC5O-v;<%4IpfprIPJX#s=Duurr}z<`JN$lRMhoQCF^L&E1?icq_4qOb@=IdEm)B@ zpXWB8=Qf{@Y(9T*D|1C+YK{@wzcByIOY#wS1~jKtUCK{Be|h-19|%dla9O_KI_*_5 zsJ?Wp-0zbx`Ot1DvoJ+2mX2j(D@o-NBn`{y`)c1c(i3#6H2K%!lyVus?)$-m$>>1_ zQa(W*$4 z`A3|lYWeP=@?(fI*R|dB66Z<@5YRI6B&xnAc3pz09!BHzGQKuncr$qI^o1g+Zz8R7 z6)v{Np)O|Fou7azR35o3$wO^dN97=ksy7EFSIt^LfZqB4Rj-)?H>}~vCK_K z4Q@9Dlb^9eY1VTPKhVrR6DGYjaVM7R!a~F}Hx(rdKdSF+m#d9NZR>&BXcn7Qb$6># zua;};wQ6PY1tkSD_3BmyA1}t}$IkB77X6q|<{;VFEtjj+3cfh008FnJYme}HD%XSg zXeBP5m*MKbLYv!_;dMs5P}^!&cZ%g^?Qs>?z5*AA5lY2od1G-R_X#YI5|Z*NT-&ZU zYn!!?i_O~h7Vd8cH~8SAp)Jk>6nC4*QnOla;!3lSsMH$8676MT?eVw82D~^BzJy0( zt(tb5D;w_xm(Nx|wOjZb|9@7R1;D>({1h&7f0=+3 zA~j`T8H!Q&!mvUC>U?1ZgG%5?liZQ+j%9WMCxZ@kPJ>&szb%^Z>Zzg&mQl**5Me+h zM5+2xXwPzgk3$lrDB`K|4ovgN?x9Oi1lfD-?48#r6<`=oGTrc1)9`$BAR_+B*|b$8 zDf)I#*#d=`tj8=2rH88LV;t^zX(9c>7&sv6tO4^j(<%3XwMsaClbub^^Y#~=~f{t=euLk}b;N-70d2r32D z?sPonONOol`$vv>6Oj+9W-MfuqLL(_qM|ERIGHN7%FAh9J1ck#Q<|?C*f?|LCY8*{a7a-sseA~F z9^0o-siHNYpYBt9BHfHp?==KvLlP<%VJ>nls?BE*DVh6v3KC%`JHoQ)03O1Wf9Qxx zX}<7IV2US~e*suNxM(6dm1Gl2`e>-8n9uu(3DonHu6bSFFO21Z0eHTGWWobCUdVhG z1Bh-Y7Ni6DxeNyqxPOdo?Ji~?ZjkeZN9Wj21e}+$-3dS&95eShTpImES%K?~>VwVd zR#V-nu2*-eTji?SC~s6ZhfBRhm<`^1RBKShbrmiLcbe7B`Xeesw{|y6)g7$vK7iRk z6eMTmMYytA+^Vft8%?$OQGFPF1|~NiH4robQ%-C#Ec9e53+k;LEFI4dSTp;! zW3)vHo%=V|WP@QJqglsxdzvqvldie-W1#IAPov&(0?XZ{jMLpLZL;zvJA60XzKSY&l9lWzA6%zWO*@e{U3DMBb+gbNsjT#XN# zD1z}GC->_l%mi8UJ%}4UZC@C5s<3*tQA^5vjmVS-0B8ZIJDzk!NjF9X5r7l}+RPiU zyhTR9r)Oo`c6BOCn39CpQ*IYAx;*685X<}$Gc{j-Q6y&`aD)Zy0MO*m>=R4;^;F@# z@wYXS2{d5Mbh;Y1v{>dhF<1yWr-sjHD-U7fspt{E|8gTUtH@s`8&T%#378AHTGz05 zeu!xV|EfF+lZfUEW0c8(ZU`a@z+!)biSH}Uk^2*w_2m7Ha;&q;l}rU@Ly=T1eY8uT zRkLJ%Hv!2IM%jf$EihYjD$+hT&{W~>_+}Qu3G+ek{Ta+hu%tF=yJO_dKw}{&sSY8x zVJ?Ei0#O!)Z$Af{D7=jqN{fR$l2u_6Nd$I6lZ5pm4j@J(4;*mtN3|_62jD-pcbk}o z{t0klL{W^!8^Lnfh~duKB}0wrH22y7f@bY|Ix7YOzK^PyD)h`?*%_~A1t(&xtG zAhcIrtI8tgIrqv7S7igH+OF-$YHy5L*hsMij;71jbPU@b1yt8`Gr0t<(_GLqkb znLwvVfEkim`+iqK;5^&!TXNEe2?}2o>N@@^re0=gEtBcoYZIAwAuiN`AZEWqqY}wO z7gZLq+qSXw;a66%b?6BFiCp(?|}bt5>k~&-O4W@eyHh2NBZ&R_tty)oV}x=W6LFMLBaag z(fHJwl#*0lf=dJbplYV6c3e7}C-alJQ1H}0aq%7lnz8$oTJoymdTT(6O2YhQ7a1$mEoVzmM zj!}XPGWgiJI|P^c*CZ?*vg4tiJc*fei6E$n@?G2HXB|B5CVAiQc2tucFq4PQIG(J{qs?H*upMTp`xxt~ z!AKy=0{#%TG}KAlf?0YL9QlpYO3o__v-s9ps&j~@k0S*-oZ{H6BO6%c02te} z&-n<3hi5u=ic!0RQ!VNg(+bB6;`IgoiyQ?T0UU+V@l&z{kRTC|^Je}gbbr*u{;zwH zK+$)9K;2_@i3d)Til>oShT|JNF(hd=GZ@); z927AR!$P~OSr!YX7@`8fU=`fPxjvqDV3HF9%9)<#IFu#Dxycxn>HuGPe!VFWDE4^x zH3w#49!9&&^}pcplgA!Yv-bNqtl+^%%r40eFmdC@28UwEN&-%1zKLPKNaNoC_#z}U zs?+KQQy?{XNLfKXMD^|C z&{x%4d_%F^KX6bP4VQ=YgIYMcT~Q^}Ae6Q^F1vGff{zx-(`6u%Vaf5KeFkg%!Iyq0 zxzXAB@HF~%G};dH8Kvpd{D3BhhNT+^hK>_5w01rk7hOPt>n``*3_x@igl;o|S&0UL za?V_b8I5`Bt-_u0d%g%SUt}JVMmNwiA5+`Htrmf0>-WLgdWkUd4Ni{G(LIiv>^W>- zZ8NJa+rTlptq3B&iPUAg*R!qYCgL)<;xYXA#aD6ai~i)2Td3kAJK5EplYNf1DZm>1 zyS|MW4nk78+f%(m4-cR{UfZO`IX#GY%~#xBLy&XbW)xT)mVX9^qa(zZc^#HVZ6DjK zX*vFn{5?}ZjN^O2vHQFf6rN3bG=}8eg5U+~ke}mMh6i|%lfmnC&2T9UWm1r=<6k_V z)eq@G*<_lF0?zzt0#7Ew4dKK!ffXvJm&N)Rr;Y=%2^J@yj$B+8>E{CqIL8kmlC%TP zx%7=OMoa@Nh5II++H&90AinternalAddGeneratedFile( - ' -ö -/google/cloud/video/transcoder/v1/services.proto google.cloud.video.transcoder.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/video/transcoder/v1/resources.protogoogle/protobuf/empty.proto"† -CreateJobRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location7 -job ( 2%.google.cloud.video.transcoder.v1.JobBàA"• -ListJobsRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token (  -filter (  -order_by ( "D - GetJobRequest3 -name ( B%àAúA -transcoder.googleapis.com/Job"^ -DeleteJobRequest3 -name ( B%àAúA -transcoder.googleapis.com/Job - allow_missing ("u -ListJobsResponse3 -jobs ( 2%.google.cloud.video.transcoder.v1.Job -next_page_token (  - unreachable ( "½ -CreateJobTemplateRequest9 -parent ( B)àAúA# -!locations.googleapis.com/LocationH - job_template ( 2-.google.cloud.video.transcoder.v1.JobTemplateBàA -job_template_id ( BàA" -ListJobTemplatesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token (  -filter (  -order_by ( "T -GetJobTemplateRequest; -name ( B-àAúA\' -%transcoder.googleapis.com/JobTemplate"n -DeleteJobTemplateRequest; -name ( B-àAúA\' -%transcoder.googleapis.com/JobTemplate - allow_missing ("Ž -ListJobTemplatesResponseD - job_templates ( 2-.google.cloud.video.transcoder.v1.JobTemplate -next_page_token (  - unreachable ( 2’ -TranscoderServiceª - CreateJob2.google.cloud.video.transcoder.v1.CreateJobRequest%.google.cloud.video.transcoder.v1.Job"BÚA -parent,job‚Óä“/"(/v1/{parent=projects/*/locations/*}/jobs:job¬ -ListJobs1.google.cloud.video.transcoder.v1.ListJobsRequest2.google.cloud.video.transcoder.v1.ListJobsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*/locations/*}/jobs™ -GetJob/.google.cloud.video.transcoder.v1.GetJobRequest%.google.cloud.video.transcoder.v1.Job"7ÚAname‚Óä“*(/v1/{name=projects/*/locations/*/jobs/*} - DeleteJob2.google.cloud.video.transcoder.v1.DeleteJobRequest.google.protobuf.Empty"7ÚAname‚Óä“**(/v1/{name=projects/*/locations/*/jobs/*}ì -CreateJobTemplate:.google.cloud.video.transcoder.v1.CreateJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"lÚA#parent,job_template,job_template_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/jobTemplates: job_templateÌ -ListJobTemplates9.google.cloud.video.transcoder.v1.ListJobTemplatesRequest:.google.cloud.video.transcoder.v1.ListJobTemplatesResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/jobTemplates¹ -GetJobTemplate7.google.cloud.video.transcoder.v1.GetJobTemplateRequest-.google.cloud.video.transcoder.v1.JobTemplate"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/jobTemplates/*}¨ -DeleteJobTemplate:.google.cloud.video.transcoder.v1.DeleteJobTemplateRequest.google.protobuf.Empty"?ÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/jobTemplates/*}MÊAtranscoder.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBê -$com.google.cloud.video.transcoder.v1B ServicesProtoPZDcloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpbª Google.Cloud.Video.Transcoder.V1Ê Google\\Cloud\\Video\\Transcoder\\V1ê$Google::Cloud::Video::Transcoder::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php deleted file mode 100644 index 9cadeb444fd8..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AdBreak.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.video.transcoder.v1.AdBreak - */ -class AdBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_time_offset - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Start time in seconds for the ad break, relative to the output file - * timeline. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php deleted file mode 100644 index 7cf6be6554b6..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream.php +++ /dev/null @@ -1,389 +0,0 @@ -google.cloud.video.transcoder.v1.AudioStream - */ -class AudioStream extends \Google\Protobuf\Internal\Message -{ - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - */ - protected $channel_count = 0; - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - */ - private $channel_layout; - /** - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; - */ - private $mapping; - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - */ - protected $sample_rate_hertz = 0; - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 7; - */ - protected $language_code = ''; - /** - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 8; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * @type int $bitrate_bps - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * @type int $channel_count - * Number of audio channels. Must be between 1 and 6. The default is 2. - * @type array|\Google\Protobuf\Internal\RepeatedField $channel_layout - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * @type array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $mapping - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * @type int $sample_rate_hertz - * The audio sample rate in Hertz. The default is 48000 Hertz. - * @type string $language_code - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * @type string $display_name - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * The codec for this audio stream. The default is `aac`. - * Supported audio codecs: - * - `aac` - * - `aac-he` - * - `aac-he-v2` - * - `mp3` - * - `ac3` - * - `eac3` - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. Audio bitrate in bits per second. Must be between 1 and - * 10,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @return int - */ - public function getChannelCount() - { - return $this->channel_count; - } - - /** - * Number of audio channels. Must be between 1 and 6. The default is 2. - * - * Generated from protobuf field int32 channel_count = 3; - * @param int $var - * @return $this - */ - public function setChannelCount($var) - { - GPBUtil::checkInt32($var); - $this->channel_count = $var; - - return $this; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelLayout() - { - return $this->channel_layout; - } - - /** - * A list of channel names specifying layout of the audio channels. - * This only affects the metadata embedded in the container headers, if - * supported by the specified format. The default is `["fl", "fr"]`. - * Supported channel names: - * - `fl` - Front left channel - * - `fr` - Front right channel - * - `sl` - Side left channel - * - `sr` - Side right channel - * - `fc` - Front center channel - * - `lfe` - Low frequency - * - * Generated from protobuf field repeated string channel_layout = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelLayout($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->channel_layout = $arr; - - return $this; - } - - /** - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AudioStream.AudioMapping mapping = 5; - * @param array<\Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AudioStream\AudioMapping::class); - $this->mapping = $arr; - - return $this; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * The audio sample rate in Hertz. The default is 48000 Hertz. - * - * Generated from protobuf field int32 sample_rate_hertz = 6; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 7; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 7; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 8; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name for this particular audio stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 8; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php deleted file mode 100644 index ee7b36b6e3d4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/AudioStream/AudioMapping.php +++ /dev/null @@ -1,248 +0,0 @@ -google.cloud.video.transcoder.v1.AudioStream.AudioMapping - */ -class AudioMapping extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $atom_key = ''; - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_key = ''; - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_track = 0; - /** - * Required. The zero-based index of the channel in the input audio stream. - * - * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_channel = 0; - /** - * Required. The zero-based index of the channel in the output audio stream. - * - * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_channel = 0; - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 6; - */ - protected $gain_db = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $atom_key - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * @type string $input_key - * Required. The `Input.key` that identifies the input file. - * @type int $input_track - * Required. The zero-based index of the track in the input file. - * @type int $input_channel - * Required. The zero-based index of the channel in the input audio stream. - * @type int $output_channel - * Required. The zero-based index of the channel in the output audio stream. - * @type float $gain_db - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAtomKey() - { - return $this->atom_key; - } - - /** - * Required. The `EditAtom.key` that references the atom with audio inputs - * in the `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAtomKey($var) - { - GPBUtil::checkString($var, True); - $this->atom_key = $var; - - return $this; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputTrack() - { - return $this->input_track; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputTrack($var) - { - GPBUtil::checkInt32($var); - $this->input_track = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the input audio stream. - * - * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputChannel() - { - return $this->input_channel; - } - - /** - * Required. The zero-based index of the channel in the input audio stream. - * - * Generated from protobuf field int32 input_channel = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputChannel($var) - { - GPBUtil::checkInt32($var); - $this->input_channel = $var; - - return $this; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * - * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getOutputChannel() - { - return $this->output_channel; - } - - /** - * Required. The zero-based index of the channel in the output audio stream. - * - * Generated from protobuf field int32 output_channel = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setOutputChannel($var) - { - GPBUtil::checkInt32($var); - $this->output_channel = $var; - - return $this; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 6; - * @return float - */ - public function getGainDb() - { - return $this->gain_db; - } - - /** - * Audio volume control in dB. Negative values decrease volume, - * positive values increase. The default is 0. - * - * Generated from protobuf field double gain_db = 6; - * @param float $var - * @return $this - */ - public function setGainDb($var) - { - GPBUtil::checkDouble($var); - $this->gain_db = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AudioMapping::class, \Google\Cloud\Video\Transcoder\V1\AudioStream_AudioMapping::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php deleted file mode 100644 index e6d90c39b24b..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.video.transcoder.v1.CreateJobRequest - */ -class CreateJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating transcoding job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job = null; - - /** - * @param string $parent Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Transcoder\V1\Job $job Required. Parameters for creating transcoding job. - * - * @return \Google\Cloud\Video\Transcoder\V1\CreateJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\Job $job): self - { - return (new self()) - ->setParent($parent) - ->setJob($job); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location to create and process this job. - * Format: `projects/{project}/locations/{location}` - * @type \Google\Cloud\Video\Transcoder\V1\Job $job - * Required. Parameters for creating transcoding job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location to create and process this job. - * 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. The parent location to create and process this job. - * 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; - } - - /** - * Required. Parameters for creating transcoding job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Transcoder\V1\Job|null - */ - public function getJob() - { - return $this->job; - } - - public function hasJob() - { - return isset($this->job); - } - - public function clearJob() - { - unset($this->job); - } - - /** - * Required. Parameters for creating transcoding job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Transcoder\V1\Job $var - * @return $this - */ - public function setJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Job::class); - $this->job = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php deleted file mode 100644 index 2259a64b8917..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/CreateJobTemplateRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.video.transcoder.v1.CreateJobTemplateRequest - */ -class CreateJobTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Parameters for creating job template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_template = null; - /** - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $job_template_id = ''; - - /** - * @param string $parent Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate Required. Parameters for creating job template. - * @param string $jobTemplateId Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * @return \Google\Cloud\Video\Transcoder\V1\CreateJobTemplateRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Video\Transcoder\V1\JobTemplate $jobTemplate, string $jobTemplateId): self - { - return (new self()) - ->setParent($parent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location to create this job template. - * Format: `projects/{project}/locations/{location}` - * @type \Google\Cloud\Video\Transcoder\V1\JobTemplate $job_template - * Required. Parameters for creating job template. - * @type string $job_template_id - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location to create this job template. - * 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. The parent location to create this job template. - * 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; - } - - /** - * Required. Parameters for creating job template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Transcoder\V1\JobTemplate|null - */ - public function getJobTemplate() - { - return $this->job_template; - } - - public function hasJobTemplate() - { - return isset($this->job_template); - } - - public function clearJobTemplate() - { - unset($this->job_template); - } - - /** - * Required. Parameters for creating job template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobTemplate job_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Transcoder\V1\JobTemplate $var - * @return $this - */ - public function setJobTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); - $this->job_template = $var; - - return $this; - } - - /** - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJobTemplateId() - { - return $this->job_template_id; - } - - /** - * Required. The ID to use for the job template, which will become the final - * component of the job template's resource name. - * This value should be 4-63 characters, and valid characters must match the - * regular expression `[a-zA-Z][a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string job_template_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJobTemplateId($var) - { - GPBUtil::checkString($var, True); - $this->job_template_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php deleted file mode 100644 index 56bf79ae59c4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.video.transcoder.v1.DeleteJobRequest - */ -class DeleteJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobRequest - * - * @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 job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * @type bool $allow_missing - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * 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 job to delete. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * 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 to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the job is not found, the request will succeed but no - * action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php deleted file mode 100644 index a7db529776b4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/DeleteJobTemplateRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.video.transcoder.v1.DeleteJobTemplateRequest - */ -class DeleteJobTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\DeleteJobTemplateRequest - * - * @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 job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * @type bool $allow_missing - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * 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 job template to delete. - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * 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 to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If set to true, and the job template is not found, the request will succeed - * but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php deleted file mode 100644 index 42921c0de759..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/EditAtom.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.video.transcoder.v1.EditAtom - */ -class EditAtom extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this atom. Must be specified when using advanced - * mapping. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * - * Generated from protobuf field repeated string inputs = 2; - */ - private $inputs; - /** - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - */ - protected $end_time_offset = null; - /** - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this atom. Must be specified when using advanced - * mapping. - * @type array|\Google\Protobuf\Internal\RepeatedField $inputs - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * @type \Google\Protobuf\Duration $end_time_offset - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * @type \Google\Protobuf\Duration $start_time_offset - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this atom. Must be specified when using advanced - * mapping. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this atom. Must be specified when using advanced - * mapping. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * - * Generated from protobuf field repeated string inputs = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * List of `Input.key`s identifying files that should be used in this atom. - * The listed `inputs` must have the same timeline. - * - * Generated from protobuf field repeated string inputs = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->inputs = $arr; - - return $this; - } - - /** - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * End time in seconds for the atom, relative to the input file timeline. - * When `end_time_offset` is not specified, the `inputs` are used until - * the end of the atom. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - - /** - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Start time in seconds for the atom, relative to the input file timeline. - * The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php deleted file mode 100644 index 6660485d8e24..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ElementaryStream.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.video.transcoder.v1.ElementaryStream - */ -class ElementaryStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - */ - protected $key = ''; - protected $elementary_stream; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this elementary stream. - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream $video_stream - * Encoding of a video stream. - * @type \Google\Cloud\Video\Transcoder\V1\AudioStream $audio_stream - * Encoding of an audio stream. - * @type \Google\Cloud\Video\Transcoder\V1\TextStream $text_stream - * Encoding of a text stream. For example, closed captions or subtitles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this elementary stream. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream|null - */ - public function getVideoStream() - { - return $this->readOneof(1); - } - - public function hasVideoStream() - { - return $this->hasOneof(1); - } - - /** - * Encoding of a video stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream video_stream = 1; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream $var - * @return $this - */ - public function setVideoStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; - * @return \Google\Cloud\Video\Transcoder\V1\AudioStream|null - */ - public function getAudioStream() - { - return $this->readOneof(2); - } - - public function hasAudioStream() - { - return $this->hasOneof(2); - } - - /** - * Encoding of an audio stream. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.AudioStream audio_stream = 2; - * @param \Google\Cloud\Video\Transcoder\V1\AudioStream $var - * @return $this - */ - public function setAudioStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\AudioStream::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; - * @return \Google\Cloud\Video\Transcoder\V1\TextStream|null - */ - public function getTextStream() - { - return $this->readOneof(3); - } - - public function hasTextStream() - { - return $this->hasOneof(3); - } - - /** - * Encoding of a text stream. For example, closed captions or subtitles. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.TextStream text_stream = 3; - * @param \Google\Cloud\Video\Transcoder\V1\TextStream $var - * @return $this - */ - public function setTextStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\TextStream::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getElementaryStream() - { - return $this->whichOneof("elementary_stream"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php deleted file mode 100644 index a9d3c1ca80e5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption - */ -class Encryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier for this set of encryption options. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Required. DRM system(s) to use; at least one must be specified. If a - * DRM system is omitted, it is considered disabled. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.DrmSystems drm_systems = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $drm_systems = null; - protected $encryption_mode; - protected $secret_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. Identifier for this set of encryption options. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption $aes_128 - * Configuration for AES-128 encryption. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption $sample_aes - * Configuration for SAMPLE-AES encryption. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption $mpeg_cenc - * Configuration for MPEG Common Encryption (MPEG-CENC). - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource $secret_manager_key_source - * Keys are stored in Google Secret Manager. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems $drm_systems - * Required. DRM system(s) to use; at least one must be specified. If a - * DRM system is omitted, it is considered disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier for this set of encryption options. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. Identifier for this set of encryption options. - * - * Generated from protobuf field string id = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Configuration for AES-128 encryption. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Aes128Encryption aes_128 = 3; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption|null - */ - public function getAes128() - { - return $this->readOneof(3); - } - - public function hasAes128() - { - return $this->hasOneof(3); - } - - /** - * Configuration for AES-128 encryption. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Aes128Encryption aes_128 = 3; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption $var - * @return $this - */ - public function setAes128($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Aes128Encryption::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Configuration for SAMPLE-AES encryption. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption sample_aes = 4; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption|null - */ - public function getSampleAes() - { - return $this->readOneof(4); - } - - public function hasSampleAes() - { - return $this->hasOneof(4); - } - - /** - * Configuration for SAMPLE-AES encryption. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption sample_aes = 4; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption $var - * @return $this - */ - public function setSampleAes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\SampleAesEncryption::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Configuration for MPEG Common Encryption (MPEG-CENC). - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption mpeg_cenc = 5; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption|null - */ - public function getMpegCenc() - { - return $this->readOneof(5); - } - - public function hasMpegCenc() - { - return $this->hasOneof(5); - } - - /** - * Configuration for MPEG Common Encryption (MPEG-CENC). - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption mpeg_cenc = 5; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption $var - * @return $this - */ - public function setMpegCenc($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\MpegCommonEncryption::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Keys are stored in Google Secret Manager. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource|null - */ - public function getSecretManagerKeySource() - { - return $this->readOneof(7); - } - - public function hasSecretManagerKeySource() - { - return $this->hasOneof(7); - } - - /** - * Keys are stored in Google Secret Manager. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.SecretManagerSource secret_manager_key_source = 7; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource $var - * @return $this - */ - public function setSecretManagerKeySource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\SecretManagerSource::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Required. DRM system(s) to use; at least one must be specified. If a - * DRM system is omitted, it is considered disabled. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.DrmSystems drm_systems = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems|null - */ - public function getDrmSystems() - { - return $this->drm_systems; - } - - public function hasDrmSystems() - { - return isset($this->drm_systems); - } - - public function clearDrmSystems() - { - unset($this->drm_systems); - } - - /** - * Required. DRM system(s) to use; at least one must be specified. If a - * DRM system is omitted, it is considered disabled. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.DrmSystems drm_systems = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems $var - * @return $this - */ - public function setDrmSystems($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\DrmSystems::class); - $this->drm_systems = $var; - - return $this; - } - - /** - * @return string - */ - public function getEncryptionMode() - { - return $this->whichOneof("encryption_mode"); - } - - /** - * @return string - */ - public function getSecretSource() - { - return $this->whichOneof("secret_source"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php deleted file mode 100644 index 87e9b575234a..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Aes128Encryption.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.Aes128Encryption - */ -class Aes128Encryption extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aes128Encryption::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Aes128Encryption::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php deleted file mode 100644 index d201d844ac9f..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Clearkey.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.Clearkey - */ -class Clearkey extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Clearkey::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Clearkey::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php deleted file mode 100644 index 715c3f2c0fbd..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/DrmSystems.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.DrmSystems - */ -class DrmSystems extends \Google\Protobuf\Internal\Message -{ - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Widevine widevine = 1; - */ - protected $widevine = null; - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Fairplay fairplay = 2; - */ - protected $fairplay = null; - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Playready playready = 3; - */ - protected $playready = null; - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Clearkey clearkey = 4; - */ - protected $clearkey = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine $widevine - * Widevine configuration. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay $fairplay - * Fairplay configuration. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Playready $playready - * Playready configuration. - * @type \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey $clearkey - * Clearkey configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Widevine widevine = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine|null - */ - public function getWidevine() - { - return $this->widevine; - } - - public function hasWidevine() - { - return isset($this->widevine); - } - - public function clearWidevine() - { - unset($this->widevine); - } - - /** - * Widevine configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Widevine widevine = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine $var - * @return $this - */ - public function setWidevine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Widevine::class); - $this->widevine = $var; - - return $this; - } - - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Fairplay fairplay = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay|null - */ - public function getFairplay() - { - return $this->fairplay; - } - - public function hasFairplay() - { - return isset($this->fairplay); - } - - public function clearFairplay() - { - unset($this->fairplay); - } - - /** - * Fairplay configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Fairplay fairplay = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay $var - * @return $this - */ - public function setFairplay($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Fairplay::class); - $this->fairplay = $var; - - return $this; - } - - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Playready playready = 3; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Playready|null - */ - public function getPlayready() - { - return $this->playready; - } - - public function hasPlayready() - { - return isset($this->playready); - } - - public function clearPlayready() - { - unset($this->playready); - } - - /** - * Playready configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Playready playready = 3; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Playready $var - * @return $this - */ - public function setPlayready($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Playready::class); - $this->playready = $var; - - return $this; - } - - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Clearkey clearkey = 4; - * @return \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey|null - */ - public function getClearkey() - { - return $this->clearkey; - } - - public function hasClearkey() - { - return isset($this->clearkey); - } - - public function clearClearkey() - { - unset($this->clearkey); - } - - /** - * Clearkey configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Encryption.Clearkey clearkey = 4; - * @param \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey $var - * @return $this - */ - public function setClearkey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Encryption\Clearkey::class); - $this->clearkey = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DrmSystems::class, \Google\Cloud\Video\Transcoder\V1\Encryption_DrmSystems::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php deleted file mode 100644 index adf6d5cfd6d0..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Fairplay.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.Fairplay - */ -class Fairplay extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Fairplay::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Fairplay::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php deleted file mode 100644 index 5c7b5bc1f8e1..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/MpegCommonEncryption.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.MpegCommonEncryption - */ -class MpegCommonEncryption extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Specify the encryption scheme. - * Supported encryption schemes: - * - `cenc` - * - `cbcs` - * - * Generated from protobuf field string scheme = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scheme = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $scheme - * Required. Specify the encryption scheme. - * Supported encryption schemes: - * - `cenc` - * - `cbcs` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Specify the encryption scheme. - * Supported encryption schemes: - * - `cenc` - * - `cbcs` - * - * Generated from protobuf field string scheme = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * Required. Specify the encryption scheme. - * Supported encryption schemes: - * - `cenc` - * - `cbcs` - * - * Generated from protobuf field string scheme = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScheme($var) - { - GPBUtil::checkString($var, True); - $this->scheme = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MpegCommonEncryption::class, \Google\Cloud\Video\Transcoder\V1\Encryption_MpegCommonEncryption::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php deleted file mode 100644 index 9d8b238fee1b..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Playready.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.Playready - */ -class Playready extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Playready::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Playready::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php deleted file mode 100644 index 1556a0bebecd..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SampleAesEncryption.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.SampleAesEncryption - */ -class SampleAesEncryption extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SampleAesEncryption::class, \Google\Cloud\Video\Transcoder\V1\Encryption_SampleAesEncryption::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php deleted file mode 100644 index 9d166b65d382..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/SecretManagerSource.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.SecretManagerSource - */ -class SecretManagerSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Secret Version containing the encryption key in - * the following format: - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * Note that only numbered versions are supported. Aliases like "latest" are - * not supported. - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $secret_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $secret_version - * Required. The name of the Secret Version containing the encryption key in - * the following format: - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * Note that only numbered versions are supported. Aliases like "latest" are - * not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Secret Version containing the encryption key in - * the following format: - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * Note that only numbered versions are supported. Aliases like "latest" are - * not supported. - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSecretVersion() - { - return $this->secret_version; - } - - /** - * Required. The name of the Secret Version containing the encryption key in - * the following format: - * `projects/{project}/secrets/{secret_id}/versions/{version_number}` - * Note that only numbered versions are supported. Aliases like "latest" are - * not supported. - * - * Generated from protobuf field string secret_version = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSecretVersion($var) - { - GPBUtil::checkString($var, True); - $this->secret_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecretManagerSource::class, \Google\Cloud\Video\Transcoder\V1\Encryption_SecretManagerSource::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php deleted file mode 100644 index 86155a0cd357..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Encryption/Widevine.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.video.transcoder.v1.Encryption.Widevine - */ -class Widevine extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Widevine::class, \Google\Cloud\Video\Transcoder\V1\Encryption_Widevine::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php deleted file mode 100644 index d84bf513d425..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.video.transcoder.v1.GetJobRequest - */ -class GetJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * 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 job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * Please see {@see TranscoderServiceClient::jobName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\GetJobRequest - * - * @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 job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * 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 job to retrieve. - * Format: `projects/{project}/locations/{location}/jobs/{job}` - * - * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php deleted file mode 100644 index e9a034eaf217..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/GetJobTemplateRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.video.transcoder.v1.GetJobTemplateRequest - */ -class GetJobTemplateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * 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 job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * Please see {@see TranscoderServiceClient::jobTemplateName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\GetJobTemplateRequest - * - * @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 job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * 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 job template to retrieve. - * Format: - * `projects/{project}/locations/{location}/jobTemplates/{job_template}` - * - * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php deleted file mode 100644 index 3c19c7ccc6a5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Input.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.video.transcoder.v1.Input - */ -class Input extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; - */ - protected $preprocessing_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * @type string $uri - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $preprocessing_config - * Preprocessing configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this input. Must be specified when using advanced - * mapping and edit lists. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of the media. Input files must be at least 5 seconds in duration and - * stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). - * If empty, the value is populated from `Job.input_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * 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; - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig|null - */ - public function getPreprocessingConfig() - { - return $this->preprocessing_config; - } - - public function hasPreprocessingConfig() - { - return isset($this->preprocessing_config); - } - - public function clearPreprocessingConfig() - { - unset($this->preprocessing_config); - } - - /** - * Preprocessing configurations. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig preprocessing_config = 3; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig $var - * @return $this - */ - public function setPreprocessingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig::class); - $this->preprocessing_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php deleted file mode 100644 index b4d69eee8832..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job.php +++ /dev/null @@ -1,672 +0,0 @@ -google.cloud.video.transcoder.v1.Job - */ -class Job extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $input_uri = ''; - /** - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $output_uri = ''; - /** - * Output only. The current state of the job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the transcoding started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The time the transcoding finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * - * Generated from protobuf field int32 ttl_after_completion_days = 15; - */ - protected $ttl_after_completion_days = 0; - /** - * The labels associated with this job. You can use these to organize and - * group your jobs. - * - * Generated from protobuf field map labels = 16; - */ - private $labels; - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; - */ - protected $mode = 0; - /** - * The processing priority of a batch job. - * This field can only be set for batch mode jobs. The default value is 0. - * This value cannot be negative. Higher values correspond to higher - * priorities for the job. - * - * Generated from protobuf field int32 batch_mode_priority = 21; - */ - protected $batch_mode_priority = 0; - /** - * Optional. The optimization strategy of the job. The default is - * `AUTODETECT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $optimization = 0; - protected $job_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * @type string $input_uri - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * @type string $output_uri - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * @type string $template_id - * Input only. Specify the `template_id` to use for populating `Job.config`. - * The default is `preset/web-hd`, which is the only supported preset. - * User defined JobTemplate: `{job_template_id}` - * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config - * The configuration for this job. - * @type int $state - * Output only. The current state of the job. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the job was created. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time the transcoding started. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the transcoding finished. - * @type int $ttl_after_completion_days - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this job. You can use these to organize and - * group your jobs. - * @type \Google\Rpc\Status $error - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * @type int $mode - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * @type int $batch_mode_priority - * The processing priority of a batch job. - * This field can only be set for batch mode jobs. The default value is 0. - * This value cannot be negative. Higher values correspond to higher - * priorities for the job. - * @type int $optimization - * Optional. The optimization strategy of the job. The default is - * `AUTODETECT`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the job. - * Format: `projects/{project_number}/locations/{location}/jobs/{job}` - * - * 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; - } - - /** - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getInputUri() - { - return $this->input_uri; - } - - /** - * Input only. Specify the `input_uri` to populate empty `uri` fields in each - * element of `Job.config.inputs` or `JobTemplate.config.inputs` when using - * template. URI of the media. Input files must be at least 5 seconds in - * duration and stored in Cloud Storage (for example, - * `gs://bucket/inputs/file.mp4`). See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string input_uri = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInputUri($var) - { - GPBUtil::checkString($var, True); - $this->input_uri = $var; - - return $this; - } - - /** - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Input only. Specify the `output_uri` to populate an empty - * `Job.config.output.uri` or `JobTemplate.config.output.uri` when using - * template. URI for the output file(s). For example, - * `gs://my-bucket/outputs/`. See [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - - /** - * Input only. Specify the `template_id` to use for populating `Job.config`. - * The default is `preset/web-hd`, which is the only supported preset. - * User defined JobTemplate: `{job_template_id}` - * - * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getTemplateId() - { - return $this->readOneof(4); - } - - public function hasTemplateId() - { - return $this->hasOneof(4); - } - - /** - * Input only. Specify the `template_id` to use for populating `Job.config`. - * The default is `preset/web-hd`, which is the only supported preset. - * User defined JobTemplate: `{job_template_id}` - * - * Generated from protobuf field string template_id = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTemplateId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The configuration for this job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; - * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null - */ - public function getConfig() - { - return $this->readOneof(5); - } - - public function hasConfig() - { - return $this->hasOneof(5); - } - - /** - * The configuration for this job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 5; - * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Output only. The current state of the job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the job. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.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 job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 12 [(.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 transcoding started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time the transcoding started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The time the transcoding finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.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 transcoding finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 14 [(.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; - } - - /** - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * - * Generated from protobuf field int32 ttl_after_completion_days = 15; - * @return int - */ - public function getTtlAfterCompletionDays() - { - return $this->ttl_after_completion_days; - } - - /** - * Job time to live value in days, which will be effective after job - * completion. Job should be deleted automatically after the given TTL. Enter - * a value between 1 and 90. The default is 30. - * - * Generated from protobuf field int32 ttl_after_completion_days = 15; - * @param int $var - * @return $this - */ - public function setTtlAfterCompletionDays($var) - { - GPBUtil::checkInt32($var); - $this->ttl_after_completion_days = $var; - - return $this; - } - - /** - * The labels associated with this job. You can use these to organize and - * group your jobs. - * - * Generated from protobuf field map labels = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this job. You can use these to organize and - * group your jobs. - * - * Generated from protobuf field map labels = 16; - * @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. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. An error object that describes the reason for the failure. - * This property is always present when `state` is `FAILED`. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * The processing mode of the job. - * The default is `PROCESSING_MODE_INTERACTIVE`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.ProcessingMode mode = 20; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\ProcessingMode::class); - $this->mode = $var; - - return $this; - } - - /** - * The processing priority of a batch job. - * This field can only be set for batch mode jobs. The default value is 0. - * This value cannot be negative. Higher values correspond to higher - * priorities for the job. - * - * Generated from protobuf field int32 batch_mode_priority = 21; - * @return int - */ - public function getBatchModePriority() - { - return $this->batch_mode_priority; - } - - /** - * The processing priority of a batch job. - * This field can only be set for batch mode jobs. The default value is 0. - * This value cannot be negative. Higher values correspond to higher - * priorities for the job. - * - * Generated from protobuf field int32 batch_mode_priority = 21; - * @param int $var - * @return $this - */ - public function setBatchModePriority($var) - { - GPBUtil::checkInt32($var); - $this->batch_mode_priority = $var; - - return $this; - } - - /** - * Optional. The optimization strategy of the job. The default is - * `AUTODETECT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOptimization() - { - return $this->optimization; - } - - /** - * Optional. The optimization strategy of the job. The default is - * `AUTODETECT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Job.OptimizationStrategy optimization = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOptimization($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Job\OptimizationStrategy::class); - $this->optimization = $var; - - return $this; - } - - /** - * @return string - */ - public function getJobConfig() - { - return $this->whichOneof("job_config"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php deleted file mode 100644 index 6a0e492447cd..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/OptimizationStrategy.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.transcoder.v1.Job.OptimizationStrategy - */ -class OptimizationStrategy -{ - /** - * The optimization strategy is not specified. - * - * Generated from protobuf enum OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; - */ - const OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; - /** - * Prioritize job processing speed. - * - * Generated from protobuf enum AUTODETECT = 1; - */ - const AUTODETECT = 1; - /** - * Disable all optimizations. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::OPTIMIZATION_STRATEGY_UNSPECIFIED => 'OPTIMIZATION_STRATEGY_UNSPECIFIED', - self::AUTODETECT => 'AUTODETECT', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OptimizationStrategy::class, \Google\Cloud\Video\Transcoder\V1\Job_OptimizationStrategy::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php deleted file mode 100644 index 4ada220e2b33..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.video.transcoder.v1.Job.ProcessingMode - */ -class ProcessingMode -{ - /** - * The job processing mode is not specified. - * - * Generated from protobuf enum PROCESSING_MODE_UNSPECIFIED = 0; - */ - const PROCESSING_MODE_UNSPECIFIED = 0; - /** - * The job processing mode is interactive mode. - * Interactive job will either be ran or rejected if quota does not allow - * for it. - * - * Generated from protobuf enum PROCESSING_MODE_INTERACTIVE = 1; - */ - const PROCESSING_MODE_INTERACTIVE = 1; - /** - * The job processing mode is batch mode. - * Batch mode allows queuing of jobs. - * - * Generated from protobuf enum PROCESSING_MODE_BATCH = 2; - */ - const PROCESSING_MODE_BATCH = 2; - - private static $valueToName = [ - self::PROCESSING_MODE_UNSPECIFIED => 'PROCESSING_MODE_UNSPECIFIED', - self::PROCESSING_MODE_INTERACTIVE => 'PROCESSING_MODE_INTERACTIVE', - self::PROCESSING_MODE_BATCH => 'PROCESSING_MODE_BATCH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProcessingMode::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingMode::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php deleted file mode 100644 index 28e9b85c5afc..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Job/ProcessingState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.transcoder.v1.Job.ProcessingState - */ -class ProcessingState -{ - /** - * The processing state is not specified. - * - * Generated from protobuf enum PROCESSING_STATE_UNSPECIFIED = 0; - */ - const PROCESSING_STATE_UNSPECIFIED = 0; - /** - * The job is enqueued and will be picked up for processing soon. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The job is being processed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The job has been completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The job has failed. For additional information, see `failure_reason` and - * `failure_details` - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::PROCESSING_STATE_UNSPECIFIED => 'PROCESSING_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProcessingState::class, \Google\Cloud\Video\Transcoder\V1\Job_ProcessingState::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php deleted file mode 100644 index 70d6c9f15aa5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobConfig.php +++ /dev/null @@ -1,451 +0,0 @@ -google.cloud.video.transcoder.v1.JobConfig - */ -class JobConfig extends \Google\Protobuf\Internal\Message -{ - /** - * List of input assets stored in Cloud Storage. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; - */ - private $inputs; - /** - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; - */ - private $edit_list; - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; - */ - private $elementary_streams; - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; - */ - private $mux_streams; - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; - */ - private $manifests; - /** - * Output configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; - */ - protected $output = null; - /** - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; - */ - private $ad_breaks; - /** - * Destination on Pub/Sub. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; - */ - protected $pubsub_destination = null; - /** - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; - */ - private $sprite_sheets; - /** - * List of overlays on the output video, in descending Z-order. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; - */ - private $overlays; - /** - * List of encryption configurations for the content. - * Each configuration has an ID. Specify this ID in the - * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] - * field to indicate the configuration to use for that `MuxStream` output. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Encryption encryptions = 11; - */ - private $encryptions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $inputs - * List of input assets stored in Cloud Storage. - * @type array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $edit_list - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * @type array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of elementary streams. - * @type array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $mux_streams - * List of multiplexing settings for output streams. - * @type array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $manifests - * List of output manifests. - * @type \Google\Cloud\Video\Transcoder\V1\Output $output - * Output configuration. - * @type array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $ad_breaks - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * @type \Google\Cloud\Video\Transcoder\V1\PubsubDestination $pubsub_destination - * Destination on Pub/Sub. - * @type array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $sprite_sheets - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $overlays - * List of overlays on the output video, in descending Z-order. - * @type array<\Google\Cloud\Video\Transcoder\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $encryptions - * List of encryption configurations for the content. - * Each configuration has an ID. Specify this ID in the - * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] - * field to indicate the configuration to use for that `MuxStream` output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * List of input assets stored in Cloud Storage. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * List of input assets stored in Cloud Storage. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Input inputs = 1; - * @param array<\Google\Cloud\Video\Transcoder\V1\Input>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Input::class); - $this->inputs = $arr; - - return $this; - } - - /** - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEditList() - { - return $this->edit_list; - } - - /** - * List of `Edit atom`s. Defines the ultimate timeline of the resulting - * file or manifest. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.EditAtom edit_list = 2; - * @param array<\Google\Cloud\Video\Transcoder\V1\EditAtom>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEditList($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\EditAtom::class); - $this->edit_list = $arr; - - return $this; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of elementary streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.ElementaryStream elementary_streams = 3; - * @param array<\Google\Cloud\Video\Transcoder\V1\ElementaryStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\ElementaryStream::class); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * List of multiplexing settings for output streams. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.MuxStream mux_streams = 4; - * @param array<\Google\Cloud\Video\Transcoder\V1\MuxStream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\MuxStream::class); - $this->mux_streams = $arr; - - return $this; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManifests() - { - return $this->manifests; - } - - /** - * List of output manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Manifest manifests = 5; - * @param array<\Google\Cloud\Video\Transcoder\V1\Manifest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManifests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Manifest::class); - $this->manifests = $arr; - - return $this; - } - - /** - * Output configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; - * @return \Google\Cloud\Video\Transcoder\V1\Output|null - */ - public function getOutput() - { - return $this->output; - } - - public function hasOutput() - { - return isset($this->output); - } - - public function clearOutput() - { - unset($this->output); - } - - /** - * Output configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Output output = 6; - * @param \Google\Cloud\Video\Transcoder\V1\Output $var - * @return $this - */ - public function setOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Output::class); - $this->output = $var; - - return $this; - } - - /** - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdBreaks() - { - return $this->ad_breaks; - } - - /** - * List of ad breaks. Specifies where to insert ad break tags in the output - * manifests. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.AdBreak ad_breaks = 7; - * @param array<\Google\Cloud\Video\Transcoder\V1\AdBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\AdBreak::class); - $this->ad_breaks = $arr; - - return $this; - } - - /** - * Destination on Pub/Sub. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; - * @return \Google\Cloud\Video\Transcoder\V1\PubsubDestination|null - */ - public function getPubsubDestination() - { - return $this->pubsub_destination; - } - - public function hasPubsubDestination() - { - return isset($this->pubsub_destination); - } - - public function clearPubsubDestination() - { - unset($this->pubsub_destination); - } - - /** - * Destination on Pub/Sub. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PubsubDestination pubsub_destination = 8; - * @param \Google\Cloud\Video\Transcoder\V1\PubsubDestination $var - * @return $this - */ - public function setPubsubDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PubsubDestination::class); - $this->pubsub_destination = $var; - - return $this; - } - - /** - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpriteSheets() - { - return $this->sprite_sheets; - } - - /** - * List of output sprite sheets. - * Spritesheets require at least one VideoStream in the Jobconfig. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.SpriteSheet sprite_sheets = 9; - * @param array<\Google\Cloud\Video\Transcoder\V1\SpriteSheet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpriteSheets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\SpriteSheet::class); - $this->sprite_sheets = $arr; - - return $this; - } - - /** - * List of overlays on the output video, in descending Z-order. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOverlays() - { - return $this->overlays; - } - - /** - * List of overlays on the output video, in descending Z-order. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay overlays = 10; - * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOverlays($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay::class); - $this->overlays = $arr; - - return $this; - } - - /** - * List of encryption configurations for the content. - * Each configuration has an ID. Specify this ID in the - * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] - * field to indicate the configuration to use for that `MuxStream` output. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Encryption encryptions = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEncryptions() - { - return $this->encryptions; - } - - /** - * List of encryption configurations for the content. - * Each configuration has an ID. Specify this ID in the - * [MuxStream.encryption_id][google.cloud.video.transcoder.v1.MuxStream.encryption_id] - * field to indicate the configuration to use for that `MuxStream` output. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Encryption encryptions = 11; - * @param array<\Google\Cloud\Video\Transcoder\V1\Encryption>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEncryptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Encryption::class); - $this->encryptions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php deleted file mode 100644 index 1cf56319089e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/JobTemplate.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.video.transcoder.v1.JobTemplate - */ -class JobTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The configuration for this template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; - */ - protected $config = null; - /** - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * @type \Google\Cloud\Video\Transcoder\V1\JobConfig $config - * The configuration for this template. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the job template. - * Format: - * `projects/{project_number}/locations/{location}/jobTemplates/{job_template}` - * - * 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 configuration for this template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; - * @return \Google\Cloud\Video\Transcoder\V1\JobConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * The configuration for this template. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.JobConfig config = 2; - * @param \Google\Cloud\Video\Transcoder\V1\JobConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\JobConfig::class); - $this->config = $var; - - return $this; - } - - /** - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels associated with this job template. You can use these to organize - * and group your job templates. - * - * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php deleted file mode 100644 index 9a3f102490be..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobTemplatesRequest - */ -class ListJobTemplatesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\ListJobTemplatesRequest - * - * @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 location from which to retrieve the collection of job - * templates. Format: `projects/{project}/locations/{location}` - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The `next_page_token` value returned from a previous List request, if - * any. - * @type string $filter - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $order_by - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location from which to retrieve the collection of job - * templates. 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. The parent location from which to retrieve the collection of job - * templates. 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; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * 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 expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * 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; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php deleted file mode 100644 index 3162f2362bd5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobTemplatesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobTemplatesResponse - */ -class ListJobTemplatesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of job templates in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; - */ - private $job_templates; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of regions 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 array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $job_templates - * List of job templates in the specified region. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of regions that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * List of job templates in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobTemplates() - { - return $this->job_templates; - } - - /** - * List of job templates in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.JobTemplate job_templates = 1; - * @param array<\Google\Cloud\Video\Transcoder\V1\JobTemplate>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobTemplates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\JobTemplate::class); - $this->job_templates = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php deleted file mode 100644 index 62bf0d1d56a7..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobsRequest - */ -class ListJobsRequest 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 = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Format: `projects/{project}/locations/{location}` - * Please see {@see TranscoderServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Video\Transcoder\V1\ListJobsRequest - * - * @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 - * The maximum number of items to return. - * @type string $page_token - * The `next_page_token` value returned from a previous List request, if - * any. - * @type string $filter - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * @type string $order_by - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::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; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items 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; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous List request, if - * any. - * - * 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 expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter expression, following the syntax outlined in - * https://google.aip.dev/160. - * - * 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; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. - * - * 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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php deleted file mode 100644 index 0049a9825e28..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/ListJobsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.video.transcoder.v1.ListJobsResponse - */ -class ListJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of jobs in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; - */ - private $jobs; - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * List of regions 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 array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $jobs - * List of jobs in the specified region. - * @type string $next_page_token - * The pagination token. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * List of regions that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Services::initOnce(); - parent::__construct($data); - } - - /** - * List of jobs in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobs() - { - return $this->jobs; - } - - /** - * List of jobs in the specified region. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Job jobs = 1; - * @param array<\Google\Cloud\Video\Transcoder\V1\Job>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Job::class); - $this->jobs = $arr; - - return $this; - } - - /** - * The pagination token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination 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; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of regions that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php deleted file mode 100644 index 875edbe8fd45..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.video.transcoder.v1.Manifest - */ -class Manifest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * - * Generated from protobuf field string file_name = 1; - */ - protected $file_name = ''; - /** - * Required. Type of the manifest. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mux_streams; - protected $manifest_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_name - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * @type int $type - * Required. Type of the manifest. - * @type array|\Google\Protobuf\Internal\RepeatedField $mux_streams - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * @type \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig $dash - * `DASH` manifest configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * - * Generated from protobuf field string file_name = 1; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the generated file. The default is `manifest` with the - * extension suffix corresponding to the `Manifest.type`. - * - * Generated from protobuf field string file_name = 1; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * Required. Type of the manifest. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of the manifest. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.ManifestType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Manifest\ManifestType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMuxStreams() - { - return $this->mux_streams; - } - - /** - * Required. List of user given `MuxStream.key`s that should appear in this - * manifest. - * When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` - * and `.m3u8` extension is generated for each element of the - * `Manifest.mux_streams`. - * - * Generated from protobuf field repeated string mux_streams = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMuxStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mux_streams = $arr; - - return $this; - } - - /** - * `DASH` manifest configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig dash = 4; - * @return \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig|null - */ - public function getDash() - { - return $this->readOneof(4); - } - - public function hasDash() - { - return $this->hasOneof(4); - } - - /** - * `DASH` manifest configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig dash = 4; - * @param \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig $var - * @return $this - */ - public function setDash($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getManifestConfig() - { - return $this->whichOneof("manifest_config"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php deleted file mode 100644 index 6feafae25d7d..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.video.transcoder.v1.Manifest.DashConfig - */ -class DashConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The segment reference scheme for a `DASH` manifest. The default is - * `SEGMENT_LIST`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme segment_reference_scheme = 1; - */ - protected $segment_reference_scheme = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $segment_reference_scheme - * The segment reference scheme for a `DASH` manifest. The default is - * `SEGMENT_LIST`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The segment reference scheme for a `DASH` manifest. The default is - * `SEGMENT_LIST`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme segment_reference_scheme = 1; - * @return int - */ - public function getSegmentReferenceScheme() - { - return $this->segment_reference_scheme; - } - - /** - * The segment reference scheme for a `DASH` manifest. The default is - * `SEGMENT_LIST`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme segment_reference_scheme = 1; - * @param int $var - * @return $this - */ - public function setSegmentReferenceScheme($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Manifest\DashConfig\SegmentReferenceScheme::class); - $this->segment_reference_scheme = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DashConfig::class, \Google\Cloud\Video\Transcoder\V1\Manifest_DashConfig::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php deleted file mode 100644 index 2f5d2d255be0..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/DashConfig/SegmentReferenceScheme.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.transcoder.v1.Manifest.DashConfig.SegmentReferenceScheme - */ -class SegmentReferenceScheme -{ - /** - * The segment reference scheme is not specified. - * - * Generated from protobuf enum SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0; - */ - const SEGMENT_REFERENCE_SCHEME_UNSPECIFIED = 0; - /** - * Lists the URLs of media files for each segment. - * - * Generated from protobuf enum SEGMENT_LIST = 1; - */ - const SEGMENT_LIST = 1; - /** - * Lists each segment from a template with $Number$ variable. - * - * Generated from protobuf enum SEGMENT_TEMPLATE_NUMBER = 2; - */ - const SEGMENT_TEMPLATE_NUMBER = 2; - - private static $valueToName = [ - self::SEGMENT_REFERENCE_SCHEME_UNSPECIFIED => 'SEGMENT_REFERENCE_SCHEME_UNSPECIFIED', - self::SEGMENT_LIST => 'SEGMENT_LIST', - self::SEGMENT_TEMPLATE_NUMBER => 'SEGMENT_TEMPLATE_NUMBER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SegmentReferenceScheme::class, \Google\Cloud\Video\Transcoder\V1\Manifest_DashConfig_SegmentReferenceScheme::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php deleted file mode 100644 index 6b4b08cef48b..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Manifest/ManifestType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.transcoder.v1.Manifest.ManifestType - */ -class ManifestType -{ - /** - * The manifest type is not specified. - * - * Generated from protobuf enum MANIFEST_TYPE_UNSPECIFIED = 0; - */ - const MANIFEST_TYPE_UNSPECIFIED = 0; - /** - * Create an HLS manifest. The corresponding file extension is `.m3u8`. - * - * Generated from protobuf enum HLS = 1; - */ - const HLS = 1; - /** - * Create an MPEG-DASH manifest. The corresponding file extension is `.mpd`. - * - * Generated from protobuf enum DASH = 2; - */ - const DASH = 2; - - private static $valueToName = [ - self::MANIFEST_TYPE_UNSPECIFIED => 'MANIFEST_TYPE_UNSPECIFIED', - self::HLS => 'HLS', - self::DASH => 'DASH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManifestType::class, \Google\Cloud\Video\Transcoder\V1\Manifest_ManifestType::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php deleted file mode 100644 index fbd5e7f4e19d..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/MuxStream.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.video.transcoder.v1.MuxStream - */ -class MuxStream extends \Google\Protobuf\Internal\Message -{ - /** - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * - * Generated from protobuf field string file_name = 2; - */ - protected $file_name = ''; - /** - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * - * Generated from protobuf field string container = 3; - */ - protected $container = ''; - /** - * List of `ElementaryStream.key`s multiplexed in this stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - */ - private $elementary_streams; - /** - * Segment settings for `ts`, `fmp4` and `vtt`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; - */ - protected $segment_settings = null; - /** - * Identifier of the encryption configuration to use. If omitted, output will - * be unencrypted. - * - * Generated from protobuf field string encryption_id = 7; - */ - protected $encryption_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * @type string $file_name - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * @type string $container - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * @type array|\Google\Protobuf\Internal\RepeatedField $elementary_streams - * List of `ElementaryStream.key`s multiplexed in this stream. - * @type \Google\Cloud\Video\Transcoder\V1\SegmentSettings $segment_settings - * Segment settings for `ts`, `fmp4` and `vtt`. - * @type string $encryption_id - * Identifier of the encryption configuration to use. If omitted, output will - * be unencrypted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * A unique key for this multiplexed stream. HLS media manifests will be - * named `MuxStream.key` with the `.m3u8` extension suffix. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * - * Generated from protobuf field string file_name = 2; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the generated file. The default is `MuxStream.key` with the - * extension suffix corresponding to the `MuxStream.container`. - * Individual segments also have an incremental 10-digit zero-padded suffix - * starting from 0 before the extension, such as `mux_stream0000000123.ts`. - * - * Generated from protobuf field string file_name = 2; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * - * Generated from protobuf field string container = 3; - * @return string - */ - public function getContainer() - { - return $this->container; - } - - /** - * The container format. The default is `mp4` - * Supported container formats: - * - `ts` - * - `fmp4`- the corresponding file extension is `.m4s` - * - `mp4` - * - `vtt` - * See also: - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats) - * - * Generated from protobuf field string container = 3; - * @param string $var - * @return $this - */ - public function setContainer($var) - { - GPBUtil::checkString($var, True); - $this->container = $var; - - return $this; - } - - /** - * List of `ElementaryStream.key`s multiplexed in this stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getElementaryStreams() - { - return $this->elementary_streams; - } - - /** - * List of `ElementaryStream.key`s multiplexed in this stream. - * - * Generated from protobuf field repeated string elementary_streams = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setElementaryStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->elementary_streams = $arr; - - return $this; - } - - /** - * Segment settings for `ts`, `fmp4` and `vtt`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; - * @return \Google\Cloud\Video\Transcoder\V1\SegmentSettings|null - */ - public function getSegmentSettings() - { - return $this->segment_settings; - } - - public function hasSegmentSettings() - { - return isset($this->segment_settings); - } - - public function clearSegmentSettings() - { - unset($this->segment_settings); - } - - /** - * Segment settings for `ts`, `fmp4` and `vtt`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.SegmentSettings segment_settings = 5; - * @param \Google\Cloud\Video\Transcoder\V1\SegmentSettings $var - * @return $this - */ - public function setSegmentSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\SegmentSettings::class); - $this->segment_settings = $var; - - return $this; - } - - /** - * Identifier of the encryption configuration to use. If omitted, output will - * be unencrypted. - * - * Generated from protobuf field string encryption_id = 7; - * @return string - */ - public function getEncryptionId() - { - return $this->encryption_id; - } - - /** - * Identifier of the encryption configuration to use. If omitted, output will - * be unencrypted. - * - * Generated from protobuf field string encryption_id = 7; - * @param string $var - * @return $this - */ - public function setEncryptionId($var) - { - GPBUtil::checkString($var, True); - $this->encryption_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php deleted file mode 100644 index e3203d1eb0bf..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Output.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.video.transcoder.v1.Output - */ -class Output extends \Google\Protobuf\Internal\Message -{ - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI for the output file(s). For example, `gs://my-bucket/outputs/`. - * If empty, the value is populated from `Job.output_uri`. See - * [Supported input and output - * formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats). - * - * 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; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php deleted file mode 100644 index fa19100a1a1e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay - */ -class Overlay extends \Google\Protobuf\Internal\Message -{ - /** - * Image overlay. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; - */ - protected $image = null; - /** - * List of Animations. The list should be chronological, without any time - * overlap. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; - */ - private $animations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\Image $image - * Image overlay. - * @type array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $animations - * List of Animations. The list should be chronological, without any time - * overlap. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Image overlay. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * Image overlay. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.Image image = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\Image::class); - $this->image = $var; - - return $this; - } - - /** - * List of Animations. The list should be chronological, without any time - * overlap. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnimations() - { - return $this->animations; - } - - /** - * List of Animations. The list should be chronological, without any time - * overlap. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.Overlay.Animation animations = 2; - * @param array<\Google\Cloud\Video\Transcoder\V1\Overlay\Animation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnimations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\Overlay\Animation::class); - $this->animations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php deleted file mode 100644 index 721b5ff9f161..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Animation.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.Animation - */ -class Animation extends \Google\Protobuf\Internal\Message -{ - protected $animation_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $animation_static - * Display static overlay object. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $animation_fade - * Display overlay object with fade animation. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $animation_end - * End previous animation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Display static overlay object. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic|null - */ - public function getAnimationStatic() - { - return $this->readOneof(1); - } - - public function hasAnimationStatic() - { - return $this->hasOneof(1); - } - - /** - * Display static overlay object. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationStatic animation_static = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic $var - * @return $this - */ - public function setAnimationStatic($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationStatic::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Display overlay object with fade animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade|null - */ - public function getAnimationFade() - { - return $this->readOneof(2); - } - - public function hasAnimationFade() - { - return $this->hasOneof(2); - } - - /** - * Display overlay object with fade animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationFade animation_fade = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade $var - * @return $this - */ - public function setAnimationFade($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationFade::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * End previous animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd|null - */ - public function getAnimationEnd() - { - return $this->readOneof(3); - } - - public function hasAnimationEnd() - { - return $this->hasOneof(3); - } - - /** - * End previous animation. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.AnimationEnd animation_end = 3; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd $var - * @return $this - */ - public function setAnimationEnd($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\AnimationEnd::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAnimationType() - { - return $this->whichOneof("animation_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Animation::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Animation::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php deleted file mode 100644 index 38f7c28a1751..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationEnd.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.AnimationEnd - */ -class AnimationEnd extends \Google\Protobuf\Internal\Message -{ - /** - * The time to end overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_time_offset - * The time to end overlay object, in seconds. Default: 0 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The time to end overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * The time to end overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnimationEnd::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationEnd::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php deleted file mode 100644 index f6a10418cbdb..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationFade.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.AnimationFade - */ -class AnimationFade extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $fade_type = 0; - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; - */ - protected $xy = null; - /** - * The time to start the fade animation, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; - */ - protected $start_time_offset = null; - /** - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; - */ - protected $end_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $fade_type - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * @type \Google\Protobuf\Duration $start_time_offset - * The time to start the fade animation, in seconds. Default: 0 - * @type \Google\Protobuf\Duration $end_time_offset - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getFadeType() - { - return $this->fade_type; - } - - /** - * Required. Type of fade animation: `FADE_IN` or `FADE_OUT`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.FadeType fade_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setFadeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Video\Transcoder\V1\Overlay\FadeType::class); - $this->fade_type = $var; - - return $this; - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null - */ - public function getXy() - { - return $this->xy; - } - - public function hasXy() - { - return isset($this->xy); - } - - public function clearXy() - { - unset($this->xy); - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var - * @return $this - */ - public function setXy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); - $this->xy = $var; - - return $this; - } - - /** - * The time to start the fade animation, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * The time to start the fade animation, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - - /** - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * The time to end the fade animation, in seconds. Default: - * `start_time_offset` + 1s - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnimationFade::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationFade::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php deleted file mode 100644 index 8829a32fef8d..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/AnimationStatic.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.AnimationStatic - */ -class AnimationStatic extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; - */ - protected $xy = null; - /** - * The time to start displaying the overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; - */ - protected $start_time_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $xy - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * @type \Google\Protobuf\Duration $start_time_offset - * The time to start displaying the overlay object, in seconds. Default: 0 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null - */ - public function getXy() - { - return $this->xy; - } - - public function hasXy() - { - return isset($this->xy); - } - - public function clearXy() - { - unset($this->xy); - } - - /** - * Normalized coordinates based on output video resolution. Valid - * values: `0.0`–`1.0`. `xy` is the upper-left coordinate of the overlay - * object. For example, use the x and y coordinates {0,0} to position the - * top-left corner of the overlay animation in the top-left corner of the - * output video. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate xy = 1; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var - * @return $this - */ - public function setXy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); - $this->xy = $var; - - return $this; - } - - /** - * The time to start displaying the overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * The time to start displaying the overlay object, in seconds. Default: 0 - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AnimationStatic::class, \Google\Cloud\Video\Transcoder\V1\Overlay_AnimationStatic::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php deleted file mode 100644 index 00d84b08ab33..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/FadeType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.FadeType - */ -class FadeType -{ - /** - * The fade type is not specified. - * - * Generated from protobuf enum FADE_TYPE_UNSPECIFIED = 0; - */ - const FADE_TYPE_UNSPECIFIED = 0; - /** - * Fade the overlay object into view. - * - * Generated from protobuf enum FADE_IN = 1; - */ - const FADE_IN = 1; - /** - * Fade the overlay object out of view. - * - * Generated from protobuf enum FADE_OUT = 2; - */ - const FADE_OUT = 2; - - private static $valueToName = [ - self::FADE_TYPE_UNSPECIFIED => 'FADE_TYPE_UNSPECIFIED', - self::FADE_IN => 'FADE_IN', - self::FADE_OUT => 'FADE_OUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FadeType::class, \Google\Cloud\Video\Transcoder\V1\Overlay_FadeType::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php deleted file mode 100644 index 88bcf10bc53f..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/Image.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; - */ - protected $resolution = null; - /** - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * - * Generated from protobuf field double alpha = 3; - */ - protected $alpha = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * @type \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $resolution - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * @type float $alpha - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI of the image in Cloud Storage. For example, - * `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; - * @return \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate|null - */ - public function getResolution() - { - return $this->resolution; - } - - public function hasResolution() - { - return isset($this->resolution); - } - - public function clearResolution() - { - unset($this->resolution); - } - - /** - * Normalized image resolution, based on output video resolution. Valid - * values: `0.0`–`1.0`. To respect the original image aspect ratio, set - * either `x` or `y` to `0.0`. To use the original image resolution, set - * both `x` and `y` to `0.0`. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate resolution = 2; - * @param \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate $var - * @return $this - */ - public function setResolution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\Overlay\NormalizedCoordinate::class); - $this->resolution = $var; - - return $this; - } - - /** - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * - * Generated from protobuf field double alpha = 3; - * @return float - */ - public function getAlpha() - { - return $this->alpha; - } - - /** - * Target image opacity. Valid values are from `1.0` (solid, default) to - * `0.0` (transparent), exclusive. Set this to a value greater than `0.0`. - * - * Generated from protobuf field double alpha = 3; - * @param float $var - * @return $this - */ - public function setAlpha($var) - { - GPBUtil::checkDouble($var); - $this->alpha = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Image::class, \Google\Cloud\Video\Transcoder\V1\Overlay_Image::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php deleted file mode 100644 index 6212da72fc3e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/Overlay/NormalizedCoordinate.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.video.transcoder.v1.Overlay.NormalizedCoordinate - */ -class NormalizedCoordinate extends \Google\Protobuf\Internal\Message -{ - /** - * Normalized x coordinate. - * - * Generated from protobuf field double x = 1; - */ - protected $x = 0.0; - /** - * Normalized y coordinate. - * - * Generated from protobuf field double y = 2; - */ - protected $y = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * Normalized x coordinate. - * @type float $y - * Normalized y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Normalized x coordinate. - * - * Generated from protobuf field double x = 1; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * Normalized x coordinate. - * - * Generated from protobuf field double x = 1; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkDouble($var); - $this->x = $var; - - return $this; - } - - /** - * Normalized y coordinate. - * - * Generated from protobuf field double y = 2; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Normalized y coordinate. - * - * Generated from protobuf field double y = 2; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkDouble($var); - $this->y = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NormalizedCoordinate::class, \Google\Cloud\Video\Transcoder\V1\Overlay_NormalizedCoordinate::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php deleted file mode 100644 index a89acfa1847b..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig.php +++ /dev/null @@ -1,341 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig - */ -class PreprocessingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Color preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; - */ - protected $color = null; - /** - * Denoise preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; - */ - protected $denoise = null; - /** - * Deblock preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; - */ - protected $deblock = null; - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; - */ - protected $audio = null; - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; - */ - protected $crop = null; - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; - */ - protected $pad = null; - /** - * Specify the video deinterlace configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; - */ - protected $deinterlace = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $color - * Color preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $denoise - * Denoise preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $deblock - * Deblock preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $audio - * Audio preprocessing configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $crop - * Specify the video cropping configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $pad - * Specify the video pad filter configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $deinterlace - * Specify the video deinterlace configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Color preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color|null - */ - public function getColor() - { - return $this->color; - } - - public function hasColor() - { - return isset($this->color); - } - - public function clearColor() - { - unset($this->color); - } - - /** - * Color preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Color color = 1; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color $var - * @return $this - */ - public function setColor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Color::class); - $this->color = $var; - - return $this; - } - - /** - * Denoise preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise|null - */ - public function getDenoise() - { - return $this->denoise; - } - - public function hasDenoise() - { - return isset($this->denoise); - } - - public function clearDenoise() - { - unset($this->denoise); - } - - /** - * Denoise preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise denoise = 2; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise $var - * @return $this - */ - public function setDenoise($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Denoise::class); - $this->denoise = $var; - - return $this; - } - - /** - * Deblock preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock|null - */ - public function getDeblock() - { - return $this->deblock; - } - - public function hasDeblock() - { - return isset($this->deblock); - } - - public function clearDeblock() - { - unset($this->deblock); - } - - /** - * Deblock preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock deblock = 3; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock $var - * @return $this - */ - public function setDeblock($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deblock::class); - $this->deblock = $var; - - return $this; - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio|null - */ - public function getAudio() - { - return $this->audio; - } - - public function hasAudio() - { - return isset($this->audio); - } - - public function clearAudio() - { - unset($this->audio); - } - - /** - * Audio preprocessing configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Audio audio = 4; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio $var - * @return $this - */ - public function setAudio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Audio::class); - $this->audio = $var; - - return $this; - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop|null - */ - public function getCrop() - { - return $this->crop; - } - - public function hasCrop() - { - return isset($this->crop); - } - - public function clearCrop() - { - unset($this->crop); - } - - /** - * Specify the video cropping configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Crop crop = 5; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop $var - * @return $this - */ - public function setCrop($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Crop::class); - $this->crop = $var; - - return $this; - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad|null - */ - public function getPad() - { - return $this->pad; - } - - public function hasPad() - { - return isset($this->pad); - } - - public function clearPad() - { - unset($this->pad); - } - - /** - * Specify the video pad filter configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Pad pad = 6; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad $var - * @return $this - */ - public function setPad($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Pad::class); - $this->pad = $var; - - return $this; - } - - /** - * Specify the video deinterlace configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace|null - */ - public function getDeinterlace() - { - return $this->deinterlace; - } - - public function hasDeinterlace() - { - return isset($this->deinterlace); - } - - public function clearDeinterlace() - { - unset($this->deinterlace); - } - - /** - * Specify the video deinterlace configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace deinterlace = 7; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace $var - * @return $this - */ - public function setDeinterlace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace::class); - $this->deinterlace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php deleted file mode 100644 index 5527aa011f49..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Audio.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Audio - */ -class Audio extends \Google\Protobuf\Internal\Message -{ - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * - * Generated from protobuf field double lufs = 1; - */ - protected $lufs = 0.0; - /** - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool high_boost = 2; - */ - protected $high_boost = false; - /** - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool low_boost = 3; - */ - protected $low_boost = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $lufs - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * @type bool $high_boost - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * @type bool $low_boost - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * - * Generated from protobuf field double lufs = 1; - * @return float - */ - public function getLufs() - { - return $this->lufs; - } - - /** - * Specify audio loudness normalization in loudness units relative to full - * scale (LUFS). Enter a value between -24 and 0 (the default), where: - * * -24 is the Advanced Television Systems Committee (ATSC A/85) standard - * * -23 is the EU R128 broadcast standard - * * -19 is the prior standard for online mono audio - * * -18 is the ReplayGain standard - * * -16 is the prior standard for stereo audio - * * -14 is the new online audio standard recommended by Spotify, as well - * as Amazon Echo - * * 0 disables normalization - * - * Generated from protobuf field double lufs = 1; - * @param float $var - * @return $this - */ - public function setLufs($var) - { - GPBUtil::checkDouble($var); - $this->lufs = $var; - - return $this; - } - - /** - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool high_boost = 2; - * @return bool - */ - public function getHighBoost() - { - return $this->high_boost; - } - - /** - * Enable boosting high frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool high_boost = 2; - * @param bool $var - * @return $this - */ - public function setHighBoost($var) - { - GPBUtil::checkBool($var); - $this->high_boost = $var; - - return $this; - } - - /** - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool low_boost = 3; - * @return bool - */ - public function getLowBoost() - { - return $this->low_boost; - } - - /** - * Enable boosting low frequency components. The default is `false`. - * **Note:** This field is not supported. - * - * Generated from protobuf field bool low_boost = 3; - * @param bool $var - * @return $this - */ - public function setLowBoost($var) - { - GPBUtil::checkBool($var); - $this->low_boost = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Audio::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Audio::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php deleted file mode 100644 index 7fcb9b376823..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Color.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Color - */ -class Color extends \Google\Protobuf\Internal\Message -{ - /** - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double saturation = 1; - */ - protected $saturation = 0.0; - /** - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double contrast = 2; - */ - protected $contrast = 0.0; - /** - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * - * Generated from protobuf field double brightness = 3; - */ - protected $brightness = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $saturation - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * @type float $contrast - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * @type float $brightness - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double saturation = 1; - * @return float - */ - public function getSaturation() - { - return $this->saturation; - } - - /** - * Control color saturation of the video. Enter a value between -1 and 1, - * where -1 is fully desaturated and 1 is maximum saturation. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double saturation = 1; - * @param float $var - * @return $this - */ - public function setSaturation($var) - { - GPBUtil::checkDouble($var); - $this->saturation = $var; - - return $this; - } - - /** - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double contrast = 2; - * @return float - */ - public function getContrast() - { - return $this->contrast; - } - - /** - * Control black and white contrast of the video. Enter a value between -1 - * and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no - * change. The default is 0. - * - * Generated from protobuf field double contrast = 2; - * @param float $var - * @return $this - */ - public function setContrast($var) - { - GPBUtil::checkDouble($var); - $this->contrast = $var; - - return $this; - } - - /** - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * - * Generated from protobuf field double brightness = 3; - * @return float - */ - public function getBrightness() - { - return $this->brightness; - } - - /** - * Control brightness of the video. Enter a value between -1 and 1, where -1 - * is minimum brightness and 1 is maximum brightness. 0 is no change. The - * default is 0. - * - * Generated from protobuf field double brightness = 3; - * @param float $var - * @return $this - */ - public function setBrightness($var) - { - GPBUtil::checkDouble($var); - $this->brightness = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Color::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Color::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php deleted file mode 100644 index a4a924ad4860..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Crop.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Crop - */ -class Crop extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to crop from the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to crop from the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to crop from the left. The default is 0. - * @type int $right_pixels - * The number of pixels to crop from the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to crop from the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to crop from the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to crop from the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to crop from the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Crop::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Crop::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php deleted file mode 100644 index a1c2d7c6a2a5..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deblock.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deblock - */ -class Deblock extends \Google\Protobuf\Internal\Message -{ - /** - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * - * Generated from protobuf field double strength = 1; - */ - protected $strength = 0.0; - /** - * Enable deblocker. The default is `false`. - * - * Generated from protobuf field bool enabled = 2; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $strength - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * @type bool $enabled - * Enable deblocker. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * - * Generated from protobuf field double strength = 1; - * @return float - */ - public function getStrength() - { - return $this->strength; - } - - /** - * Set strength of the deblocker. Enter a value between 0 and 1. The higher - * the value, the stronger the block removal. 0 is no deblocking. The - * default is 0. - * - * Generated from protobuf field double strength = 1; - * @param float $var - * @return $this - */ - public function setStrength($var) - { - GPBUtil::checkDouble($var); - $this->strength = $var; - - return $this; - } - - /** - * Enable deblocker. The default is `false`. - * - * Generated from protobuf field bool enabled = 2; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enable deblocker. The default is `false`. - * - * Generated from protobuf field bool enabled = 2; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Deblock::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deblock::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php deleted file mode 100644 index b770eda51e32..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace - */ -class Deinterlace extends \Google\Protobuf\Internal\Message -{ - protected $deinterlacing_filter; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $yadif - * Specifies the Yet Another Deinterlacing Filter Configuration. - * @type \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $bwdif - * Specifies the Bob Weaver Deinterlacing Filter Configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the Yet Another Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig|null - */ - public function getYadif() - { - return $this->readOneof(1); - } - - public function hasYadif() - { - return $this->hasOneof(1); - } - - /** - * Specifies the Yet Another Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig yadif = 1; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig $var - * @return $this - */ - public function setYadif($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\YadifConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Specifies the Bob Weaver Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; - * @return \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig|null - */ - public function getBwdif() - { - return $this->readOneof(2); - } - - public function hasBwdif() - { - return $this->hasOneof(2); - } - - /** - * Specifies the Bob Weaver Deinterlacing Filter Configuration. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig bwdif = 2; - * @param \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig $var - * @return $this - */ - public function setBwdif($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig\Deinterlace\BwdifConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDeinterlacingFilter() - { - return $this->whichOneof("deinterlacing_filter"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Deinterlace::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php deleted file mode 100644 index ac4676c464e6..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/BwdifConfig.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.BwdifConfig - */ -class BwdifConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - */ - protected $mode = ''; - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 2; - */ - protected $parity = ''; - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 3; - */ - protected $deinterlace_all_frames = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mode - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * @type string $parity - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * @type bool $deinterlace_all_frames - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 2; - * @return string - */ - public function getParity() - { - return $this->parity; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 2; - * @param string $var - * @return $this - */ - public function setParity($var) - { - GPBUtil::checkString($var, True); - $this->parity = $var; - - return $this; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 3; - * @return bool - */ - public function getDeinterlaceAllFrames() - { - return $this->deinterlace_all_frames; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 3; - * @param bool $var - * @return $this - */ - public function setDeinterlaceAllFrames($var) - { - GPBUtil::checkBool($var); - $this->deinterlace_all_frames = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BwdifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_BwdifConfig::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php deleted file mode 100644 index 48e8862bebbb..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Deinterlace/YadifConfig.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Deinterlace.YadifConfig - */ -class YadifConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - */ - protected $mode = ''; - /** - * Disable spacial interlacing. - * The default is `false`. - * - * Generated from protobuf field bool disable_spatial_interlacing = 2; - */ - protected $disable_spatial_interlacing = false; - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 3; - */ - protected $parity = ''; - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 4; - */ - protected $deinterlace_all_frames = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mode - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * @type bool $disable_spatial_interlacing - * Disable spacial interlacing. - * The default is `false`. - * @type string $parity - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * @type bool $deinterlace_all_frames - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Specifies the deinterlacing mode to adopt. - * The default is `send_frame`. - * Supported values: - * - `send_frame`: Output one frame for each frame - * - `send_field`: Output one frame for each field - * - * Generated from protobuf field string mode = 1; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Disable spacial interlacing. - * The default is `false`. - * - * Generated from protobuf field bool disable_spatial_interlacing = 2; - * @return bool - */ - public function getDisableSpatialInterlacing() - { - return $this->disable_spatial_interlacing; - } - - /** - * Disable spacial interlacing. - * The default is `false`. - * - * Generated from protobuf field bool disable_spatial_interlacing = 2; - * @param bool $var - * @return $this - */ - public function setDisableSpatialInterlacing($var) - { - GPBUtil::checkBool($var); - $this->disable_spatial_interlacing = $var; - - return $this; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 3; - * @return string - */ - public function getParity() - { - return $this->parity; - } - - /** - * The picture field parity assumed for the input interlaced video. - * The default is `auto`. - * Supported values: - * - `tff`: Assume the top field is first - * - `bff`: Assume the bottom field is first - * - `auto`: Enable automatic detection of field parity - * - * Generated from protobuf field string parity = 3; - * @param string $var - * @return $this - */ - public function setParity($var) - { - GPBUtil::checkString($var, True); - $this->parity = $var; - - return $this; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 4; - * @return bool - */ - public function getDeinterlaceAllFrames() - { - return $this->deinterlace_all_frames; - } - - /** - * Deinterlace all frames rather than just the frames identified as - * interlaced. The default is `false`. - * - * Generated from protobuf field bool deinterlace_all_frames = 4; - * @param bool $var - * @return $this - */ - public function setDeinterlaceAllFrames($var) - { - GPBUtil::checkBool($var); - $this->deinterlace_all_frames = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(YadifConfig::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Deinterlace_YadifConfig::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php deleted file mode 100644 index 8b261dd4c493..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Denoise.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Denoise - */ -class Denoise extends \Google\Protobuf\Internal\Message -{ - /** - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * - * Generated from protobuf field double strength = 1; - */ - protected $strength = 0.0; - /** - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * - * Generated from protobuf field string tune = 2; - */ - protected $tune = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $strength - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * @type string $tune - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * - * Generated from protobuf field double strength = 1; - * @return float - */ - public function getStrength() - { - return $this->strength; - } - - /** - * Set strength of the denoise. Enter a value between 0 and 1. The higher - * the value, the smoother the image. 0 is no denoising. The default is 0. - * - * Generated from protobuf field double strength = 1; - * @param float $var - * @return $this - */ - public function setStrength($var) - { - GPBUtil::checkDouble($var); - $this->strength = $var; - - return $this; - } - - /** - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * - * Generated from protobuf field string tune = 2; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Set the denoiser mode. The default is `standard`. - * Supported denoiser modes: - * - `standard` - * - `grain` - * - * Generated from protobuf field string tune = 2; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Denoise::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Denoise::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php deleted file mode 100644 index 04d702ce9f94..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PreprocessingConfig/Pad.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.video.transcoder.v1.PreprocessingConfig.Pad - */ -class Pad extends \Google\Protobuf\Internal\Message -{ - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - */ - protected $top_pixels = 0; - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - */ - protected $bottom_pixels = 0; - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - */ - protected $left_pixels = 0; - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - */ - protected $right_pixels = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $top_pixels - * The number of pixels to add to the top. The default is 0. - * @type int $bottom_pixels - * The number of pixels to add to the bottom. The default is 0. - * @type int $left_pixels - * The number of pixels to add to the left. The default is 0. - * @type int $right_pixels - * The number of pixels to add to the right. The default is 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @return int - */ - public function getTopPixels() - { - return $this->top_pixels; - } - - /** - * The number of pixels to add to the top. The default is 0. - * - * Generated from protobuf field int32 top_pixels = 1; - * @param int $var - * @return $this - */ - public function setTopPixels($var) - { - GPBUtil::checkInt32($var); - $this->top_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @return int - */ - public function getBottomPixels() - { - return $this->bottom_pixels; - } - - /** - * The number of pixels to add to the bottom. The default is 0. - * - * Generated from protobuf field int32 bottom_pixels = 2; - * @param int $var - * @return $this - */ - public function setBottomPixels($var) - { - GPBUtil::checkInt32($var); - $this->bottom_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @return int - */ - public function getLeftPixels() - { - return $this->left_pixels; - } - - /** - * The number of pixels to add to the left. The default is 0. - * - * Generated from protobuf field int32 left_pixels = 3; - * @param int $var - * @return $this - */ - public function setLeftPixels($var) - { - GPBUtil::checkInt32($var); - $this->left_pixels = $var; - - return $this; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @return int - */ - public function getRightPixels() - { - return $this->right_pixels; - } - - /** - * The number of pixels to add to the right. The default is 0. - * - * Generated from protobuf field int32 right_pixels = 4; - * @param int $var - * @return $this - */ - public function setRightPixels($var) - { - GPBUtil::checkInt32($var); - $this->right_pixels = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Pad::class, \Google\Cloud\Video\Transcoder\V1\PreprocessingConfig_Pad::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php deleted file mode 100644 index 554c0dbf0125..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/PubsubDestination.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.video.transcoder.v1.PubsubDestination - */ -class PubsubDestination extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * - * Generated from protobuf field string topic = 1; - */ - protected $topic = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $topic - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * - * Generated from protobuf field string topic = 1; - * @return string - */ - public function getTopic() - { - return $this->topic; - } - - /** - * The name of the Pub/Sub topic to publish job completion notification - * to. For example: `projects/{project}/topics/{topic}`. - * - * Generated from protobuf field string topic = 1; - * @param string $var - * @return $this - */ - public function setTopic($var) - { - GPBUtil::checkString($var, True); - $this->topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php deleted file mode 100644 index 9b21c31ca421..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SegmentSettings.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.video.transcoder.v1.SegmentSettings - */ -class SegmentSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - */ - protected $segment_duration = null; - /** - * Required. Create an individual segment file. The default is `false`. - * - * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $individual_segments = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $segment_duration - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * @type bool $individual_segments - * Required. Create an individual segment file. The default is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getSegmentDuration() - { - return $this->segment_duration; - } - - public function hasSegmentDuration() - { - return isset($this->segment_duration); - } - - public function clearSegmentDuration() - { - unset($this->segment_duration); - } - - /** - * Duration of the segments in seconds. The default is `6.0s`. Note that - * `segmentDuration` must be greater than or equal to - * [`gopDuration`](#videostream), and `segmentDuration` must be divisible by - * [`gopDuration`](#videostream). - * - * Generated from protobuf field .google.protobuf.Duration segment_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSegmentDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->segment_duration = $var; - - return $this; - } - - /** - * Required. Create an individual segment file. The default is `false`. - * - * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getIndividualSegments() - { - return $this->individual_segments; - } - - /** - * Required. Create an individual segment file. The default is `false`. - * - * Generated from protobuf field bool individual_segments = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setIndividualSegments($var) - { - GPBUtil::checkBool($var); - $this->individual_segments = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php deleted file mode 100644 index b0b6c8cfeeca..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/SpriteSheet.php +++ /dev/null @@ -1,575 +0,0 @@ -google.cloud.video.transcoder.v1.SpriteSheet - */ -class SpriteSheet extends \Google\Protobuf\Internal\Message -{ - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $file_prefix = ''; - /** - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_width_pixels = 0; - /** - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sprite_height_pixels = 0; - /** - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * - * Generated from protobuf field int32 column_count = 5; - */ - protected $column_count = 0; - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * - * Generated from protobuf field int32 row_count = 6; - */ - protected $row_count = 0; - /** - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; - */ - protected $start_time_offset = null; - /** - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; - */ - protected $end_time_offset = null; - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 11; - */ - protected $quality = 0; - protected $extraction_strategy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * @type string $file_prefix - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * @type int $sprite_width_pixels - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $sprite_height_pixels - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $column_count - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * @type int $row_count - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * @type \Google\Protobuf\Duration $start_time_offset - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * @type \Google\Protobuf\Duration $end_time_offset - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * @type int $total_count - * Total number of sprites. Create the specified number of sprites - * distributed evenly across the timeline of the output media. The default - * is 100. - * @type \Google\Protobuf\Duration $interval - * Starting from `0s`, create sprites at regular intervals. Specify the - * interval value in seconds. - * @type int $quality - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Format type. The default is `jpeg`. - * Supported formats: - * - `jpeg` - * - * 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; - } - - /** - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilePrefix() - { - return $this->file_prefix; - } - - /** - * Required. File name prefix for the generated sprite sheets. - * Each sprite sheet has an incremental 10-digit zero-padded suffix starting - * from 0 before the extension, such as `sprite_sheet0000000123.jpeg`. - * - * Generated from protobuf field string file_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilePrefix($var) - { - GPBUtil::checkString($var, True); - $this->file_prefix = $var; - - return $this; - } - - /** - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteWidthPixels() - { - return $this->sprite_width_pixels; - } - - /** - * Required. The width of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field or the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_width_pixels = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_width_pixels = $var; - - return $this; - } - - /** - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSpriteHeightPixels() - { - return $this->sprite_height_pixels; - } - - /** - * Required. The height of sprite in pixels. Must be an even integer. To - * preserve the source aspect ratio, set the - * [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] - * field or the - * [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] - * field, but not both (the API will automatically calculate the missing - * field). - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 sprite_height_pixels = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSpriteHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->sprite_height_pixels = $var; - - return $this; - } - - /** - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * - * Generated from protobuf field int32 column_count = 5; - * @return int - */ - public function getColumnCount() - { - return $this->column_count; - } - - /** - * The maximum number of sprites per row in a sprite sheet. The default is 0, - * which indicates no maximum limit. - * - * Generated from protobuf field int32 column_count = 5; - * @param int $var - * @return $this - */ - public function setColumnCount($var) - { - GPBUtil::checkInt32($var); - $this->column_count = $var; - - return $this; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * - * Generated from protobuf field int32 row_count = 6; - * @return int - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * The maximum number of rows per sprite sheet. When the sprite sheet is full, - * a new sprite sheet is created. The default is 0, which indicates no maximum - * limit. - * - * Generated from protobuf field int32 row_count = 6; - * @param int $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt32($var); - $this->row_count = $var; - - return $this; - } - - /** - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getStartTimeOffset() - { - return $this->start_time_offset; - } - - public function hasStartTimeOffset() - { - return isset($this->start_time_offset); - } - - public function clearStartTimeOffset() - { - unset($this->start_time_offset); - } - - /** - * Start time in seconds, relative to the output file timeline. Determines the - * first sprite to pick. The default is `0s`. - * - * Generated from protobuf field .google.protobuf.Duration start_time_offset = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_time_offset = $var; - - return $this; - } - - /** - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getEndTimeOffset() - { - return $this->end_time_offset; - } - - public function hasEndTimeOffset() - { - return isset($this->end_time_offset); - } - - public function clearEndTimeOffset() - { - unset($this->end_time_offset); - } - - /** - * End time in seconds, relative to the output file timeline. When - * `end_time_offset` is not specified, the sprites are generated until the end - * of the output file. - * - * Generated from protobuf field .google.protobuf.Duration end_time_offset = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndTimeOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_time_offset = $var; - - return $this; - } - - /** - * Total number of sprites. Create the specified number of sprites - * distributed evenly across the timeline of the output media. The default - * is 100. - * - * Generated from protobuf field int32 total_count = 9; - * @return int - */ - public function getTotalCount() - { - return $this->readOneof(9); - } - - public function hasTotalCount() - { - return $this->hasOneof(9); - } - - /** - * Total number of sprites. Create the specified number of sprites - * distributed evenly across the timeline of the output media. The default - * is 100. - * - * Generated from protobuf field int32 total_count = 9; - * @param int $var - * @return $this - */ - public function setTotalCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Starting from `0s`, create sprites at regular intervals. Specify the - * interval value in seconds. - * - * Generated from protobuf field .google.protobuf.Duration interval = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getInterval() - { - return $this->readOneof(10); - } - - public function hasInterval() - { - return $this->hasOneof(10); - } - - /** - * Starting from `0s`, create sprites at regular intervals. Specify the - * interval value in seconds. - * - * Generated from protobuf field .google.protobuf.Duration interval = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 11; - * @return int - */ - public function getQuality() - { - return $this->quality; - } - - /** - * The quality of the generated sprite sheet. Enter a value between 1 - * and 100, where 1 is the lowest quality and 100 is the highest quality. - * The default is 100. A high quality value corresponds to a low image data - * compression ratio. - * - * Generated from protobuf field int32 quality = 11; - * @param int $var - * @return $this - */ - public function setQuality($var) - { - GPBUtil::checkInt32($var); - $this->quality = $var; - - return $this; - } - - /** - * @return string - */ - public function getExtractionStrategy() - { - return $this->whichOneof("extraction_strategy"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php deleted file mode 100644 index e7f56aa9a086..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.video.transcoder.v1.TextStream - */ -class TextStream extends \Google\Protobuf\Internal\Message -{ - /** - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * - * Generated from protobuf field string codec = 1; - */ - protected $codec = ''; - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; - */ - private $mapping; - /** - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $codec - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * @type string $language_code - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * @type array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $mapping - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * @type string $display_name - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * - * Generated from protobuf field string codec = 1; - * @return string - */ - public function getCodec() - { - return $this->codec; - } - - /** - * The codec for this text stream. The default is `webvtt`. - * Supported text codecs: - * - `srt` - * - `ttml` - * - `cea608` - * - `cea708` - * - `webvtt` - * - * Generated from protobuf field string codec = 1; - * @param string $var - * @return $this - */ - public function setCodec($var) - { - GPBUtil::checkString($var, True); - $this->codec = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as `en-US` or `sr-Latn`. For more - * information, see - * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not - * supported in MP4 files. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMapping() - { - return $this->mapping; - } - - /** - * The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`. - * - * Generated from protobuf field repeated .google.cloud.video.transcoder.v1.TextStream.TextMapping mapping = 3; - * @param array<\Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMapping($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Video\Transcoder\V1\TextStream\TextMapping::class); - $this->mapping = $arr; - - return $this; - } - - /** - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name for this particular text stream that - * will be added to the HLS/DASH manifest. Not supported in MP4 files. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php deleted file mode 100644 index c8404457843c..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/TextStream/TextMapping.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.video.transcoder.v1.TextStream.TextMapping - */ -class TextMapping extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $atom_key = ''; - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_key = ''; - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_track = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $atom_key - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * @type string $input_key - * Required. The `Input.key` that identifies the input file. - * @type int $input_track - * Required. The zero-based index of the track in the input file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAtomKey() - { - return $this->atom_key; - } - - /** - * Required. The `EditAtom.key` that references atom with text inputs in the - * `Job.edit_list`. - * - * Generated from protobuf field string atom_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAtomKey($var) - { - GPBUtil::checkString($var, True); - $this->atom_key = $var; - - return $this; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInputKey() - { - return $this->input_key; - } - - /** - * Required. The `Input.key` that identifies the input file. - * - * Generated from protobuf field string input_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInputKey($var) - { - GPBUtil::checkString($var, True); - $this->input_key = $var; - - return $this; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInputTrack() - { - return $this->input_track; - } - - /** - * Required. The zero-based index of the track in the input file. - * - * Generated from protobuf field int32 input_track = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInputTrack($var) - { - GPBUtil::checkInt32($var); - $this->input_track = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextMapping::class, \Google\Cloud\Video\Transcoder\V1\TextStream_TextMapping::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php deleted file mode 100644 index d3374d958e63..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream - */ -class VideoStream extends \Google\Protobuf\Internal\Message -{ - protected $codec_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $h264 - * H264 codec settings. - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $h265 - * H265 codec settings. - * @type \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $vp9 - * VP9 codec settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings|null - */ - public function getH264() - { - return $this->readOneof(1); - } - - public function hasH264() - { - return $this->hasOneof(1); - } - - /** - * H264 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings h264 = 1; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings $var - * @return $this - */ - public function setH264($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H264CodecSettings::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * H265 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings|null - */ - public function getH265() - { - return $this->readOneof(2); - } - - public function hasH265() - { - return $this->hasOneof(2); - } - - /** - * H265 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings h265 = 2; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings $var - * @return $this - */ - public function setH265($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\H265CodecSettings::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * VP9 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; - * @return \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings|null - */ - public function getVp9() - { - return $this->readOneof(3); - } - - public function hasVp9() - { - return $this->hasOneof(3); - } - - /** - * VP9 codec settings. - * - * Generated from protobuf field .google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings vp9 = 3; - * @param \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings $var - * @return $this - */ - public function setVp9($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Video\Transcoder\V1\VideoStream\Vp9CodecSettings::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getCodecSettings() - { - return $this->whichOneof("codec_settings"); - } - -} - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php deleted file mode 100644 index 0474d647aed6..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H264CodecSettings.php +++ /dev/null @@ -1,994 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream.H264CodecSettings - */ -class H264CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - */ - protected $pixel_format = ''; - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - */ - protected $rate_control_mode = ''; - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - */ - protected $crf_level = 0; - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - */ - protected $allow_open_gop = false; - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - */ - protected $enable_two_pass = false; - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - */ - protected $vbv_size_bits = 0; - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - */ - protected $vbv_fullness_bits = 0; - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 14; - */ - protected $entropy_coder = ''; - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 15; - */ - protected $b_pyramid = false; - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 16; - */ - protected $b_frame_count = 0; - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 17; - */ - protected $aq_strength = 0.0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string profile = 18; - */ - protected $profile = ''; - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string tune = 19; - */ - protected $tune = ''; - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string preset = 20; - */ - protected $preset = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $height_pixels - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * @type string $pixel_format - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * @type string $rate_control_mode - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * @type int $crf_level - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * @type bool $allow_open_gop - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * @type bool $enable_two_pass - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * @type int $vbv_size_bits - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * @type int $vbv_fullness_bits - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * @type string $entropy_coder - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * @type bool $b_pyramid - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * @type int $b_frame_count - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * @type float $aq_strength - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * @type string $tune - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * @type string $preset - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @return string - */ - public function getPixelFormat() - { - return $this->pixel_format; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @param string $var - * @return $this - */ - public function setPixelFormat($var) - { - GPBUtil::checkString($var, True); - $this->pixel_format = $var; - - return $this; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @return string - */ - public function getRateControlMode() - { - return $this->rate_control_mode; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @param string $var - * @return $this - */ - public function setRateControlMode($var) - { - GPBUtil::checkString($var, True); - $this->rate_control_mode = $var; - - return $this; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @return int - */ - public function getCrfLevel() - { - return $this->crf_level; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @param int $var - * @return $this - */ - public function setCrfLevel($var) - { - GPBUtil::checkInt32($var); - $this->crf_level = $var; - - return $this; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @return bool - */ - public function getAllowOpenGop() - { - return $this->allow_open_gop; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @param bool $var - * @return $this - */ - public function setAllowOpenGop($var) - { - GPBUtil::checkBool($var); - $this->allow_open_gop = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(9); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(9); - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(10); - } - - public function hasGopDuration() - { - return $this->hasOneof(10); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @return bool - */ - public function getEnableTwoPass() - { - return $this->enable_two_pass; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @param bool $var - * @return $this - */ - public function setEnableTwoPass($var) - { - GPBUtil::checkBool($var); - $this->enable_two_pass = $var; - - return $this; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @return int - */ - public function getVbvSizeBits() - { - return $this->vbv_size_bits; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @param int $var - * @return $this - */ - public function setVbvSizeBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_size_bits = $var; - - return $this; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @return int - */ - public function getVbvFullnessBits() - { - return $this->vbv_fullness_bits; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @param int $var - * @return $this - */ - public function setVbvFullnessBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_fullness_bits = $var; - - return $this; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 14; - * @return string - */ - public function getEntropyCoder() - { - return $this->entropy_coder; - } - - /** - * The entropy coder to use. The default is `cabac`. - * Supported entropy coders: - * - `cavlc` - * - `cabac` - * - * Generated from protobuf field string entropy_coder = 14; - * @param string $var - * @return $this - */ - public function setEntropyCoder($var) - { - GPBUtil::checkString($var, True); - $this->entropy_coder = $var; - - return $this; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 15; - * @return bool - */ - public function getBPyramid() - { - return $this->b_pyramid; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 15; - * @param bool $var - * @return $this - */ - public function setBPyramid($var) - { - GPBUtil::checkBool($var); - $this->b_pyramid = $var; - - return $this; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 16; - * @return int - */ - public function getBFrameCount() - { - return $this->b_frame_count; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 16; - * @param int $var - * @return $this - */ - public function setBFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->b_frame_count = $var; - - return $this; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 17; - * @return float - */ - public function getAqStrength() - { - return $this->aq_strength; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 17; - * @param float $var - * @return $this - */ - public function setAqStrength($var) - { - GPBUtil::checkDouble($var); - $this->aq_strength = $var; - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string profile = 18; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `baseline` - * * `main` - * * `high` (default) - * The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string profile = 18; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string tune = 19; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string tune = 19; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string preset = 20; - * @return string - */ - public function getPreset() - { - return $this->preset; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H264CodecSettings` - * message. - * - * Generated from protobuf field string preset = 20; - * @param string $var - * @return $this - */ - public function setPreset($var) - { - GPBUtil::checkString($var, True); - $this->preset = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(H264CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H264CodecSettings::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php deleted file mode 100644 index e19c5340e52e..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/H265CodecSettings.php +++ /dev/null @@ -1,1008 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream.H265CodecSettings - */ -class H265CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - */ - protected $pixel_format = ''; - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - */ - protected $rate_control_mode = ''; - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - */ - protected $crf_level = 0; - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - */ - protected $allow_open_gop = false; - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - */ - protected $enable_two_pass = false; - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - */ - protected $vbv_size_bits = 0; - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - */ - protected $vbv_fullness_bits = 0; - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 14; - */ - protected $b_pyramid = false; - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 15; - */ - protected $b_frame_count = 0; - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 16; - */ - protected $aq_strength = 0.0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string profile = 17; - */ - protected $profile = ''; - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string tune = 18; - */ - protected $tune = ''; - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string preset = 19; - */ - protected $preset = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $height_pixels - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * @type string $pixel_format - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * @type string $rate_control_mode - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * @type int $crf_level - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * @type bool $allow_open_gop - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * @type bool $enable_two_pass - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * @type int $vbv_size_bits - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * @type int $vbv_fullness_bits - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * @type bool $b_pyramid - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * @type int $b_frame_count - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * @type float $aq_strength - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * @type string $tune - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * @type string $preset - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 800,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @return string - */ - public function getPixelFormat() - { - return $this->pixel_format; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @param string $var - * @return $this - */ - public function setPixelFormat($var) - { - GPBUtil::checkString($var, True); - $this->pixel_format = $var; - - return $this; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @return string - */ - public function getRateControlMode() - { - return $this->rate_control_mode; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - `crf` - constant rate factor - * - * Generated from protobuf field string rate_control_mode = 6; - * @param string $var - * @return $this - */ - public function setRateControlMode($var) - { - GPBUtil::checkString($var, True); - $this->rate_control_mode = $var; - - return $this; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @return int - */ - public function getCrfLevel() - { - return $this->crf_level; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * - * Generated from protobuf field int32 crf_level = 7; - * @param int $var - * @return $this - */ - public function setCrfLevel($var) - { - GPBUtil::checkInt32($var); - $this->crf_level = $var; - - return $this; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @return bool - */ - public function getAllowOpenGop() - { - return $this->allow_open_gop; - } - - /** - * Specifies whether an open Group of Pictures (GOP) structure should be - * allowed or not. The default is `false`. - * - * Generated from protobuf field bool allow_open_gop = 8; - * @param bool $var - * @return $this - */ - public function setAllowOpenGop($var) - { - GPBUtil::checkBool($var); - $this->allow_open_gop = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(9); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(9); - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 9; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(10); - } - - public function hasGopDuration() - { - return $this->hasOneof(10); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @return bool - */ - public function getEnableTwoPass() - { - return $this->enable_two_pass; - } - - /** - * Use two-pass encoding strategy to achieve better video quality. - * `VideoStream.rate_control_mode` must be `vbr`. The default is `false`. - * - * Generated from protobuf field bool enable_two_pass = 11; - * @param bool $var - * @return $this - */ - public function setEnableTwoPass($var) - { - GPBUtil::checkBool($var); - $this->enable_two_pass = $var; - - return $this; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @return int - */ - public function getVbvSizeBits() - { - return $this->vbv_size_bits; - } - - /** - * Size of the Video Buffering Verifier (VBV) buffer in bits. Must be - * greater than zero. The default is equal to `VideoStream.bitrate_bps`. - * - * Generated from protobuf field int32 vbv_size_bits = 12; - * @param int $var - * @return $this - */ - public function setVbvSizeBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_size_bits = $var; - - return $this; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @return int - */ - public function getVbvFullnessBits() - { - return $this->vbv_fullness_bits; - } - - /** - * Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. - * Must be greater than zero. The default is equal to 90% of - * `VideoStream.vbv_size_bits`. - * - * Generated from protobuf field int32 vbv_fullness_bits = 13; - * @param int $var - * @return $this - */ - public function setVbvFullnessBits($var) - { - GPBUtil::checkInt32($var); - $this->vbv_fullness_bits = $var; - - return $this; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 14; - * @return bool - */ - public function getBPyramid() - { - return $this->b_pyramid; - } - - /** - * Allow B-pyramid for reference frame selection. This may not be supported - * on all decoders. The default is `false`. - * - * Generated from protobuf field bool b_pyramid = 14; - * @param bool $var - * @return $this - */ - public function setBPyramid($var) - { - GPBUtil::checkBool($var); - $this->b_pyramid = $var; - - return $this; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 15; - * @return int - */ - public function getBFrameCount() - { - return $this->b_frame_count; - } - - /** - * The number of consecutive B-frames. Must be greater than or equal to - * zero. Must be less than `VideoStream.gop_frame_count` if set. The default - * is 0. - * - * Generated from protobuf field int32 b_frame_count = 15; - * @param int $var - * @return $this - */ - public function setBFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->b_frame_count = $var; - - return $this; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 16; - * @return float - */ - public function getAqStrength() - { - return $this->aq_strength; - } - - /** - * Specify the intensity of the adaptive quantizer (AQ). Must be between 0 - * and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A - * higher value equals a lower bitrate but smoother image. The default is 0. - * - * Generated from protobuf field double aq_strength = 16; - * @param float $var - * @return $this - */ - public function setAqStrength($var) - { - GPBUtil::checkDouble($var); - $this->aq_strength = $var; - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string profile = 17; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * 8-bit profiles - * * `main` (default) - * * `main-intra` - * * `mainstillpicture` - * * 10-bit profiles - * * `main10` (default) - * * `main10-intra` - * * `main422-10` - * * `main422-10-intra` - * * `main444-10` - * * `main444-10-intra` - * * 12-bit profiles - * * `main12` (default) - * * `main12-intra` - * * `main422-12` - * * `main422-12-intra` - * * `main444-12` - * * `main444-12-intra` - * The available options are - * [FFmpeg-compatible](https://x265.readthedocs.io/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string profile = 17; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string tune = 18; - * @return string - */ - public function getTune() - { - return $this->tune; - } - - /** - * Enforces the specified codec tune. The available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string tune = 18; - * @param string $var - * @return $this - */ - public function setTune($var) - { - GPBUtil::checkString($var, True); - $this->tune = $var; - - return $this; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string preset = 19; - * @return string - */ - public function getPreset() - { - return $this->preset; - } - - /** - * Enforces the specified codec preset. The default is `veryfast`. The - * available options are - * [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `H265CodecSettings` - * message. - * - * Generated from protobuf field string preset = 19; - * @param string $var - * @return $this - */ - public function setPreset($var) - { - GPBUtil::checkString($var, True); - $this->preset = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(H265CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_H265CodecSettings::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php b/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php deleted file mode 100644 index f062f31d7643..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/proto/src/Google/Cloud/Video/Transcoder/V1/VideoStream/Vp9CodecSettings.php +++ /dev/null @@ -1,570 +0,0 @@ -google.cloud.video.transcoder.v1.VideoStream.Vp9CodecSettings - */ -class Vp9CodecSettings extends \Google\Protobuf\Internal\Message -{ - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - */ - protected $width_pixels = 0; - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - */ - protected $height_pixels = 0; - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frame_rate = 0.0; - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bitrate_bps = 0; - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - */ - protected $pixel_format = ''; - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - * Generated from protobuf field string rate_control_mode = 6; - */ - protected $rate_control_mode = ''; - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * - * Generated from protobuf field int32 crf_level = 7; - */ - protected $crf_level = 0; - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * - * Generated from protobuf field string profile = 10; - */ - protected $profile = ''; - protected $gop_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $width_pixels - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type int $height_pixels - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * @type float $frame_rate - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * @type int $bitrate_bps - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * @type string $pixel_format - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * @type string $rate_control_mode - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * @type int $crf_level - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * @type int $gop_frame_count - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * @type \Google\Protobuf\Duration $gop_duration - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * @type string $profile - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Video\Transcoder\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @return int - */ - public function getWidthPixels() - { - return $this->width_pixels; - } - - /** - * The width of the video in pixels. Must be an even integer. - * When not specified, the width is adjusted to match the specified height - * and input aspect ratio. If both are omitted, the input width is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the width, in pixels, per the horizontal ASR. The API calculates - * the height per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 width_pixels = 1; - * @param int $var - * @return $this - */ - public function setWidthPixels($var) - { - GPBUtil::checkInt32($var); - $this->width_pixels = $var; - - return $this; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @return int - */ - public function getHeightPixels() - { - return $this->height_pixels; - } - - /** - * The height of the video in pixels. Must be an even integer. - * When not specified, the height is adjusted to match the specified width - * and input aspect ratio. If both are omitted, the input height is used. - * For portrait videos that contain horizontal ASR and rotation metadata, - * provide the height, in pixels, per the horizontal ASR. The API calculates - * the width per the horizontal ASR. The API detects any rotation metadata - * and swaps the requested height and width for the output. - * - * Generated from protobuf field int32 height_pixels = 2; - * @param int $var - * @return $this - */ - public function setHeightPixels($var) - { - GPBUtil::checkInt32($var); - $this->height_pixels = $var; - - return $this; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getFrameRate() - { - return $this->frame_rate; - } - - /** - * Required. The target video frame rate in frames per second (FPS). Must be - * less than or equal to 120. Will default to the input frame rate if larger - * than the input frame rate. The API will generate an output FPS that is - * divisible by the input FPS, and smaller or equal to the target FPS. See - * [Calculating frame - * rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for - * more information. - * - * Generated from protobuf field double frame_rate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setFrameRate($var) - { - GPBUtil::checkDouble($var); - $this->frame_rate = $var; - - return $this; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getBitrateBps() - { - return $this->bitrate_bps; - } - - /** - * Required. The video bitrate in bits per second. The minimum value is - * 1,000. The maximum value is 480,000,000. - * - * Generated from protobuf field int32 bitrate_bps = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setBitrateBps($var) - { - GPBUtil::checkInt32($var); - $this->bitrate_bps = $var; - - return $this; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @return string - */ - public function getPixelFormat() - { - return $this->pixel_format; - } - - /** - * Pixel format to use. The default is `yuv420p`. - * Supported pixel formats: - * - `yuv420p` pixel format - * - `yuv422p` pixel format - * - `yuv444p` pixel format - * - `yuv420p10` 10-bit HDR pixel format - * - `yuv422p10` 10-bit HDR pixel format - * - `yuv444p10` 10-bit HDR pixel format - * - `yuv420p12` 12-bit HDR pixel format - * - `yuv422p12` 12-bit HDR pixel format - * - `yuv444p12` 12-bit HDR pixel format - * - * Generated from protobuf field string pixel_format = 5; - * @param string $var - * @return $this - */ - public function setPixelFormat($var) - { - GPBUtil::checkString($var, True); - $this->pixel_format = $var; - - return $this; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - * Generated from protobuf field string rate_control_mode = 6; - * @return string - */ - public function getRateControlMode() - { - return $this->rate_control_mode; - } - - /** - * Specify the `rate_control_mode`. The default is `vbr`. - * Supported rate control modes: - * - `vbr` - variable bitrate - * - * Generated from protobuf field string rate_control_mode = 6; - * @param string $var - * @return $this - */ - public function setRateControlMode($var) - { - GPBUtil::checkString($var, True); - $this->rate_control_mode = $var; - - return $this; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * - * Generated from protobuf field int32 crf_level = 7; - * @return int - */ - public function getCrfLevel() - { - return $this->crf_level; - } - - /** - * Target CRF level. Must be between 10 and 36, where 10 is the highest - * quality and 36 is the most efficient compression. The default is 21. - * **Note:** This field is not supported. - * - * Generated from protobuf field int32 crf_level = 7; - * @param int $var - * @return $this - */ - public function setCrfLevel($var) - { - GPBUtil::checkInt32($var); - $this->crf_level = $var; - - return $this; - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 8; - * @return int - */ - public function getGopFrameCount() - { - return $this->readOneof(8); - } - - public function hasGopFrameCount() - { - return $this->hasOneof(8); - } - - /** - * Select the GOP size based on the specified frame count. Must be greater - * than zero. - * - * Generated from protobuf field int32 gop_frame_count = 8; - * @param int $var - * @return $this - */ - public function setGopFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getGopDuration() - { - return $this->readOneof(9); - } - - public function hasGopDuration() - { - return $this->hasOneof(9); - } - - /** - * Select the GOP size based on the specified duration. The default is - * `3s`. Note that `gopDuration` must be less than or equal to - * [`segmentDuration`](#SegmentSettings), and - * [`segmentDuration`](#SegmentSettings) must be divisible by - * `gopDuration`. - * - * Generated from protobuf field .google.protobuf.Duration gop_duration = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGopDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * - * Generated from protobuf field string profile = 10; - * @return string - */ - public function getProfile() - { - return $this->profile; - } - - /** - * Enforces the specified codec profile. The following profiles are - * supported: - * * `profile0` (default) - * * `profile1` - * * `profile2` - * * `profile3` - * The available options are - * [WebM-compatible](https://www.webmproject.org/vp9/profiles/). - * Note that certain values for this field may cause the - * transcoder to override other fields you set in the `Vp9CodecSettings` - * message. - * - * Generated from protobuf field string profile = 10; - * @param string $var - * @return $this - */ - public function setProfile($var) - { - GPBUtil::checkString($var, True); - $this->profile = $var; - - return $this; - } - - /** - * @return string - */ - public function getGopMode() - { - return $this->whichOneof("gop_mode"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Vp9CodecSettings::class, \Google\Cloud\Video\Transcoder\V1\VideoStream_Vp9CodecSettings::class); - diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php deleted file mode 100644 index 76ef88e0d8ae..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setJob($job); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $transcoderServiceClient->createJob($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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - create_job_sample($formattedParent); -} -// [END transcoder_v1_generated_TranscoderService_CreateJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php deleted file mode 100644 index 5e799c73eee4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/create_job_template.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - - // Call the API and handle any network failures. - try { - /** @var JobTemplate $response */ - $response = $transcoderServiceClient->createJobTemplate($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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $jobTemplateId = '[JOB_TEMPLATE_ID]'; - - create_job_template_sample($formattedParent, $jobTemplateId); -} -// [END transcoder_v1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php deleted file mode 100644 index 0c39038a6a0d..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $transcoderServiceClient->deleteJob($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 = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - delete_job_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_DeleteJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php deleted file mode 100644 index 36d0c221fbae..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/delete_job_template.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $transcoderServiceClient->deleteJobTemplate($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 = TranscoderServiceClient::jobTemplateName( - '[PROJECT]', - '[LOCATION]', - '[JOB_TEMPLATE]' - ); - - delete_job_template_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php deleted file mode 100644 index 440b93574b40..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Job $response */ - $response = $transcoderServiceClient->getJob($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 = TranscoderServiceClient::jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - - get_job_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_GetJob_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php deleted file mode 100644 index 713e96f0a4d4..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/get_job_template.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var JobTemplate $response */ - $response = $transcoderServiceClient->getJobTemplate($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 = TranscoderServiceClient::jobTemplateName( - '[PROJECT]', - '[LOCATION]', - '[JOB_TEMPLATE]' - ); - - get_job_template_sample($formattedName); -} -// [END transcoder_v1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php deleted file mode 100644 index b031446bb98c..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_job_templates.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $transcoderServiceClient->listJobTemplates($request); - - /** @var JobTemplate $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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_job_templates_sample($formattedParent); -} -// [END transcoder_v1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php b/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php deleted file mode 100644 index ff6f16808a03..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/samples/V1/TranscoderServiceClient/list_jobs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $transcoderServiceClient->listJobs($request); - - /** @var Job $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 = TranscoderServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_jobs_sample($formattedParent); -} -// [END transcoder_v1_generated_TranscoderService_ListJobs_sync] diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php deleted file mode 100644 index 78714f57b6b7..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/Client/TranscoderServiceClient.php +++ /dev/null @@ -1,476 +0,0 @@ - createJobAsync(CreateJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createJobTemplateAsync(CreateJobTemplateRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobAsync(DeleteJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteJobTemplateAsync(DeleteJobTemplateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobAsync(GetJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getJobTemplateAsync(GetJobTemplateRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobTemplatesAsync(ListJobTemplatesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listJobsAsync(ListJobsRequest $request, array $optionalArgs = []) - */ -final class TranscoderServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.video.transcoder.v1.TranscoderService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'transcoder.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'transcoder.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/transcoder_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/transcoder_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/transcoder_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/transcoder_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a job - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted job resource. - */ - public static function jobName(string $project, string $location, string $job): string - { - return self::getPathTemplate('job')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a job_template - * resource. - * - * @param string $project - * @param string $location - * @param string $jobTemplate - * - * @return string The formatted job_template resource. - */ - public static function jobTemplateName(string $project, string $location, string $jobTemplate): string - { - return self::getPathTemplate('jobTemplate')->render([ - 'project' => $project, - 'location' => $location, - 'job_template' => $jobTemplate, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - job: projects/{project}/locations/{location}/jobs/{job} - * - jobTemplate: projects/{project}/locations/{location}/jobTemplates/{job_template} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'transcoder.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a job in the specified region. - * - * The async variant is {@see TranscoderServiceClient::createJobAsync()} . - * - * @example samples/V1/TranscoderServiceClient/create_job.php - * - * @param CreateJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJob(CreateJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('CreateJob', $request, $callOptions)->wait(); - } - - /** - * Creates a job template in the specified region. - * - * The async variant is {@see TranscoderServiceClient::createJobTemplateAsync()} . - * - * @example samples/V1/TranscoderServiceClient/create_job_template.php - * - * @param CreateJobTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return JobTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function createJobTemplate(CreateJobTemplateRequest $request, array $callOptions = []): JobTemplate - { - return $this->startApiCall('CreateJobTemplate', $request, $callOptions)->wait(); - } - - /** - * Deletes a job. - * - * The async variant is {@see TranscoderServiceClient::deleteJobAsync()} . - * - * @example samples/V1/TranscoderServiceClient/delete_job.php - * - * @param DeleteJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteJob(DeleteJobRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteJob', $request, $callOptions)->wait(); - } - - /** - * Deletes a job template. - * - * The async variant is {@see TranscoderServiceClient::deleteJobTemplateAsync()} . - * - * @example samples/V1/TranscoderServiceClient/delete_job_template.php - * - * @param DeleteJobTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteJobTemplate(DeleteJobTemplateRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteJobTemplate', $request, $callOptions)->wait(); - } - - /** - * Returns the job data. - * - * The async variant is {@see TranscoderServiceClient::getJobAsync()} . - * - * @example samples/V1/TranscoderServiceClient/get_job.php - * - * @param GetJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Job - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJob(GetJobRequest $request, array $callOptions = []): Job - { - return $this->startApiCall('GetJob', $request, $callOptions)->wait(); - } - - /** - * Returns the job template data. - * - * The async variant is {@see TranscoderServiceClient::getJobTemplateAsync()} . - * - * @example samples/V1/TranscoderServiceClient/get_job_template.php - * - * @param GetJobTemplateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return JobTemplate - * - * @throws ApiException Thrown if the API call fails. - */ - public function getJobTemplate(GetJobTemplateRequest $request, array $callOptions = []): JobTemplate - { - return $this->startApiCall('GetJobTemplate', $request, $callOptions)->wait(); - } - - /** - * Lists job templates in the specified region. - * - * The async variant is {@see TranscoderServiceClient::listJobTemplatesAsync()} . - * - * @example samples/V1/TranscoderServiceClient/list_job_templates.php - * - * @param ListJobTemplatesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listJobTemplates(ListJobTemplatesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobTemplates', $request, $callOptions); - } - - /** - * Lists jobs in the specified region. - * - * The async variant is {@see TranscoderServiceClient::listJobsAsync()} . - * - * @example samples/V1/TranscoderServiceClient/list_jobs.php - * - * @param ListJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listJobs(ListJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListJobs', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 83f2166d6b21..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.video.transcoder.v1", - "libraryPackage": "Google\\Cloud\\Video\\Transcoder\\V1", - "services": { - "TranscoderService": { - "clients": { - "grpc": { - "libraryClient": "TranscoderServiceGapicClient", - "rpcs": { - "CreateJob": { - "methods": [ - "createJob" - ] - }, - "CreateJobTemplate": { - "methods": [ - "createJobTemplate" - ] - }, - "DeleteJob": { - "methods": [ - "deleteJob" - ] - }, - "DeleteJobTemplate": { - "methods": [ - "deleteJobTemplate" - ] - }, - "GetJob": { - "methods": [ - "getJob" - ] - }, - "GetJobTemplate": { - "methods": [ - "getJobTemplate" - ] - }, - "ListJobTemplates": { - "methods": [ - "listJobTemplates" - ] - }, - "ListJobs": { - "methods": [ - "listJobs" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json deleted file mode 100644 index 8059fa638283..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.video.transcoder.v1.TranscoderService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "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_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 - } - }, - "methods": { - "CreateJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateJobTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteJobTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetJobTemplate": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListJobTemplates": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php deleted file mode 100644 index 885afad568dc..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_descriptor_config.php +++ /dev/null @@ -1,145 +0,0 @@ - [ - 'google.cloud.video.transcoder.v1.TranscoderService' => [ - 'CreateJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateJobTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteJobTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\Job', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetJobTemplate' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\JobTemplate', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListJobTemplates' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobTemplates', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobTemplatesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Video\Transcoder\V1\ListJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'job' => 'projects/{project}/locations/{location}/jobs/{job}', - 'jobTemplate' => 'projects/{project}/locations/{location}/jobTemplates/{job_template}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php b/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php deleted file mode 100644 index a437550fcccb..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/src/V1/resources/transcoder_service_rest_client_config.php +++ /dev/null @@ -1,122 +0,0 @@ - [ - 'google.cloud.video.transcoder.v1.TranscoderService' => [ - 'CreateJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'body' => 'job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateJobTemplate' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', - 'body' => 'job_template', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'job_template_id', - ], - ], - 'DeleteJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteJobTemplate' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetJobTemplate' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/jobTemplates/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListJobTemplates' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobTemplates', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/jobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php b/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php deleted file mode 100644 index b5a2c2b81a2a..000000000000 --- a/owl-bot-staging/VideoTranscoder/v1/tests/Unit/V1/Client/TranscoderServiceClientTest.php +++ /dev/null @@ -1,676 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TranscoderServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TranscoderServiceClient($options); - } - - /** @test */ - public function createJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $batchModePriority = 2137003131; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $expectedResponse->setBatchModePriority($batchModePriority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJob($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.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $job = new Job(); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - try { - $gapicClient->createJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new JobTemplate(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $jobTemplate = new JobTemplate(); - $jobTemplateId = 'jobTemplateId-1231822466'; - $request = (new CreateJobTemplateRequest()) - ->setParent($formattedParent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - $response = $gapicClient->createJobTemplate($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.video.transcoder.v1.TranscoderService/CreateJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJobTemplate(); - $this->assertProtobufEquals($jobTemplate, $actualValue); - $actualValue = $actualRequestObject->getJobTemplateId(); - $this->assertProtobufEquals($jobTemplateId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $jobTemplate = new JobTemplate(); - $jobTemplateId = 'jobTemplateId-1231822466'; - $request = (new CreateJobTemplateRequest()) - ->setParent($formattedParent) - ->setJobTemplate($jobTemplate) - ->setJobTemplateId($jobTemplateId); - try { - $gapicClient->createJobTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - $gapicClient->deleteJob($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteJobRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new DeleteJobTemplateRequest()) - ->setName($formattedName); - $gapicClient->deleteJobTemplate($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/DeleteJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new DeleteJobTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteJobTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $batchModePriority = 2137003131; - $expectedResponse = new Job(); - $expectedResponse->setName($name2); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $expectedResponse->setBatchModePriority($batchModePriority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getJob($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.video.transcoder.v1.TranscoderService/GetJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTemplateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new JobTemplate(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new GetJobTemplateRequest()) - ->setName($formattedName); - $response = $gapicClient->getJobTemplate($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.video.transcoder.v1.TranscoderService/GetJobTemplate', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getJobTemplateExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->jobTemplateName('[PROJECT]', '[LOCATION]', '[JOB_TEMPLATE]'); - $request = (new GetJobTemplateRequest()) - ->setName($formattedName); - try { - $gapicClient->getJobTemplate($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobTemplatesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobTemplatesElement = new JobTemplate(); - $jobTemplates = [ - $jobTemplatesElement, - ]; - $expectedResponse = new ListJobTemplatesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobTemplates($jobTemplates); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobTemplatesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobTemplates($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobTemplates()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobTemplates', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobTemplatesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListJobTemplatesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobTemplates($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $jobsElement = new Job(); - $jobs = [ - $jobsElement, - ]; - $expectedResponse = new ListJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setJobs($jobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.video.transcoder.v1.TranscoderService/ListJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $inputUri = 'inputUri1707300727'; - $outputUri = 'outputUri-1273518802'; - $templateId = 'templateId1769642752'; - $ttlAfterCompletionDays = 107576420; - $batchModePriority = 2137003131; - $expectedResponse = new Job(); - $expectedResponse->setName($name); - $expectedResponse->setInputUri($inputUri); - $expectedResponse->setOutputUri($outputUri); - $expectedResponse->setTemplateId($templateId); - $expectedResponse->setTtlAfterCompletionDays($ttlAfterCompletionDays); - $expectedResponse->setBatchModePriority($batchModePriority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $job = new Job(); - $request = (new CreateJobRequest()) - ->setParent($formattedParent) - ->setJob($job); - $response = $gapicClient->createJobAsync($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.video.transcoder.v1.TranscoderService/CreateJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getJob(); - $this->assertProtobufEquals($job, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php deleted file mode 100644 index e1e496589232..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/Geometry.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' -¸ -%google/cloud/vision/v1/geometry.protogoogle.cloud.vision.v1" -Vertex -x ( -y ("( -NormalizedVertex -x ( -y ("‡ - BoundingPoly0 -vertices ( 2.google.cloud.vision.v1.VertexE -normalized_vertices ( 2(.google.cloud.vision.v1.NormalizedVertex"+ -Position -x ( -y ( -z (Bn -com.google.cloud.vision.v1B GeometryProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpbø¢GCVNbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ImageAnnotator.php deleted file mode 100644 index bfad39b3938cb323add4470c3d1e165ed22f2cdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11700 zcmcf{OK%&;xuo7hJ?NDz)3P1YYd2OLTa0BpPUScbA1jG5MKTm+#jc9Qid;&YEO*)6 zrEN7Z(Du?CiXNI%P@sqQSoGFE&}(`q&>jlpRG>K&=&eA49{YVWv&&s_*QVkizF3_7 zUh~cOo_YIT=deRArZ-eWwG>BfruUE1&Y_y_Sf*n(Og+8dZM9S@-7wo7O;@dzbh=PU zmn-$OR4CRj0IF?vt%kamJ}}J#UClIfv)jx()@;o*GLNrkw6=1f%8Fr_j^dcs3MEX4 zp|n-Iqcqg?Mm4vkI!aS*TjtSep zn|6h&qDDX)dqu-hEkn`w3aZ_(v<~d53ZQFi2dd-g5m%O9<7|FEL}l5Iw#PLCJF?f-dVA`Th(gTknrb-5!&%o*;XCv=$li3b7^)P&bF#pjl*wFrmjA9dJ6pJbavJKg6gQ$u!g5n zGK~YPYZ#hwuvh7zD<1C@J>#rv;8%{)?hMbn)@kf*gZFfgVKw!mj=GmO_2V2p#VIL{ zZXARQM?LP^I~w<|Y_sXP(>lbSWzPZ79WIkUzE7?mC+G-^40?rzs1+8XRvuqpI>o6d z9Sy=4x&n(*OXqzbT4?X`J~wy{@cjt>2i&ST*y|Bs5DU?CWt-YA2aej40|x5GQ7{e; zeIBK~58OsuOw!%~G+GKv7HSUR>myLxGbA@v{D3I|_7YZB&3qOClY zE!FPoj-84F>X>(U2x-`bdP zhMX!?@;h5nxi0s8ObDmR$?fdAByUUET7J`qH!gtK#jWgyBv)&ds#L2NrS0T|FiS`t ze#@K1a(z2FC7d8LyHd`FNKgnsDeUCyoNRJhI7Q|wx%XhBa;cKfmWq$Ebj$PNZIYnb zb(>~$;Ut+kXh0^V$-8T5^i+_`RBs8jJtc0DF^VY6k%@*0u4_0Hcv`qY##wDZ&n2;X zG3rQtjK!~K;5?u#=!Ih84w>0EyG9dYquep|BT7CIZ6P@hTm@L+9g=K;+XnDa@L}FDDK zHcr>hk_FF;Wl(QRYpPJFq$cRsSID9(94g26eUg4(BeNfxN3yPcr0UwCX*N?+us*vg zM(v>FK?--t3EQ+R^NAmw42}LaNy0u<%a5HH8v7oZx4Txy(rndFV0vf*1(E`b0ru+C zj%lk+Kb4uGsk}pkeZ6a0LHyaF@nIW>s?vM{;oUF5+^__e{yjk^Ju}Mj0EuC3cJ*e| z8Aezk3z(~967&J(v1w34OsuA(=u|nJ_^rDAt&;L>4`);J0x^+bR~S z6^Mv(PO9%pQW=H9XbCcwE8CJ>FIJP2DC15QLaAJWpHuj=RN3V}2}ahf%1(Wg3Y<(p zTuZRulpn;KKnVQg!AN#D=8kP%#Of4vE*qXP0o6_VGv8GP(~tKlk2tY24?Fs zsC|y-TRuyZHMdK-x>GHdlIJj4do1|kD~P{dsY#nswjgiNTwcm1&tpc-Lw1!n%GvrR za!MnAxSh|IY(gRqu5pRR1H4`W&*EfZTWP7R4fct3os20>sE+A*4ww1?#fITWiwZp)$_+BnR-1UV)Fg&Ox=AKs zc%ajQ2CJgsu-+h}meM#HzLXIal0bKXuBQe^CM-kKpc(Ruy^BIZd*MQ|x-rxbcgPg& zhNm-iyPW+h0yl4fK=L6-PwIY6K}oy0gOHpo0qo4hd* z$6Fz5S?94S zd+G>l7?L2NfE$2J4Hgid)0O#M2JF)dXH1!KWFq9qiJpSx4pkPfEB7u(*-yW6-y z82bhxE+H2GUXP*!M%)|xaUE`wg}~&)C57EoV)aTCsgP3ysrrtAZx5T0#A>8eAtx*T zDMl8!=c@EfYU+=>Fs2i(k}(ZiZ0>UBqU57U!gVs)V#5*~b)e6mk3w*VDv(ns1MCfP zJ2W~!C#O(G++xHvvPggTf{trTP$Kk(0#FikFwYs?_P%P-q%kIbIYCbLZ5eWkVXMNs z(2+xf?;B;guK8-@Zh`}Wb+X{Ly#XprC(BV(1`3@VN$Tc-8KA*h{NZWj$q8NAhsdq4 zYY80Nf(PK?3{Pa2oTWt;-dM;cEi3}`7Ad{!Q5%b{NnnT6i2cHi9aFdhS!i`(deKKH z#rz=h%+L>dh9i{7q7CHeZ;tg%&j>a)z08uZr`N#OX(3H97)OtM=tU z@O57p>nRID>2rPEi)6lyg2x3SP-=$Kh^$Nfp$E0p7Yg0cCJr5*qoqJBtg&&Z0Ck88 z6C8_{N{Lmk4uQ$-3LE$f_xR8bBEw0_VI}Gu!XttBRg5g<6sK{>Rlwq#?FP6!nY37} zbDcc$paTRres1KS**J9M;}Cmsu!vRSl&}pw3HqF!Vz&HFl+4kBLH~pVAS75v$RxIO z4U0r?O@IjZk;+DmI3e)&Qfu+IVxmmWgi`l{+!UM~4S4RxuSH4Ow{eCg{xwGC-7k3i z;cD~;WLh&iU58Ek+~)9N6!9X$LfCF;2j6x6K(%3FVDWHF{EIIOvK?_{y~LK@B|bf~ z_V`EqQjI8?gJxf+6IP`^}!Ui?u$p zzZ-Stkz&2H)&Ho^+4-LNIo|Uh25U-Q==*E*m3$Cpr@>fL7>qTM^>K(2*hz_paO>$ykhciITTgy#$y_UPtg_Lt`DLl^<`X0J zG+yqt;nrNH_t|LsQ_%BI`@I|ruQ_A|vs4GhJ9Om3_(c}fzz-fAxzIRF-N(91wxMg_ zO;?Ic^`!FmXyQ3C+lL?c{7Iag@SdHxud(3nbPO-}-7ERXd(Qz(T3xC_h9nvmG_0Tq z&;}H1m`j&jn}R}@J}_AEo~$53w*wEsI09?hpMxO2PsXs2RdLw9UC-A0FZUBh9s*6cSn__w@mIC7yGERiRPH7+zBE5YO)>X=I ziVVaV@mB*nc_s=deGALIfJSbMtKr)UYGe@cb@A13#AkzCg#WlTQedAfi3_)*j(sqr z1k(PJH+k~C4O;R1TKqcpdG^*2nQt(Ne34zWcmsGfP!m!6`fW@+hg;Wh2nO23+Apv# zw6vUfH(WhIy*`)5o8t9w8a<1PFnPEHN#j#=QF!z-KH6dn4#NY`J2u5Z3L0fwnM z=)Av)iDz-s+~C6Y_b4mA9j=$4Zl6cumiR_E3D0`NI4?c^JbRKq!DBDI;Psuo0?&;9 zmi^(O<8Ai7Y&46^EXU3qjf5-jff3eu_;-ee+2j%^7n(b~}_MR|a aWiNhx4}>w*YK@S`!4#4`;(bP*5%PcFh>Pa{ diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php deleted file mode 100644 index 802d4d50d763..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearch.php +++ /dev/null @@ -1,55 +0,0 @@ -internalAddGeneratedFile( - ' -‡ -+google/cloud/vision/v1/product_search.protogoogle.cloud.vision.v1%google/cloud/vision/v1/geometry.proto3google/cloud/vision/v1/product_search_service.protogoogle/protobuf/timestamp.proto"º -ProductSearchParams; - bounding_poly ( 2$.google.cloud.vision.v1.BoundingPoly: - product_set ( B%úA" - vision.googleapis.com/ProductSet -product_categories (  -filter ( "ˆ -ProductSearchResults. - -index_time ( 2.google.protobuf.TimestampD -results ( 23.google.cloud.vision.v1.ProductSearchResults.Result[ -product_grouped_results ( 2:.google.cloud.vision.v1.ProductSearchResults.GroupedResultX -Result0 -product ( 2.google.cloud.vision.v1.Product -score ( -image ( S -ObjectAnnotation -mid (  - language_code (  -name (  -score (í - GroupedResult; - bounding_poly ( 2$.google.cloud.vision.v1.BoundingPolyD -results ( 23.google.cloud.vision.v1.ProductSearchResults.ResultY -object_annotations ( 2=.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotationBs -com.google.cloud.vision.v1BProductSearchProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpbø¢GCVNbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php b/owl-bot-staging/Vision/V1/proto/src/GPBMetadata/Google/Cloud/Vision/V1/ProductSearchService.php deleted file mode 100644 index a2052af7103dc35ac3fb825fb164097d7ea0c35b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9855 zcmc&)&2QXV6|a+~FTF|I^fpb>l&Y@V*O!KLhE85Tn7n>ClaGd%CTWruJvw6K%-l@; zIbeA2Emh9WCIIUUB3k&@p0~#$M%dHPg)?G zc5)=iGaa{oZY7!$IfOSz-~_@JU5o+gAMzqB^ea+hx0^uGQDqiK~|FO~0Xki|WGSsyaP2w|WkSdUo9{le}8B?P`r=%Qd@R$!?jRX$$P{%Du!~67B^L?8mQpgV4C8bEZFdPo^Z6?A1EbPABbUUo zbUJfg9pO6W^G!WPO)$Ob1Utc1v4!Du$1LiWWm7BImY2^rFg2z~ z8d#{A#PZu4Gh>okWs+%kK!q*DhMOQ&I_?xgB4jjV1*DmErc8q_*p{zE*{F<7d+&e zZi07(goF`D_|kK=cf{k#Lc1&*gV6!)ToG+_=YsxopI_oLp5={YrH zyTtBxu)8NvPer66AoWluyLkrn!OAQTmm$knZFhUd6gD;Gh7@^O+#zsKq+*80z7Ji0j%evt>^X%TeIO3=cLYo!@w=6QsTp zHPu#c6F7`%V27O*@c&CeN0$j~*aUX4xlN-=Vx;Lqopsmb-k{2LU>zM@v+Gs`l3~fQ zYug^!fI9zzL=%hE%%qTB0%1CZlK)6~sefHT7g{5X=~FDW3A2H5C+kMA!IR)d$)sp^ zv>z&{zu*#Jx!}Pv`BELSCH^cr90(_Zub^(Bqz8tfj^7I$9z@41^3*Sd)?m@C-9^V|iNq$Mjfa!g8fjX8UtoTw zpuq?wA#kO2UW1kIp&m&uh~D20@>pfe=qX{C~*N8X9a`ThR0d z>J5RFR84_4nXL<`zrj`jDqV6dLf8>TSZ(k0t$hS;j*vDqXUtceyD7BaCw=du!3cdr zn(PWk?unVk|oZlOqv^vq6y+Cwx1gpV3Rx-TCg{TL(t#dJHm_5nK0 z+4knA{+5EyKrJG+%T-%kygr}twdkIHIPK2#T?J{&WYgY~ThokdZ~p()`ig?ihH|Gj zXT3R{T5zn@3By8avIhT!(?$*r&uu!kD-Rq%3U9XTt+0L+t&YmxR%soI*AhMPvYJVA z(Wjcm%vny|FWA<)S;cn|s+PSHZ%ME*J-J*`CTf}~SpDvS$!>Ir&!YWAK|@WVGVWeu z|6fGCCRM#uX1a^K`EF`$L%3NM)xM^nQ!NyIW4Y=A>gJ^_@jzL6)ND~PY2WWa1Cxed z-UvD~vM-1WsEba(3*e)A0n3X)F9Wm%a(oyuUFT>T8S!{S2DN^5LUB{-uJBg;FaOz?mdSF+qta(F9HMJl?fC zySgZt8HOvkT@3g~3OW)wVdJqRr6Xceh~5so^kR|*EO zkoyg|KN3jE?vIG2*6z`+enLdrSUk#Z=iUuRS(*r=N;e4bZO}dvFv;3S#H98~K@~OW zD0g*Qlm0zudPYkyJf7rq9#~Onsbb376V8jf`Xv!(u58TmKI~ZRx7-QuYq$1}JDH=Y z;o}|Oe7s$Ne*xIJrK4z)vA2?z*pu9IFU;;ywJyARm&$7*mU1yugJ#2jRi)~3GLe6i91@tn5;P? z{COl&hbHft5wVnTpT5wcG#0O_qi0o|h%{W=T-S1Kfb;UKUIt*pTQBsJEnj;6QGc}I z`;M2-W}iHHBD@v6STySX2LDj%GQ7U`p|sr`ODE13n|y|b;f=W@LG0u?d1{H55Rnh0 z;GSnMbVIXhcI|vuWUZG}H)bbxEh&Cwl9oe;-pLHVbW9BV)$K9m#WH*%R@xj3kB`kD_--)G$9xTHy70N)W*afW(+0b}wK^|A-_-8A1_MV{qbg8v3R;Xwk?H-GH;uz|dN4O!-nru~L4p z*jB)~BT|lQtkvEq@`&(oMz8NqNJ#lC^bcj-0^oA_H28PP2FH|5DG%qh+7-DgEXnQB zQ+L6n?l{ZBzrrq;ms^RA_u;n!JiJYN)equmO`1WA&7fTzlzvP@VYP|sr;rKEF^zT< zvQf@gKh)lysu>uhZb4f3X(vULa&GqsiY>~ijkax@{&*%L-iK{(@jSGdLlG83RTVA7 z{E_QWY_m*H?f$92c9P!+srgcEBm6vwa|+d`>q=Q=psiqN5~+_U>bsCbGX^0Yxv%Ax znEdiw-rC$_C%MR}G5ck-la{XgXx$zS5p}~o8H7lc{z^e6e)~U_T!Sr(&3wo8$3u(7j>%W|)>gKN zHJCS7p8y1AXpTcOm_*1?d`b7$Wg1DOipP_bVJKanMqY*LV1HenWUI;l(%-A!RIEx5 z4K5^;0V@XIgmhp3rjPzctM}`Twq8uB7-5_=`{?%KhFI^Nwe=oa8rK{3UbEZMi<#0N z3goV8z5{CGk@bp&P9pT$BkKhQ-SCdkI92)`-7a6=0WuZ17tN;@^Ab8Auj~J*40|h~ zpB2b1Uf%&q$&?V^`pu(XHlV>_7cVqxh&J9^J>ccwHinternalAddGeneratedFile( - ' -— -*google/cloud/vision/v1/web_detection.protogoogle.cloud.vision.v1"Ô - WebDetectionD - web_entities ( 2..google.cloud.vision.v1.WebDetection.WebEntityK -full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN -partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageP -pages_with_matching_images ( 2,.google.cloud.vision.v1.WebDetection.WebPageN -visually_similar_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageH -best_guess_labels ( 2-.google.cloud.vision.v1.WebDetection.WebLabelB - WebEntity - entity_id (  -score ( - description ( & -WebImage -url (  -score (Ö -WebPage -url (  -score ( - -page_title ( K -full_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImageN -partial_matching_images ( 2-.google.cloud.vision.v1.WebDetection.WebImage0 -WebLabel -label (  - language_code ( Br -com.google.cloud.vision.v1BWebDetectionProtoPZ5cloud.google.com/go/vision/v2/apiv1/visionpb;visionpbø¢GCVNbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php deleted file mode 100644 index 576f4d539fe8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AddProductToProductSetRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vision.v1.AddProductToProductSetRequest - */ -class AddProductToProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $product = ''; - - /** - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * @param string $product Required. The resource name for the Product to be added to this ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\AddProductToProductSetRequest - * - * @experimental - */ - public static function build(string $name, string $product): self - { - return (new self()) - ->setName($name) - ->setProduct($product); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @type string $product - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProduct() - { - return $this->product; - } - - /** - * Required. The resource name for the Product to be added to this ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkString($var, True); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php deleted file mode 100644 index 99467c0d102c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.vision.v1.AnnotateFileRequest - */ -class AnnotateFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - */ - protected $input_config = null; - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - */ - private $features; - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - */ - protected $image_context = null; - /** - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * - * Generated from protobuf field repeated int32 pages = 4; - */ - private $pages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\InputConfig $input_config - * Required. Information about the input file. - * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Required. Requested features. - * @type \Google\Cloud\Vision\V1\ImageContext $image_context - * Additional context that may accompany the image(s) in the file. - * @type array|\Google\Protobuf\Internal\RepeatedField $pages - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @return \Google\Cloud\Vision\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @param \Google\Cloud\Vision\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @return \Google\Cloud\Vision\V1\ImageContext|null - */ - public function getImageContext() - { - return $this->image_context; - } - - public function hasImageContext() - { - return isset($this->image_context); - } - - public function clearImageContext() - { - unset($this->image_context); - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @param \Google\Cloud\Vision\V1\ImageContext $var - * @return $this - */ - public function setImageContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); - $this->image_context = $var; - - return $this; - } - - /** - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * - * Generated from protobuf field repeated int32 pages = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPages() - { - return $this->pages; - } - - /** - * Pages of the file to perform image annotation. - * Pages starts from 1, we assume the first page of the file is page 1. - * At most 5 pages are supported per request. Pages can be negative. - * Page 1 means the first page. - * Page 2 means the second page. - * Page -1 means the last page. - * Page -2 means the second to the last page. - * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. - * If this field is empty, by default the service performs image annotation - * for the first 5 pages of the file. - * - * Generated from protobuf field repeated int32 pages = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->pages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php deleted file mode 100644 index 92682231fc13..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateFileResponse.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.vision.v1.AnnotateFileResponse - */ -class AnnotateFileResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Information about the file for which this response is generated. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - */ - protected $input_config = null; - /** - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - */ - private $responses; - /** - * This field gives the total number of pages in the file. - * - * Generated from protobuf field int32 total_pages = 3; - */ - protected $total_pages = 0; - /** - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * Generated from protobuf field .google.rpc.Status error = 4; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\InputConfig $input_config - * Information about the file for which this response is generated. - * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * @type int $total_pages - * This field gives the total number of pages in the file. - * @type \Google\Rpc\Status $error - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Information about the file for which this response is generated. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @return \Google\Cloud\Vision\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Information about the file for which this response is generated. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @param \Google\Cloud\Vision\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * Individual responses to images found within the file. This field will be - * empty if the `error` field is set. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); - $this->responses = $arr; - - return $this; - } - - /** - * This field gives the total number of pages in the file. - * - * Generated from protobuf field int32 total_pages = 3; - * @return int - */ - public function getTotalPages() - { - return $this->total_pages; - } - - /** - * This field gives the total number of pages in the file. - * - * Generated from protobuf field int32 total_pages = 3; - * @param int $var - * @return $this - */ - public function setTotalPages($var) - { - GPBUtil::checkInt32($var); - $this->total_pages = $var; - - return $this; - } - - /** - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * If set, represents the error message for the failed request. The - * `responses` field will not be set in this case. - * - * 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->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php deleted file mode 100644 index 87da32a59c91..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.vision.v1.AnnotateImageRequest - */ -class AnnotateImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The image to be processed. - * - * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; - */ - protected $image = null; - /** - * Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - */ - private $features; - /** - * Additional context that may accompany the image. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - */ - protected $image_context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\Image $image - * The image to be processed. - * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Requested features. - * @type \Google\Cloud\Vision\V1\ImageContext $image_context - * Additional context that may accompany the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The image to be processed. - * - * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; - * @return \Google\Cloud\Vision\V1\Image|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * The image to be processed. - * - * Generated from protobuf field .google.cloud.vision.v1.Image image = 1; - * @param \Google\Cloud\Vision\V1\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Image::class); - $this->image = $var; - - return $this; - } - - /** - * Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional context that may accompany the image. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @return \Google\Cloud\Vision\V1\ImageContext|null - */ - public function getImageContext() - { - return $this->image_context; - } - - public function hasImageContext() - { - return isset($this->image_context); - } - - public function clearImageContext() - { - unset($this->image_context); - } - - /** - * Additional context that may accompany the image. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @param \Google\Cloud\Vision\V1\ImageContext $var - * @return $this - */ - public function setImageContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); - $this->image_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php deleted file mode 100644 index 5da367298068..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AnnotateImageResponse.php +++ /dev/null @@ -1,617 +0,0 @@ -google.cloud.vision.v1.AnnotateImageResponse - */ -class AnnotateImageResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If present, face detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - */ - private $face_annotations; - /** - * If present, landmark detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - */ - private $landmark_annotations; - /** - * If present, logo detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - */ - private $logo_annotations; - /** - * If present, label detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - */ - private $label_annotations; - /** - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - */ - private $localized_object_annotations; - /** - * If present, text (OCR) detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - */ - private $text_annotations; - /** - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - */ - protected $full_text_annotation = null; - /** - * If present, safe-search annotation has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - */ - protected $safe_search_annotation = null; - /** - * If present, image properties were extracted successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - */ - protected $image_properties_annotation = null; - /** - * If present, crop hints have completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - */ - protected $crop_hints_annotation = null; - /** - * If present, web detection has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; - */ - protected $web_detection = null; - /** - * If present, product search has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - */ - protected $product_search_results = null; - /** - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * - * Generated from protobuf field .google.rpc.Status error = 9; - */ - protected $error = null; - /** - * If present, contextual information is needed to understand where this image - * comes from. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $face_annotations - * If present, face detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $landmark_annotations - * If present, landmark detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $logo_annotations - * If present, logo detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $label_annotations - * If present, label detection has completed successfully. - * @type array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $localized_object_annotations - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * @type array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $text_annotations - * If present, text (OCR) detection has completed successfully. - * @type \Google\Cloud\Vision\V1\TextAnnotation $full_text_annotation - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * @type \Google\Cloud\Vision\V1\SafeSearchAnnotation $safe_search_annotation - * If present, safe-search annotation has completed successfully. - * @type \Google\Cloud\Vision\V1\ImageProperties $image_properties_annotation - * If present, image properties were extracted successfully. - * @type \Google\Cloud\Vision\V1\CropHintsAnnotation $crop_hints_annotation - * If present, crop hints have completed successfully. - * @type \Google\Cloud\Vision\V1\WebDetection $web_detection - * If present, web detection has completed successfully. - * @type \Google\Cloud\Vision\V1\ProductSearchResults $product_search_results - * If present, product search has completed successfully. - * @type \Google\Rpc\Status $error - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * @type \Google\Cloud\Vision\V1\ImageAnnotationContext $context - * If present, contextual information is needed to understand where this image - * comes from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * If present, face detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFaceAnnotations() - { - return $this->face_annotations; - } - - /** - * If present, face detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1; - * @param array<\Google\Cloud\Vision\V1\FaceAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFaceAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation::class); - $this->face_annotations = $arr; - - return $this; - } - - /** - * If present, landmark detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLandmarkAnnotations() - { - return $this->landmark_annotations; - } - - /** - * If present, landmark detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLandmarkAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->landmark_annotations = $arr; - - return $this; - } - - /** - * If present, logo detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLogoAnnotations() - { - return $this->logo_annotations; - } - - /** - * If present, logo detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLogoAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->logo_annotations = $arr; - - return $this; - } - - /** - * If present, label detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabelAnnotations() - { - return $this->label_annotations; - } - - /** - * If present, label detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabelAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->label_annotations = $arr; - - return $this; - } - - /** - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocalizedObjectAnnotations() - { - return $this->localized_object_annotations; - } - - /** - * If present, localized object detection has completed successfully. - * This will be sorted descending by confidence score. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22; - * @param array<\Google\Cloud\Vision\V1\LocalizedObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocalizedObjectAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocalizedObjectAnnotation::class); - $this->localized_object_annotations = $arr; - - return $this; - } - - /** - * If present, text (OCR) detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTextAnnotations() - { - return $this->text_annotations; - } - - /** - * If present, text (OCR) detection has completed successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5; - * @param array<\Google\Cloud\Vision\V1\EntityAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTextAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\EntityAnnotation::class); - $this->text_annotations = $arr; - - return $this; - } - - /** - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @return \Google\Cloud\Vision\V1\TextAnnotation|null - */ - public function getFullTextAnnotation() - { - return $this->full_text_annotation; - } - - public function hasFullTextAnnotation() - { - return isset($this->full_text_annotation); - } - - public function clearFullTextAnnotation() - { - unset($this->full_text_annotation); - } - - /** - * If present, text (OCR) detection or document (OCR) text detection has - * completed successfully. - * This annotation provides the structural hierarchy for the OCR detected - * text. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation full_text_annotation = 12; - * @param \Google\Cloud\Vision\V1\TextAnnotation $var - * @return $this - */ - public function setFullTextAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation::class); - $this->full_text_annotation = $var; - - return $this; - } - - /** - * If present, safe-search annotation has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @return \Google\Cloud\Vision\V1\SafeSearchAnnotation|null - */ - public function getSafeSearchAnnotation() - { - return $this->safe_search_annotation; - } - - public function hasSafeSearchAnnotation() - { - return isset($this->safe_search_annotation); - } - - public function clearSafeSearchAnnotation() - { - unset($this->safe_search_annotation); - } - - /** - * If present, safe-search annotation has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6; - * @param \Google\Cloud\Vision\V1\SafeSearchAnnotation $var - * @return $this - */ - public function setSafeSearchAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\SafeSearchAnnotation::class); - $this->safe_search_annotation = $var; - - return $this; - } - - /** - * If present, image properties were extracted successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @return \Google\Cloud\Vision\V1\ImageProperties|null - */ - public function getImagePropertiesAnnotation() - { - return $this->image_properties_annotation; - } - - public function hasImagePropertiesAnnotation() - { - return isset($this->image_properties_annotation); - } - - public function clearImagePropertiesAnnotation() - { - unset($this->image_properties_annotation); - } - - /** - * If present, image properties were extracted successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8; - * @param \Google\Cloud\Vision\V1\ImageProperties $var - * @return $this - */ - public function setImagePropertiesAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageProperties::class); - $this->image_properties_annotation = $var; - - return $this; - } - - /** - * If present, crop hints have completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @return \Google\Cloud\Vision\V1\CropHintsAnnotation|null - */ - public function getCropHintsAnnotation() - { - return $this->crop_hints_annotation; - } - - public function hasCropHintsAnnotation() - { - return isset($this->crop_hints_annotation); - } - - public function clearCropHintsAnnotation() - { - unset($this->crop_hints_annotation); - } - - /** - * If present, crop hints have completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11; - * @param \Google\Cloud\Vision\V1\CropHintsAnnotation $var - * @return $this - */ - public function setCropHintsAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsAnnotation::class); - $this->crop_hints_annotation = $var; - - return $this; - } - - /** - * If present, web detection has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; - * @return \Google\Cloud\Vision\V1\WebDetection|null - */ - public function getWebDetection() - { - return $this->web_detection; - } - - public function hasWebDetection() - { - return isset($this->web_detection); - } - - public function clearWebDetection() - { - unset($this->web_detection); - } - - /** - * If present, web detection has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetection web_detection = 13; - * @param \Google\Cloud\Vision\V1\WebDetection $var - * @return $this - */ - public function setWebDetection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetection::class); - $this->web_detection = $var; - - return $this; - } - - /** - * If present, product search has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @return \Google\Cloud\Vision\V1\ProductSearchResults|null - */ - public function getProductSearchResults() - { - return $this->product_search_results; - } - - public function hasProductSearchResults() - { - return isset($this->product_search_results); - } - - public function clearProductSearchResults() - { - unset($this->product_search_results); - } - - /** - * If present, product search has completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchResults product_search_results = 14; - * @param \Google\Cloud\Vision\V1\ProductSearchResults $var - * @return $this - */ - public function setProductSearchResults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchResults::class); - $this->product_search_results = $var; - - return $this; - } - - /** - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * - * Generated from protobuf field .google.rpc.Status error = 9; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * If set, represents the error message for the operation. - * Note that filled-in image annotations are guaranteed to be - * correct, even when `error` is set. - * - * Generated from protobuf field .google.rpc.Status error = 9; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * If present, contextual information is needed to understand where this image - * comes from. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @return \Google\Cloud\Vision\V1\ImageAnnotationContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * If present, contextual information is needed to understand where this image - * comes from. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageAnnotationContext context = 21; - * @param \Google\Cloud\Vision\V1\ImageAnnotationContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageAnnotationContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php deleted file mode 100644 index c1ebfd6cc6dc..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.vision.v1.AsyncAnnotateFileRequest - */ -class AsyncAnnotateFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - */ - protected $input_config = null; - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - */ - private $features; - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - */ - protected $image_context = null; - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\InputConfig $input_config - * Required. Information about the input file. - * @type array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $features - * Required. Requested features. - * @type \Google\Cloud\Vision\V1\ImageContext $image_context - * Additional context that may accompany the image(s) in the file. - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * Required. The desired output location and metadata (e.g. format). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @return \Google\Cloud\Vision\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input file. - * - * Generated from protobuf field .google.cloud.vision.v1.InputConfig input_config = 1; - * @param \Google\Cloud\Vision\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFeatures() - { - return $this->features; - } - - /** - * Required. Requested features. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Feature features = 2; - * @param array<\Google\Cloud\Vision\V1\Feature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Feature::class); - $this->features = $arr; - - return $this; - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @return \Google\Cloud\Vision\V1\ImageContext|null - */ - public function getImageContext() - { - return $this->image_context; - } - - public function hasImageContext() - { - return isset($this->image_context); - } - - public function clearImageContext() - { - unset($this->image_context); - } - - /** - * Additional context that may accompany the image(s) in the file. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageContext image_context = 3; - * @param \Google\Cloud\Vision\V1\ImageContext $var - * @return $this - */ - public function setImageContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageContext::class); - $this->image_context = $var; - - return $this; - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 4; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php deleted file mode 100644 index 1dbad5e843de..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncAnnotateFileResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.AsyncAnnotateFileResponse - */ -class AsyncAnnotateFileResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The output location and metadata from AsyncAnnotateFileRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * The output location and metadata from AsyncAnnotateFileRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The output location and metadata from AsyncAnnotateFileRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * The output location and metadata from AsyncAnnotateFileRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php deleted file mode 100644 index c67b7e2781f6..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest - */ -class AsyncBatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Individual async file annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * @param \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. - * - * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesRequest - * - * @experimental - */ - public static function build(array $requests): self - { - return (new self()) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. Individual async file annotation requests for this batch. - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Individual async file annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. Individual async file annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.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; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php deleted file mode 100644 index 475b70528eef..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateFilesResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse - */ -class AsyncBatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * The list of file annotation responses, one for each request in - * AsyncBatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AsyncAnnotateFileResponse responses = 1; - * @param array<\Google\Cloud\Vision\V1\AsyncAnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AsyncAnnotateFileResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php deleted file mode 100644 index e94ee1855b9d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest - */ -class AsyncBatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * @param \Google\Cloud\Vision\V1\OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). - * - * @return \Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesRequest - * - * @experimental - */ - public static function build(array $requests, \Google\Cloud\Vision\V1\OutputConfig $outputConfig): self - { - return (new self()) - ->setRequests($requests) - ->setOutputConfig($outputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. Individual image annotation requests for this batch. - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * Required. The desired output location and metadata (e.g. format). - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location and metadata (e.g. format). - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.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; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php deleted file mode 100644 index 6a424d1a37ce..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/AsyncBatchAnnotateImagesResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse - */ -class AsyncBatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\OutputConfig $output_config - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @return \Google\Cloud\Vision\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * The output location and metadata from AsyncBatchAnnotateImagesRequest. - * - * Generated from protobuf field .google.cloud.vision.v1.OutputConfig output_config = 1; - * @param \Google\Cloud\Vision\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php deleted file mode 100644 index 320d89e0dcab..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateFilesRequest - */ -class BatchAnnotateFilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The list of file annotation requests. Right now we support only - * one AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 3; - */ - protected $parent = ''; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * @param \Google\Cloud\Vision\V1\AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only - * one AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesRequest - * - * @experimental - */ - public static function build(array $requests): self - { - return (new self()) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The list of file annotation requests. Right now we support only - * one AnnotateFileRequest in BatchAnnotateFilesRequest. - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. The list of file annotation requests. Right now we support only - * one AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The list of file annotation requests. Right now we support only - * one AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AnnotateFileRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 3; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 3; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.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; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php deleted file mode 100644 index 2a6384a5d6a3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateFilesResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateFilesResponse - */ -class BatchAnnotateFilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * The list of file annotation responses, each response corresponding to each - * AnnotateFileRequest in BatchAnnotateFilesRequest. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateFileResponse responses = 1; - * @param array<\Google\Cloud\Vision\V1\AnnotateFileResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateFileResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php deleted file mode 100644 index 33b0dd8968cc..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateImagesRequest - */ -class BatchAnnotateImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * @param \Google\Cloud\Vision\V1\AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesRequest - * - * @experimental - */ - public static function build(array $requests): self - { - return (new self()) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. Individual image annotation requests for this batch. - * @type string $parent - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. Individual image annotation requests for this batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageRequest requests = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Optional. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no parent is specified, a region will be chosen automatically. - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * Example: `projects/project-A/locations/eu`. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels with user-defined metadata for the request. - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * - * Generated from protobuf field map labels = 5 [(.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; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php deleted file mode 100644 index 94a35240ca6f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchAnnotateImagesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.BatchAnnotateImagesResponse - */ -class BatchAnnotateImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Individual responses to image annotation requests within the batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - */ - private $responses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $responses - * Individual responses to image annotation requests within the batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Individual responses to image annotation requests within the batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResponses() - { - return $this->responses; - } - - /** - * Individual responses to image annotation requests within the batch. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 1; - * @param array<\Google\Cloud\Vision\V1\AnnotateImageResponse>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResponses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\AnnotateImageResponse::class); - $this->responses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php deleted file mode 100644 index e9dd818df673..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.vision.v1.BatchOperationMetadata - */ -class BatchOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * The time when the batch request was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - */ - protected $submit_time = null; - /** - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * 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 $state - * The current state of the batch operation. - * @type \Google\Protobuf\Timestamp $submit_time - * The time when the batch request was submitted to the server. - * @type \Google\Protobuf\Timestamp $end_time - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.BatchOperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\BatchOperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the batch request was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSubmitTime() - { - return $this->submit_time; - } - - public function hasSubmitTime() - { - return isset($this->submit_time); - } - - public function clearSubmitTime() - { - unset($this->submit_time); - } - - /** - * The time when the batch request was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp submit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSubmitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->submit_time = $var; - - return $this; - } - - /** - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time when the batch request is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is - * set to true. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php deleted file mode 100644 index cba5eccd4849..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BatchOperationMetadata/State.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vision.v1.BatchOperationMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is actively being processed. - * - * Generated from protobuf enum PROCESSING = 1; - */ - const PROCESSING = 1; - /** - * The request is done and at least one item has been successfully - * processed. - * - * Generated from protobuf enum SUCCESSFUL = 2; - */ - const SUCCESSFUL = 2; - /** - * The request is done and no item has been successfully processed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The request is done after the longrunning.Operations.CancelOperation has - * been called by the user. Any records that were processed before the - * cancel command are output as specified in the request. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROCESSING => 'PROCESSING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Vision\V1\BatchOperationMetadata_State::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php deleted file mode 100644 index d53227721f64..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.vision.v1.Block - */ -class Block extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the block. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * List of paragraphs in this block (if this blocks is of type text). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - */ - private $paragraphs; - /** - * Detected block type (text, image etc) for this block. - * - * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; - */ - protected $block_type = 0; - /** - * Confidence of the OCR results on the block. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the block. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $paragraphs - * List of paragraphs in this block (if this blocks is of type text). - * @type int $block_type - * Detected block type (text, image etc) for this block. - * @type float $confidence - * Confidence of the OCR results on the block. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the block. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the block. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the block. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * List of paragraphs in this block (if this blocks is of type text). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParagraphs() - { - return $this->paragraphs; - } - - /** - * List of paragraphs in this block (if this blocks is of type text). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Paragraph paragraphs = 3; - * @param array<\Google\Cloud\Vision\V1\Paragraph>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParagraphs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Paragraph::class); - $this->paragraphs = $arr; - - return $this; - } - - /** - * Detected block type (text, image etc) for this block. - * - * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @return int - */ - public function getBlockType() - { - return $this->block_type; - } - - /** - * Detected block type (text, image etc) for this block. - * - * Generated from protobuf field .google.cloud.vision.v1.Block.BlockType block_type = 4; - * @param int $var - * @return $this - */ - public function setBlockType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Block\BlockType::class); - $this->block_type = $var; - - return $this; - } - - /** - * Confidence of the OCR results on the block. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results on the block. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php deleted file mode 100644 index eefde91942e3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Block/BlockType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.vision.v1.Block.BlockType - */ -class BlockType -{ - /** - * Unknown block type. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Regular text block. - * - * Generated from protobuf enum TEXT = 1; - */ - const TEXT = 1; - /** - * Table block. - * - * Generated from protobuf enum TABLE = 2; - */ - const TABLE = 2; - /** - * Image block. - * - * Generated from protobuf enum PICTURE = 3; - */ - const PICTURE = 3; - /** - * Horizontal/vertical line box. - * - * Generated from protobuf enum RULER = 4; - */ - const RULER = 4; - /** - * Barcode block. - * - * Generated from protobuf enum BARCODE = 5; - */ - const BARCODE = 5; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::TEXT => 'TEXT', - self::TABLE => 'TABLE', - self::PICTURE => 'PICTURE', - self::RULER => 'RULER', - self::BARCODE => 'BARCODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BlockType::class, \Google\Cloud\Vision\V1\Block_BlockType::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php deleted file mode 100644 index 7bc296abfa82..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/BoundingPoly.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vision.v1.BoundingPoly - */ -class BoundingPoly extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; - */ - private $vertices; - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - */ - private $normalized_vertices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $vertices - * The bounding polygon vertices. - * @type array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $normalized_vertices - * The bounding polygon normalized vertices. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVertices() - { - return $this->vertices; - } - - /** - * The bounding polygon vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Vertex vertices = 1; - * @param array<\Google\Cloud\Vision\V1\Vertex>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Vertex::class); - $this->vertices = $arr; - - return $this; - } - - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNormalizedVertices() - { - return $this->normalized_vertices; - } - - /** - * The bounding polygon normalized vertices. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.NormalizedVertex normalized_vertices = 2; - * @param array<\Google\Cloud\Vision\V1\NormalizedVertex>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNormalizedVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\NormalizedVertex::class); - $this->normalized_vertices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php deleted file mode 100644 index 545a5de76ace..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ColorInfo.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.vision.v1.ColorInfo - */ -class ColorInfo extends \Google\Protobuf\Internal\Message -{ - /** - * RGB components of the color. - * - * Generated from protobuf field .google.type.Color color = 1; - */ - protected $color = null; - /** - * Image-specific score for this color. Value in range [0, 1]. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * - * Generated from protobuf field float pixel_fraction = 3; - */ - protected $pixel_fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Color $color - * RGB components of the color. - * @type float $score - * Image-specific score for this color. Value in range [0, 1]. - * @type float $pixel_fraction - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * RGB components of the color. - * - * Generated from protobuf field .google.type.Color color = 1; - * @return \Google\Type\Color|null - */ - public function getColor() - { - return $this->color; - } - - public function hasColor() - { - return isset($this->color); - } - - public function clearColor() - { - unset($this->color); - } - - /** - * RGB components of the color. - * - * Generated from protobuf field .google.type.Color color = 1; - * @param \Google\Type\Color $var - * @return $this - */ - public function setColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->color = $var; - - return $this; - } - - /** - * Image-specific score for this color. Value in range [0, 1]. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Image-specific score for this color. Value in range [0, 1]. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * - * Generated from protobuf field float pixel_fraction = 3; - * @return float - */ - public function getPixelFraction() - { - return $this->pixel_fraction; - } - - /** - * The fraction of pixels the color occupies in the image. - * Value in range [0, 1]. - * - * Generated from protobuf field float pixel_fraction = 3; - * @param float $var - * @return $this - */ - public function setPixelFraction($var) - { - GPBUtil::checkFloat($var); - $this->pixel_fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php deleted file mode 100644 index fbb905a23ca3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.vision.v1.CreateProductRequest - */ -class CreateProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The product to create. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product = null; - /** - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_id = 3; - */ - protected $product_id = ''; - - /** - * @param string $parent Required. The project in which the Product should be created. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\Product $product Required. The product to create. - * @param string $productId A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * @return \Google\Cloud\Vision\V1\CreateProductRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\Product $product, string $productId): self - { - return (new self()) - ->setParent($parent) - ->setProduct($product) - ->setProductId($productId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * @type \Google\Cloud\Vision\V1\Product $product - * Required. The product to create. - * @type string $product_id - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_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 in which the Product should be created. - * Format is - * `projects/PROJECT_ID/locations/LOC_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 product to create. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Required. The product to create. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_id = 3; - * @return string - */ - public function getProductId() - { - return $this->product_id; - } - - /** - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_id = 3; - * @param string $var - * @return $this - */ - public function setProductId($var) - { - GPBUtil::checkString($var, True); - $this->product_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php deleted file mode 100644 index 06f5ef2cf0cb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateProductSetRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.vision.v1.CreateProductSetRequest - */ -class CreateProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ProductSet to create. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product_set = null; - /** - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_set_id = 3; - */ - protected $product_set_id = ''; - - /** - * @param string $parent Required. The project in which the ProductSet should be created. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet to create. - * @param string $productSetId A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * @return \Google\Cloud\Vision\V1\CreateProductSetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\ProductSet $productSet, string $productSetId): self - { - return (new self()) - ->setParent($parent) - ->setProductSet($productSet) - ->setProductSetId($productSetId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type \Google\Cloud\Vision\V1\ProductSet $product_set - * Required. The ProductSet to create. - * @type string $product_set_id - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_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 in which the ProductSet should be created. - * Format is `projects/PROJECT_ID/locations/LOC_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 ProductSet to create. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ProductSet|null - */ - public function getProductSet() - { - return $this->product_set; - } - - public function hasProductSet() - { - return isset($this->product_set); - } - - public function clearProductSet() - { - unset($this->product_set); - } - - /** - * Required. The ProductSet to create. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ProductSet $var - * @return $this - */ - public function setProductSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); - $this->product_set = $var; - - return $this; - } - - /** - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_set_id = 3; - * @return string - */ - public function getProductSetId() - { - return $this->product_set_id; - } - - /** - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * - * Generated from protobuf field string product_set_id = 3; - * @param string $var - * @return $this - */ - public function setProductSetId($var) - { - GPBUtil::checkString($var, True); - $this->product_set_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php deleted file mode 100644 index ccc3b85c92ac..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CreateReferenceImageRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.vision.v1.CreateReferenceImageRequest - */ -class CreateReferenceImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the product in which to create the reference - * image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * - * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reference_image = null; - /** - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * Generated from protobuf field string reference_image_id = 3; - */ - protected $reference_image_id = ''; - - /** - * @param string $parent Required. Resource name of the product in which to create the reference - * image. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see - * {@see ProductSearchClient::productName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\ReferenceImage $referenceImage Required. The reference image to create. - * If an image ID is specified, it is ignored. - * @param string $referenceImageId A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * @return \Google\Cloud\Vision\V1\CreateReferenceImageRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\ReferenceImage $referenceImage, string $referenceImageId): self - { - return (new self()) - ->setParent($parent) - ->setReferenceImage($referenceImage) - ->setReferenceImageId($referenceImageId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the product in which to create the reference - * image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @type \Google\Cloud\Vision\V1\ReferenceImage $reference_image - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * @type string $reference_image_id - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the product in which to create the reference - * image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of the product in which to create the reference - * image. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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 reference image to create. - * If an image ID is specified, it is ignored. - * - * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ReferenceImage|null - */ - public function getReferenceImage() - { - return $this->reference_image; - } - - public function hasReferenceImage() - { - return isset($this->reference_image); - } - - public function clearReferenceImage() - { - unset($this->reference_image); - } - - /** - * Required. The reference image to create. - * If an image ID is specified, it is ignored. - * - * Generated from protobuf field .google.cloud.vision.v1.ReferenceImage reference_image = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ReferenceImage $var - * @return $this - */ - public function setReferenceImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ReferenceImage::class); - $this->reference_image = $var; - - return $this; - } - - /** - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * Generated from protobuf field string reference_image_id = 3; - * @return string - */ - public function getReferenceImageId() - { - return $this->reference_image_id; - } - - /** - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * - * Generated from protobuf field string reference_image_id = 3; - * @param string $var - * @return $this - */ - public function setReferenceImageId($var) - { - GPBUtil::checkString($var, True); - $this->reference_image_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php deleted file mode 100644 index 34593cd6e194..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHint.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.vision.v1.CropHint - */ -class CropHint extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - protected $bounding_poly = null; - /** - * Confidence of this being a salient region. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - /** - * Fraction of importance of this salient region with respect to the original - * image. - * - * Generated from protobuf field float importance_fraction = 3; - */ - protected $importance_fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * @type float $confidence - * Confidence of this being a salient region. Range [0, 1]. - * @type float $importance_fraction - * Fraction of importance of this salient region with respect to the original - * image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon for the crop region. The coordinates of the bounding - * box are in the original image's scale. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * Confidence of this being a salient region. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of this being a salient region. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * Fraction of importance of this salient region with respect to the original - * image. - * - * Generated from protobuf field float importance_fraction = 3; - * @return float - */ - public function getImportanceFraction() - { - return $this->importance_fraction; - } - - /** - * Fraction of importance of this salient region with respect to the original - * image. - * - * Generated from protobuf field float importance_fraction = 3; - * @param float $var - * @return $this - */ - public function setImportanceFraction($var) - { - GPBUtil::checkFloat($var); - $this->importance_fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php deleted file mode 100644 index 7edebe86ec09..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsAnnotation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.CropHintsAnnotation - */ -class CropHintsAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Crop hint results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - */ - private $crop_hints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $crop_hints - * Crop hint results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Crop hint results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCropHints() - { - return $this->crop_hints; - } - - /** - * Crop hint results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.CropHint crop_hints = 1; - * @param array<\Google\Cloud\Vision\V1\CropHint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCropHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\CropHint::class); - $this->crop_hints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php deleted file mode 100644 index a1cc403bdb2e..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/CropHintsParams.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.vision.v1.CropHintsParams - */ -class CropHintsParams extends \Google\Protobuf\Internal\Message -{ - /** - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * - * Generated from protobuf field repeated float aspect_ratios = 1; - */ - private $aspect_ratios; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $aspect_ratios - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * - * Generated from protobuf field repeated float aspect_ratios = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAspectRatios() - { - return $this->aspect_ratios; - } - - /** - * Aspect ratios in floats, representing the ratio of the width to the height - * of the image. For example, if the desired aspect ratio is 4/3, the - * corresponding float value should be 1.33333. If not specified, the - * best possible crop is returned. The number of provided aspect ratios is - * limited to a maximum of 16; any aspect ratios provided after the 16th are - * ignored. - * - * Generated from protobuf field repeated float aspect_ratios = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAspectRatios($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->aspect_ratios = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php deleted file mode 100644 index 744dae5b2622..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.DeleteProductRequest - */ -class DeleteProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of product to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\DeleteProductRequest - * - * @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. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of product to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php deleted file mode 100644 index aa0ce3fb5abb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteProductSetRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.DeleteProductSetRequest - */ -class DeleteProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the ProductSet to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\DeleteProductSetRequest - * - * @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. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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. Resource name of the ProductSet to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php deleted file mode 100644 index f40ed15cd650..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DeleteReferenceImageRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.DeleteReferenceImageRequest - */ -class DeleteReferenceImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 reference image to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * Please see {@see ProductSearchClient::referenceImageName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\DeleteReferenceImageRequest - * - * @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 reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 reference image to delete. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php deleted file mode 100644 index ed9d31ab00c2..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/DominantColorsAnnotation.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vision.v1.DominantColorsAnnotation - */ -class DominantColorsAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * RGB color values with their score and pixel fraction. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; - */ - private $colors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $colors - * RGB color values with their score and pixel fraction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * RGB color values with their score and pixel fraction. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColors() - { - return $this->colors; - } - - /** - * RGB color values with their score and pixel fraction. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ColorInfo colors = 1; - * @param array<\Google\Cloud\Vision\V1\ColorInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ColorInfo::class); - $this->colors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php deleted file mode 100644 index 4ea1b12e776c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/EntityAnnotation.php +++ /dev/null @@ -1,422 +0,0 @@ -google.cloud.vision.v1.EntityAnnotation - */ -class EntityAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string mid = 1; - */ - protected $mid = ''; - /** - * The language code for the locale in which the entity textual - * `description` is expressed. - * - * Generated from protobuf field string locale = 2; - */ - protected $locale = ''; - /** - * Entity textual description, expressed in its `locale` language. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Overall score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - /** - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5 [deprecated = true]; - * @deprecated - */ - protected $confidence = 0.0; - /** - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * - * Generated from protobuf field float topicality = 6; - */ - protected $topicality = 0.0; - /** - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - */ - protected $bounding_poly = null; - /** - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; - */ - private $locations; - /** - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mid - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * @type string $locale - * The language code for the locale in which the entity textual - * `description` is expressed. - * @type string $description - * Entity textual description, expressed in its `locale` language. - * @type float $score - * Overall score of the result. Range [0, 1]. - * @type float $confidence - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * @type float $topicality - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * @type array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $locations - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * @type array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $properties - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string mid = 1; - * @return string - */ - public function getMid() - { - return $this->mid; - } - - /** - * Opaque entity ID. Some IDs may be available in - * [Google Knowledge Graph Search - * API](https://developers.google.com/knowledge-graph/). - * - * Generated from protobuf field string mid = 1; - * @param string $var - * @return $this - */ - public function setMid($var) - { - GPBUtil::checkString($var, True); - $this->mid = $var; - - return $this; - } - - /** - * The language code for the locale in which the entity textual - * `description` is expressed. - * - * Generated from protobuf field string locale = 2; - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * The language code for the locale in which the entity textual - * `description` is expressed. - * - * Generated from protobuf field string locale = 2; - * @param string $var - * @return $this - */ - public function setLocale($var) - { - GPBUtil::checkString($var, True); - $this->locale = $var; - - return $this; - } - - /** - * Entity textual description, expressed in its `locale` language. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Entity textual description, expressed in its `locale` language. - * - * 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; - } - - /** - * Overall score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Overall score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5 [deprecated = true]; - * @return float - * @deprecated - */ - public function getConfidence() - { - @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); - return $this->confidence; - } - - /** - * **Deprecated. Use `score` instead.** - * The accuracy of the entity detection in an image. - * For example, for an image in which the "Eiffel Tower" entity is detected, - * this field represents the confidence that there is a tower in the query - * image. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5 [deprecated = true]; - * @param float $var - * @return $this - * @deprecated - */ - public function setConfidence($var) - { - @trigger_error('confidence is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * - * Generated from protobuf field float topicality = 6; - * @return float - */ - public function getTopicality() - { - return $this->topicality; - } - - /** - * The relevancy of the ICA (Image Content Annotation) label to the - * image. For example, the relevancy of "tower" is likely higher to an image - * containing the detected "Eiffel Tower" than to an image containing a - * detected distant towering building, even though the confidence that - * there is a tower in each image may be the same. Range [0, 1]. - * - * Generated from protobuf field float topicality = 6; - * @param float $var - * @return $this - */ - public function setTopicality($var) - { - GPBUtil::checkFloat($var); - $this->topicality = $var; - - return $this; - } - - /** - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * Image region to which this entity belongs. Not produced - * for `LABEL_DETECTION` features. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 7; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * The location information for the detected entity. Multiple - * `LocationInfo` elements can be present because one location may - * indicate the location of the scene in the image, and another location - * may indicate the location of the place where the image was taken. - * Location information is usually present for landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.LocationInfo locations = 8; - * @param array<\Google\Cloud\Vision\V1\LocationInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\LocationInfo::class); - $this->locations = $arr; - - return $this; - } - - /** - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Some entities may have optional user-supplied `Property` (name/value) - * fields, such a score or string that qualifies the entity. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Property properties = 9; - * @param array<\Google\Cloud\Vision\V1\Property>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Property::class); - $this->properties = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php deleted file mode 100644 index b9af007fead8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation.php +++ /dev/null @@ -1,627 +0,0 @@ -google.cloud.vision.v1.FaceAnnotation - */ -class FaceAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - protected $bounding_poly = null; - /** - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - */ - protected $fd_bounding_poly = null; - /** - * Detected face landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - */ - private $landmarks; - /** - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * - * Generated from protobuf field float roll_angle = 4; - */ - protected $roll_angle = 0.0; - /** - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * - * Generated from protobuf field float pan_angle = 5; - */ - protected $pan_angle = 0.0; - /** - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * - * Generated from protobuf field float tilt_angle = 6; - */ - protected $tilt_angle = 0.0; - /** - * Detection confidence. Range [0, 1]. - * - * Generated from protobuf field float detection_confidence = 7; - */ - protected $detection_confidence = 0.0; - /** - * Face landmarking confidence. Range [0, 1]. - * - * Generated from protobuf field float landmarking_confidence = 8; - */ - protected $landmarking_confidence = 0.0; - /** - * Joy likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - */ - protected $joy_likelihood = 0; - /** - * Sorrow likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - */ - protected $sorrow_likelihood = 0; - /** - * Anger likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - */ - protected $anger_likelihood = 0; - /** - * Surprise likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - */ - protected $surprise_likelihood = 0; - /** - * Under-exposed likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - */ - protected $under_exposed_likelihood = 0; - /** - * Blurred likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - */ - protected $blurred_likelihood = 0; - /** - * Headwear likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - */ - protected $headwear_likelihood = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * @type \Google\Cloud\Vision\V1\BoundingPoly $fd_bounding_poly - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * @type array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $landmarks - * Detected face landmarks. - * @type float $roll_angle - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * @type float $pan_angle - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * @type float $tilt_angle - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * @type float $detection_confidence - * Detection confidence. Range [0, 1]. - * @type float $landmarking_confidence - * Face landmarking confidence. Range [0, 1]. - * @type int $joy_likelihood - * Joy likelihood. - * @type int $sorrow_likelihood - * Sorrow likelihood. - * @type int $anger_likelihood - * Anger likelihood. - * @type int $surprise_likelihood - * Surprise likelihood. - * @type int $under_exposed_likelihood - * Under-exposed likelihood. - * @type int $blurred_likelihood - * Blurred likelihood. - * @type int $headwear_likelihood - * Headwear likelihood. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon around the face. The coordinates of the bounding box - * are in the original image's scale. - * The bounding box is computed to "frame" the face in accordance with human - * expectations. It is based on the landmarker results. - * Note that one or more x and/or y coordinates may not be generated in the - * `BoundingPoly` (the polygon will be unbounded) if only a partial face - * appears in the image to be annotated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getFdBoundingPoly() - { - return $this->fd_bounding_poly; - } - - public function hasFdBoundingPoly() - { - return isset($this->fd_bounding_poly); - } - - public function clearFdBoundingPoly() - { - unset($this->fd_bounding_poly); - } - - /** - * The `fd_bounding_poly` bounding polygon is tighter than the - * `boundingPoly`, and encloses only the skin part of the face. Typically, it - * is used to eliminate the face from any image analysis that detects the - * "amount of skin" visible in an image. It is not based on the - * landmarker results, only on the initial face detection, hence - * the fd (face detection) prefix. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setFdBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->fd_bounding_poly = $var; - - return $this; - } - - /** - * Detected face landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLandmarks() - { - return $this->landmarks; - } - - /** - * Detected face landmarks. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3; - * @param array<\Google\Cloud\Vision\V1\FaceAnnotation\Landmark>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLandmarks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark::class); - $this->landmarks = $arr; - - return $this; - } - - /** - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * - * Generated from protobuf field float roll_angle = 4; - * @return float - */ - public function getRollAngle() - { - return $this->roll_angle; - } - - /** - * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - * of the face relative to the image vertical about the axis perpendicular to - * the face. Range [-180,180]. - * - * Generated from protobuf field float roll_angle = 4; - * @param float $var - * @return $this - */ - public function setRollAngle($var) - { - GPBUtil::checkFloat($var); - $this->roll_angle = $var; - - return $this; - } - - /** - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * - * Generated from protobuf field float pan_angle = 5; - * @return float - */ - public function getPanAngle() - { - return $this->pan_angle; - } - - /** - * Yaw angle, which indicates the leftward/rightward angle that the face is - * pointing relative to the vertical plane perpendicular to the image. Range - * [-180,180]. - * - * Generated from protobuf field float pan_angle = 5; - * @param float $var - * @return $this - */ - public function setPanAngle($var) - { - GPBUtil::checkFloat($var); - $this->pan_angle = $var; - - return $this; - } - - /** - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * - * Generated from protobuf field float tilt_angle = 6; - * @return float - */ - public function getTiltAngle() - { - return $this->tilt_angle; - } - - /** - * Pitch angle, which indicates the upwards/downwards angle that the face is - * pointing relative to the image's horizontal plane. Range [-180,180]. - * - * Generated from protobuf field float tilt_angle = 6; - * @param float $var - * @return $this - */ - public function setTiltAngle($var) - { - GPBUtil::checkFloat($var); - $this->tilt_angle = $var; - - return $this; - } - - /** - * Detection confidence. Range [0, 1]. - * - * Generated from protobuf field float detection_confidence = 7; - * @return float - */ - public function getDetectionConfidence() - { - return $this->detection_confidence; - } - - /** - * Detection confidence. Range [0, 1]. - * - * Generated from protobuf field float detection_confidence = 7; - * @param float $var - * @return $this - */ - public function setDetectionConfidence($var) - { - GPBUtil::checkFloat($var); - $this->detection_confidence = $var; - - return $this; - } - - /** - * Face landmarking confidence. Range [0, 1]. - * - * Generated from protobuf field float landmarking_confidence = 8; - * @return float - */ - public function getLandmarkingConfidence() - { - return $this->landmarking_confidence; - } - - /** - * Face landmarking confidence. Range [0, 1]. - * - * Generated from protobuf field float landmarking_confidence = 8; - * @param float $var - * @return $this - */ - public function setLandmarkingConfidence($var) - { - GPBUtil::checkFloat($var); - $this->landmarking_confidence = $var; - - return $this; - } - - /** - * Joy likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @return int - */ - public function getJoyLikelihood() - { - return $this->joy_likelihood; - } - - /** - * Joy likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood joy_likelihood = 9; - * @param int $var - * @return $this - */ - public function setJoyLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->joy_likelihood = $var; - - return $this; - } - - /** - * Sorrow likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @return int - */ - public function getSorrowLikelihood() - { - return $this->sorrow_likelihood; - } - - /** - * Sorrow likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10; - * @param int $var - * @return $this - */ - public function setSorrowLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->sorrow_likelihood = $var; - - return $this; - } - - /** - * Anger likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @return int - */ - public function getAngerLikelihood() - { - return $this->anger_likelihood; - } - - /** - * Anger likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood anger_likelihood = 11; - * @param int $var - * @return $this - */ - public function setAngerLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->anger_likelihood = $var; - - return $this; - } - - /** - * Surprise likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @return int - */ - public function getSurpriseLikelihood() - { - return $this->surprise_likelihood; - } - - /** - * Surprise likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood surprise_likelihood = 12; - * @param int $var - * @return $this - */ - public function setSurpriseLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->surprise_likelihood = $var; - - return $this; - } - - /** - * Under-exposed likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @return int - */ - public function getUnderExposedLikelihood() - { - return $this->under_exposed_likelihood; - } - - /** - * Under-exposed likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13; - * @param int $var - * @return $this - */ - public function setUnderExposedLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->under_exposed_likelihood = $var; - - return $this; - } - - /** - * Blurred likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @return int - */ - public function getBlurredLikelihood() - { - return $this->blurred_likelihood; - } - - /** - * Blurred likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood blurred_likelihood = 14; - * @param int $var - * @return $this - */ - public function setBlurredLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->blurred_likelihood = $var; - - return $this; - } - - /** - * Headwear likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @return int - */ - public function getHeadwearLikelihood() - { - return $this->headwear_likelihood; - } - - /** - * Headwear likelihood. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood headwear_likelihood = 15; - * @param int $var - * @return $this - */ - public function setHeadwearLikelihood($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->headwear_likelihood = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php deleted file mode 100644 index 060f8f4295d4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.vision.v1.FaceAnnotation.Landmark - */ -class Landmark extends \Google\Protobuf\Internal\Message -{ - /** - * Face landmark type. - * - * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - */ - protected $type = 0; - /** - * Face landmark position. - * - * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; - */ - protected $position = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Face landmark type. - * @type \Google\Cloud\Vision\V1\Position $position - * Face landmark position. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Face landmark type. - * - * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Face landmark type. - * - * Generated from protobuf field .google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\FaceAnnotation\Landmark\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Face landmark position. - * - * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; - * @return \Google\Cloud\Vision\V1\Position|null - */ - public function getPosition() - { - return $this->position; - } - - public function hasPosition() - { - return isset($this->position); - } - - public function clearPosition() - { - unset($this->position); - } - - /** - * Face landmark position. - * - * Generated from protobuf field .google.cloud.vision.v1.Position position = 4; - * @param \Google\Cloud\Vision\V1\Position $var - * @return $this - */ - public function setPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Position::class); - $this->position = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Landmark::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php deleted file mode 100644 index 7aabc19d2a6d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/FaceAnnotation/Landmark/Type.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.vision.v1.FaceAnnotation.Landmark.Type - */ -class Type -{ - /** - * Unknown face landmark detected. Should not be filled. - * - * Generated from protobuf enum UNKNOWN_LANDMARK = 0; - */ - const UNKNOWN_LANDMARK = 0; - /** - * Left eye. - * - * Generated from protobuf enum LEFT_EYE = 1; - */ - const LEFT_EYE = 1; - /** - * Right eye. - * - * Generated from protobuf enum RIGHT_EYE = 2; - */ - const RIGHT_EYE = 2; - /** - * Left of left eyebrow. - * - * Generated from protobuf enum LEFT_OF_LEFT_EYEBROW = 3; - */ - const LEFT_OF_LEFT_EYEBROW = 3; - /** - * Right of left eyebrow. - * - * Generated from protobuf enum RIGHT_OF_LEFT_EYEBROW = 4; - */ - const RIGHT_OF_LEFT_EYEBROW = 4; - /** - * Left of right eyebrow. - * - * Generated from protobuf enum LEFT_OF_RIGHT_EYEBROW = 5; - */ - const LEFT_OF_RIGHT_EYEBROW = 5; - /** - * Right of right eyebrow. - * - * Generated from protobuf enum RIGHT_OF_RIGHT_EYEBROW = 6; - */ - const RIGHT_OF_RIGHT_EYEBROW = 6; - /** - * Midpoint between eyes. - * - * Generated from protobuf enum MIDPOINT_BETWEEN_EYES = 7; - */ - const MIDPOINT_BETWEEN_EYES = 7; - /** - * Nose tip. - * - * Generated from protobuf enum NOSE_TIP = 8; - */ - const NOSE_TIP = 8; - /** - * Upper lip. - * - * Generated from protobuf enum UPPER_LIP = 9; - */ - const UPPER_LIP = 9; - /** - * Lower lip. - * - * Generated from protobuf enum LOWER_LIP = 10; - */ - const LOWER_LIP = 10; - /** - * Mouth left. - * - * Generated from protobuf enum MOUTH_LEFT = 11; - */ - const MOUTH_LEFT = 11; - /** - * Mouth right. - * - * Generated from protobuf enum MOUTH_RIGHT = 12; - */ - const MOUTH_RIGHT = 12; - /** - * Mouth center. - * - * Generated from protobuf enum MOUTH_CENTER = 13; - */ - const MOUTH_CENTER = 13; - /** - * Nose, bottom right. - * - * Generated from protobuf enum NOSE_BOTTOM_RIGHT = 14; - */ - const NOSE_BOTTOM_RIGHT = 14; - /** - * Nose, bottom left. - * - * Generated from protobuf enum NOSE_BOTTOM_LEFT = 15; - */ - const NOSE_BOTTOM_LEFT = 15; - /** - * Nose, bottom center. - * - * Generated from protobuf enum NOSE_BOTTOM_CENTER = 16; - */ - const NOSE_BOTTOM_CENTER = 16; - /** - * Left eye, top boundary. - * - * Generated from protobuf enum LEFT_EYE_TOP_BOUNDARY = 17; - */ - const LEFT_EYE_TOP_BOUNDARY = 17; - /** - * Left eye, right corner. - * - * Generated from protobuf enum LEFT_EYE_RIGHT_CORNER = 18; - */ - const LEFT_EYE_RIGHT_CORNER = 18; - /** - * Left eye, bottom boundary. - * - * Generated from protobuf enum LEFT_EYE_BOTTOM_BOUNDARY = 19; - */ - const LEFT_EYE_BOTTOM_BOUNDARY = 19; - /** - * Left eye, left corner. - * - * Generated from protobuf enum LEFT_EYE_LEFT_CORNER = 20; - */ - const LEFT_EYE_LEFT_CORNER = 20; - /** - * Right eye, top boundary. - * - * Generated from protobuf enum RIGHT_EYE_TOP_BOUNDARY = 21; - */ - const RIGHT_EYE_TOP_BOUNDARY = 21; - /** - * Right eye, right corner. - * - * Generated from protobuf enum RIGHT_EYE_RIGHT_CORNER = 22; - */ - const RIGHT_EYE_RIGHT_CORNER = 22; - /** - * Right eye, bottom boundary. - * - * Generated from protobuf enum RIGHT_EYE_BOTTOM_BOUNDARY = 23; - */ - const RIGHT_EYE_BOTTOM_BOUNDARY = 23; - /** - * Right eye, left corner. - * - * Generated from protobuf enum RIGHT_EYE_LEFT_CORNER = 24; - */ - const RIGHT_EYE_LEFT_CORNER = 24; - /** - * Left eyebrow, upper midpoint. - * - * Generated from protobuf enum LEFT_EYEBROW_UPPER_MIDPOINT = 25; - */ - const LEFT_EYEBROW_UPPER_MIDPOINT = 25; - /** - * Right eyebrow, upper midpoint. - * - * Generated from protobuf enum RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - */ - const RIGHT_EYEBROW_UPPER_MIDPOINT = 26; - /** - * Left ear tragion. - * - * Generated from protobuf enum LEFT_EAR_TRAGION = 27; - */ - const LEFT_EAR_TRAGION = 27; - /** - * Right ear tragion. - * - * Generated from protobuf enum RIGHT_EAR_TRAGION = 28; - */ - const RIGHT_EAR_TRAGION = 28; - /** - * Left eye pupil. - * - * Generated from protobuf enum LEFT_EYE_PUPIL = 29; - */ - const LEFT_EYE_PUPIL = 29; - /** - * Right eye pupil. - * - * Generated from protobuf enum RIGHT_EYE_PUPIL = 30; - */ - const RIGHT_EYE_PUPIL = 30; - /** - * Forehead glabella. - * - * Generated from protobuf enum FOREHEAD_GLABELLA = 31; - */ - const FOREHEAD_GLABELLA = 31; - /** - * Chin gnathion. - * - * Generated from protobuf enum CHIN_GNATHION = 32; - */ - const CHIN_GNATHION = 32; - /** - * Chin left gonion. - * - * Generated from protobuf enum CHIN_LEFT_GONION = 33; - */ - const CHIN_LEFT_GONION = 33; - /** - * Chin right gonion. - * - * Generated from protobuf enum CHIN_RIGHT_GONION = 34; - */ - const CHIN_RIGHT_GONION = 34; - /** - * Left cheek center. - * - * Generated from protobuf enum LEFT_CHEEK_CENTER = 35; - */ - const LEFT_CHEEK_CENTER = 35; - /** - * Right cheek center. - * - * Generated from protobuf enum RIGHT_CHEEK_CENTER = 36; - */ - const RIGHT_CHEEK_CENTER = 36; - - private static $valueToName = [ - self::UNKNOWN_LANDMARK => 'UNKNOWN_LANDMARK', - self::LEFT_EYE => 'LEFT_EYE', - self::RIGHT_EYE => 'RIGHT_EYE', - self::LEFT_OF_LEFT_EYEBROW => 'LEFT_OF_LEFT_EYEBROW', - self::RIGHT_OF_LEFT_EYEBROW => 'RIGHT_OF_LEFT_EYEBROW', - self::LEFT_OF_RIGHT_EYEBROW => 'LEFT_OF_RIGHT_EYEBROW', - self::RIGHT_OF_RIGHT_EYEBROW => 'RIGHT_OF_RIGHT_EYEBROW', - self::MIDPOINT_BETWEEN_EYES => 'MIDPOINT_BETWEEN_EYES', - self::NOSE_TIP => 'NOSE_TIP', - self::UPPER_LIP => 'UPPER_LIP', - self::LOWER_LIP => 'LOWER_LIP', - self::MOUTH_LEFT => 'MOUTH_LEFT', - self::MOUTH_RIGHT => 'MOUTH_RIGHT', - self::MOUTH_CENTER => 'MOUTH_CENTER', - self::NOSE_BOTTOM_RIGHT => 'NOSE_BOTTOM_RIGHT', - self::NOSE_BOTTOM_LEFT => 'NOSE_BOTTOM_LEFT', - self::NOSE_BOTTOM_CENTER => 'NOSE_BOTTOM_CENTER', - self::LEFT_EYE_TOP_BOUNDARY => 'LEFT_EYE_TOP_BOUNDARY', - self::LEFT_EYE_RIGHT_CORNER => 'LEFT_EYE_RIGHT_CORNER', - self::LEFT_EYE_BOTTOM_BOUNDARY => 'LEFT_EYE_BOTTOM_BOUNDARY', - self::LEFT_EYE_LEFT_CORNER => 'LEFT_EYE_LEFT_CORNER', - self::RIGHT_EYE_TOP_BOUNDARY => 'RIGHT_EYE_TOP_BOUNDARY', - self::RIGHT_EYE_RIGHT_CORNER => 'RIGHT_EYE_RIGHT_CORNER', - self::RIGHT_EYE_BOTTOM_BOUNDARY => 'RIGHT_EYE_BOTTOM_BOUNDARY', - self::RIGHT_EYE_LEFT_CORNER => 'RIGHT_EYE_LEFT_CORNER', - self::LEFT_EYEBROW_UPPER_MIDPOINT => 'LEFT_EYEBROW_UPPER_MIDPOINT', - self::RIGHT_EYEBROW_UPPER_MIDPOINT => 'RIGHT_EYEBROW_UPPER_MIDPOINT', - self::LEFT_EAR_TRAGION => 'LEFT_EAR_TRAGION', - self::RIGHT_EAR_TRAGION => 'RIGHT_EAR_TRAGION', - self::LEFT_EYE_PUPIL => 'LEFT_EYE_PUPIL', - self::RIGHT_EYE_PUPIL => 'RIGHT_EYE_PUPIL', - self::FOREHEAD_GLABELLA => 'FOREHEAD_GLABELLA', - self::CHIN_GNATHION => 'CHIN_GNATHION', - self::CHIN_LEFT_GONION => 'CHIN_LEFT_GONION', - self::CHIN_RIGHT_GONION => 'CHIN_RIGHT_GONION', - self::LEFT_CHEEK_CENTER => 'LEFT_CHEEK_CENTER', - self::RIGHT_CHEEK_CENTER => 'RIGHT_CHEEK_CENTER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Vision\V1\FaceAnnotation_Landmark_Type::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php deleted file mode 100644 index ac1b22a40aa9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.vision.v1.Feature - */ -class Feature extends \Google\Protobuf\Internal\Message -{ - /** - * The feature type. - * - * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; - */ - protected $type = 0; - /** - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * - * Generated from protobuf field int32 max_results = 2; - */ - protected $max_results = 0; - /** - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * - * Generated from protobuf field string model = 3; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The feature type. - * @type int $max_results - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * @type string $model - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The feature type. - * - * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The feature type. - * - * Generated from protobuf field .google.cloud.vision.v1.Feature.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Feature\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * - * Generated from protobuf field int32 max_results = 2; - * @return int - */ - public function getMaxResults() - { - return $this->max_results; - } - - /** - * Maximum number of results of this type. Does not apply to - * `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`. - * - * Generated from protobuf field int32 max_results = 2; - * @param int $var - * @return $this - */ - public function setMaxResults($var) - { - GPBUtil::checkInt32($var); - $this->max_results = $var; - - return $this; - } - - /** - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * - * Generated from protobuf field string model = 3; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Model to use for the feature. - * Supported values: "builtin/stable" (the default if unset) and - * "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also - * support "builtin/weekly" for the bleeding edge release updated weekly. - * - * Generated from protobuf field string model = 3; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php deleted file mode 100644 index d905c7320a41..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Feature/Type.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vision.v1.Feature.Type - */ -class Type -{ - /** - * Unspecified feature type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Run face detection. - * - * Generated from protobuf enum FACE_DETECTION = 1; - */ - const FACE_DETECTION = 1; - /** - * Run landmark detection. - * - * Generated from protobuf enum LANDMARK_DETECTION = 2; - */ - const LANDMARK_DETECTION = 2; - /** - * Run logo detection. - * - * Generated from protobuf enum LOGO_DETECTION = 3; - */ - const LOGO_DETECTION = 3; - /** - * Run label detection. - * - * Generated from protobuf enum LABEL_DETECTION = 4; - */ - const LABEL_DETECTION = 4; - /** - * Run text detection / optical character recognition (OCR). Text detection - * is optimized for areas of text within a larger image; if the image is - * a document, use `DOCUMENT_TEXT_DETECTION` instead. - * - * Generated from protobuf enum TEXT_DETECTION = 5; - */ - const TEXT_DETECTION = 5; - /** - * Run dense text document OCR. Takes precedence when both - * `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present. - * - * Generated from protobuf enum DOCUMENT_TEXT_DETECTION = 11; - */ - const DOCUMENT_TEXT_DETECTION = 11; - /** - * Run Safe Search to detect potentially unsafe - * or undesirable content. - * - * Generated from protobuf enum SAFE_SEARCH_DETECTION = 6; - */ - const SAFE_SEARCH_DETECTION = 6; - /** - * Compute a set of image properties, such as the - * image's dominant colors. - * - * Generated from protobuf enum IMAGE_PROPERTIES = 7; - */ - const IMAGE_PROPERTIES = 7; - /** - * Run crop hints. - * - * Generated from protobuf enum CROP_HINTS = 9; - */ - const CROP_HINTS = 9; - /** - * Run web detection. - * - * Generated from protobuf enum WEB_DETECTION = 10; - */ - const WEB_DETECTION = 10; - /** - * Run Product Search. - * - * Generated from protobuf enum PRODUCT_SEARCH = 12; - */ - const PRODUCT_SEARCH = 12; - /** - * Run localizer for object detection. - * - * Generated from protobuf enum OBJECT_LOCALIZATION = 19; - */ - const OBJECT_LOCALIZATION = 19; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::FACE_DETECTION => 'FACE_DETECTION', - self::LANDMARK_DETECTION => 'LANDMARK_DETECTION', - self::LOGO_DETECTION => 'LOGO_DETECTION', - self::LABEL_DETECTION => 'LABEL_DETECTION', - self::TEXT_DETECTION => 'TEXT_DETECTION', - self::DOCUMENT_TEXT_DETECTION => 'DOCUMENT_TEXT_DETECTION', - self::SAFE_SEARCH_DETECTION => 'SAFE_SEARCH_DETECTION', - self::IMAGE_PROPERTIES => 'IMAGE_PROPERTIES', - self::CROP_HINTS => 'CROP_HINTS', - self::WEB_DETECTION => 'WEB_DETECTION', - self::PRODUCT_SEARCH => 'PRODUCT_SEARCH', - self::OBJECT_LOCALIZATION => 'OBJECT_LOCALIZATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Vision\V1\Feature_Type::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php deleted file mode 100644 index 5e5f3f520ee1..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsDestination.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Google Cloud Storage URI prefix where the results will be stored. Results - * will be in JSON format and preceded by its corresponding input URI prefix. - * This field can either represent a gcs file prefix or gcs directory. In - * either case, the uri should be unique because in order to get all of the - * output files, you will need to do a wildcard gcs search on the uri prefix - * you provide. - * Examples: - * * File Prefix: gs://bucket-name/here/filenameprefix The output files - * will be created in gs://bucket-name/here/ and the names of the - * output files will begin with "filenameprefix". - * * Directory Prefix: gs://bucket-name/some/location/ The output files - * will be created in gs://bucket-name/some/location/ and the names of the - * output files could be anything because there was no filename prefix - * specified. - * If multiple outputs, each response is still AnnotateFileResponse, each of - * which contains some subset of the full list of AnnotateImageResponse. - * Multiple outputs can happen if, for example, the output JSON is too large - * and overflows into multiple sharded files. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php deleted file mode 100644 index e7c46ae00ad3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GcsSource.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vision.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Google Cloud Storage URI for the input file. This must only be a - * Google Cloud Storage object. Wildcards are not currently supported. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php deleted file mode 100644 index 8716aa759f18..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.GetProductRequest - */ -class GetProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the Product to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\GetProductRequest - * - * @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. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of the Product to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php deleted file mode 100644 index f133d964a1f9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetProductSetRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.GetProductSetRequest - */ -class GetProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the ProductSet to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\GetProductSetRequest - * - * @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. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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. Resource name of the ProductSet to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php deleted file mode 100644 index 87a13da256c2..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/GetReferenceImageRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vision.v1.GetReferenceImageRequest - */ -class GetReferenceImageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 ReferenceImage to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. Please see - * {@see ProductSearchClient::referenceImageName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\GetReferenceImageRequest - * - * @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 ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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 ReferenceImage to get. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_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/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php deleted file mode 100644 index a829768dbbe8..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Image.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * - * Generated from protobuf field bytes content = 1; - */ - protected $content = ''; - /** - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; - */ - protected $source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * @type \Google\Cloud\Vision\V1\ImageSource $source - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * - * Generated from protobuf field bytes content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Image content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateImages requests. It does - * not work for AsyncBatchAnnotateImages requests. - * - * Generated from protobuf field bytes content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; - * @return \Google\Cloud\Vision\V1\ImageSource|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Google Cloud Storage image location, or publicly-accessible image - * URL. If both `content` and `source` are provided for an image, `content` - * takes precedence and is used to perform the image annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.ImageSource source = 2; - * @param \Google\Cloud\Vision\V1\ImageSource $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageSource::class); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php deleted file mode 100644 index 04aba2e4a1dc..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageAnnotationContext.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.vision.v1.ImageAnnotationContext - */ -class ImageAnnotationContext extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the file used to produce the image. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * - * Generated from protobuf field int32 page_number = 2; - */ - protected $page_number = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the file used to produce the image. - * @type int $page_number - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the file used to produce the image. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the file used to produce the image. - * - * 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; - } - - /** - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * - * Generated from protobuf field int32 page_number = 2; - * @return int - */ - public function getPageNumber() - { - return $this->page_number; - } - - /** - * If the file was a PDF or TIFF, this field gives the page number within - * the file used to produce the image. - * - * Generated from protobuf field int32 page_number = 2; - * @param int $var - * @return $this - */ - public function setPageNumber($var) - { - GPBUtil::checkInt32($var); - $this->page_number = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php deleted file mode 100644 index 25a6e9b648ce..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageContext.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.vision.v1.ImageContext - */ -class ImageContext extends \Google\Protobuf\Internal\Message -{ - /** - * Not used. - * - * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - */ - protected $lat_long_rect = null; - /** - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * - * Generated from protobuf field repeated string language_hints = 2; - */ - private $language_hints; - /** - * Parameters for crop hints annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - */ - protected $crop_hints_params = null; - /** - * Parameters for product search. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - */ - protected $product_search_params = null; - /** - * Parameters for web detection. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - */ - protected $web_detection_params = null; - /** - * Parameters for text detection and document text detection. - * - * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - */ - protected $text_detection_params = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\LatLongRect $lat_long_rect - * Not used. - * @type array|\Google\Protobuf\Internal\RepeatedField $language_hints - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * @type \Google\Cloud\Vision\V1\CropHintsParams $crop_hints_params - * Parameters for crop hints annotation request. - * @type \Google\Cloud\Vision\V1\ProductSearchParams $product_search_params - * Parameters for product search. - * @type \Google\Cloud\Vision\V1\WebDetectionParams $web_detection_params - * Parameters for web detection. - * @type \Google\Cloud\Vision\V1\TextDetectionParams $text_detection_params - * Parameters for text detection and document text detection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Not used. - * - * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @return \Google\Cloud\Vision\V1\LatLongRect|null - */ - public function getLatLongRect() - { - return $this->lat_long_rect; - } - - public function hasLatLongRect() - { - return isset($this->lat_long_rect); - } - - public function clearLatLongRect() - { - unset($this->lat_long_rect); - } - - /** - * Not used. - * - * Generated from protobuf field .google.cloud.vision.v1.LatLongRect lat_long_rect = 1; - * @param \Google\Cloud\Vision\V1\LatLongRect $var - * @return $this - */ - public function setLatLongRect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\LatLongRect::class); - $this->lat_long_rect = $var; - - return $this; - } - - /** - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * - * Generated from protobuf field repeated string language_hints = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLanguageHints() - { - return $this->language_hints; - } - - /** - * List of languages to use for TEXT_DETECTION. In most cases, an empty value - * yields the best results since it enables automatic language detection. For - * languages based on the Latin alphabet, setting `language_hints` is not - * needed. In rare cases, when the language of the text in the image is known, - * setting a hint will help get better results (although it will be a - * significant hindrance if the hint is wrong). Text detection returns an - * error if one or more of the specified languages is not one of the - * [supported languages](https://cloud.google.com/vision/docs/languages). - * - * Generated from protobuf field repeated string language_hints = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLanguageHints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->language_hints = $arr; - - return $this; - } - - /** - * Parameters for crop hints annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @return \Google\Cloud\Vision\V1\CropHintsParams|null - */ - public function getCropHintsParams() - { - return $this->crop_hints_params; - } - - public function hasCropHintsParams() - { - return isset($this->crop_hints_params); - } - - public function clearCropHintsParams() - { - unset($this->crop_hints_params); - } - - /** - * Parameters for crop hints annotation request. - * - * Generated from protobuf field .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4; - * @param \Google\Cloud\Vision\V1\CropHintsParams $var - * @return $this - */ - public function setCropHintsParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsParams::class); - $this->crop_hints_params = $var; - - return $this; - } - - /** - * Parameters for product search. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @return \Google\Cloud\Vision\V1\ProductSearchParams|null - */ - public function getProductSearchParams() - { - return $this->product_search_params; - } - - public function hasProductSearchParams() - { - return isset($this->product_search_params); - } - - public function clearProductSearchParams() - { - unset($this->product_search_params); - } - - /** - * Parameters for product search. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSearchParams product_search_params = 5; - * @param \Google\Cloud\Vision\V1\ProductSearchParams $var - * @return $this - */ - public function setProductSearchParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchParams::class); - $this->product_search_params = $var; - - return $this; - } - - /** - * Parameters for web detection. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @return \Google\Cloud\Vision\V1\WebDetectionParams|null - */ - public function getWebDetectionParams() - { - return $this->web_detection_params; - } - - public function hasWebDetectionParams() - { - return isset($this->web_detection_params); - } - - public function clearWebDetectionParams() - { - unset($this->web_detection_params); - } - - /** - * Parameters for web detection. - * - * Generated from protobuf field .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6; - * @param \Google\Cloud\Vision\V1\WebDetectionParams $var - * @return $this - */ - public function setWebDetectionParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetectionParams::class); - $this->web_detection_params = $var; - - return $this; - } - - /** - * Parameters for text detection and document text detection. - * - * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @return \Google\Cloud\Vision\V1\TextDetectionParams|null - */ - public function getTextDetectionParams() - { - return $this->text_detection_params; - } - - public function hasTextDetectionParams() - { - return isset($this->text_detection_params); - } - - public function clearTextDetectionParams() - { - unset($this->text_detection_params); - } - - /** - * Parameters for text detection and document text detection. - * - * Generated from protobuf field .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12; - * @param \Google\Cloud\Vision\V1\TextDetectionParams $var - * @return $this - */ - public function setTextDetectionParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextDetectionParams::class); - $this->text_detection_params = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php deleted file mode 100644 index 05d082b53f75..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageProperties.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.ImageProperties - */ -class ImageProperties extends \Google\Protobuf\Internal\Message -{ - /** - * If present, dominant colors completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - */ - protected $dominant_colors = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\DominantColorsAnnotation $dominant_colors - * If present, dominant colors completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * If present, dominant colors completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @return \Google\Cloud\Vision\V1\DominantColorsAnnotation|null - */ - public function getDominantColors() - { - return $this->dominant_colors; - } - - public function hasDominantColors() - { - return isset($this->dominant_colors); - } - - public function clearDominantColors() - { - unset($this->dominant_colors); - } - - /** - * If present, dominant colors completed successfully. - * - * Generated from protobuf field .google.cloud.vision.v1.DominantColorsAnnotation dominant_colors = 1; - * @param \Google\Cloud\Vision\V1\DominantColorsAnnotation $var - * @return $this - */ - public function setDominantColors($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\DominantColorsAnnotation::class); - $this->dominant_colors = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php deleted file mode 100644 index 977a6a7406c4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImageSource.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vision.v1.ImageSource - */ -class ImageSource extends \Google\Protobuf\Internal\Message -{ - /** - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * - * Generated from protobuf field string gcs_image_uri = 1; - */ - protected $gcs_image_uri = ''; - /** - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * - * Generated from protobuf field string image_uri = 2; - */ - protected $image_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_image_uri - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * @type string $image_uri - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * - * Generated from protobuf field string gcs_image_uri = 1; - * @return string - */ - public function getGcsImageUri() - { - return $this->gcs_image_uri; - } - - /** - * **Use `image_uri` instead.** - * The Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. - * - * Generated from protobuf field string gcs_image_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsImageUri($var) - { - GPBUtil::checkString($var, True); - $this->gcs_image_uri = $var; - - return $this; - } - - /** - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * - * Generated from protobuf field string image_uri = 2; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The URI of the source image. Can be either: - * 1. A Google Cloud Storage URI of the form - * `gs://bucket_name/object_name`. Object versioning is not supported. See - * [Google Cloud Storage Request - * URIs](https://cloud.google.com/storage/docs/reference-uris) for more - * info. - * 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from - * HTTP/HTTPS URLs, Google cannot guarantee that the request will be - * completed. Your request may fail if the specified host denies the - * request (e.g. due to request throttling or DOS prevention), or if Google - * throttles requests to the site for abuse prevention. You should not - * depend on externally-hosted images for production applications. - * When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - * precedence. - * - * Generated from protobuf field string image_uri = 2; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php deleted file mode 100644 index b6e1d5818b47..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsGcsSource.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsGcsSource - */ -class ImportProductSetsGcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and - * the `labels` column refers to - * [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field - * for the product to a space (" "). You can update the `display_name` later - * by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * - * Generated from protobuf field string csv_file_uri = 1; - */ - protected $csv_file_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $csv_file_uri - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and - * the `labels` column refers to - * [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field - * for the product to a space (" "). You can update the `display_name` later - * by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and - * the `labels` column refers to - * [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field - * for the product to a space (" "). You can update the `display_name` later - * by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * - * Generated from protobuf field string csv_file_uri = 1; - * @return string - */ - public function getCsvFileUri() - { - return $this->csv_file_uri; - } - - /** - * The Google Cloud Storage URI of the input csv file. - * The URI must start with `gs://`. - * The format of the input csv file should be one image per line. - * In each line, there are 8 columns. - * 1. image-uri - * 2. image-id - * 3. product-set-id - * 4. product-id - * 5. product-category - * 6. product-display-name - * 7. labels - * 8. bounding-poly - * The `image-uri`, `product-set-id`, `product-id`, and `product-category` - * columns are required. All other columns are optional. - * If the `ProductSet` or `Product` specified by the `product-set-id` and - * `product-id` values does not exist, then the system will create a new - * `ProductSet` or `Product` for the image. In this case, the - * `product-display-name` column refers to - * [display_name][google.cloud.vision.v1.Product.display_name], the - * `product-category` column refers to - * [product_category][google.cloud.vision.v1.Product.product_category], and - * the `labels` column refers to - * [product_labels][google.cloud.vision.v1.Product.product_labels]. - * The `image-id` column is optional but must be unique if provided. If it is - * empty, the system will automatically assign a unique id to the image. - * The `product-display-name` column is optional. If it is empty, the system - * sets the [display_name][google.cloud.vision.v1.Product.display_name] field - * for the product to a space (" "). You can update the `display_name` later - * by using the API. - * If a `Product` with the specified `product-id` already exists, then the - * system ignores the `product-display-name`, `product-category`, and `labels` - * columns. - * The `labels` column (optional) is a line containing a list of - * comma-separated key-value pairs, in the following format: - * "key_1=value_1,key_2=value_2,...,key_n=value_n" - * The `bounding-poly` column (optional) identifies one region of - * interest from the image in the same manner as `CreateReferenceImage`. If - * you do not specify the `bounding-poly` column, then the system will try to - * detect regions of interest automatically. - * At most one `bounding-poly` column is allowed per line. If the image - * contains multiple regions of interest, add a line to the CSV file that - * includes the same product information, and the `bounding-poly` values for - * each region of interest. - * The `bounding-poly` column must contain an even number of comma-separated - * numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use - * non-negative integers for absolute bounding polygons, and float values - * in [0, 1] for normalized bounding polygons. - * The system will resize the image if the image resolution is too - * large to process (larger than 20MP). - * - * Generated from protobuf field string csv_file_uri = 1; - * @param string $var - * @return $this - */ - public function setCsvFileUri($var) - { - GPBUtil::checkString($var, True); - $this->csv_file_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php deleted file mode 100644 index 181836273298..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsInputConfig.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsInputConfig - */ -class ImportProductSetsInputConfig extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $gcs_source - * The Google Cloud Storage location for a csv file which preserves a list - * of ImportProductSetRequests in each line. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location for a csv file which preserves a list - * of ImportProductSetRequests in each line. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @return \Google\Cloud\Vision\V1\ImportProductSetsGcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * The Google Cloud Storage location for a csv file which preserves a list - * of ImportProductSetRequests in each line. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsGcsSource gcs_source = 1; - * @param \Google\Cloud\Vision\V1\ImportProductSetsGcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsGcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php deleted file mode 100644 index 24ecfc858acb..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsRequest - */ -class ImportProductSetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The input content for the list of requests. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - - /** - * @param string $parent Required. The project in which the ProductSets should be imported. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. - * - * @return \Google\Cloud\Vision\V1\ImportProductSetsRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $inputConfig): self - { - return (new self()) - ->setParent($parent) - ->setInputConfig($inputConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $input_config - * Required. The input content for the list of requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_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 in which the ProductSets should be imported. - * Format is `projects/PROJECT_ID/locations/LOC_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 input content for the list of requests. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ImportProductSetsInputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. The input content for the list of requests. - * - * Generated from protobuf field .google.cloud.vision.v1.ImportProductSetsInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ImportProductSetsInputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImportProductSetsInputConfig::class); - $this->input_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php deleted file mode 100644 index 79c3e8bda872..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ImportProductSetsResponse.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.vision.v1.ImportProductSetsResponse - */ -class ImportProductSetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of reference_images that are imported successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - private $reference_images; - /** - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * - * Generated from protobuf field repeated .google.rpc.Status statuses = 2; - */ - private $statuses; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images - * The list of reference_images that are imported successfully. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $statuses - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of reference_images that are imported successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferenceImages() - { - return $this->reference_images; - } - - /** - * The list of reference_images that are imported successfully. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferenceImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); - $this->reference_images = $arr; - - return $this; - } - - /** - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * - * Generated from protobuf field repeated .google.rpc.Status statuses = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStatuses() - { - return $this->statuses; - } - - /** - * The rpc status for each ImportProductSet request, including both successes - * and errors. - * The number of statuses here matches the number of lines in the csv file, - * and statuses[i] stores the success or failure status of processing the i-th - * line of the csv, starting from line 0. - * - * Generated from protobuf field repeated .google.rpc.Status statuses = 2; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStatuses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->statuses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php deleted file mode 100644 index 7fc7ef2d630c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/InputConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.vision.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage location to read the input from. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; - */ - protected $gcs_source = null; - /** - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * - * Generated from protobuf field bytes content = 3; - */ - protected $content = ''; - /** - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\GcsSource $gcs_source - * The Google Cloud Storage location to read the input from. - * @type string $content - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * @type string $mime_type - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to read the input from. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @return \Google\Cloud\Vision\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->gcs_source; - } - - public function hasGcsSource() - { - return isset($this->gcs_source); - } - - public function clearGcsSource() - { - unset($this->gcs_source); - } - - /** - * The Google Cloud Storage location to read the input from. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsSource gcs_source = 1; - * @param \Google\Cloud\Vision\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsSource::class); - $this->gcs_source = $var; - - return $this; - } - - /** - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * - * Generated from protobuf field bytes content = 3; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * File content, represented as a stream of bytes. - * Note: As with all `bytes` fields, protobuffers use a pure binary - * representation, whereas JSON representations use base64. - * Currently, this field only works for BatchAnnotateFiles requests. It does - * not work for AsyncBatchAnnotateFiles requests. - * - * Generated from protobuf field bytes content = 3; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, False); - $this->content = $var; - - return $this; - } - - /** - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The type of the file. Currently only "application/pdf", "image/tiff" and - * "image/gif" are supported. Wildcards are not supported. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php deleted file mode 100644 index c582fe6217f4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LatLongRect.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.vision.v1.LatLongRect - */ -class LatLongRect extends \Google\Protobuf\Internal\Message -{ - /** - * Min lat/long pair. - * - * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; - */ - protected $min_lat_lng = null; - /** - * Max lat/long pair. - * - * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; - */ - protected $max_lat_lng = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $min_lat_lng - * Min lat/long pair. - * @type \Google\Type\LatLng $max_lat_lng - * Max lat/long pair. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Min lat/long pair. - * - * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getMinLatLng() - { - return $this->min_lat_lng; - } - - public function hasMinLatLng() - { - return isset($this->min_lat_lng); - } - - public function clearMinLatLng() - { - unset($this->min_lat_lng); - } - - /** - * Min lat/long pair. - * - * Generated from protobuf field .google.type.LatLng min_lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setMinLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->min_lat_lng = $var; - - return $this; - } - - /** - * Max lat/long pair. - * - * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; - * @return \Google\Type\LatLng|null - */ - public function getMaxLatLng() - { - return $this->max_lat_lng; - } - - public function hasMaxLatLng() - { - return isset($this->max_lat_lng); - } - - public function clearMaxLatLng() - { - unset($this->max_lat_lng); - } - - /** - * Max lat/long pair. - * - * Generated from protobuf field .google.type.LatLng max_lat_lng = 2; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setMaxLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->max_lat_lng = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php deleted file mode 100644 index a38e9ab08c22..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Likelihood.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.vision.v1.Likelihood - */ -class Likelihood -{ - /** - * Unknown likelihood. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * It is very unlikely. - * - * Generated from protobuf enum VERY_UNLIKELY = 1; - */ - const VERY_UNLIKELY = 1; - /** - * It is unlikely. - * - * Generated from protobuf enum UNLIKELY = 2; - */ - const UNLIKELY = 2; - /** - * It is possible. - * - * Generated from protobuf enum POSSIBLE = 3; - */ - const POSSIBLE = 3; - /** - * It is likely. - * - * Generated from protobuf enum LIKELY = 4; - */ - const LIKELY = 4; - /** - * It is very likely. - * - * Generated from protobuf enum VERY_LIKELY = 5; - */ - const VERY_LIKELY = 5; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::VERY_UNLIKELY => 'VERY_UNLIKELY', - self::UNLIKELY => 'UNLIKELY', - self::POSSIBLE => 'POSSIBLE', - self::LIKELY => 'LIKELY', - self::VERY_LIKELY => 'VERY_LIKELY', - ]; - - 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php deleted file mode 100644 index c2ca9f793d5a..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vision.v1.ListProductSetsRequest - */ -class ListProductSetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project from which ProductSets should be listed. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListProductSetsRequest - * - * @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 project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_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 from which ProductSets should be listed. - * Format is `projects/PROJECT_ID/locations/LOC_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 items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * 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 next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php deleted file mode 100644 index 6fb58f3ea6d7..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductSetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vision.v1.ListProductSetsResponse - */ -class ListProductSetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ProductSets. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - */ - private $product_sets; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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 array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $product_sets - * List of ProductSets. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * List of ProductSets. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductSets() - { - return $this->product_sets; - } - - /** - * List of ProductSets. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSet product_sets = 1; - * @param array<\Google\Cloud\Vision\V1\ProductSet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductSets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSet::class); - $this->product_sets = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php deleted file mode 100644 index 70a71c26a951..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.vision.v1.ListProductsInProductSetRequest - */ -class ListProductsInProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The ProductSet resource for which to retrieve Products. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListProductsInProductSetRequest - * - * @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 ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 ProductSet resource for which to retrieve Products. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * 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 next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php deleted file mode 100644 index 550e51fc19f7..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsInProductSetResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vision.v1.ListProductsInProductSetResponse - */ -class ListProductsInProductSetResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - */ - private $products; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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 array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products - * The list of Products. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProducts() - { - return $this->products; - } - - /** - * The list of Products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProducts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); - $this->products = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php deleted file mode 100644 index e6efb131265a..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.vision.v1.ListProductsRequest - */ -class ListProductsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project OR ProductSet from which Products should be listed. - * - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * Please see {@see ProductSearchClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListProductsRequest - * - * @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 project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_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 OR ProductSet from which Products should be listed. - * Format: - * `projects/PROJECT_ID/locations/LOC_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 items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * 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 next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php deleted file mode 100644 index 192d6f3a9a11..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListProductsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vision.v1.ListProductsResponse - */ -class ListProductsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - */ - private $products; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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 array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $products - * List of products. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * List of products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProducts() - { - return $this->products; - } - - /** - * List of products. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product products = 1; - * @param array<\Google\Cloud\Vision\V1\Product>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProducts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product::class); - $this->products = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php deleted file mode 100644 index fb833ada7722..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.vision.v1.ListReferenceImagesRequest - */ -class ListReferenceImagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Resource name of the product containing the reference images. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. Please see - * {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\ListReferenceImagesRequest - * - * @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. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $page_token - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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. Resource name of the product containing the reference images. - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_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 items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * 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 to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results to be returned. This is the value - * of `nextPageToken` returned in a previous reference image list request. - * Defaults to the first page if not specified. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php deleted file mode 100644 index bf552bad802f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ListReferenceImagesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.ListReferenceImagesResponse - */ -class ListReferenceImagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of reference images. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - */ - private $reference_images; - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $reference_images - * The list of reference images. - * @type int $page_size - * The maximum number of items to return. Default 10, maximum 100. - * @type string $next_page_token - * The next_page_token returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of reference images. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferenceImages() - { - return $this->reference_images; - } - - /** - * The list of reference images. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ReferenceImage reference_images = 1; - * @param array<\Google\Cloud\Vision\V1\ReferenceImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferenceImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ReferenceImage::class); - $this->reference_images = $arr; - - return $this; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. Default 10, maximum 100. - * - * 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 next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next_page_token returned from a previous List request, if any. - * - * Generated from protobuf field string next_page_token = 3; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php deleted file mode 100644 index 6e85feb7fede..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocalizedObjectAnnotation.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.vision.v1.LocalizedObjectAnnotation - */ -class LocalizedObjectAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - */ - protected $mid = ''; - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - /** - * Image region to which this object belongs. This must be populated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - */ - protected $bounding_poly = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mid - * Object ID that should align with EntityAnnotation mid. - * @type string $language_code - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * @type string $name - * Object name, expressed in its `language_code` language. - * @type float $score - * Score of the result. Range [0, 1]. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * Image region to which this object belongs. This must be populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @return string - */ - public function getMid() - { - return $this->mid; - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @param string $var - * @return $this - */ - public function setMid($var) - { - GPBUtil::checkString($var, True); - $this->mid = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Object name, expressed in its `language_code` language. - * - * 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; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Image region to which this object belongs. This must be populated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * Image region to which this object belongs. This must be populated. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 5; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php deleted file mode 100644 index 02c79371bf4d..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/LocationInfo.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.vision.v1.LocationInfo - */ -class LocationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * lat/long location coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - */ - protected $lat_lng = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $lat_lng - * lat/long location coordinates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * lat/long location coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * lat/long location coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php deleted file mode 100644 index 20d663aa3bd5..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/NormalizedVertex.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.vision.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\Vision\V1\Geometry::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/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php deleted file mode 100644 index ae546b7644c5..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vision.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * The time when the batch request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * The time when the operation result was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Current state of the batch operation. - * @type \Google\Protobuf\Timestamp $create_time - * The time when the batch request was received. - * @type \Google\Protobuf\Timestamp $update_time - * The time when the operation result was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of the batch operation. - * - * Generated from protobuf field .google.cloud.vision.v1.OperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\OperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time when the batch request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @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 time when the batch request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time when the operation result was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @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 time when the operation result was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @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/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php deleted file mode 100644 index 345f7bb0a591..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OperationMetadata/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vision.v1.OperationMetadata.State - */ -class State -{ - /** - * Invalid. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is received. - * - * Generated from protobuf enum CREATED = 1; - */ - const CREATED = 1; - /** - * Request is actively being processed. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The batch processing is done. - * - * Generated from protobuf enum DONE = 3; - */ - const DONE = 3; - /** - * The batch processing was cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATED => 'CREATED', - self::RUNNING => 'RUNNING', - self::DONE => 'DONE', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Vision\V1\OperationMetadata_State::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php deleted file mode 100644 index 4273ce192966..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/OutputConfig.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.vision.v1.OutputConfig - */ -class OutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Google Cloud Storage location to write the output(s) to. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - */ - protected $gcs_destination = null; - /** - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * - * Generated from protobuf field int32 batch_size = 2; - */ - protected $batch_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\GcsDestination $gcs_destination - * The Google Cloud Storage location to write the output(s) to. - * @type int $batch_size - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to write the output(s) to. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @return \Google\Cloud\Vision\V1\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->gcs_destination; - } - - public function hasGcsDestination() - { - return isset($this->gcs_destination); - } - - public function clearGcsDestination() - { - unset($this->gcs_destination); - } - - /** - * The Google Cloud Storage location to write the output(s) to. - * - * Generated from protobuf field .google.cloud.vision.v1.GcsDestination gcs_destination = 1; - * @param \Google\Cloud\Vision\V1\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\GcsDestination::class); - $this->gcs_destination = $var; - - return $this; - } - - /** - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * - * Generated from protobuf field int32 batch_size = 2; - * @return int - */ - public function getBatchSize() - { - return $this->batch_size; - } - - /** - * The max number of response protos to put into each output JSON file on - * Google Cloud Storage. - * The valid range is [1, 100]. If not specified, the default value is 20. - * For example, for one pdf file with 100 pages, 100 response protos will - * be generated. If `batch_size` = 20, then 5 json files each - * containing 20 response protos will be written under the prefix - * `gcs_destination`.`uri`. - * Currently, batch_size only applies to GcsDestination, with potential future - * support for other output configurations. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php deleted file mode 100644 index 26020d0280b5..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Page.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.vision.v1.Page - */ -class Page extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected on the page. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 width = 2; - */ - protected $width = 0; - /** - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 height = 3; - */ - protected $height = 0; - /** - * List of blocks of text, images etc on this page. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; - */ - private $blocks; - /** - * Confidence of the OCR results on the page. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected on the page. - * @type int $width - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * @type int $height - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * @type array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $blocks - * List of blocks of text, images etc on this page. - * @type float $confidence - * Confidence of the OCR results on the page. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected on the page. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected on the page. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 width = 2; - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * Page width. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 width = 2; - * @param int $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkInt32($var); - $this->width = $var; - - return $this; - } - - /** - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 height = 3; - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * Page height. For PDFs the unit is points. For images (including - * TIFFs) the unit is pixels. - * - * Generated from protobuf field int32 height = 3; - * @param int $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkInt32($var); - $this->height = $var; - - return $this; - } - - /** - * List of blocks of text, images etc on this page. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBlocks() - { - return $this->blocks; - } - - /** - * List of blocks of text, images etc on this page. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Block blocks = 4; - * @param array<\Google\Cloud\Vision\V1\Block>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Block::class); - $this->blocks = $arr; - - return $this; - } - - /** - * Confidence of the OCR results on the page. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results on the page. Range [0, 1]. - * - * Generated from protobuf field float confidence = 5; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php deleted file mode 100644 index 0dbbb5b4367f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Paragraph.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.vision.v1.Paragraph - */ -class Paragraph extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the paragraph. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * List of all words in this paragraph. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; - */ - private $words; - /** - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the paragraph. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $words - * List of all words in this paragraph. - * @type float $confidence - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the paragraph. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the paragraph. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the paragraph. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * List of all words in this paragraph. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWords() - { - return $this->words; - } - - /** - * List of all words in this paragraph. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Word words = 3; - * @param array<\Google\Cloud\Vision\V1\Word>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Word::class); - $this->words = $arr; - - return $this; - } - - /** - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results for the paragraph. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php deleted file mode 100644 index 198ed9067d2e..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Position.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.vision.v1.Position - */ -class Position 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; - /** - * Z coordinate (or depth). - * - * Generated from protobuf field float z = 3; - */ - protected $z = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * X coordinate. - * @type float $y - * Y coordinate. - * @type float $z - * Z coordinate (or depth). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::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; - } - - /** - * Z coordinate (or depth). - * - * Generated from protobuf field float z = 3; - * @return float - */ - public function getZ() - { - return $this->z; - } - - /** - * Z coordinate (or depth). - * - * Generated from protobuf field float z = 3; - * @param float $var - * @return $this - */ - public function setZ($var) - { - GPBUtil::checkFloat($var); - $this->z = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php deleted file mode 100644 index 56502e7cfe56..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.vision.v1.Product - */ -class Product extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Immutable. The category for the product identified by the reference image. - * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", - * "apparel", and "toys" are still supported, but these should not be used for - * new products. - * - * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $product_category = ''; - /** - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - */ - private $product_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * @type string $display_name - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * @type string $description - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * @type string $product_category - * Immutable. The category for the product identified by the reference image. - * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", - * "apparel", and "toys" are still supported, but these should not be used for - * new products. - * @type array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $product_labels - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the product. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * This field is ignored when creating a product. - * - * 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 user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-provided name for this Product. Must not be empty. Must be at most - * 4096 characters long. - * - * 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; - } - - /** - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided metadata to be stored with this product. Must be at most 4096 - * characters long. - * - * 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; - } - - /** - * Immutable. The category for the product identified by the reference image. - * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", - * "apparel", and "toys" are still supported, but these should not be used for - * new products. - * - * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getProductCategory() - { - return $this->product_category; - } - - /** - * Immutable. The category for the product identified by the reference image. - * This should be one of "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", - * "apparel", and "toys" are still supported, but these should not be used for - * new products. - * - * Generated from protobuf field string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setProductCategory($var) - { - GPBUtil::checkString($var, True); - $this->product_category = $var; - - return $this; - } - - /** - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductLabels() - { - return $this->product_labels; - } - - /** - * Key-value pairs that can be attached to a product. At query time, - * constraints can be specified based on the product_labels. - * Note that integer values can be provided as strings, e.g. "1199". Only - * strings with integer values can match a range-based restriction which is - * to be supported soon. - * Multiple values can be assigned to the same key. One product may have up to - * 500 product_labels. - * Notice that the total number of distinct product_labels over all products - * in one ProductSet cannot exceed 1M, otherwise the product search pipeline - * will refuse to work for that ProductSet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5; - * @param array<\Google\Cloud\Vision\V1\Product\KeyValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Product\KeyValue::class); - $this->product_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php deleted file mode 100644 index 6f977cac6d14..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Product/KeyValue.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vision.v1.Product.KeyValue - */ -class KeyValue extends \Google\Protobuf\Internal\Message -{ - /** - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * @type string $value - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The key of the label attached to the product. Cannot be empty and cannot - * exceed 128 bytes. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the label attached to the product. Cannot be empty and - * cannot exceed 128 bytes. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KeyValue::class, \Google\Cloud\Vision\V1\Product_KeyValue::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php deleted file mode 100644 index 315a68ba9bc9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchParams.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.vision.v1.ProductSearchParams - */ -class ProductSearchParams extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - */ - protected $bounding_poly = null; - /** - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to - * be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * - * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { - */ - protected $product_set = ''; - /** - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * - * Generated from protobuf field repeated string product_categories = 7; - */ - private $product_categories; - /** - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * - * Generated from protobuf field string filter = 8; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * @type string $product_set - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to - * be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * @type array|\Google\Protobuf\Internal\RepeatedField $product_categories - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * @type string $filter - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon around the area of interest in the image. - * If it is not specified, system discretion will be applied. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 9; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to - * be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * - * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getProductSet() - { - return $this->product_set; - } - - /** - * The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to - * be searched for similar images. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * - * Generated from protobuf field string product_set = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProductSet($var) - { - GPBUtil::checkString($var, True); - $this->product_set = $var; - - return $this; - } - - /** - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * - * Generated from protobuf field repeated string product_categories = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductCategories() - { - return $this->product_categories; - } - - /** - * The list of product categories to search in. Currently, we only consider - * the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", - * "packagedgoods-v1", or "general-v1" should be specified. The legacy - * categories "homegoods", "apparel", and "toys" are still supported but will - * be deprecated. For new products, please use "homegoods-v2", "apparel-v2", - * or "toys-v2" for better product search accuracy. It is recommended to - * migrate existing products to these categories as well. - * - * Generated from protobuf field repeated string product_categories = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->product_categories = $arr; - - return $this; - } - - /** - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * - * Generated from protobuf field string filter = 8; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filtering expression. This can be used to restrict search results based - * on Product labels. We currently support an AND of OR of key-value - * expressions, where each expression within an OR must have the same key. An - * '=' should be used to connect the key and value. - * For example, "(color = red OR color = blue) AND brand = Google" is - * acceptable, but "(color = red OR brand = Google)" is not acceptable. - * "color: red" is not acceptable because it uses a ':' instead of an '='. - * - * Generated from protobuf field string filter = 8; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php deleted file mode 100644 index 44d025f0d729..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults - */ -class ProductSearchResults extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; - */ - protected $index_time = null; - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - */ - private $results; - /** - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - */ - private $product_grouped_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $index_time - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results - * List of results, one for each product match. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $product_grouped_results - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIndexTime() - { - return $this->index_time; - } - - public function hasIndexTime() - { - return isset($this->index_time); - } - - public function clearIndexTime() - { - unset($this->index_time); - } - - /** - * Timestamp of the index which provided these results. Products added to the - * product set and products removed from the product set after this time are - * not reflected in the current results. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIndexTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->index_time = $var; - - return $this; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 5; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); - $this->results = $arr; - - return $this; - } - - /** - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProductGroupedResults() - { - return $this->product_grouped_results; - } - - /** - * List of results grouped by products detected in the query image. Each entry - * corresponds to one bounding polygon in the query image, and contains the - * matching products specific to that region. There may be duplicate product - * matches in the union of all the per-product results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.GroupedResult product_grouped_results = 6; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProductGroupedResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\GroupedResult::class); - $this->product_grouped_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php deleted file mode 100644 index 9066aef0cfdf..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/GroupedResult.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults.GroupedResult - */ -class GroupedResult extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon around the product detected in the query image. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - */ - protected $bounding_poly = null; - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - */ - private $results; - /** - * List of generic predictions for the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - */ - private $object_annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_poly - * The bounding polygon around the product detected in the query image. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $results - * List of results, one for each product match. - * @type array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $object_annotations - * List of generic predictions for the object in the bounding box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon around the product detected in the query image. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingPoly() - { - return $this->bounding_poly; - } - - public function hasBoundingPoly() - { - return isset($this->bounding_poly); - } - - public function clearBoundingPoly() - { - unset($this->bounding_poly); - } - - /** - * The bounding polygon around the product detected in the query image. - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_poly = 1; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingPoly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_poly = $var; - - return $this; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * List of results, one for each product match. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.Result results = 2; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\Result>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\Result::class); - $this->results = $arr; - - return $this; - } - - /** - * List of generic predictions for the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getObjectAnnotations() - { - return $this->object_annotations; - } - - /** - * List of generic predictions for the object in the bounding box. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation object_annotations = 3; - * @param array<\Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setObjectAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\ProductSearchResults\ObjectAnnotation::class); - $this->object_annotations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupedResult::class, \Google\Cloud\Vision\V1\ProductSearchResults_GroupedResult::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php deleted file mode 100644 index a8005c3f6b30..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/ObjectAnnotation.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation - */ -class ObjectAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - */ - protected $mid = ''; - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mid - * Object ID that should align with EntityAnnotation mid. - * @type string $language_code - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * @type string $name - * Object name, expressed in its `language_code` language. - * @type float $score - * Score of the result. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @return string - */ - public function getMid() - { - return $this->mid; - } - - /** - * Object ID that should align with EntityAnnotation mid. - * - * Generated from protobuf field string mid = 1; - * @param string $var - * @return $this - */ - public function setMid($var) - { - GPBUtil::checkString($var, True); - $this->mid = $var; - - return $this; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Object name, expressed in its `language_code` language. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Object name, expressed in its `language_code` language. - * - * 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; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Score of the result. Range [0, 1]. - * - * Generated from protobuf field float score = 4; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ObjectAnnotation::class, \Google\Cloud\Vision\V1\ProductSearchResults_ObjectAnnotation::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php deleted file mode 100644 index 4fa9d2e05b69..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSearchResults/Result.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.vision.v1.ProductSearchResults.Result - */ -class Result extends \Google\Protobuf\Internal\Message -{ - /** - * The Product. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; - */ - protected $product = null; - /** - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * The resource name of the image from the product that is the closest match - * to the query. - * - * Generated from protobuf field string image = 3; - */ - protected $image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\Product $product - * The Product. - * @type float $score - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * @type string $image - * The resource name of the image from the product that is the closest match - * to the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearch::initOnce(); - parent::__construct($data); - } - - /** - * The Product. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; - * @return \Google\Cloud\Vision\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * The Product. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1; - * @param \Google\Cloud\Vision\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * A confidence level on the match, ranging from 0 (no confidence) to - * 1 (full confidence). - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * The resource name of the image from the product that is the closest match - * to the query. - * - * Generated from protobuf field string image = 3; - * @return string - */ - public function getImage() - { - return $this->image; - } - - /** - * The resource name of the image from the product that is the closest match - * to the query. - * - * Generated from protobuf field string image = 3; - * @param string $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkString($var, True); - $this->image = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\Vision\V1\ProductSearchResults_Result::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php deleted file mode 100644 index fae1466b47f3..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSet.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.vision.v1.ProductSet - */ -class ProductSet extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_time = null; - /** - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * @type string $display_name - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * @type \Google\Protobuf\Timestamp $index_time - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * @type \Google\Rpc\Status $index_error - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - * This field is ignored when creating a ProductSet. - * - * 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 user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-provided name for this ProductSet. Must not be empty. Must be at - * most 4096 characters long. - * - * 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; - } - - /** - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIndexTime() - { - return $this->index_time; - } - - public function hasIndexTime() - { - return isset($this->index_time); - } - - public function clearIndexTime() - { - unset($this->index_time); - } - - /** - * Output only. The time at which this ProductSet was last indexed. Query - * results will reflect all updates before this time. If this ProductSet has - * never been indexed, this timestamp is the default value - * "1970-01-01T00:00:00Z". - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.protobuf.Timestamp index_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIndexTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->index_time = $var; - - return $this; - } - - /** - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getIndexError() - { - return $this->index_error; - } - - public function hasIndexError() - { - return isset($this->index_error); - } - - public function clearIndexError() - { - unset($this->index_error); - } - - /** - * Output only. If there was an error with indexing the product set, the field - * is populated. - * This field is ignored when creating a ProductSet. - * - * Generated from protobuf field .google.rpc.Status index_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setIndexError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->index_error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php deleted file mode 100644 index b433c625acb4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ProductSetPurgeConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.vision.v1.ProductSetPurgeConfig - */ -class ProductSetPurgeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * - * Generated from protobuf field string product_set_id = 1; - */ - protected $product_set_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $product_set_id - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * - * Generated from protobuf field string product_set_id = 1; - * @return string - */ - public function getProductSetId() - { - return $this->product_set_id; - } - - /** - * The ProductSet that contains the Products to delete. If a Product is a - * member of product_set_id in addition to other ProductSets, the Product will - * still be deleted. - * - * Generated from protobuf field string product_set_id = 1; - * @param string $var - * @return $this - */ - public function setProductSetId($var) - { - GPBUtil::checkString($var, True); - $this->product_set_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php deleted file mode 100644 index 3fb9058b77b0..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Property.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vision.v1.Property - */ -class Property extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the property. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Value of the property. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - /** - * Value of numeric properties. - * - * Generated from protobuf field uint64 uint64_value = 3; - */ - protected $uint64_value = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the property. - * @type string $value - * Value of the property. - * @type int|string $uint64_value - * Value of numeric properties. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Name of the property. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the property. - * - * 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; - } - - /** - * Value of the property. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Value of the property. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Value of numeric properties. - * - * Generated from protobuf field uint64 uint64_value = 3; - * @return int|string - */ - public function getUint64Value() - { - return $this->uint64_value; - } - - /** - * Value of numeric properties. - * - * Generated from protobuf field uint64 uint64_value = 3; - * @param int|string $var - * @return $this - */ - public function setUint64Value($var) - { - GPBUtil::checkUint64($var); - $this->uint64_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php deleted file mode 100644 index 9633606d6678..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/PurgeProductsRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.vision.v1.PurgeProductsRequest - */ -class PurgeProductsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The default value is false. Override this value to true to actually perform - * the purge. - * - * Generated from protobuf field bool force = 4; - */ - protected $force = false; - protected $target; - - /** - * @param string $parent Required. The project and location in which the Products should be deleted. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. Please see - * {@see ProductSearchClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\PurgeProductsRequest - * - * @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 \Google\Cloud\Vision\V1\ProductSetPurgeConfig $product_set_purge_config - * Specify which ProductSet contains the Products to be deleted. - * @type bool $delete_orphan_products - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * @type string $parent - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @type bool $force - * The default value is false. Override this value to true to actually perform - * the purge. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Specify which ProductSet contains the Products to be deleted. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @return \Google\Cloud\Vision\V1\ProductSetPurgeConfig|null - */ - public function getProductSetPurgeConfig() - { - return $this->readOneof(2); - } - - public function hasProductSetPurgeConfig() - { - return $this->hasOneof(2); - } - - /** - * Specify which ProductSet contains the Products to be deleted. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSetPurgeConfig product_set_purge_config = 2; - * @param \Google\Cloud\Vision\V1\ProductSetPurgeConfig $var - * @return $this - */ - public function setProductSetPurgeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSetPurgeConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * - * Generated from protobuf field bool delete_orphan_products = 3; - * @return bool - */ - public function getDeleteOrphanProducts() - { - return $this->readOneof(3); - } - - public function hasDeleteOrphanProducts() - { - return $this->hasOneof(3); - } - - /** - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * - * Generated from protobuf field bool delete_orphan_products = 3; - * @param bool $var - * @return $this - */ - public function setDeleteOrphanProducts($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. The project and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_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 and location in which the Products should be deleted. - * Format is `projects/PROJECT_ID/locations/LOC_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 default value is false. Override this value to true to actually perform - * the purge. - * - * Generated from protobuf field bool force = 4; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * The default value is false. Override this value to true to actually perform - * the purge. - * - * Generated from protobuf field bool force = 4; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php deleted file mode 100644 index a4371a4149d9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/ReferenceImage.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.vision.v1.ReferenceImage - */ -class ReferenceImage extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Optional. Bounding polygons around the areas of interest in the reference - * image. If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $bounding_polys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * @type string $uri - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * @type array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $bounding_polys - * Optional. Bounding polygons around the areas of interest in the reference - * image. If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the reference image. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * This field is ignored when creating a reference image. - * - * 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 Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The Google Cloud Storage URI of the reference image. - * The URI must start with `gs://`. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Optional. Bounding polygons around the areas of interest in the reference - * image. If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBoundingPolys() - { - return $this->bounding_polys; - } - - /** - * Optional. Bounding polygons around the areas of interest in the reference - * image. If this field is empty, the system will try to detect regions of - * interest. At most 10 bounding polygons will be used. - * The provided shape is converted into a non-rotated rectangle. Once - * converted, the small edge of the rectangle must be greater than or equal - * to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 - * is not). - * - * Generated from protobuf field repeated .google.cloud.vision.v1.BoundingPoly bounding_polys = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Vision\V1\BoundingPoly>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBoundingPolys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_polys = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php deleted file mode 100644 index 344af637ba5f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/RemoveProductFromProductSetRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.vision.v1.RemoveProductFromProductSetRequest - */ -class RemoveProductFromProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The resource name for the Product to be removed from this - * ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $product = ''; - - /** - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * Please see {@see ProductSearchClient::productSetName()} for help formatting this field. - * @param string $product Required. The resource name for the Product to be removed from this - * ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * Please see {@see ProductSearchClient::productName()} for help formatting this field. - * - * @return \Google\Cloud\Vision\V1\RemoveProductFromProductSetRequest - * - * @experimental - */ - public static function build(string $name, string $product): self - { - return (new self()) - ->setName($name) - ->setProduct($product); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @type string $product - * Required. The resource name for the Product to be removed from this - * ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 for the ProductSet to modify. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_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 resource name for the Product to be removed from this - * ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProduct() - { - return $this->product; - } - - /** - * Required. The resource name for the Product to be removed from this - * ProductSet. - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * - * Generated from protobuf field string product = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkString($var, True); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php deleted file mode 100644 index 58c2b95955e4..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/SafeSearchAnnotation.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vision.v1.SafeSearchAnnotation - */ -class SafeSearchAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; - */ - protected $adult = 0; - /** - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; - */ - protected $spoof = 0; - /** - * Likelihood that this is a medical image. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; - */ - protected $medical = 0; - /** - * Likelihood that this image contains violent content. Violent content may - * include death, serious harm, or injury to individuals or groups of - * individuals. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; - */ - protected $violence = 0; - /** - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; - */ - protected $racy = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $adult - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * @type int $spoof - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * @type int $medical - * Likelihood that this is a medical image. - * @type int $violence - * Likelihood that this image contains violent content. Violent content may - * include death, serious harm, or injury to individuals or groups of - * individuals. - * @type int $racy - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; - * @return int - */ - public function getAdult() - { - return $this->adult; - } - - /** - * Represents the adult content likelihood for the image. Adult content may - * contain elements such as nudity, pornographic images or cartoons, or - * sexual activities. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood adult = 1; - * @param int $var - * @return $this - */ - public function setAdult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->adult = $var; - - return $this; - } - - /** - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; - * @return int - */ - public function getSpoof() - { - return $this->spoof; - } - - /** - * Spoof likelihood. The likelihood that an modification - * was made to the image's canonical version to make it appear - * funny or offensive. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood spoof = 2; - * @param int $var - * @return $this - */ - public function setSpoof($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->spoof = $var; - - return $this; - } - - /** - * Likelihood that this is a medical image. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; - * @return int - */ - public function getMedical() - { - return $this->medical; - } - - /** - * Likelihood that this is a medical image. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood medical = 3; - * @param int $var - * @return $this - */ - public function setMedical($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->medical = $var; - - return $this; - } - - /** - * Likelihood that this image contains violent content. Violent content may - * include death, serious harm, or injury to individuals or groups of - * individuals. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; - * @return int - */ - public function getViolence() - { - return $this->violence; - } - - /** - * Likelihood that this image contains violent content. Violent content may - * include death, serious harm, or injury to individuals or groups of - * individuals. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood violence = 4; - * @param int $var - * @return $this - */ - public function setViolence($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->violence = $var; - - return $this; - } - - /** - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; - * @return int - */ - public function getRacy() - { - return $this->racy; - } - - /** - * Likelihood that the request image contains racy content. Racy content may - * include (but is not limited to) skimpy or sheer clothing, strategically - * covered nudity, lewd or provocative poses, or close-ups of sensitive - * body areas. - * - * Generated from protobuf field .google.cloud.vision.v1.Likelihood racy = 9; - * @param int $var - * @return $this - */ - public function setRacy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class); - $this->racy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php deleted file mode 100644 index 4fe27114775f..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Symbol.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.vision.v1.Symbol - */ -class Symbol extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the symbol. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * The actual UTF-8 representation of the symbol. - * - * Generated from protobuf field string text = 3; - */ - protected $text = ''; - /** - * Confidence of the OCR results for the symbol. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the symbol. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type string $text - * The actual UTF-8 representation of the symbol. - * @type float $confidence - * Confidence of the OCR results for the symbol. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the symbol. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the symbol. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the symbol. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * The actual UTF-8 representation of the symbol. - * - * Generated from protobuf field string text = 3; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The actual UTF-8 representation of the symbol. - * - * Generated from protobuf field string text = 3; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Confidence of the OCR results for the symbol. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results for the symbol. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php deleted file mode 100644 index e736837aaee1..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation.php +++ /dev/null @@ -1,108 +0,0 @@ - Page -> Block -> Paragraph -> Word -> Symbol - * Each structural component, starting from Page, may further have their own - * properties. Properties describe detected languages, breaks etc.. Please refer - * to the - * [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] - * message definition below for more detail. - * - * Generated from protobuf message google.cloud.vision.v1.TextAnnotation - */ -class TextAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * List of pages detected by OCR. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; - */ - private $pages; - /** - * UTF-8 text detected on the pages. - * - * Generated from protobuf field string text = 2; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $pages - * List of pages detected by OCR. - * @type string $text - * UTF-8 text detected on the pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * List of pages detected by OCR. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPages() - { - return $this->pages; - } - - /** - * List of pages detected by OCR. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1; - * @param array<\Google\Cloud\Vision\V1\Page>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Page::class); - $this->pages = $arr; - - return $this; - } - - /** - * UTF-8 text detected on the pages. - * - * Generated from protobuf field string text = 2; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * UTF-8 text detected on the pages. - * - * Generated from protobuf field string text = 2; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php deleted file mode 100644 index 7844b2387083..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.DetectedBreak - */ -class DetectedBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - */ - protected $type = 0; - /** - * True if break prepends the element. - * - * Generated from protobuf field bool is_prefix = 2; - */ - protected $is_prefix = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Detected break type. - * @type bool $is_prefix - * True if break prepends the element. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Detected break type. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak\BreakType::class); - $this->type = $var; - - return $this; - } - - /** - * True if break prepends the element. - * - * Generated from protobuf field bool is_prefix = 2; - * @return bool - */ - public function getIsPrefix() - { - return $this->is_prefix; - } - - /** - * True if break prepends the element. - * - * Generated from protobuf field bool is_prefix = 2; - * @param bool $var - * @return $this - */ - public function setIsPrefix($var) - { - GPBUtil::checkBool($var); - $this->is_prefix = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DetectedBreak::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php deleted file mode 100644 index 455626c48545..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedBreak/BreakType.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType - */ -class BreakType -{ - /** - * Unknown break label type. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Regular space. - * - * Generated from protobuf enum SPACE = 1; - */ - const SPACE = 1; - /** - * Sure space (very wide). - * - * Generated from protobuf enum SURE_SPACE = 2; - */ - const SURE_SPACE = 2; - /** - * Line-wrapping break. - * - * Generated from protobuf enum EOL_SURE_SPACE = 3; - */ - const EOL_SURE_SPACE = 3; - /** - * End-line hyphen that is not present in text; does not co-occur with - * `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`. - * - * Generated from protobuf enum HYPHEN = 4; - */ - const HYPHEN = 4; - /** - * Line break that ends a paragraph. - * - * Generated from protobuf enum LINE_BREAK = 5; - */ - const LINE_BREAK = 5; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::SPACE => 'SPACE', - self::SURE_SPACE => 'SURE_SPACE', - self::EOL_SURE_SPACE => 'EOL_SURE_SPACE', - self::HYPHEN => 'HYPHEN', - self::LINE_BREAK => 'LINE_BREAK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakType::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak_BreakType::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php deleted file mode 100644 index d2c4a7623404..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/DetectedLanguage.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.DetectedLanguage - */ -class DetectedLanguage extends \Google\Protobuf\Internal\Message -{ - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * Confidence of detected language. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * @type float $confidence - * Confidence of detected language. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as "en-US" or "sr-Latn". For more - * information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Confidence of detected language. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of detected language. Range [0, 1]. - * - * Generated from protobuf field float confidence = 2; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DetectedLanguage::class, \Google\Cloud\Vision\V1\TextAnnotation_DetectedLanguage::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php deleted file mode 100644 index 3dbed38cafb6..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextAnnotation/TextProperty.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.vision.v1.TextAnnotation.TextProperty - */ -class TextProperty extends \Google\Protobuf\Internal\Message -{ - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - */ - private $detected_languages; - /** - * Detected start or end of a text segment. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - */ - protected $detected_break = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages - * A list of detected languages together with confidence. - * @type \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $detected_break - * Detected start or end of a text segment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetectedLanguages() - { - return $this->detected_languages; - } - - /** - * A list of detected languages together with confidence. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.TextAnnotation.DetectedLanguage detected_languages = 1; - * @param array<\Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetectedLanguages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\TextAnnotation\DetectedLanguage::class); - $this->detected_languages = $arr; - - return $this; - } - - /** - * Detected start or end of a text segment. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @return \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak|null - */ - public function getDetectedBreak() - { - return $this->detected_break; - } - - public function hasDetectedBreak() - { - return isset($this->detected_break); - } - - public function clearDetectedBreak() - { - unset($this->detected_break); - } - - /** - * Detected start or end of a text segment. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.DetectedBreak detected_break = 2; - * @param \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak $var - * @return $this - */ - public function setDetectedBreak($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\DetectedBreak::class); - $this->detected_break = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextProperty::class, \Google\Cloud\Vision\V1\TextAnnotation_TextProperty::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php deleted file mode 100644 index b61fb377a093..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/TextDetectionParams.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.vision.v1.TextDetectionParams - */ -class TextDetectionParams extends \Google\Protobuf\Internal\Message -{ - /** - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * - * Generated from protobuf field bool enable_text_detection_confidence_score = 9; - */ - protected $enable_text_detection_confidence_score = false; - /** - * A list of advanced OCR options to further fine-tune OCR behavior. - * Current valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * - * Generated from protobuf field repeated string advanced_ocr_options = 11; - */ - private $advanced_ocr_options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_text_detection_confidence_score - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * @type array|\Google\Protobuf\Internal\RepeatedField $advanced_ocr_options - * A list of advanced OCR options to further fine-tune OCR behavior. - * Current valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * - * Generated from protobuf field bool enable_text_detection_confidence_score = 9; - * @return bool - */ - public function getEnableTextDetectionConfidenceScore() - { - return $this->enable_text_detection_confidence_score; - } - - /** - * By default, Cloud Vision API only includes confidence score for - * DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence - * score for TEXT_DETECTION as well. - * - * Generated from protobuf field bool enable_text_detection_confidence_score = 9; - * @param bool $var - * @return $this - */ - public function setEnableTextDetectionConfidenceScore($var) - { - GPBUtil::checkBool($var); - $this->enable_text_detection_confidence_score = $var; - - return $this; - } - - /** - * A list of advanced OCR options to further fine-tune OCR behavior. - * Current valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * - * Generated from protobuf field repeated string advanced_ocr_options = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdvancedOcrOptions() - { - return $this->advanced_ocr_options; - } - - /** - * A list of advanced OCR options to further fine-tune OCR behavior. - * Current valid values are: - * - `legacy_layout`: a heuristics layout detection algorithm, which serves as - * an alternative to the current ML-based layout detection algorithm. - * Customers can choose the best suitable layout algorithm based on their - * situation. - * - * Generated from protobuf field repeated string advanced_ocr_options = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdvancedOcrOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->advanced_ocr_options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php deleted file mode 100644 index 91ab72f3f77e..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.vision.v1.UpdateProductRequest - */ -class UpdateProductRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product = null; - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Vision\V1\Product $product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * @return \Google\Cloud\Vision\V1\UpdateProductRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Vision\V1\Product $product, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProduct($product) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\Product $product - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @type \Google\Protobuf\FieldMask $update_mask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * - * Generated from protobuf field .google.cloud.vision.v1.Product product = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class); - $this->product = $var; - - return $this; - } - - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * 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 [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php deleted file mode 100644 index f3efd0e6405a..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/UpdateProductSetRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.vision.v1.UpdateProductSetRequest - */ -class UpdateProductSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ProductSet resource which replaces the one on the server. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $product_set = null; - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Vision\V1\ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. - * @param \Google\Protobuf\FieldMask $updateMask The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * @return \Google\Cloud\Vision\V1\UpdateProductSetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Vision\V1\ProductSet $productSet, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProductSet($productSet) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\ProductSet $product_set - * Required. The ProductSet resource which replaces the one on the server. - * @type \Google\Protobuf\FieldMask $update_mask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ProductSet resource which replaces the one on the server. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Vision\V1\ProductSet|null - */ - public function getProductSet() - { - return $this->product_set; - } - - public function hasProductSet() - { - return isset($this->product_set); - } - - public function clearProductSet() - { - unset($this->product_set); - } - - /** - * Required. The ProductSet resource which replaces the one on the server. - * - * Generated from protobuf field .google.cloud.vision.v1.ProductSet product_set = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Vision\V1\ProductSet $var - * @return $this - */ - public function setProductSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSet::class); - $this->product_set = $var; - - return $this; - } - - /** - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * 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 [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * - * 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/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php deleted file mode 100644 index 2944b434c7a6..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Vertex.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vision.v1.Vertex - */ -class Vertex extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - */ - protected $x = 0; - /** - * Y coordinate. - * - * Generated from protobuf field int32 y = 2; - */ - protected $y = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $x - * X coordinate. - * @type int $y - * Y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\Geometry::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - * @return int - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field int32 x = 1; - * @param int $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkInt32($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate. - * - * Generated from protobuf field int32 y = 2; - * @return int - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate. - * - * Generated from protobuf field int32 y = 2; - * @param int $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkInt32($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php deleted file mode 100644 index 7210409bd479..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.vision.v1.WebDetection - */ -class WebDetection extends \Google\Protobuf\Internal\Message -{ - /** - * Deduced entities from similar images on the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - */ - private $web_entities; - /** - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - */ - private $full_matching_images; - /** - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - */ - private $partial_matching_images; - /** - * Web pages containing the matching images from the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - */ - private $pages_with_matching_images; - /** - * The visually similar image results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - */ - private $visually_similar_images; - /** - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - */ - private $best_guess_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $web_entities - * Deduced entities from similar images on the Internet. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $pages_with_matching_images - * Web pages containing the matching images from the Internet. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $visually_similar_images - * The visually similar image results. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $best_guess_labels - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * Deduced entities from similar images on the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWebEntities() - { - return $this->web_entities; - } - - /** - * Deduced entities from similar images on the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebEntity web_entities = 1; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebEntity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWebEntities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebEntity::class); - $this->web_entities = $arr; - - return $this; - } - - /** - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFullMatchingImages() - { - return $this->full_matching_images; - } - - /** - * Fully matching images from the Internet. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 2; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFullMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->full_matching_images = $arr; - - return $this; - } - - /** - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialMatchingImages() - { - return $this->partial_matching_images; - } - - /** - * Partial matching images from the Internet. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 3; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartialMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->partial_matching_images = $arr; - - return $this; - } - - /** - * Web pages containing the matching images from the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPagesWithMatchingImages() - { - return $this->pages_with_matching_images; - } - - /** - * Web pages containing the matching images from the Internet. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebPage pages_with_matching_images = 4; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebPage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPagesWithMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebPage::class); - $this->pages_with_matching_images = $arr; - - return $this; - } - - /** - * The visually similar image results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisuallySimilarImages() - { - return $this->visually_similar_images; - } - - /** - * The visually similar image results. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage visually_similar_images = 6; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisuallySimilarImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->visually_similar_images = $arr; - - return $this; - } - - /** - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBestGuessLabels() - { - return $this->best_guess_labels; - } - - /** - * The service's best guess as to the topic of the request image. - * Inferred from similar images on the open web. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebLabel best_guess_labels = 8; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebLabel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBestGuessLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebLabel::class); - $this->best_guess_labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php deleted file mode 100644 index 7ed5190c9507..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebEntity.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebEntity - */ -class WebEntity extends \Google\Protobuf\Internal\Message -{ - /** - * Opaque entity ID. - * - * Generated from protobuf field string entity_id = 1; - */ - protected $entity_id = ''; - /** - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * Canonical description of the entity, in English. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity_id - * Opaque entity ID. - * @type float $score - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * @type string $description - * Canonical description of the entity, in English. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * Opaque entity ID. - * - * Generated from protobuf field string entity_id = 1; - * @return string - */ - public function getEntityId() - { - return $this->entity_id; - } - - /** - * Opaque entity ID. - * - * Generated from protobuf field string entity_id = 1; - * @param string $var - * @return $this - */ - public function setEntityId($var) - { - GPBUtil::checkString($var, True); - $this->entity_id = $var; - - return $this; - } - - /** - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Overall relevancy score for the entity. - * Not normalized and not comparable across different image queries. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Canonical description of the entity, in English. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Canonical description of the entity, in English. - * - * 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; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebEntity::class, \Google\Cloud\Vision\V1\WebDetection_WebEntity::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php deleted file mode 100644 index 0a74c6f6392c..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebImage.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebImage - */ -class WebImage extends \Google\Protobuf\Internal\Message -{ - /** - * The result image URL. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * (Deprecated) Overall relevancy score for the image. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The result image URL. - * @type float $score - * (Deprecated) Overall relevancy score for the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * The result image URL. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The result image URL. - * - * 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; - } - - /** - * (Deprecated) Overall relevancy score for the image. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * (Deprecated) Overall relevancy score for the image. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebImage::class, \Google\Cloud\Vision\V1\WebDetection_WebImage::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php deleted file mode 100644 index 455b38bf8f91..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebLabel.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebLabel - */ -class WebLabel extends \Google\Protobuf\Internal\Message -{ - /** - * Label for extra metadata. - * - * Generated from protobuf field string label = 1; - */ - protected $label = ''; - /** - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - */ - protected $language_code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $label - * Label for extra metadata. - * @type string $language_code - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * Label for extra metadata. - * - * Generated from protobuf field string label = 1; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label for extra metadata. - * - * Generated from protobuf field string label = 1; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - * For more information, see - * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - * - * Generated from protobuf field string language_code = 2; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebLabel::class, \Google\Cloud\Vision\V1\WebDetection_WebLabel::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php deleted file mode 100644 index a7ebc3422453..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetection/WebPage.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.vision.v1.WebDetection.WebPage - */ -class WebPage extends \Google\Protobuf\Internal\Message -{ - /** - * The result web page URL. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * (Deprecated) Overall relevancy score for the web page. - * - * Generated from protobuf field float score = 2; - */ - protected $score = 0.0; - /** - * Title for the web page, may contain HTML markups. - * - * Generated from protobuf field string page_title = 3; - */ - protected $page_title = ''; - /** - * Fully matching images on the page. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - */ - private $full_matching_images; - /** - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - */ - private $partial_matching_images; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The result web page URL. - * @type float $score - * (Deprecated) Overall relevancy score for the web page. - * @type string $page_title - * Title for the web page, may contain HTML markups. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $full_matching_images - * Fully matching images on the page. - * Can include resized copies of the query image. - * @type array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $partial_matching_images - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\WebDetection::initOnce(); - parent::__construct($data); - } - - /** - * The result web page URL. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The result web page URL. - * - * 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; - } - - /** - * (Deprecated) Overall relevancy score for the web page. - * - * Generated from protobuf field float score = 2; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * (Deprecated) Overall relevancy score for the web page. - * - * Generated from protobuf field float score = 2; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Title for the web page, may contain HTML markups. - * - * Generated from protobuf field string page_title = 3; - * @return string - */ - public function getPageTitle() - { - return $this->page_title; - } - - /** - * Title for the web page, may contain HTML markups. - * - * Generated from protobuf field string page_title = 3; - * @param string $var - * @return $this - */ - public function setPageTitle($var) - { - GPBUtil::checkString($var, True); - $this->page_title = $var; - - return $this; - } - - /** - * Fully matching images on the page. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFullMatchingImages() - { - return $this->full_matching_images; - } - - /** - * Fully matching images on the page. - * Can include resized copies of the query image. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage full_matching_images = 4; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFullMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->full_matching_images = $arr; - - return $this; - } - - /** - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialMatchingImages() - { - return $this->partial_matching_images; - } - - /** - * Partial matching images on the page. - * Those images are similar enough to share some key-point features. For - * example an original image will likely have partial matching for its - * crops. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.WebDetection.WebImage partial_matching_images = 5; - * @param array<\Google\Cloud\Vision\V1\WebDetection\WebImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartialMatchingImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\WebDetection\WebImage::class); - $this->partial_matching_images = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebPage::class, \Google\Cloud\Vision\V1\WebDetection_WebPage::class); - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php deleted file mode 100644 index 2a5e2e544fa9..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/WebDetectionParams.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.vision.v1.WebDetectionParams - */ -class WebDetectionParams extends \Google\Protobuf\Internal\Message -{ - /** - * This field has no effect on results. - * - * Generated from protobuf field bool include_geo_results = 2 [deprecated = true]; - * @deprecated - */ - protected $include_geo_results = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $include_geo_results - * This field has no effect on results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce(); - parent::__construct($data); - } - - /** - * This field has no effect on results. - * - * Generated from protobuf field bool include_geo_results = 2 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getIncludeGeoResults() - { - @trigger_error('include_geo_results is deprecated.', E_USER_DEPRECATED); - return $this->include_geo_results; - } - - /** - * This field has no effect on results. - * - * Generated from protobuf field bool include_geo_results = 2 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setIncludeGeoResults($var) - { - @trigger_error('include_geo_results is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->include_geo_results = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php b/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php deleted file mode 100644 index e753e3772569..000000000000 --- a/owl-bot-staging/Vision/V1/proto/src/Google/Cloud/Vision/V1/Word.php +++ /dev/null @@ -1,249 +0,0 @@ -google.cloud.vision.v1.Word - */ -class Word extends \Google\Protobuf\Internal\Message -{ - /** - * Additional information detected for the word. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - */ - protected $property = null; - /** - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - */ - protected $bounding_box = null; - /** - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; - */ - private $symbols; - /** - * Confidence of the OCR results for the word. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $property - * Additional information detected for the word. - * @type \Google\Cloud\Vision\V1\BoundingPoly $bounding_box - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * @type array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $symbols - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * @type float $confidence - * Confidence of the OCR results for the word. Range [0, 1]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vision\V1\TextAnnotation::initOnce(); - parent::__construct($data); - } - - /** - * Additional information detected for the word. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @return \Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null - */ - public function getProperty() - { - return $this->property; - } - - public function hasProperty() - { - return isset($this->property); - } - - public function clearProperty() - { - unset($this->property); - } - - /** - * Additional information detected for the word. - * - * Generated from protobuf field .google.cloud.vision.v1.TextAnnotation.TextProperty property = 1; - * @param \Google\Cloud\Vision\V1\TextAnnotation\TextProperty $var - * @return $this - */ - public function setProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation\TextProperty::class); - $this->property = $var; - - return $this; - } - - /** - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @return \Google\Cloud\Vision\V1\BoundingPoly|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * The bounding box for the word. - * The vertices are in the order of top-left, top-right, bottom-right, - * bottom-left. When a rotation of the bounding box is detected the rotation - * is represented as around the top-left corner as defined when the text is - * read in the 'natural' orientation. - * For example: - * * when the text is horizontal it might look like: - * 0----1 - * | | - * 3----2 - * * when it's rotated 180 degrees around the top-left corner it becomes: - * 2----3 - * | | - * 1----0 - * and the vertex order will still be (0, 1, 2, 3). - * - * Generated from protobuf field .google.cloud.vision.v1.BoundingPoly bounding_box = 2; - * @param \Google\Cloud\Vision\V1\BoundingPoly $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\BoundingPoly::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSymbols() - { - return $this->symbols; - } - - /** - * List of symbols in the word. - * The order of the symbols follows the natural reading order. - * - * Generated from protobuf field repeated .google.cloud.vision.v1.Symbol symbols = 3; - * @param array<\Google\Cloud\Vision\V1\Symbol>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSymbols($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Symbol::class); - $this->symbols = $arr; - - return $this; - } - - /** - * Confidence of the OCR results for the word. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * Confidence of the OCR results for the word. Range [0, 1]. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php deleted file mode 100644 index cc350ef5096b..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php +++ /dev/null @@ -1,77 +0,0 @@ -setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $imageAnnotatorClient->asyncBatchAnnotateFiles($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AsyncBatchAnnotateFilesResponse $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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php deleted file mode 100644 index 795d3b5d4c71..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php +++ /dev/null @@ -1,83 +0,0 @@ -setRequests($requests) - ->setOutputConfig($outputConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $imageAnnotatorClient->asyncBatchAnnotateImages($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AsyncBatchAnnotateImagesResponse $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 vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php deleted file mode 100644 index 255a714c1c06..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_files.php +++ /dev/null @@ -1,66 +0,0 @@ -setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var BatchAnnotateFilesResponse $response */ - $response = $imageAnnotatorClient->batchAnnotateFiles($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php b/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php deleted file mode 100644 index 8dea45dcd8f5..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ImageAnnotatorClient/batch_annotate_images.php +++ /dev/null @@ -1,60 +0,0 @@ -setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var BatchAnnotateImagesResponse $response */ - $response = $imageAnnotatorClient->batchAnnotateImages($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php deleted file mode 100644 index 3cadb7c9f92c..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/add_product_to_product_set.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName) - ->setProduct($formattedProduct); - - // Call the API and handle any network failures. - try { - $productSearchClient->addProductToProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - add_product_to_product_set_sample($formattedName, $formattedProduct); -} -// [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php deleted file mode 100644 index c169d9bae9f6..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setProduct($product); - - // Call the API and handle any network failures. - try { - /** @var Product $response */ - $response = $productSearchClient->createProduct($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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - create_product_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php deleted file mode 100644 index 640ec3e9e39e..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_product_set.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setProductSet($productSet); - - // Call the API and handle any network failures. - try { - /** @var ProductSet $response */ - $response = $productSearchClient->createProductSet($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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - create_product_set_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php deleted file mode 100644 index a000c147b7d6..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/create_reference_image.php +++ /dev/null @@ -1,100 +0,0 @@ -setUri($referenceImageUri); - $request = (new CreateReferenceImageRequest()) - ->setParent($formattedParent) - ->setReferenceImage($referenceImage); - - // Call the API and handle any network failures. - try { - /** @var ReferenceImage $response */ - $response = $productSearchClient->createReferenceImage($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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImageUri = '[URI]'; - - create_reference_image_sample($formattedParent, $referenceImageUri); -} -// [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php deleted file mode 100644 index 4db20989da50..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $productSearchClient->deleteProduct($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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - delete_product_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php deleted file mode 100644 index 915bf3a2a3df..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_product_set.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $productSearchClient->deleteProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - - delete_product_set_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php deleted file mode 100644 index 84323a70e329..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/delete_reference_image.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $productSearchClient->deleteReferenceImage($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 = ProductSearchClient::referenceImageName( - '[PROJECT]', - '[LOCATION]', - '[PRODUCT]', - '[REFERENCE_IMAGE]' - ); - - delete_reference_image_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php deleted file mode 100644 index d2c9ed4c5bb4..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Product $response */ - $response = $productSearchClient->getProduct($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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - get_product_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php deleted file mode 100644 index 67fc8cd72f32..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_product_set.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ProductSet $response */ - $response = $productSearchClient->getProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - - get_product_set_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php deleted file mode 100644 index 74864ce18356..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/get_reference_image.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReferenceImage $response */ - $response = $productSearchClient->getReferenceImage($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 = ProductSearchClient::referenceImageName( - '[PROJECT]', - '[LOCATION]', - '[PRODUCT]', - '[REFERENCE_IMAGE]' - ); - - get_reference_image_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php deleted file mode 100644 index d1d8d3a970e2..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/import_product_sets.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setInputConfig($inputConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $productSearchClient->importProductSets($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportProductSetsResponse $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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - import_product_sets_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php deleted file mode 100644 index b1b5b0c77e4a..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_product_sets.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $productSearchClient->listProductSets($request); - - /** @var ProductSet $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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - list_product_sets_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php deleted file mode 100644 index 1591a71fb9c9..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $productSearchClient->listProducts($request); - - /** @var Product $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 = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - list_products_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php deleted file mode 100644 index 47fd49c66d4d..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_products_in_product_set.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $productSearchClient->listProductsInProductSet($request); - - /** @var Product $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 -{ - $formattedName = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - - list_products_in_product_set_sample($formattedName); -} -// [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php deleted file mode 100644 index 4208bed59fef..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/list_reference_images.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $productSearchClient->listReferenceImages($request); - - /** @var ReferenceImage $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 = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - list_reference_images_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php deleted file mode 100644 index 5fe86aa12541..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/purge_products.php +++ /dev/null @@ -1,105 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $productSearchClient->purgeProducts($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 -{ - $formattedParent = ProductSearchClient::locationName('[PROJECT]', '[LOCATION]'); - - purge_products_sample($formattedParent); -} -// [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php deleted file mode 100644 index f3e8cf70136c..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/remove_product_from_product_set.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName) - ->setProduct($formattedProduct); - - // Call the API and handle any network failures. - try { - $productSearchClient->removeProductFromProductSet($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 = ProductSearchClient::productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = ProductSearchClient::productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - - remove_product_from_product_set_sample($formattedName, $formattedProduct); -} -// [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php deleted file mode 100644 index 7e599bb3ff36..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product.php +++ /dev/null @@ -1,73 +0,0 @@ -setProduct($product); - - // Call the API and handle any network failures. - try { - /** @var Product $response */ - $response = $productSearchClient->updateProduct($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php b/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php deleted file mode 100644 index 9b97120e8587..000000000000 --- a/owl-bot-staging/Vision/V1/samples/V1/ProductSearchClient/update_product_set.php +++ /dev/null @@ -1,66 +0,0 @@ -setProductSet($productSet); - - // Call the API and handle any network failures. - try { - /** @var ProductSet $response */ - $response = $productSearchClient->updateProductSet($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php deleted file mode 100644 index 5a08f037e90d..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/Client/ImageAnnotatorClient.php +++ /dev/null @@ -1,387 +0,0 @@ - asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface asyncBatchAnnotateImagesAsync(AsyncBatchAnnotateImagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchAnnotateFilesAsync(BatchAnnotateFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchAnnotateImagesAsync(BatchAnnotateImagesRequest $request, array $optionalArgs = []) - */ -final class ImageAnnotatorClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vision.v1.ImageAnnotator'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vision.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vision.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-vision', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/image_annotator_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/image_annotator_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/image_annotator_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/image_annotator_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a product_set - * resource. - * - * @param string $project - * @param string $location - * @param string $productSet - * - * @return string The formatted product_set resource. - */ - public static function productSetName(string $project, string $location, string $productSet): string - { - return self::getPathTemplate('productSet')->render([ - 'project' => $project, - 'location' => $location, - 'product_set' => $productSet, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - productSet: projects/{project}/locations/{location}/productSets/{product_set} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vision.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Run asynchronous image detection and annotation for a list of generic - * files, such as PDF files, which may contain multiple pages and multiple - * images per page. Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - * - * The async variant is {@see ImageAnnotatorClient::asyncBatchAnnotateFilesAsync()} - * . - * - * @example samples/V1/ImageAnnotatorClient/async_batch_annotate_files.php - * - * @param AsyncBatchAnnotateFilesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 asyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AsyncBatchAnnotateFiles', $request, $callOptions)->wait(); - } - - /** - * Run asynchronous image detection and annotation for a list of images. - * - * Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - * - * This service will write image annotation outputs to json files in customer - * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - * - * The async variant is - * {@see ImageAnnotatorClient::asyncBatchAnnotateImagesAsync()} . - * - * @example samples/V1/ImageAnnotatorClient/async_batch_annotate_images.php - * - * @param AsyncBatchAnnotateImagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 asyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AsyncBatchAnnotateImages', $request, $callOptions)->wait(); - } - - /** - * Service that performs image detection and annotation for a batch of files. - * Now only "application/pdf", "image/tiff" and "image/gif" are supported. - * - * This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - * file provided and perform detection and annotation for each image - * extracted. - * - * The async variant is {@see ImageAnnotatorClient::batchAnnotateFilesAsync()} . - * - * @example samples/V1/ImageAnnotatorClient/batch_annotate_files.php - * - * @param BatchAnnotateFilesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchAnnotateFilesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchAnnotateFiles(BatchAnnotateFilesRequest $request, array $callOptions = []): BatchAnnotateFilesResponse - { - return $this->startApiCall('BatchAnnotateFiles', $request, $callOptions)->wait(); - } - - /** - * Run image detection and annotation for a batch of images. - * - * The async variant is {@see ImageAnnotatorClient::batchAnnotateImagesAsync()} . - * - * @example samples/V1/ImageAnnotatorClient/batch_annotate_images.php - * - * @param BatchAnnotateImagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchAnnotateImagesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchAnnotateImages(BatchAnnotateImagesRequest $request, array $callOptions = []): BatchAnnotateImagesResponse - { - return $this->startApiCall('BatchAnnotateImages', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php b/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php deleted file mode 100644 index 3c546ee28bed..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/Client/ProductSearchClient.php +++ /dev/null @@ -1,988 +0,0 @@ - addProductToProductSetAsync(AddProductToProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProductAsync(CreateProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProductSetAsync(CreateProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReferenceImageAsync(CreateReferenceImageRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProductAsync(DeleteProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProductSetAsync(DeleteProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReferenceImageAsync(DeleteReferenceImageRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProductAsync(GetProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProductSetAsync(GetProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReferenceImageAsync(GetReferenceImageRequest $request, array $optionalArgs = []) - * @method PromiseInterface importProductSetsAsync(ImportProductSetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProductSetsAsync(ListProductSetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProductsAsync(ListProductsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProductsInProductSetAsync(ListProductsInProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReferenceImagesAsync(ListReferenceImagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface purgeProductsAsync(PurgeProductsRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeProductFromProductSetAsync(RemoveProductFromProductSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProductAsync(UpdateProductRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProductSetAsync(UpdateProductSetRequest $request, array $optionalArgs = []) - */ -final class ProductSearchClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vision.v1.ProductSearch'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vision.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vision.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-vision', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/product_search_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/product_search_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/product_search_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/product_search_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a 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 product - * resource. - * - * @param string $project - * @param string $location - * @param string $product - * - * @return string The formatted product resource. - */ - public static function productName(string $project, string $location, string $product): string - { - return self::getPathTemplate('product')->render([ - 'project' => $project, - 'location' => $location, - 'product' => $product, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a product_set - * resource. - * - * @param string $project - * @param string $location - * @param string $productSet - * - * @return string The formatted product_set resource. - */ - public static function productSetName(string $project, string $location, string $productSet): string - { - return self::getPathTemplate('productSet')->render([ - 'project' => $project, - 'location' => $location, - 'product_set' => $productSet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * reference_image resource. - * - * @param string $project - * @param string $location - * @param string $product - * @param string $referenceImage - * - * @return string The formatted reference_image resource. - */ - public static function referenceImageName(string $project, string $location, string $product, string $referenceImage): string - { - return self::getPathTemplate('referenceImage')->render([ - 'project' => $project, - 'location' => $location, - 'product' => $product, - 'reference_image' => $referenceImage, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - product: projects/{project}/locations/{location}/products/{product} - * - productSet: projects/{project}/locations/{location}/productSets/{product_set} - * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vision.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds a Product to the specified ProductSet. If the Product is already - * present, no change is made. - * - * One Product can be added to at most 100 ProductSets. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - * - * The async variant is {@see ProductSearchClient::addProductToProductSetAsync()} . - * - * @example samples/V1/ProductSearchClient/add_product_to_product_set.php - * - * @param AddProductToProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 addProductToProductSet(AddProductToProductSetRequest $request, array $callOptions = []): void - { - $this->startApiCall('AddProductToProductSet', $request, $callOptions)->wait(); - } - - /** - * Creates and returns a new product resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is missing or invalid. - * - * The async variant is {@see ProductSearchClient::createProductAsync()} . - * - * @example samples/V1/ProductSearchClient/create_product.php - * - * @param CreateProductRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Product - * - * @throws ApiException Thrown if the API call fails. - */ - public function createProduct(CreateProductRequest $request, array $callOptions = []): Product - { - return $this->startApiCall('CreateProduct', $request, $callOptions)->wait(); - } - - /** - * Creates and returns a new ProductSet resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - * 4096 characters. - * - * The async variant is {@see ProductSearchClient::createProductSetAsync()} . - * - * @example samples/V1/ProductSearchClient/create_product_set.php - * - * @param CreateProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProductSet - * - * @throws ApiException Thrown if the API call fails. - */ - public function createProductSet(CreateProductSetRequest $request, array $callOptions = []): ProductSet - { - return $this->startApiCall('CreateProductSet', $request, $callOptions)->wait(); - } - - /** - * Creates and returns a new ReferenceImage resource. - * - * The `bounding_poly` field is optional. If `bounding_poly` is not specified, - * the system will try to detect regions of interest in the image that are - * compatible with the product_category on the parent product. If it is - * specified, detection is ALWAYS skipped. The system converts polygons into - * non-rotated rectangles. - * - * Note that the pipeline will resize the image if the image resolution is too - * large to process (above 50MP). - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if the product does not exist. - * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - * compatible with the parent product's product_category is detected. - * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - * - * The async variant is {@see ProductSearchClient::createReferenceImageAsync()} . - * - * @example samples/V1/ProductSearchClient/create_reference_image.php - * - * @param CreateReferenceImageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReferenceImage - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReferenceImage(CreateReferenceImageRequest $request, array $callOptions = []): ReferenceImage - { - return $this->startApiCall('CreateReferenceImage', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes a product and its reference images. - * - * Metadata of the product and all its images will be deleted right away, but - * search queries against ProductSets containing the product may still work - * until all related caches are refreshed. - * - * The async variant is {@see ProductSearchClient::deleteProductAsync()} . - * - * @example samples/V1/ProductSearchClient/delete_product.php - * - * @param DeleteProductRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteProduct(DeleteProductRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteProduct', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the - * ProductSet are not deleted. - * - * The actual image files are not deleted from Google Cloud Storage. - * - * The async variant is {@see ProductSearchClient::deleteProductSetAsync()} . - * - * @example samples/V1/ProductSearchClient/delete_product_set.php - * - * @param DeleteProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteProductSet(DeleteProductSetRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteProductSet', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes a reference image. - * - * The image metadata will be deleted right away, but search queries - * against ProductSets containing the image may still work until all related - * caches are refreshed. - * - * The actual image files are not deleted from Google Cloud Storage. - * - * The async variant is {@see ProductSearchClient::deleteReferenceImageAsync()} . - * - * @example samples/V1/ProductSearchClient/delete_reference_image.php - * - * @param DeleteReferenceImageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteReferenceImage(DeleteReferenceImageRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteReferenceImage', $request, $callOptions)->wait(); - } - - /** - * Gets information associated with a Product. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * - * The async variant is {@see ProductSearchClient::getProductAsync()} . - * - * @example samples/V1/ProductSearchClient/get_product.php - * - * @param GetProductRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Product - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProduct(GetProductRequest $request, array $callOptions = []): Product - { - return $this->startApiCall('GetProduct', $request, $callOptions)->wait(); - } - - /** - * Gets information associated with a ProductSet. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * - * The async variant is {@see ProductSearchClient::getProductSetAsync()} . - * - * @example samples/V1/ProductSearchClient/get_product_set.php - * - * @param GetProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProductSet - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProductSet(GetProductSetRequest $request, array $callOptions = []): ProductSet - { - return $this->startApiCall('GetProductSet', $request, $callOptions)->wait(); - } - - /** - * Gets information associated with a ReferenceImage. - * - * Possible errors: - * - * * Returns NOT_FOUND if the specified image does not exist. - * - * The async variant is {@see ProductSearchClient::getReferenceImageAsync()} . - * - * @example samples/V1/ProductSearchClient/get_reference_image.php - * - * @param GetReferenceImageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReferenceImage - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReferenceImage(GetReferenceImageRequest $request, array $callOptions = []): ReferenceImage - { - return $this->startApiCall('GetReferenceImage', $request, $callOptions)->wait(); - } - - /** - * Asynchronous API that imports a list of reference images to specified - * product sets based on a list of image information. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be - * used to keep track of the progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * `Operation.response` contains `ImportProductSetsResponse`. (results) - * - * The input source of this method is a csv file on Google Cloud Storage. - * For the format of the csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - * The async variant is {@see ProductSearchClient::importProductSetsAsync()} . - * - * @example samples/V1/ProductSearchClient/import_product_sets.php - * - * @param ImportProductSetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 importProductSets(ImportProductSetsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportProductSets', $request, $callOptions)->wait(); - } - - /** - * Lists ProductSets in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - * than 1. - * - * The async variant is {@see ProductSearchClient::listProductSetsAsync()} . - * - * @example samples/V1/ProductSearchClient/list_product_sets.php - * - * @param ListProductSetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listProductSets(ListProductSetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProductSets', $request, $callOptions); - } - - /** - * Lists products in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * - * The async variant is {@see ProductSearchClient::listProductsAsync()} . - * - * @example samples/V1/ProductSearchClient/list_products.php - * - * @param ListProductsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listProducts(ListProductsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProducts', $request, $callOptions); - } - - /** - * Lists the Products in a ProductSet, in an unspecified order. If the - * ProductSet does not exist, the products field of the response will be - * empty. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * - * The async variant is {@see ProductSearchClient::listProductsInProductSetAsync()} - * . - * - * @example samples/V1/ProductSearchClient/list_products_in_product_set.php - * - * @param ListProductsInProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listProductsInProductSet(ListProductsInProductSetRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProductsInProductSet', $request, $callOptions); - } - - /** - * Lists reference images. - * - * Possible errors: - * - * * Returns NOT_FOUND if the parent product does not exist. - * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - * than 1. - * - * The async variant is {@see ProductSearchClient::listReferenceImagesAsync()} . - * - * @example samples/V1/ProductSearchClient/list_reference_images.php - * - * @param ListReferenceImagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReferenceImages(ListReferenceImagesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReferenceImages', $request, $callOptions); - } - - /** - * Asynchronous API to delete all Products in a ProductSet or all Products - * that are in no ProductSet. - * - * If a Product is a member of the specified ProductSet in addition to other - * ProductSets, the Product will still be deleted. - * - * It is recommended to not delete the specified ProductSet until after this - * operation has completed. It is also recommended to not add any of the - * Products involved in the batch delete to a new ProductSet while this - * operation is running because those Products may still end up deleted. - * - * It's not possible to undo the PurgeProducts operation. Therefore, it is - * recommended to keep the csv files used in ImportProductSets (if that was - * how you originally built the Product Set) before starting PurgeProducts, in - * case you need to re-import the data after deletion. - * - * If the plan is to purge all of the Products from a ProductSet and then - * re-use the empty ProductSet to re-import new Products into the empty - * ProductSet, you must wait until the PurgeProducts operation has finished - * for that ProductSet. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be - * used to keep track of the progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * - * The async variant is {@see ProductSearchClient::purgeProductsAsync()} . - * - * @example samples/V1/ProductSearchClient/purge_products.php - * - * @param PurgeProductsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 purgeProducts(PurgeProductsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PurgeProducts', $request, $callOptions)->wait(); - } - - /** - * Removes a Product from the specified ProductSet. - * - * The async variant is - * {@see ProductSearchClient::removeProductFromProductSetAsync()} . - * - * @example samples/V1/ProductSearchClient/remove_product_from_product_set.php - * - * @param RemoveProductFromProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 removeProductFromProductSet(RemoveProductFromProductSetRequest $request, array $callOptions = []): void - { - $this->startApiCall('RemoveProductFromProductSet', $request, $callOptions)->wait(); - } - - /** - * Makes changes to a Product resource. - * Only the `display_name`, `description`, and `labels` fields can be updated - * right now. - * - * If labels are updated, the change will not be reflected in queries until - * the next index time. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - * missing from the request or longer than 4096 characters. - * * Returns INVALID_ARGUMENT if description is present in update_mask but is - * longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is present in update_mask. - * - * The async variant is {@see ProductSearchClient::updateProductAsync()} . - * - * @example samples/V1/ProductSearchClient/update_product.php - * - * @param UpdateProductRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Product - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateProduct(UpdateProductRequest $request, array $callOptions = []): Product - { - return $this->startApiCall('UpdateProduct', $request, $callOptions)->wait(); - } - - /** - * Makes changes to a ProductSet resource. - * Only display_name can be updated currently. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but - * missing from the request or longer than 4096 characters. - * - * The async variant is {@see ProductSearchClient::updateProductSetAsync()} . - * - * @example samples/V1/ProductSearchClient/update_product_set.php - * - * @param UpdateProductSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ProductSet - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateProductSet(UpdateProductSetRequest $request, array $callOptions = []): ProductSet - { - return $this->startApiCall('UpdateProductSet', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php deleted file mode 100644 index a7548152ba13..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/Gapic/ImageAnnotatorGapicClient.php +++ /dev/null @@ -1,667 +0,0 @@ -asyncBatchAnnotateFiles($requests); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Vision\V1\Client\ImageAnnotatorClient}. - */ -class ImageAnnotatorGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vision.v1.ImageAnnotator'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'vision.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vision.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-vision', - ]; - - private static $productSetNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/image_annotator_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/image_annotator_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/image_annotator_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/image_annotator_rest_client_config.php', - ], - ], - ]; - } - - private static function getProductSetNameTemplate() - { - if (self::$productSetNameTemplate == null) { - self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); - } - - return self::$productSetNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'productSet' => self::getProductSetNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a product_set - * resource. - * - * @param string $project - * @param string $location - * @param string $productSet - * - * @return string The formatted product_set resource. - */ - public static function productSetName($project, $location, $productSet) - { - return self::getProductSetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product_set' => $productSet, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - productSet: projects/{project}/locations/{location}/productSets/{product_set} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vision.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Run asynchronous image detection and annotation for a list of generic - * files, such as PDF files, which may contain multiple pages and multiple - * images per page. Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateFiles($requests); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateFiles'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AsyncAnnotateFileRequest[] $requests Required. Individual async file annotation requests for this batch. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function asyncBatchAnnotateFiles($requests, array $optionalArgs = []) - { - $request = new AsyncBatchAnnotateFilesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('AsyncBatchAnnotateFiles', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Run asynchronous image detection and annotation for a list of images. - * - * Progress and results can be retrieved through the - * `google.longrunning.Operations` interface. - * `Operation.metadata` contains `OperationMetadata` (metadata). - * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - * - * This service will write image annotation outputs to json files in customer - * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $outputConfig = new OutputConfig(); - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $imageAnnotatorClient->asyncBatchAnnotateImages($requests, $outputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $imageAnnotatorClient->resumeOperation($operationName, 'asyncBatchAnnotateImages'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * @param OutputConfig $outputConfig Required. The desired output location and metadata (e.g. format). - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function asyncBatchAnnotateImages($requests, $outputConfig, array $optionalArgs = []) - { - $request = new AsyncBatchAnnotateImagesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - $request->setOutputConfig($outputConfig); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('AsyncBatchAnnotateImages', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Service that performs image detection and annotation for a batch of files. - * Now only "application/pdf", "image/tiff" and "image/gif" are supported. - * - * This service will extract at most 5 (customers can specify which 5 in - * AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - * file provided and perform detection and annotation for each image - * extracted. - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $response = $imageAnnotatorClient->batchAnnotateFiles($requests); - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AnnotateFileRequest[] $requests Required. The list of file annotation requests. Right now we support only - * one AnnotateFileRequest in BatchAnnotateFilesRequest. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateFilesResponse - * - * @throws ApiException if the remote call fails - */ - public function batchAnnotateFiles($requests, array $optionalArgs = []) - { - $request = new BatchAnnotateFilesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchAnnotateFiles', BatchAnnotateFilesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Run image detection and annotation for a batch of images. - * - * Sample code: - * ``` - * $imageAnnotatorClient = new ImageAnnotatorClient(); - * try { - * $requests = []; - * $response = $imageAnnotatorClient->batchAnnotateImages($requests); - * } finally { - * $imageAnnotatorClient->close(); - * } - * ``` - * - * @param AnnotateImageRequest[] $requests Required. Individual image annotation requests for this batch. - * @param array $optionalArgs { - * Optional. - * - * @type string $parent - * Optional. Target project and location to make a call. - * - * Format: `projects/{project-id}/locations/{location-id}`. - * - * If no parent is specified, a region will be chosen automatically. - * - * Supported location-ids: - * `us`: USA country only, - * `asia`: East asia areas, like Japan, Taiwan, - * `eu`: The European Union. - * - * Example: `projects/project-A/locations/eu`. - * @type array $labels - * Optional. The labels with user-defined metadata for the request. - * - * Label keys and values can be no longer than 63 characters - * (Unicode codepoints), can only contain lowercase letters, numeric - * characters, underscores and dashes. International characters are allowed. - * Label values are optional. Label keys must start with a letter. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\BatchAnnotateImagesResponse - * - * @throws ApiException if the remote call fails - */ - public function batchAnnotateImages($requests, array $optionalArgs = []) - { - $request = new BatchAnnotateImagesRequest(); - $requestParamHeaders = []; - $request->setRequests($requests); - if (isset($optionalArgs['parent'])) { - $request->setParent($optionalArgs['parent']); - $requestParamHeaders['parent'] = $optionalArgs['parent']; - } - - if (isset($optionalArgs['labels'])) { - $request->setLabels($optionalArgs['labels']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('BatchAnnotateImages', BatchAnnotateImagesResponse::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php b/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php deleted file mode 100644 index 072026432456..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/Gapic/ProductSearchGapicClient.php +++ /dev/null @@ -1,1603 +0,0 @@ -productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Vision\V1\Client\ProductSearchClient}. - */ -class ProductSearchGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.vision.v1.ProductSearch'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'vision.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vision.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-vision', - ]; - - private static $locationNameTemplate; - - private static $productNameTemplate; - - private static $productSetNameTemplate; - - private static $referenceImageNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/product_search_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/product_search_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/product_search_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/product_search_rest_client_config.php', - ], - ], - ]; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProductNameTemplate() - { - if (self::$productNameTemplate == null) { - self::$productNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}'); - } - - return self::$productNameTemplate; - } - - private static function getProductSetNameTemplate() - { - if (self::$productSetNameTemplate == null) { - self::$productSetNameTemplate = new PathTemplate('projects/{project}/locations/{location}/productSets/{product_set}'); - } - - return self::$productSetNameTemplate; - } - - private static function getReferenceImageNameTemplate() - { - if (self::$referenceImageNameTemplate == null) { - self::$referenceImageNameTemplate = new PathTemplate('projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}'); - } - - return self::$referenceImageNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'location' => self::getLocationNameTemplate(), - 'product' => self::getProductNameTemplate(), - 'productSet' => self::getProductSetNameTemplate(), - 'referenceImage' => self::getReferenceImageNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a product - * resource. - * - * @param string $project - * @param string $location - * @param string $product - * - * @return string The formatted product resource. - */ - public static function productName($project, $location, $product) - { - return self::getProductNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product' => $product, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a product_set - * resource. - * - * @param string $project - * @param string $location - * @param string $productSet - * - * @return string The formatted product_set resource. - */ - public static function productSetName($project, $location, $productSet) - { - return self::getProductSetNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product_set' => $productSet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * reference_image resource. - * - * @param string $project - * @param string $location - * @param string $product - * @param string $referenceImage - * - * @return string The formatted reference_image resource. - */ - public static function referenceImageName($project, $location, $product, $referenceImage) - { - return self::getReferenceImageNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'product' => $product, - 'reference_image' => $referenceImage, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - product: projects/{project}/locations/{location}/products/{product} - * - productSet: projects/{project}/locations/{location}/productSets/{product_set} - * - referenceImage: projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vision.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Adds a Product to the specified ProductSet. If the Product is already - * present, no change is made. - * - * One Product can be added to at most 100 ProductSets. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->addProductToProductSet($formattedName, $formattedProduct); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param string $product Required. The resource name for the Product to be added to this ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function addProductToProductSet($name, $product, array $optionalArgs = []) - { - $request = new AddProductToProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setProduct($product); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('AddProductToProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates and returns a new product resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is missing or invalid. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $product = new Product(); - * $response = $productSearchClient->createProduct($formattedParent, $product); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the Product should be created. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID`. - * @param Product $product Required. The product to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $productId - * A user-supplied resource id for this Product. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\Product - * - * @throws ApiException if the remote call fails - */ - public function createProduct($parent, $product, array $optionalArgs = []) - { - $request = new CreateProductRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setProduct($product); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['productId'])) { - $request->setProductId($optionalArgs['productId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateProduct', Product::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates and returns a new ProductSet resource. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - * 4096 characters. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $productSet = new ProductSet(); - * $response = $productSearchClient->createProductSet($formattedParent, $productSet); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the ProductSet should be created. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param ProductSet $productSet Required. The ProductSet to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $productSetId - * A user-supplied resource id for this ProductSet. If set, the server will - * attempt to use this value as the resource id. If it is already in use, an - * error is returned with code ALREADY_EXISTS. Must be at most 128 characters - * long. It cannot contain the character `/`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ProductSet - * - * @throws ApiException if the remote call fails - */ - public function createProductSet($parent, $productSet, array $optionalArgs = []) - { - $request = new CreateProductSetRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setProductSet($productSet); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['productSetId'])) { - $request->setProductSetId($optionalArgs['productSetId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates and returns a new ReferenceImage resource. - * - * The `bounding_poly` field is optional. If `bounding_poly` is not specified, - * the system will try to detect regions of interest in the image that are - * compatible with the product_category on the parent product. If it is - * specified, detection is ALWAYS skipped. The system converts polygons into - * non-rotated rectangles. - * - * Note that the pipeline will resize the image if the image resolution is too - * large to process (above 50MP). - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - * characters. - * * Returns INVALID_ARGUMENT if the product does not exist. - * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - * compatible with the parent product's product_category is detected. - * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $referenceImage = new ReferenceImage(); - * $response = $productSearchClient->createReferenceImage($formattedParent, $referenceImage); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the product in which to create the reference - * image. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param ReferenceImage $referenceImage Required. The reference image to create. - * If an image ID is specified, it is ignored. - * @param array $optionalArgs { - * Optional. - * - * @type string $referenceImageId - * A user-supplied resource id for the ReferenceImage to be added. If set, - * the server will attempt to use this value as the resource id. If it is - * already in use, an error is returned with code ALREADY_EXISTS. Must be at - * most 128 characters long. It cannot contain the character `/`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ReferenceImage - * - * @throws ApiException if the remote call fails - */ - public function createReferenceImage($parent, $referenceImage, array $optionalArgs = []) - { - $request = new CreateReferenceImageRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setReferenceImage($referenceImage); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['referenceImageId'])) { - $request->setReferenceImageId($optionalArgs['referenceImageId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a product and its reference images. - * - * Metadata of the product and all its images will be deleted right away, but - * search queries against ProductSets containing the product may still work - * until all related caches are refreshed. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->deleteProduct($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of product to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteProduct($name, array $optionalArgs = []) - { - $request = new DeleteProductRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteProduct', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a ProductSet. Products and ReferenceImages in the - * ProductSet are not deleted. - * - * The actual image files are not deleted from Google Cloud Storage. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $productSearchClient->deleteProductSet($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the ProductSet to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteProductSet($name, array $optionalArgs = []) - { - $request = new DeleteProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a reference image. - * - * The image metadata will be deleted right away, but search queries - * against ProductSets containing the image may still work until all related - * caches are refreshed. - * - * The actual image files are not deleted from Google Cloud Storage. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - * $productSearchClient->deleteReferenceImage($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the reference image to delete. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteReferenceImage($name, array $optionalArgs = []) - { - $request = new DeleteReferenceImageRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteReferenceImage', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information associated with a Product. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $response = $productSearchClient->getProduct($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the Product to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\Product - * - * @throws ApiException if the remote call fails - */ - public function getProduct($name, array $optionalArgs = []) - { - $request = new GetProductRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetProduct', Product::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information associated with a ProductSet. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $response = $productSearchClient->getProductSet($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the ProductSet to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ProductSet - * - * @throws ApiException if the remote call fails - */ - public function getProductSet($name, array $optionalArgs = []) - { - $request = new GetProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetProductSet', ProductSet::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information associated with a ReferenceImage. - * - * Possible errors: - * - * * Returns NOT_FOUND if the specified image does not exist. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - * $response = $productSearchClient->getReferenceImage($formattedName); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name of the ReferenceImage to get. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ReferenceImage - * - * @throws ApiException if the remote call fails - */ - public function getReferenceImage($name, array $optionalArgs = []) - { - $request = new GetReferenceImageRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetReferenceImage', ReferenceImage::class, $optionalArgs, $request)->wait(); - } - - /** - * Asynchronous API that imports a list of reference images to specified - * product sets based on a list of image information. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be - * used to keep track of the progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * `Operation.response` contains `ImportProductSetsResponse`. (results) - * - * The input source of this method is a csv file on Google Cloud Storage. - * For the format of the csv file please see - * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $inputConfig = new ImportProductSetsInputConfig(); - * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $productSearchClient->importProductSets($formattedParent, $inputConfig); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'importProductSets'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project in which the ProductSets should be imported. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param ImportProductSetsInputConfig $inputConfig Required. The input content for the list of requests. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function importProductSets($parent, $inputConfig, array $optionalArgs = []) - { - $request = new ImportProductSetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setInputConfig($inputConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('ImportProductSets', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Lists ProductSets in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - * than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listProductSets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listProductSets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project from which ProductSets should be listed. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listProductSets($parent, array $optionalArgs = []) - { - $request = new ListProductSetsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProductSets', $optionalArgs, ListProductSetsResponse::class, $request); - } - - /** - * Lists products in an unspecified order. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listProducts($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listProducts($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project OR ProductSet from which Products should be listed. - * - * Format: - * `projects/PROJECT_ID/locations/LOC_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listProducts($parent, array $optionalArgs = []) - { - $request = new ListProductsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProducts', $optionalArgs, ListProductsResponse::class, $request); - } - - /** - * Lists the Products in a ProductSet, in an unspecified order. If the - * ProductSet does not exist, the products field of the response will be - * empty. - * - * Possible errors: - * - * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listProductsInProductSet($formattedName); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The ProductSet resource for which to retrieve Products. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listProductsInProductSet($name, array $optionalArgs = []) - { - $request = new ListProductsInProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListProductsInProductSet', $optionalArgs, ListProductsInProductSetResponse::class, $request); - } - - /** - * Lists reference images. - * - * Possible errors: - * - * * Returns NOT_FOUND if the parent product does not exist. - * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - * than 1. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * // Iterate over pages of elements - * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $productSearchClient->listReferenceImages($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the product containing the reference images. - * - * Format is - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listReferenceImages($parent, array $optionalArgs = []) - { - $request = new ListReferenceImagesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListReferenceImages', $optionalArgs, ListReferenceImagesResponse::class, $request); - } - - /** - * Asynchronous API to delete all Products in a ProductSet or all Products - * that are in no ProductSet. - * - * If a Product is a member of the specified ProductSet in addition to other - * ProductSets, the Product will still be deleted. - * - * It is recommended to not delete the specified ProductSet until after this - * operation has completed. It is also recommended to not add any of the - * Products involved in the batch delete to a new ProductSet while this - * operation is running because those Products may still end up deleted. - * - * It's not possible to undo the PurgeProducts operation. Therefore, it is - * recommended to keep the csv files used in ImportProductSets (if that was - * how you originally built the Product Set) before starting PurgeProducts, in - * case you need to re-import the data after deletion. - * - * If the plan is to purge all of the Products from a ProductSet and then - * re-use the empty ProductSet to re-import new Products into the empty - * ProductSet, you must wait until the PurgeProducts operation has finished - * for that ProductSet. - * - * The [google.longrunning.Operation][google.longrunning.Operation] API can be - * used to keep track of the progress and results of the request. - * `Operation.metadata` contains `BatchOperationMetadata`. (progress) - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedParent = $productSearchClient->locationName('[PROJECT]', '[LOCATION]'); - * $operationResponse = $productSearchClient->purgeProducts($formattedParent); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $productSearchClient->purgeProducts($formattedParent); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $productSearchClient->resumeOperation($operationName, 'purgeProducts'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $parent Required. The project and location in which the Products should be deleted. - * - * Format is `projects/PROJECT_ID/locations/LOC_ID`. - * @param array $optionalArgs { - * Optional. - * - * @type ProductSetPurgeConfig $productSetPurgeConfig - * Specify which ProductSet contains the Products to be deleted. - * @type bool $deleteOrphanProducts - * If delete_orphan_products is true, all Products that are not in any - * ProductSet will be deleted. - * @type bool $force - * The default value is false. Override this value to true to actually perform - * the purge. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function purgeProducts($parent, array $optionalArgs = []) - { - $request = new PurgeProductsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['productSetPurgeConfig'])) { - $request->setProductSetPurgeConfig($optionalArgs['productSetPurgeConfig']); - } - - if (isset($optionalArgs['deleteOrphanProducts'])) { - $request->setDeleteOrphanProducts($optionalArgs['deleteOrphanProducts']); - } - - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('PurgeProducts', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Removes a Product from the specified ProductSet. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $formattedName = $productSearchClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - * $formattedProduct = $productSearchClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - * $productSearchClient->removeProductFromProductSet($formattedName, $formattedProduct); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param string $name Required. The resource name for the ProductSet to modify. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - * @param string $product Required. The resource name for the Product to be removed from this - * ProductSet. - * - * Format is: - * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function removeProductFromProductSet($name, $product, array $optionalArgs = []) - { - $request = new RemoveProductFromProductSetRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setProduct($product); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('RemoveProductFromProductSet', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Makes changes to a Product resource. - * Only the `display_name`, `description`, and `labels` fields can be updated - * right now. - * - * If labels are updated, the change will not be reflected in queries until - * the next index time. - * - * Possible errors: - * - * * Returns NOT_FOUND if the Product does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - * missing from the request or longer than 4096 characters. - * * Returns INVALID_ARGUMENT if description is present in update_mask but is - * longer than 4096 characters. - * * Returns INVALID_ARGUMENT if product_category is present in update_mask. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $product = new Product(); - * $response = $productSearchClient->updateProduct($product); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param Product $product Required. The Product resource which replaces the one on the server. - * product.name is immutable. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields - * to update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask paths include `product_labels`, `display_name`, and - * `description`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\Product - * - * @throws ApiException if the remote call fails - */ - public function updateProduct($product, array $optionalArgs = []) - { - $request = new UpdateProductRequest(); - $requestParamHeaders = []; - $request->setProduct($product); - $requestParamHeaders['product.name'] = $product->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateProduct', Product::class, $optionalArgs, $request)->wait(); - } - - /** - * Makes changes to a ProductSet resource. - * Only display_name can be updated currently. - * - * Possible errors: - * - * * Returns NOT_FOUND if the ProductSet does not exist. - * * Returns INVALID_ARGUMENT if display_name is present in update_mask but - * missing from the request or longer than 4096 characters. - * - * Sample code: - * ``` - * $productSearchClient = new ProductSearchClient(); - * try { - * $productSet = new ProductSet(); - * $response = $productSearchClient->updateProductSet($productSet); - * } finally { - * $productSearchClient->close(); - * } - * ``` - * - * @param ProductSet $productSet Required. The ProductSet resource which replaces the one on the server. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * The [FieldMask][google.protobuf.FieldMask] that specifies which fields to - * update. - * If update_mask isn't specified, all mutable fields are to be updated. - * Valid mask path is `display_name`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Vision\V1\ProductSet - * - * @throws ApiException if the remote call fails - */ - public function updateProductSet($productSet, array $optionalArgs = []) - { - $request = new UpdateProductSetRequest(); - $requestParamHeaders = []; - $request->setProductSet($productSet); - $requestParamHeaders['product_set.name'] = $productSet->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateProductSet', ProductSet::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php b/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php deleted file mode 100644 index 87ab4820cfc0..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/ImageAnnotatorClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.vision.v1.ImageAnnotator' => [ - 'AsyncBatchAnnotateFiles' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateFilesResponse', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'AsyncBatchAnnotateImages' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Vision\V1\AsyncBatchAnnotateImagesResponse', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateFiles' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateFilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateImages' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\BatchAnnotateImagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php deleted file mode 100644 index 6c50e29a0d1a..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/image_annotator_rest_client_config.php +++ /dev/null @@ -1,152 +0,0 @@ - [ - 'google.cloud.vision.v1.ImageAnnotator' => [ - 'AsyncBatchAnnotateFiles' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/files:asyncBatchAnnotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:asyncBatchAnnotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/files:asyncBatchAnnotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'AsyncBatchAnnotateImages' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/images:asyncBatchAnnotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/images:asyncBatchAnnotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateFiles' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/files:annotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/files:annotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/files:annotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchAnnotateImages' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/images:annotate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/images:annotate', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/images:annotate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json deleted file mode 100644 index 393b5b951284..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_client_config.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "interfaces": { - "google.cloud.vision.v1.ProductSearch": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 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 - }, - "retry_policy_3_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": { - "AddProductToProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "CreateProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateReferenceImage": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "DeleteProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteReferenceImage": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetReferenceImage": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ImportProductSets": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "ListProductSets": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListProducts": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListProductsInProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListReferenceImages": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "PurgeProducts": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "RemoveProductFromProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateProduct": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateProductSet": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php deleted file mode 100644 index 1de23804b2b9..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_descriptor_config.php +++ /dev/null @@ -1,310 +0,0 @@ - [ - 'google.cloud.vision.v1.ProductSearch' => [ - 'ImportProductSets' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Vision\V1\ImportProductSetsResponse', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeProducts' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Vision\V1\BatchOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'AddProductToProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\Product', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReferenceImage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReferenceImage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\Product', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReferenceImage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ReferenceImage', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListProductSets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProductSets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListProductSetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProducts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProducts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListProductsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProductsInProductSet' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProducts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListProductsInProductSetResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListReferenceImages' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReferenceImages', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ListReferenceImagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveProductFromProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateProduct' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\Product', - 'headerParams' => [ - [ - 'keyName' => 'product.name', - 'fieldAccessors' => [ - 'getProduct', - 'getName', - ], - ], - ], - ], - 'UpdateProductSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Vision\V1\ProductSet', - 'headerParams' => [ - [ - 'keyName' => 'product_set.name', - 'fieldAccessors' => [ - 'getProductSet', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'product' => 'projects/{project}/locations/{location}/products/{product}', - 'productSet' => 'projects/{project}/locations/{location}/productSets/{product_set}', - 'referenceImage' => 'projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php b/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php deleted file mode 100644 index 374f29f1dade..000000000000 --- a/owl-bot-staging/Vision/V1/src/V1/resources/product_search_rest_client_config.php +++ /dev/null @@ -1,276 +0,0 @@ - [ - 'google.cloud.vision.v1.ProductSearch' => [ - 'AddProductToProductSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:addProduct', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateProduct' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', - 'body' => 'product', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProductSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', - 'body' => 'product_set', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReferenceImage' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', - 'body' => 'reference_image', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteProduct' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProductSet' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReferenceImage' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProduct' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProductSet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReferenceImage' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/products/*/referenceImages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportProductSets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProductSets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/productSets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProducts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProductsInProductSet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}/products', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListReferenceImages' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/products/*}/referenceImages', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PurgeProducts' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/products:purge', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveProductFromProductSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/productSets/*}:removeProduct', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateProduct' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{product.name=projects/*/locations/*/products/*}', - 'body' => 'product', - 'placeholders' => [ - 'product.name' => [ - 'getters' => [ - 'getProduct', - 'getName', - ], - ], - ], - ], - 'UpdateProductSet' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{product_set.name=projects/*/locations/*/productSets/*}', - 'body' => 'product_set', - 'placeholders' => [ - 'product_set.name' => [ - 'getters' => [ - 'getProductSet', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php deleted file mode 100644 index 69e2a69ecfbe..000000000000 --- a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ImageAnnotatorClientTest.php +++ /dev/null @@ -1,509 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ImageAnnotatorClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ImageAnnotatorClient($options); - } - - /** @test */ - public function asyncBatchAnnotateFilesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateFilesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $request = (new AsyncBatchAnnotateFilesRequest()) - ->setRequests($requests); - $response = $gapicClient->asyncBatchAnnotateFiles($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.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - $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 asyncBatchAnnotateFilesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $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 - $requests = []; - $request = (new AsyncBatchAnnotateFilesRequest()) - ->setRequests($requests); - $response = $gapicClient->asyncBatchAnnotateFiles($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - 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 asyncBatchAnnotateImagesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateImagesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $outputConfig = new OutputConfig(); - $request = (new AsyncBatchAnnotateImagesRequest()) - ->setRequests($requests) - ->setOutputConfig($outputConfig); - $response = $gapicClient->asyncBatchAnnotateImages($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.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); - $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 asyncBatchAnnotateImagesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $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 - $requests = []; - $outputConfig = new OutputConfig(); - $request = (new AsyncBatchAnnotateImagesRequest()) - ->setRequests($requests) - ->setOutputConfig($outputConfig); - $response = $gapicClient->asyncBatchAnnotateImages($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); - 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 batchAnnotateFilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchAnnotateFilesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $requests = []; - $request = (new BatchAnnotateFilesRequest()) - ->setRequests($requests); - $response = $gapicClient->batchAnnotateFiles($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.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateFilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $requests = []; - $request = (new BatchAnnotateFilesRequest()) - ->setRequests($requests); - try { - $gapicClient->batchAnnotateFiles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchAnnotateImagesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $requests = []; - $request = (new BatchAnnotateImagesRequest()) - ->setRequests($requests); - $response = $gapicClient->batchAnnotateImages($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.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $requests = []; - $request = (new BatchAnnotateImagesRequest()) - ->setRequests($requests); - try { - $gapicClient->batchAnnotateImages($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function asyncBatchAnnotateFilesAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateFilesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $request = (new AsyncBatchAnnotateFilesRequest()) - ->setRequests($requests); - $response = $gapicClient->asyncBatchAnnotateFilesAsync($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.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - $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/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php deleted file mode 100644 index e5e0383ed735..000000000000 --- a/owl-bot-staging/Vision/V1/tests/Unit/V1/Client/ProductSearchClientTest.php +++ /dev/null @@ -1,1540 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ProductSearchClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ProductSearchClient($options); - } - - /** @test */ - public function addProductToProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new AddProductToProductSetRequest()) - ->setName($formattedName) - ->setProduct($formattedProduct); - $gapicClient->addProductToProductSet($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addProductToProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new AddProductToProductSetRequest()) - ->setName($formattedName) - ->setProduct($formattedProduct); - try { - $gapicClient->addProductToProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $product = new Product(); - $request = (new CreateProductRequest()) - ->setParent($formattedParent) - ->setProduct($product); - $response = $gapicClient->createProduct($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.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($product, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $product = new Product(); - $request = (new CreateProductRequest()) - ->setParent($formattedParent) - ->setProduct($product); - try { - $gapicClient->createProduct($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $productSet = new ProductSet(); - $request = (new CreateProductSetRequest()) - ->setParent($formattedParent) - ->setProductSet($productSet); - $response = $gapicClient->createProductSet($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.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProductSet(); - $this->assertProtobufEquals($productSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $productSet = new ProductSet(); - $request = (new CreateProductSetRequest()) - ->setParent($formattedParent) - ->setProductSet($productSet); - try { - $gapicClient->createProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new ReferenceImage(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImage = new ReferenceImage(); - $referenceImageUri = 'referenceImageUri-707360132'; - $referenceImage->setUri($referenceImageUri); - $request = (new CreateReferenceImageRequest()) - ->setParent($formattedParent) - ->setReferenceImage($referenceImage); - $response = $gapicClient->createReferenceImage($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.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReferenceImage(); - $this->assertProtobufEquals($referenceImage, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImage = new ReferenceImage(); - $referenceImageUri = 'referenceImageUri-707360132'; - $referenceImage->setUri($referenceImageUri); - $request = (new CreateReferenceImageRequest()) - ->setParent($formattedParent) - ->setReferenceImage($referenceImage); - try { - $gapicClient->createReferenceImage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new DeleteProductRequest()) - ->setName($formattedName); - $gapicClient->deleteProduct($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new DeleteProductRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteProduct($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $request = (new DeleteProductSetRequest()) - ->setName($formattedName); - $gapicClient->deleteProductSet($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $request = (new DeleteProductSetRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $request = (new DeleteReferenceImageRequest()) - ->setName($formattedName); - $gapicClient->deleteReferenceImage($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $request = (new DeleteReferenceImageRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteReferenceImage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new GetProductRequest()) - ->setName($formattedName); - $response = $gapicClient->getProduct($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.vision.v1.ProductSearch/GetProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new GetProductRequest()) - ->setName($formattedName); - try { - $gapicClient->getProduct($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $request = (new GetProductSetRequest()) - ->setName($formattedName); - $response = $gapicClient->getProductSet($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.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $request = (new GetProductSetRequest()) - ->setName($formattedName); - try { - $gapicClient->getProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new ReferenceImage(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $request = (new GetReferenceImageRequest()) - ->setName($formattedName); - $response = $gapicClient->getReferenceImage($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.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $request = (new GetReferenceImageRequest()) - ->setName($formattedName); - try { - $gapicClient->getReferenceImage($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importProductSetsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importProductSetsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportProductSetsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importProductSetsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $inputConfig = new ImportProductSetsInputConfig(); - $request = (new ImportProductSetsRequest()) - ->setParent($formattedParent) - ->setInputConfig($inputConfig); - $response = $gapicClient->importProductSets($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.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfig(); - $this->assertProtobufEquals($inputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); - $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 importProductSetsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importProductSetsTest'); - $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]'); - $inputConfig = new ImportProductSetsInputConfig(); - $request = (new ImportProductSetsRequest()) - ->setParent($formattedParent) - ->setInputConfig($inputConfig); - $response = $gapicClient->importProductSets($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); - 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 listProductSetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productSetsElement = new ProductSet(); - $productSets = [ - $productSetsElement, - ]; - $expectedResponse = new ListProductSetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProductSets($productSets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProductSetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProductSets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductSetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListProductSetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProductSets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productsElement = new Product(); - $products = [ - $productsElement, - ]; - $expectedResponse = new ListProductsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProducts($products); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProductsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProducts($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListProductsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProducts($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsInProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productsElement = new Product(); - $products = [ - $productsElement, - ]; - $expectedResponse = new ListProductsInProductSetResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProducts($products); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $request = (new ListProductsInProductSetRequest()) - ->setName($formattedName); - $response = $gapicClient->listProductsInProductSet($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsInProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $request = (new ListProductsInProductSetRequest()) - ->setName($formattedName); - try { - $gapicClient->listProductsInProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $pageSize2 = 1024500956; - $nextPageToken = ''; - $referenceImagesElement = new ReferenceImage(); - $referenceImages = [ - $referenceImagesElement, - ]; - $expectedResponse = new ListReferenceImagesResponse(); - $expectedResponse->setPageSize($pageSize2); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReferenceImages($referenceImages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new ListReferenceImagesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReferenceImages($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new ListReferenceImagesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReferenceImages($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeProductsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeProductsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/purgeProductsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new PurgeProductsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->purgeProducts($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.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); - $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 purgeProductsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeProductsTest'); - $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]'); - $request = (new PurgeProductsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->purgeProducts($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); - 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 removeProductFromProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new RemoveProductFromProductSetRequest()) - ->setName($formattedName) - ->setProduct($formattedProduct); - $gapicClient->removeProductFromProductSet($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeProductFromProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new RemoveProductFromProductSetRequest()) - ->setName($formattedName) - ->setProduct($formattedProduct); - try { - $gapicClient->removeProductFromProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $product = new Product(); - $request = (new UpdateProductRequest()) - ->setProduct($product); - $response = $gapicClient->updateProduct($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.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($product, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $product = new Product(); - $request = (new UpdateProductRequest()) - ->setProduct($product); - try { - $gapicClient->updateProduct($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $productSet = new ProductSet(); - $request = (new UpdateProductSetRequest()) - ->setProductSet($productSet); - $response = $gapicClient->updateProductSet($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.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getProductSet(); - $this->assertProtobufEquals($productSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $productSet = new ProductSet(); - $request = (new UpdateProductSetRequest()) - ->setProductSet($productSet); - try { - $gapicClient->updateProductSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addProductToProductSetAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $request = (new AddProductToProductSetRequest()) - ->setName($formattedName) - ->setProduct($formattedProduct); - $gapicClient->addProductToProductSetAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php deleted file mode 100644 index 9df52eda46b3..000000000000 --- a/owl-bot-staging/Vision/V1/tests/Unit/V1/ImageAnnotatorClientTest.php +++ /dev/null @@ -1,423 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ImageAnnotatorClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ImageAnnotatorClient($options); - } - - /** @test */ - public function asyncBatchAnnotateFilesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateFilesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $response = $gapicClient->asyncBatchAnnotateFiles($requests); - $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.vision.v1.ImageAnnotator/AsyncBatchAnnotateFiles', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - $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 asyncBatchAnnotateFilesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateFilesTest'); - $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 - $requests = []; - $response = $gapicClient->asyncBatchAnnotateFiles($requests); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateFilesTest'); - 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 asyncBatchAnnotateImagesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AsyncBatchAnnotateImagesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $requests = []; - $outputConfig = new OutputConfig(); - $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); - $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.vision.v1.ImageAnnotator/AsyncBatchAnnotateImages', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $actualValue = $actualApiRequestObject->getOutputConfig(); - $this->assertProtobufEquals($outputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); - $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 asyncBatchAnnotateImagesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/asyncBatchAnnotateImagesTest'); - $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 - $requests = []; - $outputConfig = new OutputConfig(); - $response = $gapicClient->asyncBatchAnnotateImages($requests, $outputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/asyncBatchAnnotateImagesTest'); - 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 batchAnnotateFilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchAnnotateFilesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $requests = []; - $response = $gapicClient->batchAnnotateFiles($requests); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateFiles', $actualFuncCall); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateFilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $requests = []; - try { - $gapicClient->batchAnnotateFiles($requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchAnnotateImagesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $requests = []; - $response = $gapicClient->batchAnnotateImages($requests); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages', $actualFuncCall); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchAnnotateImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $requests = []; - try { - $gapicClient->batchAnnotateImages($requests); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php b/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php deleted file mode 100644 index a95111b861b0..000000000000 --- a/owl-bot-staging/Vision/V1/tests/Unit/V1/ProductSearchClientTest.php +++ /dev/null @@ -1,1403 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ProductSearchClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ProductSearchClient($options); - } - - /** @test */ - public function addProductToProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $gapicClient->addProductToProductSet($formattedName, $formattedProduct); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/AddProductToProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addProductToProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->addProductToProductSet($formattedName, $formattedProduct); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $product = new Product(); - $response = $gapicClient->createProduct($formattedParent, $product); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($product, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $product = new Product(); - try { - $gapicClient->createProduct($formattedParent, $product); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $productSet = new ProductSet(); - $response = $gapicClient->createProductSet($formattedParent, $productSet); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getProductSet(); - $this->assertProtobufEquals($productSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $productSet = new ProductSet(); - try { - $gapicClient->createProductSet($formattedParent, $productSet); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $uri = 'uri116076'; - $expectedResponse = new ReferenceImage(); - $expectedResponse->setName($name); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImage = new ReferenceImage(); - $referenceImageUri = 'referenceImageUri-707360132'; - $referenceImage->setUri($referenceImageUri); - $response = $gapicClient->createReferenceImage($formattedParent, $referenceImage); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/CreateReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReferenceImage(); - $this->assertProtobufEquals($referenceImage, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $referenceImage = new ReferenceImage(); - $referenceImageUri = 'referenceImageUri-707360132'; - $referenceImage->setUri($referenceImageUri); - try { - $gapicClient->createReferenceImage($formattedParent, $referenceImage); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $gapicClient->deleteProduct($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->deleteProduct($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $gapicClient->deleteProductSet($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - try { - $gapicClient->deleteProductSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $gapicClient->deleteReferenceImage($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - try { - $gapicClient->deleteReferenceImage($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $response = $gapicClient->getProduct($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->getProduct($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $response = $gapicClient->getProductSet($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - try { - $gapicClient->getProductSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceImageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uri = 'uri116076'; - $expectedResponse = new ReferenceImage(); - $expectedResponse->setName($name2); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - $response = $gapicClient->getReferenceImage($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/GetReferenceImage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReferenceImageExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->referenceImageName('[PROJECT]', '[LOCATION]', '[PRODUCT]', '[REFERENCE_IMAGE]'); - try { - $gapicClient->getReferenceImage($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importProductSetsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importProductSetsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportProductSetsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importProductSetsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $inputConfig = new ImportProductSetsInputConfig(); - $response = $gapicClient->importProductSets($formattedParent, $inputConfig); - $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.vision.v1.ProductSearch/ImportProductSets', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInputConfig(); - $this->assertProtobufEquals($inputConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); - $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 importProductSetsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importProductSetsTest'); - $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]'); - $inputConfig = new ImportProductSetsInputConfig(); - $response = $gapicClient->importProductSets($formattedParent, $inputConfig); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importProductSetsTest'); - 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 listProductSetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productSetsElement = new ProductSet(); - $productSets = [ - $productSetsElement, - ]; - $expectedResponse = new ListProductSetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProductSets($productSets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listProductSets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProductSets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductSets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductSetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listProductSets($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productsElement = new Product(); - $products = [ - $productsElement, - ]; - $expectedResponse = new ListProductsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProducts($products); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->listProducts($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProducts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - try { - $gapicClient->listProducts($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsInProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $productsElement = new Product(); - $products = [ - $productsElement, - ]; - $expectedResponse = new ListProductsInProductSetResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProducts($products); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $response = $gapicClient->listProductsInProductSet($formattedName); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProducts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProductsInProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - try { - $gapicClient->listProductsInProductSet($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceImagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $pageSize2 = 1024500956; - $nextPageToken = ''; - $referenceImagesElement = new ReferenceImage(); - $referenceImages = [ - $referenceImagesElement, - ]; - $expectedResponse = new ListReferenceImagesResponse(); - $expectedResponse->setPageSize($pageSize2); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReferenceImages($referenceImages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $response = $gapicClient->listReferenceImages($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReferenceImages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/ListReferenceImages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReferenceImagesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->listReferenceImages($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function purgeProductsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeProductsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/purgeProductsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $response = $gapicClient->purgeProducts($formattedParent); - $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.vision.v1.ProductSearch/PurgeProducts', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); - $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 purgeProductsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/purgeProductsTest'); - $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]'); - $response = $gapicClient->purgeProducts($formattedParent); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/purgeProductsTest'); - 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 removeProductFromProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($formattedProduct, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeProductFromProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->productSetName('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]'); - $formattedProduct = $gapicClient->productName('[PROJECT]', '[LOCATION]', '[PRODUCT]'); - try { - $gapicClient->removeProductFromProductSet($formattedName, $formattedProduct); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $productCategory = 'productCategory-1607451058'; - $expectedResponse = new Product(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setProductCategory($productCategory); - $transport->addResponse($expectedResponse); - // Mock request - $product = new Product(); - $response = $gapicClient->updateProduct($product); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProduct', $actualFuncCall); - $actualValue = $actualRequestObject->getProduct(); - $this->assertProtobufEquals($product, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $product = new Product(); - try { - $gapicClient->updateProduct($product); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ProductSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $productSet = new ProductSet(); - $response = $gapicClient->updateProductSet($productSet); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vision.v1.ProductSearch/UpdateProductSet', $actualFuncCall); - $actualValue = $actualRequestObject->getProductSet(); - $this->assertProtobufEquals($productSet, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProductSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $productSet = new ProductSet(); - try { - $gapicClient->updateProductSet($productSet); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php b/owl-bot-staging/VmMigration/v1/proto/src/GPBMetadata/Google/Cloud/Vmmigration/V1/Vmmigration.php deleted file mode 100644 index 19f7cd9db63df44fe135d4697afdfabad9ec3e10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37746 zcmeHwYit}>mfkjBA}=M1D!p2iWw%QnTc#<}qCK+Rl04HSn^M~(o5PnZhn}8hvq<)s z?Cx}RQ>&TfVt0bY?k1UiU|+MDWD_6@B-w0UK#)O#4R#YGL0}{Z@6{}usSlg+s zC#lAsm8#XNjcTd7pW15f>{#_wsd`W=?_2fBRBA4tTFS4bvU9n$7tz(OHtQuTo!YHd zclWKS(tfqMJ#~0+P~OFW@Rs|}Njb6*mEwVA*NP=8b$@wg(P|X8i;d#ueL2YH zEDf@`(HdlP5N>6K~y+CQ)`G$9cTB;R;AHhpZT)2zdd8^6%WhRdUst{EG0Iv zC%I6q?ADu=O1ZMTnXi$sc1NVMc5_Yc8-K!1S4r?<(f;@teb>s6_eSxc7QgRGt+bh~ z*Q@n8s7HCfixs7wtB`|chdxrUZ@ybrVw~CDcBFP5T7JWkGm^Sj#DD)YJ>q6p`fXh0 z=93Z*CS7nad3bB=vKp&cD+4b`@E8@wUU0qGA?Ye?De+PbuDBZ1l?z?|2tkvlwv{xf_Zr2V_dJUOths8Tr|7h3=!NxtqFyUaS+shEZC*b0UK3C6 z2@RSyzc9buFGg3a8jwuN_Ux0=zGa*ieT0)ELU82W@O7mdLswV}W_8XHz zV4!-VKvPL3@N9T`Y?3MEu|esiBY?()7_=(e+q|?yrTe1^Lx_Rp%=#)`^w7WOGr0x)yVp1)hE~^SXS3Nk z{MncOD~ZoCe<>keb1MTc67;~H#11>f$LF0irA6){T?yYV*KW&NIJVJK)B%Qk?fU> zd|NXza1C>MOGalGowTYCe#n>=!_I(}-DIB}a3XX-XOPOS8st53wpO(p1+c0Fsl$h) zzzt7Ng$}fgKFdxQHP%U#sz=T~LRn2wzNy%UK_p#(6Q!`ndI^VcAmM zdyS+R)$FqXn(__JqSv@3UWL^JYUg!U|XeXWm~Reukogs z;4XXRdgDoSFIuc#^MWwi8EIx+1XL@lPbwv2T8zlyZTt}vvdmu}7Q>5dQIbR(TjF`L zNI^}(s_d34RsjGA;|o~3Q*7=x?BtkSgK&|Yp zc=DPYI$WkQkL^`y7;hY?-Fv3@`d5qDD77xJVf^PY z-jJK7p8lnH(_a+lO3iv5J6S(yp0c^01^ znz;eKex5OnRLBl-pV}L9Vqm|xW$oL^QMr4*8TxTI2Nq=>6DwBC&7?+iw41aldJ?8l`*QPMF_IMDORz*`+z&&xb_+N;Wh12;2FH z5c9c})wROvqorAF>Db;gvunAH>}a1cDo)R?udSg^A-|Db89hZ-0iMV|2D$4}W`Vm7 zxvT`?yvuz^UmPY&VLpepxes9}oHj6l?8-`hW%Nw?$6+-5sCYRvb&Tj;It3FBJE$6 z##=5UIHvY%g)6$DD6PVxg9Etr1cj&HqI9vSuP2m0^UmY7H2ng{rMALXd+iL-#0E%ez^J@ps*!Jv*XJg_FRueWG zLTNS}7#aUiNPJgg9UCw=Le)c&b^^3hPJWNq$(KHV3*q{F2-okj9|F+syFj~NNr*3m zp? zWGBX(e?K8E&Ptb4@7^ocA8jH$E*;q-`B!Yq&%E~iOwZ?;FBq{bfGdcO(*8^GTF`DZ zAxw{PPYgM)lo-Z$ae55sZJlRG<5Ik12qD6YvqfZ#_Wd-x<8km61+i=xGbt|l$Fyt6 zE*EQEaCsD5mz7z6Y1ycpOi?<4ue zOrVDe*0aF*CS76EK8b!w?gF-tT+>LZfzU0It z`s9L!$H$oTNw*X4i);~q4t441r@!`D<|FZ9$Ofub>+R!io-?pMZ5i0p;XrdooDWz| zga-zZFF}@AEBR*^RokD z)W7V;SH)t9K89B=P))N5pHfDqDxebv75?cFWx0}i2V1Rmkr zY}?n@io3?k;`!Ea2!A*0WyHE=I8KIJZ6vq=97aQ2V`ZN;6pO zj@#^sU`U+^x7RTs=4EGPXpVqc7B!GakX6i9?%1NZ5VTMbturn$z#b(*z<3@p8Vf?v zD74-jFNOK$t*OU)GYJ! z0dal~Wh1OTv(-uksj_PQm=PggL^~!}YSeWFg|I!5zSs>eG$50K!b5Ti`=L>1vDAm< zl0}PBZK|y35TYNa5EQjZ&m{IC(=)KuEPZT|lxqnv-qU(VhTzEb?NGT3U`}UWj#CGb zIPd5yWne?}^`=M_YshAkjf8rfojS5m^=1hbEmlF(DYM!P1Dmgiu~vJ#y3?S|)M-h+ zxAOFsgi$<1Jp}FU`n@ef=uuJljPABBGZ!|0`Mwxw)=;dp4LeBY;}KLR%Em)kyUtw* z$eKKmx!jGMBUYTBpI^u=Wqn!WRw%76{iom&{>i>L+|D(Mgam93zUl`~9ES)orAi$a zRm&l5JwxVv^!j;{{vBcf=3h==qxOlKkr&B|^%zD&ZNK_NimoH=609R-SL@OSV}vm; z&Xy|$qz9p1oQadj-t9Q%N0_XCY!?*qLIUEkLGso?mJN#DP-<7)m*&c#afLET`&JS4 zA*eq?hM5|(oAjFrVUQQVhL_{Eyn~FT+tGVfI(pZQ7`EFpby|KZA&U-vV8*><~Qj4tTP4V3zoN?YG4M zKUa=+TuueM*}sU1GhBNoKIP<}sW?liP`lncC3{9|TD-F#cUp3zH+NxqK;r%EJns6C zo$ZP+&~9!JgfLNxLWYdeHn%pE%2& zj8n8Alc@)^z>EXv>DmnNSk4r7<|WtT_WA@=u{E1$Eg^x*9Xy2%5`B#YFD%r&xvhK#R>;jL=5QK%y6gNJ0> zbW6Yt`sZbL2_0rm2p3IP#pUJv!|X~Ss3L7Z^yHUNjCM-&!mfZ#A*;_&v$jOlXT9cK zAzGsw7-}Y;Un}I1Y|AhCirX+mc0Px(21VaYF26e3WB%@-I1M+dqg?oxl*IxZZy|)# z8)Hlu>XDm)EEh{&3E&(>cxi)sPOjx=;PuD=nbbZRV6pJZ02#rZWq>54*SI7`sx_jl$2Z@b|8>W7&xqzNFAl+Og4bmb+wZt(jAQs9x0EP z>q#=APx`WFW#{msN)O9h9xGJ*8wlx1+j+?NBjWraipQE%f-kFCnF`8Rk4(QCx^;TS z-#FOt46_Da7)#=Gv0mCMH{k8Tn@Cb&)W~#rNZdDS#?^o9H8IqpBg&cGcxoz1M)iQ^Z;6qO z12?;j7sOSJnOT{AkXy^nuC1^52Lo*6-gx^qSH^zu_U*#$H-SeeYRRlD;-9^g730T+ z#mwwzpE<#SEssbF(c|nox(HgLiun~Ws)65D(NDzpPpJ|VWuApsmFfPfyZOF2BL&16 zFYO=i)z~s?{)dFPLCo> zj}_*a8AdI$s%Ny#KRqDMtvAYAw^7_ytv5OpHhOk?-WDF{5C%;@3L)FR(>Z_<>HG1v z-~=!t0*=1mIVbemElj7bo=0CmRlH73AG`wzdQEGa8ns_2oTKs`=)R}= z-BT3=M|-G6;+VL!mRrmg=2tTKueZz|Nb)e7eIKI%Jr?szYYzYP3v`is!W+L^h$gVXtvrT&-BBfUkdCXzZbac6Se@`kuvcAK zUJ{wWEU&b|sY4G1o>i7tx@J6zJIgEM)AF(T8wv4zCtj#sZ&{po$){2io%am~p*E`M zqsLDG|HXv3ikM2haZ1Lq*y3JNPj9^_SG1%tMkVa;<8GMI5B#?wrd?&z|p{C zu65unP|DRl304U6A0@;KowbIGx}KJ3c=j=3P~bl1LYdY+=4@^qtCjxnl(-sl9!%!8 z4)`DzheESrMAd*RgOX#RGdDlajEfr~CMh2@TjqnEbih}}P1ux!4RwIRC3&C?p$?qO ztCw-ePfnlWrtX(qYei2TtA*+j24vYnP8j;BJmtNEG!d6HM0uP`Y$)ZZAccAbC9KH_ z8N&IYA!&HY02SGQQ8tQ)zjFw@%5ct_Q#izK$y}(N;~9flsn6_rs)^ngr*R<8LhT%f zo;Vs8UMcDsdx3k)DdxmknXN-aSPiO*v?2=nDX(U2tC1M%-xEejom{l}93G1M)fuwz z?N-fBo!&z)ItnVoe>lmBz%fF9i5r86j(Nh+WZOph*dDrDQAnQf2V(F*UC*ITo6R44 zf%H8eT;u{_FK%xmkyxb?T*X*Efi^@*#=WZDXq|lQvJ`A=N}Tb2E-JG3Tc^aBhZ9=5 zz|qxt_|l~Mk!&n2=d&vq{CZh=F87r|bm2d(jHXgR=Z}zyW z;?<`gF!e2p(YCD%DynutmA{1FVK=w*GY&@rMdcPrAmkKa;vp)GJk20%A;yXrstM3kM46w zZ01pZ0cpP9M)0|{Lo8Ldt;`ONIH0!CTjjTenr(SGO0}-S3wJ}MB6!S6zKI7Vca)i; zL$?%@M%kqKwitBYCB=pOa&{%NmS6G3_mH&AQPL7MPq=r$NZ`oQB>+12wq3Fa~s8c&fPMkO~cb6cgs*3`Qvg8 zCo2o`l%>ouN* zMVu47G{1w@Y^Pj>W9CRL$BV+;ZUG#RS=`@eHaL@8s;oVIePxzL-1CNqFBY^QKD<1jpHtMjYcUE0DUbH?8)` z^0sxt$@0e46l1(`1g~zC<6hI*Z{^U06|(QIr1av+T!w>{9W_!Yfw=HCEG3`(Bij=un? zGLX#hVb5)SQyNQXOcn)04K5Ti7-~Fo?iym8IkB!Cb54vXmM|DmJX1R6s&qyWcq~b} z?3XT)YqQmy+vwPCiY)|2#%EL$KZa&r`#f_auFGS>!V8#}vhaQtRU0d)+&{E_@FxDe zcrJKqYVQ98jyo$z>pC5+boYEPbyLFB<|{_b8(^-A5!VeZK8?xXR>#)$Eo!Uo>XyA= z?b!f5eC>sEQ;eqPjt4|EH8JnAF_C3%A6RkmZz8HmFyG>#gY_q6;xk43Us7Qk&%71v z&)~L_)&gmBva1z3e&_=A6W9V;(|S5f_+veYN6M%&QhGXBaLm)#?)&*-8Z$`uvwF9Wo}d|c&X080wjA&QquQ1x=10cK^_5DjNr~@ zefU^b`SRz?-|iD54zkM2+u=I&l@Pa8vFh*)w72V|9AFlm`Ll0}Gkl}CzW<6D^PDyq z=mP77Dvo8+?;b4j9a-G-HYO~8=%9d86FM##qaSW`+q3p-NKjPd&2tpMzUcnk1H7GF zz+3(fZdK(OQVq1aP$|lsH2(xH&T}Zm3872!^2@?(e$F4YK8F*>OYbk`A1)R6g3JV+ zWLnLyuOPs^ffEjMe8PcW_TVg6QoUTsE-&O}-ET>Gk_c+w&#obC?SI>cP4s+zwIJ^! zba(5gBNDR<$iS#6450A+jJozyJvv20udn5t6BigikLWp1YmnxgS;iMRF29VpJ1FIs zL*zvpsM*)m_WFdwdtz{>T<05RXoHS%;Ket@n1Jv%Wp=4Y}vtG`hMK{h4C+Ur2CqZvY7j zxp4sjO1(9Ge7Bj#@9=|H{xMl;jvEmuh%tb;e@qSKIMd~d<|saQb^H7{ZoqD<#iYnQ zl}cX^knfFL_MtD&gu4Bi%xZ3y)0Ok<3k#z?;|Job0y;{~$Pr%@*Ej)1*Xhb5OKn3z zYucOW!GRj>FV*MZq+IkAb~vR+H^fV``NidR-0z=Vx{tdU3Uj&D_k*%rUl1>LY>Cv^ z(p+X`4m763bDf*5(hmfL4K$NkAV|P*&2e0wmGsPc!Bvh#?Du^J;Feul&GOXevh$hs zg*E(6!Aq#z^b+W4DAUJ@s8%wy+%x_&WXig4<84(68ROz*-*-A6FEvrv?46UlEuTC^ z4l|?;A4;A6=~Xejao}v3#$Qd~R%n0^CX(Fu9ZQ*2y94AA>LsA}E0hUoUsln1t6103S(HrNribs+G zQbxQ-D2?#bFW$zQobZFp{ys{j7opO;0CG*Z_ zxD2tm?J1N$yal5= zwr$S!r&rs=*Hspi4Gm7=eD6@AW_=}ytNowH8P<$AX9?|^8~ z+kg*8AX;!IO=`q$)jkswFxJ{(G;Q$~GKerz`M=vEuCVe3kr%!i9s6ktBh>!yLG5n@ zUuYP#xxS$kzeP&xJlaIiL#_NDnomIr(t+o%3>+1^!m8Xo|2p=I$-f^xHVDj(Ge=G) zJ3rMUM*ZicjPUDU{LN!h`fHGso1G731=wQJl-V;&QvHL3Bhs)5z8Y}+DBa|X5S{aB z>BPA469@#eI=K9NBRurk);=aPeih6}d4C-&NL{Wgbvba=3r@KI(CYD?neGlGok8$R zdudPor-AIxC_%i73wDG^_?v4kgfp+bm)Zf|_wE39jS~=O{B4-!0C5*J5oWo!u_h&U zd8V0jBfOq_JS}yv3L*PXLL}Ljb5B25|lU0ue2?5G#EQV0nCAPr;*QcRl5=d|4;eTk)DcBBitWutM8O0vttpm z{wKkMiH^mg0ZfooKQvdK0@ZbI#Ve8h->~rB64{7__co5X@PC{a-rtuow-e1zXQgYN z@?s(x>9ccf<*^Z)ZCm@8g#TF(J{eMt8$f%I&_6QQp2G6)_^XbI8>IPcO6Z@;h!6m8 zxjja74A@_}1+t@f>7Crh_}-h`a+5$~^vL~(%Y zIp`NT@B@o6Iq+>(0q=(ZA$(6p5I9z|kuC(0p(*m2`-;)9wl^ zZQGGUBI>)p}RE|sp@27V@Q5R8;V8sXRH>1KMO zG3s>9cic?YGYexfPm9?2Pl4KuV?4QVzPMWI`9*+T<&(^qa||FLA8=8@oSe~w{I7<# zH_R?roaUdVrhRpo{opwCxLU@frxroaIVPm(OO?Je{kjwv`8L!omMtV2DT@9fC}Mv$ z4n?k(F)7+Pw$D2;&I=Sz(*6tl__m_y2)nxdL%P?wlg|0Jls6<**S=w(f)}# zI^sESWE#x6SLH6NGl|CcU zcqcMP-PT9b7+nDq&{aWE!3#yp#!|HX*eYW2$H=GZt%_c*ST_DWRus77pFzZm2K3O> zh8Otxzhi#n#w$%;*rIXO5=*Rcto)C=k=!zKH{$4g8qQ!OXwLO^|pOCJZyUxL@TQsud_xqq>~Xd6@Q}`-sDqT-%TX#Hv{YKB#`_=01zBP$h2@0t;7M+hwZru7rzunxFuQxYc@A1d2 z&w8Hc?&-8_kWRZA;E!8d12vlK8?T6z`rkwfKV@gVdPg`<=s-!iluo}?w((kBXK0e{{d1&?iv69 diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php deleted file mode 100644 index 6fc60a510df5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AdaptingOSStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.AdaptingOSStep - */ -class AdaptingOSStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php deleted file mode 100644 index d4a9f9a19d65..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.AddGroupMigrationRequest - */ -class AddGroupMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full path name of the Group to add to. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * The full path name of the MigratingVm to add. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $group Required. The full path name of the Group to add to. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\AddGroupMigrationRequest - * - * @experimental - */ - public static function build(string $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The full path name of the Group to add to. - * @type string $migrating_vm - * The full path name of the MigratingVm to add. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full path name of the Group to add to. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The full path name of the Group to add to. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * The full path name of the MigratingVm to add. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * The full path name of the MigratingVm to add. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php deleted file mode 100644 index d1f198d54029..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AddGroupMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.AddGroupMigrationResponse - */ -class AddGroupMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php deleted file mode 100644 index da08b27da901..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ApplianceVersion.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmmigration.v1.ApplianceVersion - */ -class ApplianceVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The appliance version. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * A link for downloading the version. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Determine whether it's critical to upgrade the appliance to this version. - * - * Generated from protobuf field bool critical = 3; - */ - protected $critical = false; - /** - * Link to a page that contains the version release notes. - * - * Generated from protobuf field string release_notes_uri = 4; - */ - protected $release_notes_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The appliance version. - * @type string $uri - * A link for downloading the version. - * @type bool $critical - * Determine whether it's critical to upgrade the appliance to this version. - * @type string $release_notes_uri - * Link to a page that contains the version release notes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The appliance version. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The appliance version. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * A link for downloading the version. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A link for downloading the version. - * - * 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; - } - - /** - * Determine whether it's critical to upgrade the appliance to this version. - * - * Generated from protobuf field bool critical = 3; - * @return bool - */ - public function getCritical() - { - return $this->critical; - } - - /** - * Determine whether it's critical to upgrade the appliance to this version. - * - * Generated from protobuf field bool critical = 3; - * @param bool $var - * @return $this - */ - public function setCritical($var) - { - GPBUtil::checkBool($var); - $this->critical = $var; - - return $this; - } - - /** - * Link to a page that contains the version release notes. - * - * Generated from protobuf field string release_notes_uri = 4; - * @return string - */ - public function getReleaseNotesUri() - { - return $this->release_notes_uri; - } - - /** - * Link to a page that contains the version release notes. - * - * Generated from protobuf field string release_notes_uri = 4; - * @param string $var - * @return $this - */ - public function setReleaseNotesUri($var) - { - GPBUtil::checkString($var, True); - $this->release_notes_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php deleted file mode 100644 index c015b9cf1649..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmmigration.v1.AppliedLicense - */ -class AppliedLicense extends \Google\Protobuf\Internal\Message -{ - /** - * The license type that was used in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; - */ - protected $type = 0; - /** - * The OS license returned from the adaptation module's report. - * - * Generated from protobuf field string os_license = 2; - */ - protected $os_license = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The license type that was used in OS adaptation. - * @type string $os_license - * The OS license returned from the adaptation module's report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The license type that was used in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The license type that was used in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AppliedLicense\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The OS license returned from the adaptation module's report. - * - * Generated from protobuf field string os_license = 2; - * @return string - */ - public function getOsLicense() - { - return $this->os_license; - } - - /** - * The OS license returned from the adaptation module's report. - * - * Generated from protobuf field string os_license = 2; - * @param string $var - * @return $this - */ - public function setOsLicense($var) - { - GPBUtil::checkString($var, True); - $this->os_license = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php deleted file mode 100644 index 27008d8cc57e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AppliedLicense/Type.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.AppliedLicense.Type - */ -class Type -{ - /** - * Unspecified license for the OS. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * No license available for the OS. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * The license type is Pay As You Go license type. - * - * Generated from protobuf enum PAYG = 2; - */ - const PAYG = 2; - /** - * The license type is Bring Your Own License type. - * - * Generated from protobuf enum BYOL = 3; - */ - const BYOL = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::NONE => 'NONE', - self::PAYG => 'PAYG', - self::BYOL => 'BYOL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VMMigration\V1\AppliedLicense_Type::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php deleted file mode 100644 index a32202170f8c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AvailableUpdates.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.vmmigration.v1.AvailableUpdates - */ -class AvailableUpdates extends \Google\Protobuf\Internal\Message -{ - /** - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; - */ - protected $new_deployable_appliance = null; - /** - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; - */ - protected $in_place_update = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $new_deployable_appliance - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * @type \Google\Cloud\VMMigration\V1\ApplianceVersion $in_place_update - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; - * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null - */ - public function getNewDeployableAppliance() - { - return $this->new_deployable_appliance; - } - - public function hasNewDeployableAppliance() - { - return isset($this->new_deployable_appliance); - } - - public function clearNewDeployableAppliance() - { - unset($this->new_deployable_appliance); - } - - /** - * The newest deployable version of the appliance. - * The current appliance can't be updated into this version, and the owner - * must manually deploy this OVA to a new appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1; - * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var - * @return $this - */ - public function setNewDeployableAppliance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); - $this->new_deployable_appliance = $var; - - return $this; - } - - /** - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; - * @return \Google\Cloud\VMMigration\V1\ApplianceVersion|null - */ - public function getInPlaceUpdate() - { - return $this->in_place_update; - } - - public function hasInPlaceUpdate() - { - return isset($this->in_place_update); - } - - public function clearInPlaceUpdate() - { - unset($this->in_place_update); - } - - /** - * The latest version for in place update. - * The current appliance can be updated to this version using the API or m4c - * CLI. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2; - * @param \Google\Cloud\VMMigration\V1\ApplianceVersion $var - * @return $this - */ - public function setInPlaceUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); - $this->in_place_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php deleted file mode 100644 index ee8d6768c507..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSecurityGroup.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmmigration.v1.AwsSecurityGroup - */ -class AwsSecurityGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The AWS security group id. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The AWS security group name. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The AWS security group id. - * @type string $name - * The AWS security group name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The AWS security group id. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The AWS security group 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 AWS security group name. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The AWS security group name. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php deleted file mode 100644 index 31c465db770b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails.php +++ /dev/null @@ -1,348 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails - */ -class AwsSourceDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The AWS region that the source VMs will be migrated from. - * - * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $aws_region = ''; - /** - * Output only. State of the source as determined by the health check. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Provides details on the state of the Source in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * AWS resource tags to limit the scope of the source inventory. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; - */ - private $inventory_tag_list; - /** - * AWS security group names to limit the scope of the source - * inventory. - * - * Generated from protobuf field repeated string inventory_security_group_names = 7; - */ - private $inventory_security_group_names; - /** - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * - * Generated from protobuf field map migration_resources_user_tags = 8; - */ - private $migration_resources_user_tags; - /** - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * - * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $public_ip = ''; - protected $credentials_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $access_key_creds - * AWS Credentials using access key id and secret. - * @type string $aws_region - * Immutable. The AWS region that the source VMs will be migrated from. - * @type int $state - * Output only. State of the source as determined by the health check. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the Source in case of an - * error. - * @type array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $inventory_tag_list - * AWS resource tags to limit the scope of the source inventory. - * @type array|\Google\Protobuf\Internal\RepeatedField $inventory_security_group_names - * AWS security group names to limit the scope of the source - * inventory. - * @type array|\Google\Protobuf\Internal\MapField $migration_resources_user_tags - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * @type string $public_ip - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * AWS Credentials using access key id and secret. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; - * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials|null - */ - public function getAccessKeyCreds() - { - return $this->readOneof(11); - } - - public function hasAccessKeyCreds() - { - return $this->hasOneof(11); - } - - /** - * AWS Credentials using access key id and secret. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials access_key_creds = 11; - * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials $var - * @return $this - */ - public function setAccessKeyCreds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\AccessKeyCredentials::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Immutable. The AWS region that the source VMs will be migrated from. - * - * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getAwsRegion() - { - return $this->aws_region; - } - - /** - * Immutable. The AWS region that the source VMs will be migrated from. - * - * Generated from protobuf field string aws_region = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setAwsRegion($var) - { - GPBUtil::checkString($var, True); - $this->aws_region = $var; - - return $this; - } - - /** - * Output only. State of the source as determined by the health check. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the source as determined by the health check. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Provides details on the state of the Source in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the Source in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * AWS resource tags to limit the scope of the source inventory. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventoryTagList() - { - return $this->inventory_tag_list; - } - - /** - * AWS resource tags to limit the scope of the source inventory. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceDetails.Tag inventory_tag_list = 10; - * @param array<\Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventoryTagList($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceDetails\Tag::class); - $this->inventory_tag_list = $arr; - - return $this; - } - - /** - * AWS security group names to limit the scope of the source - * inventory. - * - * Generated from protobuf field repeated string inventory_security_group_names = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventorySecurityGroupNames() - { - return $this->inventory_security_group_names; - } - - /** - * AWS security group names to limit the scope of the source - * inventory. - * - * Generated from protobuf field repeated string inventory_security_group_names = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventorySecurityGroupNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->inventory_security_group_names = $arr; - - return $this; - } - - /** - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * - * Generated from protobuf field map migration_resources_user_tags = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMigrationResourcesUserTags() - { - return $this->migration_resources_user_tags; - } - - /** - * User specified tags to add to every M2VM generated resource in AWS. - * These tags will be set in addition to the default tags that are set as part - * of the migration process. The tags must not begin with the reserved prefix - * `m2vm`. - * - * Generated from protobuf field map migration_resources_user_tags = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMigrationResourcesUserTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->migration_resources_user_tags = $arr; - - return $this; - } - - /** - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * - * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPublicIp() - { - return $this->public_ip; - } - - /** - * Output only. The source's public IP. All communication initiated by this - * source will originate from this IP. - * - * Generated from protobuf field string public_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPublicIp($var) - { - GPBUtil::checkString($var, True); - $this->public_ip = $var; - - return $this; - } - - /** - * @return string - */ - public function getCredentialsType() - { - return $this->whichOneof("credentials_type"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php deleted file mode 100644 index 42e4c86fab4a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails.AccessKeyCredentials - */ -class AccessKeyCredentials extends \Google\Protobuf\Internal\Message -{ - /** - * AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1; - */ - protected $access_key_id = ''; - /** - * Input only. AWS secret access key. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $secret_access_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_key_id - * AWS access key ID. - * @type string $secret_access_key - * Input only. AWS secret access key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1; - * @return string - */ - public function getAccessKeyId() - { - return $this->access_key_id; - } - - /** - * AWS access key ID. - * - * Generated from protobuf field string access_key_id = 1; - * @param string $var - * @return $this - */ - public function setAccessKeyId($var) - { - GPBUtil::checkString($var, True); - $this->access_key_id = $var; - - return $this; - } - - /** - * Input only. AWS secret access key. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getSecretAccessKey() - { - return $this->secret_access_key; - } - - /** - * Input only. AWS secret access key. - * - * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSecretAccessKey($var) - { - GPBUtil::checkString($var, True); - $this->secret_access_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessKeyCredentials::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_AccessKeyCredentials::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php deleted file mode 100644 index 64b61a6c73a5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The source is available but might not be usable yet due to invalid - * credentials or another reason. - * The error message will contain further details. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The source exists and its credentials were verified. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::FAILED => 'FAILED', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php deleted file mode 100644 index 7604d5c11845..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/Tag.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceDetails.Tag - */ -class Tag extends \Google\Protobuf\Internal\Message -{ - /** - * Key of tag. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * Value of tag. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Key of tag. - * @type string $value - * Value of tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Key of tag. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Key of tag. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Value of tag. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Value of tag. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Tag::class, \Google\Cloud\VMMigration\V1\AwsSourceDetails_Tag::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php deleted file mode 100644 index b8365eebfd4d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceVmDetails - */ -class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; - */ - protected $firmware = 0; - /** - * The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2; - */ - protected $committed_storage_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $firmware - * The firmware type of the source VM. - * @type int|string $committed_storage_bytes - * The total size of the disks being migrated in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; - * @return int - */ - public function getFirmware() - { - return $this->firmware; - } - - /** - * The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; - * @param int $var - * @return $this - */ - public function setFirmware($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\Firmware::class); - $this->firmware = $var; - - return $this; - } - - /** - * The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2; - * @return int|string - */ - public function getCommittedStorageBytes() - { - return $this->committed_storage_bytes; - } - - /** - * The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php deleted file mode 100644 index 5a55b923fe10..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/Firmware.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware - */ -class Firmware -{ - /** - * The firmware is unknown. - * - * Generated from protobuf enum FIRMWARE_UNSPECIFIED = 0; - */ - const FIRMWARE_UNSPECIFIED = 0; - /** - * The firmware is EFI. - * - * Generated from protobuf enum EFI = 1; - */ - const EFI = 1; - /** - * The firmware is BIOS. - * - * Generated from protobuf enum BIOS = 2; - */ - const BIOS = 2; - - private static $valueToName = [ - self::FIRMWARE_UNSPECIFIED => 'FIRMWARE_UNSPECIFIED', - self::EFI => 'EFI', - self::BIOS => 'BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Firmware::class, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails_Firmware::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php deleted file mode 100644 index 7535504cdd78..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php +++ /dev/null @@ -1,645 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails - */ -class AwsVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The VM ID in AWS. - * - * Generated from protobuf field string vm_id = 1; - */ - protected $vm_id = ''; - /** - * The display name of the VM. Note that this value is not necessarily unique. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The id of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_id = 3; - */ - protected $source_id = ''; - /** - * The descriptive name of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_description = 4; - */ - protected $source_description = ''; - /** - * Output only. The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $power_state = 0; - /** - * The number of cpus the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - */ - protected $cpu_count = 0; - /** - * The memory size of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 7; - */ - protected $memory_mb = 0; - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 8; - */ - protected $disk_count = 0; - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 9; - */ - protected $committed_storage_mb = 0; - /** - * The VM's OS. - * - * Generated from protobuf field string os_description = 10; - */ - protected $os_description = ''; - /** - * The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; - */ - protected $boot_option = 0; - /** - * The instance type of the VM. - * - * Generated from protobuf field string instance_type = 12; - */ - protected $instance_type = ''; - /** - * The VPC ID the VM belongs to. - * - * Generated from protobuf field string vpc_id = 13; - */ - protected $vpc_id = ''; - /** - * The security groups the VM belongs to. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; - */ - private $security_groups; - /** - * The tags of the VM. - * - * Generated from protobuf field map tags = 15; - */ - private $tags; - /** - * The AWS zone of the VM. - * - * Generated from protobuf field string zone = 16; - */ - protected $zone = ''; - /** - * The virtualization type. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; - */ - protected $virtualization_type = 0; - /** - * The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; - */ - protected $architecture = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_id - * The VM ID in AWS. - * @type string $display_name - * The display name of the VM. Note that this value is not necessarily unique. - * @type string $source_id - * The id of the AWS's source this VM is connected to. - * @type string $source_description - * The descriptive name of the AWS's source this VM is connected to. - * @type int $power_state - * Output only. The power state of the VM at the moment list was taken. - * @type int $cpu_count - * The number of cpus the VM has. - * @type int $memory_mb - * The memory size of the VM in MB. - * @type int $disk_count - * The number of disks the VM has. - * @type int|string $committed_storage_mb - * The total size of the storage allocated to the VM in MB. - * @type string $os_description - * The VM's OS. - * @type int $boot_option - * The VM Boot Option. - * @type string $instance_type - * The instance type of the VM. - * @type string $vpc_id - * The VPC ID the VM belongs to. - * @type array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $security_groups - * The security groups the VM belongs to. - * @type array|\Google\Protobuf\Internal\MapField $tags - * The tags of the VM. - * @type string $zone - * The AWS zone of the VM. - * @type int $virtualization_type - * The virtualization type. - * @type int $architecture - * The CPU architecture. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The VM ID in AWS. - * - * Generated from protobuf field string vm_id = 1; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * The VM ID in AWS. - * - * Generated from protobuf field string vm_id = 1; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * The display name of the VM. Note that this value is not necessarily unique. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the VM. Note that this value is not necessarily unique. - * - * 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 id of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_id = 3; - * @return string - */ - public function getSourceId() - { - return $this->source_id; - } - - /** - * The id of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_id = 3; - * @param string $var - * @return $this - */ - public function setSourceId($var) - { - GPBUtil::checkString($var, True); - $this->source_id = $var; - - return $this; - } - - /** - * The descriptive name of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_description = 4; - * @return string - */ - public function getSourceDescription() - { - return $this->source_description; - } - - /** - * The descriptive name of the AWS's source this VM is connected to. - * - * Generated from protobuf field string source_description = 4; - * @param string $var - * @return $this - */ - public function setSourceDescription($var) - { - GPBUtil::checkString($var, True); - $this->source_description = $var; - - return $this; - } - - /** - * Output only. The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPowerState() - { - return $this->power_state; - } - - /** - * Output only. The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.PowerState power_state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPowerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\PowerState::class); - $this->power_state = $var; - - return $this; - } - - /** - * The number of cpus the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * The number of cpus the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - * @param int $var - * @return $this - */ - public function setCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_count = $var; - - return $this; - } - - /** - * The memory size of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 7; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * The memory size of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 7; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 8; - * @return int - */ - public function getDiskCount() - { - return $this->disk_count; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 8; - * @param int $var - * @return $this - */ - public function setDiskCount($var) - { - GPBUtil::checkInt32($var); - $this->disk_count = $var; - - return $this; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 9; - * @return int|string - */ - public function getCommittedStorageMb() - { - return $this->committed_storage_mb; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 9; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageMb($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_mb = $var; - - return $this; - } - - /** - * The VM's OS. - * - * Generated from protobuf field string os_description = 10; - * @return string - */ - public function getOsDescription() - { - return $this->os_description; - } - - /** - * The VM's OS. - * - * Generated from protobuf field string os_description = 10; - * @param string $var - * @return $this - */ - public function setOsDescription($var) - { - GPBUtil::checkString($var, True); - $this->os_description = $var; - - return $this; - } - - /** - * The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.BootOption boot_option = 11; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\BootOption::class); - $this->boot_option = $var; - - return $this; - } - - /** - * The instance type of the VM. - * - * Generated from protobuf field string instance_type = 12; - * @return string - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * The instance type of the VM. - * - * Generated from protobuf field string instance_type = 12; - * @param string $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkString($var, True); - $this->instance_type = $var; - - return $this; - } - - /** - * The VPC ID the VM belongs to. - * - * Generated from protobuf field string vpc_id = 13; - * @return string - */ - public function getVpcId() - { - return $this->vpc_id; - } - - /** - * The VPC ID the VM belongs to. - * - * Generated from protobuf field string vpc_id = 13; - * @param string $var - * @return $this - */ - public function setVpcId($var) - { - GPBUtil::checkString($var, True); - $this->vpc_id = $var; - - return $this; - } - - /** - * The security groups the VM belongs to. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityGroups() - { - return $this->security_groups; - } - - /** - * The security groups the VM belongs to. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSecurityGroup security_groups = 14; - * @param array<\Google\Cloud\VMMigration\V1\AwsSecurityGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSecurityGroup::class); - $this->security_groups = $arr; - - return $this; - } - - /** - * The tags of the VM. - * - * Generated from protobuf field map tags = 15; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * The tags of the VM. - * - * Generated from protobuf field map tags = 15; - * @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; - } - - /** - * The AWS zone of the VM. - * - * Generated from protobuf field string zone = 16; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The AWS zone of the VM. - * - * Generated from protobuf field string zone = 16; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The virtualization type. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; - * @return int - */ - public function getVirtualizationType() - { - return $this->virtualization_type; - } - - /** - * The virtualization type. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType virtualization_type = 17; - * @param int $var - * @return $this - */ - public function setVirtualizationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmVirtualizationType::class); - $this->virtualization_type = $var; - - return $this; - } - - /** - * The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsVmDetails\VmArchitecture::class); - $this->architecture = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php deleted file mode 100644 index 208852fafad7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/BootOption.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.BootOption - */ -class BootOption -{ - /** - * The boot option is unknown. - * - * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; - */ - const BOOT_OPTION_UNSPECIFIED = 0; - /** - * The boot option is UEFI. - * - * Generated from protobuf enum EFI = 1; - */ - const EFI = 1; - /** - * The boot option is LEGACY-BIOS. - * - * Generated from protobuf enum BIOS = 2; - */ - const BIOS = 2; - - private static $valueToName = [ - self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', - self::EFI => 'EFI', - self::BIOS => 'BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_BootOption::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php deleted file mode 100644 index 5d90c29f7821..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/PowerState.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.PowerState - */ -class PowerState -{ - /** - * Power state is not specified. - * - * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; - */ - const POWER_STATE_UNSPECIFIED = 0; - /** - * The VM is turned on. - * - * Generated from protobuf enum ON = 1; - */ - const ON = 1; - /** - * The VM is turned off. - * - * Generated from protobuf enum OFF = 2; - */ - const OFF = 2; - /** - * The VM is suspended. This is similar to hibernation or sleep - * mode. - * - * Generated from protobuf enum SUSPENDED = 3; - */ - const SUSPENDED = 3; - /** - * The VM is starting. - * - * Generated from protobuf enum PENDING = 4; - */ - const PENDING = 4; - - private static $valueToName = [ - self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', - self::ON => 'ON', - self::OFF => 'OFF', - self::SUSPENDED => 'SUSPENDED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_PowerState::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php deleted file mode 100644 index 7f6c05454f56..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmArchitecture.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture - */ -class VmArchitecture -{ - /** - * The architecture is unknown. - * - * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; - */ - const VM_ARCHITECTURE_UNSPECIFIED = 0; - /** - * The architecture is I386. - * - * Generated from protobuf enum I386 = 1; - */ - const I386 = 1; - /** - * The architecture is X86_64. - * - * Generated from protobuf enum X86_64 = 2; - */ - const X86_64 = 2; - /** - * The architecture is ARM64. - * - * Generated from protobuf enum ARM64 = 3; - */ - const ARM64 = 3; - /** - * The architecture is X86_64_MAC. - * - * Generated from protobuf enum X86_64_MAC = 4; - */ - const X86_64_MAC = 4; - - private static $valueToName = [ - self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', - self::I386 => 'I386', - self::X86_64 => 'X86_64', - self::ARM64 => 'ARM64', - self::X86_64_MAC => 'X86_64_MAC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmArchitecture::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmArchitecture::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php deleted file mode 100644 index ce8c03686351..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails/VmVirtualizationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmDetails.VmVirtualizationType - */ -class VmVirtualizationType -{ - /** - * The virtualization type is unknown. - * - * Generated from protobuf enum VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; - */ - const VM_VIRTUALIZATION_TYPE_UNSPECIFIED = 0; - /** - * The virtualziation type is HVM. - * - * Generated from protobuf enum HVM = 1; - */ - const HVM = 1; - /** - * The virtualziation type is PARAVIRTUAL. - * - * Generated from protobuf enum PARAVIRTUAL = 2; - */ - const PARAVIRTUAL = 2; - - private static $valueToName = [ - self::VM_VIRTUALIZATION_TYPE_UNSPECIFIED => 'VM_VIRTUALIZATION_TYPE_UNSPECIFIED', - self::HVM => 'HVM', - self::PARAVIRTUAL => 'PARAVIRTUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmVirtualizationType::class, \Google\Cloud\VMMigration\V1\AwsVmDetails_VmVirtualizationType::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php deleted file mode 100644 index c5027ecbc764..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmsDetails.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.AwsVmsDetails - */ -class AwsVmsDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The details of the AWS VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $details - * The details of the AWS VMs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The details of the AWS VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * The details of the AWS VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsVmDetails details = 1; - * @param array<\Google\Cloud\VMMigration\V1\AwsVmDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsVmDetails::class); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php deleted file mode 100644 index 77cdadd56226..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.CancelCloneJobRequest - */ -class CancelCloneJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The clone job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The clone job id - * Please see {@see VmMigrationClient::cloneJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\CancelCloneJobRequest - * - * @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 clone job id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The clone job 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 clone job 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php deleted file mode 100644 index cd231e22cc6d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCloneJobResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.CancelCloneJobResponse - */ -class CancelCloneJobResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php deleted file mode 100644 index 71738014938e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.CancelCutoverJobRequest - */ -class CancelCutoverJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cutover job id - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The cutover job id - * Please see {@see VmMigrationClient::cutoverJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\CancelCutoverJobRequest - * - * @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 cutover job id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cutover job 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 cutover job 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php deleted file mode 100644 index 9c3a234caabd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelCutoverJobResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.CancelCutoverJobResponse - */ -class CancelCutoverJobResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php deleted file mode 100644 index dd34db7de2c9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php +++ /dev/null @@ -1,370 +0,0 @@ -google.cloud.vmmigration.v1.CloneJob - */ -class CloneJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * - * 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 clone job was ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The name of the clone. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. State of the clone job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The clone steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $steps; - protected $target_vm_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details - * Output only. Details of the target VM in Compute Engine. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the clone job was ended. - * @type string $name - * Output only. The name of the clone. - * @type int $state - * Output only. State of the clone job. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last updated. - * @type \Google\Rpc\Status $error - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * @type array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $steps - * Output only. The clone steps list representing its progress. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null - */ - public function getComputeEngineTargetDetails() - { - return $this->readOneof(20); - } - - public function hasComputeEngineTargetDetails() - { - return $this->hasOneof(20); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var - * @return $this - */ - public function setComputeEngineTargetDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Output only. The time the clone job was created (as an API call, not when - * it was actually created in the target). - * - * 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 clone job was created (as an API call, not when - * it was actually created in the target). - * - * 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 clone job was ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.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 clone job was ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 22 [(.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. The name of the clone. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the clone. - * - * Generated from protobuf field string name = 3 [(.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. State of the clone job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the clone job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CloneJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details for the errors that led to the Clone Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The clone steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * Output only. The clone steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneStep steps = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CloneStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneStep::class); - $this->steps = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetVmDetails() - { - return $this->whichOneof("target_vm_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php deleted file mode 100644 index a60e309260f0..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.vmmigration.v1.CloneJob.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The clone job has not yet started. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The clone job is active and running. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The clone job finished with errors. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The clone job finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The clone job was cancelled. - * - * Generated from protobuf enum CANCELLED = 5; - */ - const CANCELLED = 5; - /** - * The clone job is being cancelled. - * - * Generated from protobuf enum CANCELLING = 6; - */ - const CANCELLING = 6; - /** - * OS adaptation is running as part of the clone job to generate license. - * - * Generated from protobuf enum ADAPTING_OS = 7; - */ - const ADAPTING_OS = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLED => 'CANCELLED', - self::CANCELLING => 'CANCELLING', - self::ADAPTING_OS => 'ADAPTING_OS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\CloneJob_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php deleted file mode 100644 index 38ffc545d9b1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneStep.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.vmmigration.v1.CloneStep - */ -class CloneStep extends \Google\Protobuf\Internal\Message -{ - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - protected $step; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\AdaptingOSStep $adapting_os - * Adapting OS step. - * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks - * Preparing VM disks step. - * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm - * Instantiating migrated VM step. - * @type \Google\Protobuf\Timestamp $start_time - * The time the step has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the step has ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Adapting OS step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; - * @return \Google\Cloud\VMMigration\V1\AdaptingOSStep|null - */ - public function getAdaptingOs() - { - return $this->readOneof(3); - } - - public function hasAdaptingOs() - { - return $this->hasOneof(3); - } - - /** - * Adapting OS step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 3; - * @param \Google\Cloud\VMMigration\V1\AdaptingOSStep $var - * @return $this - */ - public function setAdaptingOs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AdaptingOSStep::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; - * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null - */ - public function getPreparingVmDisks() - { - return $this->readOneof(4); - } - - public function hasPreparingVmDisks() - { - return $this->hasOneof(4); - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 4; - * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var - * @return $this - */ - public function setPreparingVmDisks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; - * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null - */ - public function getInstantiatingMigratedVm() - { - return $this->readOneof(5); - } - - public function hasInstantiatingMigratedVm() - { - return $this->hasOneof(5); - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 5; - * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var - * @return $this - */ - public function setInstantiatingMigratedVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The time the step has 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 step has 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 step has ended. - * - * 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 step has ended. - * - * 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; - } - - /** - * @return string - */ - public function getStep() - { - return $this->whichOneof("step"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php deleted file mode 100644 index efcc0ffce13f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineBootOption.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineBootOption - */ -class ComputeEngineBootOption -{ - /** - * The boot option is unknown. - * - * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; - */ - const COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED = 0; - /** - * The boot option is EFI. - * - * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; - */ - const COMPUTE_ENGINE_BOOT_OPTION_EFI = 1; - /** - * The boot option is BIOS. - * - * Generated from protobuf enum COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; - */ - const COMPUTE_ENGINE_BOOT_OPTION_BIOS = 2; - - private static $valueToName = [ - self::COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED => 'COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED', - self::COMPUTE_ENGINE_BOOT_OPTION_EFI => 'COMPUTE_ENGINE_BOOT_OPTION_EFI', - self::COMPUTE_ENGINE_BOOT_OPTION_BIOS => 'COMPUTE_ENGINE_BOOT_OPTION_BIOS', - ]; - - 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php deleted file mode 100644 index 6dd7104b8f4d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineDiskType - */ -class ComputeEngineDiskType -{ - /** - * An unspecified disk type. Will be used as STANDARD. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; - */ - const COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED = 0; - /** - * A Standard disk type. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; - */ - const COMPUTE_ENGINE_DISK_TYPE_STANDARD = 1; - /** - * SSD hard disk type. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_SSD = 2; - */ - const COMPUTE_ENGINE_DISK_TYPE_SSD = 2; - /** - * An alternative to SSD persistent disks that balance performance and - * cost. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; - */ - const COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; - - private static $valueToName = [ - self::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED => 'COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED', - self::COMPUTE_ENGINE_DISK_TYPE_STANDARD => 'COMPUTE_ENGINE_DISK_TYPE_STANDARD', - self::COMPUTE_ENGINE_DISK_TYPE_SSD => 'COMPUTE_ENGINE_DISK_TYPE_SSD', - self::COMPUTE_ENGINE_DISK_TYPE_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_BALANCED', - ]; - - 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php deleted file mode 100644 index 427ea82b29bf..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineLicenseType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineLicenseType - */ -class ComputeEngineLicenseType -{ - /** - * The license type is the default for the OS. - * - * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; - */ - const COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT = 0; - /** - * The license type is Pay As You Go license type. - * - * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; - */ - const COMPUTE_ENGINE_LICENSE_TYPE_PAYG = 1; - /** - * The license type is Bring Your Own License type. - * - * Generated from protobuf enum COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; - */ - const COMPUTE_ENGINE_LICENSE_TYPE_BYOL = 2; - - private static $valueToName = [ - self::COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT => 'COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT', - self::COMPUTE_ENGINE_LICENSE_TYPE_PAYG => 'COMPUTE_ENGINE_LICENSE_TYPE_PAYG', - self::COMPUTE_ENGINE_LICENSE_TYPE_BYOL => 'COMPUTE_ENGINE_LICENSE_TYPE_BYOL', - ]; - - 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php deleted file mode 100644 index 2745c0b602a8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php +++ /dev/null @@ -1,674 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineTargetDefaults - */ -class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - */ - protected $vm_name = ''; - /** - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * - * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { - */ - protected $target_project = ''; - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - */ - protected $zone = ''; - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - */ - protected $machine_type_series = ''; - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - */ - protected $machine_type = ''; - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - */ - private $network_tags; - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - */ - private $network_interfaces; - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - */ - protected $service_account = ''; - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - */ - protected $disk_type = 0; - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - */ - protected $license_type = 0; - /** - * Output only. The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $applied_license = null; - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - */ - protected $compute_scheduling = null; - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - */ - protected $secure_boot = false; - /** - * Output only. The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $boot_option = 0; - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - */ - private $metadata; - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - */ - private $additional_licenses; - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - */ - protected $hostname = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_name - * The name of the VM to create. - * @type string $target_project - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * @type string $zone - * The zone in which to create the VM. - * @type string $machine_type_series - * The machine type series to create the VM with. - * @type string $machine_type - * The machine type to create the VM with. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * A map of network tags to associate with the VM. - * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * List of NICs connected to this VM. - * @type string $service_account - * The service account to associate the VM with. - * @type int $disk_type - * The disk type to use in the VM. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A map of labels to associate with the VM. - * @type int $license_type - * The license type to use in OS adaptation. - * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license - * Output only. The OS license returned from the adaptation module report. - * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling - * Compute instance scheduling information (if empty default is used). - * @type bool $secure_boot - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * @type int $boot_option - * Output only. The VM Boot Option, as set in the source vm. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * The metadata key/value pairs to assign to the VM. - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses - * Additional licenses to assign to the VM. - * @type string $hostname - * The hostname to assign to the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @return string - */ - public function getVmName() - { - return $this->vm_name; - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @param string $var - * @return $this - */ - public function setVmName($var) - { - GPBUtil::checkString($var, True); - $this->vm_name = $var; - - return $this; - } - - /** - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * - * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getTargetProject() - { - return $this->target_project; - } - - /** - * The full path of the resource of type TargetProject which represents the - * Compute Engine project in which to create this VM. - * - * Generated from protobuf field string target_project = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkString($var, True); - $this->target_project = $var; - - return $this; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @return string - */ - public function getMachineTypeSeries() - { - return $this->machine_type_series; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @param string $var - * @return $this - */ - public function setMachineTypeSeries($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_series = $var; - - return $this; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @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 license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); - $this->license_type = $var; - - return $this; - } - - /** - * Output only. The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null - */ - public function getAppliedLicense() - { - return $this->applied_license; - } - - public function hasAppliedLicense() - { - return isset($this->applied_license); - } - - public function clearAppliedLicense() - { - unset($this->applied_license); - } - - /** - * Output only. The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var - * @return $this - */ - public function setAppliedLicense($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); - $this->applied_license = $var; - - return $this; - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null - */ - public function getComputeScheduling() - { - return $this->compute_scheduling; - } - - public function hasComputeScheduling() - { - return isset($this->compute_scheduling); - } - - public function clearComputeScheduling() - { - unset($this->compute_scheduling); - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var - * @return $this - */ - public function setComputeScheduling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); - $this->compute_scheduling = $var; - - return $this; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @return bool - */ - public function getSecureBoot() - { - return $this->secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @param bool $var - * @return $this - */ - public function setSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->secure_boot = $var; - - return $this; - } - - /** - * Output only. The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * Output only. The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); - $this->boot_option = $var; - - return $this; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalLicenses() - { - return $this->additional_licenses; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalLicenses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->additional_licenses = $arr; - - return $this; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php deleted file mode 100644 index aaca78c78818..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php +++ /dev/null @@ -1,670 +0,0 @@ -google.cloud.vmmigration.v1.ComputeEngineTargetDetails - */ -class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - */ - protected $vm_name = ''; - /** - * The Google Cloud target project ID or project name. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - */ - protected $zone = ''; - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - */ - protected $machine_type_series = ''; - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - */ - protected $machine_type = ''; - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - */ - private $network_tags; - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - */ - private $network_interfaces; - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - */ - protected $service_account = ''; - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - */ - protected $disk_type = 0; - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - */ - private $labels; - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - */ - protected $license_type = 0; - /** - * The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; - */ - protected $applied_license = null; - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - */ - protected $compute_scheduling = null; - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - */ - protected $secure_boot = false; - /** - * The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; - */ - protected $boot_option = 0; - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - */ - private $metadata; - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - */ - private $additional_licenses; - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - */ - protected $hostname = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_name - * The name of the VM to create. - * @type string $project - * The Google Cloud target project ID or project name. - * @type string $zone - * The zone in which to create the VM. - * @type string $machine_type_series - * The machine type series to create the VM with. - * @type string $machine_type - * The machine type to create the VM with. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * A map of network tags to associate with the VM. - * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * List of NICs connected to this VM. - * @type string $service_account - * The service account to associate the VM with. - * @type int $disk_type - * The disk type to use in the VM. - * @type array|\Google\Protobuf\Internal\MapField $labels - * A map of labels to associate with the VM. - * @type int $license_type - * The license type to use in OS adaptation. - * @type \Google\Cloud\VMMigration\V1\AppliedLicense $applied_license - * The OS license returned from the adaptation module report. - * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling - * Compute instance scheduling information (if empty default is used). - * @type bool $secure_boot - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * @type int $boot_option - * The VM Boot Option, as set in the source vm. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * The metadata key/value pairs to assign to the VM. - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses - * Additional licenses to assign to the VM. - * @type string $hostname - * The hostname to assign to the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @return string - */ - public function getVmName() - { - return $this->vm_name; - } - - /** - * The name of the VM to create. - * - * Generated from protobuf field string vm_name = 1; - * @param string $var - * @return $this - */ - public function setVmName($var) - { - GPBUtil::checkString($var, True); - $this->vm_name = $var; - - return $this; - } - - /** - * The Google Cloud target project ID or project name. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The Google Cloud target project ID or project name. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * The zone in which to create the VM. - * - * Generated from protobuf field string zone = 3; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @return string - */ - public function getMachineTypeSeries() - { - return $this->machine_type_series; - } - - /** - * The machine type series to create the VM with. - * - * Generated from protobuf field string machine_type_series = 4; - * @param string $var - * @return $this - */ - public function setMachineTypeSeries($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_series = $var; - - return $this; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * The machine type to create the VM with. - * - * Generated from protobuf field string machine_type = 5; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * A map of network tags to associate with the VM. - * - * Generated from protobuf field repeated string network_tags = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * List of NICs connected to this VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 7; - * @param array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * The disk type to use in the VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 9; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * A map of labels to associate with the VM. - * - * Generated from protobuf field map labels = 10; - * @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 license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * The license type to use in OS adaptation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 11; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); - $this->license_type = $var; - - return $this; - } - - /** - * The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; - * @return \Google\Cloud\VMMigration\V1\AppliedLicense|null - */ - public function getAppliedLicense() - { - return $this->applied_license; - } - - public function hasAppliedLicense() - { - return isset($this->applied_license); - } - - public function clearAppliedLicense() - { - unset($this->applied_license); - } - - /** - * The OS license returned from the adaptation module report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AppliedLicense applied_license = 12; - * @param \Google\Cloud\VMMigration\V1\AppliedLicense $var - * @return $this - */ - public function setAppliedLicense($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AppliedLicense::class); - $this->applied_license = $var; - - return $this; - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @return \Google\Cloud\VMMigration\V1\ComputeScheduling|null - */ - public function getComputeScheduling() - { - return $this->compute_scheduling; - } - - public function hasComputeScheduling() - { - return isset($this->compute_scheduling); - } - - public function clearComputeScheduling() - { - unset($this->compute_scheduling); - } - - /** - * Compute instance scheduling information (if empty default is used). - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 13; - * @param \Google\Cloud\VMMigration\V1\ComputeScheduling $var - * @return $this - */ - public function setComputeScheduling($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeScheduling::class); - $this->compute_scheduling = $var; - - return $this; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @return bool - */ - public function getSecureBoot() - { - return $this->secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. - * - * Generated from protobuf field bool secure_boot = 14; - * @param bool $var - * @return $this - */ - public function setSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->secure_boot = $var; - - return $this; - } - - /** - * The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * The VM Boot Option, as set in the source vm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineBootOption::class); - $this->boot_option = $var; - - return $this; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * The metadata key/value pairs to assign to the VM. - * - * Generated from protobuf field map metadata = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalLicenses() - { - return $this->additional_licenses; - } - - /** - * Additional licenses to assign to the VM. - * - * Generated from protobuf field repeated string additional_licenses = 17; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalLicenses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->additional_licenses = $arr; - - return $this; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The hostname to assign to the VM. - * - * Generated from protobuf field string hostname = 18; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php deleted file mode 100644 index bc30aaa06e34..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php +++ /dev/null @@ -1,206 +0,0 @@ -google.cloud.vmmigration.v1.ComputeScheduling - */ -class ComputeScheduling extends \Google\Protobuf\Internal\Message -{ - /** - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; - */ - protected $on_host_maintenance = 0; - /** - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; - */ - protected $restart_type = 0; - /** - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; - */ - private $node_affinities; - /** - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * - * Generated from protobuf field int32 min_node_cpus = 4; - */ - protected $min_node_cpus = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $on_host_maintenance - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * @type int $restart_type - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * @type array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $node_affinities - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * @type int $min_node_cpus - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; - * @return int - */ - public function getOnHostMaintenance() - { - return $this->on_host_maintenance; - } - - /** - * How the instance should behave when the host machine undergoes - * maintenance that may temporarily impact instance performance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance on_host_maintenance = 1; - * @param int $var - * @return $this - */ - public function setOnHostMaintenance($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\OnHostMaintenance::class); - $this->on_host_maintenance = $var; - - return $this; - } - - /** - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; - * @return int - */ - public function getRestartType() - { - return $this->restart_type; - } - - /** - * Whether the Instance should be automatically restarted whenever it is - * terminated by Compute Engine (not terminated by user). - * This configuration is identical to `automaticRestart` field in Compute - * Engine create instance under scheduling. - * It was changed to an enum (instead of a boolean) to match the default - * value in Compute Engine which is automatic restart. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling.RestartType restart_type = 5; - * @param int $var - * @return $this - */ - public function setRestartType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeScheduling\RestartType::class); - $this->restart_type = $var; - - return $this; - } - - /** - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeAffinities() - { - return $this->node_affinities; - } - - /** - * A set of node affinity and anti-affinity configurations for sole tenant - * nodes. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SchedulingNodeAffinity node_affinities = 3; - * @param array<\Google\Cloud\VMMigration\V1\SchedulingNodeAffinity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeAffinities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity::class); - $this->node_affinities = $arr; - - return $this; - } - - /** - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * - * Generated from protobuf field int32 min_node_cpus = 4; - * @return int - */ - public function getMinNodeCpus() - { - return $this->min_node_cpus; - } - - /** - * The minimum number of virtual CPUs this instance will consume when - * running on a sole-tenant node. Ignored if no node_affinites are - * configured. - * - * Generated from protobuf field int32 min_node_cpus = 4; - * @param int $var - * @return $this - */ - public function setMinNodeCpus($var) - { - GPBUtil::checkInt32($var); - $this->min_node_cpus = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php deleted file mode 100644 index 2289facddca5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/OnHostMaintenance.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.vmmigration.v1.ComputeScheduling.OnHostMaintenance - */ -class OnHostMaintenance -{ - /** - * An unknown, unexpected behavior. - * - * Generated from protobuf enum ON_HOST_MAINTENANCE_UNSPECIFIED = 0; - */ - const ON_HOST_MAINTENANCE_UNSPECIFIED = 0; - /** - * Terminate the instance when the host machine undergoes maintenance. - * - * Generated from protobuf enum TERMINATE = 1; - */ - const TERMINATE = 1; - /** - * Migrate the instance when the host machine undergoes maintenance. - * - * Generated from protobuf enum MIGRATE = 2; - */ - const MIGRATE = 2; - - private static $valueToName = [ - self::ON_HOST_MAINTENANCE_UNSPECIFIED => 'ON_HOST_MAINTENANCE_UNSPECIFIED', - self::TERMINATE => 'TERMINATE', - self::MIGRATE => 'MIGRATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OnHostMaintenance::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_OnHostMaintenance::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php deleted file mode 100644 index f84ad38270f2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling/RestartType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.ComputeScheduling.RestartType - */ -class RestartType -{ - /** - * Unspecified behavior. This will use the default. - * - * Generated from protobuf enum RESTART_TYPE_UNSPECIFIED = 0; - */ - const RESTART_TYPE_UNSPECIFIED = 0; - /** - * The Instance should be automatically restarted whenever it is - * terminated by Compute Engine. - * - * Generated from protobuf enum AUTOMATIC_RESTART = 1; - */ - const AUTOMATIC_RESTART = 1; - /** - * The Instance isn't automatically restarted whenever it is - * terminated by Compute Engine. - * - * Generated from protobuf enum NO_AUTOMATIC_RESTART = 2; - */ - const NO_AUTOMATIC_RESTART = 2; - - private static $valueToName = [ - self::RESTART_TYPE_UNSPECIFIED => 'RESTART_TYPE_UNSPECIFIED', - self::AUTOMATIC_RESTART => 'AUTOMATIC_RESTART', - self::NO_AUTOMATIC_RESTART => 'NO_AUTOMATIC_RESTART', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RestartType::class, \Google\Cloud\VMMigration\V1\ComputeScheduling_RestartType::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php deleted file mode 100644 index 41851b8961e2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateCloneJobRequest - */ -class CreateCloneJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Clone's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The clone job identifier. - * - * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $clone_job_id = ''; - /** - * Required. The clone request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $clone_job = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Clone's parent. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\CloneJob $cloneJob Required. The clone request body. - * @param string $cloneJobId Required. The clone job identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateCloneJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\CloneJob $cloneJob, string $cloneJobId): self - { - return (new self()) - ->setParent($parent) - ->setCloneJob($cloneJob) - ->setCloneJobId($cloneJobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Clone's parent. - * @type string $clone_job_id - * Required. The clone job identifier. - * @type \Google\Cloud\VMMigration\V1\CloneJob $clone_job - * Required. The clone request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Clone's 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. The Clone's 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. The clone job identifier. - * - * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCloneJobId() - { - return $this->clone_job_id; - } - - /** - * Required. The clone job identifier. - * - * Generated from protobuf field string clone_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCloneJobId($var) - { - GPBUtil::checkString($var, True); - $this->clone_job_id = $var; - - return $this; - } - - /** - * Required. The clone request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\CloneJob|null - */ - public function getCloneJob() - { - return $this->clone_job; - } - - public function hasCloneJob() - { - return isset($this->clone_job); - } - - public function clearCloneJob() - { - unset($this->clone_job); - } - - /** - * Required. The clone request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CloneJob clone_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\CloneJob $var - * @return $this - */ - public function setCloneJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CloneJob::class); - $this->clone_job = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php deleted file mode 100644 index ca9cc7598345..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCutoverJobRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateCutoverJobRequest - */ -class CreateCutoverJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cutover's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The cutover job identifier. - * - * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cutover_job_id = ''; - /** - * Required. The cutover request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cutover_job = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Cutover's parent. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob Required. The cutover request body. - * @param string $cutoverJobId Required. The cutover job identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateCutoverJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\CutoverJob $cutoverJob, string $cutoverJobId): self - { - return (new self()) - ->setParent($parent) - ->setCutoverJob($cutoverJob) - ->setCutoverJobId($cutoverJobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Cutover's parent. - * @type string $cutover_job_id - * Required. The cutover job identifier. - * @type \Google\Cloud\VMMigration\V1\CutoverJob $cutover_job - * Required. The cutover request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cutover's 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. The Cutover's 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. The cutover job identifier. - * - * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCutoverJobId() - { - return $this->cutover_job_id; - } - - /** - * Required. The cutover job identifier. - * - * Generated from protobuf field string cutover_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCutoverJobId($var) - { - GPBUtil::checkString($var, True); - $this->cutover_job_id = $var; - - return $this; - } - - /** - * Required. The cutover request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\CutoverJob|null - */ - public function getCutoverJob() - { - return $this->cutover_job; - } - - public function hasCutoverJob() - { - return isset($this->cutover_job); - } - - public function clearCutoverJob() - { - unset($this->cutover_job); - } - - /** - * Required. The cutover request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob cutover_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\CutoverJob $var - * @return $this - */ - public function setCutoverJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverJob::class); - $this->cutover_job = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php deleted file mode 100644 index ec4aaf84d99f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDatacenterConnectorRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.vmmigration.v1.CreateDatacenterConnectorRequest - */ -class CreateDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The datacenterConnector identifier. - * - * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $datacenter_connector_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $datacenter_connector = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * Please see {@see VmMigrationClient::sourceName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector Required. The create request body. - * @param string $datacenterConnectorId Required. The datacenterConnector identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenterConnector, string $datacenterConnectorId): self - { - return (new self()) - ->setParent($parent) - ->setDatacenterConnector($datacenterConnector) - ->setDatacenterConnectorId($datacenterConnectorId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * @type string $datacenter_connector_id - * Required. The datacenterConnector identifier. - * @type \Google\Cloud\VMMigration\V1\DatacenterConnector $datacenter_connector - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * - * 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 DatacenterConnector's parent. - * Required. The Source in where the new DatacenterConnector will be created. - * For example: - * `projects/my-project/locations/us-central1/sources/my-source` - * - * 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 datacenterConnector identifier. - * - * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatacenterConnectorId() - { - return $this->datacenter_connector_id; - } - - /** - * Required. The datacenterConnector identifier. - * - * Generated from protobuf field string datacenter_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatacenterConnectorId($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_connector_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\DatacenterConnector|null - */ - public function getDatacenterConnector() - { - return $this->datacenter_connector; - } - - public function hasDatacenterConnector() - { - return isset($this->datacenter_connector); - } - - public function clearDatacenterConnector() - { - unset($this->datacenter_connector); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\DatacenterConnector $var - * @return $this - */ - public function setDatacenterConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); - $this->datacenter_connector = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php deleted file mode 100644 index de9bfaea8932..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateGroupRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateGroupRequest - */ -class CreateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Group's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The group identifier. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Group's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\Group $group Required. The create request body. - * @param string $groupId Required. The group identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\Group $group, string $groupId): self - { - return (new self()) - ->setParent($parent) - ->setGroup($group) - ->setGroupId($groupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Group's parent. - * @type string $group_id - * Required. The group identifier. - * @type \Google\Cloud\VMMigration\V1\Group $group - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Group's 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. The Group's 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. The group identifier. - * - * 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 identifier. - * - * 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; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php deleted file mode 100644 index c12c649f5023..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateMigratingVmRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateMigratingVmRequest - */ -class CreateMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MigratingVm's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The migratingVm identifier. - * - * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migrating_vm_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migrating_vm = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The MigratingVm's parent. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The create request body. - * @param string $migratingVmId Required. The migratingVm identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateMigratingVmRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, string $migratingVmId): self - { - return (new self()) - ->setParent($parent) - ->setMigratingVm($migratingVm) - ->setMigratingVmId($migratingVmId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The MigratingVm's parent. - * @type string $migrating_vm_id - * Required. The migratingVm identifier. - * @type \Google\Cloud\VMMigration\V1\MigratingVm $migrating_vm - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MigratingVm's 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. The MigratingVm's 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. The migratingVm identifier. - * - * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMigratingVmId() - { - return $this->migrating_vm_id; - } - - /** - * Required. The migratingVm identifier. - * - * Generated from protobuf field string migrating_vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMigratingVmId($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\MigratingVm|null - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - public function hasMigratingVm() - { - return isset($this->migrating_vm); - } - - public function clearMigratingVm() - { - unset($this->migrating_vm); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\MigratingVm $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); - $this->migrating_vm = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php deleted file mode 100644 index 525bb5819b4a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateSourceRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateSourceRequest - */ -class CreateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Source's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The source identifier. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Source's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\Source $source Required. The create request body. - * @param string $sourceId Required. The source identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateSourceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\Source $source, string $sourceId): self - { - return (new self()) - ->setParent($parent) - ->setSource($source) - ->setSourceId($sourceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Source's parent. - * @type string $source_id - * Required. The source identifier. - * @type \Google\Cloud\VMMigration\V1\Source $source - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Source's 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. The Source's 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. The source identifier. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceId() - { - return $this->source_id; - } - - /** - * Required. The source identifier. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceId($var) - { - GPBUtil::checkString($var, True); - $this->source_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php deleted file mode 100644 index fa7e25ef6158..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateTargetProjectRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vmmigration.v1.CreateTargetProjectRequest - */ -class CreateTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The TargetProject's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The target_project identifier. - * - * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_project_id = ''; - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_project = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The TargetProject's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The create request body. - * @param string $targetProjectId Required. The target_project identifier. - * - * @return \Google\Cloud\VMMigration\V1\CreateTargetProjectRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\TargetProject $targetProject, string $targetProjectId): self - { - return (new self()) - ->setParent($parent) - ->setTargetProject($targetProject) - ->setTargetProjectId($targetProjectId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The TargetProject's parent. - * @type string $target_project_id - * Required. The target_project identifier. - * @type \Google\Cloud\VMMigration\V1\TargetProject $target_project - * Required. The create request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The TargetProject's 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. The TargetProject's 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. The target_project identifier. - * - * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetProjectId() - { - return $this->target_project_id; - } - - /** - * Required. The target_project identifier. - * - * Generated from protobuf field string target_project_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetProjectId($var) - { - GPBUtil::checkString($var, True); - $this->target_project_id = $var; - - return $this; - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\TargetProject|null - */ - public function getTargetProject() - { - return $this->target_project; - } - - public function hasTargetProject() - { - return isset($this->target_project); - } - - public function clearTargetProject() - { - unset($this->target_project); - } - - /** - * Required. The create request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\TargetProject $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); - $this->target_project = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php deleted file mode 100644 index 80a507c49703..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateUtilizationReportRequest.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.vmmigration.v1.CreateUtilizationReportRequest - */ -class CreateUtilizationReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Report's parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The report to create. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $utilization_report = null; - /** - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $utilization_report_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The Utilization Report's parent. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * @param \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport Required. The report to create. - * @param string $utilizationReportId Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * @return \Google\Cloud\VMMigration\V1\CreateUtilizationReportRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VMMigration\V1\UtilizationReport $utilizationReport, string $utilizationReportId): self - { - return (new self()) - ->setParent($parent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Utilization Report's parent. - * @type \Google\Cloud\VMMigration\V1\UtilizationReport $utilization_report - * Required. The report to create. - * @type string $utilization_report_id - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Report's 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. The Utilization Report's 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. The report to create. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\UtilizationReport|null - */ - public function getUtilizationReport() - { - return $this->utilization_report; - } - - public function hasUtilizationReport() - { - return isset($this->utilization_report); - } - - public function clearUtilizationReport() - { - unset($this->utilization_report); - } - - /** - * Required. The report to create. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport utilization_report = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\UtilizationReport $var - * @return $this - */ - public function setUtilizationReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UtilizationReport::class); - $this->utilization_report = $var; - - return $this; - } - - /** - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUtilizationReportId() - { - return $this->utilization_report_id; - } - - /** - * Required. The ID to use for the report, which will become the final - * component of the reports's resource name. - * This value maximum length is 63 characters, and valid characters - * are /[a-z][0-9]-/. It must start with an english letter and must not - * end with a hyphen. - * - * Generated from protobuf field string utilization_report_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUtilizationReportId($var) - { - GPBUtil::checkString($var, True); - $this->utilization_report_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php deleted file mode 100644 index 3fafe9c8c7e7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php +++ /dev/null @@ -1,435 +0,0 @@ -google.cloud.vmmigration.v1.CutoverJob - */ -class CutoverJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * - * 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 cutover job had finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The name of the cutover job. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. State of the cutover job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. The current progress in percentage of the cutover job. - * - * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $progress_percent = 0; - /** - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. A message providing possible extra details about the current - * state. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_message = ''; - /** - * Output only. The cutover steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $steps; - protected $target_vm_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details - * Output only. Details of the target VM in Compute Engine. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the cutover job had finished. - * @type string $name - * Output only. The name of the cutover job. - * @type int $state - * Output only. State of the cutover job. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last updated. - * @type int $progress_percent - * Output only. The current progress in percentage of the cutover job. - * @type \Google\Rpc\Status $error - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * @type string $state_message - * Output only. A message providing possible extra details about the current - * state. - * @type array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $steps - * Output only. The cutover steps list representing its progress. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails|null - */ - public function getComputeEngineTargetDetails() - { - return $this->readOneof(14); - } - - public function hasComputeEngineTargetDetails() - { - return $this->hasOneof(14); - } - - /** - * Output only. Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDetails compute_engine_target_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $var - * @return $this - */ - public function setComputeEngineTargetDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Output only. The time the cutover job was created (as an API call, not when - * it was actually created in the target). - * - * 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 cutover job was created (as an API call, not when - * it was actually created in the target). - * - * 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 cutover job had finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.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 cutover job had finished. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 16 [(.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. The name of the cutover job. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the cutover job. - * - * Generated from protobuf field string name = 3 [(.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. State of the cutover job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the cutover job. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverJob.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\CutoverJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. The current progress in percentage of the cutover job. - * - * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Output only. The current progress in percentage of the cutover job. - * - * Generated from protobuf field int32 progress_percent = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details for the errors that led to the Cutover Job's - * state. - * - * Generated from protobuf field .google.rpc.Status error = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. A message providing possible extra details about the current - * state. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * Output only. A message providing possible extra details about the current - * state. - * - * Generated from protobuf field string state_message = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * Output only. The cutover steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * Output only. The cutover steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverStep steps = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CutoverStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverStep::class); - $this->steps = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetVmDetails() - { - return $this->whichOneof("target_vm_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php deleted file mode 100644 index b1810e6a5d30..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.vmmigration.v1.CutoverJob.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The cutover job has not yet started. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The cutover job finished with errors. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The cutover job finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * The cutover job was cancelled. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - /** - * The cutover job is being cancelled. - * - * Generated from protobuf enum CANCELLING = 5; - */ - const CANCELLING = 5; - /** - * The cutover job is active and running. - * - * Generated from protobuf enum ACTIVE = 6; - */ - const ACTIVE = 6; - /** - * OS adaptation is running as part of the cutover job to generate license. - * - * Generated from protobuf enum ADAPTING_OS = 7; - */ - const ADAPTING_OS = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLED => 'CANCELLED', - self::CANCELLING => 'CANCELLING', - self::ACTIVE => 'ACTIVE', - self::ADAPTING_OS => 'ADAPTING_OS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\CutoverJob_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php deleted file mode 100644 index 68550eca3b97..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverStep.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.vmmigration.v1.CutoverStep - */ -class CutoverStep extends \Google\Protobuf\Internal\Message -{ - /** - * The time the step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - protected $step; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $previous_replication_cycle - * A replication cycle prior cutover step. - * @type \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $shutting_down_source_vm - * Shutting down VM step. - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $final_sync - * Final sync step. - * @type \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $preparing_vm_disks - * Preparing VM disks step. - * @type \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $instantiating_migrated_vm - * Instantiating migrated VM step. - * @type \Google\Protobuf\Timestamp $start_time - * The time the step has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the step has ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * A replication cycle prior cutover step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getPreviousReplicationCycle() - { - return $this->readOneof(3); - } - - public function hasPreviousReplicationCycle() - { - return $this->hasOneof(3); - } - - /** - * A replication cycle prior cutover step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle previous_replication_cycle = 3; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setPreviousReplicationCycle($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Shutting down VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; - * @return \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep|null - */ - public function getShuttingDownSourceVm() - { - return $this->readOneof(4); - } - - public function hasShuttingDownSourceVm() - { - return $this->hasOneof(4); - } - - /** - * Shutting down VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ShuttingDownSourceVMStep shutting_down_source_vm = 4; - * @param \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep $var - * @return $this - */ - public function setShuttingDownSourceVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ShuttingDownSourceVMStep::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Final sync step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getFinalSync() - { - return $this->readOneof(5); - } - - public function hasFinalSync() - { - return $this->hasOneof(5); - } - - /** - * Final sync step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle final_sync = 5; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setFinalSync($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; - * @return \Google\Cloud\VMMigration\V1\PreparingVMDisksStep|null - */ - public function getPreparingVmDisks() - { - return $this->readOneof(6); - } - - public function hasPreparingVmDisks() - { - return $this->hasOneof(6); - } - - /** - * Preparing VM disks step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PreparingVMDisksStep preparing_vm_disks = 6; - * @param \Google\Cloud\VMMigration\V1\PreparingVMDisksStep $var - * @return $this - */ - public function setPreparingVmDisks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PreparingVMDisksStep::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; - * @return \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep|null - */ - public function getInstantiatingMigratedVm() - { - return $this->readOneof(7); - } - - public function hasInstantiatingMigratedVm() - { - return $this->hasOneof(7); - } - - /** - * Instantiating migrated VM step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InstantiatingMigratedVMStep instantiating_migrated_vm = 7; - * @param \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep $var - * @return $this - */ - public function setInstantiatingMigratedVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InstantiatingMigratedVMStep::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The time the step has 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 step has 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 step has ended. - * - * 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 step has ended. - * - * 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; - } - - /** - * @return string - */ - public function getStep() - { - return $this->whichOneof("step"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php deleted file mode 100644 index a081411451d2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CycleStep.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.vmmigration.v1.CycleStep - */ -class CycleStep extends \Google\Protobuf\Internal\Message -{ - /** - * The time the cycle step has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the cycle step has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - protected $step; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\InitializingReplicationStep $initializing_replication - * Initializing replication step. - * @type \Google\Cloud\VMMigration\V1\ReplicatingStep $replicating - * Replicating step. - * @type \Google\Cloud\VMMigration\V1\PostProcessingStep $post_processing - * Post processing step. - * @type \Google\Protobuf\Timestamp $start_time - * The time the cycle step has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the cycle step has ended. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Initializing replication step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; - * @return \Google\Cloud\VMMigration\V1\InitializingReplicationStep|null - */ - public function getInitializingReplication() - { - return $this->readOneof(3); - } - - public function hasInitializingReplication() - { - return $this->hasOneof(3); - } - - /** - * Initializing replication step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingReplicationStep initializing_replication = 3; - * @param \Google\Cloud\VMMigration\V1\InitializingReplicationStep $var - * @return $this - */ - public function setInitializingReplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InitializingReplicationStep::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Replicating step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; - * @return \Google\Cloud\VMMigration\V1\ReplicatingStep|null - */ - public function getReplicating() - { - return $this->readOneof(4); - } - - public function hasReplicating() - { - return $this->hasOneof(4); - } - - /** - * Replicating step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicatingStep replicating = 4; - * @param \Google\Cloud\VMMigration\V1\ReplicatingStep $var - * @return $this - */ - public function setReplicating($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicatingStep::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Post processing step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; - * @return \Google\Cloud\VMMigration\V1\PostProcessingStep|null - */ - public function getPostProcessing() - { - return $this->readOneof(5); - } - - public function hasPostProcessing() - { - return $this->hasOneof(5); - } - - /** - * Post processing step. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.PostProcessingStep post_processing = 5; - * @param \Google\Cloud\VMMigration\V1\PostProcessingStep $var - * @return $this - */ - public function setPostProcessing($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\PostProcessingStep::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The time the cycle step has 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 cycle step has 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 cycle step has ended. - * - * 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 cycle step has ended. - * - * 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; - } - - /** - * @return string - */ - public function getStep() - { - return $this->whichOneof("step"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php deleted file mode 100644 index 20244d65ed0b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector.php +++ /dev/null @@ -1,620 +0,0 @@ -google.cloud.vmmigration.v1.DatacenterConnector - */ -class DatacenterConnector extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the connector was updated with an API call. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The connector's name. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * - * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $registration_id = ''; - /** - * The service account to use in the connector when communicating with the - * cloud. - * - * Generated from protobuf field string service_account = 5; - */ - protected $service_account = ''; - /** - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * - * Generated from protobuf field string version = 6; - */ - protected $version = ''; - /** - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * - * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $bucket = ''; - /** - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * - * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $appliance_infrastructure_version = ''; - /** - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * - * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $appliance_software_version = ''; - /** - * Output only. The available versions for updating this appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $available_versions = null; - /** - * Output only. The status of the current / last upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $upgrade_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the connector was updated with an API call. - * @type string $name - * Output only. The connector's name. - * @type string $registration_id - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * @type string $service_account - * The service account to use in the connector when communicating with the - * cloud. - * @type string $version - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * @type string $bucket - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * @type int $state - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last set. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * @type string $appliance_infrastructure_version - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * @type string $appliance_software_version - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * @type \Google\Cloud\VMMigration\V1\AvailableUpdates $available_versions - * Output only. The available versions for updating this appliance. - * @type \Google\Cloud\VMMigration\V1\UpgradeStatus $upgrade_status - * Output only. The status of the current / last upgradeAppliance operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the connector was created (as an API call, not when - * it was actually installed). - * - * 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 connector was created (as an API call, not when - * it was actually installed). - * - * 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 last time the connector was updated with an API call. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 time the connector was updated with an API call. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 connector's name. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The connector's name. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * - * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getRegistrationId() - { - return $this->registration_id; - } - - /** - * Immutable. A unique key for this connector. This key is internal to the OVA - * connector and is supplied with its creation during the registration process - * and can not be modified. - * - * Generated from protobuf field string registration_id = 12 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setRegistrationId($var) - { - GPBUtil::checkString($var, True); - $this->registration_id = $var; - - return $this; - } - - /** - * The service account to use in the connector when communicating with the - * cloud. - * - * Generated from protobuf field string service_account = 5; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account to use in the connector when communicating with the - * cloud. - * - * Generated from protobuf field string service_account = 5; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * - * Generated from protobuf field string version = 6; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version running in the DatacenterConnector. This is supplied by the OVA - * connector during the registration process and can not be modified. - * - * Generated from protobuf field string version = 6; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * - * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Output only. The communication channel between the datacenter connector and - * Google Cloud. - * - * Generated from protobuf field string bucket = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the DatacenterConnector, as determined by the health - * checks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.DatacenterConnector.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\DatacenterConnector\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the Datacenter Connector in - * case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * - * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApplianceInfrastructureVersion() - { - return $this->appliance_infrastructure_version; - } - - /** - * Output only. Appliance OVA version. - * This is the OVA which is manually installed by the user and contains the - * infrastructure for the automatically updatable components on the appliance. - * - * Generated from protobuf field string appliance_infrastructure_version = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApplianceInfrastructureVersion($var) - { - GPBUtil::checkString($var, True); - $this->appliance_infrastructure_version = $var; - - return $this; - } - - /** - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * - * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApplianceSoftwareVersion() - { - return $this->appliance_software_version; - } - - /** - * Output only. Appliance last installed update bundle version. - * This is the version of the automatically updatable components on the - * appliance. - * - * Generated from protobuf field string appliance_software_version = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApplianceSoftwareVersion($var) - { - GPBUtil::checkString($var, True); - $this->appliance_software_version = $var; - - return $this; - } - - /** - * Output only. The available versions for updating this appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AvailableUpdates|null - */ - public function getAvailableVersions() - { - return $this->available_versions; - } - - public function hasAvailableVersions() - { - return isset($this->available_versions); - } - - public function clearAvailableVersions() - { - unset($this->available_versions); - } - - /** - * Output only. The available versions for updating this appliance. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AvailableUpdates available_versions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AvailableUpdates $var - * @return $this - */ - public function setAvailableVersions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AvailableUpdates::class); - $this->available_versions = $var; - - return $this; - } - - /** - * Output only. The status of the current / last upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\UpgradeStatus|null - */ - public function getUpgradeStatus() - { - return $this->upgrade_status; - } - - public function hasUpgradeStatus() - { - return isset($this->upgrade_status); - } - - public function clearUpgradeStatus() - { - unset($this->upgrade_status); - } - - /** - * Output only. The status of the current / last upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus upgrade_status = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\UpgradeStatus $var - * @return $this - */ - public function setUpgradeStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\UpgradeStatus::class); - $this->upgrade_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php deleted file mode 100644 index 836a87465021..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DatacenterConnector/State.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.DatacenterConnector.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The source was sampled by health checks and is not available. - * - * Generated from protobuf enum OFFLINE = 2; - */ - const OFFLINE = 2; - /** - * The source is available but might not be usable yet due to unvalidated - * credentials or another reason. The credentials referred to are the ones - * to the Source. The error message will contain further details. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The source exists and its credentials were verified. - * - * Generated from protobuf enum ACTIVE = 4; - */ - const ACTIVE = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::OFFLINE => 'OFFLINE', - self::FAILED => 'FAILED', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\DatacenterConnector_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php deleted file mode 100644 index 3a18f26d864c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDatacenterConnectorRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteDatacenterConnectorRequest - */ -class DeleteDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The DatacenterConnector name. Please see - * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest - * - * @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 DatacenterConnector name. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DatacenterConnector name. - * - * 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 DatacenterConnector name. - * - * 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; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php deleted file mode 100644 index 58ed1909db6e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteGroupRequest - */ -class DeleteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 Group name. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteGroupRequest - * - * @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 Group name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Group name. - * - * 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 Group name. - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php deleted file mode 100644 index d92845c4cd69..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteMigratingVmRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.DeleteMigratingVmRequest - */ -class DeleteMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * 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 MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest - * - * @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 MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * 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 MigratingVm. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php deleted file mode 100644 index 73363cfd5bc7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteSourceRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteSourceRequest - */ -class DeleteSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 Source name. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteSourceRequest - * - * @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 Source name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Source name. - * - * 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 Source name. - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php deleted file mode 100644 index d1c390849152..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteTargetProjectRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteTargetProjectRequest - */ -class DeleteTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 TargetProject name. Please see - * {@see VmMigrationClient::targetProjectName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest - * - * @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 TargetProject name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The TargetProject name. - * - * 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 TargetProject name. - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php deleted file mode 100644 index 8341c1a7702f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteUtilizationReportRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vmmigration.v1.DeleteUtilizationReportRequest - */ -class DeleteUtilizationReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 Utilization Report name. Please see - * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest - * - * @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 Utilization Report name. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Report name. - * - * 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 Utilization Report name. - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php deleted file mode 100644 index 3ccec18360e1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.vmmigration.v1.FetchInventoryRequest - */ -class FetchInventoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Source. - * - * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source = ''; - /** - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * - * Generated from protobuf field bool force_refresh = 2; - */ - protected $force_refresh = false; - - /** - * @param string $source Required. The name of the Source. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\FetchInventoryRequest - * - * @experimental - */ - public static function build(string $source): self - { - return (new self()) - ->setSource($source); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source - * Required. The name of the Source. - * @type bool $force_refresh - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Source. - * - * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Required. The name of the Source. - * - * Generated from protobuf field string source = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * - * Generated from protobuf field bool force_refresh = 2; - * @return bool - */ - public function getForceRefresh() - { - return $this->force_refresh; - } - - /** - * If this flag is set to true, the source will be queried instead of using - * cached results. Using this flag will make the call slower. - * - * Generated from protobuf field bool force_refresh = 2; - * @param bool $var - * @return $this - */ - public function setForceRefresh($var) - { - GPBUtil::checkBool($var); - $this->force_refresh = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php deleted file mode 100644 index ce1bdac4c8c1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.vmmigration.v1.FetchInventoryResponse - */ -class FetchInventoryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $SourceVms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\VmwareVmsDetails $vmware_vms - * The description of the VMs in a Source of type Vmware. - * @type \Google\Cloud\VMMigration\V1\AwsVmsDetails $aws_vms - * The description of the VMs in a Source of type AWS. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The description of the VMs in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; - * @return \Google\Cloud\VMMigration\V1\VmwareVmsDetails|null - */ - public function getVmwareVms() - { - return $this->readOneof(1); - } - - public function hasVmwareVms() - { - return $this->hasOneof(1); - } - - /** - * The description of the VMs in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmsDetails vmware_vms = 1; - * @param \Google\Cloud\VMMigration\V1\VmwareVmsDetails $var - * @return $this - */ - public function setVmwareVms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmsDetails::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The description of the VMs in a Source of type AWS. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; - * @return \Google\Cloud\VMMigration\V1\AwsVmsDetails|null - */ - public function getAwsVms() - { - return $this->readOneof(3); - } - - public function hasAwsVms() - { - return $this->hasOneof(3); - } - - /** - * The description of the VMs in a Source of type AWS. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmsDetails aws_vms = 3; - * @param \Google\Cloud\VMMigration\V1\AwsVmsDetails $var - * @return $this - */ - public function setAwsVms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsVmsDetails::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Output only. The timestamp when the source was last queried (if the result - * is from the cache). - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 when the source was last queried (if the result - * is from the cache). - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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 getSourceVms() - { - return $this->whichOneof("SourceVms"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php deleted file mode 100644 index d71b82ccb9b5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.FinalizeMigrationRequest - */ -class FinalizeMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $migratingVm Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\FinalizeMigrationRequest - * - * @experimental - */ - public static function build(string $migratingVm): self - { - return (new self()) - ->setMigratingVm($migratingVm); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php deleted file mode 100644 index bdfdb9430da7..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FinalizeMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.FinalizeMigrationResponse - */ -class FinalizeMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php deleted file mode 100644 index 48dce1bf1c80..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCloneJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetCloneJobRequest - */ -class GetCloneJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CloneJob. - * - * 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 CloneJob. Please see - * {@see VmMigrationClient::cloneJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetCloneJobRequest - * - * @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 CloneJob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CloneJob. - * - * 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 CloneJob. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php deleted file mode 100644 index 9d30019287a5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetCutoverJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetCutoverJobRequest - */ -class GetCutoverJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the CutoverJob. - * - * 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 CutoverJob. Please see - * {@see VmMigrationClient::cutoverJobName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetCutoverJobRequest - * - * @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 CutoverJob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the CutoverJob. - * - * 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 CutoverJob. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php deleted file mode 100644 index 7aa5823e702a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDatacenterConnectorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetDatacenterConnectorRequest - */ -class GetDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the DatacenterConnector. - * - * 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 DatacenterConnector. Please see - * {@see VmMigrationClient::datacenterConnectorName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest - * - * @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 DatacenterConnector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the DatacenterConnector. - * - * 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 DatacenterConnector. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php deleted file mode 100644 index fbf5c771c2d6..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetGroupRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The group name. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetGroupRequest - * - * @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 group name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group name. - * - * 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 group name. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php deleted file mode 100644 index 3e59f540c798..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetMigratingVmRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.GetMigratingVmRequest - */ -class GetMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The level of details of the migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetMigratingVmRequest - * - * @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 MigratingVm. - * @type int $view - * Optional. The level of details of the migrating VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * 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 MigratingVm. - * - * 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 level of details of the migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of the migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php deleted file mode 100644 index c86a34b32a7b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetReplicationCycleRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetReplicationCycleRequest - */ -class GetReplicationCycleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the ReplicationCycle. - * - * 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 ReplicationCycle. Please see - * {@see VmMigrationClient::replicationCycleName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetReplicationCycleRequest - * - * @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 ReplicationCycle. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the ReplicationCycle. - * - * 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 ReplicationCycle. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php deleted file mode 100644 index 28346a94ac29..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetSourceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetSourceRequest - */ -class GetSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Source name. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetSourceRequest - * - * @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 Source name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Source name. - * - * 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 Source name. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php deleted file mode 100644 index 244edd28be21..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetTargetProjectRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.GetTargetProjectRequest - */ -class GetTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The TargetProject name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The TargetProject name. Please see - * {@see VmMigrationClient::targetProjectName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetTargetProjectRequest - * - * @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 TargetProject name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The TargetProject name. - * - * 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 TargetProject name. - * - * 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php deleted file mode 100644 index eb7bac23ec7d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetUtilizationReportRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.vmmigration.v1.GetUtilizationReportRequest - */ -class GetUtilizationReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Report name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The level of details of the report. - * Defaults to FULL - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The Utilization Report name. Please see - * {@see VmMigrationClient::utilizationReportName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\GetUtilizationReportRequest - * - * @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 Utilization Report name. - * @type int $view - * Optional. The level of details of the report. - * Defaults to FULL - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Report name. - * - * 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 Utilization Report name. - * - * 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 level of details of the report. - * Defaults to FULL - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of the report. - * Defaults to FULL - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php deleted file mode 100644 index ea661a9c1fef..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php +++ /dev/null @@ -1,224 +0,0 @@ -google.cloud.vmmigration.v1.Group - */ -class Group extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time 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 time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-provided description of the group. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Display name is a user defined name for this group which can be updated. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The Group name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time timestamp. - * @type string $description - * User-provided description of the group. - * @type string $display_name - * Display name is a user defined name for this group which can be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Group name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The Group name. - * - * 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 time 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 time 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 time 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 time 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; - } - - /** - * User-provided description of the group. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the group. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Display name is a user defined name for this group which can be updated. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name is a user defined name for this group which can be updated. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php deleted file mode 100644 index d25d4156a11d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingReplicationStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.InitializingReplicationStep - */ -class InitializingReplicationStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php deleted file mode 100644 index d4b0ac54435f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InstantiatingMigratedVMStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.InstantiatingMigratedVMStep - */ -class InstantiatingMigratedVMStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php deleted file mode 100644 index 3d8d4efa2f3e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListCloneJobsRequest - */ -class ListCloneJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of source VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. 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; - /** - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of source VMs. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListCloneJobsRequest - * - * @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 source VMs. - * @type int $page_size - * Optional. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of source VMs. - * - * 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 source VMs. - * - * 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 maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. 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. The maximum number of clone jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 clone jobs will - * be returned. 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; - } - - /** - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListCloneJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCloneJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php deleted file mode 100644 index 5c89b1f50d7c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCloneJobsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListCloneJobsResponse - */ -class ListCloneJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of clone jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $clone_jobs; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $clone_jobs - * Output only. The list of clone jobs response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of clone jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCloneJobs() - { - return $this->clone_jobs; - } - - /** - * Output only. The list of clone jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob clone_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCloneJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); - $this->clone_jobs = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php deleted file mode 100644 index 07b28f2c7d31..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListCutoverJobsRequest - */ -class ListCutoverJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of migrating VMs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. 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; - /** - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of migrating VMs. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListCutoverJobsRequest - * - * @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 migrating VMs. - * @type int $page_size - * Optional. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. The maximum value is 1000; values above 1000 will be coerced - * to 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of migrating VMs. - * - * 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 migrating VMs. - * - * 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 maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. 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. The maximum number of cutover jobs to return. The service may - * return fewer than this value. If unspecified, at most 500 cutover jobs will - * be returned. 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; - } - - /** - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListCutoverJobs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCutoverJobs` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php deleted file mode 100644 index 0eb0adebbb36..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListCutoverJobsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListCutoverJobsResponse - */ -class ListCutoverJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of cutover jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cutover_jobs; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $cutover_jobs - * Output only. The list of cutover jobs response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of cutover jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCutoverJobs() - { - return $this->cutover_jobs; - } - - /** - * Output only. The list of cutover jobs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob cutover_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCutoverJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); - $this->cutover_jobs = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php deleted file mode 100644 index ec0686fe621f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.vmmigration.v1.ListDatacenterConnectorsRequest - */ -class ListDatacenterConnectorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of connectors. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. 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; - /** - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of connectors. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest - * - * @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 connectors. - * @type int $page_size - * Optional. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of connectors. - * - * 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 connectors. - * - * 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 maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. 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. The maximum number of connectors to return. The service may - * return fewer than this value. If unspecified, at most 500 sources will be - * returned. 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; - } - - /** - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListDatacenterConnectors` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListDatacenterConnectors` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php deleted file mode 100644 index 8aa1c27e3113..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDatacenterConnectorsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListDatacenterConnectorsResponse - */ -class ListDatacenterConnectorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $datacenter_connectors; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $datacenter_connectors - * Output only. The list of sources response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDatacenterConnectors() - { - return $this->datacenter_connectors; - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DatacenterConnector datacenter_connectors = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\DatacenterConnector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDatacenterConnectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\DatacenterConnector::class); - $this->datacenter_connectors = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php deleted file mode 100644 index 11b8be3b9a9b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListGroupsRequest - */ -class ListGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of groups. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. 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; - /** - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of groups. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListGroupsRequest - * - * @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 groups. - * @type int $page_size - * Optional. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of groups. - * - * 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 groups. - * - * 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 maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. 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. The maximum number of groups to return. The service may return - * fewer than this value. If unspecified, at most 500 groups will be - * returned. 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; - } - - /** - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php deleted file mode 100644 index 3296fe31b740..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListGroupsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListGroupsResponse - */ -class ListGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of groups response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $groups; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups - * Output only. The list of groups response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of groups response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroups() - { - return $this->groups; - } - - /** - * Output only. The list of groups response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Group groups = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Group::class); - $this->groups = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php deleted file mode 100644 index 51052e3a9534..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.vmmigration.v1.ListMigratingVmsRequest - */ -class ListMigratingVmsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of MigratingVms. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. 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; - /** - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The level of details of each migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. The parent, which owns this collection of MigratingVms. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListMigratingVmsRequest - * - * @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 MigratingVms. - * @type int $page_size - * Optional. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * @type int $view - * Optional. The level of details of each migrating VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of MigratingVms. - * - * 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 MigratingVms. - * - * 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 maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. 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. The maximum number of migrating VMs to return. The service may - * return fewer than this value. If unspecified, at most 500 migrating VMs - * will be returned. 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; - } - - /** - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListMigratingVms` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigratingVms` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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 level of details of each migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of each migrating VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVmView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVmView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php deleted file mode 100644 index 3f42ab8737dc..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListMigratingVmsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListMigratingVmsResponse - */ -class ListMigratingVmsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of Migrating VMs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $migrating_vms; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $migrating_vms - * Output only. The list of Migrating VMs response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of Migrating VMs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMigratingVms() - { - return $this->migrating_vms; - } - - /** - * Output only. The list of Migrating VMs response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigratingVm migrating_vms = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\MigratingVm>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMigratingVms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigratingVm::class); - $this->migrating_vms = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php deleted file mode 100644 index 816d448a57c1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListReplicationCyclesRequest - */ -class ListReplicationCyclesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of ReplicationCycles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of ReplicationCycles. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest - * - * @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 ReplicationCycles. - * @type int $page_size - * Optional. The maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * @type string $page_token - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of ReplicationCycles. - * - * 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 ReplicationCycles. - * - * 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 maximum number of replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * - * 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 replication cycles to return. The service - * may return fewer than this value. If unspecified, at most 100 migrating VMs - * will be returned. The maximum value is 100; values above 100 will be - * coerced to 100. - * - * 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; - } - - /** - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListReplicationCycles` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListReplicationCycles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php deleted file mode 100644 index 2e8b8b96042f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListReplicationCyclesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListReplicationCyclesResponse - */ -class ListReplicationCyclesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of replication cycles response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $replication_cycles; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $replication_cycles - * Output only. The list of replication cycles response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of replication cycles response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplicationCycles() - { - return $this->replication_cycles; - } - - /** - * Output only. The list of replication cycles response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ReplicationCycle replication_cycles = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\ReplicationCycle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplicationCycles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->replication_cycles = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php deleted file mode 100644 index 8286f34c3e6c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListSourcesRequest - */ -class ListSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of sources. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. 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; - /** - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of sources. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListSourcesRequest - * - * @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 sources. - * @type int $page_size - * Optional. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of sources. - * - * 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 sources. - * - * 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 maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. 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. The maximum number of sources to return. The service may return - * fewer than this value. If unspecified, at most 500 sources will be - * returned. 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; - } - - /** - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListSources` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListSources` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php deleted file mode 100644 index 413cd7b0d15d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListSourcesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListSourcesResponse - */ -class ListSourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $sources; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources - * Output only. The list of sources response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * Output only. The list of sources response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.Source sources = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php deleted file mode 100644 index 82fa22a9be68..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmmigration.v1.ListTargetProjectsRequest - */ -class ListTargetProjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of targets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. 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; - /** - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of targets. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListTargetProjectsRequest - * - * @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 targets. - * @type int $page_size - * Optional. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of targets. - * - * 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 targets. - * - * 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 maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. 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. The maximum number of targets to return. The service may return - * fewer than this value. If unspecified, at most 500 targets will be - * returned. 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; - } - - /** - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListTargets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTargets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php deleted file mode 100644 index a51c7c607f95..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListTargetProjectsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListTargetProjectsResponse - */ -class ListTargetProjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of target response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $target_projects; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $target_projects - * Output only. The list of target response. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of target response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetProjects() - { - return $this->target_projects; - } - - /** - * Output only. The list of target response. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.TargetProject target_projects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\TargetProject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\TargetProject::class); - $this->target_projects = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php deleted file mode 100644 index a1b2d9ef827f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsRequest.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.vmmigration.v1.ListUtilizationReportsRequest - */ -class ListUtilizationReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Utilization Reports parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The level of details of each report. - * Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - /** - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $page_token = ''; - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. the order by fields for the result. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The Utilization Reports parent. Please see - * {@see VmMigrationClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\ListUtilizationReportsRequest - * - * @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 Utilization Reports parent. - * @type int $view - * Optional. The level of details of each report. - * Defaults to BASIC. - * @type int $page_size - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * @type string $filter - * Optional. The filter request. - * @type string $order_by - * Optional. the order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Utilization Reports 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. The Utilization Reports 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; - } - - /** - * Optional. The level of details of each report. - * Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of each report. - * Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReportView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReportView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. The maximum number of reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * 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 reports to return. The service may return - * fewer than this value. If unspecified, at most 500 reports will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * 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; - } - - /** - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Required. A page token, received from a previous `ListUtilizationReports` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListUtilizationReports` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter request. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter request. - * - * 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. the order by fields for the result. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. the order by fields for the result. - * - * 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; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php deleted file mode 100644 index a82c22f473b4..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListUtilizationReportsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.vmmigration.v1.ListUtilizationReportsResponse - */ -class ListUtilizationReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of reports. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $utilization_reports; - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $utilization_reports - * Output only. The list of reports. - * @type string $next_page_token - * Output only. A token, which can be sent as `page_token` to retrieve the - * next page. If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Output only. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of reports. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUtilizationReports() - { - return $this->utilization_reports; - } - - /** - * Output only. The list of reports. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.UtilizationReport utilization_reports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\UtilizationReport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUtilizationReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\UtilizationReport::class); - $this->utilization_reports = $arr; - - return $this; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. 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 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Output only. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php deleted file mode 100644 index a86771ba3c43..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php +++ /dev/null @@ -1,796 +0,0 @@ -google.cloud.vmmigration.v1.MigratingVm - */ -class MigratingVm extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The identifier of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * - * Generated from protobuf field string source_vm_id = 2; - */ - protected $source_vm_id = ''; - /** - * The display name attached to the MigratingVm by the user. - * - * Generated from protobuf field string display_name = 18; - */ - protected $display_name = ''; - /** - * The description attached to the migrating VM by the user. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The replication schedule policy. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; - */ - protected $policy = null; - /** - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the migrating VM resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The most updated snapshot created time in the source that - * finished replication. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_sync = null; - /** - * Output only. State of the MigratingVm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The last time the migrating VM state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. The percentage progress of the current running replication - * cycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $current_sync_info = null; - /** - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * - * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * The labels of the migrating VM. - * - * Generated from protobuf field map labels = 16; - */ - private $labels; - /** - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recent_clone_jobs; - /** - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * - * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recent_cutover_jobs; - protected $target_vm_defaults; - protected $source_vm_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $compute_engine_target_defaults - * Details of the target VM in Compute Engine. - * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details - * Output only. Details of the VM from an AWS source. - * @type string $name - * Output only. The identifier of the MigratingVm. - * @type string $source_vm_id - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * @type string $display_name - * The display name attached to the MigratingVm by the user. - * @type string $description - * The description attached to the migrating VM by the user. - * @type \Google\Cloud\VMMigration\V1\SchedulePolicy $policy - * The replication schedule policy. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the migrating VM resource was updated. - * @type \Google\Cloud\VMMigration\V1\ReplicationSync $last_sync - * Output only. The most updated snapshot created time in the source that - * finished replication. - * @type int $state - * Output only. State of the MigratingVm. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The last time the migrating VM state was updated. - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $current_sync_info - * Output only. The percentage progress of the current running replication - * cycle. - * @type string $group - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels of the migrating VM. - * @type array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $recent_clone_jobs - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * @type array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $recent_cutover_jobs - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults|null - */ - public function getComputeEngineTargetDefaults() - { - return $this->readOneof(26); - } - - public function hasComputeEngineTargetDefaults() - { - return $this->hasOneof(26); - } - - /** - * Details of the target VM in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineTargetDefaults compute_engine_target_defaults = 26; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $var - * @return $this - */ - public function setComputeEngineTargetDefaults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * Output only. Details of the VM from an AWS source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AwsSourceVmDetails|null - */ - public function getAwsSourceVmDetails() - { - return $this->readOneof(29); - } - - public function hasAwsSourceVmDetails() - { - return $this->hasOneof(29); - } - - /** - * Output only. Details of the VM from an AWS source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails aws_source_vm_details = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $var - * @return $this - */ - public function setAwsSourceVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails::class); - $this->writeOneof(29, $var); - - return $this; - } - - /** - * Output only. The identifier of the MigratingVm. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The identifier of the MigratingVm. - * - * 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 unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * - * Generated from protobuf field string source_vm_id = 2; - * @return string - */ - public function getSourceVmId() - { - return $this->source_vm_id; - } - - /** - * The unique ID of the VM in the source. - * The VM's name in vSphere can be changed, so this is not the VM's name but - * rather its moRef id. This id is of the form vm-. - * - * Generated from protobuf field string source_vm_id = 2; - * @param string $var - * @return $this - */ - public function setSourceVmId($var) - { - GPBUtil::checkString($var, True); - $this->source_vm_id = $var; - - return $this; - } - - /** - * The display name attached to the MigratingVm by the user. - * - * Generated from protobuf field string display_name = 18; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name attached to the MigratingVm by the user. - * - * Generated from protobuf field string display_name = 18; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The description attached to the migrating VM by the user. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description attached to the migrating VM by the user. - * - * 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; - } - - /** - * The replication schedule policy. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; - * @return \Google\Cloud\VMMigration\V1\SchedulePolicy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * The replication schedule policy. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulePolicy policy = 8; - * @param \Google\Cloud\VMMigration\V1\SchedulePolicy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\SchedulePolicy::class); - $this->policy = $var; - - return $this; - } - - /** - * Output only. The time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * - * 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 time the migrating VM was created (this refers to this - * resource and not to the time it was installed in the source). - * - * 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 time the migrating VM resource was updated. - * - * 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 time the migrating VM resource was updated. - * - * 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; - } - - /** - * Output only. The most updated snapshot created time in the source that - * finished replication. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ReplicationSync|null - */ - public function getLastSync() - { - return $this->last_sync; - } - - public function hasLastSync() - { - return isset($this->last_sync); - } - - public function clearLastSync() - { - unset($this->last_sync); - } - - /** - * Output only. The most updated snapshot created time in the source that - * finished replication. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationSync last_sync = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ReplicationSync $var - * @return $this - */ - public function setLastSync($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationSync::class); - $this->last_sync = $var; - - return $this; - } - - /** - * Output only. State of the MigratingVm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the MigratingVm. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.State state = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigratingVm\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The last time the migrating VM state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The last time the migrating VM state was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. The percentage progress of the current running replication - * cycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getCurrentSyncInfo() - { - return $this->current_sync_info; - } - - public function hasCurrentSyncInfo() - { - return isset($this->current_sync_info); - } - - public function clearCurrentSyncInfo() - { - unset($this->current_sync_info); - } - - /** - * Output only. The percentage progress of the current running replication - * cycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle current_sync_info = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setCurrentSyncInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->current_sync_info = $var; - - return $this; - } - - /** - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * - * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Output only. The group this migrating vm is included in, if any. The group - * is represented by the full path of the appropriate - * [Group][google.cloud.vmmigration.v1.Group] resource. - * - * Generated from protobuf field string group = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * The labels of the migrating VM. - * - * Generated from protobuf field map labels = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels of the migrating VM. - * - * Generated from protobuf field map labels = 16; - * @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. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecentCloneJobs() - { - return $this->recent_clone_jobs; - } - - /** - * Output only. The recent [clone jobs][google.cloud.vmmigration.v1.CloneJob] - * performed on the migrating VM. This field holds the vm's last completed - * clone job and the vm's running clone job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CloneJob recent_clone_jobs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CloneJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecentCloneJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CloneJob::class); - $this->recent_clone_jobs = $arr; - - return $this; - } - - /** - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * - * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the Migrating VM in case of - * an error in replication. - * - * Generated from protobuf field .google.rpc.Status error = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecentCutoverJobs() - { - return $this->recent_cutover_jobs; - } - - /** - * Output only. The recent cutover jobs performed on the migrating VM. - * This field holds the vm's last completed cutover job and the vm's - * running cutover job, if one exists. - * Note: To have this field populated you need to explicitly request it via - * the "view" parameter of the Get/List request. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\CutoverJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecentCutoverJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CutoverJob::class); - $this->recent_cutover_jobs = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetVmDefaults() - { - return $this->whichOneof("target_vm_defaults"); - } - - /** - * @return string - */ - public function getSourceVmDetails() - { - return $this->whichOneof("source_vm_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php deleted file mode 100644 index 1677e69889d1..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.vmmigration.v1.MigratingVm.State - */ -class State -{ - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The VM in the source is being verified. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The source VM was verified, and it's ready to start replication. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Migration is going through the first sync cycle. - * - * Generated from protobuf enum FIRST_SYNC = 3; - */ - const FIRST_SYNC = 3; - /** - * The replication is active, and it's running or scheduled to run. - * - * Generated from protobuf enum ACTIVE = 4; - */ - const ACTIVE = 4; - /** - * The source VM is being turned off, and a final replication is currently - * running. - * - * Generated from protobuf enum CUTTING_OVER = 7; - */ - const CUTTING_OVER = 7; - /** - * The source VM was stopped and replicated. The replication is currently - * paused. - * - * Generated from protobuf enum CUTOVER = 8; - */ - const CUTOVER = 8; - /** - * A cutover job is active and replication cycle is running the final sync. - * - * Generated from protobuf enum FINAL_SYNC = 9; - */ - const FINAL_SYNC = 9; - /** - * The replication was paused by the user and no cycles are scheduled to - * run. - * - * Generated from protobuf enum PAUSED = 10; - */ - const PAUSED = 10; - /** - * The migrating VM is being finalized and migration resources are being - * removed. - * - * Generated from protobuf enum FINALIZING = 11; - */ - const FINALIZING = 11; - /** - * The replication process is done. The migrating VM is finalized and no - * longer consumes billable resources. - * - * Generated from protobuf enum FINALIZED = 12; - */ - const FINALIZED = 12; - /** - * The replication process encountered an unrecoverable error and was - * aborted. - * - * Generated from protobuf enum ERROR = 13; - */ - const ERROR = 13; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::READY => 'READY', - self::FIRST_SYNC => 'FIRST_SYNC', - self::ACTIVE => 'ACTIVE', - self::CUTTING_OVER => 'CUTTING_OVER', - self::CUTOVER => 'CUTOVER', - self::FINAL_SYNC => 'FINAL_SYNC', - self::PAUSED => 'PAUSED', - self::FINALIZING => 'FINALIZING', - self::FINALIZED => 'FINALIZED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\MigratingVm_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php deleted file mode 100644 index b856588e1ba6..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVmView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.vmmigration.v1.MigratingVmView - */ -class MigratingVmView -{ - /** - * View is unspecified. The API will fallback to the default value. - * - * Generated from protobuf enum MIGRATING_VM_VIEW_UNSPECIFIED = 0; - */ - const MIGRATING_VM_VIEW_UNSPECIFIED = 0; - /** - * Get the migrating VM basic details. - * The basic details do not include the recent clone jobs and recent cutover - * jobs lists. - * - * Generated from protobuf enum MIGRATING_VM_VIEW_BASIC = 1; - */ - const MIGRATING_VM_VIEW_BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum MIGRATING_VM_VIEW_FULL = 2; - */ - const MIGRATING_VM_VIEW_FULL = 2; - - private static $valueToName = [ - self::MIGRATING_VM_VIEW_UNSPECIFIED => 'MIGRATING_VM_VIEW_UNSPECIFIED', - self::MIGRATING_VM_VIEW_BASIC => 'MIGRATING_VM_VIEW_BASIC', - self::MIGRATING_VM_VIEW_FULL => 'MIGRATING_VM_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php deleted file mode 100644 index 55181c0327d9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.vmmigration.v1.MigrationError - */ -class MigrationError extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The error code. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - /** - * Output only. The localized error message. - * - * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_message = null; - /** - * Output only. Suggested action for solving the error. - * - * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $action_item = null; - /** - * Output only. URL(s) pointing to additional information on handling the - * current error. - * - * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $help_links; - /** - * Output only. The time the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. The error code. - * @type \Google\Rpc\LocalizedMessage $error_message - * Output only. The localized error message. - * @type \Google\Rpc\LocalizedMessage $action_item - * Output only. Suggested action for solving the error. - * @type array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $help_links - * Output only. URL(s) pointing to additional information on handling the - * current error. - * @type \Google\Protobuf\Timestamp $error_time - * Output only. The time the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The error code. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. The error code. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationError.ErrorCode code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigrationError\ErrorCode::class); - $this->code = $var; - - return $this; - } - - /** - * Output only. The localized error message. - * - * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\LocalizedMessage|null - */ - public function getErrorMessage() - { - return $this->error_message; - } - - public function hasErrorMessage() - { - return isset($this->error_message); - } - - public function clearErrorMessage() - { - unset($this->error_message); - } - - /** - * Output only. The localized error message. - * - * Generated from protobuf field .google.rpc.LocalizedMessage error_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\LocalizedMessage $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); - $this->error_message = $var; - - return $this; - } - - /** - * Output only. Suggested action for solving the error. - * - * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\LocalizedMessage|null - */ - public function getActionItem() - { - return $this->action_item; - } - - public function hasActionItem() - { - return isset($this->action_item); - } - - public function clearActionItem() - { - unset($this->action_item); - } - - /** - * Output only. Suggested action for solving the error. - * - * Generated from protobuf field .google.rpc.LocalizedMessage action_item = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\LocalizedMessage $var - * @return $this - */ - public function setActionItem($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); - $this->action_item = $var; - - return $this; - } - - /** - * Output only. URL(s) pointing to additional information on handling the - * current error. - * - * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHelpLinks() - { - return $this->help_links; - } - - /** - * Output only. URL(s) pointing to additional information on handling the - * current error. - * - * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHelpLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Help\Link::class); - $this->help_links = $arr; - - return $this; - } - - /** - * Output only. The time the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getErrorTime() - { - return $this->error_time; - } - - public function hasErrorTime() - { - return isset($this->error_time); - } - - public function clearErrorTime() - { - unset($this->error_time); - } - - /** - * Output only. The time the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setErrorTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->error_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php deleted file mode 100644 index b7f0736328fd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.MigrationError.ErrorCode - */ -class ErrorCode -{ - /** - * Default value. This value is not used. - * - * Generated from protobuf enum ERROR_CODE_UNSPECIFIED = 0; - */ - const ERROR_CODE_UNSPECIFIED = 0; - /** - * Migrate for Compute encountered an unknown error. - * - * Generated from protobuf enum UNKNOWN_ERROR = 1; - */ - const UNKNOWN_ERROR = 1; - /** - * Migrate for Compute encountered an error while validating replication - * source health. - * - * Generated from protobuf enum SOURCE_VALIDATION_ERROR = 2; - */ - const SOURCE_VALIDATION_ERROR = 2; - /** - * Migrate for Compute encountered an error during source data operation. - * - * Generated from protobuf enum SOURCE_REPLICATION_ERROR = 3; - */ - const SOURCE_REPLICATION_ERROR = 3; - /** - * Migrate for Compute encountered an error during target data operation. - * - * Generated from protobuf enum TARGET_REPLICATION_ERROR = 4; - */ - const TARGET_REPLICATION_ERROR = 4; - /** - * Migrate for Compute encountered an error during OS adaptation. - * - * Generated from protobuf enum OS_ADAPTATION_ERROR = 5; - */ - const OS_ADAPTATION_ERROR = 5; - /** - * Migrate for Compute encountered an error in clone operation. - * - * Generated from protobuf enum CLONE_ERROR = 6; - */ - const CLONE_ERROR = 6; - /** - * Migrate for Compute encountered an error in cutover operation. - * - * Generated from protobuf enum CUTOVER_ERROR = 7; - */ - const CUTOVER_ERROR = 7; - /** - * Migrate for Compute encountered an error during utilization report - * creation. - * - * Generated from protobuf enum UTILIZATION_REPORT_ERROR = 8; - */ - const UTILIZATION_REPORT_ERROR = 8; - /** - * Migrate for Compute encountered an error during appliance upgrade. - * - * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; - */ - const APPLIANCE_UPGRADE_ERROR = 9; - - private static $valueToName = [ - self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', - self::UNKNOWN_ERROR => 'UNKNOWN_ERROR', - self::SOURCE_VALIDATION_ERROR => 'SOURCE_VALIDATION_ERROR', - self::SOURCE_REPLICATION_ERROR => 'SOURCE_REPLICATION_ERROR', - self::TARGET_REPLICATION_ERROR => 'TARGET_REPLICATION_ERROR', - self::OS_ADAPTATION_ERROR => 'OS_ADAPTATION_ERROR', - self::CLONE_ERROR => 'CLONE_ERROR', - self::CUTOVER_ERROR => 'CUTOVER_ERROR', - self::UTILIZATION_REPORT_ERROR => 'UTILIZATION_REPORT_ERROR', - self::APPLIANCE_UPGRADE_ERROR => 'APPLIANCE_UPGRADE_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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ErrorCode::class, \Google\Cloud\VMMigration\V1\MigrationError_ErrorCode::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php deleted file mode 100644 index e70ad652db3a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.vmmigration.v1.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * The network to connect the NIC to. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2; - */ - protected $subnetwork = ''; - /** - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * - * Generated from protobuf field string internal_ip = 3; - */ - protected $internal_ip = ''; - /** - * The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4; - */ - protected $external_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The network to connect the NIC to. - * @type string $subnetwork - * The subnetwork to connect the NIC to. - * @type string $internal_ip - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * @type string $external_ip - * The external IP to define in the NIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The network to connect the NIC to. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The network to connect the NIC to. - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * - * Generated from protobuf field string internal_ip = 3; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * The internal IP to define in the NIC. - * The formats accepted are: `ephemeral` \ ipv4 address \ a named address - * resource full path. - * - * Generated from protobuf field string internal_ip = 3; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php deleted file mode 100644 index 3174fc524175..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.vmmigration.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\Vmmigration\V1\Vmmigration::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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php deleted file mode 100644 index bd578e77b383..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.PauseMigrationRequest - */ -class PauseMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php deleted file mode 100644 index 943c6192f115..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PauseMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.PauseMigrationResponse - */ -class PauseMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php deleted file mode 100644 index 6fea26e74280..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PostProcessingStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.PostProcessingStep - */ -class PostProcessingStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php deleted file mode 100644 index 1fd2f8bc8cae..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PreparingVMDisksStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.PreparingVMDisksStep - */ -class PreparingVMDisksStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php deleted file mode 100644 index 5aa1a199ff07..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vmmigration.v1.RemoveGroupMigrationRequest - */ -class RemoveGroupMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * The MigratingVm to remove. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $group Required. The name of the Group. Please see - * {@see VmMigrationClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest - * - * @experimental - */ - public static function build(string $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. The name of the Group. - * @type string $migrating_vm - * The MigratingVm to remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. The name of the Group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * The MigratingVm to remove. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * The MigratingVm to remove. - * - * Generated from protobuf field string migrating_vm = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php deleted file mode 100644 index 76fe02aad40a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RemoveGroupMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.RemoveGroupMigrationResponse - */ -class RemoveGroupMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php deleted file mode 100644 index c0191fc596f3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicatingStep.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.vmmigration.v1.ReplicatingStep - */ -class ReplicatingStep extends \Google\Protobuf\Internal\Message -{ - /** - * Total bytes to be handled in the step. - * - * Generated from protobuf field int64 total_bytes = 1; - */ - protected $total_bytes = 0; - /** - * Replicated bytes in the step. - * - * Generated from protobuf field int64 replicated_bytes = 2; - */ - protected $replicated_bytes = 0; - /** - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; - */ - protected $last_two_minutes_average_bytes_per_second = 0; - /** - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; - */ - protected $last_thirty_minutes_average_bytes_per_second = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $total_bytes - * Total bytes to be handled in the step. - * @type int|string $replicated_bytes - * Replicated bytes in the step. - * @type int|string $last_two_minutes_average_bytes_per_second - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * @type int|string $last_thirty_minutes_average_bytes_per_second - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Total bytes to be handled in the step. - * - * Generated from protobuf field int64 total_bytes = 1; - * @return int|string - */ - public function getTotalBytes() - { - return $this->total_bytes; - } - - /** - * Total bytes to be handled in the step. - * - * Generated from protobuf field int64 total_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setTotalBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_bytes = $var; - - return $this; - } - - /** - * Replicated bytes in the step. - * - * Generated from protobuf field int64 replicated_bytes = 2; - * @return int|string - */ - public function getReplicatedBytes() - { - return $this->replicated_bytes; - } - - /** - * Replicated bytes in the step. - * - * Generated from protobuf field int64 replicated_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setReplicatedBytes($var) - { - GPBUtil::checkInt64($var); - $this->replicated_bytes = $var; - - return $this; - } - - /** - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; - * @return int|string - */ - public function getLastTwoMinutesAverageBytesPerSecond() - { - return $this->last_two_minutes_average_bytes_per_second; - } - - /** - * The source disks replication rate for the last 2 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_two_minutes_average_bytes_per_second = 3; - * @param int|string $var - * @return $this - */ - public function setLastTwoMinutesAverageBytesPerSecond($var) - { - GPBUtil::checkInt64($var); - $this->last_two_minutes_average_bytes_per_second = $var; - - return $this; - } - - /** - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; - * @return int|string - */ - public function getLastThirtyMinutesAverageBytesPerSecond() - { - return $this->last_thirty_minutes_average_bytes_per_second; - } - - /** - * The source disks replication rate for the last 30 minutes in bytes per - * second. - * - * Generated from protobuf field int64 last_thirty_minutes_average_bytes_per_second = 4; - * @param int|string $var - * @return $this - */ - public function setLastThirtyMinutesAverageBytesPerSecond($var) - { - GPBUtil::checkInt64($var); - $this->last_thirty_minutes_average_bytes_per_second = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php deleted file mode 100644 index 54c3bf4c6ee3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php +++ /dev/null @@ -1,393 +0,0 @@ -google.cloud.vmmigration.v1.ReplicationCycle - */ -class ReplicationCycle extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of the ReplicationCycle. - * - * Generated from protobuf field string name = 13; - */ - protected $name = ''; - /** - * The cycle's ordinal number. - * - * Generated from protobuf field int32 cycle_number = 10; - */ - protected $cycle_number = 0; - /** - * The time the replication cycle has started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the replication cycle has ended. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - /** - * The accumulated duration the replication cycle was paused. - * - * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; - */ - protected $total_pause_duration = null; - /** - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * - * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; - * @deprecated - */ - protected $progress_percent = 0; - /** - * The cycle's steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; - */ - private $steps; - /** - * State of the ReplicationCycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; - */ - protected $state = 0; - /** - * Provides details on the state of the cycle in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 12; - */ - protected $error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The identifier of the ReplicationCycle. - * @type int $cycle_number - * The cycle's ordinal number. - * @type \Google\Protobuf\Timestamp $start_time - * The time the replication cycle has started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the replication cycle has ended. - * @type \Google\Protobuf\Duration $total_pause_duration - * The accumulated duration the replication cycle was paused. - * @type int $progress_percent - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * @type array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $steps - * The cycle's steps list representing its progress. - * @type int $state - * State of the ReplicationCycle. - * @type \Google\Rpc\Status $error - * Provides details on the state of the cycle in case of an error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of the ReplicationCycle. - * - * Generated from protobuf field string name = 13; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The identifier of the ReplicationCycle. - * - * Generated from protobuf field string name = 13; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The cycle's ordinal number. - * - * Generated from protobuf field int32 cycle_number = 10; - * @return int - */ - public function getCycleNumber() - { - return $this->cycle_number; - } - - /** - * The cycle's ordinal number. - * - * Generated from protobuf field int32 cycle_number = 10; - * @param int $var - * @return $this - */ - public function setCycleNumber($var) - { - GPBUtil::checkInt32($var); - $this->cycle_number = $var; - - return $this; - } - - /** - * The time the replication cycle has 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 replication cycle has 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 replication cycle has ended. - * - * 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); - } - - /** - * The time the replication cycle has ended. - * - * 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; - } - - /** - * The accumulated duration the replication cycle was paused. - * - * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalPauseDuration() - { - return $this->total_pause_duration; - } - - public function hasTotalPauseDuration() - { - return isset($this->total_pause_duration); - } - - public function clearTotalPauseDuration() - { - unset($this->total_pause_duration); - } - - /** - * The accumulated duration the replication cycle was paused. - * - * Generated from protobuf field .google.protobuf.Duration total_pause_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalPauseDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_pause_duration = $var; - - return $this; - } - - /** - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * - * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; - * @return int - * @deprecated - */ - public function getProgressPercent() - { - @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); - return $this->progress_percent; - } - - /** - * The current progress in percentage of this cycle. - * Was replaced by 'steps' field, which breaks down the cycle progression more - * accurately. - * - * Generated from protobuf field int32 progress_percent = 5 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setProgressPercent($var) - { - @trigger_error('progress_percent is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * The cycle's steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * The cycle's steps list representing its progress. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CycleStep steps = 9; - * @param array<\Google\Cloud\VMMigration\V1\CycleStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\CycleStep::class); - $this->steps = $arr; - - return $this; - } - - /** - * State of the ReplicationCycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of the ReplicationCycle. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle.State state = 11; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ReplicationCycle\State::class); - $this->state = $var; - - return $this; - } - - /** - * Provides details on the state of the cycle in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 12; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Provides details on the state of the cycle in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 12; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php deleted file mode 100644 index b4eb3dbe09e8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle/State.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.vmmigration.v1.ReplicationCycle.State - */ -class State -{ - /** - * The state is unknown. This is used for API compatibility only and is not - * used by the system. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The replication cycle is running. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The replication cycle is paused. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * The replication cycle finished with errors. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The replication cycle finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\ReplicationCycle_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php deleted file mode 100644 index 5723d6e67f45..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationSync.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.ReplicationSync - */ -class ReplicationSync extends \Google\Protobuf\Internal\Message -{ - /** - * The most updated snapshot created time in the source that finished - * replication. - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; - */ - protected $last_sync_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $last_sync_time - * The most updated snapshot created time in the source that finished - * replication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The most updated snapshot created time in the source that finished - * replication. - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSyncTime() - { - return $this->last_sync_time; - } - - public function hasLastSyncTime() - { - return isset($this->last_sync_time); - } - - public function clearLastSyncTime() - { - unset($this->last_sync_time); - } - - /** - * The most updated snapshot created time in the source that finished - * replication. - * - * Generated from protobuf field .google.protobuf.Timestamp last_sync_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSyncTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_sync_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php deleted file mode 100644 index b907eb8348b4..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.ResumeMigrationRequest - */ -class ResumeMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php deleted file mode 100644 index 7f8969564462..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ResumeMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.ResumeMigrationResponse - */ -class ResumeMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php deleted file mode 100644 index 0ef6fde8d9da..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulePolicy.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.vmmigration.v1.SchedulePolicy - */ -class SchedulePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The idle duration between replication stages. - * - * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; - */ - protected $idle_duration = null; - /** - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * - * Generated from protobuf field bool skip_os_adaptation = 2; - */ - protected $skip_os_adaptation = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $idle_duration - * The idle duration between replication stages. - * @type bool $skip_os_adaptation - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The idle duration between replication stages. - * - * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getIdleDuration() - { - return $this->idle_duration; - } - - public function hasIdleDuration() - { - return isset($this->idle_duration); - } - - public function clearIdleDuration() - { - unset($this->idle_duration); - } - - /** - * The idle duration between replication stages. - * - * Generated from protobuf field .google.protobuf.Duration idle_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setIdleDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->idle_duration = $var; - - return $this; - } - - /** - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * - * Generated from protobuf field bool skip_os_adaptation = 2; - * @return bool - */ - public function getSkipOsAdaptation() - { - return $this->skip_os_adaptation; - } - - /** - * A flag to indicate whether to skip OS adaptation during the replication - * sync. OS adaptation is a process where the VM's operating system undergoes - * changes and adaptations to fully function on Compute Engine. - * - * Generated from protobuf field bool skip_os_adaptation = 2; - * @param bool $var - * @return $this - */ - public function setSkipOsAdaptation($var) - { - GPBUtil::checkBool($var); - $this->skip_os_adaptation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php deleted file mode 100644 index d66ecb3f057e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.vmmigration.v1.SchedulingNodeAffinity - */ -class SchedulingNodeAffinity extends \Google\Protobuf\Internal\Message -{ - /** - * The label key of Node resource to reference. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The operator to use for the node resources specified in the `values` - * parameter. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; - */ - protected $operator = 0; - /** - * Corresponds to the label values of Node resource. - * - * Generated from protobuf field repeated string values = 3; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The label key of Node resource to reference. - * @type int $operator - * The operator to use for the node resources specified in the `values` - * parameter. - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Corresponds to the label values of Node resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The label key of Node resource to reference. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The label key of Node resource to reference. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The operator to use for the node resources specified in the `values` - * parameter. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; - * @return int - */ - public function getOperator() - { - return $this->operator; - } - - /** - * The operator to use for the node resources specified in the `values` - * parameter. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator operator = 2; - * @param int $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity\Operator::class); - $this->operator = $var; - - return $this; - } - - /** - * Corresponds to the label values of Node resource. - * - * Generated from protobuf field repeated string values = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Corresponds to the label values of Node resource. - * - * Generated from protobuf field repeated string values = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php deleted file mode 100644 index ac3acae966da..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SchedulingNodeAffinity/Operator.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.vmmigration.v1.SchedulingNodeAffinity.Operator - */ -class Operator -{ - /** - * An unknown, unexpected behavior. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The node resource group should be in these resources affinity. - * - * Generated from protobuf enum IN = 1; - */ - const IN = 1; - /** - * The node resource group should not be in these resources affinity. - * - * Generated from protobuf enum NOT_IN = 2; - */ - const NOT_IN = 2; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::IN => 'IN', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Operator::class, \Google\Cloud\VMMigration\V1\SchedulingNodeAffinity_Operator::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php deleted file mode 100644 index 64c6ddafe8b3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShuttingDownSourceVMStep.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.ShuttingDownSourceVMStep - */ -class ShuttingDownSourceVMStep extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php deleted file mode 100644 index ae1ab78c28ca..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.vmmigration.v1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time 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 time timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The labels of the source. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * User-provided description of the source. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - protected $source_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\VmwareSourceDetails $vmware - * Vmware type source details. - * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails $aws - * AWS type source details. - * @type string $name - * Output only. The Source name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * The labels of the source. - * @type string $description - * User-provided description of the source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Vmware type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; - * @return \Google\Cloud\VMMigration\V1\VmwareSourceDetails|null - */ - public function getVmware() - { - return $this->readOneof(10); - } - - public function hasVmware() - { - return $this->hasOneof(10); - } - - /** - * Vmware type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceDetails vmware = 10; - * @param \Google\Cloud\VMMigration\V1\VmwareSourceDetails $var - * @return $this - */ - public function setVmware($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceDetails::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * AWS type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; - * @return \Google\Cloud\VMMigration\V1\AwsSourceDetails|null - */ - public function getAws() - { - return $this->readOneof(12); - } - - public function hasAws() - { - return $this->hasOneof(12); - } - - /** - * AWS type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDetails aws = 12; - * @param \Google\Cloud\VMMigration\V1\AwsSourceDetails $var - * @return $this - */ - public function setAws($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDetails::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. The Source name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The Source name. - * - * 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 time 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 time 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 time 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 time 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; - } - - /** - * The labels of the source. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The labels of the source. - * - * 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; - } - - /** - * User-provided description of the source. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description of the source. - * - * 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; - } - - /** - * @return string - */ - public function getSourceDetails() - { - return $this->whichOneof("source_details"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php deleted file mode 100644 index 4e456d7c4f89..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vmmigration.v1.StartMigrationRequest - */ -class StartMigrationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $migrating_vm = ''; - - /** - * @param string $migratingVm Required. The name of the MigratingVm. Please see - * {@see VmMigrationClient::migratingVmName()} for help formatting this field. - * - * @return \Google\Cloud\VMMigration\V1\StartMigrationRequest - * - * @experimental - */ - public static function build(string $migratingVm): self - { - return (new self()) - ->setMigratingVm($migratingVm); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $migrating_vm - * Required. The name of the MigratingVm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - /** - * Required. The name of the MigratingVm. - * - * Generated from protobuf field string migrating_vm = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkString($var, True); - $this->migrating_vm = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php deleted file mode 100644 index 80c1997ca0cd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/StartMigrationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.StartMigrationResponse - */ -class StartMigrationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php deleted file mode 100644 index d19fb184997d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/TargetProject.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.vmmigration.v1.TargetProject - */ -class TargetProject extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the target project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2; - */ - protected $project = ''; - /** - * The target project's description. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last time the target project resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the target project. - * @type string $project - * The target project ID (number) or project name. - * @type string $description - * The target project's description. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time the target project resource was updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the target project. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the target project. - * - * 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 target project ID (number) or project name. - * - * Generated from protobuf field string project = 2; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * The target project's description. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The target project's description. - * - * 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 time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time this target project resource was created (not related - * to when the Compute Engine project it points to was created). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last time the target project resource was updated. - * - * 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 time the target project resource was updated. - * - * 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; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php deleted file mode 100644 index c3566d1bd515..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateGroupRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * Group 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; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\Group $group Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * Group 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\VMMigration\V1\UpdateGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGroup($group) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * Group 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\VMMigration\V1\Group $group - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Group 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; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Group 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; - * @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 update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php deleted file mode 100644 index 4dc83e8dfef2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateMigratingVmRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateMigratingVmRequest - */ -class UpdateMigratingVmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm 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; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $migrating_vm = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\MigratingVm $migratingVm Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * MigratingVm 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\VMMigration\V1\UpdateMigratingVmRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\MigratingVm $migratingVm, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setMigratingVm($migratingVm) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm 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\VMMigration\V1\MigratingVm $migrating_vm - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm 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; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * MigratingVm 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; - * @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 update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\MigratingVm|null - */ - public function getMigratingVm() - { - return $this->migrating_vm; - } - - public function hasMigratingVm() - { - return isset($this->migrating_vm); - } - - public function clearMigratingVm() - { - unset($this->migrating_vm); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm migrating_vm = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\MigratingVm $var - * @return $this - */ - public function setMigratingVm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm::class); - $this->migrating_vm = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php deleted file mode 100644 index 6fedf6b84370..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateSourceRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateSourceRequest - */ -class UpdateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * Source 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; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\Source $source Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * Source 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\VMMigration\V1\UpdateSourceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\Source $source, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSource($source) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * Source 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\VMMigration\V1\Source $source - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Source 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; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * Source 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; - * @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 update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php deleted file mode 100644 index 64f7eaec9709..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateTargetProjectRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.vmmigration.v1.UpdateTargetProjectRequest - */ -class UpdateTargetProjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Field mask is used to specify the fields to be overwritten in the - * TargetProject 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; - */ - protected $update_mask = null; - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_project = null; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VMMigration\V1\TargetProject $targetProject Required. The update request body. - * @param \Google\Protobuf\FieldMask $updateMask Field mask is used to specify the fields to be overwritten in the - * TargetProject 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\VMMigration\V1\UpdateTargetProjectRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VMMigration\V1\TargetProject $targetProject, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTargetProject($targetProject) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask is used to specify the fields to be overwritten in the - * TargetProject 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\VMMigration\V1\TargetProject $target_project - * Required. The update request body. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * TargetProject 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; - * @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); - } - - /** - * Field mask is used to specify the fields to be overwritten in the - * TargetProject 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; - * @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 update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VMMigration\V1\TargetProject|null - */ - public function getTargetProject() - { - return $this->target_project; - } - - public function hasTargetProject() - { - return isset($this->target_project); - } - - public function clearTargetProject() - { - unset($this->target_project); - } - - /** - * Required. The update request body. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.TargetProject target_project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VMMigration\V1\TargetProject $var - * @return $this - */ - public function setTargetProject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\TargetProject::class); - $this->target_project = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php deleted file mode 100644 index ceb9df3af2cf..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeApplianceRequest - */ -class UpgradeApplianceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $datacenter_connector = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $datacenter_connector - * Required. The DatacenterConnector name. - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDatacenterConnector() - { - return $this->datacenter_connector; - } - - /** - * Required. The DatacenterConnector name. - * - * Generated from protobuf field string datacenter_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatacenterConnector($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_connector = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, 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 t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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; - * @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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php deleted file mode 100644 index caff9fe4988f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeApplianceResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeApplianceResponse - */ -class UpgradeApplianceResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php deleted file mode 100644 index ed6bf097167b..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeStatus - */ -class UpgradeStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The version to upgrade to. - * - * Generated from protobuf field string version = 1; - */ - protected $version = ''; - /** - * The state of the upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; - */ - protected $state = 0; - /** - * Provides details on the state of the upgrade operation in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - /** - * The time the operation was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * The version from which we upgraded. - * - * Generated from protobuf field string previous_version = 5; - */ - protected $previous_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $version - * The version to upgrade to. - * @type int $state - * The state of the upgradeAppliance operation. - * @type \Google\Rpc\Status $error - * Provides details on the state of the upgrade operation in case of an error. - * @type \Google\Protobuf\Timestamp $start_time - * The time the operation was started. - * @type string $previous_version - * The version from which we upgraded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The version to upgrade to. - * - * Generated from protobuf field string version = 1; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version to upgrade to. - * - * Generated from protobuf field string version = 1; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The state of the upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the upgradeAppliance operation. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UpgradeStatus.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UpgradeStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Provides details on the state of the upgrade operation in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Provides details on the state of the upgrade operation in case of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The time the operation was started. - * - * 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); - } - - /** - * The time the operation was started. - * - * 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; - } - - /** - * The version from which we upgraded. - * - * Generated from protobuf field string previous_version = 5; - * @return string - */ - public function getPreviousVersion() - { - return $this->previous_version; - } - - /** - * The version from which we upgraded. - * - * Generated from protobuf field string previous_version = 5; - * @param string $var - * @return $this - */ - public function setPreviousVersion($var) - { - GPBUtil::checkString($var, True); - $this->previous_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php deleted file mode 100644 index d35e49d9ae63..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.UpgradeStatus.State - */ -class State -{ - /** - * The state was not sampled by the health checks yet. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The upgrade has started. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The upgrade failed. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * The upgrade finished successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::FAILED => 'FAILED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\UpgradeStatus_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php deleted file mode 100644 index 322d7e9820a8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport.php +++ /dev/null @@ -1,446 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReport - */ -class UtilizationReport extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The report unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The report display name, as assigned by the user. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. Current state of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_time = null; - /** - * Output only. Provides details on the state of the report in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Time frame of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; - */ - protected $time_frame = 0; - /** - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * - * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $frame_end_time = null; - /** - * Output only. Total number of VMs included in the report. - * - * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vm_count = 0; - /** - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; - */ - private $vms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The report unique name. - * @type string $display_name - * The report display name, as assigned by the user. - * @type int $state - * Output only. Current state of the report. - * @type \Google\Protobuf\Timestamp $state_time - * Output only. The time the state was last set. - * @type \Google\Rpc\Status $error - * Output only. Provides details on the state of the report in case of an - * error. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * @type int $time_frame - * Time frame of the report. - * @type \Google\Protobuf\Timestamp $frame_end_time - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * @type int $vm_count - * Output only. Total number of VMs included in the report. - * @type array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $vms - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The report unique name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The report unique name. - * - * 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 report display name, as assigned by the user. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The report display name, as assigned by the user. - * - * 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; - } - - /** - * Output only. Current state of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStateTime() - { - return $this->state_time; - } - - public function hasStateTime() - { - return isset($this->state_time); - } - - public function clearStateTime() - { - unset($this->state_time); - } - - /** - * Output only. The time the state was last set. - * - * Generated from protobuf field .google.protobuf.Timestamp state_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->state_time = $var; - - return $this; - } - - /** - * Output only. Provides details on the state of the report in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. Provides details on the state of the report in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The time the report was created (this refers to the time of - * the request, not the time the report creation completed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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 report was created (this refers to the time of - * the request, not the time the report creation completed). - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.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; - } - - /** - * Time frame of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; - * @return int - */ - public function getTimeFrame() - { - return $this->time_frame; - } - - /** - * Time frame of the report. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.UtilizationReport.TimeFrame time_frame = 7; - * @param int $var - * @return $this - */ - public function setTimeFrame($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\UtilizationReport\TimeFrame::class); - $this->time_frame = $var; - - return $this; - } - - /** - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * - * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFrameEndTime() - { - return $this->frame_end_time; - } - - public function hasFrameEndTime() - { - return isset($this->frame_end_time); - } - - public function clearFrameEndTime() - { - unset($this->frame_end_time); - } - - /** - * Output only. The point in time when the time frame ends. Notice that the - * time frame is counted backwards. For instance if the "frame_end_time" value - * is 2021/01/20 and the time frame is WEEK then the report covers the week - * between 2021/01/20 and 2021/01/14. - * - * Generated from protobuf field .google.protobuf.Timestamp frame_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFrameEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->frame_end_time = $var; - - return $this; - } - - /** - * Output only. Total number of VMs included in the report. - * - * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVmCount() - { - return $this->vm_count; - } - - /** - * Output only. Total number of VMs included in the report. - * - * Generated from protobuf field int32 vm_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVmCount($var) - { - GPBUtil::checkInt32($var); - $this->vm_count = $var; - - return $this; - } - - /** - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVms() - { - return $this->vms; - } - - /** - * List of utilization information per VM. - * When sent as part of the request, the "vm_id" field is used in order to - * specify which VMs to include in the report. In that case all other fields - * are ignored. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmUtilizationInfo vms = 10; - * @param array<\Google\Cloud\VMMigration\V1\VmUtilizationInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmUtilizationInfo::class); - $this->vms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php deleted file mode 100644 index 2e6f82fb524c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReport.State - */ -class State -{ - /** - * The state is unknown. This value is not in use. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The report is in the making. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Report creation completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Report creation failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\UtilizationReport_State::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php deleted file mode 100644 index 6f7489bf7c3c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReport/TimeFrame.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReport.TimeFrame - */ -class TimeFrame -{ - /** - * The time frame was not specified and will default to WEEK. - * - * Generated from protobuf enum TIME_FRAME_UNSPECIFIED = 0; - */ - const TIME_FRAME_UNSPECIFIED = 0; - /** - * One week. - * - * Generated from protobuf enum WEEK = 1; - */ - const WEEK = 1; - /** - * One month. - * - * Generated from protobuf enum MONTH = 2; - */ - const MONTH = 2; - /** - * One year. - * - * Generated from protobuf enum YEAR = 3; - */ - const YEAR = 3; - - private static $valueToName = [ - self::TIME_FRAME_UNSPECIFIED => 'TIME_FRAME_UNSPECIFIED', - self::WEEK => 'WEEK', - self::MONTH => 'MONTH', - self::YEAR => 'YEAR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeFrame::class, \Google\Cloud\VMMigration\V1\UtilizationReport_TimeFrame::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php deleted file mode 100644 index bb5048154cd8..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UtilizationReportView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.UtilizationReportView - */ -class UtilizationReportView -{ - /** - * The default / unset value. - * The API will default to FULL on single report request and BASIC for - * multiple reports request. - * - * Generated from protobuf enum UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; - */ - const UTILIZATION_REPORT_VIEW_UNSPECIFIED = 0; - /** - * Get the report metadata, without the list of VMs and their utilization - * info. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::UTILIZATION_REPORT_VIEW_UNSPECIFIED => 'UTILIZATION_REPORT_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php deleted file mode 100644 index 8ba1b02d4c1d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationInfo.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.vmmigration.v1.VmUtilizationInfo - */ -class VmUtilizationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The VM's ID in the source. - * - * Generated from protobuf field string vm_id = 3; - */ - protected $vm_id = ''; - /** - * Utilization metrics for this VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; - */ - protected $utilization = null; - protected $VmDetails; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VMMigration\V1\VmwareVmDetails $vmware_vm_details - * The description of the VM in a Source of type Vmware. - * @type string $vm_id - * The VM's ID in the source. - * @type \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $utilization - * Utilization metrics for this VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The description of the VM in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; - * @return \Google\Cloud\VMMigration\V1\VmwareVmDetails|null - */ - public function getVmwareVmDetails() - { - return $this->readOneof(1); - } - - public function hasVmwareVmDetails() - { - return $this->hasOneof(1); - } - - /** - * The description of the VM in a Source of type Vmware. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails vmware_vm_details = 1; - * @param \Google\Cloud\VMMigration\V1\VmwareVmDetails $var - * @return $this - */ - public function setVmwareVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The VM's ID in the source. - * - * Generated from protobuf field string vm_id = 3; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * The VM's ID in the source. - * - * Generated from protobuf field string vm_id = 3; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * Utilization metrics for this VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; - * @return \Google\Cloud\VMMigration\V1\VmUtilizationMetrics|null - */ - public function getUtilization() - { - return $this->utilization; - } - - public function hasUtilization() - { - return isset($this->utilization); - } - - public function clearUtilization() - { - unset($this->utilization); - } - - /** - * Utilization metrics for this VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmUtilizationMetrics utilization = 2; - * @param \Google\Cloud\VMMigration\V1\VmUtilizationMetrics $var - * @return $this - */ - public function setUtilization($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmUtilizationMetrics::class); - $this->utilization = $var; - - return $this; - } - - /** - * @return string - */ - public function getVmDetails() - { - return $this->whichOneof("VmDetails"); - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php deleted file mode 100644 index e81a156532d9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmUtilizationMetrics.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmmigration.v1.VmUtilizationMetrics - */ -class VmUtilizationMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Max CPU usage, percent. - * - * Generated from protobuf field int32 cpu_max_percent = 9; - */ - protected $cpu_max_percent = 0; - /** - * Average CPU usage, percent. - * - * Generated from protobuf field int32 cpu_average_percent = 10; - */ - protected $cpu_average_percent = 0; - /** - * Max memory usage, percent. - * - * Generated from protobuf field int32 memory_max_percent = 11; - */ - protected $memory_max_percent = 0; - /** - * Average memory usage, percent. - * - * Generated from protobuf field int32 memory_average_percent = 12; - */ - protected $memory_average_percent = 0; - /** - * Max disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; - */ - protected $disk_io_rate_max_kbps = 0; - /** - * Average disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; - */ - protected $disk_io_rate_average_kbps = 0; - /** - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_max_kbps = 15; - */ - protected $network_throughput_max_kbps = 0; - /** - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_average_kbps = 16; - */ - protected $network_throughput_average_kbps = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cpu_max_percent - * Max CPU usage, percent. - * @type int $cpu_average_percent - * Average CPU usage, percent. - * @type int $memory_max_percent - * Max memory usage, percent. - * @type int $memory_average_percent - * Average memory usage, percent. - * @type int|string $disk_io_rate_max_kbps - * Max disk IO rate, in kilobytes per second. - * @type int|string $disk_io_rate_average_kbps - * Average disk IO rate, in kilobytes per second. - * @type int|string $network_throughput_max_kbps - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * @type int|string $network_throughput_average_kbps - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Max CPU usage, percent. - * - * Generated from protobuf field int32 cpu_max_percent = 9; - * @return int - */ - public function getCpuMaxPercent() - { - return $this->cpu_max_percent; - } - - /** - * Max CPU usage, percent. - * - * Generated from protobuf field int32 cpu_max_percent = 9; - * @param int $var - * @return $this - */ - public function setCpuMaxPercent($var) - { - GPBUtil::checkInt32($var); - $this->cpu_max_percent = $var; - - return $this; - } - - /** - * Average CPU usage, percent. - * - * Generated from protobuf field int32 cpu_average_percent = 10; - * @return int - */ - public function getCpuAveragePercent() - { - return $this->cpu_average_percent; - } - - /** - * Average CPU usage, percent. - * - * Generated from protobuf field int32 cpu_average_percent = 10; - * @param int $var - * @return $this - */ - public function setCpuAveragePercent($var) - { - GPBUtil::checkInt32($var); - $this->cpu_average_percent = $var; - - return $this; - } - - /** - * Max memory usage, percent. - * - * Generated from protobuf field int32 memory_max_percent = 11; - * @return int - */ - public function getMemoryMaxPercent() - { - return $this->memory_max_percent; - } - - /** - * Max memory usage, percent. - * - * Generated from protobuf field int32 memory_max_percent = 11; - * @param int $var - * @return $this - */ - public function setMemoryMaxPercent($var) - { - GPBUtil::checkInt32($var); - $this->memory_max_percent = $var; - - return $this; - } - - /** - * Average memory usage, percent. - * - * Generated from protobuf field int32 memory_average_percent = 12; - * @return int - */ - public function getMemoryAveragePercent() - { - return $this->memory_average_percent; - } - - /** - * Average memory usage, percent. - * - * Generated from protobuf field int32 memory_average_percent = 12; - * @param int $var - * @return $this - */ - public function setMemoryAveragePercent($var) - { - GPBUtil::checkInt32($var); - $this->memory_average_percent = $var; - - return $this; - } - - /** - * Max disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; - * @return int|string - */ - public function getDiskIoRateMaxKbps() - { - return $this->disk_io_rate_max_kbps; - } - - /** - * Max disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_max_kbps = 13; - * @param int|string $var - * @return $this - */ - public function setDiskIoRateMaxKbps($var) - { - GPBUtil::checkInt64($var); - $this->disk_io_rate_max_kbps = $var; - - return $this; - } - - /** - * Average disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; - * @return int|string - */ - public function getDiskIoRateAverageKbps() - { - return $this->disk_io_rate_average_kbps; - } - - /** - * Average disk IO rate, in kilobytes per second. - * - * Generated from protobuf field int64 disk_io_rate_average_kbps = 14; - * @param int|string $var - * @return $this - */ - public function setDiskIoRateAverageKbps($var) - { - GPBUtil::checkInt64($var); - $this->disk_io_rate_average_kbps = $var; - - return $this; - } - - /** - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_max_kbps = 15; - * @return int|string - */ - public function getNetworkThroughputMaxKbps() - { - return $this->network_throughput_max_kbps; - } - - /** - * Max network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_max_kbps = 15; - * @param int|string $var - * @return $this - */ - public function setNetworkThroughputMaxKbps($var) - { - GPBUtil::checkInt64($var); - $this->network_throughput_max_kbps = $var; - - return $this; - } - - /** - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_average_kbps = 16; - * @return int|string - */ - public function getNetworkThroughputAverageKbps() - { - return $this->network_throughput_average_kbps; - } - - /** - * Average network throughput (combined transmit-rates and receive-rates), in - * kilobytes per second. - * - * Generated from protobuf field int64 network_throughput_average_kbps = 16; - * @param int|string $var - * @return $this - */ - public function setNetworkThroughputAverageKbps($var) - { - GPBUtil::checkInt64($var); - $this->network_throughput_average_kbps = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php deleted file mode 100644 index 751c4aebdc1a..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.vmmigration.v1.VmwareSourceDetails - */ -class VmwareSourceDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The credentials username. - * - * Generated from protobuf field string username = 1; - */ - protected $username = ''; - /** - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $password = ''; - /** - * The ip address of the vcenter this Source represents. - * - * Generated from protobuf field string vcenter_ip = 3; - */ - protected $vcenter_ip = ''; - /** - * The thumbprint representing the certificate for the vcenter. - * - * Generated from protobuf field string thumbprint = 4; - */ - protected $thumbprint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * The credentials username. - * @type string $password - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * @type string $vcenter_ip - * The ip address of the vcenter this Source represents. - * @type string $thumbprint - * The thumbprint representing the certificate for the vcenter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The credentials username. - * - * Generated from protobuf field string username = 1; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The credentials username. - * - * Generated from protobuf field string username = 1; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Input only. The credentials password. This is write only and can not be - * read in a GET operation. - * - * Generated from protobuf field string password = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * The ip address of the vcenter this Source represents. - * - * Generated from protobuf field string vcenter_ip = 3; - * @return string - */ - public function getVcenterIp() - { - return $this->vcenter_ip; - } - - /** - * The ip address of the vcenter this Source represents. - * - * Generated from protobuf field string vcenter_ip = 3; - * @param string $var - * @return $this - */ - public function setVcenterIp($var) - { - GPBUtil::checkString($var, True); - $this->vcenter_ip = $var; - - return $this; - } - - /** - * The thumbprint representing the certificate for the vcenter. - * - * Generated from protobuf field string thumbprint = 4; - * @return string - */ - public function getThumbprint() - { - return $this->thumbprint; - } - - /** - * The thumbprint representing the certificate for the vcenter. - * - * Generated from protobuf field string thumbprint = 4; - * @param string $var - * @return $this - */ - public function setThumbprint($var) - { - GPBUtil::checkString($var, True); - $this->thumbprint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php deleted file mode 100644 index d35cf1bfd3eb..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmDetails - */ -class VmwareVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * - * Generated from protobuf field string vm_id = 1; - */ - protected $vm_id = ''; - /** - * The id of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_id = 2; - */ - protected $datacenter_id = ''; - /** - * The descriptive name of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_description = 3; - */ - protected $datacenter_description = ''; - /** - * The unique identifier of the VM in vCenter. - * - * Generated from protobuf field string uuid = 4; - */ - protected $uuid = ''; - /** - * The display name of the VM. Note that this is not necessarily unique. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; - */ - protected $power_state = 0; - /** - * The number of cpus in the VM. - * - * Generated from protobuf field int32 cpu_count = 7; - */ - protected $cpu_count = 0; - /** - * The size of the memory of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 8; - */ - protected $memory_mb = 0; - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 9; - */ - protected $disk_count = 0; - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 12; - */ - protected $committed_storage_mb = 0; - /** - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * - * Generated from protobuf field string guest_description = 11; - */ - protected $guest_description = ''; - /** - * Output only. The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $boot_option = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vm_id - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * @type string $datacenter_id - * The id of the vCenter's datacenter this VM is contained in. - * @type string $datacenter_description - * The descriptive name of the vCenter's datacenter this VM is contained in. - * @type string $uuid - * The unique identifier of the VM in vCenter. - * @type string $display_name - * The display name of the VM. Note that this is not necessarily unique. - * @type int $power_state - * The power state of the VM at the moment list was taken. - * @type int $cpu_count - * The number of cpus in the VM. - * @type int $memory_mb - * The size of the memory of the VM in MB. - * @type int $disk_count - * The number of disks the VM has. - * @type int|string $committed_storage_mb - * The total size of the storage allocated to the VM in MB. - * @type string $guest_description - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * @type int $boot_option - * Output only. The VM Boot Option. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * - * Generated from protobuf field string vm_id = 1; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * The VM's id in the source (note that this is not the MigratingVm's id). - * This is the moref id of the VM. - * - * Generated from protobuf field string vm_id = 1; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * The id of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_id = 2; - * @return string - */ - public function getDatacenterId() - { - return $this->datacenter_id; - } - - /** - * The id of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_id = 2; - * @param string $var - * @return $this - */ - public function setDatacenterId($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_id = $var; - - return $this; - } - - /** - * The descriptive name of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_description = 3; - * @return string - */ - public function getDatacenterDescription() - { - return $this->datacenter_description; - } - - /** - * The descriptive name of the vCenter's datacenter this VM is contained in. - * - * Generated from protobuf field string datacenter_description = 3; - * @param string $var - * @return $this - */ - public function setDatacenterDescription($var) - { - GPBUtil::checkString($var, True); - $this->datacenter_description = $var; - - return $this; - } - - /** - * The unique identifier of the VM in vCenter. - * - * Generated from protobuf field string uuid = 4; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * The unique identifier of the VM in vCenter. - * - * Generated from protobuf field string uuid = 4; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * The display name of the VM. Note that this is not necessarily unique. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the VM. Note that this is not necessarily unique. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; - * @return int - */ - public function getPowerState() - { - return $this->power_state; - } - - /** - * The power state of the VM at the moment list was taken. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.PowerState power_state = 6; - * @param int $var - * @return $this - */ - public function setPowerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\PowerState::class); - $this->power_state = $var; - - return $this; - } - - /** - * The number of cpus in the VM. - * - * Generated from protobuf field int32 cpu_count = 7; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * The number of cpus in the VM. - * - * Generated from protobuf field int32 cpu_count = 7; - * @param int $var - * @return $this - */ - public function setCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_count = $var; - - return $this; - } - - /** - * The size of the memory of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 8; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * The size of the memory of the VM in MB. - * - * Generated from protobuf field int32 memory_mb = 8; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 9; - * @return int - */ - public function getDiskCount() - { - return $this->disk_count; - } - - /** - * The number of disks the VM has. - * - * Generated from protobuf field int32 disk_count = 9; - * @param int $var - * @return $this - */ - public function setDiskCount($var) - { - GPBUtil::checkInt32($var); - $this->disk_count = $var; - - return $this; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 12; - * @return int|string - */ - public function getCommittedStorageMb() - { - return $this->committed_storage_mb; - } - - /** - * The total size of the storage allocated to the VM in MB. - * - * Generated from protobuf field int64 committed_storage_mb = 12; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageMb($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_mb = $var; - - return $this; - } - - /** - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * - * Generated from protobuf field string guest_description = 11; - * @return string - */ - public function getGuestDescription() - { - return $this->guest_description; - } - - /** - * The VM's OS. See for example - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html - * for types of strings this might hold. - * - * Generated from protobuf field string guest_description = 11; - * @param string $var - * @return $this - */ - public function setGuestDescription($var) - { - GPBUtil::checkString($var, True); - $this->guest_description = $var; - - return $this; - } - - /** - * Output only. The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getBootOption() - { - return $this->boot_option; - } - - /** - * Output only. The VM Boot Option. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBootOption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\BootOption::class); - $this->boot_option = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php deleted file mode 100644 index a83392180524..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/BootOption.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmDetails.BootOption - */ -class BootOption -{ - /** - * The boot option is unknown. - * - * Generated from protobuf enum BOOT_OPTION_UNSPECIFIED = 0; - */ - const BOOT_OPTION_UNSPECIFIED = 0; - /** - * The boot option is EFI. - * - * Generated from protobuf enum EFI = 1; - */ - const EFI = 1; - /** - * The boot option is BIOS. - * - * Generated from protobuf enum BIOS = 2; - */ - const BIOS = 2; - - private static $valueToName = [ - self::BOOT_OPTION_UNSPECIFIED => 'BOOT_OPTION_UNSPECIFIED', - self::EFI => 'EFI', - self::BIOS => 'BIOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_BootOption::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php deleted file mode 100644 index 925c1f5a6f43..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/PowerState.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmDetails.PowerState - */ -class PowerState -{ - /** - * Power state is not specified. - * - * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; - */ - const POWER_STATE_UNSPECIFIED = 0; - /** - * The VM is turned ON. - * - * Generated from protobuf enum ON = 1; - */ - const ON = 1; - /** - * The VM is turned OFF. - * - * Generated from protobuf enum OFF = 2; - */ - const OFF = 2; - /** - * The VM is suspended. This is similar to hibernation or sleep mode. - * - * Generated from protobuf enum SUSPENDED = 3; - */ - const SUSPENDED = 3; - - private static $valueToName = [ - self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', - self::ON => 'ON', - self::OFF => 'OFF', - self::SUSPENDED => 'SUSPENDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_PowerState::class); - diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php deleted file mode 100644 index 96796ec1c12c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmsDetails.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vmmigration.v1.VmwareVmsDetails - */ -class VmwareVmsDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The details of the vmware VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $details - * The details of the vmware VMs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * The details of the vmware VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDetails() - { - return $this->details; - } - - /** - * The details of the vmware VMs. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareVmDetails details = 1; - * @param array<\Google\Cloud\VMMigration\V1\VmwareVmDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmwareVmDetails::class); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php deleted file mode 100644 index c1149ffb2ce3..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/add_group_migration.php +++ /dev/null @@ -1,83 +0,0 @@ -setGroup($formattedGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->addGroupMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddGroupMigrationResponse $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 -{ - $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - add_group_migration_sample($formattedGroup); -} -// [END vmmigration_v1_generated_VmMigration_AddGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php deleted file mode 100644 index 7f0c1864eb40..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_clone_job.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->cancelCloneJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CancelCloneJobResponse $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 = VmMigrationClient::cloneJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CLONE_JOB]' - ); - - cancel_clone_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_CancelCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php deleted file mode 100644 index 54e25699d4ac..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_cutover_job.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->cancelCutoverJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CancelCutoverJobResponse $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 = VmMigrationClient::cutoverJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CUTOVER_JOB]' - ); - - cancel_cutover_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_CancelCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php deleted file mode 100644 index 583a8c712601..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_clone_job.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setCloneJobId($cloneJobId) - ->setCloneJob($cloneJob); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createCloneJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CloneJob $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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $cloneJobId = '[CLONE_JOB_ID]'; - - create_clone_job_sample($formattedParent, $cloneJobId); -} -// [END vmmigration_v1_generated_VmMigration_CreateCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php deleted file mode 100644 index 9c09806ea5b1..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_cutover_job.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setCutoverJobId($cutoverJobId) - ->setCutoverJob($cutoverJob); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createCutoverJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CutoverJob $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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $cutoverJobId = '[CUTOVER_JOB_ID]'; - - create_cutover_job_sample($formattedParent, $cutoverJobId); -} -// [END vmmigration_v1_generated_VmMigration_CreateCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php deleted file mode 100644 index 5a6d0b79ede1..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_datacenter_connector.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setDatacenterConnectorId($datacenterConnectorId) - ->setDatacenterConnector($datacenterConnector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createDatacenterConnector($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DatacenterConnector $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = '[DATACENTER_CONNECTOR_ID]'; - - create_datacenter_connector_sample($formattedParent, $datacenterConnectorId); -} -// [END vmmigration_v1_generated_VmMigration_CreateDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php deleted file mode 100644 index 6c8db44dcbe8..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_group.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $groupId = '[GROUP_ID]'; - - create_group_sample($formattedParent, $groupId); -} -// [END vmmigration_v1_generated_VmMigration_CreateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php deleted file mode 100644 index 9bb800079331..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_migrating_vm.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setMigratingVmId($migratingVmId) - ->setMigratingVm($migratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createMigratingVm($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var MigratingVm $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = '[MIGRATING_VM_ID]'; - - create_migrating_vm_sample($formattedParent, $migratingVmId); -} -// [END vmmigration_v1_generated_VmMigration_CreateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php deleted file mode 100644 index a58e3ff32372..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_source.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Source $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $sourceId = '[SOURCE_ID]'; - - create_source_sample($formattedParent, $sourceId); -} -// [END vmmigration_v1_generated_VmMigration_CreateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php deleted file mode 100644 index 6a4a065f7cb2..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setTargetProjectId($targetProjectId) - ->setTargetProject($targetProject); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createTargetProject($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TargetProject $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = '[TARGET_PROJECT_ID]'; - - create_target_project_sample($formattedParent, $targetProjectId); -} -// [END vmmigration_v1_generated_VmMigration_CreateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php deleted file mode 100644 index 006b3b0f2603..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_utilization_report.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->createUtilizationReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UtilizationReport $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReportId = '[UTILIZATION_REPORT_ID]'; - - create_utilization_report_sample($formattedParent, $utilizationReportId); -} -// [END vmmigration_v1_generated_VmMigration_CreateUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php deleted file mode 100644 index 993b71b4385e..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_datacenter_connector.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteDatacenterConnector($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 = VmMigrationClient::datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - - delete_datacenter_connector_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php deleted file mode 100644 index e970916f7c25..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_group.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteGroup($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 = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - delete_group_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php deleted file mode 100644 index 262f5b572305..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_migrating_vm.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteMigratingVm($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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - delete_migrating_vm_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php deleted file mode 100644 index 6f5da2d0372f..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_source.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteSource($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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - delete_source_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php deleted file mode 100644 index 70ea146c9bb2..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_target_project.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteTargetProject($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 = VmMigrationClient::targetProjectName( - '[PROJECT]', - '[LOCATION]', - '[TARGET_PROJECT]' - ); - - delete_target_project_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php deleted file mode 100644 index 291a7ee83c89..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_utilization_report.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->deleteUtilizationReport($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 = VmMigrationClient::utilizationReportName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[UTILIZATION_REPORT]' - ); - - delete_utilization_report_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_DeleteUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php deleted file mode 100644 index 8550ce328933..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_inventory.php +++ /dev/null @@ -1,75 +0,0 @@ -setSource($formattedSource); - - // Call the API and handle any network failures. - try { - /** @var FetchInventoryResponse $response */ - $response = $vmMigrationClient->fetchInventory($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 -{ - $formattedSource = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - fetch_inventory_sample($formattedSource); -} -// [END vmmigration_v1_generated_VmMigration_FetchInventory_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php deleted file mode 100644 index 1efd40ebfff0..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/finalize_migration.php +++ /dev/null @@ -1,89 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->finalizeMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var FinalizeMigrationResponse $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 -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - finalize_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_FinalizeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php deleted file mode 100644 index 1acd3193f371..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_clone_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CloneJob $response */ - $response = $vmMigrationClient->getCloneJob($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 = VmMigrationClient::cloneJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CLONE_JOB]' - ); - - get_clone_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetCloneJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php deleted file mode 100644 index b56ebfd889d8..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_cutover_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CutoverJob $response */ - $response = $vmMigrationClient->getCutoverJob($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 = VmMigrationClient::cutoverJobName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[CUTOVER_JOB]' - ); - - get_cutover_job_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetCutoverJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php deleted file mode 100644 index f10424c13d5a..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_datacenter_connector.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DatacenterConnector $response */ - $response = $vmMigrationClient->getDatacenterConnector($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 = VmMigrationClient::datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - - get_datacenter_connector_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetDatacenterConnector_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php deleted file mode 100644 index 68e2412fcb94..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $vmMigrationClient->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 -{ - $formattedName = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - get_group_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_location.php deleted file mode 100644 index 8dc72c4f1e99..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/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 vmmigration_v1_generated_VmMigration_GetLocation_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php deleted file mode 100644 index e10be327fb93..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_migrating_vm.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var MigratingVm $response */ - $response = $vmMigrationClient->getMigratingVm($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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - get_migrating_vm_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php deleted file mode 100644 index 588a87cf36cd..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_replication_cycle.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReplicationCycle $response */ - $response = $vmMigrationClient->getReplicationCycle($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 = VmMigrationClient::replicationCycleName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]', - '[REPLICATION_CYCLE]' - ); - - get_replication_cycle_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetReplicationCycle_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php deleted file mode 100644 index 632be52c6f96..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_source.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Source $response */ - $response = $vmMigrationClient->getSource($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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - get_source_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php deleted file mode 100644 index 4509ae4b4f12..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_target_project.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TargetProject $response */ - $response = $vmMigrationClient->getTargetProject($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 = VmMigrationClient::targetProjectName( - '[PROJECT]', - '[LOCATION]', - '[TARGET_PROJECT]' - ); - - get_target_project_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php deleted file mode 100644 index 8c7a7169c434..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_utilization_report.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UtilizationReport $response */ - $response = $vmMigrationClient->getUtilizationReport($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 = VmMigrationClient::utilizationReportName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[UTILIZATION_REPORT]' - ); - - get_utilization_report_sample($formattedName); -} -// [END vmmigration_v1_generated_VmMigration_GetUtilizationReport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php deleted file mode 100644 index 63a58c1987aa..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listCloneJobs($request); - - /** @var CloneJob $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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $pageToken = '[PAGE_TOKEN]'; - - list_clone_jobs_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListCloneJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php deleted file mode 100644 index 6b869a4b8891..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listCutoverJobs($request); - - /** @var CutoverJob $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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $pageToken = '[PAGE_TOKEN]'; - - list_cutover_jobs_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListCutoverJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php deleted file mode 100644 index 398c35b6f753..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_datacenter_connectors.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listDatacenterConnectors($request); - - /** @var DatacenterConnector $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = '[PAGE_TOKEN]'; - - list_datacenter_connectors_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListDatacenterConnectors_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php deleted file mode 100644 index 7b405b9f8eed..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_groups.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listGroups($request); - - /** @var Group $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $pageToken = '[PAGE_TOKEN]'; - - list_groups_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListGroups_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_locations.php deleted file mode 100644 index f765b432d732..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/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 vmmigration_v1_generated_VmMigration_ListLocations_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php deleted file mode 100644 index 314d02fc2996..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_migrating_vms.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listMigratingVms($request); - - /** @var MigratingVm $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = '[PAGE_TOKEN]'; - - list_migrating_vms_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListMigratingVms_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php deleted file mode 100644 index 91543c4635f6..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_replication_cycles.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listReplicationCycles($request); - - /** @var ReplicationCycle $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 = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - $pageToken = '[PAGE_TOKEN]'; - - list_replication_cycles_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListReplicationCycles_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php deleted file mode 100644 index 084038f7e532..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_sources.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listSources($request); - - /** @var Source $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $pageToken = '[PAGE_TOKEN]'; - - list_sources_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListSources_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php deleted file mode 100644 index 7605687b9a05..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_target_projects.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listTargetProjects($request); - - /** @var TargetProject $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 = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); - $pageToken = '[PAGE_TOKEN]'; - - list_target_projects_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListTargetProjects_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php deleted file mode 100644 index 8d5cd0d4e91b..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_utilization_reports.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setPageToken($pageToken); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmMigrationClient->listUtilizationReports($request); - - /** @var UtilizationReport $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 = VmMigrationClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = '[PAGE_TOKEN]'; - - list_utilization_reports_sample($formattedParent, $pageToken); -} -// [END vmmigration_v1_generated_VmMigration_ListUtilizationReports_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php deleted file mode 100644 index c5b34d9bcefb..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/pause_migration.php +++ /dev/null @@ -1,90 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->pauseMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PauseMigrationResponse $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 -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - pause_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_PauseMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php deleted file mode 100644 index 6daf0dfa6740..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/remove_group_migration.php +++ /dev/null @@ -1,83 +0,0 @@ -setGroup($formattedGroup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->removeGroupMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RemoveGroupMigrationResponse $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 -{ - $formattedGroup = VmMigrationClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - remove_group_migration_sample($formattedGroup); -} -// [END vmmigration_v1_generated_VmMigration_RemoveGroupMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php deleted file mode 100644 index 63a188540ee2..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/resume_migration.php +++ /dev/null @@ -1,91 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->resumeMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ResumeMigrationResponse $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 -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - resume_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_ResumeMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php deleted file mode 100644 index 3a7702e45a1e..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/start_migration.php +++ /dev/null @@ -1,89 +0,0 @@ -setMigratingVm($formattedMigratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->startMigration($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StartMigrationResponse $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 -{ - $formattedMigratingVm = VmMigrationClient::migratingVmName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[MIGRATING_VM]' - ); - - start_migration_sample($formattedMigratingVm); -} -// [END vmmigration_v1_generated_VmMigration_StartMigration_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php deleted file mode 100644 index e3468de71b92..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $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 vmmigration_v1_generated_VmMigration_UpdateGroup_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php deleted file mode 100644 index dc1fc7086dea..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_migrating_vm.php +++ /dev/null @@ -1,71 +0,0 @@ -setMigratingVm($migratingVm); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateMigratingVm($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var MigratingVm $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 vmmigration_v1_generated_VmMigration_UpdateMigratingVm_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php deleted file mode 100644 index 14f89e98f59d..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_source.php +++ /dev/null @@ -1,71 +0,0 @@ -setSource($source); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Source $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 vmmigration_v1_generated_VmMigration_UpdateSource_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php deleted file mode 100644 index a8c541b7cbcd..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php +++ /dev/null @@ -1,74 +0,0 @@ -setTargetProject($targetProject); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->updateTargetProject($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TargetProject $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 vmmigration_v1_generated_VmMigration_UpdateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php deleted file mode 100644 index 39731268643d..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/upgrade_appliance.php +++ /dev/null @@ -1,89 +0,0 @@ -setDatacenterConnector($formattedDatacenterConnector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmMigrationClient->upgradeAppliance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UpgradeApplianceResponse $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 -{ - $formattedDatacenterConnector = VmMigrationClient::datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - - upgrade_appliance_sample($formattedDatacenterConnector); -} -// [END vmmigration_v1_generated_VmMigration_UpgradeAppliance_sync] diff --git a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php deleted file mode 100644 index 073f134e367c..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php +++ /dev/null @@ -1,1847 +0,0 @@ - addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCloneJobAsync(CreateCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCutoverJobAsync(CreateCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatacenterConnectorAsync(CreateDatacenterConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMigratingVmAsync(CreateMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSourceAsync(CreateSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTargetProjectAsync(CreateTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUtilizationReportAsync(CreateUtilizationReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatacenterConnectorAsync(DeleteDatacenterConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMigratingVmAsync(DeleteMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSourceAsync(DeleteSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTargetProjectAsync(DeleteTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUtilizationReportAsync(DeleteUtilizationReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface finalizeMigrationAsync(FinalizeMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCloneJobAsync(GetCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCutoverJobAsync(GetCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatacenterConnectorAsync(GetDatacenterConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMigratingVmAsync(GetMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReplicationCycleAsync(GetReplicationCycleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTargetProjectAsync(GetTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUtilizationReportAsync(GetUtilizationReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCloneJobsAsync(ListCloneJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCutoverJobsAsync(ListCutoverJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatacenterConnectorsAsync(ListDatacenterConnectorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMigratingVmsAsync(ListMigratingVmsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReplicationCyclesAsync(ListReplicationCyclesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTargetProjectsAsync(ListTargetProjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUtilizationReportsAsync(ListUtilizationReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseMigrationAsync(PauseMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeGroupMigrationAsync(RemoveGroupMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeMigrationAsync(ResumeMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMigratingVmAsync(UpdateMigratingVmRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTargetProjectAsync(UpdateTargetProjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface upgradeApplianceAsync(UpgradeApplianceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class VmMigrationClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vmmigration.v1.VmMigration'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vmmigration.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vmmigration.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/vm_migration_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vm_migration_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vm_migration_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vm_migration_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 clone_job - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $cloneJob - * - * @return string The formatted clone_job resource. - */ - public static function cloneJobName(string $project, string $location, string $source, string $migratingVm, string $cloneJob): string - { - return self::getPathTemplate('cloneJob')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'clone_job' => $cloneJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cutover_job - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $cutoverJob - * - * @return string The formatted cutover_job resource. - */ - public static function cutoverJobName(string $project, string $location, string $source, string $migratingVm, string $cutoverJob): string - { - return self::getPathTemplate('cutoverJob')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'cutover_job' => $cutoverJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * datacenter_connector resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $datacenterConnector - * - * @return string The formatted datacenter_connector resource. - */ - public static function datacenterConnectorName(string $project, string $location, string $source, string $datacenterConnector): string - { - return self::getPathTemplate('datacenterConnector')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'datacenter_connector' => $datacenterConnector, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $location - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName(string $project, string $location, string $group): string - { - return self::getPathTemplate('group')->render([ - 'project' => $project, - 'location' => $location, - 'group' => $group, - ]); - } - - /** - * 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 migrating_vm - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * - * @return string The formatted migrating_vm resource. - */ - public static function migratingVmName(string $project, string $location, string $source, string $migratingVm): string - { - return self::getPathTemplate('migratingVm')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * replication_cycle resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $migratingVm - * @param string $replicationCycle - * - * @return string The formatted replication_cycle resource. - */ - public static function replicationCycleName(string $project, string $location, string $source, string $migratingVm, string $replicationCycle): string - { - return self::getPathTemplate('replicationCycle')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'migrating_vm' => $migratingVm, - 'replication_cycle' => $replicationCycle, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a source - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * - * @return string The formatted source resource. - */ - public static function sourceName(string $project, string $location, string $source): string - { - return self::getPathTemplate('source')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * target_project resource. - * - * @param string $project - * @param string $location - * @param string $targetProject - * - * @return string The formatted target_project resource. - */ - public static function targetProjectName(string $project, string $location, string $targetProject): string - { - return self::getPathTemplate('targetProject')->render([ - 'project' => $project, - 'location' => $location, - 'target_project' => $targetProject, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * utilization_report resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $utilizationReport - * - * @return string The formatted utilization_report resource. - */ - public static function utilizationReportName(string $project, string $location, string $source, string $utilizationReport): string - { - return self::getPathTemplate('utilizationReport')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'utilization_report' => $utilizationReport, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} - * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} - * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} - * - group: projects/{project}/locations/{location}/groups/{group} - * - location: projects/{project}/locations/{location} - * - migratingVm: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm} - * - replicationCycle: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle} - * - source: projects/{project}/locations/{location}/sources/{source} - * - targetProject: projects/{project}/locations/{location}/targetProjects/{target_project} - * - utilizationReport: projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vmmigration.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds a MigratingVm to a Group. - * - * The async variant is {@see VmMigrationClient::addGroupMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/add_group_migration.php - * - * @param AddGroupMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 addGroupMigration(AddGroupMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AddGroupMigration', $request, $callOptions)->wait(); - } - - /** - * Initiates the cancellation of a running clone job. - * - * The async variant is {@see VmMigrationClient::cancelCloneJobAsync()} . - * - * @example samples/V1/VmMigrationClient/cancel_clone_job.php - * - * @param CancelCloneJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 cancelCloneJob(CancelCloneJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelCloneJob', $request, $callOptions)->wait(); - } - - /** - * Initiates the cancellation of a running cutover job. - * - * The async variant is {@see VmMigrationClient::cancelCutoverJobAsync()} . - * - * @example samples/V1/VmMigrationClient/cancel_cutover_job.php - * - * @param CancelCutoverJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 cancelCutoverJob(CancelCutoverJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelCutoverJob', $request, $callOptions)->wait(); - } - - /** - * Initiates a Clone of a specific migrating VM. - * - * The async variant is {@see VmMigrationClient::createCloneJobAsync()} . - * - * @example samples/V1/VmMigrationClient/create_clone_job.php - * - * @param CreateCloneJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCloneJob(CreateCloneJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCloneJob', $request, $callOptions)->wait(); - } - - /** - * Initiates a Cutover of a specific migrating VM. - * The returned LRO is completed when the cutover job resource is created - * and the job is initiated. - * - * The async variant is {@see VmMigrationClient::createCutoverJobAsync()} . - * - * @example samples/V1/VmMigrationClient/create_cutover_job.php - * - * @param CreateCutoverJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createCutoverJob(CreateCutoverJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCutoverJob', $request, $callOptions)->wait(); - } - - /** - * Creates a new DatacenterConnector in a given Source. - * - * The async variant is {@see VmMigrationClient::createDatacenterConnectorAsync()} - * . - * - * @example samples/V1/VmMigrationClient/create_datacenter_connector.php - * - * @param CreateDatacenterConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createDatacenterConnector(CreateDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDatacenterConnector', $request, $callOptions)->wait(); - } - - /** - * Creates a new Group in a given project and location. - * - * The async variant is {@see VmMigrationClient::createGroupAsync()} . - * - * @example samples/V1/VmMigrationClient/create_group.php - * - * @param CreateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createGroup(CreateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); - } - - /** - * Creates a new MigratingVm in a given Source. - * - * The async variant is {@see VmMigrationClient::createMigratingVmAsync()} . - * - * @example samples/V1/VmMigrationClient/create_migrating_vm.php - * - * @param CreateMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createMigratingVm(CreateMigratingVmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Creates a new Source in a given project and location. - * - * The async variant is {@see VmMigrationClient::createSourceAsync()} . - * - * @example samples/V1/VmMigrationClient/create_source.php - * - * @param CreateSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createSource(CreateSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSource', $request, $callOptions)->wait(); - } - - /** - * Creates a new TargetProject in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see VmMigrationClient::createTargetProjectAsync()} . - * - * @example samples/V1/VmMigrationClient/create_target_project.php - * - * @param CreateTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createTargetProject(CreateTargetProjectRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTargetProject', $request, $callOptions)->wait(); - } - - /** - * Creates a new UtilizationReport. - * - * The async variant is {@see VmMigrationClient::createUtilizationReportAsync()} . - * - * @example samples/V1/VmMigrationClient/create_utilization_report.php - * - * @param CreateUtilizationReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createUtilizationReport(CreateUtilizationReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateUtilizationReport', $request, $callOptions)->wait(); - } - - /** - * Deletes a single DatacenterConnector. - * - * The async variant is {@see VmMigrationClient::deleteDatacenterConnectorAsync()} - * . - * - * @example samples/V1/VmMigrationClient/delete_datacenter_connector.php - * - * @param DeleteDatacenterConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteDatacenterConnector(DeleteDatacenterConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDatacenterConnector', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Group. - * - * The async variant is {@see VmMigrationClient::deleteGroupAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_group.php - * - * @param DeleteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteGroup(DeleteGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a single MigratingVm. - * - * The async variant is {@see VmMigrationClient::deleteMigratingVmAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_migrating_vm.php - * - * @param DeleteMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteMigratingVm(DeleteMigratingVmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Source. - * - * The async variant is {@see VmMigrationClient::deleteSourceAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_source.php - * - * @param DeleteSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteSource(DeleteSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSource', $request, $callOptions)->wait(); - } - - /** - * Deletes a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see VmMigrationClient::deleteTargetProjectAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_target_project.php - * - * @param DeleteTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteTargetProject(DeleteTargetProjectRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTargetProject', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Utilization Report. - * - * The async variant is {@see VmMigrationClient::deleteUtilizationReportAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_utilization_report.php - * - * @param DeleteUtilizationReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteUtilizationReport(DeleteUtilizationReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteUtilizationReport', $request, $callOptions)->wait(); - } - - /** - * List remote source's inventory of VMs. - * The remote source is the onprem vCenter (remote in the sense it's not in - * Compute Engine). The inventory describes the list of existing VMs in that - * source. Note that this operation lists the VMs on the remote source, as - * opposed to listing the MigratingVms resources in the vmmigration service. - * - * The async variant is {@see VmMigrationClient::fetchInventoryAsync()} . - * - * @example samples/V1/VmMigrationClient/fetch_inventory.php - * - * @param FetchInventoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FetchInventoryResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchInventory(FetchInventoryRequest $request, array $callOptions = []): FetchInventoryResponse - { - return $this->startApiCall('FetchInventory', $request, $callOptions)->wait(); - } - - /** - * Marks a migration as completed, deleting migration resources that are no - * longer being used. Only applicable after cutover is done. - * - * The async variant is {@see VmMigrationClient::finalizeMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/finalize_migration.php - * - * @param FinalizeMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 finalizeMigration(FinalizeMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('FinalizeMigration', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CloneJob. - * - * The async variant is {@see VmMigrationClient::getCloneJobAsync()} . - * - * @example samples/V1/VmMigrationClient/get_clone_job.php - * - * @param GetCloneJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CloneJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCloneJob(GetCloneJobRequest $request, array $callOptions = []): CloneJob - { - return $this->startApiCall('GetCloneJob', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single CutoverJob. - * - * The async variant is {@see VmMigrationClient::getCutoverJobAsync()} . - * - * @example samples/V1/VmMigrationClient/get_cutover_job.php - * - * @param GetCutoverJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CutoverJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCutoverJob(GetCutoverJobRequest $request, array $callOptions = []): CutoverJob - { - return $this->startApiCall('GetCutoverJob', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single DatacenterConnector. - * - * The async variant is {@see VmMigrationClient::getDatacenterConnectorAsync()} . - * - * @example samples/V1/VmMigrationClient/get_datacenter_connector.php - * - * @param GetDatacenterConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DatacenterConnector - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDatacenterConnector(GetDatacenterConnectorRequest $request, array $callOptions = []): DatacenterConnector - { - return $this->startApiCall('GetDatacenterConnector', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Group. - * - * The async variant is {@see VmMigrationClient::getGroupAsync()} . - * - * @example samples/V1/VmMigrationClient/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 Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGroup(GetGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single MigratingVm. - * - * The async variant is {@see VmMigrationClient::getMigratingVmAsync()} . - * - * @example samples/V1/VmMigrationClient/get_migrating_vm.php - * - * @param GetMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MigratingVm - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMigratingVm(GetMigratingVmRequest $request, array $callOptions = []): MigratingVm - { - return $this->startApiCall('GetMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ReplicationCycle. - * - * The async variant is {@see VmMigrationClient::getReplicationCycleAsync()} . - * - * @example samples/V1/VmMigrationClient/get_replication_cycle.php - * - * @param GetReplicationCycleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReplicationCycle - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReplicationCycle(GetReplicationCycleRequest $request, array $callOptions = []): ReplicationCycle - { - return $this->startApiCall('GetReplicationCycle', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Source. - * - * The async variant is {@see VmMigrationClient::getSourceAsync()} . - * - * @example samples/V1/VmMigrationClient/get_source.php - * - * @param GetSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Source - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSource(GetSourceRequest $request, array $callOptions = []): Source - { - return $this->startApiCall('GetSource', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see VmMigrationClient::getTargetProjectAsync()} . - * - * @example samples/V1/VmMigrationClient/get_target_project.php - * - * @param GetTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TargetProject - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTargetProject(GetTargetProjectRequest $request, array $callOptions = []): TargetProject - { - return $this->startApiCall('GetTargetProject', $request, $callOptions)->wait(); - } - - /** - * Gets a single Utilization Report. - * - * The async variant is {@see VmMigrationClient::getUtilizationReportAsync()} . - * - * @example samples/V1/VmMigrationClient/get_utilization_report.php - * - * @param GetUtilizationReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UtilizationReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUtilizationReport(GetUtilizationReportRequest $request, array $callOptions = []): UtilizationReport - { - return $this->startApiCall('GetUtilizationReport', $request, $callOptions)->wait(); - } - - /** - * Lists CloneJobs of a given migrating VM. - * - * The async variant is {@see VmMigrationClient::listCloneJobsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_clone_jobs.php - * - * @param ListCloneJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCloneJobs(ListCloneJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCloneJobs', $request, $callOptions); - } - - /** - * Lists CutoverJobs of a given migrating VM. - * - * The async variant is {@see VmMigrationClient::listCutoverJobsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_cutover_jobs.php - * - * @param ListCutoverJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCutoverJobs(ListCutoverJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCutoverJobs', $request, $callOptions); - } - - /** - * Lists DatacenterConnectors in a given Source. - * - * The async variant is {@see VmMigrationClient::listDatacenterConnectorsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_datacenter_connectors.php - * - * @param ListDatacenterConnectorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listDatacenterConnectors(ListDatacenterConnectorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDatacenterConnectors', $request, $callOptions); - } - - /** - * Lists Groups in a given project and location. - * - * The async variant is {@see VmMigrationClient::listGroupsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_groups.php - * - * @param ListGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroups', $request, $callOptions); - } - - /** - * Lists MigratingVms in a given Source. - * - * The async variant is {@see VmMigrationClient::listMigratingVmsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_migrating_vms.php - * - * @param ListMigratingVmsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMigratingVms(ListMigratingVmsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMigratingVms', $request, $callOptions); - } - - /** - * Lists ReplicationCycles in a given MigratingVM. - * - * The async variant is {@see VmMigrationClient::listReplicationCyclesAsync()} . - * - * @example samples/V1/VmMigrationClient/list_replication_cycles.php - * - * @param ListReplicationCyclesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReplicationCycles(ListReplicationCyclesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReplicationCycles', $request, $callOptions); - } - - /** - * Lists Sources in a given project and location. - * - * The async variant is {@see VmMigrationClient::listSourcesAsync()} . - * - * @example samples/V1/VmMigrationClient/list_sources.php - * - * @param ListSourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSources(ListSourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSources', $request, $callOptions); - } - - /** - * Lists TargetProjects in a given project. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see VmMigrationClient::listTargetProjectsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_target_projects.php - * - * @param ListTargetProjectsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listTargetProjects(ListTargetProjectsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTargetProjects', $request, $callOptions); - } - - /** - * Lists Utilization Reports of the given Source. - * - * The async variant is {@see VmMigrationClient::listUtilizationReportsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_utilization_reports.php - * - * @param ListUtilizationReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listUtilizationReports(ListUtilizationReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUtilizationReports', $request, $callOptions); - } - - /** - * Pauses a migration for a VM. If cycle tasks are running they will be - * cancelled, preserving source task data. Further replication cycles will not - * be triggered while the VM is paused. - * - * The async variant is {@see VmMigrationClient::pauseMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/pause_migration.php - * - * @param PauseMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 pauseMigration(PauseMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PauseMigration', $request, $callOptions)->wait(); - } - - /** - * Removes a MigratingVm from a Group. - * - * The async variant is {@see VmMigrationClient::removeGroupMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/remove_group_migration.php - * - * @param RemoveGroupMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 removeGroupMigration(RemoveGroupMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveGroupMigration', $request, $callOptions)->wait(); - } - - /** - * Resumes a migration for a VM. When called on a paused migration, will start - * the process of uploading data and creating snapshots; when called on a - * completed cut-over migration, will update the migration to active state and - * start the process of uploading data and creating snapshots. - * - * The async variant is {@see VmMigrationClient::resumeMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/resume_migration.php - * - * @param ResumeMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resumeMigration(ResumeMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResumeMigration', $request, $callOptions)->wait(); - } - - /** - * Starts migration for a VM. Starts the process of uploading - * data and creating snapshots, in replication cycles scheduled by the policy. - * - * The async variant is {@see VmMigrationClient::startMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/start_migration.php - * - * @param StartMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 startMigration(StartMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartMigration', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Group. - * - * The async variant is {@see VmMigrationClient::updateGroupAsync()} . - * - * @example samples/V1/VmMigrationClient/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 OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single MigratingVm. - * - * The async variant is {@see VmMigrationClient::updateMigratingVmAsync()} . - * - * @example samples/V1/VmMigrationClient/update_migrating_vm.php - * - * @param UpdateMigratingVmRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateMigratingVm(UpdateMigratingVmRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMigratingVm', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Source. - * - * The async variant is {@see VmMigrationClient::updateSourceAsync()} . - * - * @example samples/V1/VmMigrationClient/update_source.php - * - * @param UpdateSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateSource(UpdateSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSource', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single TargetProject. - * - * NOTE: TargetProject is a global resource; hence the only supported value - * for location is `global`. - * - * The async variant is {@see VmMigrationClient::updateTargetProjectAsync()} . - * - * @example samples/V1/VmMigrationClient/update_target_project.php - * - * @param UpdateTargetProjectRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateTargetProject(UpdateTargetProjectRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTargetProject', $request, $callOptions)->wait(); - } - - /** - * Upgrades the appliance relate to this DatacenterConnector to the in-place - * updateable version. - * - * The async variant is {@see VmMigrationClient::upgradeApplianceAsync()} . - * - * @example samples/V1/VmMigrationClient/upgrade_appliance.php - * - * @param UpgradeApplianceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 upgradeAppliance(UpgradeApplianceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpgradeAppliance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see VmMigrationClient::getLocationAsync()} . - * - * @example samples/V1/VmMigrationClient/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 VmMigrationClient::listLocationsAsync()} . - * - * @example samples/V1/VmMigrationClient/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/VmMigration/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 6a432b19446a..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.vmmigration.v1", - "libraryPackage": "Google\\Cloud\\VMMigration\\V1", - "services": { - "VmMigration": { - "clients": { - "grpc": { - "libraryClient": "VmMigrationGapicClient", - "rpcs": { - "AddGroupMigration": { - "methods": [ - "addGroupMigration" - ] - }, - "CancelCloneJob": { - "methods": [ - "cancelCloneJob" - ] - }, - "CancelCutoverJob": { - "methods": [ - "cancelCutoverJob" - ] - }, - "CreateCloneJob": { - "methods": [ - "createCloneJob" - ] - }, - "CreateCutoverJob": { - "methods": [ - "createCutoverJob" - ] - }, - "CreateDatacenterConnector": { - "methods": [ - "createDatacenterConnector" - ] - }, - "CreateGroup": { - "methods": [ - "createGroup" - ] - }, - "CreateMigratingVm": { - "methods": [ - "createMigratingVm" - ] - }, - "CreateSource": { - "methods": [ - "createSource" - ] - }, - "CreateTargetProject": { - "methods": [ - "createTargetProject" - ] - }, - "CreateUtilizationReport": { - "methods": [ - "createUtilizationReport" - ] - }, - "DeleteDatacenterConnector": { - "methods": [ - "deleteDatacenterConnector" - ] - }, - "DeleteGroup": { - "methods": [ - "deleteGroup" - ] - }, - "DeleteMigratingVm": { - "methods": [ - "deleteMigratingVm" - ] - }, - "DeleteSource": { - "methods": [ - "deleteSource" - ] - }, - "DeleteTargetProject": { - "methods": [ - "deleteTargetProject" - ] - }, - "DeleteUtilizationReport": { - "methods": [ - "deleteUtilizationReport" - ] - }, - "FetchInventory": { - "methods": [ - "fetchInventory" - ] - }, - "FinalizeMigration": { - "methods": [ - "finalizeMigration" - ] - }, - "GetCloneJob": { - "methods": [ - "getCloneJob" - ] - }, - "GetCutoverJob": { - "methods": [ - "getCutoverJob" - ] - }, - "GetDatacenterConnector": { - "methods": [ - "getDatacenterConnector" - ] - }, - "GetGroup": { - "methods": [ - "getGroup" - ] - }, - "GetMigratingVm": { - "methods": [ - "getMigratingVm" - ] - }, - "GetReplicationCycle": { - "methods": [ - "getReplicationCycle" - ] - }, - "GetSource": { - "methods": [ - "getSource" - ] - }, - "GetTargetProject": { - "methods": [ - "getTargetProject" - ] - }, - "GetUtilizationReport": { - "methods": [ - "getUtilizationReport" - ] - }, - "ListCloneJobs": { - "methods": [ - "listCloneJobs" - ] - }, - "ListCutoverJobs": { - "methods": [ - "listCutoverJobs" - ] - }, - "ListDatacenterConnectors": { - "methods": [ - "listDatacenterConnectors" - ] - }, - "ListGroups": { - "methods": [ - "listGroups" - ] - }, - "ListMigratingVms": { - "methods": [ - "listMigratingVms" - ] - }, - "ListReplicationCycles": { - "methods": [ - "listReplicationCycles" - ] - }, - "ListSources": { - "methods": [ - "listSources" - ] - }, - "ListTargetProjects": { - "methods": [ - "listTargetProjects" - ] - }, - "ListUtilizationReports": { - "methods": [ - "listUtilizationReports" - ] - }, - "PauseMigration": { - "methods": [ - "pauseMigration" - ] - }, - "RemoveGroupMigration": { - "methods": [ - "removeGroupMigration" - ] - }, - "ResumeMigration": { - "methods": [ - "resumeMigration" - ] - }, - "StartMigration": { - "methods": [ - "startMigration" - ] - }, - "UpdateGroup": { - "methods": [ - "updateGroup" - ] - }, - "UpdateMigratingVm": { - "methods": [ - "updateMigratingVm" - ] - }, - "UpdateSource": { - "methods": [ - "updateSource" - ] - }, - "UpdateTargetProject": { - "methods": [ - "updateTargetProject" - ] - }, - "UpgradeAppliance": { - "methods": [ - "upgradeAppliance" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json deleted file mode 100644 index 51f53c73dcb5..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "interfaces": { - "google.cloud.vmmigration.v1.VmMigration": { - "retry_codes": { - "no_retry_codes": [], - "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 - }, - "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": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 900000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 900000, - "total_timeout_millis": 900000 - } - }, - "methods": { - "AddGroupMigration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CancelCloneJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CancelCutoverJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCloneJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCutoverJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateDatacenterConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateMigratingVm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSource": { - "timeout_millis": 900000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "CreateTargetProject": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateUtilizationReport": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteDatacenterConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteMigratingVm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTargetProject": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteUtilizationReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "FetchInventory": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "FinalizeMigration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCloneJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCutoverJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetDatacenterConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetMigratingVm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetReplicationCycle": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetSource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetTargetProject": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetUtilizationReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListCloneJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListCutoverJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListDatacenterConnectors": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListGroups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListMigratingVms": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListReplicationCycles": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListSources": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListTargetProjects": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListUtilizationReports": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "PauseMigration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RemoveGroupMigration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResumeMigration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartMigration": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateMigratingVm": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateSource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTargetProject": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpgradeAppliance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php deleted file mode 100644 index 7a4fee565d72..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php +++ /dev/null @@ -1,891 +0,0 @@ - [ - 'google.cloud.vmmigration.v1.VmMigration' => [ - 'AddGroupMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\AddGroupMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group', - 'fieldAccessors' => [ - 'getGroup', - ], - ], - ], - ], - 'CancelCloneJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCloneJobResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CancelCutoverJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelCutoverJobResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCloneJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CloneJob', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCutoverJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CutoverJob', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDatacenterConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DatacenterConnector', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMigratingVm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTargetProject' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUtilizationReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UtilizationReport', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDatacenterConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMigratingVm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTargetProject' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUtilizationReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FinalizeMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\FinalizeMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'PauseMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\PauseMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'RemoveGroupMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RemoveGroupMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group', - 'fieldAccessors' => [ - 'getGroup', - ], - ], - ], - ], - 'ResumeMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ResumeMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'StartMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\StartMigrationResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm', - 'fieldAccessors' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group.name', - 'fieldAccessors' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateMigratingVm' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\MigratingVm', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'migrating_vm.name', - 'fieldAccessors' => [ - 'getMigratingVm', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Source', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'source.name', - 'fieldAccessors' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - 'UpdateTargetProject' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\TargetProject', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'target_project.name', - 'fieldAccessors' => [ - 'getTargetProject', - 'getName', - ], - ], - ], - ], - 'UpgradeAppliance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\UpgradeApplianceResponse', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'datacenter_connector', - 'fieldAccessors' => [ - 'getDatacenterConnector', - ], - ], - ], - ], - 'FetchInventory' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\FetchInventoryResponse', - 'headerParams' => [ - [ - 'keyName' => 'source', - 'fieldAccessors' => [ - 'getSource', - ], - ], - ], - ], - 'GetCloneJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\CloneJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCutoverJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\CutoverJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDatacenterConnector' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\DatacenterConnector', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMigratingVm' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\MigratingVm', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReplicationCycle' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ReplicationCycle', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\Source', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTargetProject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\TargetProject', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUtilizationReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\UtilizationReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCloneJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCloneJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListCloneJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCutoverJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCutoverJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListCutoverJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatacenterConnectors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDatacenterConnectors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMigratingVms' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMigratingVms', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListMigratingVmsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReplicationCycles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReplicationCycles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListReplicationCyclesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListSourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTargetProjects' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTargetProjects', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListTargetProjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUtilizationReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUtilizationReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListUtilizationReportsResponse', - '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' => [ - 'cloneJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}', - 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', - 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', - 'group' => 'projects/{project}/locations/{location}/groups/{group}', - 'location' => 'projects/{project}/locations/{location}', - 'migratingVm' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}', - 'replicationCycle' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}', - 'source' => 'projects/{project}/locations/{location}/sources/{source}', - 'targetProject' => 'projects/{project}/locations/{location}/targetProjects/{target_project}', - 'utilizationReport' => 'projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php deleted file mode 100644 index a548189e98dc..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php +++ /dev/null @@ -1,682 +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.vmmigration.v1.VmMigration' => [ - 'AddGroupMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:addGroupMigration', - 'body' => '*', - 'placeholders' => [ - 'group' => [ - 'getters' => [ - 'getGroup', - ], - ], - ], - ], - 'CancelCloneJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CancelCutoverJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCloneJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', - 'body' => 'clone_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'clone_job_id', - ], - ], - 'CreateCutoverJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', - 'body' => 'cutover_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cutover_job_id', - ], - ], - 'CreateDatacenterConnector' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', - 'body' => 'datacenter_connector', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'datacenter_connector_id', - ], - ], - 'CreateGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'body' => 'group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'CreateMigratingVm' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', - 'body' => 'migrating_vm', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'migrating_vm_id', - ], - ], - 'CreateSource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', - 'body' => 'source', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'source_id', - ], - ], - 'CreateTargetProject' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', - 'body' => 'target_project', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'target_project_id', - ], - ], - 'CreateUtilizationReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', - 'body' => 'utilization_report', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'utilization_report_id', - ], - ], - 'DeleteDatacenterConnector' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMigratingVm' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSource' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTargetProject' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUtilizationReport' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FetchInventory' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', - 'placeholders' => [ - 'source' => [ - 'getters' => [ - 'getSource', - ], - ], - ], - ], - 'FinalizeMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:finalizeMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'GetCloneJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cloneJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCutoverJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/cutoverJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDatacenterConnector' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/datacenterConnectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMigratingVm' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReplicationCycle' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*/replicationCycles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTargetProject' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/targetProjects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUtilizationReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/utilizationReports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCloneJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListCutoverJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cutoverJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListDatacenterConnectors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/datacenterConnectors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListMigratingVms' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListReplicationCycles' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/replicationCycles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListSources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListTargetProjects' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/targetProjects', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListUtilizationReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/utilizationReports', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'PauseMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:pauseMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'RemoveGroupMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:removeGroupMigration', - 'body' => '*', - 'placeholders' => [ - 'group' => [ - 'getters' => [ - 'getGroup', - ], - ], - ], - ], - 'ResumeMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:resumeMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'StartMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateMigratingVm' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{migrating_vm.name=projects/*/locations/*/sources/*/migratingVms/*}', - 'body' => 'migrating_vm', - 'placeholders' => [ - 'migrating_vm.name' => [ - 'getters' => [ - 'getMigratingVm', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{source.name=projects/*/locations/*/sources/*}', - 'body' => 'source', - 'placeholders' => [ - 'source.name' => [ - 'getters' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - 'UpdateTargetProject' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{target_project.name=projects/*/locations/*/targetProjects/*}', - 'body' => 'target_project', - 'placeholders' => [ - 'target_project.name' => [ - 'getters' => [ - 'getTargetProject', - 'getName', - ], - ], - ], - ], - 'UpgradeAppliance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{datacenter_connector=projects/*/locations/*/sources/*/datacenterConnectors/*}:upgradeAppliance', - 'body' => '*', - 'placeholders' => [ - 'datacenter_connector' => [ - 'getters' => [ - 'getDatacenterConnector', - ], - ], - ], - ], - ], - '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/*}', - '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/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php deleted file mode 100644 index 880e93315bcb..000000000000 --- a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php +++ /dev/null @@ -1,5156 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VmMigrationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VmMigrationClient($options); - } - - /** @test */ - public function addGroupMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new AddGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->addGroupMigration($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.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - $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 addGroupMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $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 - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new AddGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->addGroupMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - 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 cancelCloneJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelCloneJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelCloneJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new CancelCloneJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCloneJob($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.vmmigration.v1.VmMigration/CancelCloneJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); - $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 cancelCloneJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCloneJobTest'); - $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->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new CancelCloneJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCloneJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCloneJobTest'); - 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 cancelCutoverJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelCutoverJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelCutoverJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new CancelCutoverJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCutoverJob($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.vmmigration.v1.VmMigration/CancelCutoverJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); - $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 cancelCutoverJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelCutoverJobTest'); - $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->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new CancelCutoverJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelCutoverJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelCutoverJobTest'); - 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 createCloneJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloneJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCloneJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cloneJobId = 'cloneJobId-1008685569'; - $cloneJob = new CloneJob(); - $request = (new CreateCloneJobRequest()) - ->setParent($formattedParent) - ->setCloneJobId($cloneJobId) - ->setCloneJob($cloneJob); - $response = $gapicClient->createCloneJob($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.vmmigration.v1.VmMigration/CreateCloneJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCloneJobId(); - $this->assertProtobufEquals($cloneJobId, $actualValue); - $actualValue = $actualApiRequestObject->getCloneJob(); - $this->assertProtobufEquals($cloneJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); - $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 createCloneJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloneJobTest'); - $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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cloneJobId = 'cloneJobId-1008685569'; - $cloneJob = new CloneJob(); - $request = (new CreateCloneJobRequest()) - ->setParent($formattedParent) - ->setCloneJobId($cloneJobId) - ->setCloneJob($cloneJob); - $response = $gapicClient->createCloneJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloneJobTest'); - 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 createCutoverJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCutoverJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $progressPercent = 2137894861; - $stateMessage = 'stateMessage29641305'; - $expectedResponse = new CutoverJob(); - $expectedResponse->setName($name); - $expectedResponse->setProgressPercent($progressPercent); - $expectedResponse->setStateMessage($stateMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCutoverJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cutoverJobId = 'cutoverJobId504048422'; - $cutoverJob = new CutoverJob(); - $request = (new CreateCutoverJobRequest()) - ->setParent($formattedParent) - ->setCutoverJobId($cutoverJobId) - ->setCutoverJob($cutoverJob); - $response = $gapicClient->createCutoverJob($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.vmmigration.v1.VmMigration/CreateCutoverJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCutoverJobId(); - $this->assertProtobufEquals($cutoverJobId, $actualValue); - $actualValue = $actualApiRequestObject->getCutoverJob(); - $this->assertProtobufEquals($cutoverJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); - $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 createCutoverJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCutoverJobTest'); - $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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $cutoverJobId = 'cutoverJobId504048422'; - $cutoverJob = new CutoverJob(); - $request = (new CreateCutoverJobRequest()) - ->setParent($formattedParent) - ->setCutoverJobId($cutoverJobId) - ->setCutoverJob($cutoverJob); - $response = $gapicClient->createCutoverJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCutoverJobTest'); - 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 createDatacenterConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); - $expectedResponse->setName($name); - $expectedResponse->setRegistrationId($registrationId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setVersion($version); - $expectedResponse->setBucket($bucket); - $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); - $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatacenterConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = 'datacenterConnectorId1629428237'; - $datacenterConnector = new DatacenterConnector(); - $request = (new CreateDatacenterConnectorRequest()) - ->setParent($formattedParent) - ->setDatacenterConnectorId($datacenterConnectorId) - ->setDatacenterConnector($datacenterConnector); - $response = $gapicClient->createDatacenterConnector($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.vmmigration.v1.VmMigration/CreateDatacenterConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatacenterConnectorId(); - $this->assertProtobufEquals($datacenterConnectorId, $actualValue); - $actualValue = $actualApiRequestObject->getDatacenterConnector(); - $this->assertProtobufEquals($datacenterConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); - $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 createDatacenterConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatacenterConnectorTest'); - $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $datacenterConnectorId = 'datacenterConnectorId1629428237'; - $datacenterConnector = new DatacenterConnector(); - $request = (new CreateDatacenterConnectorRequest()) - ->setParent($formattedParent) - ->setDatacenterConnectorId($datacenterConnectorId) - ->setDatacenterConnector($datacenterConnector); - $response = $gapicClient->createDatacenterConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatacenterConnectorTest'); - 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 createGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($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.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - $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 createGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $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]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - 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 createMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = 'migratingVmId-899085236'; - $migratingVm = new MigratingVm(); - $request = (new CreateMigratingVmRequest()) - ->setParent($formattedParent) - ->setMigratingVmId($migratingVmId) - ->setMigratingVm($migratingVm); - $response = $gapicClient->createMigratingVm($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.vmmigration.v1.VmMigration/CreateMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMigratingVmId(); - $this->assertProtobufEquals($migratingVmId, $actualValue); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($migratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); - $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 createMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMigratingVmTest'); - $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $migratingVmId = 'migratingVmId-899085236'; - $migratingVm = new MigratingVm(); - $request = (new CreateMigratingVmRequest()) - ->setParent($formattedParent) - ->setMigratingVmId($migratingVmId) - ->setMigratingVm($migratingVm); - $response = $gapicClient->createMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMigratingVmTest'); - 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 createSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $request = (new CreateSourceRequest()) - ->setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - $response = $gapicClient->createSource($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.vmmigration.v1.VmMigration/CreateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceId(); - $this->assertProtobufEquals($sourceId, $actualValue); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - $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 createSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $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]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $request = (new CreateSourceRequest()) - ->setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - $response = $gapicClient->createSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - 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 createTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetProjectId = 'targetProjectId1255314287'; - $targetProject = new TargetProject(); - $request = (new CreateTargetProjectRequest()) - ->setParent($formattedParent) - ->setTargetProjectId($targetProjectId) - ->setTargetProject($targetProject); - $response = $gapicClient->createTargetProject($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.vmmigration.v1.VmMigration/CreateTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTargetProjectId(); - $this->assertProtobufEquals($targetProjectId, $actualValue); - $actualValue = $actualApiRequestObject->getTargetProject(); - $this->assertProtobufEquals($targetProject, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); - $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 createTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTargetProjectTest'); - $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]'); - $targetProjectId = 'targetProjectId1255314287'; - $targetProject = new TargetProject(); - $request = (new CreateTargetProjectRequest()) - ->setParent($formattedParent) - ->setTargetProjectId($targetProjectId) - ->setTargetProject($targetProject); - $response = $gapicClient->createTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTargetProjectTest'); - 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 createUtilizationReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $vmCount = 261463431; - $expectedResponse = new UtilizationReport(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVmCount($vmCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createUtilizationReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReport = new UtilizationReport(); - $utilizationReportId = 'utilizationReportId-1346894295'; - $request = (new CreateUtilizationReportRequest()) - ->setParent($formattedParent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - $response = $gapicClient->createUtilizationReport($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.vmmigration.v1.VmMigration/CreateUtilizationReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getUtilizationReport(); - $this->assertProtobufEquals($utilizationReport, $actualValue); - $actualValue = $actualApiRequestObject->getUtilizationReportId(); - $this->assertProtobufEquals($utilizationReportId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); - $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 createUtilizationReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createUtilizationReportTest'); - $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $utilizationReport = new UtilizationReport(); - $utilizationReportId = 'utilizationReportId-1346894295'; - $request = (new CreateUtilizationReportRequest()) - ->setParent($formattedParent) - ->setUtilizationReport($utilizationReport) - ->setUtilizationReportId($utilizationReportId); - $response = $gapicClient->createUtilizationReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createUtilizationReportTest'); - 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 deleteDatacenterConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatacenterConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new DeleteDatacenterConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatacenterConnector($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.vmmigration.v1.VmMigration/DeleteDatacenterConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); - $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 deleteDatacenterConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatacenterConnectorTest'); - $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->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new DeleteDatacenterConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatacenterConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatacenterConnectorTest'); - 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 deleteGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGroup($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.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - $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 deleteGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $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->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - 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 deleteMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new DeleteMigratingVmRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMigratingVm($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.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); - $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 deleteMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); - $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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new DeleteMigratingVmRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); - 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 deleteSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSource($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.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - $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 deleteSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - 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 deleteTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new DeleteTargetProjectRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTargetProject($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.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); - $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 deleteTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); - $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->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new DeleteTargetProjectRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); - 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 deleteUtilizationReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteUtilizationReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new DeleteUtilizationReportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteUtilizationReport($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.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); - $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 deleteUtilizationReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); - $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->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new DeleteUtilizationReportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteUtilizationReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); - 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 fetchInventoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new FetchInventoryResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new FetchInventoryRequest()) - ->setSource($formattedSource); - $response = $gapicClient->fetchInventory($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.vmmigration.v1.VmMigration/FetchInventory', $actualFuncCall); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($formattedSource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchInventoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new FetchInventoryRequest()) - ->setSource($formattedSource); - try { - $gapicClient->fetchInventory($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new FinalizeMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/finalizeMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new FinalizeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->finalizeMigration($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.vmmigration.v1.VmMigration/FinalizeMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); - $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 finalizeMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); - $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 - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new FinalizeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->finalizeMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); - 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 getCloneJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new GetCloneJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getCloneJob($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.vmmigration.v1.VmMigration/GetCloneJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloneJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cloneJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CLONE_JOB]'); - $request = (new GetCloneJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getCloneJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCutoverJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $progressPercent = 2137894861; - $stateMessage = 'stateMessage29641305'; - $expectedResponse = new CutoverJob(); - $expectedResponse->setName($name2); - $expectedResponse->setProgressPercent($progressPercent); - $expectedResponse->setStateMessage($stateMessage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new GetCutoverJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getCutoverJob($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.vmmigration.v1.VmMigration/GetCutoverJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCutoverJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->cutoverJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[CUTOVER_JOB]'); - $request = (new GetCutoverJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getCutoverJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatacenterConnectorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); - $expectedResponse->setName($name2); - $expectedResponse->setRegistrationId($registrationId); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setVersion($version); - $expectedResponse->setBucket($bucket); - $expectedResponse->setApplianceInfrastructureVersion($applianceInfrastructureVersion); - $expectedResponse->setApplianceSoftwareVersion($applianceSoftwareVersion); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new GetDatacenterConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->getDatacenterConnector($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.vmmigration.v1.VmMigration/GetDatacenterConnector', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatacenterConnectorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new GetDatacenterConnectorRequest()) - ->setName($formattedName); - try { - $gapicClient->getDatacenterConnector($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - $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.cloud.vmmigration.v1.VmMigration/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $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 - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - 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 getMigratingVmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new GetMigratingVmRequest()) - ->setName($formattedName); - $response = $gapicClient->getMigratingVm($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.vmmigration.v1.VmMigration/GetMigratingVm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMigratingVmExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new GetMigratingVmRequest()) - ->setName($formattedName); - try { - $gapicClient->getMigratingVm($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationCycleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cycleNumber = 1095724862; - $progressPercent = 2137894861; - $expectedResponse = new ReplicationCycle(); - $expectedResponse->setName($name2); - $expectedResponse->setCycleNumber($cycleNumber); - $expectedResponse->setProgressPercent($progressPercent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - $request = (new GetReplicationCycleRequest()) - ->setName($formattedName); - $response = $gapicClient->getReplicationCycle($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.vmmigration.v1.VmMigration/GetReplicationCycle', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationCycleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->replicationCycleName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]', '[REPLICATION_CYCLE]'); - $request = (new GetReplicationCycleRequest()) - ->setName($formattedName); - try { - $gapicClient->getReplicationCycle($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new GetSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->getSource($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.vmmigration.v1.VmMigration/GetSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new GetSourceRequest()) - ->setName($formattedName); - try { - $gapicClient->getSource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTargetProjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name2); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new GetTargetProjectRequest()) - ->setName($formattedName); - $response = $gapicClient->getTargetProject($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.vmmigration.v1.VmMigration/GetTargetProject', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTargetProjectExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new GetTargetProjectRequest()) - ->setName($formattedName); - try { - $gapicClient->getTargetProject($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUtilizationReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $vmCount = 261463431; - $expectedResponse = new UtilizationReport(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVmCount($vmCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new GetUtilizationReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getUtilizationReport($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.vmmigration.v1.VmMigration/GetUtilizationReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUtilizationReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->utilizationReportName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[UTILIZATION_REPORT]'); - $request = (new GetUtilizationReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getUtilizationReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloneJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cloneJobsElement = new CloneJob(); - $cloneJobs = [ - $cloneJobsElement, - ]; - $expectedResponse = new ListCloneJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCloneJobs($cloneJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCloneJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listCloneJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCloneJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCloneJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloneJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCloneJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listCloneJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCutoverJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cutoverJobsElement = new CutoverJob(); - $cutoverJobs = [ - $cutoverJobsElement, - ]; - $expectedResponse = new ListCutoverJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCutoverJobs($cutoverJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCutoverJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listCutoverJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCutoverJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListCutoverJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCutoverJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListCutoverJobsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listCutoverJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatacenterConnectorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $datacenterConnectorsElement = new DatacenterConnector(); - $datacenterConnectors = [ - $datacenterConnectorsElement, - ]; - $expectedResponse = new ListDatacenterConnectorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDatacenterConnectors($datacenterConnectors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListDatacenterConnectorsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listDatacenterConnectors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDatacenterConnectors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListDatacenterConnectors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatacenterConnectorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListDatacenterConnectorsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listDatacenterConnectors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupsElement = new Group(); - $groups = [ - $groupsElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroups($groups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListGroupsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListGroupsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigratingVmsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $migratingVmsElement = new MigratingVm(); - $migratingVms = [ - $migratingVmsElement, - ]; - $expectedResponse = new ListMigratingVmsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMigratingVms($migratingVms); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListMigratingVmsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listMigratingVms($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMigratingVms()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListMigratingVms', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMigratingVmsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListMigratingVmsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listMigratingVms($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationCyclesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $replicationCyclesElement = new ReplicationCycle(); - $replicationCycles = [ - $replicationCyclesElement, - ]; - $expectedResponse = new ListReplicationCyclesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReplicationCycles($replicationCycles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListReplicationCyclesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listReplicationCycles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReplicationCycles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListReplicationCycles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationCyclesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListReplicationCyclesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listReplicationCycles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sourcesElement = new Source(); - $sources = [ - $sourcesElement, - ]; - $expectedResponse = new ListSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSources($sources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListSourcesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listSources($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListSourcesRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listSources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTargetProjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $targetProjectsElement = new TargetProject(); - $targetProjects = [ - $targetProjectsElement, - ]; - $expectedResponse = new ListTargetProjectsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTargetProjects($targetProjects); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListTargetProjectsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listTargetProjects($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTargetProjects()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListTargetProjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTargetProjectsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListTargetProjectsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listTargetProjects($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUtilizationReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $utilizationReportsElement = new UtilizationReport(); - $utilizationReports = [ - $utilizationReportsElement, - ]; - $expectedResponse = new ListUtilizationReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUtilizationReports($utilizationReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListUtilizationReportsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - $response = $gapicClient->listUtilizationReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUtilizationReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListUtilizationReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUtilizationReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListUtilizationReportsRequest()) - ->setParent($formattedParent) - ->setPageToken($pageToken); - try { - $gapicClient->listUtilizationReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/pauseMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new PauseMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/pauseMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new PauseMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->pauseMigration($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.vmmigration.v1.VmMigration/PauseMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); - $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 pauseMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/pauseMigrationTest'); - $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 - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new PauseMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->pauseMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/pauseMigrationTest'); - 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 removeGroupMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RemoveGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new RemoveGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->removeGroupMigration($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.vmmigration.v1.VmMigration/RemoveGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); - $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 removeGroupMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeGroupMigrationTest'); - $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 - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new RemoveGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->removeGroupMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeGroupMigrationTest'); - 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 resumeMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ResumeMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resumeMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new ResumeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->resumeMigration($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.vmmigration.v1.VmMigration/ResumeMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); - $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 resumeMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeMigrationTest'); - $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 - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new ResumeMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->resumeMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeMigrationTest'); - 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 startMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new StartMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new StartMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->startMigration($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.vmmigration.v1.VmMigration/StartMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startMigrationTest'); - $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 startMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startMigrationTest'); - $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 - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new StartMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->startMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startMigrationTest'); - 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 updateGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($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.vmmigration.v1.VmMigration/UpdateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - $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 updateGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $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 - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - 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 updateMigratingVmTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMigratingVmTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceVmId = 'sourceVmId1673059967'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $group = 'group98629247'; - $expectedResponse = new MigratingVm(); - $expectedResponse->setName($name); - $expectedResponse->setSourceVmId($sourceVmId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setGroup($group); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMigratingVmTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $migratingVm = new MigratingVm(); - $request = (new UpdateMigratingVmRequest()) - ->setMigratingVm($migratingVm); - $response = $gapicClient->updateMigratingVm($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.vmmigration.v1.VmMigration/UpdateMigratingVm', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($migratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); - $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 updateMigratingVmExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMigratingVmTest'); - $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 - $migratingVm = new MigratingVm(); - $request = (new UpdateMigratingVmRequest()) - ->setMigratingVm($migratingVm); - $response = $gapicClient->updateMigratingVm($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMigratingVmTest'); - 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 updateSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $source = new Source(); - $request = (new UpdateSourceRequest()) - ->setSource($source); - $response = $gapicClient->updateSource($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.vmmigration.v1.VmMigration/UpdateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - $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 updateSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $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 - $source = new Source(); - $request = (new UpdateSourceRequest()) - ->setSource($source); - $response = $gapicClient->updateSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - 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 updateTargetProjectTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTargetProjectTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $project = 'project-309310695'; - $description = 'description-1724546052'; - $expectedResponse = new TargetProject(); - $expectedResponse->setName($name); - $expectedResponse->setProject($project); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTargetProjectTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $targetProject = new TargetProject(); - $request = (new UpdateTargetProjectRequest()) - ->setTargetProject($targetProject); - $response = $gapicClient->updateTargetProject($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.vmmigration.v1.VmMigration/UpdateTargetProject', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTargetProject(); - $this->assertProtobufEquals($targetProject, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); - $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 updateTargetProjectExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTargetProjectTest'); - $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 - $targetProject = new TargetProject(); - $request = (new UpdateTargetProjectRequest()) - ->setTargetProject($targetProject); - $response = $gapicClient->updateTargetProject($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTargetProjectTest'); - 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 upgradeApplianceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeApplianceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UpgradeApplianceResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeApplianceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new UpgradeApplianceRequest()) - ->setDatacenterConnector($formattedDatacenterConnector); - $response = $gapicClient->upgradeAppliance($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.vmmigration.v1.VmMigration/UpgradeAppliance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatacenterConnector(); - $this->assertProtobufEquals($formattedDatacenterConnector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); - $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 upgradeApplianceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeApplianceTest'); - $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 - $formattedDatacenterConnector = $gapicClient->datacenterConnectorName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DATACENTER_CONNECTOR]'); - $request = (new UpgradeApplianceRequest()) - ->setDatacenterConnector($formattedDatacenterConnector); - $response = $gapicClient->upgradeAppliance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeApplianceTest'); - 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 addGroupMigrationAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addGroupMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddGroupMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addGroupMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new AddGroupMigrationRequest()) - ->setGroup($formattedGroup); - $response = $gapicClient->addGroupMigrationAsync($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.vmmigration.v1.VmMigration/AddGroupMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addGroupMigrationTest'); - $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/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php b/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/Vmwareengine.php deleted file mode 100644 index dc42348b2eabf2bd60e9c11feff4ac468ed8c0a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34481 zcmdU2X^b4lbl$YLX(kT<&O>B1H~GQoG#clH#=@DcV*B8qLo1?v6Cu zJ(-?ak`h+F;)Hghz>1t878Juk5JQUNIB^aqcJ4Tb^(%1@ARvsKMi47-VmKF&A3(15eT)F19D!Ijl zTcw6=J9AaX&Ml5eKM&Ks5pqfkwpTBe?d;U__+`6Us+5|g!W8YMaF%paxEbiCaC77& zLgiY?^RmI;qnA+@{;RiUYSnVqYnGbu&)%w6tUA?ZwN$IV1X7*K&X#JP4IPBr&bFL# zv+6ooLU7e7+XoJ2S)Zis-nt7~IF%KQO%ug{QVJKGrrmH#wZeq$l^fN1(``&c(|mr; zZu;sZzd3M_4@ztuk)UmlmsTqXW_l&a9h`?3&FjF0pJ{Tas)` z^qE3omt1GA(Q=%sGgr7;C(e^j;l3TgEKV-en|G3H!6&84zg+TO?11)06}+!mTBz%3 zso5VsUFAkTR;l%ZGnIWtwC_PTPhm+RYR*`dk zt5Eo&_y-V@v&p>kj{-mak4&@$m|fmN$nCdiiYa6btj}an|D~$eoNiPX0n4e`d)MqA zYQaR~6KF*pAlYg5XR?_CtH%%i-B{oMjO{@W*W5C*-C-sJ=-V3xxX)eUAMi%Bx?Y;I ziylB}e;-gU#~2~{tET&+?es4rJ>qp}#cZ_(pxFNa{doggwS$^=bxf z*D&bS0jg{~j@H!~=S4aL9&ozsz?#uP&Y0d#hJ(`LZD_q?-)oHty8w7E}^Z{=m8R*xUL?hx*9|WBpX%K739PE9!Po?hHKivUyI(m zn2TL#gQTQlwL+(4_4qPi5}!kBrO$L~QmK&jvkjpJGaNDiolo*1g9p&sMTn^os_mld z)Y#0fqTj49fzZ#?$tRuAA=Zc;cEH+WFq3qUBJm9>{F>1LVI#shhJ9?*2}BK+G5uv= zdcv;RdZxRy1F*-S9;qoZJz}(c)`h%@P7u={-i6jw>{{tgaUN1Ck7|86ZGHX+?q)LM z>(GP6z;|mA?Rdt4U%bbxTc6FKO~i}O)>YkCJXOK7vqA%~d9(W)}% znuE(eVK~|#G|Xj8i7QvoM!*$L+jjaOq#UAhm#h9uLJ&f5~g$M1ra3_cVo6_01QVf6Tb0L1UsjCL+S8!p25M}*_}_X66? zkVN7CgcMBD%zPw%fb(x47JkL8*uDdvR2(qXNXde{RYV&D<8rqeLCYP&2=^%~-lqu9 zkq%{@N9(|MNE_ie$0YR~ppIjqY@Fi|a_j93+DUkwyv-JBki$aS=C$?Jz4s(jT7t~z zXEJD41g~7j7Z8TThORh^B_Rn{_~CekD+-9zy*^2Tta9+2-7L>vv75Kt#*5P~th4VZ zeYTZ)0j+ab!(yGbtk*K=P$CB3J55^8q3vMBijssuk4Xl7 zgevARIuxfEr6=p#VB0JrC||@F-P`shw82&kjwf5`%#B5aEZU^@MgoqHtbGd9wPS|$ zRgjg%g$P+Yix0h(PfqlFu`7hKTLFQ8p&V} zM5lS8KRoxpqiChaIO6cNHy*wieM;1V*#!q=q{1hTOMW*<{cbO^;{1+vVEqWByvzjU z9y_x|Eyam)8A95%R;>-dV@eiq-+(tkSc9d)Ly_!qbGVAO zw2^^|Q*0169bh}3>J!e}NWqd7*6=20Z?Rw+9HVV=-!LA={i;58+L>m%8r5c#~`(W+##tubD{epXe5Sz2;@*e zJS0a?>?9h>KgYMuF1d4XrZRWkZY+L(F1Q*+>h44X+e=75gdN? zuY@mjA9|T}7xr=p3Xp~PjXU*rcGAVxce1Qg%}T5fXV4af6^=!DID-cMicP{GhoMK} zVMxf65`m@>1_Tns0vz%Z_zcn1;t{krE*}+LSQWJW`n-GVigz2(rvk@1aMJB(_*3dB z06X$Yy&-FT5bYwP+$_TYcH=&dgtwqoEeHto&?T^fc?Au?*(|8;zRDTx%AbaOn=!QDLK(7b)q3O80SQC zN6`RWD4>24I{C)1tkHEX+%o~Q)=3R!?!1X6ReD-;WD>k z7BrT?j>%cnA!K7(y2dZ;ugCiTUh*GI|PZ^_rO5B&>R^_&u?L;+V>Qh;D z>ZvEW^=j)jza=BH#bY|TCBr@x8;X*hUJ-mukmHw=Z1xKj|;hh}>N2#AcaFl*8`iJ1?2p6KP zCku{JU-uBD zpxwp3LC>P~&%r#AXszdy2kNKM)J8JzzM_GuY9h^yzW^iXbz3y8)}bq+cTqmlV6k3am-Ej653Q3)h7Nt3VTgENhz)M4}d)e z;~@sc#OY0lA$VHumKh%Kqp#e_~i*BkBmQWu`$2{Lwyy z<-CNlZqQ|zLU6xJ$Q&p%9ro{Np}^-xJ>3;`1#WOJQHMhyGAn{{=F_=K=keQBMJCZS;Uw1Svtx5PuD@l^`6i?DDW-MH6f*gc^<4hfKn;^RkScr|}bJ>a`Tpe$S_yzagusSFdEQJ&kf0pY zx*kLf!E$E`XZ#Z6_-B6e)33)6Ws^8>hT;&B5a(n^w0v@I%9AsNCp*D&QI6qPwBon> z(4GV}kobH&^9i~TYPisYp14vL?u{vD*EIjSiEpr=Egfq|rQUplo>r&Al?9mp{4A+j z4b3AaSs0k8@&Oxi@-T(aM7nZF>qgMjg#n~7_0a4STL%N!!UCTvm%-MxL_#z})ciGw zB74z#bwpkCJjA1?U|!TP52?Qp@$>^$Z(JiEs$#{T2VJqCsd8@6m6j->u6`rAu6C+A z8B#;=3!^uwYp4xV#bQD1qX_Ytu(n`peG3b?DYc~~N~o<5gSI*h*HeScaJqJ>-_M{m zB)qbcPY)Z)=K@WIkO>wEymN77+qxtNh*S7vCjo+$mwNaMka_@cu|Z6!hu=`JpQtX? zdMb!#g5NaC=gjhm{UCEP&ay#+!M1{H17>{;ENcf^!TZ-i6=n>DobJ--IGqdjIhCt1 z5*n0v=`a3X25loI<2#jKQRv|(;$v$BnNYx~4yk!Gepa@?i}*qU3k*l!oDVMn!TuJo zBp68jPo|7aOC$s~IA&PG*877tDzXn=Vf^A|gM$skI;@8t@F)Pd* zs%%IpK2u*y*-Bg-eNKtj?Z&Y{lGN@Z^az!R{Yn^4tj8$2gnA@6+hGL1ILHjFCk_dl z3-l2TsRq**kb3R&W2Oghk^r#(SI2zI{Fhc+<`l!n3vm1{_ZLiJiAqJ=?LD)nec5~}Bwj`3|`kl9Cf-U8)7YY9w=l3))T_KBs& zLdYZWP@&LpBs(o58Qh^Vr-(~*Uyjy-W4Qaa20%z~ZdzFdnhLfPmT6m01W`)x8K-x$ z*-4osfCT9(4p&*5Vn>)laD6ad*#KmslH0QHjmd|obW7|izRWZoJd%vs5mS6Zv-Aw5pZ#I%b$59nq$eG+eQb{}(VqQ%-IQFd7mery;<+3J{v) zJYF-^*R3mEOm!n%G*6B(KhcM_QE4>FF)TVG$Py~zwayjsKI>YyiU>r_WhHDvGN*?zoGnR!iT^M0`zDy$~#$d3Y0fXIx*2%P5i#^B_ea^I~sUK2)7ODO@ zi_K~}739||-C=k}ioYGK@MxGVmcGg~33cLjoWC9&?8uZ~hk0k1BlByTcO6Ya89$qN z-ghW75`wCmqi31_iqlBuq_J4V`{Xy0>Gp4E=I@D1n!#(!CV(PNs=Mc$=#pk|Ac*Sp zk1vo@$>8S1Bxcga+O_K0fLA$Qn|_U!rsFU5p{>kq)t6CB>7|}3;k17hrhOmU5E@gr zw9j#e4?l)76#kWP`ycG=a1uI{U+T$g9(D1rEvW2!rcH8U6(J&_GDA8aLCdY9H`f+I z;^V)9=mx=7W!e484`{+ScWW*rh^}U zXVDRHg$~osH|UQ7cP7)N8(jRna=Qk<>Ms~%1`};1N+b!@@n%wW3@B=7DF-Px_!+F+ zEKv~V$^Z)w=>zt8_}-x;oXI@o|5ebYel!h>&?wTE=Q+|+H zQ5-r&XafHQoHauBq+#2%8KkEY!W!;~YR0psf{9ihcP`Vn_!E+vK|Fja9y>@%t)mli z85}5@oF~#3R1-Lo4l^9uQ0MF#FdMY80;h;H+m|HctZg8Voh-a|su!Q(6uxS>A zLIRp>I)Y3HXt3!orm^YWob#YDt3j(c$}i-KTOq!Y#zw5LPDs4cSv5RxzKzA4)T)Xg zOQ@%b z>jQG{OZhn>DZd~>z&y-=8O%d8LSzG&hv?Gp=!Yf3{|)|o&DOr4V}iN}G9iv(20z&4 z3?_NEAuKN}?ue`~g#%Zi*k_S0mTdZ7BzIczzS}p(hUc5jx|h%8Zr!@2e9VVu~!)xfOM#QQZ9F4!)^D_UxrQBT2ohjACnXs38neWjr&8&bn zP4~!tl;!^oWt)wbeefjme?$HdQMH`U@2z^ps#7I@&8GU2UCExJEl<*ROK1t9{{wV( BhgSdq diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php b/owl-bot-staging/VmwareEngine/v1/proto/src/GPBMetadata/Google/Cloud/Vmwareengine/V1/VmwareengineResources.php deleted file mode 100644 index bd32522cabe183d922ba74c55bf779420c9282b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16539 zcmd5@-ESLLb`ME?9!WGc{-Tv^%#7W{-c6{rl57$>PBQ$k%$Oosl9J<8#e^b9(!|sZ z!x_p}QX$2nKwA`jSzs3^+5!cNEzo^h6zKNjX;Bm?(8umWUxOBC0sjdBitRb~-Wkq} z#w4Z4@#Y~GXXc*!alU`&+;`va?snlyYE?6|UengvsjY*Qy{o0VJ<~Q@W+%1P-`>`G zsg}9d)jL`*ol4~^sdA-}D&&iemvE?M_IoWYliD%OosPEL>X`lZ^8Vh#W>3?M9o^8D z_iy-qt38d6vC?c70He95S>0w!ORZM3Ynt6`H|^%;DkHd=BZ8Y79)g=2H*Ny7I!((; zd7sxDy6^?0@V{<V|IX&5r&#ZuC}ayVw=@HxW2=|Jn>WKc%a0-qy8FJFD$B z_jR+E$qaTiATo4l(bzVRH_YM1_@mrY%=b|e@$gSDw4tLQ+0DIf_*llc*WS|wo0N9j z<;rao?rZKj(y6`zKmQ!wIk8krFYuvhrVwebLZtU^EIls>H@o`sHgN}KbKB$!v2@Av z(oq)i>P7L2X%5QVa$B61cz-$g-gb_Je<1%N3JYb;erWa{t`#=cUb(gvL8Ygf58s|FvOoMhj;^_3F&TDbu}4Nvn$;NGk>8jfYI zqy=UT#N5&+a5_ju%fUBN;>0PziZsTcMYNvT%_HA`v>scsf z$r+qxk~SNYmSCZ6SgNJ<@TIDEle5l2#N;Bx%Vt|^9CS5ta2L^X;S;rG_6<83amYla z7h$p0w`_9{U-g{#QRjU`{+kF~sN1N)@waPtYuY)a_|#aeG=@?U*g535@n^ z_B!(8Yvl^OLEz@W>dj|tDw1nf3k^c{1zS`6G(K9eJEG@zW8Edg1 zc4lwDT&t(y7b=NblIECOSrRMbLWgpic2$#~G>+ix1%(aE%BE6VH(zDX*5Zi4%N-nZ_ zUK&2noz^41YaC=)kCM_jgUXf|bQ7lcTWEr`Uh*s(_*=tg+u$Gb850oe>+R$@S~Gu= zg$WyVHF*Ia#aEVx)AF4VsW{PyEd5s$7LS~lgnBQIU&Sd&?}e@W3>KL|pm_zmt>knn zhT`_y$C&@fjA_5&u?mLWJD?RtrQd<1Wx8Ypa%+egh z9%u)A=h97>+;4XJj^@8Qd^$h9O!V!D+<{4^Fw%KgtT&WKL0vD`tA$+gcCnC8JSPE6 zDY-^*qmYP5^DvXE6_iG?yqbv8uk~u4|BBIfx0PZE$4uf1r}KqUp@Bc9=tp(Ewn}5B zrJoUx&-C)n5L>`SWnO>#?rvV`glTlNj_K%D%73!Aw>rnpZ7)%f=!&C|bobAur1`A_^BT2%XlQB?8 zNTG^&a|z}R3ILhCM_1s6%`xd5Ix`Vp@<5rzN}+)vDO8NB!n=-=k$S{et_>GU+Ji^K z_xIvB*8o|kp z6N`o4zxotA^Oqz&+NDoVM?{=+73?S3a2`21-l6>0F_^0Nw=nn)6OZ$- zfC(Yxx@xa!>}Z@n62=fa7`i`f9uUunKeIHN^qYsnTut9|IJm$#_}$?gzj(gd3;BIg2p_`NjW0 zZJq(im6BEqmATgMgc{~=S)sj&5HsMYZ8I3GnLXV;V93Ozv)z zGp(@Uq_!xHc*G2H6>?XD1cymc6uFREm^)G~@%FLjDRyfl<>-~>1@gDwU(c&3~ChSObwMK57K=RBM9L%$0B;MiO8*VV0y4;7+^mTvH%$kE)3vyv`grM-J64JvlgB zb`Du_72jvc*;BQL_TW(d@gyvi%pEKz?9>@J7iQGIO%rh*W_C@>W?+~b;6-UwB<0K? zFtZ+&?vmXQn$2^k5vhQ0p9n1RvE+H8QWfTe0yCdP=udoQg!1_5)mgcQQeaL|C=c^> z%)7}om~ke>DCS(XR%ujnl~O=Zry;hUucDaZAB|iUvvK;PR8Pd{k9xg?!9PlHtx&2a zCgocIgNdc*;bOhAUdt8K#{FtA-N!+N`bR~s02{fwg4y>^P*i^uf$PIOm2aEUDMh0l zugsxzir)euK9qkw0W%c+(s_o7WH3YE2rSD5@Ksy4x(G(AOo}{t1*Qr6de81RJ8G-j z7x*$I7d%psz5@x{wCU{tUM3+FuP?ytp0;Nq^1HJ&ki?k8XMCVqSpT9|#B(v^I=s-_ zZ|a@qRtJ%*Aa-qG@Dp=BeGeuc=tes^&tz{Djw#M2eHVxD;0ZNnySb-#&?F=m$QSU( zC75qDyUi_pVbiNPzKXAm$o`$9Pv@MW3>J&Y@4^Jlhz>7tw^+^xWY>%RL-9#VR!>ASyN?wOt_~AdXX(^kDBpm&9M%dDH^suHMNvv0%NGNXp2aO#DaC?Mn`gE1zr-McP%U{P zMD`Kty{jFB3Gd15=^e+jlR(Eu!H>apc*Er9Ax`lXU!zKhqbI=@cFVQBRG=A-BVuB! zY#>0WWJ?Z|SSi=n*9hP90gJKBU!lGEiwL|rjDf+GOPz5UITZ6--VJaD*^Q4>|4AIm zzl=Z(m%w62QO~5Dg&7zO`d##a9T|bNyqH1f6<^tWWq7=WguRTI7oZ5sY-MEd3Gv!E z07G&GVk`d~_ki&K)7b+Oe)1mPKItChf5gyIR364$w~L(evmaqG1?{J?^go}5vmtn? zwC4w4S$IY!ID#g4Zso(_q7p(d?Rn-zf1Z-X6}Ygc8*Z_J*)m>2CE;ZbDI(EF%|~G$ zky#NRy$y*Lc2lTr^P!=3HO$U91~<2I$yqe&B}c2Qv@Ho8 zCZW%oie+JzAu#$;EJ)1o=Q;-j`QxSkh{0lTiwERgU9%jh3!x!%=`-)k)KpAzAL8WX zZFe~gX_#9XQPcA*zyZF~gDtULN^Q8bgYX8n^{65s@XSK~`&4GpUNZ+b=&M=>r@*Pozrv4=*Uk{Y`+hQZFey&53|q#lSvp+F7fRmJ=hRIJ0zIVr4JzP ze~hMds%`EyQPDj0R8lGIHW1Oag<2!R#c1Xa&_nXCu4yk@R?iu?-21}R!6|gIW zr?piL4bZda8lG7fR}yH`Vaemma1Q$*Fg{#IOk(cH0SdI6S*DTtofr^ZH%v24X>z+Qybdy+fsZ7sN-`z>ay(?qjOrdZf)w zSo9u03(^_L8y{uR1M47h5|54~>r_z`Y10$ivv?;2wr63>&WxKpg<)v8j%? zCi^aocHlet7crP8_M-ut*t;a($?Wj?VIvx!KAJttG zk#%i{nw>o83#qmP^i%dEYP0y5??h{}-bZF}Vh9$`wz0L0*8#@D_q_W|=bf<(1(6?! z?i9o=LZC5}@BIC;vR2Hgq!?JwQEQd;24%A-!qhu+lSD?wd;*KN-MW?BD55s3eT5w9C`(W7Z#H}4M%;j< zC!fh?jEvKw%iC*k?i01>F8y1?4WFE&M(9E_2!`aHbu$u{uQ_zVHU5L~ym=TKJ-%Ho zj{pD`VPUQ5f-SVMm>#bvCN~#N`E*$?GrHR&T$R4F(p>|1|QfBPAx2ydJudP1^7e_f4^$)AjnxIv^eyv@-UH+ic0lbL_QoapZ( z@W!zC;z?&L9gZuI!_mt@i=ST-F(MhfQZb2AKSwcDx44`hX5%nVe>*&se~DPt2D|g) zzc%oU8_)yd$Ixf2pU->5kNgcK$s_QakjSlp)h^C9c)B@K^R2_)N*1) z(Z|A7aYW59jFuBWxz1@I+!)MHV2-rI+R4-a$iATzo|tZotE49?g{^i)K`H?YOB zH6j*3b8vjKfvOdVStmW=!IX?}DZlyp3Jom(wcvPy~DxmsZrBXRr{mC@mP&lLM1E;;#d*aZ>^ z;?8Rqm%=k}p1Ek1iz>gyEgHY@7z`bc@K>sgYd*U{Yly~EJfrJE!bBd*KZ`)Zxyt8U zhej_t?`x2t>Rf!~o#BcTq>>)=HE_V;8@D>h{~3WrjP)qvsA|1E-J(mCVP+nu!p#~j zy^DeD&8T$JWB^5{CfapT{e*PG(Ty|{AEKiI@O z_m88OIe|=uQOIPxB=FabttmWf+kE{M_agPH{QA1*wmVr;y%loPoqfsgqaVT{!2bg~ CTSx~0 diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php deleted file mode 100644 index dfb01afca794..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.vmwareengine.v1.AutoscalingSettings - */ -class AutoscalingSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The map with autoscaling policies applied to the cluster. - * The key is the identifier of the policy. - * It must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * Currently there map must contain only one element - * that describes the autoscaling policy for compute nodes. - * - * Generated from protobuf field map autoscaling_policies = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $autoscaling_policies; - /** - * Optional. Minimum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * - * Generated from protobuf field int32 min_cluster_node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_cluster_node_count = 0; - /** - * Optional. Maximum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * - * Generated from protobuf field int32 max_cluster_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_cluster_node_count = 0; - /** - * Optional. The minimum duration between consecutive autoscale operations. - * It starts once addition or removal of nodes is fully completed. - * Defaults to 30 minutes if not specified. Cool down period must be in whole - * minutes (for example, 30, 31, 50, 180 minutes). - * - * Generated from protobuf field .google.protobuf.Duration cool_down_period = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cool_down_period = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $autoscaling_policies - * Required. The map with autoscaling policies applied to the cluster. - * The key is the identifier of the policy. - * It must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * Currently there map must contain only one element - * that describes the autoscaling policy for compute nodes. - * @type int $min_cluster_node_count - * Optional. Minimum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * @type int $max_cluster_node_count - * Optional. Maximum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * @type \Google\Protobuf\Duration $cool_down_period - * Optional. The minimum duration between consecutive autoscale operations. - * It starts once addition or removal of nodes is fully completed. - * Defaults to 30 minutes if not specified. Cool down period must be in whole - * minutes (for example, 30, 31, 50, 180 minutes). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The map with autoscaling policies applied to the cluster. - * The key is the identifier of the policy. - * It must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * Currently there map must contain only one element - * that describes the autoscaling policy for compute nodes. - * - * Generated from protobuf field map autoscaling_policies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAutoscalingPolicies() - { - return $this->autoscaling_policies; - } - - /** - * Required. The map with autoscaling policies applied to the cluster. - * The key is the identifier of the policy. - * It must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * Currently there map must contain only one element - * that describes the autoscaling policy for compute nodes. - * - * Generated from protobuf field map autoscaling_policies = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAutoscalingPolicies($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\AutoscalingPolicy::class); - $this->autoscaling_policies = $arr; - - return $this; - } - - /** - * Optional. Minimum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * - * Generated from protobuf field int32 min_cluster_node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinClusterNodeCount() - { - return $this->min_cluster_node_count; - } - - /** - * Optional. Minimum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * - * Generated from protobuf field int32 min_cluster_node_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinClusterNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_cluster_node_count = $var; - - return $this; - } - - /** - * Optional. Maximum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * - * Generated from protobuf field int32 max_cluster_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxClusterNodeCount() - { - return $this->max_cluster_node_count; - } - - /** - * Optional. Maximum number of nodes of any type in a cluster. - * If not specified the default limits apply. - * - * Generated from protobuf field int32 max_cluster_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxClusterNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_cluster_node_count = $var; - - return $this; - } - - /** - * Optional. The minimum duration between consecutive autoscale operations. - * It starts once addition or removal of nodes is fully completed. - * Defaults to 30 minutes if not specified. Cool down period must be in whole - * minutes (for example, 30, 31, 50, 180 minutes). - * - * Generated from protobuf field .google.protobuf.Duration cool_down_period = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getCoolDownPeriod() - { - return $this->cool_down_period; - } - - public function hasCoolDownPeriod() - { - return isset($this->cool_down_period); - } - - public function clearCoolDownPeriod() - { - unset($this->cool_down_period); - } - - /** - * Optional. The minimum duration between consecutive autoscale operations. - * It starts once addition or removal of nodes is fully completed. - * Defaults to 30 minutes if not specified. Cool down period must be in whole - * minutes (for example, 30, 31, 50, 180 minutes). - * - * Generated from protobuf field .google.protobuf.Duration cool_down_period = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setCoolDownPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->cool_down_period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php deleted file mode 100644 index 3a898fccb275..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/AutoscalingPolicy.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy - */ -class AutoscalingPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The canonical identifier of the node type to add or remove. - * Corresponds to the `NodeType`. - * - * Generated from protobuf field string node_type_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_type_id = ''; - /** - * Required. Number of nodes to add to a cluster during a scale-out - * operation. Must be divisible by 2 for stretched clusters. During a - * scale-in operation only one node (or 2 for stretched clusters) are - * removed in a single iteration. - * - * Generated from protobuf field int32 scale_out_size = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scale_out_size = 0; - /** - * Optional. Utilization thresholds pertaining to CPU utilization. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds cpu_thresholds = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu_thresholds = null; - /** - * Optional. Utilization thresholds pertaining to amount of granted memory. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds granted_memory_thresholds = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $granted_memory_thresholds = null; - /** - * Optional. Utilization thresholds pertaining to amount of consumed memory. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds consumed_memory_thresholds = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $consumed_memory_thresholds = null; - /** - * Optional. Utilization thresholds pertaining to amount of consumed - * storage. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds storage_thresholds = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_thresholds = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node_type_id - * Required. The canonical identifier of the node type to add or remove. - * Corresponds to the `NodeType`. - * @type int $scale_out_size - * Required. Number of nodes to add to a cluster during a scale-out - * operation. Must be divisible by 2 for stretched clusters. During a - * scale-in operation only one node (or 2 for stretched clusters) are - * removed in a single iteration. - * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $cpu_thresholds - * Optional. Utilization thresholds pertaining to CPU utilization. - * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $granted_memory_thresholds - * Optional. Utilization thresholds pertaining to amount of granted memory. - * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $consumed_memory_thresholds - * Optional. Utilization thresholds pertaining to amount of consumed memory. - * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $storage_thresholds - * Optional. Utilization thresholds pertaining to amount of consumed - * storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The canonical identifier of the node type to add or remove. - * Corresponds to the `NodeType`. - * - * Generated from protobuf field string node_type_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNodeTypeId() - { - return $this->node_type_id; - } - - /** - * Required. The canonical identifier of the node type to add or remove. - * Corresponds to the `NodeType`. - * - * Generated from protobuf field string node_type_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNodeTypeId($var) - { - GPBUtil::checkString($var, True); - $this->node_type_id = $var; - - return $this; - } - - /** - * Required. Number of nodes to add to a cluster during a scale-out - * operation. Must be divisible by 2 for stretched clusters. During a - * scale-in operation only one node (or 2 for stretched clusters) are - * removed in a single iteration. - * - * Generated from protobuf field int32 scale_out_size = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getScaleOutSize() - { - return $this->scale_out_size; - } - - /** - * Required. Number of nodes to add to a cluster during a scale-out - * operation. Must be divisible by 2 for stretched clusters. During a - * scale-in operation only one node (or 2 for stretched clusters) are - * removed in a single iteration. - * - * Generated from protobuf field int32 scale_out_size = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setScaleOutSize($var) - { - GPBUtil::checkInt32($var); - $this->scale_out_size = $var; - - return $this; - } - - /** - * Optional. Utilization thresholds pertaining to CPU utilization. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds cpu_thresholds = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null - */ - public function getCpuThresholds() - { - return $this->cpu_thresholds; - } - - public function hasCpuThresholds() - { - return isset($this->cpu_thresholds); - } - - public function clearCpuThresholds() - { - unset($this->cpu_thresholds); - } - - /** - * Optional. Utilization thresholds pertaining to CPU utilization. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds cpu_thresholds = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var - * @return $this - */ - public function setCpuThresholds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); - $this->cpu_thresholds = $var; - - return $this; - } - - /** - * Optional. Utilization thresholds pertaining to amount of granted memory. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds granted_memory_thresholds = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null - */ - public function getGrantedMemoryThresholds() - { - return $this->granted_memory_thresholds; - } - - public function hasGrantedMemoryThresholds() - { - return isset($this->granted_memory_thresholds); - } - - public function clearGrantedMemoryThresholds() - { - unset($this->granted_memory_thresholds); - } - - /** - * Optional. Utilization thresholds pertaining to amount of granted memory. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds granted_memory_thresholds = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var - * @return $this - */ - public function setGrantedMemoryThresholds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); - $this->granted_memory_thresholds = $var; - - return $this; - } - - /** - * Optional. Utilization thresholds pertaining to amount of consumed memory. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds consumed_memory_thresholds = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null - */ - public function getConsumedMemoryThresholds() - { - return $this->consumed_memory_thresholds; - } - - public function hasConsumedMemoryThresholds() - { - return isset($this->consumed_memory_thresholds); - } - - public function clearConsumedMemoryThresholds() - { - unset($this->consumed_memory_thresholds); - } - - /** - * Optional. Utilization thresholds pertaining to amount of consumed memory. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds consumed_memory_thresholds = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var - * @return $this - */ - public function setConsumedMemoryThresholds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); - $this->consumed_memory_thresholds = $var; - - return $this; - } - - /** - * Optional. Utilization thresholds pertaining to amount of consumed - * storage. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds storage_thresholds = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds|null - */ - public function getStorageThresholds() - { - return $this->storage_thresholds; - } - - public function hasStorageThresholds() - { - return isset($this->storage_thresholds); - } - - public function clearStorageThresholds() - { - unset($this->storage_thresholds); - } - - /** - * Optional. Utilization thresholds pertaining to amount of consumed - * storage. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds storage_thresholds = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds $var - * @return $this - */ - public function setStorageThresholds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings\Thresholds::class); - $this->storage_thresholds = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AutoscalingPolicy::class, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings_AutoscalingPolicy::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php deleted file mode 100644 index fe2d594d86a2..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/AutoscalingSettings/Thresholds.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds - */ -class Thresholds extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The utilization triggering the scale-out operation in percent. - * - * Generated from protobuf field int32 scale_out = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scale_out = 0; - /** - * Required. The utilization triggering the scale-in operation in percent. - * - * Generated from protobuf field int32 scale_in = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $scale_in = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $scale_out - * Required. The utilization triggering the scale-out operation in percent. - * @type int $scale_in - * Required. The utilization triggering the scale-in operation in percent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The utilization triggering the scale-out operation in percent. - * - * Generated from protobuf field int32 scale_out = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getScaleOut() - { - return $this->scale_out; - } - - /** - * Required. The utilization triggering the scale-out operation in percent. - * - * Generated from protobuf field int32 scale_out = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setScaleOut($var) - { - GPBUtil::checkInt32($var); - $this->scale_out = $var; - - return $this; - } - - /** - * Required. The utilization triggering the scale-in operation in percent. - * - * Generated from protobuf field int32 scale_in = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getScaleIn() - { - return $this->scale_in; - } - - /** - * Required. The utilization triggering the scale-in operation in percent. - * - * Generated from protobuf field int32 scale_in = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setScaleIn($var) - { - GPBUtil::checkInt32($var); - $this->scale_in = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Thresholds::class, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings_Thresholds::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php deleted file mode 100644 index c00a5b6ae2e1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster.php +++ /dev/null @@ -1,411 +0,0 @@ -google.cloud.vmwareengine.v1.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. State of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * - * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $management = false; - /** - * Optional. Configuration of the autoscaling applied to this cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings autoscaling_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscaling_settings = null; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - private $node_type_configs; - /** - * Optional. Configuration of a stretched cluster. Required for clusters that - * belong to a STRETCHED private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $stretched_cluster_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type int $state - * Output only. State of the resource. - * @type bool $management - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * @type \Google\Cloud\VmwareEngine\V1\AutoscalingSettings $autoscaling_settings - * Optional. Configuration of the autoscaling applied to this cluster. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type array|\Google\Protobuf\Internal\MapField $node_type_configs - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * @type \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $stretched_cluster_config - * Optional. Configuration of a stretched cluster. Required for clusters that - * belong to a STRETCHED private cloud. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * 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 this cluster. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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. State of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * - * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getManagement() - { - return $this->management; - } - - /** - * Output only. True if the cluster is a management cluster; false otherwise. - * There can only be one management cluster in a private cloud - * and it has to be the first one. - * - * Generated from protobuf field bool management = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setManagement($var) - { - GPBUtil::checkBool($var); - $this->management = $var; - - return $this; - } - - /** - * Optional. Configuration of the autoscaling applied to this cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings autoscaling_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\AutoscalingSettings|null - */ - public function getAutoscalingSettings() - { - return $this->autoscaling_settings; - } - - public function hasAutoscalingSettings() - { - return isset($this->autoscaling_settings); - } - - public function clearAutoscalingSettings() - { - unset($this->autoscaling_settings); - } - - /** - * Optional. Configuration of the autoscaling applied to this cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.AutoscalingSettings autoscaling_settings = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\AutoscalingSettings $var - * @return $this - */ - public function setAutoscalingSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\AutoscalingSettings::class); - $this->autoscaling_settings = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNodeTypeConfigs() - { - return $this->node_type_configs; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNodeTypeConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); - $this->node_type_configs = $arr; - - return $this; - } - - /** - * Optional. Configuration of a stretched cluster. Required for clusters that - * belong to a STRETCHED private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig|null - */ - public function getStretchedClusterConfig() - { - return $this->stretched_cluster_config; - } - - public function hasStretchedClusterConfig() - { - return isset($this->stretched_cluster_config); - } - - public function clearStretchedClusterConfig() - { - unset($this->stretched_cluster_config); - } - - /** - * Optional. Configuration of a stretched cluster. Required for clusters that - * belong to a STRETCHED private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $var - * @return $this - */ - public function setStretchedClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig::class); - $this->stretched_cluster_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php deleted file mode 100644 index d4cfba915406..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Cluster/State.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.vmwareengine.v1.Cluster.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Cluster is operational and can be used by the user. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The Cluster is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Adding or removing of a node to the cluster, any other cluster specific - * updates. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The Cluster is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The Cluster is undergoing maintenance, for example: a failed node is - * getting replaced. - * - * Generated from protobuf enum REPAIRING = 5; - */ - const REPAIRING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::REPAIRING => 'REPAIRING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Cluster_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php deleted file mode 100644 index 9194b7c095aa..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateClusterRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.vmwareengine.v1.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The initial description of the new cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. 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 = ''; - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The initial description of the new cluster. - * @param string $clusterId Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\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. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $cluster_id - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\Cluster $cluster - * Required. The initial description of the new cluster. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to create a new cluster - * in. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * This identifier must be unique among clusters within the parent and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * 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 initial description of the new cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The initial description of the new cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. 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. 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; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php deleted file mode 100644 index ca58f7c39894..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAccessRuleRequest.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest - */ -class CreateExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy - * to create a new external access firewall rule in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The initial description of a new external access rule. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_access_rule = null; - /** - * Required. The user-provided identifier of the `ExternalAccessRule` to be - * created. This identifier must be unique among `ExternalAccessRule` - * resources within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string external_access_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_access_rule_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the network policy - * to create a new external access firewall rule in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $externalAccessRule Required. The initial description of a new external access rule. - * @param string $externalAccessRuleId Required. The user-provided identifier of the `ExternalAccessRule` to be - * created. This identifier must be unique among `ExternalAccessRule` - * resources within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateExternalAccessRuleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $externalAccessRule, string $externalAccessRuleId): self - { - return (new self()) - ->setParent($parent) - ->setExternalAccessRule($externalAccessRule) - ->setExternalAccessRuleId($externalAccessRuleId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the network policy - * to create a new external access firewall rule in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * @type \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $external_access_rule - * Required. The initial description of a new external access rule. - * @type string $external_access_rule_id - * Required. The user-provided identifier of the `ExternalAccessRule` to be - * created. This identifier must be unique among `ExternalAccessRule` - * resources within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy - * to create a new external access firewall rule in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * 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 network policy - * to create a new external access firewall rule in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * 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 initial description of a new external access rule. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\ExternalAccessRule|null - */ - public function getExternalAccessRule() - { - return $this->external_access_rule; - } - - public function hasExternalAccessRule() - { - return isset($this->external_access_rule); - } - - public function clearExternalAccessRule() - { - unset($this->external_access_rule); - } - - /** - * Required. The initial description of a new external access rule. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $var - * @return $this - */ - public function setExternalAccessRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule::class); - $this->external_access_rule = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the `ExternalAccessRule` to be - * created. This identifier must be unique among `ExternalAccessRule` - * resources within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string external_access_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExternalAccessRuleId() - { - return $this->external_access_rule_id; - } - - /** - * Required. The user-provided identifier of the `ExternalAccessRule` to be - * created. This identifier must be unique among `ExternalAccessRule` - * resources within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string external_access_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExternalAccessRuleId($var) - { - GPBUtil::checkString($var, True); - $this->external_access_rule_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php deleted file mode 100644 index a21a6b76744f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateExternalAddressRequest.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmwareengine.v1.CreateExternalAddressRequest - */ -class CreateExternalAddressRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to create a new external IP address in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The initial description of a new external IP address. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_address = null; - /** - * Required. The user-provided identifier of the `ExternalAddress` to be - * created. This identifier must be unique among `ExternalAddress` resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string external_address_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_address_id = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. The resource name of the private cloud - * to create a new external IP address in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\ExternalAddress $externalAddress Required. The initial description of a new external IP address. - * @param string $externalAddressId Required. The user-provided identifier of the `ExternalAddress` to be - * created. This identifier must be unique among `ExternalAddress` resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateExternalAddressRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\ExternalAddress $externalAddress, string $externalAddressId): self - { - return (new self()) - ->setParent($parent) - ->setExternalAddress($externalAddress) - ->setExternalAddressId($externalAddressId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud - * to create a new external IP address in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type \Google\Cloud\VmwareEngine\V1\ExternalAddress $external_address - * Required. The initial description of a new external IP address. - * @type string $external_address_id - * Required. The user-provided identifier of the `ExternalAddress` to be - * created. This identifier must be unique among `ExternalAddress` resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to create a new external IP address in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud - * to create a new external IP address in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 initial description of a new external IP address. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\ExternalAddress|null - */ - public function getExternalAddress() - { - return $this->external_address; - } - - public function hasExternalAddress() - { - return isset($this->external_address); - } - - public function clearExternalAddress() - { - unset($this->external_address); - } - - /** - * Required. The initial description of a new external IP address. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\ExternalAddress $var - * @return $this - */ - public function setExternalAddress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); - $this->external_address = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the `ExternalAddress` to be - * created. This identifier must be unique among `ExternalAddress` resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string external_address_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExternalAddressId() - { - return $this->external_address_id; - } - - /** - * Required. The user-provided identifier of the `ExternalAddress` to be - * created. This identifier must be unique among `ExternalAddress` resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string external_address_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExternalAddressId($var) - { - GPBUtil::checkString($var, True); - $this->external_address_id = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php deleted file mode 100644 index 7e2526646b8d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateHcxActivationKeyRequest.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest - */ -class CreateHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hcx_activation_key = null; - /** - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hcx_activation_key_id = ''; - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * @param string $hcxActivationKeyId Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateHcxActivationKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcxActivationKey, string $hcxActivationKeyId): self - { - return (new self()) - ->setParent($parent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * @type \Google\Cloud\VmwareEngine\V1\HcxActivationKey $hcx_activation_key - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * @type string $hcx_activation_key_id - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type string $request_id - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * 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 private cloud to create the key for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * 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 initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\HcxActivationKey|null - */ - public function getHcxActivationKey() - { - return $this->hcx_activation_key; - } - - public function hasHcxActivationKey() - { - return isset($this->hcx_activation_key); - } - - public function clearHcxActivationKey() - { - unset($this->hcx_activation_key); - } - - /** - * Required. The initial description of a new HCX activation key. When - * creating a new key, this field must be an empty object. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\HcxActivationKey $var - * @return $this - */ - public function setHcxActivationKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); - $this->hcx_activation_key = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHcxActivationKeyId() - { - return $this->hcx_activation_key_id; - } - - /** - * Required. The user-provided identifier of the `HcxActivationKey` to be - * created. This identifier must be unique among `HcxActivationKey` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string hcx_activation_key_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHcxActivationKeyId($var) - { - GPBUtil::checkString($var, True); - $this->hcx_activation_key_id = $var; - - return $this; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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; - * @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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php deleted file mode 100644 index c3b6ecf53119..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateLoggingServerRequest.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.vmwareengine.v1.CreateLoggingServerRequest - */ -class CreateLoggingServerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to create a new Logging Server in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The initial description of a new logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $logging_server = null; - /** - * Required. The user-provided identifier of the `LoggingServer` to be - * created. This identifier must be unique among `LoggingServer` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $logging_server_id = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. The resource name of the private cloud - * to create a new Logging Server in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\LoggingServer $loggingServer Required. The initial description of a new logging server. - * @param string $loggingServerId Required. The user-provided identifier of the `LoggingServer` to be - * created. This identifier must be unique among `LoggingServer` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateLoggingServerRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\LoggingServer $loggingServer, string $loggingServerId): self - { - return (new self()) - ->setParent($parent) - ->setLoggingServer($loggingServer) - ->setLoggingServerId($loggingServerId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud - * to create a new Logging Server in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type \Google\Cloud\VmwareEngine\V1\LoggingServer $logging_server - * Required. The initial description of a new logging server. - * @type string $logging_server_id - * Required. The user-provided identifier of the `LoggingServer` to be - * created. This identifier must be unique among `LoggingServer` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to create a new Logging Server in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud - * to create a new Logging Server in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 initial description of a new logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\LoggingServer|null - */ - public function getLoggingServer() - { - return $this->logging_server; - } - - public function hasLoggingServer() - { - return isset($this->logging_server); - } - - public function clearLoggingServer() - { - unset($this->logging_server); - } - - /** - * Required. The initial description of a new logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\LoggingServer $var - * @return $this - */ - public function setLoggingServer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\LoggingServer::class); - $this->logging_server = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the `LoggingServer` to be - * created. This identifier must be unique among `LoggingServer` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLoggingServerId() - { - return $this->logging_server_id; - } - - /** - * Required. The user-provided identifier of the `LoggingServer` to be - * created. This identifier must be unique among `LoggingServer` resources - * within the parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string logging_server_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLoggingServerId($var) - { - GPBUtil::checkString($var, True); - $this->logging_server_id = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php deleted file mode 100644 index aa2ffc5ad336..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateManagementDnsZoneBindingRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest - */ -class CreateManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to create a new management DNS zone binding for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The initial values for a new management DNS zone binding. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $management_dns_zone_binding = null; - /** - * Required. The user-provided identifier of the `ManagementDnsZoneBinding` - * resource to be created. This identifier must be unique among - * `ManagementDnsZoneBinding` resources within the parent and becomes the - * final token in the name URI. The identifier must meet the following - * requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string management_dns_zone_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $management_dns_zone_binding_id = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. The resource name of the private cloud - * to create a new management DNS zone binding for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding Required. The initial values for a new management DNS zone binding. - * @param string $managementDnsZoneBindingId Required. The user-provided identifier of the `ManagementDnsZoneBinding` - * resource to be created. This identifier must be unique among - * `ManagementDnsZoneBinding` resources within the parent and becomes the - * final token in the name URI. The identifier must meet the following - * requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateManagementDnsZoneBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding, string $managementDnsZoneBindingId): self - { - return (new self()) - ->setParent($parent) - ->setManagementDnsZoneBinding($managementDnsZoneBinding) - ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the private cloud - * to create a new management DNS zone binding for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $management_dns_zone_binding - * Required. The initial values for a new management DNS zone binding. - * @type string $management_dns_zone_binding_id - * Required. The user-provided identifier of the `ManagementDnsZoneBinding` - * resource to be created. This identifier must be unique among - * `ManagementDnsZoneBinding` resources within the parent and becomes the - * final token in the name URI. The identifier must meet the following - * requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to create a new management DNS zone binding for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud - * to create a new management DNS zone binding for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 initial values for a new management DNS zone binding. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding|null - */ - public function getManagementDnsZoneBinding() - { - return $this->management_dns_zone_binding; - } - - public function hasManagementDnsZoneBinding() - { - return isset($this->management_dns_zone_binding); - } - - public function clearManagementDnsZoneBinding() - { - unset($this->management_dns_zone_binding); - } - - /** - * Required. The initial values for a new management DNS zone binding. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $var - * @return $this - */ - public function setManagementDnsZoneBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding::class); - $this->management_dns_zone_binding = $var; - - return $this; - } - - /** - * Required. The user-provided identifier of the `ManagementDnsZoneBinding` - * resource to be created. This identifier must be unique among - * `ManagementDnsZoneBinding` resources within the parent and becomes the - * final token in the name URI. The identifier must meet the following - * requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string management_dns_zone_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getManagementDnsZoneBindingId() - { - return $this->management_dns_zone_binding_id; - } - - /** - * Required. The user-provided identifier of the `ManagementDnsZoneBinding` - * resource to be created. This identifier must be unique among - * `ManagementDnsZoneBinding` resources within the parent and becomes the - * final token in the name URI. The identifier must meet the following - * requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string management_dns_zone_binding_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setManagementDnsZoneBindingId($var) - { - GPBUtil::checkString($var, True); - $this->management_dns_zone_binding_id = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php deleted file mode 100644 index f7c7bb305194..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPeeringRequest.php +++ /dev/null @@ -1,308 +0,0 @@ -google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest - */ -class CreateNetworkPeeringRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to create the new network - * peering in. This value is always `global`, because `NetworkPeering` is a - * global resource. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new `NetworkPeering`. - * This identifier must be unique among `NetworkPeering` resources within the - * parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_peering_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_peering_id = ''; - /** - * Required. The initial description of the new network peering. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_peering = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. The resource name of the location to create the new network - * peering in. This value is always `global`, because `NetworkPeering` is a - * global resource. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\NetworkPeering $networkPeering Required. The initial description of the new network peering. - * @param string $networkPeeringId Required. The user-provided identifier of the new `NetworkPeering`. - * This identifier must be unique among `NetworkPeering` resources within the - * parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateNetworkPeeringRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\NetworkPeering $networkPeering, string $networkPeeringId): self - { - return (new self()) - ->setParent($parent) - ->setNetworkPeering($networkPeering) - ->setNetworkPeeringId($networkPeeringId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to create the new network - * peering in. This value is always `global`, because `NetworkPeering` is a - * global resource. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * @type string $network_peering_id - * Required. The user-provided identifier of the new `NetworkPeering`. - * This identifier must be unique among `NetworkPeering` resources within the - * parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\NetworkPeering $network_peering - * Required. The initial description of the new network peering. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to create the new network - * peering in. This value is always `global`, because `NetworkPeering` is a - * global resource. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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 name of the location to create the new network - * peering in. This value is always `global`, because `NetworkPeering` is a - * global resource. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new `NetworkPeering`. - * This identifier must be unique among `NetworkPeering` resources within the - * parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_peering_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkPeeringId() - { - return $this->network_peering_id; - } - - /** - * Required. The user-provided identifier of the new `NetworkPeering`. - * This identifier must be unique among `NetworkPeering` resources within the - * parent and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_peering_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkPeeringId($var) - { - GPBUtil::checkString($var, True); - $this->network_peering_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new network peering. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPeering|null - */ - public function getNetworkPeering() - { - return $this->network_peering; - } - - public function hasNetworkPeering() - { - return isset($this->network_peering); - } - - public function clearNetworkPeering() - { - unset($this->network_peering); - } - - /** - * Required. The initial description of the new network peering. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPeering $var - * @return $this - */ - public function setNetworkPeering($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering::class); - $this->network_peering = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php deleted file mode 100644 index de757cee24d1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateNetworkPolicyRequest.php +++ /dev/null @@ -1,318 +0,0 @@ -google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest - */ -class CreateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_policy_id = ''; - /** - * Required. The network policy configuration to use in the request. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_policy = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. The network policy configuration to use in the request. - * @param string $networkPolicyId Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateNetworkPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, string $networkPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setNetworkPolicy($networkPolicy) - ->setNetworkPolicyId($networkPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * @type string $network_policy_id - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy - * Required. The network policy configuration to use in the request. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * - * 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 location (region) - * to create the new network policy in. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1` - * - * 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-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetworkPolicyId() - { - return $this->network_policy_id; - } - - /** - * Required. The user-provided identifier of the network policy to be created. - * This identifier must be unique within parent - * `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes - * the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string network_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetworkPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->network_policy_id = $var; - - return $this; - } - - /** - * Required. The network policy configuration to use in the request. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null - */ - public function getNetworkPolicy() - { - return $this->network_policy; - } - - public function hasNetworkPolicy() - { - return isset($this->network_policy); - } - - public function clearNetworkPolicy() - { - unset($this->network_policy); - } - - /** - * Required. The network policy configuration to use in the request. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var - * @return $this - */ - public function setNetworkPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); - $this->network_policy = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php deleted file mode 100644 index 4b306cdb6911..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateCloudRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.vmwareengine.v1.CreatePrivateCloudRequest - */ -class CreatePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_cloud_id = ''; - /** - * Required. The initial description of the new private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_cloud = null; - /** - * Optional. 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 = ''; - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param string $parent Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud Required. The initial description of the new private cloud. - * @param string $privateCloudId Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreatePrivateCloudRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, string $privateCloudId): self - { - return (new self()) - ->setParent($parent) - ->setPrivateCloud($privateCloud) - ->setPrivateCloudId($privateCloudId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @type string $private_cloud_id - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud - * Required. The initial description of the new private cloud. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that zero - * UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * 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 location to create the new - * private cloud in. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * 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-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPrivateCloudId() - { - return $this->private_cloud_id; - } - - /** - * Required. The user-provided identifier of the private cloud to be created. - * This identifier must be unique among each `PrivateCloud` within the parent - * and becomes the final token in the name URI. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_cloud_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPrivateCloudId($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - public function hasPrivateCloud() - { - return isset($this->private_cloud); - } - - public function clearPrivateCloud() - { - unset($this->private_cloud); - } - - /** - * Required. The initial description of the new private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. 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. 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; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php deleted file mode 100644 index a86804b320b0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreatePrivateConnectionRequest.php +++ /dev/null @@ -1,308 +0,0 @@ -google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest - */ -class CreatePrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to create the new private - * connection in. Private connection is a regional resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user-provided identifier of the new private connection. - * This identifier must be unique among private connection resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_connection_id = ''; - /** - * Required. The initial description of the new private connection. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_connection = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. The resource name of the location to create the new private - * connection in. Private connection is a regional resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-central1` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\PrivateConnection $privateConnection Required. The initial description of the new private connection. - * @param string $privateConnectionId Required. The user-provided identifier of the new private connection. - * This identifier must be unique among private connection resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreatePrivateConnectionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\PrivateConnection $privateConnection, string $privateConnectionId): self - { - return (new self()) - ->setParent($parent) - ->setPrivateConnection($privateConnection) - ->setPrivateConnectionId($privateConnectionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to create the new private - * connection in. Private connection is a regional resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-central1` - * @type string $private_connection_id - * Required. The user-provided identifier of the new private connection. - * This identifier must be unique among private connection resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\PrivateConnection $private_connection - * Required. The initial description of the new private connection. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to create the new private - * connection in. Private connection is a regional resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-central1` - * - * 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 location to create the new private - * connection in. Private connection is a regional resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-central1` - * - * 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-provided identifier of the new private connection. - * This identifier must be unique among private connection resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPrivateConnectionId() - { - return $this->private_connection_id; - } - - /** - * Required. The user-provided identifier of the new private connection. - * This identifier must be unique among private connection resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPrivateConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->private_connection_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new private connection. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateConnection|null - */ - public function getPrivateConnection() - { - return $this->private_connection; - } - - public function hasPrivateConnection() - { - return isset($this->private_connection); - } - - public function clearPrivateConnection() - { - unset($this->private_connection); - } - - /** - * Required. The initial description of the new private connection. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateConnection $var - * @return $this - */ - public function setPrivateConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection::class); - $this->private_connection = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php deleted file mode 100644 index ba26cffddd41..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/CreateVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,333 +0,0 @@ -google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest - */ -class CreateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vmware_engine_network_id = ''; - /** - * Required. The initial description of the new VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vmware_engine_network = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. The initial description of the new VMware Engine network. - * @param string $vmwareEngineNetworkId Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * @return \Google\Cloud\VmwareEngine\V1\CreateVmwareEngineNetworkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, string $vmwareEngineNetworkId): self - { - return (new self()) - ->setParent($parent) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global` - * @type string $vmware_engine_network_id - * Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network - * Required. The initial description of the new VMware Engine network. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. 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 name of the location to create the new VMware Engine - * network in. A VMware Engine network of type - * `LEGACY` is a regional resource, and a VMware - * Engine network of type `STANDARD` is a global resource. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. 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. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVmwareEngineNetworkId() - { - return $this->vmware_engine_network_id; - } - - /** - * Required. The user-provided identifier of the new VMware Engine network. - * This identifier must be unique among VMware Engine network resources - * within the parent and becomes the final token in the name URI. The - * identifier must meet the following requirements: - * * For networks of type LEGACY, adheres to the format: - * `{region-id}-default`. Replace `{region-id}` with the region where you want - * to create the VMware Engine network. For example, "us-central1-default". - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) - * (section 3.5) - * - * Generated from protobuf field string vmware_engine_network_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkId($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_id = $var; - - return $this; - } - - /** - * Required. The initial description of the new VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - public function hasVmwareEngineNetwork() - { - return isset($this->vmware_engine_network); - } - - public function clearVmwareEngineNetwork() - { - unset($this->vmware_engine_network); - } - - /** - * Required. The initial description of the new VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php deleted file mode 100644 index 262d839c299f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Credentials.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmwareengine.v1.Credentials - */ -class Credentials extends \Google\Protobuf\Internal\Message -{ - /** - * Initial username. - * - * Generated from protobuf field string username = 1; - */ - protected $username = ''; - /** - * Initial password. - * - * Generated from protobuf field string password = 2; - */ - protected $password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * Initial username. - * @type string $password - * Initial password. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Initial username. - * - * Generated from protobuf field string username = 1; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Initial username. - * - * Generated from protobuf field string username = 1; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Initial password. - * - * Generated from protobuf field string password = 2; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Initial password. - * - * Generated from protobuf field string password = 2; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php deleted file mode 100644 index 9338e958e48b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteClusterRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. 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 resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\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. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @type string $request_id - * Optional. 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the cluster to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. 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. 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php deleted file mode 100644 index 0b810d04d2e5..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAccessRuleRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest - */ -class DeleteExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the external access firewall rule to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the external access firewall rule to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * Please see {@see VmwareEngineClient::externalAccessRuleName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteExternalAccessRuleRequest - * - * @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 external access firewall rule to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the external access firewall rule to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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 external access firewall rule to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php deleted file mode 100644 index 1c37bf2f2a3d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteExternalAddressRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteExternalAddressRequest - */ -class DeleteExternalAddressRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the external IP address to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the external IP address to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * Please see {@see VmwareEngineClient::externalAddressName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteExternalAddressRequest - * - * @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 external IP address to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the external IP address to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * - * 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 external IP address to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php deleted file mode 100644 index ed81af1f5072..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteLoggingServerRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteLoggingServerRequest - */ -class DeleteLoggingServerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the logging server to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the logging server to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * Please see {@see VmwareEngineClient::loggingServerName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteLoggingServerRequest - * - * @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 logging server to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the logging server to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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 logging server to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php deleted file mode 100644 index 492d3b27efff..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteManagementDnsZoneBindingRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest - */ -class DeleteManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the management DNS zone binding to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the management DNS zone binding to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteManagementDnsZoneBindingRequest - * - * @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 management DNS zone binding to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the management DNS zone binding to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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 management DNS zone binding to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if the original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php deleted file mode 100644 index 1e47b474ef77..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPeeringRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest - */ -class DeleteNetworkPeeringRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network peering to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the network peering to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteNetworkPeeringRequest - * - * @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 network peering to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network peering to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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 network peering to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php deleted file mode 100644 index 557ee72de847..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteNetworkPolicyRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest - */ -class DeleteNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteNetworkPolicyRequest - * - * @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 network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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 network policy to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php deleted file mode 100644 index 4421609c05c7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateCloudRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.vmwareengine.v1.DeletePrivateCloudRequest - */ -class DeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. 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, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - /** - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * - * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delay_hours = null; - - /** - * @param string $name Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeletePrivateCloudRequest - * - * @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 private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. 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, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * @type int $delay_hours - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to delete. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 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. 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, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * - * 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, cascade delete is enabled and all children of - * this private cloud resource are also deleted. When this flag is set to - * false, the private cloud will not be deleted if there are any children - * other than the management cluster. The management cluster is always - * deleted. - * - * 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; - } - - /** - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * - * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDelayHours() - { - return isset($this->delay_hours) ? $this->delay_hours : 0; - } - - public function hasDelayHours() - { - return isset($this->delay_hours); - } - - public function clearDelayHours() - { - unset($this->delay_hours); - } - - /** - * Optional. Time delay of the deletion specified in hours. The default value - * is `3`. Specifying a non-zero value for this field changes the value of - * `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned - * deletion time. Deletion can be cancelled before `expire_time` elapses using - * [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]. - * Specifying a value of `0` for this field instead begins the deletion - * process and ceases billing immediately. During the final deletion process, - * the value of `PrivateCloud.state` becomes `PURGING`. - * - * Generated from protobuf field optional int32 delay_hours = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDelayHours($var) - { - GPBUtil::checkInt32($var); - $this->delay_hours = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php deleted file mode 100644 index 58bb810feba2..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeletePrivateConnectionRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest - */ -class DeletePrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private connection to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource name of the private connection to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeletePrivateConnectionRequest - * - * @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 private connection to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private connection to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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 private connection to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php deleted file mode 100644 index 27b7a9e393f0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DeleteVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest - */ -class DeleteVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\DeleteVmwareEngineNetworkRequest - * - * @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 VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 string $etag - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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 VMware Engine network to be deleted. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. Checksum used to ensure that the user-provided value is up to - * date before the server processes the request. The server compares provided - * checksum with the current checksum of the resource. If the user-provided - * value is out of date, this request returns an `ABORTED` error. - * - * Generated from protobuf field string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php deleted file mode 100644 index 64797809c801..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsBindPermission.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.vmwareengine.v1.DnsBindPermission - */ -class DnsBindPermission extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Output only. The name of the resource which stores the - * users/service accounts having the permission to bind to the corresponding - * intranet VPC of the consumer project. DnsBindPermission is a global - * resource and location can only be global. Resource names are schemeless - * URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Users/Service accounts which have access for binding on the - * intranet VPC project corresponding to the consumer project. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Principal principals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $principals; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Output only. The name of the resource which stores the - * users/service accounts having the permission to bind to the corresponding - * intranet VPC of the consumer project. DnsBindPermission is a global - * resource and location can only be global. Resource names are schemeless - * URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * @type array<\Google\Cloud\VmwareEngine\V1\Principal>|\Google\Protobuf\Internal\RepeatedField $principals - * Output only. Users/Service accounts which have access for binding on the - * intranet VPC project corresponding to the consumer project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Output only. The name of the resource which stores the - * users/service accounts having the permission to bind to the corresponding - * intranet VPC of the consumer project. DnsBindPermission is a global - * resource and location can only be global. Resource names are schemeless - * URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Output only. The name of the resource which stores the - * users/service accounts having the permission to bind to the corresponding - * intranet VPC of the consumer project. DnsBindPermission is a global - * resource and location can only be global. Resource names are schemeless - * URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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. Users/Service accounts which have access for binding on the - * intranet VPC project corresponding to the consumer project. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Principal principals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrincipals() - { - return $this->principals; - } - - /** - * Output only. Users/Service accounts which have access for binding on the - * intranet VPC project corresponding to the consumer project. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Principal principals = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VmwareEngine\V1\Principal>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Principal::class); - $this->principals = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php deleted file mode 100644 index d21001a105d9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.vmwareengine.v1.DnsForwarding - */ -class DnsForwarding extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this DNS profile. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. List of domain mappings to configure - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule forwarding_rules = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $forwarding_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this DNS profile. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type array<\Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule>|\Google\Protobuf\Internal\RepeatedField $forwarding_rules - * Required. List of domain mappings to configure - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this DNS profile. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * - * 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 this DNS profile. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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. List of domain mappings to configure - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule forwarding_rules = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getForwardingRules() - { - return $this->forwarding_rules; - } - - /** - * Required. List of domain mappings to configure - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule forwarding_rules = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setForwardingRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\DnsForwarding\ForwardingRule::class); - $this->forwarding_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php deleted file mode 100644 index efb832d58e91..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/DnsForwarding/ForwardingRule.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule - */ -class ForwardingRule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Domain used to resolve a `name_servers` list. - * - * Generated from protobuf field string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain = ''; - /** - * Required. List of DNS servers to use for domain resolution - * - * Generated from protobuf field repeated string name_servers = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $name_servers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $domain - * Required. Domain used to resolve a `name_servers` list. - * @type array|\Google\Protobuf\Internal\RepeatedField $name_servers - * Required. List of DNS servers to use for domain resolution - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Domain used to resolve a `name_servers` list. - * - * Generated from protobuf field string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Required. Domain used to resolve a `name_servers` list. - * - * Generated from protobuf field string domain = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * Required. List of DNS servers to use for domain resolution - * - * Generated from protobuf field repeated string name_servers = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNameServers() - { - return $this->name_servers; - } - - /** - * Required. List of DNS servers to use for domain resolution - * - * Generated from protobuf field repeated string name_servers = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNameServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->name_servers = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ForwardingRule::class, \Google\Cloud\VmwareEngine\V1\DnsForwarding_ForwardingRule::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php deleted file mode 100644 index 3df395f4ba3b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule.php +++ /dev/null @@ -1,620 +0,0 @@ -google.cloud.vmwareengine.v1.ExternalAccessRule - */ -class ExternalAccessRule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this external access rule. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-provided description for this external access rule. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * External access rule priority, which determines the external access rule to - * use when multiple rules apply. If multiple rules have the same priority, - * their ordering is non-deterministic. If specific ordering is required, - * assign unique priorities to enforce such ordering. The external access rule - * priority is an integer from 100 to 4096, both inclusive. Lower integers - * indicate higher precedence. For example, a rule with priority `100` has - * higher precedence than a rule with priority `101`. - * - * Generated from protobuf field int32 priority = 6; - */ - protected $priority = 0; - /** - * The action that the external access rule performs. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.Action action = 7; - */ - protected $action = 0; - /** - * The IP protocol to which the external access rule applies. This value can - * be one of the following three protocol strings (not case-sensitive): - * `tcp`, `udp`, or `icmp`. - * - * Generated from protobuf field string ip_protocol = 8; - */ - protected $ip_protocol = ''; - /** - * If source ranges are specified, the external access rule applies only to - * traffic that has a source IP address in these ranges. These ranges can - * either be expressed in the CIDR format or as an IP address. As only inbound - * rules are supported, `ExternalAddress` resources cannot be the source IP - * addresses of an external access rule. To match all source addresses, - * specify `0.0.0.0/0`. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange source_ip_ranges = 9; - */ - private $source_ip_ranges; - /** - * A list of source ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify - * `["0-65535"]`. - * - * Generated from protobuf field repeated string source_ports = 10; - */ - private $source_ports; - /** - * If destination ranges are specified, the external access rule applies only - * to the traffic that has a destination IP address in these ranges. The - * specified IP addresses must have reserved external IP addresses in the - * scope of the parent network policy. To match all external IP addresses in - * the scope of the parent network policy, specify `0.0.0.0/0`. To match a - * specific external IP address, specify it using the - * `IpRange.external_address` property. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange destination_ip_ranges = 11; - */ - private $destination_ip_ranges; - /** - * A list of destination ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, - * specify `["0-65535"]`. - * - * Generated from protobuf field repeated string destination_ports = 12; - */ - private $destination_ports; - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this external access rule. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $description - * User-provided description for this external access rule. - * @type int $priority - * External access rule priority, which determines the external access rule to - * use when multiple rules apply. If multiple rules have the same priority, - * their ordering is non-deterministic. If specific ordering is required, - * assign unique priorities to enforce such ordering. The external access rule - * priority is an integer from 100 to 4096, both inclusive. Lower integers - * indicate higher precedence. For example, a rule with priority `100` has - * higher precedence than a rule with priority `101`. - * @type int $action - * The action that the external access rule performs. - * @type string $ip_protocol - * The IP protocol to which the external access rule applies. This value can - * be one of the following three protocol strings (not case-sensitive): - * `tcp`, `udp`, or `icmp`. - * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $source_ip_ranges - * If source ranges are specified, the external access rule applies only to - * traffic that has a source IP address in these ranges. These ranges can - * either be expressed in the CIDR format or as an IP address. As only inbound - * rules are supported, `ExternalAddress` resources cannot be the source IP - * addresses of an external access rule. To match all source addresses, - * specify `0.0.0.0/0`. - * @type array|\Google\Protobuf\Internal\RepeatedField $source_ports - * A list of source ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify - * `["0-65535"]`. - * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $destination_ip_ranges - * If destination ranges are specified, the external access rule applies only - * to the traffic that has a destination IP address in these ranges. The - * specified IP addresses must have reserved external IP addresses in the - * scope of the parent network policy. To match all external IP addresses in - * the scope of the parent network policy, specify `0.0.0.0/0`. To match a - * specific external IP address, specify it using the - * `IpRange.external_address` property. - * @type array|\Google\Protobuf\Internal\RepeatedField $destination_ports - * A list of destination ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, - * specify `["0-65535"]`. - * @type int $state - * Output only. The state of the resource. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this external access rule. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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 this external access rule. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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; - } - - /** - * User-provided description for this external access rule. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this external access rule. - * - * 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; - } - - /** - * External access rule priority, which determines the external access rule to - * use when multiple rules apply. If multiple rules have the same priority, - * their ordering is non-deterministic. If specific ordering is required, - * assign unique priorities to enforce such ordering. The external access rule - * priority is an integer from 100 to 4096, both inclusive. Lower integers - * indicate higher precedence. For example, a rule with priority `100` has - * higher precedence than a rule with priority `101`. - * - * Generated from protobuf field int32 priority = 6; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * External access rule priority, which determines the external access rule to - * use when multiple rules apply. If multiple rules have the same priority, - * their ordering is non-deterministic. If specific ordering is required, - * assign unique priorities to enforce such ordering. The external access rule - * priority is an integer from 100 to 4096, both inclusive. Lower integers - * indicate higher precedence. For example, a rule with priority `100` has - * higher precedence than a rule with priority `101`. - * - * Generated from protobuf field int32 priority = 6; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * The action that the external access rule performs. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.Action action = 7; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * The action that the external access rule performs. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.Action action = 7; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\Action::class); - $this->action = $var; - - return $this; - } - - /** - * The IP protocol to which the external access rule applies. This value can - * be one of the following three protocol strings (not case-sensitive): - * `tcp`, `udp`, or `icmp`. - * - * Generated from protobuf field string ip_protocol = 8; - * @return string - */ - public function getIpProtocol() - { - return $this->ip_protocol; - } - - /** - * The IP protocol to which the external access rule applies. This value can - * be one of the following three protocol strings (not case-sensitive): - * `tcp`, `udp`, or `icmp`. - * - * Generated from protobuf field string ip_protocol = 8; - * @param string $var - * @return $this - */ - public function setIpProtocol($var) - { - GPBUtil::checkString($var, True); - $this->ip_protocol = $var; - - return $this; - } - - /** - * If source ranges are specified, the external access rule applies only to - * traffic that has a source IP address in these ranges. These ranges can - * either be expressed in the CIDR format or as an IP address. As only inbound - * rules are supported, `ExternalAddress` resources cannot be the source IP - * addresses of an external access rule. To match all source addresses, - * specify `0.0.0.0/0`. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange source_ip_ranges = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSourceIpRanges() - { - return $this->source_ip_ranges; - } - - /** - * If source ranges are specified, the external access rule applies only to - * traffic that has a source IP address in these ranges. These ranges can - * either be expressed in the CIDR format or as an IP address. As only inbound - * rules are supported, `ExternalAddress` resources cannot be the source IP - * addresses of an external access rule. To match all source addresses, - * specify `0.0.0.0/0`. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange source_ip_ranges = 9; - * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSourceIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange::class); - $this->source_ip_ranges = $arr; - - return $this; - } - - /** - * A list of source ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify - * `["0-65535"]`. - * - * Generated from protobuf field repeated string source_ports = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSourcePorts() - { - return $this->source_ports; - } - - /** - * A list of source ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify - * `["0-65535"]`. - * - * Generated from protobuf field repeated string source_ports = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSourcePorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->source_ports = $arr; - - return $this; - } - - /** - * If destination ranges are specified, the external access rule applies only - * to the traffic that has a destination IP address in these ranges. The - * specified IP addresses must have reserved external IP addresses in the - * scope of the parent network policy. To match all external IP addresses in - * the scope of the parent network policy, specify `0.0.0.0/0`. To match a - * specific external IP address, specify it using the - * `IpRange.external_address` property. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange destination_ip_ranges = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinationIpRanges() - { - return $this->destination_ip_ranges; - } - - /** - * If destination ranges are specified, the external access rule applies only - * to the traffic that has a destination IP address in these ranges. The - * specified IP addresses must have reserved external IP addresses in the - * scope of the parent network policy. To match all external IP addresses in - * the scope of the parent network policy, specify `0.0.0.0/0`. To match a - * specific external IP address, specify it using the - * `IpRange.external_address` property. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange destination_ip_ranges = 11; - * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinationIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\IpRange::class); - $this->destination_ip_ranges = $arr; - - return $this; - } - - /** - * A list of destination ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, - * specify `["0-65535"]`. - * - * Generated from protobuf field repeated string destination_ports = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinationPorts() - { - return $this->destination_ports; - } - - /** - * A list of destination ports to which the external access rule applies. This - * field is only applicable for the UDP or TCP protocol. - * Each entry must be either an integer or a range. For example: `["22"]`, - * `["80","443"]`, or `["12345-12349"]`. To match all destination ports, - * specify `["0-65535"]`. - * - * Generated from protobuf field repeated string destination_ports = 12; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinationPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->destination_ports = $arr; - - return $this; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php deleted file mode 100644 index 550c0dc3422f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/Action.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.vmwareengine.v1.ExternalAccessRule.Action - */ -class Action -{ - /** - * Defaults to allow. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Allows connections that match the other specified components. - * - * Generated from protobuf enum ALLOW = 1; - */ - const ALLOW = 1; - /** - * Blocks connections that match the other specified components. - * - * Generated from protobuf enum DENY = 2; - */ - const DENY = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::ALLOW => 'ALLOW', - self::DENY => 'DENY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Action::class, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule_Action::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php deleted file mode 100644 index efa4769037ad..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/IpRange.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange - */ -class IpRange extends \Google\Protobuf\Internal\Message -{ - protected $ip_range; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * A single IP address. For example: `10.0.0.5`. - * @type string $ip_address_range - * An IP address range in the CIDR format. For example: `10.0.0.0/24`. - * @type string $external_address - * The name of an `ExternalAddress` resource. The external address must - * have been reserved in the scope of this external access rule's parent - * network policy. Provide the external address name in the form of - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * A single IP address. For example: `10.0.0.5`. - * - * Generated from protobuf field string ip_address = 1; - * @return string - */ - public function getIpAddress() - { - return $this->readOneof(1); - } - - public function hasIpAddress() - { - return $this->hasOneof(1); - } - - /** - * A single IP address. For example: `10.0.0.5`. - * - * Generated from protobuf field string ip_address = 1; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An IP address range in the CIDR format. For example: `10.0.0.0/24`. - * - * Generated from protobuf field string ip_address_range = 2; - * @return string - */ - public function getIpAddressRange() - { - return $this->readOneof(2); - } - - public function hasIpAddressRange() - { - return $this->hasOneof(2); - } - - /** - * An IP address range in the CIDR format. For example: `10.0.0.0/24`. - * - * Generated from protobuf field string ip_address_range = 2; - * @param string $var - * @return $this - */ - public function setIpAddressRange($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The name of an `ExternalAddress` resource. The external address must - * have been reserved in the scope of this external access rule's parent - * network policy. Provide the external address name in the form of - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`. - * - * Generated from protobuf field string external_address = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getExternalAddress() - { - return $this->readOneof(3); - } - - public function hasExternalAddress() - { - return $this->hasOneof(3); - } - - /** - * The name of an `ExternalAddress` resource. The external address must - * have been reserved in the scope of this external access rule's parent - * network policy. Provide the external address name in the form of - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`. - * - * Generated from protobuf field string external_address = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setExternalAddress($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getIpRange() - { - return $this->whichOneof("ip_range"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IpRange::class, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule_IpRange::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php deleted file mode 100644 index 1b9722eda691..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAccessRule/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.ExternalAccessRule.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; - /** - * The rule is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The rule is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The rule is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The rule is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php deleted file mode 100644 index 8d15877850b6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress.php +++ /dev/null @@ -1,342 +0,0 @@ -google.cloud.vmwareengine.v1.ExternalAddress - */ -class ExternalAddress extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this external IP address. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The internal IP address of a workload VM. - * - * Generated from protobuf field string internal_ip = 6; - */ - protected $internal_ip = ''; - /** - * Output only. The external IP address of a workload VM. - * - * Generated from protobuf field string external_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $external_ip = ''; - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * User-provided description for this resource. - * - * Generated from protobuf field string description = 11; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this external IP address. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $internal_ip - * The internal IP address of a workload VM. - * @type string $external_ip - * Output only. The external IP address of a workload VM. - * @type int $state - * Output only. The state of the resource. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $description - * User-provided description for this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this external IP address. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` - * - * 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 this external IP address. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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; - } - - /** - * The internal IP address of a workload VM. - * - * Generated from protobuf field string internal_ip = 6; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * The internal IP address of a workload VM. - * - * Generated from protobuf field string internal_ip = 6; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Output only. The external IP address of a workload VM. - * - * Generated from protobuf field string external_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * Output only. The external IP address of a workload VM. - * - * Generated from protobuf field string external_ip = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ExternalAddress\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * User-provided description for this resource. - * - * Generated from protobuf field string description = 11; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this resource. - * - * Generated from protobuf field string description = 11; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php deleted file mode 100644 index 97dea9cbf984..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ExternalAddress/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.ExternalAddress.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The address is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The address is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The address is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The address is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\ExternalAddress_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php deleted file mode 100644 index 33a7dc9f663b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest - */ -class FetchNetworkPolicyExternalAddressesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy to query for assigned - * external IP addresses. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * Generated from protobuf field string network_policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network_policy = ''; - /** - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous - * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the - * subsequent page. - * When paginating, all parameters provided to - * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and - * `page_token`, must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $networkPolicy Required. The resource name of the network policy to query for assigned - * external IP addresses. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\FetchNetworkPolicyExternalAddressesRequest - * - * @experimental - */ - public static function build(string $networkPolicy): self - { - return (new self()) - ->setNetworkPolicy($networkPolicy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network_policy - * Required. The resource name of the network policy to query for assigned - * external IP addresses. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * @type int $page_size - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous - * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the - * subsequent page. - * When paginating, all parameters provided to - * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and - * `page_token`, must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy to query for assigned - * external IP addresses. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * Generated from protobuf field string network_policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetworkPolicy() - { - return $this->network_policy; - } - - /** - * Required. The resource name of the network policy to query for assigned - * external IP addresses. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * Generated from protobuf field string network_policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetworkPolicy($var) - { - GPBUtil::checkString($var, True); - $this->network_policy = $var; - - return $this; - } - - /** - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 - * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the - * subsequent page. - * When paginating, all parameters provided to - * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and - * `page_token`, 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 - * `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the - * subsequent page. - * When paginating, all parameters provided to - * `FetchNetworkPolicyExternalAddresses`, except for `page_size` and - * `page_token`, 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php deleted file mode 100644 index 46faea61006d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/FetchNetworkPolicyExternalAddressesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse - */ -class FetchNetworkPolicyExternalAddressesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of external IP addresses assigned to VMware workload VMs within the - * scope of the given network policy. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; - */ - private $external_addresses; - /** - * 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 array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $external_addresses - * A list of external IP addresses assigned to VMware workload VMs within the - * scope of the given network policy. - * @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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of external IP addresses assigned to VMware workload VMs within the - * scope of the given network policy. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExternalAddresses() - { - return $this->external_addresses; - } - - /** - * A list of external IP addresses assigned to VMware workload VMs within the - * scope of the given network policy. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExternalAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); - $this->external_addresses = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php deleted file mode 100644 index 765ce8ca31d1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetClusterRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\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. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The cluster resource name to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php deleted file mode 100644 index b198700ee8da..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsBindPermissionRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest - */ -class GetDnsBindPermissionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetDnsBindPermissionRequest - * - * @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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php deleted file mode 100644 index 6b6e94423647..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetDnsForwardingRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetDnsForwardingRequest - */ -class GetDnsForwardingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of a `DnsForwarding` to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * - * 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 a `DnsForwarding` to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * Please see {@see VmwareEngineClient::dnsForwardingName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetDnsForwardingRequest - * - * @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 a `DnsForwarding` to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of a `DnsForwarding` to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * - * 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 a `DnsForwarding` to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php deleted file mode 100644 index 4d0397c9063e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAccessRuleRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest - */ -class GetExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the external access firewall rule to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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 external access firewall rule to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * Please see {@see VmwareEngineClient::externalAccessRuleName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetExternalAccessRuleRequest - * - * @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 external access firewall rule to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the external access firewall rule to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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 external access firewall rule to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php deleted file mode 100644 index d75f2f69ca54..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetExternalAddressRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetExternalAddressRequest - */ -class GetExternalAddressRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the external IP address to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * - * 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 external IP address to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * Please see {@see VmwareEngineClient::externalAddressName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetExternalAddressRequest - * - * @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 external IP address to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the external IP address to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * - * 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 external IP address to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php deleted file mode 100644 index d561638f4a50..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetHcxActivationKeyRequest.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest - */ -class GetHcxActivationKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * 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 HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * Please see {@see VmwareEngineClient::hcxActivationKeyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetHcxActivationKeyRequest - * - * @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 HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * 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 HCX activation key to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php deleted file mode 100644 index ad4278ca8c84..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetLoggingServerRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetLoggingServerRequest - */ -class GetLoggingServerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Logging Server to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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 Logging Server to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * Please see {@see VmwareEngineClient::loggingServerName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetLoggingServerRequest - * - * @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 Logging Server to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Logging Server to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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 Logging Server to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php deleted file mode 100644 index f9dbac4170c3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetManagementDnsZoneBindingRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest - */ -class GetManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the management DNS zone binding to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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 management DNS zone binding to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetManagementDnsZoneBindingRequest - * - * @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 management DNS zone binding to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the management DNS zone binding to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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 management DNS zone binding to - * retrieve. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php deleted file mode 100644 index 51572fd7732f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPeeringRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetNetworkPeeringRequest - */ -class GetNetworkPeeringRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network peering to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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 network peering to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetNetworkPeeringRequest - * - * @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 network peering to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network peering to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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 network peering to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php deleted file mode 100644 index ca390af59e74..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNetworkPolicyRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetNetworkPolicyRequest - */ -class GetNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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 network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetNetworkPolicyRequest - * - * @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 network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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 network policy to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php deleted file mode 100644 index 823d63726078..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vmwareengine.v1.GetNodeRequest - */ -class GetNodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the node to retrieve. - * For example: - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` - * - * 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 node to retrieve. - * For example: - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` - * Please see {@see VmwareEngineClient::nodeName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetNodeRequest - * - * @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 node to retrieve. - * For example: - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the node to retrieve. - * For example: - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` - * - * 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 node to retrieve. - * For example: - * `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php deleted file mode 100644 index a117aa736a7c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetNodeTypeRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetNodeTypeRequest - */ -class GetNodeTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * 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 node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * Please see {@see VmwareEngineClient::nodeTypeName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetNodeTypeRequest - * - * @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 node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * 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 node type to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php deleted file mode 100644 index 16b916600d36..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateCloudRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetPrivateCloudRequest - */ -class GetPrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetPrivateCloudRequest - * - * @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 private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php deleted file mode 100644 index 2ca419dbafd6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetPrivateConnectionRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetPrivateConnectionRequest - */ -class GetPrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private connection to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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 private connection to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetPrivateConnectionRequest - * - * @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 private connection to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private connection to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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 private connection to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php deleted file mode 100644 index 657585bb0c76..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetSubnetRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetSubnetRequest - */ -class GetSubnetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the subnet to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * 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 subnet to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * Please see {@see VmwareEngineClient::subnetName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetSubnetRequest - * - * @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 subnet to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the subnet to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * 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 subnet to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php deleted file mode 100644 index d9f69bd5c370..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GetVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest - */ -class GetVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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 VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * Please see {@see VmwareEngineClient::vmwareEngineNetworkName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\GetVmwareEngineNetworkRequest - * - * @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 VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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 VMware Engine network to retrieve. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php deleted file mode 100644 index b3fa012f224f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/GrantDnsBindPermissionRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest - */ -class GrantDnsBindPermissionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $principal = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\Principal $principal Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * @return \Google\Cloud\VmwareEngine\V1\GrantDnsBindPermissionRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\VmwareEngine\V1\Principal $principal): self - { - return (new self()) - ->setName($name) - ->setPrincipal($principal); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * @type \Google\Cloud\VmwareEngine\V1\Principal $principal - * Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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 consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Principal|null - */ - public function getPrincipal() - { - return $this->principal; - } - - public function hasPrincipal() - { - return isset($this->principal); - } - - public function clearPrincipal() - { - unset($this->principal); - } - - /** - * Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Principal $var - * @return $this - */ - public function setPrincipal($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Principal::class); - $this->principal = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php deleted file mode 100644 index 2beef5b8868d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmwareengine.v1.Hcx - */ -class Hcx extends \Google\Protobuf\Internal\Message -{ - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - */ - protected $internal_ip = ''; - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - */ - protected $fqdn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $internal_ip - * Internal IP address of the appliance. - * @type string $version - * Version of the appliance. - * @type int $state - * Output only. The state of the appliance. - * @type string $fqdn - * Fully qualified domain name of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Hcx\State::class); - $this->state = $var; - - return $this; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php deleted file mode 100644 index 730a4fbc1b9c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Hcx/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmwareengine.v1.Hcx.State - */ -class State -{ - /** - * Unspecified appliance state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The appliance is operational and can be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The appliance is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The appliance is being activated. - * - * Generated from protobuf enum ACTIVATING = 3; - */ - const ACTIVATING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::ACTIVATING => 'ACTIVATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Hcx_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php deleted file mode 100644 index 2ac89929e489..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.vmwareengine.v1.HcxActivationKey - */ -class HcxActivationKey extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of HCX activation key. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. State of HCX activation key. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. HCX activation key. - * - * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $activation_key = ''; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of HCX activation key. - * @type int $state - * Output only. State of HCX activation key. - * @type string $activation_key - * Output only. HCX activation key. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * 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 this HcxActivationKey. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key` - * - * 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. Creation time of HCX activation key. - * - * 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. Creation time of HCX activation key. - * - * 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. State of HCX activation key. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of HCX activation key. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.HcxActivationKey.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\HcxActivationKey\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. HCX activation key. - * - * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getActivationKey() - { - return $this->activation_key; - } - - /** - * Output only. HCX activation key. - * - * Generated from protobuf field string activation_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setActivationKey($var) - { - GPBUtil::checkString($var, True); - $this->activation_key = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php deleted file mode 100644 index 403d108006b2..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/HcxActivationKey/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vmwareengine.v1.HcxActivationKey.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * State of a newly generated activation key. - * - * Generated from protobuf enum AVAILABLE = 1; - */ - const AVAILABLE = 1; - /** - * State of key when it has been used to activate HCX appliance. - * - * Generated from protobuf enum CONSUMED = 2; - */ - const CONSUMED = 2; - /** - * State of key when it is being created. - * - * Generated from protobuf enum CREATING = 3; - */ - const CREATING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::AVAILABLE => 'AVAILABLE', - self::CONSUMED => 'CONSUMED', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\HcxActivationKey_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php deleted file mode 100644 index e5a2087e9eba..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersRequest.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.vmwareengine.v1.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\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. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * must match the call that provided the page token. - * @type string $filter - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to query for clusters. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of clusters to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * 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 `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` - * 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; - } - - /** - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-cluster") - * (nodeCount = "3") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "example-cluster-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-cluster-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php deleted file mode 100644 index 1db7f0ab9272..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListClustersResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of private cloud clusters. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; - */ - private $clusters; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters - * A list of private cloud clusters. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of private cloud clusters. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * A list of private cloud clusters. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Cluster clusters = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Cluster::class); - $this->clusters = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php deleted file mode 100644 index c4d4fa886150..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesRequest.php +++ /dev/null @@ -1,366 +0,0 @@ -google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest - */ -class ListExternalAccessRulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network policy to query for external - * access firewall rules. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of external access rules to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListExternalAccessRulesRequest` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAccessRulesRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of external access rules, you can - * exclude the ones named `example-rule` by specifying - * `name != "example-rule"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-rule") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-rule-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-rule-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the network policy to query for external - * access firewall rules. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * Please see {@see VmwareEngineClient::networkPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListExternalAccessRulesRequest - * - * @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 network policy to query for external - * access firewall rules. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * @type int $page_size - * The maximum number of external access rules to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListExternalAccessRulesRequest` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAccessRulesRequest` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of external access rules, you can - * exclude the ones named `example-rule` by specifying - * `name != "example-rule"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-rule") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-rule-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-rule-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network policy to query for external - * access firewall rules. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * 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 network policy to query for external - * access firewall rules. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: - * `projects/my-project/locations/us-central1/networkPolicies/my-policy` - * - * 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 external access rules to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of external access rules to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListExternalAccessRulesRequest` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAccessRulesRequest` 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 `ListExternalAccessRulesRequest` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAccessRulesRequest` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of external access rules, you can - * exclude the ones named `example-rule` by specifying - * `name != "example-rule"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-rule") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-rule-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-rule-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of external access rules, you can - * exclude the ones named `example-rule` by specifying - * `name != "example-rule"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-rule") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-rule-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-rule-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php deleted file mode 100644 index a20836638504..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAccessRulesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse - */ -class ListExternalAccessRulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of external access firewall rules. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rules = 1; - */ - private $external_access_rules; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule>|\Google\Protobuf\Internal\RepeatedField $external_access_rules - * A list of external access firewall rules. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of external access firewall rules. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExternalAccessRules() - { - return $this->external_access_rules; - } - - /** - * A list of external access firewall rules. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rules = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAccessRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExternalAccessRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule::class); - $this->external_access_rules = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php deleted file mode 100644 index 068486baec1c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesRequest.php +++ /dev/null @@ -1,367 +0,0 @@ -google.cloud.vmwareengine.v1.ListExternalAddressesRequest - */ -class ListExternalAddressesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * external IP addresses. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListExternalAddresses` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAddresses` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of IP addresses, you can - * exclude the ones named `example-ip` by specifying - * `name != "example-ip"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-ip") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-ip-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-ip-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to be queried for - * external IP addresses. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListExternalAddressesRequest - * - * @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 private cloud to be queried for - * external IP addresses. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListExternalAddresses` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAddresses` must match the call that provided the page token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of IP addresses, you can - * exclude the ones named `example-ip` by specifying - * `name != "example-ip"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-ip") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-ip-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-ip-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * external IP addresses. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to be queried for - * external IP addresses. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of external IP addresses to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListExternalAddresses` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAddresses` 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 `ListExternalAddresses` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListExternalAddresses` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of IP addresses, you can - * exclude the ones named `example-ip` by specifying - * `name != "example-ip"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-ip") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-ip-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-ip-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of IP addresses, you can - * exclude the ones named `example-ip` by specifying - * `name != "example-ip"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-ip") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-ip-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-ip-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php deleted file mode 100644 index 43b0db7791d5..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListExternalAddressesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListExternalAddressesResponse - */ -class ListExternalAddressesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of external IP addresses. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; - */ - private $external_addresses; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $external_addresses - * A list of external IP addresses. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of external IP addresses. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExternalAddresses() - { - return $this->external_addresses; - } - - /** - * A list of external IP addresses. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ExternalAddress external_addresses = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\ExternalAddress>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExternalAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); - $this->external_addresses = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php deleted file mode 100644 index 0a19130f8a2c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest - */ -class ListHcxActivationKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` 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 resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysRequest - * - * @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 private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * 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 private cloud - * to be queried for HCX activation keys. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateClouds/my-cloud` - * - * 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 HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of HCX activation keys to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` 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 `ListHcxActivationKeys` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListHcxActivationKeys` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php deleted file mode 100644 index d38aeee53fb8..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListHcxActivationKeysResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse - */ -class ListHcxActivationKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of HCX activation keys. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; - */ - private $hcx_activation_keys; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $hcx_activation_keys - * List of HCX activation keys. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * List of HCX activation keys. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHcxActivationKeys() - { - return $this->hcx_activation_keys; - } - - /** - * List of HCX activation keys. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.HcxActivationKey hcx_activation_keys = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\HcxActivationKey>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHcxActivationKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\HcxActivationKey::class); - $this->hcx_activation_keys = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php deleted file mode 100644 index 84953a0b6836..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersRequest.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.vmwareengine.v1.ListLoggingServersRequest - */ -class ListLoggingServersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * logging servers. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of logging servers to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListLoggingServersRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListLoggingServersRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of logging servers, you can - * exclude the ones named `example-server` by specifying - * `name != "example-server"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-server") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-server-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-server-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to be queried for - * logging servers. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListLoggingServersRequest - * - * @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 private cloud to be queried for - * logging servers. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of logging servers to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListLoggingServersRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListLoggingServersRequest` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of logging servers, you can - * exclude the ones named `example-server` by specifying - * `name != "example-server"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-server") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-server-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-server-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * logging servers. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to be queried for - * logging servers. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 logging servers to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of logging servers to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListLoggingServersRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListLoggingServersRequest` 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 `ListLoggingServersRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListLoggingServersRequest` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of logging servers, you can - * exclude the ones named `example-server` by specifying - * `name != "example-server"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-server") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-server-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-server-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of logging servers, you can - * exclude the ones named `example-server` by specifying - * `name != "example-server"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-server") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-server-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-server-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php deleted file mode 100644 index 549354db2821..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListLoggingServersResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListLoggingServersResponse - */ -class ListLoggingServersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Logging Servers. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LoggingServer logging_servers = 1; - */ - private $logging_servers; - /** - * A token, which can be send 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\LoggingServer>|\Google\Protobuf\Internal\RepeatedField $logging_servers - * A list of Logging Servers. - * @type string $next_page_token - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of Logging Servers. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LoggingServer logging_servers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLoggingServers() - { - return $this->logging_servers; - } - - /** - * A list of Logging Servers. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LoggingServer logging_servers = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\LoggingServer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLoggingServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\LoggingServer::class); - $this->logging_servers = $arr; - - return $this; - } - - /** - * A token, which can be send 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 send 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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php deleted file mode 100644 index ab7704b5f7fd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsRequest.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest - */ -class ListManagementDnsZoneBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * management DNS zone bindings. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of management DNS zone bindings to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListManagementDnsZoneBindings` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListManagementDnsZoneBindings` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of Management DNS Zone Bindings, - * you can exclude the ones named `example-management-dns-zone-binding` by - * specifying `name != "example-management-dns-zone-binding"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-management-dns-zone-binding") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-management-dns-zone-binding-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-management-dns-zone-binding-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to be queried for - * management DNS zone bindings. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListManagementDnsZoneBindingsRequest - * - * @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 private cloud to be queried for - * management DNS zone bindings. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of management DNS zone bindings to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListManagementDnsZoneBindings` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListManagementDnsZoneBindings` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of Management DNS Zone Bindings, - * you can exclude the ones named `example-management-dns-zone-binding` by - * specifying `name != "example-management-dns-zone-binding"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-management-dns-zone-binding") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-management-dns-zone-binding-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-management-dns-zone-binding-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * management DNS zone bindings. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to be queried for - * management DNS zone bindings. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 management DNS zone bindings to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of management DNS zone bindings to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListManagementDnsZoneBindings` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListManagementDnsZoneBindings` 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 `ListManagementDnsZoneBindings` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListManagementDnsZoneBindings` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of Management DNS Zone Bindings, - * you can exclude the ones named `example-management-dns-zone-binding` by - * specifying `name != "example-management-dns-zone-binding"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-management-dns-zone-binding") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-management-dns-zone-binding-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-management-dns-zone-binding-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of Management DNS Zone Bindings, - * you can exclude the ones named `example-management-dns-zone-binding` by - * specifying `name != "example-management-dns-zone-binding"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-management-dns-zone-binding") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-management-dns-zone-binding-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-management-dns-zone-binding-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php deleted file mode 100644 index 96371ae524ff..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListManagementDnsZoneBindingsResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse - */ -class ListManagementDnsZoneBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of management DNS zone bindings. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_bindings = 1; - */ - private $management_dns_zone_bindings; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding>|\Google\Protobuf\Internal\RepeatedField $management_dns_zone_bindings - * A list of management DNS zone bindings. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of management DNS zone bindings. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_bindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManagementDnsZoneBindings() - { - return $this->management_dns_zone_bindings; - } - - /** - * A list of management DNS zone bindings. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_bindings = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManagementDnsZoneBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding::class); - $this->management_dns_zone_bindings = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php deleted file mode 100644 index 38dce0b8e673..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsRequest.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest - */ -class ListNetworkPeeringsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location (global) to query for - * network peerings. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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 = ''; - /** - * The maximum number of network peerings to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListNetworkPeerings` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPeerings` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-peering` by specifying - * `name != "example-peering"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-peering") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-peering-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-peering-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location (global) to query for - * network peerings. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListNetworkPeeringsRequest - * - * @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 location (global) to query for - * network peerings. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * @type int $page_size - * The maximum number of network peerings to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListNetworkPeerings` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPeerings` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-peering` by specifying - * `name != "example-peering"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-peering") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-peering-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-peering-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location (global) to query for - * network peerings. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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 name of the location (global) to query for - * network peerings. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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; - } - - /** - * The maximum number of network peerings to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of network peerings to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListNetworkPeerings` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPeerings` 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 `ListNetworkPeerings` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPeerings` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-peering` by specifying - * `name != "example-peering"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-peering") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-peering-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-peering-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-peering` by specifying - * `name != "example-peering"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-peering") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-peering-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-peering-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php deleted file mode 100644 index 23484cf1c0fc..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPeeringsResponse.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse - */ -class ListNetworkPeeringsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of network peerings. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPeering network_peerings = 1; - */ - private $network_peerings; - /** - * 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 = ''; - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\NetworkPeering>|\Google\Protobuf\Internal\RepeatedField $network_peerings - * A list of network peerings. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of network peerings. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPeering network_peerings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkPeerings() - { - return $this->network_peerings; - } - - /** - * A list of network peerings. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPeering network_peerings = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\NetworkPeering>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkPeerings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NetworkPeering::class); - $this->network_peerings = $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; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php deleted file mode 100644 index bee75e476e17..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesRequest.php +++ /dev/null @@ -1,361 +0,0 @@ -google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest - */ -class ListNetworkPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesRequest - * - * @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 location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * @type int $page_size - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * 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 location (region) to query for - * network policies. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * 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 network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of network policies to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` 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 `ListNetworkPolicies` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNetworkPolicies` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network policies, you can - * exclude the ones named `example-policy` by specifying - * `name != "example-policy"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-policy") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-policy-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-policy-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php deleted file mode 100644 index abad447203f7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNetworkPoliciesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse - */ -class ListNetworkPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of network policies. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; - */ - private $network_policies; - /** - * A token, which can be send 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $network_policies - * A list of network policies. - * @type string $next_page_token - * A token, which can be send as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of network policies. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkPolicies() - { - return $this->network_policies; - } - - /** - * A list of network policies. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NetworkPolicy network_policies = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\NetworkPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); - $this->network_policies = $arr; - - return $this; - } - - /** - * A token, which can be send 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 send 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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php deleted file mode 100644 index d8b2a072333f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesRequest.php +++ /dev/null @@ -1,312 +0,0 @@ -google.cloud.vmwareengine.v1.ListNodeTypesRequest - */ -class ListNodeTypesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListNodeTypesRequest - * - * @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 location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @type int $page_size - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` must match the call that provided the page token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * 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 location to be queried for node types. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * 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 node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of node types to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` 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 `ListNodeTypes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodeTypes` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of node types, you can - * exclude the ones named `standard-72` by specifying - * `name != "standard-72"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "standard-72") - * (virtual_cpu_count > 2) - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "standard-96") AND - * (virtual_cpu_count > 2) OR - * (name = "standard-72") - * ``` - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php deleted file mode 100644 index c8de39d538ae..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodeTypesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListNodeTypesResponse - */ -class ListNodeTypesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Node Types. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; - */ - private $node_types; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $node_types - * A list of Node Types. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of Node Types. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeTypes() - { - return $this->node_types; - } - - /** - * A list of Node Types. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType node_types = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\NodeType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeType::class); - $this->node_types = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php deleted file mode 100644 index 55daa226a1ef..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.vmwareengine.v1.ListNodesRequest - */ -class ListNodesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the cluster to be queried for nodes. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of nodes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListNodes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodes` 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 resource name of the cluster to be queried for nodes. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * Please see {@see VmwareEngineClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListNodesRequest - * - * @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 cluster to be queried for nodes. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * @type int $page_size - * The maximum number of nodes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListNodes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodes` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the cluster to be queried for nodes. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the cluster to be queried for nodes. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of nodes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of nodes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListNodes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodes` 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 `ListNodes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListNodes` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php deleted file mode 100644 index 790b31a63eda..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListNodesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.vmwareengine.v1.ListNodesResponse - */ -class ListNodesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The nodes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Node nodes = 1; - */ - private $nodes; - /** - * 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 array<\Google\Cloud\VmwareEngine\V1\Node>|\Google\Protobuf\Internal\RepeatedField $nodes - * The nodes. - * @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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * The nodes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Node nodes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * The nodes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Node nodes = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\Node>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Node::class); - $this->nodes = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php deleted file mode 100644 index 55118727a6e9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.vmwareengine.v1.ListPeeringRoutesRequest - */ -class ListPeeringRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the network peering to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListPeeringRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPeeringRoutes` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * Currently, only filtering on the `direction` field is supported. To return - * routes imported from the peer network, provide "direction=INCOMING". To - * return routes exported from the VMware Engine network, provide - * "direction=OUTGOING". Other filter expressions return an error. - * - * Generated from protobuf field string filter = 6; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the network peering to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * Please see {@see VmwareEngineClient::networkPeeringName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListPeeringRoutesRequest - * - * @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 network peering to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * @type int $page_size - * The maximum number of peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListPeeringRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPeeringRoutes` must - * match the call that provided the page token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * Currently, only filtering on the `direction` field is supported. To return - * routes imported from the peer network, provide "direction=INCOMING". To - * return routes exported from the VMware Engine network, provide - * "direction=OUTGOING". Other filter expressions return an error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the network peering to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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 network peering to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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 peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListPeeringRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPeeringRoutes` 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 `ListPeeringRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPeeringRoutes` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * Currently, only filtering on the `direction` field is supported. To return - * routes imported from the peer network, provide "direction=INCOMING". To - * return routes exported from the VMware Engine network, provide - * "direction=OUTGOING". Other filter expressions return an error. - * - * Generated from protobuf field string filter = 6; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * Currently, only filtering on the `direction` field is supported. To return - * routes imported from the peer network, provide "direction=INCOMING". To - * return routes exported from the VMware Engine network, provide - * "direction=OUTGOING". Other filter expressions return an error. - * - * Generated from protobuf field string filter = 6; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php deleted file mode 100644 index 61112faa0ec9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPeeringRoutesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.vmwareengine.v1.ListPeeringRoutesResponse - */ -class ListPeeringRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of peering routes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; - */ - private $peering_routes; - /** - * 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 array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $peering_routes - * A list of peering routes. - * @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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of peering routes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPeeringRoutes() - { - return $this->peering_routes; - } - - /** - * A list of peering routes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPeeringRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PeeringRoute::class); - $this->peering_routes = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php deleted file mode 100644 index 8e9d635b77be..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsRequest.php +++ /dev/null @@ -1,362 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateCloudsRequest - */ -class ListPrivateCloudsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListPrivateCloudsRequest - * - * @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 private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * @type int $page_size - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` must - * match the call that provided the page token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * 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 private cloud to be queried for - * clusters. Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a` - * - * 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 private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of private clouds to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` 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 `ListPrivateClouds` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListPrivateClouds` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison operator, and the - * value that you want to use for filtering. The value must be a string, a - * number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or - * `<`. - * For example, if you are filtering a list of private clouds, you can exclude - * the ones named `example-pc` by specifying `name != "example-pc"`. - * You can also filter nested fields. For example, you could specify - * `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds - * only if they have a matching address in their network configuration. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-pc") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you can - * include `AND` and `OR` expressions explicitly. For example: - * ``` - * (name = "private-cloud-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "private-cloud-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results are - * ordered by `name` in ascending order. You can also sort results in - * descending order based on the `name` value using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php deleted file mode 100644 index bb0c02544fb4..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateCloudsResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateCloudsResponse - */ -class ListPrivateCloudsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of private clouds. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; - */ - private $private_clouds; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $private_clouds - * A list of private clouds. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of private clouds. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrivateClouds() - { - return $this->private_clouds; - } - - /** - * A list of private clouds. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateCloud private_clouds = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\PrivateCloud>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrivateClouds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); - $this->private_clouds = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php deleted file mode 100644 index fcb2b9941abf..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest - */ -class ListPrivateConnectionPeeringRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private connection to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-west1/privateConnections/my-connection` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListPrivateConnectionPeeringRoutes` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListPrivateConnectionPeeringRoutes` 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 resource name of the private connection to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-west1/privateConnections/my-connection` - * Please see {@see VmwareEngineClient::privateConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListPrivateConnectionPeeringRoutesRequest - * - * @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 private connection to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-west1/privateConnections/my-connection` - * @type int $page_size - * The maximum number of peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListPrivateConnectionPeeringRoutes` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListPrivateConnectionPeeringRoutes` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private connection to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-west1/privateConnections/my-connection` - * - * 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 private connection to retrieve peering - * routes from. Resource names are schemeless URIs that follow the conventions - * in https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/us-west1/privateConnections/my-connection` - * - * 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 peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of peering routes to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListPrivateConnectionPeeringRoutes` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListPrivateConnectionPeeringRoutes` 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 `ListPrivateConnectionPeeringRoutes` - * call. Provide this to retrieve the subsequent page. When paginating, all - * other parameters provided to `ListPrivateConnectionPeeringRoutes` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php deleted file mode 100644 index 7ae5850a3c69..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionPeeringRoutesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse - */ -class ListPrivateConnectionPeeringRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of peering routes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; - */ - private $peering_routes; - /** - * 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 array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $peering_routes - * A list of peering routes. - * @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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of peering routes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPeeringRoutes() - { - return $this->peering_routes; - } - - /** - * A list of peering routes. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PeeringRoute peering_routes = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\PeeringRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPeeringRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PeeringRoute::class); - $this->peering_routes = $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php deleted file mode 100644 index 7f5a5622e56b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsRequest.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest - */ -class ListPrivateConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to query for - * private connections. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of private connections to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of private connections, you can - * exclude the ones named `example-connection` by specifying - * `name != "example-connection"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-connection") - * (createTime > "2022-09-22T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-connection-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-connection-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location to query for - * private connections. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListPrivateConnectionsRequest - * - * @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 location to query for - * private connections. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * @type int $page_size - * The maximum number of private connections to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of private connections, you can - * exclude the ones named `example-connection` by specifying - * `name != "example-connection"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-connection") - * (createTime > "2022-09-22T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-connection-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-connection-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to query for - * private connections. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * 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 location to query for - * private connections. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/us-central1` - * - * 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 private connections to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of private connections to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` 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 `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of private connections, you can - * exclude the ones named `example-connection` by specifying - * `name != "example-connection"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-connection") - * (createTime > "2022-09-22T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-connection-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-connection-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of private connections, you can - * exclude the ones named `example-connection` by specifying - * `name != "example-connection"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-connection") - * (createTime > "2022-09-22T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-connection-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-connection-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php deleted file mode 100644 index 2ce8e6c074aa..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListPrivateConnectionsResponse.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse - */ -class ListPrivateConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of private connections. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateConnection private_connections = 1; - */ - private $private_connections; - /** - * 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 = ''; - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $private_connections - * A list of private connections. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of private connections. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateConnection private_connections = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrivateConnections() - { - return $this->private_connections; - } - - /** - * A list of private connections. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.PrivateConnection private_connections = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrivateConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\PrivateConnection::class); - $this->private_connections = $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; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php deleted file mode 100644 index 8cd0a8dbe644..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.vmwareengine.v1.ListSubnetsRequest - */ -class ListSubnetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` 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 resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListSubnetsRequest - * - * @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 private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type int $page_size - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud to be queried for - * subnets. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of subnets to return in one page. - * The service may return fewer than this value. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` 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 `ListSubnetsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSubnetsRequest` 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php deleted file mode 100644 index d6a41be2b735..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListSubnetsResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.vmwareengine.v1.ListSubnetsResponse - */ -class ListSubnetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of subnets. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; - */ - private $subnets; - /** - * 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 = ''; - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $subnets - * A list of subnets. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached when making an aggregated query using - * wildcards. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of subnets. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSubnets() - { - return $this->subnets; - } - - /** - * A list of subnets. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.Subnet subnets = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\Subnet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSubnets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\Subnet::class); - $this->subnets = $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; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached when making an aggregated query using - * wildcards. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php deleted file mode 100644 index 5d04a5162774..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksRequest.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest - */ -class ListVmwareEngineNetworksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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 = ''; - /** - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * Please see {@see VmwareEngineClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksRequest - * - * @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 location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. For - * example: `projects/my-project/locations/global` - * @type int $page_size - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * @type string $page_token - * A page token, received from a previous `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` must match the call that provided the page - * token. - * @type string $filter - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * @type string $order_by - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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 name of the location to query for - * VMware Engine networks. Resource names are schemeless URIs that follow the - * conventions in https://cloud.google.com/apis/design/resource_names. 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; - } - - /** - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in one page. - * The maximum value is coerced to 1000. - * The default value of this field is 500. - * - * 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 `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` 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 `ListVmwareEngineNetworks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListVmwareEngineNetworks` 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; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that matches resources returned in the response. - * The expression must specify the field name, a comparison - * operator, and the value that you want to use for filtering. The value - * must be a string, a number, or a boolean. The comparison operator - * must be `=`, `!=`, `>`, or `<`. - * For example, if you are filtering a list of network peerings, you can - * exclude the ones named `example-network` by specifying - * `name != "example-network"`. - * To filter on multiple expressions, provide each separate expression within - * parentheses. For example: - * ``` - * (name = "example-network") - * (createTime > "2021-04-12T08:15:10.40Z") - * ``` - * By default, each expression is an `AND` expression. However, you - * can include `AND` and `OR` expressions explicitly. - * For example: - * ``` - * (name = "example-network-1") AND - * (createTime > "2021-04-12T08:15:10.40Z") OR - * (name = "example-network-2") - * ``` - * - * 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; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sorts list results by a certain order. By default, returned results - * are ordered by `name` in ascending order. - * You can also sort results in descending order based on the `name` value - * using `orderBy="name desc"`. - * Currently, only ordering by `name` is supported. - * - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php deleted file mode 100644 index 0ca339105be3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ListVmwareEngineNetworksResponse.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse - */ -class ListVmwareEngineNetworksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of VMware Engine networks. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; - */ - private $vmware_engine_networks; - /** - * 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 = ''; - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $vmware_engine_networks - * A list of VMware Engine networks. - * @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. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Unreachable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * A list of VMware Engine networks. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVmwareEngineNetworks() - { - return $this->vmware_engine_networks; - } - - /** - * A list of VMware Engine networks. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_networks = 1; - * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVmwareEngineNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); - $this->vmware_engine_networks = $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; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unreachable resources. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php deleted file mode 100644 index 599a522a3c30..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.vmwareengine.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Capabilities of this location. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LocationMetadata.Capability capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $capabilities; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $capabilities - * Output only. Capabilities of this location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Capabilities of this location. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LocationMetadata.Capability capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCapabilities() - { - return $this->capabilities; - } - - /** - * Output only. Capabilities of this location. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.LocationMetadata.Capability capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCapabilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VmwareEngine\V1\LocationMetadata\Capability::class); - $this->capabilities = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php deleted file mode 100644 index b02dac2f136b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LocationMetadata/Capability.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.vmwareengine.v1.LocationMetadata.Capability - */ -class Capability -{ - /** - * The default value. This value is used if the capability is omitted or - * unknown. - * - * Generated from protobuf enum CAPABILITY_UNSPECIFIED = 0; - */ - const CAPABILITY_UNSPECIFIED = 0; - /** - * Stretch clusters are supported in this location. - * - * Generated from protobuf enum STRETCHED_CLUSTERS = 1; - */ - const STRETCHED_CLUSTERS = 1; - - private static $valueToName = [ - self::CAPABILITY_UNSPECIFIED => 'CAPABILITY_UNSPECIFIED', - self::STRETCHED_CLUSTERS => 'STRETCHED_CLUSTERS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Capability::class, \Google\Cloud\VmwareEngine\V1\LocationMetadata_Capability::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php deleted file mode 100644 index e064acbab3d1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.vmwareengine.v1.LoggingServer - */ -class LoggingServer extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this logging server. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. Fully-qualified domain name (FQDN) or IP Address of the logging - * server. - * - * Generated from protobuf field string hostname = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Required. Port number at which the logging server receives logs. - * - * Generated from protobuf field int32 port = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $port = 0; - /** - * Required. Protocol used by vCenter to send logs to a logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.Protocol protocol = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $protocol = 0; - /** - * Required. The type of component that produces logs that will be forwarded - * to this logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.SourceType source_type = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_type = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this logging server. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $hostname - * Required. Fully-qualified domain name (FQDN) or IP Address of the logging - * server. - * @type int $port - * Required. Port number at which the logging server receives logs. - * @type int $protocol - * Required. Protocol used by vCenter to send logs to a logging server. - * @type int $source_type - * Required. The type of component that produces logs that will be forwarded - * to this logging server. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this logging server. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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 this logging server. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Fully-qualified domain name (FQDN) or IP Address of the logging - * server. - * - * Generated from protobuf field string hostname = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. Fully-qualified domain name (FQDN) or IP Address of the logging - * server. - * - * Generated from protobuf field string hostname = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Required. Port number at which the logging server receives logs. - * - * Generated from protobuf field int32 port = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Required. Port number at which the logging server receives logs. - * - * Generated from protobuf field int32 port = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Required. Protocol used by vCenter to send logs to a logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.Protocol protocol = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Required. Protocol used by vCenter to send logs to a logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.Protocol protocol = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\LoggingServer\Protocol::class); - $this->protocol = $var; - - return $this; - } - - /** - * Required. The type of component that produces logs that will be forwarded - * to this logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.SourceType source_type = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getSourceType() - { - return $this->source_type; - } - - /** - * Required. The type of component that produces logs that will be forwarded - * to this logging server. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer.SourceType source_type = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\LoggingServer\SourceType::class); - $this->source_type = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php deleted file mode 100644 index e73dd818e19a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/Protocol.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.vmwareengine.v1.LoggingServer.Protocol - */ -class Protocol -{ - /** - * Unspecified communications protocol. This is the default value. - * - * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; - */ - const PROTOCOL_UNSPECIFIED = 0; - /** - * UDP - * - * Generated from protobuf enum UDP = 1; - */ - const UDP = 1; - /** - * TCP - * - * Generated from protobuf enum TCP = 2; - */ - const TCP = 2; - /** - * TLS - * - * Generated from protobuf enum TLS = 3; - */ - const TLS = 3; - /** - * SSL - * - * Generated from protobuf enum SSL = 4; - */ - const SSL = 4; - /** - * RELP - * - * Generated from protobuf enum RELP = 5; - */ - const RELP = 5; - - private static $valueToName = [ - self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', - self::UDP => 'UDP', - self::TCP => 'TCP', - self::TLS => 'TLS', - self::SSL => 'SSL', - self::RELP => 'RELP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Protocol::class, \Google\Cloud\VmwareEngine\V1\LoggingServer_Protocol::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php deleted file mode 100644 index 3c9f92ff6598..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/LoggingServer/SourceType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.LoggingServer.SourceType - */ -class SourceType -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum SOURCE_TYPE_UNSPECIFIED = 0; - */ - const SOURCE_TYPE_UNSPECIFIED = 0; - /** - * Logs produced by ESXI hosts - * - * Generated from protobuf enum ESXI = 1; - */ - const ESXI = 1; - /** - * Logs produced by vCenter server - * - * Generated from protobuf enum VCSA = 2; - */ - const VCSA = 2; - - private static $valueToName = [ - self::SOURCE_TYPE_UNSPECIFIED => 'SOURCE_TYPE_UNSPECIFIED', - self::ESXI => 'ESXI', - self::VCSA => 'VCSA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SourceType::class, \Google\Cloud\VmwareEngine\V1\LoggingServer_SourceType::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php deleted file mode 100644 index d2a7a7f295a1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding.php +++ /dev/null @@ -1,370 +0,0 @@ -google.cloud.vmwareengine.v1.ManagementDnsZoneBinding - */ -class ManagementDnsZoneBinding extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this binding. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * User-provided description for this resource. - * - * Generated from protobuf field string description = 13; - */ - protected $description = ''; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - protected $bind_network; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this binding. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type int $state - * Output only. The state of the resource. - * @type string $description - * User-provided description for this resource. - * @type string $vpc_network - * Network to bind is a standard consumer VPC. - * Specify the name in the following form for consumer - * VPC network: `projects/{project}/global/networks/{network_id}`. - * `{project}` can either be a project number or a project ID. - * @type string $vmware_engine_network - * Network to bind is a VMware Engine network. - * Specify the name in the following form for VMware engine network: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * `{project}` can either be a project number or a project ID. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this binding. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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 this binding. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding\State::class); - $this->state = $var; - - return $this; - } - - /** - * User-provided description for this resource. - * - * Generated from protobuf field string description = 13; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this resource. - * - * Generated from protobuf field string description = 13; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Network to bind is a standard consumer VPC. - * Specify the name in the following form for consumer - * VPC network: `projects/{project}/global/networks/{network_id}`. - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vpc_network = 14 [(.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->readOneof(14); - } - - public function hasVpcNetwork() - { - return $this->hasOneof(14); - } - - /** - * Network to bind is a standard consumer VPC. - * Specify the name in the following form for consumer - * VPC network: `projects/{project}/global/networks/{network_id}`. - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vpc_network = 14 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Network to bind is a VMware Engine network. - * Specify the name in the following form for VMware engine network: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 15 [(.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->readOneof(15); - } - - public function hasVmwareEngineNetwork() - { - return $this->hasOneof(15); - } - - /** - * Network to bind is a VMware Engine network. - * Specify the name in the following form for VMware engine network: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 15 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * @return string - */ - public function getBindNetwork() - { - return $this->whichOneof("bind_network"); - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php deleted file mode 100644 index 5b605adbdcb9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ManagementDnsZoneBinding/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The binding is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The binding is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The binding is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The binding is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The binding has failed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php deleted file mode 100644 index 60536fcd1805..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkConfig.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Management CIDR used by VMware management appliances. - * - * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $management_cidr = ''; - /** - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network = ''; - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network_canonical = ''; - /** - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * - * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $management_ip_address_layout_version = 0; - /** - * Output only. DNS Server IP of the Private Cloud. - * All DNS queries can be forwarded to this address for name resolution of - * Private Cloud's management entities like vCenter, NSX-T Manager and - * ESXi hosts. - * - * Generated from protobuf field string dns_server_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dns_server_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $management_cidr - * Required. Management CIDR used by VMware management appliances. - * @type string $vmware_engine_network - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * @type string $vmware_engine_network_canonical - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * @type int $management_ip_address_layout_version - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * @type string $dns_server_ip - * Output only. DNS Server IP of the Private Cloud. - * All DNS queries can be forwarded to this address for name resolution of - * Private Cloud's management entities like vCenter, NSX-T Manager and - * ESXi hosts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Management CIDR used by VMware management appliances. - * - * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getManagementCidr() - { - return $this->management_cidr; - } - - /** - * Required. Management CIDR used by VMware management appliances. - * - * Generated from protobuf field string management_cidr = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setManagementCidr($var) - { - GPBUtil::checkString($var, True); - $this->management_cidr = $var; - - return $this; - } - - /** - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - /** - * Optional. The relative resource name of the VMware Engine network attached - * to the private cloud. Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetworkCanonical() - { - return $this->vmware_engine_network_canonical; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkCanonical($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_canonical = $var; - - return $this; - } - - /** - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * - * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getManagementIpAddressLayoutVersion() - { - return $this->management_ip_address_layout_version; - } - - /** - * Output only. The IP address layout version of the management IP address - * range. Possible versions include: - * * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address - * layout used by some existing private clouds. This is no longer supported - * for new private clouds as it does not support all features. - * * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address - * layout used by all newly created private clouds. This version supports all - * current features. - * - * Generated from protobuf field int32 management_ip_address_layout_version = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setManagementIpAddressLayoutVersion($var) - { - GPBUtil::checkInt32($var); - $this->management_ip_address_layout_version = $var; - - return $this; - } - - /** - * Output only. DNS Server IP of the Private Cloud. - * All DNS queries can be forwarded to this address for name resolution of - * Private Cloud's management entities like vCenter, NSX-T Manager and - * ESXi hosts. - * - * Generated from protobuf field string dns_server_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDnsServerIp() - { - return $this->dns_server_ip; - } - - /** - * Output only. DNS Server IP of the Private Cloud. - * All DNS queries can be forwarded to this address for name resolution of - * Private Cloud's management entities like vCenter, NSX-T Manager and - * ESXi hosts. - * - * Generated from protobuf field string dns_server_ip = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDnsServerIp($var) - { - GPBUtil::checkString($var, True); - $this->dns_server_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php deleted file mode 100644 index 75600189db38..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering.php +++ /dev/null @@ -1,775 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPeering - */ -class NetworkPeering extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the network peering. NetworkPeering is a - * global resource and location can only be global. Resource names are - * scheme-less URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. The relative resource name of the network to peer with - * a standard VMware Engine network. The provided network can be a - * consumer VPC network or another standard VMware Engine network. If the - * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * Otherwise specify the name in the form: - * `projects/{project}/global/networks/{network_id}`, where - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string peer_network = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_network = ''; - /** - * Optional. True if custom routes are exported to the peered network; - * false otherwise. The default value is true. - * - * Generated from protobuf field optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $export_custom_routes = null; - /** - * Optional. True if custom routes are imported from the peered network; - * false otherwise. The default value is true. - * - * Generated from protobuf field optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $import_custom_routes = null; - /** - * Optional. True if full mesh connectivity is created and managed - * automatically between peered networks; false otherwise. Currently this - * field is always true because Google Compute Engine automatically creates - * and manages subnetwork routes between two VPC networks when peering state - * is 'ACTIVE'. - * - * Generated from protobuf field optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $exchange_subnet_routes = null; - /** - * Optional. True if all subnet routes with a public IP address range are - * exported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * exported to peers and are not controlled by this field. - * - * Generated from protobuf field optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $export_custom_routes_with_public_ip = null; - /** - * Optional. True if all subnet routes with public IP address range are - * imported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * imported to peers and are not controlled by this field. - * - * Generated from protobuf field optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $import_custom_routes_with_public_ip = null; - /** - * Output only. State of the network peering. This field - * has a value of 'ACTIVE' when there's a matching configuration in the peer - * network. New values may be added to this enum when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Output Only. Details about the current state of the network - * peering. - * - * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - /** - * Optional. Maximum transmission unit (MTU) in bytes. - * The default value is `1500`. If a value of `0` is provided for this field, - * VMware Engine uses the default value instead. - * - * Generated from protobuf field int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $peer_mtu = 0; - /** - * Required. The type of the network to peer with the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_network_type = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network = ''; - /** - * Optional. User-provided description for this network peering. - * - * Generated from protobuf field string description = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the network peering. NetworkPeering is a - * global resource and location can only be global. Resource names are - * scheme-less URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $peer_network - * Required. The relative resource name of the network to peer with - * a standard VMware Engine network. The provided network can be a - * consumer VPC network or another standard VMware Engine network. If the - * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * Otherwise specify the name in the form: - * `projects/{project}/global/networks/{network_id}`, where - * `{project}` can either be a project number or a project ID. - * @type bool $export_custom_routes - * Optional. True if custom routes are exported to the peered network; - * false otherwise. The default value is true. - * @type bool $import_custom_routes - * Optional. True if custom routes are imported from the peered network; - * false otherwise. The default value is true. - * @type bool $exchange_subnet_routes - * Optional. True if full mesh connectivity is created and managed - * automatically between peered networks; false otherwise. Currently this - * field is always true because Google Compute Engine automatically creates - * and manages subnetwork routes between two VPC networks when peering state - * is 'ACTIVE'. - * @type bool $export_custom_routes_with_public_ip - * Optional. True if all subnet routes with a public IP address range are - * exported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * exported to peers and are not controlled by this field. - * @type bool $import_custom_routes_with_public_ip - * Optional. True if all subnet routes with public IP address range are - * imported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * imported to peers and are not controlled by this field. - * @type int $state - * Output only. State of the network peering. This field - * has a value of 'ACTIVE' when there's a matching configuration in the peer - * network. New values may be added to this enum when appropriate. - * @type string $state_details - * Output only. Output Only. Details about the current state of the network - * peering. - * @type int $peer_mtu - * Optional. Maximum transmission unit (MTU) in bytes. - * The default value is `1500`. If a value of `0` is provided for this field, - * VMware Engine uses the default value instead. - * @type int $peer_network_type - * Required. The type of the network to peer with the VMware Engine network. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $vmware_engine_network - * Required. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * @type string $description - * Optional. User-provided description for this network peering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the network peering. NetworkPeering is a - * global resource and location can only be global. Resource names are - * scheme-less URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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 network peering. NetworkPeering is a - * global resource and location can only be global. Resource names are - * scheme-less URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/networkPeerings/my-peering` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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. The relative resource name of the network to peer with - * a standard VMware Engine network. The provided network can be a - * consumer VPC network or another standard VMware Engine network. If the - * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * Otherwise specify the name in the form: - * `projects/{project}/global/networks/{network_id}`, where - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string peer_network = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerNetwork() - { - return $this->peer_network; - } - - /** - * Required. The relative resource name of the network to peer with - * a standard VMware Engine network. The provided network can be a - * consumer VPC network or another standard VMware Engine network. If the - * `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: - * `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. - * Otherwise specify the name in the form: - * `projects/{project}/global/networks/{network_id}`, where - * `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string peer_network = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerNetwork($var) - { - GPBUtil::checkString($var, True); - $this->peer_network = $var; - - return $this; - } - - /** - * Optional. True if custom routes are exported to the peered network; - * false otherwise. The default value is true. - * - * Generated from protobuf field optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExportCustomRoutes() - { - return isset($this->export_custom_routes) ? $this->export_custom_routes : false; - } - - public function hasExportCustomRoutes() - { - return isset($this->export_custom_routes); - } - - public function clearExportCustomRoutes() - { - unset($this->export_custom_routes); - } - - /** - * Optional. True if custom routes are exported to the peered network; - * false otherwise. The default value is true. - * - * Generated from protobuf field optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExportCustomRoutes($var) - { - GPBUtil::checkBool($var); - $this->export_custom_routes = $var; - - return $this; - } - - /** - * Optional. True if custom routes are imported from the peered network; - * false otherwise. The default value is true. - * - * Generated from protobuf field optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getImportCustomRoutes() - { - return isset($this->import_custom_routes) ? $this->import_custom_routes : false; - } - - public function hasImportCustomRoutes() - { - return isset($this->import_custom_routes); - } - - public function clearImportCustomRoutes() - { - unset($this->import_custom_routes); - } - - /** - * Optional. True if custom routes are imported from the peered network; - * false otherwise. The default value is true. - * - * Generated from protobuf field optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setImportCustomRoutes($var) - { - GPBUtil::checkBool($var); - $this->import_custom_routes = $var; - - return $this; - } - - /** - * Optional. True if full mesh connectivity is created and managed - * automatically between peered networks; false otherwise. Currently this - * field is always true because Google Compute Engine automatically creates - * and manages subnetwork routes between two VPC networks when peering state - * is 'ACTIVE'. - * - * Generated from protobuf field optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExchangeSubnetRoutes() - { - return isset($this->exchange_subnet_routes) ? $this->exchange_subnet_routes : false; - } - - public function hasExchangeSubnetRoutes() - { - return isset($this->exchange_subnet_routes); - } - - public function clearExchangeSubnetRoutes() - { - unset($this->exchange_subnet_routes); - } - - /** - * Optional. True if full mesh connectivity is created and managed - * automatically between peered networks; false otherwise. Currently this - * field is always true because Google Compute Engine automatically creates - * and manages subnetwork routes between two VPC networks when peering state - * is 'ACTIVE'. - * - * Generated from protobuf field optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExchangeSubnetRoutes($var) - { - GPBUtil::checkBool($var); - $this->exchange_subnet_routes = $var; - - return $this; - } - - /** - * Optional. True if all subnet routes with a public IP address range are - * exported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * exported to peers and are not controlled by this field. - * - * Generated from protobuf field optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExportCustomRoutesWithPublicIp() - { - return isset($this->export_custom_routes_with_public_ip) ? $this->export_custom_routes_with_public_ip : false; - } - - public function hasExportCustomRoutesWithPublicIp() - { - return isset($this->export_custom_routes_with_public_ip); - } - - public function clearExportCustomRoutesWithPublicIp() - { - unset($this->export_custom_routes_with_public_ip); - } - - /** - * Optional. True if all subnet routes with a public IP address range are - * exported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * exported to peers and are not controlled by this field. - * - * Generated from protobuf field optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExportCustomRoutesWithPublicIp($var) - { - GPBUtil::checkBool($var); - $this->export_custom_routes_with_public_ip = $var; - - return $this; - } - - /** - * Optional. True if all subnet routes with public IP address range are - * imported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * imported to peers and are not controlled by this field. - * - * Generated from protobuf field optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getImportCustomRoutesWithPublicIp() - { - return isset($this->import_custom_routes_with_public_ip) ? $this->import_custom_routes_with_public_ip : false; - } - - public function hasImportCustomRoutesWithPublicIp() - { - return isset($this->import_custom_routes_with_public_ip); - } - - public function clearImportCustomRoutesWithPublicIp() - { - unset($this->import_custom_routes_with_public_ip); - } - - /** - * Optional. True if all subnet routes with public IP address range are - * imported; false otherwise. The default value is true. IPv4 special-use - * ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always - * imported to peers and are not controlled by this field. - * - * Generated from protobuf field optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setImportCustomRoutesWithPublicIp($var) - { - GPBUtil::checkBool($var); - $this->import_custom_routes_with_public_ip = $var; - - return $this; - } - - /** - * Output only. State of the network peering. This field - * has a value of 'ACTIVE' when there's a matching configuration in the peer - * network. New values may be added to this enum when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the network peering. This field - * has a value of 'ACTIVE' when there's a matching configuration in the peer - * network. New values may be added to this enum when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Output Only. Details about the current state of the network - * peering. - * - * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. Output Only. Details about the current state of the network - * peering. - * - * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - - /** - * Optional. Maximum transmission unit (MTU) in bytes. - * The default value is `1500`. If a value of `0` is provided for this field, - * VMware Engine uses the default value instead. - * - * Generated from protobuf field int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPeerMtu() - { - return $this->peer_mtu; - } - - /** - * Optional. Maximum transmission unit (MTU) in bytes. - * The default value is `1500`. If a value of `0` is provided for this field, - * VMware Engine uses the default value instead. - * - * Generated from protobuf field int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPeerMtu($var) - { - GPBUtil::checkInt32($var); - $this->peer_mtu = $var; - - return $this; - } - - /** - * Required. The type of the network to peer with the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPeerNetworkType() - { - return $this->peer_network_type; - } - - /** - * Required. The type of the network to peer with the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPeerNetworkType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering\PeerNetworkType::class); - $this->peer_network_type = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - /** - * Required. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Optional. User-provided description for this network peering. - * - * Generated from protobuf field string description = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-provided description for this network peering. - * - * Generated from protobuf field string description = 21 [(.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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php deleted file mode 100644 index a7cd5e3091b7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/PeerNetworkType.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType - */ -class PeerNetworkType -{ - /** - * Unspecified - * - * Generated from protobuf enum PEER_NETWORK_TYPE_UNSPECIFIED = 0; - */ - const PEER_NETWORK_TYPE_UNSPECIFIED = 0; - /** - * Peering connection used for connecting to another VPC network established - * by the same user. For example, a peering connection to another VPC - * network in the same project or to an on-premises network. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * Peering connection used for connecting to another VMware Engine network. - * - * Generated from protobuf enum VMWARE_ENGINE_NETWORK = 2; - */ - const VMWARE_ENGINE_NETWORK = 2; - /** - * Peering connection used for establishing [private services - * access](https://cloud.google.com/vpc/docs/private-services-access). - * - * Generated from protobuf enum PRIVATE_SERVICES_ACCESS = 3; - */ - const PRIVATE_SERVICES_ACCESS = 3; - /** - * Peering connection used for connecting to NetApp Cloud Volumes. - * - * Generated from protobuf enum NETAPP_CLOUD_VOLUMES = 4; - */ - const NETAPP_CLOUD_VOLUMES = 4; - /** - * Peering connection used for connecting to third-party services. Most - * third-party services require manual setup of reverse peering on the VPC - * network associated with the third-party service. - * - * Generated from protobuf enum THIRD_PARTY_SERVICE = 5; - */ - const THIRD_PARTY_SERVICE = 5; - /** - * Peering connection used for connecting to Dell PowerScale Filers - * - * Generated from protobuf enum DELL_POWERSCALE = 6; - */ - const DELL_POWERSCALE = 6; - /** - * Peering connection used for connecting to Google Cloud NetApp Volumes. - * - * Generated from protobuf enum GOOGLE_CLOUD_NETAPP_VOLUMES = 7; - */ - const GOOGLE_CLOUD_NETAPP_VOLUMES = 7; - - private static $valueToName = [ - self::PEER_NETWORK_TYPE_UNSPECIFIED => 'PEER_NETWORK_TYPE_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::VMWARE_ENGINE_NETWORK => 'VMWARE_ENGINE_NETWORK', - self::PRIVATE_SERVICES_ACCESS => 'PRIVATE_SERVICES_ACCESS', - self::NETAPP_CLOUD_VOLUMES => 'NETAPP_CLOUD_VOLUMES', - self::THIRD_PARTY_SERVICE => 'THIRD_PARTY_SERVICE', - self::DELL_POWERSCALE => 'DELL_POWERSCALE', - self::GOOGLE_CLOUD_NETAPP_VOLUMES => 'GOOGLE_CLOUD_NETAPP_VOLUMES', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PeerNetworkType::class, \Google\Cloud\VmwareEngine\V1\NetworkPeering_PeerNetworkType::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php deleted file mode 100644 index 0fa3a933fb06..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPeering/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPeering.State - */ -class State -{ - /** - * Unspecified network peering state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The peering is not active. - * - * Generated from protobuf enum INACTIVE = 1; - */ - const INACTIVE = 1; - /** - * The peering is active. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The peering is being created. - * - * Generated from protobuf enum CREATING = 3; - */ - const CREATING = 3; - /** - * The peering is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::INACTIVE => 'INACTIVE', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\NetworkPeering_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php deleted file mode 100644 index a0706a1327c9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy.php +++ /dev/null @@ -1,470 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPolicy - */ -class NetworkPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Network service that allows VMware workloads to access the internet. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; - */ - protected $internet_access = null; - /** - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; - */ - protected $external_ip = null; - /** - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * - * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $edge_services_cidr = ''; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network = ''; - /** - * Optional. User-provided description for this network policy. - * - * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network_canonical = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $internet_access - * Network service that allows VMware workloads to access the internet. - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $external_ip - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * @type string $edge_services_cidr - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $vmware_engine_network - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * @type string $description - * Optional. User-provided description for this network policy. - * @type string $vmware_engine_network_canonical - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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 this network policy. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/networkPolicies/my-network-policy` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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; - } - - /** - * Network service that allows VMware workloads to access the internet. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null - */ - public function getInternetAccess() - { - return $this->internet_access; - } - - public function hasInternetAccess() - { - return isset($this->internet_access); - } - - public function clearInternetAccess() - { - unset($this->internet_access); - } - - /** - * Network service that allows VMware workloads to access the internet. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService internet_access = 6; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var - * @return $this - */ - public function setInternetAccess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); - $this->internet_access = $var; - - return $this; - } - - /** - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService|null - */ - public function getExternalIp() - { - return $this->external_ip; - } - - public function hasExternalIp() - { - return isset($this->external_ip); - } - - public function clearExternalIp() - { - unset($this->external_ip); - } - - /** - * Network service that allows External IP addresses to be assigned to VMware - * workloads. This service can only be enabled when `internet_access` is also - * enabled. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService external_ip = 7; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService::class); - $this->external_ip = $var; - - return $this; - } - - /** - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * - * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEdgeServicesCidr() - { - return $this->edge_services_cidr; - } - - /** - * Required. IP address range in CIDR notation used to create internet access - * and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is - * required. The range cannot overlap with any prefixes either in the consumer - * VPC network or in use by the private clouds attached to that VPC network. - * - * Generated from protobuf field string edge_services_cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEdgeServicesCidr($var) - { - GPBUtil::checkString($var, True); - $this->edge_services_cidr = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - /** - * Optional. The relative resource name of the VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}` can either be a project number or a project ID. - * - * Generated from protobuf field string vmware_engine_network = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Optional. User-provided description for this network policy. - * - * Generated from protobuf field string description = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-provided description for this network policy. - * - * Generated from protobuf field string description = 13 [(.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 canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetworkCanonical() - { - return $this->vmware_engine_network_canonical; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkCanonical($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_canonical = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php deleted file mode 100644 index 7569a32d83be..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService - */ -class NetworkService extends \Google\Protobuf\Internal\Message -{ - /** - * True if the service is enabled; false otherwise. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * True if the service is enabled; false otherwise. - * @type int $state - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * True if the service is enabled; false otherwise. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * True if the service is enabled; false otherwise. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the service. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService\State::class); - $this->state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkService::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php deleted file mode 100644 index 7254794bb492..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NetworkPolicy/NetworkService/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State - */ -class State -{ - /** - * Unspecified service state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Service is not provisioned. - * - * Generated from protobuf enum UNPROVISIONED = 1; - */ - const UNPROVISIONED = 1; - /** - * Service is in the process of being provisioned/deprovisioned. - * - * Generated from protobuf enum RECONCILING = 2; - */ - const RECONCILING = 2; - /** - * Service is active. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::UNPROVISIONED => 'UNPROVISIONED', - self::RECONCILING => 'RECONCILING', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\NetworkPolicy_NetworkService_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php deleted file mode 100644 index 7967bc524fb7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node.php +++ /dev/null @@ -1,299 +0,0 @@ -google.cloud.vmwareengine.v1.Node - */ -class Node extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this node. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Fully qualified domain name of the node. - * - * Generated from protobuf field string fqdn = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $fqdn = ''; - /** - * Output only. Internal IP address of the node. - * - * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $internal_ip = ''; - /** - * Output only. The canonical identifier of the node type (corresponds to the - * `NodeType`). - * For example: standard-72. - * - * Generated from protobuf field string node_type_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_type_id = ''; - /** - * Output only. The version number of the VMware ESXi - * management component in this cluster. - * - * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version = ''; - /** - * Output only. Customized number of cores - * - * Generated from protobuf field int64 custom_core_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $custom_core_count = 0; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Node.State state = 7 [(.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 resource name of this node. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node - * @type string $fqdn - * Output only. Fully qualified domain name of the node. - * @type string $internal_ip - * Output only. Internal IP address of the node. - * @type string $node_type_id - * Output only. The canonical identifier of the node type (corresponds to the - * `NodeType`). - * For example: standard-72. - * @type string $version - * Output only. The version number of the VMware ESXi - * management component in this cluster. - * @type int|string $custom_core_count - * Output only. Customized number of cores - * @type int $state - * Output only. The state of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this node. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node - * - * 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 this node. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node - * - * 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. Fully qualified domain name of the node. - * - * Generated from protobuf field string fqdn = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Output only. Fully qualified domain name of the node. - * - * Generated from protobuf field string fqdn = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - - /** - * Output only. Internal IP address of the node. - * - * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Output only. Internal IP address of the node. - * - * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Output only. The canonical identifier of the node type (corresponds to the - * `NodeType`). - * For example: standard-72. - * - * Generated from protobuf field string node_type_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeTypeId() - { - return $this->node_type_id; - } - - /** - * Output only. The canonical identifier of the node type (corresponds to the - * `NodeType`). - * For example: standard-72. - * - * Generated from protobuf field string node_type_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeTypeId($var) - { - GPBUtil::checkString($var, True); - $this->node_type_id = $var; - - return $this; - } - - /** - * Output only. The version number of the VMware ESXi - * management component in this cluster. - * - * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Output only. The version number of the VMware ESXi - * management component in this cluster. - * - * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. Customized number of cores - * - * Generated from protobuf field int64 custom_core_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCustomCoreCount() - { - return $this->custom_core_count; - } - - /** - * Output only. Customized number of cores - * - * Generated from protobuf field int64 custom_core_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCustomCoreCount($var) - { - GPBUtil::checkInt64($var); - $this->custom_core_count = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Node.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Node.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Node\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php deleted file mode 100644 index 3c40d2fd6abd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Node/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.Node.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Node is operational and can be used by the user. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Node is being provisioned. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Node is in a failed state. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * Node is undergoing maintenance, e.g.: during private cloud upgrade. - * - * Generated from protobuf enum UPGRADING = 4; - */ - const UPGRADING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::FAILED => 'FAILED', - self::UPGRADING => 'UPGRADING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Node_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php deleted file mode 100644 index dd6e532b2efd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType.php +++ /dev/null @@ -1,439 +0,0 @@ -google.cloud.vmwareengine.v1.NodeType - */ -class NodeType extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * - * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_type_id = ''; - /** - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The total number of virtual CPUs in a single node. - * - * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $virtual_cpu_count = 0; - /** - * Output only. The total number of CPU cores in a single node. - * - * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_core_count = 0; - /** - * Output only. The amount of physical memory available, defined in GB. - * - * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_gb = 0; - /** - * Output only. The amount of storage available, defined in GB. - * - * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $disk_size_gb = 0; - /** - * Output only. List of possible values of custom core count. - * - * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $available_custom_core_counts; - /** - * Output only. The type of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NodeType.Kind kind = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kind = 0; - /** - * Output only. Families of the node type. - * For node types to be in the same cluster - * they must share at least one element in the `families`. - * - * Generated from protobuf field repeated string families = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $families; - /** - * Output only. Capabilities of this node type. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType.Capability capabilities = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $capabilities; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * @type string $node_type_id - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * @type string $display_name - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * @type int $virtual_cpu_count - * Output only. The total number of virtual CPUs in a single node. - * @type int $total_core_count - * Output only. The total number of CPU cores in a single node. - * @type int $memory_gb - * Output only. The amount of physical memory available, defined in GB. - * @type int $disk_size_gb - * Output only. The amount of storage available, defined in GB. - * @type array|\Google\Protobuf\Internal\RepeatedField $available_custom_core_counts - * Output only. List of possible values of custom core count. - * @type int $kind - * Output only. The type of the resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $families - * Output only. Families of the node type. - * For node types to be in the same cluster - * they must share at least one element in the `families`. - * @type array|\Google\Protobuf\Internal\RepeatedField $capabilities - * Output only. Capabilities of this node type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * 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 this node type. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72` - * - * 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 canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * - * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeTypeId() - { - return $this->node_type_id; - } - - /** - * Output only. The canonical identifier of the node type - * (corresponds to the `NodeType`). For example: standard-72. - * - * Generated from protobuf field string node_type_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeTypeId($var) - { - GPBUtil::checkString($var, True); - $this->node_type_id = $var; - - return $this; - } - - /** - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The friendly name for this node type. - * For example: ve1-standard-72 - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The total number of virtual CPUs in a single node. - * - * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVirtualCpuCount() - { - return $this->virtual_cpu_count; - } - - /** - * Output only. The total number of virtual CPUs in a single node. - * - * Generated from protobuf field int32 virtual_cpu_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVirtualCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->virtual_cpu_count = $var; - - return $this; - } - - /** - * Output only. The total number of CPU cores in a single node. - * - * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTotalCoreCount() - { - return $this->total_core_count; - } - - /** - * Output only. The total number of CPU cores in a single node. - * - * Generated from protobuf field int32 total_core_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTotalCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->total_core_count = $var; - - return $this; - } - - /** - * Output only. The amount of physical memory available, defined in GB. - * - * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Output only. The amount of physical memory available, defined in GB. - * - * Generated from protobuf field int32 memory_gb = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkInt32($var); - $this->memory_gb = $var; - - return $this; - } - - /** - * Output only. The amount of storage available, defined in GB. - * - * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Output only. The amount of storage available, defined in GB. - * - * Generated from protobuf field int32 disk_size_gb = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Output only. List of possible values of custom core count. - * - * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAvailableCustomCoreCounts() - { - return $this->available_custom_core_counts; - } - - /** - * Output only. List of possible values of custom core count. - * - * Generated from protobuf field repeated int32 available_custom_core_counts = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAvailableCustomCoreCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->available_custom_core_counts = $arr; - - return $this; - } - - /** - * Output only. The type of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NodeType.Kind kind = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. The type of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NodeType.Kind kind = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NodeType\Kind::class); - $this->kind = $var; - - return $this; - } - - /** - * Output only. Families of the node type. - * For node types to be in the same cluster - * they must share at least one element in the `families`. - * - * Generated from protobuf field repeated string families = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFamilies() - { - return $this->families; - } - - /** - * Output only. Families of the node type. - * For node types to be in the same cluster - * they must share at least one element in the `families`. - * - * Generated from protobuf field repeated string families = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFamilies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->families = $arr; - - return $this; - } - - /** - * Output only. Capabilities of this node type. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType.Capability capabilities = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCapabilities() - { - return $this->capabilities; - } - - /** - * Output only. Capabilities of this node type. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.NodeType.Capability capabilities = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCapabilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VmwareEngine\V1\NodeType\Capability::class); - $this->capabilities = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php deleted file mode 100644 index 9bdcbad5679a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Capability.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.vmwareengine.v1.NodeType.Capability - */ -class Capability -{ - /** - * The default value. This value is used if the capability is omitted or - * unknown. - * - * Generated from protobuf enum CAPABILITY_UNSPECIFIED = 0; - */ - const CAPABILITY_UNSPECIFIED = 0; - /** - * This node type supports stretch clusters. - * - * Generated from protobuf enum STRETCHED_CLUSTERS = 1; - */ - const STRETCHED_CLUSTERS = 1; - - private static $valueToName = [ - self::CAPABILITY_UNSPECIFIED => 'CAPABILITY_UNSPECIFIED', - self::STRETCHED_CLUSTERS => 'STRETCHED_CLUSTERS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Capability::class, \Google\Cloud\VmwareEngine\V1\NodeType_Capability::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php deleted file mode 100644 index 303da1b43211..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeType/Kind.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.NodeType.Kind - */ -class Kind -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum KIND_UNSPECIFIED = 0; - */ - const KIND_UNSPECIFIED = 0; - /** - * Standard HCI node. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * Storage only Node. - * - * Generated from protobuf enum STORAGE_ONLY = 2; - */ - const STORAGE_ONLY = 2; - - private static $valueToName = [ - self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::STORAGE_ONLY => 'STORAGE_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Kind::class, \Google\Cloud\VmwareEngine\V1\NodeType_Kind::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php deleted file mode 100644 index 5308613bd056..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/NodeTypeConfig.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.vmwareengine.v1.NodeTypeConfig - */ -class NodeTypeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The number of nodes of this type in the cluster - * - * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_count = 0; - /** - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * - * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $node_count - * Required. The number of nodes of this type in the cluster - * @type int $custom_core_count - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The number of nodes of this type in the cluster - * - * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Required. The number of nodes of this type in the cluster - * - * Generated from protobuf field int32 node_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * - * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCustomCoreCount() - { - return $this->custom_core_count; - } - - /** - * Optional. Customized number of cores available to each node of the type. - * This number must always be one of `nodeType.availableCustomCoreCounts`. - * If zero is provided max value from `nodeType.availableCustomCoreCounts` - * will be used. - * - * Generated from protobuf field int32 custom_core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCustomCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->custom_core_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php deleted file mode 100644 index 21cfc7076157..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmwareengine.v1.Nsx - */ -class Nsx extends \Google\Protobuf\Internal\Message -{ - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - */ - protected $internal_ip = ''; - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - */ - protected $fqdn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $internal_ip - * Internal IP address of the appliance. - * @type string $version - * Version of the appliance. - * @type int $state - * Output only. The state of the appliance. - * @type string $fqdn - * Fully qualified domain name of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Nsx\State::class); - $this->state = $var; - - return $this; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php deleted file mode 100644 index 768f7cb3f320..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Nsx/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.Nsx.State - */ -class State -{ - /** - * Unspecified appliance state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The appliance is operational and can be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The appliance is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Nsx_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php deleted file mode 100644 index a520f27cb3e3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/OperationMetadata.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.vmwareengine.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. True if the user has requested cancellation - * of the operation; false otherwise. - * 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. True if the user has requested cancellation - * of the operation; false otherwise. - * 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\Vmwareengine\V1\Vmwareengine::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. True if the user has requested cancellation - * of the operation; false otherwise. - * 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. True if the user has requested cancellation - * of the operation; false otherwise. - * 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php deleted file mode 100644 index ed79b2063cdf..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.vmwareengine.v1.PeeringRoute - */ -class PeeringRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Destination range of the peering route in CIDR notation. - * - * Generated from protobuf field string dest_range = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dest_range = ''; - /** - * Output only. Type of the route in the peer VPC network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Type type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Output only. Region containing the next hop of the peering route. This - * field only applies to dynamic routes in the peer VPC network. - * - * Generated from protobuf field string next_hop_region = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_hop_region = ''; - /** - * Output only. The priority of the peering route. - * - * Generated from protobuf field int64 priority = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $priority = 0; - /** - * Output only. True if the peering route has been imported from a peered - * VPC network; false otherwise. The import happens if the field - * `NetworkPeering.importCustomRoutes` is true for this network, - * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and - * the import does not result in a route conflict. - * - * Generated from protobuf field bool imported = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $imported = false; - /** - * Output only. Direction of the routes exchanged with the peer network, from - * the VMware Engine network perspective: - * * Routes of direction `INCOMING` are imported from the peer network. - * * Routes of direction `OUTGOING` are exported from the intranet VPC network - * of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Direction direction = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $direction = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dest_range - * Output only. Destination range of the peering route in CIDR notation. - * @type int $type - * Output only. Type of the route in the peer VPC network. - * @type string $next_hop_region - * Output only. Region containing the next hop of the peering route. This - * field only applies to dynamic routes in the peer VPC network. - * @type int|string $priority - * Output only. The priority of the peering route. - * @type bool $imported - * Output only. True if the peering route has been imported from a peered - * VPC network; false otherwise. The import happens if the field - * `NetworkPeering.importCustomRoutes` is true for this network, - * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and - * the import does not result in a route conflict. - * @type int $direction - * Output only. Direction of the routes exchanged with the peer network, from - * the VMware Engine network perspective: - * * Routes of direction `INCOMING` are imported from the peer network. - * * Routes of direction `OUTGOING` are exported from the intranet VPC network - * of the VMware Engine network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Destination range of the peering route in CIDR notation. - * - * Generated from protobuf field string dest_range = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDestRange() - { - return $this->dest_range; - } - - /** - * Output only. Destination range of the peering route in CIDR notation. - * - * Generated from protobuf field string dest_range = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDestRange($var) - { - GPBUtil::checkString($var, True); - $this->dest_range = $var; - - return $this; - } - - /** - * Output only. Type of the route in the peer VPC network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Type type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. Type of the route in the peer VPC network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Type type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PeeringRoute\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Region containing the next hop of the peering route. This - * field only applies to dynamic routes in the peer VPC network. - * - * Generated from protobuf field string next_hop_region = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextHopRegion() - { - return $this->next_hop_region; - } - - /** - * Output only. Region containing the next hop of the peering route. This - * field only applies to dynamic routes in the peer VPC network. - * - * Generated from protobuf field string next_hop_region = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextHopRegion($var) - { - GPBUtil::checkString($var, True); - $this->next_hop_region = $var; - - return $this; - } - - /** - * Output only. The priority of the peering route. - * - * Generated from protobuf field int64 priority = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Output only. The priority of the peering route. - * - * Generated from protobuf field int64 priority = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt64($var); - $this->priority = $var; - - return $this; - } - - /** - * Output only. True if the peering route has been imported from a peered - * VPC network; false otherwise. The import happens if the field - * `NetworkPeering.importCustomRoutes` is true for this network, - * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and - * the import does not result in a route conflict. - * - * Generated from protobuf field bool imported = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getImported() - { - return $this->imported; - } - - /** - * Output only. True if the peering route has been imported from a peered - * VPC network; false otherwise. The import happens if the field - * `NetworkPeering.importCustomRoutes` is true for this network, - * `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and - * the import does not result in a route conflict. - * - * Generated from protobuf field bool imported = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setImported($var) - { - GPBUtil::checkBool($var); - $this->imported = $var; - - return $this; - } - - /** - * Output only. Direction of the routes exchanged with the peer network, from - * the VMware Engine network perspective: - * * Routes of direction `INCOMING` are imported from the peer network. - * * Routes of direction `OUTGOING` are exported from the intranet VPC network - * of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Direction direction = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDirection() - { - return $this->direction; - } - - /** - * Output only. Direction of the routes exchanged with the peer network, from - * the VMware Engine network perspective: - * * Routes of direction `INCOMING` are imported from the peer network. - * * Routes of direction `OUTGOING` are exported from the intranet VPC network - * of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PeeringRoute.Direction direction = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PeeringRoute\Direction::class); - $this->direction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php deleted file mode 100644 index ca4028e37745..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Direction.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.PeeringRoute.Direction - */ -class Direction -{ - /** - * Unspecified exchanged routes direction. This is default. - * - * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; - */ - const DIRECTION_UNSPECIFIED = 0; - /** - * Routes imported from the peer network. - * - * Generated from protobuf enum INCOMING = 1; - */ - const INCOMING = 1; - /** - * Routes exported to the peer network. - * - * Generated from protobuf enum OUTGOING = 2; - */ - const OUTGOING = 2; - - private static $valueToName = [ - self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', - self::INCOMING => 'INCOMING', - self::OUTGOING => 'OUTGOING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Direction::class, \Google\Cloud\VmwareEngine\V1\PeeringRoute_Direction::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php deleted file mode 100644 index cda62b924e81..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PeeringRoute/Type.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.vmwareengine.v1.PeeringRoute.Type - */ -class Type -{ - /** - * Unspecified peering route type. This is the default value. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Dynamic routes in the peer network. - * - * Generated from protobuf enum DYNAMIC_PEERING_ROUTE = 1; - */ - const DYNAMIC_PEERING_ROUTE = 1; - /** - * Static routes in the peer network. - * - * Generated from protobuf enum STATIC_PEERING_ROUTE = 2; - */ - const STATIC_PEERING_ROUTE = 2; - /** - * Created, updated, and removed automatically by Google Cloud when subnets - * are created, modified, or deleted in the peer network. - * - * Generated from protobuf enum SUBNET_PEERING_ROUTE = 3; - */ - const SUBNET_PEERING_ROUTE = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::DYNAMIC_PEERING_ROUTE => 'DYNAMIC_PEERING_ROUTE', - self::STATIC_PEERING_ROUTE => 'STATIC_PEERING_ROUTE', - self::SUBNET_PEERING_ROUTE => 'SUBNET_PEERING_ROUTE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\PeeringRoute_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php deleted file mode 100644 index 5b096e7b45d9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Principal.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.vmwareengine.v1.Principal - */ -class Principal extends \Google\Protobuf\Internal\Message -{ - protected $principal; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $user - * The user who needs to be granted permission. - * @type string $service_account - * The service account which needs to be granted the permission. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * The user who needs to be granted permission. - * - * Generated from protobuf field string user = 1; - * @return string - */ - public function getUser() - { - return $this->readOneof(1); - } - - public function hasUser() - { - return $this->hasOneof(1); - } - - /** - * The user who needs to be granted permission. - * - * Generated from protobuf field string user = 1; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The service account which needs to be granted the permission. - * - * Generated from protobuf field string service_account = 2; - * @return string - */ - public function getServiceAccount() - { - return $this->readOneof(2); - } - - public function hasServiceAccount() - { - return $this->hasOneof(2); - } - - /** - * The service account which needs to be granted the permission. - * - * Generated from protobuf field string service_account = 2; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getPrincipal() - { - return $this->whichOneof("principal"); - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php deleted file mode 100644 index 1e778c354002..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud.php +++ /dev/null @@ -1,637 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud - */ -class PrivateCloud extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Time when the resource was scheduled for deletion. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. Time when the resource will be irreversibly deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Network configuration of the private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_config = null; - /** - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - */ - protected $management_cluster = null; - /** - * User-provided description for this private cloud. - * - * Generated from protobuf field string description = 11; - */ - protected $description = ''; - /** - * Output only. HCX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hcx = null; - /** - * Output only. NSX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $nsx = null; - /** - * Output only. Vcenter appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vcenter = null; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Optional. Type of the private cloud. Defaults to STANDARD. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.Type type = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. Time when the resource was scheduled for deletion. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Time when the resource will be irreversibly deleted. - * @type int $state - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * @type \Google\Cloud\VmwareEngine\V1\NetworkConfig $network_config - * Required. Network configuration of the private cloud. - * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $management_cluster - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * @type string $description - * User-provided description for this private cloud. - * @type \Google\Cloud\VmwareEngine\V1\Hcx $hcx - * Output only. HCX appliance. - * @type \Google\Cloud\VmwareEngine\V1\Nsx $nsx - * Output only. NSX appliance. - * @type \Google\Cloud\VmwareEngine\V1\Vcenter $vcenter - * Output only. Vcenter appliance. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type int $type - * Optional. Type of the private cloud. Defaults to STANDARD. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 this private cloud. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Time when the resource was scheduled for deletion. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.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. Time when the resource was scheduled for deletion. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 4 [(.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; - } - - /** - * Output only. Time when the resource will be irreversibly deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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. Time when the resource will be irreversibly deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 5 [(.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. State of the resource. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the resource. New values may be added to this enum - * when appropriate. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Network configuration of the private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkConfig|null - */ - public function getNetworkConfig() - { - return $this->network_config; - } - - public function hasNetworkConfig() - { - return isset($this->network_config); - } - - public function clearNetworkConfig() - { - unset($this->network_config); - } - - /** - * Required. Network configuration of the private cloud. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkConfig network_config = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkConfig $var - * @return $this - */ - public function setNetworkConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkConfig::class); - $this->network_config = $var; - - return $this; - } - - /** - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster|null - */ - public function getManagementCluster() - { - return $this->management_cluster; - } - - public function hasManagementCluster() - { - return isset($this->management_cluster); - } - - public function clearManagementCluster() - { - unset($this->management_cluster); - } - - /** - * Required. Input only. The management cluster for this private cloud. - * This field is required during creation of the private cloud to provide - * details for the default cluster. - * The following fields can't be changed after private cloud creation: - * `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster management_cluster = 10 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster $var - * @return $this - */ - public function setManagementCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\ManagementCluster::class); - $this->management_cluster = $var; - - return $this; - } - - /** - * User-provided description for this private cloud. - * - * Generated from protobuf field string description = 11; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this private cloud. - * - * Generated from protobuf field string description = 11; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. HCX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VmwareEngine\V1\Hcx|null - */ - public function getHcx() - { - return $this->hcx; - } - - public function hasHcx() - { - return isset($this->hcx); - } - - public function clearHcx() - { - unset($this->hcx); - } - - /** - * Output only. HCX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Hcx hcx = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VmwareEngine\V1\Hcx $var - * @return $this - */ - public function setHcx($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Hcx::class); - $this->hcx = $var; - - return $this; - } - - /** - * Output only. NSX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VmwareEngine\V1\Nsx|null - */ - public function getNsx() - { - return $this->nsx; - } - - public function hasNsx() - { - return isset($this->nsx); - } - - public function clearNsx() - { - unset($this->nsx); - } - - /** - * Output only. NSX appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Nsx nsx = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VmwareEngine\V1\Nsx $var - * @return $this - */ - public function setNsx($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Nsx::class); - $this->nsx = $var; - - return $this; - } - - /** - * Output only. Vcenter appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VmwareEngine\V1\Vcenter|null - */ - public function getVcenter() - { - return $this->vcenter; - } - - public function hasVcenter() - { - return isset($this->vcenter); - } - - public function clearVcenter() - { - unset($this->vcenter); - } - - /** - * Output only. Vcenter appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter vcenter = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VmwareEngine\V1\Vcenter $var - * @return $this - */ - public function setVcenter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Vcenter::class); - $this->vcenter = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. Type of the private cloud. Defaults to STANDARD. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.Type type = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Type of the private cloud. Defaults to STANDARD. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud.Type type = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php deleted file mode 100644 index df6000361aaf..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/ManagementCluster.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster - */ -class ManagementCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * - * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $node_type_configs; - /** - * Optional. Configuration of a stretched cluster. Required for STRETCHED - * private clouds. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $stretched_cluster_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_id - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * @type array|\Google\Protobuf\Internal\MapField $node_type_configs - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * @type \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $stretched_cluster_config - * Optional. Configuration of a stretched cluster. Required for STRETCHED - * private clouds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * - * Generated from protobuf field string cluster_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The user-provided identifier of the new `Cluster`. - * The identifier must meet the following requirements: - * * Only contains 1-63 alphanumeric characters and hyphens - * * Begins with an alphabetical character - * * Ends with a non-hyphen character - * * Not formatted as a UUID - * * Complies with [RFC - * 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5) - * - * Generated from protobuf field string cluster_id = 1 [(.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 map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getNodeTypeConfigs() - { - return $this->node_type_configs; - } - - /** - * Required. The map of cluster node types in this cluster, where the key is - * canonical identifier of the node type (corresponds to the `NodeType`). - * - * Generated from protobuf field map node_type_configs = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setNodeTypeConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\NodeTypeConfig::class); - $this->node_type_configs = $arr; - - return $this; - } - - /** - * Optional. Configuration of a stretched cluster. Required for STRETCHED - * private clouds. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig|null - */ - public function getStretchedClusterConfig() - { - return $this->stretched_cluster_config; - } - - public function hasStretchedClusterConfig() - { - return isset($this->stretched_cluster_config); - } - - public function clearStretchedClusterConfig() - { - unset($this->stretched_cluster_config); - } - - /** - * Optional. Configuration of a stretched cluster. Required for STRETCHED - * private clouds. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.StretchedClusterConfig stretched_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig $var - * @return $this - */ - public function setStretchedClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\StretchedClusterConfig::class); - $this->stretched_cluster_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ManagementCluster::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_ManagementCluster::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php deleted file mode 100644 index d7c021d20aec..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/State.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The private cloud is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The private cloud is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The private cloud is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The private cloud is in failed state. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The private cloud is scheduled for deletion. The deletion process can be - * cancelled by using the corresponding undelete method. - * - * Generated from protobuf enum DELETED = 6; - */ - const DELETED = 6; - /** - * The private cloud is irreversibly deleted and is being removed from the - * system. - * - * Generated from protobuf enum PURGING = 7; - */ - const PURGING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::FAILED => 'FAILED', - self::DELETED => 'DELETED', - self::PURGING => 'PURGING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php deleted file mode 100644 index 2b7257917ef9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateCloud/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateCloud.Type - */ -class Type -{ - /** - * Standard private is a zonal resource, with 3+ nodes. Default type. - * - * Generated from protobuf enum STANDARD = 0; - */ - const STANDARD = 0; - /** - * Time limited private cloud is a zonal resource, can have only 1 node and - * has limited life span. Will be deleted after defined period of time, - * can be converted into standard private cloud by expanding it up to 3 - * or more nodes. - * - * Generated from protobuf enum TIME_LIMITED = 1; - */ - const TIME_LIMITED = 1; - /** - * Stretched private cloud is a regional resource with redundancy, - * with a minimum of 6 nodes, nodes count has to be even. - * - * Generated from protobuf enum STRETCHED = 2; - */ - const STRETCHED = 2; - - private static $valueToName = [ - self::STANDARD => 'STANDARD', - self::TIME_LIMITED => 'TIME_LIMITED', - self::STRETCHED => 'STRETCHED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\PrivateCloud_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php deleted file mode 100644 index c68b2badfa67..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection.php +++ /dev/null @@ -1,604 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateConnection - */ -class PrivateConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the private connection. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User-provided description for this private connection. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. State of the private connection. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. The relative resource name of Legacy VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}`, `{location}` will be same as specified in private - * connection resource name and `{vmware_engine_network_id}` will be in the - * form of `{location}`-default e.g. - * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. - * - * Generated from protobuf field string vmware_engine_network = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network = ''; - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vmware_engine_network_canonical = ''; - /** - * Required. Private connection type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.Type type = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. VPC network peering id between given network VPC and - * VMwareEngineNetwork. - * - * Generated from protobuf field string peering_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $peering_id = ''; - /** - * Optional. Routing Mode. - * Default value is set to GLOBAL. - * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or - * REGIONAL, for other types only GLOBAL is supported. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode routing_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $routing_mode = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Required. Service network to create private connection. - * Specify the name in the following form: - * `projects/{project}/global/networks/{network_id}` - * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking - * VPC, e.g. projects/project-tp/global/networks/servicenetworking. - * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, - * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. - * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. - * projects/project-tp/global/networks/dell-tenant-vpc. - * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or - * any other producer VPC to which the VMware Engine Network needs to be - * connected, e.g. projects/project/global/networks/vpc. - * - * Generated from protobuf field string service_network = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_network = ''; - /** - * Output only. Peering state between service network and VMware Engine - * network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.PeeringState peering_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $peering_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the private connection. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $description - * Optional. User-provided description for this private connection. - * @type int $state - * Output only. State of the private connection. - * @type string $vmware_engine_network - * Required. The relative resource name of Legacy VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}`, `{location}` will be same as specified in private - * connection resource name and `{vmware_engine_network_id}` will be in the - * form of `{location}`-default e.g. - * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. - * @type string $vmware_engine_network_canonical - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * @type int $type - * Required. Private connection type. - * @type string $peering_id - * Output only. VPC network peering id between given network VPC and - * VMwareEngineNetwork. - * @type int $routing_mode - * Optional. Routing Mode. - * Default value is set to GLOBAL. - * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or - * REGIONAL, for other types only GLOBAL is supported. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $service_network - * Required. Service network to create private connection. - * Specify the name in the following form: - * `projects/{project}/global/networks/{network_id}` - * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking - * VPC, e.g. projects/project-tp/global/networks/servicenetworking. - * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, - * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. - * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. - * projects/project-tp/global/networks/dell-tenant-vpc. - * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or - * any other producer VPC to which the VMware Engine Network needs to be - * connected, e.g. projects/project/global/networks/vpc. - * @type int $peering_state - * Output only. Peering state between service network and VMware Engine - * network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the private connection. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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 private connection. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1/privateConnections/my-connection` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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; - } - - /** - * Optional. User-provided description for this private connection. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-provided description for this private connection. - * - * Generated from protobuf field string description = 4 [(.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 private connection. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the private connection. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. The relative resource name of Legacy VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}`, `{location}` will be same as specified in private - * connection resource name and `{vmware_engine_network_id}` will be in the - * form of `{location}`-default e.g. - * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. - * - * Generated from protobuf field string vmware_engine_network = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - /** - * Required. The relative resource name of Legacy VMware Engine network. - * Specify the name in the following form: - * `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * where `{project}`, `{location}` will be same as specified in private - * connection resource name and `{vmware_engine_network_id}` will be in the - * form of `{location}`-default e.g. - * projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default. - * - * Generated from protobuf field string vmware_engine_network = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVmwareEngineNetworkCanonical() - { - return $this->vmware_engine_network_canonical; - } - - /** - * Output only. The canonical name of the VMware Engine network in the form: - * `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` - * - * Generated from protobuf field string vmware_engine_network_canonical = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVmwareEngineNetworkCanonical($var) - { - GPBUtil::checkString($var, True); - $this->vmware_engine_network_canonical = $var; - - return $this; - } - - /** - * Required. Private connection type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.Type type = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Private connection type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.Type type = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. VPC network peering id between given network VPC and - * VMwareEngineNetwork. - * - * Generated from protobuf field string peering_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPeeringId() - { - return $this->peering_id; - } - - /** - * Output only. VPC network peering id between given network VPC and - * VMwareEngineNetwork. - * - * Generated from protobuf field string peering_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPeeringId($var) - { - GPBUtil::checkString($var, True); - $this->peering_id = $var; - - return $this; - } - - /** - * Optional. Routing Mode. - * Default value is set to GLOBAL. - * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or - * REGIONAL, for other types only GLOBAL is supported. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode routing_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRoutingMode() - { - return $this->routing_mode; - } - - /** - * Optional. Routing Mode. - * Default value is set to GLOBAL. - * For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or - * REGIONAL, for other types only GLOBAL is supported. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode routing_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRoutingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\RoutingMode::class); - $this->routing_mode = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Required. Service network to create private connection. - * Specify the name in the following form: - * `projects/{project}/global/networks/{network_id}` - * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking - * VPC, e.g. projects/project-tp/global/networks/servicenetworking. - * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, - * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. - * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. - * projects/project-tp/global/networks/dell-tenant-vpc. - * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or - * any other producer VPC to which the VMware Engine Network needs to be - * connected, e.g. projects/project/global/networks/vpc. - * - * Generated from protobuf field string service_network = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceNetwork() - { - return $this->service_network; - } - - /** - * Required. Service network to create private connection. - * Specify the name in the following form: - * `projects/{project}/global/networks/{network_id}` - * For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking - * VPC, e.g. projects/project-tp/global/networks/servicenetworking. - * For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, - * e.g. projects/project-tp/global/networks/netapp-tenant-vpc. - * For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. - * projects/project-tp/global/networks/dell-tenant-vpc. - * For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or - * any other producer VPC to which the VMware Engine Network needs to be - * connected, e.g. projects/project/global/networks/vpc. - * - * Generated from protobuf field string service_network = 16 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceNetwork($var) - { - GPBUtil::checkString($var, True); - $this->service_network = $var; - - return $this; - } - - /** - * Output only. Peering state between service network and VMware Engine - * network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.PeeringState peering_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPeeringState() - { - return $this->peering_state; - } - - /** - * Output only. Peering state between service network and VMware Engine - * network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection.PeeringState peering_state = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPeeringState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection\PeeringState::class); - $this->peering_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php deleted file mode 100644 index d35b801f864e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/PeeringState.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateConnection.PeeringState - */ -class PeeringState -{ - /** - * The default value. This value is used if the peering state is omitted or - * unknown. - * - * Generated from protobuf enum PEERING_STATE_UNSPECIFIED = 0; - */ - const PEERING_STATE_UNSPECIFIED = 0; - /** - * The peering is in active state. - * - * Generated from protobuf enum PEERING_ACTIVE = 1; - */ - const PEERING_ACTIVE = 1; - /** - * The peering is in inactive state. - * - * Generated from protobuf enum PEERING_INACTIVE = 2; - */ - const PEERING_INACTIVE = 2; - - private static $valueToName = [ - self::PEERING_STATE_UNSPECIFIED => 'PEERING_STATE_UNSPECIFIED', - self::PEERING_ACTIVE => 'PEERING_ACTIVE', - self::PEERING_INACTIVE => 'PEERING_INACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PeeringState::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_PeeringState::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php deleted file mode 100644 index 2642d234ccee..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/RoutingMode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode - */ -class RoutingMode -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum ROUTING_MODE_UNSPECIFIED = 0; - */ - const ROUTING_MODE_UNSPECIFIED = 0; - /** - * Global Routing Mode - * - * Generated from protobuf enum GLOBAL = 1; - */ - const PBGLOBAL = 1; - /** - * Regional Routing Mode - * - * Generated from protobuf enum REGIONAL = 2; - */ - const REGIONAL = 2; - - private static $valueToName = [ - self::ROUTING_MODE_UNSPECIFIED => 'ROUTING_MODE_UNSPECIFIED', - self::PBGLOBAL => 'GLOBAL', - self::REGIONAL => 'REGIONAL', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RoutingMode::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_RoutingMode::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php deleted file mode 100644 index dff8d99aa8fc..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/State.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateConnection.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; - /** - * The private connection is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The private connection is ready. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The private connection is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The private connection is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The private connection is not provisioned, since no private cloud is - * present for which this private connection is needed. - * - * Generated from protobuf enum UNPROVISIONED = 5; - */ - const UNPROVISIONED = 5; - /** - * The private connection is in failed state. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::UNPROVISIONED => 'UNPROVISIONED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php deleted file mode 100644 index d1b00632a382..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/PrivateConnection/Type.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.vmwareengine.v1.PrivateConnection.Type - */ -class Type -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Connection used for establishing [private services - * access](https://cloud.google.com/vpc/docs/private-services-access). - * - * Generated from protobuf enum PRIVATE_SERVICE_ACCESS = 1; - */ - const PRIVATE_SERVICE_ACCESS = 1; - /** - * Connection used for connecting to NetApp Cloud Volumes. - * - * Generated from protobuf enum NETAPP_CLOUD_VOLUMES = 2; - */ - const NETAPP_CLOUD_VOLUMES = 2; - /** - * Connection used for connecting to Dell PowerScale. - * - * Generated from protobuf enum DELL_POWERSCALE = 3; - */ - const DELL_POWERSCALE = 3; - /** - * Connection used for connecting to third-party services. - * - * Generated from protobuf enum THIRD_PARTY_SERVICE = 4; - */ - const THIRD_PARTY_SERVICE = 4; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PRIVATE_SERVICE_ACCESS => 'PRIVATE_SERVICE_ACCESS', - self::NETAPP_CLOUD_VOLUMES => 'NETAPP_CLOUD_VOLUMES', - self::DELL_POWERSCALE => 'DELL_POWERSCALE', - self::THIRD_PARTY_SERVICE => 'THIRD_PARTY_SERVICE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\PrivateConnection_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php deleted file mode 100644 index b438309f8d3c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RepairManagementDnsZoneBindingRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest - */ -class RepairManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the management DNS zone binding to repair. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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 resource name of the management DNS zone binding to repair. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * Please see {@see VmwareEngineClient::managementDnsZoneBindingName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\RepairManagementDnsZoneBindingRequest - * - * @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 management DNS zone binding to repair. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the management DNS zone binding to repair. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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 management DNS zone binding to repair. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding` - * - * 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php deleted file mode 100644 index 9da980200072..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetNsxCredentialsRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest - */ -class ResetNsxCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 $privateCloud Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ResetNsxCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php deleted file mode 100644 index a39d63627f24..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ResetVcenterCredentialsRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest - */ -class ResetVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. The username of the user to be to reset the credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value should be one of the following: - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $username = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ResetVcenterCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 string $username - * Optional. The username of the user to be to reset the credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value should be one of the following: - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to reset credentials for. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. The username of the user to be to reset the credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value should be one of the following: - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Optional. The username of the user to be to reset the credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value should be one of the following: - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php deleted file mode 100644 index 564092bc2a77..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/RevokeDnsBindPermissionRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest - */ -class RevokeDnsBindPermissionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $principal = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * Please see {@see VmwareEngineClient::dnsBindPermissionName()} for help formatting this field. - * @param \Google\Cloud\VmwareEngine\V1\Principal $principal Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * @return \Google\Cloud\VmwareEngine\V1\RevokeDnsBindPermissionRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\VmwareEngine\V1\Principal $principal): self - { - return (new self()) - ->setName($name) - ->setPrincipal($principal); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * @type \Google\Cloud\VmwareEngine\V1\Principal $principal - * Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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 resource which stores the users/service accounts - * having the permission to bind to the corresponding intranet VPC of the - * consumer project. DnsBindPermission is a global resource. Resource names - * are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. For example: - * `projects/my-project/locations/global/dnsBindPermission` - * - * 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 consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Principal|null - */ - public function getPrincipal() - { - return $this->principal; - } - - public function hasPrincipal() - { - return isset($this->principal); - } - - public function clearPrincipal() - { - unset($this->principal); - } - - /** - * Required. The consumer provided user/service account which needs to be - * granted permission to bind with the intranet VPC corresponding to the - * consumer project. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Principal principal = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Principal $var - * @return $this - */ - public function setPrincipal($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Principal::class); - $this->principal = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php deleted file mode 100644 index a84e71cca4cd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowNsxCredentialsRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest - */ -class ShowNsxCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ShowNsxCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php deleted file mode 100644 index 5201c0e2b530..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/ShowVcenterCredentialsRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest - */ -class ShowVcenterCredentialsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_cloud = ''; - /** - * Optional. The username of the user to be queried for credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value must be one of the following: - * CloudOwner@gve.local, - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $username = ''; - - /** - * @param string $privateCloud Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\ShowVcenterCredentialsRequest - * - * @experimental - */ - public static function build(string $privateCloud): self - { - return (new self()) - ->setPrivateCloud($privateCloud); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_cloud - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $username - * Optional. The username of the user to be queried for credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value must be one of the following: - * CloudOwner@gve.local, - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - /** - * Required. The resource name of the private cloud - * to be queried for credentials. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string private_cloud = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkString($var, True); - $this->private_cloud = $var; - - return $this; - } - - /** - * Optional. The username of the user to be queried for credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value must be one of the following: - * CloudOwner@gve.local, - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Optional. The username of the user to be queried for credentials. - * The default value of this field is CloudOwner@gve.local. - * The provided value must be one of the following: - * CloudOwner@gve.local, - * solution-user-01@gve.local, - * solution-user-02@gve.local, - * solution-user-03@gve.local, - * solution-user-04@gve.local, - * solution-user-05@gve.local, - * zertoadmin@gve.local. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php deleted file mode 100644 index fca19569c8eb..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/StretchedClusterConfig.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.vmwareengine.v1.StretchedClusterConfig - */ -class StretchedClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Zone that will remain operational when connection between the two - * zones is lost. Specify the resource name of a zone that belongs to the - * region of the private cloud. For example: - * `projects/{project}/locations/europe-west3-a` where `{project}` can either - * be a project number or a project ID. - * - * Generated from protobuf field string preferred_location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $preferred_location = ''; - /** - * Required. Additional zone for a higher level of availability and load - * balancing. Specify the resource name of a zone that belongs to the region - * of the private cloud. For example: - * `projects/{project}/locations/europe-west3-b` where `{project}` can either - * be a project number or a project ID. - * - * Generated from protobuf field string secondary_location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $secondary_location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $preferred_location - * Required. Zone that will remain operational when connection between the two - * zones is lost. Specify the resource name of a zone that belongs to the - * region of the private cloud. For example: - * `projects/{project}/locations/europe-west3-a` where `{project}` can either - * be a project number or a project ID. - * @type string $secondary_location - * Required. Additional zone for a higher level of availability and load - * balancing. Specify the resource name of a zone that belongs to the region - * of the private cloud. For example: - * `projects/{project}/locations/europe-west3-b` where `{project}` can either - * be a project number or a project ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Zone that will remain operational when connection between the two - * zones is lost. Specify the resource name of a zone that belongs to the - * region of the private cloud. For example: - * `projects/{project}/locations/europe-west3-a` where `{project}` can either - * be a project number or a project ID. - * - * Generated from protobuf field string preferred_location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPreferredLocation() - { - return $this->preferred_location; - } - - /** - * Required. Zone that will remain operational when connection between the two - * zones is lost. Specify the resource name of a zone that belongs to the - * region of the private cloud. For example: - * `projects/{project}/locations/europe-west3-a` where `{project}` can either - * be a project number or a project ID. - * - * Generated from protobuf field string preferred_location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPreferredLocation($var) - { - GPBUtil::checkString($var, True); - $this->preferred_location = $var; - - return $this; - } - - /** - * Required. Additional zone for a higher level of availability and load - * balancing. Specify the resource name of a zone that belongs to the region - * of the private cloud. For example: - * `projects/{project}/locations/europe-west3-b` where `{project}` can either - * be a project number or a project ID. - * - * Generated from protobuf field string secondary_location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSecondaryLocation() - { - return $this->secondary_location; - } - - /** - * Required. Additional zone for a higher level of availability and load - * balancing. Specify the resource name of a zone that belongs to the region - * of the private cloud. For example: - * `projects/{project}/locations/europe-west3-b` where `{project}` can either - * be a project number or a project ID. - * - * Generated from protobuf field string secondary_location = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSecondaryLocation($var) - { - GPBUtil::checkString($var, True); - $this->secondary_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php deleted file mode 100644 index dc5ded5f9a43..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.vmwareengine.v1.Subnet - */ -class Subnet extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * - * Generated from protobuf field string ip_cidr_range = 7; - */ - protected $ip_cidr_range = ''; - /** - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * - * Generated from protobuf field string gateway_ip = 8; - */ - protected $gateway_ip = ''; - /** - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * - * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. VLAN ID of the VLAN on which the subnet is configured - * - * Generated from protobuf field int32 vlan_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vlan_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * @type string $ip_cidr_range - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * @type string $gateway_ip - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * @type string $type - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * @type int $state - * Output only. The state of the resource. - * @type int $vlan_id - * Output only. VLAN ID of the VLAN on which the subnet is configured - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * 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 this subnet. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` - * - * 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 IP address range of the subnet in CIDR format '10.0.0.0/24'. - * - * Generated from protobuf field string ip_cidr_range = 7; - * @return string - */ - public function getIpCidrRange() - { - return $this->ip_cidr_range; - } - - /** - * The IP address range of the subnet in CIDR format '10.0.0.0/24'. - * - * Generated from protobuf field string ip_cidr_range = 7; - * @param string $var - * @return $this - */ - public function setIpCidrRange($var) - { - GPBUtil::checkString($var, True); - $this->ip_cidr_range = $var; - - return $this; - } - - /** - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * - * Generated from protobuf field string gateway_ip = 8; - * @return string - */ - public function getGatewayIp() - { - return $this->gateway_ip; - } - - /** - * The IP address of the gateway of this subnet. - * Must fall within the IP prefix defined above. - * - * Generated from protobuf field string gateway_ip = 8; - * @param string $var - * @return $this - */ - public function setGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->gateway_ip = $var; - - return $this; - } - - /** - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * - * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the subnet. For example "management" or - * "userDefined". - * - * Generated from protobuf field string type = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the resource. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Subnet\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. VLAN ID of the VLAN on which the subnet is configured - * - * Generated from protobuf field int32 vlan_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVlanId() - { - return $this->vlan_id; - } - - /** - * Output only. VLAN ID of the VLAN on which the subnet is configured - * - * Generated from protobuf field int32 vlan_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVlanId($var) - { - GPBUtil::checkInt32($var); - $this->vlan_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php deleted file mode 100644 index 41e7a6b5b77f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Subnet/State.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.vmwareengine.v1.Subnet.State - */ -class State -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The subnet is ready. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The subnet is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The subnet is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The subnet is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Changes requested in the last operation are being propagated. - * - * Generated from protobuf enum RECONCILING = 5; - */ - const RECONCILING = 5; - /** - * Last operation on the subnet did not succeed. Subnet's payload is - * reverted back to its most recent working state. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::RECONCILING => 'RECONCILING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Subnet_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php deleted file mode 100644 index 821fbcbc6865..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UndeletePrivateCloudRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest - */ -class UndeletePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. 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 resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * Please see {@see VmwareEngineClient::privateCloudName()} for help formatting this field. - * - * @return \Google\Cloud\VmwareEngine\V1\UndeletePrivateCloudRequest - * - * @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 private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * @type string $request_id - * Optional. 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 private cloud scheduled for deletion. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/us-central1-a/privateClouds/my-cloud` - * - * 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 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. 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php deleted file mode 100644 index badc304f0823..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateClusterRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.vmwareengine.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 `updateMask` - * 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 description of the cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. 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. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\VmwareEngine\V1\Cluster $cluster Required. The description of the cluster. - * @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 `updateMask` - * 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\VmwareEngine\V1\UpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\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 `updateMask` - * 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\VmwareEngine\V1\Cluster $cluster - * Required. The description of the cluster. - * @type string $request_id - * Optional. The request ID must be a valid UUID with the exception that - * zero UUID is not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::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 `updateMask` - * 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 `updateMask` - * 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 description of the cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The description of the cluster. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. 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. 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. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. True if you want the request to be validated and not executed; - * false otherwise. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php deleted file mode 100644 index 8d37ab7be38e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateDnsForwardingRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest - */ -class UpdateDnsForwardingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. DnsForwarding config details. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.DnsForwarding dns_forwarding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dns_forwarding = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `DnsForwarding` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\VmwareEngine\V1\DnsForwarding $dnsForwarding Required. DnsForwarding config details. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `DnsForwarding` 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\VmwareEngine\V1\UpdateDnsForwardingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\DnsForwarding $dnsForwarding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDnsForwarding($dnsForwarding) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\DnsForwarding $dns_forwarding - * Required. DnsForwarding config details. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `DnsForwarding` 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 string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. DnsForwarding config details. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.DnsForwarding dns_forwarding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\DnsForwarding|null - */ - public function getDnsForwarding() - { - return $this->dns_forwarding; - } - - public function hasDnsForwarding() - { - return isset($this->dns_forwarding); - } - - public function clearDnsForwarding() - { - unset($this->dns_forwarding); - } - - /** - * Required. DnsForwarding config details. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.DnsForwarding dns_forwarding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\DnsForwarding $var - * @return $this - */ - public function setDnsForwarding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\DnsForwarding::class); - $this->dns_forwarding = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `DnsForwarding` 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 = 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 - * `DnsForwarding` 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 = 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; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php deleted file mode 100644 index 7012b7dd0069..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAccessRuleRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest - */ -class UpdateExternalAccessRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `ExternalAccessRule` 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. Description of the external access rule. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_access_rule = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\VmwareEngine\V1\ExternalAccessRule $externalAccessRule Required. Description of the external access rule. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `ExternalAccessRule` 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\VmwareEngine\V1\UpdateExternalAccessRuleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\ExternalAccessRule $externalAccessRule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setExternalAccessRule($externalAccessRule) - ->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 - * `ExternalAccessRule` 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\VmwareEngine\V1\ExternalAccessRule $external_access_rule - * Required. Description of the external access rule. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `ExternalAccessRule` 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 - * `ExternalAccessRule` 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. Description of the external access rule. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\ExternalAccessRule|null - */ - public function getExternalAccessRule() - { - return $this->external_access_rule; - } - - public function hasExternalAccessRule() - { - return isset($this->external_access_rule); - } - - public function clearExternalAccessRule() - { - unset($this->external_access_rule); - } - - /** - * Required. Description of the external access rule. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAccessRule external_access_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\ExternalAccessRule $var - * @return $this - */ - public function setExternalAccessRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAccessRule::class); - $this->external_access_rule = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php deleted file mode 100644 index 9b39c54b907a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateExternalAddressRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateExternalAddressRequest - */ -class UpdateExternalAddressRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `ExternalAddress` 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. External IP address description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $external_address = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\VmwareEngine\V1\ExternalAddress $externalAddress Required. External IP address description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `ExternalAddress` 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\VmwareEngine\V1\UpdateExternalAddressRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\ExternalAddress $externalAddress, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setExternalAddress($externalAddress) - ->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 - * `ExternalAddress` 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\VmwareEngine\V1\ExternalAddress $external_address - * Required. External IP address description. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `ExternalAddress` 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 - * `ExternalAddress` 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. External IP address description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\ExternalAddress|null - */ - public function getExternalAddress() - { - return $this->external_address; - } - - public function hasExternalAddress() - { - return isset($this->external_address); - } - - public function clearExternalAddress() - { - unset($this->external_address); - } - - /** - * Required. External IP address description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ExternalAddress external_address = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\ExternalAddress $var - * @return $this - */ - public function setExternalAddress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ExternalAddress::class); - $this->external_address = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php deleted file mode 100644 index a1fa394ba6f0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateLoggingServerRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateLoggingServerRequest - */ -class UpdateLoggingServerRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `LoggingServer` 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. Logging server description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $logging_server = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\VmwareEngine\V1\LoggingServer $loggingServer Required. Logging server description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `LoggingServer` 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\VmwareEngine\V1\UpdateLoggingServerRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\LoggingServer $loggingServer, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setLoggingServer($loggingServer) - ->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 - * `LoggingServer` 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\VmwareEngine\V1\LoggingServer $logging_server - * Required. Logging server description. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `LoggingServer` 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 - * `LoggingServer` 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. Logging server description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\LoggingServer|null - */ - public function getLoggingServer() - { - return $this->logging_server; - } - - public function hasLoggingServer() - { - return isset($this->logging_server); - } - - public function clearLoggingServer() - { - unset($this->logging_server); - } - - /** - * Required. Logging server description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.LoggingServer logging_server = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\LoggingServer $var - * @return $this - */ - public function setLoggingServer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\LoggingServer::class); - $this->logging_server = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php deleted file mode 100644 index 5080e3c59eb6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateManagementDnsZoneBindingRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest - */ -class UpdateManagementDnsZoneBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `ManagementDnsZoneBinding` 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. New values to update the management DNS zone binding with. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $management_dns_zone_binding = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding Required. New values to update the management DNS zone binding with. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `ManagementDnsZoneBinding` 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\VmwareEngine\V1\UpdateManagementDnsZoneBindingRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $managementDnsZoneBinding, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setManagementDnsZoneBinding($managementDnsZoneBinding) - ->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 - * `ManagementDnsZoneBinding` 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\VmwareEngine\V1\ManagementDnsZoneBinding $management_dns_zone_binding - * Required. New values to update the management DNS zone binding with. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `ManagementDnsZoneBinding` 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 - * `ManagementDnsZoneBinding` 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. New values to update the management DNS zone binding with. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding|null - */ - public function getManagementDnsZoneBinding() - { - return $this->management_dns_zone_binding; - } - - public function hasManagementDnsZoneBinding() - { - return isset($this->management_dns_zone_binding); - } - - public function clearManagementDnsZoneBinding() - { - unset($this->management_dns_zone_binding); - } - - /** - * Required. New values to update the management DNS zone binding with. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.ManagementDnsZoneBinding management_dns_zone_binding = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding $var - * @return $this - */ - public function setManagementDnsZoneBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding::class); - $this->management_dns_zone_binding = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if the original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php deleted file mode 100644 index cb753c3e50ff..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPeeringRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest - */ -class UpdateNetworkPeeringRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Network peering description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_peering = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPeering` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\VmwareEngine\V1\NetworkPeering $networkPeering Required. Network peering description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPeering` 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\VmwareEngine\V1\UpdateNetworkPeeringRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\NetworkPeering $networkPeering, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNetworkPeering($networkPeering) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\NetworkPeering $network_peering - * Required. Network peering description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPeering` 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 string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Network peering description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPeering|null - */ - public function getNetworkPeering() - { - return $this->network_peering; - } - - public function hasNetworkPeering() - { - return isset($this->network_peering); - } - - public function clearNetworkPeering() - { - unset($this->network_peering); - } - - /** - * Required. Network peering description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPeering network_peering = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPeering $var - * @return $this - */ - public function setNetworkPeering($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPeering::class); - $this->network_peering = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPeering` 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 = 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 - * `NetworkPeering` 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 = 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; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php deleted file mode 100644 index 7fddaaad169e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateNetworkPolicyRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest - */ -class UpdateNetworkPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Network policy description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network_policy = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\VmwareEngine\V1\NetworkPolicy $networkPolicy Required. Network policy description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` 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\VmwareEngine\V1\UpdateNetworkPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\NetworkPolicy $networkPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\NetworkPolicy $network_policy - * Required. Network policy description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` 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 string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Network policy description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\NetworkPolicy|null - */ - public function getNetworkPolicy() - { - return $this->network_policy; - } - - public function hasNetworkPolicy() - { - return isset($this->network_policy); - } - - public function clearNetworkPolicy() - { - unset($this->network_policy); - } - - /** - * Required. Network policy description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.NetworkPolicy network_policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\NetworkPolicy $var - * @return $this - */ - public function setNetworkPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy::class); - $this->network_policy = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `NetworkPolicy` 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 = 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 - * `NetworkPolicy` 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 = 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; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php deleted file mode 100644 index 16c19f6e1410..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateCloudRequest.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest - */ -class UpdatePrivateCloudRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Private cloud description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_cloud = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. 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\VmwareEngine\V1\PrivateCloud $privateCloud Required. Private cloud description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * 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\VmwareEngine\V1\UpdatePrivateCloudRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\PrivateCloud $privateCloud, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\PrivateCloud $private_cloud - * Required. Private cloud description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * 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 string $request_id - * Optional. 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Private cloud description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateCloud|null - */ - public function getPrivateCloud() - { - return $this->private_cloud; - } - - public function hasPrivateCloud() - { - return isset($this->private_cloud); - } - - public function clearPrivateCloud() - { - unset($this->private_cloud); - } - - /** - * Required. Private cloud description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateCloud private_cloud = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateCloud $var - * @return $this - */ - public function setPrivateCloud($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateCloud::class); - $this->private_cloud = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * 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 = 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 - * `PrivateCloud` resource by the update. The fields specified in `updateMask` - * 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 = 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; - } - - /** - * Optional. 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. 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php deleted file mode 100644 index 24fa1e9a5ae6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdatePrivateConnectionRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest - */ -class UpdatePrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Private connection description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_connection = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateConnection` 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\VmwareEngine\V1\PrivateConnection $privateConnection Required. Private connection description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateConnection` 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\VmwareEngine\V1\UpdatePrivateConnectionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\PrivateConnection $privateConnection, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPrivateConnection($privateConnection) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\PrivateConnection $private_connection - * Required. Private connection description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateConnection` 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 string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Private connection description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\PrivateConnection|null - */ - public function getPrivateConnection() - { - return $this->private_connection; - } - - public function hasPrivateConnection() - { - return isset($this->private_connection); - } - - public function clearPrivateConnection() - { - unset($this->private_connection); - } - - /** - * Required. Private connection description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.PrivateConnection private_connection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\PrivateConnection $var - * @return $this - */ - public function setPrivateConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\PrivateConnection::class); - $this->private_connection = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PrivateConnection` 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 = 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 - * `PrivateConnection` 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 = 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; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php deleted file mode 100644 index b4877c06c757..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateSubnetRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateSubnetRequest - */ -class UpdateSubnetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Subnet` 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. Subnet description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet = null; - - /** - * @param \Google\Cloud\VmwareEngine\V1\Subnet $subnet Required. Subnet description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Subnet` 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\VmwareEngine\V1\UpdateSubnetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\Subnet $subnet, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSubnet($subnet) - ->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 - * `Subnet` 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\VmwareEngine\V1\Subnet $subnet - * Required. Subnet description. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Subnet` 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 - * `Subnet` 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. Subnet description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\Subnet|null - */ - public function getSubnet() - { - return $this->subnet; - } - - public function hasSubnet() - { - return isset($this->subnet); - } - - public function clearSubnet() - { - unset($this->subnet); - } - - /** - * Required. Subnet description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Subnet subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\Subnet $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\Subnet::class); - $this->subnet = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php deleted file mode 100644 index 38f1091baa29..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/UpdateVmwareEngineNetworkRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest - */ -class UpdateVmwareEngineNetworkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. VMware Engine network description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vmware_engine_network = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network 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. Only the - * following fields can be updated: `description`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork Required. VMware Engine network description. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network 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. Only the - * following fields can be updated: `description`. - * - * @return \Google\Cloud\VmwareEngine\V1\UpdateVmwareEngineNetworkRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmwareEngineNetwork, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $vmware_engine_network - * Required. VMware Engine network description. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network 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. Only the - * following fields can be updated: `description`. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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\Vmwareengine\V1\Vmwareengine::initOnce(); - parent::__construct($data); - } - - /** - * Required. VMware Engine network description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork|null - */ - public function getVmwareEngineNetwork() - { - return $this->vmware_engine_network; - } - - public function hasVmwareEngineNetwork() - { - return isset($this->vmware_engine_network); - } - - public function clearVmwareEngineNetwork() - { - unset($this->vmware_engine_network); - } - - /** - * Required. VMware Engine network description. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork vmware_engine_network = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork $var - * @return $this - */ - public function setVmwareEngineNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork::class); - $this->vmware_engine_network = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * VMware Engine network 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. Only the - * following fields can be updated: `description`. - * - * 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 - * VMware Engine network 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. Only the - * following fields can be updated: `description`. - * - * 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; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server guarantees that a - * request doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php deleted file mode 100644 index 1d7fb8297ae3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.vmwareengine.v1.Vcenter - */ -class Vcenter extends \Google\Protobuf\Internal\Message -{ - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - */ - protected $internal_ip = ''; - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - */ - protected $fqdn = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $internal_ip - * Internal IP address of the appliance. - * @type string $version - * Version of the appliance. - * @type int $state - * Output only. The state of the appliance. - * @type string $fqdn - * Fully qualified domain name of the appliance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the appliance. - * - * Generated from protobuf field string internal_ip = 2; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Version of the appliance. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the appliance. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.Vcenter.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\Vcenter\State::class); - $this->state = $var; - - return $this; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name of the appliance. - * - * Generated from protobuf field string fqdn = 6; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php deleted file mode 100644 index 37b87d5973f6..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/Vcenter/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.vmwareengine.v1.Vcenter.State - */ -class State -{ - /** - * Unspecified appliance state. This is the default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The appliance is operational and can be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The appliance is being deployed. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\Vcenter_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php deleted file mode 100644 index 11b48b25b570..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork.php +++ /dev/null @@ -1,396 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork - */ -class VmwareEngineNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update time of this resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-provided description for this VMware Engine network. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $vpc_networks; - /** - * Output only. State of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. VMware Engine network type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * - * Generated from protobuf field string etag = 10; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation time of this resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update time of this resource. - * @type string $description - * User-provided description for this VMware Engine network. - * @type array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $vpc_networks - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * @type int $state - * Output only. State of the VMware Engine network. - * @type int $type - * Required. VMware Engine network type. - * @type string $uid - * Output only. System-generated unique identifier for the resource. - * @type string $etag - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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 VMware Engine network. - * Resource names are schemeless URIs that follow the conventions in - * https://cloud.google.com/apis/design/resource_names. - * For example: - * `projects/my-project/locations/global/vmwareEngineNetworks/my-network` - * - * 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. Creation time of this resource. - * - * 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. Creation time of this resource. - * - * 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. Last update time of this resource. - * - * 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. Last update time of this resource. - * - * 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; - } - - /** - * User-provided description for this VMware Engine network. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * User-provided description for this VMware Engine network. - * - * 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; - } - - /** - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVpcNetworks() - { - return $this->vpc_networks; - } - - /** - * Output only. VMware Engine service VPC networks that provide connectivity - * from a private cloud to customer projects, the internet, and other Google - * Cloud services. - * - * Generated from protobuf field repeated .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork vpc_networks = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVpcNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork::class); - $this->vpc_networks = $arr; - - return $this; - } - - /** - * Output only. State of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the VMware Engine network. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. VMware Engine network type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. VMware Engine network type. - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System-generated unique identifier for the resource. - * - * Generated from protobuf field string uid = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * - * Generated from protobuf field string etag = 10; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Checksum that may be sent on update and delete requests to ensure that the - * user-provided value is up to date before the server processes a request. - * The server computes checksums based on the value of other fields in the - * request. - * - * Generated from protobuf field string etag = 10; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php deleted file mode 100644 index 3f8a6067ccdb..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.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; - /** - * The VMware Engine network is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The VMware Engine network is ready. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The VMware Engine network is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The VMware Engine network is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_State::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php deleted file mode 100644 index 28f91974aaa7..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/Type.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type - */ -class Type -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Network type used by private clouds created in projects without a network - * of type `STANDARD`. This network type is no longer used for new VMware - * Engine private cloud deployments. - * - * Generated from protobuf enum LEGACY = 1; - */ - const LEGACY = 1; - /** - * Standard network type used for private cloud connectivity. - * - * Generated from protobuf enum STANDARD = 2; - */ - const STANDARD = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::LEGACY => 'LEGACY', - self::STANDARD => 'STANDARD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php deleted file mode 100644 index 9ef0665f0e7f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork - */ -class VpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * @type string $network - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. Type of VPC network (INTRANET, INTERNET, or - * GOOGLE_CLOUD) - * - * Generated from protobuf field .google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\VpcNetwork\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Output only. The relative resource name of the service VPC network this - * VMware Engine network is attached to. For example: - * `projects/123123/global/networks/my-network` - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VpcNetwork::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php b/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php deleted file mode 100644 index 194c6e10931a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/proto/src/Google/Cloud/VmwareEngine/V1/VmwareEngineNetwork/VpcNetwork/Type.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type - */ -class Type -{ - /** - * The default value. This value should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * VPC network that will be peered with a consumer VPC network or the - * intranet VPC of another VMware Engine network. Access a private cloud - * through Compute Engine VMs on a peered VPC network or an on-premises - * resource connected to a peered consumer VPC network. - * - * Generated from protobuf enum INTRANET = 1; - */ - const INTRANET = 1; - /** - * VPC network used for internet access to and from a private cloud. - * - * Generated from protobuf enum INTERNET = 2; - */ - const INTERNET = 2; - /** - * VPC network used for access to Google Cloud services like - * Cloud Storage. - * - * Generated from protobuf enum GOOGLE_CLOUD = 3; - */ - const GOOGLE_CLOUD = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::INTRANET => 'INTRANET', - self::INTERNET => 'INTERNET', - self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork_VpcNetwork_Type::class); - diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php deleted file mode 100644 index d8d26b139c8c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_cluster.php +++ /dev/null @@ -1,111 +0,0 @@ -setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $clusterId = '[CLUSTER_ID]'; - - create_cluster_sample($formattedParent, $clusterId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php deleted file mode 100644 index 5d130ca4ca6b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_access_rule.php +++ /dev/null @@ -1,109 +0,0 @@ -setParent($formattedParent) - ->setExternalAccessRule($externalAccessRule) - ->setExternalAccessRuleId($externalAccessRuleId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createExternalAccessRule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExternalAccessRule $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 = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - $externalAccessRuleId = '[EXTERNAL_ACCESS_RULE_ID]'; - - create_external_access_rule_sample($formattedParent, $externalAccessRuleId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php deleted file mode 100644 index 7e0fb92de484..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_external_address.php +++ /dev/null @@ -1,109 +0,0 @@ -setParent($formattedParent) - ->setExternalAddress($externalAddress) - ->setExternalAddressId($externalAddressId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createExternalAddress($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExternalAddress $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $externalAddressId = '[EXTERNAL_ADDRESS_ID]'; - - create_external_address_sample($formattedParent, $externalAddressId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php deleted file mode 100644 index adc1f4527850..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_hcx_activation_key.php +++ /dev/null @@ -1,108 +0,0 @@ -setParent($formattedParent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createHcxActivationKey($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var HcxActivationKey $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $hcxActivationKeyId = '[HCX_ACTIVATION_KEY_ID]'; - - create_hcx_activation_key_sample($formattedParent, $hcxActivationKeyId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php deleted file mode 100644 index 8371739f6ba3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_logging_server.php +++ /dev/null @@ -1,136 +0,0 @@ -setHostname($loggingServerHostname) - ->setPort($loggingServerPort) - ->setProtocol($loggingServerProtocol) - ->setSourceType($loggingServerSourceType); - $request = (new CreateLoggingServerRequest()) - ->setParent($formattedParent) - ->setLoggingServer($loggingServer) - ->setLoggingServerId($loggingServerId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createLoggingServer($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LoggingServer $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $loggingServerHostname = '[HOSTNAME]'; - $loggingServerPort = 0; - $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; - $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; - $loggingServerId = '[LOGGING_SERVER_ID]'; - - create_logging_server_sample( - $formattedParent, - $loggingServerHostname, - $loggingServerPort, - $loggingServerProtocol, - $loggingServerSourceType, - $loggingServerId - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php deleted file mode 100644 index a6ecfb793e8f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php +++ /dev/null @@ -1,116 +0,0 @@ -setParent($formattedParent) - ->setManagementDnsZoneBinding($managementDnsZoneBinding) - ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createManagementDnsZoneBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - $managementDnsZoneBindingId = '[MANAGEMENT_DNS_ZONE_BINDING_ID]'; - - create_management_dns_zone_binding_sample($formattedParent, $managementDnsZoneBindingId); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php deleted file mode 100644 index d882fe57501b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_peering.php +++ /dev/null @@ -1,140 +0,0 @@ -setPeerNetwork($networkPeeringPeerNetwork) - ->setPeerNetworkType($networkPeeringPeerNetworkType) - ->setVmwareEngineNetwork($formattedNetworkPeeringVmwareEngineNetwork); - $request = (new CreateNetworkPeeringRequest()) - ->setParent($formattedParent) - ->setNetworkPeeringId($networkPeeringId) - ->setNetworkPeering($networkPeering); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createNetworkPeering($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NetworkPeering $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $networkPeeringId = '[NETWORK_PEERING_ID]'; - $networkPeeringPeerNetwork = '[PEER_NETWORK]'; - $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; - $formattedNetworkPeeringVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - - create_network_peering_sample( - $formattedParent, - $networkPeeringId, - $networkPeeringPeerNetwork, - $networkPeeringPeerNetworkType, - $formattedNetworkPeeringVmwareEngineNetwork - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php deleted file mode 100644 index bac7d58c4a6c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_network_policy.php +++ /dev/null @@ -1,115 +0,0 @@ -setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $request = (new CreateNetworkPolicyRequest()) - ->setParent($formattedParent) - ->setNetworkPolicyId($networkPolicyId) - ->setNetworkPolicy($networkPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createNetworkPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NetworkPolicy $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = '[NETWORK_POLICY_ID]'; - $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; - - create_network_policy_sample($formattedParent, $networkPolicyId, $networkPolicyEdgeServicesCidr); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php deleted file mode 100644 index 11b2960c57e5..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_cloud.php +++ /dev/null @@ -1,139 +0,0 @@ -setManagementCidr($privateCloudNetworkConfigManagementCidr); - $privateCloudManagementClusterNodeTypeConfigs = []; - $privateCloudManagementCluster = (new ManagementCluster()) - ->setClusterId($privateCloudManagementClusterClusterId) - ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); - $privateCloud = (new PrivateCloud()) - ->setNetworkConfig($privateCloudNetworkConfig) - ->setManagementCluster($privateCloudManagementCluster); - $request = (new CreatePrivateCloudRequest()) - ->setParent($formattedParent) - ->setPrivateCloudId($privateCloudId) - ->setPrivateCloud($privateCloud); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createPrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = '[PRIVATE_CLOUD_ID]'; - $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; - $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; - - create_private_cloud_sample( - $formattedParent, - $privateCloudId, - $privateCloudNetworkConfigManagementCidr, - $privateCloudManagementClusterClusterId - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php deleted file mode 100644 index a5080cc3743e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_private_connection.php +++ /dev/null @@ -1,150 +0,0 @@ -setVmwareEngineNetwork($formattedPrivateConnectionVmwareEngineNetwork) - ->setType($privateConnectionType) - ->setServiceNetwork($formattedPrivateConnectionServiceNetwork); - $request = (new CreatePrivateConnectionRequest()) - ->setParent($formattedParent) - ->setPrivateConnectionId($privateConnectionId) - ->setPrivateConnection($privateConnection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createPrivateConnection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateConnection $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $privateConnectionId = '[PRIVATE_CONNECTION_ID]'; - $formattedPrivateConnectionVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - $privateConnectionType = Type::TYPE_UNSPECIFIED; - $formattedPrivateConnectionServiceNetwork = VmwareEngineClient::networkName( - '[PROJECT]', - '[NETWORK]' - ); - - create_private_connection_sample( - $formattedParent, - $privateConnectionId, - $formattedPrivateConnectionVmwareEngineNetwork, - $privateConnectionType, - $formattedPrivateConnectionServiceNetwork - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreatePrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php deleted file mode 100644 index cd0d6b6a571d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/create_vmware_engine_network.php +++ /dev/null @@ -1,118 +0,0 @@ -setType($vmwareEngineNetworkType); - $request = (new CreateVmwareEngineNetworkRequest()) - ->setParent($formattedParent) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId) - ->setVmwareEngineNetwork($vmwareEngineNetwork); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->createVmwareEngineNetwork($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VmwareEngineNetwork $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = '[VMWARE_ENGINE_NETWORK_ID]'; - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - - create_vmware_engine_network_sample( - $formattedParent, - $vmwareEngineNetworkId, - $vmwareEngineNetworkType - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_CreateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php deleted file mode 100644 index d48815d0176c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_cluster.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->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 = VmwareEngineClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[CLUSTER]' - ); - - delete_cluster_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php deleted file mode 100644 index c81941f37b1a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_access_rule.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteExternalAccessRule($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 = VmwareEngineClient::externalAccessRuleName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]', - '[EXTERNAL_ACCESS_RULE]' - ); - - delete_external_access_rule_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php deleted file mode 100644 index 2ecb2b32a340..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_external_address.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteExternalAddress($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 = VmwareEngineClient::externalAddressName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[EXTERNAL_ADDRESS]' - ); - - delete_external_address_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php deleted file mode 100644 index 8cb9dd78549a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_logging_server.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteLoggingServer($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 = VmwareEngineClient::loggingServerName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[LOGGING_SERVER]' - ); - - delete_logging_server_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php deleted file mode 100644 index 8aa149bc6067..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteManagementDnsZoneBinding($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 = VmwareEngineClient::managementDnsZoneBindingName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[MANAGEMENT_DNS_ZONE_BINDING]' - ); - - delete_management_dns_zone_binding_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php deleted file mode 100644 index 19df1760d0fe..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_peering.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteNetworkPeering($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 = VmwareEngineClient::networkPeeringName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_PEERING]' - ); - - delete_network_peering_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php deleted file mode 100644 index c12774954e0e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_network_policy.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteNetworkPolicy($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 = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - - delete_network_policy_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php deleted file mode 100644 index 7baeefdc16bf..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_cloud.php +++ /dev/null @@ -1,101 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deletePrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - - delete_private_cloud_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php deleted file mode 100644 index 07ef7d7e37cd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_private_connection.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deletePrivateConnection($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 = VmwareEngineClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - - delete_private_connection_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeletePrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php deleted file mode 100644 index 5f01b8e97047..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/delete_vmware_engine_network.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->deleteVmwareEngineNetwork($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 = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - - delete_vmware_engine_network_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_DeleteVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php deleted file mode 100644 index 58c668445395..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php +++ /dev/null @@ -1,85 +0,0 @@ -setNetworkPolicy($formattedNetworkPolicy); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->fetchNetworkPolicyExternalAddresses($request); - - /** @var ExternalAddress $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 -{ - $formattedNetworkPolicy = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - - fetch_network_policy_external_addresses_sample($formattedNetworkPolicy); -} -// [END vmwareengine_v1_generated_VmwareEngine_FetchNetworkPolicyExternalAddresses_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php deleted file mode 100644 index 54f59c6f8859..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_cluster.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $vmwareEngineClient->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 = VmwareEngineClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[CLUSTER]' - ); - - get_cluster_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php deleted file mode 100644 index 5f8bc63d6110..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_bind_permission.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DnsBindPermission $response */ - $response = $vmwareEngineClient->getDnsBindPermission($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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - - get_dns_bind_permission_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetDnsBindPermission_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php deleted file mode 100644 index 7a39a3c0e4f1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_dns_forwarding.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DnsForwarding $response */ - $response = $vmwareEngineClient->getDnsForwarding($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 = VmwareEngineClient::dnsForwardingName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - get_dns_forwarding_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetDnsForwarding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php deleted file mode 100644 index 577cdebb07a3..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_access_rule.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ExternalAccessRule $response */ - $response = $vmwareEngineClient->getExternalAccessRule($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 = VmwareEngineClient::externalAccessRuleName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]', - '[EXTERNAL_ACCESS_RULE]' - ); - - get_external_access_rule_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php deleted file mode 100644 index 4782af24b346..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_external_address.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ExternalAddress $response */ - $response = $vmwareEngineClient->getExternalAddress($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 = VmwareEngineClient::externalAddressName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[EXTERNAL_ADDRESS]' - ); - - get_external_address_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php deleted file mode 100644 index fb4fd8d6d321..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_hcx_activation_key.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var HcxActivationKey $response */ - $response = $vmwareEngineClient->getHcxActivationKey($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 = VmwareEngineClient::hcxActivationKeyName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[HCX_ACTIVATION_KEY]' - ); - - get_hcx_activation_key_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetHcxActivationKey_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php deleted file mode 100644 index d1722d12c994..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $vmwareEngineClient->getIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_location.php deleted file mode 100644 index 41220af357bc..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/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 vmwareengine_v1_generated_VmwareEngine_GetLocation_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php deleted file mode 100644 index 04ecb1b4894a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_logging_server.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LoggingServer $response */ - $response = $vmwareEngineClient->getLoggingServer($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 = VmwareEngineClient::loggingServerName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[LOGGING_SERVER]' - ); - - get_logging_server_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php deleted file mode 100644 index 0089c322742d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ManagementDnsZoneBinding $response */ - $response = $vmwareEngineClient->getManagementDnsZoneBinding($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 = VmwareEngineClient::managementDnsZoneBindingName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[MANAGEMENT_DNS_ZONE_BINDING]' - ); - - get_management_dns_zone_binding_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php deleted file mode 100644 index e3656f15f394..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_peering.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NetworkPeering $response */ - $response = $vmwareEngineClient->getNetworkPeering($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 = VmwareEngineClient::networkPeeringName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_PEERING]' - ); - - get_network_peering_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php deleted file mode 100644 index 912ec9ffda86..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_network_policy.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NetworkPolicy $response */ - $response = $vmwareEngineClient->getNetworkPolicy($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 = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - - get_network_policy_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php deleted file mode 100644 index 0c5c8a4b018e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Node $response */ - $response = $vmwareEngineClient->getNode($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 = VmwareEngineClient::nodeName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[CLUSTER]', - '[NODE]' - ); - - get_node_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetNode_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php deleted file mode 100644 index de4dc4ff50cd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_node_type.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NodeType $response */ - $response = $vmwareEngineClient->getNodeType($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 = VmwareEngineClient::nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - - get_node_type_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetNodeType_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php deleted file mode 100644 index c761e8b394b1..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_cloud.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PrivateCloud $response */ - $response = $vmwareEngineClient->getPrivateCloud($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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - - get_private_cloud_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetPrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php deleted file mode 100644 index cbc02a8049dd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_private_connection.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PrivateConnection $response */ - $response = $vmwareEngineClient->getPrivateConnection($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 = VmwareEngineClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - - get_private_connection_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetPrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php deleted file mode 100644 index 33192d6af4ec..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_subnet.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Subnet $response */ - $response = $vmwareEngineClient->getSubnet($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 = VmwareEngineClient::subnetName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[SUBNET]' - ); - - get_subnet_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetSubnet_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php deleted file mode 100644 index 7bf3a52d343b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/get_vmware_engine_network.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VmwareEngineNetwork $response */ - $response = $vmwareEngineClient->getVmwareEngineNetwork($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 = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - - get_vmware_engine_network_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GetVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php deleted file mode 100644 index 443f135066aa..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/grant_dns_bind_permission.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName) - ->setPrincipal($principal); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->grantDnsBindPermission($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DnsBindPermission $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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - - grant_dns_bind_permission_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_GrantDnsBindPermission_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php deleted file mode 100644 index 2fca45306a35..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_clusters.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_clusters_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListClusters_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php deleted file mode 100644 index 1e741c96dc75..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_access_rules.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listExternalAccessRules($request); - - /** @var ExternalAccessRule $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 = VmwareEngineClient::networkPolicyName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_POLICY]' - ); - - list_external_access_rules_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListExternalAccessRules_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php deleted file mode 100644 index 52e7182ab19f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_external_addresses.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listExternalAddresses($request); - - /** @var ExternalAddress $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_external_addresses_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListExternalAddresses_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php deleted file mode 100644 index 55ab565dfec0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_hcx_activation_keys.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listHcxActivationKeys($request); - - /** @var HcxActivationKey $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_hcx_activation_keys_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListHcxActivationKeys_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_locations.php deleted file mode 100644 index 398c1b6ab572..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/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 vmwareengine_v1_generated_VmwareEngine_ListLocations_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php deleted file mode 100644 index 6b6ca9087f02..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_logging_servers.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listLoggingServers($request); - - /** @var LoggingServer $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_logging_servers_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListLoggingServers_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php deleted file mode 100644 index 8b6f01e7ba61..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listManagementDnsZoneBindings($request); - - /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_management_dns_zone_bindings_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListManagementDnsZoneBindings_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php deleted file mode 100644 index 73cfede6fd7c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_peerings.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listNetworkPeerings($request); - - /** @var NetworkPeering $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_network_peerings_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListNetworkPeerings_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php deleted file mode 100644 index 8bc964a90b4f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_network_policies.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listNetworkPolicies($request); - - /** @var NetworkPolicy $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_network_policies_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListNetworkPolicies_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php deleted file mode 100644 index da8b2b057252..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_node_types.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listNodeTypes($request); - - /** @var NodeType $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_node_types_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListNodeTypes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php deleted file mode 100644 index f3ef227fa551..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_nodes.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listNodes($request); - - /** @var Node $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 = VmwareEngineClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[CLUSTER]' - ); - - list_nodes_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListNodes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php deleted file mode 100644 index 47d45c8dfd99..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_peering_routes.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listPeeringRoutes($request); - - /** @var PeeringRoute $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 = VmwareEngineClient::networkPeeringName( - '[PROJECT]', - '[LOCATION]', - '[NETWORK_PEERING]' - ); - - list_peering_routes_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListPeeringRoutes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php deleted file mode 100644 index f6206e04255b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_clouds.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listPrivateClouds($request); - - /** @var PrivateCloud $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_private_clouds_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateClouds_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php deleted file mode 100644 index c2ac1446fe4a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listPrivateConnectionPeeringRoutes($request); - - /** @var PeeringRoute $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 = VmwareEngineClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - - list_private_connection_peering_routes_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateConnectionPeeringRoutes_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php deleted file mode 100644 index 4cf703010432..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_private_connections.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listPrivateConnections($request); - - /** @var PrivateConnection $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_private_connections_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListPrivateConnections_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php deleted file mode 100644 index b1ae86c73d61..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_subnets.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listSubnets($request); - - /** @var Subnet $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 = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - list_subnets_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListSubnets_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php deleted file mode 100644 index f891ebfb56c9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/list_vmware_engine_networks.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vmwareEngineClient->listVmwareEngineNetworks($request); - - /** @var VmwareEngineNetwork $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 = VmwareEngineClient::locationName('[PROJECT]', '[LOCATION]'); - - list_vmware_engine_networks_sample($formattedParent); -} -// [END vmwareengine_v1_generated_VmwareEngine_ListVmwareEngineNetworks_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php deleted file mode 100644 index 4f16b745033c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->repairManagementDnsZoneBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ManagementDnsZoneBinding $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 = VmwareEngineClient::managementDnsZoneBindingName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]', - '[MANAGEMENT_DNS_ZONE_BINDING]' - ); - - repair_management_dns_zone_binding_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_RepairManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php deleted file mode 100644 index 315f89866980..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_nsx_credentials.php +++ /dev/null @@ -1,92 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->resetNsxCredentials($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $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 -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - reset_nsx_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ResetNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php deleted file mode 100644 index 059245dc6f8b..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/reset_vcenter_credentials.php +++ /dev/null @@ -1,92 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->resetVcenterCredentials($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $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 -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - reset_vcenter_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ResetVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php deleted file mode 100644 index 28fc63017980..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($formattedName) - ->setPrincipal($principal); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->revokeDnsBindPermission($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DnsBindPermission $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 = VmwareEngineClient::dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - - revoke_dns_bind_permission_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_RevokeDnsBindPermission_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php deleted file mode 100644 index ef6c2393e578..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $vmwareEngineClient->setIamPolicy($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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END vmwareengine_v1_generated_VmwareEngine_SetIamPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php deleted file mode 100644 index 9048adc5e1b9..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_nsx_credentials.php +++ /dev/null @@ -1,80 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var Credentials $response */ - $response = $vmwareEngineClient->showNsxCredentials($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 -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - show_nsx_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ShowNsxCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php deleted file mode 100644 index 2fbf754bbddd..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/show_vcenter_credentials.php +++ /dev/null @@ -1,80 +0,0 @@ -setPrivateCloud($formattedPrivateCloud); - - // Call the API and handle any network failures. - try { - /** @var Credentials $response */ - $response = $vmwareEngineClient->showVcenterCredentials($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 -{ - $formattedPrivateCloud = VmwareEngineClient::privateCloudName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CLOUD]' - ); - - show_vcenter_credentials_sample($formattedPrivateCloud); -} -// [END vmwareengine_v1_generated_VmwareEngine_ShowVcenterCredentials_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php deleted file mode 100644 index 0b557b342223..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $vmwareEngineClient->testIamPermissions($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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END vmwareengine_v1_generated_VmwareEngine_TestIamPermissions_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php deleted file mode 100644 index fd623b85b986..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/undelete_private_cloud.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->undeletePrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $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 = VmwareEngineClient::privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - - undelete_private_cloud_sample($formattedName); -} -// [END vmwareengine_v1_generated_VmwareEngine_UndeletePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php deleted file mode 100644 index 3c8da159c642..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_cluster.php +++ /dev/null @@ -1,82 +0,0 @@ -setNodeTypeConfigs($clusterNodeTypeConfigs); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->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 vmwareengine_v1_generated_VmwareEngine_UpdateCluster_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php deleted file mode 100644 index 9af11986b179..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_dns_forwarding.php +++ /dev/null @@ -1,101 +0,0 @@ -setDomain($dnsForwardingForwardingRulesDomain) - ->setNameServers($dnsForwardingForwardingRulesNameServers); - $dnsForwardingForwardingRules = [$forwardingRule,]; - $dnsForwarding = (new DnsForwarding()) - ->setForwardingRules($dnsForwardingForwardingRules); - $updateMask = new FieldMask(); - $request = (new UpdateDnsForwardingRequest()) - ->setDnsForwarding($dnsForwarding) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateDnsForwarding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DnsForwarding $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 -{ - $dnsForwardingForwardingRulesDomain = '[DOMAIN]'; - $dnsForwardingForwardingRulesNameServersElement = '[NAME_SERVERS]'; - - update_dns_forwarding_sample( - $dnsForwardingForwardingRulesDomain, - $dnsForwardingForwardingRulesNameServersElement - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateDnsForwarding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php deleted file mode 100644 index cd18fc1938df..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_access_rule.php +++ /dev/null @@ -1,75 +0,0 @@ -setUpdateMask($updateMask) - ->setExternalAccessRule($externalAccessRule); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateExternalAccessRule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExternalAccessRule $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 vmwareengine_v1_generated_VmwareEngine_UpdateExternalAccessRule_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php deleted file mode 100644 index 3a6279b1b0b0..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_external_address.php +++ /dev/null @@ -1,80 +0,0 @@ -setUpdateMask($updateMask) - ->setExternalAddress($externalAddress); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateExternalAddress($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExternalAddress $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 vmwareengine_v1_generated_VmwareEngine_UpdateExternalAddress_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php deleted file mode 100644 index efa7dd5f3b31..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_logging_server.php +++ /dev/null @@ -1,110 +0,0 @@ -setHostname($loggingServerHostname) - ->setPort($loggingServerPort) - ->setProtocol($loggingServerProtocol) - ->setSourceType($loggingServerSourceType); - $request = (new UpdateLoggingServerRequest()) - ->setUpdateMask($updateMask) - ->setLoggingServer($loggingServer); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateLoggingServer($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LoggingServer $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 -{ - $loggingServerHostname = '[HOSTNAME]'; - $loggingServerPort = 0; - $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; - $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; - - update_logging_server_sample( - $loggingServerHostname, - $loggingServerPort, - $loggingServerProtocol, - $loggingServerSourceType - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateLoggingServer_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php deleted file mode 100644 index d4afd6a8736e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php +++ /dev/null @@ -1,75 +0,0 @@ -setUpdateMask($updateMask) - ->setManagementDnsZoneBinding($managementDnsZoneBinding); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateManagementDnsZoneBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ManagementDnsZoneBinding $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 vmwareengine_v1_generated_VmwareEngine_UpdateManagementDnsZoneBinding_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php deleted file mode 100644 index 614a70d2f41d..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_peering.php +++ /dev/null @@ -1,118 +0,0 @@ -setPeerNetwork($networkPeeringPeerNetwork) - ->setPeerNetworkType($networkPeeringPeerNetworkType) - ->setVmwareEngineNetwork($formattedNetworkPeeringVmwareEngineNetwork); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPeeringRequest()) - ->setNetworkPeering($networkPeering) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateNetworkPeering($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NetworkPeering $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 -{ - $networkPeeringPeerNetwork = '[PEER_NETWORK]'; - $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; - $formattedNetworkPeeringVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - - update_network_peering_sample( - $networkPeeringPeerNetwork, - $networkPeeringPeerNetworkType, - $formattedNetworkPeeringVmwareEngineNetwork - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateNetworkPeering_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php deleted file mode 100644 index 90eccdfd74ef..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_network_policy.php +++ /dev/null @@ -1,101 +0,0 @@ -setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPolicyRequest()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateNetworkPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var NetworkPolicy $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 -{ - $networkPolicyEdgeServicesCidr = '[EDGE_SERVICES_CIDR]'; - - update_network_policy_sample($networkPolicyEdgeServicesCidr); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateNetworkPolicy_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php deleted file mode 100644 index d498da0b1e02..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_cloud.php +++ /dev/null @@ -1,118 +0,0 @@ -setManagementCidr($privateCloudNetworkConfigManagementCidr); - $privateCloudManagementClusterNodeTypeConfigs = []; - $privateCloudManagementCluster = (new ManagementCluster()) - ->setClusterId($privateCloudManagementClusterClusterId) - ->setNodeTypeConfigs($privateCloudManagementClusterNodeTypeConfigs); - $privateCloud = (new PrivateCloud()) - ->setNetworkConfig($privateCloudNetworkConfig) - ->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateCloudRequest()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updatePrivateCloud($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateCloud $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 -{ - $privateCloudNetworkConfigManagementCidr = '[MANAGEMENT_CIDR]'; - $privateCloudManagementClusterClusterId = '[CLUSTER_ID]'; - - update_private_cloud_sample( - $privateCloudNetworkConfigManagementCidr, - $privateCloudManagementClusterClusterId - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdatePrivateCloud_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php deleted file mode 100644 index 61c377ec295f..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_private_connection.php +++ /dev/null @@ -1,129 +0,0 @@ -setVmwareEngineNetwork($formattedPrivateConnectionVmwareEngineNetwork) - ->setType($privateConnectionType) - ->setServiceNetwork($formattedPrivateConnectionServiceNetwork); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateConnectionRequest()) - ->setPrivateConnection($privateConnection) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updatePrivateConnection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateConnection $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 -{ - $formattedPrivateConnectionVmwareEngineNetwork = VmwareEngineClient::vmwareEngineNetworkName( - '[PROJECT]', - '[LOCATION]', - '[VMWARE_ENGINE_NETWORK]' - ); - $privateConnectionType = Type::TYPE_UNSPECIFIED; - $formattedPrivateConnectionServiceNetwork = VmwareEngineClient::networkName( - '[PROJECT]', - '[NETWORK]' - ); - - update_private_connection_sample( - $formattedPrivateConnectionVmwareEngineNetwork, - $privateConnectionType, - $formattedPrivateConnectionServiceNetwork - ); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdatePrivateConnection_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php deleted file mode 100644 index 648055bfa7f5..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_subnet.php +++ /dev/null @@ -1,79 +0,0 @@ -setUpdateMask($updateMask) - ->setSubnet($subnet); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateSubnet($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Subnet $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 vmwareengine_v1_generated_VmwareEngine_UpdateSubnet_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php b/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php deleted file mode 100644 index 56bcc1eb2e84..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/samples/V1/VmwareEngineClient/update_vmware_engine_network.php +++ /dev/null @@ -1,90 +0,0 @@ -setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $request = (new UpdateVmwareEngineNetworkRequest()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vmwareEngineClient->updateVmwareEngineNetwork($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var VmwareEngineNetwork $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 -{ - $vmwareEngineNetworkType = Type::TYPE_UNSPECIFIED; - - update_vmware_engine_network_sample($vmwareEngineNetworkType); -} -// [END vmwareengine_v1_generated_VmwareEngine_UpdateVmwareEngineNetwork_sync] diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php b/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php deleted file mode 100644 index 2ae8f1c4a88e..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/Client/VmwareEngineClient.php +++ /dev/null @@ -1,2997 +0,0 @@ - createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExternalAccessRuleAsync(CreateExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExternalAddressAsync(CreateExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface createHcxActivationKeyAsync(CreateHcxActivationKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLoggingServerAsync(CreateLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface createManagementDnsZoneBindingAsync(CreateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface createNetworkPeeringAsync(CreateNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface createNetworkPolicyAsync(CreateNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPrivateCloudAsync(CreatePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPrivateConnectionAsync(CreatePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVmwareEngineNetworkAsync(CreateVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExternalAccessRuleAsync(DeleteExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExternalAddressAsync(DeleteExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLoggingServerAsync(DeleteLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteManagementDnsZoneBindingAsync(DeleteManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNetworkPeeringAsync(DeleteNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNetworkPolicyAsync(DeleteNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePrivateCloudAsync(DeletePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePrivateConnectionAsync(DeletePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVmwareEngineNetworkAsync(DeleteVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchNetworkPolicyExternalAddressesAsync(FetchNetworkPolicyExternalAddressesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDnsBindPermissionAsync(GetDnsBindPermissionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDnsForwardingAsync(GetDnsForwardingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExternalAccessRuleAsync(GetExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExternalAddressAsync(GetExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHcxActivationKeyAsync(GetHcxActivationKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLoggingServerAsync(GetLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface getManagementDnsZoneBindingAsync(GetManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNetworkPeeringAsync(GetNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNetworkPolicyAsync(GetNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNodeAsync(GetNodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNodeTypeAsync(GetNodeTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPrivateCloudAsync(GetPrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPrivateConnectionAsync(GetPrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSubnetAsync(GetSubnetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVmwareEngineNetworkAsync(GetVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface grantDnsBindPermissionAsync(GrantDnsBindPermissionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExternalAccessRulesAsync(ListExternalAccessRulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExternalAddressesAsync(ListExternalAddressesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHcxActivationKeysAsync(ListHcxActivationKeysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLoggingServersAsync(ListLoggingServersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listManagementDnsZoneBindingsAsync(ListManagementDnsZoneBindingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworkPeeringsAsync(ListNetworkPeeringsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNetworkPoliciesAsync(ListNetworkPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNodeTypesAsync(ListNodeTypesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNodesAsync(ListNodesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPeeringRoutesAsync(ListPeeringRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateCloudsAsync(ListPrivateCloudsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateConnectionPeeringRoutesAsync(ListPrivateConnectionPeeringRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateConnectionsAsync(ListPrivateConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSubnetsAsync(ListSubnetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVmwareEngineNetworksAsync(ListVmwareEngineNetworksRequest $request, array $optionalArgs = []) - * @method PromiseInterface repairManagementDnsZoneBindingAsync(RepairManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetNsxCredentialsAsync(ResetNsxCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetVcenterCredentialsAsync(ResetVcenterCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface revokeDnsBindPermissionAsync(RevokeDnsBindPermissionRequest $request, array $optionalArgs = []) - * @method PromiseInterface showNsxCredentialsAsync(ShowNsxCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface showVcenterCredentialsAsync(ShowVcenterCredentialsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeletePrivateCloudAsync(UndeletePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDnsForwardingAsync(UpdateDnsForwardingRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExternalAccessRuleAsync(UpdateExternalAccessRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExternalAddressAsync(UpdateExternalAddressRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLoggingServerAsync(UpdateLoggingServerRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateManagementDnsZoneBindingAsync(UpdateManagementDnsZoneBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNetworkPeeringAsync(UpdateNetworkPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNetworkPolicyAsync(UpdateNetworkPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePrivateCloudAsync(UpdatePrivateCloudRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePrivateConnectionAsync(UpdatePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSubnetAsync(UpdateSubnetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVmwareEngineNetworkAsync(UpdateVmwareEngineNetworkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class VmwareEngineClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vmwareengine.v1.VmwareEngine'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vmwareengine.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vmwareengine.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/vmware_engine_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vmware_engine_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vmware_engine_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vmware_engine_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $privateCloud, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * dns_bind_permission resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted dns_bind_permission resource. - */ - public static function dnsBindPermissionName(string $project, string $location): string - { - return self::getPathTemplate('dnsBindPermission')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * dns_forwarding resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * - * @return string The formatted dns_forwarding resource. - */ - public static function dnsForwardingName(string $project, string $location, string $privateCloud): string - { - return self::getPathTemplate('dnsForwarding')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * external_access_rule resource. - * - * @param string $project - * @param string $location - * @param string $networkPolicy - * @param string $externalAccessRule - * - * @return string The formatted external_access_rule resource. - */ - public static function externalAccessRuleName(string $project, string $location, string $networkPolicy, string $externalAccessRule): string - { - return self::getPathTemplate('externalAccessRule')->render([ - 'project' => $project, - 'location' => $location, - 'network_policy' => $networkPolicy, - 'external_access_rule' => $externalAccessRule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * external_address resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $externalAddress - * - * @return string The formatted external_address resource. - */ - public static function externalAddressName(string $project, string $location, string $privateCloud, string $externalAddress): string - { - return self::getPathTemplate('externalAddress')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'external_address' => $externalAddress, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * hcx_activation_key resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $hcxActivationKey - * - * @return string The formatted hcx_activation_key resource. - */ - public static function hcxActivationKeyName(string $project, string $location, string $privateCloud, string $hcxActivationKey): string - { - return self::getPathTemplate('hcxActivationKey')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'hcx_activation_key' => $hcxActivationKey, - ]); - } - - /** - * 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 - * logging_server resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $loggingServer - * - * @return string The formatted logging_server resource. - */ - public static function loggingServerName(string $project, string $location, string $privateCloud, string $loggingServer): string - { - return self::getPathTemplate('loggingServer')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'logging_server' => $loggingServer, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * management_dns_zone_binding resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $managementDnsZoneBinding - * - * @return string The formatted management_dns_zone_binding resource. - */ - public static function managementDnsZoneBindingName(string $project, string $location, string $privateCloud, string $managementDnsZoneBinding): string - { - return self::getPathTemplate('managementDnsZoneBinding')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'management_dns_zone_binding' => $managementDnsZoneBinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * network_peering resource. - * - * @param string $project - * @param string $location - * @param string $networkPeering - * - * @return string The formatted network_peering resource. - */ - public static function networkPeeringName(string $project, string $location, string $networkPeering): string - { - return self::getPathTemplate('networkPeering')->render([ - 'project' => $project, - 'location' => $location, - 'network_peering' => $networkPeering, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * network_policy resource. - * - * @param string $project - * @param string $location - * @param string $networkPolicy - * - * @return string The formatted network_policy resource. - */ - public static function networkPolicyName(string $project, string $location, string $networkPolicy): string - { - return self::getPathTemplate('networkPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'network_policy' => $networkPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node - * resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $cluster - * @param string $node - * - * @return string The formatted node resource. - */ - public static function nodeName(string $project, string $location, string $privateCloud, string $cluster, string $node): string - { - return self::getPathTemplate('node')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'cluster' => $cluster, - 'node' => $node, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a node_type - * resource. - * - * @param string $project - * @param string $location - * @param string $nodeType - * - * @return string The formatted node_type resource. - */ - public static function nodeTypeName(string $project, string $location, string $nodeType): string - { - return self::getPathTemplate('nodeType')->render([ - 'project' => $project, - 'location' => $location, - 'node_type' => $nodeType, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * private_cloud resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * - * @return string The formatted private_cloud resource. - */ - public static function privateCloudName(string $project, string $location, string $privateCloud): string - { - return self::getPathTemplate('privateCloud')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * private_connection resource. - * - * @param string $project - * @param string $location - * @param string $privateConnection - * - * @return string The formatted private_connection resource. - */ - public static function privateConnectionName(string $project, string $location, string $privateConnection): string - { - return self::getPathTemplate('privateConnection')->render([ - 'project' => $project, - 'location' => $location, - 'private_connection' => $privateConnection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a subnet - * resource. - * - * @param string $project - * @param string $location - * @param string $privateCloud - * @param string $subnet - * - * @return string The formatted subnet resource. - */ - public static function subnetName(string $project, string $location, string $privateCloud, string $subnet): string - { - return self::getPathTemplate('subnet')->render([ - 'project' => $project, - 'location' => $location, - 'private_cloud' => $privateCloud, - 'subnet' => $subnet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vmware_engine_network resource. - * - * @param string $project - * @param string $location - * @param string $vmwareEngineNetwork - * - * @return string The formatted vmware_engine_network resource. - */ - public static function vmwareEngineNetworkName(string $project, string $location, string $vmwareEngineNetwork): string - { - return self::getPathTemplate('vmwareEngineNetwork')->render([ - 'project' => $project, - 'location' => $location, - 'vmware_engine_network' => $vmwareEngineNetwork, - ]); - } - - /** - * 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}/privateClouds/{private_cloud}/clusters/{cluster} - * - dnsBindPermission: projects/{project}/locations/{location}/dnsBindPermission - * - dnsForwarding: projects/{project}/locations/{location}/privateClouds/{private_cloud}/dnsForwarding - * - externalAccessRule: projects/{project}/locations/{location}/networkPolicies/{network_policy}/externalAccessRules/{external_access_rule} - * - externalAddress: projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address} - * - hcxActivationKey: projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key} - * - location: projects/{project}/locations/{location} - * - loggingServer: projects/{project}/locations/{location}/privateClouds/{private_cloud}/loggingServers/{logging_server} - * - managementDnsZoneBinding: projects/{project}/locations/{location}/privateClouds/{private_cloud}/managementDnsZoneBindings/{management_dns_zone_binding} - * - network: projects/{project}/global/networks/{network} - * - networkPeering: projects/{project}/locations/{location}/networkPeerings/{network_peering} - * - networkPolicy: projects/{project}/locations/{location}/networkPolicies/{network_policy} - * - node: projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node} - * - nodeType: projects/{project}/locations/{location}/nodeTypes/{node_type} - * - privateCloud: projects/{project}/locations/{location}/privateClouds/{private_cloud} - * - privateConnection: projects/{project}/locations/{location}/privateConnections/{private_connection} - * - subnet: projects/{project}/locations/{location}/privateClouds/{private_cloud}/subnets/{subnet} - * - vmwareEngineNetwork: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vmwareengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new cluster in a given private cloud. - * Creating a new cluster provides additional nodes for - * use in the parent private cloud and requires sufficient [node - * quota](https://cloud.google.com/vmware-engine/quotas). - * - * The async variant is {@see VmwareEngineClient::createClusterAsync()} . - * - * @example samples/V1/VmwareEngineClient/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 external access rule in a given network policy. - * - * The async variant is {@see VmwareEngineClient::createExternalAccessRuleAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/create_external_access_rule.php - * - * @param CreateExternalAccessRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createExternalAccessRule(CreateExternalAccessRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateExternalAccessRule', $request, $callOptions)->wait(); - } - - /** - * Creates a new `ExternalAddress` resource in a given private cloud. The - * network policy that corresponds to the private cloud must have the external - * IP address network service enabled (`NetworkPolicy.external_ip`). - * - * The async variant is {@see VmwareEngineClient::createExternalAddressAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_external_address.php - * - * @param CreateExternalAddressRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createExternalAddress(CreateExternalAddressRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateExternalAddress', $request, $callOptions)->wait(); - } - - /** - * Creates a new HCX activation key in a given private cloud. - * - * The async variant is {@see VmwareEngineClient::createHcxActivationKeyAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_hcx_activation_key.php - * - * @param CreateHcxActivationKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createHcxActivationKey(CreateHcxActivationKeyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateHcxActivationKey', $request, $callOptions)->wait(); - } - - /** - * Create a new logging server for a given private cloud. - * - * The async variant is {@see VmwareEngineClient::createLoggingServerAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_logging_server.php - * - * @param CreateLoggingServerRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createLoggingServer(CreateLoggingServerRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLoggingServer', $request, $callOptions)->wait(); - } - - /** - * Creates a new `ManagementDnsZoneBinding` resource in a private cloud. - * This RPC creates the DNS binding and the resource that represents the - * DNS binding of the consumer VPC network to the management DNS zone. A - * management DNS zone is the Cloud DNS cross-project binding zone that - * VMware Engine creates for each private cloud. It contains FQDNs and - * corresponding IP addresses for the private cloud's ESXi hosts and - * management VM appliances like vCenter and NSX Manager. - * - * The async variant is - * {@see VmwareEngineClient::createManagementDnsZoneBindingAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_management_dns_zone_binding.php - * - * @param CreateManagementDnsZoneBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createManagementDnsZoneBinding(CreateManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateManagementDnsZoneBinding', $request, $callOptions)->wait(); - } - - /** - * Creates a new network peering between the peer network and VMware Engine - * network provided in a `NetworkPeering` resource. NetworkPeering is a - * global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::createNetworkPeeringAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_network_peering.php - * - * @param CreateNetworkPeeringRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createNetworkPeering(CreateNetworkPeeringRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateNetworkPeering', $request, $callOptions)->wait(); - } - - /** - * Creates a new network policy in a given VMware Engine network of a - * project and location (region). A new network policy cannot be created if - * another network policy already exists in the same scope. - * - * The async variant is {@see VmwareEngineClient::createNetworkPolicyAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_network_policy.php - * - * @param CreateNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createNetworkPolicy(CreateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new `PrivateCloud` resource in a given project and location. - * Private clouds of type `STANDARD` and - * `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are - * regional. - * Creating a private cloud also creates a [management - * cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) - * for that private cloud. - * - * The async variant is {@see VmwareEngineClient::createPrivateCloudAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_private_cloud.php - * - * @param CreatePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createPrivateCloud(CreatePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Creates a new private connection that can be used for accessing private - * Clouds. - * - * The async variant is {@see VmwareEngineClient::createPrivateConnectionAsync()} . - * - * @example samples/V1/VmwareEngineClient/create_private_connection.php - * - * @param CreatePrivateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createPrivateConnection(CreatePrivateConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Creates a new VMware Engine network that can be used by a private cloud. - * - * The async variant is {@see VmwareEngineClient::createVmwareEngineNetworkAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/create_vmware_engine_network.php - * - * @param CreateVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createVmwareEngineNetwork(CreateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Deletes a `Cluster` resource. To avoid unintended data loss, migrate or - * gracefully shut down any workloads running on the cluster before deletion. - * You cannot delete the management cluster of a private cloud using this - * method. - * - * The async variant is {@see VmwareEngineClient::deleteClusterAsync()} . - * - * @example samples/V1/VmwareEngineClient/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 external access rule. - * - * The async variant is {@see VmwareEngineClient::deleteExternalAccessRuleAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/delete_external_access_rule.php - * - * @param DeleteExternalAccessRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteExternalAccessRule(DeleteExternalAccessRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteExternalAccessRule', $request, $callOptions)->wait(); - } - - /** - * Deletes a single external IP address. When you delete an external IP - * address, connectivity between the external IP address and the corresponding - * internal IP address is lost. - * - * The async variant is {@see VmwareEngineClient::deleteExternalAddressAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_external_address.php - * - * @param DeleteExternalAddressRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteExternalAddress(DeleteExternalAddressRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteExternalAddress', $request, $callOptions)->wait(); - } - - /** - * Deletes a single logging server. - * - * The async variant is {@see VmwareEngineClient::deleteLoggingServerAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_logging_server.php - * - * @param DeleteLoggingServerRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteLoggingServer(DeleteLoggingServerRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLoggingServer', $request, $callOptions)->wait(); - } - - /** - * Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone - * binding is deleted, the corresponding consumer VPC network is no longer - * bound to the management DNS zone. - * - * The async variant is - * {@see VmwareEngineClient::deleteManagementDnsZoneBindingAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_management_dns_zone_binding.php - * - * @param DeleteManagementDnsZoneBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteManagementDnsZoneBinding(DeleteManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteManagementDnsZoneBinding', $request, $callOptions)->wait(); - } - - /** - * Deletes a `NetworkPeering` resource. When a network peering is deleted for - * a VMware Engine network, the peer network becomes inaccessible to that - * VMware Engine network. NetworkPeering is a global resource and location can - * only be global. - * - * The async variant is {@see VmwareEngineClient::deleteNetworkPeeringAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_network_peering.php - * - * @param DeleteNetworkPeeringRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteNetworkPeering(DeleteNetworkPeeringRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteNetworkPeering', $request, $callOptions)->wait(); - } - - /** - * Deletes a `NetworkPolicy` resource. A network policy cannot be deleted - * when `NetworkService.state` is set to `RECONCILING` for either its external - * IP or internet access service. - * - * The async variant is {@see VmwareEngineClient::deleteNetworkPolicyAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_network_policy.php - * - * @param DeleteNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteNetworkPolicy(DeleteNetworkPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Schedules a `PrivateCloud` resource for deletion. - * - * A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` - * set to `DELETED` and `expireTime` set to the time when deletion is final - * and can no longer be reversed. The delete operation is marked as done - * as soon as the `PrivateCloud` is successfully scheduled for deletion - * (this also applies when `delayHours` is set to zero), and the operation is - * not kept in pending state until `PrivateCloud` is purged. - * `PrivateCloud` can be restored using `UndeletePrivateCloud` method before - * the `expireTime` elapses. When `expireTime` is reached, deletion is final - * and all private cloud resources are irreversibly removed and billing stops. - * During the final removal process, `PrivateCloud.state` is set to `PURGING`. - * `PrivateCloud` can be polled using standard `GET` method for the whole - * period of deletion and purging. It will not be returned only - * when it is completely purged. - * - * The async variant is {@see VmwareEngineClient::deletePrivateCloudAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_private_cloud.php - * - * @param DeletePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deletePrivateCloud(DeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Deletes a `PrivateConnection` resource. When a private connection is - * deleted for a VMware Engine network, the connected network becomes - * inaccessible to that VMware Engine network. - * - * The async variant is {@see VmwareEngineClient::deletePrivateConnectionAsync()} . - * - * @example samples/V1/VmwareEngineClient/delete_private_connection.php - * - * @param DeletePrivateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deletePrivateConnection(DeletePrivateConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware - * Engine network after all resources that refer to it are deleted. For - * example, a private cloud, a network peering, and a network policy can all - * refer to the same VMware Engine network. - * - * The async variant is {@see VmwareEngineClient::deleteVmwareEngineNetworkAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/delete_vmware_engine_network.php - * - * @param DeleteVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteVmwareEngineNetwork(DeleteVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Lists external IP addresses assigned to VMware workload VMs within the - * scope of the given network policy. - * - * The async variant is - * {@see VmwareEngineClient::fetchNetworkPolicyExternalAddressesAsync()} . - * - * @example samples/V1/VmwareEngineClient/fetch_network_policy_external_addresses.php - * - * @param FetchNetworkPolicyExternalAddressesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 fetchNetworkPolicyExternalAddresses(FetchNetworkPolicyExternalAddressesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('FetchNetworkPolicyExternalAddresses', $request, $callOptions); - } - - /** - * Retrieves a `Cluster` resource by its resource name. - * - * The async variant is {@see VmwareEngineClient::getClusterAsync()} . - * - * @example samples/V1/VmwareEngineClient/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 all the principals having bind permission on the intranet VPC - * associated with the consumer project granted by the Grant API. - * DnsBindPermission is a global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::getDnsBindPermissionAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_dns_bind_permission.php - * - * @param GetDnsBindPermissionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DnsBindPermission - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDnsBindPermission(GetDnsBindPermissionRequest $request, array $callOptions = []): DnsBindPermission - { - return $this->startApiCall('GetDnsBindPermission', $request, $callOptions)->wait(); - } - - /** - * Gets details of the `DnsForwarding` config. - * - * The async variant is {@see VmwareEngineClient::getDnsForwardingAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_dns_forwarding.php - * - * @param GetDnsForwardingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DnsForwarding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDnsForwarding(GetDnsForwardingRequest $request, array $callOptions = []): DnsForwarding - { - return $this->startApiCall('GetDnsForwarding', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single external access rule. - * - * The async variant is {@see VmwareEngineClient::getExternalAccessRuleAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_external_access_rule.php - * - * @param GetExternalAccessRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ExternalAccessRule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExternalAccessRule(GetExternalAccessRuleRequest $request, array $callOptions = []): ExternalAccessRule - { - return $this->startApiCall('GetExternalAccessRule', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single external IP address. - * - * The async variant is {@see VmwareEngineClient::getExternalAddressAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_external_address.php - * - * @param GetExternalAddressRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ExternalAddress - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExternalAddress(GetExternalAddressRequest $request, array $callOptions = []): ExternalAddress - { - return $this->startApiCall('GetExternalAddress', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `HcxActivationKey` resource by its resource name. - * - * The async variant is {@see VmwareEngineClient::getHcxActivationKeyAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_hcx_activation_key.php - * - * @param GetHcxActivationKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HcxActivationKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getHcxActivationKey(GetHcxActivationKeyRequest $request, array $callOptions = []): HcxActivationKey - { - return $this->startApiCall('GetHcxActivationKey', $request, $callOptions)->wait(); - } - - /** - * Gets details of a logging server. - * - * The async variant is {@see VmwareEngineClient::getLoggingServerAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_logging_server.php - * - * @param GetLoggingServerRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LoggingServer - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLoggingServer(GetLoggingServerRequest $request, array $callOptions = []): LoggingServer - { - return $this->startApiCall('GetLoggingServer', $request, $callOptions)->wait(); - } - - /** - * Retrieves a 'ManagementDnsZoneBinding' resource by its resource name. - * - * The async variant is - * {@see VmwareEngineClient::getManagementDnsZoneBindingAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_management_dns_zone_binding.php - * - * @param GetManagementDnsZoneBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ManagementDnsZoneBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getManagementDnsZoneBinding(GetManagementDnsZoneBindingRequest $request, array $callOptions = []): ManagementDnsZoneBinding - { - return $this->startApiCall('GetManagementDnsZoneBinding', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `NetworkPeering` resource by its resource name. The resource - * contains details of the network peering, such as peered - * networks, import and export custom route configurations, and peering state. - * NetworkPeering is a global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::getNetworkPeeringAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_network_peering.php - * - * @param GetNetworkPeeringRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NetworkPeering - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNetworkPeering(GetNetworkPeeringRequest $request, array $callOptions = []): NetworkPeering - { - return $this->startApiCall('GetNetworkPeering', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `NetworkPolicy` resource by its resource name. - * - * The async variant is {@see VmwareEngineClient::getNetworkPolicyAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_network_policy.php - * - * @param GetNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NetworkPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNetworkPolicy(GetNetworkPolicyRequest $request, array $callOptions = []): NetworkPolicy - { - return $this->startApiCall('GetNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single node. - * - * The async variant is {@see VmwareEngineClient::getNodeAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_node.php - * - * @param GetNodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Node - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNode(GetNodeRequest $request, array $callOptions = []): Node - { - return $this->startApiCall('GetNode', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single `NodeType`. - * - * The async variant is {@see VmwareEngineClient::getNodeTypeAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_node_type.php - * - * @param GetNodeTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NodeType - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNodeType(GetNodeTypeRequest $request, array $callOptions = []): NodeType - { - return $this->startApiCall('GetNodeType', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `PrivateCloud` resource by its resource name. - * - * The async variant is {@see VmwareEngineClient::getPrivateCloudAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_private_cloud.php - * - * @param GetPrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PrivateCloud - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPrivateCloud(GetPrivateCloudRequest $request, array $callOptions = []): PrivateCloud - { - return $this->startApiCall('GetPrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `PrivateConnection` resource by its resource name. The resource - * contains details of the private connection, such as connected - * network, routing mode and state. - * - * The async variant is {@see VmwareEngineClient::getPrivateConnectionAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_private_connection.php - * - * @param GetPrivateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PrivateConnection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPrivateConnection(GetPrivateConnectionRequest $request, array $callOptions = []): PrivateConnection - { - return $this->startApiCall('GetPrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single subnet. - * - * The async variant is {@see VmwareEngineClient::getSubnetAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_subnet.php - * - * @param GetSubnetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Subnet - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSubnet(GetSubnetRequest $request, array $callOptions = []): Subnet - { - return $this->startApiCall('GetSubnet', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `VmwareEngineNetwork` resource by its resource name. The - * resource contains details of the VMware Engine network, such as its VMware - * Engine network type, peered networks in a service project, and state - * (for example, `CREATING`, `ACTIVE`, `DELETING`). - * - * The async variant is {@see VmwareEngineClient::getVmwareEngineNetworkAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_vmware_engine_network.php - * - * @param GetVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VmwareEngineNetwork - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVmwareEngineNetwork(GetVmwareEngineNetworkRequest $request, array $callOptions = []): VmwareEngineNetwork - { - return $this->startApiCall('GetVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Grants the bind permission to the customer provided principal(user / - * service account) to bind their DNS zone with the intranet VPC associated - * with the project. DnsBindPermission is a global resource and location can - * only be global. - * - * The async variant is {@see VmwareEngineClient::grantDnsBindPermissionAsync()} . - * - * @example samples/V1/VmwareEngineClient/grant_dns_bind_permission.php - * - * @param GrantDnsBindPermissionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 grantDnsBindPermission(GrantDnsBindPermissionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('GrantDnsBindPermission', $request, $callOptions)->wait(); - } - - /** - * Lists `Cluster` resources in a given private cloud. - * - * The async variant is {@see VmwareEngineClient::listClustersAsync()} . - * - * @example samples/V1/VmwareEngineClient/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 `ExternalAccessRule` resources in the specified network policy. - * - * The async variant is {@see VmwareEngineClient::listExternalAccessRulesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_external_access_rules.php - * - * @param ListExternalAccessRulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listExternalAccessRules(ListExternalAccessRulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExternalAccessRules', $request, $callOptions); - } - - /** - * Lists external IP addresses assigned to VMware workload VMs in a given - * private cloud. - * - * The async variant is {@see VmwareEngineClient::listExternalAddressesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_external_addresses.php - * - * @param ListExternalAddressesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listExternalAddresses(ListExternalAddressesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExternalAddresses', $request, $callOptions); - } - - /** - * Lists `HcxActivationKey` resources in a given private cloud. - * - * The async variant is {@see VmwareEngineClient::listHcxActivationKeysAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_hcx_activation_keys.php - * - * @param ListHcxActivationKeysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listHcxActivationKeys(ListHcxActivationKeysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHcxActivationKeys', $request, $callOptions); - } - - /** - * Lists logging servers configured for a given private - * cloud. - * - * The async variant is {@see VmwareEngineClient::listLoggingServersAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_logging_servers.php - * - * @param ListLoggingServersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listLoggingServers(ListLoggingServersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLoggingServers', $request, $callOptions); - } - - /** - * Lists Consumer VPCs bound to Management DNS Zone of a given private cloud. - * - * The async variant is - * {@see VmwareEngineClient::listManagementDnsZoneBindingsAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_management_dns_zone_bindings.php - * - * @param ListManagementDnsZoneBindingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listManagementDnsZoneBindings(ListManagementDnsZoneBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListManagementDnsZoneBindings', $request, $callOptions); - } - - /** - * Lists `NetworkPeering` resources in a given project. NetworkPeering is a - * global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::listNetworkPeeringsAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_network_peerings.php - * - * @param ListNetworkPeeringsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNetworkPeerings(ListNetworkPeeringsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNetworkPeerings', $request, $callOptions); - } - - /** - * Lists `NetworkPolicy` resources in a specified project and location. - * - * The async variant is {@see VmwareEngineClient::listNetworkPoliciesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_network_policies.php - * - * @param ListNetworkPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNetworkPolicies(ListNetworkPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNetworkPolicies', $request, $callOptions); - } - - /** - * Lists node types - * - * The async variant is {@see VmwareEngineClient::listNodeTypesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_node_types.php - * - * @param ListNodeTypesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNodeTypes(ListNodeTypesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNodeTypes', $request, $callOptions); - } - - /** - * Lists nodes in a given cluster. - * - * The async variant is {@see VmwareEngineClient::listNodesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_nodes.php - * - * @param ListNodesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listNodes(ListNodesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNodes', $request, $callOptions); - } - - /** - * Lists the network peering routes exchanged over a peering connection. - * NetworkPeering is a global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::listPeeringRoutesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_peering_routes.php - * - * @param ListPeeringRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPeeringRoutes(ListPeeringRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPeeringRoutes', $request, $callOptions); - } - - /** - * Lists `PrivateCloud` resources in a given project and location. - * - * The async variant is {@see VmwareEngineClient::listPrivateCloudsAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_private_clouds.php - * - * @param ListPrivateCloudsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPrivateClouds(ListPrivateCloudsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPrivateClouds', $request, $callOptions); - } - - /** - * Lists the private connection routes exchanged over a peering connection. - * - * The async variant is - * {@see VmwareEngineClient::listPrivateConnectionPeeringRoutesAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_private_connection_peering_routes.php - * - * @param ListPrivateConnectionPeeringRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPrivateConnectionPeeringRoutes(ListPrivateConnectionPeeringRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPrivateConnectionPeeringRoutes', $request, $callOptions); - } - - /** - * Lists `PrivateConnection` resources in a given project and location. - * - * The async variant is {@see VmwareEngineClient::listPrivateConnectionsAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_private_connections.php - * - * @param ListPrivateConnectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listPrivateConnections(ListPrivateConnectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPrivateConnections', $request, $callOptions); - } - - /** - * Lists subnets in a given private cloud. - * - * The async variant is {@see VmwareEngineClient::listSubnetsAsync()} . - * - * @example samples/V1/VmwareEngineClient/list_subnets.php - * - * @param ListSubnetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSubnets(ListSubnetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSubnets', $request, $callOptions); - } - - /** - * Lists `VmwareEngineNetwork` resources in a given project and location. - * - * The async variant is {@see VmwareEngineClient::listVmwareEngineNetworksAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/list_vmware_engine_networks.php - * - * @param ListVmwareEngineNetworksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listVmwareEngineNetworks(ListVmwareEngineNetworksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVmwareEngineNetworks', $request, $callOptions); - } - - /** - * Retries to create a `ManagementDnsZoneBinding` resource that is - * in failed state. - * - * The async variant is - * {@see VmwareEngineClient::repairManagementDnsZoneBindingAsync()} . - * - * @example samples/V1/VmwareEngineClient/repair_management_dns_zone_binding.php - * - * @param RepairManagementDnsZoneBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 repairManagementDnsZoneBinding(RepairManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RepairManagementDnsZoneBinding', $request, $callOptions)->wait(); - } - - /** - * Resets credentials of the NSX appliance. - * - * The async variant is {@see VmwareEngineClient::resetNsxCredentialsAsync()} . - * - * @example samples/V1/VmwareEngineClient/reset_nsx_credentials.php - * - * @param ResetNsxCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resetNsxCredentials(ResetNsxCredentialsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetNsxCredentials', $request, $callOptions)->wait(); - } - - /** - * Resets credentials of the Vcenter appliance. - * - * The async variant is {@see VmwareEngineClient::resetVcenterCredentialsAsync()} . - * - * @example samples/V1/VmwareEngineClient/reset_vcenter_credentials.php - * - * @param ResetVcenterCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 resetVcenterCredentials(ResetVcenterCredentialsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetVcenterCredentials', $request, $callOptions)->wait(); - } - - /** - * Revokes the bind permission from the customer provided principal(user / - * service account) on the intranet VPC associated with the consumer project. - * DnsBindPermission is a global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::revokeDnsBindPermissionAsync()} . - * - * @example samples/V1/VmwareEngineClient/revoke_dns_bind_permission.php - * - * @param RevokeDnsBindPermissionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 revokeDnsBindPermission(RevokeDnsBindPermissionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RevokeDnsBindPermission', $request, $callOptions)->wait(); - } - - /** - * Gets details of credentials for NSX appliance. - * - * The async variant is {@see VmwareEngineClient::showNsxCredentialsAsync()} . - * - * @example samples/V1/VmwareEngineClient/show_nsx_credentials.php - * - * @param ShowNsxCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Credentials - * - * @throws ApiException Thrown if the API call fails. - */ - public function showNsxCredentials(ShowNsxCredentialsRequest $request, array $callOptions = []): Credentials - { - return $this->startApiCall('ShowNsxCredentials', $request, $callOptions)->wait(); - } - - /** - * Gets details of credentials for Vcenter appliance. - * - * The async variant is {@see VmwareEngineClient::showVcenterCredentialsAsync()} . - * - * @example samples/V1/VmwareEngineClient/show_vcenter_credentials.php - * - * @param ShowVcenterCredentialsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Credentials - * - * @throws ApiException Thrown if the API call fails. - */ - public function showVcenterCredentials(ShowVcenterCredentialsRequest $request, array $callOptions = []): Credentials - { - return $this->startApiCall('ShowVcenterCredentials', $request, $callOptions)->wait(); - } - - /** - * Restores a private cloud that was previously scheduled for deletion by - * `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has - * `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to - * the time when deletion can no longer be reversed. - * - * The async variant is {@see VmwareEngineClient::undeletePrivateCloudAsync()} . - * - * @example samples/V1/VmwareEngineClient/undelete_private_cloud.php - * - * @param UndeletePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 undeletePrivateCloud(UndeletePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeletePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Modifies a `Cluster` resource. Only fields specified in `updateMask` are - * applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see VmwareEngineClient::updateClusterAsync()} . - * - * @example samples/V1/VmwareEngineClient/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 the `DnsForwarding` config, like associated - * domains. Only fields specified in `update_mask` are applied. - * - * The async variant is {@see VmwareEngineClient::updateDnsForwardingAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_dns_forwarding.php - * - * @param UpdateDnsForwardingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateDnsForwarding(UpdateDnsForwardingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDnsForwarding', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single external access rule. - * Only fields specified in `update_mask` are applied. - * - * The async variant is {@see VmwareEngineClient::updateExternalAccessRuleAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/update_external_access_rule.php - * - * @param UpdateExternalAccessRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateExternalAccessRule(UpdateExternalAccessRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateExternalAccessRule', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single external IP address. - * Only fields specified in `update_mask` are applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see VmwareEngineClient::updateExternalAddressAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_external_address.php - * - * @param UpdateExternalAddressRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateExternalAddress(UpdateExternalAddressRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateExternalAddress', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single logging server. - * Only fields specified in `update_mask` are applied. - * - * The async variant is {@see VmwareEngineClient::updateLoggingServerAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_logging_server.php - * - * @param UpdateLoggingServerRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateLoggingServer(UpdateLoggingServerRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateLoggingServer', $request, $callOptions)->wait(); - } - - /** - * Updates a `ManagementDnsZoneBinding` resource. - * Only fields specified in `update_mask` are applied. - * - * The async variant is - * {@see VmwareEngineClient::updateManagementDnsZoneBindingAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_management_dns_zone_binding.php - * - * @param UpdateManagementDnsZoneBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateManagementDnsZoneBinding(UpdateManagementDnsZoneBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateManagementDnsZoneBinding', $request, $callOptions)->wait(); - } - - /** - * Modifies a `NetworkPeering` resource. Only the `description` field can be - * updated. Only fields specified in `updateMask` are applied. NetworkPeering - * is a global resource and location can only be global. - * - * The async variant is {@see VmwareEngineClient::updateNetworkPeeringAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_network_peering.php - * - * @param UpdateNetworkPeeringRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateNetworkPeering(UpdateNetworkPeeringRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateNetworkPeering', $request, $callOptions)->wait(); - } - - /** - * Modifies a `NetworkPolicy` resource. Only the following fields can be - * updated: `internet_access`, `external_ip`, `edge_services_cidr`. - * Only fields specified in `updateMask` are applied. When updating a network - * policy, the external IP network service can only be disabled if there are - * no external IP addresses present in the scope of the policy. Also, a - * `NetworkService` cannot be updated when `NetworkService.state` is set - * to `RECONCILING`. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see VmwareEngineClient::updateNetworkPolicyAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_network_policy.php - * - * @param UpdateNetworkPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateNetworkPolicy(UpdateNetworkPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateNetworkPolicy', $request, $callOptions)->wait(); - } - - /** - * Modifies a `PrivateCloud` resource. Only the following fields can be - * updated: `description`. - * Only fields specified in `updateMask` are applied. - * - * During operation processing, the resource is temporarily in the `ACTIVE` - * state before the operation fully completes. For that period of time, you - * can't update the resource. Use the operation status to determine when the - * processing fully completes. - * - * The async variant is {@see VmwareEngineClient::updatePrivateCloudAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_private_cloud.php - * - * @param UpdatePrivateCloudRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updatePrivateCloud(UpdatePrivateCloudRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePrivateCloud', $request, $callOptions)->wait(); - } - - /** - * Modifies a `PrivateConnection` resource. Only `description` and - * `routing_mode` fields can be updated. Only fields specified in `updateMask` - * are applied. - * - * The async variant is {@see VmwareEngineClient::updatePrivateConnectionAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_private_connection.php - * - * @param UpdatePrivateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updatePrivateConnection(UpdatePrivateConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single subnet. Only fields specified in - * `update_mask` are applied. - * - * *Note*: This API is synchronous and always returns a successful - * `google.longrunning.Operation` (LRO). The returned LRO will only have - * `done` and `response` fields. - * - * The async variant is {@see VmwareEngineClient::updateSubnetAsync()} . - * - * @example samples/V1/VmwareEngineClient/update_subnet.php - * - * @param UpdateSubnetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateSubnet(UpdateSubnetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSubnet', $request, $callOptions)->wait(); - } - - /** - * Modifies a VMware Engine network resource. Only the following fields can be - * updated: `description`. Only fields specified in `updateMask` are - * applied. - * - * The async variant is {@see VmwareEngineClient::updateVmwareEngineNetworkAsync()} - * . - * - * @example samples/V1/VmwareEngineClient/update_vmware_engine_network.php - * - * @param UpdateVmwareEngineNetworkRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateVmwareEngineNetwork(UpdateVmwareEngineNetworkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateVmwareEngineNetwork', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see VmwareEngineClient::getLocationAsync()} . - * - * @example samples/V1/VmwareEngineClient/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 VmwareEngineClient::listLocationsAsync()} . - * - * @example samples/V1/VmwareEngineClient/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); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see VmwareEngineClient::getIamPolicyAsync()} . - * - * @example samples/V1/VmwareEngineClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see VmwareEngineClient::setIamPolicyAsync()} . - * - * @example samples/V1/VmwareEngineClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see VmwareEngineClient::testIamPermissionsAsync()} . - * - * @example samples/V1/VmwareEngineClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json deleted file mode 100644 index f3559962a01c..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,413 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.vmwareengine.v1", - "libraryPackage": "Google\\Cloud\\VmwareEngine\\V1", - "services": { - "VmwareEngine": { - "clients": { - "grpc": { - "libraryClient": "VmwareEngineGapicClient", - "rpcs": { - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "CreateExternalAccessRule": { - "methods": [ - "createExternalAccessRule" - ] - }, - "CreateExternalAddress": { - "methods": [ - "createExternalAddress" - ] - }, - "CreateHcxActivationKey": { - "methods": [ - "createHcxActivationKey" - ] - }, - "CreateLoggingServer": { - "methods": [ - "createLoggingServer" - ] - }, - "CreateManagementDnsZoneBinding": { - "methods": [ - "createManagementDnsZoneBinding" - ] - }, - "CreateNetworkPeering": { - "methods": [ - "createNetworkPeering" - ] - }, - "CreateNetworkPolicy": { - "methods": [ - "createNetworkPolicy" - ] - }, - "CreatePrivateCloud": { - "methods": [ - "createPrivateCloud" - ] - }, - "CreatePrivateConnection": { - "methods": [ - "createPrivateConnection" - ] - }, - "CreateVmwareEngineNetwork": { - "methods": [ - "createVmwareEngineNetwork" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "DeleteExternalAccessRule": { - "methods": [ - "deleteExternalAccessRule" - ] - }, - "DeleteExternalAddress": { - "methods": [ - "deleteExternalAddress" - ] - }, - "DeleteLoggingServer": { - "methods": [ - "deleteLoggingServer" - ] - }, - "DeleteManagementDnsZoneBinding": { - "methods": [ - "deleteManagementDnsZoneBinding" - ] - }, - "DeleteNetworkPeering": { - "methods": [ - "deleteNetworkPeering" - ] - }, - "DeleteNetworkPolicy": { - "methods": [ - "deleteNetworkPolicy" - ] - }, - "DeletePrivateCloud": { - "methods": [ - "deletePrivateCloud" - ] - }, - "DeletePrivateConnection": { - "methods": [ - "deletePrivateConnection" - ] - }, - "DeleteVmwareEngineNetwork": { - "methods": [ - "deleteVmwareEngineNetwork" - ] - }, - "FetchNetworkPolicyExternalAddresses": { - "methods": [ - "fetchNetworkPolicyExternalAddresses" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "GetDnsBindPermission": { - "methods": [ - "getDnsBindPermission" - ] - }, - "GetDnsForwarding": { - "methods": [ - "getDnsForwarding" - ] - }, - "GetExternalAccessRule": { - "methods": [ - "getExternalAccessRule" - ] - }, - "GetExternalAddress": { - "methods": [ - "getExternalAddress" - ] - }, - "GetHcxActivationKey": { - "methods": [ - "getHcxActivationKey" - ] - }, - "GetLoggingServer": { - "methods": [ - "getLoggingServer" - ] - }, - "GetManagementDnsZoneBinding": { - "methods": [ - "getManagementDnsZoneBinding" - ] - }, - "GetNetworkPeering": { - "methods": [ - "getNetworkPeering" - ] - }, - "GetNetworkPolicy": { - "methods": [ - "getNetworkPolicy" - ] - }, - "GetNode": { - "methods": [ - "getNode" - ] - }, - "GetNodeType": { - "methods": [ - "getNodeType" - ] - }, - "GetPrivateCloud": { - "methods": [ - "getPrivateCloud" - ] - }, - "GetPrivateConnection": { - "methods": [ - "getPrivateConnection" - ] - }, - "GetSubnet": { - "methods": [ - "getSubnet" - ] - }, - "GetVmwareEngineNetwork": { - "methods": [ - "getVmwareEngineNetwork" - ] - }, - "GrantDnsBindPermission": { - "methods": [ - "grantDnsBindPermission" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "ListExternalAccessRules": { - "methods": [ - "listExternalAccessRules" - ] - }, - "ListExternalAddresses": { - "methods": [ - "listExternalAddresses" - ] - }, - "ListHcxActivationKeys": { - "methods": [ - "listHcxActivationKeys" - ] - }, - "ListLoggingServers": { - "methods": [ - "listLoggingServers" - ] - }, - "ListManagementDnsZoneBindings": { - "methods": [ - "listManagementDnsZoneBindings" - ] - }, - "ListNetworkPeerings": { - "methods": [ - "listNetworkPeerings" - ] - }, - "ListNetworkPolicies": { - "methods": [ - "listNetworkPolicies" - ] - }, - "ListNodeTypes": { - "methods": [ - "listNodeTypes" - ] - }, - "ListNodes": { - "methods": [ - "listNodes" - ] - }, - "ListPeeringRoutes": { - "methods": [ - "listPeeringRoutes" - ] - }, - "ListPrivateClouds": { - "methods": [ - "listPrivateClouds" - ] - }, - "ListPrivateConnectionPeeringRoutes": { - "methods": [ - "listPrivateConnectionPeeringRoutes" - ] - }, - "ListPrivateConnections": { - "methods": [ - "listPrivateConnections" - ] - }, - "ListSubnets": { - "methods": [ - "listSubnets" - ] - }, - "ListVmwareEngineNetworks": { - "methods": [ - "listVmwareEngineNetworks" - ] - }, - "RepairManagementDnsZoneBinding": { - "methods": [ - "repairManagementDnsZoneBinding" - ] - }, - "ResetNsxCredentials": { - "methods": [ - "resetNsxCredentials" - ] - }, - "ResetVcenterCredentials": { - "methods": [ - "resetVcenterCredentials" - ] - }, - "RevokeDnsBindPermission": { - "methods": [ - "revokeDnsBindPermission" - ] - }, - "ShowNsxCredentials": { - "methods": [ - "showNsxCredentials" - ] - }, - "ShowVcenterCredentials": { - "methods": [ - "showVcenterCredentials" - ] - }, - "UndeletePrivateCloud": { - "methods": [ - "undeletePrivateCloud" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateDnsForwarding": { - "methods": [ - "updateDnsForwarding" - ] - }, - "UpdateExternalAccessRule": { - "methods": [ - "updateExternalAccessRule" - ] - }, - "UpdateExternalAddress": { - "methods": [ - "updateExternalAddress" - ] - }, - "UpdateLoggingServer": { - "methods": [ - "updateLoggingServer" - ] - }, - "UpdateManagementDnsZoneBinding": { - "methods": [ - "updateManagementDnsZoneBinding" - ] - }, - "UpdateNetworkPeering": { - "methods": [ - "updateNetworkPeering" - ] - }, - "UpdateNetworkPolicy": { - "methods": [ - "updateNetworkPolicy" - ] - }, - "UpdatePrivateCloud": { - "methods": [ - "updatePrivateCloud" - ] - }, - "UpdatePrivateConnection": { - "methods": [ - "updatePrivateConnection" - ] - }, - "UpdateSubnet": { - "methods": [ - "updateSubnet" - ] - }, - "UpdateVmwareEngineNetwork": { - "methods": [ - "updateVmwareEngineNetwork" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json deleted file mode 100644 index b669825592a5..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_client_config.json +++ /dev/null @@ -1,449 +0,0 @@ -{ - "interfaces": { - "google.cloud.vmwareengine.v1.VmwareEngine": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [], - "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_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "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 - } - }, - "methods": { - "CreateCluster": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateExternalAccessRule": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateExternalAddress": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateHcxActivationKey": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateLoggingServer": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateManagementDnsZoneBinding": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateNetworkPeering": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateNetworkPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreatePrivateCloud": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreatePrivateConnection": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateVmwareEngineNetwork": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteCluster": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteExternalAccessRule": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteExternalAddress": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteLoggingServer": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteManagementDnsZoneBinding": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteNetworkPeering": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteNetworkPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeletePrivateCloud": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeletePrivateConnection": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteVmwareEngineNetwork": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "FetchNetworkPolicyExternalAddresses": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetCluster": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDnsBindPermission": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDnsForwarding": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetExternalAccessRule": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetExternalAddress": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetHcxActivationKey": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLoggingServer": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetManagementDnsZoneBinding": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetNetworkPeering": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetNetworkPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetNode": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetNodeType": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPrivateCloud": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPrivateConnection": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSubnet": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVmwareEngineNetwork": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GrantDnsBindPermission": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ListClusters": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListExternalAccessRules": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListExternalAddresses": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListHcxActivationKeys": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLoggingServers": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListManagementDnsZoneBindings": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNetworkPeerings": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNetworkPolicies": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNodeTypes": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListNodes": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPeeringRoutes": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPrivateClouds": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPrivateConnectionPeeringRoutes": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPrivateConnections": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSubnets": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVmwareEngineNetworks": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RepairManagementDnsZoneBinding": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ResetNsxCredentials": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ResetVcenterCredentials": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "RevokeDnsBindPermission": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ShowNsxCredentials": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ShowVcenterCredentials": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UndeletePrivateCloud": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateCluster": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateDnsForwarding": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateExternalAccessRule": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateExternalAddress": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateLoggingServer": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateManagementDnsZoneBinding": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateNetworkPeering": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateNetworkPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdatePrivateCloud": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdatePrivateConnection": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateSubnet": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateVmwareEngineNetwork": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetLocation": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "ListLocations": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetIamPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "SetIamPolicy": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "TestIamPermissions": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php deleted file mode 100644 index 8005a342582a..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_descriptor_config.php +++ /dev/null @@ -1,1430 +0,0 @@ - [ - 'google.cloud.vmwareengine.v1.VmwareEngine' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExternalAccessRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAccessRule', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExternalAddress' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAddress', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateHcxActivationKey' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\HcxActivationKey', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLoggingServer' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\LoggingServer', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateManagementDnsZoneBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNetworkPeering' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPeering', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateNetworkPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePrivateConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateConnection', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVmwareEngineNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\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\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExternalAccessRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExternalAddress' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLoggingServer' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteManagementDnsZoneBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNetworkPeering' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNetworkPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVmwareEngineNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GrantDnsBindPermission' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\DnsBindPermission', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RepairManagementDnsZoneBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResetNsxCredentials' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ResetVcenterCredentials' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'RevokeDnsBindPermission' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\DnsBindPermission', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UndeletePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'UpdateDnsForwarding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\DnsForwarding', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'dns_forwarding.name', - 'fieldAccessors' => [ - 'getDnsForwarding', - 'getName', - ], - ], - ], - ], - 'UpdateExternalAccessRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAccessRule', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'external_access_rule.name', - 'fieldAccessors' => [ - 'getExternalAccessRule', - 'getName', - ], - ], - ], - ], - 'UpdateExternalAddress' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ExternalAddress', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'external_address.name', - 'fieldAccessors' => [ - 'getExternalAddress', - 'getName', - ], - ], - ], - ], - 'UpdateLoggingServer' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\LoggingServer', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'logging_server.name', - 'fieldAccessors' => [ - 'getLoggingServer', - 'getName', - ], - ], - ], - ], - 'UpdateManagementDnsZoneBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'management_dns_zone_binding.name', - 'fieldAccessors' => [ - 'getManagementDnsZoneBinding', - 'getName', - ], - ], - ], - ], - 'UpdateNetworkPeering' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPeering', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'network_peering.name', - 'fieldAccessors' => [ - 'getNetworkPeering', - 'getName', - ], - ], - ], - ], - 'UpdateNetworkPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\NetworkPolicy', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'network_policy.name', - 'fieldAccessors' => [ - 'getNetworkPolicy', - 'getName', - ], - ], - ], - ], - 'UpdatePrivateCloud' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_cloud.name', - 'fieldAccessors' => [ - 'getPrivateCloud', - 'getName', - ], - ], - ], - ], - 'UpdatePrivateConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\PrivateConnection', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'private_connection.name', - 'fieldAccessors' => [ - 'getPrivateConnection', - 'getName', - ], - ], - ], - ], - 'UpdateSubnet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\Subnet', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'subnet.name', - 'fieldAccessors' => [ - 'getSubnet', - 'getName', - ], - ], - ], - ], - 'UpdateVmwareEngineNetwork' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', - 'metadataReturnType' => '\Google\Cloud\VmwareEngine\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'vmware_engine_network.name', - 'fieldAccessors' => [ - 'getVmwareEngineNetwork', - 'getName', - ], - ], - ], - ], - 'FetchNetworkPolicyExternalAddresses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExternalAddresses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\FetchNetworkPolicyExternalAddressesResponse', - 'headerParams' => [ - [ - 'keyName' => 'network_policy', - 'fieldAccessors' => [ - 'getNetworkPolicy', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDnsBindPermission' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\DnsBindPermission', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDnsForwarding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\DnsForwarding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExternalAccessRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ExternalAccessRule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExternalAddress' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ExternalAddress', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetHcxActivationKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\HcxActivationKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLoggingServer' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\LoggingServer', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetManagementDnsZoneBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ManagementDnsZoneBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNetworkPeering' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\NetworkPeering', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNetworkPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\NetworkPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNode' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Node', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNodeType' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\NodeType', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateCloud' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\PrivateCloud', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\PrivateConnection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSubnet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Subnet', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVmwareEngineNetwork' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork', - '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\VmwareEngine\V1\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListExternalAccessRules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExternalAccessRules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListExternalAccessRulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListExternalAddresses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExternalAddresses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListExternalAddressesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHcxActivationKeys' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHcxActivationKeys', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListHcxActivationKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLoggingServers' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLoggingServers', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListLoggingServersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListManagementDnsZoneBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getManagementDnsZoneBindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListManagementDnsZoneBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkPeerings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNetworkPeerings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNetworkPeeringsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNetworkPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNetworkPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodeTypes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNodeTypes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNodeTypesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNodes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListNodesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPeeringRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPeeringRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPeeringRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateClouds' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPrivateClouds', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateCloudsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateConnectionPeeringRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPeeringRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateConnectionPeeringRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPrivateConnections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListPrivateConnectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSubnets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSubnets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListSubnetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVmwareEngineNetworks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVmwareEngineNetworks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\ListVmwareEngineNetworksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ShowNsxCredentials' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ShowVcenterCredentials' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VmwareEngine\V1\Credentials', - 'headerParams' => [ - [ - 'keyName' => 'private_cloud', - 'fieldAccessors' => [ - 'getPrivateCloud', - ], - ], - ], - ], - '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', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'cluster' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}', - 'dnsBindPermission' => 'projects/{project}/locations/{location}/dnsBindPermission', - 'dnsForwarding' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/dnsForwarding', - 'externalAccessRule' => 'projects/{project}/locations/{location}/networkPolicies/{network_policy}/externalAccessRules/{external_access_rule}', - 'externalAddress' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}', - 'hcxActivationKey' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/hcxActivationKeys/{hcx_activation_key}', - 'location' => 'projects/{project}/locations/{location}', - 'loggingServer' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/loggingServers/{logging_server}', - 'managementDnsZoneBinding' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/managementDnsZoneBindings/{management_dns_zone_binding}', - 'network' => 'projects/{project}/global/networks/{network}', - 'networkPeering' => 'projects/{project}/locations/{location}/networkPeerings/{network_peering}', - 'networkPolicy' => 'projects/{project}/locations/{location}/networkPolicies/{network_policy}', - 'node' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}', - 'nodeType' => 'projects/{project}/locations/{location}/nodeTypes/{node_type}', - 'privateCloud' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}', - 'privateConnection' => 'projects/{project}/locations/{location}/privateConnections/{private_connection}', - 'subnet' => 'projects/{project}/locations/{location}/privateClouds/{private_cloud}/subnets/{subnet}', - 'vmwareEngineNetwork' => 'projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php b/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php deleted file mode 100644 index d95541cca591..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/src/V1/resources/vmware_engine_rest_client_config.php +++ /dev/null @@ -1,1083 +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.vmwareengine.v1.VmwareEngine' => [ - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'CreateExternalAccessRule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/networkPolicies/*}/externalAccessRules', - 'body' => 'external_access_rule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'external_access_rule_id', - ], - ], - 'CreateExternalAddress' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/externalAddresses', - 'body' => 'external_address', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'external_address_id', - ], - ], - 'CreateHcxActivationKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', - 'body' => 'hcx_activation_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'hcx_activation_key_id', - ], - ], - 'CreateLoggingServer' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/loggingServers', - 'body' => 'logging_server', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'logging_server_id', - ], - ], - 'CreateManagementDnsZoneBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/managementDnsZoneBindings', - 'body' => 'management_dns_zone_binding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'management_dns_zone_binding_id', - ], - ], - 'CreateNetworkPeering' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPeerings', - 'body' => 'network_peering', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'network_peering_id', - ], - ], - 'CreateNetworkPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', - 'body' => 'network_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'network_policy_id', - ], - ], - 'CreatePrivateCloud' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', - 'body' => 'private_cloud', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'private_cloud_id', - ], - ], - 'CreatePrivateConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', - 'body' => 'private_connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'private_connection_id', - ], - ], - 'CreateVmwareEngineNetwork' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', - 'body' => 'vmware_engine_network', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'vmware_engine_network_id', - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExternalAccessRule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*/externalAccessRules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExternalAddress' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/externalAddresses/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLoggingServer' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/loggingServers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteManagementDnsZoneBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNetworkPeering' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPeerings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNetworkPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateCloud' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateConnection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVmwareEngineNetwork' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FetchNetworkPolicyExternalAddresses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{network_policy=projects/*/locations/*/networkPolicies/*}:fetchExternalAddresses', - 'placeholders' => [ - 'network_policy' => [ - 'getters' => [ - 'getNetworkPolicy', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDnsBindPermission' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsBindPermission}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDnsForwarding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/dnsForwarding}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExternalAccessRule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*/externalAccessRules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExternalAddress' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/externalAddresses/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetHcxActivationKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLoggingServer' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/loggingServers/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetManagementDnsZoneBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNetworkPeering' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPeerings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNetworkPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/networkPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNode' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/clusters/*/nodes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNodeType' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/nodeTypes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateCloud' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSubnet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/subnets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVmwareEngineNetwork' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/vmwareEngineNetworks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GrantDnsBindPermission' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsBindPermission}:grant', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListExternalAccessRules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/networkPolicies/*}/externalAccessRules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListExternalAddresses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/externalAddresses', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHcxActivationKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/hcxActivationKeys', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLoggingServers' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/loggingServers', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListManagementDnsZoneBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/managementDnsZoneBindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkPeerings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPeerings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNetworkPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/networkPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodeTypes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/nodeTypes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListNodes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*/clusters/*}/nodes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPeeringRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/networkPeerings/*}/peeringRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateClouds' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateClouds', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateConnectionPeeringRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateConnections/*}/peeringRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSubnets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateClouds/*}/subnets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVmwareEngineNetworks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/vmwareEngineNetworks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RepairManagementDnsZoneBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}:repair', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResetNsxCredentials' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetNsxCredentials', - 'body' => '*', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ResetVcenterCredentials' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:resetVcenterCredentials', - 'body' => '*', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'RevokeDnsBindPermission' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/dnsBindPermission}:revoke', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ShowNsxCredentials' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showNsxCredentials', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'ShowVcenterCredentials' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{private_cloud=projects/*/locations/*/privateClouds/*}:showVcenterCredentials', - 'placeholders' => [ - 'private_cloud' => [ - 'getters' => [ - 'getPrivateCloud', - ], - ], - ], - ], - 'UndeletePrivateCloud' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateClouds/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/privateClouds/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateDnsForwarding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{dns_forwarding.name=projects/*/locations/*/privateClouds/*/dnsForwarding}', - 'body' => 'dns_forwarding', - 'placeholders' => [ - 'dns_forwarding.name' => [ - 'getters' => [ - 'getDnsForwarding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateExternalAccessRule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{external_access_rule.name=projects/*/locations/*/networkPolicies/*/externalAccessRules/*}', - 'body' => 'external_access_rule', - 'placeholders' => [ - 'external_access_rule.name' => [ - 'getters' => [ - 'getExternalAccessRule', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateExternalAddress' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{external_address.name=projects/*/locations/*/privateClouds/*/externalAddresses/*}', - 'body' => 'external_address', - 'placeholders' => [ - 'external_address.name' => [ - 'getters' => [ - 'getExternalAddress', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateLoggingServer' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{logging_server.name=projects/*/locations/*/privateClouds/*/loggingServers/*}', - 'body' => 'logging_server', - 'placeholders' => [ - 'logging_server.name' => [ - 'getters' => [ - 'getLoggingServer', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateManagementDnsZoneBinding' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{management_dns_zone_binding.name=projects/*/locations/*/privateClouds/*/managementDnsZoneBindings/*}', - 'body' => 'management_dns_zone_binding', - 'placeholders' => [ - 'management_dns_zone_binding.name' => [ - 'getters' => [ - 'getManagementDnsZoneBinding', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateNetworkPeering' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{network_peering.name=projects/*/locations/*/networkPeerings/*}', - 'body' => 'network_peering', - 'placeholders' => [ - 'network_peering.name' => [ - 'getters' => [ - 'getNetworkPeering', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateNetworkPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{network_policy.name=projects/*/locations/*/networkPolicies/*}', - 'body' => 'network_policy', - 'placeholders' => [ - 'network_policy.name' => [ - 'getters' => [ - 'getNetworkPolicy', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdatePrivateCloud' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{private_cloud.name=projects/*/locations/*/privateClouds/*}', - 'body' => 'private_cloud', - 'placeholders' => [ - 'private_cloud.name' => [ - 'getters' => [ - 'getPrivateCloud', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdatePrivateConnection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{private_connection.name=projects/*/locations/*/privateConnections/*}', - 'body' => 'private_connection', - 'placeholders' => [ - 'private_connection.name' => [ - 'getters' => [ - 'getPrivateConnection', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSubnet' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{subnet.name=projects/*/locations/*/privateClouds/*/subnets/*}', - 'body' => 'subnet', - 'placeholders' => [ - 'subnet.name' => [ - 'getters' => [ - 'getSubnet', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateVmwareEngineNetwork' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{vmware_engine_network.name=projects/*/locations/*/vmwareEngineNetworks/*}', - 'body' => 'vmware_engine_network', - 'placeholders' => [ - 'vmware_engine_network.name' => [ - 'getters' => [ - 'getVmwareEngineNetwork', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/clusters/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/privateClouds/*/hcxActivationKeys/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php b/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php deleted file mode 100644 index 75e2221fc677..000000000000 --- a/owl-bot-staging/VmwareEngine/v1/tests/Unit/V1/Client/VmwareEngineClientTest.php +++ /dev/null @@ -1,8496 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VmwareEngineClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VmwareEngineClient($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'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $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.vmwareengine.v1.VmwareEngine/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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $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 createExternalAccessRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createExternalAccessRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $priority = 1165461084; - $ipProtocol = 'ipProtocol-1134653776'; - $uid = 'uid115792'; - $expectedResponse = new ExternalAccessRule(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPriority($priority); - $expectedResponse->setIpProtocol($ipProtocol); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createExternalAccessRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $externalAccessRule = new ExternalAccessRule(); - $externalAccessRuleId = 'externalAccessRuleId1434975319'; - $request = (new CreateExternalAccessRuleRequest()) - ->setParent($formattedParent) - ->setExternalAccessRule($externalAccessRule) - ->setExternalAccessRuleId($externalAccessRuleId); - $response = $gapicClient->createExternalAccessRule($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.vmwareengine.v1.VmwareEngine/CreateExternalAccessRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getExternalAccessRule(); - $this->assertProtobufEquals($externalAccessRule, $actualValue); - $actualValue = $actualApiRequestObject->getExternalAccessRuleId(); - $this->assertProtobufEquals($externalAccessRuleId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createExternalAccessRuleTest'); - $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 createExternalAccessRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createExternalAccessRuleTest'); - $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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $externalAccessRule = new ExternalAccessRule(); - $externalAccessRuleId = 'externalAccessRuleId1434975319'; - $request = (new CreateExternalAccessRuleRequest()) - ->setParent($formattedParent) - ->setExternalAccessRule($externalAccessRule) - ->setExternalAccessRuleId($externalAccessRuleId); - $response = $gapicClient->createExternalAccessRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createExternalAccessRuleTest'); - 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 createExternalAddressTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createExternalAddressTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $internalIp = 'internalIp-2080778775'; - $externalIp = 'externalIp-1153075685'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new ExternalAddress(); - $expectedResponse->setName($name); - $expectedResponse->setInternalIp($internalIp); - $expectedResponse->setExternalIp($externalIp); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createExternalAddressTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $externalAddress = new ExternalAddress(); - $externalAddressId = 'externalAddressId344331834'; - $request = (new CreateExternalAddressRequest()) - ->setParent($formattedParent) - ->setExternalAddress($externalAddress) - ->setExternalAddressId($externalAddressId); - $response = $gapicClient->createExternalAddress($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.vmwareengine.v1.VmwareEngine/CreateExternalAddress', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getExternalAddress(); - $this->assertProtobufEquals($externalAddress, $actualValue); - $actualValue = $actualApiRequestObject->getExternalAddressId(); - $this->assertProtobufEquals($externalAddressId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createExternalAddressTest'); - $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 createExternalAddressExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createExternalAddressTest'); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $externalAddress = new ExternalAddress(); - $externalAddressId = 'externalAddressId344331834'; - $request = (new CreateExternalAddressRequest()) - ->setParent($formattedParent) - ->setExternalAddress($externalAddress) - ->setExternalAddressId($externalAddressId); - $response = $gapicClient->createExternalAddress($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createExternalAddressTest'); - 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 createHcxActivationKeyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHcxActivationKeyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $activationKey = 'activationKey-1343958090'; - $uid = 'uid115792'; - $expectedResponse = new HcxActivationKey(); - $expectedResponse->setName($name); - $expectedResponse->setActivationKey($activationKey); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createHcxActivationKeyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $hcxActivationKey = new HcxActivationKey(); - $hcxActivationKeyId = 'hcxActivationKeyId26532194'; - $request = (new CreateHcxActivationKeyRequest()) - ->setParent($formattedParent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - $response = $gapicClient->createHcxActivationKey($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.vmwareengine.v1.VmwareEngine/CreateHcxActivationKey', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getHcxActivationKey(); - $this->assertProtobufEquals($hcxActivationKey, $actualValue); - $actualValue = $actualApiRequestObject->getHcxActivationKeyId(); - $this->assertProtobufEquals($hcxActivationKeyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); - $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 createHcxActivationKeyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHcxActivationKeyTest'); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $hcxActivationKey = new HcxActivationKey(); - $hcxActivationKeyId = 'hcxActivationKeyId26532194'; - $request = (new CreateHcxActivationKeyRequest()) - ->setParent($formattedParent) - ->setHcxActivationKey($hcxActivationKey) - ->setHcxActivationKeyId($hcxActivationKeyId); - $response = $gapicClient->createHcxActivationKey($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHcxActivationKeyTest'); - 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 createLoggingServerTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLoggingServerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $port = 3446913; - $uid = 'uid115792'; - $expectedResponse = new LoggingServer(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $expectedResponse->setPort($port); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLoggingServerTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $loggingServer = new LoggingServer(); - $loggingServerHostname = 'loggingServerHostname2082652629'; - $loggingServer->setHostname($loggingServerHostname); - $loggingServerPort = 243392733; - $loggingServer->setPort($loggingServerPort); - $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; - $loggingServer->setProtocol($loggingServerProtocol); - $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; - $loggingServer->setSourceType($loggingServerSourceType); - $loggingServerId = 'loggingServerId-2097171785'; - $request = (new CreateLoggingServerRequest()) - ->setParent($formattedParent) - ->setLoggingServer($loggingServer) - ->setLoggingServerId($loggingServerId); - $response = $gapicClient->createLoggingServer($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.vmwareengine.v1.VmwareEngine/CreateLoggingServer', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLoggingServer(); - $this->assertProtobufEquals($loggingServer, $actualValue); - $actualValue = $actualApiRequestObject->getLoggingServerId(); - $this->assertProtobufEquals($loggingServerId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLoggingServerTest'); - $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 createLoggingServerExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLoggingServerTest'); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $loggingServer = new LoggingServer(); - $loggingServerHostname = 'loggingServerHostname2082652629'; - $loggingServer->setHostname($loggingServerHostname); - $loggingServerPort = 243392733; - $loggingServer->setPort($loggingServerPort); - $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; - $loggingServer->setProtocol($loggingServerProtocol); - $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; - $loggingServer->setSourceType($loggingServerSourceType); - $loggingServerId = 'loggingServerId-2097171785'; - $request = (new CreateLoggingServerRequest()) - ->setParent($formattedParent) - ->setLoggingServer($loggingServer) - ->setLoggingServerId($loggingServerId); - $response = $gapicClient->createLoggingServer($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLoggingServerTest'); - 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 createManagementDnsZoneBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createManagementDnsZoneBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $vpcNetwork = 'vpcNetwork-764161832'; - $uid = 'uid115792'; - $expectedResponse = new ManagementDnsZoneBinding(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVpcNetwork($vpcNetwork); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createManagementDnsZoneBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $managementDnsZoneBinding = new ManagementDnsZoneBinding(); - $managementDnsZoneBindingId = 'managementDnsZoneBindingId-1294625162'; - $request = (new CreateManagementDnsZoneBindingRequest()) - ->setParent($formattedParent) - ->setManagementDnsZoneBinding($managementDnsZoneBinding) - ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); - $response = $gapicClient->createManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/CreateManagementDnsZoneBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getManagementDnsZoneBinding(); - $this->assertProtobufEquals($managementDnsZoneBinding, $actualValue); - $actualValue = $actualApiRequestObject->getManagementDnsZoneBindingId(); - $this->assertProtobufEquals($managementDnsZoneBindingId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createManagementDnsZoneBindingTest'); - $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 createManagementDnsZoneBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createManagementDnsZoneBindingTest'); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $managementDnsZoneBinding = new ManagementDnsZoneBinding(); - $managementDnsZoneBindingId = 'managementDnsZoneBindingId-1294625162'; - $request = (new CreateManagementDnsZoneBindingRequest()) - ->setParent($formattedParent) - ->setManagementDnsZoneBinding($managementDnsZoneBinding) - ->setManagementDnsZoneBindingId($managementDnsZoneBindingId); - $response = $gapicClient->createManagementDnsZoneBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createManagementDnsZoneBindingTest'); - 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 createNetworkPeeringTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPeeringTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $peerNetwork = 'peerNetwork2111238225'; - $exportCustomRoutes = false; - $importCustomRoutes = true; - $exchangeSubnetRoutes = true; - $exportCustomRoutesWithPublicIp = true; - $importCustomRoutesWithPublicIp = false; - $stateDetails = 'stateDetails632437908'; - $peerMtu = 69584721; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $expectedResponse = new NetworkPeering(); - $expectedResponse->setName($name); - $expectedResponse->setPeerNetwork($peerNetwork); - $expectedResponse->setExportCustomRoutes($exportCustomRoutes); - $expectedResponse->setImportCustomRoutes($importCustomRoutes); - $expectedResponse->setExchangeSubnetRoutes($exchangeSubnetRoutes); - $expectedResponse->setExportCustomRoutesWithPublicIp($exportCustomRoutesWithPublicIp); - $expectedResponse->setImportCustomRoutesWithPublicIp($importCustomRoutesWithPublicIp); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setPeerMtu($peerMtu); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNetworkPeeringTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $networkPeeringId = 'networkPeeringId-2057959125'; - $networkPeering = new NetworkPeering(); - $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; - $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); - $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; - $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); - $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); - $request = (new CreateNetworkPeeringRequest()) - ->setParent($formattedParent) - ->setNetworkPeeringId($networkPeeringId) - ->setNetworkPeering($networkPeering); - $response = $gapicClient->createNetworkPeering($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.vmwareengine.v1.VmwareEngine/CreateNetworkPeering', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPeeringId(); - $this->assertProtobufEquals($networkPeeringId, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPeering(); - $this->assertProtobufEquals($networkPeering, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPeeringTest'); - $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 createNetworkPeeringExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPeeringTest'); - $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]'); - $networkPeeringId = 'networkPeeringId-2057959125'; - $networkPeering = new NetworkPeering(); - $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; - $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); - $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; - $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); - $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); - $request = (new CreateNetworkPeeringRequest()) - ->setParent($formattedParent) - ->setNetworkPeeringId($networkPeeringId) - ->setNetworkPeering($networkPeering); - $response = $gapicClient->createNetworkPeering($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPeeringTest'); - 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 createNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $networkPolicyId = 'networkPolicyId173955703'; - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $request = (new CreateNetworkPolicyRequest()) - ->setParent($formattedParent) - ->setNetworkPolicyId($networkPolicyId) - ->setNetworkPolicy($networkPolicy); - $response = $gapicClient->createNetworkPolicy($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.vmwareengine.v1.VmwareEngine/CreateNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPolicyId(); - $this->assertProtobufEquals($networkPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($networkPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); - $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 createNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createNetworkPolicyTest'); - $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]'); - $networkPolicyId = 'networkPolicyId173955703'; - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $request = (new CreateNetworkPolicyRequest()) - ->setParent($formattedParent) - ->setNetworkPolicyId($networkPolicyId) - ->setNetworkPolicy($networkPolicy); - $response = $gapicClient->createNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createNetworkPolicyTest'); - 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 createPrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateCloudId = 'privateCloudId1366391457'; - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $request = (new CreatePrivateCloudRequest()) - ->setParent($formattedParent) - ->setPrivateCloudId($privateCloudId) - ->setPrivateCloud($privateCloud); - $response = $gapicClient->createPrivateCloud($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.vmwareengine.v1.VmwareEngine/CreatePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateCloudId(); - $this->assertProtobufEquals($privateCloudId, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($privateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); - $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 createPrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateCloudTest'); - $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]'); - $privateCloudId = 'privateCloudId1366391457'; - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $request = (new CreatePrivateCloudRequest()) - ->setParent($formattedParent) - ->setPrivateCloudId($privateCloudId) - ->setPrivateCloud($privateCloud); - $response = $gapicClient->createPrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateCloudTest'); - 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 createPrivateConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $peeringId = 'peeringId-1561749894'; - $uid = 'uid115792'; - $serviceNetwork = 'serviceNetwork1072775844'; - $expectedResponse = new PrivateConnection(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $expectedResponse->setPeeringId($peeringId); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceNetwork($serviceNetwork); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPrivateConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateConnectionId = 'privateConnectionId-1948601248'; - $privateConnection = new PrivateConnection(); - $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); - $privateConnectionType = Type::TYPE_UNSPECIFIED; - $privateConnection->setType($privateConnectionType); - $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); - $request = (new CreatePrivateConnectionRequest()) - ->setParent($formattedParent) - ->setPrivateConnectionId($privateConnectionId) - ->setPrivateConnection($privateConnection); - $response = $gapicClient->createPrivateConnection($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.vmwareengine.v1.VmwareEngine/CreatePrivateConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateConnectionId(); - $this->assertProtobufEquals($privateConnectionId, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateConnection(); - $this->assertProtobufEquals($privateConnection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); - $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 createPrivateConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateConnectionTest'); - $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]'); - $privateConnectionId = 'privateConnectionId-1948601248'; - $privateConnection = new PrivateConnection(); - $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); - $privateConnectionType = Type::TYPE_UNSPECIFIED; - $privateConnection->setType($privateConnectionType); - $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); - $request = (new CreatePrivateConnectionRequest()) - ->setParent($formattedParent) - ->setPrivateConnectionId($privateConnectionId) - ->setPrivateConnection($privateConnection); - $response = $gapicClient->createPrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); - 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 createVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $request = (new CreateVmwareEngineNetworkRequest()) - ->setParent($formattedParent) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId) - ->setVmwareEngineNetwork($vmwareEngineNetwork); - $response = $gapicClient->createVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/CreateVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getVmwareEngineNetworkId(); - $this->assertProtobufEquals($vmwareEngineNetworkId, $actualValue); - $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); - $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); - $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 createVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVmwareEngineNetworkTest'); - $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]'); - $vmwareEngineNetworkId = 'vmwareEngineNetworkId2131972382'; - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $request = (new CreateVmwareEngineNetworkRequest()) - ->setParent($formattedParent) - ->setVmwareEngineNetworkId($vmwareEngineNetworkId) - ->setVmwareEngineNetwork($vmwareEngineNetwork); - $response = $gapicClient->createVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVmwareEngineNetworkTest'); - 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]', '[PRIVATE_CLOUD]', '[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.vmwareengine.v1.VmwareEngine/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]', '[PRIVATE_CLOUD]', '[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 deleteExternalAccessRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExternalAccessRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteExternalAccessRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); - $request = (new DeleteExternalAccessRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExternalAccessRule($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.vmwareengine.v1.VmwareEngine/DeleteExternalAccessRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExternalAccessRuleTest'); - $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 deleteExternalAccessRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExternalAccessRuleTest'); - $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->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); - $request = (new DeleteExternalAccessRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExternalAccessRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExternalAccessRuleTest'); - 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 deleteExternalAddressTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExternalAddressTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteExternalAddressTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); - $request = (new DeleteExternalAddressRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExternalAddress($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.vmwareengine.v1.VmwareEngine/DeleteExternalAddress', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExternalAddressTest'); - $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 deleteExternalAddressExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExternalAddressTest'); - $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->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); - $request = (new DeleteExternalAddressRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExternalAddress($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExternalAddressTest'); - 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 deleteLoggingServerTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLoggingServerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLoggingServerTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); - $request = (new DeleteLoggingServerRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLoggingServer($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.vmwareengine.v1.VmwareEngine/DeleteLoggingServer', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLoggingServerTest'); - $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 deleteLoggingServerExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLoggingServerTest'); - $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->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); - $request = (new DeleteLoggingServerRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLoggingServer($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLoggingServerTest'); - 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 deleteManagementDnsZoneBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteManagementDnsZoneBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteManagementDnsZoneBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); - $request = (new DeleteManagementDnsZoneBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/DeleteManagementDnsZoneBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteManagementDnsZoneBindingTest'); - $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 deleteManagementDnsZoneBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteManagementDnsZoneBindingTest'); - $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->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); - $request = (new DeleteManagementDnsZoneBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteManagementDnsZoneBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteManagementDnsZoneBindingTest'); - 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 deleteNetworkPeeringTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPeeringTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNetworkPeeringTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); - $request = (new DeleteNetworkPeeringRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNetworkPeering($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.vmwareengine.v1.VmwareEngine/DeleteNetworkPeering', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPeeringTest'); - $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 deleteNetworkPeeringExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPeeringTest'); - $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->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); - $request = (new DeleteNetworkPeeringRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNetworkPeering($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPeeringTest'); - 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 deleteNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new DeleteNetworkPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNetworkPolicy($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.vmwareengine.v1.VmwareEngine/DeleteNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); - $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 deleteNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteNetworkPolicyTest'); - $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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new DeleteNetworkPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteNetworkPolicyTest'); - 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 deletePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new DeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateCloud($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.vmwareengine.v1.VmwareEngine/DeletePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); - $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 deletePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateCloudTest'); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new DeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateCloudTest'); - 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 deletePrivateConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePrivateConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new DeletePrivateConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateConnection($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.vmwareengine.v1.VmwareEngine/DeletePrivateConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); - $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 deletePrivateConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateConnectionTest'); - $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->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new DeletePrivateConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); - 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 deleteVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new DeleteVmwareEngineNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/DeleteVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); - $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 deleteVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVmwareEngineNetworkTest'); - $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->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new DeleteVmwareEngineNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVmwareEngineNetworkTest'); - 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 fetchNetworkPolicyExternalAddressesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $externalAddressesElement = new ExternalAddress(); - $externalAddresses = [ - $externalAddressesElement, - ]; - $expectedResponse = new FetchNetworkPolicyExternalAddressesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExternalAddresses($externalAddresses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedNetworkPolicy = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new FetchNetworkPolicyExternalAddressesRequest()) - ->setNetworkPolicy($formattedNetworkPolicy); - $response = $gapicClient->fetchNetworkPolicyExternalAddresses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExternalAddresses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/FetchNetworkPolicyExternalAddresses', $actualFuncCall); - $actualValue = $actualRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($formattedNetworkPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchNetworkPolicyExternalAddressesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedNetworkPolicy = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new FetchNetworkPolicyExternalAddressesRequest()) - ->setNetworkPolicy($formattedNetworkPolicy); - try { - $gapicClient->fetchNetworkPolicyExternalAddresses($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[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.vmwareengine.v1.VmwareEngine/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]', '[PRIVATE_CLOUD]', '[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 getDnsBindPermissionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new DnsBindPermission(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - $request = (new GetDnsBindPermissionRequest()) - ->setName($formattedName); - $response = $gapicClient->getDnsBindPermission($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.vmwareengine.v1.VmwareEngine/GetDnsBindPermission', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDnsBindPermissionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - $request = (new GetDnsBindPermissionRequest()) - ->setName($formattedName); - try { - $gapicClient->getDnsBindPermission($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDnsForwardingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new DnsForwarding(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dnsForwardingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new GetDnsForwardingRequest()) - ->setName($formattedName); - $response = $gapicClient->getDnsForwarding($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.vmwareengine.v1.VmwareEngine/GetDnsForwarding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDnsForwardingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->dnsForwardingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new GetDnsForwardingRequest()) - ->setName($formattedName); - try { - $gapicClient->getDnsForwarding($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExternalAccessRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $priority = 1165461084; - $ipProtocol = 'ipProtocol-1134653776'; - $uid = 'uid115792'; - $expectedResponse = new ExternalAccessRule(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setPriority($priority); - $expectedResponse->setIpProtocol($ipProtocol); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); - $request = (new GetExternalAccessRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getExternalAccessRule($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.vmwareengine.v1.VmwareEngine/GetExternalAccessRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExternalAccessRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->externalAccessRuleName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]', '[EXTERNAL_ACCESS_RULE]'); - $request = (new GetExternalAccessRuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getExternalAccessRule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExternalAddressTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $internalIp = 'internalIp-2080778775'; - $externalIp = 'externalIp-1153075685'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new ExternalAddress(); - $expectedResponse->setName($name2); - $expectedResponse->setInternalIp($internalIp); - $expectedResponse->setExternalIp($externalIp); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); - $request = (new GetExternalAddressRequest()) - ->setName($formattedName); - $response = $gapicClient->getExternalAddress($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.vmwareengine.v1.VmwareEngine/GetExternalAddress', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExternalAddressExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->externalAddressName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[EXTERNAL_ADDRESS]'); - $request = (new GetExternalAddressRequest()) - ->setName($formattedName); - try { - $gapicClient->getExternalAddress($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHcxActivationKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $activationKey = 'activationKey-1343958090'; - $uid = 'uid115792'; - $expectedResponse = new HcxActivationKey(); - $expectedResponse->setName($name2); - $expectedResponse->setActivationKey($activationKey); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - $request = (new GetHcxActivationKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getHcxActivationKey($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.vmwareengine.v1.VmwareEngine/GetHcxActivationKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHcxActivationKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->hcxActivationKeyName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[HCX_ACTIVATION_KEY]'); - $request = (new GetHcxActivationKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getHcxActivationKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLoggingServerTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $hostname = 'hostname-299803597'; - $port = 3446913; - $uid = 'uid115792'; - $expectedResponse = new LoggingServer(); - $expectedResponse->setName($name2); - $expectedResponse->setHostname($hostname); - $expectedResponse->setPort($port); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); - $request = (new GetLoggingServerRequest()) - ->setName($formattedName); - $response = $gapicClient->getLoggingServer($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.vmwareengine.v1.VmwareEngine/GetLoggingServer', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLoggingServerExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->loggingServerName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[LOGGING_SERVER]'); - $request = (new GetLoggingServerRequest()) - ->setName($formattedName); - try { - $gapicClient->getLoggingServer($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getManagementDnsZoneBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $vpcNetwork = 'vpcNetwork-764161832'; - $uid = 'uid115792'; - $expectedResponse = new ManagementDnsZoneBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setVpcNetwork($vpcNetwork); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); - $request = (new GetManagementDnsZoneBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/GetManagementDnsZoneBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getManagementDnsZoneBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); - $request = (new GetManagementDnsZoneBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getManagementDnsZoneBinding($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPeeringTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $peerNetwork = 'peerNetwork2111238225'; - $exportCustomRoutes = false; - $importCustomRoutes = true; - $exchangeSubnetRoutes = true; - $exportCustomRoutesWithPublicIp = true; - $importCustomRoutesWithPublicIp = false; - $stateDetails = 'stateDetails632437908'; - $peerMtu = 69584721; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $expectedResponse = new NetworkPeering(); - $expectedResponse->setName($name2); - $expectedResponse->setPeerNetwork($peerNetwork); - $expectedResponse->setExportCustomRoutes($exportCustomRoutes); - $expectedResponse->setImportCustomRoutes($importCustomRoutes); - $expectedResponse->setExchangeSubnetRoutes($exchangeSubnetRoutes); - $expectedResponse->setExportCustomRoutesWithPublicIp($exportCustomRoutesWithPublicIp); - $expectedResponse->setImportCustomRoutesWithPublicIp($importCustomRoutesWithPublicIp); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setPeerMtu($peerMtu); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); - $request = (new GetNetworkPeeringRequest()) - ->setName($formattedName); - $response = $gapicClient->getNetworkPeering($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.vmwareengine.v1.VmwareEngine/GetNetworkPeering', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPeeringExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); - $request = (new GetNetworkPeeringRequest()) - ->setName($formattedName); - try { - $gapicClient->getNetworkPeering($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new GetNetworkPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getNetworkPolicy($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.vmwareengine.v1.VmwareEngine/GetNetworkPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNetworkPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new GetNetworkPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getNetworkPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $fqdn = 'fqdn3150485'; - $internalIp = 'internalIp-2080778775'; - $nodeTypeId = 'nodeTypeId585437955'; - $version = 'version351608024'; - $customCoreCount = 2091833853; - $expectedResponse = new Node(); - $expectedResponse->setName($name2); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setInternalIp($internalIp); - $expectedResponse->setNodeTypeId($nodeTypeId); - $expectedResponse->setVersion($version); - $expectedResponse->setCustomCoreCount($customCoreCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]', '[NODE]'); - $request = (new GetNodeRequest()) - ->setName($formattedName); - $response = $gapicClient->getNode($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.vmwareengine.v1.VmwareEngine/GetNode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]', '[NODE]'); - $request = (new GetNodeRequest()) - ->setName($formattedName); - try { - $gapicClient->getNode($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTypeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $nodeTypeId = 'nodeTypeId585437955'; - $displayName = 'displayName1615086568'; - $virtualCpuCount = 289038212; - $totalCoreCount = 282953654; - $memoryGb = 1726613721; - $diskSizeGb = 757478089; - $expectedResponse = new NodeType(); - $expectedResponse->setName($name2); - $expectedResponse->setNodeTypeId($nodeTypeId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setVirtualCpuCount($virtualCpuCount); - $expectedResponse->setTotalCoreCount($totalCoreCount); - $expectedResponse->setMemoryGb($memoryGb); - $expectedResponse->setDiskSizeGb($diskSizeGb); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - $request = (new GetNodeTypeRequest()) - ->setName($formattedName); - $response = $gapicClient->getNodeType($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.vmwareengine.v1.VmwareEngine/GetNodeType', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNodeTypeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->nodeTypeName('[PROJECT]', '[LOCATION]', '[NODE_TYPE]'); - $request = (new GetNodeTypeRequest()) - ->setName($formattedName); - try { - $gapicClient->getNodeType($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateCloudTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new GetPrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->getPrivateCloud($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.vmwareengine.v1.VmwareEngine/GetPrivateCloud', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateCloudExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new GetPrivateCloudRequest()) - ->setName($formattedName); - try { - $gapicClient->getPrivateCloud($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $peeringId = 'peeringId-1561749894'; - $uid = 'uid115792'; - $serviceNetwork = 'serviceNetwork1072775844'; - $expectedResponse = new PrivateConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $expectedResponse->setPeeringId($peeringId); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceNetwork($serviceNetwork); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new GetPrivateConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getPrivateConnection($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.vmwareengine.v1.VmwareEngine/GetPrivateConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new GetPrivateConnectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getPrivateConnection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSubnetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $gatewayIp = 'gatewayIp955798786'; - $type = 'type3575610'; - $vlanId = 536153463; - $expectedResponse = new Subnet(); - $expectedResponse->setName($name2); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setGatewayIp($gatewayIp); - $expectedResponse->setType($type); - $expectedResponse->setVlanId($vlanId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->subnetName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[SUBNET]'); - $request = (new GetSubnetRequest()) - ->setName($formattedName); - $response = $gapicClient->getSubnet($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.vmwareengine.v1.VmwareEngine/GetSubnet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSubnetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->subnetName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[SUBNET]'); - $request = (new GetSubnetRequest()) - ->setName($formattedName); - try { - $gapicClient->getSubnet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVmwareEngineNetworkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new GetVmwareEngineNetworkRequest()) - ->setName($formattedName); - $response = $gapicClient->getVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/GetVmwareEngineNetwork', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVmwareEngineNetworkExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $request = (new GetVmwareEngineNetworkRequest()) - ->setName($formattedName); - try { - $gapicClient->getVmwareEngineNetwork($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function grantDnsBindPermissionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/grantDnsBindPermissionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new DnsBindPermission(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/grantDnsBindPermissionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - $principal = new Principal(); - $request = (new GrantDnsBindPermissionRequest()) - ->setName($formattedName) - ->setPrincipal($principal); - $response = $gapicClient->grantDnsBindPermission($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.vmwareengine.v1.VmwareEngine/GrantDnsBindPermission', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getPrincipal(); - $this->assertProtobufEquals($principal, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/grantDnsBindPermissionTest'); - $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 grantDnsBindPermissionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/grantDnsBindPermissionTest'); - $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->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - $principal = new Principal(); - $request = (new GrantDnsBindPermissionRequest()) - ->setName($formattedName) - ->setPrincipal($principal); - $response = $gapicClient->grantDnsBindPermission($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/grantDnsBindPermissionTest'); - 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $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.vmwareengine.v1.VmwareEngine/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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $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 listExternalAccessRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $externalAccessRulesElement = new ExternalAccessRule(); - $externalAccessRules = [ - $externalAccessRulesElement, - ]; - $expectedResponse = new ListExternalAccessRulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExternalAccessRules($externalAccessRules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new ListExternalAccessRulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExternalAccessRules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExternalAccessRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListExternalAccessRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExternalAccessRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->networkPolicyName('[PROJECT]', '[LOCATION]', '[NETWORK_POLICY]'); - $request = (new ListExternalAccessRulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExternalAccessRules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExternalAddressesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $externalAddressesElement = new ExternalAddress(); - $externalAddresses = [ - $externalAddressesElement, - ]; - $expectedResponse = new ListExternalAddressesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExternalAddresses($externalAddresses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListExternalAddressesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExternalAddresses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExternalAddresses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListExternalAddresses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExternalAddressesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListExternalAddressesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExternalAddresses($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHcxActivationKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hcxActivationKeysElement = new HcxActivationKey(); - $hcxActivationKeys = [ - $hcxActivationKeysElement, - ]; - $expectedResponse = new ListHcxActivationKeysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHcxActivationKeys($hcxActivationKeys); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListHcxActivationKeysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHcxActivationKeys($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHcxActivationKeys()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListHcxActivationKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHcxActivationKeysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListHcxActivationKeysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHcxActivationKeys($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLoggingServersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $loggingServersElement = new LoggingServer(); - $loggingServers = [ - $loggingServersElement, - ]; - $expectedResponse = new ListLoggingServersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLoggingServers($loggingServers); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListLoggingServersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLoggingServers($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLoggingServers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListLoggingServers', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLoggingServersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListLoggingServersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLoggingServers($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listManagementDnsZoneBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $managementDnsZoneBindingsElement = new ManagementDnsZoneBinding(); - $managementDnsZoneBindings = [ - $managementDnsZoneBindingsElement, - ]; - $expectedResponse = new ListManagementDnsZoneBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setManagementDnsZoneBindings($managementDnsZoneBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListManagementDnsZoneBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listManagementDnsZoneBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getManagementDnsZoneBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListManagementDnsZoneBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listManagementDnsZoneBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListManagementDnsZoneBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listManagementDnsZoneBindings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPeeringsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $networkPeeringsElement = new NetworkPeering(); - $networkPeerings = [ - $networkPeeringsElement, - ]; - $expectedResponse = new ListNetworkPeeringsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNetworkPeerings($networkPeerings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworkPeeringsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNetworkPeerings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNetworkPeerings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPeerings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPeeringsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNetworkPeeringsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNetworkPeerings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $networkPoliciesElement = new NetworkPolicy(); - $networkPolicies = [ - $networkPoliciesElement, - ]; - $expectedResponse = new ListNetworkPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNetworkPolicies($networkPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNetworkPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNetworkPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNetworkPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNetworkPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNetworkPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNetworkPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNetworkPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodeTypesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nodeTypesElement = new NodeType(); - $nodeTypes = [ - $nodeTypesElement, - ]; - $expectedResponse = new ListNodeTypesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNodeTypes($nodeTypes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListNodeTypesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNodeTypes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNodeTypes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodeTypes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodeTypesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListNodeTypesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNodeTypes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $nodesElement = new Node(); - $nodes = [ - $nodesElement, - ]; - $expectedResponse = new ListNodesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setNodes($nodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $request = (new ListNodesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listNodes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNodes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListNodes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNodesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]', '[PRIVATE_CLOUD]', '[CLUSTER]'); - $request = (new ListNodesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listNodes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPeeringRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $peeringRoutesElement = new PeeringRoute(); - $peeringRoutes = [ - $peeringRoutesElement, - ]; - $expectedResponse = new ListPeeringRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPeeringRoutes($peeringRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); - $request = (new ListPeeringRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPeeringRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPeeringRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPeeringRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPeeringRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->networkPeeringName('[PROJECT]', '[LOCATION]', '[NETWORK_PEERING]'); - $request = (new ListPeeringRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPeeringRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateCloudsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $privateCloudsElement = new PrivateCloud(); - $privateClouds = [ - $privateCloudsElement, - ]; - $expectedResponse = new ListPrivateCloudsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPrivateClouds($privateClouds); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrivateCloudsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPrivateClouds($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPrivateClouds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateClouds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateCloudsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListPrivateCloudsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPrivateClouds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateConnectionPeeringRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $peeringRoutesElement = new PeeringRoute(); - $peeringRoutes = [ - $peeringRoutesElement, - ]; - $expectedResponse = new ListPrivateConnectionPeeringRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPeeringRoutes($peeringRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new ListPrivateConnectionPeeringRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPrivateConnectionPeeringRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPeeringRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateConnectionPeeringRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateConnectionPeeringRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new ListPrivateConnectionPeeringRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPrivateConnectionPeeringRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $privateConnectionsElement = new PrivateConnection(); - $privateConnections = [ - $privateConnectionsElement, - ]; - $expectedResponse = new ListPrivateConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPrivateConnections($privateConnections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrivateConnectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPrivateConnections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPrivateConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListPrivateConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListPrivateConnectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPrivateConnections($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubnetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $subnetsElement = new Subnet(); - $subnets = [ - $subnetsElement, - ]; - $expectedResponse = new ListSubnetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSubnets($subnets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListSubnetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSubnets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSubnets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListSubnets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSubnetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ListSubnetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSubnets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVmwareEngineNetworksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vmwareEngineNetworksElement = new VmwareEngineNetwork(); - $vmwareEngineNetworks = [ - $vmwareEngineNetworksElement, - ]; - $expectedResponse = new ListVmwareEngineNetworksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVmwareEngineNetworks($vmwareEngineNetworks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVmwareEngineNetworksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVmwareEngineNetworks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVmwareEngineNetworks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmwareengine.v1.VmwareEngine/ListVmwareEngineNetworks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVmwareEngineNetworksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListVmwareEngineNetworksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVmwareEngineNetworks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function repairManagementDnsZoneBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/repairManagementDnsZoneBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $vpcNetwork = 'vpcNetwork-764161832'; - $uid = 'uid115792'; - $expectedResponse = new ManagementDnsZoneBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setVpcNetwork($vpcNetwork); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/repairManagementDnsZoneBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); - $request = (new RepairManagementDnsZoneBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->repairManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/RepairManagementDnsZoneBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/repairManagementDnsZoneBindingTest'); - $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 repairManagementDnsZoneBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/repairManagementDnsZoneBindingTest'); - $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->managementDnsZoneBindingName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]', '[MANAGEMENT_DNS_ZONE_BINDING]'); - $request = (new RepairManagementDnsZoneBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->repairManagementDnsZoneBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/repairManagementDnsZoneBindingTest'); - 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 resetNsxCredentialsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetNsxCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetNsxCredentialsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetNsxCredentials($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.vmwareengine.v1.VmwareEngine/ResetNsxCredentials', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); - $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 resetNsxCredentialsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetNsxCredentialsTest'); - $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 - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetNsxCredentials($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetNsxCredentialsTest'); - 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 resetVcenterCredentialsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetVcenterCredentialsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetVcenterCredentials($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.vmwareengine.v1.VmwareEngine/ResetVcenterCredentials', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); - $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 resetVcenterCredentialsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetVcenterCredentialsTest'); - $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 - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ResetVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->resetVcenterCredentials($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetVcenterCredentialsTest'); - 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 revokeDnsBindPermissionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/revokeDnsBindPermissionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new DnsBindPermission(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/revokeDnsBindPermissionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - $principal = new Principal(); - $request = (new RevokeDnsBindPermissionRequest()) - ->setName($formattedName) - ->setPrincipal($principal); - $response = $gapicClient->revokeDnsBindPermission($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.vmwareengine.v1.VmwareEngine/RevokeDnsBindPermission', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getPrincipal(); - $this->assertProtobufEquals($principal, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/revokeDnsBindPermissionTest'); - $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 revokeDnsBindPermissionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/revokeDnsBindPermissionTest'); - $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->dnsBindPermissionName('[PROJECT]', '[LOCATION]'); - $principal = new Principal(); - $request = (new RevokeDnsBindPermissionRequest()) - ->setName($formattedName) - ->setPrincipal($principal); - $response = $gapicClient->revokeDnsBindPermission($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/revokeDnsBindPermissionTest'); - 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 showNsxCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $username = 'username-265713450'; - $password = 'password1216985755'; - $expectedResponse = new Credentials(); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->showNsxCredentials($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.vmwareengine.v1.VmwareEngine/ShowNsxCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showNsxCredentialsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowNsxCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - try { - $gapicClient->showNsxCredentials($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showVcenterCredentialsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $username2 = 'username2-1947551991'; - $password = 'password1216985755'; - $expectedResponse = new Credentials(); - $expectedResponse->setUsername($username2); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - $response = $gapicClient->showVcenterCredentials($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.vmwareengine.v1.VmwareEngine/ShowVcenterCredentials', $actualFuncCall); - $actualValue = $actualRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($formattedPrivateCloud, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showVcenterCredentialsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedPrivateCloud = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new ShowVcenterCredentialsRequest()) - ->setPrivateCloud($formattedPrivateCloud); - try { - $gapicClient->showVcenterCredentials($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeletePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeletePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeletePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new UndeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->undeletePrivateCloud($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.vmwareengine.v1.VmwareEngine/UndeletePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); - $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 undeletePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/undeletePrivateCloudTest'); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $request = (new UndeletePrivateCloudRequest()) - ->setName($formattedName); - $response = $gapicClient->undeletePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeletePrivateCloudTest'); - 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'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $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(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $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.vmwareengine.v1.VmwareEngine/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(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $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 updateDnsForwardingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDnsForwardingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new DnsForwarding(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDnsForwardingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $dnsForwarding = new DnsForwarding(); - $dnsForwardingForwardingRules = []; - $dnsForwarding->setForwardingRules($dnsForwardingForwardingRules); - $updateMask = new FieldMask(); - $request = (new UpdateDnsForwardingRequest()) - ->setDnsForwarding($dnsForwarding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDnsForwarding($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.vmwareengine.v1.VmwareEngine/UpdateDnsForwarding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDnsForwarding(); - $this->assertProtobufEquals($dnsForwarding, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDnsForwardingTest'); - $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 updateDnsForwardingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDnsForwardingTest'); - $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 - $dnsForwarding = new DnsForwarding(); - $dnsForwardingForwardingRules = []; - $dnsForwarding->setForwardingRules($dnsForwardingForwardingRules); - $updateMask = new FieldMask(); - $request = (new UpdateDnsForwardingRequest()) - ->setDnsForwarding($dnsForwarding) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDnsForwarding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDnsForwardingTest'); - 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 updateExternalAccessRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateExternalAccessRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $priority = 1165461084; - $ipProtocol = 'ipProtocol-1134653776'; - $uid = 'uid115792'; - $expectedResponse = new ExternalAccessRule(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setPriority($priority); - $expectedResponse->setIpProtocol($ipProtocol); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateExternalAccessRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $externalAccessRule = new ExternalAccessRule(); - $request = (new UpdateExternalAccessRuleRequest()) - ->setUpdateMask($updateMask) - ->setExternalAccessRule($externalAccessRule); - $response = $gapicClient->updateExternalAccessRule($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.vmwareengine.v1.VmwareEngine/UpdateExternalAccessRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getExternalAccessRule(); - $this->assertProtobufEquals($externalAccessRule, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateExternalAccessRuleTest'); - $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 updateExternalAccessRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateExternalAccessRuleTest'); - $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(); - $externalAccessRule = new ExternalAccessRule(); - $request = (new UpdateExternalAccessRuleRequest()) - ->setUpdateMask($updateMask) - ->setExternalAccessRule($externalAccessRule); - $response = $gapicClient->updateExternalAccessRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateExternalAccessRuleTest'); - 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 updateExternalAddressTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateExternalAddressTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $internalIp = 'internalIp-2080778775'; - $externalIp = 'externalIp-1153075685'; - $uid = 'uid115792'; - $description = 'description-1724546052'; - $expectedResponse = new ExternalAddress(); - $expectedResponse->setName($name); - $expectedResponse->setInternalIp($internalIp); - $expectedResponse->setExternalIp($externalIp); - $expectedResponse->setUid($uid); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateExternalAddressTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $externalAddress = new ExternalAddress(); - $request = (new UpdateExternalAddressRequest()) - ->setUpdateMask($updateMask) - ->setExternalAddress($externalAddress); - $response = $gapicClient->updateExternalAddress($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.vmwareengine.v1.VmwareEngine/UpdateExternalAddress', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getExternalAddress(); - $this->assertProtobufEquals($externalAddress, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateExternalAddressTest'); - $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 updateExternalAddressExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateExternalAddressTest'); - $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(); - $externalAddress = new ExternalAddress(); - $request = (new UpdateExternalAddressRequest()) - ->setUpdateMask($updateMask) - ->setExternalAddress($externalAddress); - $response = $gapicClient->updateExternalAddress($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateExternalAddressTest'); - 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 updateLoggingServerTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLoggingServerTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $hostname = 'hostname-299803597'; - $port = 3446913; - $uid = 'uid115792'; - $expectedResponse = new LoggingServer(); - $expectedResponse->setName($name); - $expectedResponse->setHostname($hostname); - $expectedResponse->setPort($port); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLoggingServerTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $loggingServer = new LoggingServer(); - $loggingServerHostname = 'loggingServerHostname2082652629'; - $loggingServer->setHostname($loggingServerHostname); - $loggingServerPort = 243392733; - $loggingServer->setPort($loggingServerPort); - $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; - $loggingServer->setProtocol($loggingServerProtocol); - $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; - $loggingServer->setSourceType($loggingServerSourceType); - $request = (new UpdateLoggingServerRequest()) - ->setUpdateMask($updateMask) - ->setLoggingServer($loggingServer); - $response = $gapicClient->updateLoggingServer($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.vmwareengine.v1.VmwareEngine/UpdateLoggingServer', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getLoggingServer(); - $this->assertProtobufEquals($loggingServer, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLoggingServerTest'); - $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 updateLoggingServerExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLoggingServerTest'); - $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(); - $loggingServer = new LoggingServer(); - $loggingServerHostname = 'loggingServerHostname2082652629'; - $loggingServer->setHostname($loggingServerHostname); - $loggingServerPort = 243392733; - $loggingServer->setPort($loggingServerPort); - $loggingServerProtocol = Protocol::PROTOCOL_UNSPECIFIED; - $loggingServer->setProtocol($loggingServerProtocol); - $loggingServerSourceType = SourceType::SOURCE_TYPE_UNSPECIFIED; - $loggingServer->setSourceType($loggingServerSourceType); - $request = (new UpdateLoggingServerRequest()) - ->setUpdateMask($updateMask) - ->setLoggingServer($loggingServer); - $response = $gapicClient->updateLoggingServer($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLoggingServerTest'); - 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 updateManagementDnsZoneBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateManagementDnsZoneBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $vpcNetwork = 'vpcNetwork-764161832'; - $uid = 'uid115792'; - $expectedResponse = new ManagementDnsZoneBinding(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVpcNetwork($vpcNetwork); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateManagementDnsZoneBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $managementDnsZoneBinding = new ManagementDnsZoneBinding(); - $request = (new UpdateManagementDnsZoneBindingRequest()) - ->setUpdateMask($updateMask) - ->setManagementDnsZoneBinding($managementDnsZoneBinding); - $response = $gapicClient->updateManagementDnsZoneBinding($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.vmwareengine.v1.VmwareEngine/UpdateManagementDnsZoneBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getManagementDnsZoneBinding(); - $this->assertProtobufEquals($managementDnsZoneBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateManagementDnsZoneBindingTest'); - $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 updateManagementDnsZoneBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateManagementDnsZoneBindingTest'); - $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(); - $managementDnsZoneBinding = new ManagementDnsZoneBinding(); - $request = (new UpdateManagementDnsZoneBindingRequest()) - ->setUpdateMask($updateMask) - ->setManagementDnsZoneBinding($managementDnsZoneBinding); - $response = $gapicClient->updateManagementDnsZoneBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateManagementDnsZoneBindingTest'); - 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 updateNetworkPeeringTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPeeringTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $peerNetwork = 'peerNetwork2111238225'; - $exportCustomRoutes = false; - $importCustomRoutes = true; - $exchangeSubnetRoutes = true; - $exportCustomRoutesWithPublicIp = true; - $importCustomRoutesWithPublicIp = false; - $stateDetails = 'stateDetails632437908'; - $peerMtu = 69584721; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $expectedResponse = new NetworkPeering(); - $expectedResponse->setName($name); - $expectedResponse->setPeerNetwork($peerNetwork); - $expectedResponse->setExportCustomRoutes($exportCustomRoutes); - $expectedResponse->setImportCustomRoutes($importCustomRoutes); - $expectedResponse->setExchangeSubnetRoutes($exchangeSubnetRoutes); - $expectedResponse->setExportCustomRoutesWithPublicIp($exportCustomRoutesWithPublicIp); - $expectedResponse->setImportCustomRoutesWithPublicIp($importCustomRoutesWithPublicIp); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setPeerMtu($peerMtu); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNetworkPeeringTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $networkPeering = new NetworkPeering(); - $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; - $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); - $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; - $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); - $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPeeringRequest()) - ->setNetworkPeering($networkPeering) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNetworkPeering($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.vmwareengine.v1.VmwareEngine/UpdateNetworkPeering', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getNetworkPeering(); - $this->assertProtobufEquals($networkPeering, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPeeringTest'); - $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 updateNetworkPeeringExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPeeringTest'); - $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 - $networkPeering = new NetworkPeering(); - $networkPeeringPeerNetwork = 'networkPeeringPeerNetwork-385302054'; - $networkPeering->setPeerNetwork($networkPeeringPeerNetwork); - $networkPeeringPeerNetworkType = PeerNetworkType::PEER_NETWORK_TYPE_UNSPECIFIED; - $networkPeering->setPeerNetworkType($networkPeeringPeerNetworkType); - $networkPeeringVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $networkPeering->setVmwareEngineNetwork($networkPeeringVmwareEngineNetwork); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPeeringRequest()) - ->setNetworkPeering($networkPeering) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNetworkPeering($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPeeringTest'); - 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 updateNetworkPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $edgeServicesCidr = 'edgeServicesCidr-792872013'; - $uid = 'uid115792'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $description = 'description-1724546052'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $expectedResponse = new NetworkPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setEdgeServicesCidr($edgeServicesCidr); - $expectedResponse->setUid($uid); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateNetworkPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPolicyRequest()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNetworkPolicy($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.vmwareengine.v1.VmwareEngine/UpdateNetworkPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getNetworkPolicy(); - $this->assertProtobufEquals($networkPolicy, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); - $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 updateNetworkPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateNetworkPolicyTest'); - $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 - $networkPolicy = new NetworkPolicy(); - $networkPolicyEdgeServicesCidr = 'networkPolicyEdgeServicesCidr-602005393'; - $networkPolicy->setEdgeServicesCidr($networkPolicyEdgeServicesCidr); - $updateMask = new FieldMask(); - $request = (new UpdateNetworkPolicyRequest()) - ->setNetworkPolicy($networkPolicy) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateNetworkPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateNetworkPolicyTest'); - 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 updatePrivateCloudTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateCloudTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new PrivateCloud(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePrivateCloudTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateCloudRequest()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - $response = $gapicClient->updatePrivateCloud($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.vmwareengine.v1.VmwareEngine/UpdatePrivateCloud', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateCloud(); - $this->assertProtobufEquals($privateCloud, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); - $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 updatePrivateCloudExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateCloudTest'); - $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 - $privateCloud = new PrivateCloud(); - $privateCloudNetworkConfig = new NetworkConfig(); - $networkConfigManagementCidr = 'networkConfigManagementCidr2092091783'; - $privateCloudNetworkConfig->setManagementCidr($networkConfigManagementCidr); - $privateCloud->setNetworkConfig($privateCloudNetworkConfig); - $privateCloudManagementCluster = new ManagementCluster(); - $managementClusterClusterId = 'managementClusterClusterId311493182'; - $privateCloudManagementCluster->setClusterId($managementClusterClusterId); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $managementClusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $privateCloudManagementCluster->setNodeTypeConfigs($managementClusterNodeTypeConfigs); - $privateCloud->setManagementCluster($privateCloudManagementCluster); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateCloudRequest()) - ->setPrivateCloud($privateCloud) - ->setUpdateMask($updateMask); - $response = $gapicClient->updatePrivateCloud($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateCloudTest'); - 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 updatePrivateConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $vmwareEngineNetwork = 'vmwareEngineNetwork-90899684'; - $vmwareEngineNetworkCanonical = 'vmwareEngineNetworkCanonical779839377'; - $peeringId = 'peeringId-1561749894'; - $uid = 'uid115792'; - $serviceNetwork = 'serviceNetwork1072775844'; - $expectedResponse = new PrivateConnection(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVmwareEngineNetwork($vmwareEngineNetwork); - $expectedResponse->setVmwareEngineNetworkCanonical($vmwareEngineNetworkCanonical); - $expectedResponse->setPeeringId($peeringId); - $expectedResponse->setUid($uid); - $expectedResponse->setServiceNetwork($serviceNetwork); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePrivateConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $privateConnection = new PrivateConnection(); - $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); - $privateConnectionType = Type::TYPE_UNSPECIFIED; - $privateConnection->setType($privateConnectionType); - $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateConnectionRequest()) - ->setPrivateConnection($privateConnection) - ->setUpdateMask($updateMask); - $response = $gapicClient->updatePrivateConnection($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.vmwareengine.v1.VmwareEngine/UpdatePrivateConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPrivateConnection(); - $this->assertProtobufEquals($privateConnection, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateConnectionTest'); - $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 updatePrivateConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePrivateConnectionTest'); - $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 - $privateConnection = new PrivateConnection(); - $privateConnectionVmwareEngineNetwork = $gapicClient->vmwareEngineNetworkName('[PROJECT]', '[LOCATION]', '[VMWARE_ENGINE_NETWORK]'); - $privateConnection->setVmwareEngineNetwork($privateConnectionVmwareEngineNetwork); - $privateConnectionType = Type::TYPE_UNSPECIFIED; - $privateConnection->setType($privateConnectionType); - $privateConnectionServiceNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $privateConnection->setServiceNetwork($privateConnectionServiceNetwork); - $updateMask = new FieldMask(); - $request = (new UpdatePrivateConnectionRequest()) - ->setPrivateConnection($privateConnection) - ->setUpdateMask($updateMask); - $response = $gapicClient->updatePrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePrivateConnectionTest'); - 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 updateSubnetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSubnetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $gatewayIp = 'gatewayIp955798786'; - $type = 'type3575610'; - $vlanId = 536153463; - $expectedResponse = new Subnet(); - $expectedResponse->setName($name); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setGatewayIp($gatewayIp); - $expectedResponse->setType($type); - $expectedResponse->setVlanId($vlanId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSubnetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $subnet = new Subnet(); - $request = (new UpdateSubnetRequest()) - ->setUpdateMask($updateMask) - ->setSubnet($subnet); - $response = $gapicClient->updateSubnet($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.vmwareengine.v1.VmwareEngine/UpdateSubnet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getSubnet(); - $this->assertProtobufEquals($subnet, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSubnetTest'); - $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 updateSubnetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSubnetTest'); - $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(); - $subnet = new Subnet(); - $request = (new UpdateSubnetRequest()) - ->setUpdateMask($updateMask) - ->setSubnet($subnet); - $response = $gapicClient->updateSubnet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSubnetTest'); - 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 updateVmwareEngineNetworkTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new VmwareEngineNetwork(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateVmwareEngineNetworkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $request = (new UpdateVmwareEngineNetworkRequest()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVmwareEngineNetwork($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.vmwareengine.v1.VmwareEngine/UpdateVmwareEngineNetwork', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getVmwareEngineNetwork(); - $this->assertProtobufEquals($vmwareEngineNetwork, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); - $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 updateVmwareEngineNetworkExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVmwareEngineNetworkTest'); - $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 - $vmwareEngineNetwork = new VmwareEngineNetwork(); - $vmwareEngineNetworkType = \Google\Cloud\VmwareEngine\V1\VmwareEngineNetwork\Type::TYPE_UNSPECIFIED; - $vmwareEngineNetwork->setType($vmwareEngineNetworkType); - $updateMask = new FieldMask(); - $request = (new UpdateVmwareEngineNetworkRequest()) - ->setVmwareEngineNetwork($vmwareEngineNetwork) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateVmwareEngineNetwork($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVmwareEngineNetworkTest'); - 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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'; - $management = false; - $uid = 'uid115792'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setManagement($management); - $expectedResponse->setUid($uid); - $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->privateCloudName('[PROJECT]', '[LOCATION]', '[PRIVATE_CLOUD]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $nodeTypeConfigsValue = new NodeTypeConfig(); - $valueNodeCount = 1174748740; - $nodeTypeConfigsValue->setNodeCount($valueNodeCount); - $clusterNodeTypeConfigs = [ - 'nodeTypeConfigsKey' => $nodeTypeConfigsValue, - ]; - $cluster->setNodeTypeConfigs($clusterNodeTypeConfigs); - $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.vmwareengine.v1.VmwareEngine/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/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php b/owl-bot-staging/VpcAccess/v1/proto/src/GPBMetadata/Google/Cloud/Vpcaccess/V1/VpcAccess.php deleted file mode 100644 index d90990e0cb7baaf878f9cd84c900d14b14ef4c34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3596 zcmb_f&2HO95UwOkiPo;;Ftwu?O~WV#;;0E3xjm$GoPhd?VZes6bIGX%lM6 zk}Er|p-WD^_Yrz4dhQz(C=3(@+FMRJ^ibpxf*!g*_&?A(9o z^*nGxU56O@7J+TGwXc#MR6XA%uI)N%YtZRHU$x!7haBi@s#@7nA8+lb)yl@sb*dV; z1K);*+I8Ko19jVR2W@@Vvn|_(L7?vz*-KNrY1}LT*y_W;vuvoY*Giv5Vzn(|HP*R> zMwwY?JdG?go)%XDupKK1RJv$#v)}-z^ydv)4zksNScLv9p`eK{BFJ*kH}oiLYR7T{ zNVSj4b_Uoc$i*sC*upkkzNHGAOm@k0>CxBJ2vUuCgL{nc8iOb zLo=3#X!fvZh%{Ne7W>d)E^oF%pN9gWQJrb}p<}~OH$q)!wM=BDWD>`Fm9)f1ZBO50`{rPOOPr7VEiKEh4X^W8zW=M6|MO%0{_y7eNyp5g1) zfMN^Cu-&95dq%+rxpQi2IV%jVf=n=IQS7<%RAGAM@CKDJE8}*SG3( zQ|!Z&T1AMZjqV$>4e}#Cir`Q}1sW~+x{QeOAabRC5Izlc$F)T^>Ic!|P!FB&`hk8R zpNIJ$6JVk2LmF0Tvkt!=(2P_*0~ycqDencdO1EB{$+zYWa6K{_gb|XkHp7jTD_}h%oVA|#^YqDC#oie?$ z7{#43m-lf^_5x87ir_rNZK1-d)&wdB$Pmk?ZJ(E;EaO7ztvL}FR{qX_IeC@YhW;+H zq4HM(To_9br5FJ}-Zr!`*^o|)S0j~J<=3S1@-GvI=11|Oe%!II%&Q_DZ%b~_)Ed3K z{NvB>lB;=*UF{BpFgoN!9L=x2GI_(| zfbS{-FzaBaz>Sx#!ch4s0cMZpjdJ%LIFE`(NZ%E~aSf4_`G>E}upS-(KC!2j-zbyD za`2r@8k3En{|l3z9hwC&A2xHDSk=Bq_LY-J6$?e-jGy@;CB9r0%#7|Xv^93!*px%} z6N8SJbG+87gzL3_NM2dzqm5Q(qm3qwYfp=Z(YHo8_prf7%s34?`MgPfC{zuD>l%jq lOdpG_40rq|H|6E@wwNYj!w0*3A^U{EgG-75VF-o*`~#gVt{VUV diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php deleted file mode 100644 index 25fa64274902..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector.php +++ /dev/null @@ -1,421 +0,0 @@ -google.cloud.vpcaccess.v1.Connector - */ -class Connector extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name in the format `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Name of a VPC network. - * - * Generated from protobuf field string network = 2; - */ - protected $network = ''; - /** - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * - * Generated from protobuf field string ip_cidr_range = 3; - */ - protected $ip_cidr_range = ''; - /** - * Output only. State of the VPC access connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Minimum throughput of the connector in Mbps. Default and min is 200. - * - * Generated from protobuf field int32 min_throughput = 5; - */ - protected $min_throughput = 0; - /** - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * - * Generated from protobuf field int32 max_throughput = 6; - */ - protected $max_throughput = 0; - /** - * Output only. List of projects using the connector. - * - * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $connected_projects; - /** - * The subnet in which to house the VPC Access Connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; - */ - protected $subnet = null; - /** - * Machine type of VM Instance underlying connector. Default is e2-micro - * - * Generated from protobuf field string machine_type = 10; - */ - protected $machine_type = ''; - /** - * Minimum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 min_instances = 11; - */ - protected $min_instances = 0; - /** - * Maximum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 max_instances = 12; - */ - protected $max_instances = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name in the format `projects/*/locations/*/connectors/*`. - * @type string $network - * Name of a VPC network. - * @type string $ip_cidr_range - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * @type int $state - * Output only. State of the VPC access connector. - * @type int $min_throughput - * Minimum throughput of the connector in Mbps. Default and min is 200. - * @type int $max_throughput - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * @type array|\Google\Protobuf\Internal\RepeatedField $connected_projects - * Output only. List of projects using the connector. - * @type \Google\Cloud\VpcAccess\V1\Connector\Subnet $subnet - * The subnet in which to house the VPC Access Connector. - * @type string $machine_type - * Machine type of VM Instance underlying connector. Default is e2-micro - * @type int $min_instances - * Minimum value of instances in autoscaling group underlying the connector. - * @type int $max_instances - * Maximum value of instances in autoscaling group underlying the connector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * The resource name in the format `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name in the format `projects/*/locations/*/connectors/*`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Name of a VPC network. - * - * Generated from protobuf field string network = 2; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Name of a VPC network. - * - * Generated from protobuf field string network = 2; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * - * Generated from protobuf field string ip_cidr_range = 3; - * @return string - */ - public function getIpCidrRange() - { - return $this->ip_cidr_range; - } - - /** - * The range of internal addresses that follows RFC 4632 notation. - * Example: `10.132.0.0/28`. - * - * Generated from protobuf field string ip_cidr_range = 3; - * @param string $var - * @return $this - */ - public function setIpCidrRange($var) - { - GPBUtil::checkString($var, True); - $this->ip_cidr_range = $var; - - return $this; - } - - /** - * Output only. State of the VPC access connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the VPC access connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VpcAccess\V1\Connector\State::class); - $this->state = $var; - - return $this; - } - - /** - * Minimum throughput of the connector in Mbps. Default and min is 200. - * - * Generated from protobuf field int32 min_throughput = 5; - * @return int - */ - public function getMinThroughput() - { - return $this->min_throughput; - } - - /** - * Minimum throughput of the connector in Mbps. Default and min is 200. - * - * Generated from protobuf field int32 min_throughput = 5; - * @param int $var - * @return $this - */ - public function setMinThroughput($var) - { - GPBUtil::checkInt32($var); - $this->min_throughput = $var; - - return $this; - } - - /** - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * - * Generated from protobuf field int32 max_throughput = 6; - * @return int - */ - public function getMaxThroughput() - { - return $this->max_throughput; - } - - /** - * Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - * - * Generated from protobuf field int32 max_throughput = 6; - * @param int $var - * @return $this - */ - public function setMaxThroughput($var) - { - GPBUtil::checkInt32($var); - $this->max_throughput = $var; - - return $this; - } - - /** - * Output only. List of projects using the connector. - * - * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectedProjects() - { - return $this->connected_projects; - } - - /** - * Output only. List of projects using the connector. - * - * Generated from protobuf field repeated string connected_projects = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectedProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->connected_projects = $arr; - - return $this; - } - - /** - * The subnet in which to house the VPC Access Connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; - * @return \Google\Cloud\VpcAccess\V1\Connector\Subnet|null - */ - public function getSubnet() - { - return $this->subnet; - } - - public function hasSubnet() - { - return isset($this->subnet); - } - - public function clearSubnet() - { - unset($this->subnet); - } - - /** - * The subnet in which to house the VPC Access Connector. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector.Subnet subnet = 8; - * @param \Google\Cloud\VpcAccess\V1\Connector\Subnet $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector\Subnet::class); - $this->subnet = $var; - - return $this; - } - - /** - * Machine type of VM Instance underlying connector. Default is e2-micro - * - * Generated from protobuf field string machine_type = 10; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Machine type of VM Instance underlying connector. Default is e2-micro - * - * Generated from protobuf field string machine_type = 10; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Minimum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 min_instances = 11; - * @return int - */ - public function getMinInstances() - { - return $this->min_instances; - } - - /** - * Minimum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 min_instances = 11; - * @param int $var - * @return $this - */ - public function setMinInstances($var) - { - GPBUtil::checkInt32($var); - $this->min_instances = $var; - - return $this; - } - - /** - * Maximum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 max_instances = 12; - * @return int - */ - public function getMaxInstances() - { - return $this->max_instances; - } - - /** - * Maximum value of instances in autoscaling group underlying the connector. - * - * Generated from protobuf field int32 max_instances = 12; - * @param int $var - * @return $this - */ - public function setMaxInstances($var) - { - GPBUtil::checkInt32($var); - $this->max_instances = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php deleted file mode 100644 index a8ea7061ed87..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.vpcaccess.v1.Connector.State - */ -class State -{ - /** - * Invalid state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Connector is deployed and ready to receive traffic. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * An Insert operation is in progress. Transient condition. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * A Delete operation is in progress. Transient condition. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Connector is in a bad state, manual deletion recommended. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * The connector is being updated. - * - * Generated from protobuf enum UPDATING = 5; - */ - const UPDATING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VpcAccess\V1\Connector_State::class); - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php deleted file mode 100644 index 4ea82c2b3192..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/Connector/Subnet.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.vpcaccess.v1.Connector.Subnet - */ -class Subnet extends \Google\Protobuf\Internal\Message -{ - /** - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * @type string $project_id - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Subnet name (relative, not fully qualified). - * E.g. if the full subnet selfLink is - * https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} - * the correct input for this field would be {subnetName} - * - * 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; - } - - /** - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project in which the subnet exists. - * If not set, this project is assumed to be the project for which - * the connector create request was issued. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Subnet::class, \Google\Cloud\VpcAccess\V1\Connector_Subnet::class); - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php deleted file mode 100644 index 8b40233b6b2d..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/CreateConnectorRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.vpcaccess.v1.CreateConnectorRequest - */ -class CreateConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for this connector. - * - * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connector_id = ''; - /** - * Required. Resource to create. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connector = null; - - /** - * @param string $parent Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. Please see - * {@see VpcAccessServiceClient::locationName()} for help formatting this field. - * @param string $connectorId Required. The ID to use for this connector. - * @param \Google\Cloud\VpcAccess\V1\Connector $connector Required. Resource to create. - * - * @return \Google\Cloud\VpcAccess\V1\CreateConnectorRequest - * - * @experimental - */ - public static function build(string $parent, string $connectorId, \Google\Cloud\VpcAccess\V1\Connector $connector): self - { - return (new self()) - ->setParent($parent) - ->setConnectorId($connectorId) - ->setConnector($connector); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/locations/*`. - * @type string $connector_id - * Required. The ID to use for this connector. - * @type \Google\Cloud\VpcAccess\V1\Connector $connector - * Required. Resource to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location in which the configuration should be created, - * specified in the format `projects/*/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 project and location in which the configuration should be created, - * specified in the format `projects/*/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; - } - - /** - * Required. The ID to use for this connector. - * - * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConnectorId() - { - return $this->connector_id; - } - - /** - * Required. The ID to use for this connector. - * - * Generated from protobuf field string connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConnectorId($var) - { - GPBUtil::checkString($var, True); - $this->connector_id = $var; - - return $this; - } - - /** - * Required. Resource to create. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VpcAccess\V1\Connector|null - */ - public function getConnector() - { - return $this->connector; - } - - public function hasConnector() - { - return isset($this->connector); - } - - public function clearConnector() - { - unset($this->connector); - } - - /** - * Required. Resource to create. - * - * Generated from protobuf field .google.cloud.vpcaccess.v1.Connector connector = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VpcAccess\V1\Connector $var - * @return $this - */ - public function setConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VpcAccess\V1\Connector::class); - $this->connector = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php deleted file mode 100644 index dff74532e1f0..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/DeleteConnectorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vpcaccess.v1.DeleteConnectorRequest - */ -class DeleteConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a Serverless VPC Access connector to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of a Serverless VPC Access connector to delete. Please see - * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. - * - * @return \Google\Cloud\VpcAccess\V1\DeleteConnectorRequest - * - * @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 a Serverless VPC Access connector to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a Serverless VPC Access connector 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. Name of a Serverless VPC Access connector 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/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php deleted file mode 100644 index e0e5f30df34b..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/GetConnectorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vpcaccess.v1.GetConnectorRequest - */ -class GetConnectorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a Serverless VPC Access connector to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of a Serverless VPC Access connector to get. Please see - * {@see VpcAccessServiceClient::connectorName()} for help formatting this field. - * - * @return \Google\Cloud\VpcAccess\V1\GetConnectorRequest - * - * @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 a Serverless VPC Access connector to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a Serverless VPC Access connector to get. - * - * 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 a Serverless VPC Access connector to get. - * - * 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/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php deleted file mode 100644 index c5aa13828211..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.vpcaccess.v1.ListConnectorsRequest - */ -class ListConnectorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the routes should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Continuation token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the routes should be listed. Please see - * {@see VpcAccessServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VpcAccess\V1\ListConnectorsRequest - * - * @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 project and location from which the routes should be listed. - * @type int $page_size - * Maximum number of functions to return per call. - * @type string $page_token - * Continuation token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the routes should be listed. - * - * 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 and location from which the routes should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of functions to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of functions to return per call. - * - * 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; - } - - /** - * Continuation token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Continuation 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/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php deleted file mode 100644 index 58ddaece4918..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/ListConnectorsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vpcaccess.v1.ListConnectorsResponse - */ -class ListConnectorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Serverless VPC Access connectors. - * - * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; - */ - private $connectors; - /** - * Continuation token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $connectors - * List of Serverless VPC Access connectors. - * @type string $next_page_token - * Continuation token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * List of Serverless VPC Access connectors. - * - * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectors() - { - return $this->connectors; - } - - /** - * List of Serverless VPC Access connectors. - * - * Generated from protobuf field repeated .google.cloud.vpcaccess.v1.Connector connectors = 1; - * @param array<\Google\Cloud\VpcAccess\V1\Connector>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VpcAccess\V1\Connector::class); - $this->connectors = $arr; - - return $this; - } - - /** - * Continuation token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * 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; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php b/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php deleted file mode 100644 index 45680ee1e154..000000000000 --- a/owl-bot-staging/VpcAccess/v1/proto/src/Google/Cloud/VpcAccess/V1/OperationMetadata.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.vpcaccess.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * - * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $method = ''; - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when the operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * - * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $target = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $method - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time when the operation completed. - * @type string $target - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vpcaccess\V1\VpcAccess::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * - * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Output only. Method that initiated the operation e.g. - * google.cloud.vpcaccess.v1.Connectors.CreateConnector. - * - * Generated from protobuf field string method = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkString($var, True); - $this->method = $var; - - return $this; - } - - /** - * Output only. Time when the operation was 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. Time when the operation was 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. Time when the operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. Time when the operation completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * - * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Name of the resource that this operation is acting on e.g. - * projects/my-project/locations/us-central1/connectors/v1. - * - * Generated from protobuf field string target = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php deleted file mode 100644 index 5594e8562008..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/create_connector.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setConnectorId($connectorId) - ->setConnector($connector); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vpcAccessServiceClient->createConnector($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Connector $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 = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $connectorId = '[CONNECTOR_ID]'; - - create_connector_sample($formattedParent, $connectorId); -} -// [END vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php deleted file mode 100644 index bddd6f649db3..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/delete_connector.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vpcAccessServiceClient->deleteConnector($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 = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - - delete_connector_sample($formattedName); -} -// [END vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php deleted file mode 100644 index 7456e8311ff3..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/get_connector.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Connector $response */ - $response = $vpcAccessServiceClient->getConnector($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 = VpcAccessServiceClient::connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - - get_connector_sample($formattedName); -} -// [END vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php deleted file mode 100644 index 5a3af4c6caa1..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_connectors.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vpcAccessServiceClient->listConnectors($request); - - /** @var Connector $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 = VpcAccessServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_connectors_sample($formattedParent); -} -// [END vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] diff --git a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php b/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/list_locations.php deleted file mode 100644 index 0d93ad77f3b2..000000000000 --- a/owl-bot-staging/VpcAccess/v1/samples/V1/VpcAccessServiceClient/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 vpcaccess_v1_generated_VpcAccessService_ListLocations_sync] diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php b/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php deleted file mode 100644 index a0322361c9ec..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/Client/VpcAccessServiceClient.php +++ /dev/null @@ -1,428 +0,0 @@ - createConnectorAsync(CreateConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConnectorAsync(DeleteConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectorAsync(GetConnectorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConnectorsAsync(ListConnectorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class VpcAccessServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vpcaccess.v1.VpcAccessService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vpcaccess.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vpcaccess.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/vpc_access_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vpc_access_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vpc_access_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vpc_access_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * 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 connector - * resource. - * - * @param string $project - * @param string $location - * @param string $connector - * - * @return string The formatted connector resource. - */ - public static function connectorName(string $project, string $location, string $connector): string - { - return self::getPathTemplate('connector')->render([ - 'project' => $project, - 'location' => $location, - 'connector' => $connector, - ]); - } - - /** - * 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connector: projects/{project}/locations/{location}/connectors/{connector} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'vpcaccess.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a Serverless VPC Access connector, returns an operation. - * - * The async variant is {@see VpcAccessServiceClient::createConnectorAsync()} . - * - * @example samples/V1/VpcAccessServiceClient/create_connector.php - * - * @param CreateConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createConnector(CreateConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateConnector', $request, $callOptions)->wait(); - } - - /** - * Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the - * resource does not exist. - * - * The async variant is {@see VpcAccessServiceClient::deleteConnectorAsync()} . - * - * @example samples/V1/VpcAccessServiceClient/delete_connector.php - * - * @param DeleteConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteConnector(DeleteConnectorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteConnector', $request, $callOptions)->wait(); - } - - /** - * Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource - * does not exist. - * - * The async variant is {@see VpcAccessServiceClient::getConnectorAsync()} . - * - * @example samples/V1/VpcAccessServiceClient/get_connector.php - * - * @param GetConnectorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Connector - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConnector(GetConnectorRequest $request, array $callOptions = []): Connector - { - return $this->startApiCall('GetConnector', $request, $callOptions)->wait(); - } - - /** - * Lists Serverless VPC Access connectors. - * - * The async variant is {@see VpcAccessServiceClient::listConnectorsAsync()} . - * - * @example samples/V1/VpcAccessServiceClient/list_connectors.php - * - * @param ListConnectorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listConnectors(ListConnectorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConnectors', $request, $callOptions); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see VpcAccessServiceClient::listLocationsAsync()} . - * - * @example samples/V1/VpcAccessServiceClient/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/VpcAccess/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VpcAccess/v1/src/V1/gapic_metadata.json deleted file mode 100644 index f11d5faee77d..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/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.cloud.vpcaccess.v1", - "libraryPackage": "Google\\Cloud\\VpcAccess\\V1", - "services": { - "VpcAccessService": { - "clients": { - "grpc": { - "libraryClient": "VpcAccessServiceGapicClient", - "rpcs": { - "CreateConnector": { - "methods": [ - "createConnector" - ] - }, - "DeleteConnector": { - "methods": [ - "deleteConnector" - ] - }, - "GetConnector": { - "methods": [ - "getConnector" - ] - }, - "ListConnectors": { - "methods": [ - "listConnectors" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json deleted file mode 100644 index d4f02ec4a931..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_client_config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "interfaces": { - "google.cloud.vpcaccess.v1.VpcAccessService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "UNKNOWN" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "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 - } - }, - "methods": { - "CreateConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetConnector": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListConnectors": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_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/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php deleted file mode 100644 index e32b995f4bf2..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_descriptor_config.php +++ /dev/null @@ -1,123 +0,0 @@ - [ - 'google.cloud.vpcaccess.v1.VpcAccessService' => [ - 'CreateConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VpcAccess\V1\Connector', - 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnector' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VpcAccess\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetConnector' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VpcAccess\V1\Connector', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConnectors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VpcAccess\V1\ListConnectorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - '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' => [ - 'connector' => 'projects/{project}/locations/{location}/connectors/{connector}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php b/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php deleted file mode 100644 index 82cfdbb6b7cc..000000000000 --- a/owl-bot-staging/VpcAccess/v1/src/V1/resources/vpc_access_service_rest_client_config.php +++ /dev/null @@ -1,114 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vpcaccess.v1.VpcAccessService' => [ - 'CreateConnector' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', - 'body' => 'connector', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'connector_id', - ], - ], - 'DeleteConnector' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConnector' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/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/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php b/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php deleted file mode 100644 index 50dc37221ff8..000000000000 --- a/owl-bot-staging/VpcAccess/v1/tests/Unit/V1/Client/VpcAccessServiceClientTest.php +++ /dev/null @@ -1,646 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VpcAccessServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VpcAccessServiceClient($options); - } - - /** @test */ - public function createConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $network = 'network1843485230'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $minThroughput = 2064735799; - $maxThroughput = 1407819749; - $machineType = 'machineType1838323762'; - $minInstances = 1491624145; - $maxInstances = 330682013; - $expectedResponse = new Connector(); - $expectedResponse->setName($name); - $expectedResponse->setNetwork($network); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setMinThroughput($minThroughput); - $expectedResponse->setMaxThroughput($maxThroughput); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setMaxInstances($maxInstances); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectorId = 'connectorId1928724045'; - $connector = new Connector(); - $request = (new CreateConnectorRequest()) - ->setParent($formattedParent) - ->setConnectorId($connectorId) - ->setConnector($connector); - $response = $gapicClient->createConnector($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.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConnectorId(); - $this->assertProtobufEquals($connectorId, $actualValue); - $actualValue = $actualApiRequestObject->getConnector(); - $this->assertProtobufEquals($connector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectorTest'); - $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 createConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectorTest'); - $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]'); - $connectorId = 'connectorId1928724045'; - $connector = new Connector(); - $request = (new CreateConnectorRequest()) - ->setParent($formattedParent) - ->setConnectorId($connectorId) - ->setConnector($connector); - $response = $gapicClient->createConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectorTest'); - 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 deleteConnectorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $request = (new DeleteConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteConnector($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.vpcaccess.v1.VpcAccessService/DeleteConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); - $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 deleteConnectorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectorTest'); - $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->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $request = (new DeleteConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteConnector($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectorTest'); - 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 getConnectorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $network = 'network1843485230'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $minThroughput = 2064735799; - $maxThroughput = 1407819749; - $machineType = 'machineType1838323762'; - $minInstances = 1491624145; - $maxInstances = 330682013; - $expectedResponse = new Connector(); - $expectedResponse->setName($name2); - $expectedResponse->setNetwork($network); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setMinThroughput($minThroughput); - $expectedResponse->setMaxThroughput($maxThroughput); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setMaxInstances($maxInstances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $request = (new GetConnectorRequest()) - ->setName($formattedName); - $response = $gapicClient->getConnector($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.vpcaccess.v1.VpcAccessService/GetConnector', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->connectorName('[PROJECT]', '[LOCATION]', '[CONNECTOR]'); - $request = (new GetConnectorRequest()) - ->setName($formattedName); - try { - $gapicClient->getConnector($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $connectorsElement = new Connector(); - $connectors = [ - $connectorsElement, - ]; - $expectedResponse = new ListConnectorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConnectors($connectors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListConnectorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listConnectors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConnectors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vpcaccess.v1.VpcAccessService/ListConnectors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ListConnectorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listConnectors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 createConnectorAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $network = 'network1843485230'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $minThroughput = 2064735799; - $maxThroughput = 1407819749; - $machineType = 'machineType1838323762'; - $minInstances = 1491624145; - $maxInstances = 330682013; - $expectedResponse = new Connector(); - $expectedResponse->setName($name); - $expectedResponse->setNetwork($network); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setMinThroughput($minThroughput); - $expectedResponse->setMaxThroughput($maxThroughput); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setMinInstances($minInstances); - $expectedResponse->setMaxInstances($maxInstances); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectorId = 'connectorId1928724045'; - $connector = new Connector(); - $request = (new CreateConnectorRequest()) - ->setParent($formattedParent) - ->setConnectorId($connectorId) - ->setConnector($connector); - $response = $gapicClient->createConnectorAsync($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.vpcaccess.v1.VpcAccessService/CreateConnector', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConnectorId(); - $this->assertProtobufEquals($connectorId, $actualValue); - $actualValue = $actualApiRequestObject->getConnector(); - $this->assertProtobufEquals($connector, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectorTest'); - $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()); - } -} From 5fdf421f9b26b43572cd4733dfa31f1315f60345 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Tue, 5 Nov 2024 12:51:28 -0800 Subject: [PATCH 3/3] Revert "feat: add GlossaryConfig contextual translate" This reverts commit 3df5e59ae3cabe612aa49952ec89d79606ec3896. --- Translate/metadata/V3/AdaptiveMt.php | Bin 5617 -> 5571 bytes Translate/metadata/V3/TranslationService.php | Bin 20946 -> 20900 bytes .../GlossaryConfig.php | 38 --------- .../V3/Client/TranslationServiceClient.php | 76 +++++++++--------- .../src/V3/TranslateTextGlossaryConfig.php | 38 --------- 5 files changed, 38 insertions(+), 114 deletions(-) diff --git a/Translate/metadata/V3/AdaptiveMt.php b/Translate/metadata/V3/AdaptiveMt.php index 3519bbd86b75191729b2398fce72d1ec5f870c65..3b461863ad49b04b652d647510ce6a6a3afce186 100644 GIT binary patch delta 39 vcmeyUeOPgL#dmED<{X$s?HN$zwNA#EV>{Wo}_&Y-MB^1hc6w`y#XN8kYb7 diff --git a/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php b/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php index 3776f46bf9f3..1857ea6f63e3 100644 --- a/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php +++ b/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php @@ -33,13 +33,6 @@ class GlossaryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $ignore_case = false; - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $contextual_translation_enabled = false; /** * Constructor. @@ -55,9 +48,6 @@ class GlossaryConfig extends \Google\Protobuf\Internal\Message * @type bool $ignore_case * Optional. Indicates match is case insensitive. The default value is * `false` if missing. - * @type bool $contextual_translation_enabled - * Optional. If set to true, the glossary will be used for contextual - * translation. * } */ public function __construct($data = NULL) { @@ -125,34 +115,6 @@ public function setIgnoreCase($var) return $this; } - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContextualTranslationEnabled() - { - return $this->contextual_translation_enabled; - } - - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContextualTranslationEnabled($var) - { - GPBUtil::checkBool($var); - $this->contextual_translation_enabled = $var; - - return $this; - } - } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/Translate/src/V3/Client/TranslationServiceClient.php b/Translate/src/V3/Client/TranslationServiceClient.php index 42c3d39832d8..07a9091209c8 100644 --- a/Translate/src/V3/Client/TranslationServiceClient.php +++ b/Translate/src/V3/Client/TranslationServiceClient.php @@ -100,44 +100,44 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) */ final class TranslationServiceClient { diff --git a/Translate/src/V3/TranslateTextGlossaryConfig.php b/Translate/src/V3/TranslateTextGlossaryConfig.php index 2edd102cf343..f99bf2b04950 100644 --- a/Translate/src/V3/TranslateTextGlossaryConfig.php +++ b/Translate/src/V3/TranslateTextGlossaryConfig.php @@ -32,13 +32,6 @@ class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $ignore_case = false; - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $contextual_translation_enabled = false; /** * Constructor. @@ -54,9 +47,6 @@ class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message * @type bool $ignore_case * Optional. Indicates match is case insensitive. The default value is `false` * if missing. - * @type bool $contextual_translation_enabled - * Optional. If set to true, the glossary will be used for contextual - * translation. * } */ public function __construct($data = NULL) { @@ -124,33 +114,5 @@ public function setIgnoreCase($var) return $this; } - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getContextualTranslationEnabled() - { - return $this->contextual_translation_enabled; - } - - /** - * Optional. If set to true, the glossary will be used for contextual - * translation. - * - * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setContextualTranslationEnabled($var) - { - GPBUtil::checkBool($var); - $this->contextual_translation_enabled = $var; - - return $this; - } - }